backtest-kit 1.5.28 → 1.5.29

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
@@ -6441,6 +6441,13 @@ class WalkerSchemaService {
6441
6441
  if (walkerSchema.strategies.length === 0) {
6442
6442
  throw new Error(`walker schema validation failed: strategies array cannot be empty for walkerName=${walkerSchema.walkerName}`);
6443
6443
  }
6444
+ if (walkerSchema.strategies &&
6445
+ walkerSchema.strategies.length !== new Set(walkerSchema.strategies).size) {
6446
+ throw new Error(`walker schema validation failed: found duplicate strategies for walkerName=${walkerSchema.walkerName} strategies=[${walkerSchema.strategies}]`);
6447
+ }
6448
+ if (walkerSchema.strategies?.some((value) => typeof value !== "string")) {
6449
+ throw new Error(`walker schema validation failed: invalid strategies for walkerName=${walkerSchema.walkerName} strategies=[${walkerSchema.strategies}]`);
6450
+ }
6444
6451
  };
6445
6452
  /**
6446
6453
  * Overrides an existing walker schema with partial updates.
package/build/index.mjs CHANGED
@@ -6439,6 +6439,13 @@ class WalkerSchemaService {
6439
6439
  if (walkerSchema.strategies.length === 0) {
6440
6440
  throw new Error(`walker schema validation failed: strategies array cannot be empty for walkerName=${walkerSchema.walkerName}`);
6441
6441
  }
6442
+ if (walkerSchema.strategies &&
6443
+ walkerSchema.strategies.length !== new Set(walkerSchema.strategies).size) {
6444
+ throw new Error(`walker schema validation failed: found duplicate strategies for walkerName=${walkerSchema.walkerName} strategies=[${walkerSchema.strategies}]`);
6445
+ }
6446
+ if (walkerSchema.strategies?.some((value) => typeof value !== "string")) {
6447
+ throw new Error(`walker schema validation failed: invalid strategies for walkerName=${walkerSchema.walkerName} strategies=[${walkerSchema.strategies}]`);
6448
+ }
6442
6449
  };
6443
6450
  /**
6444
6451
  * Overrides an existing walker schema with partial updates.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backtest-kit",
3
- "version": "1.5.28",
3
+ "version": "1.5.29",
4
4
  "description": "A TypeScript library for trading system backtest",
5
5
  "author": {
6
6
  "name": "Petr Tripolsky",