@microsoft/applicationinsights-web-basic 2.8.0-nightly.2204-19 → 2.8.0

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,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.20.0",
4
+ "toolVersion": "7.22.2",
5
5
  "schemaVersion": 1005,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -156,7 +156,8 @@
156
156
  "@betaDocumentation": true,
157
157
  "@internalRemarks": true,
158
158
  "@preapproved": true
159
- }
159
+ },
160
+ "reportUnsupportedHtmlElements": false
160
161
  }
161
162
  },
162
163
  "kind": "Package",
@@ -2176,12 +2177,12 @@
2176
2177
  ],
2177
2178
  "extendsTokenRange": {
2178
2179
  "startIndex": 1,
2179
- "endIndex": 3
2180
+ "endIndex": 2
2180
2181
  },
2181
2182
  "implementsTokenRanges": [
2182
2183
  {
2183
2184
  "startIndex": 4,
2184
- "endIndex": 6
2185
+ "endIndex": 5
2185
2186
  }
2186
2187
  ]
2187
2188
  },
@@ -2358,7 +2359,7 @@
2358
2359
  "typeParameterName": "T",
2359
2360
  "constraintTokenRange": {
2360
2361
  "startIndex": 1,
2361
- "endIndex": 3
2362
+ "endIndex": 2
2362
2363
  },
2363
2364
  "defaultTypeTokenRange": {
2364
2365
  "startIndex": 4,
@@ -2603,7 +2604,7 @@
2603
2604
  "typeParameterName": "T",
2604
2605
  "constraintTokenRange": {
2605
2606
  "startIndex": 1,
2606
- "endIndex": 3
2607
+ "endIndex": 2
2607
2608
  },
2608
2609
  "defaultTypeTokenRange": {
2609
2610
  "startIndex": 4,
@@ -3266,7 +3267,7 @@
3266
3267
  "typeParameterName": "T",
3267
3268
  "constraintTokenRange": {
3268
3269
  "startIndex": 1,
3269
- "endIndex": 3
3270
+ "endIndex": 2
3270
3271
  },
3271
3272
  "defaultTypeTokenRange": {
3272
3273
  "startIndex": 4,
@@ -3655,7 +3656,7 @@
3655
3656
  "typeParameterName": "T",
3656
3657
  "constraintTokenRange": {
3657
3658
  "startIndex": 1,
3658
- "endIndex": 3
3659
+ "endIndex": 2
3659
3660
  },
3660
3661
  "defaultTypeTokenRange": {
3661
3662
  "startIndex": 4,
@@ -4182,7 +4183,7 @@
4182
4183
  "extendsTokenRanges": [
4183
4184
  {
4184
4185
  "startIndex": 1,
4185
- "endIndex": 3
4186
+ "endIndex": 2
4186
4187
  }
4187
4188
  ]
4188
4189
  },
@@ -4542,7 +4543,7 @@
4542
4543
  {
4543
4544
  "kind": "PropertySignature",
4544
4545
  "canonicalReference": "@microsoft/applicationinsights-web-basic!IConfiguration#cookieDomain:member",
4545
- "docComment": "/**\n * @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified. @type {string} @memberof IConfig\n *\n * @defaultValue\n *\n * \"\"\n */\n",
4546
+ "docComment": "/**\n * @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified. @type {string}\n *\n * @defaultValue\n *\n * \"\"\n */\n",
4546
4547
  "excerptTokens": [
4547
4548
  {
4548
4549
  "kind": "Content",
@@ -4568,7 +4569,7 @@
4568
4569
  {
4569
4570
  "kind": "PropertySignature",
4570
4571
  "canonicalReference": "@microsoft/applicationinsights-web-basic!IConfiguration#cookiePath:member",
4571
- "docComment": "/**\n * @description Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified. @type {string} @memberof IConfig\n *\n * @defaultValue\n *\n * \"\"\n */\n",
4572
+ "docComment": "/**\n * @description Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application gateway. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified. @type {string}\n *\n * @defaultValue\n *\n * \"\"\n */\n",
4572
4573
  "excerptTokens": [
4573
4574
  {
4574
4575
  "kind": "Content",
@@ -4721,7 +4722,7 @@
4721
4722
  {
4722
4723
  "kind": "PropertySignature",
4723
4724
  "canonicalReference": "@microsoft/applicationinsights-web-basic!IConfiguration#disableInstrumentationKeyValidation:member",
4724
- "docComment": "/**\n * @type {boolean} @memberof IConfiguration Flag that disables the Instrumentation Key validation.\n */\n",
4725
+ "docComment": "/**\n * @type {boolean} Flag that disables the Instrumentation Key validation.\n */\n",
4725
4726
  "excerptTokens": [
4726
4727
  {
4727
4728
  "kind": "Content",
@@ -5403,7 +5404,7 @@
5403
5404
  "extendsTokenRanges": [
5404
5405
  {
5405
5406
  "startIndex": 1,
5406
- "endIndex": 3
5407
+ "endIndex": 2
5407
5408
  }
5408
5409
  ]
5409
5410
  },
@@ -5485,7 +5486,7 @@
5485
5486
  "extendsTokenRanges": [
5486
5487
  {
5487
5488
  "startIndex": 1,
5488
- "endIndex": 3
5489
+ "endIndex": 2
5489
5490
  }
5490
5491
  ]
5491
5492
  },
@@ -5839,7 +5840,7 @@
5839
5840
  "extendsTokenRanges": [
5840
5841
  {
5841
5842
  "startIndex": 1,
5842
- "endIndex": 3
5843
+ "endIndex": 2
5843
5844
  }
5844
5845
  ]
5845
5846
  },
@@ -6077,7 +6078,7 @@
6077
6078
  "extendsTokenRanges": [
6078
6079
  {
6079
6080
  "startIndex": 1,
6080
- "endIndex": 3
6081
+ "endIndex": 2
6081
6082
  }
6082
6083
  ]
6083
6084
  },
@@ -6289,7 +6290,7 @@
6289
6290
  "extendsTokenRanges": [
6290
6291
  {
6291
6292
  "startIndex": 1,
6292
- "endIndex": 3
6293
+ "endIndex": 2
6293
6294
  }
6294
6295
  ]
6295
6296
  },
@@ -6916,7 +6917,7 @@
6916
6917
  },
6917
6918
  {
6918
6919
  "startIndex": 3,
6919
- "endIndex": 5
6920
+ "endIndex": 4
6920
6921
  }
6921
6922
  ]
6922
6923
  },
@@ -7025,7 +7026,7 @@
7025
7026
  "extendsTokenRanges": [
7026
7027
  {
7027
7028
  "startIndex": 1,
7028
- "endIndex": 3
7029
+ "endIndex": 2
7029
7030
  }
7030
7031
  ]
7031
7032
  },
@@ -8266,12 +8267,12 @@
8266
8267
  ],
8267
8268
  "extendsTokenRange": {
8268
8269
  "startIndex": 1,
8269
- "endIndex": 3
8270
+ "endIndex": 2
8270
8271
  },
8271
8272
  "implementsTokenRanges": [
8272
8273
  {
8273
8274
  "startIndex": 4,
8274
- "endIndex": 6
8275
+ "endIndex": 5
8275
8276
  }
8276
8277
  ]
8277
8278
  },
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft.ApplicationInsights, 2.8.0-nightly.2204-19
2
+ * Microsoft.ApplicationInsights, 2.8.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1070,7 +1070,6 @@ declare namespace ApplicationInsights {
1070
1070
  channels?: IChannelControls[][];
1071
1071
  /**
1072
1072
  * @type {boolean}
1073
- * @memberof IConfiguration
1074
1073
  * Flag that disables the Instrumentation Key validation.
1075
1074
  */
1076
1075
  disableInstrumentationKeyValidation?: boolean;
@@ -1102,7 +1101,6 @@ declare namespace ApplicationInsights {
1102
1101
  * @description Custom cookie domain. This is helpful if you want to share Application Insights cookies across subdomains. It
1103
1102
  * can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified.
1104
1103
  * @type {string}
1105
- * @memberof IConfig
1106
1104
  * @defaultValue ""
1107
1105
  */
1108
1106
  cookieDomain?: string;
@@ -1110,7 +1108,6 @@ declare namespace ApplicationInsights {
1110
1108
  * @description Custom cookie path. This is helpful if you want to share Application Insights cookies behind an application
1111
1109
  * gateway. It can be set here or as part of the cookieCfg.domain, the cookieCfg takes precedence if both are specified.
1112
1110
  * @type {string}
1113
- * @memberof IConfig
1114
1111
  * @defaultValue ""
1115
1112
  */
1116
1113
  cookiePath?: string;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 2.8.0-nightly.2204-19
2
+ * Application Insights JavaScript Web SDK - Basic, 2.8.0
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -1475,7 +1475,7 @@
1475
1475
  }
1476
1476
 
1477
1477
  var _objDefineProperty = ObjDefineProperty;
1478
- var version = "2.8.0-nightly.2204-19";
1478
+ var version = "2.8.0";
1479
1479
  var instanceName = "." + newId(6);
1480
1480
  var _dataUid = 0;
1481
1481
  function _createAccessor(target, prop, value) {
@@ -1607,20 +1607,20 @@
1607
1607
  var strHasRunFlags = "_hasRun";
1608
1608
  var strGetTelCtx = "_getTelCtx";
1609
1609
  var _chainId = 0;
1610
- function _getNextProxyStart(proxy, config, core, startAt) {
1610
+ function _getNextProxyStart(proxy, core, startAt) {
1611
1611
  while (proxy) {
1612
1612
  if (proxy.getPlugin() === startAt) {
1613
1613
  return proxy;
1614
1614
  }
1615
1615
  proxy = proxy.getNext();
1616
1616
  }
1617
- return createTelemetryProxyChain([startAt], config, core);
1617
+ return createTelemetryProxyChain([startAt], core.config || {}, core);
1618
1618
  }
1619
1619
  function _createInternalContext(telemetryChain, config, core, startAt) {
1620
1620
  var _nextProxy = null;
1621
1621
  var _onComplete = [];
1622
1622
  if (startAt !== null) {
1623
- _nextProxy = startAt ? _getNextProxyStart(telemetryChain, config, core, startAt) : telemetryChain;
1623
+ _nextProxy = startAt ? _getNextProxyStart(telemetryChain, core, startAt) : telemetryChain;
1624
1624
  }
1625
1625
  var context = {
1626
1626
  _next: _moveNext,
@@ -1707,6 +1707,7 @@
1707
1707
  }
1708
1708
  });
1709
1709
  }
1710
+ theConfig = newConfig_1;
1710
1711
  }
1711
1712
  }
1712
1713
  return theConfig;
@@ -1753,7 +1754,8 @@
1753
1754
  context.createNew = _createNew;
1754
1755
  return context;
1755
1756
  }
1756
- function createProcessTelemetryUnloadContext(telemetryChain, config, core, startAt) {
1757
+ function createProcessTelemetryUnloadContext(telemetryChain, core, startAt) {
1758
+ var config = core.config || {};
1757
1759
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1758
1760
  var context = internalContext.ctx;
1759
1761
  function _processNext(unloadState) {
@@ -1766,19 +1768,20 @@
1766
1768
  if (isArray(plugins)) {
1767
1769
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1768
1770
  }
1769
- return createProcessTelemetryUnloadContext(plugins || context.getNext(), config, core, startAt);
1771
+ return createProcessTelemetryUnloadContext(plugins || context.getNext(), core, startAt);
1770
1772
  }
1771
1773
  context.processNext = _processNext;
1772
1774
  context.createNew = _createNew;
1773
1775
  return context;
1774
1776
  }
1775
- function createProcessTelemetryUpdateContext(telemetryChain, config, core, startAt) {
1777
+ function createProcessTelemetryUpdateContext(telemetryChain, core, startAt) {
1778
+ var config = core.config || {};
1776
1779
  var internalContext = _createInternalContext(telemetryChain, config, core, startAt);
1777
1780
  var context = internalContext.ctx;
1778
1781
  function _processNext(updateState) {
1779
1782
  return context.iterate(function (plugin) {
1780
- if (isFunction(plugin[strUpdate])) {
1781
- plugin[strUpdate](context, updateState);
1783
+ if (isFunction(plugin.update)) {
1784
+ plugin.update(context, updateState);
1782
1785
  }
1783
1786
  });
1784
1787
  }
@@ -1787,7 +1790,7 @@
1787
1790
  if (isArray(plugins)) {
1788
1791
  plugins = createTelemetryProxyChain(plugins, config, core, startAt);
1789
1792
  }
1790
- return createProcessTelemetryUpdateContext(plugins || context.getNext(), config, core, startAt);
1793
+ return createProcessTelemetryUpdateContext(plugins || context.getNext(), core, startAt);
1791
1794
  }
1792
1795
  context.processNext = _processNext;
1793
1796
  context.createNew = _createNew;
@@ -1879,7 +1882,7 @@
1879
1882
  hasRun = true;
1880
1883
  }
1881
1884
  if (!nextProxy || !hasNextRun) {
1882
- _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + plugin.identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1885
+ _throwInternal(itemCtx.diagLog(), 1 , 73 , "Plugin [" + identifier + "] failed during " + name + " - " + dumpObj(error) + ", run flags: " + dumpObj(hasRunContext));
1883
1886
  }
1884
1887
  }
1885
1888
  }, details, isAsync);
@@ -1893,7 +1896,7 @@
1893
1896
  return false;
1894
1897
  }
1895
1898
  var pluginState = _getPluginState(plugin);
1896
- if (pluginState[strTeardown] || pluginState[strDisabled]) {
1899
+ if (pluginState.teardown || pluginState[strDisabled]) {
1897
1900
  return false;
1898
1901
  }
1899
1902
  if (hasSetNext) {
@@ -2415,12 +2418,13 @@
2415
2418
  _isinitialized = true;
2416
2419
  };
2417
2420
  _self.teardown = function (unloadCtx, unloadState) {
2418
- if (!_self.core || (unloadCtx && _self.core !== unloadCtx.core())) {
2421
+ var core = _self.core;
2422
+ if (!core || (unloadCtx && core !== unloadCtx.core())) {
2419
2423
  return;
2420
2424
  }
2421
2425
  var result;
2422
2426
  var unloadDone = false;
2423
- var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2427
+ var theUnloadCtx = unloadCtx || createProcessTelemetryUnloadContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2424
2428
  var theUnloadState = unloadState || {
2425
2429
  reason: 0 ,
2426
2430
  isAsync: false
@@ -2448,12 +2452,13 @@
2448
2452
  return result;
2449
2453
  };
2450
2454
  _self.update = function (updateCtx, updateState) {
2451
- if (!_self.core || (updateCtx && _self.core !== updateCtx.core())) {
2455
+ var core = _self.core;
2456
+ if (!core || (updateCtx && core !== updateCtx.core())) {
2452
2457
  return;
2453
2458
  }
2454
2459
  var result;
2455
2460
  var updateDone = false;
2456
- var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, {}, _self.core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2461
+ var theUpdateCtx = updateCtx || createProcessTelemetryUpdateContext(null, core, _nextPlugin && _nextPlugin[strGetPlugin] ? _nextPlugin[strGetPlugin]() : _nextPlugin);
2457
2462
  var theUpdateState = updateState || {
2458
2463
  reason: 0
2459
2464
  };
@@ -2610,6 +2615,9 @@
2610
2615
  var strNotificationManager = "_notificationManager";
2611
2616
  var strSdkUnloadingError = "SDK is still unloading...";
2612
2617
  var strSdkNotInitialized = "SDK is not initialized";
2618
+ var defaultInitConfig = {
2619
+ loggingLevelConsole: 1
2620
+ };
2613
2621
  function _createPerfManager(core, notificationMgr) {
2614
2622
  return new PerfManager(notificationMgr);
2615
2623
  }
@@ -2818,7 +2826,7 @@
2818
2826
  isAsync: isAsync,
2819
2827
  flushComplete: false
2820
2828
  };
2821
- var processUnloadCtx = createProcessTelemetryUnloadContext(_getPluginChain(), _self.config, _self);
2829
+ var processUnloadCtx = createProcessTelemetryUnloadContext(_getPluginChain(), _self);
2822
2830
  processUnloadCtx.onComplete(function () {
2823
2831
  _initDefaults();
2824
2832
  unloadComplete && unloadComplete(unloadState);
@@ -2884,8 +2892,8 @@
2884
2892
  proxyFunctionAs(_self, "addUnloadCb", function () { return _unloadHandlers; }, "add");
2885
2893
  function _initDefaults() {
2886
2894
  _isInitialized = false;
2887
- _self.logger = new DiagnosticLogger({ loggingLevelConsole: 1 });
2888
- _self.config = {};
2895
+ _self.config = objExtend(true, {}, defaultInitConfig);
2896
+ _self.logger = new DiagnosticLogger(_self.config);
2889
2897
  _self._extensions = [];
2890
2898
  _telemetryInitializerPlugin = new TelemetryInitializerPlugin();
2891
2899
  _eventQueue = [];
@@ -2993,7 +3001,7 @@
2993
3001
  function _removePlugins(thePlugins, unloadState, removeComplete) {
2994
3002
  if (thePlugins && thePlugins.length > 0) {
2995
3003
  var unloadChain = createTelemetryProxyChain(thePlugins, _self.config, _self);
2996
- var unloadCtx = createProcessTelemetryUnloadContext(unloadChain, _self.config, _self);
3004
+ var unloadCtx = createProcessTelemetryUnloadContext(unloadChain, _self);
2997
3005
  unloadCtx.onComplete(function () {
2998
3006
  var removed = false;
2999
3007
  var newConfigExtensions = [];
@@ -3076,7 +3084,7 @@
3076
3084
  extConfig.NotificationManager = _notificationManager;
3077
3085
  }
3078
3086
  function _doUpdate(updateState) {
3079
- var updateCtx = createProcessTelemetryUpdateContext(_getPluginChain(), _self.config, _self);
3087
+ var updateCtx = createProcessTelemetryUpdateContext(_getPluginChain(), _self);
3080
3088
  if (!_self._updateHook || _self._updateHook(updateCtx, updateState) !== true) {
3081
3089
  updateCtx.processNext(updateState);
3082
3090
  }
@@ -3483,7 +3491,7 @@
3483
3491
  _legacyCookieMgr().setEnabled(false);
3484
3492
  }
3485
3493
 
3486
- var LoggingSeverity = createEnumStyle({
3494
+ createEnumStyle({
3487
3495
  CRITICAL: 1 ,
3488
3496
  WARNING: 2
3489
3497
  });
@@ -4933,7 +4941,7 @@
4933
4941
  }
4934
4942
  }
4935
4943
  var EnvelopeCreator = {
4936
- Version: "2.8.0-nightly.2204-19"
4944
+ Version: "2.8.0"
4937
4945
  };
4938
4946
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
4939
4947
  EnvelopeCreatorInit(logger, telemetryItem);
@@ -5363,7 +5371,7 @@
5363
5371
  this.INT_MAX_VALUE = 2147483647;
5364
5372
  var _logger = logger || safeGetLogger(null);
5365
5373
  if (sampleRate > 100 || sampleRate < 0) {
5366
- _logger.throwInternal(LoggingSeverity.WARNING, _InternalMessageId.SampleRateOutOfRange, "Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.", { samplingRate: sampleRate }, true);
5374
+ _logger.throwInternal(2 , 58 , "Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.", { samplingRate: sampleRate }, true);
5367
5375
  sampleRate = 100;
5368
5376
  }
5369
5377
  this.sampleRate = sampleRate;