@microsoft/applicationinsights-web-basic 2.7.5-nightly.2204-03 → 2.7.6

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/dist-esm/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /*
2
- * Application Insights JavaScript Web SDK - Basic, 2.7.5-nightly.2204-03
2
+ * Application Insights JavaScript Web SDK - Basic, 2.7.6
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
6
6
 
7
- import dynamicProto from "@microsoft/dynamicproto-js";
8
- import { AppInsightsCore, isNullOrUndefined, throwError, proxyFunctions } from "@microsoft/applicationinsights-core-js";
7
+ import { AppInsightsCore, isNullOrUndefined, arrForEach, throwError } from "@microsoft/applicationinsights-core-js";
9
8
  import { Sender } from "@microsoft/applicationinsights-channel-js";
9
+ "use strict";
10
10
  /**
11
11
  * @export
12
12
  * @class ApplicationInsights
@@ -18,59 +18,69 @@ var ApplicationInsights = /** @class */ (function () {
18
18
  * @memberof ApplicationInsights
19
19
  */
20
20
  function ApplicationInsights(config) {
21
- var core = new AppInsightsCore();
22
21
  // initialize the queue and config in case they are undefined
23
22
  if (isNullOrUndefined(config) ||
24
23
  isNullOrUndefined(config.instrumentationKey)) {
25
24
  throwError("Invalid input configuration");
26
25
  }
27
- dynamicProto(ApplicationInsights, this, function (_self) {
28
- _self.config = config;
29
- _self.getSKUDefaults();
30
- _initialize();
31
- _self.initialize = _initialize;
32
- _self.getSKUDefaults = function () {
33
- _self.config.diagnosticLogInterval =
34
- _self.config.diagnosticLogInterval && _self.config.diagnosticLogInterval > 0 ? _self.config.diagnosticLogInterval : 10000;
35
- };
36
- proxyFunctions(_self, core, [
37
- "track",
38
- "flush",
39
- "pollInternalLogs",
40
- "stopPollingInternalLogs",
41
- "unload",
42
- "getPlugin",
43
- "addPlugin",
44
- "evtNamespace",
45
- "addUnloadCb"
46
- ]);
47
- function _initialize() {
48
- var extensions = [];
49
- var appInsightsChannel = new Sender();
50
- extensions.push(appInsightsChannel);
51
- // initialize core
52
- core.initialize(this.config, extensions);
53
- // initialize extensions
54
- appInsightsChannel.initialize(this.config, core, extensions);
55
- core.pollInternalLogs();
56
- }
57
- });
26
+ this.config = config;
27
+ this.getSKUDefaults();
28
+ this.initialize();
58
29
  }
59
- // Removed Stub for ApplicationInsights.prototype.initialize.
60
- // Removed Stub for ApplicationInsights.prototype.track.
61
- // Removed Stub for ApplicationInsights.prototype.flush.
62
- // Removed Stub for ApplicationInsights.prototype.pollInternalLogs.
63
- // Removed Stub for ApplicationInsights.prototype.stopPollingInternalLogs.
64
- // Removed Stub for ApplicationInsights.prototype.getSKUDefaults.
65
- // Removed Stub for ApplicationInsights.prototype.unload.
66
- // Removed Stub for ApplicationInsights.prototype.getPlugin.
67
- // Removed Stub for ApplicationInsights.prototype.addPlugin.
68
- // Removed Stub for ApplicationInsights.prototype.evtNamespace.
69
- // Removed Stub for ApplicationInsights.prototype.addUnloadCb.
30
+ /**
31
+ * Initialize this instance of ApplicationInsights
32
+ *
33
+ * @memberof ApplicationInsights
34
+ */
35
+ ApplicationInsights.prototype.initialize = function () {
36
+ this.core = new AppInsightsCore();
37
+ var extensions = [];
38
+ var appInsightsChannel = new Sender();
39
+ extensions.push(appInsightsChannel);
40
+ // initialize core
41
+ this.core.initialize(this.config, extensions);
42
+ // initialize extensions
43
+ appInsightsChannel.initialize(this.config, this.core, extensions);
44
+ this.pollInternalLogs();
45
+ };
46
+ /**
47
+ * Send a manually constructed custom event
48
+ *
49
+ * @param {ITelemetryItem} item
50
+ * @memberof ApplicationInsights
51
+ */
52
+ ApplicationInsights.prototype.track = function (item) {
53
+ this.core.track(item);
54
+ };
55
+ /**
56
+ * Immediately send all batched telemetry
57
+ * @param {boolean} [async=true]
58
+ * @memberof ApplicationInsights
59
+ */
60
+ ApplicationInsights.prototype.flush = function (async) {
61
+ if (async === void 0) { async = true; }
62
+ arrForEach(this.core.getTransmissionControls(), function (controls) {
63
+ arrForEach(controls, function (plugin) {
64
+ async
65
+ ? plugin.flush()
66
+ : plugin.triggerSend(async, null, 1 /* ManualFlush */);
67
+ });
68
+ });
69
+ };
70
+ ApplicationInsights.prototype.pollInternalLogs = function () {
71
+ this.core.pollInternalLogs();
72
+ };
73
+ ApplicationInsights.prototype.stopPollingInternalLogs = function () {
74
+ this.core.stopPollingInternalLogs();
75
+ };
76
+ ApplicationInsights.prototype.getSKUDefaults = function () {
77
+ this.config.diagnosticLogInterval =
78
+ this.config.diagnosticLogInterval && this.config.diagnosticLogInterval > 0 ? this.config.diagnosticLogInterval : 10000;
79
+ };
70
80
  return ApplicationInsights;
71
81
  }());
72
82
  export { ApplicationInsights };
73
- export { AppInsightsCore, CoreUtils, arrForEach, _InternalMessageId, isNullOrUndefined, throwError, proxyFunctions } from "@microsoft/applicationinsights-core-js";
83
+ export { AppInsightsCore, CoreUtils } from "@microsoft/applicationinsights-core-js";
74
84
  export { SeverityLevel } from "@microsoft/applicationinsights-common";
75
85
  export { Sender } from "@microsoft/applicationinsights-channel-js";
76
86
  //# sourceMappingURL=index.js.map
@@ -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 { AppInsightsCore, isNullOrUndefined, throwError, proxyFunctions } from \"@microsoft/applicationinsights-core-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\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 {IConfiguration & IConfig} config\r\n * @memberof ApplicationInsights\r\n */\r\n function ApplicationInsights(config) {\r\n var core = new AppInsightsCore();\r\n // initialize the queue and config in case they are undefined\r\n if (isNullOrUndefined(config) ||\r\n isNullOrUndefined(config.instrumentationKey)) {\r\n throwError(\"Invalid input configuration\");\r\n }\r\n dynamicProto(ApplicationInsights, this, function (_self) {\r\n _self.config = config;\r\n _self.getSKUDefaults();\r\n _initialize();\r\n _self.initialize = _initialize;\r\n _self.getSKUDefaults = function () {\r\n _self.config.diagnosticLogInterval =\r\n _self.config.diagnosticLogInterval && _self.config.diagnosticLogInterval > 0 ? _self.config.diagnosticLogInterval : 10000;\r\n };\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 ]);\r\n function _initialize() {\r\n var extensions = [];\r\n var appInsightsChannel = new Sender();\r\n extensions.push(appInsightsChannel);\r\n // initialize core\r\n core.initialize(this.config, extensions);\r\n // initialize extensions\r\n appInsightsChannel.initialize(this.config, core, extensions);\r\n core.pollInternalLogs();\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 {ITelemetryItem} 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 {boolean} [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 ApplicationInsights.prototype.getSKUDefaults = 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 return ApplicationInsights;\r\n}());\r\nexport { ApplicationInsights };\r\nexport { AppInsightsCore, CoreUtils, arrForEach, _InternalMessageId, 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;;;;;;;;;;8DA6EM;AACN;AACA;AACA;AACA;AACA;AACA;AACA"}
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 { AppInsightsCore, isNullOrUndefined, arrForEach, throwError } from \"@microsoft/applicationinsights-core-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\n\"use strict\";\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 {IConfiguration & IConfig} config\r\n * @memberof ApplicationInsights\r\n */\r\n function ApplicationInsights(config) {\r\n // initialize the queue and config in case they are undefined\r\n if (isNullOrUndefined(config) ||\r\n isNullOrUndefined(config.instrumentationKey)) {\r\n throwError(\"Invalid input configuration\");\r\n }\r\n this.config = config;\r\n this.getSKUDefaults();\r\n this.initialize();\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 this.core = new AppInsightsCore();\r\n var extensions = [];\r\n var appInsightsChannel = new Sender();\r\n extensions.push(appInsightsChannel);\r\n // initialize core\r\n this.core.initialize(this.config, extensions);\r\n // initialize extensions\r\n appInsightsChannel.initialize(this.config, this.core, extensions);\r\n this.pollInternalLogs();\r\n };\r\n /**\r\n * Send a manually constructed custom event\r\n *\r\n * @param {ITelemetryItem} item\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.track = function (item) {\r\n this.core.track(item);\r\n };\r\n /**\r\n * Immediately send all batched telemetry\r\n * @param {boolean} [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 arrForEach(this.core.getTransmissionControls(), function (controls) {\r\n arrForEach(controls, function (plugin) {\r\n async\r\n ? plugin.flush()\r\n : plugin.triggerSend(async, null, 1 /* ManualFlush */);\r\n });\r\n });\r\n };\r\n ApplicationInsights.prototype.pollInternalLogs = function () {\r\n this.core.pollInternalLogs();\r\n };\r\n ApplicationInsights.prototype.stopPollingInternalLogs = function () {\r\n this.core.stopPollingInternalLogs();\r\n };\r\n ApplicationInsights.prototype.getSKUDefaults = function () {\r\n this.config.diagnosticLogInterval =\r\n this.config.diagnosticLogInterval && this.config.diagnosticLogInterval > 0 ? this.config.diagnosticLogInterval : 10000;\r\n };\r\n return ApplicationInsights;\r\n}());\r\nexport { ApplicationInsights };\r\nexport { AppInsightsCore, CoreUtils } 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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
package/index.ts ADDED
@@ -0,0 +1,125 @@
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ import {
5
+ IConfiguration,
6
+ AppInsightsCore,
7
+ IAppInsightsCore,
8
+ _InternalMessageId,
9
+ isNullOrUndefined,
10
+ arrForEach,
11
+ ITelemetryItem,
12
+ SendRequestReason,
13
+ throwError
14
+ } from "@microsoft/applicationinsights-core-js";
15
+ import { IConfig } from "@microsoft/applicationinsights-common";
16
+ import { Sender } from "@microsoft/applicationinsights-channel-js";
17
+
18
+ "use strict";
19
+
20
+ /**
21
+ * @export
22
+ * @class ApplicationInsights
23
+ */
24
+ export class ApplicationInsights {
25
+ public config: IConfiguration & IConfig;
26
+ private core: IAppInsightsCore;
27
+
28
+ /**
29
+ * Creates an instance of ApplicationInsights.
30
+ * @param {IConfiguration & IConfig} config
31
+ * @memberof ApplicationInsights
32
+ */
33
+ constructor(config: IConfiguration & IConfig) {
34
+ // initialize the queue and config in case they are undefined
35
+ if (
36
+ isNullOrUndefined(config) ||
37
+ isNullOrUndefined(config.instrumentationKey)
38
+ ) {
39
+ throwError("Invalid input configuration");
40
+ }
41
+ this.config = config;
42
+ this.getSKUDefaults();
43
+
44
+ this.initialize();
45
+ }
46
+
47
+ /**
48
+ * Initialize this instance of ApplicationInsights
49
+ *
50
+ * @memberof ApplicationInsights
51
+ */
52
+ public initialize(): void {
53
+ this.core = new AppInsightsCore();
54
+ const extensions = [];
55
+ const appInsightsChannel: Sender = new Sender();
56
+
57
+ extensions.push(appInsightsChannel);
58
+
59
+ // initialize core
60
+ this.core.initialize(this.config, extensions);
61
+
62
+ // initialize extensions
63
+ appInsightsChannel.initialize(this.config, this.core, extensions);
64
+
65
+ this.pollInternalLogs();
66
+ }
67
+
68
+ /**
69
+ * Send a manually constructed custom event
70
+ *
71
+ * @param {ITelemetryItem} item
72
+ * @memberof ApplicationInsights
73
+ */
74
+ public track(item: ITelemetryItem) {
75
+ this.core.track(item);
76
+ }
77
+
78
+ /**
79
+ * Immediately send all batched telemetry
80
+ * @param {boolean} [async=true]
81
+ * @memberof ApplicationInsights
82
+ */
83
+ public flush(async: boolean = true) {
84
+ arrForEach(this.core.getTransmissionControls(), controls => {
85
+ arrForEach(controls, plugin => {
86
+ async
87
+ ? (plugin as Sender).flush()
88
+ : (plugin as Sender).triggerSend(async, null, SendRequestReason.ManualFlush);
89
+ });
90
+ });
91
+ }
92
+
93
+ private pollInternalLogs(): void {
94
+ this.core.pollInternalLogs();
95
+ }
96
+
97
+ public stopPollingInternalLogs(): void {
98
+ this.core.stopPollingInternalLogs();
99
+ }
100
+
101
+ private getSKUDefaults() {
102
+ this.config.diagnosticLogInterval =
103
+ this.config.diagnosticLogInterval && this.config.diagnosticLogInterval > 0 ? this.config.diagnosticLogInterval : 10000;
104
+ }
105
+
106
+ }
107
+
108
+ export {
109
+ IConfiguration,
110
+ AppInsightsCore,
111
+ IAppInsightsCore,
112
+ CoreUtils,
113
+ ITelemetryItem
114
+ } from "@microsoft/applicationinsights-core-js";
115
+ export {
116
+ SeverityLevel,
117
+ IPageViewTelemetry,
118
+ IDependencyTelemetry,
119
+ IAutoExceptionTelemetry,
120
+ IEventTelemetry,
121
+ IMetricTelemetry,
122
+ IPageViewPerformanceTelemetry,
123
+ ITraceTelemetry
124
+ } from "@microsoft/applicationinsights-common";
125
+ export { Sender } from "@microsoft/applicationinsights-channel-js";
package/package.json CHANGED
@@ -1,62 +1,57 @@
1
- {
2
- "name": "@microsoft/applicationinsights-web-basic",
3
- "version": "2.7.5-nightly.2204-03",
4
- "description": "Microsoft Application Insights Javascript SDK core and channel",
5
- "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
- "author": "Microsoft Application Insights Team",
7
- "main": "dist/applicationinsights-web-basic.js",
8
- "module": "dist-esm/index.js",
9
- "types": "types/index.d.ts",
10
- "sideEffects": false,
11
- "scripts": {
12
- "build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
13
- "build:esm": "grunt aiskulite",
14
- "build:browser": "rollup -c rollup.config.js",
15
- "rebuild": "npm run build",
16
- "test": "grunt aiskuliteunittests",
17
- "lint": "tslint -p tsconfig.json",
18
- "dtsgen": "api-extractor run --local && node ../scripts/dtsgen.js 'Microsoft.ApplicationInsights'",
19
- "sri": "node ../tools/subResourceIntegrity/generateIntegrityFile.js"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "https://github.com/microsoft/ApplicationInsights-JS.git",
24
- "directory": "AISKULight"
25
- },
26
- "devDependencies": {
27
- "@microsoft/ai-test-framework": "0.0.1",
28
- "@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
29
- "@microsoft/applicationinsights-rollup-es3": "1.1.3",
30
- "@microsoft/api-extractor": "^7.18.1",
31
- "grunt": "^1.4.1",
32
- "grunt-cli": "^1.4.3",
33
- "grunt-contrib-qunit": "^5.0.1",
34
- "@nevware21/grunt-ts-plugin": "^0.4.3",
35
- "@nevware21/grunt-eslint-ts": "^0.2.2",
36
- "globby": "^11.0.0",
37
- "magic-string": "^0.25.7",
38
- "pako": "^2.0.3",
39
- "@rollup/plugin-commonjs": "^18.0.0",
40
- "@rollup/plugin-node-resolve": "^11.2.1",
41
- "@rollup/plugin-replace": "^2.3.3",
42
- "rollup-plugin-cleanup": "^3.2.1",
43
- "rollup": "^2.32.0",
44
- "source-map-loader": "^0.2.3",
45
- "typescript": "^4.3.4",
46
- "tslib": "^2.0.0"
47
- },
48
- "peerDependencies": {
49
- "tslib": "*"
50
- },
51
- "dependencies": {
52
- "@microsoft/dynamicproto-js": "^1.1.4",
53
- "@microsoft/applicationinsights-shims": "2.0.1",
54
- "@microsoft/applicationinsights-common": "2.7.5-nightly.2204-03",
55
- "@microsoft/applicationinsights-channel-js": "2.7.5-nightly.2204-03",
56
- "@microsoft/applicationinsights-core-js": "2.7.5-nightly.2204-03"
57
- },
58
- "license": "MIT",
59
- "publishConfig": {
60
- "tag": "nightly"
61
- }
62
- }
1
+ {
2
+ "name": "@microsoft/applicationinsights-web-basic",
3
+ "version": "2.7.6",
4
+ "description": "Microsoft Application Insights Javascript SDK core and channel",
5
+ "homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
6
+ "author": "Microsoft Application Insights Team",
7
+ "main": "dist/applicationinsights-web-basic.js",
8
+ "module": "dist-esm/index.js",
9
+ "types": "types/index.d.ts",
10
+ "sideEffects": false,
11
+ "scripts": {
12
+ "build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
13
+ "build:esm": "grunt aiskulite",
14
+ "build:browser": "rollup -c rollup.config.js",
15
+ "rebuild": "npm run build",
16
+ "test": "echo 'No tests'",
17
+ "lint": "tslint -p tsconfig.json",
18
+ "dtsgen": "api-extractor run --local && node ../scripts/dtsgen.js 'Microsoft.ApplicationInsights'",
19
+ "sri": "node ../tools/subResourceIntegrity/generateIntegrityFile.js"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/microsoft/ApplicationInsights-JS.git",
24
+ "directory": "AISKULight"
25
+ },
26
+ "devDependencies": {
27
+ "@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
28
+ "@microsoft/applicationinsights-rollup-es3": "1.1.3",
29
+ "@microsoft/api-extractor": "^7.18.1",
30
+ "grunt": "^1.4.1",
31
+ "grunt-cli": "^1.4.3",
32
+ "grunt-contrib-qunit": "^5.0.1",
33
+ "@nevware21/grunt-ts-plugin": "^0.4.3",
34
+ "@nevware21/grunt-eslint-ts": "^0.2.2",
35
+ "globby": "^11.0.0",
36
+ "magic-string": "^0.25.7",
37
+ "@rollup/plugin-commonjs": "^18.0.0",
38
+ "@rollup/plugin-node-resolve": "^11.2.1",
39
+ "@rollup/plugin-replace": "^2.3.3",
40
+ "rollup-plugin-cleanup": "3.2.1",
41
+ "rollup": "^2.32.0",
42
+ "source-map-loader": "^0.2.3",
43
+ "typescript": "^4.3.4",
44
+ "tslib": "^2.0.0"
45
+ },
46
+ "peerDependencies": {
47
+ "tslib": "*"
48
+ },
49
+ "dependencies": {
50
+ "@microsoft/dynamicproto-js": "^1.1.6",
51
+ "@microsoft/applicationinsights-shims": "2.0.1",
52
+ "@microsoft/applicationinsights-common": "2.7.6",
53
+ "@microsoft/applicationinsights-channel-js": "2.7.6",
54
+ "@microsoft/applicationinsights-core-js": "2.7.6"
55
+ },
56
+ "license": "MIT"
57
+ }
package/tsconfig.json CHANGED
@@ -16,12 +16,8 @@
16
16
  "declaration": true,
17
17
  "declarationDir": "AISKULight/types",
18
18
  "outDir": "dist-esm",
19
- "rootDir": "./AISKULight/src"
19
+ "rootDir": "AISKULight"
20
20
  },
21
- "include": [
22
- "src/**/*"
23
- ],
24
- "exclude": [
25
- "node_modules"
26
- ]
21
+ "include": ["index.ts"],
22
+ "exclude": ["node_modules"]
27
23
  }
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IConfiguration, ITelemetryItem, UnloadHandler, IPlugin, ITelemetryPlugin, ILoadedPlugin } from "@microsoft/applicationinsights-core-js";
1
+ import { IConfiguration, ITelemetryItem } from "@microsoft/applicationinsights-core-js";
2
2
  import { IConfig } from "@microsoft/applicationinsights-common";
3
3
  /**
4
4
  * @export
@@ -6,6 +6,7 @@ import { IConfig } from "@microsoft/applicationinsights-common";
6
6
  */
7
7
  export declare class ApplicationInsights {
8
8
  config: IConfiguration & IConfig;
9
+ private core;
9
10
  /**
10
11
  * Creates an instance of ApplicationInsights.
11
12
  * @param {IConfiguration & IConfig} config
@@ -31,40 +32,10 @@ export declare class ApplicationInsights {
31
32
  * @memberof ApplicationInsights
32
33
  */
33
34
  flush(async?: boolean): void;
34
- pollInternalLogs(): void;
35
+ private pollInternalLogs;
35
36
  stopPollingInternalLogs(): void;
36
- getSKUDefaults(): void;
37
- /**
38
- * Unload and Tear down the SDK and any initialized plugins, after calling this the SDK will be considered
39
- * to be un-initialized and non-operational, re-initializing the SDK should only be attempted if the previous
40
- * unload call return `true` stating that all plugins reported that they also unloaded, the recommended
41
- * approach is to create a new instance and initialize that instance.
42
- * This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
43
- * to successfully remove any global references or they may just be completing the unload process asynchronously.
44
- */
45
- unload(isAsync?: boolean, unloadComplete?: () => void): void;
46
- /**
47
- * Find and return the (first) plugin with the specified identifier if present
48
- * @param pluginIdentifier
49
- */
50
- getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
51
- /**
52
- * Add a new plugin to the installation
53
- * @param plugin - The new plugin to add
54
- * @param replaceExisting - should any existing plugin be replaced
55
- * @param doAsync - Should the add be performed asynchronously
56
- */
57
- addPlugin<T extends IPlugin = ITelemetryPlugin>(plugin: T, replaceExisting: boolean, doAsync: boolean, addCb?: (added?: boolean) => void): void;
58
- /**
59
- * Returns the unique event namespace that should be used
60
- */
61
- evtNamespace(): string;
62
- /**
63
- * Add an unload handler that will be called when the SDK is being unloaded
64
- * @param handler - the handler
65
- */
66
- addUnloadCb(handler: UnloadHandler): void;
37
+ private getSKUDefaults;
67
38
  }
68
- export { IConfiguration, AppInsightsCore, IAppInsightsCore, CoreUtils, ITelemetryItem, ILoadedPlugin, arrForEach, SendRequestReason, _eInternalMessageId, _InternalMessageId, isNullOrUndefined, throwError, proxyFunctions, IPlugin, ITelemetryPlugin } from "@microsoft/applicationinsights-core-js";
39
+ export { IConfiguration, AppInsightsCore, IAppInsightsCore, CoreUtils, ITelemetryItem } from "@microsoft/applicationinsights-core-js";
69
40
  export { SeverityLevel, IPageViewTelemetry, IDependencyTelemetry, IAutoExceptionTelemetry, IEventTelemetry, IMetricTelemetry, IPageViewPerformanceTelemetry, ITraceTelemetry } from "@microsoft/applicationinsights-common";
70
41
  export { Sender } from "@microsoft/applicationinsights-channel-js";
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.19.5"
8
+ "packageVersion": "7.23.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,26 +0,0 @@
1
- {
2
- "name": "aib",
3
- "version": "2.7.5-nightly.2204-03",
4
- "ext": {
5
- "@js": {
6
- "file": "aib.2.7.5-nightly.2204-03.js",
7
- "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-oBpwS80OemL60t6Bd/0Hu2QUgaM7t+hkG4SW9mEzeg0= sha384-Sih0+v2MgkqoLQggVl1VCEj3dUWr/twx2zcoQ94bqquFyICC23YZ+izqDQ9FFacH sha512-joSHmH9sX/ENaFJ3k45uj2StV1bTJoCtVeX2FzKeV3vEU5kk1h53urrXOdhtXN+FkPDBMnRcLNn5iZ788v8yGw==",
9
- "hashes": {
10
- "sha256": "oBpwS80OemL60t6Bd/0Hu2QUgaM7t+hkG4SW9mEzeg0=",
11
- "sha384": "Sih0+v2MgkqoLQggVl1VCEj3dUWr/twx2zcoQ94bqquFyICC23YZ+izqDQ9FFacH",
12
- "sha512": "joSHmH9sX/ENaFJ3k45uj2StV1bTJoCtVeX2FzKeV3vEU5kk1h53urrXOdhtXN+FkPDBMnRcLNn5iZ788v8yGw=="
13
- }
14
- },
15
- "@min.js": {
16
- "file": "aib.2.7.5-nightly.2204-03.min.js",
17
- "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-n3cwr+Awq2KqpnNjLkMBagfMFe6wDNU8BlnEAKiQyAA= sha384-/t9VYmHKoVzg7QF6nUJo4zet3u2S6fRjm/HkFZSuzMvk/EM60Gac6qXtN5p8IH1s sha512-WMMM+28u0p/D3jqIz3dabVaALtkCZCkaDauE48hoXqYS1fiasBXn4B6YLqTrb+ddXJaHabMd2VVFD7u2gob4GA==",
19
- "hashes": {
20
- "sha256": "n3cwr+Awq2KqpnNjLkMBagfMFe6wDNU8BlnEAKiQyAA=",
21
- "sha384": "/t9VYmHKoVzg7QF6nUJo4zet3u2S6fRjm/HkFZSuzMvk/EM60Gac6qXtN5p8IH1s",
22
- "sha512": "WMMM+28u0p/D3jqIz3dabVaALtkCZCkaDauE48hoXqYS1fiasBXn4B6YLqTrb+ddXJaHabMd2VVFD7u2gob4GA=="
23
- }
24
- }
25
- }
26
- }