@microsoft/applicationinsights-web-basic 3.0.0-beta.2208-03 → 3.0.0-beta.2208-16
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/README.md +8 -1
- package/browser/aib.2.js +1153 -1328
- package/browser/aib.2.js.map +1 -1
- package/browser/aib.2.min.js +2 -2
- package/browser/aib.2.min.js.map +1 -1
- package/browser/aib.3.0.0-beta.2208-16.integrity.json +26 -0
- package/browser/{aib.3.0.0-beta.2208-03.js → aib.3.0.0-beta.2208-16.js} +1154 -1329
- package/browser/aib.3.0.0-beta.2208-16.js.map +1 -0
- package/browser/aib.3.0.0-beta.2208-16.min.js +6 -0
- package/browser/aib.3.0.0-beta.2208-16.min.js.map +1 -0
- package/dist/applicationinsights-web-basic.api.json +75 -284
- package/dist/applicationinsights-web-basic.api.md +9 -11
- package/dist/applicationinsights-web-basic.d.ts +16 -212
- package/dist/applicationinsights-web-basic.js +1153 -1328
- package/dist/applicationinsights-web-basic.js.map +1 -1
- package/dist/applicationinsights-web-basic.min.js +2 -2
- package/dist/applicationinsights-web-basic.min.js.map +1 -1
- package/dist/applicationinsights-web-basic.rollup.d.ts +16 -212
- package/dist-esm/__DynamicConstants.js +4 -4
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/index.js +5 -5
- package/dist-esm/index.js.map +1 -1
- package/package.json +6 -5
- package/src/__DynamicConstants.ts +3 -3
- package/src/index.ts +6 -7
- package/tsconfig.json +1 -1
- package/types/index.d.ts +1 -1
- package/types/tsdoc-metadata.json +1 -1
- package/browser/aib.3.0.0-beta.2208-03.integrity.json +0 -26
- package/browser/aib.3.0.0-beta.2208-03.js.map +0 -1
- package/browser/aib.3.0.0-beta.2208-03.min.js +0 -6
- package/browser/aib.3.0.0-beta.2208-03.min.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.0.0-beta.2208-
|
|
2
|
+
* Microsoft.ApplicationInsights, 3.0.0-beta.2208-16
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
declare namespace ApplicationInsights {
|
|
10
|
+
import { arrForEach } from '@nevware21/ts-utils';
|
|
11
|
+
import { EnumCls } from '@nevware21/ts-utils';
|
|
12
|
+
import { isNullOrUndefined } from '@nevware21/ts-utils';
|
|
13
|
+
import { throwError } from '@nevware21/ts-utils';
|
|
14
|
+
|
|
10
15
|
class AppInsightsCore extends BaseCore implements IAppInsightsCore {
|
|
11
16
|
constructor();
|
|
12
17
|
initialize(config: IConfiguration, extensions: IPlugin[], logger?: IDiagnosticLogger, notificationManager?: INotificationManager): void;
|
|
@@ -79,15 +84,7 @@ declare namespace ApplicationInsights {
|
|
|
79
84
|
addUnloadCb(handler: UnloadHandler): void;
|
|
80
85
|
}
|
|
81
86
|
|
|
82
|
-
|
|
83
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
84
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
85
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
86
|
-
* cause a testing requirement to test with and without the implementations
|
|
87
|
-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
88
|
-
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
89
|
-
*/
|
|
90
|
-
function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
|
|
87
|
+
export { arrForEach }
|
|
91
88
|
|
|
92
89
|
class BaseCore implements IAppInsightsCore {
|
|
93
90
|
static defaultConfig: IConfiguration;
|
|
@@ -290,14 +287,6 @@ declare namespace ApplicationInsights {
|
|
|
290
287
|
protected _addHook(hooks: IInstrumentHook | IInstrumentHook[]): void;
|
|
291
288
|
}
|
|
292
289
|
|
|
293
|
-
/**
|
|
294
|
-
* Provides a collection of utility functions, included for backward compatibility with previous releases.
|
|
295
|
-
* @deprecated Marking this instance as deprecated in favor of direct usage of the helper functions
|
|
296
|
-
* as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
|
|
297
|
-
* in your resulting code.
|
|
298
|
-
*/
|
|
299
|
-
const CoreUtils: ICoreUtils;
|
|
300
|
-
|
|
301
290
|
const DistributedTracingModes: EnumValue<typeof eDistributedTracingModes>;
|
|
302
291
|
|
|
303
292
|
type DistributedTracingModes = number | eDistributedTracingModes;
|
|
@@ -414,9 +403,7 @@ declare namespace ApplicationInsights {
|
|
|
414
403
|
WARNING = 2
|
|
415
404
|
}
|
|
416
405
|
|
|
417
|
-
type EnumValue<E = any> =
|
|
418
|
-
readonly [key in keyof E]: E[key];
|
|
419
|
-
};
|
|
406
|
+
type EnumValue<E = any> = EnumCls<E>;
|
|
420
407
|
|
|
421
408
|
/**
|
|
422
409
|
* Defines the level of severity for the event.
|
|
@@ -1246,195 +1233,6 @@ declare namespace ApplicationInsights {
|
|
|
1246
1233
|
delCookie?: (name: string, cookieValue: string) => void;
|
|
1247
1234
|
}
|
|
1248
1235
|
|
|
1249
|
-
/**
|
|
1250
|
-
* Provides a collection of utility functions, included for backward compatibility with previous releases.
|
|
1251
|
-
* @deprecated Marking this interface and instance as deprecated in favor of direct usage of the helper functions
|
|
1252
|
-
* as direct usage provides better tree-shaking and minification by avoiding the inclusion of the unused items
|
|
1253
|
-
* in your resulting code.
|
|
1254
|
-
*/
|
|
1255
|
-
interface ICoreUtils {
|
|
1256
|
-
/**
|
|
1257
|
-
* Internal - Do not use directly.
|
|
1258
|
-
* @deprecated Direct usage of this property is not recommend
|
|
1259
|
-
*/
|
|
1260
|
-
_canUseCookies: boolean;
|
|
1261
|
-
isTypeof: (value: any, theType: string) => boolean;
|
|
1262
|
-
isUndefined: (value: any) => boolean;
|
|
1263
|
-
isNullOrUndefined: (value: any) => boolean;
|
|
1264
|
-
hasOwnProperty: (obj: any, prop: string) => boolean;
|
|
1265
|
-
/**
|
|
1266
|
-
* Checks if the passed of value is a function.
|
|
1267
|
-
* @param {any} value - Value to be checked.
|
|
1268
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1269
|
-
*/
|
|
1270
|
-
isFunction: (value: any) => value is Function;
|
|
1271
|
-
/**
|
|
1272
|
-
* Checks if the passed of value is a function.
|
|
1273
|
-
* @param {any} value - Value to be checked.
|
|
1274
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1275
|
-
*/
|
|
1276
|
-
isObject: (value: any) => boolean;
|
|
1277
|
-
/**
|
|
1278
|
-
* Check if an object is of type Date
|
|
1279
|
-
*/
|
|
1280
|
-
isDate: (obj: any) => obj is Date;
|
|
1281
|
-
/**
|
|
1282
|
-
* Check if an object is of type Array
|
|
1283
|
-
*/
|
|
1284
|
-
isArray: (obj: any) => boolean;
|
|
1285
|
-
/**
|
|
1286
|
-
* Check if an object is of type Error
|
|
1287
|
-
*/
|
|
1288
|
-
isError: (obj: any) => obj is Error;
|
|
1289
|
-
/**
|
|
1290
|
-
* Checks if the type of value is a string.
|
|
1291
|
-
* @param {any} value - Value to be checked.
|
|
1292
|
-
* @return {boolean} True if the value is a string, false otherwise.
|
|
1293
|
-
*/
|
|
1294
|
-
isString: (value: any) => value is string;
|
|
1295
|
-
/**
|
|
1296
|
-
* Checks if the type of value is a number.
|
|
1297
|
-
* @param {any} value - Value to be checked.
|
|
1298
|
-
* @return {boolean} True if the value is a number, false otherwise.
|
|
1299
|
-
*/
|
|
1300
|
-
isNumber: (value: any) => value is number;
|
|
1301
|
-
/**
|
|
1302
|
-
* Checks if the type of value is a boolean.
|
|
1303
|
-
* @param {any} value - Value to be checked.
|
|
1304
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
1305
|
-
*/
|
|
1306
|
-
isBoolean: (value: any) => value is boolean;
|
|
1307
|
-
/**
|
|
1308
|
-
* Convert a date to I.S.O. format in IE8
|
|
1309
|
-
*/
|
|
1310
|
-
toISOString: (date: Date) => string;
|
|
1311
|
-
/**
|
|
1312
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
1313
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
1314
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
1315
|
-
* cause a testing requirement to test with and without the implementations
|
|
1316
|
-
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. It can return -1 to break out of the loop
|
|
1317
|
-
* @param thisArg [Optional] An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
1318
|
-
*/
|
|
1319
|
-
arrForEach: <T>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => void | number, thisArg?: any) => void;
|
|
1320
|
-
/**
|
|
1321
|
-
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
1322
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
1323
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
1324
|
-
* cause a testing requirement to test with and without the implementations
|
|
1325
|
-
* @param searchElement The value to locate in the array.
|
|
1326
|
-
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
1327
|
-
*/
|
|
1328
|
-
arrIndexOf: <T>(arr: T[], searchElement: T, fromIndex?: number) => number;
|
|
1329
|
-
/**
|
|
1330
|
-
* Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
|
|
1331
|
-
* to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
|
|
1332
|
-
* checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
|
|
1333
|
-
* implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1334
|
-
* @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
|
|
1335
|
-
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
1336
|
-
*/
|
|
1337
|
-
arrMap: <T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any) => R[];
|
|
1338
|
-
/**
|
|
1339
|
-
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is
|
|
1340
|
-
* provided as an argument in the next call to the callback function. This helper exists to avoid adding a polyfil for older browsers that do not define
|
|
1341
|
-
* Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
|
|
1342
|
-
* this will not use the Array.prototype.xxxx implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1343
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
|
|
1344
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
1345
|
-
*/
|
|
1346
|
-
arrReduce: <T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R) => R;
|
|
1347
|
-
/**
|
|
1348
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
1349
|
-
*/
|
|
1350
|
-
strTrim: (str: any) => string;
|
|
1351
|
-
/**
|
|
1352
|
-
* Creates an object that has the specified prototype, and that optionally contains specified properties. This helper exists to avoid adding a polyfil
|
|
1353
|
-
* for older browsers that do not define Object.create eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
1354
|
-
* Note: For consistency this will not use the Object.create implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1355
|
-
* @param obj Object to use as a prototype. May be null
|
|
1356
|
-
*/
|
|
1357
|
-
objCreate: (obj: object) => any;
|
|
1358
|
-
/**
|
|
1359
|
-
* Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
|
|
1360
|
-
* that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
1361
|
-
* Note: For consistency this will not use the Object.keys implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
1362
|
-
* @param obj Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
|
|
1363
|
-
*/
|
|
1364
|
-
objKeys: (obj: {}) => string[];
|
|
1365
|
-
/**
|
|
1366
|
-
* Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
|
|
1367
|
-
* existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
|
|
1368
|
-
* and executed in an ES3 container, providing basic IE8 compatibility.
|
|
1369
|
-
* @param target The object on which to define the property.
|
|
1370
|
-
* @param prop The name of the property to be defined or modified.
|
|
1371
|
-
* @param getProp The getter function to wire against the getter.
|
|
1372
|
-
* @param setProp The setter function to wire against the setter.
|
|
1373
|
-
* @returns True if it was able to create the accessors otherwise false
|
|
1374
|
-
*/
|
|
1375
|
-
objDefineAccessors: <T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void) => boolean;
|
|
1376
|
-
/**
|
|
1377
|
-
* Trys to add an event handler for the specified event to the window, body and document
|
|
1378
|
-
* @param eventName {string} - The name of the event
|
|
1379
|
-
* @param callback {any} - The callback function that needs to be executed for the given event
|
|
1380
|
-
* @return {boolean} - true if the handler was successfully added
|
|
1381
|
-
*/
|
|
1382
|
-
addEventHandler: (eventName: string, callback: any, evtNamespace?: string | string[]) => boolean;
|
|
1383
|
-
/**
|
|
1384
|
-
* 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)
|
|
1385
|
-
* https://caniuse.com/#search=Date.now
|
|
1386
|
-
*/
|
|
1387
|
-
dateNow: () => number;
|
|
1388
|
-
/**
|
|
1389
|
-
* Identifies whether the current environment appears to be IE
|
|
1390
|
-
*/
|
|
1391
|
-
isIE: () => boolean;
|
|
1392
|
-
/**
|
|
1393
|
-
* @deprecated - Use the core.getCookieMgr().disable()
|
|
1394
|
-
* Force the SDK not to store and read any data from cookies.
|
|
1395
|
-
*/
|
|
1396
|
-
disableCookies: () => void;
|
|
1397
|
-
newGuid: () => string;
|
|
1398
|
-
/**
|
|
1399
|
-
* Return the current value of the Performance Api now() function (if available) and fallback to dateNow() if it is unavailable (IE9 or less)
|
|
1400
|
-
* https://caniuse.com/#search=performance.now
|
|
1401
|
-
*/
|
|
1402
|
-
perfNow: () => number;
|
|
1403
|
-
/**
|
|
1404
|
-
* Generate random base64 id string.
|
|
1405
|
-
* The default length is 22 which is 132-bits so almost the same as a GUID but as base64 (the previous default was 5)
|
|
1406
|
-
* @param maxLength - Optional value to specify the length of the id to be generated, defaults to 22
|
|
1407
|
-
*/
|
|
1408
|
-
newId: (maxLength?: number) => string;
|
|
1409
|
-
/**
|
|
1410
|
-
* Generate a random value between 0 and maxValue, max value should be limited to a 32-bit maximum.
|
|
1411
|
-
* So maxValue(16) will produce a number from 0..16 (range of 17)
|
|
1412
|
-
* @param maxValue
|
|
1413
|
-
*/
|
|
1414
|
-
randomValue: (maxValue: number) => number;
|
|
1415
|
-
/**
|
|
1416
|
-
* generate a random 32-bit number (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), defaults un-unsigned.
|
|
1417
|
-
* @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
|
|
1418
|
-
*/
|
|
1419
|
-
random32: (signed?: boolean) => number;
|
|
1420
|
-
/**
|
|
1421
|
-
* Seed the MWC random number generator with the specified seed or a random value
|
|
1422
|
-
* @param value - optional the number to used as the seed, if undefined, null or zero a random value will be chosen
|
|
1423
|
-
*/
|
|
1424
|
-
mwcRandomSeed: (value?: number) => void;
|
|
1425
|
-
/**
|
|
1426
|
-
* Generate a random 32-bit number between (0x000000..0xFFFFFFFF) or (-0x80000000..0x7FFFFFFF), using MWC (Multiply with carry)
|
|
1427
|
-
* instead of Math.random() defaults to un-signed.
|
|
1428
|
-
* Used as a replacement random generator for IE to avoid issues with older IE instances.
|
|
1429
|
-
* @param signed - True to return a signed 32-bit number (-0x80000000..0x7FFFFFFF) otherwise an unsigned one (0x000000..0xFFFFFFFF)
|
|
1430
|
-
*/
|
|
1431
|
-
mwcRandom32: (signed?: boolean) => number;
|
|
1432
|
-
/**
|
|
1433
|
-
* generate W3C trace id
|
|
1434
|
-
*/
|
|
1435
|
-
generateW3CId: () => string;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
1236
|
interface ICustomProperties {
|
|
1439
1237
|
[key: string]: any;
|
|
1440
1238
|
}
|
|
@@ -2064,6 +1862,12 @@ declare namespace ApplicationInsights {
|
|
|
2064
1862
|
* Plugin version (available in data.properties.version in common schema)
|
|
2065
1863
|
*/
|
|
2066
1864
|
readonly version?: string;
|
|
1865
|
+
/**
|
|
1866
|
+
* The App Insights core to use for backward compatibility.
|
|
1867
|
+
* Therefore the interface will be able to access the core without needing to cast to "any".
|
|
1868
|
+
* [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
|
|
1869
|
+
*/
|
|
1870
|
+
core?: IAppInsightsCore;
|
|
2067
1871
|
}
|
|
2068
1872
|
|
|
2069
1873
|
/**
|
|
@@ -2263,7 +2067,7 @@ declare namespace ApplicationInsights {
|
|
|
2263
2067
|
aiDataContract: any;
|
|
2264
2068
|
}
|
|
2265
2069
|
|
|
2266
|
-
|
|
2070
|
+
export { isNullOrUndefined }
|
|
2267
2071
|
|
|
2268
2072
|
interface IStackDetails {
|
|
2269
2073
|
src: string;
|
|
@@ -2623,7 +2427,7 @@ declare namespace ApplicationInsights {
|
|
|
2623
2427
|
PluginRemoved = 32
|
|
2624
2428
|
}
|
|
2625
2429
|
|
|
2626
|
-
|
|
2430
|
+
export { throwError }
|
|
2627
2431
|
|
|
2628
2432
|
type UnloadHandler = (itemCtx: IProcessTelemetryUnloadContext, unloadState: ITelemetryUnloadState) => void;
|
|
2629
2433
|
|