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