@microsoft/applicationinsights-core-js 3.0.1-nightly3.2304-41 → 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-core-js.cjs.js +596 -129
- package/browser/es5/applicationinsights-core-js.cjs.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.cjs.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.cjs.min.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.gbl.js +596 -129
- package/browser/es5/applicationinsights-core-js.gbl.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.gbl.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.gbl.min.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.integrity.json +25 -25
- package/browser/es5/applicationinsights-core-js.js +596 -129
- package/browser/es5/applicationinsights-core-js.js.map +1 -1
- package/browser/es5/applicationinsights-core-js.min.js +2 -2
- package/browser/es5/applicationinsights-core-js.min.js.map +1 -1
- package/dist/es5/applicationinsights-core-js.js +596 -129
- package/dist/es5/applicationinsights-core-js.js.map +1 -1
- package/dist/es5/applicationinsights-core-js.min.js +2 -2
- package/dist/es5/applicationinsights-core-js.min.js.map +1 -1
- package/dist-es5/Config/ConfigDefaultHelpers.js +1 -1
- package/dist-es5/Config/ConfigDefaults.js +1 -1
- package/dist-es5/Config/DynamicConfig.js +2 -2
- package/dist-es5/Config/DynamicConfig.js.map +1 -1
- package/dist-es5/Config/DynamicProperty.js +1 -1
- package/dist-es5/Config/DynamicState.js +1 -1
- package/dist-es5/Config/DynamicSupport.js +1 -1
- package/dist-es5/Config/IConfigDefaults.js +1 -1
- package/dist-es5/Config/IDynamicConfigHandler.js +1 -1
- package/dist-es5/Config/IDynamicPropertyHandler.js +1 -1
- package/dist-es5/Config/IDynamicWatcher.js +1 -1
- package/dist-es5/Config/_IDynamicConfigHandlerState.js +1 -1
- package/dist-es5/JavaScriptSDK/AggregationError.js +1 -1
- package/dist-es5/JavaScriptSDK/AppInsightsCore.js +52 -22
- package/dist-es5/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-es5/JavaScriptSDK/AsyncUtils.js +49 -0
- package/dist-es5/JavaScriptSDK/AsyncUtils.js.map +1 -0
- package/dist-es5/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-es5/JavaScriptSDK/Constants.js +1 -1
- package/dist-es5/JavaScriptSDK/CookieMgr.js +101 -96
- package/dist-es5/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-es5/JavaScriptSDK/CoreUtils.js +1 -1
- package/dist-es5/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-es5/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-es5/JavaScriptSDK/DbgExtensionUtils.js +1 -1
- package/dist-es5/JavaScriptSDK/DiagnosticLogger.js +11 -7
- package/dist-es5/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-es5/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-es5/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-es5/JavaScriptSDK/HelperFuncs.js +1 -1
- package/dist-es5/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-es5/JavaScriptSDK/InternalConstants.js +1 -1
- package/dist-es5/JavaScriptSDK/NotificationManager.js +48 -12
- package/dist-es5/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-es5/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js +3 -3
- package/dist-es5/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-es5/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-es5/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-es5/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-es5/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-es5/JavaScriptSDK/UnloadHookContainer.js +1 -1
- package/dist-es5/JavaScriptSDK/W3cTraceParent.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IAppInsightsCore.js +3 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IAppInsightsCore.js.map +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IChannelControlsHost.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
- package/dist-es5/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-es5/__DynamicConstants.js +5 -5
- package/dist-es5/__DynamicConstants.js.map +1 -1
- package/dist-es5/applicationinsights-core-js.js +2 -1
- package/dist-es5/applicationinsights-core-js.js.map +1 -1
- package/package.json +3 -2
- package/types/applicationinsights-core-js.d.ts +112 -11
- package/types/applicationinsights-core-js.namespaced.d.ts +112 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 3.0.1-nightly3.2304-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 3.0.1-nightly3.2304-44
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -17,10 +17,10 @@ export var _DYN_RD_ONLY = "rdOnly"; // Count: 4
|
|
|
17
17
|
export var _DYN_NOTIFY = "notify"; // Count: 4
|
|
18
18
|
export var _DYN_THROW_INTERNAL = "throwInternal"; // Count: 4
|
|
19
19
|
export var _DYN_SET_DF = "setDf"; // Count: 6
|
|
20
|
-
export var _DYN_WATCH = "watch"; // Count:
|
|
21
|
-
export var _DYN_LOGGER = "logger"; // Count:
|
|
20
|
+
export var _DYN_WATCH = "watch"; // Count: 9
|
|
21
|
+
export var _DYN_LOGGER = "logger"; // Count: 17
|
|
22
22
|
export var _DYN_APPLY = "apply"; // Count: 7
|
|
23
|
-
export var _DYN_PUSH = "push"; // Count:
|
|
23
|
+
export var _DYN_PUSH = "push"; // Count: 32
|
|
24
24
|
export var _DYN_SPLICE = "splice"; // Count: 8
|
|
25
25
|
export var _DYN_CANCEL = "cancel"; // Count: 5
|
|
26
26
|
export var _DYN_INITIALIZE = "initialize"; // Count: 4
|
|
@@ -37,6 +37,7 @@ export var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener"; // Count: 4
|
|
|
37
37
|
export var _DYN_REMOVE_NOTIFICATION_2 = "removeNotificationListener"; // Count: 4
|
|
38
38
|
export var _DYN_ENABLED = "enabled"; // Count: 6
|
|
39
39
|
export var _DYN_STOP_POLLING_INTERNA3 = "stopPollingInternalLogs"; // Count: 2
|
|
40
|
+
export var _DYN_UNLOAD = "unload"; // Count: 9
|
|
40
41
|
export var _DYN_ON_COMPLETE = "onComplete"; // Count: 5
|
|
41
42
|
export var _DYN_VERSION = "version"; // Count: 8
|
|
42
43
|
export var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole"; // Count: 2
|
|
@@ -57,7 +58,6 @@ export var _DYN_REPLACE = "replace"; // Count: 8
|
|
|
57
58
|
export var _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage"; // Count: 2
|
|
58
59
|
export var _DYN_TYPE = "type"; // Count: 14
|
|
59
60
|
export var _DYN_HANDLER = "handler"; // Count: 5
|
|
60
|
-
export var _DYN_LISTENERS = "listeners"; // Count: 6
|
|
61
61
|
export var _DYN_IS_CHILD_EVT = "isChildEvt"; // Count: 3
|
|
62
62
|
export var _DYN_GET_CTX = "getCtx"; // Count: 6
|
|
63
63
|
export var _DYN_SET_CTX = "setCtx"; // Count: 10
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 9\r\nexport var _DYN_LENGTH = \"length\"; // Count: 42\r\nexport var _DYN_RD_ONLY = \"rdOnly\"; // Count: 4\r\nexport var _DYN_NOTIFY = \"notify\"; // Count: 4\r\nexport var _DYN_THROW_INTERNAL = \"throwInternal\"; // Count: 4\r\nexport var _DYN_SET_DF = \"setDf\"; // Count: 6\r\nexport var _DYN_WATCH = \"watch\"; // Count:
|
|
1
|
+
{"version":3,"file":"__DynamicConstants.js.map","sources":["__DynamicConstants.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\n// @skip-file-minify\r\n// ##############################################################\r\n// AUTO GENERATED FILE: This file is Auto Generated during build.\r\n// ##############################################################\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\n// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\r\n// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 9\r\nexport var _DYN_LENGTH = \"length\"; // Count: 42\r\nexport var _DYN_RD_ONLY = \"rdOnly\"; // Count: 4\r\nexport var _DYN_NOTIFY = \"notify\"; // Count: 4\r\nexport var _DYN_THROW_INTERNAL = \"throwInternal\"; // Count: 4\r\nexport var _DYN_SET_DF = \"setDf\"; // Count: 6\r\nexport var _DYN_WATCH = \"watch\"; // Count: 9\r\nexport var _DYN_LOGGER = \"logger\"; // Count: 17\r\nexport var _DYN_APPLY = \"apply\"; // Count: 7\r\nexport var _DYN_PUSH = \"push\"; // Count: 32\r\nexport var _DYN_SPLICE = \"splice\"; // Count: 8\r\nexport var _DYN_CANCEL = \"cancel\"; // Count: 5\r\nexport var _DYN_INITIALIZE = \"initialize\"; // Count: 4\r\nexport var _DYN_IDENTIFIER = \"identifier\"; // Count: 10\r\nexport var _DYN_IS_INITIALIZED = \"isInitialized\"; // Count: 10\r\nexport var _DYN_GET_PLUGIN = \"getPlugin\"; // Count: 6\r\nexport var _DYN_POLL_INTERNAL_LOGS = \"pollInternalLogs\"; // Count: 2\r\nexport var _DYN_NAME = \"name\"; // Count: 11\r\nexport var _DYN_TIME = \"time\"; // Count: 6\r\nexport var _DYN_PROCESS_NEXT = \"processNext\"; // Count: 15\r\nexport var _DYN_GET_PROCESS_TEL_CONT0 = \"getProcessTelContext\"; // Count: 2\r\nexport var _DYN_GET_NOTIFY_MGR = \"getNotifyMgr\"; // Count: 5\r\nexport var _DYN_ADD_NOTIFICATION_LIS1 = \"addNotificationListener\"; // Count: 4\r\nexport var _DYN_REMOVE_NOTIFICATION_2 = \"removeNotificationListener\"; // Count: 4\r\nexport var _DYN_ENABLED = \"enabled\"; // Count: 6\r\nexport var _DYN_STOP_POLLING_INTERNA3 = \"stopPollingInternalLogs\"; // Count: 2\r\nexport var _DYN_UNLOAD = \"unload\"; // Count: 9\r\nexport var _DYN_ON_COMPLETE = \"onComplete\"; // Count: 5\r\nexport var _DYN_VERSION = \"version\"; // Count: 8\r\nexport var _DYN_LOGGING_LEVEL_CONSOL4 = \"loggingLevelConsole\"; // Count: 2\r\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 7\r\nexport var _DYN_TEARDOWN = \"teardown\"; // Count: 9\r\nexport var _DYN_MESSAGE_ID = \"messageId\"; // Count: 4\r\nexport var _DYN_MESSAGE = \"message\"; // Count: 6\r\nexport var _DYN_IS_ASYNC = \"isAsync\"; // Count: 6\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 10\r\nexport var _DYN__DO_TEARDOWN = \"_doTeardown\"; // Count: 4\r\nexport var _DYN_UPDATE = \"update\"; // Count: 6\r\nexport var _DYN_GET_NEXT = \"getNext\"; // Count: 12\r\nexport var _DYN_SET_NEXT_PLUGIN = \"setNextPlugin\"; // Count: 5\r\nexport var _DYN_USER_AGENT = \"userAgent\"; // Count: 5\r\nexport var _DYN_SPLIT = \"split\"; // Count: 5\r\nexport var _DYN_NODE_TYPE = \"nodeType\"; // Count: 3\r\nexport var _DYN_REPLACE = \"replace\"; // Count: 8\r\nexport var _DYN_LOG_INTERNAL_MESSAGE = \"logInternalMessage\"; // Count: 2\r\nexport var _DYN_TYPE = \"type\"; // Count: 14\r\nexport var _DYN_HANDLER = \"handler\"; // Count: 5\r\nexport var _DYN_IS_CHILD_EVT = \"isChildEvt\"; // Count: 3\r\nexport var _DYN_GET_CTX = \"getCtx\"; // Count: 6\r\nexport var _DYN_SET_CTX = \"setCtx\"; // Count: 10\r\nexport var _DYN_COMPLETE = \"complete\"; // Count: 3\r\nexport var _DYN_TRACE_ID = \"traceId\"; // Count: 5\r\nexport var _DYN_SPAN_ID = \"spanId\"; // Count: 5\r\nexport var _DYN_TRACE_FLAGS = \"traceFlags\"; // Count: 6\r\n//# sourceMappingURL=__DynamicConstants.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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 3.0.1-nightly3.2304-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 3.0.1-nightly3.2304-44
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
|
|
@@ -9,6 +9,7 @@ export { AppInsightsCore } from "./JavaScriptSDK/AppInsightsCore";
|
|
|
9
9
|
export { BaseTelemetryPlugin } from "./JavaScriptSDK/BaseTelemetryPlugin";
|
|
10
10
|
export { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from "./JavaScriptSDK/RandomHelper";
|
|
11
11
|
export { Undefined, newGuid, generateW3CId } from "./JavaScriptSDK/CoreUtils";
|
|
12
|
+
export { runTargetUnload, doUnloadAll } from "./JavaScriptSDK/AsyncUtils";
|
|
12
13
|
export { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend } from "./JavaScriptSDK/HelperFuncs";
|
|
13
14
|
export { isArray, isTypeof, isUndefined, isNullOrUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, strEndsWith, strStartsWith, isDate, isError, isString, isNumber, isBoolean, arrForEach, arrIndexOf, arrReduce, arrMap, strTrim, objKeys, objDefineAccessors, throwError, isSymbol, isNotTruthy, isTruthy, objFreeze, objSeal, objToString, objDeepFreeze as deepFreeze, getInst as getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, hasNavigator, getNavigator, hasHistory, getHistory, dumpObj, asString, objForEachKey, getPerformance, utcNow as dateNow, perfNow } from "@nevware21/ts-utils";
|
|
14
15
|
export { createEnumStyle, createValueMap } from "./JavaScriptSDK.Enums/EnumHelperFuncs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicationinsights-core-js.js.map","sources":["applicationinsights-core-js.js"],"sourcesContent":["export { MinChannelPriorty } from \"./JavaScriptSDK.Interfaces/IChannelControls\";\r\nexport { EventsDiscardedReason } from \"./JavaScriptSDK.Enums/EventsDiscardedReason\";\r\nexport { throwAggregationError } from \"./JavaScriptSDK/AggregationError\";\r\nexport { AppInsightsCore } from \"./JavaScriptSDK/AppInsightsCore\";\r\nexport { BaseTelemetryPlugin } from \"./JavaScriptSDK/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from \"./JavaScriptSDK/RandomHelper\";\r\nexport { Undefined, newGuid, generateW3CId } from \"./JavaScriptSDK/CoreUtils\";\r\nexport { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend } from \"./JavaScriptSDK/HelperFuncs\";\r\nexport { isArray, isTypeof, isUndefined, isNullOrUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, strEndsWith, strStartsWith, isDate, isError, isString, isNumber, isBoolean, arrForEach, arrIndexOf, arrReduce, arrMap, strTrim, objKeys, objDefineAccessors, throwError, isSymbol, isNotTruthy, isTruthy, objFreeze, objSeal, objToString, objDeepFreeze as deepFreeze, getInst as getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, hasNavigator, getNavigator, hasHistory, getHistory, dumpObj, asString, objForEachKey, getPerformance, utcNow as dateNow, perfNow } from \"@nevware21/ts-utils\";\r\nexport { createEnumStyle, createValueMap } from \"./JavaScriptSDK.Enums/EnumHelperFuncs\";\r\nexport { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, __getRegisteredEvents } from \"./JavaScriptSDK/EventHelpers\";\r\nexport { getCrypto, getMsCrypto, getLocation, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming } from \"./JavaScriptSDK/EnvUtils\";\r\nexport { getGlobal, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./JavaScriptSDK/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./JavaScriptSDK/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole, _logInternalMessage } from \"./JavaScriptSDK/DiagnosticLogger\";\r\nexport { ProcessTelemetryContext, createProcessTelemetryContext\r\n// Explicitly NOT exporting createProcessTelemetryUnloadContext() and createProcessTelemetryUpdateContext() as these should only be created internally\r\n } from \"./JavaScriptSDK/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins, unloadComponents } from \"./JavaScriptSDK/TelemetryHelpers\";\r\nexport { LoggingSeverity } from \"./JavaScriptSDK.Enums/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs, InstrumentEvent } from \"./JavaScriptSDK/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./JavaScriptSDK/CookieMgr\";\r\nexport { getDebugListener, getDebugExt } from \"./JavaScriptSDK/DbgExtensionUtils\";\r\nexport { createUniqueNamespace } from \"./JavaScriptSDK/DataCacheHelper\";\r\nexport { createUnloadHandlerContainer } from \"./JavaScriptSDK/UnloadHandlerContainer\";\r\nexport { createUnloadHookContainer } from \"./JavaScriptSDK/UnloadHookContainer\";\r\nexport { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from \"./JavaScriptSDK/W3cTraceParent\";\r\nexport { createDynamicConfig, onConfigChange } from \"./Config/DynamicConfig\";\r\nexport { getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from \"./Config/DynamicSupport\";\r\nexport { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet } from \"./Config/ConfigDefaultHelpers\";\r\n//# sourceMappingURL=applicationinsights-core-js.js.map"],"names":[],"mappings":";;;;AAAA;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"}
|
|
1
|
+
{"version":3,"file":"applicationinsights-core-js.js.map","sources":["applicationinsights-core-js.js"],"sourcesContent":["export { MinChannelPriorty } from \"./JavaScriptSDK.Interfaces/IChannelControls\";\r\nexport { EventsDiscardedReason } from \"./JavaScriptSDK.Enums/EventsDiscardedReason\";\r\nexport { throwAggregationError } from \"./JavaScriptSDK/AggregationError\";\r\nexport { AppInsightsCore } from \"./JavaScriptSDK/AppInsightsCore\";\r\nexport { BaseTelemetryPlugin } from \"./JavaScriptSDK/BaseTelemetryPlugin\";\r\nexport { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from \"./JavaScriptSDK/RandomHelper\";\r\nexport { Undefined, newGuid, generateW3CId } from \"./JavaScriptSDK/CoreUtils\";\r\nexport { runTargetUnload, doUnloadAll } from \"./JavaScriptSDK/AsyncUtils\";\r\nexport { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend } from \"./JavaScriptSDK/HelperFuncs\";\r\nexport { isArray, isTypeof, isUndefined, isNullOrUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, strEndsWith, strStartsWith, isDate, isError, isString, isNumber, isBoolean, arrForEach, arrIndexOf, arrReduce, arrMap, strTrim, objKeys, objDefineAccessors, throwError, isSymbol, isNotTruthy, isTruthy, objFreeze, objSeal, objToString, objDeepFreeze as deepFreeze, getInst as getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, hasNavigator, getNavigator, hasHistory, getHistory, dumpObj, asString, objForEachKey, getPerformance, utcNow as dateNow, perfNow } from \"@nevware21/ts-utils\";\r\nexport { createEnumStyle, createValueMap } from \"./JavaScriptSDK.Enums/EnumHelperFuncs\";\r\nexport { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, __getRegisteredEvents } from \"./JavaScriptSDK/EventHelpers\";\r\nexport { getCrypto, getMsCrypto, getLocation, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming } from \"./JavaScriptSDK/EnvUtils\";\r\nexport { getGlobal, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from \"@microsoft/applicationinsights-shims\";\r\nexport { NotificationManager } from \"./JavaScriptSDK/NotificationManager\";\r\nexport { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from \"./JavaScriptSDK/PerfManager\";\r\nexport { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole, _logInternalMessage } from \"./JavaScriptSDK/DiagnosticLogger\";\r\nexport { ProcessTelemetryContext, createProcessTelemetryContext\r\n// Explicitly NOT exporting createProcessTelemetryUnloadContext() and createProcessTelemetryUpdateContext() as these should only be created internally\r\n } from \"./JavaScriptSDK/ProcessTelemetryContext\";\r\nexport { initializePlugins, sortPlugins, unloadComponents } from \"./JavaScriptSDK/TelemetryHelpers\";\r\nexport { LoggingSeverity } from \"./JavaScriptSDK.Enums/LoggingEnums\";\r\nexport { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs, InstrumentEvent } from \"./JavaScriptSDK/InstrumentHooks\";\r\nexport { createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported } from \"./JavaScriptSDK/CookieMgr\";\r\nexport { getDebugListener, getDebugExt } from \"./JavaScriptSDK/DbgExtensionUtils\";\r\nexport { createUniqueNamespace } from \"./JavaScriptSDK/DataCacheHelper\";\r\nexport { createUnloadHandlerContainer } from \"./JavaScriptSDK/UnloadHandlerContainer\";\r\nexport { createUnloadHookContainer } from \"./JavaScriptSDK/UnloadHookContainer\";\r\nexport { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from \"./JavaScriptSDK/W3cTraceParent\";\r\nexport { createDynamicConfig, onConfigChange } from \"./Config/DynamicConfig\";\r\nexport { getDynamicConfigHandler, blockDynamicConversion, forceDynamicConversion } from \"./Config/DynamicSupport\";\r\nexport { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet } from \"./Config/ConfigDefaultHelpers\";\r\n//# sourceMappingURL=applicationinsights-core-js.js.map"],"names":[],"mappings":";;;;AAAA;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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-core-js",
|
|
3
3
|
"author": "Microsoft Application Insights Team",
|
|
4
|
-
"version": "3.0.1-nightly3.2304-
|
|
4
|
+
"version": "3.0.1-nightly3.2304-44",
|
|
5
5
|
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
6
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
7
|
"keywords": [
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@microsoft/applicationinsights-shims": "3.0.1",
|
|
69
69
|
"@microsoft/dynamicproto-js": "^2.0.2",
|
|
70
|
-
"@nevware21/ts-utils": ">= 0.9.
|
|
70
|
+
"@nevware21/ts-utils": ">= 0.9.5 < 2.x",
|
|
71
|
+
"@nevware21/ts-async": ">= 0.2.4 < 2.x"
|
|
71
72
|
},
|
|
72
73
|
"publishConfig": {
|
|
73
74
|
"tag": "nightly3"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.1-nightly3.2304-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.1-nightly3.2304-44
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -33,6 +33,7 @@ import { hasHistory } from '@nevware21/ts-utils';
|
|
|
33
33
|
import { hasNavigator } from '@nevware21/ts-utils';
|
|
34
34
|
import { objHasOwnProperty as hasOwnProperty } from '@nevware21/ts-utils';
|
|
35
35
|
import { hasWindow } from '@nevware21/ts-utils';
|
|
36
|
+
import { IPromise } from '@nevware21/ts-async';
|
|
36
37
|
import { isArray } from '@nevware21/ts-utils';
|
|
37
38
|
import { isBoolean } from '@nevware21/ts-utils';
|
|
38
39
|
import { isDate } from '@nevware21/ts-utils';
|
|
@@ -206,11 +207,18 @@ export declare class AppInsightsCore<CfgType extends IConfiguration = IConfigura
|
|
|
206
207
|
* approach is to create a new instance and initialize that instance.
|
|
207
208
|
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
208
209
|
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
210
|
+
* If you pass isAsync as `true` (also the default) and DO NOT pass a callback function then an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
211
|
+
* will be returned which will resolve once the unload is complete. The actual implementation of the `IPromise`
|
|
212
|
+
* will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)
|
|
209
213
|
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
210
214
|
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
211
|
-
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
215
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
216
|
+
* unload. Defaults to 5 seconds.
|
|
217
|
+
* @return Nothing or if occurring asynchronously a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
218
|
+
* which will be resolved once the unload is complete, the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
219
|
+
* will only be returned when no callback is provided and isAsync is true
|
|
212
220
|
*/
|
|
213
|
-
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void
|
|
221
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void | IPromise<ITelemetryUnloadState>;
|
|
214
222
|
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
215
223
|
/**
|
|
216
224
|
* Add a new plugin to the installation
|
|
@@ -615,7 +623,15 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
615
623
|
* @param message - {_InternalLogMessage} - The message to log.
|
|
616
624
|
*/
|
|
617
625
|
logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
618
|
-
|
|
626
|
+
/**
|
|
627
|
+
* Unload and remove any state that this IDiagnosticLogger may be holding, this is generally called when the
|
|
628
|
+
* owning SDK is being unloaded.
|
|
629
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
630
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
631
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
632
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
633
|
+
*/
|
|
634
|
+
unload(isAsync?: boolean): void | IPromise<void>;
|
|
619
635
|
}
|
|
620
636
|
|
|
621
637
|
/**
|
|
@@ -628,6 +644,19 @@ export declare class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
628
644
|
*/
|
|
629
645
|
export declare function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSource: () => string, func: (perfEvt?: IPerfEvent) => T, details?: () => any, isAsync?: boolean): T;
|
|
630
646
|
|
|
647
|
+
/**
|
|
648
|
+
* Call the unload function on all targets handling any returned [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
649
|
+
* / Promise before calling the next targets unload
|
|
650
|
+
* @param targets - An array of the targets to unload
|
|
651
|
+
* @param isAsync - The caller identifies whether it is expecting the operations to complete synchronously or asynchronously. Even
|
|
652
|
+
* if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is
|
|
653
|
+
* also true.
|
|
654
|
+
* @param done - Optional callback function to call once all of the unload functions have been called.
|
|
655
|
+
*/
|
|
656
|
+
export declare function doUnloadAll<T>(targets: Array<{
|
|
657
|
+
unload?: (isAsync?: boolean) => T | IPromise<T>;
|
|
658
|
+
}>, isAsync?: boolean, done?: () => void): void | IPromise<void>;
|
|
659
|
+
|
|
631
660
|
export { dumpObj }
|
|
632
661
|
|
|
633
662
|
/**
|
|
@@ -1016,11 +1045,18 @@ export declare interface IAppInsightsCore<CfgType extends IConfiguration = IConf
|
|
|
1016
1045
|
* approach is to create a new instance and initialize that instance.
|
|
1017
1046
|
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
1018
1047
|
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
1048
|
+
* If you pass isAsync as `true` (also the default) and DO NOT pass a callback function then an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1049
|
+
* will be returned which will resolve once the unload is complete. The actual implementation of the `IPromise`
|
|
1050
|
+
* will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)
|
|
1019
1051
|
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1020
1052
|
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
1021
|
-
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
1053
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
1054
|
+
* unload. Defaults to 5 seconds.
|
|
1055
|
+
* @return Nothing or if occurring asynchronously a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1056
|
+
* which will be resolved once the unload is complete, the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1057
|
+
* will only be returned when no callback is provided and isAsync is true
|
|
1022
1058
|
*/
|
|
1023
|
-
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void
|
|
1059
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void | IPromise<ITelemetryUnloadState>;
|
|
1024
1060
|
/**
|
|
1025
1061
|
* Find and return the (first) plugin with the specified identifier if present
|
|
1026
1062
|
* @param pluginIdentifier
|
|
@@ -1171,14 +1207,21 @@ export declare interface IChannelControls extends ITelemetryPlugin {
|
|
|
1171
1207
|
*/
|
|
1172
1208
|
teardown?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
1173
1209
|
/**
|
|
1174
|
-
* Flush to send data immediately; channel should default to sending data asynchronously
|
|
1210
|
+
* Flush to send data immediately; channel should default to sending data asynchronously. If executing asynchronously and
|
|
1211
|
+
* you DO NOT pass a callback function then a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1212
|
+
* will be returned which will resolve once the flush is complete. The actual implementation of the `IPromise`
|
|
1213
|
+
* will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)
|
|
1175
1214
|
* @param async - send data asynchronously when true
|
|
1176
1215
|
* @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
|
|
1177
1216
|
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
1178
1217
|
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
1179
|
-
* @returns - true
|
|
1218
|
+
* @returns - If a callback is provided `true` to indicate that callback will be called after the flush is complete otherwise the caller
|
|
1219
|
+
* should assume that any provided callback will never be called, Nothing or if occurring asynchronously a
|
|
1220
|
+
* [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) which will be resolved once the unload is complete,
|
|
1221
|
+
* the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) will only be returned when no callback is provided
|
|
1222
|
+
* and async is true.
|
|
1180
1223
|
*/
|
|
1181
|
-
flush?(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void
|
|
1224
|
+
flush?(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void | IPromise<boolean>;
|
|
1182
1225
|
}
|
|
1183
1226
|
|
|
1184
1227
|
export declare interface IChannelControlsHost extends IChannelControls {
|
|
@@ -1446,10 +1489,20 @@ export declare interface ICookieMgr {
|
|
|
1446
1489
|
*/
|
|
1447
1490
|
purge(name: string, path?: string): boolean;
|
|
1448
1491
|
/**
|
|
1449
|
-
* Optional Callback hook to allow the
|
|
1492
|
+
* Optional Callback hook to allow the cookie manager to update it's configuration, not generally implemented now that
|
|
1493
|
+
* dynamic configuration is supported
|
|
1450
1494
|
* @param updateState
|
|
1451
1495
|
*/
|
|
1452
1496
|
update?(updateState: ITelemetryUpdateState): void;
|
|
1497
|
+
/**
|
|
1498
|
+
* Unload and remove any state that this ICookieMgr may be holding, this is generally called when the
|
|
1499
|
+
* owning SDK is being unloaded.
|
|
1500
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1501
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1502
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1503
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1504
|
+
*/
|
|
1505
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1453
1506
|
}
|
|
1454
1507
|
|
|
1455
1508
|
/**
|
|
@@ -1560,6 +1613,15 @@ export declare interface IDiagnosticLogger {
|
|
|
1560
1613
|
* @param updateState
|
|
1561
1614
|
*/
|
|
1562
1615
|
update?(updateState: ITelemetryUpdateState): void;
|
|
1616
|
+
/**
|
|
1617
|
+
* Unload and remove any state that this IDiagnosticLogger may be holding, this is generally called when the
|
|
1618
|
+
* owning SDK is being unloaded.
|
|
1619
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1620
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1621
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1622
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1623
|
+
*/
|
|
1624
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1563
1625
|
}
|
|
1564
1626
|
|
|
1565
1627
|
export declare interface IDistributedTraceContext {
|
|
@@ -1815,6 +1877,15 @@ export declare interface INotificationListener {
|
|
|
1815
1877
|
* @param perfEvent
|
|
1816
1878
|
*/
|
|
1817
1879
|
perfEvent?: (perfEvent: IPerfEvent) => void;
|
|
1880
|
+
/**
|
|
1881
|
+
* Unload and remove any state that this INotificationListener may be holding, this is generally called when the
|
|
1882
|
+
* owning Manager is being unloaded.
|
|
1883
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1884
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1885
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1886
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1887
|
+
*/
|
|
1888
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1818
1889
|
}
|
|
1819
1890
|
|
|
1820
1891
|
/**
|
|
@@ -1856,6 +1927,15 @@ export declare interface INotificationManager {
|
|
|
1856
1927
|
* @param perfEvent - The perf event details
|
|
1857
1928
|
*/
|
|
1858
1929
|
perfEvent?(perfEvent: IPerfEvent): void;
|
|
1930
|
+
/**
|
|
1931
|
+
* Unload and remove any state that this INotificationManager may be holding, this is generally called when the
|
|
1932
|
+
* owning SDK is being unloaded.
|
|
1933
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1934
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1935
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1936
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1937
|
+
*/
|
|
1938
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1859
1939
|
}
|
|
1860
1940
|
|
|
1861
1941
|
/**
|
|
@@ -2539,7 +2619,7 @@ export declare function normalizeJsName(name: string): string;
|
|
|
2539
2619
|
* Class to manage sending notifications to all the listeners.
|
|
2540
2620
|
*/
|
|
2541
2621
|
export declare class NotificationManager implements INotificationManager {
|
|
2542
|
-
listeners: INotificationListener[];
|
|
2622
|
+
readonly listeners: INotificationListener[];
|
|
2543
2623
|
constructor(config?: IConfiguration);
|
|
2544
2624
|
/**
|
|
2545
2625
|
* Adds a notification listener.
|
|
@@ -2575,6 +2655,15 @@ export declare class NotificationManager implements INotificationManager {
|
|
|
2575
2655
|
* @param perfEvent
|
|
2576
2656
|
*/
|
|
2577
2657
|
perfEvent?(perfEvent: IPerfEvent): void;
|
|
2658
|
+
/**
|
|
2659
|
+
* Unload and remove any state that this INotificationManager may be holding, this is generally called when the
|
|
2660
|
+
* owning SDK is being unloaded.
|
|
2661
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
2662
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
2663
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
2664
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
2665
|
+
*/
|
|
2666
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
2578
2667
|
}
|
|
2579
2668
|
|
|
2580
2669
|
export { objDefineAccessors }
|
|
@@ -2871,6 +2960,18 @@ export declare function removePageShowEventListener(listener: any, evtNamespace?
|
|
|
2871
2960
|
*/
|
|
2872
2961
|
export declare function removePageUnloadEventListener(listener: any, evtNamespace?: string | string[]): void;
|
|
2873
2962
|
|
|
2963
|
+
/**
|
|
2964
|
+
* Run the unload function of the target object if it exists
|
|
2965
|
+
* @param target - The target object that contains the unload function
|
|
2966
|
+
* @param isAsync - The caller identifies whether it is expecting the operation to complete synchronously or asynchronously. Even
|
|
2967
|
+
* if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is
|
|
2968
|
+
* also true.
|
|
2969
|
+
* @returns The result of the target function
|
|
2970
|
+
*/
|
|
2971
|
+
export declare function runTargetUnload<T>(target: {
|
|
2972
|
+
unload?: (isAsync?: boolean) => T;
|
|
2973
|
+
}, isAsync?: boolean): T;
|
|
2974
|
+
|
|
2874
2975
|
/**
|
|
2875
2976
|
* Helper to return the ICookieMgr from the core (if not null/undefined) or a default implementation
|
|
2876
2977
|
* associated with the configuration or a legacy default.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft Application Insights Core Javascript SDK, 3.0.1-nightly3.2304-
|
|
2
|
+
* Microsoft Application Insights Core Javascript SDK, 3.0.1-nightly3.2304-44
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -28,6 +28,7 @@ declare namespace ApplicationInsights {
|
|
|
28
28
|
import { hasNavigator } from '@nevware21/ts-utils';
|
|
29
29
|
import { objHasOwnProperty as hasOwnProperty } from '@nevware21/ts-utils';
|
|
30
30
|
import { hasWindow } from '@nevware21/ts-utils';
|
|
31
|
+
import { IPromise } from '@nevware21/ts-async';
|
|
31
32
|
import { isArray } from '@nevware21/ts-utils';
|
|
32
33
|
import { isBoolean } from '@nevware21/ts-utils';
|
|
33
34
|
import { isDate } from '@nevware21/ts-utils';
|
|
@@ -201,11 +202,18 @@ declare namespace ApplicationInsights {
|
|
|
201
202
|
* approach is to create a new instance and initialize that instance.
|
|
202
203
|
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
203
204
|
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
205
|
+
* If you pass isAsync as `true` (also the default) and DO NOT pass a callback function then an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
206
|
+
* will be returned which will resolve once the unload is complete. The actual implementation of the `IPromise`
|
|
207
|
+
* will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)
|
|
204
208
|
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
205
209
|
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
206
|
-
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
210
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
211
|
+
* unload. Defaults to 5 seconds.
|
|
212
|
+
* @return Nothing or if occurring asynchronously a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
213
|
+
* which will be resolved once the unload is complete, the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
214
|
+
* will only be returned when no callback is provided and isAsync is true
|
|
207
215
|
*/
|
|
208
|
-
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void
|
|
216
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void | IPromise<ITelemetryUnloadState>;
|
|
209
217
|
getPlugin<T extends IPlugin = IPlugin>(pluginIdentifier: string): ILoadedPlugin<T>;
|
|
210
218
|
/**
|
|
211
219
|
* Add a new plugin to the installation
|
|
@@ -610,7 +618,15 @@ declare namespace ApplicationInsights {
|
|
|
610
618
|
* @param message - {_InternalLogMessage} - The message to log.
|
|
611
619
|
*/
|
|
612
620
|
logInternalMessage(severity: LoggingSeverity, message: _InternalLogMessage): void;
|
|
613
|
-
|
|
621
|
+
/**
|
|
622
|
+
* Unload and remove any state that this IDiagnosticLogger may be holding, this is generally called when the
|
|
623
|
+
* owning SDK is being unloaded.
|
|
624
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
625
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
626
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
627
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
628
|
+
*/
|
|
629
|
+
unload(isAsync?: boolean): void | IPromise<void>;
|
|
614
630
|
}
|
|
615
631
|
|
|
616
632
|
/**
|
|
@@ -623,6 +639,19 @@ declare namespace ApplicationInsights {
|
|
|
623
639
|
*/
|
|
624
640
|
function doPerf<T>(mgrSource: IPerfManagerProvider | IPerfManager, getSource: () => string, func: (perfEvt?: IPerfEvent) => T, details?: () => any, isAsync?: boolean): T;
|
|
625
641
|
|
|
642
|
+
/**
|
|
643
|
+
* Call the unload function on all targets handling any returned [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
644
|
+
* / Promise before calling the next targets unload
|
|
645
|
+
* @param targets - An array of the targets to unload
|
|
646
|
+
* @param isAsync - The caller identifies whether it is expecting the operations to complete synchronously or asynchronously. Even
|
|
647
|
+
* if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is
|
|
648
|
+
* also true.
|
|
649
|
+
* @param done - Optional callback function to call once all of the unload functions have been called.
|
|
650
|
+
*/
|
|
651
|
+
function doUnloadAll<T>(targets: Array<{
|
|
652
|
+
unload?: (isAsync?: boolean) => T | IPromise<T>;
|
|
653
|
+
}>, isAsync?: boolean, done?: () => void): void | IPromise<void>;
|
|
654
|
+
|
|
626
655
|
export { dumpObj }
|
|
627
656
|
|
|
628
657
|
/**
|
|
@@ -1011,11 +1040,18 @@ declare namespace ApplicationInsights {
|
|
|
1011
1040
|
* approach is to create a new instance and initialize that instance.
|
|
1012
1041
|
* This is due to possible unexpected side effects caused by plugins not supporting unload / teardown, unable
|
|
1013
1042
|
* to successfully remove any global references or they may just be completing the unload process asynchronously.
|
|
1043
|
+
* If you pass isAsync as `true` (also the default) and DO NOT pass a callback function then an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1044
|
+
* will be returned which will resolve once the unload is complete. The actual implementation of the `IPromise`
|
|
1045
|
+
* will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)
|
|
1014
1046
|
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1015
1047
|
* @param unloadComplete - An optional callback that will be called once the unload has completed
|
|
1016
|
-
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
1048
|
+
* @param cbTimeout - An optional timeout to wait for any flush operations to complete before proceeding with the
|
|
1049
|
+
* unload. Defaults to 5 seconds.
|
|
1050
|
+
* @return Nothing or if occurring asynchronously a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1051
|
+
* which will be resolved once the unload is complete, the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1052
|
+
* will only be returned when no callback is provided and isAsync is true
|
|
1017
1053
|
*/
|
|
1018
|
-
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void
|
|
1054
|
+
unload(isAsync?: boolean, unloadComplete?: (unloadState: ITelemetryUnloadState) => void, cbTimeout?: number): void | IPromise<ITelemetryUnloadState>;
|
|
1019
1055
|
/**
|
|
1020
1056
|
* Find and return the (first) plugin with the specified identifier if present
|
|
1021
1057
|
* @param pluginIdentifier
|
|
@@ -1166,14 +1202,21 @@ declare namespace ApplicationInsights {
|
|
|
1166
1202
|
*/
|
|
1167
1203
|
teardown?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState) => void | boolean;
|
|
1168
1204
|
/**
|
|
1169
|
-
* Flush to send data immediately; channel should default to sending data asynchronously
|
|
1205
|
+
* Flush to send data immediately; channel should default to sending data asynchronously. If executing asynchronously and
|
|
1206
|
+
* you DO NOT pass a callback function then a [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1207
|
+
* will be returned which will resolve once the flush is complete. The actual implementation of the `IPromise`
|
|
1208
|
+
* will be a native Promise (if supported) or the default as supplied by [ts-async library](https://github.com/nevware21/ts-async)
|
|
1170
1209
|
* @param async - send data asynchronously when true
|
|
1171
1210
|
* @param callBack - if specified, notify caller when send is complete, the channel should return true to indicate to the caller that it will be called.
|
|
1172
1211
|
* If the caller doesn't return true the caller should assume that it may never be called.
|
|
1173
1212
|
* @param sendReason - specify the reason that you are calling "flush" defaults to ManualFlush (1) if not specified
|
|
1174
|
-
* @returns - true
|
|
1213
|
+
* @returns - If a callback is provided `true` to indicate that callback will be called after the flush is complete otherwise the caller
|
|
1214
|
+
* should assume that any provided callback will never be called, Nothing or if occurring asynchronously a
|
|
1215
|
+
* [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) which will be resolved once the unload is complete,
|
|
1216
|
+
* the [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html) will only be returned when no callback is provided
|
|
1217
|
+
* and async is true.
|
|
1175
1218
|
*/
|
|
1176
|
-
flush?(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void
|
|
1219
|
+
flush?(async: boolean, callBack?: (flushComplete?: boolean) => void, sendReason?: SendRequestReason): boolean | void | IPromise<boolean>;
|
|
1177
1220
|
}
|
|
1178
1221
|
|
|
1179
1222
|
interface IChannelControlsHost extends IChannelControls {
|
|
@@ -1441,10 +1484,20 @@ declare namespace ApplicationInsights {
|
|
|
1441
1484
|
*/
|
|
1442
1485
|
purge(name: string, path?: string): boolean;
|
|
1443
1486
|
/**
|
|
1444
|
-
* Optional Callback hook to allow the
|
|
1487
|
+
* Optional Callback hook to allow the cookie manager to update it's configuration, not generally implemented now that
|
|
1488
|
+
* dynamic configuration is supported
|
|
1445
1489
|
* @param updateState
|
|
1446
1490
|
*/
|
|
1447
1491
|
update?(updateState: ITelemetryUpdateState): void;
|
|
1492
|
+
/**
|
|
1493
|
+
* Unload and remove any state that this ICookieMgr may be holding, this is generally called when the
|
|
1494
|
+
* owning SDK is being unloaded.
|
|
1495
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1496
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1497
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1498
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1499
|
+
*/
|
|
1500
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1448
1501
|
}
|
|
1449
1502
|
|
|
1450
1503
|
/**
|
|
@@ -1555,6 +1608,15 @@ declare namespace ApplicationInsights {
|
|
|
1555
1608
|
* @param updateState
|
|
1556
1609
|
*/
|
|
1557
1610
|
update?(updateState: ITelemetryUpdateState): void;
|
|
1611
|
+
/**
|
|
1612
|
+
* Unload and remove any state that this IDiagnosticLogger may be holding, this is generally called when the
|
|
1613
|
+
* owning SDK is being unloaded.
|
|
1614
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1615
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1616
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1617
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1618
|
+
*/
|
|
1619
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1558
1620
|
}
|
|
1559
1621
|
|
|
1560
1622
|
interface IDistributedTraceContext {
|
|
@@ -1810,6 +1872,15 @@ declare namespace ApplicationInsights {
|
|
|
1810
1872
|
* @param perfEvent
|
|
1811
1873
|
*/
|
|
1812
1874
|
perfEvent?: (perfEvent: IPerfEvent) => void;
|
|
1875
|
+
/**
|
|
1876
|
+
* Unload and remove any state that this INotificationListener may be holding, this is generally called when the
|
|
1877
|
+
* owning Manager is being unloaded.
|
|
1878
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1879
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1880
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1881
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1882
|
+
*/
|
|
1883
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1813
1884
|
}
|
|
1814
1885
|
|
|
1815
1886
|
/**
|
|
@@ -1851,6 +1922,15 @@ declare namespace ApplicationInsights {
|
|
|
1851
1922
|
* @param perfEvent - The perf event details
|
|
1852
1923
|
*/
|
|
1853
1924
|
perfEvent?(perfEvent: IPerfEvent): void;
|
|
1925
|
+
/**
|
|
1926
|
+
* Unload and remove any state that this INotificationManager may be holding, this is generally called when the
|
|
1927
|
+
* owning SDK is being unloaded.
|
|
1928
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
1929
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
1930
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
1931
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
1932
|
+
*/
|
|
1933
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
1854
1934
|
}
|
|
1855
1935
|
|
|
1856
1936
|
/**
|
|
@@ -2534,7 +2614,7 @@ declare namespace ApplicationInsights {
|
|
|
2534
2614
|
* Class to manage sending notifications to all the listeners.
|
|
2535
2615
|
*/
|
|
2536
2616
|
class NotificationManager implements INotificationManager {
|
|
2537
|
-
listeners: INotificationListener[];
|
|
2617
|
+
readonly listeners: INotificationListener[];
|
|
2538
2618
|
constructor(config?: IConfiguration);
|
|
2539
2619
|
/**
|
|
2540
2620
|
* Adds a notification listener.
|
|
@@ -2570,6 +2650,15 @@ declare namespace ApplicationInsights {
|
|
|
2570
2650
|
* @param perfEvent
|
|
2571
2651
|
*/
|
|
2572
2652
|
perfEvent?(perfEvent: IPerfEvent): void;
|
|
2653
|
+
/**
|
|
2654
|
+
* Unload and remove any state that this INotificationManager may be holding, this is generally called when the
|
|
2655
|
+
* owning SDK is being unloaded.
|
|
2656
|
+
* @param isAsync - Can the unload be performed asynchronously (default)
|
|
2657
|
+
* @return If the unload occurs synchronously then nothing should be returned, if happening asynchronously then
|
|
2658
|
+
* the function should return an [IPromise](https://nevware21.github.io/ts-async/typedoc/interfaces/IPromise.html)
|
|
2659
|
+
* / Promise to allow any listeners to wait for the operation to complete.
|
|
2660
|
+
*/
|
|
2661
|
+
unload?(isAsync?: boolean): void | IPromise<void>;
|
|
2573
2662
|
}
|
|
2574
2663
|
|
|
2575
2664
|
export { objDefineAccessors }
|
|
@@ -2866,6 +2955,18 @@ declare namespace ApplicationInsights {
|
|
|
2866
2955
|
*/
|
|
2867
2956
|
function removePageUnloadEventListener(listener: any, evtNamespace?: string | string[]): void;
|
|
2868
2957
|
|
|
2958
|
+
/**
|
|
2959
|
+
* Run the unload function of the target object if it exists
|
|
2960
|
+
* @param target - The target object that contains the unload function
|
|
2961
|
+
* @param isAsync - The caller identifies whether it is expecting the operation to complete synchronously or asynchronously. Even
|
|
2962
|
+
* if the caller is not waiting the operation may still be performed asynchronously depending on the component and the reverse is
|
|
2963
|
+
* also true.
|
|
2964
|
+
* @returns The result of the target function
|
|
2965
|
+
*/
|
|
2966
|
+
function runTargetUnload<T>(target: {
|
|
2967
|
+
unload?: (isAsync?: boolean) => T;
|
|
2968
|
+
}, isAsync?: boolean): T;
|
|
2969
|
+
|
|
2869
2970
|
/**
|
|
2870
2971
|
* Helper to return the ICookieMgr from the core (if not null/undefined) or a default implementation
|
|
2871
2972
|
* associated with the configuration or a legacy default.
|