@microsoft/applicationinsights-core-js 3.0.0-beta.2208-04 → 3.0.0-beta.2208-18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +2040 -2155
- 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 +6998 -10817
- package/dist/applicationinsights-core-js.api.md +88 -177
- package/dist/applicationinsights-core-js.d.ts +94 -494
- package/dist/applicationinsights-core-js.js +2040 -2155
- 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 +94 -494
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js +2 -2
- package/dist-esm/JavaScriptSDK/AppInsightsCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseCore.js +11 -12
- package/dist-esm/JavaScriptSDK/BaseCore.js.map +1 -1
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js +3 -2
- package/dist-esm/JavaScriptSDK/BaseTelemetryPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ChannelController.js +2 -2
- package/dist-esm/JavaScriptSDK/ChannelController.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CookieMgr.js +27 -26
- package/dist-esm/JavaScriptSDK/CookieMgr.js.map +1 -1
- package/dist-esm/JavaScriptSDK/CoreUtils.js +8 -140
- package/dist-esm/JavaScriptSDK/CoreUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js +2 -2
- package/dist-esm/JavaScriptSDK/DataCacheHelper.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js +3 -3
- package/dist-esm/JavaScriptSDK/DbgExtensionUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +4 -3
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +132 -136
- package/dist-esm/JavaScriptSDK/EnvUtils.js.map +1 -1
- package/dist-esm/JavaScriptSDK/EventHelpers.js +2 -3
- package/dist-esm/JavaScriptSDK/EventHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +23 -470
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js +5 -5
- package/dist-esm/JavaScriptSDK/InstrumentHooks.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InternalConstants.js +4 -4
- package/dist-esm/JavaScriptSDK/InternalConstants.js.map +1 -1
- package/dist-esm/JavaScriptSDK/NotificationManager.js +2 -2
- package/dist-esm/JavaScriptSDK/NotificationManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/PerfManager.js +4 -8
- package/dist-esm/JavaScriptSDK/PerfManager.js.map +1 -1
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js +3 -3
- package/dist-esm/JavaScriptSDK/ProcessTelemetryContext.js.map +1 -1
- package/dist-esm/JavaScriptSDK/RandomHelper.js +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js +2 -2
- package/dist-esm/JavaScriptSDK/TelemetryHelpers.js.map +1 -1
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js +3 -3
- package/dist-esm/JavaScriptSDK/TelemetryInitializerPlugin.js.map +1 -1
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js +2 -3
- package/dist-esm/JavaScriptSDK/UnloadHandlerContainer.js.map +1 -1
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js +2 -2
- package/dist-esm/JavaScriptSDK/W3cTraceParent.js.map +1 -1
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js +5 -31
- package/dist-esm/JavaScriptSDK.Enums/EnumHelperFuncs.js.map +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/IUnloadableComponent.js +1 -1
- package/dist-esm/__DynamicConstants.js +11 -13
- package/dist-esm/__DynamicConstants.js.map +1 -1
- package/dist-esm/applicationinsights-core-js.js +6 -5
- package/dist-esm/applicationinsights-core-js.js.map +1 -1
- package/package.json +4 -3
- package/src/JavaScriptSDK/AppInsightsCore.ts +1 -1
- package/src/JavaScriptSDK/BaseCore.ts +2 -4
- package/src/JavaScriptSDK/BaseTelemetryPlugin.ts +2 -1
- package/src/JavaScriptSDK/ChannelController.ts +1 -1
- package/src/JavaScriptSDK/CookieMgr.ts +6 -5
- package/src/JavaScriptSDK/CoreUtils.ts +7 -423
- package/src/JavaScriptSDK/DbgExtensionUtils.ts +2 -2
- package/src/JavaScriptSDK/DiagnosticLogger.ts +3 -2
- package/src/JavaScriptSDK/EnvUtils.ts +145 -148
- package/src/JavaScriptSDK/EventHelpers.ts +1 -2
- package/src/JavaScriptSDK/HelperFuncs.ts +22 -536
- package/src/JavaScriptSDK/InstrumentHooks.ts +4 -4
- package/src/JavaScriptSDK/InternalConstants.ts +3 -3
- package/src/JavaScriptSDK/NotificationManager.ts +1 -1
- package/src/JavaScriptSDK/PerfManager.ts +3 -7
- package/src/JavaScriptSDK/ProcessTelemetryContext.ts +4 -4
- package/src/JavaScriptSDK/TelemetryHelpers.ts +1 -1
- package/src/JavaScriptSDK/TelemetryInitializerPlugin.ts +2 -2
- package/src/JavaScriptSDK/UnloadHandlerContainer.ts +1 -2
- package/src/JavaScriptSDK/W3cTraceParent.ts +1 -1
- package/src/JavaScriptSDK.Enums/EnumHelperFuncs.ts +5 -36
- package/src/JavaScriptSDK.Interfaces/ITelemetryPlugin.ts +7 -0
- package/tsconfig.json +1 -1
- package/types/JavaScriptSDK/CoreUtils.d.ts +0 -270
- package/types/JavaScriptSDK/EnvUtils.d.ts +0 -65
- package/types/JavaScriptSDK/HelperFuncs.d.ts +3 -154
- package/types/JavaScriptSDK.Enums/EnumHelperFuncs.d.ts +6 -18
- package/types/JavaScriptSDK.Interfaces/ITelemetryPlugin.d.ts +6 -0
- package/types/__DynamicConstants.d.ts +2 -4
- package/types/applicationinsights-core-js.d.ts +5 -4
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
* Helper used to get the prototype of the target object as getPrototypeOf is not available in an ES3 environment.
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
|
-
export declare function _getObjProto(target: any): any;
|
|
1
|
+
export declare let _getObjProto: any;
|
|
6
2
|
export declare function objToString(obj: any): any;
|
|
7
|
-
export declare function isTypeof(value: any, theType: string): boolean;
|
|
8
|
-
export declare function isUndefined(value: any): value is undefined;
|
|
9
3
|
export declare function isNotUndefined<T>(value: T): value is T;
|
|
10
|
-
export declare function isNullOrUndefined(value: any): value is null | undefined;
|
|
11
4
|
export declare function isNotNullOrUndefined<T>(value: T): value is T;
|
|
12
|
-
export declare function hasOwnProperty(obj: any, prop: string): boolean;
|
|
13
|
-
export declare function isObject<T>(value: T): value is T;
|
|
14
|
-
export declare function isFunction(value: any): value is Function;
|
|
15
|
-
export declare function isPromiseLike<T>(value: any): value is PromiseLike<T>;
|
|
16
5
|
/**
|
|
17
6
|
* Validates that the string name conforms to the JS IdentifierName specification and if not
|
|
18
7
|
* normalizes the name so that it would. This method does not identify or change any keywords
|
|
@@ -21,85 +10,12 @@ export declare function isPromiseLike<T>(value: any): value is PromiseLike<T>;
|
|
|
21
10
|
* @param name The name to validate
|
|
22
11
|
*/
|
|
23
12
|
export declare function normalizeJsName(name: string): string;
|
|
24
|
-
/**
|
|
25
|
-
* This is a helper function for the equivalent of arForEach(objKeys(target), callbackFn), this is a
|
|
26
|
-
* performance optimization to avoid the creation of a new array for large objects
|
|
27
|
-
* @param target The target object to find and process the keys
|
|
28
|
-
* @param callbackfn The function to call with the details
|
|
29
|
-
*/
|
|
30
|
-
export declare function objForEachKey<T = any>(target: T, callbackfn: (name: string, value: T[keyof T]) => void): void;
|
|
31
|
-
/**
|
|
32
|
-
* The strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
|
33
|
-
* @param value - The value to check whether it ends with the search value.
|
|
34
|
-
* @param search - The characters to be searched for at the end of the value.
|
|
35
|
-
* @returns true if the given search value is found at the end of the string, otherwise false.
|
|
36
|
-
*/
|
|
37
|
-
export declare function strEndsWith(value: string, search: string): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* The _strEndsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
|
|
40
|
-
* @param value - The value to check whether it ends with the search value.
|
|
41
|
-
* @param search - The characters to be searched for at the end of the value.
|
|
42
|
-
* @returns true if the given search value is found at the end of the string, otherwise false.
|
|
43
|
-
*/
|
|
44
|
-
export declare function _strEndsWithPoly(value: string, search: string): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
|
|
47
|
-
* @param value - The value to check whether it ends with the search value.
|
|
48
|
-
* @param checkValue - The characters to be searched for at the start of the value.
|
|
49
|
-
* @returns true if the given search value is found at the start of the string, otherwise false.
|
|
50
|
-
*/
|
|
51
|
-
export declare function strStartsWith(value: string, checkValue: string): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* The strStartsWith() method determines whether a string starts with the characters of the specified string, returning true or false as appropriate.
|
|
54
|
-
* @param value - The value to check whether it ends with the search value.
|
|
55
|
-
* @param checkValue - The characters to be searched for at the start of the value.
|
|
56
|
-
* @returns true if the given search value is found at the start of the string, otherwise false.
|
|
57
|
-
*/
|
|
58
|
-
export declare function _strStartsWithPoly(value: string, checkValue: string): boolean;
|
|
59
13
|
/**
|
|
60
14
|
* A simple wrapper (for minification support) to check if the value contains the search string.
|
|
61
15
|
* @param value - The string value to check for the existence of the search value
|
|
62
16
|
* @param search - The value search within the value
|
|
63
17
|
*/
|
|
64
18
|
export declare function strContains(value: string, search: string): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Check if an object is of type Date
|
|
67
|
-
*/
|
|
68
|
-
export declare function isDate(obj: any): obj is Date;
|
|
69
|
-
/**
|
|
70
|
-
* Check if an object is of type Array with optional generic T, the generic type is not validated
|
|
71
|
-
* and exists to help with TypeScript validation only.
|
|
72
|
-
*/
|
|
73
|
-
export declare let isArray: <T = any>(obj: any) => obj is Array<T>;
|
|
74
|
-
/**
|
|
75
|
-
* Check if an object is of type Error
|
|
76
|
-
*/
|
|
77
|
-
export declare function isError(obj: any): obj is Error;
|
|
78
|
-
/**
|
|
79
|
-
* Checks if the type of value is a string.
|
|
80
|
-
* @param {any} value - Value to be checked.
|
|
81
|
-
* @return {boolean} True if the value is a string, false otherwise.
|
|
82
|
-
*/
|
|
83
|
-
export declare function isString(value: any): value is string;
|
|
84
|
-
/**
|
|
85
|
-
* Checks if the type of value is a number.
|
|
86
|
-
* @param {any} value - Value to be checked.
|
|
87
|
-
* @return {boolean} True if the value is a number, false otherwise.
|
|
88
|
-
*/
|
|
89
|
-
export declare function isNumber(value: any): value is number;
|
|
90
|
-
/**
|
|
91
|
-
* Checks if the type of value is a boolean.
|
|
92
|
-
* @param {any} value - Value to be checked.
|
|
93
|
-
* @return {boolean} True if the value is a boolean, false otherwise.
|
|
94
|
-
*/
|
|
95
|
-
export declare function isBoolean(value: any): value is boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Checks if the type of value is a Symbol.
|
|
98
|
-
* This only returns a boolean as returning value is Symbol will cause issues for older TypeScript consumers
|
|
99
|
-
* @param {any} value - Value to be checked.
|
|
100
|
-
* @return {boolean} True if the value is a Symbol, false otherwise.
|
|
101
|
-
*/
|
|
102
|
-
export declare function isSymbol(value: any): boolean;
|
|
103
19
|
/**
|
|
104
20
|
* Checks if the type of the value is a normal plain object (not a null or data)
|
|
105
21
|
* @param value
|
|
@@ -108,72 +24,8 @@ export declare function isPlainObject(value: any): boolean;
|
|
|
108
24
|
/**
|
|
109
25
|
* Convert a date to I.S.O. format in IE8
|
|
110
26
|
*/
|
|
111
|
-
export declare function toISOString(date: Date):
|
|
112
|
-
|
|
113
|
-
* Convert a date to I.S.O. format in IE8
|
|
114
|
-
*/
|
|
115
|
-
export declare function _toISOStringPoly(date: Date): string;
|
|
116
|
-
/**
|
|
117
|
-
* Performs the specified action for each element in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
118
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
119
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
120
|
-
* cause a testing requirement to test with and without the implementations
|
|
121
|
-
* @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
|
|
122
|
-
* @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.
|
|
123
|
-
*/
|
|
124
|
-
export declare function arrForEach<T = any>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => undefined | void | number, thisArg?: any): void;
|
|
125
|
-
/**
|
|
126
|
-
* Returns the index of the first occurrence of a value in an array. This helper exists to avoid adding a polyfil for older browsers
|
|
127
|
-
* that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype
|
|
128
|
-
* implementation. Note: For consistency this will not use the Array.prototype.xxxx implementation if it exists as this would
|
|
129
|
-
* cause a testing requirement to test with and without the implementations
|
|
130
|
-
* @param searchElement The value to locate in the array.
|
|
131
|
-
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
|
|
132
|
-
*/
|
|
133
|
-
export declare function arrIndexOf<T>(arr: T[], searchElement: T, fromIndex?: number): number;
|
|
134
|
-
/**
|
|
135
|
-
* Calls a defined callback function on each element of an array, and returns an array that contains the results. This helper exists
|
|
136
|
-
* to avoid adding a polyfil for older browsers that do not define Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page
|
|
137
|
-
* checks for presence/absence of the prototype implementation. Note: For consistency this will not use the Array.prototype.xxxx
|
|
138
|
-
* implementation if it exists as this would cause a testing requirement to test with and without the implementations
|
|
139
|
-
* @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.
|
|
140
|
-
* @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.
|
|
141
|
-
*/
|
|
142
|
-
export declare function arrMap<T, R>(arr: T[], callbackfn: (value: T, index?: number, array?: T[]) => R, thisArg?: any): R[];
|
|
143
|
-
/**
|
|
144
|
-
* 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
|
|
145
|
-
* 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
|
|
146
|
-
* Array.prototype.xxxx (eg. ES3 only, IE8) just in case any page checks for presence/absence of the prototype implementation. Note: For consistency
|
|
147
|
-
* 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
|
|
148
|
-
* @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.
|
|
149
|
-
* @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.
|
|
150
|
-
*/
|
|
151
|
-
export declare function arrReduce<T, R>(arr: T[], callbackfn: (previousValue: T | R, currentValue?: T, currentIndex?: number, array?: T[]) => R, initialValue?: R): R;
|
|
152
|
-
/**
|
|
153
|
-
* helper method to trim strings (IE8 does not implement String.prototype.trim)
|
|
154
|
-
*/
|
|
155
|
-
export declare function strTrim(str: any): string;
|
|
156
|
-
/**
|
|
157
|
-
* Returns the names of the enumerable string properties and methods of an object. This helper exists to avoid adding a polyfil for older browsers
|
|
158
|
-
* that do not define Object.keys eg. ES3 only, IE8 just in case any page checks for presence/absence of the prototype implementation.
|
|
159
|
-
* 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
|
|
160
|
-
* @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.
|
|
161
|
-
*/
|
|
162
|
-
export declare function objKeys(obj: {}): string[];
|
|
163
|
-
/**
|
|
164
|
-
* Try to define get/set object property accessors for the target object/prototype, this will provide compatibility with
|
|
165
|
-
* existing API definition when run within an ES5+ container that supports accessors but still enable the code to be loaded
|
|
166
|
-
* and executed in an ES3 container, providing basic IE8 compatibility.
|
|
167
|
-
* @param target The object on which to define the property.
|
|
168
|
-
* @param prop The name of the property to be defined or modified.
|
|
169
|
-
* @param getProp The getter function to wire against the getter.
|
|
170
|
-
* @param setProp The setter function to wire against the setter.
|
|
171
|
-
* @returns True if it was able to create the accessors otherwise false
|
|
172
|
-
*/
|
|
173
|
-
export declare function objDefineAccessors<T>(target: any, prop: string, getProp?: () => T, setProp?: (v: T) => void): boolean;
|
|
174
|
-
export declare function deepFreeze<T>(obj: T): T;
|
|
175
|
-
export declare const objFreeze: <T>(value: T) => T;
|
|
176
|
-
export declare const objSeal: <T>(value: T) => T;
|
|
27
|
+
export declare function toISOString(date: Date): any;
|
|
28
|
+
export declare const deepFreeze: <T>(obj: T) => T;
|
|
177
29
|
/**
|
|
178
30
|
* 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)
|
|
179
31
|
* https://caniuse.com/#search=Date.now
|
|
@@ -207,9 +59,6 @@ export declare function getSetValue<T, K extends keyof T>(target: T, field: K, d
|
|
|
207
59
|
* @param defaultValue - The default value to return if the config field is not present, null or undefined.
|
|
208
60
|
*/
|
|
209
61
|
export declare function getCfgValue<V>(theValue: V, defaultValue?: V): V;
|
|
210
|
-
export declare function isNotTruthy(value: any): boolean;
|
|
211
|
-
export declare function isTruthy(value: any): boolean;
|
|
212
|
-
export declare function throwError(message: string): never;
|
|
213
62
|
/**
|
|
214
63
|
* Effectively assigns all enumerable properties (not just own properties) and functions (including inherited prototype) from
|
|
215
64
|
* the source object to the target, it attempts to use proxy getters / setters (if possible) and proxy functions to avoid potential
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
4
|
-
export declare type EnumMap<E = any, I = E> = {
|
|
5
|
-
readonly [key in keyof E extends string ? keyof E : never]: key extends string ? key : keyof E;
|
|
6
|
-
} & I;
|
|
1
|
+
import { EnumCls } from "@nevware21/ts-utils";
|
|
2
|
+
export declare type EnumValue<E = any> = EnumCls<E>;
|
|
7
3
|
/**
|
|
8
4
|
* Create an enum style object which has both the key => value and value => key mappings
|
|
9
5
|
* @param values - The values to populate on the new object
|
|
10
6
|
* @returns
|
|
11
7
|
*/
|
|
12
|
-
export declare
|
|
8
|
+
export declare const createEnumStyle: <E>(values: {
|
|
13
9
|
[key in keyof E]: E[keyof E];
|
|
14
|
-
})
|
|
15
|
-
/**
|
|
16
|
-
* Create a 2 index map that maps an enum's key as both the key and value, X["key"] => "key" and X[0] => "keyof 0".
|
|
17
|
-
* @param values - The values to populate on the new object
|
|
18
|
-
* @returns
|
|
19
|
-
*/
|
|
20
|
-
export declare function createEnumMap<E, I = keyof E>(values: {
|
|
21
|
-
[key in keyof E]: E[keyof E];
|
|
22
|
-
}): EnumMap<E, I>;
|
|
10
|
+
}) => EnumValue<E>;
|
|
23
11
|
/**
|
|
24
12
|
* Create a 2 index map that maps an enum's key and value to the defined map value, X["key"] => mapValue and X[0] => mapValue.
|
|
25
13
|
* Generic values
|
|
@@ -29,6 +17,6 @@ export declare function createEnumMap<E, I = keyof E>(values: {
|
|
|
29
17
|
* @param values - The values to populate on the new object
|
|
30
18
|
* @returns
|
|
31
19
|
*/
|
|
32
|
-
export declare
|
|
20
|
+
export declare const createValueMap: <E, V = E>(values: {
|
|
33
21
|
[key in keyof E]: [E[keyof E], V[keyof V]];
|
|
34
|
-
})
|
|
22
|
+
}) => V;
|
|
@@ -71,4 +71,10 @@ export interface IPlugin {
|
|
|
71
71
|
* Plugin version (available in data.properties.version in common schema)
|
|
72
72
|
*/
|
|
73
73
|
readonly version?: string;
|
|
74
|
+
/**
|
|
75
|
+
* The App Insights core to use for backward compatibility.
|
|
76
|
+
* Therefore the interface will be able to access the core without needing to cast to "any".
|
|
77
|
+
* [optional] any 3rd party plugins which are already implementing this interface don't fail to compile.
|
|
78
|
+
*/
|
|
79
|
+
core?: IAppInsightsCore;
|
|
74
80
|
}
|
|
@@ -30,21 +30,19 @@ export declare const _DYN_DIAG_LOG = "diagLog";
|
|
|
30
30
|
export declare const _DYN_SET_NEXT_PLUGIN = "setNextPlugin";
|
|
31
31
|
export declare const _DYN_CREATE_NEW = "createNew";
|
|
32
32
|
export declare const _DYN_COOKIE_CFG = "cookieCfg";
|
|
33
|
-
export declare const _DYN_INDEX_OF = "indexOf";
|
|
34
33
|
export declare const _DYN_SUBSTRING = "substring";
|
|
35
34
|
export declare const _DYN_USER_AGENT = "userAgent";
|
|
36
35
|
export declare const _DYN_SPLIT = "split";
|
|
37
|
-
export declare const _DYN_SET_ENABLED = "setEnabled";
|
|
38
|
-
export declare const _DYN_REPLACE = "replace";
|
|
39
36
|
export declare const _DYN_SUBSTR = "substr";
|
|
40
37
|
export declare const _DYN_NODE_TYPE = "nodeType";
|
|
41
38
|
export declare const _DYN_APPLY = "apply";
|
|
39
|
+
export declare const _DYN_REPLACE = "replace";
|
|
42
40
|
export declare const _DYN_ENABLE_DEBUG_EXCEPTI4 = "enableDebugExceptions";
|
|
43
41
|
export declare const _DYN_LOG_INTERNAL_MESSAGE = "logInternalMessage";
|
|
44
42
|
export declare const _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
45
|
-
export declare const _DYN_CALL = "call";
|
|
46
43
|
export declare const _DYN_TYPE = "type";
|
|
47
44
|
export declare const _DYN_HANDLER = "handler";
|
|
45
|
+
export declare const _DYN_CALL = "call";
|
|
48
46
|
export declare const _DYN_LISTENERS = "listeners";
|
|
49
47
|
export declare const _DYN_IS_CHILD_EVT = "isChildEvt";
|
|
50
48
|
export declare const _DYN_GET_CTX = "getCtx";
|
|
@@ -17,11 +17,12 @@ export { AppInsightsCore } from "./JavaScriptSDK/AppInsightsCore";
|
|
|
17
17
|
export { BaseCore } from "./JavaScriptSDK/BaseCore";
|
|
18
18
|
export { BaseTelemetryPlugin } from "./JavaScriptSDK/BaseTelemetryPlugin";
|
|
19
19
|
export { randomValue, random32, mwcRandomSeed, mwcRandom32, newId } from "./JavaScriptSDK/RandomHelper";
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
20
|
+
export { Undefined, newGuid, perfNow, generateW3CId } from "./JavaScriptSDK/CoreUtils";
|
|
21
|
+
export { normalizeJsName, toISOString, dateNow, getExceptionName, strContains, setValue, getSetValue, proxyAssign, proxyFunctions, proxyFunctionAs, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined, objExtend } from "./JavaScriptSDK/HelperFuncs";
|
|
22
|
+
export { isArray, isTypeof, isUndefined, isNullOrUndefined, objHasOwnProperty as hasOwnProperty, isObject, isFunction, objForEachKey, 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 } from "@nevware21/ts-utils";
|
|
23
|
+
export { EnumValue, createEnumStyle, createValueMap } from "./JavaScriptSDK.Enums/EnumHelperFuncs";
|
|
23
24
|
export { attachEvent, detachEvent, addEventHandler, addEventListeners, addPageUnloadEventListener, addPageHideEventListener, addPageShowEventListener, removeEventHandler, removeEventListeners, removePageUnloadEventListener, removePageHideEventListener, removePageShowEventListener, eventOn, eventOff, mergeEvtNamespace, _IRegisteredEvents, __getRegisteredEvents } from "./JavaScriptSDK/EventHelpers";
|
|
24
|
-
export {
|
|
25
|
+
export { getCrypto, getMsCrypto, getLocation, getPerformance, hasJSON, getJSON, isReactNative, getConsole, isIE, getIEVersion, isSafari, setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported, findMetaTag, findNamedServerTiming } from "./JavaScriptSDK/EnvUtils";
|
|
25
26
|
export { getGlobal, objCreateFn as objCreate, strShimPrototype as strPrototype, strShimFunction as strFunction, strShimUndefined as strUndefined, strShimObject as strObject } from "@microsoft/applicationinsights-shims";
|
|
26
27
|
export { NotificationManager } from "./JavaScriptSDK/NotificationManager";
|
|
27
28
|
export { INotificationManager } from "./JavaScriptSDK.Interfaces/INotificationManager";
|