@microsoft/applicationinsights-web-basic 2.8.0-nightly.2204-17 → 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.
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "aib",
3
+ "version": "2.8.0",
4
+ "ext": {
5
+ "@js": {
6
+ "file": "aib.2.8.0.js",
7
+ "type": "text/javascript; charset=utf-8",
8
+ "integrity": "sha256-l0FOHI+tGmPgR6fBYleXgpOryg3t89H5wAe6u1PzZJw= sha384-Dmq4EipzdsrWqbxvjEsGbV5KBavdofQorR+iQ2JrW4qTKBKy9JDm2VKheoxqIpJe sha512-fCI5cg5rxi0hqxVeGm/TKT9gTYgUlUYT58aZEFpF8dgSPWSFbdniAMAGWee4Q4u6K3NEj0Tt83rzZ7S3BQYVdg==",
9
+ "hashes": {
10
+ "sha256": "l0FOHI+tGmPgR6fBYleXgpOryg3t89H5wAe6u1PzZJw=",
11
+ "sha384": "Dmq4EipzdsrWqbxvjEsGbV5KBavdofQorR+iQ2JrW4qTKBKy9JDm2VKheoxqIpJe",
12
+ "sha512": "fCI5cg5rxi0hqxVeGm/TKT9gTYgUlUYT58aZEFpF8dgSPWSFbdniAMAGWee4Q4u6K3NEj0Tt83rzZ7S3BQYVdg=="
13
+ }
14
+ },
15
+ "@min.js": {
16
+ "file": "aib.2.8.0.min.js",
17
+ "type": "text/javascript; charset=utf-8",
18
+ "integrity": "sha256-h5ccD0WxL9UnmSFSD1n8fyLFeHXqY91AHDgm8EXLGo0= sha384-KXs/mJRgXTnAIc3kEBxpJAIOeUQhZ/WgwvexMmcsJhcJqwO5zGssnBsk14FCufTz sha512-jsLiu0dXYoK1WIq7kwkuBqY106XCulX1NXQLGPomk+IlXM7s1ExCfRzq9eB5V0btQSwweMIZtEBT8EQIubP1rg==",
19
+ "hashes": {
20
+ "sha256": "h5ccD0WxL9UnmSFSD1n8fyLFeHXqY91AHDgm8EXLGo0=",
21
+ "sha384": "KXs/mJRgXTnAIc3kEBxpJAIOeUQhZ/WgwvexMmcsJhcJqwO5zGssnBsk14FCufTz",
22
+ "sha512": "jsLiu0dXYoK1WIq7kwkuBqY106XCulX1NXQLGPomk+IlXM7s1ExCfRzq9eB5V0btQSwweMIZtEBT8EQIubP1rg=="
23
+ }
24
+ }
25
+ }
26
+ }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript Web SDK - Basic, 2.8.0-nightly.2204-17
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-17";
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-17"
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;
@@ -6148,4 +6156,4 @@
6148
6156
  (function(obj, prop, descriptor) { /* ai_es3_polyfil defineProperty */ var func = Object["defineProperty"]; if (func) { try { return func(obj, prop, descriptor); } catch(e) { /* IE8 defines defineProperty, but will throw */ } } if (descriptor && typeof descriptor.value !== undefined) { obj[prop] = descriptor.value; } return obj; })(exports, '__esModule', { value: true });
6149
6157
 
6150
6158
  }));
6151
- //# sourceMappingURL=aib.2.8.0-nightly.2204-17.js.map
6159
+ //# sourceMappingURL=aib.2.8.0.js.map