Skip to content

Commit

Permalink
Merge pull request #63 from tanmaya-panda1/enhancement/added-kusto-he…
Browse files Browse the repository at this point in the history
…aders

added kusto specific headers
  • Loading branch information
tanmaya-panda1 authored Jan 16, 2024
2 parents 2036c9b + e54e690 commit 21cbc96
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/ServerClient/ADXClient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ADXResponse, RawADXResponse } from "./ADXResponse";

type ADXTokenProvider = () => Promise<string>;

declare global {
Expand Down Expand Up @@ -69,7 +70,10 @@ export class ADXClient {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
"x-ms-client-request-id": `KTrender;${self.crypto.randomUUID()}`,
"x-ms-app": "KustoTrender"
"x-ms-app": "KustoTrender",
"x-ms-client-version": process.env.PACKAGE_VERSION,
"x-ms-user" : "KustoTrender",
"User-Agent" : navigator.userAgent
},
body: JSON.stringify(body),
});
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"lib" : ["es5", "es2015.promise", "dom", "es6"],
"moduleResolution": "Node",
"declaration": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"esModuleInterop": true
},
"include": [
"src"
Expand Down
7 changes: 7 additions & 0 deletions webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const path = require('path');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const packageJson = require('./package.json');
const webpack = require('webpack');

module.exports = {
entry: './src/KustoTrender.ts',
Expand Down Expand Up @@ -48,4 +50,9 @@ module.exports = {
publicPath: '/dist/',
libraryTarget: 'umd'
},
plugins: [
new webpack.DefinePlugin({
'process.env.PACKAGE_VERSION': JSON.stringify(packageJson.version)
})
]
};

0 comments on commit 21cbc96

Please sign in to comment.