@microsoft/applicationinsights-web-basic 3.0.0-beta.2208-04 → 3.0.0-beta.2208-14

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 3.0.0-beta.2208-04
2
+ * Microsoft.ApplicationInsights, 3.0.0-beta.2208-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -2070,6 +2070,12 @@ export declare interface IPlugin {
2070
2070
  * Plugin version (available in data.properties.version in common schema)
2071
2071
  */
2072
2072
  readonly version?: string;
2073
+ /**
2074
+ * The App Insights core to use for backward compatibility.
2075
+ * Therefore the interface will be able to access the core without needing to cast to "any".
2076
+ * [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
2077
+ */
2078
+ core?: IAppInsightsCore;
2073
2079
  }
2074
2080
 
2075
2081
  /**
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2208-04
2
+ * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2208-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
package/dist-esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2208-04
2
+ * Application Insights JavaScript Web SDK - Basic, 3.0.0-beta.2208-14
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
 
@@ -27,13 +27,13 @@ var ApplicationInsights = /** @class */ (function () {
27
27
  }
28
28
  dynamicProto(ApplicationInsights, this, function (_self) {
29
29
  _self.config = config;
30
- _self.getSKUDefaults();
31
30
  _initialize();
32
31
  _self[_DYN_INITIALIZE /* @min:%2einitialize */] = _initialize;
33
32
  _self.getSKUDefaults = function () {
34
33
  _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] =
35
34
  _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] && _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] > 0 ? _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] : 10000;
36
35
  };
36
+ _self.getSKUDefaults();
37
37
  proxyFunctions(_self, core, [
38
38
  "track",
39
39
  "flush",
@@ -50,9 +50,9 @@ var ApplicationInsights = /** @class */ (function () {
50
50
  var appInsightsChannel = new Sender();
51
51
  extensions.push(appInsightsChannel);
52
52
  // initialize core
53
- core[_DYN_INITIALIZE /* @min:%2einitialize */](this.config, extensions);
53
+ core[_DYN_INITIALIZE /* @min:%2einitialize */](_self.config, extensions);
54
54
  // initialize extensions
55
- appInsightsChannel[_DYN_INITIALIZE /* @min:%2einitialize */](this.config, core, extensions);
55
+ appInsightsChannel[_DYN_INITIALIZE /* @min:%2einitialize */](_self.config, core, extensions);
56
56
  core.pollInternalLogs();
57
57
  }
58
58
  });
@@ -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 { AppInsightsCore, isNullOrUndefined, proxyFunctions, throwError } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_DIAGNOSTIC_LOG_INTER0, _DYN_INITIALIZE } from \"./__DynamicConstants\";\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[_DYN_INITIALIZE /* @min:%2einitialize */] = _initialize;\r\n _self.getSKUDefaults = function () {\r\n _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] =\r\n _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] && _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] > 0 ? _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] : 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[_DYN_INITIALIZE /* @min:%2einitialize */](this.config, extensions);\r\n // initialize extensions\r\n appInsightsChannel[_DYN_INITIALIZE /* @min:%2einitialize */](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;AACA;;;;;;;;;;8DA6EM,CAAC;;;;;;+BACwB;AAC/B;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 dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { Sender } from \"@microsoft/applicationinsights-channel-js\";\r\nimport { AppInsightsCore, isNullOrUndefined, proxyFunctions, throwError } from \"@microsoft/applicationinsights-core-js\";\r\nimport { _DYN_DIAGNOSTIC_LOG_INTER0, _DYN_INITIALIZE } from \"./__DynamicConstants\";\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 _initialize();\r\n _self[_DYN_INITIALIZE /* @min:%2einitialize */] = _initialize;\r\n _self.getSKUDefaults = function () {\r\n _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] =\r\n _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] && _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] > 0 ? _self.config[_DYN_DIAGNOSTIC_LOG_INTER0 /* @min:%2ediagnosticLogInterval */] : 10000;\r\n };\r\n _self.getSKUDefaults();\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[_DYN_INITIALIZE /* @min:%2einitialize */](_self.config, extensions);\r\n // initialize extensions\r\n appInsightsChannel[_DYN_INITIALIZE /* @min:%2einitialize */](_self.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;AACA;;;;;;;;;;8DA6EM,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.2208-04",
3
+ "version": "3.0.0-beta.2208-14",
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",
@@ -54,9 +54,9 @@
54
54
  "dependencies": {
55
55
  "@microsoft/dynamicproto-js": "^1.1.6",
56
56
  "@microsoft/applicationinsights-shims": "2.0.1",
57
- "@microsoft/applicationinsights-common": "3.0.0-beta.2208-04",
58
- "@microsoft/applicationinsights-channel-js": "3.0.0-beta.2208-04",
59
- "@microsoft/applicationinsights-core-js": "3.0.0-beta.2208-04"
57
+ "@microsoft/applicationinsights-common": "3.0.0-beta.2208-14",
58
+ "@microsoft/applicationinsights-channel-js": "3.0.0-beta.2208-14",
59
+ "@microsoft/applicationinsights-core-js": "3.0.0-beta.2208-14"
60
60
  },
61
61
  "license": "MIT",
62
62
  "publishConfig": {
package/src/index.ts CHANGED
@@ -34,16 +34,16 @@ export class ApplicationInsights {
34
34
 
35
35
  dynamicProto(ApplicationInsights, this, (_self) => {
36
36
  _self.config = config;
37
- _self.getSKUDefaults();
38
-
37
+
39
38
  _initialize();
40
-
39
+
41
40
  _self.initialize = _initialize;
42
-
41
+
43
42
  _self.getSKUDefaults = () => {
44
43
  _self.config.diagnosticLogInterval =
45
44
  _self.config.diagnosticLogInterval && _self.config.diagnosticLogInterval > 0 ? _self.config.diagnosticLogInterval : 10000;
46
45
  };
46
+ _self.getSKUDefaults();
47
47
 
48
48
  proxyFunctions(_self, core, [
49
49
  "track",
@@ -64,10 +64,10 @@ export class ApplicationInsights {
64
64
  extensions.push(appInsightsChannel);
65
65
 
66
66
  // initialize core
67
- core.initialize(this.config, extensions);
67
+ core.initialize(_self.config, extensions);
68
68
 
69
69
  // initialize extensions
70
- appInsightsChannel.initialize(this.config, core, extensions);
70
+ appInsightsChannel.initialize(_self.config, core, extensions);
71
71
 
72
72
  core.pollInternalLogs();
73
73
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.28.7"
8
+ "packageVersion": "7.29.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,26 +0,0 @@
1
- {
2
- "name": "aib",
3
- "version": "3.0.0-beta.2208-04",
4
- "ext": {
5
- "@js": {
6
- "file": "aib.3.0.0-beta.2208-04.js",
7
- "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-fGYYg25e2XIBBxH26z9to7IbPfxlHOKvES6yV4qwfHk= sha384-11KN/40k2JGqWd6oDtWu+qsEtTFKl8dculM2nwbPCotGImL/fUREdxkdp3AwIZDj sha512-WiqzxyizKUjhHc4g8zyvllNMJd0eDt8CJDapgMh5BzFk3/bRgBerAI/F5pupJvW6Xzs9ijXGK8y98QsVUEzOCA==",
9
- "hashes": {
10
- "sha256": "fGYYg25e2XIBBxH26z9to7IbPfxlHOKvES6yV4qwfHk=",
11
- "sha384": "11KN/40k2JGqWd6oDtWu+qsEtTFKl8dculM2nwbPCotGImL/fUREdxkdp3AwIZDj",
12
- "sha512": "WiqzxyizKUjhHc4g8zyvllNMJd0eDt8CJDapgMh5BzFk3/bRgBerAI/F5pupJvW6Xzs9ijXGK8y98QsVUEzOCA=="
13
- }
14
- },
15
- "@min.js": {
16
- "file": "aib.3.0.0-beta.2208-04.min.js",
17
- "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-7fpI+VaDdcNA0C9tDQT27OHQo7bEMhH20HGX0d0LQC8= sha384-fGx0rXKSc1jh1RoGu2nwBx4f2x504dgZ4fwUHMEtohKqTGJRvauiEf0tfzp0OaED sha512-gPzDJgiLk2+jOMYsEx0xQhS4TyQlQc/oHnJG0WPffsdBtIClV8MRZ6a9KJO48wXDQxPjD7NrXUUNNjNNsf+aew==",
19
- "hashes": {
20
- "sha256": "7fpI+VaDdcNA0C9tDQT27OHQo7bEMhH20HGX0d0LQC8=",
21
- "sha384": "fGx0rXKSc1jh1RoGu2nwBx4f2x504dgZ4fwUHMEtohKqTGJRvauiEf0tfzp0OaED",
22
- "sha512": "gPzDJgiLk2+jOMYsEx0xQhS4TyQlQc/oHnJG0WPffsdBtIClV8MRZ6a9KJO48wXDQxPjD7NrXUUNNjNNsf+aew=="
23
- }
24
- }
25
- }
26
- }