@nsshunt/stsutils 1.16.40 → 1.16.41

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/stsutils.mjs CHANGED
@@ -1352,11 +1352,11 @@ function require_stream_readable() {
1352
1352
  return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
1353
1353
  }
1354
1354
  var debugUtil = require$$0$2;
1355
- var debug;
1355
+ var debug2;
1356
1356
  if (debugUtil && debugUtil.debuglog) {
1357
- debug = debugUtil.debuglog("stream");
1357
+ debug2 = debugUtil.debuglog("stream");
1358
1358
  } else {
1359
- debug = function debug2() {
1359
+ debug2 = function debug3() {
1360
1360
  };
1361
1361
  }
1362
1362
  var BufferList = requireBuffer_list();
@@ -1476,7 +1476,7 @@ function require_stream_readable() {
1476
1476
  return readableAddChunk(this, chunk, null, true, false);
1477
1477
  };
1478
1478
  function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
1479
- debug("readableAddChunk", chunk);
1479
+ debug2("readableAddChunk", chunk);
1480
1480
  var state2 = stream._readableState;
1481
1481
  if (chunk === null) {
1482
1482
  state2.reading = false;
@@ -1599,14 +1599,14 @@ function require_stream_readable() {
1599
1599
  return state2.length;
1600
1600
  }
1601
1601
  Readable.prototype.read = function(n) {
1602
- debug("read", n);
1602
+ debug2("read", n);
1603
1603
  n = parseInt(n, 10);
1604
1604
  var state2 = this._readableState;
1605
1605
  var nOrig = n;
1606
1606
  if (n !== 0)
1607
1607
  state2.emittedReadable = false;
1608
1608
  if (n === 0 && state2.needReadable && ((state2.highWaterMark !== 0 ? state2.length >= state2.highWaterMark : state2.length > 0) || state2.ended)) {
1609
- debug("read: emitReadable", state2.length, state2.ended);
1609
+ debug2("read: emitReadable", state2.length, state2.ended);
1610
1610
  if (state2.length === 0 && state2.ended)
1611
1611
  endReadable(this);
1612
1612
  else
@@ -1620,16 +1620,16 @@ function require_stream_readable() {
1620
1620
  return null;
1621
1621
  }
1622
1622
  var doRead = state2.needReadable;
1623
- debug("need readable", doRead);
1623
+ debug2("need readable", doRead);
1624
1624
  if (state2.length === 0 || state2.length - n < state2.highWaterMark) {
1625
1625
  doRead = true;
1626
- debug("length less than watermark", doRead);
1626
+ debug2("length less than watermark", doRead);
1627
1627
  }
1628
1628
  if (state2.ended || state2.reading) {
1629
1629
  doRead = false;
1630
- debug("reading or ended", doRead);
1630
+ debug2("reading or ended", doRead);
1631
1631
  } else if (doRead) {
1632
- debug("do read");
1632
+ debug2("do read");
1633
1633
  state2.reading = true;
1634
1634
  state2.sync = true;
1635
1635
  if (state2.length === 0)
@@ -1662,7 +1662,7 @@ function require_stream_readable() {
1662
1662
  return ret;
1663
1663
  };
1664
1664
  function onEofChunk(stream, state2) {
1665
- debug("onEofChunk");
1665
+ debug2("onEofChunk");
1666
1666
  if (state2.ended)
1667
1667
  return;
1668
1668
  if (state2.decoder) {
@@ -1685,17 +1685,17 @@ function require_stream_readable() {
1685
1685
  }
1686
1686
  function emitReadable(stream) {
1687
1687
  var state2 = stream._readableState;
1688
- debug("emitReadable", state2.needReadable, state2.emittedReadable);
1688
+ debug2("emitReadable", state2.needReadable, state2.emittedReadable);
1689
1689
  state2.needReadable = false;
1690
1690
  if (!state2.emittedReadable) {
1691
- debug("emitReadable", state2.flowing);
1691
+ debug2("emitReadable", state2.flowing);
1692
1692
  state2.emittedReadable = true;
1693
1693
  process.nextTick(emitReadable_, stream);
1694
1694
  }
1695
1695
  }
1696
1696
  function emitReadable_(stream) {
1697
1697
  var state2 = stream._readableState;
1698
- debug("emitReadable_", state2.destroyed, state2.length, state2.ended);
1698
+ debug2("emitReadable_", state2.destroyed, state2.length, state2.ended);
1699
1699
  if (!state2.destroyed && (state2.length || state2.ended)) {
1700
1700
  stream.emit("readable");
1701
1701
  state2.emittedReadable = false;
@@ -1712,7 +1712,7 @@ function require_stream_readable() {
1712
1712
  function maybeReadMore_(stream, state2) {
1713
1713
  while (!state2.reading && !state2.ended && (state2.length < state2.highWaterMark || state2.flowing && state2.length === 0)) {
1714
1714
  var len = state2.length;
1715
- debug("maybeReadMore read 0");
1715
+ debug2("maybeReadMore read 0");
1716
1716
  stream.read(0);
1717
1717
  if (len === state2.length)
1718
1718
  break;
@@ -1737,7 +1737,7 @@ function require_stream_readable() {
1737
1737
  break;
1738
1738
  }
1739
1739
  state2.pipesCount += 1;
1740
- debug("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
1740
+ debug2("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
1741
1741
  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
1742
1742
  var endFn = doEnd ? onend : unpipe;
1743
1743
  if (state2.endEmitted)
@@ -1746,7 +1746,7 @@ function require_stream_readable() {
1746
1746
  src.once("end", endFn);
1747
1747
  dest.on("unpipe", onunpipe);
1748
1748
  function onunpipe(readable, unpipeInfo) {
1749
- debug("onunpipe");
1749
+ debug2("onunpipe");
1750
1750
  if (readable === src) {
1751
1751
  if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
1752
1752
  unpipeInfo.hasUnpiped = true;
@@ -1755,14 +1755,14 @@ function require_stream_readable() {
1755
1755
  }
1756
1756
  }
1757
1757
  function onend() {
1758
- debug("onend");
1758
+ debug2("onend");
1759
1759
  dest.end();
1760
1760
  }
1761
1761
  var ondrain = pipeOnDrain(src);
1762
1762
  dest.on("drain", ondrain);
1763
1763
  var cleanedUp = false;
1764
1764
  function cleanup() {
1765
- debug("cleanup");
1765
+ debug2("cleanup");
1766
1766
  dest.removeListener("close", onclose);
1767
1767
  dest.removeListener("finish", onfinish);
1768
1768
  dest.removeListener("drain", ondrain);
@@ -1777,19 +1777,19 @@ function require_stream_readable() {
1777
1777
  }
1778
1778
  src.on("data", ondata);
1779
1779
  function ondata(chunk) {
1780
- debug("ondata");
1780
+ debug2("ondata");
1781
1781
  var ret = dest.write(chunk);
1782
- debug("dest.write", ret);
1782
+ debug2("dest.write", ret);
1783
1783
  if (ret === false) {
1784
1784
  if ((state2.pipesCount === 1 && state2.pipes === dest || state2.pipesCount > 1 && indexOf(state2.pipes, dest) !== -1) && !cleanedUp) {
1785
- debug("false write response, pause", state2.awaitDrain);
1785
+ debug2("false write response, pause", state2.awaitDrain);
1786
1786
  state2.awaitDrain++;
1787
1787
  }
1788
1788
  src.pause();
1789
1789
  }
1790
1790
  }
1791
1791
  function onerror(er) {
1792
- debug("onerror", er);
1792
+ debug2("onerror", er);
1793
1793
  unpipe();
1794
1794
  dest.removeListener("error", onerror);
1795
1795
  if (EElistenerCount(dest, "error") === 0)
@@ -1802,18 +1802,18 @@ function require_stream_readable() {
1802
1802
  }
1803
1803
  dest.once("close", onclose);
1804
1804
  function onfinish() {
1805
- debug("onfinish");
1805
+ debug2("onfinish");
1806
1806
  dest.removeListener("close", onclose);
1807
1807
  unpipe();
1808
1808
  }
1809
1809
  dest.once("finish", onfinish);
1810
1810
  function unpipe() {
1811
- debug("unpipe");
1811
+ debug2("unpipe");
1812
1812
  src.unpipe(dest);
1813
1813
  }
1814
1814
  dest.emit("pipe", src);
1815
1815
  if (!state2.flowing) {
1816
- debug("pipe resume");
1816
+ debug2("pipe resume");
1817
1817
  src.resume();
1818
1818
  }
1819
1819
  return dest;
@@ -1821,7 +1821,7 @@ function require_stream_readable() {
1821
1821
  function pipeOnDrain(src) {
1822
1822
  return function pipeOnDrainFunctionResult() {
1823
1823
  var state2 = src._readableState;
1824
- debug("pipeOnDrain", state2.awaitDrain);
1824
+ debug2("pipeOnDrain", state2.awaitDrain);
1825
1825
  if (state2.awaitDrain)
1826
1826
  state2.awaitDrain--;
1827
1827
  if (state2.awaitDrain === 0 && EElistenerCount(src, "data")) {
@@ -1883,7 +1883,7 @@ function require_stream_readable() {
1883
1883
  state2.readableListening = state2.needReadable = true;
1884
1884
  state2.flowing = false;
1885
1885
  state2.emittedReadable = false;
1886
- debug("on readable", state2.length, state2.reading);
1886
+ debug2("on readable", state2.length, state2.reading);
1887
1887
  if (state2.length) {
1888
1888
  emitReadable(this);
1889
1889
  } else if (!state2.reading) {
@@ -1918,13 +1918,13 @@ function require_stream_readable() {
1918
1918
  }
1919
1919
  }
1920
1920
  function nReadingNextTick(self2) {
1921
- debug("readable nexttick read 0");
1921
+ debug2("readable nexttick read 0");
1922
1922
  self2.read(0);
1923
1923
  }
1924
1924
  Readable.prototype.resume = function() {
1925
1925
  var state2 = this._readableState;
1926
1926
  if (!state2.flowing) {
1927
- debug("resume");
1927
+ debug2("resume");
1928
1928
  state2.flowing = !state2.readableListening;
1929
1929
  resume(this, state2);
1930
1930
  }
@@ -1938,7 +1938,7 @@ function require_stream_readable() {
1938
1938
  }
1939
1939
  }
1940
1940
  function resume_(stream, state2) {
1941
- debug("resume", state2.reading);
1941
+ debug2("resume", state2.reading);
1942
1942
  if (!state2.reading) {
1943
1943
  stream.read(0);
1944
1944
  }
@@ -1949,9 +1949,9 @@ function require_stream_readable() {
1949
1949
  stream.read(0);
1950
1950
  }
1951
1951
  Readable.prototype.pause = function() {
1952
- debug("call pause flowing=%j", this._readableState.flowing);
1952
+ debug2("call pause flowing=%j", this._readableState.flowing);
1953
1953
  if (this._readableState.flowing !== false) {
1954
- debug("pause");
1954
+ debug2("pause");
1955
1955
  this._readableState.flowing = false;
1956
1956
  this.emit("pause");
1957
1957
  }
@@ -1960,7 +1960,7 @@ function require_stream_readable() {
1960
1960
  };
1961
1961
  function flow(stream) {
1962
1962
  var state2 = stream._readableState;
1963
- debug("flow", state2.flowing);
1963
+ debug2("flow", state2.flowing);
1964
1964
  while (state2.flowing && stream.read() !== null)
1965
1965
  ;
1966
1966
  }
@@ -1969,7 +1969,7 @@ function require_stream_readable() {
1969
1969
  var state2 = this._readableState;
1970
1970
  var paused = false;
1971
1971
  stream.on("end", function() {
1972
- debug("wrapped end");
1972
+ debug2("wrapped end");
1973
1973
  if (state2.decoder && !state2.ended) {
1974
1974
  var chunk = state2.decoder.end();
1975
1975
  if (chunk && chunk.length)
@@ -1978,7 +1978,7 @@ function require_stream_readable() {
1978
1978
  _this.push(null);
1979
1979
  });
1980
1980
  stream.on("data", function(chunk) {
1981
- debug("wrapped data");
1981
+ debug2("wrapped data");
1982
1982
  if (state2.decoder)
1983
1983
  chunk = state2.decoder.write(chunk);
1984
1984
  if (state2.objectMode && (chunk === null || chunk === void 0))
@@ -2004,7 +2004,7 @@ function require_stream_readable() {
2004
2004
  stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
2005
2005
  }
2006
2006
  this._read = function(n2) {
2007
- debug("wrapped _read", n2);
2007
+ debug2("wrapped _read", n2);
2008
2008
  if (paused) {
2009
2009
  paused = false;
2010
2010
  stream.resume();
@@ -2083,14 +2083,14 @@ function require_stream_readable() {
2083
2083
  }
2084
2084
  function endReadable(stream) {
2085
2085
  var state2 = stream._readableState;
2086
- debug("endReadable", state2.endEmitted);
2086
+ debug2("endReadable", state2.endEmitted);
2087
2087
  if (!state2.endEmitted) {
2088
2088
  state2.ended = true;
2089
2089
  process.nextTick(endReadableNT, state2, stream);
2090
2090
  }
2091
2091
  }
2092
2092
  function endReadableNT(state2, stream) {
2093
- debug("endReadableNT", state2.endEmitted, state2.length);
2093
+ debug2("endReadableNT", state2.endEmitted, state2.length);
2094
2094
  if (!state2.endEmitted && state2.length === 0) {
2095
2095
  state2.endEmitted = true;
2096
2096
  stream.readable = false;
@@ -3128,11 +3128,11 @@ function setup(env) {
3128
3128
  let enableOverride = null;
3129
3129
  let namespacesCache;
3130
3130
  let enabledCache;
3131
- function debug(...args) {
3132
- if (!debug.enabled) {
3131
+ function debug2(...args) {
3132
+ if (!debug2.enabled) {
3133
3133
  return;
3134
3134
  }
3135
- const self2 = debug;
3135
+ const self2 = debug2;
3136
3136
  const curr = Number(/* @__PURE__ */ new Date());
3137
3137
  const ms2 = curr - (prevTime || curr);
3138
3138
  self2.diff = ms2;
@@ -3162,12 +3162,12 @@ function setup(env) {
3162
3162
  const logFn = self2.log || createDebug.log;
3163
3163
  logFn.apply(self2, args);
3164
3164
  }
3165
- debug.namespace = namespace;
3166
- debug.useColors = createDebug.useColors();
3167
- debug.color = createDebug.selectColor(namespace);
3168
- debug.extend = extend;
3169
- debug.destroy = createDebug.destroy;
3170
- Object.defineProperty(debug, "enabled", {
3165
+ debug2.namespace = namespace;
3166
+ debug2.useColors = createDebug.useColors();
3167
+ debug2.color = createDebug.selectColor(namespace);
3168
+ debug2.extend = extend;
3169
+ debug2.destroy = createDebug.destroy;
3170
+ Object.defineProperty(debug2, "enabled", {
3171
3171
  enumerable: true,
3172
3172
  configurable: false,
3173
3173
  get: () => {
@@ -3185,9 +3185,9 @@ function setup(env) {
3185
3185
  }
3186
3186
  });
3187
3187
  if (typeof createDebug.init === "function") {
3188
- createDebug.init(debug);
3188
+ createDebug.init(debug2);
3189
3189
  }
3190
- return debug;
3190
+ return debug2;
3191
3191
  }
3192
3192
  function extend(namespace, delimiter) {
3193
3193
  const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
@@ -3423,6 +3423,7 @@ var common = setup;
3423
3423
  })(browser, browser.exports);
3424
3424
  var browserExports = browser.exports;
3425
3425
  const debugModule = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
3426
+ const debug = debugModule(`proc:${process.pid}:`);
3426
3427
  class STSWinstonTransport extends Transport {
3427
3428
  constructor(opts) {
3428
3429
  super(opts);
@@ -3438,6 +3439,7 @@ class STSWinstonTransport extends Transport {
3438
3439
  __privateSet(this, _debug, debugModule(`proc:${process.pid}:${this.myopts.stsContext}`));
3439
3440
  }
3440
3441
  __privateGet(this, _debug).call(this, info.message);
3442
+ debug(info.message);
3441
3443
  }
3442
3444
  this.emit("logged", info);
3443
3445
  callback();