@microsoft/applicationinsights-core-js 2.7.3-nightly.2201-02 → 2.7.3
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 +40 -30
- 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.d.ts +1 -1
- package/dist/applicationinsights-core-js.js +40 -30
- 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 +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 +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/DbgExtensionUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +24 -17
- package/dist-esm/JavaScriptSDK/HelperFuncs.js.map +1 -1
- package/dist-esm/JavaScriptSDK/InstrumentHooks.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/TelemetryPluginChain.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.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/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/applicationinsights-core-js.js +1 -1
- package/package.json +67 -70
- package/src/JavaScriptSDK/HelperFuncs.ts +23 -15
package/package.json
CHANGED
|
@@ -1,70 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@microsoft/applicationinsights-core-js",
|
|
3
|
-
"author": "Microsoft Application Insights Team",
|
|
4
|
-
"version": "2.7.3
|
|
5
|
-
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
|
-
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"azure",
|
|
9
|
-
"cloud",
|
|
10
|
-
"script errors",
|
|
11
|
-
"microsoft",
|
|
12
|
-
"application insights",
|
|
13
|
-
"browser performance monitoring",
|
|
14
|
-
"web analytics"
|
|
15
|
-
],
|
|
16
|
-
"main": "dist/applicationinsights-core-js.js",
|
|
17
|
-
"module": "dist-esm/applicationinsights-core-js.js",
|
|
18
|
-
"types": "types/applicationinsights-core-js.d.ts",
|
|
19
|
-
"scripts": {
|
|
20
|
-
"clean": "grunt clean",
|
|
21
|
-
"build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
|
|
22
|
-
"build:esm": "grunt core",
|
|
23
|
-
"build:browser": "rollup -c rollup.config.js",
|
|
24
|
-
"rebuild": "npm run build",
|
|
25
|
-
"test": "grunt coreunittest",
|
|
26
|
-
"perftest": "grunt coreperftest",
|
|
27
|
-
"lint": "tslint -p tsconfig.json",
|
|
28
|
-
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights Core Javascript SDK\"",
|
|
29
|
-
"sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js"
|
|
30
|
-
},
|
|
31
|
-
"repository": {
|
|
32
|
-
"type": "git",
|
|
33
|
-
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/shared/AppInsightsCore"
|
|
34
|
-
},
|
|
35
|
-
"license": "MIT",
|
|
36
|
-
"sideEffects": false,
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@microsoft/ai-test-framework": "0.0.1",
|
|
39
|
-
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
|
40
|
-
"@microsoft/applicationinsights-rollup-es3": "1.1.3",
|
|
41
|
-
"@microsoft/api-extractor": "^7.18.1",
|
|
42
|
-
"grunt": "^1.4.1",
|
|
43
|
-
"grunt-cli": "^1.4.3",
|
|
44
|
-
"grunt-contrib-qunit": "^5.0.1",
|
|
45
|
-
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
46
|
-
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
|
47
|
-
"globby": "^11.0.0",
|
|
48
|
-
"magic-string": "^0.25.7",
|
|
49
|
-
"pako": "^2.0.3",
|
|
50
|
-
"@rollup/plugin-commonjs": "^18.0.0",
|
|
51
|
-
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
52
|
-
"@rollup/plugin-replace": "^2.3.3",
|
|
53
|
-
"rollup-plugin-cleanup": "3.2.1",
|
|
54
|
-
"rollup": "^2.32.0",
|
|
55
|
-
"typescript": "^4.3.4",
|
|
56
|
-
"tslib": "^2.0.0",
|
|
57
|
-
"qunit": "^2.11.2",
|
|
58
|
-
"sinon": "^7.3.1"
|
|
59
|
-
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"tslib": "*"
|
|
62
|
-
},
|
|
63
|
-
"dependencies": {
|
|
64
|
-
"@microsoft/applicationinsights-shims": "2.0.
|
|
65
|
-
"@microsoft/dynamicproto-js": "^1.1.4"
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
"tag": "nightly"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@microsoft/applicationinsights-core-js",
|
|
3
|
+
"author": "Microsoft Application Insights Team",
|
|
4
|
+
"version": "2.7.3",
|
|
5
|
+
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
|
+
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"azure",
|
|
9
|
+
"cloud",
|
|
10
|
+
"script errors",
|
|
11
|
+
"microsoft",
|
|
12
|
+
"application insights",
|
|
13
|
+
"browser performance monitoring",
|
|
14
|
+
"web analytics"
|
|
15
|
+
],
|
|
16
|
+
"main": "dist/applicationinsights-core-js.js",
|
|
17
|
+
"module": "dist-esm/applicationinsights-core-js.js",
|
|
18
|
+
"types": "types/applicationinsights-core-js.d.ts",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"clean": "grunt clean",
|
|
21
|
+
"build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
|
|
22
|
+
"build:esm": "grunt core",
|
|
23
|
+
"build:browser": "rollup -c rollup.config.js",
|
|
24
|
+
"rebuild": "npm run build",
|
|
25
|
+
"test": "grunt coreunittest",
|
|
26
|
+
"perftest": "grunt coreperftest",
|
|
27
|
+
"lint": "tslint -p tsconfig.json",
|
|
28
|
+
"dtsgen": "api-extractor run --local && node ../../scripts/dtsgen.js \"Microsoft Application Insights Core Javascript SDK\"",
|
|
29
|
+
"sri": "node ../../tools/subResourceIntegrity/generateIntegrityFile.js"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/microsoft/ApplicationInsights-JS/tree/master/shared/AppInsightsCore"
|
|
34
|
+
},
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"sideEffects": false,
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@microsoft/ai-test-framework": "0.0.1",
|
|
39
|
+
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
|
40
|
+
"@microsoft/applicationinsights-rollup-es3": "1.1.3",
|
|
41
|
+
"@microsoft/api-extractor": "^7.18.1",
|
|
42
|
+
"grunt": "^1.4.1",
|
|
43
|
+
"grunt-cli": "^1.4.3",
|
|
44
|
+
"grunt-contrib-qunit": "^5.0.1",
|
|
45
|
+
"@nevware21/grunt-ts-plugin": "^0.4.3",
|
|
46
|
+
"@nevware21/grunt-eslint-ts": "^0.2.2",
|
|
47
|
+
"globby": "^11.0.0",
|
|
48
|
+
"magic-string": "^0.25.7",
|
|
49
|
+
"pako": "^2.0.3",
|
|
50
|
+
"@rollup/plugin-commonjs": "^18.0.0",
|
|
51
|
+
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
52
|
+
"@rollup/plugin-replace": "^2.3.3",
|
|
53
|
+
"rollup-plugin-cleanup": "3.2.1",
|
|
54
|
+
"rollup": "^2.32.0",
|
|
55
|
+
"typescript": "^4.3.4",
|
|
56
|
+
"tslib": "^2.0.0",
|
|
57
|
+
"qunit": "^2.11.2",
|
|
58
|
+
"sinon": "^7.3.1"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"tslib": "*"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@microsoft/applicationinsights-shims": "2.0.1",
|
|
65
|
+
"@microsoft/dynamicproto-js": "^1.1.4"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -13,6 +13,7 @@ const strAttachEvent = "attachEvent";
|
|
|
13
13
|
const strAddEventHelper = "addEventListener";
|
|
14
14
|
const strDetachEvent = "detachEvent";
|
|
15
15
|
const strRemoveEventListener = "removeEventListener";
|
|
16
|
+
const strToISOString = "toISOString";
|
|
16
17
|
|
|
17
18
|
const _objDefineProperty = ObjDefineProperty;
|
|
18
19
|
const _objFreeze = ObjClass["freeze"];
|
|
@@ -271,24 +272,31 @@ export function isSymbol(value: any): boolean {
|
|
|
271
272
|
* Convert a date to I.S.O. format in IE8
|
|
272
273
|
*/
|
|
273
274
|
export function toISOString(date: Date) {
|
|
274
|
-
if (
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
if (date) {
|
|
276
|
+
if (date[strToISOString]) {
|
|
277
|
+
// For Performance try and use the native instance, using string lookup of the function to easily pass the ES3 build checks and minification
|
|
278
|
+
return date[strToISOString]();
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
if (isDate(date)) {
|
|
282
|
+
const pad = (num: number) => {
|
|
283
|
+
let r = String(num);
|
|
284
|
+
if (r.length === 1) {
|
|
285
|
+
r = "0" + r;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return r;
|
|
279
289
|
}
|
|
280
290
|
|
|
281
|
-
return
|
|
291
|
+
return date.getUTCFullYear()
|
|
292
|
+
+ "-" + pad(date.getUTCMonth() + 1)
|
|
293
|
+
+ "-" + pad(date.getUTCDate())
|
|
294
|
+
+ "T" + pad(date.getUTCHours())
|
|
295
|
+
+ ":" + pad(date.getUTCMinutes())
|
|
296
|
+
+ ":" + pad(date.getUTCSeconds())
|
|
297
|
+
+ "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)
|
|
298
|
+
+ "Z";
|
|
282
299
|
}
|
|
283
|
-
|
|
284
|
-
return date.getUTCFullYear()
|
|
285
|
-
+ "-" + pad(date.getUTCMonth() + 1)
|
|
286
|
-
+ "-" + pad(date.getUTCDate())
|
|
287
|
-
+ "T" + pad(date.getUTCHours())
|
|
288
|
-
+ ":" + pad(date.getUTCMinutes())
|
|
289
|
-
+ ":" + pad(date.getUTCSeconds())
|
|
290
|
-
+ "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)
|
|
291
|
-
+ "Z";
|
|
292
300
|
}
|
|
293
301
|
}
|
|
294
302
|
|