@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/dist/es5/ms.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
*/
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
var ObjClass$1 = Object;
|
|
17
17
|
var ObjProto$1 = ObjClass$1[strShimPrototype];
|
|
18
18
|
|
|
19
|
-
/*! https://github.com/nevware21/ts-utils v0.11.
|
|
19
|
+
/*! https://github.com/nevware21/ts-utils v0.11.3 */
|
|
20
20
|
/*#__NO_SIDE_EFFECTS__*/
|
|
21
21
|
function _pureAssign(func1, func2) {
|
|
22
22
|
return func1 || func2;
|
|
@@ -153,14 +153,65 @@
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
var propMap = {
|
|
157
|
+
e: "enumerable",
|
|
158
|
+
c: "configurable",
|
|
159
|
+
v: "value",
|
|
160
|
+
w: "writable",
|
|
161
|
+
g: "get",
|
|
162
|
+
s: "set"
|
|
163
|
+
};
|
|
156
164
|
/*#__NO_SIDE_EFFECTS__*/
|
|
157
|
-
function
|
|
165
|
+
function _createProp(value) {
|
|
166
|
+
var prop = {};
|
|
167
|
+
prop[propMap["c"]] = true;
|
|
168
|
+
prop[propMap["e"]] = true;
|
|
169
|
+
if (value.l) {
|
|
170
|
+
prop.get = function () { return value.l.v; };
|
|
171
|
+
var desc = objGetOwnPropertyDescriptor(value.l, "v");
|
|
172
|
+
if (desc && desc.set) {
|
|
173
|
+
prop.set = function (newValue) {
|
|
174
|
+
value.l.v = newValue;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
objForEachKey(value, function (key, value) {
|
|
179
|
+
prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
|
|
180
|
+
});
|
|
181
|
+
return prop;
|
|
182
|
+
}
|
|
183
|
+
var objDefineProp = ( /*#__PURE__*/_pureRef(ObjClass, "defineProperty"));
|
|
184
|
+
function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
|
|
185
|
+
var desc = {
|
|
186
|
+
e: enumerable,
|
|
187
|
+
c: configurable
|
|
188
|
+
};
|
|
189
|
+
if (getProp) {
|
|
190
|
+
desc.g = getProp;
|
|
191
|
+
}
|
|
192
|
+
if (setProp) {
|
|
193
|
+
desc.s = setProp;
|
|
194
|
+
}
|
|
195
|
+
return objDefineProp(target, prop, _createProp(desc));
|
|
196
|
+
}
|
|
197
|
+
function objDefine(target, key, propDesc) {
|
|
198
|
+
return objDefineProp(target, key, _createProp(propDesc));
|
|
199
|
+
}
|
|
200
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
201
|
+
function _createKeyValueMap(values, keyType, valueType, completeFn, writable) {
|
|
158
202
|
var theMap = {};
|
|
159
203
|
objForEachKey(values, function (key, value) {
|
|
160
|
-
theMap
|
|
161
|
-
theMap
|
|
204
|
+
_assignMapValue(theMap, key, keyType ? value : key, writable);
|
|
205
|
+
_assignMapValue(theMap, value, valueType ? value : key, writable);
|
|
206
|
+
});
|
|
207
|
+
return completeFn ? completeFn(theMap) : theMap;
|
|
208
|
+
}
|
|
209
|
+
function _assignMapValue(theMap, key, value, writable) {
|
|
210
|
+
objDefineProp(theMap, key, {
|
|
211
|
+
value: value,
|
|
212
|
+
enumerable: true,
|
|
213
|
+
writable: !!writable
|
|
162
214
|
});
|
|
163
|
-
return completeFn(theMap);
|
|
164
215
|
}
|
|
165
216
|
var asString = ( /* #__PURE__ */_pureAssign(StrCls));
|
|
166
217
|
var ERROR_TYPE = "[object Error]";
|
|
@@ -200,7 +251,7 @@
|
|
|
200
251
|
if (_objFreeze) {
|
|
201
252
|
objForEachKey(value, function (key, value) {
|
|
202
253
|
if (isArray(value) || isObject(value)) {
|
|
203
|
-
|
|
254
|
+
objDeepFreeze(value);
|
|
204
255
|
}
|
|
205
256
|
});
|
|
206
257
|
}
|
|
@@ -211,11 +262,11 @@
|
|
|
211
262
|
var objGetPrototypeOf = ( /* #__PURE__*/_pureAssign(( /* #__PURE__*/_pureRef(ObjClass, "getPrototypeOf")), _getProto));
|
|
212
263
|
/*#__NO_SIDE_EFFECTS__*/
|
|
213
264
|
function createEnum(values) {
|
|
214
|
-
return _createKeyValueMap(values, 1 , 0 ,
|
|
265
|
+
return _createKeyValueMap(values, 1 , 0 , objFreeze);
|
|
215
266
|
}
|
|
216
267
|
/*#__NO_SIDE_EFFECTS__*/
|
|
217
268
|
function createEnumKeyMap(values) {
|
|
218
|
-
return _createKeyValueMap(values, 0 , 0 ,
|
|
269
|
+
return _createKeyValueMap(values, 0 , 0 , objFreeze);
|
|
219
270
|
}
|
|
220
271
|
var _wellKnownSymbolMap = /*#__PURE__*/ createEnumKeyMap({
|
|
221
272
|
asyncIterator: 0 ,
|
|
@@ -345,50 +396,6 @@
|
|
|
345
396
|
}
|
|
346
397
|
return result;
|
|
347
398
|
}
|
|
348
|
-
var propMap = {
|
|
349
|
-
e: "enumerable",
|
|
350
|
-
c: "configurable",
|
|
351
|
-
v: "value",
|
|
352
|
-
w: "writable",
|
|
353
|
-
g: "get",
|
|
354
|
-
s: "set"
|
|
355
|
-
};
|
|
356
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
357
|
-
function _createProp(value) {
|
|
358
|
-
var prop = {};
|
|
359
|
-
prop[propMap["c"]] = true;
|
|
360
|
-
prop[propMap["e"]] = true;
|
|
361
|
-
if (value.l) {
|
|
362
|
-
prop.get = function () { return value.l.v; };
|
|
363
|
-
var desc = objGetOwnPropertyDescriptor(value.l, "v");
|
|
364
|
-
if (desc && desc.set) {
|
|
365
|
-
prop.set = function (newValue) {
|
|
366
|
-
value.l.v = newValue;
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
objForEachKey(value, function (key, value) {
|
|
371
|
-
prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
|
|
372
|
-
});
|
|
373
|
-
return prop;
|
|
374
|
-
}
|
|
375
|
-
var objDefineProp = ( /*#__PURE__*/_pureRef(ObjClass, "defineProperty"));
|
|
376
|
-
function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
|
|
377
|
-
var desc = {
|
|
378
|
-
e: enumerable,
|
|
379
|
-
c: configurable
|
|
380
|
-
};
|
|
381
|
-
if (getProp) {
|
|
382
|
-
desc.g = getProp;
|
|
383
|
-
}
|
|
384
|
-
if (setProp) {
|
|
385
|
-
desc.s = setProp;
|
|
386
|
-
}
|
|
387
|
-
return objDefineProp(target, prop, _createProp(desc));
|
|
388
|
-
}
|
|
389
|
-
function objDefine(target, key, propDesc) {
|
|
390
|
-
return objDefineProp(target, key, _createProp(propDesc));
|
|
391
|
-
}
|
|
392
399
|
var _globalLazyTestHooks;
|
|
393
400
|
function _initTestHooks() {
|
|
394
401
|
_globalLazyTestHooks = _getGlobalConfig();
|
|
@@ -1283,6 +1290,13 @@
|
|
|
1283
1290
|
QueueFull: 5
|
|
1284
1291
|
});
|
|
1285
1292
|
|
|
1293
|
+
var ActiveStatus = createEnumStyle({
|
|
1294
|
+
NONE: 0 ,
|
|
1295
|
+
PENDING: 3 ,
|
|
1296
|
+
INACTIVE: 1 ,
|
|
1297
|
+
ACTIVE: 2
|
|
1298
|
+
});
|
|
1299
|
+
|
|
1286
1300
|
var _DYN_TO_LOWER_CASE = "toLowerCase";
|
|
1287
1301
|
var _DYN_BLK_VAL = "blkVal";
|
|
1288
1302
|
var _DYN_LENGTH$1 = "length";
|
|
@@ -1303,13 +1317,17 @@
|
|
|
1303
1317
|
var _DYN_REMOVE_NOTIFICATION_0 = "removeNotificationListener";
|
|
1304
1318
|
var _DYN_ADD_NOTIFICATION_LIS1 = "addNotificationListener";
|
|
1305
1319
|
var _DYN_IS_INITIALIZED = "isInitialized";
|
|
1320
|
+
var _DYN_INSTRUMENTATION_KEY = "instrumentationKey";
|
|
1321
|
+
var _DYN__INACTIVE = "INACTIVE";
|
|
1322
|
+
var _DYN_VALUE$1 = "value";
|
|
1306
1323
|
var _DYN_GET_NOTIFY_MGR = "getNotifyMgr";
|
|
1307
1324
|
var _DYN_GET_PLUGIN = "getPlugin";
|
|
1308
|
-
var _DYN_POLL_INTERNAL_LOGS$1 = "pollInternalLogs";
|
|
1309
1325
|
var _DYN_NAME = "name";
|
|
1326
|
+
var _DYN_I_KEY = "iKey";
|
|
1310
1327
|
var _DYN_TIME = "time";
|
|
1311
1328
|
var _DYN_PROCESS_NEXT = "processNext";
|
|
1312
1329
|
var _DYN_GET_PROCESS_TEL_CONT2 = "getProcessTelContext";
|
|
1330
|
+
var _DYN_POLL_INTERNAL_LOGS$1 = "pollInternalLogs";
|
|
1313
1331
|
var _DYN_ENABLED = "enabled";
|
|
1314
1332
|
var _DYN_STOP_POLLING_INTERNA3 = "stopPollingInternalLogs";
|
|
1315
1333
|
var _DYN_UNLOAD = "unload";
|
|
@@ -1659,6 +1677,54 @@
|
|
|
1659
1677
|
}, additionalArgs);
|
|
1660
1678
|
};
|
|
1661
1679
|
}
|
|
1680
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
1681
|
+
function _createAllSettledPromise(newPromise) {
|
|
1682
|
+
return createCachedValue(function (input) {
|
|
1683
|
+
var additionalArgs = arrSlice(arguments, 1);
|
|
1684
|
+
return newPromise(function (resolve, reject) {
|
|
1685
|
+
var values = [];
|
|
1686
|
+
var pending = 1;
|
|
1687
|
+
function processItem(item, idx) {
|
|
1688
|
+
pending++;
|
|
1689
|
+
doAwaitResponse(item, function (value) {
|
|
1690
|
+
if (value.rejected) {
|
|
1691
|
+
values[idx] = {
|
|
1692
|
+
status: REJECTED,
|
|
1693
|
+
reason: value.reason
|
|
1694
|
+
};
|
|
1695
|
+
}
|
|
1696
|
+
else {
|
|
1697
|
+
values[idx] = {
|
|
1698
|
+
status: "fulfilled",
|
|
1699
|
+
value: value.value
|
|
1700
|
+
};
|
|
1701
|
+
}
|
|
1702
|
+
if (--pending === 0) {
|
|
1703
|
+
resolve(values);
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
try {
|
|
1708
|
+
if (isArray(input)) {
|
|
1709
|
+
arrForEach(input, processItem);
|
|
1710
|
+
}
|
|
1711
|
+
else if (isIterable(input)) {
|
|
1712
|
+
iterForOf(input, processItem);
|
|
1713
|
+
}
|
|
1714
|
+
else {
|
|
1715
|
+
throwTypeError("Input is not an iterable");
|
|
1716
|
+
}
|
|
1717
|
+
pending--;
|
|
1718
|
+
if (pending === 0) {
|
|
1719
|
+
resolve(values);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
catch (e) {
|
|
1723
|
+
reject(e);
|
|
1724
|
+
}
|
|
1725
|
+
}, additionalArgs);
|
|
1726
|
+
});
|
|
1727
|
+
}
|
|
1662
1728
|
function syncItemProcessor(pending) {
|
|
1663
1729
|
arrForEach(pending, function (fn) {
|
|
1664
1730
|
try {
|
|
@@ -1710,11 +1776,16 @@
|
|
|
1710
1776
|
return thePromise;
|
|
1711
1777
|
}
|
|
1712
1778
|
var _promiseCreator;
|
|
1779
|
+
var _allSettledCreator;
|
|
1713
1780
|
function createPromise(executor, timeout) {
|
|
1714
1781
|
!_promiseCreator && (_promiseCreator = createCachedValue(createNativePromise));
|
|
1715
1782
|
return _promiseCreator.v.call(this, executor, timeout);
|
|
1716
1783
|
}
|
|
1717
1784
|
var createAllPromise = /*#__PURE__*/ _createAllPromise(createPromise);
|
|
1785
|
+
function createAllSettledPromise(input, timeout) {
|
|
1786
|
+
!_allSettledCreator && (_allSettledCreator = _createAllSettledPromise(createPromise));
|
|
1787
|
+
return _allSettledCreator.v(input, timeout);
|
|
1788
|
+
}
|
|
1718
1789
|
|
|
1719
1790
|
var UNDEFINED_VALUE = undefined;
|
|
1720
1791
|
var STR_EMPTY$2 = "";
|
|
@@ -2232,7 +2303,7 @@
|
|
|
2232
2303
|
return result;
|
|
2233
2304
|
}
|
|
2234
2305
|
|
|
2235
|
-
var version = '3.3.0-nightly3.2406-
|
|
2306
|
+
var version = '3.3.0-nightly3.2406-09';
|
|
2236
2307
|
var instanceName = "." + newId(6);
|
|
2237
2308
|
var _dataUid = 0;
|
|
2238
2309
|
function _canAcceptData(target) {
|
|
@@ -4629,6 +4700,8 @@
|
|
|
4629
4700
|
var strNotificationManager = "_notificationManager";
|
|
4630
4701
|
var strSdkUnloadingError = "SDK is still unloading...";
|
|
4631
4702
|
var strSdkNotInitialized = "SDK is not initialized";
|
|
4703
|
+
var maxInitQueueSize = 100;
|
|
4704
|
+
var maxInitTimeout = 50000;
|
|
4632
4705
|
var defaultConfig$1 = objDeepFreeze((_a$1 = {
|
|
4633
4706
|
cookieCfg: {}
|
|
4634
4707
|
},
|
|
@@ -4785,15 +4858,23 @@
|
|
|
4785
4858
|
var _extensions;
|
|
4786
4859
|
var _pluginVersionStringArr;
|
|
4787
4860
|
var _pluginVersionString;
|
|
4861
|
+
var _activeStatus;
|
|
4862
|
+
var _endpoint;
|
|
4863
|
+
var _initInMemoMaxSize;
|
|
4864
|
+
var _isStatusSet;
|
|
4788
4865
|
var _internalLogPoller;
|
|
4789
4866
|
var _internalLogPollerListening;
|
|
4790
4867
|
var _forceStopInternalLogPoller;
|
|
4791
4868
|
dynamicProto(AppInsightsCore, this, function (_self) {
|
|
4792
4869
|
_initDefaults();
|
|
4793
4870
|
_self["_getDbgPlgTargets"] = function () {
|
|
4794
|
-
return [_extensions];
|
|
4871
|
+
return [_extensions, _eventQueue];
|
|
4795
4872
|
};
|
|
4796
4873
|
_self[_DYN_IS_INITIALIZED ] = function () { return _isInitialized; };
|
|
4874
|
+
_self.activeStatus = function () { return _activeStatus; };
|
|
4875
|
+
_self._setPendingStatus = function () {
|
|
4876
|
+
_activeStatus = 3 ;
|
|
4877
|
+
};
|
|
4797
4878
|
_self[_DYN_INITIALIZE$1 ] = function (config, extensions, logger, notificationManager) {
|
|
4798
4879
|
if (_isUnloading) {
|
|
4799
4880
|
throwError(strSdkUnloadingError);
|
|
@@ -4804,14 +4885,88 @@
|
|
|
4804
4885
|
_configHandler = createDynamicConfig(config, defaultConfig$1, logger || _self[_DYN_LOGGER$1 ], false);
|
|
4805
4886
|
config = _configHandler.cfg;
|
|
4806
4887
|
_addUnloadHook(_configHandler[_DYN_WATCH ](function (details) {
|
|
4807
|
-
|
|
4888
|
+
var rootCfg = details.cfg;
|
|
4889
|
+
var isPending = _activeStatus === 3 ;
|
|
4890
|
+
if (isPending) {
|
|
4891
|
+
return;
|
|
4892
|
+
}
|
|
4893
|
+
_initInMemoMaxSize = rootCfg.initInMemoMaxSize || maxInitQueueSize;
|
|
4894
|
+
var ikey = rootCfg[_DYN_INSTRUMENTATION_KEY ];
|
|
4895
|
+
var endpointUrl = rootCfg.endpointUrl;
|
|
4896
|
+
if (isNullOrUndefined(ikey)) {
|
|
4897
|
+
_instrumentationKey = null;
|
|
4898
|
+
_activeStatus = ActiveStatus[_DYN__INACTIVE ];
|
|
4899
|
+
var msg = "Please provide instrumentation key";
|
|
4900
|
+
if (!_isInitialized) {
|
|
4901
|
+
throwError(msg);
|
|
4902
|
+
}
|
|
4903
|
+
else {
|
|
4904
|
+
_throwInternal(_logger, 1 , 100 , msg);
|
|
4905
|
+
_releaseQueues();
|
|
4906
|
+
}
|
|
4907
|
+
return;
|
|
4908
|
+
}
|
|
4909
|
+
var promises = [];
|
|
4910
|
+
if (isPromiseLike(ikey)) {
|
|
4911
|
+
promises[_DYN_PUSH ](ikey);
|
|
4912
|
+
_instrumentationKey = null;
|
|
4913
|
+
}
|
|
4914
|
+
else {
|
|
4915
|
+
_instrumentationKey = ikey;
|
|
4916
|
+
}
|
|
4917
|
+
if (isPromiseLike(endpointUrl)) {
|
|
4918
|
+
promises[_DYN_PUSH ](endpointUrl);
|
|
4919
|
+
_endpoint = null;
|
|
4920
|
+
}
|
|
4921
|
+
else {
|
|
4922
|
+
_endpoint = endpointUrl;
|
|
4923
|
+
}
|
|
4924
|
+
if (promises[_DYN_LENGTH$1 ]) {
|
|
4925
|
+
_isStatusSet = false;
|
|
4926
|
+
_activeStatus = 3 ;
|
|
4927
|
+
var initTimeout = isNotNullOrUndefined(rootCfg.initTimeOut) ? rootCfg.initTimeOut : maxInitTimeout;
|
|
4928
|
+
var allPromises = createAllSettledPromise(promises);
|
|
4929
|
+
scheduleTimeout(function () {
|
|
4930
|
+
if (!_isStatusSet) {
|
|
4931
|
+
_setStatus();
|
|
4932
|
+
}
|
|
4933
|
+
}, initTimeout);
|
|
4934
|
+
doAwaitResponse(allPromises, function (response) {
|
|
4935
|
+
try {
|
|
4936
|
+
if (_isStatusSet) {
|
|
4937
|
+
return;
|
|
4938
|
+
}
|
|
4939
|
+
if (!response.rejected) {
|
|
4940
|
+
var values = response[_DYN_VALUE$1 ];
|
|
4941
|
+
if (values && values[_DYN_LENGTH$1 ]) {
|
|
4942
|
+
var ikeyRes = values[0];
|
|
4943
|
+
_instrumentationKey = ikeyRes && ikeyRes[_DYN_VALUE$1 ];
|
|
4944
|
+
if (values[_DYN_LENGTH$1 ] > 1) {
|
|
4945
|
+
var endpointRes = values[1];
|
|
4946
|
+
_endpoint = endpointRes && endpointRes[_DYN_VALUE$1 ];
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
4949
|
+
if (_instrumentationKey) {
|
|
4950
|
+
config[_DYN_INSTRUMENTATION_KEY ] = _instrumentationKey;
|
|
4951
|
+
config.endpointUrl = _endpoint;
|
|
4952
|
+
}
|
|
4953
|
+
}
|
|
4954
|
+
_setStatus();
|
|
4955
|
+
}
|
|
4956
|
+
catch (e) {
|
|
4957
|
+
if (!_isStatusSet) {
|
|
4958
|
+
_setStatus();
|
|
4959
|
+
}
|
|
4960
|
+
}
|
|
4961
|
+
});
|
|
4962
|
+
}
|
|
4963
|
+
else {
|
|
4964
|
+
_setStatus();
|
|
4965
|
+
}
|
|
4808
4966
|
var extCfg = details.ref(details.cfg, STR_EXTENSION_CONFIG);
|
|
4809
4967
|
objForEachKey(extCfg, function (key) {
|
|
4810
4968
|
details.ref(extCfg, key);
|
|
4811
4969
|
});
|
|
4812
|
-
if (isNullOrUndefined(_instrumentationKey)) {
|
|
4813
|
-
throwError("Please provide instrumentation key");
|
|
4814
|
-
}
|
|
4815
4970
|
}));
|
|
4816
4971
|
_notificationManager = notificationManager;
|
|
4817
4972
|
_debugListener = _initDebugListener(_configHandler, _hookContainer, _notificationManager && _self[_DYN_GET_NOTIFY_MGR ](), _debugListener);
|
|
@@ -4834,8 +4989,9 @@
|
|
|
4834
4989
|
_registerDelayedCfgListener(config, _cfgListeners, _logger);
|
|
4835
4990
|
_cfgListeners = null;
|
|
4836
4991
|
_isInitialized = true;
|
|
4837
|
-
|
|
4838
|
-
|
|
4992
|
+
if (_activeStatus === ActiveStatus.ACTIVE) {
|
|
4993
|
+
_releaseQueues();
|
|
4994
|
+
}
|
|
4839
4995
|
};
|
|
4840
4996
|
_self.getChannels = function () {
|
|
4841
4997
|
var controls = [];
|
|
@@ -4856,14 +5012,16 @@
|
|
|
4856
5012
|
_notifyInvalidEvent(telemetryItem);
|
|
4857
5013
|
throwError("telemetry name required");
|
|
4858
5014
|
}
|
|
4859
|
-
telemetryItem
|
|
5015
|
+
telemetryItem[_DYN_I_KEY ] = telemetryItem[_DYN_I_KEY ] || _instrumentationKey;
|
|
4860
5016
|
telemetryItem[_DYN_TIME ] = telemetryItem[_DYN_TIME ] || toISOString(new Date());
|
|
4861
5017
|
telemetryItem.ver = telemetryItem.ver || "4.0";
|
|
4862
|
-
if (!_isUnloading && _self[_DYN_IS_INITIALIZED ]()) {
|
|
5018
|
+
if (!_isUnloading && _self[_DYN_IS_INITIALIZED ]() && _activeStatus === ActiveStatus.ACTIVE) {
|
|
4863
5019
|
_createTelCtx()[_DYN_PROCESS_NEXT ](telemetryItem);
|
|
4864
5020
|
}
|
|
4865
|
-
else {
|
|
4866
|
-
_eventQueue[
|
|
5021
|
+
else if (_activeStatus !== ActiveStatus[_DYN__INACTIVE ]) {
|
|
5022
|
+
if (_eventQueue[_DYN_LENGTH$1 ] <= _initInMemoMaxSize) {
|
|
5023
|
+
_eventQueue[_DYN_PUSH ](telemetryItem);
|
|
5024
|
+
}
|
|
4867
5025
|
}
|
|
4868
5026
|
}, function () { return ({ item: telemetryItem }); }, !(telemetryItem.sync));
|
|
4869
5027
|
};
|
|
@@ -4908,9 +5066,15 @@
|
|
|
4908
5066
|
if (_isInitialized && _eventQueue[_DYN_LENGTH$1 ] > 0) {
|
|
4909
5067
|
var eventQueue = _eventQueue;
|
|
4910
5068
|
_eventQueue = [];
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
5069
|
+
if (_activeStatus === 2 ) {
|
|
5070
|
+
arrForEach(eventQueue, function (event) {
|
|
5071
|
+
event[_DYN_I_KEY ] = event[_DYN_I_KEY ] || _instrumentationKey;
|
|
5072
|
+
_createTelCtx()[_DYN_PROCESS_NEXT ](event);
|
|
5073
|
+
});
|
|
5074
|
+
}
|
|
5075
|
+
else {
|
|
5076
|
+
_throwInternal(_logger, 2 , 20 , "core init status is not active");
|
|
5077
|
+
}
|
|
4914
5078
|
}
|
|
4915
5079
|
};
|
|
4916
5080
|
_self[_DYN_POLL_INTERNAL_LOGS$1 ] = function (eventName) {
|
|
@@ -4919,6 +5083,23 @@
|
|
|
4919
5083
|
_internalLogPoller && _internalLogPoller[_DYN_CANCEL ]();
|
|
4920
5084
|
return _startLogPoller(true);
|
|
4921
5085
|
};
|
|
5086
|
+
function _setStatus() {
|
|
5087
|
+
_isStatusSet = true;
|
|
5088
|
+
if (isNullOrUndefined(_instrumentationKey)) {
|
|
5089
|
+
_activeStatus = ActiveStatus[_DYN__INACTIVE ];
|
|
5090
|
+
_throwInternal(_logger, 1 , 112 , "ikey can't be resolved from promises");
|
|
5091
|
+
}
|
|
5092
|
+
else {
|
|
5093
|
+
_activeStatus = ActiveStatus.ACTIVE;
|
|
5094
|
+
}
|
|
5095
|
+
_releaseQueues();
|
|
5096
|
+
}
|
|
5097
|
+
function _releaseQueues() {
|
|
5098
|
+
if (_isInitialized) {
|
|
5099
|
+
_self.releaseQueue();
|
|
5100
|
+
_self[_DYN_POLL_INTERNAL_LOGS$1 ]();
|
|
5101
|
+
}
|
|
5102
|
+
}
|
|
4922
5103
|
function _startLogPoller(alwaysStart) {
|
|
4923
5104
|
if ((!_internalLogPoller || !_internalLogPoller[_DYN_ENABLED ]) && !_forceStopInternalLogPoller) {
|
|
4924
5105
|
var shouldStart = alwaysStart || (_logger && _logger.queue[_DYN_LENGTH$1 ] > 0);
|
|
@@ -5192,6 +5373,10 @@
|
|
|
5192
5373
|
_forceStopInternalLogPoller = false;
|
|
5193
5374
|
_internalLogPoller = null;
|
|
5194
5375
|
_internalLogPollerListening = false;
|
|
5376
|
+
_activeStatus = 0 ;
|
|
5377
|
+
_endpoint = null;
|
|
5378
|
+
_initInMemoMaxSize = null;
|
|
5379
|
+
_isStatusSet = false;
|
|
5195
5380
|
}
|
|
5196
5381
|
function _createTelCtx() {
|
|
5197
5382
|
var theCtx = createProcessTelemetryContext(_getPluginChain(), _configHandler.cfg, _self);
|
|
@@ -5334,7 +5519,7 @@
|
|
|
5334
5519
|
var _a;
|
|
5335
5520
|
var item = (_a = {},
|
|
5336
5521
|
_a[_DYN_NAME ] = _internalLogsEventName ? _internalLogsEventName : "InternalMessageId: " + logMessage[_DYN_MESSAGE_ID ],
|
|
5337
|
-
_a
|
|
5522
|
+
_a[_DYN_I_KEY ] = _instrumentationKey,
|
|
5338
5523
|
_a[_DYN_TIME ] = toISOString(new Date()),
|
|
5339
5524
|
_a.baseType = _InternalLogMessage.dataType,
|
|
5340
5525
|
_a.baseData = { message: logMessage[_DYN_MESSAGE ] },
|
|
@@ -5770,7 +5955,7 @@
|
|
|
5770
5955
|
if (!responseHandled) {
|
|
5771
5956
|
responseHandled = true;
|
|
5772
5957
|
if (!result.rejected) {
|
|
5773
|
-
var response_1 = result
|
|
5958
|
+
var response_1 = result[_DYN_VALUE$1 ];
|
|
5774
5959
|
try {
|
|
5775
5960
|
if (!_isOneDs && !response_1.ok) {
|
|
5776
5961
|
_handleError(response_1.statusText);
|
|
@@ -5783,7 +5968,7 @@
|
|
|
5783
5968
|
}
|
|
5784
5969
|
else {
|
|
5785
5970
|
doAwaitResponse(response_1.text(), function (resp) {
|
|
5786
|
-
_onFetchComplete(response_1, payload, resp
|
|
5971
|
+
_onFetchComplete(response_1, payload, resp[_DYN_VALUE$1 ]);
|
|
5787
5972
|
resolveFunc && resolveFunc(true);
|
|
5788
5973
|
});
|
|
5789
5974
|
}
|
|
@@ -6230,7 +6415,7 @@
|
|
|
6230
6415
|
var _DYN_CAN_HANDLE = "canHandle";
|
|
6231
6416
|
|
|
6232
6417
|
var _a;
|
|
6233
|
-
var Version = '4.3.0-nightly3.2406-
|
|
6418
|
+
var Version = '4.3.0-nightly3.2406-09';
|
|
6234
6419
|
var FullVersionString = "1DS-Web-JS-" + Version;
|
|
6235
6420
|
var ObjHasOwnProperty = ObjProto$1.hasOwnProperty;
|
|
6236
6421
|
var strDisabledPropertyName = "Microsoft_ApplicationInsights_BypassAjaxInstrumentation";
|