@microsoft/applicationinsights-properties-js 3.0.0-beta.2302-03 → 3.0.0-beta.2302-04
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/browser/applicationinsights-properties-js.integrity.json +9 -9
- package/browser/applicationinsights-properties-js.js +92 -97
- package/browser/applicationinsights-properties-js.js.map +1 -1
- package/browser/applicationinsights-properties-js.min.js +2 -2
- package/browser/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.api.json +1 -1
- package/dist/applicationinsights-properties-js.d.ts +1 -1
- package/dist/applicationinsights-properties-js.js +92 -97
- package/dist/applicationinsights-properties-js.js.map +1 -1
- package/dist/applicationinsights-properties-js.min.js +2 -2
- package/dist/applicationinsights-properties-js.min.js.map +1 -1
- package/dist/applicationinsights-properties-js.rollup.d.ts +1 -1
- package/dist-esm/Context/Application.js +1 -1
- package/dist-esm/Context/Device.js +1 -1
- package/dist-esm/Context/Internal.js +1 -1
- package/dist-esm/Context/Location.js +1 -1
- package/dist-esm/Context/Session.js +1 -1
- package/dist-esm/Context/TelemetryTrace.js +1 -1
- package/dist-esm/Context/User.js +1 -1
- package/dist-esm/Interfaces/IPropTelemetryContext.js +1 -1
- package/dist-esm/Interfaces/IPropertiesConfig.js +1 -1
- package/dist-esm/PropertiesPlugin.js +1 -1
- package/dist-esm/TelemetryContext.js +1 -1
- package/dist-esm/__DynamicConstants.js +1 -1
- package/dist-esm/applicationinsights-properties-js.js +1 -1
- package/package.json +4 -4
- package/types/tsdoc-metadata.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2302-
|
|
2
|
+
* Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2302-04
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
(function (global, factory) {
|
|
@@ -393,7 +393,8 @@
|
|
|
393
393
|
return typeof value === theType;
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
function _createObjIs(
|
|
396
|
+
function _createObjIs(theName) {
|
|
397
|
+
var theType = "[object " + theName + "]";
|
|
397
398
|
return function (value) {
|
|
398
399
|
return !!(value && objToString(value) === theType);
|
|
399
400
|
};
|
|
@@ -420,7 +421,7 @@
|
|
|
420
421
|
}
|
|
421
422
|
var isArray = ArrCls.isArray;
|
|
422
423
|
var isNumber = _createIs(NUMBER);
|
|
423
|
-
var isError = _createObjIs("
|
|
424
|
+
var isError = _createObjIs("Error");
|
|
424
425
|
function isTruthy(value) {
|
|
425
426
|
return !(!value || _safeGet(function () { return !(value && (0 + value)); }, !value));
|
|
426
427
|
}
|
|
@@ -448,14 +449,21 @@
|
|
|
448
449
|
}
|
|
449
450
|
}
|
|
450
451
|
|
|
452
|
+
function _createKeyValueMap(values, keyType, valueType, completeFn) {
|
|
453
|
+
var theMap = {};
|
|
454
|
+
objForEachKey(values, function (key, value) {
|
|
455
|
+
theMap[key] = keyType ? value : key;
|
|
456
|
+
theMap[value] = valueType ? value : key;
|
|
457
|
+
});
|
|
458
|
+
return completeFn(theMap);
|
|
459
|
+
}
|
|
460
|
+
|
|
451
461
|
function throwTypeError(message) {
|
|
452
462
|
throw new TypeError(message);
|
|
453
463
|
}
|
|
454
464
|
|
|
455
465
|
var _objFreeze = ObjClass["freeze"];
|
|
456
|
-
function
|
|
457
|
-
return value;
|
|
458
|
-
}
|
|
466
|
+
var _doNothing = function (value) { return value; };
|
|
459
467
|
ObjClass["assign"];
|
|
460
468
|
function objKeys(value) {
|
|
461
469
|
if (!isObject(value) || value === null) {
|
|
@@ -478,12 +486,7 @@
|
|
|
478
486
|
var objGetPrototypeOf = ObjClass["getPrototypeOf"] || _doNothing;
|
|
479
487
|
|
|
480
488
|
function createEnum(values) {
|
|
481
|
-
|
|
482
|
-
objForEachKey(values, function (field, value) {
|
|
483
|
-
theEnum[field] = value;
|
|
484
|
-
theEnum[value] = field;
|
|
485
|
-
});
|
|
486
|
-
return objDeepFreeze(theEnum);
|
|
489
|
+
return _createKeyValueMap(values, 1, 0, objDeepFreeze);
|
|
487
490
|
}
|
|
488
491
|
|
|
489
492
|
var asString = StrCls;
|
|
@@ -514,6 +517,67 @@
|
|
|
514
517
|
return _globalCfg;
|
|
515
518
|
}
|
|
516
519
|
|
|
520
|
+
function dumpObj(object, format) {
|
|
521
|
+
var propertyValueDump = "";
|
|
522
|
+
if (isError(object)) {
|
|
523
|
+
propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
try {
|
|
527
|
+
propertyValueDump = JSON.stringify(object, null, format ? (isNumber(format) ? format : 4) : UNDEF_VALUE);
|
|
528
|
+
}
|
|
529
|
+
catch (e) {
|
|
530
|
+
propertyValueDump = " - " + dumpObj(e, format);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return objToString(object) + ": " + propertyValueDump;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
function _extractArgs(args, startAt) {
|
|
537
|
+
var theArgs = [];
|
|
538
|
+
for (var lp = startAt; lp < args[LENGTH]; lp++) {
|
|
539
|
+
theArgs[lp - startAt] = args[lp];
|
|
540
|
+
}
|
|
541
|
+
return theArgs;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
function _unwrapFunction(funcName) {
|
|
545
|
+
return function (thisArg) {
|
|
546
|
+
var args = _extractArgs(arguments, 1);
|
|
547
|
+
if ((thisArg || thisArg === EMPTY) && thisArg[funcName]) {
|
|
548
|
+
return thisArg[funcName].apply(thisArg, args);
|
|
549
|
+
}
|
|
550
|
+
throwTypeError("'" + funcName + "' not defined for " + dumpObj(thisArg));
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
var mathMax = MathCls.max;
|
|
555
|
+
|
|
556
|
+
var strSlice = _unwrapFunction("slice");
|
|
557
|
+
|
|
558
|
+
var SUB_STR = "substr";
|
|
559
|
+
var strSubstring = _unwrapFunction("substring");
|
|
560
|
+
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
|
|
561
|
+
function polyStrSubstr(value, start, length) {
|
|
562
|
+
if (isNullOrUndefined(value)) {
|
|
563
|
+
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
|
|
564
|
+
}
|
|
565
|
+
if (length < 0) {
|
|
566
|
+
return EMPTY;
|
|
567
|
+
}
|
|
568
|
+
start = start || 0;
|
|
569
|
+
if (start < 0) {
|
|
570
|
+
start = mathMax(start + value[LENGTH], 0);
|
|
571
|
+
}
|
|
572
|
+
if (isUndefined(length)) {
|
|
573
|
+
return strSlice(value, start);
|
|
574
|
+
}
|
|
575
|
+
return strSlice(value, start, start + length);
|
|
576
|
+
}
|
|
577
|
+
function strLeft(value, count) {
|
|
578
|
+
return strSubstring(value, 0, count);
|
|
579
|
+
}
|
|
580
|
+
|
|
517
581
|
var _polySymbols;
|
|
518
582
|
function _globalSymbolRegistry() {
|
|
519
583
|
if (!_polySymbols) {
|
|
@@ -613,6 +677,9 @@
|
|
|
613
677
|
var _cachedWindow;
|
|
614
678
|
var _cachedDocument;
|
|
615
679
|
var _cachedNavigator;
|
|
680
|
+
function _lazySafeGetInst(name) {
|
|
681
|
+
return _lazySafeGet(function () { return getInst(name) || UNDEF_VALUE; }, UNDEF_VALUE);
|
|
682
|
+
}
|
|
616
683
|
function getGlobal(useCached) {
|
|
617
684
|
(!_cachedGlobal || useCached === false || (_globalLazyTestHooks.lzy && !_cachedGlobal.b)) && (_cachedGlobal = _lazySafeGet(_getGlobalValue, null));
|
|
618
685
|
return _cachedGlobal.v;
|
|
@@ -628,29 +695,34 @@
|
|
|
628
695
|
return null;
|
|
629
696
|
}
|
|
630
697
|
function getDocument() {
|
|
631
|
-
(!_cachedDocument || (_globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument =
|
|
698
|
+
(!_cachedDocument || (_globalLazyTestHooks.lzy && !_cachedDocument.b)) && (_cachedDocument = _lazySafeGetInst(DOCUMENT));
|
|
632
699
|
return _cachedDocument.v;
|
|
633
700
|
}
|
|
634
701
|
function hasWindow() {
|
|
635
702
|
return !!getWindow();
|
|
636
703
|
}
|
|
637
704
|
function getWindow() {
|
|
638
|
-
(!_cachedWindow || (_globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow =
|
|
705
|
+
(!_cachedWindow || (_globalLazyTestHooks.lzy && !_cachedWindow.b)) && (_cachedWindow = _lazySafeGetInst(WINDOW));
|
|
639
706
|
return _cachedWindow.v;
|
|
640
707
|
}
|
|
641
708
|
function getNavigator() {
|
|
642
|
-
(!_cachedNavigator || (_globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator =
|
|
709
|
+
(!_cachedNavigator || (_globalLazyTestHooks.lzy && !_cachedNavigator.b)) && (_cachedNavigator = _lazySafeGetInst(NAVIGATOR));
|
|
643
710
|
return _cachedNavigator.v;
|
|
644
711
|
}
|
|
645
712
|
|
|
646
713
|
var _symbol;
|
|
647
714
|
var _symbolFor;
|
|
648
715
|
var _symbolKeyFor;
|
|
716
|
+
function _getSymbolValue(name) {
|
|
717
|
+
return _lazySafeGet(function () {
|
|
718
|
+
return (_symbol.v ? _symbol[name] : UNDEF_VALUE);
|
|
719
|
+
}, UNDEF_VALUE);
|
|
720
|
+
}
|
|
649
721
|
function getSymbol() {
|
|
650
722
|
var resetCache = !_symbol || (_globalLazyTestHooks && _globalLazyTestHooks.lzy && !_symbol.b);
|
|
651
|
-
resetCache && (_symbol =
|
|
652
|
-
(!_symbolFor || resetCache) && (_symbolFor =
|
|
653
|
-
(!_symbolKeyFor || resetCache) && (_symbolKeyFor =
|
|
723
|
+
resetCache && (_symbol = _lazySafeGetInst(SYMBOL));
|
|
724
|
+
(!_symbolFor || resetCache) && (_symbolFor = _getSymbolValue("for"));
|
|
725
|
+
(!_symbolKeyFor || resetCache) && (_symbolKeyFor = _getSymbolValue("keyFor"));
|
|
654
726
|
return _symbol.v;
|
|
655
727
|
}
|
|
656
728
|
function newSymbol(description, noPoly) {
|
|
@@ -698,46 +770,6 @@
|
|
|
698
770
|
}
|
|
699
771
|
}
|
|
700
772
|
|
|
701
|
-
function dumpObj(object, format) {
|
|
702
|
-
var objectTypeDump = objToString(object);
|
|
703
|
-
var propertyValueDump = "";
|
|
704
|
-
if (objectTypeDump === "[object Error]") {
|
|
705
|
-
propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
|
|
706
|
-
}
|
|
707
|
-
else {
|
|
708
|
-
try {
|
|
709
|
-
if (format) {
|
|
710
|
-
if (isNumber(format)) {
|
|
711
|
-
propertyValueDump = JSON.stringify(object, null, format);
|
|
712
|
-
}
|
|
713
|
-
else {
|
|
714
|
-
propertyValueDump = JSON.stringify(object, null, 4);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
else {
|
|
718
|
-
propertyValueDump = JSON.stringify(object);
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
catch (e) {
|
|
722
|
-
propertyValueDump = objToString(object) + " - " + dumpObj(e, format);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
return objectTypeDump + ": " + propertyValueDump;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
function _unwrapFunction(funcName) {
|
|
729
|
-
return function (thisArg) {
|
|
730
|
-
var args = [];
|
|
731
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
732
|
-
args[_i - 1] = arguments[_i];
|
|
733
|
-
}
|
|
734
|
-
if ((thisArg || thisArg === EMPTY) && thisArg[funcName]) {
|
|
735
|
-
return thisArg[funcName].apply(thisArg, args);
|
|
736
|
-
}
|
|
737
|
-
throwTypeError("'" + funcName + "' not defined for " + dumpObj(thisArg));
|
|
738
|
-
};
|
|
739
|
-
}
|
|
740
|
-
|
|
741
773
|
var arrIndexOf = _unwrapFunction(INDEX_OF);
|
|
742
774
|
|
|
743
775
|
function objSetPrototypeOf(obj, proto) {
|
|
@@ -746,9 +778,7 @@
|
|
|
746
778
|
d.__proto__ = b;
|
|
747
779
|
}) ||
|
|
748
780
|
function (d, b) {
|
|
749
|
-
objForEachKey(b, function (key, value) {
|
|
750
|
-
d[key] = value;
|
|
751
|
-
});
|
|
781
|
+
objForEachKey(b, function (key, value) { return d[key] = value; });
|
|
752
782
|
};
|
|
753
783
|
return fn(obj, proto);
|
|
754
784
|
}
|
|
@@ -813,33 +843,6 @@
|
|
|
813
843
|
return result;
|
|
814
844
|
}
|
|
815
845
|
|
|
816
|
-
var mathMax = MathCls.max;
|
|
817
|
-
|
|
818
|
-
var strSlice = _unwrapFunction("slice");
|
|
819
|
-
|
|
820
|
-
var SUB_STR = "substr";
|
|
821
|
-
var strSubstring = _unwrapFunction("substring");
|
|
822
|
-
var strSubstr = StrProto[SUB_STR] ? _unwrapFunction(SUB_STR) : polyStrSubstr;
|
|
823
|
-
function polyStrSubstr(value, start, length) {
|
|
824
|
-
if (isNullOrUndefined(value)) {
|
|
825
|
-
throwTypeError("'polyStrSubstr called with invalid " + dumpObj(value));
|
|
826
|
-
}
|
|
827
|
-
if (length < 0) {
|
|
828
|
-
return EMPTY;
|
|
829
|
-
}
|
|
830
|
-
start = start || 0;
|
|
831
|
-
if (start < 0) {
|
|
832
|
-
start = mathMax(start + value[LENGTH], 0);
|
|
833
|
-
}
|
|
834
|
-
if (isUndefined(length)) {
|
|
835
|
-
return strSlice(value, start);
|
|
836
|
-
}
|
|
837
|
-
return strSlice(value, start, start + length);
|
|
838
|
-
}
|
|
839
|
-
function strLeft(value, count) {
|
|
840
|
-
return strSubstring(value, 0, count);
|
|
841
|
-
}
|
|
842
|
-
|
|
843
846
|
var ENDS_WITH = "endsWith";
|
|
844
847
|
var strEndsWith = StrProto[ENDS_WITH] ? _unwrapFunction(ENDS_WITH) : polyStrEndsWith;
|
|
845
848
|
function polyStrEndsWith(value, searchString, length) {
|
|
@@ -909,14 +912,6 @@
|
|
|
909
912
|
return timer;
|
|
910
913
|
}
|
|
911
914
|
|
|
912
|
-
function _extractArgs(args, startAt) {
|
|
913
|
-
var theArgs = [];
|
|
914
|
-
for (var lp = startAt; lp < args[LENGTH]; lp++) {
|
|
915
|
-
theArgs[lp - startAt] = args[lp];
|
|
916
|
-
}
|
|
917
|
-
return theArgs;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
915
|
function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
|
|
921
916
|
var isArr = isArray(overrideFn);
|
|
922
917
|
var len = isArr ? overrideFn.length : 0;
|
|
@@ -1238,7 +1233,7 @@
|
|
|
1238
1233
|
}
|
|
1239
1234
|
|
|
1240
1235
|
var _objDefineProperty = ObjDefineProperty;
|
|
1241
|
-
var version = "3.0.0-beta.2302-
|
|
1236
|
+
var version = "3.0.0-beta.2302-04";
|
|
1242
1237
|
var instanceName = "." + newId(6);
|
|
1243
1238
|
var _dataUid = 0;
|
|
1244
1239
|
function _createAccessor(target, prop, value) {
|