@backtest-kit/cli 6.5.0 → 6.5.1

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 CHANGED
@@ -774,9 +774,17 @@ class WalkerMainService {
774
774
  const strategyMap = new Map();
775
775
  const cwd = process.cwd();
776
776
  for (const entryPoint of payload.entryPoints) {
777
+ process.chdir(cwd);
777
778
  const absolutePath = path.resolve(entryPoint);
779
+ await fs$1.access(absolutePath, fs.constants.F_OK | fs.constants.R_OK);
778
780
  const moduleRoot = path.dirname(absolutePath);
781
+ process.chdir(moduleRoot);
782
+ {
783
+ Setup.clear();
784
+ Setup.enable();
785
+ }
779
786
  {
787
+ cwd !== moduleRoot && BacktestKit.Log.useJsonl();
780
788
  dotenv.config({ path: path.join(cwd, '.env'), override: true, quiet: true });
781
789
  dotenv.config({ path: path.join(moduleRoot, '.env'), override: true, quiet: true });
782
790
  }
@@ -831,14 +839,15 @@ class WalkerMainService {
831
839
  if (!entryPoint) {
832
840
  return;
833
841
  }
842
+ process.chdir(cwd);
843
+ const absolutePath = path.resolve(entryPoint);
844
+ const moduleRoot = path.dirname(absolutePath);
845
+ process.chdir(moduleRoot);
834
846
  {
835
847
  Setup.clear();
836
848
  Setup.enable();
837
849
  }
838
- const absolutePath = path.resolve(entryPoint);
839
- const moduleRoot = path.dirname(absolutePath);
840
850
  {
841
- process.chdir(moduleRoot);
842
851
  cwd !== moduleRoot && BacktestKit.Log.useJsonl();
843
852
  dotenv.config({ path: path.join(cwd, '.env'), override: true, quiet: true });
844
853
  dotenv.config({ path: path.join(moduleRoot, '.env'), override: true, quiet: true });
@@ -2515,7 +2524,7 @@ const main$b = async () => {
2515
2524
  if (MODES.some((mode) => values[mode])) {
2516
2525
  return;
2517
2526
  }
2518
- process.stdout.write(`@backtest-kit/cli ${"6.5.0"}\n`);
2527
+ process.stdout.write(`@backtest-kit/cli ${"6.5.1"}\n`);
2519
2528
  process.stdout.write("\n");
2520
2529
  process.stdout.write(`Run with --help to see available commands.\n`);
2521
2530
  process.stdout.write("\n");
@@ -3083,7 +3092,7 @@ const main$1 = async () => {
3083
3092
  if (!values.help) {
3084
3093
  return;
3085
3094
  }
3086
- process.stdout.write(`@backtest-kit/cli ${"6.5.0"}\n\n`);
3095
+ process.stdout.write(`@backtest-kit/cli ${"6.5.1"}\n\n`);
3087
3096
  process.stdout.write(HELP_TEXT);
3088
3097
  process.exit(0);
3089
3098
  };
@@ -3097,7 +3106,7 @@ const main = async () => {
3097
3106
  if (!values.version) {
3098
3107
  return;
3099
3108
  }
3100
- process.stdout.write(`@backtest-kit/cli ${"6.5.0"}\n`);
3109
+ process.stdout.write(`@backtest-kit/cli ${"6.5.1"}\n`);
3101
3110
  process.exit(0);
3102
3111
  };
3103
3112
  main();
package/build/index.mjs CHANGED
@@ -749,9 +749,17 @@ class WalkerMainService {
749
749
  const strategyMap = new Map();
750
750
  const cwd = process.cwd();
751
751
  for (const entryPoint of payload.entryPoints) {
752
+ process.chdir(cwd);
752
753
  const absolutePath = path.resolve(entryPoint);
754
+ await access(absolutePath, constants.F_OK | constants.R_OK);
753
755
  const moduleRoot = path.dirname(absolutePath);
756
+ process.chdir(moduleRoot);
757
+ {
758
+ Setup.clear();
759
+ Setup.enable();
760
+ }
754
761
  {
762
+ cwd !== moduleRoot && Log.useJsonl();
755
763
  dotenv.config({ path: path.join(cwd, '.env'), override: true, quiet: true });
756
764
  dotenv.config({ path: path.join(moduleRoot, '.env'), override: true, quiet: true });
757
765
  }
@@ -806,14 +814,15 @@ class WalkerMainService {
806
814
  if (!entryPoint) {
807
815
  return;
808
816
  }
817
+ process.chdir(cwd);
818
+ const absolutePath = path.resolve(entryPoint);
819
+ const moduleRoot = path.dirname(absolutePath);
820
+ process.chdir(moduleRoot);
809
821
  {
810
822
  Setup.clear();
811
823
  Setup.enable();
812
824
  }
813
- const absolutePath = path.resolve(entryPoint);
814
- const moduleRoot = path.dirname(absolutePath);
815
825
  {
816
- process.chdir(moduleRoot);
817
826
  cwd !== moduleRoot && Log.useJsonl();
818
827
  dotenv.config({ path: path.join(cwd, '.env'), override: true, quiet: true });
819
828
  dotenv.config({ path: path.join(moduleRoot, '.env'), override: true, quiet: true });
@@ -2486,7 +2495,7 @@ const main$b = async () => {
2486
2495
  if (MODES.some((mode) => values[mode])) {
2487
2496
  return;
2488
2497
  }
2489
- process.stdout.write(`@backtest-kit/cli ${"6.5.0"}\n`);
2498
+ process.stdout.write(`@backtest-kit/cli ${"6.5.1"}\n`);
2490
2499
  process.stdout.write("\n");
2491
2500
  process.stdout.write(`Run with --help to see available commands.\n`);
2492
2501
  process.stdout.write("\n");
@@ -3054,7 +3063,7 @@ const main$1 = async () => {
3054
3063
  if (!values.help) {
3055
3064
  return;
3056
3065
  }
3057
- process.stdout.write(`@backtest-kit/cli ${"6.5.0"}\n\n`);
3066
+ process.stdout.write(`@backtest-kit/cli ${"6.5.1"}\n\n`);
3058
3067
  process.stdout.write(HELP_TEXT);
3059
3068
  process.exit(0);
3060
3069
  };
@@ -3068,7 +3077,7 @@ const main = async () => {
3068
3077
  if (!values.version) {
3069
3078
  return;
3070
3079
  }
3071
- process.stdout.write(`@backtest-kit/cli ${"6.5.0"}\n`);
3080
+ process.stdout.write(`@backtest-kit/cli ${"6.5.1"}\n`);
3072
3081
  process.exit(0);
3073
3082
  };
3074
3083
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backtest-kit/cli",
3
- "version": "6.5.0",
3
+ "version": "6.5.1",
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",