@microsoft/applicationinsights-properties-js 3.0.0-beta.2211-04 → 3.0.0-beta.2212-03

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,25 +1,25 @@
1
1
  {
2
2
  "name": "applicationinsights-properties-js",
3
- "version": "3.0.0-beta.2211-04",
3
+ "version": "3.0.0-beta.2212-03",
4
4
  "ext": {
5
5
  "@js": {
6
6
  "file": "applicationinsights-properties-js.js",
7
7
  "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-xuSaUtJyPEj71jI1YCKbLM2rKdZZ02Y0Fvc8NaxCXnA= sha384-HpRya/L30IVIjkbmsc7jSuNCODNB/fhMOaO9yO+tMJpFxJbbQ6O6Bqvf0Do+LGNs sha512-5irx1xN8o3CZ3GZAYJH3s1vXJXoiUNR1ZXfWx+qcEU3FHhqOK6MdqSERDxSuLfxtGyF8pTj+58BAZ50TsD+2Aw==",
8
+ "integrity": "sha256-JJl9ByLpt0jSlD5hew+yYN3AE69EJvNLxox4/jeNEpU= sha384-PkscTuNkryC/JK+nxUYou5V+//awbwanKnXcGz4/pjQDyUlK3OWW54zygnfE7BGA sha512-e/FYsf+6MkKN+APwHfEZ5MoOKG/UErgpaqFhWdP+//TulsgdzTIFKsHyawkbdXi3/O8YU2vXGd0b/ZH0V5ThKQ==",
9
9
  "hashes": {
10
- "sha256": "xuSaUtJyPEj71jI1YCKbLM2rKdZZ02Y0Fvc8NaxCXnA=",
11
- "sha384": "HpRya/L30IVIjkbmsc7jSuNCODNB/fhMOaO9yO+tMJpFxJbbQ6O6Bqvf0Do+LGNs",
12
- "sha512": "5irx1xN8o3CZ3GZAYJH3s1vXJXoiUNR1ZXfWx+qcEU3FHhqOK6MdqSERDxSuLfxtGyF8pTj+58BAZ50TsD+2Aw=="
10
+ "sha256": "JJl9ByLpt0jSlD5hew+yYN3AE69EJvNLxox4/jeNEpU=",
11
+ "sha384": "PkscTuNkryC/JK+nxUYou5V+//awbwanKnXcGz4/pjQDyUlK3OWW54zygnfE7BGA",
12
+ "sha512": "e/FYsf+6MkKN+APwHfEZ5MoOKG/UErgpaqFhWdP+//TulsgdzTIFKsHyawkbdXi3/O8YU2vXGd0b/ZH0V5ThKQ=="
13
13
  }
14
14
  },
15
15
  "@min.js": {
16
16
  "file": "applicationinsights-properties-js.min.js",
17
17
  "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-lgorAgagMpTj2sGx028mXzl0uEsG646aZV+RjTxMgCQ= sha384-l1dFGNLu5+RlyvsKZSl4EdCEX1QqEksxhanyDwCEO/e4PQQjsTlthVoOa79+psoR sha512-Sm8zfK4cXA/u41+h7CTRKN6WpzdDhtkPfuwMo/tYoq9SfUKDddtF/ralmdtHg8jk03W1pzMTXd6bNWgo6UiCvQ==",
18
+ "integrity": "sha256-V8hs1/hjWNb/RtcWZHPaS8eSUj1/6nBVKMW+4nftcBY= sha384-7GtzdOqvz7Ims1Bm+X29Fnq041A6XV0jC71TgrZmrLqSbHH/cavGxJuZfqoesjtB sha512-VpStnQRcFvNoo16L40vnsM+hIlxdBrEmIfguEedu5SJtKFaAD3L4z7uwXNPnOXNhxxZ9ynUFUhBLGW9R7WivCw==",
19
19
  "hashes": {
20
- "sha256": "lgorAgagMpTj2sGx028mXzl0uEsG646aZV+RjTxMgCQ=",
21
- "sha384": "l1dFGNLu5+RlyvsKZSl4EdCEX1QqEksxhanyDwCEO/e4PQQjsTlthVoOa79+psoR",
22
- "sha512": "Sm8zfK4cXA/u41+h7CTRKN6WpzdDhtkPfuwMo/tYoq9SfUKDddtF/ralmdtHg8jk03W1pzMTXd6bNWgo6UiCvQ=="
20
+ "sha256": "V8hs1/hjWNb/RtcWZHPaS8eSUj1/6nBVKMW+4nftcBY=",
21
+ "sha384": "7GtzdOqvz7Ims1Bm+X29Fnq041A6XV0jC71TgrZmrLqSbHH/cavGxJuZfqoesjtB",
22
+ "sha512": "VpStnQRcFvNoo16L40vnsM+hIlxdBrEmIfguEedu5SJtKFaAD3L4z7uwXNPnOXNhxxZ9ynUFUhBLGW9R7WivCw=="
23
23
  }
24
24
  }
25
25
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2211-04
2
+ * Application Insights JavaScript SDK - Properties Plugin, 3.0.0-beta.2212-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -540,114 +540,39 @@
540
540
  return registry.k[key];
541
541
  }
542
542
 
543
- function objSetPrototypeOf(obj, proto) {
544
- var fn = ObjClass["setPrototypeOf"] ||
545
- ({ __proto__: [] } instanceof Array && function (d, b) {
546
- d.__proto__ = b;
547
- }) ||
548
- function (d, b) {
549
- objForEachKey(b, function (key, value) {
550
- d[key] = value;
551
- });
552
- };
553
- return fn(obj, proto);
554
- }
555
-
556
- function _createCustomError(name, d, b) {
557
- objSetPrototypeOf(d, b);
558
- function __() {
559
- this.constructor = d;
560
- }
561
- __[PROTOTYPE] = b[PROTOTYPE];
562
- __[PROTOTYPE].name = name;
563
- d[PROTOTYPE] = new __();
564
- return d;
565
- }
566
- function createCustomError(name, constructCb) {
567
- var baseClass = Error;
568
- var customError = _createCustomError(name, function () {
569
- var _this = this;
570
- _this = baseClass.apply(_this, arguments) || _this;
571
- constructCb && constructCb(_this, arguments);
572
- return _this;
573
- }, baseClass);
574
- return customError;
575
- }
576
- var _unsupportedError;
577
- function throwUnsupported(message) {
578
- if (!_unsupportedError) {
579
- _unsupportedError = createCustomError("UnsupportedError");
580
- }
581
- throw new _unsupportedError(message);
582
- }
583
-
584
- function dumpObj(object, format) {
585
- var objectTypeDump = objToString(object);
586
- var propertyValueDump = "";
587
- if (objectTypeDump === "[object Error]") {
588
- propertyValueDump = "{ stack: '" + object.stack + "', message: '" + object.message + "', name: '" + object.name + "'";
589
- }
590
- else {
591
- try {
592
- if (format) {
593
- if (isNumber(format)) {
594
- propertyValueDump = JSON.stringify(object, null, format);
595
- }
596
- else {
597
- propertyValueDump = JSON.stringify(object, null, 4);
598
- }
599
- }
600
- else {
601
- propertyValueDump = JSON.stringify(object);
602
- }
603
- }
604
- catch (e) {
605
- propertyValueDump = objToString(object) + " - " + dumpObj(e, format);
606
- }
607
- }
608
- return objectTypeDump + ": " + propertyValueDump;
609
- }
610
-
611
- var _objDefineProperty$1 = ObjClass["defineProperty"];
612
- function objDefineProp(target, key, descriptor) {
613
- if (_objDefineProperty$1) {
614
- _objDefineProperty$1(target, key, descriptor);
615
- return target;
616
- }
617
- throwUnsupported("Unable to define property [" + objToString(key) + "] on " + dumpObj(target));
543
+ var propMap = {
544
+ e: "enumerable",
545
+ c: "configurable",
546
+ v: VALUE,
547
+ w: "writable",
548
+ g: "get",
549
+ s: "set"
550
+ };
551
+ function _createProp(value) {
552
+ var prop = {};
553
+ prop[propMap["c"]] = true;
554
+ prop[propMap["e"]] = true;
555
+ objForEachKey(value, function (key, value) {
556
+ prop[propMap[key]] = isUndefined(value) ? prop[propMap[key]] : value;
557
+ });
558
+ return prop;
618
559
  }
619
- function objDefineGet(target, key, value, configurable) {
560
+ var objDefineProp = ObjClass.defineProperty;
561
+ function objDefineAccessors(target, prop, getProp, setProp, configurable, enumerable) {
620
562
  var desc = {
621
- enumerable: true,
622
- configurable: isUndefined(configurable) ? true : configurable
563
+ e: enumerable,
564
+ c: configurable
623
565
  };
624
- if (isFunction(value)) {
625
- desc.get = value;
566
+ if (getProp) {
567
+ desc.g = getProp;
626
568
  }
627
- else {
628
- desc[VALUE] = value;
569
+ if (setProp) {
570
+ desc.s = setProp;
629
571
  }
630
- return objDefineProp(target, key, desc);
572
+ return objDefineProp(target, prop, _createProp(desc));
631
573
  }
632
- function objDefineAccessors(target, prop, getProp, setProp, configurable) {
633
- if (_objDefineProperty$1) {
634
- try {
635
- var descriptor = {
636
- enumerable: true,
637
- configurable: isUndefined(configurable) ? true : configurable
638
- };
639
- if (getProp) {
640
- descriptor.get = getProp;
641
- }
642
- if (setProp) {
643
- descriptor.set = setProp;
644
- }
645
- return objDefineProp(target, prop, descriptor);
646
- }
647
- catch (e) {
648
- throwUnsupported("Unable to define accessors for [" + objToString(prop) + "] on " + dumpObj(target));
649
- }
650
- }
574
+ function objDefine(target, key, propDesc) {
575
+ return objDefineProp(target, key, _createProp(propDesc));
651
576
  }
652
577
 
653
578
  var _globalLazyTestHooks;
@@ -659,24 +584,21 @@
659
584
  var lazyValue = {};
660
585
  _fetchLazyTestHooks && _fetchLazyTestHooks();
661
586
  lazyValue.b = _globalLazyTestHooks.lzy;
662
- objDefineGet(lazyValue, "v", function () {
663
- var result = cb();
664
- if (!_globalLazyTestHooks.lzy) {
665
- objDefineProp(lazyValue, "v", {
666
- enumerable: true,
667
- configurable: true,
668
- writable: false,
669
- value: result
670
- });
671
- if (lazyValue.b) {
672
- delete lazyValue.b;
587
+ objDefine(lazyValue, "v", {
588
+ g: function () {
589
+ var result = cb();
590
+ if (!_globalLazyTestHooks.lzy) {
591
+ objDefine(lazyValue, "v", { v: result });
592
+ if (lazyValue.b) {
593
+ delete lazyValue.b;
594
+ }
673
595
  }
596
+ if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
597
+ lazyValue.b = _globalLazyTestHooks.lzy;
598
+ }
599
+ return result;
674
600
  }
675
- if (_globalLazyTestHooks.lzy && lazyValue.b !== _globalLazyTestHooks.lzy) {
676
- lazyValue.b = _globalLazyTestHooks.lzy;
677
- }
678
- return result;
679
- }, true);
601
+ });
680
602
  return lazyValue;
681
603
  }
682
604
 
@@ -776,6 +698,33 @@
776
698
  }
777
699
  }
778
700
 
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
+
779
728
  function _unwrapFunction(funcName) {
780
729
  return function (thisArg) {
781
730
  var args = [];
@@ -791,6 +740,40 @@
791
740
 
792
741
  var arrIndexOf = _unwrapFunction(INDEX_OF);
793
742
 
743
+ function objSetPrototypeOf(obj, proto) {
744
+ var fn = ObjClass["setPrototypeOf"] ||
745
+ ({ __proto__: [] } instanceof Array && function (d, b) {
746
+ d.__proto__ = b;
747
+ }) ||
748
+ function (d, b) {
749
+ objForEachKey(b, function (key, value) {
750
+ d[key] = value;
751
+ });
752
+ };
753
+ return fn(obj, proto);
754
+ }
755
+
756
+ function _createCustomError(name, d, b) {
757
+ objSetPrototypeOf(d, b);
758
+ function __() {
759
+ this.constructor = d;
760
+ }
761
+ __[PROTOTYPE] = b[PROTOTYPE];
762
+ __[PROTOTYPE].name = name;
763
+ d[PROTOTYPE] = new __();
764
+ return d;
765
+ }
766
+ function createCustomError(name, constructCb) {
767
+ var baseClass = Error;
768
+ var customError = _createCustomError(name, function () {
769
+ var _this = this;
770
+ _this = baseClass.apply(_this, arguments) || _this;
771
+ constructCb && constructCb(_this, arguments);
772
+ return _this;
773
+ }, baseClass);
774
+ return customError;
775
+ }
776
+
794
777
  function utcNow() {
795
778
  return (Date.now || polyUtcNow)();
796
779
  }
@@ -1214,7 +1197,7 @@
1214
1197
  }
1215
1198
 
1216
1199
  var _objDefineProperty = ObjDefineProperty;
1217
- var version = "3.0.0-beta.2211-04";
1200
+ var version = "3.0.0-beta.2212-03";
1218
1201
  var instanceName = "." + newId(6);
1219
1202
  var _dataUid = 0;
1220
1203
  function _createAccessor(target, prop, value) {