@microsoft/applicationinsights-web-basic 3.0.0-beta.2302-01 → 3.0.0-beta.2302-02
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/aib.2.js +73 -34
- package/browser/aib.2.js.map +1 -1
- package/browser/aib.2.min.js +2 -2
- package/browser/aib.2.min.js.map +1 -1
- package/browser/aib.3.0.0-beta.2302-02.integrity.json +26 -0
- package/browser/{aib.3.0.0-beta.2302-01.js → aib.3.0.0-beta.2302-02.js} +74 -35
- package/browser/aib.3.0.0-beta.2302-02.js.map +1 -0
- package/browser/aib.3.0.0-beta.2302-02.min.js +6 -0
- package/browser/aib.3.0.0-beta.2302-02.min.js.map +1 -0
- package/dist/applicationinsights-web-basic.api.json +1 -1
- package/dist/applicationinsights-web-basic.d.ts +1 -1
- package/dist/applicationinsights-web-basic.js +73 -34
- package/dist/applicationinsights-web-basic.js.map +1 -1
- package/dist/applicationinsights-web-basic.min.js +2 -2
- package/dist/applicationinsights-web-basic.min.js.map +1 -1
- package/dist/applicationinsights-web-basic.rollup.d.ts +1 -1
- package/dist-esm/__DynamicConstants.js +6 -6
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/index.js +9 -6
- package/dist-esm/index.js.map +1 -1
- package/package.json +7 -7
- package/src/__DynamicConstants.ts +14 -14
- package/src/index.ts +25 -19
- package/types/__DynamicConstants.d.ts +1 -1
- package/browser/aib.3.0.0-beta.2302-01.integrity.json +0 -26
- package/browser/aib.3.0.0-beta.2302-01.js.map +0 -1
- package/browser/aib.3.0.0-beta.2302-01.min.js +0 -6
- package/browser/aib.3.0.0-beta.2302-01.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2302-
|
|
2
|
+
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2302-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// ##############################################################
|
|
9
9
|
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
10
10
|
// ##############################################################
|
|
11
|
-
//
|
|
12
|
-
// Note: DON'T Export these const from the package as we are still targeting
|
|
13
|
-
//
|
|
14
|
-
export var
|
|
15
|
-
export var
|
|
11
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
+
// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!
|
|
13
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
|
+
export var _DYN_INSTRUMENTATION_KEY = "instrumentationKey"; // Count: 3
|
|
15
|
+
export var _DYN_CONNECTION_STRING = "connectionString"; // Count: 3
|
|
16
16
|
//# sourceMappingURL=__DynamicConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n//
|
|
1
|
+
{"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_INSTRUMENTATION_KEY = \"instrumentationKey\"; // Count: 3\r\nexport var _DYN_CONNECTION_STRING = \"connectionString\"; // Count: 3\r\n//# sourceMappingURL=__DynamicConstants.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist-esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2302-
|
|
2
|
+
* Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2302-02
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ import dynamicProto from "@microsoft/dynamicproto-js";
|
|
|
8
8
|
import { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
9
9
|
import { DEFAULT_BREEZE_PATH, parseConnectionString } from "@microsoft/applicationinsights-common";
|
|
10
10
|
import { AppInsightsCore, createDynamicConfig, onConfigChange, proxyFunctions } from "@microsoft/applicationinsights-core-js";
|
|
11
|
-
import {
|
|
11
|
+
import { isNullOrUndefined, objDefine, throwError } from "@nevware21/ts-utils";
|
|
12
12
|
import { _DYN_CONNECTION_STRING, _DYN_INSTRUMENTATION_KEY } from "./__DynamicConstants";
|
|
13
13
|
var defaultConfigValues = {
|
|
14
14
|
diagnosticLogInterval: { isVal: _chkDiagLevel, v: 10000 }
|
|
@@ -30,12 +30,15 @@ var ApplicationInsights = /** @class */ (function () {
|
|
|
30
30
|
function ApplicationInsights(config) {
|
|
31
31
|
var core = new AppInsightsCore();
|
|
32
32
|
var _config;
|
|
33
|
+
// initialize the queue and config in case they are undefined
|
|
34
|
+
if (isNullOrUndefined(config) ||
|
|
35
|
+
(isNullOrUndefined(config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */]) && isNullOrUndefined(config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]))) {
|
|
36
|
+
throwError("Invalid input configuration");
|
|
37
|
+
}
|
|
33
38
|
dynamicProto(ApplicationInsights, this, function (_self) {
|
|
34
39
|
// Define _self.config
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () { return _config; }
|
|
40
|
+
objDefine(_self, "config", {
|
|
41
|
+
g: function () { return _config; }
|
|
39
42
|
});
|
|
40
43
|
_initialize();
|
|
41
44
|
_self.initialize = _initialize;
|
package/dist-esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nimport { DEFAULT_BREEZE_PATH, parseConnectionString } from \"@microsoft/applicationinsights-common\";\r\nimport { AppInsightsCore, createDynamicConfig, onConfigChange, proxyFunctions } from \"@microsoft/applicationinsights-core-js\";\r\nimport {
|
|
1
|
+
{"version":3,"file":"index.js.map","sources":["index.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nimport { DEFAULT_BREEZE_PATH, parseConnectionString } from \"@microsoft/applicationinsights-common\";\r\nimport { AppInsightsCore, createDynamicConfig, onConfigChange, proxyFunctions } from \"@microsoft/applicationinsights-core-js\";\r\nimport { isNullOrUndefined, objDefine, throwError } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CONNECTION_STRING, _DYN_INSTRUMENTATION_KEY } from \"./__DynamicConstants\";\r\nvar defaultConfigValues = {\r\n diagnosticLogInterval: { isVal: _chkDiagLevel, v: 10000 }\r\n};\r\nfunction _chkDiagLevel(value) {\r\n // Make sure we have a value > 0\r\n return value && value > 0;\r\n}\r\n/**\r\n * @export\r\n * @class ApplicationInsights\r\n */\r\nvar ApplicationInsights = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ApplicationInsights.\r\n * @param config\r\n * @memberof ApplicationInsights\r\n */\r\n function ApplicationInsights(config) {\r\n var core = new AppInsightsCore();\r\n var _config;\r\n // initialize the queue and config in case they are undefined\r\n if (isNullOrUndefined(config) ||\r\n (isNullOrUndefined(config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */]) && isNullOrUndefined(config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]))) {\r\n throwError(\"Invalid input configuration\");\r\n }\r\n dynamicProto(ApplicationInsights, this, function (_self) {\r\n // Define _self.config\r\n objDefine(_self, \"config\", {\r\n g: function () { return _config; }\r\n });\r\n _initialize();\r\n _self.initialize = _initialize;\r\n proxyFunctions(_self, core, [\r\n \"track\",\r\n \"flush\",\r\n \"pollInternalLogs\",\r\n \"stopPollingInternalLogs\",\r\n \"unload\",\r\n \"getPlugin\",\r\n \"addPlugin\",\r\n \"evtNamespace\",\r\n \"addUnloadCb\",\r\n \"onCfgChange\"\r\n ]);\r\n function _initialize() {\r\n var cfgHandler = createDynamicConfig(config || {}, defaultConfigValues);\r\n _config = cfgHandler.cfg;\r\n core.addUnloadHook(onConfigChange(cfgHandler, function () {\r\n if (_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]) {\r\n var cs = parseConnectionString(_config[_DYN_CONNECTION_STRING /* @min:%2econnectionString */]);\r\n var ingest = cs.ingestionendpoint;\r\n _config.endpointUrl = ingest ? (ingest + DEFAULT_BREEZE_PATH) : _config.endpointUrl; // only add /v2/track when from connectionstring\r\n _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */] = cs.instrumentationkey || _config[_DYN_INSTRUMENTATION_KEY /* @min:%2einstrumentationKey */];\r\n }\r\n }));\r\n // initialize core\r\n core.initialize(_config, [new Sender()]);\r\n }\r\n });\r\n }\r\n /**\r\n * Initialize this instance of ApplicationInsights\r\n *\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.initialize = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Send a manually constructed custom event\r\n *\r\n * @param item\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.track = function (item) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Immediately send all batched telemetry\r\n * @param [async=true]\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.flush = function (async) {\r\n if (async === void 0) { async = true; }\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ApplicationInsights.prototype.pollInternalLogs = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ApplicationInsights.prototype.stopPollingInternalLogs = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered\r\n * to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous\r\n * unload call return `true` stating that all plugins reported that they also unloaded, the recommended\r\n * approach is to create a new instance and initialize that instance.\r\n * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable\r\n * to successfully remove any global references or they may just be completing the unload process asynchronously.\r\n */\r\n ApplicationInsights.prototype.unload = function (isAsync, unloadComplete) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Find and return the (first) plugin with the specified identifier if present\r\n * @param pluginIdentifier\r\n */\r\n ApplicationInsights.prototype.getPlugin = function (pluginIdentifier) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add a new plugin to the installation\r\n * @param plugin - The new plugin to add\r\n * @param replaceExisting - should any existing plugin be replaced\r\n * @param doAsync - Should the add be performed asynchronously\r\n */\r\n ApplicationInsights.prototype.addPlugin = function (plugin, replaceExisting, doAsync, addCb) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Returns the unique event namespace that should be used\r\n */\r\n ApplicationInsights.prototype.evtNamespace = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n /**\r\n * Add an unload handler that will be called when the SDK is being unloaded\r\n * @param handler - the handler\r\n */\r\n ApplicationInsights.prototype.addUnloadCb = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Watches and tracks changes for accesses to the current config, and if the accessed config changes the\r\n * handler will be recalled.\r\n * @param handler\r\n * @returns A watcher handler instance that can be used to remove itself when being unloaded\r\n */\r\n ApplicationInsights.prototype.onCfgChange = function (handler) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n return null;\r\n };\r\n return ApplicationInsights;\r\n}());\r\nexport { ApplicationInsights };\r\nexport { AppInsightsCore, arrForEach, isNullOrUndefined, throwError, proxyFunctions } from \"@microsoft/applicationinsights-core-js\";\r\nexport { SeverityLevel } from \"@microsoft/applicationinsights-common\";\r\nexport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;8DAoFM,CAAC;;;;;+BACwB;AAC/B;AACA;AACA;AACA;AACA;AACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-web-basic",
|
|
3
|
-
"version": "3.0.0-beta.2302-
|
|
3
|
+
"version": "3.0.0-beta.2302-02",
|
|
4
4
|
"description": "Microsoft Application Insights Javascript SDK core and channel",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@microsoft/api-extractor": "^7.18.1",
|
|
34
34
|
"grunt": "^1.5.3",
|
|
35
35
|
"grunt-cli": "^1.4.3",
|
|
36
|
-
"grunt-contrib-qunit": "^
|
|
36
|
+
"grunt-contrib-qunit": "^6.2.1",
|
|
37
37
|
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
38
38
|
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
|
39
39
|
"globby": "^11.0.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@rollup/plugin-replace": "^2.3.3",
|
|
45
45
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
46
46
|
"rollup": "^2.32.0",
|
|
47
|
-
"typescript": "^4.3
|
|
47
|
+
"typescript": "^4.9.3",
|
|
48
48
|
"tslib": "^2.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@microsoft/dynamicproto-js": "^1.1.7",
|
|
55
55
|
"@microsoft/applicationinsights-shims": "2.0.2",
|
|
56
|
-
"@microsoft/applicationinsights-common": "3.0.0-beta.2302-
|
|
57
|
-
"@microsoft/applicationinsights-channel-js": "3.0.0-beta.2302-
|
|
58
|
-
"@microsoft/applicationinsights-core-js": "3.0.0-beta.2302-
|
|
59
|
-
"@nevware21/ts-utils": "^0.
|
|
56
|
+
"@microsoft/applicationinsights-common": "3.0.0-beta.2302-02",
|
|
57
|
+
"@microsoft/applicationinsights-channel-js": "3.0.0-beta.2302-02",
|
|
58
|
+
"@microsoft/applicationinsights-core-js": "3.0.0-beta.2302-02",
|
|
59
|
+
"@nevware21/ts-utils": "^0.7.0"
|
|
60
60
|
},
|
|
61
61
|
"license": "MIT",
|
|
62
62
|
"publishConfig": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
// @skip-file-minify
|
|
4
|
-
|
|
5
|
-
// ##############################################################
|
|
6
|
-
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
7
|
-
// ##############################################################
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
// Note: DON'T Export these const from the package as we are still targeting
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
// @skip-file-minify
|
|
4
|
+
|
|
5
|
+
// ##############################################################
|
|
6
|
+
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
7
|
+
// ##############################################################
|
|
8
|
+
|
|
9
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
+
// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!
|
|
11
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
|
+
|
|
13
|
+
export const _DYN_INSTRUMENTATION_KEY = "instrumentationKey"; // Count: 3
|
|
14
|
+
export const _DYN_CONNECTION_STRING = "connectionString"; // Count: 3
|
package/src/index.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
|
|
4
|
-
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
5
|
-
import { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
6
|
-
import { DEFAULT_BREEZE_PATH, IConfig, parseConnectionString } from "@microsoft/applicationinsights-common";
|
|
7
|
-
import {
|
|
8
|
-
AppInsightsCore, IConfigDefaults, IConfiguration, IDynamicConfigHandler, ILoadedPlugin, IPlugin, ITelemetryItem, ITelemetryPlugin,
|
|
9
|
-
IUnloadHook, UnloadHandler, WatcherFunction, createDynamicConfig, onConfigChange, proxyFunctions
|
|
10
|
-
} from "@microsoft/applicationinsights-core-js";
|
|
11
|
-
import {
|
|
12
|
-
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
5
|
+
import { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
6
|
+
import { DEFAULT_BREEZE_PATH, IConfig, parseConnectionString } from "@microsoft/applicationinsights-common";
|
|
7
|
+
import {
|
|
8
|
+
AppInsightsCore, IConfigDefaults, IConfiguration, IDynamicConfigHandler, ILoadedPlugin, IPlugin, ITelemetryItem, ITelemetryPlugin,
|
|
9
|
+
IUnloadHook, UnloadHandler, WatcherFunction, createDynamicConfig, onConfigChange, proxyFunctions
|
|
10
|
+
} from "@microsoft/applicationinsights-core-js";
|
|
11
|
+
import { isNullOrUndefined, objDefine, throwError } from "@nevware21/ts-utils";
|
|
12
|
+
|
|
13
13
|
const defaultConfigValues: IConfigDefaults<IConfiguration> = {
|
|
14
14
|
diagnosticLogInterval: { isVal: _chkDiagLevel, v: 10000 }
|
|
15
15
|
};
|
|
@@ -35,13 +35,19 @@ export class ApplicationInsights {
|
|
|
35
35
|
let core = new AppInsightsCore();
|
|
36
36
|
let _config: IConfiguration & IConfig;
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
// initialize the queue and config in case they are undefined
|
|
39
|
+
if (
|
|
40
|
+
isNullOrUndefined(config) ||
|
|
41
|
+
(isNullOrUndefined(config.instrumentationKey) && isNullOrUndefined(config.connectionString))
|
|
42
|
+
) {
|
|
43
|
+
throwError("Invalid input configuration");
|
|
44
|
+
}
|
|
39
45
|
|
|
46
|
+
dynamicProto(ApplicationInsights, this, (_self) => {
|
|
47
|
+
|
|
40
48
|
// Define _self.config
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: () => _config
|
|
49
|
+
objDefine(_self, "config", {
|
|
50
|
+
g: () => _config
|
|
45
51
|
});
|
|
46
52
|
|
|
47
53
|
_initialize();
|
|
@@ -191,8 +197,8 @@ export {
|
|
|
191
197
|
proxyFunctions,
|
|
192
198
|
IPlugin,
|
|
193
199
|
ITelemetryPlugin
|
|
194
|
-
|
|
195
200
|
} from "@microsoft/applicationinsights-core-js";
|
|
201
|
+
|
|
196
202
|
export {
|
|
197
203
|
SeverityLevel,
|
|
198
204
|
eSeverityLevel,
|
|
@@ -204,4 +210,4 @@ export {
|
|
|
204
210
|
IPageViewPerformanceTelemetry,
|
|
205
211
|
ITraceTelemetry
|
|
206
212
|
} from "@microsoft/applicationinsights-common";
|
|
207
|
-
export { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
213
|
+
export { Sender } from "@microsoft/applicationinsights-channel-js";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "aib",
|
|
3
|
-
"version": "3.0.0-beta.2302-01",
|
|
4
|
-
"ext": {
|
|
5
|
-
"@js": {
|
|
6
|
-
"file": "aib.3.0.0-beta.2302-01.js",
|
|
7
|
-
"type": "text/javascript; charset=utf-8",
|
|
8
|
-
"integrity": "sha256-rsuivXT+T6AQL9Uk+ou8neYtqddZDgdZoTC43eNixP8= sha384-gQ7RYRUTU00tC1Qgf4sJshiriK8KbDh/ZleTjiR7RM4OrWlaefYjQODrXHMzUW2L sha512-aNANawaJp8VVQegUNH17UhtAxoekb3kyP3lu3Sgt/SRfh5QYY03n3XYA55hIhV48p6/FLEiIEUC/KIEmbDzYWg==",
|
|
9
|
-
"hashes": {
|
|
10
|
-
"sha256": "rsuivXT+T6AQL9Uk+ou8neYtqddZDgdZoTC43eNixP8=",
|
|
11
|
-
"sha384": "gQ7RYRUTU00tC1Qgf4sJshiriK8KbDh/ZleTjiR7RM4OrWlaefYjQODrXHMzUW2L",
|
|
12
|
-
"sha512": "aNANawaJp8VVQegUNH17UhtAxoekb3kyP3lu3Sgt/SRfh5QYY03n3XYA55hIhV48p6/FLEiIEUC/KIEmbDzYWg=="
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"@min.js": {
|
|
16
|
-
"file": "aib.3.0.0-beta.2302-01.min.js",
|
|
17
|
-
"type": "text/javascript; charset=utf-8",
|
|
18
|
-
"integrity": "sha256-tpt0fQYSPZcx5EDchUqihws0p7urLLDlLf8QCyPcxF4= sha384-CWfxgW84m0p66T410I32Vb/ZeBnDKvMVxmE2iIgKqfLxAmBOcERAbyeV0YYVeQJ6 sha512-eyACcqGC3T1y9cpwbVSH9FkdpCx5ZjpEAHA1IH1wnM10/mCU/VbE70KwhJjoCDKwLT4mi2onOtDenyZhVKnTrQ==",
|
|
19
|
-
"hashes": {
|
|
20
|
-
"sha256": "tpt0fQYSPZcx5EDchUqihws0p7urLLDlLf8QCyPcxF4=",
|
|
21
|
-
"sha384": "CWfxgW84m0p66T410I32Vb/ZeBnDKvMVxmE2iIgKqfLxAmBOcERAbyeV0YYVeQJ6",
|
|
22
|
-
"sha512": "eyACcqGC3T1y9cpwbVSH9FkdpCx5ZjpEAHA1IH1wnM10/mCU/VbE70KwhJjoCDKwLT4mi2onOtDenyZhVKnTrQ=="
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|