@tradejs/cli 2.0.4 → 2.0.6
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 +734 -493
- package/dist/lib/marketContextPrepare.js +79 -72
- package/dist/lib/runEnvironment.js +79 -72
- package/dist/lib/runFormatting.js +79 -72
- package/dist/scripts/aiExport.js +79 -72
- package/dist/scripts/aiPocketSearch.js +79 -72
- package/dist/scripts/aiTrain.js +79 -72
- package/dist/scripts/backtest.js +79 -72
- package/dist/scripts/candlesMigrateProvider.js +653 -420
- package/dist/scripts/doctor.js +653 -420
- package/dist/scripts/mlExport.js +79 -72
- package/dist/scripts/replay.js +79 -72
- package/dist/scripts/replayRunner.js +79 -72
- package/dist/scripts/results.js +79 -72
- package/dist/scripts/runtimeParity.js +79 -72
- package/dist/scripts/signals.js +79 -72
- package/dist/scripts/signalsDaemon.js +79 -72
- package/package.json +14 -14
|
@@ -6,7 +6,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
|
|
9
|
+
try {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw mod = 0, e;
|
|
13
|
+
}
|
|
10
14
|
};
|
|
11
15
|
var __export = (target, all) => {
|
|
12
16
|
for (var name in all)
|
|
@@ -30,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
34
|
));
|
|
31
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
36
|
|
|
33
|
-
// ../../node_modules/
|
|
37
|
+
// ../../node_modules/ms/index.js
|
|
34
38
|
var require_ms = __commonJS({
|
|
35
|
-
"../../node_modules/
|
|
39
|
+
"../../node_modules/ms/index.js"(exports2, module2) {
|
|
36
40
|
"use strict";
|
|
37
41
|
var s = 1e3;
|
|
38
42
|
var m = s * 60;
|
|
@@ -147,9 +151,9 @@ var require_ms = __commonJS({
|
|
|
147
151
|
}
|
|
148
152
|
});
|
|
149
153
|
|
|
150
|
-
// ../../node_modules/debug/src/common.js
|
|
154
|
+
// ../../node_modules/list-it/node_modules/debug/src/common.js
|
|
151
155
|
var require_common = __commonJS({
|
|
152
|
-
"../../node_modules/debug/src/common.js"(exports2, module2) {
|
|
156
|
+
"../../node_modules/list-it/node_modules/debug/src/common.js"(exports2, module2) {
|
|
153
157
|
"use strict";
|
|
154
158
|
function setup(env) {
|
|
155
159
|
createDebug.debug = createDebug;
|
|
@@ -251,50 +255,64 @@ var require_common = __commonJS({
|
|
|
251
255
|
createDebug.namespaces = namespaces;
|
|
252
256
|
createDebug.names = [];
|
|
253
257
|
createDebug.skips = [];
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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);
|
|
260
264
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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;
|
|
264
286
|
} else {
|
|
265
|
-
|
|
287
|
+
return false;
|
|
266
288
|
}
|
|
267
289
|
}
|
|
290
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
291
|
+
templateIndex++;
|
|
292
|
+
}
|
|
293
|
+
return templateIndex === template.length;
|
|
268
294
|
}
|
|
269
295
|
function disable() {
|
|
270
296
|
const namespaces = [
|
|
271
|
-
...createDebug.names
|
|
272
|
-
...createDebug.skips.map(
|
|
297
|
+
...createDebug.names,
|
|
298
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
273
299
|
].join(",");
|
|
274
300
|
createDebug.enable("");
|
|
275
301
|
return namespaces;
|
|
276
302
|
}
|
|
277
303
|
function enabled(name) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
let i;
|
|
282
|
-
let len;
|
|
283
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
284
|
-
if (createDebug.skips[i].test(name)) {
|
|
304
|
+
for (const skip of createDebug.skips) {
|
|
305
|
+
if (matchesTemplate(name, skip)) {
|
|
285
306
|
return false;
|
|
286
307
|
}
|
|
287
308
|
}
|
|
288
|
-
for (
|
|
289
|
-
if (
|
|
309
|
+
for (const ns of createDebug.names) {
|
|
310
|
+
if (matchesTemplate(name, ns)) {
|
|
290
311
|
return true;
|
|
291
312
|
}
|
|
292
313
|
}
|
|
293
314
|
return false;
|
|
294
315
|
}
|
|
295
|
-
function toNamespace(regexp) {
|
|
296
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
297
|
-
}
|
|
298
316
|
function coerce(val) {
|
|
299
317
|
if (val instanceof Error) {
|
|
300
318
|
return val.stack || val.message;
|
|
@@ -311,9 +329,9 @@ var require_common = __commonJS({
|
|
|
311
329
|
}
|
|
312
330
|
});
|
|
313
331
|
|
|
314
|
-
// ../../node_modules/debug/src/browser.js
|
|
332
|
+
// ../../node_modules/list-it/node_modules/debug/src/browser.js
|
|
315
333
|
var require_browser = __commonJS({
|
|
316
|
-
"../../node_modules/debug/src/browser.js"(exports2, module2) {
|
|
334
|
+
"../../node_modules/list-it/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
317
335
|
"use strict";
|
|
318
336
|
exports2.formatArgs = formatArgs;
|
|
319
337
|
exports2.save = save;
|
|
@@ -414,10 +432,11 @@ var require_browser = __commonJS({
|
|
|
414
432
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
415
433
|
return false;
|
|
416
434
|
}
|
|
435
|
+
let m;
|
|
417
436
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
418
437
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
419
438
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
420
|
-
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
|
|
421
440
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
422
441
|
}
|
|
423
442
|
function formatArgs(args) {
|
|
@@ -455,7 +474,7 @@ var require_browser = __commonJS({
|
|
|
455
474
|
function load() {
|
|
456
475
|
let r;
|
|
457
476
|
try {
|
|
458
|
-
r = exports2.storage.getItem("debug");
|
|
477
|
+
r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
459
478
|
} catch (error) {
|
|
460
479
|
}
|
|
461
480
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -502,21 +521,19 @@ var require_supports_color = __commonJS({
|
|
|
502
521
|
var tty = require("tty");
|
|
503
522
|
var hasFlag = require_has_flag();
|
|
504
523
|
var { env } = process;
|
|
505
|
-
var
|
|
524
|
+
var forceColor;
|
|
506
525
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
507
|
-
|
|
526
|
+
forceColor = 0;
|
|
508
527
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
509
|
-
|
|
528
|
+
forceColor = 1;
|
|
510
529
|
}
|
|
511
|
-
|
|
512
|
-
if (
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
530
|
+
if ("FORCE_COLOR" in env) {
|
|
531
|
+
if (env.FORCE_COLOR === "true") {
|
|
532
|
+
forceColor = 1;
|
|
533
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
534
|
+
forceColor = 0;
|
|
535
|
+
} else {
|
|
536
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
520
537
|
}
|
|
521
538
|
}
|
|
522
539
|
function translateLevel(level) {
|
|
@@ -530,22 +547,15 @@ var require_supports_color = __commonJS({
|
|
|
530
547
|
has16m: level >= 3
|
|
531
548
|
};
|
|
532
549
|
}
|
|
533
|
-
function supportsColor(haveStream,
|
|
534
|
-
const noFlagForceColor = envForceColor();
|
|
535
|
-
if (noFlagForceColor !== void 0) {
|
|
536
|
-
flagForceColor = noFlagForceColor;
|
|
537
|
-
}
|
|
538
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
550
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
539
551
|
if (forceColor === 0) {
|
|
540
552
|
return 0;
|
|
541
553
|
}
|
|
542
|
-
if (
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
return 2;
|
|
548
|
-
}
|
|
554
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
555
|
+
return 3;
|
|
556
|
+
}
|
|
557
|
+
if (hasFlag("color=256")) {
|
|
558
|
+
return 2;
|
|
549
559
|
}
|
|
550
560
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
551
561
|
return 0;
|
|
@@ -562,7 +572,7 @@ var require_supports_color = __commonJS({
|
|
|
562
572
|
return 1;
|
|
563
573
|
}
|
|
564
574
|
if ("CI" in env) {
|
|
565
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"
|
|
575
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
566
576
|
return 1;
|
|
567
577
|
}
|
|
568
578
|
return min;
|
|
@@ -574,7 +584,7 @@ var require_supports_color = __commonJS({
|
|
|
574
584
|
return 3;
|
|
575
585
|
}
|
|
576
586
|
if ("TERM_PROGRAM" in env) {
|
|
577
|
-
const version =
|
|
587
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
578
588
|
switch (env.TERM_PROGRAM) {
|
|
579
589
|
case "iTerm.app":
|
|
580
590
|
return version >= 3 ? 3 : 2;
|
|
@@ -593,24 +603,21 @@ var require_supports_color = __commonJS({
|
|
|
593
603
|
}
|
|
594
604
|
return min;
|
|
595
605
|
}
|
|
596
|
-
function getSupportLevel(stream
|
|
597
|
-
const level = supportsColor(stream,
|
|
598
|
-
streamIsTTY: stream && stream.isTTY,
|
|
599
|
-
...options
|
|
600
|
-
});
|
|
606
|
+
function getSupportLevel(stream) {
|
|
607
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
601
608
|
return translateLevel(level);
|
|
602
609
|
}
|
|
603
610
|
module2.exports = {
|
|
604
611
|
supportsColor: getSupportLevel,
|
|
605
|
-
stdout:
|
|
606
|
-
stderr:
|
|
612
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
613
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
607
614
|
};
|
|
608
615
|
}
|
|
609
616
|
});
|
|
610
617
|
|
|
611
|
-
// ../../node_modules/debug/src/node.js
|
|
618
|
+
// ../../node_modules/list-it/node_modules/debug/src/node.js
|
|
612
619
|
var require_node = __commonJS({
|
|
613
|
-
"../../node_modules/debug/src/node.js"(exports2, module2) {
|
|
620
|
+
"../../node_modules/list-it/node_modules/debug/src/node.js"(exports2, module2) {
|
|
614
621
|
"use strict";
|
|
615
622
|
var tty = require("tty");
|
|
616
623
|
var util = require("util");
|
|
@@ -751,7 +758,7 @@ var require_node = __commonJS({
|
|
|
751
758
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
752
759
|
}
|
|
753
760
|
function log(...args) {
|
|
754
|
-
return process.stderr.write(util.
|
|
761
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
755
762
|
}
|
|
756
763
|
function save(namespaces) {
|
|
757
764
|
if (namespaces) {
|
|
@@ -783,9 +790,9 @@ var require_node = __commonJS({
|
|
|
783
790
|
}
|
|
784
791
|
});
|
|
785
792
|
|
|
786
|
-
// ../../node_modules/debug/src/index.js
|
|
793
|
+
// ../../node_modules/list-it/node_modules/debug/src/index.js
|
|
787
794
|
var require_src = __commonJS({
|
|
788
|
-
"../../node_modules/debug/src/index.js"(exports2, module2) {
|
|
795
|
+
"../../node_modules/list-it/node_modules/debug/src/index.js"(exports2, module2) {
|
|
789
796
|
"use strict";
|
|
790
797
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
791
798
|
module2.exports = require_browser();
|
|
@@ -6,7 +6,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
|
|
9
|
+
try {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
} catch (e) {
|
|
12
|
+
throw mod = 0, e;
|
|
13
|
+
}
|
|
10
14
|
};
|
|
11
15
|
var __export = (target, all) => {
|
|
12
16
|
for (var name in all)
|
|
@@ -30,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
34
|
));
|
|
31
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
36
|
|
|
33
|
-
// ../../node_modules/
|
|
37
|
+
// ../../node_modules/ms/index.js
|
|
34
38
|
var require_ms = __commonJS({
|
|
35
|
-
"../../node_modules/
|
|
39
|
+
"../../node_modules/ms/index.js"(exports2, module2) {
|
|
36
40
|
"use strict";
|
|
37
41
|
var s = 1e3;
|
|
38
42
|
var m = s * 60;
|
|
@@ -147,9 +151,9 @@ var require_ms = __commonJS({
|
|
|
147
151
|
}
|
|
148
152
|
});
|
|
149
153
|
|
|
150
|
-
// ../../node_modules/debug/src/common.js
|
|
154
|
+
// ../../node_modules/list-it/node_modules/debug/src/common.js
|
|
151
155
|
var require_common = __commonJS({
|
|
152
|
-
"../../node_modules/debug/src/common.js"(exports2, module2) {
|
|
156
|
+
"../../node_modules/list-it/node_modules/debug/src/common.js"(exports2, module2) {
|
|
153
157
|
"use strict";
|
|
154
158
|
function setup(env) {
|
|
155
159
|
createDebug.debug = createDebug;
|
|
@@ -251,50 +255,64 @@ var require_common = __commonJS({
|
|
|
251
255
|
createDebug.namespaces = namespaces;
|
|
252
256
|
createDebug.names = [];
|
|
253
257
|
createDebug.skips = [];
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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);
|
|
260
264
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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;
|
|
264
286
|
} else {
|
|
265
|
-
|
|
287
|
+
return false;
|
|
266
288
|
}
|
|
267
289
|
}
|
|
290
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
291
|
+
templateIndex++;
|
|
292
|
+
}
|
|
293
|
+
return templateIndex === template.length;
|
|
268
294
|
}
|
|
269
295
|
function disable() {
|
|
270
296
|
const namespaces = [
|
|
271
|
-
...createDebug.names
|
|
272
|
-
...createDebug.skips.map(
|
|
297
|
+
...createDebug.names,
|
|
298
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
273
299
|
].join(",");
|
|
274
300
|
createDebug.enable("");
|
|
275
301
|
return namespaces;
|
|
276
302
|
}
|
|
277
303
|
function enabled(name) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
let i;
|
|
282
|
-
let len;
|
|
283
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
284
|
-
if (createDebug.skips[i].test(name)) {
|
|
304
|
+
for (const skip of createDebug.skips) {
|
|
305
|
+
if (matchesTemplate(name, skip)) {
|
|
285
306
|
return false;
|
|
286
307
|
}
|
|
287
308
|
}
|
|
288
|
-
for (
|
|
289
|
-
if (
|
|
309
|
+
for (const ns of createDebug.names) {
|
|
310
|
+
if (matchesTemplate(name, ns)) {
|
|
290
311
|
return true;
|
|
291
312
|
}
|
|
292
313
|
}
|
|
293
314
|
return false;
|
|
294
315
|
}
|
|
295
|
-
function toNamespace(regexp) {
|
|
296
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
297
|
-
}
|
|
298
316
|
function coerce(val) {
|
|
299
317
|
if (val instanceof Error) {
|
|
300
318
|
return val.stack || val.message;
|
|
@@ -311,9 +329,9 @@ var require_common = __commonJS({
|
|
|
311
329
|
}
|
|
312
330
|
});
|
|
313
331
|
|
|
314
|
-
// ../../node_modules/debug/src/browser.js
|
|
332
|
+
// ../../node_modules/list-it/node_modules/debug/src/browser.js
|
|
315
333
|
var require_browser = __commonJS({
|
|
316
|
-
"../../node_modules/debug/src/browser.js"(exports2, module2) {
|
|
334
|
+
"../../node_modules/list-it/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
317
335
|
"use strict";
|
|
318
336
|
exports2.formatArgs = formatArgs;
|
|
319
337
|
exports2.save = save;
|
|
@@ -414,10 +432,11 @@ var require_browser = __commonJS({
|
|
|
414
432
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
415
433
|
return false;
|
|
416
434
|
}
|
|
435
|
+
let m;
|
|
417
436
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
418
437
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
419
438
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
420
|
-
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
|
|
421
440
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
422
441
|
}
|
|
423
442
|
function formatArgs(args) {
|
|
@@ -455,7 +474,7 @@ var require_browser = __commonJS({
|
|
|
455
474
|
function load() {
|
|
456
475
|
let r;
|
|
457
476
|
try {
|
|
458
|
-
r = exports2.storage.getItem("debug");
|
|
477
|
+
r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
459
478
|
} catch (error) {
|
|
460
479
|
}
|
|
461
480
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -502,21 +521,19 @@ var require_supports_color = __commonJS({
|
|
|
502
521
|
var tty = require("tty");
|
|
503
522
|
var hasFlag = require_has_flag();
|
|
504
523
|
var { env } = process;
|
|
505
|
-
var
|
|
524
|
+
var forceColor;
|
|
506
525
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
507
|
-
|
|
526
|
+
forceColor = 0;
|
|
508
527
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
509
|
-
|
|
528
|
+
forceColor = 1;
|
|
510
529
|
}
|
|
511
|
-
|
|
512
|
-
if (
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
530
|
+
if ("FORCE_COLOR" in env) {
|
|
531
|
+
if (env.FORCE_COLOR === "true") {
|
|
532
|
+
forceColor = 1;
|
|
533
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
534
|
+
forceColor = 0;
|
|
535
|
+
} else {
|
|
536
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
520
537
|
}
|
|
521
538
|
}
|
|
522
539
|
function translateLevel(level) {
|
|
@@ -530,22 +547,15 @@ var require_supports_color = __commonJS({
|
|
|
530
547
|
has16m: level >= 3
|
|
531
548
|
};
|
|
532
549
|
}
|
|
533
|
-
function supportsColor(haveStream,
|
|
534
|
-
const noFlagForceColor = envForceColor();
|
|
535
|
-
if (noFlagForceColor !== void 0) {
|
|
536
|
-
flagForceColor = noFlagForceColor;
|
|
537
|
-
}
|
|
538
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
550
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
539
551
|
if (forceColor === 0) {
|
|
540
552
|
return 0;
|
|
541
553
|
}
|
|
542
|
-
if (
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
return 2;
|
|
548
|
-
}
|
|
554
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
555
|
+
return 3;
|
|
556
|
+
}
|
|
557
|
+
if (hasFlag("color=256")) {
|
|
558
|
+
return 2;
|
|
549
559
|
}
|
|
550
560
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
551
561
|
return 0;
|
|
@@ -562,7 +572,7 @@ var require_supports_color = __commonJS({
|
|
|
562
572
|
return 1;
|
|
563
573
|
}
|
|
564
574
|
if ("CI" in env) {
|
|
565
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"
|
|
575
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
566
576
|
return 1;
|
|
567
577
|
}
|
|
568
578
|
return min;
|
|
@@ -574,7 +584,7 @@ var require_supports_color = __commonJS({
|
|
|
574
584
|
return 3;
|
|
575
585
|
}
|
|
576
586
|
if ("TERM_PROGRAM" in env) {
|
|
577
|
-
const version =
|
|
587
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
578
588
|
switch (env.TERM_PROGRAM) {
|
|
579
589
|
case "iTerm.app":
|
|
580
590
|
return version >= 3 ? 3 : 2;
|
|
@@ -593,24 +603,21 @@ var require_supports_color = __commonJS({
|
|
|
593
603
|
}
|
|
594
604
|
return min;
|
|
595
605
|
}
|
|
596
|
-
function getSupportLevel(stream
|
|
597
|
-
const level = supportsColor(stream,
|
|
598
|
-
streamIsTTY: stream && stream.isTTY,
|
|
599
|
-
...options
|
|
600
|
-
});
|
|
606
|
+
function getSupportLevel(stream) {
|
|
607
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
601
608
|
return translateLevel(level);
|
|
602
609
|
}
|
|
603
610
|
module2.exports = {
|
|
604
611
|
supportsColor: getSupportLevel,
|
|
605
|
-
stdout:
|
|
606
|
-
stderr:
|
|
612
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
613
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
607
614
|
};
|
|
608
615
|
}
|
|
609
616
|
});
|
|
610
617
|
|
|
611
|
-
// ../../node_modules/debug/src/node.js
|
|
618
|
+
// ../../node_modules/list-it/node_modules/debug/src/node.js
|
|
612
619
|
var require_node = __commonJS({
|
|
613
|
-
"../../node_modules/debug/src/node.js"(exports2, module2) {
|
|
620
|
+
"../../node_modules/list-it/node_modules/debug/src/node.js"(exports2, module2) {
|
|
614
621
|
"use strict";
|
|
615
622
|
var tty = require("tty");
|
|
616
623
|
var util = require("util");
|
|
@@ -751,7 +758,7 @@ var require_node = __commonJS({
|
|
|
751
758
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
752
759
|
}
|
|
753
760
|
function log(...args) {
|
|
754
|
-
return process.stderr.write(util.
|
|
761
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
755
762
|
}
|
|
756
763
|
function save(namespaces) {
|
|
757
764
|
if (namespaces) {
|
|
@@ -783,9 +790,9 @@ var require_node = __commonJS({
|
|
|
783
790
|
}
|
|
784
791
|
});
|
|
785
792
|
|
|
786
|
-
// ../../node_modules/debug/src/index.js
|
|
793
|
+
// ../../node_modules/list-it/node_modules/debug/src/index.js
|
|
787
794
|
var require_src = __commonJS({
|
|
788
|
-
"../../node_modules/debug/src/index.js"(exports2, module2) {
|
|
795
|
+
"../../node_modules/list-it/node_modules/debug/src/index.js"(exports2, module2) {
|
|
789
796
|
"use strict";
|
|
790
797
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
791
798
|
module2.exports = require_browser();
|