@microsoft/applicationinsights-offlinechannel-js 0.4.3 → 0.4.4-nightly3.2608-02

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
- * Application Insights JavaScript SDK - Offline Channel, 0.4.3
2
+ * Application Insights JavaScript SDK - Offline Channel, 0.4.4-nightly3.2608-02
3
3
  * Copyright (c) Microsoft and contributors. All rights reserved.
4
4
  */
5
5
  (function (global, factory) {
@@ -8,7 +8,7 @@
8
8
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.Microsoft = global.Microsoft || {}, global.Microsoft.ApplicationInsights = global.Microsoft.ApplicationInsights || {})));
9
9
  })(this, (function (exports) { 'use strict';
10
10
 
11
- /*! https://github.com/nevware21/ts-utils v0.15.0 */
11
+ /*! https://github.com/nevware21/ts-utils v0.16.0 */
12
12
  /*#__NO_SIDE_EFFECTS__*/
13
13
  function _pureAssign(func1, func2) {
14
14
  return func1 || func2;
@@ -382,6 +382,9 @@
382
382
  function fnApply(fn, thisArg, argArray) {
383
383
  return fn.apply(thisArg, argArray);
384
384
  }
385
+ function fnCall(fn, thisArg) {
386
+ return fn.apply(thisArg, ArrSlice[CALL](arguments, 2));
387
+ }
385
388
  var _globalLazyTestHooks;
386
389
  function _initTestHooks() {
387
390
  _globalLazyTestHooks = _getGlobalConfig();
@@ -669,9 +672,10 @@
669
672
  var theBaseClass = errorBase || Error;
670
673
  var orgName = theBaseClass[PROTOTYPE][NAME];
671
674
  var captureFn = Error.captureStackTrace;
672
- return _createCustomError(name, function () {
675
+ var ctorFn = function () {
673
676
  var _this = this;
674
677
  var theArgs = arguments;
678
+ var isOwnInstance = _this[CONSTRUCTOR] === ctorFn;
675
679
  try {
676
680
  safe(_setName, [theBaseClass, name]);
677
681
  var _self = fnApply(theBaseClass, _this, superArgsFn ? superArgsFn(theArgs) : ArrSlice[CALL](theArgs)) || _this;
@@ -681,14 +685,19 @@
681
685
  objSetPrototypeOf(_self, orgProto);
682
686
  }
683
687
  }
684
- captureFn && captureFn(_self, _this[CONSTRUCTOR]);
685
- constructCb && constructCb(_self, theArgs);
688
+ if (isOwnInstance) {
689
+ captureFn && captureFn(_self, ctorFn);
690
+ }
691
+ if (constructCb) {
692
+ fnCall(constructCb, _self, _self, theArgs, isOwnInstance);
693
+ }
686
694
  return _self;
687
695
  }
688
696
  finally {
689
697
  safe(_setName, [theBaseClass, orgName]);
690
698
  }
691
- }, theBaseClass);
699
+ };
700
+ return _createCustomError(name, ctorFn, theBaseClass);
692
701
  }
693
702
  var strReplace = (/*#__PURE__*/_unwrapFunction("replace", StrProto));
694
703
  /*#__NO_SIDE_EFFECTS__*/
@@ -2160,7 +2169,7 @@
2160
2169
  return result;
2161
2170
  }
2162
2171
 
2163
- var version$1 = "3.4.3";
2172
+ var version$1 = "3.4.4-nightly3.2608-02";
2164
2173
  var instanceName = "." + newId(6);
2165
2174
  var _dataUid = 0;
2166
2175
  function _canAcceptData(target) {
@@ -6547,7 +6556,7 @@
6547
6556
  return Sender;
6548
6557
  }());
6549
6558
 
6550
- var version = '0.4.3';
6559
+ var version = '0.4.4-nightly3.2608-02';
6551
6560
  var DefaultOfflineIdentifier = "OfflineChannel";
6552
6561
  var DefaultBatchInterval = 15000;
6553
6562
  var DefaultInMemoMaxTime = 15000;