@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
|
@@ -4,7 +4,11 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __commonJS = (cb, mod) => function __require() {
|
|
7
|
-
|
|
7
|
+
try {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
throw mod = 0, e;
|
|
11
|
+
}
|
|
8
12
|
};
|
|
9
13
|
var __export = (target, all) => {
|
|
10
14
|
for (var name in all)
|
|
@@ -20,9 +24,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
24
|
};
|
|
21
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
26
|
|
|
23
|
-
// ../../node_modules/
|
|
27
|
+
// ../../node_modules/ms/index.js
|
|
24
28
|
var require_ms = __commonJS({
|
|
25
|
-
"../../node_modules/
|
|
29
|
+
"../../node_modules/ms/index.js"(exports2, module2) {
|
|
26
30
|
"use strict";
|
|
27
31
|
var s = 1e3;
|
|
28
32
|
var m = s * 60;
|
|
@@ -137,9 +141,9 @@ var require_ms = __commonJS({
|
|
|
137
141
|
}
|
|
138
142
|
});
|
|
139
143
|
|
|
140
|
-
// ../../node_modules/debug/src/common.js
|
|
144
|
+
// ../../node_modules/list-it/node_modules/debug/src/common.js
|
|
141
145
|
var require_common = __commonJS({
|
|
142
|
-
"../../node_modules/debug/src/common.js"(exports2, module2) {
|
|
146
|
+
"../../node_modules/list-it/node_modules/debug/src/common.js"(exports2, module2) {
|
|
143
147
|
"use strict";
|
|
144
148
|
function setup(env) {
|
|
145
149
|
createDebug.debug = createDebug;
|
|
@@ -241,50 +245,64 @@ var require_common = __commonJS({
|
|
|
241
245
|
createDebug.namespaces = namespaces;
|
|
242
246
|
createDebug.names = [];
|
|
243
247
|
createDebug.skips = [];
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
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);
|
|
250
254
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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;
|
|
254
276
|
} else {
|
|
255
|
-
|
|
277
|
+
return false;
|
|
256
278
|
}
|
|
257
279
|
}
|
|
280
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
281
|
+
templateIndex++;
|
|
282
|
+
}
|
|
283
|
+
return templateIndex === template.length;
|
|
258
284
|
}
|
|
259
285
|
function disable() {
|
|
260
286
|
const namespaces = [
|
|
261
|
-
...createDebug.names
|
|
262
|
-
...createDebug.skips.map(
|
|
287
|
+
...createDebug.names,
|
|
288
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
263
289
|
].join(",");
|
|
264
290
|
createDebug.enable("");
|
|
265
291
|
return namespaces;
|
|
266
292
|
}
|
|
267
293
|
function enabled(name) {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
let i;
|
|
272
|
-
let len;
|
|
273
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
274
|
-
if (createDebug.skips[i].test(name)) {
|
|
294
|
+
for (const skip of createDebug.skips) {
|
|
295
|
+
if (matchesTemplate(name, skip)) {
|
|
275
296
|
return false;
|
|
276
297
|
}
|
|
277
298
|
}
|
|
278
|
-
for (
|
|
279
|
-
if (
|
|
299
|
+
for (const ns of createDebug.names) {
|
|
300
|
+
if (matchesTemplate(name, ns)) {
|
|
280
301
|
return true;
|
|
281
302
|
}
|
|
282
303
|
}
|
|
283
304
|
return false;
|
|
284
305
|
}
|
|
285
|
-
function toNamespace(regexp) {
|
|
286
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
287
|
-
}
|
|
288
306
|
function coerce(val) {
|
|
289
307
|
if (val instanceof Error) {
|
|
290
308
|
return val.stack || val.message;
|
|
@@ -301,9 +319,9 @@ var require_common = __commonJS({
|
|
|
301
319
|
}
|
|
302
320
|
});
|
|
303
321
|
|
|
304
|
-
// ../../node_modules/debug/src/browser.js
|
|
322
|
+
// ../../node_modules/list-it/node_modules/debug/src/browser.js
|
|
305
323
|
var require_browser = __commonJS({
|
|
306
|
-
"../../node_modules/debug/src/browser.js"(exports2, module2) {
|
|
324
|
+
"../../node_modules/list-it/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
307
325
|
"use strict";
|
|
308
326
|
exports2.formatArgs = formatArgs;
|
|
309
327
|
exports2.save = save;
|
|
@@ -404,10 +422,11 @@ var require_browser = __commonJS({
|
|
|
404
422
|
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
405
423
|
return false;
|
|
406
424
|
}
|
|
425
|
+
let m;
|
|
407
426
|
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
408
427
|
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
409
428
|
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
410
|
-
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
|
|
411
430
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
412
431
|
}
|
|
413
432
|
function formatArgs(args) {
|
|
@@ -445,7 +464,7 @@ var require_browser = __commonJS({
|
|
|
445
464
|
function load() {
|
|
446
465
|
let r;
|
|
447
466
|
try {
|
|
448
|
-
r = exports2.storage.getItem("debug");
|
|
467
|
+
r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
449
468
|
} catch (error) {
|
|
450
469
|
}
|
|
451
470
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -492,21 +511,19 @@ var require_supports_color = __commonJS({
|
|
|
492
511
|
var tty = require("tty");
|
|
493
512
|
var hasFlag = require_has_flag();
|
|
494
513
|
var { env } = process;
|
|
495
|
-
var
|
|
514
|
+
var forceColor;
|
|
496
515
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
497
|
-
|
|
516
|
+
forceColor = 0;
|
|
498
517
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
499
|
-
|
|
518
|
+
forceColor = 1;
|
|
500
519
|
}
|
|
501
|
-
|
|
502
|
-
if (
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}
|
|
509
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
520
|
+
if ("FORCE_COLOR" in env) {
|
|
521
|
+
if (env.FORCE_COLOR === "true") {
|
|
522
|
+
forceColor = 1;
|
|
523
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
524
|
+
forceColor = 0;
|
|
525
|
+
} else {
|
|
526
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
510
527
|
}
|
|
511
528
|
}
|
|
512
529
|
function translateLevel(level) {
|
|
@@ -520,22 +537,15 @@ var require_supports_color = __commonJS({
|
|
|
520
537
|
has16m: level >= 3
|
|
521
538
|
};
|
|
522
539
|
}
|
|
523
|
-
function supportsColor(haveStream,
|
|
524
|
-
const noFlagForceColor = envForceColor();
|
|
525
|
-
if (noFlagForceColor !== void 0) {
|
|
526
|
-
flagForceColor = noFlagForceColor;
|
|
527
|
-
}
|
|
528
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
540
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
529
541
|
if (forceColor === 0) {
|
|
530
542
|
return 0;
|
|
531
543
|
}
|
|
532
|
-
if (
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
return 2;
|
|
538
|
-
}
|
|
544
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
545
|
+
return 3;
|
|
546
|
+
}
|
|
547
|
+
if (hasFlag("color=256")) {
|
|
548
|
+
return 2;
|
|
539
549
|
}
|
|
540
550
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
541
551
|
return 0;
|
|
@@ -552,7 +562,7 @@ var require_supports_color = __commonJS({
|
|
|
552
562
|
return 1;
|
|
553
563
|
}
|
|
554
564
|
if ("CI" in env) {
|
|
555
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"
|
|
565
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
556
566
|
return 1;
|
|
557
567
|
}
|
|
558
568
|
return min;
|
|
@@ -564,7 +574,7 @@ var require_supports_color = __commonJS({
|
|
|
564
574
|
return 3;
|
|
565
575
|
}
|
|
566
576
|
if ("TERM_PROGRAM" in env) {
|
|
567
|
-
const version =
|
|
577
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
568
578
|
switch (env.TERM_PROGRAM) {
|
|
569
579
|
case "iTerm.app":
|
|
570
580
|
return version >= 3 ? 3 : 2;
|
|
@@ -583,24 +593,21 @@ var require_supports_color = __commonJS({
|
|
|
583
593
|
}
|
|
584
594
|
return min;
|
|
585
595
|
}
|
|
586
|
-
function getSupportLevel(stream
|
|
587
|
-
const level = supportsColor(stream,
|
|
588
|
-
streamIsTTY: stream && stream.isTTY,
|
|
589
|
-
...options
|
|
590
|
-
});
|
|
596
|
+
function getSupportLevel(stream) {
|
|
597
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
591
598
|
return translateLevel(level);
|
|
592
599
|
}
|
|
593
600
|
module2.exports = {
|
|
594
601
|
supportsColor: getSupportLevel,
|
|
595
|
-
stdout:
|
|
596
|
-
stderr:
|
|
602
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
603
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
597
604
|
};
|
|
598
605
|
}
|
|
599
606
|
});
|
|
600
607
|
|
|
601
|
-
// ../../node_modules/debug/src/node.js
|
|
608
|
+
// ../../node_modules/list-it/node_modules/debug/src/node.js
|
|
602
609
|
var require_node = __commonJS({
|
|
603
|
-
"../../node_modules/debug/src/node.js"(exports2, module2) {
|
|
610
|
+
"../../node_modules/list-it/node_modules/debug/src/node.js"(exports2, module2) {
|
|
604
611
|
"use strict";
|
|
605
612
|
var tty = require("tty");
|
|
606
613
|
var util = require("util");
|
|
@@ -741,7 +748,7 @@ var require_node = __commonJS({
|
|
|
741
748
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
742
749
|
}
|
|
743
750
|
function log(...args) {
|
|
744
|
-
return process.stderr.write(util.
|
|
751
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
|
745
752
|
}
|
|
746
753
|
function save(namespaces) {
|
|
747
754
|
if (namespaces) {
|
|
@@ -773,9 +780,9 @@ var require_node = __commonJS({
|
|
|
773
780
|
}
|
|
774
781
|
});
|
|
775
782
|
|
|
776
|
-
// ../../node_modules/debug/src/index.js
|
|
783
|
+
// ../../node_modules/list-it/node_modules/debug/src/index.js
|
|
777
784
|
var require_src = __commonJS({
|
|
778
|
-
"../../node_modules/debug/src/index.js"(exports2, module2) {
|
|
785
|
+
"../../node_modules/list-it/node_modules/debug/src/index.js"(exports2, module2) {
|
|
779
786
|
"use strict";
|
|
780
787
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
781
788
|
module2.exports = require_browser();
|
package/dist/scripts/aiExport.js
CHANGED
|
@@ -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(args2) {
|
|
@@ -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(...args2) {
|
|
754
|
-
return process.stderr.write(util.
|
|
761
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args2) + "\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();
|