@nsshunt/stsobservability 1.0.156 → 1.0.158

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/dist/index.cjs CHANGED
@@ -6,7 +6,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __copyProps = (to, from, except, desc) => {
11
11
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
12
  key = keys[i];
@@ -361,7 +361,8 @@ var InstrumentVelocity = class extends InstrumentBase {
361
361
  this.#valStack.push(dp);
362
362
  this.#timeStamp = dp.timeStamp;
363
363
  while (this.#valStack.length > 0 && this.#timeStamp - this.#valStack[0].timeStamp > this.#maxTimeDiff) this.#valStack.shift();
364
- this.#valStackAverage = this.#ComputeVelocityByTimeDiff(this.#vaTimeDiff, 0).val;
364
+ const valStackAverageDataPoint = this.#ComputeVelocityByTimeDiff(this.#vaTimeDiff, 0);
365
+ this.#valStackAverage = valStackAverageDataPoint.val;
365
366
  const velocityDataPoint = this.#ComputeVelocityByTimeDiff(this.#velocityTimeDiff, this.#velocityTimeDiff * 2);
366
367
  this.#velocity = velocityDataPoint.val;
367
368
  this.#delta = velocityDataPoint.val - velocityDataPoint.deltaVal;
@@ -666,7 +667,10 @@ var InstrumentLog = class extends InstrumentBase {
666
667
  }
667
668
  });
668
669
  if (typeof options.initValue !== "undefined") this.val = options.initValue;
669
- if (typeof options.fromJSON !== "undefined") this.val = (0, lodash_clonedeep.default)(options.fromJSON).val;
670
+ if (typeof options.fromJSON !== "undefined") {
671
+ const result = (0, lodash_clonedeep.default)(options.fromJSON);
672
+ this.val = result.val;
673
+ }
670
674
  }
671
675
  val = [];
672
676
  WithMaxSize(maxSize) {
@@ -804,7 +808,10 @@ var InstrumentTimerGauge = class extends InstrumentBase {
804
808
  }
805
809
  });
806
810
  if (typeof options.initValue !== "undefined") this.val = options.initValue;
807
- if (typeof options.fromJSON !== "undefined") this.val = (0, lodash_clonedeep.default)(options.fromJSON).val;
811
+ if (typeof options.fromJSON !== "undefined") {
812
+ const result = (0, lodash_clonedeep.default)(options.fromJSON);
813
+ this.val = result.val;
814
+ }
808
815
  this.Reset();
809
816
  }
810
817
  val = 0;
@@ -1686,7 +1693,10 @@ var InstrumentObject = class extends InstrumentBase {
1686
1693
  });
1687
1694
  if (typeof options.initValue !== "undefined") this.val = options.initValue;
1688
1695
  else this.val = {};
1689
- if (typeof options.fromJSON !== "undefined") this.val = (0, lodash_clonedeep.default)(options.fromJSON).val;
1696
+ if (typeof options.fromJSON !== "undefined") {
1697
+ const result = (0, lodash_clonedeep.default)(options.fromJSON);
1698
+ this.val = result.val;
1699
+ }
1690
1700
  }
1691
1701
  val;
1692
1702
  WithInitVal(initVal) {