@backtest-kit/cli 5.10.2 → 5.11.0
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/build/index.cjs +22 -8
- package/build/index.mjs +22 -8
- package/package.json +13 -13
package/build/index.cjs
CHANGED
|
@@ -118,6 +118,7 @@ BacktestKit.setConfig({
|
|
|
118
118
|
BacktestKit.setConfig({
|
|
119
119
|
CC_ENABLE_DCA_EVERYWHERE: true,
|
|
120
120
|
CC_ENABLE_PPPL_EVERYWHERE: true,
|
|
121
|
+
CC_ENABLE_TRAILING_EVERYWHERE: true,
|
|
121
122
|
});
|
|
122
123
|
BacktestKit.setConfig({
|
|
123
124
|
CC_MAX_SIGNAL_GENERATION_SECONDS: 15 * 60,
|
|
@@ -445,6 +446,14 @@ var FrameName;
|
|
|
445
446
|
})(FrameName || (FrameName = {}));
|
|
446
447
|
var FrameName$1 = FrameName;
|
|
447
448
|
|
|
449
|
+
const ALLOWED_EXTENSIONS = [
|
|
450
|
+
`.cjs`,
|
|
451
|
+
`.mjs`,
|
|
452
|
+
`.ts`,
|
|
453
|
+
`.tsx`,
|
|
454
|
+
`.js`,
|
|
455
|
+
`.pine`,
|
|
456
|
+
];
|
|
448
457
|
const getArgs = functoolsKit.singleshot(() => {
|
|
449
458
|
const { values, positionals } = util.parseArgs({
|
|
450
459
|
args: process.argv,
|
|
@@ -548,6 +557,11 @@ const getArgs = functoolsKit.singleshot(() => {
|
|
|
548
557
|
positionals,
|
|
549
558
|
};
|
|
550
559
|
});
|
|
560
|
+
const getPositional = functoolsKit.singleshot(() => {
|
|
561
|
+
const { positionals = [] } = getArgs();
|
|
562
|
+
const result = positionals.find((value) => ALLOWED_EXTENSIONS.some((ext) => value.endsWith(ext)));
|
|
563
|
+
return result || null;
|
|
564
|
+
});
|
|
551
565
|
|
|
552
566
|
const ADD_FRAME_FN = (self) => {
|
|
553
567
|
self.loggerService.log("Adding February 2024 as a default frame schema");
|
|
@@ -733,11 +747,11 @@ class BacktestMainService {
|
|
|
733
747
|
if (!getEntry((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))) {
|
|
734
748
|
return;
|
|
735
749
|
}
|
|
736
|
-
const { values
|
|
750
|
+
const { values } = getArgs();
|
|
737
751
|
if (!values.backtest) {
|
|
738
752
|
return;
|
|
739
753
|
}
|
|
740
|
-
const
|
|
754
|
+
const entryPoint = getPositional();
|
|
741
755
|
if (!entryPoint) {
|
|
742
756
|
throw new Error("Entry point is required");
|
|
743
757
|
}
|
|
@@ -812,11 +826,11 @@ class LiveMainService {
|
|
|
812
826
|
if (!getEntry((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))) {
|
|
813
827
|
return;
|
|
814
828
|
}
|
|
815
|
-
const { values
|
|
829
|
+
const { values } = getArgs();
|
|
816
830
|
if (!values.live) {
|
|
817
831
|
return;
|
|
818
832
|
}
|
|
819
|
-
const
|
|
833
|
+
const entryPoint = getPositional();
|
|
820
834
|
if (!entryPoint) {
|
|
821
835
|
throw new Error("Entry point is required");
|
|
822
836
|
}
|
|
@@ -885,11 +899,11 @@ class PaperMainService {
|
|
|
885
899
|
if (!getEntry((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))) {
|
|
886
900
|
return;
|
|
887
901
|
}
|
|
888
|
-
const { values
|
|
902
|
+
const { values } = getArgs();
|
|
889
903
|
if (!values.paper) {
|
|
890
904
|
return;
|
|
891
905
|
}
|
|
892
|
-
const
|
|
906
|
+
const entryPoint = getPositional();
|
|
893
907
|
if (!entryPoint) {
|
|
894
908
|
throw new Error("Entry point is required");
|
|
895
909
|
}
|
|
@@ -2347,11 +2361,11 @@ const main$1 = async () => {
|
|
|
2347
2361
|
if (!getEntry((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))) {
|
|
2348
2362
|
return;
|
|
2349
2363
|
}
|
|
2350
|
-
const { values
|
|
2364
|
+
const { values } = getArgs();
|
|
2351
2365
|
if (!values.pine) {
|
|
2352
2366
|
return;
|
|
2353
2367
|
}
|
|
2354
|
-
const
|
|
2368
|
+
const entryPoint = getPositional();
|
|
2355
2369
|
if (!entryPoint) {
|
|
2356
2370
|
return;
|
|
2357
2371
|
}
|
package/build/index.mjs
CHANGED
|
@@ -93,6 +93,7 @@ setConfig({
|
|
|
93
93
|
setConfig({
|
|
94
94
|
CC_ENABLE_DCA_EVERYWHERE: true,
|
|
95
95
|
CC_ENABLE_PPPL_EVERYWHERE: true,
|
|
96
|
+
CC_ENABLE_TRAILING_EVERYWHERE: true,
|
|
96
97
|
});
|
|
97
98
|
setConfig({
|
|
98
99
|
CC_MAX_SIGNAL_GENERATION_SECONDS: 15 * 60,
|
|
@@ -420,6 +421,14 @@ var FrameName;
|
|
|
420
421
|
})(FrameName || (FrameName = {}));
|
|
421
422
|
var FrameName$1 = FrameName;
|
|
422
423
|
|
|
424
|
+
const ALLOWED_EXTENSIONS = [
|
|
425
|
+
`.cjs`,
|
|
426
|
+
`.mjs`,
|
|
427
|
+
`.ts`,
|
|
428
|
+
`.tsx`,
|
|
429
|
+
`.js`,
|
|
430
|
+
`.pine`,
|
|
431
|
+
];
|
|
423
432
|
const getArgs = singleshot(() => {
|
|
424
433
|
const { values, positionals } = parseArgs({
|
|
425
434
|
args: process.argv,
|
|
@@ -523,6 +532,11 @@ const getArgs = singleshot(() => {
|
|
|
523
532
|
positionals,
|
|
524
533
|
};
|
|
525
534
|
});
|
|
535
|
+
const getPositional = singleshot(() => {
|
|
536
|
+
const { positionals = [] } = getArgs();
|
|
537
|
+
const result = positionals.find((value) => ALLOWED_EXTENSIONS.some((ext) => value.endsWith(ext)));
|
|
538
|
+
return result || null;
|
|
539
|
+
});
|
|
526
540
|
|
|
527
541
|
const ADD_FRAME_FN = (self) => {
|
|
528
542
|
self.loggerService.log("Adding February 2024 as a default frame schema");
|
|
@@ -708,11 +722,11 @@ class BacktestMainService {
|
|
|
708
722
|
if (!getEntry(import.meta.url)) {
|
|
709
723
|
return;
|
|
710
724
|
}
|
|
711
|
-
const { values
|
|
725
|
+
const { values } = getArgs();
|
|
712
726
|
if (!values.backtest) {
|
|
713
727
|
return;
|
|
714
728
|
}
|
|
715
|
-
const
|
|
729
|
+
const entryPoint = getPositional();
|
|
716
730
|
if (!entryPoint) {
|
|
717
731
|
throw new Error("Entry point is required");
|
|
718
732
|
}
|
|
@@ -787,11 +801,11 @@ class LiveMainService {
|
|
|
787
801
|
if (!getEntry(import.meta.url)) {
|
|
788
802
|
return;
|
|
789
803
|
}
|
|
790
|
-
const { values
|
|
804
|
+
const { values } = getArgs();
|
|
791
805
|
if (!values.live) {
|
|
792
806
|
return;
|
|
793
807
|
}
|
|
794
|
-
const
|
|
808
|
+
const entryPoint = getPositional();
|
|
795
809
|
if (!entryPoint) {
|
|
796
810
|
throw new Error("Entry point is required");
|
|
797
811
|
}
|
|
@@ -860,11 +874,11 @@ class PaperMainService {
|
|
|
860
874
|
if (!getEntry(import.meta.url)) {
|
|
861
875
|
return;
|
|
862
876
|
}
|
|
863
|
-
const { values
|
|
877
|
+
const { values } = getArgs();
|
|
864
878
|
if (!values.paper) {
|
|
865
879
|
return;
|
|
866
880
|
}
|
|
867
|
-
const
|
|
881
|
+
const entryPoint = getPositional();
|
|
868
882
|
if (!entryPoint) {
|
|
869
883
|
throw new Error("Entry point is required");
|
|
870
884
|
}
|
|
@@ -2318,11 +2332,11 @@ const main$1 = async () => {
|
|
|
2318
2332
|
if (!getEntry(import.meta.url)) {
|
|
2319
2333
|
return;
|
|
2320
2334
|
}
|
|
2321
|
-
const { values
|
|
2335
|
+
const { values } = getArgs();
|
|
2322
2336
|
if (!values.pine) {
|
|
2323
2337
|
return;
|
|
2324
2338
|
}
|
|
2325
|
-
const
|
|
2339
|
+
const entryPoint = getPositional();
|
|
2326
2340
|
if (!entryPoint) {
|
|
2327
2341
|
return;
|
|
2328
2342
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0",
|
|
4
4
|
"description": "Zero-boilerplate CLI runner for backtest-kit strategies. Run backtests, paper trading, and live bots with candle cache warming, web dashboard, and Telegram notifications — no setup code required.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@babel/plugin-transform-modules-umd": "7.27.1",
|
|
63
63
|
"@babel/standalone": "7.29.1",
|
|
64
|
-
"@backtest-kit/ui": "5.
|
|
65
|
-
"@backtest-kit/graph": "5.
|
|
66
|
-
"@backtest-kit/ollama": "5.
|
|
67
|
-
"@backtest-kit/pinets": "5.
|
|
68
|
-
"@backtest-kit/signals": "5.
|
|
64
|
+
"@backtest-kit/ui": "5.11.0",
|
|
65
|
+
"@backtest-kit/graph": "5.11.0",
|
|
66
|
+
"@backtest-kit/ollama": "5.11.0",
|
|
67
|
+
"@backtest-kit/pinets": "5.11.0",
|
|
68
|
+
"@backtest-kit/signals": "5.11.0",
|
|
69
69
|
"@rollup/plugin-replace": "6.0.3",
|
|
70
70
|
"@rollup/plugin-typescript": "11.1.6",
|
|
71
71
|
"@types/image-size": "0.7.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/mustache": "4.2.6",
|
|
74
74
|
"@types/node": "22.9.0",
|
|
75
75
|
"@types/stack-trace": "0.0.33",
|
|
76
|
-
"backtest-kit": "5.
|
|
76
|
+
"backtest-kit": "5.11.0",
|
|
77
77
|
"glob": "11.0.1",
|
|
78
78
|
"markdown-it": "14.1.1",
|
|
79
79
|
"rimraf": "6.0.1",
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@babel/plugin-transform-modules-umd": "^7.27.1",
|
|
90
90
|
"@babel/standalone": "^7.29.1",
|
|
91
|
-
"@backtest-kit/ui": "^5.
|
|
92
|
-
"@backtest-kit/graph": "^5.
|
|
93
|
-
"@backtest-kit/ollama": "^5.
|
|
94
|
-
"@backtest-kit/pinets": "^5.
|
|
95
|
-
"@backtest-kit/signals": "^5.
|
|
96
|
-
"backtest-kit": "^5.
|
|
91
|
+
"@backtest-kit/ui": "^5.11.0",
|
|
92
|
+
"@backtest-kit/graph": "^5.11.0",
|
|
93
|
+
"@backtest-kit/ollama": "^5.11.0",
|
|
94
|
+
"@backtest-kit/pinets": "^5.11.0",
|
|
95
|
+
"@backtest-kit/signals": "^5.11.0",
|
|
96
|
+
"backtest-kit": "^5.11.0",
|
|
97
97
|
"markdown-it": "^14.1.1",
|
|
98
98
|
"typescript": "^5.0.0"
|
|
99
99
|
},
|