@microsoft/applicationinsights-core-js 2.8.0-beta.2203-10 → 2.8.0-beta.2203-11
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 +35 -10
- 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 +493 -58
- package/dist/applicationinsights-core-js.api.md +42 -23
- package/dist/applicationinsights-core-js.d.ts +47 -22
- package/dist/applicationinsights-core-js.js +35 -10
- 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 +48 -23
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +11 -9
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +1 -1
- package/dist-esm/JavaScriptSDK/Constants.js +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +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 +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -6
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +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 +29 -2
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.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/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/IUnloadableComponent.js +6 -0
- package/dist-esm/JavaScriptSDK.Interfaces/IUnloadableComponent.js.map +1 -0
- package/dist-esm/applicationinsights-core-js.js +3 -3
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +2 -2
- package/src/JavaScriptSDK/BaseCore.ts +22 -20
- package/src/JavaScriptSDK/ChannelController.ts +1 -1
- package/src/JavaScriptSDK/DataCacheHelper.ts +1 -1
- package/src/JavaScriptSDK/EventHelpers.ts +13 -17
- package/src/JavaScriptSDK/HelperFuncs.ts +7 -7
- package/src/JavaScriptSDK/InstrumentHooks.ts +1 -1
- package/src/JavaScriptSDK/PerfManager.ts +1 -1
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +6 -6
- package/src/JavaScriptSDK/TelemetryHelpers.ts +34 -2
- package/src/JavaScriptSDK.Interfaces/IProcessTelemetryContext.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/ITelemetryUpdateState.ts +1 -1
- package/src/JavaScriptSDK.Interfaces/IUnloadableComponent.ts +17 -0
- package/types/JavaScriptSDK/EventHelpers.d.ts +10 -10
- package/types/JavaScriptSDK/HelperFuncs.d.ts +7 -7
- package/types/JavaScriptSDK/PerfManager.d.ts +1 -1
- package/types/JavaScriptSDK/ProcessTelemetryContext.d.ts +2 -2
- package/types/JavaScriptSDK/TelemetryHelpers.d.ts +13 -1
- package/types/JavaScriptSDK.Interfaces/IProcessTelemetryContext.d.ts +1 -1
- package/types/JavaScriptSDK.Interfaces/IUnloadableComponent.d.ts +13 -0
- package/types/applicationinsights-core-js.d.ts +4 -3
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IPlugin } from "../JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
2
|
-
import { IProcessTelemetryContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
2
|
+
import { IProcessTelemetryContext, IProcessTelemetryUnloadContext } from "../JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
3
3
|
import { IAppInsightsCore } from "../JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
4
|
+
import { IUnloadableComponent } from "../JavaScriptSDK.Interfaces/IUnloadableComponent";
|
|
5
|
+
import { ITelemetryUnloadState } from "../JavaScriptSDK.Interfaces/ITelemetryUnloadState";
|
|
4
6
|
export interface IPluginState {
|
|
5
7
|
core?: IAppInsightsCore;
|
|
6
8
|
isInitialized?: boolean;
|
|
@@ -17,3 +19,13 @@ export declare function _getPluginState(plugin: IPlugin): IPluginState;
|
|
|
17
19
|
*/
|
|
18
20
|
export declare function initializePlugins(processContext: IProcessTelemetryContext, extensions: IPlugin[]): void;
|
|
19
21
|
export declare function sortPlugins<T = IPlugin>(plugins: T[]): T[];
|
|
22
|
+
/**
|
|
23
|
+
* Teardown / Unload helper to perform teardown/unloading operations for the provided components synchronously or asynchronously, this will call any
|
|
24
|
+
* _doTeardown() or _doUnload() functions on the provided components to allow them to finish removal.
|
|
25
|
+
* @param components - The components you want to unload
|
|
26
|
+
* @param unloadCtx - This is the context that should be used during unloading.
|
|
27
|
+
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
28
|
+
* @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
|
|
29
|
+
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
30
|
+
*/
|
|
31
|
+
export declare function unloadComponents(components: any | IUnloadableComponent[], unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void): void | boolean;
|
|
@@ -61,7 +61,7 @@ export interface IBaseProcessingContext {
|
|
|
61
61
|
* @param that - The "this" value to use for the onComplete call, if not provided or undefined defaults to the current context
|
|
62
62
|
* @param args - Any additional arguments to pass to the onComplete function
|
|
63
63
|
*/
|
|
64
|
-
onComplete: (onComplete:
|
|
64
|
+
onComplete: (onComplete: () => void, that?: any, ...args: any[]) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Create a new context using the core and config from the current instance, returns a new instance of the same type
|
|
67
67
|
* @param plugins - The execution order to process the plugins, if null or not supplied
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IProcessTelemetryUnloadContext } from "./IProcessTelemetryContext";
|
|
2
|
+
import { ITelemetryUnloadState } from "./ITelemetryUnloadState";
|
|
3
|
+
export interface IUnloadableComponent {
|
|
4
|
+
/**
|
|
5
|
+
* Teardown / Unload hook to allow implementations to perform some additional unload operations before the BaseTelemetryPlugin
|
|
6
|
+
* finishes it's removal.
|
|
7
|
+
* @param unloadCtx - This is the context that should be used during unloading.
|
|
8
|
+
* @param unloadState - The details / state of the unload process, it holds details like whether it should be unloaded synchronously or asynchronously and the reason for the unload.
|
|
9
|
+
* @param asyncCallback - An optional callback that the plugin must call if it returns true to inform the caller that it has completed any async unload/teardown operations.
|
|
10
|
+
* @returns boolean - true if the plugin has or will call asyncCallback, this allows the plugin to perform any asynchronous operations.
|
|
11
|
+
*/
|
|
12
|
+
_doUnload?: (unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState, asyncCallback?: () => void) => void | boolean;
|
|
13
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export { IConfiguration } from "./JavaScriptSDK.Interfaces/IConfiguration";
|
|
2
2
|
export { IChannelControls, MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
|
|
3
3
|
export { ITelemetryPlugin, IPlugin } from "./JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
4
|
-
export { IAppInsightsCore } from "./JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
4
|
+
export { IAppInsightsCore, ILoadedPlugin } from "./JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
5
5
|
export { ITelemetryItem, ICustomProperties, Tags } from "./JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
6
6
|
export { IBaseProcessingContext, IProcessTelemetryContext, IProcessTelemetryUnloadContext, IProcessTelemetryUpdateContext, GetExtCfgMergeType } from "./JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
7
7
|
export { INotificationListener } from "./JavaScriptSDK.Interfaces/INotificationListener";
|
|
8
8
|
export { ITelemetryPluginChain } from "./JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
9
9
|
export { IDiagnosticLogger } from "./JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
10
10
|
export { InstrumentorHooksCallback, IInstrumentHooksCallbacks, IInstrumentHooks, IInstrumentHook, IInstrumentCallDetails } from "./JavaScriptSDK.Interfaces/IInstrumentHooks";
|
|
11
|
+
export { IUnloadableComponent } from "./JavaScriptSDK.Interfaces/IUnloadableComponent";
|
|
11
12
|
export { EventsDiscardedReason } from "./JavaScriptSDK.Enums/EventsDiscardedReason";
|
|
12
13
|
export { SendRequestReason } from "./JavaScriptSDK.Enums/SendRequestReason";
|
|
13
14
|
export { TelemetryUpdateReason } from "./JavaScriptSDK.Enums/TelemetryUpdateReason";
|
|
@@ -17,7 +18,7 @@ export { BaseCore } from "./JavaScriptSDK/BaseCore";
|
|
|
17
18
|
export { BaseTelemetryPlugin } from "./JavaScriptSDK/BaseTelemetryPlugin";
|
|
18
19
|
export { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from "./JavaScriptSDK/RandomHelper";
|
|
19
20
|
export { CoreUtils, ICoreUtils, EventHelper, IEventHelper, Undefined, newGuid, perfNow, generateW3CId, disableCookies, canUseCookies, getCookie, setCookie, deleteCookie, _legacyCookieMgr } from "./JavaScriptSDK/CoreUtils";
|
|
20
|
-
export { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal, createEnumStyle, objExtend } from "./JavaScriptSDK/HelperFuncs";
|
|
21
|
+
export { isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, normalizeJsName, objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf, arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol, setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objFreeze, objSeal, createEnumStyle, objExtend, objToString } from "./JavaScriptSDK/HelperFuncs";
|
|
21
22
|
export { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, _IRegisteredEvents, __getRegisteredEvents } from "./JavaScriptSDK/EventHelpers";
|
|
22
23
|
export { getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto, hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported } from "./JavaScriptSDK/EnvUtils";
|
|
23
24
|
export { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from "@microsoft/applicationinsights-shims";
|
|
@@ -28,7 +29,7 @@ export { IPerfManager, IPerfManagerProvider } from "./JavaScriptSDK.Interfaces/I
|
|
|
28
29
|
export { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from "./JavaScriptSDK/PerfManager";
|
|
29
30
|
export { safeGetLogger, DiagnosticLogger, _InternalLogMessage, _throwInternal } from "./JavaScriptSDK/DiagnosticLogger";
|
|
30
31
|
export { ProcessTelemetryContext, createProcessTelemetryContext } from "./JavaScriptSDK/ProcessTelemetryContext";
|
|
31
|
-
export { initializePlugins, sortPlugins } from "./JavaScriptSDK/TelemetryHelpers";
|
|
32
|
+
export { initializePlugins, sortPlugins, unloadComponents } from "./JavaScriptSDK/TelemetryHelpers";
|
|
32
33
|
export { _InternalMessageId, _eInternalMessageId, LoggingSeverity, eLoggingSeverity } from "./JavaScriptSDK.Enums/LoggingEnums";
|
|
33
34
|
export { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } from "./JavaScriptSDK/InstrumentHooks";
|
|
34
35
|
export { ICookieMgr, ICookieMgrConfig } from "./JavaScriptSDK.Interfaces/ICookieMgr";
|