@backtest-kit/cli 6.7.2 → 6.8.2

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/README.md CHANGED
@@ -343,7 +343,7 @@ Each strategy run produces its own `dump/` directory, making it straightforward
343
343
 
344
344
  ## 🔗 Shared Import Aliases
345
345
 
346
- `@backtest-kit/cli` automatically turns every **top-level folder in `cwd`** into a bare import alias available inside any strategy file. No configuration needed — just create the folder.
346
+ `@backtest-kit/cli` automatically turns every **top-level folder** in `process.cwd()` into a bare import alias available inside any strategy file. No configuration needed — just create the folder.
347
347
 
348
348
  ### How It Works
349
349
 
package/build/index.cjs CHANGED
@@ -239,7 +239,7 @@ class ResolveService {
239
239
  this.DEFAULT_MODULES_DIR = path.resolve(__dirname$2, '..', 'modules');
240
240
  this.OVERRIDE_TEMPLATE_DIR = path.resolve(process.cwd(), 'template');
241
241
  this.OVERRIDE_MODULES_DIR = path.resolve(process.cwd(), 'modules');
242
- this.IMPORT_PATHS_DIR = process.cwd();
242
+ this.PROJECT_ROOT_DIR = process.cwd();
243
243
  this.getIsLaunched = () => {
244
244
  this.loggerService.log("resolveService getIsLaunched");
245
245
  return _is_launched;
@@ -1138,10 +1138,11 @@ const getEnv = functoolsKit.singleshot(() => {
1138
1138
  class FrontendProviderService {
1139
1139
  constructor() {
1140
1140
  this.loggerService = inject(TYPES.loggerService);
1141
+ this.resolveService = inject(TYPES.resolveService);
1141
1142
  this.enable = functoolsKit.singleshot(() => {
1142
1143
  this.loggerService.log("frontendProviderService enable");
1143
1144
  const { CC_WWWROOT_HOST, CC_WWWROOT_PORT } = getEnv();
1144
- const unServer = BacktestKitUi.serve(CC_WWWROOT_HOST, CC_WWWROOT_PORT);
1145
+ const unServer = BacktestKitUi.serve(CC_WWWROOT_HOST, CC_WWWROOT_PORT, this.resolveService.PROJECT_ROOT_DIR);
1145
1146
  return () => {
1146
1147
  unServer();
1147
1148
  this.enable.clear();
@@ -2109,7 +2110,7 @@ class BabelService {
2109
2110
  }
2110
2111
 
2111
2112
  const USE_ESMODULE_DEFAULT = false;
2112
- const IMPORT_PATHS_EXCLUDE = new Set(["dump", "logs", "node_modules"]);
2113
+ const IMPORT_PATHS_EXCLUDE = new Set(["dump", "logs", "modules", "node_modules"]);
2113
2114
  const TRANSPILE_FN = functoolsKit.memoize(([path]) => `${path}`, (path, code, self, require) => {
2114
2115
  const __filename = self.__filename;
2115
2116
  const __dirname = self.__dirname;
@@ -2246,7 +2247,7 @@ const CREATE_BASE_REQUIRE_FN = (self, seen) => {
2246
2247
  const child = self.fork(path.dirname(resolved));
2247
2248
  return child.import(resolved, seen);
2248
2249
  }
2249
- const importPathsMap = READ_IMPORT_PATHS_MAP_FN(self.params.resolve.IMPORT_PATHS_DIR);
2250
+ const importPathsMap = READ_IMPORT_PATHS_MAP_FN(self.params.resolve.PROJECT_ROOT_DIR);
2250
2251
  if (id in importPathsMap) {
2251
2252
  const resolved = importPathsMap[id];
2252
2253
  const child = self.fork(resolved);
@@ -2573,7 +2574,7 @@ const main$b = async () => {
2573
2574
  if (MODES.some((mode) => values[mode])) {
2574
2575
  return;
2575
2576
  }
2576
- process.stdout.write(`@backtest-kit/cli ${"6.7.2"}\n`);
2577
+ process.stdout.write(`@backtest-kit/cli ${"6.8.2"}\n`);
2577
2578
  process.stdout.write("\n");
2578
2579
  process.stdout.write(`Run with --help to see available commands.\n`);
2579
2580
  process.stdout.write("\n");
@@ -3141,7 +3142,7 @@ const main$1 = async () => {
3141
3142
  if (!values.help) {
3142
3143
  return;
3143
3144
  }
3144
- process.stdout.write(`@backtest-kit/cli ${"6.7.2"}\n\n`);
3145
+ process.stdout.write(`@backtest-kit/cli ${"6.8.2"}\n\n`);
3145
3146
  process.stdout.write(HELP_TEXT);
3146
3147
  process.exit(0);
3147
3148
  };
@@ -3155,7 +3156,7 @@ const main = async () => {
3155
3156
  if (!values.version) {
3156
3157
  return;
3157
3158
  }
3158
- process.stdout.write(`@backtest-kit/cli ${"6.7.2"}\n`);
3159
+ process.stdout.write(`@backtest-kit/cli ${"6.8.2"}\n`);
3159
3160
  process.exit(0);
3160
3161
  };
3161
3162
  main();
package/build/index.mjs CHANGED
@@ -214,7 +214,7 @@ class ResolveService {
214
214
  this.DEFAULT_MODULES_DIR = path.resolve(__dirname$1, '..', 'modules');
215
215
  this.OVERRIDE_TEMPLATE_DIR = path.resolve(process.cwd(), 'template');
216
216
  this.OVERRIDE_MODULES_DIR = path.resolve(process.cwd(), 'modules');
217
- this.IMPORT_PATHS_DIR = process.cwd();
217
+ this.PROJECT_ROOT_DIR = process.cwd();
218
218
  this.getIsLaunched = () => {
219
219
  this.loggerService.log("resolveService getIsLaunched");
220
220
  return _is_launched;
@@ -1113,10 +1113,11 @@ const getEnv = singleshot(() => {
1113
1113
  class FrontendProviderService {
1114
1114
  constructor() {
1115
1115
  this.loggerService = inject(TYPES.loggerService);
1116
+ this.resolveService = inject(TYPES.resolveService);
1116
1117
  this.enable = singleshot(() => {
1117
1118
  this.loggerService.log("frontendProviderService enable");
1118
1119
  const { CC_WWWROOT_HOST, CC_WWWROOT_PORT } = getEnv();
1119
- const unServer = serve(CC_WWWROOT_HOST, CC_WWWROOT_PORT);
1120
+ const unServer = serve(CC_WWWROOT_HOST, CC_WWWROOT_PORT, this.resolveService.PROJECT_ROOT_DIR);
1120
1121
  return () => {
1121
1122
  unServer();
1122
1123
  this.enable.clear();
@@ -2084,7 +2085,7 @@ class BabelService {
2084
2085
  }
2085
2086
 
2086
2087
  const USE_ESMODULE_DEFAULT = false;
2087
- const IMPORT_PATHS_EXCLUDE = new Set(["dump", "logs", "node_modules"]);
2088
+ const IMPORT_PATHS_EXCLUDE = new Set(["dump", "logs", "modules", "node_modules"]);
2088
2089
  const TRANSPILE_FN = memoize(([path]) => `${path}`, (path, code, self, require) => {
2089
2090
  const __filename = self.__filename;
2090
2091
  const __dirname = self.__dirname;
@@ -2217,7 +2218,7 @@ const CREATE_BASE_REQUIRE_FN = (self, seen) => {
2217
2218
  const child = self.fork(path.dirname(resolved));
2218
2219
  return child.import(resolved, seen);
2219
2220
  }
2220
- const importPathsMap = READ_IMPORT_PATHS_MAP_FN(self.params.resolve.IMPORT_PATHS_DIR);
2221
+ const importPathsMap = READ_IMPORT_PATHS_MAP_FN(self.params.resolve.PROJECT_ROOT_DIR);
2221
2222
  if (id in importPathsMap) {
2222
2223
  const resolved = importPathsMap[id];
2223
2224
  const child = self.fork(resolved);
@@ -2544,7 +2545,7 @@ const main$b = async () => {
2544
2545
  if (MODES.some((mode) => values[mode])) {
2545
2546
  return;
2546
2547
  }
2547
- process.stdout.write(`@backtest-kit/cli ${"6.7.2"}\n`);
2548
+ process.stdout.write(`@backtest-kit/cli ${"6.8.2"}\n`);
2548
2549
  process.stdout.write("\n");
2549
2550
  process.stdout.write(`Run with --help to see available commands.\n`);
2550
2551
  process.stdout.write("\n");
@@ -3112,7 +3113,7 @@ const main$1 = async () => {
3112
3113
  if (!values.help) {
3113
3114
  return;
3114
3115
  }
3115
- process.stdout.write(`@backtest-kit/cli ${"6.7.2"}\n\n`);
3116
+ process.stdout.write(`@backtest-kit/cli ${"6.8.2"}\n\n`);
3116
3117
  process.stdout.write(HELP_TEXT);
3117
3118
  process.exit(0);
3118
3119
  };
@@ -3126,7 +3127,7 @@ const main = async () => {
3126
3127
  if (!values.version) {
3127
3128
  return;
3128
3129
  }
3129
- process.stdout.write(`@backtest-kit/cli ${"6.7.2"}\n`);
3130
+ process.stdout.write(`@backtest-kit/cli ${"6.8.2"}\n`);
3130
3131
  process.exit(0);
3131
3132
  };
3132
3133
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backtest-kit/cli",
3
- "version": "6.7.2",
3
+ "version": "6.8.2",
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": "6.7.0",
65
- "@backtest-kit/graph": "6.7.0",
66
- "@backtest-kit/ollama": "6.7.0",
67
- "@backtest-kit/pinets": "6.7.0",
68
- "@backtest-kit/signals": "6.7.0",
64
+ "@backtest-kit/ui": "6.8.2",
65
+ "@backtest-kit/graph": "6.8.1",
66
+ "@backtest-kit/ollama": "6.8.1",
67
+ "@backtest-kit/pinets": "6.8.1",
68
+ "@backtest-kit/signals": "6.8.1",
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": "6.7.0",
76
+ "backtest-kit": "6.8.1",
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": "^6.7.0",
92
- "@backtest-kit/graph": "^6.7.0",
93
- "@backtest-kit/ollama": "^6.7.0",
94
- "@backtest-kit/pinets": "^6.7.0",
95
- "@backtest-kit/signals": "^6.7.0",
96
- "backtest-kit": "^6.7.0",
91
+ "@backtest-kit/ui": "^6.8.2",
92
+ "@backtest-kit/graph": "^6.8.1",
93
+ "@backtest-kit/ollama": "^6.8.1",
94
+ "@backtest-kit/pinets": "^6.8.1",
95
+ "@backtest-kit/signals": "^6.8.1",
96
+ "backtest-kit": "^6.8.1",
97
97
  "markdown-it": "^14.1.1",
98
98
  "typescript": "^5.0.0"
99
99
  },
@@ -102,7 +102,7 @@
102
102
  "di-kit": "1.1.1",
103
103
  "di-scoped": "1.0.21",
104
104
  "dotenv": "17.3.1",
105
- "functools-kit": "1.0.95",
105
+ "functools-kit": "1.1.1",
106
106
  "get-moment-stamp": "1.1.2",
107
107
  "image-size": "1.1.1",
108
108
  "jsdom": "26.1.0",
@@ -1,27 +1,27 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "start": "node ./node_modules/@backtest-kit/cli/build/index.mjs",
8
- "sync:lib": "node ./scripts/fetch_docs.mjs"
9
- },
10
- "keywords": [],
11
- "author": "",
12
- "license": "ISC",
13
- "type": "commonjs",
14
- "dependencies": {
15
- "@backtest-kit/cli": "^6.7.2",
16
- "@backtest-kit/graph": "^6.7.0",
17
- "@backtest-kit/pinets": "^6.7.0",
18
- "@backtest-kit/ui": "^6.7.0",
19
- "agent-swarm-kit": "^1.4.0",
20
- "backtest-kit": "^6.7.0",
21
- "functools-kit": "^1.0.95",
22
- "garch": "^1.2.3",
23
- "get-moment-stamp": "^1.1.2",
24
- "ollama": "^0.6.3",
25
- "volume-anomaly": "^1.2.3"
26
- }
27
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "start": "node ./node_modules/@backtest-kit/cli/build/index.mjs",
8
+ "sync:lib": "node ./scripts/fetch_docs.mjs"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "type": "commonjs",
14
+ "dependencies": {
15
+ "@backtest-kit/cli": "^6.8.1",
16
+ "@backtest-kit/graph": "^6.8.1",
17
+ "@backtest-kit/pinets": "^6.8.1",
18
+ "@backtest-kit/ui": "^6.8.2",
19
+ "agent-swarm-kit": "^1.6.0",
20
+ "backtest-kit": "^6.8.1",
21
+ "functools-kit": "^1.1.1",
22
+ "garch": "^1.2.3",
23
+ "get-moment-stamp": "^1.1.2",
24
+ "ollama": "^0.6.3",
25
+ "volume-anomaly": "^1.2.3"
26
+ }
27
+ }
package/types.d.ts CHANGED
@@ -121,7 +121,7 @@ interface IResolve {
121
121
  DEFAULT_MODULES_DIR: string;
122
122
  OVERRIDE_TEMPLATE_DIR: string;
123
123
  OVERRIDE_MODULES_DIR: string;
124
- IMPORT_PATHS_DIR: string;
124
+ PROJECT_ROOT_DIR: string;
125
125
  }
126
126
 
127
127
  declare class ResolveService implements IResolve {
@@ -131,7 +131,7 @@ declare class ResolveService implements IResolve {
131
131
  readonly DEFAULT_MODULES_DIR: string;
132
132
  readonly OVERRIDE_TEMPLATE_DIR: string;
133
133
  readonly OVERRIDE_MODULES_DIR: string;
134
- readonly IMPORT_PATHS_DIR: string;
134
+ readonly PROJECT_ROOT_DIR: string;
135
135
  getIsLaunched: () => boolean;
136
136
  attachPine: (pinePath: string) => Promise<string>;
137
137
  attachStrategy: (jsPath: string) => Promise<void>;
@@ -151,6 +151,7 @@ declare class SymbolSchemaService {
151
151
 
152
152
  declare class FrontendProviderService {
153
153
  private readonly loggerService;
154
+ private readonly resolveService;
154
155
  enable: (() => () => void) & functools_kit.ISingleshotClearable;
155
156
  disable: () => void;
156
157
  connect: (() => Promise<() => void>) & functools_kit.ISingleshotClearable;