@microsoft/applicationinsights-dependencies-js 3.0.0-beta.2211-04 → 3.0.0-beta.2212-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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Microsoft Application Insights XHR dependencies plugin, 3.0.0-beta.2211-04
2
+ * Microsoft Application Insights XHR dependencies plugin, 3.0.0-beta.2212-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  *
5
5
  * Microsoft Application Insights Team
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Dependencies Plugin, 3.0.0-beta.2211-04
2
+ * Application Insights JavaScript SDK - Dependencies Plugin, 3.0.0-beta.2212-04
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -557,114 +557,39 @@
557
557
  return registry.k[key];
558
558
  }
559
559
 
560
- function objSetPrototypeOf(obj, proto) {
561
- var fn = ObjClass["setPrototypeOf"] ||
562
- ({ __proto__: [] } instanceof Array && function (d, b) {
563
- d.__proto__ = b;
564
- }) ||
565
- function (d, b) {
566
- objForEachKey(b, function (key, value) {
567
- d[key] = value;
568
- });
569
- };
570
- return fn(obj, proto);
571
- }
572
-
573
- function _createCustomError(name, d, b) {
574
- objSetPrototypeOf(d, b);
575
- function __() {
576
- this.constructor = d;
577
- }
578
- __[PROTOTYPE] = b[PROTOTYPE];
579
- __[PROTOTYPE].name = name;
580
- d[PROTOTYPE] = new __();
581
- return d;
582
- }
583
- function createCustomError(name, constructCb) {
584
- var baseClass = Error;
585
- var customError = _createCustomError(name, function () {
586
- var _this = this;
587
- _this = baseClass.apply(_this, arguments) || _this;
588
- constructCb && constructCb(_this, arguments);
589
- return _this;
590
- }, baseClass);
591
- return customError;
592
- }
593
- var _unsupportedError;
594
- function throwUnsupported(message) {
595
- if (!_unsupportedError) {
596
- _unsupportedError = createCustomError("UnsupportedError");
597
- }
598
- throw new _unsupportedError(message);
599
- }
600
-
601
- function dumpObj(object, format) {
602
- var objectTypeDump = objToString(object);
603
- var propertyValueDump = "";
604
- if (objectTypeDump === "[object Error]") {
605
- propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
606
- }
607
- else {
608
- try {
609
- if (format) {
610
- if (isNumber(format)) {
611
- propertyValueDump = JSON.stringify(object, null, format);
612
- }
613
- else {
614
- propertyValueDump = JSON.stringify(object, null, 4);
615
- }
616
- }
617
- else {
618
- propertyValueDump = JSON.stringify(object);
619
- }
620
- }
621
- catch (e) {
622
- propertyValueDump = objToString(object) + " - " + dumpObj(e, format);
623
- }
624
- }
625
- return objectTypeDump + ": " + propertyValueDump;
626
- }
627
-
628
- var _objDefineProperty$1 = ObjClass["defineProperty"];
629
- function objDefineProp(target, key, descriptor) {
630
- if (_objDefineProperty$1) {
631
- _objDefineProperty$1(target, key, descriptor);
632
- return target;
633
- }
634
- throwUnsupported("Unable to define property [" + objToString(key) + "] on " + dumpObj(target));
560
+ var propMap = {
561
+ e: "enumerable",
562
+ c: "configurable",
563
+ v: VALUE,
564
+ w: "writable",
565
+ g: "get",
566
+ s: "set"
567
+ };
568
+ function _createProp(value) {
569
+ var prop = {};
570
+ prop[propMap["c"]] = true;
571
+ prop[propMap["e"]] = true;
572
+ objForEachKey(value, function (key, value) {
573
+ prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
574
+ });
575
+ return prop;
635
576
  }
636
- function objDefineGet(target, key, value, configurable) {
577
+ var objDefineProp = ObjClass.defineProperty;
578
+ function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
637
579
  var desc = {
638
- enumerable: true,
639
- configurable: isUndefined(configurable) ? true : configurable
580
+ e: enumerable,
581
+ c: configurable
640
582
  };
641
- if (isFunction(value)) {
642
- desc.get = value;
583
+ if (getProp) {
584
+ desc.g = getProp;
643
585
  }
644
- else {
645
- desc[VALUE] = value;
586
+ if (setProp) {
587
+ desc.s = setProp;
646
588
  }
647
- return objDefineProp(target, key, desc);
589
+ return objDefineProp(target, prop, _createProp(desc));
648
590
  }
649
- function objDefineAccessors(target, prop, getProp, setProp, configurable) {
650
- if (_objDefineProperty$1) {
651
- try {
652
- var descriptor = {
653
- enumerable: true,
654
- configurable: isUndefined(configurable) ? true : configurable
655
- };
656
- if (getProp) {
657
- descriptor.get = getProp;
658
- }
659
- if (setProp) {
660
- descriptor.set = setProp;
661
- }
662
- return objDefineProp(target, prop, descriptor);
663
- }
664
- catch (e) {
665
- throwUnsupported("Unable to define accessors for [" + objToString(prop) + "] on " + dumpObj(target));
666
- }
667
- }
591
+ function objDefine(target, key, propDesc) {
592
+ return objDefineProp(target, key, _createProp(propDesc));
668
593
  }
669
594
 
670
595
  var _globalLazyTestHooks;
@@ -676,24 +601,21 @@
676
601
  var lazyValue = {};
677
602
  _fetchLazyTestHooks && _fetchLazyTestHooks();
678
603
  lazyValue.b = _globalLazyTestHooks.lzy;
679
- objDefineGet(lazyValue, "v", function () {
680
- var result = cb();
681
- if (!_globalLazyTestHooks.lzy) {
682
- objDefineProp(lazyValue, "v", {
683
- enumerable: true,
684
- configurable: true,
685
- writable: false,
686
- value: result
687
- });
688
- if (lazyValue.b) {
689
- delete lazyValue.b;
604
+ objDefine(lazyValue, "v", {
605
+ g: function () {
606
+ var result = cb();
607
+ if (!_globalLazyTestHooks.lzy) {
608
+ objDefine(lazyValue, "v", { v: result });
609
+ if (lazyValue.b) {
610
+ delete lazyValue.b;
611
+ }
690
612
  }
613
+ if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
614
+ lazyValue.b = _globalLazyTestHooks.lzy;
615
+ }
616
+ return result;
691
617
  }
692
- if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
693
- lazyValue.b = _globalLazyTestHooks.lzy;
694
- }
695
- return result;
696
- }, true);
618
+ });
697
619
  return lazyValue;
698
620
  }
699
621
 
@@ -793,6 +715,33 @@
793
715
  }
794
716
  }
795
717
 
718
+ function dumpObj(object, format) {
719
+ var objectTypeDump = objToString(object);
720
+ var propertyValueDump = "";
721
+ if (objectTypeDump === "[object Error]") {
722
+ propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
723
+ }
724
+ else {
725
+ try {
726
+ if (format) {
727
+ if (isNumber(format)) {
728
+ propertyValueDump = JSON.stringify(object, null, format);
729
+ }
730
+ else {
731
+ propertyValueDump = JSON.stringify(object, null, 4);
732
+ }
733
+ }
734
+ else {
735
+ propertyValueDump = JSON.stringify(object);
736
+ }
737
+ }
738
+ catch (e) {
739
+ propertyValueDump = objToString(object) + " - " + dumpObj(e, format);
740
+ }
741
+ }
742
+ return objectTypeDump + ": " + propertyValueDump;
743
+ }
744
+
796
745
  function _unwrapFunction(funcName) {
797
746
  return function (thisArg) {
798
747
  var args = [];
@@ -808,6 +757,40 @@
808
757
 
809
758
  var arrIndexOf = _unwrapFunction(INDEX_OF);
810
759
 
760
+ function objSetPrototypeOf(obj, proto) {
761
+ var fn = ObjClass["setPrototypeOf"] ||
762
+ ({ __proto__: [] } instanceof Array && function (d, b) {
763
+ d.__proto__ = b;
764
+ }) ||
765
+ function (d, b) {
766
+ objForEachKey(b, function (key, value) {
767
+ d[key] = value;
768
+ });
769
+ };
770
+ return fn(obj, proto);
771
+ }
772
+
773
+ function _createCustomError(name, d, b) {
774
+ objSetPrototypeOf(d, b);
775
+ function __() {
776
+ this.constructor = d;
777
+ }
778
+ __[PROTOTYPE] = b[PROTOTYPE];
779
+ __[PROTOTYPE].name = name;
780
+ d[PROTOTYPE] = new __();
781
+ return d;
782
+ }
783
+ function createCustomError(name, constructCb) {
784
+ var baseClass = Error;
785
+ var customError = _createCustomError(name, function () {
786
+ var _this = this;
787
+ _this = baseClass.apply(_this, arguments) || _this;
788
+ constructCb && constructCb(_this, arguments);
789
+ return _this;
790
+ }, baseClass);
791
+ return customError;
792
+ }
793
+
811
794
  function utcNow() {
812
795
  return (Date.now || polyUtcNow)();
813
796
  }
@@ -1235,7 +1218,7 @@
1235
1218
  }
1236
1219
 
1237
1220
  var _objDefineProperty = ObjDefineProperty;
1238
- var version = "3.0.0-beta.2211-04";
1221
+ var version = "3.0.0-beta.2212-04";
1239
1222
  var instanceName = "." + newId(6);
1240
1223
  var _dataUid = 0;
1241
1224
  function _createAccessor(target, prop, value) {