@microsoft/applicationinsights-channel-js 3.0.0-beta.2302-06 → 3.0.0-beta.2303-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-channel-js",
3
- "version": "3.0.0-beta.2302-06",
3
+ "version": "3.0.0-beta.2303-03",
4
4
  "ext": {
5
5
  "@js": {
6
6
  "file": "applicationinsights-channel-js.js",
7
7
  "type": "text/javascript; charset=utf-8",
8
- "integrity": "sha256-kCS2dnmFRyO20k4cMsBI317jqaB3qvSGaX5ZmjD8xHk= sha384-E+dHW1FSTunBSVDIDkvKqPaWcusaqwr2aC7Xw3T1/2+AgkuBBKwBrmDDt2cEPmwL sha512-aEc88RKk8/qHBCrW4mS/qhlWbU7bicDLrnhOJOVH1zFuvLAb7hzazrZe0ghZLcYWBwpxtJWFUTxnOp0/pNZmew==",
8
+ "integrity": "sha256-AFBtoKohqGKugNssFvki6ZVFgYLLPfLIBVdyEY/UP9s= sha384-SF0m9DuQ3xbR5DFW42wffdFgeWcxtS/OccgVUNfG56rwHQTYZfDvmBIHTYoLvAXF sha512-T+vjySXCHHfzsrAfZKQNR9DAFlWPH+1M+/wYTnI9qNmhOkWxlN9/cmwa98dMDpRmECNF9QFyarqzDdNv2Cv9vQ==",
9
9
  "hashes": {
10
- "sha256": "kCS2dnmFRyO20k4cMsBI317jqaB3qvSGaX5ZmjD8xHk=",
11
- "sha384": "E+dHW1FSTunBSVDIDkvKqPaWcusaqwr2aC7Xw3T1/2+AgkuBBKwBrmDDt2cEPmwL",
12
- "sha512": "aEc88RKk8/qHBCrW4mS/qhlWbU7bicDLrnhOJOVH1zFuvLAb7hzazrZe0ghZLcYWBwpxtJWFUTxnOp0/pNZmew=="
10
+ "sha256": "AFBtoKohqGKugNssFvki6ZVFgYLLPfLIBVdyEY/UP9s=",
11
+ "sha384": "SF0m9DuQ3xbR5DFW42wffdFgeWcxtS/OccgVUNfG56rwHQTYZfDvmBIHTYoLvAXF",
12
+ "sha512": "T+vjySXCHHfzsrAfZKQNR9DAFlWPH+1M+/wYTnI9qNmhOkWxlN9/cmwa98dMDpRmECNF9QFyarqzDdNv2Cv9vQ=="
13
13
  }
14
14
  },
15
15
  "@min.js": {
16
16
  "file": "applicationinsights-channel-js.min.js",
17
17
  "type": "text/javascript; charset=utf-8",
18
- "integrity": "sha256-am4ivkipyjF7za8lVDro/jzayZMtRJVLFgnIW9JeNRE= sha384-NQXkcUc5+UQElUo9RbhSxwJPRQI0W90pqktgI8tfz+EQ+Kf1Bjvg1866MUsRSK25 sha512-aIlNGTAX2ifAWixm03QCLsE2dANTYunICAZBfmXOIHCB+01AIaVzw7A2PTGQpSYYCTzbDkIpu/wJhu8l1S/5Ug==",
18
+ "integrity": "sha256-6F2euahqvsdzQ9WCslfAp6wWrYB62AyncpcPJBRZCYQ= sha384-paug2N9XHwafuC3ZQEdDlm/Q3uqF8qfnxqEGszRzqR+ptXFcRRgMO0klZ+/GSzMe sha512-m4e8F1axJUXsvTikbDQLwYzamlofoWfsVZCMFbKtwoyxfcVKlOzLJFPfZDnT/brmGuUJ2C/8wXKzJXZja0yZeQ==",
19
19
  "hashes": {
20
- "sha256": "am4ivkipyjF7za8lVDro/jzayZMtRJVLFgnIW9JeNRE=",
21
- "sha384": "NQXkcUc5+UQElUo9RbhSxwJPRQI0W90pqktgI8tfz+EQ+Kf1Bjvg1866MUsRSK25",
22
- "sha512": "aIlNGTAX2ifAWixm03QCLsE2dANTYunICAZBfmXOIHCB+01AIaVzw7A2PTGQpSYYCTzbDkIpu/wJhu8l1S/5Ug=="
20
+ "sha256": "6F2euahqvsdzQ9WCslfAp6wWrYB62AyncpcPJBRZCYQ=",
21
+ "sha384": "paug2N9XHwafuC3ZQEdDlm/Q3uqF8qfnxqEGszRzqR+ptXFcRRgMO0klZ+/GSzMe",
22
+ "sha512": "m4e8F1axJUXsvTikbDQLwYzamlofoWfsVZCMFbKtwoyxfcVKlOzLJFPfZDnT/brmGuUJ2C/8wXKzJXZja0yZeQ=="
23
23
  }
24
24
  }
25
25
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Application Insights JavaScript SDK - Channel, 3.0.0-beta.2302-06
2
+ * Application Insights JavaScript SDK - Channel, 3.0.0-beta.2303-03
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -100,7 +100,7 @@
100
100
  }
101
101
 
102
102
  /*!
103
- * Microsoft Dynamic Proto Utility, 1.1.7
103
+ * Microsoft Dynamic Proto Utility, 1.1.8
104
104
  * Copyright (c) Microsoft and contributors. All rights reserved.
105
105
  */
106
106
  var _a$3;
@@ -370,7 +370,7 @@
370
370
  dynamicProto[DynProtoDefaultOptions] = _gblInst.o;
371
371
 
372
372
  /*!
373
- * NevWare21 - ts-utils, 0.8.0
373
+ * NevWare21 - ts-utils, 0.8.1
374
374
  * https://github.com/nevware21/ts-utils
375
375
  * Copyright (c) NevWare21 and contributors. All rights reserved.
376
376
  * Licensed under the MIT license.
@@ -392,6 +392,7 @@
392
392
  var LENGTH = "length";
393
393
  var DONE = "done";
394
394
  var VALUE = "value";
395
+ var NAME = "name";
395
396
  var ObjClass = Object;
396
397
  var ObjProto = ObjClass[PROTOTYPE];
397
398
  var StrCls = String;
@@ -786,22 +787,37 @@
786
787
  };
787
788
  return fn(obj, proto);
788
789
  }
789
- function _createCustomError(name, d, b) {
790
- objSetPrototypeOf(d, b);
790
+ function _createCustomError(name, d, baseClass) {
791
+ objSetPrototypeOf(d, baseClass);
791
792
  function __() {
792
793
  this.constructor = d;
794
+ this[NAME] = name;
793
795
  }
794
- __[PROTOTYPE] = b[PROTOTYPE];
795
- __[PROTOTYPE].name = name;
796
+ __[PROTOTYPE] = baseClass[PROTOTYPE];
796
797
  d[PROTOTYPE] = new __();
797
798
  return d;
798
799
  }
800
+ var _safeSetName = function (baseClass, name) {
801
+ try {
802
+ baseClass[PROTOTYPE][NAME] = name;
803
+ }
804
+ catch (e) {
805
+ }
806
+ };
799
807
  function createCustomError(name, constructCb) {
800
808
  var baseClass = Error;
809
+ var orgName = baseClass[PROTOTYPE][NAME];
801
810
  var customError = _createCustomError(name, function () {
802
811
  var _this = this;
803
- _this = baseClass.apply(_this, arguments) || _this;
804
- constructCb && constructCb(_this, arguments);
812
+ try {
813
+ _safeSetName(baseClass, name);
814
+ _this = baseClass.apply(_this, arguments) || _this;
815
+ _this[NAME] = name;
816
+ constructCb && constructCb(_this, arguments);
817
+ }
818
+ finally {
819
+ _safeSetName(baseClass, orgName);
820
+ }
805
821
  return _this;
806
822
  }, baseClass);
807
823
  return customError;
@@ -858,49 +874,77 @@
858
874
  var polyStrTrim = _createTrimFn(/^\s+|(?=\s)\s+$/g);
859
875
  var TRIM = "trim";
860
876
  var strTrim = _unwrapFunction(TRIM, UNDEF_VALUE, polyStrTrim);
877
+ var REF = "ref";
878
+ var UNREF = "un" + REF;
879
+ var HAS_REF = "hasRef";
880
+ var ENABLED = "enabled";
861
881
  function _createTimerHandler(startTimer, refreshFn, cancelFn) {
882
+ var _a;
862
883
  var ref = true;
863
884
  var timerId = startTimer ? refreshFn(null) : null;
864
- function _unref() {
885
+ var theTimerHandler;
886
+ var _unref = function () {
865
887
  ref = false;
866
- timerId && timerId["unref"] && timerId["unref"]();
867
- return timer;
868
- }
869
- function _ref() {
888
+ timerId && timerId[UNREF] && timerId[UNREF]();
889
+ return theTimerHandler;
890
+ };
891
+ var _ref = function () {
870
892
  ref = true;
871
- timerId && timerId["ref"] && timerId["ref"]();
872
- return timer;
873
- }
874
- function _hasRef() {
875
- if (timerId && timerId["hasRef"]) {
876
- return timerId["hasRef"]();
893
+ timerId && timerId[REF] && timerId[REF]();
894
+ return theTimerHandler;
895
+ };
896
+ var _hasRef = function () {
897
+ if (timerId && timerId[HAS_REF]) {
898
+ return timerId[HAS_REF]();
877
899
  }
878
900
  return ref;
879
- }
880
- var timer = {
881
- cancel: function () {
882
- timerId && cancelFn(timerId);
883
- timerId = null;
884
- },
885
- refresh: function () {
886
- timerId = refreshFn(timerId);
887
- if (!ref) {
888
- _unref();
889
- }
890
- return timer;
901
+ };
902
+ var _refresh = function () {
903
+ timerId = refreshFn(timerId);
904
+ if (!ref) {
905
+ _unref();
906
+ }
907
+ return theTimerHandler;
908
+ };
909
+ var _cancel = function () {
910
+ timerId && cancelFn(timerId);
911
+ timerId = null;
912
+ };
913
+ var _setEnabled = function (value) {
914
+ !value && timerId && _cancel();
915
+ value && !timerId && _refresh();
916
+ };
917
+ theTimerHandler = (_a = {
918
+ cancel: _cancel,
919
+ refresh: _refresh
891
920
  },
892
- hasRef: _hasRef,
893
- ref: _ref,
894
- unref: _unref
921
+ _a[HAS_REF] = _hasRef,
922
+ _a[REF] = _ref,
923
+ _a[UNREF] = _unref,
924
+ _a[ENABLED] = false,
925
+ _a);
926
+ objDefineProp(theTimerHandler, ENABLED, {
927
+ get: function () { return !!timerId; },
928
+ set: _setEnabled
929
+ });
930
+ return {
931
+ h: theTimerHandler,
932
+ dn: function () {
933
+ timerId = null;
934
+ }
895
935
  };
896
- return timer;
897
936
  }
898
937
  function _createTimeoutWith(self, startTimer, overrideFn, theArgs) {
899
938
  var isArr = isArray(overrideFn);
900
939
  var len = isArr ? overrideFn.length : 0;
901
940
  var setFn = (len > 0 ? overrideFn[0] : (!isArr ? overrideFn : UNDEF_VALUE)) || setTimeout;
902
941
  var clearFn = (len > 1 ? overrideFn[1] : UNDEF_VALUE) || clearTimeout;
903
- return _createTimerHandler(startTimer, function (timerId) {
942
+ var timerFn = theArgs[0];
943
+ theArgs[0] = function () {
944
+ handler.dn();
945
+ timerFn.apply(self, arguments);
946
+ };
947
+ var handler = _createTimerHandler(startTimer, function (timerId) {
904
948
  if (timerId) {
905
949
  if (timerId.refresh) {
906
950
  timerId.refresh();
@@ -912,6 +956,7 @@
912
956
  }, function (timerId) {
913
957
  clearFn.call(self, timerId);
914
958
  });
959
+ return handler.h;
915
960
  }
916
961
  function scheduleTimeout(callback, timeout) {
917
962
  return _createTimeoutWith(this, true, UNDEF_VALUE, _extractArgs(arguments, 0));
@@ -1323,7 +1368,7 @@
1323
1368
  }
1324
1369
 
1325
1370
  var _objDefineProperty = ObjDefineProperty;
1326
- var version = "3.0.0-beta.2302-06";
1371
+ var version = "3.0.0-beta.2303-03";
1327
1372
  var instanceName = "." + newId(6);
1328
1373
  var _dataUid = 0;
1329
1374
  function _createAccessor(target, prop, value) {
@@ -4252,7 +4297,7 @@
4252
4297
  }
4253
4298
  }
4254
4299
  var EnvelopeCreator = {
4255
- Version: "3.0.0-beta.2302-06"
4300
+ Version: "3.0.0-beta.2303-03"
4256
4301
  };
4257
4302
  function DependencyEnvelopeCreator(logger, telemetryItem, customUndefinedValue) {
4258
4303
  EnvelopeCreatorInit(logger, telemetryItem);