@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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @tradejs/node
2
2
 
3
- Node-only TradeJS runtime package.
3
+ Node-only runtime package for the TradeJS open-source framework.
4
4
 
5
5
  - Homepage: https://tradejs.dev
6
6
  - Documentation: https://docs.tradejs.dev
@@ -0,0 +1,22 @@
1
+ // src/constants.ts
2
+ var { NODE_ENV } = process.env;
3
+ var getPositiveIntegerEnv = (name, fallback) => {
4
+ const rawValue = process.env[name];
5
+ const parsedValue = Number(rawValue);
6
+ return Number.isInteger(parsedValue) && parsedValue > 0 ? parsedValue : fallback;
7
+ };
8
+ var DEFAULT_KLINE_CONCURRENCY_LIMIT = NODE_ENV === "production" ? 1 : 10;
9
+ var KLINE_CONCURRENCY_LIMIT = getPositiveIntegerEnv(
10
+ "KLINE_CONCURRENCY_LIMIT",
11
+ DEFAULT_KLINE_CONCURRENCY_LIMIT
12
+ );
13
+ var TG_CONCURRENCY_LIMIT = 3;
14
+ var AI_CONCURRENCY_LIMIT = 3;
15
+ var SCREENSHOT_CONCURRENCY_LIMIT = NODE_ENV === "production" ? 1 : 2;
16
+
17
+ export {
18
+ KLINE_CONCURRENCY_LIMIT,
19
+ TG_CONCURRENCY_LIMIT,
20
+ AI_CONCURRENCY_LIMIT,
21
+ SCREENSHOT_CONCURRENCY_LIMIT
22
+ };