@microsoft/1ds-core-js 4.3.0-nightly3.2406-07 → 4.3.0-nightly3.2406-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/bundle/es5/{ms.core-4.3.0-nightly3.2406-07.gbl.js → ms.core-4.3.0-nightly3.2406-09.gbl.js} +261 -76
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-09.gbl.js.map +1 -0
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-09.gbl.min.js +7 -0
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-09.gbl.min.js.map +1 -0
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-09.integrity.json +46 -0
- package/bundle/es5/{ms.core-4.3.0-nightly3.2406-07.js → ms.core-4.3.0-nightly3.2406-09.js} +261 -76
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-09.js.map +1 -0
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-09.min.js +7 -0
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-09.min.js.map +1 -0
- package/bundle/es5/ms.core.gbl.js +260 -75
- package/bundle/es5/ms.core.gbl.js.map +1 -1
- package/bundle/es5/ms.core.gbl.min.js +2 -2
- package/bundle/es5/ms.core.gbl.min.js.map +1 -1
- package/bundle/es5/ms.core.integrity.json +17 -17
- package/bundle/es5/ms.core.js +260 -75
- package/bundle/es5/ms.core.js.map +1 -1
- package/bundle/es5/ms.core.min.js +2 -2
- package/bundle/es5/ms.core.min.js.map +1 -1
- package/dist/es5/ms.core.js +258 -73
- package/dist/es5/ms.core.js.map +1 -1
- package/dist/es5/ms.core.min.js +2 -2
- package/dist/es5/ms.core.min.js.map +1 -1
- package/dist-es5/AppInsightsCore.js +1 -1
- package/dist-es5/BaseCore.js +1 -1
- package/dist-es5/DataModels.js +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/Index.js +1 -1
- package/dist-es5/InternalConstants.js +1 -1
- package/dist-es5/Utils.js +2 -2
- package/dist-es5/Utils.js.map +1 -1
- package/dist-es5/ValueSanitizer.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/package.json +2 -2
- package/types/1ds-core-js.d.ts +2 -2
- package/types/1ds-core-js.namespaced.d.ts +70 -8
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-07.gbl.js.map +0 -1
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-07.gbl.min.js +0 -7
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-07.gbl.min.js.map +0 -1
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-07.integrity.json +0 -46
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-07.js.map +0 -1
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-07.min.js +0 -7
- package/bundle/es5/ms.core-4.3.0-nightly3.2406-07.min.js.map +0 -1
package/bundle/es5/{ms.core-4.3.0-nightly3.2406-07.gbl.js → ms.core-4.3.0-nightly3.2406-09.gbl.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* 1DS JS SDK Core, 4.3.0-nightly3.2406-
|
|
2
|
+
* 1DS JS SDK Core, 4.3.0-nightly3.2406-09
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
* (Microsoft Internal Only)
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
7
7
|
var undef = "undefined";
|
|
8
|
-
var nsKey, key, nm, theExports = {}, modName = "
|
|
9
|
-
var mods={}, modDetail=mods[modName]={}, ver="4.3.0-nightly3.2406-
|
|
8
|
+
var nsKey, key, nm, theExports = {}, modName = "es5_ms_core_4_3_0_nightly3_2406_09", msMod="__ms$mod__";
|
|
9
|
+
var mods={}, modDetail=mods[modName]={}, ver="4.3.0-nightly3.2406-09";
|
|
10
10
|
// Versioned namespace "oneDS4"
|
|
11
11
|
var exportNs=global, nsKey="oneDS4", exportNs=exportNs[nsKey]=(exportNs[nsKey]||{});
|
|
12
12
|
// Global namespace "oneDS"
|
|
@@ -33,7 +33,7 @@ var strShimPrototype = "prototype";
|
|
|
33
33
|
var ObjClass$1 = Object;
|
|
34
34
|
var ObjProto$1 = ObjClass$1[strShimPrototype];
|
|
35
35
|
|
|
36
|
-
/*! https://github.com/nevware21/ts-utils v0.11.
|
|
36
|
+
/*! https://github.com/nevware21/ts-utils v0.11.3 */
|
|
37
37
|
/*#__NO_SIDE_EFFECTS__*/
|
|
38
38
|
function _pureAssign(func1, func2) {
|
|
39
39
|
return func1 || func2;
|
|
@@ -170,14 +170,65 @@ function objForEachKey(theObject, callbackfn, thisArg) {
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
+
var propMap = {
|
|
174
|
+
e: "enumerable",
|
|
175
|
+
c: "configurable",
|
|
176
|
+
v: "value",
|
|
177
|
+
w: "writable",
|
|
178
|
+
g: "get",
|
|
179
|
+
s: "set"
|
|
180
|
+
};
|
|
173
181
|
/*#__NO_SIDE_EFFECTS__*/
|
|
174
|
-
function
|
|
182
|
+
function _createProp(value) {
|
|
183
|
+
var prop = {};
|
|
184
|
+
prop[propMap["c"]] = true;
|
|
185
|
+
prop[propMap["e"]] = true;
|
|
186
|
+
if (value.l) {
|
|
187
|
+
prop.get = function () { return value.l.v; };
|
|
188
|
+
var desc = objGetOwnPropertyDescriptor(value.l, "v");
|
|
189
|
+
if (desc && desc.set) {
|
|
190
|
+
prop.set = function (newValue) {
|
|
191
|
+
value.l.v = newValue;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
objForEachKey(value, function (key, value) {
|
|
196
|
+
prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
|
|
197
|
+
});
|
|
198
|
+
return prop;
|
|
199
|
+
}
|
|
200
|
+
var objDefineProp = ( /*#__PURE__*/_pureRef(ObjClass, "defineProperty"));
|
|
201
|
+
function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
|
|
202
|
+
var desc = {
|
|
203
|
+
e: enumerable,
|
|
204
|
+
c: configurable
|
|
205
|
+
};
|
|
206
|
+
if (getProp) {
|
|
207
|
+
desc.g = getProp;
|
|
208
|
+
}
|
|
209
|
+
if (setProp) {
|
|
210
|
+
desc.s = setProp;
|
|
211
|
+
}
|
|
212
|
+
return objDefineProp(target, prop, _createProp(desc));
|
|
213
|
+
}
|
|
214
|
+
function objDefine(target, key, propDesc) {
|
|
215
|
+
return objDefineProp(target, key, _createProp(propDesc));
|
|
216
|
+
}
|
|
217
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
218
|
+
function _createKeyValueMap(values, keyType, valueType, completeFn, writable) {
|
|
175
219
|
var theMap = {};
|
|
176
220
|
objForEachKey(values, function (key, value) {
|
|
177
|
-
theMap
|
|
178
|
-
theMap
|
|
221
|
+
_assignMapValue(theMap, key, keyType ? value : key, writable);
|
|
222
|
+
_assignMapValue(theMap, value, valueType ? value : key, writable);
|
|
223
|
+
});
|
|
224
|
+
return completeFn ? completeFn(theMap) : theMap;
|
|
225
|
+
}
|
|
226
|
+
function _assignMapValue(theMap, key, value, writable) {
|
|
227
|
+
objDefineProp(theMap, key, {
|
|
228
|
+
value: value,
|
|
229
|
+
enumerable: true,
|
|
230
|
+
writable: !!writable
|
|
179
231
|
});
|
|
180
|
-
return completeFn(theMap);
|
|
181
232
|
}
|
|
182
233
|
var asString = ( /* #__PURE__ */_pureAssign(StrCls));
|
|
183
234
|
var ERROR_TYPE = "[object Error]";
|
|
@@ -217,7 +268,7 @@ function objDeepFreeze(value) {
|
|
|
217
268
|
if (_objFreeze) {
|
|
218
269
|
objForEachKey(value, function (key, value) {
|
|
219
270
|
if (isArray(value) || isObject(value)) {
|
|
220
|
-
|
|
271
|
+
objDeepFreeze(value);
|
|
221
272
|
}
|
|
222
273
|
});
|
|
223
274
|
}
|
|
@@ -228,11 +279,11 @@ var objSeal = ( /* #__PURE__*/_pureAssign(( /* #__PURE__*/_pureRef(ObjClass, "se
|
|
|
228
279
|
var objGetPrototypeOf = ( /* #__PURE__*/_pureAssign(( /* #__PURE__*/_pureRef(ObjClass, "getPrototypeOf")), _getProto));
|
|
229
280
|
/*#__NO_SIDE_EFFECTS__*/
|
|
230
281
|
function createEnum(values) {
|
|
231
|
-
return _createKeyValueMap(values, 1 , 0 ,
|
|
282
|
+
return _createKeyValueMap(values, 1 , 0 , objFreeze);
|
|
232
283
|
}
|
|
233
284
|
/*#__NO_SIDE_EFFECTS__*/
|
|
234
285
|
function createEnumKeyMap(values) {
|
|
235
|
-
return _createKeyValueMap(values, 0 , 0 ,
|
|
286
|
+
return _createKeyValueMap(values, 0 , 0 , objFreeze);
|
|
236
287
|
}
|
|
237
288
|
var _wellKnownSymbolMap = /*#__PURE__*/ createEnumKeyMap({
|
|
238
289
|
asyncIterator: 0 ,
|
|
@@ -362,50 +413,6 @@ function polyGetKnownSymbol(name) {
|
|
|
362
413
|
}
|
|
363
414
|
return result;
|
|
364
415
|
}
|
|
365
|
-
var propMap = {
|
|
366
|
-
e: "enumerable",
|
|
367
|
-
c: "configurable",
|
|
368
|
-
v: "value",
|
|
369
|
-
w: "writable",
|
|
370
|
-
g: "get",
|
|
371
|
-
s: "set"
|
|
372
|
-
};
|
|
373
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
374
|
-
function _createProp(value) {
|
|
375
|
-
var prop = {};
|
|
376
|
-
prop[propMap["c"]] = true;
|
|
377
|
-
prop[propMap["e"]] = true;
|
|
378
|
-
if (value.l) {
|
|
379
|
-
prop.get = function () { return value.l.v; };
|
|
380
|
-
var desc = objGetOwnPropertyDescriptor(value.l, "v");
|
|
381
|
-
if (desc && desc.set) {
|
|
382
|
-
prop.set = function (newValue) {
|
|
383
|
-
value.l.v = newValue;
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
objForEachKey(value, function (key, value) {
|
|
388
|
-
prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
|
|
389
|
-
});
|
|
390
|
-
return prop;
|
|
391
|
-
}
|
|
392
|
-
var objDefineProp = ( /*#__PURE__*/_pureRef(ObjClass, "defineProperty"));
|
|
393
|
-
function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
|
|
394
|
-
var desc = {
|
|
395
|
-
e: enumerable,
|
|
396
|
-
c: configurable
|
|
397
|
-
};
|
|
398
|
-
if (getProp) {
|
|
399
|
-
desc.g = getProp;
|
|
400
|
-
}
|
|
401
|
-
if (setProp) {
|
|
402
|
-
desc.s = setProp;
|
|
403
|
-
}
|
|
404
|
-
return objDefineProp(target, prop, _createProp(desc));
|
|
405
|
-
}
|
|
406
|
-
function objDefine(target, key, propDesc) {
|
|
407
|
-
return objDefineProp(target, key, _createProp(propDesc));
|
|
408
|
-
}
|
|
409
416
|
var _globalLazyTestHooks;
|
|
410
417
|
function _initTestHooks() {
|
|
411
418
|
_globalLazyTestHooks = _getGlobalConfig();
|
|
@@ -1300,6 +1307,13 @@ var EventsDiscardedReason = createEnumStyle({
|
|
|
1300
1307
|
QueueFull: 5
|
|
1301
1308
|
});
|
|
1302
1309
|
|
|
1310
|
+
var ActiveStatus = createEnumStyle({
|
|
1311
|
+
NONE: 0 ,
|
|
1312
|
+
PENDING: 3 ,
|
|
1313
|
+
INACTIVE: 1 ,
|
|
1314
|
+
ACTIVE: 2
|
|
1315
|
+
});
|
|
1316
|
+
|
|
1303
1317
|
var _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
1304
1318
|
var _DYN_BLK_VAL = "blkVal";
|
|
1305
1319
|
var _DYN_LENGTH$1 = "length";
|
|
@@ -1320,13 +1334,17 @@ var _DYN_IDENTIFIER = "identifier";
|
|
|
1320
1334
|
var _DYN_REMOVE_NOTIFICATION_0 = "removeNotificationListener";
|
|
1321
1335
|
var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener";
|
|
1322
1336
|
var _DYN_IS_INITIALIZED = "isInitialized";
|
|
1337
|
+
var _DYN_INSTRUMENTATION_KEY = "instrumentationKey";
|
|
1338
|
+
var _DYN__INACTIVE = "INACTIVE";
|
|
1339
|
+
var _DYN_VALUE$1 = "value";
|
|
1323
1340
|
var _DYN_GET_NOTIFY_MGR = "getNotifyMgr";
|
|
1324
1341
|
var _DYN_GET_PLUGIN = "getPlugin";
|
|
1325
|
-
var _DYN_POLL_INTERNAL_LOGS$1 = "pollInternalLogs";
|
|
1326
1342
|
var _DYN_NAME = "name";
|
|
1343
|
+
var _DYN_I_KEY = "iKey";
|
|
1327
1344
|
var _DYN_TIME = "time";
|
|
1328
1345
|
var _DYN_PROCESS_NEXT = "processNext";
|
|
1329
1346
|
var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
|
|
1347
|
+
var _DYN_POLL_INTERNAL_LOGS$1 = "pollInternalLogs";
|
|
1330
1348
|
var _DYN_ENABLED = "enabled";
|
|
1331
1349
|
var _DYN_STOP_POLLING_INTERNA3 = "stopPollingInternalLogs";
|
|
1332
1350
|
var _DYN_UNLOAD = "unload";
|
|
@@ -1676,6 +1694,54 @@ function _createAllPromise(newPromise) {
|
|
|
1676
1694
|
}, additionalArgs);
|
|
1677
1695
|
};
|
|
1678
1696
|
}
|
|
1697
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
1698
|
+
function _createAllSettledPromise(newPromise) {
|
|
1699
|
+
return createCachedValue(function (input) {
|
|
1700
|
+
var additionalArgs = arrSlice(arguments, 1);
|
|
1701
|
+
return newPromise(function (resolve, reject) {
|
|
1702
|
+
var values = [];
|
|
1703
|
+
var pending = 1;
|
|
1704
|
+
function processItem(item, idx) {
|
|
1705
|
+
pending++;
|
|
1706
|
+
doAwaitResponse(item, function (value) {
|
|
1707
|
+
if (value.rejected) {
|
|
1708
|
+
values[idx] = {
|
|
1709
|
+
status: REJECTED,
|
|
1710
|
+
reason: value.reason
|
|
1711
|
+
};
|
|
1712
|
+
}
|
|
1713
|
+
else {
|
|
1714
|
+
values[idx] = {
|
|
1715
|
+
status: "fulfilled",
|
|
1716
|
+
value: value.value
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
if (--pending === 0) {
|
|
1720
|
+
resolve(values);
|
|
1721
|
+
}
|
|
1722
|
+
});
|
|
1723
|
+
}
|
|
1724
|
+
try {
|
|
1725
|
+
if (isArray(input)) {
|
|
1726
|
+
arrForEach(input, processItem);
|
|
1727
|
+
}
|
|
1728
|
+
else if (isIterable(input)) {
|
|
1729
|
+
iterForOf(input, processItem);
|
|
1730
|
+
}
|
|
1731
|
+
else {
|
|
1732
|
+
throwTypeError("Input is not an iterable");
|
|
1733
|
+
}
|
|
1734
|
+
pending--;
|
|
1735
|
+
if (pending === 0) {
|
|
1736
|
+
resolve(values);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
catch (e) {
|
|
1740
|
+
reject(e);
|
|
1741
|
+
}
|
|
1742
|
+
}, additionalArgs);
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1679
1745
|
function syncItemProcessor(pending) {
|
|
1680
1746
|
arrForEach(pending, function (fn) {
|
|
1681
1747
|
try {
|
|
@@ -1727,11 +1793,16 @@ function createNativePromise(executor, timeout) {
|
|
|
1727
1793
|
return thePromise;
|
|
1728
1794
|
}
|
|
1729
1795
|
var _promiseCreator;
|
|
1796
|
+
var _allSettledCreator;
|
|
1730
1797
|
function createPromise(executor, timeout) {
|
|
1731
1798
|
!_promiseCreator && (_promiseCreator = createCachedValue(createNativePromise));
|
|
1732
1799
|
return _promiseCreator.v.call(this, executor, timeout);
|
|
1733
1800
|
}
|
|
1734
1801
|
var createAllPromise = /*#__PURE__*/ _createAllPromise(createPromise);
|
|
1802
|
+
function createAllSettledPromise(input, timeout) {
|
|
1803
|
+
!_allSettledCreator && (_allSettledCreator = _createAllSettledPromise(createPromise));
|
|
1804
|
+
return _allSettledCreator.v(input, timeout);
|
|
1805
|
+
}
|
|
1735
1806
|
|
|
1736
1807
|
var UNDEFINED_VALUE = undefined;
|
|
1737
1808
|
var STR_EMPTY$2 = "";
|
|
@@ -2249,7 +2320,7 @@ function newId(maxLength) {
|
|
|
2249
2320
|
return result;
|
|
2250
2321
|
}
|
|
2251
2322
|
|
|
2252
|
-
var version = '3.3.0-nightly3.2406-
|
|
2323
|
+
var version = '3.3.0-nightly3.2406-09';
|
|
2253
2324
|
var instanceName = "." + newId(6);
|
|
2254
2325
|
var _dataUid = 0;
|
|
2255
2326
|
function _canAcceptData(target) {
|
|
@@ -4646,6 +4717,8 @@ var strValidationError = "Plugins must provide initialize method";
|
|
|
4646
4717
|
var strNotificationManager = "_notificationManager";
|
|
4647
4718
|
var strSdkUnloadingError = "SDK is still unloading...";
|
|
4648
4719
|
var strSdkNotInitialized = "SDK is not initialized";
|
|
4720
|
+
var maxInitQueueSize = 100;
|
|
4721
|
+
var maxInitTimeout = 50000;
|
|
4649
4722
|
var defaultConfig$1 = objDeepFreeze((_a$1 = {
|
|
4650
4723
|
cookieCfg: {}
|
|
4651
4724
|
},
|
|
@@ -4802,15 +4875,23 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
4802
4875
|
var _extensions;
|
|
4803
4876
|
var _pluginVersionStringArr;
|
|
4804
4877
|
var _pluginVersionString;
|
|
4878
|
+
var _activeStatus;
|
|
4879
|
+
var _endpoint;
|
|
4880
|
+
var _initInMemoMaxSize;
|
|
4881
|
+
var _isStatusSet;
|
|
4805
4882
|
var _internalLogPoller;
|
|
4806
4883
|
var _internalLogPollerListening;
|
|
4807
4884
|
var _forceStopInternalLogPoller;
|
|
4808
4885
|
dynamicProto(AppInsightsCore, this, function (_self) {
|
|
4809
4886
|
_initDefaults();
|
|
4810
4887
|
_self["_getDbgPlgTargets"] = function () {
|
|
4811
|
-
return [_extensions];
|
|
4888
|
+
return [_extensions, _eventQueue];
|
|
4812
4889
|
};
|
|
4813
4890
|
_self[_DYN_IS_INITIALIZED ] = function () { return _isInitialized; };
|
|
4891
|
+
_self.activeStatus = function () { return _activeStatus; };
|
|
4892
|
+
_self._setPendingStatus = function () {
|
|
4893
|
+
_activeStatus = 3 ;
|
|
4894
|
+
};
|
|
4814
4895
|
_self[_DYN_INITIALIZE$1 ] = function (config, extensions, logger, notificationManager) {
|
|
4815
4896
|
if (_isUnloading) {
|
|
4816
4897
|
throwError(strSdkUnloadingError);
|
|
@@ -4821,14 +4902,88 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
4821
4902
|
_configHandler = createDynamicConfig(config, defaultConfig$1, logger || _self[_DYN_LOGGER$1 ], false);
|
|
4822
4903
|
config = _configHandler.cfg;
|
|
4823
4904
|
_addUnloadHook(_configHandler[_DYN_WATCH ](function (details) {
|
|
4824
|
-
|
|
4905
|
+
var rootCfg = details.cfg;
|
|
4906
|
+
var isPending = _activeStatus === 3 ;
|
|
4907
|
+
if (isPending) {
|
|
4908
|
+
return;
|
|
4909
|
+
}
|
|
4910
|
+
_initInMemoMaxSize = rootCfg.initInMemoMaxSize || maxInitQueueSize;
|
|
4911
|
+
var ikey = rootCfg[_DYN_INSTRUMENTATION_KEY ];
|
|
4912
|
+
var endpointUrl = rootCfg.endpointUrl;
|
|
4913
|
+
if (isNullOrUndefined(ikey)) {
|
|
4914
|
+
_instrumentationKey = null;
|
|
4915
|
+
_activeStatus = ActiveStatus[_DYN__INACTIVE ];
|
|
4916
|
+
var msg = "Please provide instrumentation key";
|
|
4917
|
+
if (!_isInitialized) {
|
|
4918
|
+
throwError(msg);
|
|
4919
|
+
}
|
|
4920
|
+
else {
|
|
4921
|
+
_throwInternal(_logger, 1 , 100 , msg);
|
|
4922
|
+
_releaseQueues();
|
|
4923
|
+
}
|
|
4924
|
+
return;
|
|
4925
|
+
}
|
|
4926
|
+
var promises = [];
|
|
4927
|
+
if (isPromiseLike(ikey)) {
|
|
4928
|
+
promises[_DYN_PUSH ](ikey);
|
|
4929
|
+
_instrumentationKey = null;
|
|
4930
|
+
}
|
|
4931
|
+
else {
|
|
4932
|
+
_instrumentationKey = ikey;
|
|
4933
|
+
}
|
|
4934
|
+
if (isPromiseLike(endpointUrl)) {
|
|
4935
|
+
promises[_DYN_PUSH ](endpointUrl);
|
|
4936
|
+
_endpoint = null;
|
|
4937
|
+
}
|
|
4938
|
+
else {
|
|
4939
|
+
_endpoint = endpointUrl;
|
|
4940
|
+
}
|
|
4941
|
+
if (promises[_DYN_LENGTH$1 ]) {
|
|
4942
|
+
_isStatusSet = false;
|
|
4943
|
+
_activeStatus = 3 ;
|
|
4944
|
+
var initTimeout = isNotNullOrUndefined(rootCfg.initTimeOut) ? rootCfg.initTimeOut : maxInitTimeout;
|
|
4945
|
+
var allPromises = createAllSettledPromise(promises);
|
|
4946
|
+
scheduleTimeout(function () {
|
|
4947
|
+
if (!_isStatusSet) {
|
|
4948
|
+
_setStatus();
|
|
4949
|
+
}
|
|
4950
|
+
}, initTimeout);
|
|
4951
|
+
doAwaitResponse(allPromises, function (response) {
|
|
4952
|
+
try {
|
|
4953
|
+
if (_isStatusSet) {
|
|
4954
|
+
return;
|
|
4955
|
+
}
|
|
4956
|
+
if (!response.rejected) {
|
|
4957
|
+
var values = response[_DYN_VALUE$1 ];
|
|
4958
|
+
if (values && values[_DYN_LENGTH$1 ]) {
|
|
4959
|
+
var ikeyRes = values[0];
|
|
4960
|
+
_instrumentationKey = ikeyRes && ikeyRes[_DYN_VALUE$1 ];
|
|
4961
|
+
if (values[_DYN_LENGTH$1 ] > 1) {
|
|
4962
|
+
var endpointRes = values[1];
|
|
4963
|
+
_endpoint = endpointRes && endpointRes[_DYN_VALUE$1 ];
|
|
4964
|
+
}
|
|
4965
|
+
}
|
|
4966
|
+
if (_instrumentationKey) {
|
|
4967
|
+
config[_DYN_INSTRUMENTATION_KEY ] = _instrumentationKey;
|
|
4968
|
+
config.endpointUrl = _endpoint;
|
|
4969
|
+
}
|
|
4970
|
+
}
|
|
4971
|
+
_setStatus();
|
|
4972
|
+
}
|
|
4973
|
+
catch (e) {
|
|
4974
|
+
if (!_isStatusSet) {
|
|
4975
|
+
_setStatus();
|
|
4976
|
+
}
|
|
4977
|
+
}
|
|
4978
|
+
});
|
|
4979
|
+
}
|
|
4980
|
+
else {
|
|
4981
|
+
_setStatus();
|
|
4982
|
+
}
|
|
4825
4983
|
var extCfg = details.ref(details.cfg, STR_EXTENSION_CONFIG);
|
|
4826
4984
|
objForEachKey(extCfg, function (key) {
|
|
4827
4985
|
details.ref(extCfg, key);
|
|
4828
4986
|
});
|
|
4829
|
-
if (isNullOrUndefined(_instrumentationKey)) {
|
|
4830
|
-
throwError("Please provide instrumentation key");
|
|
4831
|
-
}
|
|
4832
4987
|
}));
|
|
4833
4988
|
_notificationManager = notificationManager;
|
|
4834
4989
|
_debugListener = _initDebugListener(_configHandler, _hookContainer, _notificationManager && _self[_DYN_GET_NOTIFY_MGR ](), _debugListener);
|
|
@@ -4851,8 +5006,9 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
4851
5006
|
_registerDelayedCfgListener(config, _cfgListeners, _logger);
|
|
4852
5007
|
_cfgListeners = null;
|
|
4853
5008
|
_isInitialized = true;
|
|
4854
|
-
|
|
4855
|
-
|
|
5009
|
+
if (_activeStatus === ActiveStatus.ACTIVE) {
|
|
5010
|
+
_releaseQueues();
|
|
5011
|
+
}
|
|
4856
5012
|
};
|
|
4857
5013
|
_self.getChannels = function () {
|
|
4858
5014
|
var controls = [];
|
|
@@ -4873,14 +5029,16 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
4873
5029
|
_notifyInvalidEvent(telemetryItem);
|
|
4874
5030
|
throwError("telemetry name required");
|
|
4875
5031
|
}
|
|
4876
|
-
telemetryItem
|
|
5032
|
+
telemetryItem[_DYN_I_KEY ] = telemetryItem[_DYN_I_KEY ] || _instrumentationKey;
|
|
4877
5033
|
telemetryItem[_DYN_TIME ] = telemetryItem[_DYN_TIME ] || toISOString(new Date());
|
|
4878
5034
|
telemetryItem.ver = telemetryItem.ver || "4.0";
|
|
4879
|
-
if (!_isUnloading && _self[_DYN_IS_INITIALIZED ]()) {
|
|
5035
|
+
if (!_isUnloading && _self[_DYN_IS_INITIALIZED ]() && _activeStatus === ActiveStatus.ACTIVE) {
|
|
4880
5036
|
_createTelCtx()[_DYN_PROCESS_NEXT ](telemetryItem);
|
|
4881
5037
|
}
|
|
4882
|
-
else {
|
|
4883
|
-
_eventQueue[
|
|
5038
|
+
else if (_activeStatus !== ActiveStatus[_DYN__INACTIVE ]) {
|
|
5039
|
+
if (_eventQueue[_DYN_LENGTH$1 ] <= _initInMemoMaxSize) {
|
|
5040
|
+
_eventQueue[_DYN_PUSH ](telemetryItem);
|
|
5041
|
+
}
|
|
4884
5042
|
}
|
|
4885
5043
|
}, function () { return ({ item: telemetryItem }); }, !(telemetryItem.sync));
|
|
4886
5044
|
};
|
|
@@ -4925,9 +5083,15 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
4925
5083
|
if (_isInitialized && _eventQueue[_DYN_LENGTH$1 ] > 0) {
|
|
4926
5084
|
var eventQueue = _eventQueue;
|
|
4927
5085
|
_eventQueue = [];
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
5086
|
+
if (_activeStatus === 2 ) {
|
|
5087
|
+
arrForEach(eventQueue, function (event) {
|
|
5088
|
+
event[_DYN_I_KEY ] = event[_DYN_I_KEY ] || _instrumentationKey;
|
|
5089
|
+
_createTelCtx()[_DYN_PROCESS_NEXT ](event);
|
|
5090
|
+
});
|
|
5091
|
+
}
|
|
5092
|
+
else {
|
|
5093
|
+
_throwInternal(_logger, 2 , 20 , "core init status is not active");
|
|
5094
|
+
}
|
|
4931
5095
|
}
|
|
4932
5096
|
};
|
|
4933
5097
|
_self[_DYN_POLL_INTERNAL_LOGS$1 ] = function (eventName) {
|
|
@@ -4936,6 +5100,23 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
4936
5100
|
_internalLogPoller && _internalLogPoller[_DYN_CANCEL ]();
|
|
4937
5101
|
return _startLogPoller(true);
|
|
4938
5102
|
};
|
|
5103
|
+
function _setStatus() {
|
|
5104
|
+
_isStatusSet = true;
|
|
5105
|
+
if (isNullOrUndefined(_instrumentationKey)) {
|
|
5106
|
+
_activeStatus = ActiveStatus[_DYN__INACTIVE ];
|
|
5107
|
+
_throwInternal(_logger, 1 , 112 , "ikey can't be resolved from promises");
|
|
5108
|
+
}
|
|
5109
|
+
else {
|
|
5110
|
+
_activeStatus = ActiveStatus.ACTIVE;
|
|
5111
|
+
}
|
|
5112
|
+
_releaseQueues();
|
|
5113
|
+
}
|
|
5114
|
+
function _releaseQueues() {
|
|
5115
|
+
if (_isInitialized) {
|
|
5116
|
+
_self.releaseQueue();
|
|
5117
|
+
_self[_DYN_POLL_INTERNAL_LOGS$1 ]();
|
|
5118
|
+
}
|
|
5119
|
+
}
|
|
4939
5120
|
function _startLogPoller(alwaysStart) {
|
|
4940
5121
|
if ((!_internalLogPoller || !_internalLogPoller[_DYN_ENABLED ]) && !_forceStopInternalLogPoller) {
|
|
4941
5122
|
var shouldStart = alwaysStart || (_logger && _logger.queue[_DYN_LENGTH$1 ] > 0);
|
|
@@ -5209,6 +5390,10 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
5209
5390
|
_forceStopInternalLogPoller = false;
|
|
5210
5391
|
_internalLogPoller = null;
|
|
5211
5392
|
_internalLogPollerListening = false;
|
|
5393
|
+
_activeStatus = 0 ;
|
|
5394
|
+
_endpoint = null;
|
|
5395
|
+
_initInMemoMaxSize = null;
|
|
5396
|
+
_isStatusSet = false;
|
|
5212
5397
|
}
|
|
5213
5398
|
function _createTelCtx() {
|
|
5214
5399
|
var theCtx = createProcessTelemetryContext(_getPluginChain(), _configHandler.cfg, _self);
|
|
@@ -5351,7 +5536,7 @@ var AppInsightsCore$1 = /** @class */ (function () {
|
|
|
5351
5536
|
var _a;
|
|
5352
5537
|
var item = (_a = {},
|
|
5353
5538
|
_a[_DYN_NAME ] = _internalLogsEventName ? _internalLogsEventName : "InternalMessageId: " + logMessage[_DYN_MESSAGE_ID ],
|
|
5354
|
-
_a
|
|
5539
|
+
_a[_DYN_I_KEY ] = _instrumentationKey,
|
|
5355
5540
|
_a[_DYN_TIME ] = toISOString(new Date()),
|
|
5356
5541
|
_a.baseType = _InternalLogMessage.dataType,
|
|
5357
5542
|
_a.baseData = { message: logMessage[_DYN_MESSAGE ] },
|
|
@@ -5787,7 +5972,7 @@ var SenderPostManager = /** @class */ (function () {
|
|
|
5787
5972
|
if (!responseHandled) {
|
|
5788
5973
|
responseHandled = true;
|
|
5789
5974
|
if (!result.rejected) {
|
|
5790
|
-
var response_1 = result
|
|
5975
|
+
var response_1 = result[_DYN_VALUE$1 ];
|
|
5791
5976
|
try {
|
|
5792
5977
|
if (!_isOneDs && !response_1.ok) {
|
|
5793
5978
|
_handleError(response_1.statusText);
|
|
@@ -5800,7 +5985,7 @@ var SenderPostManager = /** @class */ (function () {
|
|
|
5800
5985
|
}
|
|
5801
5986
|
else {
|
|
5802
5987
|
doAwaitResponse(response_1.text(), function (resp) {
|
|
5803
|
-
_onFetchComplete(response_1, payload, resp
|
|
5988
|
+
_onFetchComplete(response_1, payload, resp[_DYN_VALUE$1 ]);
|
|
5804
5989
|
resolveFunc && resolveFunc(true);
|
|
5805
5990
|
});
|
|
5806
5991
|
}
|
|
@@ -6247,7 +6432,7 @@ var _DYN_RM_FIELD_SANITIZER = "rmFieldSanitizer";
|
|
|
6247
6432
|
var _DYN_CAN_HANDLE = "canHandle";
|
|
6248
6433
|
|
|
6249
6434
|
var _a;
|
|
6250
|
-
var Version = '4.3.0-nightly3.2406-
|
|
6435
|
+
var Version = '4.3.0-nightly3.2406-09';
|
|
6251
6436
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
6252
6437
|
var ObjHasOwnProperty = ObjProto$1.hasOwnProperty;
|
|
6253
6438
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|
|
@@ -6993,4 +7178,4 @@ exports.toISOString = toISOString;
|
|
|
6993
7178
|
exports.useXDomainRequest = useXDomainRequest;
|
|
6994
7179
|
|
|
6995
7180
|
}));
|
|
6996
|
-
//# sourceMappingURL=ms.core-4.3.0-nightly3.2406-
|
|
7181
|
+
//# sourceMappingURL=ms.core-4.3.0-nightly3.2406-09.gbl.js.map
|