@microsoft/1ds-core-js 3.1.11 → 3.2.0
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 +1 -1
- package/bundle/{ms.core-3.1.11.gbl.js → ms.core-3.2.0.gbl.js} +2613 -1373
- package/bundle/ms.core-3.2.0.gbl.js.map +1 -0
- package/bundle/ms.core-3.2.0.gbl.min.js +7 -0
- package/bundle/ms.core-3.2.0.gbl.min.js.map +1 -0
- package/bundle/ms.core-3.2.0.integrity.json +46 -0
- package/bundle/{ms.core-3.1.11.js → ms.core-3.2.0.js} +2613 -1373
- package/bundle/ms.core-3.2.0.js.map +1 -0
- package/bundle/ms.core-3.2.0.min.js +7 -0
- package/bundle/ms.core-3.2.0.min.js.map +1 -0
- package/bundle/ms.core.gbl.js +2612 -1372
- 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 +2612 -1372
- 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 +92 -55
- 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 +5 -6
- package/dist-esm/src/AppInsightsCore.js.map +1 -1
- package/dist-esm/src/BaseCore.js +3 -4
- package/dist-esm/src/BaseCore.js.map +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.d.ts +174 -172
- package/dist-esm/src/Enums.js +63 -103
- package/dist-esm/src/Enums.js.map +1 -1
- package/dist-esm/src/Index.d.ts +4 -3
- package/dist-esm/src/Index.js +4 -6
- package/dist-esm/src/Index.js.map +1 -1
- package/dist-esm/src/Utils.d.ts +2 -2
- package/dist-esm/src/Utils.js +12 -13
- package/dist-esm/src/Utils.js.map +1 -1
- package/dist-esm/src/ValueSanitizer.js +1 -1
- package/package.json +3 -3
- package/src/AppInsightsCore.ts +6 -6
- package/src/BaseCore.ts +5 -5
- package/src/Enums.ts +155 -65
- package/src/Index.ts +14 -7
- package/src/Utils.ts +12 -12
- package/bundle/ms.core-3.1.11.gbl.js.map +0 -1
- package/bundle/ms.core-3.1.11.gbl.min.js +0 -7
- package/bundle/ms.core-3.1.11.gbl.min.js.map +0 -1
- package/bundle/ms.core-3.1.11.integrity.json +0 -46
- package/bundle/ms.core-3.1.11.js.map +0 -1
- package/bundle/ms.core-3.1.11.min.js +0 -7
- package/bundle/ms.core-3.1.11.min.js.map +0 -1
package/dist/ms.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* 1DS JS SDK Core, 3.
|
|
2
|
+
* 1DS JS SDK Core, 3.2.0
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
@@ -13,67 +13,88 @@
|
|
|
13
13
|
|
|
14
14
|
var dynamicProto__default = /*#__PURE__*/_interopDefaultLegacy(dynamicProto);
|
|
15
15
|
|
|
16
|
-
var ValueKind = {
|
|
17
|
-
NotSet: 0,
|
|
18
|
-
Pii_DistinguishedName: 1,
|
|
19
|
-
Pii_GenericData: 2,
|
|
20
|
-
Pii_IPV4Address: 3,
|
|
21
|
-
Pii_IPv6Address: 4,
|
|
22
|
-
Pii_MailSubject: 5,
|
|
23
|
-
Pii_PhoneNumber: 6,
|
|
24
|
-
Pii_QueryString: 7,
|
|
25
|
-
Pii_SipAddress: 8,
|
|
26
|
-
Pii_SmtpAddress: 9,
|
|
27
|
-
Pii_Identity: 10,
|
|
28
|
-
Pii_Uri: 11,
|
|
29
|
-
Pii_Fqdn: 12,
|
|
30
|
-
Pii_IPV4AddressLegacy: 13,
|
|
16
|
+
var ValueKind = applicationinsightsCoreJs.createEnumStyle({
|
|
17
|
+
NotSet: 0 ,
|
|
18
|
+
Pii_DistinguishedName: 1 ,
|
|
19
|
+
Pii_GenericData: 2 ,
|
|
20
|
+
Pii_IPV4Address: 3 ,
|
|
21
|
+
Pii_IPv6Address: 4 ,
|
|
22
|
+
Pii_MailSubject: 5 ,
|
|
23
|
+
Pii_PhoneNumber: 6 ,
|
|
24
|
+
Pii_QueryString: 7 ,
|
|
25
|
+
Pii_SipAddress: 8 ,
|
|
26
|
+
Pii_SmtpAddress: 9 ,
|
|
27
|
+
Pii_Identity: 10 ,
|
|
28
|
+
Pii_Uri: 11 ,
|
|
29
|
+
Pii_Fqdn: 12 ,
|
|
30
|
+
Pii_IPV4AddressLegacy: 13 ,
|
|
31
31
|
CustomerContent_GenericContent: 32
|
|
32
|
-
};
|
|
33
|
-
var EventLatency = {
|
|
32
|
+
});
|
|
33
|
+
var EventLatency = applicationinsightsCoreJs.createEnumStyle({
|
|
34
34
|
Normal: 1 ,
|
|
35
35
|
CostDeferred: 2 ,
|
|
36
36
|
RealTime: 3 ,
|
|
37
37
|
Immediate: 4
|
|
38
|
-
};
|
|
39
|
-
var EventPropertyType = {
|
|
40
|
-
Unspecified: 0,
|
|
41
|
-
String: 1,
|
|
42
|
-
Int32: 2,
|
|
43
|
-
UInt32: 3,
|
|
44
|
-
Int64: 4,
|
|
45
|
-
UInt64: 5,
|
|
46
|
-
Double: 6,
|
|
47
|
-
Bool: 7,
|
|
48
|
-
Guid: 8,
|
|
38
|
+
});
|
|
39
|
+
var EventPropertyType = applicationinsightsCoreJs.createEnumStyle({
|
|
40
|
+
Unspecified: 0 ,
|
|
41
|
+
String: 1 ,
|
|
42
|
+
Int32: 2 ,
|
|
43
|
+
UInt32: 3 ,
|
|
44
|
+
Int64: 4 ,
|
|
45
|
+
UInt64: 5 ,
|
|
46
|
+
Double: 6 ,
|
|
47
|
+
Bool: 7 ,
|
|
48
|
+
Guid: 8 ,
|
|
49
49
|
DateTime: 9
|
|
50
|
-
};
|
|
51
|
-
var EventPersistence = {
|
|
50
|
+
});
|
|
51
|
+
var EventPersistence = applicationinsightsCoreJs.createEnumStyle({
|
|
52
52
|
Normal: 1 ,
|
|
53
53
|
Critical: 2
|
|
54
|
-
};
|
|
55
|
-
var TraceLevel = {
|
|
56
|
-
NONE: 0,
|
|
57
|
-
ERROR: 1,
|
|
58
|
-
WARNING: 2,
|
|
54
|
+
});
|
|
55
|
+
var TraceLevel = applicationinsightsCoreJs.createEnumStyle({
|
|
56
|
+
NONE: 0 ,
|
|
57
|
+
ERROR: 1 ,
|
|
58
|
+
WARNING: 2 ,
|
|
59
59
|
INFORMATION: 3
|
|
60
|
-
};
|
|
61
|
-
var _ExtendedInternalMessageId = applicationinsightsShims.__assignFn(applicationinsightsShims.__assignFn({}, applicationinsightsCoreJs._InternalMessageId), {
|
|
60
|
+
});
|
|
61
|
+
var _ExtendedInternalMessageId = applicationinsightsCoreJs.objFreeze(applicationinsightsShims.__assignFn(applicationinsightsShims.__assignFn({}, applicationinsightsCoreJs._InternalMessageId), applicationinsightsCoreJs.createEnumStyle({
|
|
62
|
+
AuthHandShakeError: 501 ,
|
|
63
|
+
AuthRedirectFail: 502 ,
|
|
64
|
+
BrowserCannotReadLocalStorage: 503 ,
|
|
65
|
+
BrowserCannotWriteLocalStorage: 504 ,
|
|
66
|
+
BrowserDoesNotSupportLocalStorage: 505 ,
|
|
67
|
+
CannotParseBiBlobValue: 506 ,
|
|
68
|
+
CannotParseDataAttribute: 507 ,
|
|
69
|
+
CVPluginNotAvailable: 508 ,
|
|
70
|
+
DroppedEvent: 509 ,
|
|
71
|
+
ErrorParsingAISessionCookie: 510 ,
|
|
72
|
+
ErrorProvidedChannels: 511 ,
|
|
73
|
+
FailedToGetCookies: 512 ,
|
|
74
|
+
FailedToInitializeCorrelationVector: 513 ,
|
|
75
|
+
FailedToInitializeSDK: 514 ,
|
|
76
|
+
InvalidContentBlob: 515 ,
|
|
77
|
+
InvalidCorrelationValue: 516 ,
|
|
78
|
+
SessionRenewalDateIsZero: 517 ,
|
|
79
|
+
SendPostOnCompleteFailure: 518 ,
|
|
80
|
+
PostResponseHandler: 519 ,
|
|
81
|
+
SDKNotInitialized: 520
|
|
82
|
+
})));
|
|
62
83
|
|
|
63
84
|
var _a;
|
|
64
|
-
var Version = '3.
|
|
85
|
+
var Version = '3.2.0';
|
|
65
86
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
66
87
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
67
88
|
var strWithCredentials = "withCredentials";
|
|
68
89
|
var strTimeout = "timeout";
|
|
69
90
|
var _fieldTypeEventPropMap = (_a = {},
|
|
70
|
-
_a[0 ] =
|
|
71
|
-
_a[2 ] =
|
|
72
|
-
_a[1 ] =
|
|
73
|
-
_a[3 ] =
|
|
74
|
-
_a[4096 | 2 ] =
|
|
75
|
-
_a[4096 | 1 ] =
|
|
76
|
-
_a[4096 | 3 ] =
|
|
91
|
+
_a[0 ] = 0 ,
|
|
92
|
+
_a[2 ] = 6 ,
|
|
93
|
+
_a[1 ] = 1 ,
|
|
94
|
+
_a[3 ] = 7 ,
|
|
95
|
+
_a[4096 | 2 ] = 6 ,
|
|
96
|
+
_a[4096 | 1 ] = 1 ,
|
|
97
|
+
_a[4096 | 3 ] = 7 ,
|
|
77
98
|
_a);
|
|
78
99
|
var uInt8ArraySupported = null;
|
|
79
100
|
var isDocumentObjectAvailable = Boolean(applicationinsightsCoreJs.getDocument());
|
|
@@ -97,7 +118,7 @@
|
|
|
97
118
|
return uInt8ArraySupported;
|
|
98
119
|
}
|
|
99
120
|
function isLatency(value) {
|
|
100
|
-
if (value && applicationinsightsCoreJs.isNumber(value) && value >=
|
|
121
|
+
if (value && applicationinsightsCoreJs.isNumber(value) && value >= 1 && value <= 4 ) {
|
|
101
122
|
return true;
|
|
102
123
|
}
|
|
103
124
|
return false;
|
|
@@ -153,7 +174,7 @@
|
|
|
153
174
|
if (encodedTypeValue !== -1 && propType !== -1) {
|
|
154
175
|
encodedTypeValue |= propType;
|
|
155
176
|
}
|
|
156
|
-
else if (propType ===
|
|
177
|
+
else if (propType === 6 ) {
|
|
157
178
|
encodedTypeValue = propType;
|
|
158
179
|
}
|
|
159
180
|
}
|
|
@@ -243,7 +264,7 @@
|
|
|
243
264
|
}
|
|
244
265
|
var getTime = applicationinsightsCoreJs.perfNow;
|
|
245
266
|
function isValueKind(value) {
|
|
246
|
-
if (value ===
|
|
267
|
+
if (value === 0 || ((value > 0 && value <= 13 ) || value === 32 )) {
|
|
247
268
|
return true;
|
|
248
269
|
}
|
|
249
270
|
return false;
|
|
@@ -426,7 +447,7 @@
|
|
|
426
447
|
_this.pluginVersionString = "";
|
|
427
448
|
dynamicProto__default(AppInsightsCore, _this, function (_self, _base) {
|
|
428
449
|
if (!_self.logger || !_self.logger.queue) {
|
|
429
|
-
_self.logger = new applicationinsightsCoreJs.DiagnosticLogger({ loggingLevelConsole:
|
|
450
|
+
_self.logger = new applicationinsightsCoreJs.DiagnosticLogger({ loggingLevelConsole: 1 });
|
|
430
451
|
}
|
|
431
452
|
_self.initialize = function (config, extensions, logger, notificationManager) {
|
|
432
453
|
applicationinsightsCoreJs.doPerf(_self, function () { return "AppInsightsCore.initialize"; }, function () {
|
|
@@ -473,7 +494,7 @@
|
|
|
473
494
|
if (message.indexOf("channels") !== -1) {
|
|
474
495
|
message += "\n - Channels must be provided through config.channels only!";
|
|
475
496
|
}
|
|
476
|
-
logger_1.throwInternal(
|
|
497
|
+
logger_1.throwInternal(1 , 514 , "SDK Initialization Failed - no telemetry will be sent: " + message);
|
|
477
498
|
}
|
|
478
499
|
}, function () { return ({ config: config, extensions: extensions, logger: logger, notificationManager: notificationManager }); });
|
|
479
500
|
};
|
|
@@ -484,7 +505,7 @@
|
|
|
484
505
|
telemetryItem.timings = telemetryItem.timings || {};
|
|
485
506
|
telemetryItem.timings.trackStart = getTime();
|
|
486
507
|
if (!isLatency(telemetryItem.latency)) {
|
|
487
|
-
telemetryItem.latency =
|
|
508
|
+
telemetryItem.latency = 1 ;
|
|
488
509
|
}
|
|
489
510
|
var itemExt = telemetryItem.ext = telemetryItem.ext || {};
|
|
490
511
|
itemExt.sdk = itemExt.sdk || {};
|
|
@@ -526,7 +547,7 @@
|
|
|
526
547
|
_base.initialize(config, extensions, logger, notificationManager);
|
|
527
548
|
}
|
|
528
549
|
catch (e) {
|
|
529
|
-
_self.logger
|
|
550
|
+
applicationinsightsCoreJs._throwInternal(_self.logger, 1 , 514 , "Initialization Failed: " + applicationinsightsCoreJs.dumpObj(e) + "\n - Note: Channels must be provided through config.channels only");
|
|
530
551
|
}
|
|
531
552
|
};
|
|
532
553
|
_self.track = function (item) {
|
|
@@ -1127,6 +1148,8 @@
|
|
|
1127
1148
|
exports.Undefined = applicationinsightsCoreJs.strUndefined;
|
|
1128
1149
|
exports._InternalLogMessage = applicationinsightsCoreJs._InternalLogMessage;
|
|
1129
1150
|
exports._InternalMessageId = applicationinsightsCoreJs._InternalMessageId;
|
|
1151
|
+
exports.__getRegisteredEvents = applicationinsightsCoreJs.__getRegisteredEvents;
|
|
1152
|
+
exports._throwInternal = applicationinsightsCoreJs._throwInternal;
|
|
1130
1153
|
exports.addEventHandler = applicationinsightsCoreJs.addEventHandler;
|
|
1131
1154
|
exports.addEventListeners = applicationinsightsCoreJs.addEventListeners;
|
|
1132
1155
|
exports.addPageHideEventListener = applicationinsightsCoreJs.addPageHideEventListener;
|
|
@@ -1140,11 +1163,17 @@
|
|
|
1140
1163
|
exports.attachEvent = applicationinsightsCoreJs.attachEvent;
|
|
1141
1164
|
exports.cookieAvailable = applicationinsightsCoreJs.areCookiesSupported;
|
|
1142
1165
|
exports.createCookieMgr = applicationinsightsCoreJs.createCookieMgr;
|
|
1166
|
+
exports.createEnumStyle = applicationinsightsCoreJs.createEnumStyle;
|
|
1167
|
+
exports.createProcessTelemetryContext = applicationinsightsCoreJs.createProcessTelemetryContext;
|
|
1168
|
+
exports.createUniqueNamespace = applicationinsightsCoreJs.createUniqueNamespace;
|
|
1169
|
+
exports.createUnloadHandlerContainer = applicationinsightsCoreJs.createUnloadHandlerContainer;
|
|
1143
1170
|
exports.dateNow = applicationinsightsCoreJs.dateNow;
|
|
1144
1171
|
exports.detachEvent = applicationinsightsCoreJs.detachEvent;
|
|
1145
1172
|
exports.disallowsSameSiteNone = applicationinsightsCoreJs.uaDisallowsSameSiteNone;
|
|
1146
1173
|
exports.doPerf = applicationinsightsCoreJs.doPerf;
|
|
1147
1174
|
exports.dumpObj = applicationinsightsCoreJs.dumpObj;
|
|
1175
|
+
exports.eventOff = applicationinsightsCoreJs.eventOff;
|
|
1176
|
+
exports.eventOn = applicationinsightsCoreJs.eventOn;
|
|
1148
1177
|
exports.generateW3CId = applicationinsightsCoreJs.generateW3CId;
|
|
1149
1178
|
exports.getConsole = applicationinsightsCoreJs.getConsole;
|
|
1150
1179
|
exports.getCrypto = applicationinsightsCoreJs.getCrypto;
|
|
@@ -1186,27 +1215,35 @@
|
|
|
1186
1215
|
exports.isTypeof = applicationinsightsCoreJs.isTypeof;
|
|
1187
1216
|
exports.isUndefined = applicationinsightsCoreJs.isUndefined;
|
|
1188
1217
|
exports.isXhrSupported = applicationinsightsCoreJs.isXhrSupported;
|
|
1218
|
+
exports.mergeEvtNamespace = applicationinsightsCoreJs.mergeEvtNamespace;
|
|
1189
1219
|
exports.newGuid = applicationinsightsCoreJs.newGuid;
|
|
1190
1220
|
exports.newId = applicationinsightsCoreJs.newId;
|
|
1191
1221
|
exports.normalizeJsName = applicationinsightsCoreJs.normalizeJsName;
|
|
1192
1222
|
exports.objCreate = applicationinsightsCoreJs.objCreate;
|
|
1193
1223
|
exports.objDefineAccessors = applicationinsightsCoreJs.objDefineAccessors;
|
|
1194
1224
|
exports.objForEachKey = applicationinsightsCoreJs.objForEachKey;
|
|
1225
|
+
exports.objFreeze = applicationinsightsCoreJs.objFreeze;
|
|
1195
1226
|
exports.objKeys = applicationinsightsCoreJs.objKeys;
|
|
1227
|
+
exports.objSeal = applicationinsightsCoreJs.objSeal;
|
|
1196
1228
|
exports.optimizeObject = applicationinsightsCoreJs.optimizeObject;
|
|
1197
1229
|
exports.perfNow = applicationinsightsCoreJs.perfNow;
|
|
1198
1230
|
exports.proxyAssign = applicationinsightsCoreJs.proxyAssign;
|
|
1231
|
+
exports.proxyFunctionAs = applicationinsightsCoreJs.proxyFunctionAs;
|
|
1232
|
+
exports.proxyFunctions = applicationinsightsCoreJs.proxyFunctions;
|
|
1199
1233
|
exports.random32 = applicationinsightsCoreJs.random32;
|
|
1200
1234
|
exports.randomValue = applicationinsightsCoreJs.randomValue;
|
|
1235
|
+
exports.removeEventHandler = applicationinsightsCoreJs.removeEventHandler;
|
|
1236
|
+
exports.removeEventListeners = applicationinsightsCoreJs.removeEventListeners;
|
|
1237
|
+
exports.removePageHideEventListener = applicationinsightsCoreJs.removePageHideEventListener;
|
|
1238
|
+
exports.removePageShowEventListener = applicationinsightsCoreJs.removePageShowEventListener;
|
|
1239
|
+
exports.removePageUnloadEventListener = applicationinsightsCoreJs.removePageUnloadEventListener;
|
|
1201
1240
|
exports.safeGetCookieMgr = applicationinsightsCoreJs.safeGetCookieMgr;
|
|
1202
1241
|
exports.safeGetLogger = applicationinsightsCoreJs.safeGetLogger;
|
|
1203
1242
|
exports.setEnableEnvMocks = applicationinsightsCoreJs.setEnableEnvMocks;
|
|
1204
1243
|
exports.setValue = applicationinsightsCoreJs.setValue;
|
|
1205
1244
|
exports.strContains = applicationinsightsCoreJs.strContains;
|
|
1206
1245
|
exports.strEndsWith = applicationinsightsCoreJs.strEndsWith;
|
|
1207
|
-
exports.strExtensionConfig = applicationinsightsCoreJs.strExtensionConfig;
|
|
1208
1246
|
exports.strFunction = applicationinsightsCoreJs.strFunction;
|
|
1209
|
-
exports.strIKey = applicationinsightsCoreJs.strIKey;
|
|
1210
1247
|
exports.strObject = applicationinsightsCoreJs.strObject;
|
|
1211
1248
|
exports.strPrototype = applicationinsightsCoreJs.strPrototype;
|
|
1212
1249
|
exports.strStartsWith = applicationinsightsCoreJs.strStartsWith;
|