@tradejs/node 1.0.4 → 1.0.5

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/constants.js CHANGED
@@ -27,7 +27,16 @@ __export(constants_exports, {
27
27
  });
28
28
  module.exports = __toCommonJS(constants_exports);
29
29
  var { NODE_ENV } = process.env;
30
- var KLINE_CONCURRENCY_LIMIT = NODE_ENV === "production" ? 5 : 10;
30
+ var getPositiveIntegerEnv = (name, fallback) => {
31
+ const rawValue = process.env[name];
32
+ const parsedValue = Number(rawValue);
33
+ return Number.isInteger(parsedValue) && parsedValue > 0 ? parsedValue : fallback;
34
+ };
35
+ var DEFAULT_KLINE_CONCURRENCY_LIMIT = NODE_ENV === "production" ? 1 : 10;
36
+ var KLINE_CONCURRENCY_LIMIT = getPositiveIntegerEnv(
37
+ "KLINE_CONCURRENCY_LIMIT",
38
+ DEFAULT_KLINE_CONCURRENCY_LIMIT
39
+ );
31
40
  var TG_CONCURRENCY_LIMIT = 3;
32
41
  var AI_CONCURRENCY_LIMIT = 3;
33
42
  var SCREENSHOT_CONCURRENCY_LIMIT = NODE_ENV === "production" ? 1 : 2;
@@ -3,7 +3,7 @@ import {
3
3
  KLINE_CONCURRENCY_LIMIT,
4
4
  SCREENSHOT_CONCURRENCY_LIMIT,
5
5
  TG_CONCURRENCY_LIMIT
6
- } from "./chunk-4ZPGZWO7.mjs";
6
+ } from "./chunk-SCMBUEGK.mjs";
7
7
  import "./chunk-6DZX6EAA.mjs";
8
8
  export {
9
9
  AI_CONCURRENCY_LIMIT,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tradejs/node",
3
- "version": "1.0.4",
4
- "description": "Node-only TradeJS runtime for strategies, backtests, Pine loading, and plugin registries.",
3
+ "version": "1.0.5",
4
+ "description": "Node-only runtime for the TradeJS open-source framework: strategies, backtests, Pine loading, and plugin registries.",
5
5
  "keywords": [
6
6
  "tradejs",
7
7
  "trading",
@@ -11,6 +11,14 @@
11
11
  "strategy",
12
12
  "pine-script"
13
13
  ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/tradejs-dev/tradejs.git",
17
+ "directory": "packages/node"
18
+ },
19
+ "bugs": {
20
+ "url": "https://github.com/tradejs-dev/tradejs/issues"
21
+ },
14
22
  "files": [
15
23
  "dist"
16
24
  ],
@@ -54,9 +62,9 @@
54
62
  "dependencies": {
55
63
  "@langchain/core": "^0.3.68",
56
64
  "@langchain/openai": "^0.6.11",
57
- "@tradejs/core": "^1.0.4",
58
- "@tradejs/infra": "^1.0.4",
59
- "@tradejs/types": "^1.0.4",
65
+ "@tradejs/core": "^1.0.5",
66
+ "@tradejs/infra": "^1.0.5",
67
+ "@tradejs/types": "^1.0.5",
60
68
  "chalk": "4.1.2",
61
69
  "ioredis": "5.8.0",
62
70
  "pinets": "0.8.12",
@@ -1,13 +0,0 @@
1
- // src/constants.ts
2
- var { NODE_ENV } = process.env;
3
- var KLINE_CONCURRENCY_LIMIT = NODE_ENV === "production" ? 5 : 10;
4
- var TG_CONCURRENCY_LIMIT = 3;
5
- var AI_CONCURRENCY_LIMIT = 3;
6
- var SCREENSHOT_CONCURRENCY_LIMIT = NODE_ENV === "production" ? 1 : 2;
7
-
8
- export {
9
- KLINE_CONCURRENCY_LIMIT,
10
- TG_CONCURRENCY_LIMIT,
11
- AI_CONCURRENCY_LIMIT,
12
- SCREENSHOT_CONCURRENCY_LIMIT
13
- };