@nsshunt/stsutils 1.16.41 → 1.16.43
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 +54 -499
- package/dist/stsutils.mjs.map +1 -1
- package/dist/stsutils.umd.js +54 -499
- package/dist/stsutils.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/winstonTransport.d.ts +5 -2
- package/types/winstonTransport.d.ts.map +1 -1
package/dist/stsutils.mjs
CHANGED
|
@@ -22,7 +22,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
22
22
|
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
23
|
return value;
|
|
24
24
|
};
|
|
25
|
-
var _options
|
|
25
|
+
var _options;
|
|
26
26
|
import Ajv from "ajv/dist/jtd.js";
|
|
27
27
|
import require$$0$2 from "util";
|
|
28
28
|
import require$$0 from "events";
|
|
@@ -175,7 +175,7 @@ function getDefaultExportFromCjs(x) {
|
|
|
175
175
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
176
176
|
}
|
|
177
177
|
var dist = { exports: {} };
|
|
178
|
-
var browser
|
|
178
|
+
var browser = deprecate;
|
|
179
179
|
function deprecate(fn, msg) {
|
|
180
180
|
if (config$1("noDeprecation")) {
|
|
181
181
|
return fn;
|
|
@@ -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
|
|
1355
|
+
var debug;
|
|
1356
1356
|
if (debugUtil && debugUtil.debuglog) {
|
|
1357
|
-
|
|
1357
|
+
debug = debugUtil.debuglog("stream");
|
|
1358
1358
|
} else {
|
|
1359
|
-
|
|
1359
|
+
debug = function debug2() {
|
|
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
|
-
|
|
1479
|
+
debug("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
|
-
|
|
1602
|
+
debug("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
|
-
|
|
1609
|
+
debug("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
|
-
|
|
1623
|
+
debug("need readable", doRead);
|
|
1624
1624
|
if (state2.length === 0 || state2.length - n < state2.highWaterMark) {
|
|
1625
1625
|
doRead = true;
|
|
1626
|
-
|
|
1626
|
+
debug("length less than watermark", doRead);
|
|
1627
1627
|
}
|
|
1628
1628
|
if (state2.ended || state2.reading) {
|
|
1629
1629
|
doRead = false;
|
|
1630
|
-
|
|
1630
|
+
debug("reading or ended", doRead);
|
|
1631
1631
|
} else if (doRead) {
|
|
1632
|
-
|
|
1632
|
+
debug("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
|
-
|
|
1665
|
+
debug("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
|
-
|
|
1688
|
+
debug("emitReadable", state2.needReadable, state2.emittedReadable);
|
|
1689
1689
|
state2.needReadable = false;
|
|
1690
1690
|
if (!state2.emittedReadable) {
|
|
1691
|
-
|
|
1691
|
+
debug("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
|
-
|
|
1698
|
+
debug("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
|
-
|
|
1715
|
+
debug("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
|
-
|
|
1740
|
+
debug("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
|
-
|
|
1749
|
+
debug("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
|
-
|
|
1758
|
+
debug("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
|
-
|
|
1765
|
+
debug("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
|
-
|
|
1780
|
+
debug("ondata");
|
|
1781
1781
|
var ret = dest.write(chunk);
|
|
1782
|
-
|
|
1782
|
+
debug("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
|
-
|
|
1785
|
+
debug("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
|
-
|
|
1792
|
+
debug("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
|
-
|
|
1805
|
+
debug("onfinish");
|
|
1806
1806
|
dest.removeListener("close", onclose);
|
|
1807
1807
|
unpipe();
|
|
1808
1808
|
}
|
|
1809
1809
|
dest.once("finish", onfinish);
|
|
1810
1810
|
function unpipe() {
|
|
1811
|
-
|
|
1811
|
+
debug("unpipe");
|
|
1812
1812
|
src.unpipe(dest);
|
|
1813
1813
|
}
|
|
1814
1814
|
dest.emit("pipe", src);
|
|
1815
1815
|
if (!state2.flowing) {
|
|
1816
|
-
|
|
1816
|
+
debug("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
|
-
|
|
1824
|
+
debug("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
|
-
|
|
1886
|
+
debug("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
|
-
|
|
1921
|
+
debug("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
|
-
|
|
1927
|
+
debug("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
|
-
|
|
1941
|
+
debug("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
|
-
|
|
1952
|
+
debug("call pause flowing=%j", this._readableState.flowing);
|
|
1953
1953
|
if (this._readableState.flowing !== false) {
|
|
1954
|
-
|
|
1954
|
+
debug("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
|
-
|
|
1963
|
+
debug("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
|
-
|
|
1972
|
+
debug("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
|
-
|
|
1981
|
+
debug("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
|
-
|
|
2007
|
+
debug("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
|
-
|
|
2086
|
+
debug("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
|
-
|
|
2093
|
+
debug("endReadableNT", state2.endEmitted, state2.length);
|
|
2094
2094
|
if (!state2.endEmitted && state2.length === 0) {
|
|
2095
2095
|
state2.endEmitted = true;
|
|
2096
2096
|
stream.readable = false;
|
|
@@ -2235,7 +2235,7 @@ function require_stream_writable() {
|
|
|
2235
2235
|
var Duplex;
|
|
2236
2236
|
Writable.WritableState = WritableState;
|
|
2237
2237
|
var internalUtil = {
|
|
2238
|
-
deprecate: browser
|
|
2238
|
+
deprecate: browser
|
|
2239
2239
|
};
|
|
2240
2240
|
var Stream = streamBrowser;
|
|
2241
2241
|
var Buffer2 = require$$0$1.Buffer;
|
|
@@ -2980,473 +2980,28 @@ function requireDist() {
|
|
|
2980
2980
|
}
|
|
2981
2981
|
var distExports = requireDist();
|
|
2982
2982
|
const Transport = /* @__PURE__ */ getDefaultExportFromCjs(distExports);
|
|
2983
|
-
var browser = { exports: {} };
|
|
2984
|
-
var ms;
|
|
2985
|
-
var hasRequiredMs;
|
|
2986
|
-
function requireMs() {
|
|
2987
|
-
if (hasRequiredMs)
|
|
2988
|
-
return ms;
|
|
2989
|
-
hasRequiredMs = 1;
|
|
2990
|
-
var s = 1e3;
|
|
2991
|
-
var m = s * 60;
|
|
2992
|
-
var h = m * 60;
|
|
2993
|
-
var d = h * 24;
|
|
2994
|
-
var w = d * 7;
|
|
2995
|
-
var y = d * 365.25;
|
|
2996
|
-
ms = function(val, options) {
|
|
2997
|
-
options = options || {};
|
|
2998
|
-
var type = typeof val;
|
|
2999
|
-
if (type === "string" && val.length > 0) {
|
|
3000
|
-
return parse(val);
|
|
3001
|
-
} else if (type === "number" && isFinite(val)) {
|
|
3002
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
3003
|
-
}
|
|
3004
|
-
throw new Error(
|
|
3005
|
-
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
3006
|
-
);
|
|
3007
|
-
};
|
|
3008
|
-
function parse(str) {
|
|
3009
|
-
str = String(str);
|
|
3010
|
-
if (str.length > 100) {
|
|
3011
|
-
return;
|
|
3012
|
-
}
|
|
3013
|
-
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
3014
|
-
str
|
|
3015
|
-
);
|
|
3016
|
-
if (!match) {
|
|
3017
|
-
return;
|
|
3018
|
-
}
|
|
3019
|
-
var n = parseFloat(match[1]);
|
|
3020
|
-
var type = (match[2] || "ms").toLowerCase();
|
|
3021
|
-
switch (type) {
|
|
3022
|
-
case "years":
|
|
3023
|
-
case "year":
|
|
3024
|
-
case "yrs":
|
|
3025
|
-
case "yr":
|
|
3026
|
-
case "y":
|
|
3027
|
-
return n * y;
|
|
3028
|
-
case "weeks":
|
|
3029
|
-
case "week":
|
|
3030
|
-
case "w":
|
|
3031
|
-
return n * w;
|
|
3032
|
-
case "days":
|
|
3033
|
-
case "day":
|
|
3034
|
-
case "d":
|
|
3035
|
-
return n * d;
|
|
3036
|
-
case "hours":
|
|
3037
|
-
case "hour":
|
|
3038
|
-
case "hrs":
|
|
3039
|
-
case "hr":
|
|
3040
|
-
case "h":
|
|
3041
|
-
return n * h;
|
|
3042
|
-
case "minutes":
|
|
3043
|
-
case "minute":
|
|
3044
|
-
case "mins":
|
|
3045
|
-
case "min":
|
|
3046
|
-
case "m":
|
|
3047
|
-
return n * m;
|
|
3048
|
-
case "seconds":
|
|
3049
|
-
case "second":
|
|
3050
|
-
case "secs":
|
|
3051
|
-
case "sec":
|
|
3052
|
-
case "s":
|
|
3053
|
-
return n * s;
|
|
3054
|
-
case "milliseconds":
|
|
3055
|
-
case "millisecond":
|
|
3056
|
-
case "msecs":
|
|
3057
|
-
case "msec":
|
|
3058
|
-
case "ms":
|
|
3059
|
-
return n;
|
|
3060
|
-
default:
|
|
3061
|
-
return void 0;
|
|
3062
|
-
}
|
|
3063
|
-
}
|
|
3064
|
-
function fmtShort(ms2) {
|
|
3065
|
-
var msAbs = Math.abs(ms2);
|
|
3066
|
-
if (msAbs >= d) {
|
|
3067
|
-
return Math.round(ms2 / d) + "d";
|
|
3068
|
-
}
|
|
3069
|
-
if (msAbs >= h) {
|
|
3070
|
-
return Math.round(ms2 / h) + "h";
|
|
3071
|
-
}
|
|
3072
|
-
if (msAbs >= m) {
|
|
3073
|
-
return Math.round(ms2 / m) + "m";
|
|
3074
|
-
}
|
|
3075
|
-
if (msAbs >= s) {
|
|
3076
|
-
return Math.round(ms2 / s) + "s";
|
|
3077
|
-
}
|
|
3078
|
-
return ms2 + "ms";
|
|
3079
|
-
}
|
|
3080
|
-
function fmtLong(ms2) {
|
|
3081
|
-
var msAbs = Math.abs(ms2);
|
|
3082
|
-
if (msAbs >= d) {
|
|
3083
|
-
return plural(ms2, msAbs, d, "day");
|
|
3084
|
-
}
|
|
3085
|
-
if (msAbs >= h) {
|
|
3086
|
-
return plural(ms2, msAbs, h, "hour");
|
|
3087
|
-
}
|
|
3088
|
-
if (msAbs >= m) {
|
|
3089
|
-
return plural(ms2, msAbs, m, "minute");
|
|
3090
|
-
}
|
|
3091
|
-
if (msAbs >= s) {
|
|
3092
|
-
return plural(ms2, msAbs, s, "second");
|
|
3093
|
-
}
|
|
3094
|
-
return ms2 + " ms";
|
|
3095
|
-
}
|
|
3096
|
-
function plural(ms2, msAbs, n, name) {
|
|
3097
|
-
var isPlural = msAbs >= n * 1.5;
|
|
3098
|
-
return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
|
|
3099
|
-
}
|
|
3100
|
-
return ms;
|
|
3101
|
-
}
|
|
3102
|
-
function setup(env) {
|
|
3103
|
-
createDebug.debug = createDebug;
|
|
3104
|
-
createDebug.default = createDebug;
|
|
3105
|
-
createDebug.coerce = coerce;
|
|
3106
|
-
createDebug.disable = disable;
|
|
3107
|
-
createDebug.enable = enable;
|
|
3108
|
-
createDebug.enabled = enabled;
|
|
3109
|
-
createDebug.humanize = requireMs();
|
|
3110
|
-
createDebug.destroy = destroy2;
|
|
3111
|
-
Object.keys(env).forEach((key) => {
|
|
3112
|
-
createDebug[key] = env[key];
|
|
3113
|
-
});
|
|
3114
|
-
createDebug.names = [];
|
|
3115
|
-
createDebug.skips = [];
|
|
3116
|
-
createDebug.formatters = {};
|
|
3117
|
-
function selectColor(namespace) {
|
|
3118
|
-
let hash = 0;
|
|
3119
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
3120
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
3121
|
-
hash |= 0;
|
|
3122
|
-
}
|
|
3123
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
3124
|
-
}
|
|
3125
|
-
createDebug.selectColor = selectColor;
|
|
3126
|
-
function createDebug(namespace) {
|
|
3127
|
-
let prevTime;
|
|
3128
|
-
let enableOverride = null;
|
|
3129
|
-
let namespacesCache;
|
|
3130
|
-
let enabledCache;
|
|
3131
|
-
function debug2(...args) {
|
|
3132
|
-
if (!debug2.enabled) {
|
|
3133
|
-
return;
|
|
3134
|
-
}
|
|
3135
|
-
const self2 = debug2;
|
|
3136
|
-
const curr = Number(/* @__PURE__ */ new Date());
|
|
3137
|
-
const ms2 = curr - (prevTime || curr);
|
|
3138
|
-
self2.diff = ms2;
|
|
3139
|
-
self2.prev = prevTime;
|
|
3140
|
-
self2.curr = curr;
|
|
3141
|
-
prevTime = curr;
|
|
3142
|
-
args[0] = createDebug.coerce(args[0]);
|
|
3143
|
-
if (typeof args[0] !== "string") {
|
|
3144
|
-
args.unshift("%O");
|
|
3145
|
-
}
|
|
3146
|
-
let index = 0;
|
|
3147
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
3148
|
-
if (match === "%%") {
|
|
3149
|
-
return "%";
|
|
3150
|
-
}
|
|
3151
|
-
index++;
|
|
3152
|
-
const formatter = createDebug.formatters[format];
|
|
3153
|
-
if (typeof formatter === "function") {
|
|
3154
|
-
const val = args[index];
|
|
3155
|
-
match = formatter.call(self2, val);
|
|
3156
|
-
args.splice(index, 1);
|
|
3157
|
-
index--;
|
|
3158
|
-
}
|
|
3159
|
-
return match;
|
|
3160
|
-
});
|
|
3161
|
-
createDebug.formatArgs.call(self2, args);
|
|
3162
|
-
const logFn = self2.log || createDebug.log;
|
|
3163
|
-
logFn.apply(self2, args);
|
|
3164
|
-
}
|
|
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
|
-
enumerable: true,
|
|
3172
|
-
configurable: false,
|
|
3173
|
-
get: () => {
|
|
3174
|
-
if (enableOverride !== null) {
|
|
3175
|
-
return enableOverride;
|
|
3176
|
-
}
|
|
3177
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
3178
|
-
namespacesCache = createDebug.namespaces;
|
|
3179
|
-
enabledCache = createDebug.enabled(namespace);
|
|
3180
|
-
}
|
|
3181
|
-
return enabledCache;
|
|
3182
|
-
},
|
|
3183
|
-
set: (v) => {
|
|
3184
|
-
enableOverride = v;
|
|
3185
|
-
}
|
|
3186
|
-
});
|
|
3187
|
-
if (typeof createDebug.init === "function") {
|
|
3188
|
-
createDebug.init(debug2);
|
|
3189
|
-
}
|
|
3190
|
-
return debug2;
|
|
3191
|
-
}
|
|
3192
|
-
function extend(namespace, delimiter) {
|
|
3193
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
3194
|
-
newDebug.log = this.log;
|
|
3195
|
-
return newDebug;
|
|
3196
|
-
}
|
|
3197
|
-
function enable(namespaces) {
|
|
3198
|
-
createDebug.save(namespaces);
|
|
3199
|
-
createDebug.namespaces = namespaces;
|
|
3200
|
-
createDebug.names = [];
|
|
3201
|
-
createDebug.skips = [];
|
|
3202
|
-
let i;
|
|
3203
|
-
const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
3204
|
-
const len = split.length;
|
|
3205
|
-
for (i = 0; i < len; i++) {
|
|
3206
|
-
if (!split[i]) {
|
|
3207
|
-
continue;
|
|
3208
|
-
}
|
|
3209
|
-
namespaces = split[i].replace(/\*/g, ".*?");
|
|
3210
|
-
if (namespaces[0] === "-") {
|
|
3211
|
-
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
|
|
3212
|
-
} else {
|
|
3213
|
-
createDebug.names.push(new RegExp("^" + namespaces + "$"));
|
|
3214
|
-
}
|
|
3215
|
-
}
|
|
3216
|
-
}
|
|
3217
|
-
function disable() {
|
|
3218
|
-
const namespaces = [
|
|
3219
|
-
...createDebug.names.map(toNamespace),
|
|
3220
|
-
...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
|
|
3221
|
-
].join(",");
|
|
3222
|
-
createDebug.enable("");
|
|
3223
|
-
return namespaces;
|
|
3224
|
-
}
|
|
3225
|
-
function enabled(name) {
|
|
3226
|
-
if (name[name.length - 1] === "*") {
|
|
3227
|
-
return true;
|
|
3228
|
-
}
|
|
3229
|
-
let i;
|
|
3230
|
-
let len;
|
|
3231
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
3232
|
-
if (createDebug.skips[i].test(name)) {
|
|
3233
|
-
return false;
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
3237
|
-
if (createDebug.names[i].test(name)) {
|
|
3238
|
-
return true;
|
|
3239
|
-
}
|
|
3240
|
-
}
|
|
3241
|
-
return false;
|
|
3242
|
-
}
|
|
3243
|
-
function toNamespace(regexp) {
|
|
3244
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
3245
|
-
}
|
|
3246
|
-
function coerce(val) {
|
|
3247
|
-
if (val instanceof Error) {
|
|
3248
|
-
return val.stack || val.message;
|
|
3249
|
-
}
|
|
3250
|
-
return val;
|
|
3251
|
-
}
|
|
3252
|
-
function destroy2() {
|
|
3253
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
3254
|
-
}
|
|
3255
|
-
createDebug.enable(createDebug.load());
|
|
3256
|
-
return createDebug;
|
|
3257
|
-
}
|
|
3258
|
-
var common = setup;
|
|
3259
|
-
(function(module, exports) {
|
|
3260
|
-
exports.formatArgs = formatArgs;
|
|
3261
|
-
exports.save = save;
|
|
3262
|
-
exports.load = load;
|
|
3263
|
-
exports.useColors = useColors;
|
|
3264
|
-
exports.storage = localstorage();
|
|
3265
|
-
exports.destroy = (() => {
|
|
3266
|
-
let warned = false;
|
|
3267
|
-
return () => {
|
|
3268
|
-
if (!warned) {
|
|
3269
|
-
warned = true;
|
|
3270
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
3271
|
-
}
|
|
3272
|
-
};
|
|
3273
|
-
})();
|
|
3274
|
-
exports.colors = [
|
|
3275
|
-
"#0000CC",
|
|
3276
|
-
"#0000FF",
|
|
3277
|
-
"#0033CC",
|
|
3278
|
-
"#0033FF",
|
|
3279
|
-
"#0066CC",
|
|
3280
|
-
"#0066FF",
|
|
3281
|
-
"#0099CC",
|
|
3282
|
-
"#0099FF",
|
|
3283
|
-
"#00CC00",
|
|
3284
|
-
"#00CC33",
|
|
3285
|
-
"#00CC66",
|
|
3286
|
-
"#00CC99",
|
|
3287
|
-
"#00CCCC",
|
|
3288
|
-
"#00CCFF",
|
|
3289
|
-
"#3300CC",
|
|
3290
|
-
"#3300FF",
|
|
3291
|
-
"#3333CC",
|
|
3292
|
-
"#3333FF",
|
|
3293
|
-
"#3366CC",
|
|
3294
|
-
"#3366FF",
|
|
3295
|
-
"#3399CC",
|
|
3296
|
-
"#3399FF",
|
|
3297
|
-
"#33CC00",
|
|
3298
|
-
"#33CC33",
|
|
3299
|
-
"#33CC66",
|
|
3300
|
-
"#33CC99",
|
|
3301
|
-
"#33CCCC",
|
|
3302
|
-
"#33CCFF",
|
|
3303
|
-
"#6600CC",
|
|
3304
|
-
"#6600FF",
|
|
3305
|
-
"#6633CC",
|
|
3306
|
-
"#6633FF",
|
|
3307
|
-
"#66CC00",
|
|
3308
|
-
"#66CC33",
|
|
3309
|
-
"#9900CC",
|
|
3310
|
-
"#9900FF",
|
|
3311
|
-
"#9933CC",
|
|
3312
|
-
"#9933FF",
|
|
3313
|
-
"#99CC00",
|
|
3314
|
-
"#99CC33",
|
|
3315
|
-
"#CC0000",
|
|
3316
|
-
"#CC0033",
|
|
3317
|
-
"#CC0066",
|
|
3318
|
-
"#CC0099",
|
|
3319
|
-
"#CC00CC",
|
|
3320
|
-
"#CC00FF",
|
|
3321
|
-
"#CC3300",
|
|
3322
|
-
"#CC3333",
|
|
3323
|
-
"#CC3366",
|
|
3324
|
-
"#CC3399",
|
|
3325
|
-
"#CC33CC",
|
|
3326
|
-
"#CC33FF",
|
|
3327
|
-
"#CC6600",
|
|
3328
|
-
"#CC6633",
|
|
3329
|
-
"#CC9900",
|
|
3330
|
-
"#CC9933",
|
|
3331
|
-
"#CCCC00",
|
|
3332
|
-
"#CCCC33",
|
|
3333
|
-
"#FF0000",
|
|
3334
|
-
"#FF0033",
|
|
3335
|
-
"#FF0066",
|
|
3336
|
-
"#FF0099",
|
|
3337
|
-
"#FF00CC",
|
|
3338
|
-
"#FF00FF",
|
|
3339
|
-
"#FF3300",
|
|
3340
|
-
"#FF3333",
|
|
3341
|
-
"#FF3366",
|
|
3342
|
-
"#FF3399",
|
|
3343
|
-
"#FF33CC",
|
|
3344
|
-
"#FF33FF",
|
|
3345
|
-
"#FF6600",
|
|
3346
|
-
"#FF6633",
|
|
3347
|
-
"#FF9900",
|
|
3348
|
-
"#FF9933",
|
|
3349
|
-
"#FFCC00",
|
|
3350
|
-
"#FFCC33"
|
|
3351
|
-
];
|
|
3352
|
-
function useColors() {
|
|
3353
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
3354
|
-
return true;
|
|
3355
|
-
}
|
|
3356
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
3357
|
-
return false;
|
|
3358
|
-
}
|
|
3359
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
3360
|
-
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
3361
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
3362
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
3363
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
3364
|
-
}
|
|
3365
|
-
function formatArgs(args) {
|
|
3366
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
3367
|
-
if (!this.useColors) {
|
|
3368
|
-
return;
|
|
3369
|
-
}
|
|
3370
|
-
const c = "color: " + this.color;
|
|
3371
|
-
args.splice(1, 0, c, "color: inherit");
|
|
3372
|
-
let index = 0;
|
|
3373
|
-
let lastC = 0;
|
|
3374
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
3375
|
-
if (match === "%%") {
|
|
3376
|
-
return;
|
|
3377
|
-
}
|
|
3378
|
-
index++;
|
|
3379
|
-
if (match === "%c") {
|
|
3380
|
-
lastC = index;
|
|
3381
|
-
}
|
|
3382
|
-
});
|
|
3383
|
-
args.splice(lastC, 0, c);
|
|
3384
|
-
}
|
|
3385
|
-
exports.log = console.debug || console.log || (() => {
|
|
3386
|
-
});
|
|
3387
|
-
function save(namespaces) {
|
|
3388
|
-
try {
|
|
3389
|
-
if (namespaces) {
|
|
3390
|
-
exports.storage.setItem("debug", namespaces);
|
|
3391
|
-
} else {
|
|
3392
|
-
exports.storage.removeItem("debug");
|
|
3393
|
-
}
|
|
3394
|
-
} catch (error) {
|
|
3395
|
-
}
|
|
3396
|
-
}
|
|
3397
|
-
function load() {
|
|
3398
|
-
let r;
|
|
3399
|
-
try {
|
|
3400
|
-
r = exports.storage.getItem("debug");
|
|
3401
|
-
} catch (error) {
|
|
3402
|
-
}
|
|
3403
|
-
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
3404
|
-
r = process.env.DEBUG;
|
|
3405
|
-
}
|
|
3406
|
-
return r;
|
|
3407
|
-
}
|
|
3408
|
-
function localstorage() {
|
|
3409
|
-
try {
|
|
3410
|
-
return localStorage;
|
|
3411
|
-
} catch (error) {
|
|
3412
|
-
}
|
|
3413
|
-
}
|
|
3414
|
-
module.exports = common(exports);
|
|
3415
|
-
const { formatters } = module.exports;
|
|
3416
|
-
formatters.j = function(v) {
|
|
3417
|
-
try {
|
|
3418
|
-
return JSON.stringify(v);
|
|
3419
|
-
} catch (error) {
|
|
3420
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
|
3421
|
-
}
|
|
3422
|
-
};
|
|
3423
|
-
})(browser, browser.exports);
|
|
3424
|
-
var browserExports = browser.exports;
|
|
3425
|
-
const debugModule = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
3426
|
-
const debug = debugModule(`proc:${process.pid}:`);
|
|
3427
2983
|
class STSWinstonTransport extends Transport {
|
|
3428
2984
|
constructor(opts) {
|
|
3429
2985
|
super(opts);
|
|
3430
|
-
//#debug: debugModule.Debugger;
|
|
3431
|
-
__privateAdd(this, _debug, void 0);
|
|
3432
2986
|
__publicField(this, "myopts");
|
|
3433
2987
|
this.myopts = opts;
|
|
3434
2988
|
}
|
|
2989
|
+
get debugger() {
|
|
2990
|
+
return this.myopts.debugger;
|
|
2991
|
+
}
|
|
2992
|
+
set debugger(newDebugger) {
|
|
2993
|
+
this.myopts.debugger = newDebugger;
|
|
2994
|
+
}
|
|
3435
2995
|
log(info, callback) {
|
|
3436
|
-
|
|
3437
|
-
if (
|
|
3438
|
-
|
|
3439
|
-
__privateSet(this, _debug, debugModule(`proc:${process.pid}:${this.myopts.stsContext}`));
|
|
3440
|
-
}
|
|
3441
|
-
__privateGet(this, _debug).call(this, info.message);
|
|
3442
|
-
debug(info.message);
|
|
2996
|
+
if (info[Symbol.for("level")] == "debug") {
|
|
2997
|
+
if (this.myopts.debugger) {
|
|
2998
|
+
this.myopts.debugger(info.message);
|
|
3443
2999
|
}
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3000
|
+
}
|
|
3001
|
+
this.emit("logged", info);
|
|
3002
|
+
callback();
|
|
3447
3003
|
}
|
|
3448
3004
|
}
|
|
3449
|
-
_debug = new WeakMap();
|
|
3450
3005
|
var ModelDelimeter = /* @__PURE__ */ ((ModelDelimeter2) => {
|
|
3451
3006
|
ModelDelimeter2["ROOT"] = "_";
|
|
3452
3007
|
ModelDelimeter2["SEPERATOR"] = "|";
|