@tradejs/cli 2.0.5 → 2.0.7
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/cli.js +3145 -1827
- package/dist/lib/aiExport.js +1822 -0
- package/dist/lib/binanceMarketContextBackfill.js +97 -88
- package/dist/lib/binanceMarketData.js +6 -3
- package/dist/lib/marketContextPrepare.js +149 -125
- package/dist/lib/runEnvironment.js +100 -55
- package/dist/lib/runFormatting.js +52 -37
- package/dist/lib/runtimeLineage.js +255 -0
- package/dist/lib/runtimeParityDetails.js +24 -1
- package/dist/lib/runtimeSignalsLoader.js +19 -0
- package/dist/lib/runtimeSignalsStorage.js +3 -0
- package/dist/lib/runtimeTradeSync.js +40 -11
- package/dist/lib/timeWindow.js +44 -16
- package/dist/scripts/aiExport.js +252 -125
- package/dist/scripts/aiPocketSearch.js +52 -37
- package/dist/scripts/aiTrain.js +52 -37
- package/dist/scripts/backtest.js +222 -144
- package/dist/scripts/binanceBreadthUniversesUpdate.js +120 -0
- package/dist/scripts/binanceMarketIngest.js +32 -33
- package/dist/scripts/candlesMigrateProvider.js +648 -419
- package/dist/scripts/doctor.js +648 -419
- package/dist/scripts/mlExport.js +57 -39
- package/dist/scripts/replay.js +1040 -255
- package/dist/scripts/replayRunner.js +1040 -255
- package/dist/scripts/replayRuntimeEvidence.js +3 -1
- package/dist/scripts/resolveExportStrategy.js +7 -2
- package/dist/scripts/results.js +52 -37
- package/dist/scripts/runtimeParity.js +193 -141
- package/dist/scripts/signals.js +433 -144
- package/dist/scripts/signalsDaemon.js +433 -144
- package/dist/scripts/signalsSummary.js +40 -11
- package/package.json +15 -14
|
@@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
));
|
|
35
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
36
|
|
|
37
|
-
// ../../node_modules/
|
|
37
|
+
// ../../node_modules/ms/index.js
|
|
38
38
|
var require_ms = __commonJS({
|
|
39
|
-
"../../node_modules/
|
|
39
|
+
"../../node_modules/ms/index.js"(exports2, module2) {
|
|
40
40
|
"use strict";
|
|
41
41
|
var s = 1e3;
|
|
42
42
|
var m = s * 60;
|
|
@@ -151,9 +151,9 @@ var require_ms = __commonJS({
|
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
|
|
154
|
-
// ../../node_modules/debug/src/common.js
|
|
154
|
+
// ../../node_modules/list-it/node_modules/debug/src/common.js
|
|
155
155
|
var require_common = __commonJS({
|
|
156
|
-
"../../node_modules/debug/src/common.js"(exports2, module2) {
|
|
156
|
+
"../../node_modules/list-it/node_modules/debug/src/common.js"(exports2, module2) {
|
|
157
157
|
"use strict";
|
|
158
158
|
function setup(env) {
|
|
159
159
|
createDebug.debug = createDebug;
|
|
@@ -255,50 +255,64 @@ var require_common = __commonJS({
|
|
|
255
255
|
createDebug.namespaces = namespaces;
|
|
256
256
|
createDebug.names = [];
|
|
257
257
|
createDebug.skips = [];
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
258
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
259
|
+
for (const ns of split) {
|
|
260
|
+
if (ns[0] === "-") {
|
|
261
|
+
createDebug.skips.push(ns.slice(1));
|
|
262
|
+
} else {
|
|
263
|
+
createDebug.names.push(ns);
|
|
264
264
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function matchesTemplate(search, template) {
|
|
268
|
+
let searchIndex = 0;
|
|
269
|
+
let templateIndex = 0;
|
|
270
|
+
let starIndex = -1;
|
|
271
|
+
let matchIndex = 0;
|
|
272
|
+
while (searchIndex < search.length) {
|
|
273
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
274
|
+
if (template[templateIndex] === "*") {
|
|
275
|
+
starIndex = templateIndex;
|
|
276
|
+
matchIndex = searchIndex;
|
|
277
|
+
templateIndex++;
|
|
278
|
+
} else {
|
|
279
|
+
searchIndex++;
|
|
280
|
+
templateIndex++;
|
|
281
|
+
}
|
|
282
|
+
} else if (starIndex !== -1) {
|
|
283
|
+
templateIndex = starIndex + 1;
|
|
284
|
+
matchIndex++;
|
|
285
|
+
searchIndex = matchIndex;
|
|
268
286
|
} else {
|
|
269
|
-
|
|
287
|
+
return false;
|
|
270
288
|
}
|
|
271
289
|
}
|
|
290
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
291
|
+
templateIndex++;
|
|
292
|
+
}
|
|
293
|
+
return templateIndex === template.length;
|
|
272
294
|
}
|
|
273
295
|
function disable() {
|
|
274
296
|
const namespaces = [
|
|
275
|
-
...createDebug.names
|
|
276
|
-
...createDebug.skips.map(
|
|
297
|
+
...createDebug.names,
|
|
298
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
277
299
|
].join(",");
|
|
278
300
|
createDebug.enable("");
|
|
279
301
|
return namespaces;
|
|
280
302
|
}
|
|
281
303
|
function enabled(name) {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
let i;
|
|
286
|
-
let len;
|
|
287
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
288
|
-
if (createDebug.skips[i].test(name)) {
|
|
304
|
+
for (const skip of createDebug.skips) {
|
|
305
|
+
if (matchesTemplate(name, skip)) {
|
|
289
306
|
return false;
|
|
290
307
|
}
|
|
291
308
|
}
|
|
292
|
-
for (
|
|
293
|
-
if (
|
|
309
|
+
for (const ns of createDebug.names) {
|
|
310
|
+
if (matchesTemplate(name, ns)) {
|
|
294
311
|
return true;
|
|
295
312
|
}
|
|
296
313
|
}
|
|
297
314
|
return false;
|
|
298
315
|
}
|
|
299
|
-
function toNamespace(regexp) {
|
|
300
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
301
|
-
}
|
|
302
316
|
function coerce(val) {
|
|
303
317
|
if (val instanceof Error) {
|
|
304
318
|
return val.stack || val.message;
|
|
@@ -315,9 +329,9 @@ var require_common = __commonJS({
|
|
|
315
329
|
}
|
|
316
330
|
});
|
|
317
331
|
|
|
318
|
-
// ../../node_modules/debug/src/browser.js
|
|
332
|
+
// ../../node_modules/list-it/node_modules/debug/src/browser.js
|
|
319
333
|
var require_browser = __commonJS({
|
|
320
|
-
"../../node_modules/debug/src/browser.js"(exports2, module2) {
|
|
334
|
+
"../../node_modules/list-it/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
321
335
|
"use strict";
|
|
322
336
|
exports2.formatArgs = formatArgs;
|
|
323
337
|
exports2.save = save;
|
|
@@ -418,10 +432,11 @@ var require_browser = __commonJS({
|
|
|
418
432
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
419
433
|
return false;
|
|
420
434
|
}
|
|
435
|
+
let m;
|
|
421
436
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
422
437
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
423
438
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
424
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(
|
|
439
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
425
440
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
426
441
|
}
|
|
427
442
|
function formatArgs(args) {
|
|
@@ -459,7 +474,7 @@ var require_browser = __commonJS({
|
|
|
459
474
|
function load() {
|
|
460
475
|
let r;
|
|
461
476
|
try {
|
|
462
|
-
r = exports2.storage.getItem("debug");
|
|
477
|
+
r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
463
478
|
} catch (error) {
|
|
464
479
|
}
|
|
465
480
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -600,9 +615,9 @@ var require_supports_color = __commonJS({
|
|
|
600
615
|
}
|
|
601
616
|
});
|
|
602
617
|
|
|
603
|
-
// ../../node_modules/debug/src/node.js
|
|
618
|
+
// ../../node_modules/list-it/node_modules/debug/src/node.js
|
|
604
619
|
var require_node = __commonJS({
|
|
605
|
-
"../../node_modules/debug/src/node.js"(exports2, module2) {
|
|
620
|
+
"../../node_modules/list-it/node_modules/debug/src/node.js"(exports2, module2) {
|
|
606
621
|
"use strict";
|
|
607
622
|
var tty = require("tty");
|
|
608
623
|
var util = require("util");
|
|
@@ -743,7 +758,7 @@ var require_node = __commonJS({
|
|
|
743
758
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
744
759
|
}
|
|
745
760
|
function log(...args) {
|
|
746
|
-
return process.stderr.write(util.
|
|
761
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
747
762
|
}
|
|
748
763
|
function save(namespaces) {
|
|
749
764
|
if (namespaces) {
|
|
@@ -775,9 +790,9 @@ var require_node = __commonJS({
|
|
|
775
790
|
}
|
|
776
791
|
});
|
|
777
792
|
|
|
778
|
-
// ../../node_modules/debug/src/index.js
|
|
793
|
+
// ../../node_modules/list-it/node_modules/debug/src/index.js
|
|
779
794
|
var require_src = __commonJS({
|
|
780
|
-
"../../node_modules/debug/src/index.js"(exports2, module2) {
|
|
795
|
+
"../../node_modules/list-it/node_modules/debug/src/index.js"(exports2, module2) {
|
|
781
796
|
"use strict";
|
|
782
797
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
783
798
|
module2.exports = require_browser();
|
|
@@ -1660,11 +1675,30 @@ var resolveTimeWindow = ({
|
|
|
1660
1675
|
endTime,
|
|
1661
1676
|
nowMs = Date.now(),
|
|
1662
1677
|
defaultStartMs,
|
|
1663
|
-
defaultEndMs
|
|
1678
|
+
defaultEndMs,
|
|
1679
|
+
closedIntervalMs
|
|
1664
1680
|
}) => {
|
|
1665
1681
|
const explicitStart = toEpochMs(startTime);
|
|
1666
1682
|
const explicitEnd = toEpochMs(endTime);
|
|
1667
1683
|
const resolvedDays = toPositiveNumber(days);
|
|
1684
|
+
const alignToLastClosedInterval = (window2, preserveDuration) => {
|
|
1685
|
+
if (typeof closedIntervalMs !== "number" || !Number.isFinite(closedIntervalMs) || closedIntervalMs <= 0) {
|
|
1686
|
+
return window2;
|
|
1687
|
+
}
|
|
1688
|
+
const alignedEnd = Math.floor(window2.end / closedIntervalMs) * closedIntervalMs - 1;
|
|
1689
|
+
const delta = window2.end - alignedEnd;
|
|
1690
|
+
const alignedStart = preserveDuration ? window2.start - delta : window2.start;
|
|
1691
|
+
if (alignedStart >= alignedEnd) {
|
|
1692
|
+
throw new Error(
|
|
1693
|
+
`Invalid closed-candle window: start (${alignedStart}) must be less than end (${alignedEnd})`
|
|
1694
|
+
);
|
|
1695
|
+
}
|
|
1696
|
+
return {
|
|
1697
|
+
...window2,
|
|
1698
|
+
start: Math.trunc(alignedStart),
|
|
1699
|
+
end: Math.trunc(alignedEnd)
|
|
1700
|
+
};
|
|
1701
|
+
};
|
|
1668
1702
|
if (explicitStart != null || explicitEnd != null) {
|
|
1669
1703
|
const resolvedStart = explicitStart ?? (resolvedDays != null && explicitEnd != null ? explicitEnd - resolvedDays * ONE_DAY_MS : defaultStartMs);
|
|
1670
1704
|
const resolvedEnd2 = explicitEnd ?? (resolvedDays != null && explicitStart != null ? explicitStart + resolvedDays * ONE_DAY_MS : defaultEndMs ?? nowMs);
|
|
@@ -1673,11 +1707,14 @@ var resolveTimeWindow = ({
|
|
|
1673
1707
|
`Invalid time window: startTime (${resolvedStart}) must be less than endTime (${resolvedEnd2})`
|
|
1674
1708
|
);
|
|
1675
1709
|
}
|
|
1676
|
-
return
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1710
|
+
return alignToLastClosedInterval(
|
|
1711
|
+
{
|
|
1712
|
+
start: resolvedStart,
|
|
1713
|
+
end: resolvedEnd2,
|
|
1714
|
+
source: "explicit"
|
|
1715
|
+
},
|
|
1716
|
+
explicitStart == null && resolvedDays != null
|
|
1717
|
+
);
|
|
1681
1718
|
}
|
|
1682
1719
|
if (resolvedDays != null) {
|
|
1683
1720
|
const resolvedEnd2 = defaultEndMs ?? nowMs;
|
|
@@ -1687,11 +1724,14 @@ var resolveTimeWindow = ({
|
|
|
1687
1724
|
`Invalid time window: computed start (${resolvedStart}) must be less than end (${resolvedEnd2})`
|
|
1688
1725
|
);
|
|
1689
1726
|
}
|
|
1690
|
-
return
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1727
|
+
return alignToLastClosedInterval(
|
|
1728
|
+
{
|
|
1729
|
+
start: Math.trunc(resolvedStart),
|
|
1730
|
+
end: Math.trunc(resolvedEnd2),
|
|
1731
|
+
source: "days"
|
|
1732
|
+
},
|
|
1733
|
+
true
|
|
1734
|
+
);
|
|
1695
1735
|
}
|
|
1696
1736
|
const resolvedEnd = defaultEndMs ?? nowMs;
|
|
1697
1737
|
if (defaultStartMs >= resolvedEnd) {
|
|
@@ -1699,11 +1739,14 @@ var resolveTimeWindow = ({
|
|
|
1699
1739
|
`Invalid default time window: start (${defaultStartMs}) must be less than end (${resolvedEnd})`
|
|
1700
1740
|
);
|
|
1701
1741
|
}
|
|
1702
|
-
return
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1742
|
+
return alignToLastClosedInterval(
|
|
1743
|
+
{
|
|
1744
|
+
start: Math.trunc(defaultStartMs),
|
|
1745
|
+
end: Math.trunc(resolvedEnd),
|
|
1746
|
+
source: "default"
|
|
1747
|
+
},
|
|
1748
|
+
true
|
|
1749
|
+
);
|
|
1707
1750
|
};
|
|
1708
1751
|
|
|
1709
1752
|
// src/lib/runtimeStrategyBacktest.ts
|
|
@@ -2120,7 +2163,8 @@ var prepareRunEnvironment = async ({
|
|
|
2120
2163
|
accountId,
|
|
2121
2164
|
deploymentId,
|
|
2122
2165
|
assetClasses,
|
|
2123
|
-
deployment
|
|
2166
|
+
deployment,
|
|
2167
|
+
closedIntervalMs
|
|
2124
2168
|
}) => {
|
|
2125
2169
|
const connectorName = await resolveRunConnectorName({
|
|
2126
2170
|
value: connector,
|
|
@@ -2183,7 +2227,8 @@ var prepareRunEnvironment = async ({
|
|
|
2183
2227
|
startTime,
|
|
2184
2228
|
endTime,
|
|
2185
2229
|
defaultStartMs: (0, import_time2.getTimestamp)(import_constants.BACKTEST_DEFAULT_DAYS),
|
|
2186
|
-
defaultEndMs: (0, import_time2.getTimestamp)()
|
|
2230
|
+
defaultEndMs: (0, import_time2.getTimestamp)(),
|
|
2231
|
+
closedIntervalMs
|
|
2187
2232
|
});
|
|
2188
2233
|
const preloadStart = (0, import_time2.getBacktestPreloadStart)(
|
|
2189
2234
|
window2.start,
|
|
@@ -24,9 +24,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
};
|
|
25
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
26
26
|
|
|
27
|
-
// ../../node_modules/
|
|
27
|
+
// ../../node_modules/ms/index.js
|
|
28
28
|
var require_ms = __commonJS({
|
|
29
|
-
"../../node_modules/
|
|
29
|
+
"../../node_modules/ms/index.js"(exports2, module2) {
|
|
30
30
|
"use strict";
|
|
31
31
|
var s = 1e3;
|
|
32
32
|
var m = s * 60;
|
|
@@ -141,9 +141,9 @@ var require_ms = __commonJS({
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
// ../../node_modules/debug/src/common.js
|
|
144
|
+
// ../../node_modules/list-it/node_modules/debug/src/common.js
|
|
145
145
|
var require_common = __commonJS({
|
|
146
|
-
"../../node_modules/debug/src/common.js"(exports2, module2) {
|
|
146
|
+
"../../node_modules/list-it/node_modules/debug/src/common.js"(exports2, module2) {
|
|
147
147
|
"use strict";
|
|
148
148
|
function setup(env) {
|
|
149
149
|
createDebug.debug = createDebug;
|
|
@@ -245,50 +245,64 @@ var require_common = __commonJS({
|
|
|
245
245
|
createDebug.namespaces = namespaces;
|
|
246
246
|
createDebug.names = [];
|
|
247
247
|
createDebug.skips = [];
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
248
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
249
|
+
for (const ns of split) {
|
|
250
|
+
if (ns[0] === "-") {
|
|
251
|
+
createDebug.skips.push(ns.slice(1));
|
|
252
|
+
} else {
|
|
253
|
+
createDebug.names.push(ns);
|
|
254
254
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function matchesTemplate(search, template) {
|
|
258
|
+
let searchIndex = 0;
|
|
259
|
+
let templateIndex = 0;
|
|
260
|
+
let starIndex = -1;
|
|
261
|
+
let matchIndex = 0;
|
|
262
|
+
while (searchIndex < search.length) {
|
|
263
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
264
|
+
if (template[templateIndex] === "*") {
|
|
265
|
+
starIndex = templateIndex;
|
|
266
|
+
matchIndex = searchIndex;
|
|
267
|
+
templateIndex++;
|
|
268
|
+
} else {
|
|
269
|
+
searchIndex++;
|
|
270
|
+
templateIndex++;
|
|
271
|
+
}
|
|
272
|
+
} else if (starIndex !== -1) {
|
|
273
|
+
templateIndex = starIndex + 1;
|
|
274
|
+
matchIndex++;
|
|
275
|
+
searchIndex = matchIndex;
|
|
258
276
|
} else {
|
|
259
|
-
|
|
277
|
+
return false;
|
|
260
278
|
}
|
|
261
279
|
}
|
|
280
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
281
|
+
templateIndex++;
|
|
282
|
+
}
|
|
283
|
+
return templateIndex === template.length;
|
|
262
284
|
}
|
|
263
285
|
function disable() {
|
|
264
286
|
const namespaces = [
|
|
265
|
-
...createDebug.names
|
|
266
|
-
...createDebug.skips.map(
|
|
287
|
+
...createDebug.names,
|
|
288
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
267
289
|
].join(",");
|
|
268
290
|
createDebug.enable("");
|
|
269
291
|
return namespaces;
|
|
270
292
|
}
|
|
271
293
|
function enabled(name) {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
}
|
|
275
|
-
let i;
|
|
276
|
-
let len;
|
|
277
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
278
|
-
if (createDebug.skips[i].test(name)) {
|
|
294
|
+
for (const skip of createDebug.skips) {
|
|
295
|
+
if (matchesTemplate(name, skip)) {
|
|
279
296
|
return false;
|
|
280
297
|
}
|
|
281
298
|
}
|
|
282
|
-
for (
|
|
283
|
-
if (
|
|
299
|
+
for (const ns of createDebug.names) {
|
|
300
|
+
if (matchesTemplate(name, ns)) {
|
|
284
301
|
return true;
|
|
285
302
|
}
|
|
286
303
|
}
|
|
287
304
|
return false;
|
|
288
305
|
}
|
|
289
|
-
function toNamespace(regexp) {
|
|
290
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
291
|
-
}
|
|
292
306
|
function coerce(val) {
|
|
293
307
|
if (val instanceof Error) {
|
|
294
308
|
return val.stack || val.message;
|
|
@@ -305,9 +319,9 @@ var require_common = __commonJS({
|
|
|
305
319
|
}
|
|
306
320
|
});
|
|
307
321
|
|
|
308
|
-
// ../../node_modules/debug/src/browser.js
|
|
322
|
+
// ../../node_modules/list-it/node_modules/debug/src/browser.js
|
|
309
323
|
var require_browser = __commonJS({
|
|
310
|
-
"../../node_modules/debug/src/browser.js"(exports2, module2) {
|
|
324
|
+
"../../node_modules/list-it/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
311
325
|
"use strict";
|
|
312
326
|
exports2.formatArgs = formatArgs;
|
|
313
327
|
exports2.save = save;
|
|
@@ -408,10 +422,11 @@ var require_browser = __commonJS({
|
|
|
408
422
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
409
423
|
return false;
|
|
410
424
|
}
|
|
425
|
+
let m;
|
|
411
426
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
412
427
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
413
428
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
414
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(
|
|
429
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
415
430
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
416
431
|
}
|
|
417
432
|
function formatArgs(args) {
|
|
@@ -449,7 +464,7 @@ var require_browser = __commonJS({
|
|
|
449
464
|
function load() {
|
|
450
465
|
let r;
|
|
451
466
|
try {
|
|
452
|
-
r = exports2.storage.getItem("debug");
|
|
467
|
+
r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
453
468
|
} catch (error) {
|
|
454
469
|
}
|
|
455
470
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -590,9 +605,9 @@ var require_supports_color = __commonJS({
|
|
|
590
605
|
}
|
|
591
606
|
});
|
|
592
607
|
|
|
593
|
-
// ../../node_modules/debug/src/node.js
|
|
608
|
+
// ../../node_modules/list-it/node_modules/debug/src/node.js
|
|
594
609
|
var require_node = __commonJS({
|
|
595
|
-
"../../node_modules/debug/src/node.js"(exports2, module2) {
|
|
610
|
+
"../../node_modules/list-it/node_modules/debug/src/node.js"(exports2, module2) {
|
|
596
611
|
"use strict";
|
|
597
612
|
var tty = require("tty");
|
|
598
613
|
var util = require("util");
|
|
@@ -733,7 +748,7 @@ var require_node = __commonJS({
|
|
|
733
748
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
734
749
|
}
|
|
735
750
|
function log(...args) {
|
|
736
|
-
return process.stderr.write(util.
|
|
751
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
737
752
|
}
|
|
738
753
|
function save(namespaces) {
|
|
739
754
|
if (namespaces) {
|
|
@@ -765,9 +780,9 @@ var require_node = __commonJS({
|
|
|
765
780
|
}
|
|
766
781
|
});
|
|
767
782
|
|
|
768
|
-
// ../../node_modules/debug/src/index.js
|
|
783
|
+
// ../../node_modules/list-it/node_modules/debug/src/index.js
|
|
769
784
|
var require_src = __commonJS({
|
|
770
|
-
"../../node_modules/debug/src/index.js"(exports2, module2) {
|
|
785
|
+
"../../node_modules/list-it/node_modules/debug/src/index.js"(exports2, module2) {
|
|
771
786
|
"use strict";
|
|
772
787
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
773
788
|
module2.exports = require_browser();
|