@microsoft/applicationinsights-core-js 2.8.0-beta.2203-09 → 2.8.0-beta.2203-10
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 +13 -5
- package/browser/applicationinsights-core-js.js.map +1 -1
- package/browser/applicationinsights-core-js.min.js +1 -1
- package/browser/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.d.ts +1 -1
- package/dist/applicationinsights-core-js.js +13 -5
- package/dist/applicationinsights-core-js.js.map +1 -1
- package/dist/applicationinsights-core-js.min.js +1 -1
- package/dist/applicationinsights-core-js.min.js.map +1 -1
- package/dist/applicationinsights-core-js.rollup.d.ts +1 -1
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +4 -2
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +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 +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 +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +7 -7
- 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 +4 -2
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +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.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/applicationinsights-core-js.js +1 -1
- package/package.json +1 -1
- package/src/JavaScriptSDK/BaseCore.ts +6 -6
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +1 -1
- package/src/JavaScriptSDK/ChannelController.ts +3 -1
- package/src/JavaScriptSDK/CoreUtils.ts +1 -1
- package/src/JavaScriptSDK/DiagnosticLogger.ts +1 -1
- package/src/JavaScriptSDK/EnvUtils.ts +1 -1
- package/src/JavaScriptSDK/EventHelpers.ts +4 -4
- package/src/JavaScriptSDK/HelperFuncs.ts +23 -23
- package/src/JavaScriptSDK/PerfManager.ts +2 -5
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +10 -8
- package/src/JavaScriptSDK/RandomHelper.ts +1 -1
- package/src/JavaScriptSDK.Enums/TelemetryUnloadReason.ts +1 -1
- package/src/JavaScriptSDK.Enums/TelemetryUpdateReason.ts +1 -1
- package/types/JavaScriptSDK/HelperFuncs.d.ts +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.8.0-beta.2203-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.8.0-beta.2203-10
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
|
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": "2.8.0-beta.2203-
|
|
4
|
+
"version": "2.8.0-beta.2203-10",
|
|
5
5
|
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
6
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
7
|
"keywords": [
|
|
@@ -250,10 +250,10 @@ export class BaseCore implements IAppInsightsCore {
|
|
|
250
250
|
* called.
|
|
251
251
|
* @param {INotificationListener} listener - An INotificationListener object.
|
|
252
252
|
*/
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
253
|
+
_self[strAddNotificationListener] = (listener: INotificationListener): void => {
|
|
254
|
+
if (_notificationManager) {
|
|
255
|
+
_notificationManager[strAddNotificationListener](listener);
|
|
256
|
+
}
|
|
257
257
|
};
|
|
258
258
|
|
|
259
259
|
/**
|
|
@@ -310,8 +310,8 @@ export class BaseCore implements IAppInsightsCore {
|
|
|
310
310
|
/**
|
|
311
311
|
* Periodically check logger.queue for log messages to be flushed
|
|
312
312
|
*/
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
_self.pollInternalLogs = (eventName?: string): number => {
|
|
314
|
+
_internalLogsEventName = eventName;
|
|
315
315
|
|
|
316
316
|
let interval = _self.config.diagnosticLogInterval;
|
|
317
317
|
if (!interval || !(interval > 0)) {
|
|
@@ -303,7 +303,7 @@ export abstract class BaseTelemetryPlugin implements ITelemetryPlugin {
|
|
|
303
303
|
* @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.
|
|
304
304
|
* @returns boolean - true if the plugin has or will call processNext(), this for backward compatibility as previously teardown was synchronous and returned nothing.
|
|
305
305
|
*/
|
|
306
|
-
|
|
306
|
+
public teardown(unloadCtx?: IProcessTelemetryUnloadContext, unloadState?: ITelemetryUnloadState): void | boolean {
|
|
307
307
|
// @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging
|
|
308
308
|
return false;
|
|
309
309
|
}
|
|
@@ -160,7 +160,9 @@ export function createChannelControllerPlugin(channelQueue: _IInternalChannels[]
|
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
162
|
},
|
|
163
|
-
isInitialized: () => {
|
|
163
|
+
isInitialized: () => {
|
|
164
|
+
return isInitialized
|
|
165
|
+
},
|
|
164
166
|
processTelemetry: (item: ITelemetryItem, itemCtx: IProcessTelemetryContext) => {
|
|
165
167
|
_processChannelQueue(channelQueue, itemCtx || _getTelCtx(), (chainCtx: IProcessTelemetryContext) => {
|
|
166
168
|
chainCtx[strProcessNext](item);
|
|
@@ -410,7 +410,7 @@ export const EventHelper: IEventHelper = {
|
|
|
410
410
|
* @param logger
|
|
411
411
|
* @returns
|
|
412
412
|
*/
|
|
413
|
-
|
|
413
|
+
export function _legacyCookieMgr(config?: IConfiguration, logger?: IDiagnosticLogger): ICookieMgr {
|
|
414
414
|
let cookieMgr = _gblCookieMgr(config, logger);
|
|
415
415
|
let legacyCanUseCookies = (CoreUtils as any)._canUseCookies;
|
|
416
416
|
|
|
@@ -165,7 +165,7 @@ export class DiagnosticLogger implements IDiagnosticLogger {
|
|
|
165
165
|
* This will write an error to the console if possible
|
|
166
166
|
* @param message {string} - The error message
|
|
167
167
|
*/
|
|
168
|
-
|
|
168
|
+
_self.errorToConsole = (message: string) => {
|
|
169
169
|
_logToConsole("error", message);
|
|
170
170
|
_debugExtMsg("error", message);
|
|
171
171
|
}
|
|
@@ -357,7 +357,7 @@ export function isSafari(userAgentStr ?: string) {
|
|
|
357
357
|
* Checks if HTML5 Beacons are supported in the current environment.
|
|
358
358
|
* @returns True if supported, false otherwise.
|
|
359
359
|
*/
|
|
360
|
-
|
|
360
|
+
export function isBeaconsSupported(): boolean {
|
|
361
361
|
if (_beaconsSupported === null) {
|
|
362
362
|
_beaconsSupported = hasNavigator() && Boolean(getNavigator().sendBeacon);
|
|
363
363
|
}
|
|
@@ -263,7 +263,7 @@ export function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNam
|
|
|
263
263
|
* if the eventName also includes a namespace the namespace(s) are merged into a single namespace
|
|
264
264
|
* @param useCapture [Optional] Defaults to false
|
|
265
265
|
*/
|
|
266
|
-
|
|
266
|
+
export function eventOff<T>(target: T, eventName: string, handlerRef: any, evtNamespace?: string | string[], useCapture: boolean = false) {
|
|
267
267
|
if (target) {
|
|
268
268
|
try {
|
|
269
269
|
let evtName = _getEvtNamespace(eventName, evtNamespace);
|
|
@@ -296,7 +296,7 @@ export function eventOn<T>(target: T, eventName: string, handlerRef: any, evtNam
|
|
|
296
296
|
* @param useCapture [Optional] Defaults to false
|
|
297
297
|
* @returns True if the function was bound successfully to the event, otherwise false
|
|
298
298
|
*/
|
|
299
|
-
|
|
299
|
+
export function attachEvent(obj: any, eventNameWithoutOn: string, handlerRef: any, useCapture: boolean = false) {
|
|
300
300
|
return eventOn(obj, eventNameWithoutOn, handlerRef, null, useCapture);
|
|
301
301
|
}
|
|
302
302
|
|
|
@@ -321,7 +321,7 @@ export function detachEvent(obj: any, eventNameWithoutOn: string, handlerRef: an
|
|
|
321
321
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
322
322
|
* @return {boolean} - true if the handler was successfully added
|
|
323
323
|
*/
|
|
324
|
-
|
|
324
|
+
export function addEventHandler(eventName: string, callback: any, evtNamespace?: string | string[]): boolean {
|
|
325
325
|
let result = false;
|
|
326
326
|
let w = getWindow();
|
|
327
327
|
if (w) {
|
|
@@ -346,7 +346,7 @@ export function detachEvent(obj: any, eventNameWithoutOn: string, handlerRef: an
|
|
|
346
346
|
* otherwise this will only remove events with this specific handler.
|
|
347
347
|
* @param evtNamespace - [Optional] Namespace(s) to append to the event listeners so they can be uniquely identified and removed based on this namespace.
|
|
348
348
|
*/
|
|
349
|
-
|
|
349
|
+
export function removeEventHandler(eventName: string, callback: any, evtNamespace?: string | string[]) {
|
|
350
350
|
let w = getWindow();
|
|
351
351
|
if (w) {
|
|
352
352
|
eventOff(w, eventName, callback, evtNamespace);
|
|
@@ -22,9 +22,9 @@ const strToString = "toString";
|
|
|
22
22
|
* Constant string defined to support minimization
|
|
23
23
|
* @ignore
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
const str__Proto = "__proto__";
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
28
|
* Constant string defined to support minimization
|
|
29
29
|
* @ignore
|
|
30
30
|
*/
|
|
@@ -58,27 +58,27 @@ const rLeadingNumeric = /^(\d+[\w\d_$])/;
|
|
|
58
58
|
* Pre-lookup to check if we are running on a modern browser (i.e. not IE8)
|
|
59
59
|
* @ignore
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
let _objGetPrototypeOf = Object["getPrototypeOf"];
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
64
|
* Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.
|
|
65
65
|
* @ignore
|
|
66
66
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
export function _getObjProto(target:any) {
|
|
68
|
+
if (target) {
|
|
69
|
+
// This method doesn't existing in older browsers (e.g. IE8)
|
|
70
|
+
if (_objGetPrototypeOf) {
|
|
71
|
+
return _objGetPrototypeOf(target);
|
|
72
|
+
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
// target[Constructor] May break if the constructor has been changed or removed
|
|
75
|
+
let newProto = target[str__Proto] || target[strShimPrototype] || target[strConstructor];
|
|
76
|
+
if(newProto) {
|
|
77
|
+
return newProto;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
return null;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export function objToString(obj: any) {
|
|
@@ -186,7 +186,7 @@ export function strEndsWith(value: string, search: string) {
|
|
|
186
186
|
* @param search - The characters to be searched for at the end of the value.
|
|
187
187
|
* @returns true if the given search value is found at the end of the string, otherwise false.
|
|
188
188
|
*/
|
|
189
|
-
|
|
189
|
+
export function _strEndsWithPoly(value: string, search: string) {
|
|
190
190
|
let result = false;
|
|
191
191
|
let searchLen = search ? search.length : 0;
|
|
192
192
|
let valLen = value ? value.length : 0;
|
|
@@ -214,7 +214,7 @@ export function strEndsWith(value: string, search: string) {
|
|
|
214
214
|
export function strStartsWith(value: string, checkValue: string) {
|
|
215
215
|
let result = false;
|
|
216
216
|
if (value && checkValue && !(result = value === checkValue)) {
|
|
217
|
-
|
|
217
|
+
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
218
218
|
result = _strStartsWith ? value[cStrStartsWith](checkValue) : _strStartsWithPoly(value, checkValue);
|
|
219
219
|
}
|
|
220
220
|
|
|
@@ -227,7 +227,7 @@ export function strStartsWith(value: string, checkValue: string) {
|
|
|
227
227
|
* @param checkValue - The characters to be searched for at the start of the value.
|
|
228
228
|
* @returns true if the given search value is found at the start of the string, otherwise false.
|
|
229
229
|
*/
|
|
230
|
-
|
|
230
|
+
export function _strStartsWithPoly(value: string, checkValue: string) {
|
|
231
231
|
// Using helper for performance and because string startsWith() is not available on IE
|
|
232
232
|
let result = false;
|
|
233
233
|
let chkLen = checkValue ? checkValue.length : 0;
|
|
@@ -328,7 +328,7 @@ export function isPlainObject(value: any): boolean {
|
|
|
328
328
|
let result: boolean = false;
|
|
329
329
|
|
|
330
330
|
if (value && typeof value === "object") {
|
|
331
|
-
|
|
331
|
+
// Inlining _objGetPrototypeOf for performance to avoid an additional function call
|
|
332
332
|
let proto = _objGetPrototypeOf ? _objGetPrototypeOf(value) : _getObjProto(value);
|
|
333
333
|
if (!proto) {
|
|
334
334
|
// No prototype found so this is a plain Object eg. 'Object.create(null)'
|
|
@@ -796,7 +796,7 @@ export function proxyFunctionAs<T, S>(target: T, name: string, source: S | (() =
|
|
|
796
796
|
* @param source - The source object which will be assigned / called by setting / calling the targets proxies
|
|
797
797
|
* @param functionsToProxy - An array of function names that will be proxied on the target
|
|
798
798
|
*/
|
|
799
|
-
|
|
799
|
+
export function proxyFunctions<T, S>(target: T, source: S | (() => S), functionsToProxy: (keyof S)[], overwriteTarget: boolean = true) {
|
|
800
800
|
if (target && source && isObject(target) && isArray(functionsToProxy)) {
|
|
801
801
|
arrForEach(functionsToProxy, (theFuncName) => {
|
|
802
802
|
if (isString(theFuncName)) {
|
|
@@ -888,7 +888,7 @@ export function objExtend<T1, T2, T3, T4, T5, T6>(obj1?: T1 | any, obj2?: T2, ob
|
|
|
888
888
|
idx++;
|
|
889
889
|
}
|
|
890
890
|
|
|
891
|
-
|
|
891
|
+
// Handle case when target is a string or something (possible in deep copy)
|
|
892
892
|
if (!isObject(extended)) {
|
|
893
893
|
extended = {} as T1 & T2 & T3 & T4 & T5 & T6;
|
|
894
894
|
}
|
|
@@ -104,12 +104,9 @@ export class PerfEvent implements IPerfEvent {
|
|
|
104
104
|
_self.isChildEvt = (): boolean => true;
|
|
105
105
|
}
|
|
106
106
|
_self[key] = value;
|
|
107
|
-
}
|
|
108
|
-
else if (key === PerfEvent.ChildrenContextKey) {
|
|
107
|
+
} else if (key === PerfEvent.ChildrenContextKey) {
|
|
109
108
|
_self[key] = value;
|
|
110
|
-
}
|
|
111
|
-
else
|
|
112
|
-
{
|
|
109
|
+
} else {
|
|
113
110
|
let ctx = _self[strExecutionContextKey] = _self[strExecutionContextKey] || {};
|
|
114
111
|
ctx[key] = value;
|
|
115
112
|
}
|
|
@@ -78,7 +78,9 @@ function _createInternalContext<T extends IBaseProcessingContext>(telemetryChain
|
|
|
78
78
|
let context: IInternalContext<T> = {
|
|
79
79
|
_next: _moveNext,
|
|
80
80
|
ctx: {
|
|
81
|
-
core: () => {
|
|
81
|
+
core: () => {
|
|
82
|
+
return core
|
|
83
|
+
},
|
|
82
84
|
diagLog: () => {
|
|
83
85
|
return safeGetLogger(core, config);
|
|
84
86
|
},
|
|
@@ -274,7 +276,7 @@ export function createProcessTelemetryUnloadContext(telemetryChain: ITelemetryPl
|
|
|
274
276
|
* @param core - The current core instance
|
|
275
277
|
* @param startAt - Identifies the next plugin to execute, if null there is no "next" plugin and if undefined it should assume the start of the chain
|
|
276
278
|
*/
|
|
277
|
-
|
|
279
|
+
export function createProcessTelemetryUpdateContext(telemetryChain: ITelemetryPluginChain, config: IConfiguration, core:IAppInsightsCore, startAt?: IPlugin): IProcessTelemetryUpdateContext {
|
|
278
280
|
let internalContext: IInternalContext<IProcessTelemetryUpdateContext> = _createInternalContext<IProcessTelemetryUpdateContext>(telemetryChain, config, core, startAt);
|
|
279
281
|
let context = internalContext.ctx;
|
|
280
282
|
|
|
@@ -307,7 +309,7 @@ export function createProcessTelemetryUnloadContext(telemetryChain: ITelemetryPl
|
|
|
307
309
|
* should be for legacy plugins only. Currently, only used for passing the current core instance and to provide better error
|
|
308
310
|
* reporting (hasRun) when errors occur.
|
|
309
311
|
*/
|
|
310
|
-
|
|
312
|
+
export function createTelemetryProxyChain(plugins: IPlugin[], config: IConfiguration, core: IAppInsightsCore, startAt?: IPlugin): ITelemetryPluginChain {
|
|
311
313
|
let firstProxy: ITelemetryPluginChain = null;
|
|
312
314
|
let add = startAt ? false : true;
|
|
313
315
|
|
|
@@ -399,11 +401,11 @@ export function createTelemetryPluginProxy(plugin: ITelemetryPlugin, config: ICo
|
|
|
399
401
|
}
|
|
400
402
|
|
|
401
403
|
function _processChain<T extends IBaseProcessingContext>(
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
404
|
+
itemCtx: T,
|
|
405
|
+
processPluginFn: (itemCtx: T) => boolean,
|
|
406
|
+
name: string,
|
|
407
|
+
details: () => any,
|
|
408
|
+
isAsync: boolean) {
|
|
407
409
|
|
|
408
410
|
let hasRun = false;
|
|
409
411
|
let identifier = plugin ? plugin.identifier : strTelemetryPluginChain;
|
|
@@ -122,7 +122,7 @@ export function mwcRandom32(signed?: boolean) {
|
|
|
122
122
|
* The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)
|
|
123
123
|
* @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22
|
|
124
124
|
*/
|
|
125
|
-
|
|
125
|
+
export function newId(maxLength = 22): string {
|
|
126
126
|
const base64chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
127
127
|
|
|
128
128
|
// Start with an initial random number, consuming the value in reverse byte order
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* The TelemetryUnloadReason enumeration contains the possible reasons for why a plugin is being unloaded / torndown().
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
export const enum TelemetryUnloadReason {
|
|
8
8
|
/**
|
|
9
9
|
* Teardown has been called without any context.
|
|
10
10
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
5
5
|
export declare function _getObjProto(target: any): any;
|
|
6
6
|
export declare function objToString(obj: any): any;
|
|
7
7
|
export declare function isTypeof(value: any, theType: string): boolean;
|