@microsoft/applicationinsights-core-js 3.0.0-beta.2210-16 → 3.0.0-beta.2210-18
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/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +131 -117
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +2 -2
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.api.json +0 -89
- package/dist/applicationinsights-core-js.api.md +6 -6
- package/dist/applicationinsights-core-js.d.ts +7 -17
- package/dist/applicationinsights-core-js.js +131 -117
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +2 -2
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +7 -17
- package/dist-esm/Config/ConfigDefaults.js +2 -3
- package/dist-esm/Config/ConfigDefaults.js.map +1 -1
- package/dist-esm/Config/DynamicConfig.js +2 -3
- package/dist-esm/Config/DynamicConfig.js.map +1 -1
- package/dist-esm/Config/DynamicProperty.js +31 -18
- package/dist-esm/Config/DynamicProperty.js.map +1 -1
- package/dist-esm/Config/DynamicState.js +58 -47
- package/dist-esm/Config/DynamicState.js.map +1 -1
- package/dist-esm/Config/DynamicSupport.js +2 -3
- package/dist-esm/Config/DynamicSupport.js.map +1 -1
- package/dist-esm/Config/IConfigDefaults.js +1 -1
- package/dist-esm/Config/IDynamicConfigHandler.js +1 -1
- package/dist-esm/Config/IDynamicPropertyHandler.js +1 -1
- package/dist-esm/Config/IDynamicWatcher.js +1 -1
- package/dist-esm/Config/_IDynamicConfigHandlerState.js +1 -1
- package/dist-esm/JavaScriptSDK/AggregationError.js +1 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +3 -3
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +5 -7
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +12 -12
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +1 -14
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +3 -2
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +4 -12
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -3
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +3 -41
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +4 -4
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +4 -5
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +4 -4
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +3 -3
- package/dist-esm/JavaScriptSDK/RandomHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +3 -3
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EventsDiscardedReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/LoggingEnums.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/SendRequestReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUnloadReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Enums/TelemetryUpdateReason.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IAppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IChannelControls.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IConfiguration.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ICookieMgr.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDbgExtension.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IDistributedTraceContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IInstrumentHooks.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationListener.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/INotificationManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfEvent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IPerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryInitializers.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryItem.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryPluginChain.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUnloadState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITelemetryUpdateState.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/ITraceParent.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadHook.js +1 -1
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +4 -6
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +5 -5
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +1 -1
- package/src/JavaScriptSDK/AppInsightsCore.ts +3 -3
- package/src/JavaScriptSDK/ChannelController.ts +5 -7
- package/src/JavaScriptSDK/CookieMgr.ts +11 -11
- package/src/JavaScriptSDK/CoreUtils.ts +0 -15
- package/src/JavaScriptSDK/DbgExtensionUtils.ts +2 -1
- package/src/JavaScriptSDK/EnvUtils.ts +2 -11
- package/src/JavaScriptSDK/EventHelpers.ts +1 -2
- package/src/JavaScriptSDK/HelperFuncs.ts +3 -47
- package/src/JavaScriptSDK/NotificationManager.ts +3 -3
- package/src/JavaScriptSDK/PerfManager.ts +3 -4
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +6 -4
- package/src/JavaScriptSDK/RandomHelper.ts +2 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +2 -2
- package/types/Config/IDynamicWatcher.d.ts +5 -1
- package/types/Config/_IDynamicConfigHandlerState.d.ts +17 -1
- package/types/JavaScriptSDK/CoreUtils.d.ts +0 -5
- package/types/JavaScriptSDK/EnvUtils.d.ts +0 -6
- package/types/JavaScriptSDK/HelperFuncs.d.ts +0 -18
- package/types/__DynamicConstants.d.ts +1 -3
- package/types/applicationinsights-core-js.d.ts +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-18
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -20,11 +20,10 @@ export var _DYN_LOGGER = "logger"; // Count: 20
|
|
|
20
20
|
export var _DYN_CONFIGURABLE = "configurable"; // Count: 4
|
|
21
21
|
export var _DYN_ENUMERABLE = "enumerable"; // Count: 4
|
|
22
22
|
export var _DYN_APPLY = "apply"; // Count: 7
|
|
23
|
-
export var
|
|
24
|
-
export var
|
|
23
|
+
export var _DYN_PUSH = "push"; // Count: 32
|
|
24
|
+
export var _DYN_SPLICE = "splice"; // Count: 8
|
|
25
25
|
export var _DYN_INITIALIZE = "initialize"; // Count: 6
|
|
26
26
|
export var _DYN_IDENTIFIER = "identifier"; // Count: 8
|
|
27
|
-
export var _DYN_SPLICE = "splice"; // Count: 7
|
|
28
27
|
export var _DYN_IS_INITIALIZED = "isInitialized"; // Count: 11
|
|
29
28
|
export var _DYN_NAME = "name"; // Count: 11
|
|
30
29
|
export var _DYN_TIME = "time"; // Count: 5
|
|
@@ -35,7 +34,7 @@ export var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener"; // Count: 4
|
|
|
35
34
|
export var _DYN_REMOVE_NOTIFICATION_2 = "removeNotificationListener"; // Count: 4
|
|
36
35
|
export var _DYN_STOP_POLLING_INTERNA3 = "stopPollingInternalLogs"; // Count: 2
|
|
37
36
|
export var _DYN_ON_COMPLETE = "onComplete"; // Count: 4
|
|
38
|
-
export var _DYN_CALL = "call"; // Count:
|
|
37
|
+
export var _DYN_CALL = "call"; // Count: 5
|
|
39
38
|
export var _DYN_GET_PLUGIN = "getPlugin"; // Count: 5
|
|
40
39
|
export var _DYN_FLUSH = "flush"; // Count: 5
|
|
41
40
|
export var _DYN_LOGGING_LEVEL_CONSOL4 = "loggingLevelConsole"; // Count: 2
|
|
@@ -51,7 +50,6 @@ export var _DYN_GET_NEXT = "getNext"; // Count: 12
|
|
|
51
50
|
export var _DYN_SET_NEXT_PLUGIN = "setNextPlugin"; // Count: 5
|
|
52
51
|
export var _DYN_CREATE_NEW = "createNew"; // Count: 6
|
|
53
52
|
export var _DYN_CONFIG = "config"; // Count: 5
|
|
54
|
-
export var _DYN_SUBSTRING = "substring"; // Count: 4
|
|
55
53
|
export var _DYN_USER_AGENT = "userAgent"; // Count: 5
|
|
56
54
|
export var _DYN_SPLIT = "split"; // Count: 5
|
|
57
55
|
export var _DYN_NODE_TYPE = "nodeType"; // Count: 3
|
|
@@ -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 IE this will export a mutable variables that someone could change\r\n// ###########################################################################################################################################\r\nexport var _DYN_LENGTH = \"length\"; // Count: 39\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: 7\r\nexport var _DYN_WATCH = \"watch\"; // Count: 12\r\nexport var _DYN_LOGGER = \"logger\"; // Count: 20\r\nexport var _DYN_CONFIGURABLE = \"configurable\"; // Count: 4\r\nexport var _DYN_ENUMERABLE = \"enumerable\"; // Count: 4\r\nexport var _DYN_APPLY = \"apply\"; // Count: 7\r\nexport var
|
|
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 IE this will export a mutable variables that someone could change\r\n// ###########################################################################################################################################\r\nexport var _DYN_LENGTH = \"length\"; // Count: 39\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: 7\r\nexport var _DYN_WATCH = \"watch\"; // Count: 12\r\nexport var _DYN_LOGGER = \"logger\"; // Count: 20\r\nexport var _DYN_CONFIGURABLE = \"configurable\"; // Count: 4\r\nexport var _DYN_ENUMERABLE = \"enumerable\"; // Count: 4\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_INITIALIZE = \"initialize\"; // Count: 6\r\nexport var _DYN_IDENTIFIER = \"identifier\"; // Count: 8\r\nexport var _DYN_IS_INITIALIZED = \"isInitialized\"; // Count: 11\r\nexport var _DYN_NAME = \"name\"; // Count: 11\r\nexport var _DYN_TIME = \"time\"; // Count: 5\r\nexport var _DYN_PROCESS_NEXT = \"processNext\"; // Count: 21\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_STOP_POLLING_INTERNA3 = \"stopPollingInternalLogs\"; // Count: 2\r\nexport var _DYN_ON_COMPLETE = \"onComplete\"; // Count: 4\r\nexport var _DYN_CALL = \"call\"; // Count: 5\r\nexport var _DYN_GET_PLUGIN = \"getPlugin\"; // Count: 5\r\nexport var _DYN_FLUSH = \"flush\"; // Count: 5\r\nexport var _DYN_LOGGING_LEVEL_CONSOL4 = \"loggingLevelConsole\"; // Count: 2\r\nexport var _DYN__EXTENSIONS = \"_extensions\"; // Count: 4\r\nexport var _DYN_TEARDOWN = \"teardown\"; // Count: 10\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: 7\r\nexport var _DYN_DIAG_LOG = \"diagLog\"; // Count: 9\r\nexport var _DYN__DO_TEARDOWN = \"_doTeardown\"; // Count: 4\r\nexport var _DYN_UPDATE = \"update\"; // Count: 7\r\nexport var _DYN_GET_NEXT = \"getNext\"; // Count: 12\r\nexport var _DYN_SET_NEXT_PLUGIN = \"setNextPlugin\"; // Count: 5\r\nexport var _DYN_CREATE_NEW = \"createNew\"; // Count: 6\r\nexport var _DYN_CONFIG = \"config\"; // 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_ENABLE_DEBUG_EXCEPTI5 = \"enableDebugExceptions\"; // Count: 3\r\nexport var _DYN_LOG_INTERNAL_MESSAGE = \"logInternalMessage\"; // Count: 2\r\nexport var _DYN_TO_LOWER_CASE = \"toLowerCase\"; // Count: 8\r\nexport var _DYN_TYPE = \"type\"; // Count: 14\r\nexport var _DYN_HANDLER = \"handler\"; // Count: 5\r\nexport var _DYN_LISTENERS = \"listeners\"; // Count: 6\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\nexport var _DYN_VERSION = \"version\"; // Count: 4\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;AACA;AACA;AACA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2210-18
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
|
|
@@ -8,12 +8,12 @@ export { throwAggregationError } from "./JavaScriptSDK/AggregationError";
|
|
|
8
8
|
export { AppInsightsCore } from "./JavaScriptSDK/AppInsightsCore";
|
|
9
9
|
export { BaseTelemetryPlugin } from "./JavaScriptSDK/BaseTelemetryPlugin";
|
|
10
10
|
export { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from "./JavaScriptSDK/RandomHelper";
|
|
11
|
-
export { Undefined, newGuid,
|
|
12
|
-
export { normalizeJsName, toISOString,
|
|
13
|
-
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 } from "@nevware21/ts-utils";
|
|
11
|
+
export { Undefined, newGuid, generateW3CId } from "./JavaScriptSDK/CoreUtils";
|
|
12
|
+
export { normalizeJsName, toISOString, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend } from "./JavaScriptSDK/HelperFuncs";
|
|
13
|
+
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
14
|
export { createEnumStyle, createValueMap } from "./JavaScriptSDK.Enums/EnumHelperFuncs";
|
|
15
15
|
export { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, __getRegisteredEvents } from "./JavaScriptSDK/EventHelpers";
|
|
16
|
-
export { getCrypto, getMsCrypto, getLocation,
|
|
16
|
+
export { getCrypto, getMsCrypto, getLocation, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming } from "./JavaScriptSDK/EnvUtils";
|
|
17
17
|
export { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from "@microsoft/applicationinsights-shims";
|
|
18
18
|
export { NotificationManager } from "./JavaScriptSDK/NotificationManager";
|
|
19
19
|
export { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from "./JavaScriptSDK/PerfManager";
|
|
@@ -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,
|
|
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, objCreateFn as objCreate, 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 { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from \"./JavaScriptSDK/W3cTraceParent\";\r\nexport { createDynamicConfig, onConfigChange } from \"./Config/DynamicConfig\";\r\nexport { getDynamicConfigHandler } from \"./Config/DynamicSupport\";\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"}
|
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.0-beta.2210-
|
|
4
|
+
"version": "3.0.0-beta.2210-18",
|
|
5
5
|
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
6
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
7
|
"keywords": [
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
6
6
|
import {
|
|
7
|
-
arrAppend, arrForEach, arrIndexOf, deepExtend, dumpObj, isFunction, isNullOrUndefined, objDeepFreeze, objDefineProp,
|
|
8
|
-
objHasOwn, throwError
|
|
7
|
+
arrAppend, arrForEach, arrIndexOf, deepExtend, dumpObj, isFunction, isNullOrUndefined, isPlainObject, objDeepFreeze, objDefineProp,
|
|
8
|
+
objForEachKey, objFreeze, objHasOwn, throwError
|
|
9
9
|
} from "@nevware21/ts-utils";
|
|
10
10
|
import { createDynamicConfig, onConfigChange } from "../Config/DynamicConfig";
|
|
11
11
|
import { IConfigDefaults } from "../Config/IConfigDefaults";
|
|
@@ -41,7 +41,7 @@ import { createCookieMgr } from "./CookieMgr";
|
|
|
41
41
|
import { createUniqueNamespace } from "./DataCacheHelper";
|
|
42
42
|
import { getDebugListener } from "./DbgExtensionUtils";
|
|
43
43
|
import { DiagnosticLogger, _InternalLogMessage, _throwInternal, _warnToConsole } from "./DiagnosticLogger";
|
|
44
|
-
import { getSetValue,
|
|
44
|
+
import { getSetValue, proxyFunctionAs, proxyFunctions, toISOString } from "./HelperFuncs";
|
|
45
45
|
import {
|
|
46
46
|
STR_CHANNELS, STR_CREATE_PERF_MGR, STR_DISABLED, STR_EXTENSIONS, STR_EXTENSION_CONFIG, UNDEFINED_VALUE
|
|
47
47
|
} from "./InternalConstants";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// // Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
-
import { arrForEach, isArray, objFreeze, throwError } from "@nevware21/ts-utils";
|
|
4
|
+
import { ITimerHandler, arrForEach, isArray, objFreeze, scheduleTimeout, throwError } from "@nevware21/ts-utils";
|
|
5
5
|
import { SendRequestReason } from "../JavaScriptSDK.Enums/SendRequestReason";
|
|
6
6
|
import { TelemetryUnloadReason } from "../JavaScriptSDK.Enums/TelemetryUnloadReason";
|
|
7
7
|
import { TelemetryUpdateReason } from "../JavaScriptSDK.Enums/TelemetryUpdateReason";
|
|
@@ -193,17 +193,15 @@ export function createChannelControllerPlugin(channelQueue: _IInternalChannels[]
|
|
|
193
193
|
// Setting waiting to one so that we don't call the callBack until we finish iterating
|
|
194
194
|
let waiting = 1;
|
|
195
195
|
let doneIterating = false;
|
|
196
|
-
let cbTimer:
|
|
196
|
+
let cbTimer: ITimerHandler = null;
|
|
197
197
|
|
|
198
198
|
cbTimeout = cbTimeout || 5000;
|
|
199
199
|
|
|
200
200
|
function doCallback() {
|
|
201
201
|
waiting--;
|
|
202
202
|
if (doneIterating && waiting === 0) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
cbTimer = null;
|
|
206
|
-
}
|
|
203
|
+
cbTimer && cbTimer.cancel();
|
|
204
|
+
cbTimer = null;
|
|
207
205
|
|
|
208
206
|
callBack && callBack(doneIterating);
|
|
209
207
|
callBack = null;
|
|
@@ -226,7 +224,7 @@ export function createChannelControllerPlugin(channelQueue: _IInternalChannels[]
|
|
|
226
224
|
// will never be called, so use a timeout to allow the channel(s) some time to "finish" before triggering any
|
|
227
225
|
// followup function (such as unloading)
|
|
228
226
|
if (isAsync && cbTimer == null) {
|
|
229
|
-
cbTimer =
|
|
227
|
+
cbTimer = scheduleTimeout(() => {
|
|
230
228
|
cbTimer = null;
|
|
231
229
|
doCallback();
|
|
232
230
|
}, cbTimeout);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import {
|
|
4
|
-
arrForEach, dumpObj, getDocument, getNavigator, isArray, isFunction, isNullOrUndefined, isString, isTruthy, isUndefined,
|
|
5
|
-
objForEachKey, strEndsWith, strTrim
|
|
4
|
+
arrForEach, arrIndexOf, dumpObj, getDocument, getNavigator, isArray, isFunction, isNullOrUndefined, isString, isTruthy, isUndefined,
|
|
5
|
+
objDeepFreeze, objForEachKey, strEndsWith, strIndexOf, strLeft, strSubstring, strTrim, utcNow
|
|
6
6
|
} from "@nevware21/ts-utils";
|
|
7
7
|
import { createDynamicConfig, onConfigChange } from "../Config/DynamicConfig";
|
|
8
8
|
import { IConfigDefaults } from "../Config/IConfigDefaults";
|
|
@@ -13,7 +13,7 @@ import { ICookieMgr, ICookieMgrConfig } from "../JavaScriptSDK.Interfaces/ICooki
|
|
|
13
13
|
import { IDiagnosticLogger } from "../JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
14
14
|
import { _throwInternal } from "./DiagnosticLogger";
|
|
15
15
|
import { getLocation, isIE } from "./EnvUtils";
|
|
16
|
-
import {
|
|
16
|
+
import { getExceptionName, isNotNullOrUndefined, setValue, strContains } from "./HelperFuncs";
|
|
17
17
|
import { STR_DOMAIN, STR_EMPTY, STR_PATH, UNDEFINED_VALUE } from "./InternalConstants";
|
|
18
18
|
|
|
19
19
|
const strToGMTString = "toGMTString";
|
|
@@ -86,7 +86,7 @@ function _isMgrEnabled(cookieMgr: ICookieMgr) {
|
|
|
86
86
|
|
|
87
87
|
function _isIgnoredCookie(cookieMgrCfg: ICookieMgrConfig, name: string) {
|
|
88
88
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.ignoreCookies)) {
|
|
89
|
-
return cookieMgrCfg.ignoreCookies
|
|
89
|
+
return arrIndexOf(cookieMgrCfg.ignoreCookies, name) !== -1;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
return false;
|
|
@@ -94,7 +94,7 @@ function _isIgnoredCookie(cookieMgrCfg: ICookieMgrConfig, name: string) {
|
|
|
94
94
|
|
|
95
95
|
function _isBlockedCookie(cookieMgrCfg: ICookieMgrConfig, name: string) {
|
|
96
96
|
if (name && cookieMgrCfg && isArray(cookieMgrCfg.blockedCookies)) {
|
|
97
|
-
if (cookieMgrCfg.blockedCookies
|
|
97
|
+
if (arrIndexOf(cookieMgrCfg.blockedCookies, name) !== -1) {
|
|
98
98
|
return true;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -206,10 +206,10 @@ export function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosti
|
|
|
206
206
|
if (_isMgrEnabled(cookieMgr) && !_isBlockedCookie(cookieMgrConfig, name)) {
|
|
207
207
|
let values: any = {};
|
|
208
208
|
let theValue = strTrim(value || STR_EMPTY);
|
|
209
|
-
let idx = theValue
|
|
209
|
+
let idx = strIndexOf(theValue, ";");
|
|
210
210
|
if (idx !== -1) {
|
|
211
|
-
theValue = strTrim(value
|
|
212
|
-
values = _extractParts(value
|
|
211
|
+
theValue = strTrim(strLeft(value, idx));
|
|
212
|
+
values = _extractParts(strSubstring(value, idx + 1));
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// Only update domain if not already present (isUndefined) and the value is truthy (not null, undefined or empty string)
|
|
@@ -218,7 +218,7 @@ export function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosti
|
|
|
218
218
|
if (!isNullOrUndefined(maxAgeSec)) {
|
|
219
219
|
const _isIE = isIE();
|
|
220
220
|
if (isUndefined(values[strExpires])) {
|
|
221
|
-
const nowMs =
|
|
221
|
+
const nowMs = utcNow();
|
|
222
222
|
// Only add expires if not already present
|
|
223
223
|
let expireMs = nowMs + (maxAgeSec * 1000);
|
|
224
224
|
|
|
@@ -337,11 +337,11 @@ function _extractParts(theValue: string) {
|
|
|
337
337
|
arrForEach(parts, (thePart) => {
|
|
338
338
|
thePart = strTrim(thePart || STR_EMPTY);
|
|
339
339
|
if (thePart) {
|
|
340
|
-
let idx = thePart
|
|
340
|
+
let idx = strIndexOf(thePart, "=");
|
|
341
341
|
if (idx === -1) {
|
|
342
342
|
values[thePart] = null;
|
|
343
343
|
} else {
|
|
344
|
-
values[strTrim(thePart
|
|
344
|
+
values[strTrim(strLeft(thePart, idx))] = strTrim(strSubstring(thePart, idx + 1));
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
});
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
import { strShimUndefined } from "@microsoft/applicationinsights-shims";
|
|
5
5
|
import { strSubstr, strSubstring } from "@nevware21/ts-utils";
|
|
6
|
-
import { getPerformance } from "./EnvUtils";
|
|
7
|
-
import { dateNow } from "./HelperFuncs";
|
|
8
6
|
import { STR_EMPTY } from "./InternalConstants";
|
|
9
7
|
import { random32 } from "./RandomHelper";
|
|
10
8
|
|
|
@@ -17,19 +15,6 @@ export function newGuid(): string {
|
|
|
17
15
|
return strSubstring(uuid, 0, 8) + "-" + strSubstring(uuid, 8, 12) + "-" + strSubstring(uuid, 12, 16) + "-" + strSubstring(uuid, 16, 20) + "-" + strSubstring(uuid, 20);
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
/**
|
|
21
|
-
* Return the current value of the Performance Api now() function (if available) and fallback to dateNow() if it is unavailable (IE9 or less)
|
|
22
|
-
* https://caniuse.com/#search=performance.now
|
|
23
|
-
*/
|
|
24
|
-
export function perfNow(): number {
|
|
25
|
-
let perf = getPerformance();
|
|
26
|
-
if (perf && perf.now) {
|
|
27
|
-
return perf.now();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return dateNow();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
18
|
/**
|
|
34
19
|
* The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
|
35
20
|
* @param value - The value to check whether it ends with the search value.
|
|
@@ -5,8 +5,9 @@ import { getInst } from "@nevware21/ts-utils";
|
|
|
5
5
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
6
6
|
import { IDbgExtension } from "../JavaScriptSDK.Interfaces/IDbgExtension";
|
|
7
7
|
import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
|
|
8
|
+
import { STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_EVENTS_SENT, STR_PERF_EVENT } from "./InternalConstants";
|
|
8
9
|
|
|
9
|
-
const listenerFuncs = [
|
|
10
|
+
const listenerFuncs = [ STR_EVENTS_SENT, STR_EVENTS_DISCARDED, STR_EVENTS_SEND_REQUEST, STR_PERF_EVENT ];
|
|
10
11
|
|
|
11
12
|
let _aiNamespace: any = null;
|
|
12
13
|
let _debugListener: INotificationListener;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
|
|
5
5
|
import { strShimObject, strShimPrototype, strShimUndefined } from "@microsoft/applicationinsights-shims";
|
|
6
|
-
import { getDocument, getInst, getNavigator, hasNavigator, isString, isUndefined } from "@nevware21/ts-utils";
|
|
6
|
+
import { getDocument, getInst, getNavigator, getPerformance, hasNavigator, isString, isUndefined, strIndexOf } from "@nevware21/ts-utils";
|
|
7
7
|
import { strContains } from "./HelperFuncs";
|
|
8
8
|
import { STR_EMPTY } from "./InternalConstants";
|
|
9
9
|
|
|
@@ -102,15 +102,6 @@ export function getConsole(): Console | null {
|
|
|
102
102
|
return getInst(strConsole);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
* Returns the performance object if it is present otherwise null.
|
|
107
|
-
* This helper is used to access the performance object from the current
|
|
108
|
-
* global instance which could be window or globalThis for a web worker
|
|
109
|
-
*/
|
|
110
|
-
export function getPerformance(): Performance | null {
|
|
111
|
-
return getInst(strPerformance);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
105
|
/**
|
|
115
106
|
* Checks if JSON object is available, this is required as we support the API running without a
|
|
116
107
|
* window /document (eg. Node server, electron webworkers) and if we attempt to assign a history
|
|
@@ -212,7 +203,7 @@ export function isSafari(userAgentStr ?: string) {
|
|
|
212
203
|
}
|
|
213
204
|
|
|
214
205
|
var ua = (userAgentStr || STR_EMPTY).toLowerCase();
|
|
215
|
-
return (ua
|
|
206
|
+
return (strIndexOf(ua, "safari") >= 0);
|
|
216
207
|
}
|
|
217
208
|
|
|
218
209
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { arrForEach, arrIndexOf, getDocument, getWindow, isArray, objKeys } from "@nevware21/ts-utils";
|
|
3
|
+
import { arrForEach, arrIndexOf, getDocument, getWindow, isArray, objForEachKey, objKeys } from "@nevware21/ts-utils";
|
|
4
4
|
import { createElmNodeData, createUniqueNamespace } from "./DataCacheHelper";
|
|
5
|
-
import { objForEachKey } from "./HelperFuncs";
|
|
6
5
|
import { STR_EMPTY } from "./InternalConstants";
|
|
7
6
|
|
|
8
7
|
// Added to help with minfication
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { ObjAssign, ObjClass
|
|
3
|
+
import { ObjAssign, ObjClass } from "@microsoft/applicationinsights-shims";
|
|
4
4
|
import {
|
|
5
|
-
arrForEach, asString as asString21, isArray, isBoolean, isError, isFunction, isNullOrUndefined, isObject,
|
|
6
|
-
objDeepFreeze, objDefineAccessors, objForEachKey
|
|
5
|
+
arrForEach, asString as asString21, isArray, isBoolean, isError, isFunction, isNullOrUndefined, isObject, isPlainObject, isString,
|
|
6
|
+
isUndefined, objDeepFreeze, objDefineAccessors, objForEachKey, objHasOwn, strIndexOf
|
|
7
7
|
} from "@nevware21/ts-utils";
|
|
8
8
|
import { STR_EMPTY } from "./InternalConstants";
|
|
9
9
|
|
|
@@ -62,14 +62,6 @@ export function normalizeJsName(name: string): string {
|
|
|
62
62
|
return value;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
* This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
|
|
67
|
-
* performance optimization to avoid the creation of a new array for large objects
|
|
68
|
-
* @param target - The target object to find and process the keys
|
|
69
|
-
* @param callbackfn - The function to call with the details
|
|
70
|
-
*/
|
|
71
|
-
export const objForEachKey = objForEachKey21;
|
|
72
|
-
|
|
73
65
|
/**
|
|
74
66
|
* A simple wrapper (for minification support) to check if the value contains the search string.
|
|
75
67
|
* @param value - The string value to check for the existence of the search value
|
|
@@ -83,32 +75,6 @@ export function strContains(value: string, search: string): boolean {
|
|
|
83
75
|
return false;
|
|
84
76
|
}
|
|
85
77
|
|
|
86
|
-
/**
|
|
87
|
-
* Checks if the type of the value is a normal plain object (not a null or data)
|
|
88
|
-
* @param value
|
|
89
|
-
*/
|
|
90
|
-
export function isPlainObject(value: any): boolean {
|
|
91
|
-
let result: boolean = false;
|
|
92
|
-
|
|
93
|
-
if (value && typeof value === "object") {
|
|
94
|
-
// Inlining _objGetPrototypeOf for performance to avoid an additional function call
|
|
95
|
-
let proto = _getObjProto(value);
|
|
96
|
-
if (!proto) {
|
|
97
|
-
// No prototype found so this is a plain Object eg. 'Object.create(null)'
|
|
98
|
-
result = true;
|
|
99
|
-
} else {
|
|
100
|
-
// Objects that have a prototype are plain only if they were created using the Object global (native) function
|
|
101
|
-
if (proto[strConstructor] && objHasOwnProperty(proto, strConstructor)) {
|
|
102
|
-
proto = proto[strConstructor];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
result = typeof proto === strShimFunction && _fnToString.call(proto) === _objFunctionString;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return result;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
78
|
/**
|
|
113
79
|
* Convert a date to I.S.O. format in IE8
|
|
114
80
|
*/
|
|
@@ -118,16 +84,6 @@ export function toISOString(date: Date) {
|
|
|
118
84
|
|
|
119
85
|
export const deepFreeze: <T>(obj: T) => T = objDeepFreeze;
|
|
120
86
|
|
|
121
|
-
/**
|
|
122
|
-
* Return the current time via the Date now() function (if available) and falls back to (new Date()).getTime() if now() is unavailable (IE8 or less)
|
|
123
|
-
* https://caniuse.com/#search=Date.now
|
|
124
|
-
*/
|
|
125
|
-
export function dateNow() {
|
|
126
|
-
let dt = Date;
|
|
127
|
-
|
|
128
|
-
return dt.now ? dt.now() : new dt().getTime();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
87
|
/**
|
|
132
88
|
* Returns the name of object if it's an Error. Otherwise, returns empty string.
|
|
133
89
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
4
|
-
import { arrForEach, arrIndexOf } from "@nevware21/ts-utils";
|
|
4
|
+
import { arrForEach, arrIndexOf, scheduleTimeout } from "@nevware21/ts-utils";
|
|
5
5
|
import { createDynamicConfig } from "../Config/DynamicConfig";
|
|
6
6
|
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
7
7
|
import { INotificationListener } from "../JavaScriptSDK.Interfaces/INotificationListener";
|
|
@@ -18,7 +18,7 @@ function _runListeners(listeners: INotificationListener[], name: string, isAsync
|
|
|
18
18
|
arrForEach(listeners, (listener) => {
|
|
19
19
|
if (listener && listener[name]) {
|
|
20
20
|
if (isAsync) {
|
|
21
|
-
|
|
21
|
+
scheduleTimeout(() => callback(listener), 0);
|
|
22
22
|
} else {
|
|
23
23
|
try {
|
|
24
24
|
callback(listener);
|
|
@@ -102,7 +102,7 @@ export class NotificationManager implements INotificationManager {
|
|
|
102
102
|
if (perfEvtsSendAll || !perfEvent.isChildEvt()) {
|
|
103
103
|
_runListeners(_self.listeners, STR_PERF_EVENT, false, (listener) => {
|
|
104
104
|
if (perfEvent.isAsync) {
|
|
105
|
-
|
|
105
|
+
scheduleTimeout(() => listener.perfEvent(perfEvent), 0);
|
|
106
106
|
} else {
|
|
107
107
|
listener.perfEvent(perfEvent);
|
|
108
108
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
4
|
-
import { isArray, isFunction, objDefineAccessors } from "@nevware21/ts-utils";
|
|
4
|
+
import { isArray, isFunction, objDefineAccessors, utcNow } from "@nevware21/ts-utils";
|
|
5
5
|
import { INotificationManager } from "../JavaScriptSDK.Interfaces/INotificationManager";
|
|
6
6
|
import { IPerfEvent } from "../JavaScriptSDK.Interfaces/IPerfEvent";
|
|
7
7
|
import { IPerfManager, IPerfManagerProvider } from "../JavaScriptSDK.Interfaces/IPerfManager";
|
|
8
|
-
import { dateNow } from "./HelperFuncs";
|
|
9
8
|
import { STR_GET_PERF_MGR } from "./InternalConstants";
|
|
10
9
|
|
|
11
10
|
const strExecutionContextKey = "ctx";
|
|
@@ -64,7 +63,7 @@ export class PerfEvent implements IPerfEvent {
|
|
|
64
63
|
|
|
65
64
|
constructor(name: string, payloadDetails: () => any, isAsync: boolean) {
|
|
66
65
|
let _self = this;
|
|
67
|
-
_self.start =
|
|
66
|
+
_self.start = utcNow();
|
|
68
67
|
_self.name = name;
|
|
69
68
|
_self.isAsync = isAsync;
|
|
70
69
|
_self.isChildEvt = (): boolean => false;
|
|
@@ -127,7 +126,7 @@ export class PerfEvent implements IPerfEvent {
|
|
|
127
126
|
}
|
|
128
127
|
}
|
|
129
128
|
|
|
130
|
-
_self.time =
|
|
129
|
+
_self.time = utcNow() - _self.start;
|
|
131
130
|
_self.exTime = _self.time - childTime;
|
|
132
131
|
_self.complete = () => {};
|
|
133
132
|
};
|