@microsoft/applicationinsights-common 3.0.1-nightly3.2304-38 → 3.0.1-nightly3.2304-44

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.
Files changed (95) hide show
  1. package/browser/es5/applicationinsights-common.cjs.js +23 -18
  2. package/browser/es5/applicationinsights-common.cjs.js.map +1 -1
  3. package/browser/es5/applicationinsights-common.cjs.min.js +2 -2
  4. package/browser/es5/applicationinsights-common.cjs.min.js.map +1 -1
  5. package/browser/es5/applicationinsights-common.gbl.js +23 -18
  6. package/browser/es5/applicationinsights-common.gbl.js.map +1 -1
  7. package/browser/es5/applicationinsights-common.gbl.min.js +2 -2
  8. package/browser/es5/applicationinsights-common.gbl.min.js.map +1 -1
  9. package/browser/es5/applicationinsights-common.integrity.json +25 -25
  10. package/browser/es5/applicationinsights-common.js +23 -18
  11. package/browser/es5/applicationinsights-common.js.map +1 -1
  12. package/browser/es5/applicationinsights-common.min.js +2 -2
  13. package/browser/es5/applicationinsights-common.min.js.map +1 -1
  14. package/dist/es5/applicationinsights-common.js +23 -18
  15. package/dist/es5/applicationinsights-common.js.map +1 -1
  16. package/dist/es5/applicationinsights-common.min.js +2 -2
  17. package/dist/es5/applicationinsights-common.min.js.map +1 -1
  18. package/dist-es5/ConnectionStringParser.js +1 -1
  19. package/dist-es5/Constants.js +1 -1
  20. package/dist-es5/DomHelperFuncs.js +1 -1
  21. package/dist-es5/Enums.js +1 -1
  22. package/dist-es5/HelperFuncs.js +1 -1
  23. package/dist-es5/Interfaces/ConnectionString.js +1 -1
  24. package/dist-es5/Interfaces/Context/IApplication.js +1 -1
  25. package/dist-es5/Interfaces/Context/IDevice.js +1 -1
  26. package/dist-es5/Interfaces/Context/IInternal.js +1 -1
  27. package/dist-es5/Interfaces/Context/ILocation.js +1 -1
  28. package/dist-es5/Interfaces/Context/IOperatingSystem.js +1 -1
  29. package/dist-es5/Interfaces/Context/ISample.js +1 -1
  30. package/dist-es5/Interfaces/Context/ISession.js +1 -1
  31. package/dist-es5/Interfaces/Context/ITelemetryTrace.js +1 -1
  32. package/dist-es5/Interfaces/Context/IUser.js +1 -1
  33. package/dist-es5/Interfaces/Context/IWeb.js +1 -1
  34. package/dist-es5/Interfaces/Contracts/AvailabilityData.js +1 -1
  35. package/dist-es5/Interfaces/Contracts/ContextTagKeys.js +1 -1
  36. package/dist-es5/Interfaces/Contracts/DataPointType.js +1 -1
  37. package/dist-es5/Interfaces/Contracts/DependencyKind.js +1 -1
  38. package/dist-es5/Interfaces/Contracts/DependencySourceType.js +1 -1
  39. package/dist-es5/Interfaces/Contracts/IBase.js +1 -1
  40. package/dist-es5/Interfaces/Contracts/IData.js +1 -1
  41. package/dist-es5/Interfaces/Contracts/IDataPoint.js +1 -1
  42. package/dist-es5/Interfaces/Contracts/IDomain.js +1 -1
  43. package/dist-es5/Interfaces/Contracts/IEnvelope.js +1 -1
  44. package/dist-es5/Interfaces/Contracts/IEventData.js +1 -1
  45. package/dist-es5/Interfaces/Contracts/IExceptionData.js +1 -1
  46. package/dist-es5/Interfaces/Contracts/IExceptionDetails.js +1 -1
  47. package/dist-es5/Interfaces/Contracts/IMessageData.js +1 -1
  48. package/dist-es5/Interfaces/Contracts/IMetricData.js +1 -1
  49. package/dist-es5/Interfaces/Contracts/IPageViewData.js +1 -1
  50. package/dist-es5/Interfaces/Contracts/IPageViewPerfData.js +1 -1
  51. package/dist-es5/Interfaces/Contracts/IRemoteDependencyData.js +1 -1
  52. package/dist-es5/Interfaces/Contracts/IStackFrame.js +1 -1
  53. package/dist-es5/Interfaces/Contracts/RequestData.js +1 -1
  54. package/dist-es5/Interfaces/Contracts/SeverityLevel.js +1 -1
  55. package/dist-es5/Interfaces/IAppInsights.js +1 -1
  56. package/dist-es5/Interfaces/IConfig.js +1 -1
  57. package/dist-es5/Interfaces/ICorrelationConfig.js +1 -1
  58. package/dist-es5/Interfaces/IDependencyTelemetry.js +1 -1
  59. package/dist-es5/Interfaces/IEventTelemetry.js +1 -1
  60. package/dist-es5/Interfaces/IExceptionTelemetry.js +1 -1
  61. package/dist-es5/Interfaces/IMetricTelemetry.js +1 -1
  62. package/dist-es5/Interfaces/IPageViewPerformanceTelemetry.js +1 -1
  63. package/dist-es5/Interfaces/IPageViewTelemetry.js +1 -1
  64. package/dist-es5/Interfaces/IPartC.js +1 -1
  65. package/dist-es5/Interfaces/IPropertiesPlugin.js +1 -1
  66. package/dist-es5/Interfaces/IRequestContext.js +1 -1
  67. package/dist-es5/Interfaces/IStorageBuffer.js +1 -1
  68. package/dist-es5/Interfaces/ITelemetryContext.js +1 -1
  69. package/dist-es5/Interfaces/IThrottleMgr.js +1 -1
  70. package/dist-es5/Interfaces/ITraceTelemetry.js +1 -1
  71. package/dist-es5/Interfaces/PartAExtensions.js +1 -1
  72. package/dist-es5/Interfaces/Telemetry/IEnvelope.js +1 -1
  73. package/dist-es5/Interfaces/Telemetry/ISerializable.js +1 -1
  74. package/dist-es5/RequestResponseHeaders.js +1 -1
  75. package/dist-es5/StorageHelperFuncs.js +1 -1
  76. package/dist-es5/Telemetry/Common/Data.js +1 -1
  77. package/dist-es5/Telemetry/Common/DataPoint.js +1 -1
  78. package/dist-es5/Telemetry/Common/DataSanitizer.js +1 -1
  79. package/dist-es5/Telemetry/Common/Envelope.js +1 -1
  80. package/dist-es5/Telemetry/Event.js +1 -1
  81. package/dist-es5/Telemetry/Exception.js +1 -1
  82. package/dist-es5/Telemetry/Metric.js +1 -1
  83. package/dist-es5/Telemetry/PageView.js +1 -1
  84. package/dist-es5/Telemetry/PageViewPerformance.js +1 -1
  85. package/dist-es5/Telemetry/RemoteDependencyData.js +1 -1
  86. package/dist-es5/Telemetry/Trace.js +1 -1
  87. package/dist-es5/TelemetryItemCreator.js +1 -1
  88. package/dist-es5/ThrottleMgr.js +1 -1
  89. package/dist-es5/UrlHelperFuncs.js +1 -1
  90. package/dist-es5/Util.js +1 -1
  91. package/dist-es5/__DynamicConstants.js +1 -1
  92. package/dist-es5/applicationinsights-common.js +1 -1
  93. package/package.json +3 -3
  94. package/types/applicationinsights-common.d.ts +1 -1
  95. package/types/applicationinsights-common.namespaced.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Common, 3.0.1-nightly3.2304-38
2
+ * Application Insights JavaScript SDK - Common, 3.0.1-nightly3.2304-44
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  'use strict';
@@ -29,7 +29,7 @@ var MathCls = Math;
29
29
  var ArrCls = Array;
30
30
  var ArrProto = ArrCls[PROTOTYPE];
31
31
 
32
- function _safeGet(cb, defValue) {
32
+ function safeGet(cb, defValue) {
33
33
  var result = defValue;
34
34
  try {
35
35
  result = cb();
@@ -349,8 +349,8 @@ function getLazy(cb) {
349
349
  return lazyValue;
350
350
  }
351
351
 
352
- function _lazySafeGet(cb, defValue) {
353
- return getLazy(function () { return _safeGet(cb, defValue); });
352
+ function safeGetLazy(cb, defValue) {
353
+ return getLazy(function () { return safeGet(cb, defValue); });
354
354
  }
355
355
 
356
356
  var WINDOW = "window";
@@ -358,11 +358,11 @@ var _cachedGlobal;
358
358
  var _cachedWindow;
359
359
  var _cachedDocument;
360
360
  var _cachedNavigator;
361
- function _lazySafeGetInst(name) {
362
- return _lazySafeGet(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE);
361
+ function lazySafeGetInst(name) {
362
+ return safeGetLazy(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE);
363
363
  }
364
364
  function getGlobal(useCached) {
365
- (!_cachedGlobal || useCached === false || (_globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = _lazySafeGet(_getGlobalValue, null));
365
+ (!_cachedGlobal || useCached === false || (_globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = safeGetLazy(_getGlobalValue, null));
366
366
  return _cachedGlobal.v;
367
367
  }
368
368
  function getInst(name, useCached) {
@@ -376,21 +376,21 @@ function getInst(name, useCached) {
376
376
  return null;
377
377
  }
378
378
  function getDocument() {
379
- (!_cachedDocument || (_globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = _lazySafeGetInst("document"));
379
+ (!_cachedDocument || (_globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = lazySafeGetInst("document"));
380
380
  return _cachedDocument.v;
381
381
  }
382
382
  function hasWindow() {
383
383
  return !!getWindow();
384
384
  }
385
385
  function getWindow() {
386
- (!_cachedWindow || (_globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = _lazySafeGetInst(WINDOW));
386
+ (!_cachedWindow || (_globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = lazySafeGetInst(WINDOW));
387
387
  return _cachedWindow.v;
388
388
  }
389
389
  function hasNavigator() {
390
390
  return !!getNavigator();
391
391
  }
392
392
  function getNavigator() {
393
- (!_cachedNavigator || (_globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = _lazySafeGetInst("navigator"));
393
+ (!_cachedNavigator || (_globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = lazySafeGetInst("navigator"));
394
394
  return _cachedNavigator.v;
395
395
  }
396
396
 
@@ -398,13 +398,13 @@ var _symbol;
398
398
  var _symbolFor;
399
399
  var _symbolKeyFor;
400
400
  function _getSymbolValue(name) {
401
- return _lazySafeGet(function () {
401
+ return safeGetLazy(function () {
402
402
  return (_symbol.v ? _symbol[name] : UNDEF_VALUE);
403
403
  }, UNDEF_VALUE);
404
404
  }
405
405
  function getSymbol() {
406
406
  var resetCache = !_symbol || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_symbol.b);
407
- resetCache && (_symbol = _lazySafeGetInst(SYMBOL));
407
+ resetCache && (_symbol = lazySafeGetInst(SYMBOL));
408
408
  (!_symbolFor || resetCache) && (_symbolFor = _getSymbolValue("for"));
409
409
  (!_symbolKeyFor || resetCache) && (_symbolKeyFor = _getSymbolValue("keyFor"));
410
410
  return _symbol.v;
@@ -597,7 +597,7 @@ function isPlainObject(value) {
597
597
 
598
598
  var _perf;
599
599
  function getPerformance() {
600
- (!_perf || (_globalLazyTestHooks.lzy && !_perf.b)) && (_perf = _lazySafeGetInst("performance"));
600
+ (!_perf || (_globalLazyTestHooks.lzy && !_perf.b)) && (_perf = lazySafeGetInst("performance"));
601
601
  return _perf.v;
602
602
  }
603
603
 
@@ -723,6 +723,7 @@ var _DYN_PUSH = "push";
723
723
  var _DYN_SPLICE = "splice";
724
724
  var _DYN_CANCEL = "cancel";
725
725
  var _DYN_NAME$1 = "name";
726
+ var _DYN_UNLOAD = "unload";
726
727
  var _DYN_VERSION = "version";
727
728
  var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
728
729
  var _DYN_MESSAGE_ID = "messageId";
@@ -1249,7 +1250,7 @@ function newId(maxLength) {
1249
1250
  return result;
1250
1251
  }
1251
1252
 
1252
- var version = "3.0.1-nightly3.2304-38";
1253
+ var version = "3.0.1-nightly3.2304-44";
1253
1254
  var instanceName = "." + newId(6);
1254
1255
  var _dataUid = 0;
1255
1256
  function createUniqueNamespace(name, includeVersion) {
@@ -1795,7 +1796,7 @@ function onConfigChange(config, configHandler, logger) {
1795
1796
  return handler[_DYN_WATCH ](configHandler);
1796
1797
  }
1797
1798
  _logInvalidAccess(logger, STR_NOT_DYNAMIC_ERROR + dumpObj(config));
1798
- createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
1799
+ return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
1799
1800
  }
1800
1801
 
1801
1802
  var _aiNamespace = null;
@@ -1873,8 +1874,9 @@ var DiagnosticLogger = /** @class */ (function () {
1873
1874
  var _loggingLevelTelemetry;
1874
1875
  var _maxInternalMessageLimit;
1875
1876
  var _enableDebug;
1877
+ var _unloadHandler;
1876
1878
  dynamicProto(DiagnosticLogger, this, function (_self) {
1877
- _setDefaultsFromConfig(config || {});
1879
+ _unloadHandler = _setDefaultsFromConfig(config || {});
1878
1880
  _self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
1879
1881
  _self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
1880
1882
  if (isUserAct === void 0) { isUserAct = false; }
@@ -1917,6 +1919,10 @@ var DiagnosticLogger = /** @class */ (function () {
1917
1919
  _messageLogged = {};
1918
1920
  };
1919
1921
  _self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
1922
+ _self[_DYN_UNLOAD ] = function (isAsync) {
1923
+ _unloadHandler && _unloadHandler.rm();
1924
+ _unloadHandler = null;
1925
+ };
1920
1926
  function _logInternalMessage(severity, message) {
1921
1927
  if (_areInternalMessagesThrottled()) {
1922
1928
  return;
@@ -1949,8 +1955,7 @@ var DiagnosticLogger = /** @class */ (function () {
1949
1955
  }
1950
1956
  }
1951
1957
  function _setDefaultsFromConfig(config) {
1952
- var handler = createDynamicConfig(config, defaultValues, _self);
1953
- handler[_DYN_WATCH ](function (details) {
1958
+ return onConfigChange(createDynamicConfig(config, defaultValues, _self).cfg, function (details) {
1954
1959
  var config = details.cfg;
1955
1960
  _loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
1956
1961
  _loggingLevelTelemetry = config.loggingLevelTelemetry;