@microsoft/applicationinsights-core-js 3.0.0-beta.2302-03 → 3.0.0-beta.2302-05
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 +286 -180
- 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 +757 -33
- package/dist/applicationinsights-core-js.api.md +24 -3
- package/dist/applicationinsights-core-js.d.ts +76 -4
- package/dist/applicationinsights-core-js.js +286 -180
- 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 +76 -4
- package/dist-esm/Config/ConfigDefaultHelpers.js +103 -0
- package/dist-esm/Config/ConfigDefaultHelpers.js.map +1 -0
- package/dist-esm/Config/ConfigDefaults.js +81 -11
- package/dist-esm/Config/ConfigDefaults.js.map +1 -1
- package/dist-esm/Config/DynamicConfig.js +3 -3
- package/dist-esm/Config/DynamicConfig.js.map +1 -1
- package/dist-esm/Config/DynamicProperty.js +1 -1
- package/dist-esm/Config/DynamicState.js +3 -3
- package/dist-esm/Config/DynamicState.js.map +1 -1
- package/dist-esm/Config/DynamicSupport.js +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 +2 -2
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +17 -15
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +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 +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +3 -3
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +1 -10
- 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 +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +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/UnloadHookContainer.js +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +6 -5
- 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 +6 -5
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +2 -1
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/CookieMgr.ts +14 -13
- package/src/JavaScriptSDK/HelperFuncs.ts +0 -11
- package/types/Config/ConfigDefaultHelpers.d.ts +47 -0
- package/types/Config/ConfigDefaults.d.ts +1 -2
- package/types/Config/IConfigDefaults.d.ts +24 -3
- package/types/__DynamicConstants.d.ts +2 -1
- package/types/applicationinsights-core-js.d.ts +1 -0
- package/types/tsdoc-metadata.json +1 -1
|
@@ -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_LENGTH = \"length\"; // 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: 38\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: 12\r\nexport var _DYN_LOGGER = \"logger\"; // Count: 21\r\nexport var _DYN_CONFIGURABLE = \"configurable\"; // Count: 6\r\nexport var _DYN_ENUMERABLE = \"enumerable\"; // Count: 6\r\nexport var _DYN_APPLY = \"apply\"; // Count: 7\r\nexport var _DYN_PUSH = \"push\"; // Count: 31\r\nexport var _DYN_SPLICE = \"splice\"; // Count: 6\r\nexport var _DYN_CANCEL = \"cancel\"; // Count: 4\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_STOP_POLLING_INTERNA3 = \"stopPollingInternalLogs\"; // Count: 2\r\nexport var _DYN_ON_COMPLETE = \"onComplete\"; // Count: 3\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: 9\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_ENABLE_DEBUG_EXCEPTI5 = \"enableDebugExceptions\"; // Count: 3\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_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\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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 3.0.0-beta.2302-05
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
|
|
@@ -32,4 +32,5 @@ export { createUnloadHookContainer } from "./JavaScriptSDK/UnloadHookContainer";
|
|
|
32
32
|
export { createTraceParent, parseTraceParent, isValidTraceId, isValidSpanId, isValidTraceParent, isSampledFlag, formatTraceParent, findW3cTraceParent } from "./JavaScriptSDK/W3cTraceParent";
|
|
33
33
|
export { createDynamicConfig, onConfigChange } from "./Config/DynamicConfig";
|
|
34
34
|
export { getDynamicConfigHandler } from "./Config/DynamicSupport";
|
|
35
|
+
export { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet } from "./Config/ConfigDefaultHelpers";
|
|
35
36
|
//# sourceMappingURL=applicationinsights-core-js.js.map
|
|
@@ -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, 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 { 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 } 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;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 { 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 { 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 } 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"}
|
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.2302-
|
|
4
|
+
"version": "3.0.0-beta.2302-05",
|
|
5
5
|
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
6
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
7
|
"keywords": [
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@microsoft/applicationinsights-shims": "2.0.2",
|
|
68
68
|
"@microsoft/dynamicproto-js": "^1.1.7",
|
|
69
|
-
"@nevware21/ts-utils": "
|
|
69
|
+
"@nevware21/ts-utils": ">= 0.7 < 2.x"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"tag": "beta"
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import {
|
|
4
4
|
arrForEach, arrIndexOf, dumpObj, getDocument, getNavigator, isArray, isFunction, isNullOrUndefined, isString, isTruthy, isUndefined,
|
|
5
|
-
|
|
5
|
+
objForEachKey, strEndsWith, strIndexOf, strLeft, strSubstring, strTrim, utcNow
|
|
6
6
|
} from "@nevware21/ts-utils";
|
|
7
|
+
import { cfgDfMerge } from "../Config/ConfigDefaultHelpers";
|
|
7
8
|
import { createDynamicConfig, onConfigChange } from "../Config/DynamicConfig";
|
|
8
9
|
import { IConfigDefaults } from "../Config/IConfigDefaults";
|
|
9
10
|
import { _eInternalMessageId, eLoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
@@ -31,15 +32,9 @@ let _doc = getDocument();
|
|
|
31
32
|
let _cookieCache = {};
|
|
32
33
|
let _globalCookieConfig = {};
|
|
33
34
|
|
|
34
|
-
// `isCookieUseDisabled` is deprecated, so explicitly casting as a key of IConfiguration to avoid typing error
|
|
35
|
-
// when both isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent, which is
|
|
36
|
-
// why its listed first
|
|
37
|
-
|
|
38
|
-
const defaultConfig: IConfigDefaults<ICookieMgrConfig> = objDeepFreeze({
|
|
39
|
-
[STR_DOMAIN]: { fb: "cookieDomain", dfVal: isNotNullOrUndefined },
|
|
40
|
-
path: { fb: "cookiePath", dfVal: isNotNullOrUndefined },
|
|
41
|
-
enabled: UNDEFINED_VALUE
|
|
42
|
-
});
|
|
35
|
+
// // `isCookieUseDisabled` is deprecated, so explicitly casting as a key of IConfiguration to avoid typing error
|
|
36
|
+
// // when both isCookieUseDisabled and disableCookiesUsage are used disableCookiesUsage will take precedent, which is
|
|
37
|
+
// // why its listed first
|
|
43
38
|
|
|
44
39
|
/**
|
|
45
40
|
* Set the supported dynamic config values as undefined (or an empty object) so that
|
|
@@ -47,8 +42,14 @@ const defaultConfig: IConfigDefaults<ICookieMgrConfig> = objDeepFreeze({
|
|
|
47
42
|
* Explicitly NOT including the deprecated `isCookieUseDisabled` as we don't want to support
|
|
48
43
|
* the v1 deprecated field as dynamic for updates
|
|
49
44
|
*/
|
|
50
|
-
const rootDefaultConfig = {
|
|
51
|
-
cookieCfg: {
|
|
45
|
+
const rootDefaultConfig: IConfigDefaults<IConfiguration> = {
|
|
46
|
+
cookieCfg: cfgDfMerge<ICookieMgrConfig>({
|
|
47
|
+
[STR_DOMAIN]: { fb: "cookieDomain", dfVal: isNotNullOrUndefined },
|
|
48
|
+
path: { fb: "cookiePath", dfVal: isNotNullOrUndefined },
|
|
49
|
+
enabled: UNDEFINED_VALUE,
|
|
50
|
+
ignoreCookies: UNDEFINED_VALUE,
|
|
51
|
+
blockedCookies: UNDEFINED_VALUE
|
|
52
|
+
}),
|
|
52
53
|
cookieDomain: UNDEFINED_VALUE,
|
|
53
54
|
cookiePath: UNDEFINED_VALUE,
|
|
54
55
|
[strDisableCookiesUsage]: UNDEFINED_VALUE
|
|
@@ -152,7 +153,7 @@ export function createCookieMgr(rootConfig?: IConfiguration, logger?: IDiagnosti
|
|
|
152
153
|
details.setDf(details.cfg, rootDefaultConfig);
|
|
153
154
|
|
|
154
155
|
// Create and apply the defaults to the cookieCfg element
|
|
155
|
-
cookieMgrConfig =
|
|
156
|
+
cookieMgrConfig = details.ref(details.cfg, "cookieCfg"); // details.setDf(details.cfg.cookieCfg, defaultConfig);
|
|
156
157
|
let isEnabled = cookieMgrConfig.enabled;
|
|
157
158
|
if (isNullOrUndefined(isEnabled)) {
|
|
158
159
|
// Set the enabled from the provided setting or the legacy root values
|
|
@@ -10,19 +10,8 @@ import { STR_EMPTY } from "./InternalConstants";
|
|
|
10
10
|
// RESTRICT and AVOID circular dependencies you should not import other contained modules or export the contents of this file directly
|
|
11
11
|
|
|
12
12
|
// Added to help with minification
|
|
13
|
-
const strToString = "toString";
|
|
14
13
|
const strGetPrototypeOf = "getPrototypeOf";
|
|
15
14
|
|
|
16
|
-
/**
|
|
17
|
-
* Constant string defined to support minimization
|
|
18
|
-
* @ignore
|
|
19
|
-
*/
|
|
20
|
-
const strConstructor = "constructor";
|
|
21
|
-
|
|
22
|
-
const _fnToString = ObjClass[strToString];
|
|
23
|
-
// Cache what this browser reports as the object function constructor (as a string)
|
|
24
|
-
const _objFunctionString = _fnToString.call(ObjClass);
|
|
25
|
-
|
|
26
15
|
const rCamelCase = /-([a-z])/g;
|
|
27
16
|
const rNormalizeInvalid = /([^\w\d_$])/g;
|
|
28
17
|
const rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IConfiguration } from "../applicationinsights-core-js";
|
|
2
|
+
import { IConfigCheckFn, IConfigDefaultCheck, IConfigDefaults, IConfigSetFn } from "./IConfigDefaults";
|
|
3
|
+
/**
|
|
4
|
+
* Helper which returns an IConfigDefaultCheck instance with the provided field validator
|
|
5
|
+
* @param validator - The IConfigCheckFn function to validate the user provided value
|
|
6
|
+
* @param defaultValue - The default value to apply it not provided or it's not valid
|
|
7
|
+
* @returns a new IConfigDefaultCheck structure
|
|
8
|
+
*/
|
|
9
|
+
export declare function cfgDfMerge<V, T = IConfiguration, C = IConfiguration>(defaultValue: V | IConfigDefaults<V, T>): IConfigDefaultCheck<T, V, C>;
|
|
10
|
+
/**
|
|
11
|
+
* Helper which returns an IConfigDefaultCheck instance with the provided field set function
|
|
12
|
+
* @param setter - The IConfigCheckFn function to validate the user provided value
|
|
13
|
+
* @param defaultValue - The default value to apply it not provided or it's not valid
|
|
14
|
+
* @returns a new IConfigDefaultCheck structure
|
|
15
|
+
*/
|
|
16
|
+
export declare function cfgDfSet<V, T, C = IConfiguration>(setter: IConfigSetFn<T, V>, defaultValue: V): IConfigDefaultCheck<T, V, C>;
|
|
17
|
+
/**
|
|
18
|
+
* Helper which returns an IConfigDefaultCheck instance with the provided field validator
|
|
19
|
+
* @param validator - The IConfigCheckFn function to validate the user provided value
|
|
20
|
+
* @param defaultValue - The default value to apply it not provided or it's not valid
|
|
21
|
+
* @param fallBackName - The fallback configuration name if the current value is not available
|
|
22
|
+
* @returns a new IConfigDefaultCheck structure
|
|
23
|
+
*/
|
|
24
|
+
export declare function cfgDfValidate<V, T, C = IConfiguration>(validator: IConfigCheckFn<V>, defaultValue: V, fallBackName?: keyof T | keyof C | Array<keyof T | keyof C>): IConfigDefaultCheck<T, V, C>;
|
|
25
|
+
/**
|
|
26
|
+
* Helper which returns an IConfigDefaultCheck instance that will validate and convert the user
|
|
27
|
+
* provided value to a boolean from a string or boolean value
|
|
28
|
+
* @param validator - The IConfigCheckFn function to validate the user provided value
|
|
29
|
+
* @param defaultValue - The default value to apply it not provided or it's not valid
|
|
30
|
+
* @param fallBackName - The fallback configuration name if the current value is not available
|
|
31
|
+
* @returns a new IConfigDefaultCheck structure
|
|
32
|
+
*/
|
|
33
|
+
export declare function cfgDfBoolean<T, C = IConfiguration>(defaultValue?: boolean, fallBackName?: keyof T | keyof C | Array<keyof T | keyof C>): IConfigDefaultCheck<T, boolean, C>;
|
|
34
|
+
/**
|
|
35
|
+
* Helper which returns an IConfigDefaultCheck instance that will validate that the user
|
|
36
|
+
* provided value is a function.
|
|
37
|
+
* @param defaultValue - The default value to apply it not provided or it's not valid
|
|
38
|
+
* @returns a new IConfigDefaultCheck structure
|
|
39
|
+
*/
|
|
40
|
+
export declare function cfgDfFunc<V, T, C = IConfiguration>(defaultValue?: V): IConfigDefaultCheck<T, V, C>;
|
|
41
|
+
/**
|
|
42
|
+
* Helper which returns an IConfigDefaultCheck instance that will validate that the user
|
|
43
|
+
* provided value is a function.
|
|
44
|
+
* @param defaultValue - The default string value to apply it not provided or it's not valid, defaults to an empty string
|
|
45
|
+
* @returns a new IConfigDefaultCheck structure
|
|
46
|
+
*/
|
|
47
|
+
export declare function cfgDfString<T, C = IConfiguration>(defaultValue?: string): IConfigDefaultCheck<T, string, C>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IConfiguration } from "../JavaScriptSDK.Interfaces/IConfiguration";
|
|
2
1
|
import { IConfigDefaultCheck } from "./IConfigDefaults";
|
|
3
2
|
import { IDynamicConfigHandler } from "./IDynamicConfigHandler";
|
|
4
3
|
/**
|
|
@@ -7,4 +6,4 @@ import { IDynamicConfigHandler } from "./IDynamicConfigHandler";
|
|
|
7
6
|
* @param name
|
|
8
7
|
* @param defaultValue
|
|
9
8
|
*/
|
|
10
|
-
export declare function _applyDefaultValue<T
|
|
9
|
+
export declare function _applyDefaultValue<T, C>(dynamicHandler: IDynamicConfigHandler<T>, theConfig: C, name: string, defaultValue: C[keyof C] | IConfigDefaultCheck<C, C[keyof C], T>): void;
|
|
@@ -10,7 +10,7 @@ export type IConfigSetFn<T, V> = (value: any, defValue: V, theConfig: T) => V;
|
|
|
10
10
|
/**
|
|
11
11
|
* The default values with a check function
|
|
12
12
|
*/
|
|
13
|
-
export interface IConfigDefaultCheck<T, V, C
|
|
13
|
+
export interface IConfigDefaultCheck<T, V, C = IConfiguration> {
|
|
14
14
|
/**
|
|
15
15
|
* Callback function to check if the user-supplied value is valid, if not the default will be applied
|
|
16
16
|
*/
|
|
@@ -22,7 +22,7 @@ export interface IConfigDefaultCheck<T, V, C extends IConfiguration = IConfigura
|
|
|
22
22
|
/**
|
|
23
23
|
* The default value to apply if the user-supplied value is not valid
|
|
24
24
|
*/
|
|
25
|
-
v?: V
|
|
25
|
+
v?: V | IConfigDefaults<V, T>;
|
|
26
26
|
/**
|
|
27
27
|
* The default fallback key if the main key is not present, this is the key value from the config
|
|
28
28
|
*/
|
|
@@ -32,11 +32,32 @@ export interface IConfigDefaultCheck<T, V, C extends IConfiguration = IConfigura
|
|
|
32
32
|
* therefore `null`; `""` are considered to be valid values.
|
|
33
33
|
*/
|
|
34
34
|
dfVal?: (value: any) => boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Specify that any provided value should have the default value(s) merged into the value rather than
|
|
37
|
+
* just using either the default of user provided values. Mergeed objects will automatically be marked
|
|
38
|
+
* as referenced.
|
|
39
|
+
*/
|
|
40
|
+
mrg?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Set this field of the target as referenced, which will cause any object or array instance
|
|
43
|
+
* to be updated in-place rather than being entirely replaced. All other values will continue to be replaced.
|
|
44
|
+
* This is required for nested default objects to avoid multiple repetitive updates to listeners
|
|
45
|
+
* @returns The referenced properties current value
|
|
46
|
+
*/
|
|
47
|
+
ref?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Set this field of the target as read-only, which will block this single named property from
|
|
50
|
+
* ever being changed for the target instance.
|
|
51
|
+
* This does NOT freeze or seal the instance, it just stops the direct re-assignment of the named property,
|
|
52
|
+
* if the value is a non-primitive (ie. an object or array) it's properties will still be mutable.
|
|
53
|
+
* @returns The referenced properties current value
|
|
54
|
+
*/
|
|
55
|
+
rdOnly?: boolean;
|
|
35
56
|
}
|
|
36
57
|
/**
|
|
37
58
|
* The Type definition to define default values to be applied to the config
|
|
38
59
|
* The value may be either the direct value or a ConfigDefaultCheck definition
|
|
39
60
|
*/
|
|
40
|
-
export type IConfigDefaults<T, C
|
|
61
|
+
export type IConfigDefaults<T, C = IConfiguration> = {
|
|
41
62
|
[key in keyof T]: T[key] | IConfigDefaultCheck<T, T[key], C>;
|
|
42
63
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
export declare const _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
1
2
|
export declare const _DYN_LENGTH = "length";
|
|
3
|
+
export declare const _DYN_RD_ONLY = "rdOnly";
|
|
2
4
|
export declare const _DYN_NOTIFY = "notify";
|
|
3
5
|
export declare const _DYN_THROW_INTERNAL = "throwInternal";
|
|
4
6
|
export declare const _DYN_SET_DF = "setDf";
|
|
@@ -42,7 +44,6 @@ export declare const _DYN_NODE_TYPE = "nodeType";
|
|
|
42
44
|
export declare const _DYN_REPLACE = "replace";
|
|
43
45
|
export declare const _DYN_ENABLE_DEBUG_EXCEPTI5 = "enableDebugExceptions";
|
|
44
46
|
export declare const _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
|
|
45
|
-
export declare const _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
46
47
|
export declare const _DYN_TYPE = "type";
|
|
47
48
|
export declare const _DYN_HANDLER = "handler";
|
|
48
49
|
export declare const _DYN_LISTENERS = "listeners";
|
|
@@ -54,3 +54,4 @@ export { IDynamicPropertyHandler } from "./Config/IDynamicPropertyHandler";
|
|
|
54
54
|
export { IWatchDetails, IWatcherHandler, WatcherFunction } from "./Config/IDynamicWatcher";
|
|
55
55
|
export { createDynamicConfig, onConfigChange } from "./Config/DynamicConfig";
|
|
56
56
|
export { getDynamicConfigHandler } from "./Config/DynamicSupport";
|
|
57
|
+
export { cfgDfValidate, cfgDfMerge, cfgDfBoolean, cfgDfFunc, cfgDfString, cfgDfSet } from "./Config/ConfigDefaultHelpers";
|