@backtest-kit/cli 3.4.2 → 3.4.4
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 +16 -15
- package/build/index.mjs +11 -10
- package/package.json +9 -1
- package/types.d.ts +1 -2
package/build/index.cjs
CHANGED
|
@@ -240,10 +240,10 @@ const entrySubject = new functoolsKit.BehaviorSubject();
|
|
|
240
240
|
|
|
241
241
|
const __filename$2 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
242
242
|
const __dirname$2 = path.dirname(__filename$2);
|
|
243
|
-
const require$
|
|
243
|
+
const require$3 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
244
244
|
const REQUIRE_ENTRY_FACTORY = (filePath) => {
|
|
245
245
|
try {
|
|
246
|
-
require$
|
|
246
|
+
require$3(filePath);
|
|
247
247
|
return true;
|
|
248
248
|
}
|
|
249
249
|
catch {
|
|
@@ -1634,7 +1634,7 @@ class TelegramTemplateService {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
1636
|
|
|
1637
|
-
const require$
|
|
1637
|
+
const require$2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
1638
1638
|
const getExtVariants = (fileName) => {
|
|
1639
1639
|
const ext = path.extname(fileName);
|
|
1640
1640
|
const base = ext ? fileName.slice(0, -ext.length) : fileName;
|
|
@@ -1650,7 +1650,7 @@ const getExtVariants = (fileName) => {
|
|
|
1650
1650
|
const REQUIRE_MODULE_FACTORY = (fileName) => {
|
|
1651
1651
|
for (const variant of getExtVariants(fileName)) {
|
|
1652
1652
|
try {
|
|
1653
|
-
return require$
|
|
1653
|
+
return require$2(variant);
|
|
1654
1654
|
}
|
|
1655
1655
|
catch {
|
|
1656
1656
|
continue;
|
|
@@ -1899,6 +1899,17 @@ class LiveProviderService {
|
|
|
1899
1899
|
}
|
|
1900
1900
|
|
|
1901
1901
|
standalone.registerPlugin("plugin-transform-modules-umd", pluginUMD);
|
|
1902
|
+
const baseRequire = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
1903
|
+
const require$1 = new Proxy(baseRequire, {
|
|
1904
|
+
apply(_target, _this, args) {
|
|
1905
|
+
const id = args[0];
|
|
1906
|
+
if (id === "backtest-kit")
|
|
1907
|
+
return globalThis.BacktestKit;
|
|
1908
|
+
if (id === "@backtest-kit/cli")
|
|
1909
|
+
return globalThis.BacktestKitCli;
|
|
1910
|
+
return baseRequire(id);
|
|
1911
|
+
},
|
|
1912
|
+
});
|
|
1902
1913
|
const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
1903
1914
|
const __dirname$1 = path.dirname(__filename$1);
|
|
1904
1915
|
const BacktestKitCli = new Proxy({}, {
|
|
@@ -1909,7 +1920,6 @@ const BacktestKitCli = new Proxy({}, {
|
|
|
1909
1920
|
class BabelService {
|
|
1910
1921
|
constructor() {
|
|
1911
1922
|
this.loggerService = inject(TYPES.loggerService);
|
|
1912
|
-
this._require = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
1913
1923
|
this.transpile = (code) => {
|
|
1914
1924
|
this.loggerService.log("babelService transpile", { codeLen: code.length });
|
|
1915
1925
|
const { values } = getArgs();
|
|
@@ -1943,18 +1953,9 @@ class BabelService {
|
|
|
1943
1953
|
});
|
|
1944
1954
|
const module = { exports: {} };
|
|
1945
1955
|
const exports = module.exports;
|
|
1946
|
-
const require = (id) => {
|
|
1947
|
-
if (id === "backtest-kit") {
|
|
1948
|
-
return globalThis.BacktestKit;
|
|
1949
|
-
}
|
|
1950
|
-
if (id === "@backtest-kit/cli") {
|
|
1951
|
-
return globalThis.BacktestKitCli;
|
|
1952
|
-
}
|
|
1953
|
-
return this._require(id);
|
|
1954
|
-
};
|
|
1955
1956
|
eval(this.transpile(code));
|
|
1956
1957
|
return {
|
|
1957
|
-
require,
|
|
1958
|
+
require: require$1,
|
|
1958
1959
|
__filename: __filename$1,
|
|
1959
1960
|
__dirname: __dirname$1,
|
|
1960
1961
|
exports,
|
package/build/index.mjs
CHANGED
|
@@ -1877,6 +1877,17 @@ class LiveProviderService {
|
|
|
1877
1877
|
}
|
|
1878
1878
|
|
|
1879
1879
|
registerPlugin("plugin-transform-modules-umd", pluginUMD);
|
|
1880
|
+
const baseRequire = createRequire(import.meta.url);
|
|
1881
|
+
const require = new Proxy(baseRequire, {
|
|
1882
|
+
apply(_target, _this, args) {
|
|
1883
|
+
const id = args[0];
|
|
1884
|
+
if (id === "backtest-kit")
|
|
1885
|
+
return globalThis.BacktestKit;
|
|
1886
|
+
if (id === "@backtest-kit/cli")
|
|
1887
|
+
return globalThis.BacktestKitCli;
|
|
1888
|
+
return baseRequire(id);
|
|
1889
|
+
},
|
|
1890
|
+
});
|
|
1880
1891
|
const __filename = fileURLToPath(import.meta.url);
|
|
1881
1892
|
const __dirname = path.dirname(__filename);
|
|
1882
1893
|
const BacktestKitCli = new Proxy({}, {
|
|
@@ -1887,7 +1898,6 @@ const BacktestKitCli = new Proxy({}, {
|
|
|
1887
1898
|
class BabelService {
|
|
1888
1899
|
constructor() {
|
|
1889
1900
|
this.loggerService = inject(TYPES.loggerService);
|
|
1890
|
-
this._require = createRequire(import.meta.url);
|
|
1891
1901
|
this.transpile = (code) => {
|
|
1892
1902
|
this.loggerService.log("babelService transpile", { codeLen: code.length });
|
|
1893
1903
|
const { values } = getArgs();
|
|
@@ -1921,15 +1931,6 @@ class BabelService {
|
|
|
1921
1931
|
});
|
|
1922
1932
|
const module = { exports: {} };
|
|
1923
1933
|
const exports = module.exports;
|
|
1924
|
-
const require = (id) => {
|
|
1925
|
-
if (id === "backtest-kit") {
|
|
1926
|
-
return globalThis.BacktestKit;
|
|
1927
|
-
}
|
|
1928
|
-
if (id === "@backtest-kit/cli") {
|
|
1929
|
-
return globalThis.BacktestKitCli;
|
|
1930
|
-
}
|
|
1931
|
-
return this._require(id);
|
|
1932
|
-
};
|
|
1933
1934
|
eval(this.transpile(code));
|
|
1934
1935
|
return {
|
|
1935
1936
|
require,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/cli",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
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",
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
"@babel/plugin-transform-modules-umd": "7.27.1",
|
|
62
62
|
"@babel/standalone": "7.29.1",
|
|
63
63
|
"@backtest-kit/ui": "3.4.0",
|
|
64
|
+
"@backtest-kit/graph": "3.4.0",
|
|
65
|
+
"@backtest-kit/ollama": "3.4.1",
|
|
66
|
+
"@backtest-kit/pinets": "3.4.0",
|
|
67
|
+
"@backtest-kit/signals": "3.4.1",
|
|
64
68
|
"@rollup/plugin-replace": "6.0.3",
|
|
65
69
|
"@rollup/plugin-typescript": "11.1.6",
|
|
66
70
|
"@types/image-size": "0.7.0",
|
|
@@ -84,6 +88,10 @@
|
|
|
84
88
|
"@babel/plugin-transform-modules-umd": "^7.27.1",
|
|
85
89
|
"@babel/standalone": "^7.29.1",
|
|
86
90
|
"@backtest-kit/ui": "^3.4.0",
|
|
91
|
+
"@backtest-kit/graph": "^3.4.0",
|
|
92
|
+
"@backtest-kit/ollama": "^3.4.1",
|
|
93
|
+
"@backtest-kit/pinets": "^3.4.0",
|
|
94
|
+
"@backtest-kit/signals": "^3.4.1",
|
|
87
95
|
"backtest-kit": "^3.4.0",
|
|
88
96
|
"markdown-it": "^14.1.1",
|
|
89
97
|
"typescript": "^5.0.0"
|
package/types.d.ts
CHANGED
|
@@ -95,10 +95,9 @@ declare global {
|
|
|
95
95
|
}
|
|
96
96
|
declare class BabelService {
|
|
97
97
|
readonly loggerService: LoggerService;
|
|
98
|
-
readonly _require: NodeRequire;
|
|
99
98
|
transpile: (code: string) => any;
|
|
100
99
|
transpileAndRun: (code: string) => {
|
|
101
|
-
require:
|
|
100
|
+
require: NodeRequire;
|
|
102
101
|
__filename: string;
|
|
103
102
|
__dirname: string;
|
|
104
103
|
exports: Record<string, unknown>;
|