@tradejs/cli 3.0.0 → 3.0.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/dist/cli.js +13 -4
- package/dist/scripts/backtest.js +2 -2
- package/dist/scripts/signals.js +11 -2
- package/dist/scripts/signalsDaemon.js +11 -2
- package/package.json +9 -9
package/dist/cli.js
CHANGED
|
@@ -13991,9 +13991,9 @@ var init_backtest = __esm({
|
|
|
13991
13991
|
const deploymentStrategy = preparedRun.deployment?.strategies.find(
|
|
13992
13992
|
({ strategyName }) => strategyName === config2.strategyName
|
|
13993
13993
|
);
|
|
13994
|
-
if (
|
|
13994
|
+
if (deploymentStrategy?.enabled === false) {
|
|
13995
13995
|
throw new Error(
|
|
13996
|
-
`Strategy ${config2.strategyName} is
|
|
13996
|
+
`Strategy ${config2.strategyName} is disabled in deployment ${preparedRun.deployment?.id}`
|
|
13997
13997
|
);
|
|
13998
13998
|
}
|
|
13999
13999
|
const policyProfileId = (typeof flags5.policyProfile === "string" && flags5.policyProfile.trim() ? flags5.policyProfile.trim() : deploymentStrategy?.policyProfileId) || void 0;
|
|
@@ -30513,7 +30513,10 @@ var init_runtimeStrategies = __esm({
|
|
|
30513
30513
|
interval: interval4
|
|
30514
30514
|
}) => {
|
|
30515
30515
|
const deploymentStrategies = new Map(
|
|
30516
|
-
(deployment?.strategies ?? []).
|
|
30516
|
+
(deployment?.strategies ?? []).map((strategy) => [
|
|
30517
|
+
strategy.strategyName,
|
|
30518
|
+
strategy
|
|
30519
|
+
])
|
|
30517
30520
|
);
|
|
30518
30521
|
const strategyConfigs = await Promise.all(
|
|
30519
30522
|
(await (0, import_runtimeStrategyConfigs.loadRuntimeStrategyConfigs)(userName2)).map(
|
|
@@ -30524,7 +30527,13 @@ var init_runtimeStrategies = __esm({
|
|
|
30524
30527
|
strategyConfig
|
|
30525
30528
|
}) => {
|
|
30526
30529
|
const deploymentStrategy = deployment ? deploymentStrategies.get(strategyName) : void 0;
|
|
30527
|
-
if (
|
|
30530
|
+
if (deploymentStrategy?.enabled === false) {
|
|
30531
|
+
import_logger7.logger.info(
|
|
30532
|
+
"Skip deployment-disabled strategy config: %s",
|
|
30533
|
+
strategyName
|
|
30534
|
+
);
|
|
30535
|
+
return null;
|
|
30536
|
+
}
|
|
30528
30537
|
if (!isRuntimeStrategyEnabled(strategyConfig)) {
|
|
30529
30538
|
import_logger7.logger.info(
|
|
30530
30539
|
"Skip inactive strategy config by ENABLE=false: %s",
|
package/dist/scripts/backtest.js
CHANGED
|
@@ -5711,9 +5711,9 @@ var backtest = async () => {
|
|
|
5711
5711
|
const deploymentStrategy = preparedRun.deployment?.strategies.find(
|
|
5712
5712
|
({ strategyName }) => strategyName === config.strategyName
|
|
5713
5713
|
);
|
|
5714
|
-
if (
|
|
5714
|
+
if (deploymentStrategy?.enabled === false) {
|
|
5715
5715
|
throw new Error(
|
|
5716
|
-
`Strategy ${config.strategyName} is
|
|
5716
|
+
`Strategy ${config.strategyName} is disabled in deployment ${preparedRun.deployment?.id}`
|
|
5717
5717
|
);
|
|
5718
5718
|
}
|
|
5719
5719
|
const policyProfileId = (typeof flags.policyProfile === "string" && flags.policyProfile.trim() ? flags.policyProfile.trim() : deploymentStrategy?.policyProfileId) || void 0;
|
package/dist/scripts/signals.js
CHANGED
|
@@ -3762,7 +3762,10 @@ var loadRuntimeStrategies = async ({
|
|
|
3762
3762
|
interval
|
|
3763
3763
|
}) => {
|
|
3764
3764
|
const deploymentStrategies = new Map(
|
|
3765
|
-
(deployment?.strategies ?? []).
|
|
3765
|
+
(deployment?.strategies ?? []).map((strategy) => [
|
|
3766
|
+
strategy.strategyName,
|
|
3767
|
+
strategy
|
|
3768
|
+
])
|
|
3766
3769
|
);
|
|
3767
3770
|
const strategyConfigs = await Promise.all(
|
|
3768
3771
|
(await (0, import_runtimeStrategyConfigs.loadRuntimeStrategyConfigs)(userName)).map(
|
|
@@ -3773,7 +3776,13 @@ var loadRuntimeStrategies = async ({
|
|
|
3773
3776
|
strategyConfig
|
|
3774
3777
|
}) => {
|
|
3775
3778
|
const deploymentStrategy = deployment ? deploymentStrategies.get(strategyName) : void 0;
|
|
3776
|
-
if (
|
|
3779
|
+
if (deploymentStrategy?.enabled === false) {
|
|
3780
|
+
import_logger.logger.info(
|
|
3781
|
+
"Skip deployment-disabled strategy config: %s",
|
|
3782
|
+
strategyName
|
|
3783
|
+
);
|
|
3784
|
+
return null;
|
|
3785
|
+
}
|
|
3777
3786
|
if (!isRuntimeStrategyEnabled(strategyConfig)) {
|
|
3778
3787
|
import_logger.logger.info(
|
|
3779
3788
|
"Skip inactive strategy config by ENABLE=false: %s",
|
|
@@ -3760,7 +3760,10 @@ var loadRuntimeStrategies = async ({
|
|
|
3760
3760
|
interval
|
|
3761
3761
|
}) => {
|
|
3762
3762
|
const deploymentStrategies = new Map(
|
|
3763
|
-
(deployment?.strategies ?? []).
|
|
3763
|
+
(deployment?.strategies ?? []).map((strategy) => [
|
|
3764
|
+
strategy.strategyName,
|
|
3765
|
+
strategy
|
|
3766
|
+
])
|
|
3764
3767
|
);
|
|
3765
3768
|
const strategyConfigs = await Promise.all(
|
|
3766
3769
|
(await (0, import_runtimeStrategyConfigs.loadRuntimeStrategyConfigs)(userName)).map(
|
|
@@ -3771,7 +3774,13 @@ var loadRuntimeStrategies = async ({
|
|
|
3771
3774
|
strategyConfig
|
|
3772
3775
|
}) => {
|
|
3773
3776
|
const deploymentStrategy = deployment ? deploymentStrategies.get(strategyName) : void 0;
|
|
3774
|
-
if (
|
|
3777
|
+
if (deploymentStrategy?.enabled === false) {
|
|
3778
|
+
import_logger.logger.info(
|
|
3779
|
+
"Skip deployment-disabled strategy config: %s",
|
|
3780
|
+
strategyName
|
|
3781
|
+
);
|
|
3782
|
+
return null;
|
|
3783
|
+
}
|
|
3775
3784
|
if (!isRuntimeStrategyEnabled(strategyConfig)) {
|
|
3776
3785
|
import_logger.logger.info(
|
|
3777
3786
|
"Skip inactive strategy config by ENABLE=false: %s",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradejs/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Official CLI for the TradeJS TypeScript framework: infra setup, backtests, signals, bots, and ML workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tradejs",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"tradejs": "dist/cli.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tradejs/base": "^3.0.
|
|
33
|
-
"@tradejs/connectors": "^3.0.
|
|
34
|
-
"@tradejs/core": "^3.0.
|
|
35
|
-
"@tradejs/indicators": "^3.0.
|
|
36
|
-
"@tradejs/infra": "^3.0.
|
|
37
|
-
"@tradejs/node": "^3.0.
|
|
38
|
-
"@tradejs/strategies": "^3.0.
|
|
39
|
-
"@tradejs/types": "^3.0.
|
|
32
|
+
"@tradejs/base": "^3.0.1",
|
|
33
|
+
"@tradejs/connectors": "^3.0.1",
|
|
34
|
+
"@tradejs/core": "^3.0.1",
|
|
35
|
+
"@tradejs/indicators": "^3.0.1",
|
|
36
|
+
"@tradejs/infra": "^3.0.1",
|
|
37
|
+
"@tradejs/node": "^3.0.1",
|
|
38
|
+
"@tradejs/strategies": "^3.0.1",
|
|
39
|
+
"@tradejs/types": "^3.0.1",
|
|
40
40
|
"args": "^5.0.3",
|
|
41
41
|
"bcryptjs": "^2.4.3",
|
|
42
42
|
"chalk": "4.1.2",
|