Skip to content

Commit

Permalink
addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaya-panda1 committed Jan 15, 2024
1 parent 6793bd7 commit e54e690
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ServerClient/ADXClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ADXResponse, RawADXResponse } from "./ADXResponse";
const packageJson = require('../../package.json');

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

Expand Down Expand Up @@ -72,8 +71,9 @@ export class ADXClient {
Authorization: `Bearer ${token}`,
"x-ms-client-request-id": `KTrender;${self.crypto.randomUUID()}`,
"x-ms-app": "KustoTrender",
"x-ms-client-version": packageJson.version,
"x-ms-user" : "KustoTrender"
"x-ms-client-version": process.env.PACKAGE_VERSION,
"x-ms-user" : "KustoTrender",
"User-Agent" : navigator.userAgent
},
body: JSON.stringify(body),
});
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 e54e690

Please sign in to comment.