@microsoft/applicationinsights-core-js 2.7.2-nightly.2111-08 → 2.7.2-nightly.2111-09
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/CONTRIBUTING.md +14 -0
- package/Tests/Perf/src/CorePerfCheck.Tests.ts +828 -0
- package/Tests/Perf/src/aiperftests.ts +6 -0
- package/Tests/Perf/tsconfig.json +17 -0
- package/Tests/PerfTests.html +54 -0
- package/Tests/Unit/src/AppInsightsCoreSize.Tests.ts +59 -0
- package/Tests/Unit/src/ApplicationInsightsCore.Tests.ts +1015 -0
- package/Tests/Unit/src/CookieManager.Tests.ts +477 -0
- package/Tests/Unit/src/HelperFunc.Tests.ts +59 -0
- package/Tests/Unit/src/aiunittests.ts +13 -0
- package/Tests/UnitTests.html +48 -0
- package/Tests/tsconfig.json +17 -0
- package/api-extractor.json +361 -0
- package/applicationinsights-core-js.build.error.log +205 -0
- package/applicationinsights-core-js.build.log +612 -0
- package/browser/applicationinsights-core-js.integrity.json +9 -9
- package/browser/applicationinsights-core-js.js +1 -1
- 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.api.json +1 -1
- package/dist/applicationinsights-core-js.d.ts +1 -1
- package/dist/applicationinsights-core-js.js +1 -1
- 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 +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/DiagnosticLogger.js +1 -1
- package/dist-esm/JavaScriptSDK/EnvUtils.js +1 -1
- package/dist-esm/JavaScriptSDK/HelperFuncs.js +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/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/microsoft-applicationinsights-core-js-2.7.2-nightly.2111-09.tgz +0 -0
- package/package.json +1 -1
- package/rollup.config.js +138 -0
- package/src/applicationinsights-core-js.ts +59 -0
- package/temp/applicationinsights-core-js.api.md +934 -0
- package/tslint.json +5 -0
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { __extendsFn as __extends } from "@microsoft/applicationinsights-shims";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import { _InternalMessageId, LoggingSeverity } from "../JavaScriptSDK.Enums/LoggingEnums";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-
|
|
2
|
+
* Application Insights JavaScript SDK - Core, 2.7.2-nightly.2111-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
export { MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
|
|
Binary file
|
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.7.2-nightly.2111-
|
|
4
|
+
"version": "2.7.2-nightly.2111-09",
|
|
5
5
|
"description": "Microsoft Application Insights Core Javascript SDK",
|
|
6
6
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
7
7
|
"keywords": [
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
2
|
+
import { uglify } from "@microsoft/applicationinsights-rollup-plugin-uglify3-js";
|
|
3
|
+
import replace from "@rollup/plugin-replace";
|
|
4
|
+
import cleanup from "rollup-plugin-cleanup";
|
|
5
|
+
import dynamicRemove from "@microsoft/dynamicproto-js/tools/rollup/node/removedynamic";
|
|
6
|
+
import { es3Poly, es3Check, importCheck } from "@microsoft/applicationinsights-rollup-es3";
|
|
7
|
+
import { updateDistEsmFiles } from "../../tools/updateDistEsm/updateDistEsm";
|
|
8
|
+
|
|
9
|
+
const version = require("./package.json").version;
|
|
10
|
+
const outputName = "applicationinsights-core-js";
|
|
11
|
+
const banner = [
|
|
12
|
+
"/*!",
|
|
13
|
+
` * Application Insights JavaScript SDK - Core, ${version}`,
|
|
14
|
+
" * Copyright (c) Microsoft and contributors. All rights reserved.",
|
|
15
|
+
" */"
|
|
16
|
+
].join("\n");
|
|
17
|
+
|
|
18
|
+
const replaceValues = {
|
|
19
|
+
"// Copyright (c) Microsoft Corporation. All rights reserved.": "",
|
|
20
|
+
"// Licensed under the MIT License.": ""
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function doCleanup() {
|
|
24
|
+
return cleanup({
|
|
25
|
+
comments: [
|
|
26
|
+
'some',
|
|
27
|
+
/^.\s*@DynamicProtoStub/i,
|
|
28
|
+
/^\*\*\s*@class\s*$/
|
|
29
|
+
]
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const browserRollupConfigFactory = isProduction => {
|
|
34
|
+
const browserRollupConfig = {
|
|
35
|
+
input: `dist-esm/${outputName}.js`,
|
|
36
|
+
output: {
|
|
37
|
+
file: `browser/${outputName}.js`,
|
|
38
|
+
banner: banner,
|
|
39
|
+
format: "umd",
|
|
40
|
+
name: "Microsoft.ApplicationInsights",
|
|
41
|
+
extend: true,
|
|
42
|
+
freeze: false,
|
|
43
|
+
sourcemap: true
|
|
44
|
+
},
|
|
45
|
+
plugins: [
|
|
46
|
+
dynamicRemove(),
|
|
47
|
+
replace({
|
|
48
|
+
preventAssignment: true,
|
|
49
|
+
delimiters: ["", ""],
|
|
50
|
+
values: replaceValues
|
|
51
|
+
}),
|
|
52
|
+
importCheck({ exclude: [ "applicationinsights-core-js" ] }),
|
|
53
|
+
nodeResolve({
|
|
54
|
+
module: true,
|
|
55
|
+
browser: true,
|
|
56
|
+
preferBuiltins: false
|
|
57
|
+
}),
|
|
58
|
+
doCleanup(),
|
|
59
|
+
es3Poly(),
|
|
60
|
+
es3Check()
|
|
61
|
+
]
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
if (isProduction) {
|
|
65
|
+
browserRollupConfig.output.file = `browser/${outputName}.min.js`;
|
|
66
|
+
browserRollupConfig.plugins.push(
|
|
67
|
+
uglify({
|
|
68
|
+
ie8: true,
|
|
69
|
+
compress: {
|
|
70
|
+
passes:3,
|
|
71
|
+
unsafe: true,
|
|
72
|
+
},
|
|
73
|
+
output: {
|
|
74
|
+
preamble: banner,
|
|
75
|
+
webkit:true
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return browserRollupConfig;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const nodeUmdRollupConfigFactory = (isProduction) => {
|
|
85
|
+
const nodeRollupConfig = {
|
|
86
|
+
input: `dist-esm/${outputName}.js`,
|
|
87
|
+
output: {
|
|
88
|
+
file: `dist/${outputName}.js`,
|
|
89
|
+
banner: banner,
|
|
90
|
+
format: "umd",
|
|
91
|
+
name: "Microsoft.ApplicationInsights",
|
|
92
|
+
extend: true,
|
|
93
|
+
freeze: false,
|
|
94
|
+
sourcemap: true
|
|
95
|
+
},
|
|
96
|
+
plugins: [
|
|
97
|
+
dynamicRemove(),
|
|
98
|
+
replace({
|
|
99
|
+
preventAssignment: true,
|
|
100
|
+
delimiters: ["", ""],
|
|
101
|
+
values: replaceValues
|
|
102
|
+
}),
|
|
103
|
+
importCheck({ exclude: [ "applicationinsights-core-js" ] }),
|
|
104
|
+
nodeResolve(),
|
|
105
|
+
doCleanup(),
|
|
106
|
+
es3Poly(),
|
|
107
|
+
es3Check()
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
if (isProduction) {
|
|
112
|
+
nodeRollupConfig.output.file = `dist/${outputName}.min.js`;
|
|
113
|
+
nodeRollupConfig.plugins.push(
|
|
114
|
+
uglify({
|
|
115
|
+
ie8: true,
|
|
116
|
+
compress: {
|
|
117
|
+
passes:3,
|
|
118
|
+
unsafe: true,
|
|
119
|
+
},
|
|
120
|
+
output: {
|
|
121
|
+
preamble: banner,
|
|
122
|
+
webkit:true
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return nodeRollupConfig;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
updateDistEsmFiles(replaceValues, banner);
|
|
132
|
+
|
|
133
|
+
export default [
|
|
134
|
+
nodeUmdRollupConfigFactory(true),
|
|
135
|
+
nodeUmdRollupConfigFactory(false),
|
|
136
|
+
browserRollupConfigFactory(true),
|
|
137
|
+
browserRollupConfigFactory(false)
|
|
138
|
+
];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export { IConfiguration } from "./JavaScriptSDK.Interfaces/IConfiguration";
|
|
4
|
+
export { IChannelControls, MinChannelPriorty } from "./JavaScriptSDK.Interfaces/IChannelControls";
|
|
5
|
+
export { ITelemetryPlugin, IPlugin } from "./JavaScriptSDK.Interfaces/ITelemetryPlugin";
|
|
6
|
+
export { IAppInsightsCore } from "./JavaScriptSDK.Interfaces/IAppInsightsCore";
|
|
7
|
+
export { ITelemetryItem, ICustomProperties, Tags } from "./JavaScriptSDK.Interfaces/ITelemetryItem";
|
|
8
|
+
export { IProcessTelemetryContext } from "./JavaScriptSDK.Interfaces/IProcessTelemetryContext";
|
|
9
|
+
export { INotificationListener } from "./JavaScriptSDK.Interfaces/INotificationListener";
|
|
10
|
+
export { ITelemetryPluginChain } from "./JavaScriptSDK.Interfaces/ITelemetryPluginChain";
|
|
11
|
+
export { IDiagnosticLogger } from "./JavaScriptSDK.Interfaces/IDiagnosticLogger";
|
|
12
|
+
export { InstrumentorHooksCallback, IInstrumentHooksCallbacks, IInstrumentHooks, IInstrumentHook, IInstrumentCallDetails } from "./JavaScriptSDK.Interfaces/IInstrumentHooks";
|
|
13
|
+
export { EventsDiscardedReason } from "./JavaScriptSDK.Enums/EventsDiscardedReason";
|
|
14
|
+
export { SendRequestReason } from "./JavaScriptSDK.Enums/SendRequestReason";
|
|
15
|
+
export { AppInsightsCore } from "./JavaScriptSDK/AppInsightsCore";
|
|
16
|
+
export { BaseCore } from "./JavaScriptSDK/BaseCore";
|
|
17
|
+
export { BaseTelemetryPlugin } from "./JavaScriptSDK/BaseTelemetryPlugin";
|
|
18
|
+
export { randomValue, random32, mwcRandomSeed, mwcRandom32 } from "./JavaScriptSDK/RandomHelper";
|
|
19
|
+
export {
|
|
20
|
+
CoreUtils, ICoreUtils, EventHelper, IEventHelper, Undefined, addEventHandler, newGuid, perfNow, newId, generateW3CId,
|
|
21
|
+
disableCookies, canUseCookies, getCookie, setCookie, deleteCookie, _legacyCookieMgr, addEventListeners, addPageUnloadEventListener,
|
|
22
|
+
addPageHideEventListener, addPageShowEventListener
|
|
23
|
+
} from "./JavaScriptSDK/CoreUtils";
|
|
24
|
+
export {
|
|
25
|
+
isTypeof, isUndefined, isNullOrUndefined, hasOwnProperty, isObject, isFunction, attachEvent, detachEvent, normalizeJsName,
|
|
26
|
+
objForEachKey, strEndsWith, strStartsWith, isDate, isArray, isError, isString, isNumber, isBoolean, toISOString, arrForEach, arrIndexOf,
|
|
27
|
+
arrMap, arrReduce, strTrim, objKeys, objDefineAccessors, dateNow, getExceptionName, throwError, strContains, isSymbol,
|
|
28
|
+
setValue, getSetValue, isNotTruthy, isTruthy, proxyAssign, createClassFromInterface, optimizeObject, isNotUndefined, isNotNullOrUndefined,
|
|
29
|
+
objFreeze, objSeal
|
|
30
|
+
} from "./JavaScriptSDK/HelperFuncs";
|
|
31
|
+
export {
|
|
32
|
+
getGlobalInst, hasWindow, getWindow, hasDocument, getDocument, getCrypto, getMsCrypto,
|
|
33
|
+
hasNavigator, getNavigator, hasHistory, getHistory, getLocation, getPerformance, hasJSON, getJSON,
|
|
34
|
+
isReactNative, getConsole, dumpObj, isIE, getIEVersion, isSafari,
|
|
35
|
+
setEnableEnvMocks, isBeaconsSupported, isFetchSupported, useXDomainRequest, isXhrSupported
|
|
36
|
+
} from "./JavaScriptSDK/EnvUtils";
|
|
37
|
+
export {
|
|
38
|
+
getGlobal,
|
|
39
|
+
objCreateFn as objCreate,
|
|
40
|
+
strShimPrototype as strPrototype,
|
|
41
|
+
strShimFunction as strFunction,
|
|
42
|
+
strShimUndefined as strUndefined,
|
|
43
|
+
strShimObject as strObject
|
|
44
|
+
} from "@microsoft/applicationinsights-shims";
|
|
45
|
+
export { NotificationManager } from "./JavaScriptSDK/NotificationManager";
|
|
46
|
+
export { INotificationManager } from "./JavaScriptSDK.Interfaces/INotificationManager";
|
|
47
|
+
export { IPerfEvent } from "./JavaScriptSDK.Interfaces/IPerfEvent";
|
|
48
|
+
export { IPerfManager, IPerfManagerProvider } from "./JavaScriptSDK.Interfaces/IPerfManager";
|
|
49
|
+
export { PerfEvent, PerfManager, doPerf, getGblPerfMgr, setGblPerfMgr } from "./JavaScriptSDK/PerfManager";
|
|
50
|
+
export { safeGetLogger, DiagnosticLogger, _InternalLogMessage } from "./JavaScriptSDK/DiagnosticLogger";
|
|
51
|
+
export { ProcessTelemetryContext } from "./JavaScriptSDK/ProcessTelemetryContext";
|
|
52
|
+
export { initializePlugins, sortPlugins } from "./JavaScriptSDK/TelemetryHelpers";
|
|
53
|
+
export { _InternalMessageId, LoggingSeverity } from "./JavaScriptSDK.Enums/LoggingEnums";
|
|
54
|
+
export { InstrumentProto, InstrumentProtos, InstrumentFunc, InstrumentFuncs } from "./JavaScriptSDK/InstrumentHooks";
|
|
55
|
+
export { ICookieMgr, ICookieMgrConfig } from "./JavaScriptSDK.Interfaces/ICookieMgr";
|
|
56
|
+
export {
|
|
57
|
+
createCookieMgr, safeGetCookieMgr, uaDisallowsSameSiteNone, areCookiesSupported
|
|
58
|
+
} from "./JavaScriptSDK/CookieMgr";
|
|
59
|
+
export { strIKey, strExtensionConfig } from "./JavaScriptSDK/Constants";
|