@microsoft/applicationinsights-dependencies-js 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.
- package/browser/es5/applicationinsights-dependencies-js.cjs.js +25 -20
- package/browser/es5/applicationinsights-dependencies-js.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-dependencies-js.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-dependencies-js.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-dependencies-js.gbl.js +25 -20
- package/browser/es5/applicationinsights-dependencies-js.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-dependencies-js.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-dependencies-js.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-dependencies-js.integrity.json +25 -25
- package/browser/es5/applicationinsights-dependencies-js.js +25 -20
- package/browser/es5/applicationinsights-dependencies-js.js.map +1 -1
- package/browser/es5/applicationinsights-dependencies-js.min.js +2 -2
- package/browser/es5/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist/es5/applicationinsights-dependencies-js.js +25 -20
- package/dist/es5/applicationinsights-dependencies-js.js.map +1 -1
- package/dist/es5/applicationinsights-dependencies-js.min.js +2 -2
- package/dist/es5/applicationinsights-dependencies-js.min.js.map +1 -1
- package/dist-es5/DependencyInitializer.js +1 -1
- package/dist-es5/DependencyListener.js +1 -1
- package/dist-es5/InternalConstants.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/ajax.js +1 -1
- package/dist-es5/ajaxRecord.js +1 -1
- package/dist-es5/ajaxUtils.js +1 -1
- package/dist-es5/applicationinsights-dependencies-js.js +1 -1
- package/package.json +5 -5
- package/types/applicationinsights-dependencies-js.d.ts +1 -1
- package/types/applicationinsights-dependencies-js.namespaced.d.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Dependencies Plugin, 3.0.1-nightly3.2304-
|
|
2
|
+
* Application Insights JavaScript SDK - Dependencies Plugin, 3.0.1-nightly3.2304-44
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
this.Microsoft = this.Microsoft || {};
|
|
@@ -38,7 +38,7 @@ this.Microsoft = this.Microsoft || {};
|
|
|
38
38
|
var ArrCls = Array;
|
|
39
39
|
var ArrProto = ArrCls[PROTOTYPE];
|
|
40
40
|
|
|
41
|
-
function
|
|
41
|
+
function safeGet(cb, defValue) {
|
|
42
42
|
var result = defValue;
|
|
43
43
|
try {
|
|
44
44
|
result = cb();
|
|
@@ -355,8 +355,8 @@ this.Microsoft = this.Microsoft || {};
|
|
|
355
355
|
return lazyValue;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
function
|
|
359
|
-
return getLazy(function () { return
|
|
358
|
+
function safeGetLazy(cb, defValue) {
|
|
359
|
+
return getLazy(function () { return safeGet(cb, defValue); });
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
var WINDOW = "window";
|
|
@@ -365,11 +365,11 @@ this.Microsoft = this.Microsoft || {};
|
|
|
365
365
|
var _cachedDocument;
|
|
366
366
|
var _cachedNavigator;
|
|
367
367
|
var _isWebWorker;
|
|
368
|
-
function
|
|
369
|
-
return
|
|
368
|
+
function lazySafeGetInst(name) {
|
|
369
|
+
return safeGetLazy(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE);
|
|
370
370
|
}
|
|
371
371
|
function getGlobal(useCached) {
|
|
372
|
-
(!_cachedGlobal || useCached === false || (_globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal =
|
|
372
|
+
(!_cachedGlobal || useCached === false || (_globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = safeGetLazy(_getGlobalValue, null));
|
|
373
373
|
return _cachedGlobal.v;
|
|
374
374
|
}
|
|
375
375
|
function getInst(name, useCached) {
|
|
@@ -383,22 +383,22 @@ this.Microsoft = this.Microsoft || {};
|
|
|
383
383
|
return null;
|
|
384
384
|
}
|
|
385
385
|
function getDocument() {
|
|
386
|
-
(!_cachedDocument || (_globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument =
|
|
386
|
+
(!_cachedDocument || (_globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = lazySafeGetInst("document"));
|
|
387
387
|
return _cachedDocument.v;
|
|
388
388
|
}
|
|
389
389
|
function hasWindow() {
|
|
390
390
|
return !!getWindow();
|
|
391
391
|
}
|
|
392
392
|
function getWindow() {
|
|
393
|
-
(!_cachedWindow || (_globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow =
|
|
393
|
+
(!_cachedWindow || (_globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = lazySafeGetInst(WINDOW));
|
|
394
394
|
return _cachedWindow.v;
|
|
395
395
|
}
|
|
396
396
|
function getNavigator() {
|
|
397
|
-
(!_cachedNavigator || (_globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator =
|
|
397
|
+
(!_cachedNavigator || (_globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = lazySafeGetInst("navigator"));
|
|
398
398
|
return _cachedNavigator.v;
|
|
399
399
|
}
|
|
400
400
|
function isWebWorker() {
|
|
401
|
-
!_isWebWorker && (_isWebWorker =
|
|
401
|
+
!_isWebWorker && (_isWebWorker = safeGetLazy(function () { return !!(self && self instanceof WorkerGlobalScope); }, false));
|
|
402
402
|
return _isWebWorker.v;
|
|
403
403
|
}
|
|
404
404
|
|
|
@@ -406,13 +406,13 @@ this.Microsoft = this.Microsoft || {};
|
|
|
406
406
|
var _symbolFor;
|
|
407
407
|
var _symbolKeyFor;
|
|
408
408
|
function _getSymbolValue(name) {
|
|
409
|
-
return
|
|
409
|
+
return safeGetLazy(function () {
|
|
410
410
|
return (_symbol.v ? _symbol[name] : UNDEF_VALUE);
|
|
411
411
|
}, UNDEF_VALUE);
|
|
412
412
|
}
|
|
413
413
|
function getSymbol() {
|
|
414
414
|
var resetCache = !_symbol || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_symbol.b);
|
|
415
|
-
resetCache && (_symbol =
|
|
415
|
+
resetCache && (_symbol = lazySafeGetInst(SYMBOL));
|
|
416
416
|
(!_symbolFor || resetCache) && (_symbolFor = _getSymbolValue("for"));
|
|
417
417
|
(!_symbolKeyFor || resetCache) && (_symbolKeyFor = _getSymbolValue("keyFor"));
|
|
418
418
|
return _symbol.v;
|
|
@@ -601,7 +601,7 @@ this.Microsoft = this.Microsoft || {};
|
|
|
601
601
|
|
|
602
602
|
var _perf;
|
|
603
603
|
function getPerformance() {
|
|
604
|
-
(!_perf || (_globalLazyTestHooks.lzy && !_perf.b)) && (_perf =
|
|
604
|
+
(!_perf || (_globalLazyTestHooks.lzy && !_perf.b)) && (_perf = lazySafeGetInst("performance"));
|
|
605
605
|
return _perf.v;
|
|
606
606
|
}
|
|
607
607
|
|
|
@@ -1019,6 +1019,7 @@ this.Microsoft = this.Microsoft || {};
|
|
|
1019
1019
|
var _DYN_TIME = "time";
|
|
1020
1020
|
var _DYN_PROCESS_NEXT = "processNext";
|
|
1021
1021
|
var _DYN_GET_PROCESS_TEL_CONT0 = "getProcessTelContext";
|
|
1022
|
+
var _DYN_UNLOAD = "unload";
|
|
1022
1023
|
var _DYN_VERSION = "version";
|
|
1023
1024
|
var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole";
|
|
1024
1025
|
var _DYN_CREATE_NEW = "createNew";
|
|
@@ -1304,7 +1305,7 @@ this.Microsoft = this.Microsoft || {};
|
|
|
1304
1305
|
return result;
|
|
1305
1306
|
}
|
|
1306
1307
|
|
|
1307
|
-
var version = "3.0.1-nightly3.2304-
|
|
1308
|
+
var version = "3.0.1-nightly3.2304-44";
|
|
1308
1309
|
var instanceName = "." + newId(6);
|
|
1309
1310
|
var _dataUid = 0;
|
|
1310
1311
|
function _canAcceptData(target) {
|
|
@@ -1899,7 +1900,7 @@ this.Microsoft = this.Microsoft || {};
|
|
|
1899
1900
|
return handler[_DYN_WATCH ](configHandler);
|
|
1900
1901
|
}
|
|
1901
1902
|
_logInvalidAccess(logger, STR_NOT_DYNAMIC_ERROR + dumpObj(config));
|
|
1902
|
-
createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
|
|
1903
|
+
return createDynamicConfig(config, null, logger)[_DYN_WATCH ](configHandler);
|
|
1903
1904
|
}
|
|
1904
1905
|
|
|
1905
1906
|
var _aiNamespace = null;
|
|
@@ -1977,8 +1978,9 @@ this.Microsoft = this.Microsoft || {};
|
|
|
1977
1978
|
var _loggingLevelTelemetry;
|
|
1978
1979
|
var _maxInternalMessageLimit;
|
|
1979
1980
|
var _enableDebug;
|
|
1981
|
+
var _unloadHandler;
|
|
1980
1982
|
dynamicProto(DiagnosticLogger, this, function (_self) {
|
|
1981
|
-
_setDefaultsFromConfig(config || {});
|
|
1983
|
+
_unloadHandler = _setDefaultsFromConfig(config || {});
|
|
1982
1984
|
_self.consoleLoggingLevel = function () { return _loggingLevelConsole; };
|
|
1983
1985
|
_self[_DYN_THROW_INTERNAL ] = function (severity, msgId, msg, properties, isUserAct) {
|
|
1984
1986
|
if (isUserAct === void 0) { isUserAct = false; }
|
|
@@ -2021,6 +2023,10 @@ this.Microsoft = this.Microsoft || {};
|
|
|
2021
2023
|
_messageLogged = {};
|
|
2022
2024
|
};
|
|
2023
2025
|
_self[_DYN_LOG_INTERNAL_MESSAGE ] = _logInternalMessage;
|
|
2026
|
+
_self[_DYN_UNLOAD ] = function (isAsync) {
|
|
2027
|
+
_unloadHandler && _unloadHandler.rm();
|
|
2028
|
+
_unloadHandler = null;
|
|
2029
|
+
};
|
|
2024
2030
|
function _logInternalMessage(severity, message) {
|
|
2025
2031
|
if (_areInternalMessagesThrottled()) {
|
|
2026
2032
|
return;
|
|
@@ -2053,8 +2059,7 @@ this.Microsoft = this.Microsoft || {};
|
|
|
2053
2059
|
}
|
|
2054
2060
|
}
|
|
2055
2061
|
function _setDefaultsFromConfig(config) {
|
|
2056
|
-
|
|
2057
|
-
handler[_DYN_WATCH ](function (details) {
|
|
2062
|
+
return onConfigChange(createDynamicConfig(config, defaultValues$1, _self).cfg, function (details) {
|
|
2058
2063
|
var config = details.cfg;
|
|
2059
2064
|
_loggingLevelConsole = config[_DYN_LOGGING_LEVEL_CONSOL4 ];
|
|
2060
2065
|
_loggingLevelTelemetry = config.loggingLevelTelemetry;
|
|
@@ -2445,7 +2450,7 @@ this.Microsoft = this.Microsoft || {};
|
|
|
2445
2450
|
var context = internalContext.ctx;
|
|
2446
2451
|
function _processNext(unloadState) {
|
|
2447
2452
|
var nextPlugin = internalContext._next();
|
|
2448
|
-
nextPlugin && nextPlugin
|
|
2453
|
+
nextPlugin && nextPlugin[_DYN_UNLOAD ](context, unloadState);
|
|
2449
2454
|
return !nextPlugin;
|
|
2450
2455
|
}
|
|
2451
2456
|
function _createNew(plugins, startAt) {
|