@microsoft/1ds-core-js 3.1.9 → 3.1.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/bundle/{ms.core-3.1.9.gbl.js → ms.core-3.1.10.gbl.js} +107 -36
- package/bundle/ms.core-3.1.10.gbl.js.map +1 -0
- package/bundle/ms.core-3.1.10.gbl.min.js +7 -0
- package/bundle/ms.core-3.1.10.gbl.min.js.map +1 -0
- package/bundle/ms.core-3.1.10.integrity.json +46 -0
- package/bundle/{ms.core-3.1.9.js → ms.core-3.1.10.js} +107 -36
- package/bundle/ms.core-3.1.10.js.map +1 -0
- package/bundle/ms.core-3.1.10.min.js +7 -0
- package/bundle/ms.core-3.1.10.min.js.map +1 -0
- package/bundle/ms.core.gbl.js +106 -35
- package/bundle/ms.core.gbl.js.map +1 -1
- package/bundle/ms.core.gbl.min.js +2 -2
- package/bundle/ms.core.gbl.min.js.map +1 -1
- package/bundle/ms.core.integrity.json +17 -17
- package/bundle/ms.core.js +106 -35
- package/bundle/ms.core.js.map +1 -1
- package/bundle/ms.core.min.js +2 -2
- package/bundle/ms.core.min.js.map +1 -1
- package/dist/ms.core.js +2 -2
- package/dist/ms.core.js.map +1 -1
- package/dist/ms.core.min.js +2 -2
- package/dist/ms.core.min.js.map +1 -1
- package/dist-esm/src/AppInsightsCore.js +1 -1
- package/dist-esm/src/BaseCore.js +1 -1
- package/dist-esm/src/DataModels.js +1 -1
- package/dist-esm/src/ESPromise.js +1 -1
- package/dist-esm/src/ESPromiseScheduler.js +1 -1
- package/dist-esm/src/Enums.js +1 -1
- package/dist-esm/src/Index.js +1 -1
- package/dist-esm/src/Utils.d.ts +1 -1
- package/dist-esm/src/Utils.js +2 -2
- package/dist-esm/src/Utils.js.map +1 -1
- package/dist-esm/src/ValueSanitizer.js +1 -1
- package/package.json +3 -3
- package/bundle/ms.core-3.1.9.gbl.js.map +0 -1
- package/bundle/ms.core-3.1.9.gbl.min.js +0 -7
- package/bundle/ms.core-3.1.9.gbl.min.js.map +0 -1
- package/bundle/ms.core-3.1.9.integrity.json +0 -46
- package/bundle/ms.core-3.1.9.js.map +0 -1
- package/bundle/ms.core-3.1.9.min.js +0 -7
- package/bundle/ms.core-3.1.9.min.js.map +0 -1
package/bundle/ms.core.gbl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* 1DS JS SDK Core, 3.1.
|
|
2
|
+
* 1DS JS SDK Core, 3.1.10
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -18,20 +18,24 @@
|
|
|
18
18
|
var ObjDefineProperty = ObjClass["defineProperty"];
|
|
19
19
|
var ObjHasOwnProperty = ObjProto[strShimHasOwnProperty];
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
var _cachedGlobal = null;
|
|
22
|
+
function getGlobal(useCached) {
|
|
23
|
+
if (useCached === void 0) { useCached = true; }
|
|
24
|
+
if (!_cachedGlobal || !useCached) {
|
|
25
|
+
if (typeof globalThis !== strShimUndefined && globalThis) {
|
|
26
|
+
_cachedGlobal = globalThis;
|
|
27
|
+
}
|
|
28
|
+
if (typeof self !== strShimUndefined && self) {
|
|
29
|
+
_cachedGlobal = self;
|
|
30
|
+
}
|
|
31
|
+
if (typeof window !== strShimUndefined && window) {
|
|
32
|
+
_cachedGlobal = window;
|
|
33
|
+
}
|
|
34
|
+
if (typeof global !== strShimUndefined && global) {
|
|
35
|
+
_cachedGlobal = global;
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
|
-
return
|
|
38
|
+
return _cachedGlobal;
|
|
35
39
|
}
|
|
36
40
|
function throwTypeError(message) {
|
|
37
41
|
throw new TypeError(message);
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
}
|
|
47
51
|
var type = typeof obj;
|
|
48
52
|
if (type !== strShimObject && type !== strShimFunction) {
|
|
49
|
-
throwTypeError(
|
|
53
|
+
throwTypeError("Object prototype may only be an Object:" + obj);
|
|
50
54
|
}
|
|
51
55
|
function tmpFunc() { }
|
|
52
56
|
tmpFunc[strShimPrototype] = obj;
|
|
@@ -441,6 +445,7 @@
|
|
|
441
445
|
var strAddEventHelper = "addEventListener";
|
|
442
446
|
var strDetachEvent = "detachEvent";
|
|
443
447
|
var strRemoveEventListener = "removeEventListener";
|
|
448
|
+
var strToISOString = "toISOString";
|
|
444
449
|
var _objDefineProperty = ObjDefineProperty;
|
|
445
450
|
function objToString(obj) {
|
|
446
451
|
return ObjProto.toString.call(obj);
|
|
@@ -580,22 +585,27 @@
|
|
|
580
585
|
return typeof value === "boolean";
|
|
581
586
|
}
|
|
582
587
|
function toISOString(date) {
|
|
583
|
-
if (
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
588
|
+
if (date) {
|
|
589
|
+
if (date[strToISOString]) {
|
|
590
|
+
return date[strToISOString]();
|
|
591
|
+
}
|
|
592
|
+
if (isDate(date)) {
|
|
593
|
+
var pad = function (num) {
|
|
594
|
+
var r = String(num);
|
|
595
|
+
if (r.length === 1) {
|
|
596
|
+
r = "0" + r;
|
|
597
|
+
}
|
|
598
|
+
return r;
|
|
599
|
+
};
|
|
600
|
+
return date.getUTCFullYear()
|
|
601
|
+
+ "-" + pad(date.getUTCMonth() + 1)
|
|
602
|
+
+ "-" + pad(date.getUTCDate())
|
|
603
|
+
+ "T" + pad(date.getUTCHours())
|
|
604
|
+
+ ":" + pad(date.getUTCMinutes())
|
|
605
|
+
+ ":" + pad(date.getUTCSeconds())
|
|
606
|
+
+ "." + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)
|
|
607
|
+
+ "Z";
|
|
608
|
+
}
|
|
599
609
|
}
|
|
600
610
|
}
|
|
601
611
|
function arrForEach(arr, callbackfn, thisArg) {
|
|
@@ -811,6 +821,7 @@
|
|
|
811
821
|
|
|
812
822
|
var strWindow = "window";
|
|
813
823
|
var strDocument = "document";
|
|
824
|
+
var strDocumentMode = "documentMode";
|
|
814
825
|
var strNavigator = "navigator";
|
|
815
826
|
var strHistory = "history";
|
|
816
827
|
var strLocation = "location";
|
|
@@ -961,7 +972,8 @@
|
|
|
961
972
|
}
|
|
962
973
|
var ua = (userAgentStr || "").toLowerCase();
|
|
963
974
|
if (strContains(ua, strMsie)) {
|
|
964
|
-
|
|
975
|
+
var doc = getDocument() || {};
|
|
976
|
+
return Math.max(parseInt(ua.split(strMsie)[1]), (doc[strDocumentMode] || 0));
|
|
965
977
|
}
|
|
966
978
|
else if (strContains(ua, strTrident)) {
|
|
967
979
|
var tridentVer = parseInt(ua.split(strTrident)[1]);
|
|
@@ -1004,7 +1016,7 @@
|
|
|
1004
1016
|
}
|
|
1005
1017
|
function useXDomainRequest() {
|
|
1006
1018
|
if (_useXDomainRequest === null) {
|
|
1007
|
-
_useXDomainRequest = (typeof XDomainRequest !== undefined);
|
|
1019
|
+
_useXDomainRequest = (typeof XDomainRequest !== "undefined");
|
|
1008
1020
|
if (_useXDomainRequest && isXhrSupported()) {
|
|
1009
1021
|
_useXDomainRequest = _useXDomainRequest && !_hasProperty(getGlobalInst("XMLHttpRequest"), "withCredentials");
|
|
1010
1022
|
}
|
|
@@ -1022,6 +1034,45 @@
|
|
|
1022
1034
|
return isSupported;
|
|
1023
1035
|
}
|
|
1024
1036
|
|
|
1037
|
+
var listenerFuncs = ["eventsSent", "eventsDiscarded", "eventsSendRequest", "perfEvent"];
|
|
1038
|
+
var _aiNamespace = null;
|
|
1039
|
+
var _debugListener;
|
|
1040
|
+
function _listenerProxyFunc(name, config) {
|
|
1041
|
+
return function () {
|
|
1042
|
+
var args = arguments;
|
|
1043
|
+
var dbgExt = getDebugExt(config);
|
|
1044
|
+
if (dbgExt) {
|
|
1045
|
+
var listener = dbgExt.listener;
|
|
1046
|
+
if (listener && listener[name]) {
|
|
1047
|
+
listener[name].apply(listener, args);
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
}
|
|
1052
|
+
function _getExtensionNamespace() {
|
|
1053
|
+
var target = getGlobalInst("Microsoft");
|
|
1054
|
+
if (target) {
|
|
1055
|
+
_aiNamespace = target["ApplicationInsights"];
|
|
1056
|
+
}
|
|
1057
|
+
return _aiNamespace;
|
|
1058
|
+
}
|
|
1059
|
+
function getDebugExt(config) {
|
|
1060
|
+
var ns = _aiNamespace;
|
|
1061
|
+
if (!ns && config.disableDbgExt !== true) {
|
|
1062
|
+
ns = _aiNamespace || _getExtensionNamespace();
|
|
1063
|
+
}
|
|
1064
|
+
return ns ? ns["ChromeDbgExt"] : null;
|
|
1065
|
+
}
|
|
1066
|
+
function getDebugListener(config) {
|
|
1067
|
+
if (!_debugListener) {
|
|
1068
|
+
_debugListener = {};
|
|
1069
|
+
for (var lp = 0; lp < listenerFuncs.length; lp++) {
|
|
1070
|
+
_debugListener[listenerFuncs[lp]] = _listenerProxyFunc(listenerFuncs[lp], config);
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
return _debugListener;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1025
1076
|
var AiNonUserActionablePrefix = "AI (Internal): ";
|
|
1026
1077
|
var AiUserActionablePrefix = "AI: ";
|
|
1027
1078
|
var AIInternalMessagePrefix = "AITR_";
|
|
@@ -1105,13 +1156,18 @@
|
|
|
1105
1156
|
}
|
|
1106
1157
|
_self.logInternalMessage(severity, message);
|
|
1107
1158
|
}
|
|
1159
|
+
else {
|
|
1160
|
+
_debugExtMsg("throw" + (severity === exports.LoggingSeverity.CRITICAL ? "Critical" : "Warning"), message);
|
|
1161
|
+
}
|
|
1108
1162
|
}
|
|
1109
1163
|
};
|
|
1110
1164
|
_self.warnToConsole = function (message) {
|
|
1111
1165
|
_logToConsole("warn", message);
|
|
1166
|
+
_debugExtMsg("warning", message);
|
|
1112
1167
|
};
|
|
1113
1168
|
_self.errorToConsole = function (message) {
|
|
1114
1169
|
_logToConsole("error", message);
|
|
1170
|
+
_debugExtMsg("error", message);
|
|
1115
1171
|
};
|
|
1116
1172
|
_self.resetInternalMessageCount = function () {
|
|
1117
1173
|
_messageCount = 0;
|
|
@@ -1133,12 +1189,18 @@
|
|
|
1133
1189
|
if (severity <= _self.telemetryLoggingLevel()) {
|
|
1134
1190
|
_self.queue.push(message);
|
|
1135
1191
|
_messageCount++;
|
|
1192
|
+
_debugExtMsg((severity === exports.LoggingSeverity.CRITICAL ? "error" : "warn"), message);
|
|
1136
1193
|
}
|
|
1137
1194
|
if (_messageCount === _self.maxInternalMessageLimit()) {
|
|
1138
1195
|
var throttleLimitMessage = "Internal events throttle limit per PageView reached for this app.";
|
|
1139
1196
|
var throttleMessage = new _InternalLogMessage(_InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);
|
|
1140
1197
|
_self.queue.push(throttleMessage);
|
|
1141
|
-
|
|
1198
|
+
if (severity === exports.LoggingSeverity.CRITICAL) {
|
|
1199
|
+
_self.errorToConsole(throttleLimitMessage);
|
|
1200
|
+
}
|
|
1201
|
+
else {
|
|
1202
|
+
_self.warnToConsole(throttleLimitMessage);
|
|
1203
|
+
}
|
|
1142
1204
|
}
|
|
1143
1205
|
}
|
|
1144
1206
|
};
|
|
@@ -1152,6 +1214,12 @@
|
|
|
1152
1214
|
function _areInternalMessagesThrottled() {
|
|
1153
1215
|
return _messageCount >= _self.maxInternalMessageLimit();
|
|
1154
1216
|
}
|
|
1217
|
+
function _debugExtMsg(name, data) {
|
|
1218
|
+
var dbgExt = getDebugExt(config);
|
|
1219
|
+
if (dbgExt && dbgExt.diagLog) {
|
|
1220
|
+
dbgExt.diagLog(name, data);
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1155
1223
|
});
|
|
1156
1224
|
}
|
|
1157
1225
|
return DiagnosticLogger;
|
|
@@ -1940,6 +2008,9 @@
|
|
|
1940
2008
|
_notificationManager = notificationManager;
|
|
1941
2009
|
_self[strNotificationManager] = notificationManager;
|
|
1942
2010
|
_self.config = config || {};
|
|
2011
|
+
if (notificationManager && _self.config.disableDbgExt !== true) {
|
|
2012
|
+
notificationManager.addNotificationListener(getDebugListener(config));
|
|
2013
|
+
}
|
|
1943
2014
|
if (_self.config.enablePerfMgr) {
|
|
1944
2015
|
setValue(_self.config, "createPerfMgr", _createPerfManager);
|
|
1945
2016
|
}
|
|
@@ -2454,7 +2525,7 @@
|
|
|
2454
2525
|
var _ExtendedInternalMessageId = __assignFn(__assignFn({}, _InternalMessageId), { AuthHandShakeError: 501, AuthRedirectFail: 502, BrowserCannotReadLocalStorage: 503, BrowserCannotWriteLocalStorage: 504, BrowserDoesNotSupportLocalStorage: 505, CannotParseBiBlobValue: 506, CannotParseDataAttribute: 507, CVPluginNotAvailable: 508, DroppedEvent: 509, ErrorParsingAISessionCookie: 510, ErrorProvidedChannels: 511, FailedToGetCookies: 512, FailedToInitializeCorrelationVector: 513, FailedToInitializeSDK: 514, InvalidContentBlob: 515, InvalidCorrelationValue: 516, SessionRenewalDateIsZero: 517, SendPostOnCompleteFailure: 518, PostResponseHandler: 519, SDKNotInitialized: 520 });
|
|
2455
2526
|
|
|
2456
2527
|
var _a;
|
|
2457
|
-
var Version = '3.1.
|
|
2528
|
+
var Version = '3.1.10';
|
|
2458
2529
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
2459
2530
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
2460
2531
|
var strWithCredentials = "withCredentials";
|