@backtest-kit/cli 5.5.1 → 5.5.2
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 +84 -41
- package/build/index.mjs +84 -41
- package/package.json +13 -13
- package/types.d.ts +3 -1
package/build/index.cjs
CHANGED
|
@@ -627,7 +627,7 @@ class BacktestMainService {
|
|
|
627
627
|
});
|
|
628
628
|
notifyVerbose();
|
|
629
629
|
}
|
|
630
|
-
await this.moduleConnectionService.loadModule("./backtest");
|
|
630
|
+
await this.moduleConnectionService.loadModule("./backtest.module");
|
|
631
631
|
BacktestKit.Backtest.background(symbol, {
|
|
632
632
|
strategyName,
|
|
633
633
|
frameName,
|
|
@@ -707,7 +707,7 @@ class LiveMainService {
|
|
|
707
707
|
});
|
|
708
708
|
notifyVerbose();
|
|
709
709
|
}
|
|
710
|
-
await this.moduleConnectionService.loadModule("./live");
|
|
710
|
+
await this.moduleConnectionService.loadModule("./live.module");
|
|
711
711
|
BacktestKit.Live.background(symbol, {
|
|
712
712
|
strategyName,
|
|
713
713
|
exchangeName,
|
|
@@ -780,7 +780,7 @@ class PaperMainService {
|
|
|
780
780
|
});
|
|
781
781
|
notifyVerbose();
|
|
782
782
|
}
|
|
783
|
-
await this.moduleConnectionService.loadModule("./paper");
|
|
783
|
+
await this.moduleConnectionService.loadModule("./paper.module");
|
|
784
784
|
BacktestKit.Live.background(symbol, {
|
|
785
785
|
strategyName,
|
|
786
786
|
exchangeName,
|
|
@@ -1713,32 +1713,6 @@ class TelegramTemplateService {
|
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
1715
|
|
|
1716
|
-
const getExtVariants = (fileName) => {
|
|
1717
|
-
const ext = path.extname(fileName);
|
|
1718
|
-
const base = ext ? fileName.slice(0, -ext.length) : fileName;
|
|
1719
|
-
return [
|
|
1720
|
-
`${base}.cjs`,
|
|
1721
|
-
`${base}.mjs`,
|
|
1722
|
-
`${base}.ts`,
|
|
1723
|
-
`${base}.tsx`,
|
|
1724
|
-
`${base}.js`,
|
|
1725
|
-
];
|
|
1726
|
-
};
|
|
1727
|
-
const LOADER_FACTORY = async (fileName, self) => {
|
|
1728
|
-
for (const variant of getExtVariants(fileName)) {
|
|
1729
|
-
try {
|
|
1730
|
-
await fs$1.access(variant, fs.constants.F_OK | fs.constants.R_OK);
|
|
1731
|
-
self.loaderService.import(variant);
|
|
1732
|
-
return true;
|
|
1733
|
-
}
|
|
1734
|
-
catch (error) {
|
|
1735
|
-
const { values } = getArgs();
|
|
1736
|
-
values.verbose && console.log(functoolsKit.getErrorMessage(error));
|
|
1737
|
-
continue;
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
return false;
|
|
1741
|
-
};
|
|
1742
1716
|
const LOAD_MODULE_MODULE_FN = async (fileName, self) => {
|
|
1743
1717
|
const overridePath = path.join(self.resolveService.OVERRIDE_MODULES_DIR, fileName);
|
|
1744
1718
|
const targetPath = path.join(process.cwd(), "modules", fileName);
|
|
@@ -1747,11 +1721,17 @@ const LOAD_MODULE_MODULE_FN = async (fileName, self) => {
|
|
|
1747
1721
|
.then(() => true)
|
|
1748
1722
|
.catch(() => false);
|
|
1749
1723
|
const resolvedFile = hasOverride ? overridePath : targetPath;
|
|
1750
|
-
|
|
1751
|
-
|
|
1724
|
+
try {
|
|
1725
|
+
if (self.loaderService.check(resolvedFile)) {
|
|
1726
|
+
self.loaderService.import(resolvedFile);
|
|
1727
|
+
return true;
|
|
1728
|
+
}
|
|
1729
|
+
return false;
|
|
1730
|
+
}
|
|
1731
|
+
catch {
|
|
1732
|
+
console.warn(`Module module import failed for file: ${resolvedFile}`);
|
|
1733
|
+
return false;
|
|
1752
1734
|
}
|
|
1753
|
-
console.warn(`Module module import failed for file: ${resolvedFile}`);
|
|
1754
|
-
return false;
|
|
1755
1735
|
};
|
|
1756
1736
|
class ModuleConnectionService {
|
|
1757
1737
|
constructor() {
|
|
@@ -1812,7 +1792,13 @@ const TRANSPILE_FN = (code, self) => {
|
|
|
1812
1792
|
const __dirname = self.__dirname;
|
|
1813
1793
|
const module = { exports: {} };
|
|
1814
1794
|
const exports = module.exports;
|
|
1815
|
-
|
|
1795
|
+
try {
|
|
1796
|
+
eval(self.params.babel.transpile(code));
|
|
1797
|
+
}
|
|
1798
|
+
catch (error) {
|
|
1799
|
+
console.log(`Error during transpilation error=\`${functoolsKit.getErrorMessage(error)}\` __filename=\`${__filename}\` __dirname=\`${__dirname}\``);
|
|
1800
|
+
process.exit(-1);
|
|
1801
|
+
}
|
|
1816
1802
|
return {
|
|
1817
1803
|
require,
|
|
1818
1804
|
__filename,
|
|
@@ -1844,13 +1830,48 @@ const BABEL_ENTRY_FACTORY = (filePath, self) => {
|
|
|
1844
1830
|
return null;
|
|
1845
1831
|
}
|
|
1846
1832
|
};
|
|
1847
|
-
const
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1833
|
+
const GET_EXT_VARIANTS_FN = (fileName) => {
|
|
1834
|
+
const ext = path.extname(fileName);
|
|
1835
|
+
const base = ext ? fileName.slice(0, -ext.length) : fileName;
|
|
1836
|
+
const result = [];
|
|
1837
|
+
{
|
|
1838
|
+
result.push(`${base}`);
|
|
1839
|
+
result.push(`${base}.cjs`);
|
|
1840
|
+
result.push(`${base}.mjs`);
|
|
1841
|
+
result.push(`${base}.ts`);
|
|
1842
|
+
result.push(`${base}.tsx`);
|
|
1843
|
+
result.push(`${base}.js`);
|
|
1844
|
+
result.push(`${base}.json`);
|
|
1851
1845
|
}
|
|
1852
|
-
|
|
1853
|
-
|
|
1846
|
+
{
|
|
1847
|
+
result.push(`${fileName}`);
|
|
1848
|
+
result.push(`${fileName}.cjs`);
|
|
1849
|
+
result.push(`${fileName}.mjs`);
|
|
1850
|
+
result.push(`${fileName}.ts`);
|
|
1851
|
+
result.push(`${fileName}.tsx`);
|
|
1852
|
+
result.push(`${fileName}.js`);
|
|
1853
|
+
result.push(`${fileName}.json`);
|
|
1854
|
+
}
|
|
1855
|
+
return result;
|
|
1856
|
+
};
|
|
1857
|
+
const GET_RESOLVED_EXT_FN = (filePath) => {
|
|
1858
|
+
for (const variant of GET_EXT_VARIANTS_FN(filePath)) {
|
|
1859
|
+
if (fs.existsSync(variant)) {
|
|
1860
|
+
return variant;
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
return filePath;
|
|
1864
|
+
};
|
|
1865
|
+
const ENTRY_FACTORY = (filePath, self) => {
|
|
1866
|
+
filePath = GET_RESOLVED_EXT_FN(filePath);
|
|
1867
|
+
{
|
|
1868
|
+
let result = null;
|
|
1869
|
+
if ((result = REQUIRE_ENTRY_FACTORY(filePath, self))) {
|
|
1870
|
+
return result;
|
|
1871
|
+
}
|
|
1872
|
+
if ((result = BABEL_ENTRY_FACTORY(filePath, self))) {
|
|
1873
|
+
return result;
|
|
1874
|
+
}
|
|
1854
1875
|
}
|
|
1855
1876
|
throw new Error(`Failed to load module at ${filePath} (basepath: ${self.params.path})`);
|
|
1856
1877
|
};
|
|
@@ -1917,6 +1938,19 @@ class ClientLoader {
|
|
|
1917
1938
|
});
|
|
1918
1939
|
return ENTRY_FACTORY(filePath, this);
|
|
1919
1940
|
}
|
|
1941
|
+
check(filePath) {
|
|
1942
|
+
this.params.logger.log("ClientLoader check", {
|
|
1943
|
+
filePath,
|
|
1944
|
+
basePath: this.params.path,
|
|
1945
|
+
});
|
|
1946
|
+
const resolved = path.resolve(this.__dirname, filePath);
|
|
1947
|
+
for (const variantPath of GET_EXT_VARIANTS_FN(resolved)) {
|
|
1948
|
+
if (fs.existsSync(variantPath)) {
|
|
1949
|
+
return true;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
return false;
|
|
1953
|
+
}
|
|
1920
1954
|
}
|
|
1921
1955
|
globalThis.BacktestKit = BacktestKit__namespace;
|
|
1922
1956
|
globalThis.BacktestKitCli = BacktestKitCli;
|
|
@@ -1935,13 +1969,22 @@ class LoaderService {
|
|
|
1935
1969
|
logger: this.loggerService,
|
|
1936
1970
|
path: basePath,
|
|
1937
1971
|
}));
|
|
1938
|
-
this.import =
|
|
1972
|
+
this.import = (filePath, basePath = process.cwd()) => {
|
|
1939
1973
|
this.loggerService.log("loaderService import", {
|
|
1940
1974
|
filePath,
|
|
1975
|
+
basePath,
|
|
1941
1976
|
});
|
|
1942
1977
|
const instance = this.getInstance(basePath);
|
|
1943
1978
|
return instance.import(filePath);
|
|
1944
1979
|
};
|
|
1980
|
+
this.check = async (filePath, basePath = process.cwd()) => {
|
|
1981
|
+
this.loggerService.log("loaderService check", {
|
|
1982
|
+
filePath,
|
|
1983
|
+
basePath,
|
|
1984
|
+
});
|
|
1985
|
+
const instance = this.getInstance(basePath);
|
|
1986
|
+
return instance.check(filePath);
|
|
1987
|
+
};
|
|
1945
1988
|
}
|
|
1946
1989
|
}
|
|
1947
1990
|
|
package/build/index.mjs
CHANGED
|
@@ -601,7 +601,7 @@ class BacktestMainService {
|
|
|
601
601
|
});
|
|
602
602
|
notifyVerbose();
|
|
603
603
|
}
|
|
604
|
-
await this.moduleConnectionService.loadModule("./backtest");
|
|
604
|
+
await this.moduleConnectionService.loadModule("./backtest.module");
|
|
605
605
|
Backtest.background(symbol, {
|
|
606
606
|
strategyName,
|
|
607
607
|
frameName,
|
|
@@ -681,7 +681,7 @@ class LiveMainService {
|
|
|
681
681
|
});
|
|
682
682
|
notifyVerbose();
|
|
683
683
|
}
|
|
684
|
-
await this.moduleConnectionService.loadModule("./live");
|
|
684
|
+
await this.moduleConnectionService.loadModule("./live.module");
|
|
685
685
|
Live.background(symbol, {
|
|
686
686
|
strategyName,
|
|
687
687
|
exchangeName,
|
|
@@ -754,7 +754,7 @@ class PaperMainService {
|
|
|
754
754
|
});
|
|
755
755
|
notifyVerbose();
|
|
756
756
|
}
|
|
757
|
-
await this.moduleConnectionService.loadModule("./paper");
|
|
757
|
+
await this.moduleConnectionService.loadModule("./paper.module");
|
|
758
758
|
Live.background(symbol, {
|
|
759
759
|
strategyName,
|
|
760
760
|
exchangeName,
|
|
@@ -1687,32 +1687,6 @@ class TelegramTemplateService {
|
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
|
|
1690
|
-
const getExtVariants = (fileName) => {
|
|
1691
|
-
const ext = path.extname(fileName);
|
|
1692
|
-
const base = ext ? fileName.slice(0, -ext.length) : fileName;
|
|
1693
|
-
return [
|
|
1694
|
-
`${base}.cjs`,
|
|
1695
|
-
`${base}.mjs`,
|
|
1696
|
-
`${base}.ts`,
|
|
1697
|
-
`${base}.tsx`,
|
|
1698
|
-
`${base}.js`,
|
|
1699
|
-
];
|
|
1700
|
-
};
|
|
1701
|
-
const LOADER_FACTORY = async (fileName, self) => {
|
|
1702
|
-
for (const variant of getExtVariants(fileName)) {
|
|
1703
|
-
try {
|
|
1704
|
-
await fs$1.access(variant, constants.F_OK | constants.R_OK);
|
|
1705
|
-
self.loaderService.import(variant);
|
|
1706
|
-
return true;
|
|
1707
|
-
}
|
|
1708
|
-
catch (error) {
|
|
1709
|
-
const { values } = getArgs();
|
|
1710
|
-
values.verbose && console.log(getErrorMessage(error));
|
|
1711
|
-
continue;
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
return false;
|
|
1715
|
-
};
|
|
1716
1690
|
const LOAD_MODULE_MODULE_FN = async (fileName, self) => {
|
|
1717
1691
|
const overridePath = path.join(self.resolveService.OVERRIDE_MODULES_DIR, fileName);
|
|
1718
1692
|
const targetPath = path.join(process.cwd(), "modules", fileName);
|
|
@@ -1721,11 +1695,17 @@ const LOAD_MODULE_MODULE_FN = async (fileName, self) => {
|
|
|
1721
1695
|
.then(() => true)
|
|
1722
1696
|
.catch(() => false);
|
|
1723
1697
|
const resolvedFile = hasOverride ? overridePath : targetPath;
|
|
1724
|
-
|
|
1725
|
-
|
|
1698
|
+
try {
|
|
1699
|
+
if (self.loaderService.check(resolvedFile)) {
|
|
1700
|
+
self.loaderService.import(resolvedFile);
|
|
1701
|
+
return true;
|
|
1702
|
+
}
|
|
1703
|
+
return false;
|
|
1704
|
+
}
|
|
1705
|
+
catch {
|
|
1706
|
+
console.warn(`Module module import failed for file: ${resolvedFile}`);
|
|
1707
|
+
return false;
|
|
1726
1708
|
}
|
|
1727
|
-
console.warn(`Module module import failed for file: ${resolvedFile}`);
|
|
1728
|
-
return false;
|
|
1729
1709
|
};
|
|
1730
1710
|
class ModuleConnectionService {
|
|
1731
1711
|
constructor() {
|
|
@@ -1786,7 +1766,13 @@ const TRANSPILE_FN = (code, self) => {
|
|
|
1786
1766
|
const __dirname = self.__dirname;
|
|
1787
1767
|
const module = { exports: {} };
|
|
1788
1768
|
const exports = module.exports;
|
|
1789
|
-
|
|
1769
|
+
try {
|
|
1770
|
+
eval(self.params.babel.transpile(code));
|
|
1771
|
+
}
|
|
1772
|
+
catch (error) {
|
|
1773
|
+
console.log(`Error during transpilation error=\`${getErrorMessage(error)}\` __filename=\`${__filename}\` __dirname=\`${__dirname}\``);
|
|
1774
|
+
process.exit(-1);
|
|
1775
|
+
}
|
|
1790
1776
|
return {
|
|
1791
1777
|
require,
|
|
1792
1778
|
__filename,
|
|
@@ -1814,13 +1800,48 @@ const BABEL_ENTRY_FACTORY = (filePath, self) => {
|
|
|
1814
1800
|
return null;
|
|
1815
1801
|
}
|
|
1816
1802
|
};
|
|
1817
|
-
const
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1803
|
+
const GET_EXT_VARIANTS_FN = (fileName) => {
|
|
1804
|
+
const ext = path.extname(fileName);
|
|
1805
|
+
const base = ext ? fileName.slice(0, -ext.length) : fileName;
|
|
1806
|
+
const result = [];
|
|
1807
|
+
{
|
|
1808
|
+
result.push(`${base}`);
|
|
1809
|
+
result.push(`${base}.cjs`);
|
|
1810
|
+
result.push(`${base}.mjs`);
|
|
1811
|
+
result.push(`${base}.ts`);
|
|
1812
|
+
result.push(`${base}.tsx`);
|
|
1813
|
+
result.push(`${base}.js`);
|
|
1814
|
+
result.push(`${base}.json`);
|
|
1821
1815
|
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1816
|
+
{
|
|
1817
|
+
result.push(`${fileName}`);
|
|
1818
|
+
result.push(`${fileName}.cjs`);
|
|
1819
|
+
result.push(`${fileName}.mjs`);
|
|
1820
|
+
result.push(`${fileName}.ts`);
|
|
1821
|
+
result.push(`${fileName}.tsx`);
|
|
1822
|
+
result.push(`${fileName}.js`);
|
|
1823
|
+
result.push(`${fileName}.json`);
|
|
1824
|
+
}
|
|
1825
|
+
return result;
|
|
1826
|
+
};
|
|
1827
|
+
const GET_RESOLVED_EXT_FN = (filePath) => {
|
|
1828
|
+
for (const variant of GET_EXT_VARIANTS_FN(filePath)) {
|
|
1829
|
+
if (fs.existsSync(variant)) {
|
|
1830
|
+
return variant;
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
return filePath;
|
|
1834
|
+
};
|
|
1835
|
+
const ENTRY_FACTORY = (filePath, self) => {
|
|
1836
|
+
filePath = GET_RESOLVED_EXT_FN(filePath);
|
|
1837
|
+
{
|
|
1838
|
+
let result = null;
|
|
1839
|
+
if ((result = REQUIRE_ENTRY_FACTORY())) {
|
|
1840
|
+
return result;
|
|
1841
|
+
}
|
|
1842
|
+
if ((result = BABEL_ENTRY_FACTORY(filePath, self))) {
|
|
1843
|
+
return result;
|
|
1844
|
+
}
|
|
1824
1845
|
}
|
|
1825
1846
|
throw new Error(`Failed to load module at ${filePath} (basepath: ${self.params.path})`);
|
|
1826
1847
|
};
|
|
@@ -1887,6 +1908,19 @@ class ClientLoader {
|
|
|
1887
1908
|
});
|
|
1888
1909
|
return ENTRY_FACTORY(filePath, this);
|
|
1889
1910
|
}
|
|
1911
|
+
check(filePath) {
|
|
1912
|
+
this.params.logger.log("ClientLoader check", {
|
|
1913
|
+
filePath,
|
|
1914
|
+
basePath: this.params.path,
|
|
1915
|
+
});
|
|
1916
|
+
const resolved = path.resolve(this.__dirname, filePath);
|
|
1917
|
+
for (const variantPath of GET_EXT_VARIANTS_FN(resolved)) {
|
|
1918
|
+
if (fs.existsSync(variantPath)) {
|
|
1919
|
+
return true;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
return false;
|
|
1923
|
+
}
|
|
1890
1924
|
}
|
|
1891
1925
|
globalThis.BacktestKit = BacktestKit;
|
|
1892
1926
|
globalThis.BacktestKitCli = BacktestKitCli;
|
|
@@ -1905,13 +1939,22 @@ class LoaderService {
|
|
|
1905
1939
|
logger: this.loggerService,
|
|
1906
1940
|
path: basePath,
|
|
1907
1941
|
}));
|
|
1908
|
-
this.import =
|
|
1942
|
+
this.import = (filePath, basePath = process.cwd()) => {
|
|
1909
1943
|
this.loggerService.log("loaderService import", {
|
|
1910
1944
|
filePath,
|
|
1945
|
+
basePath,
|
|
1911
1946
|
});
|
|
1912
1947
|
const instance = this.getInstance(basePath);
|
|
1913
1948
|
return instance.import(filePath);
|
|
1914
1949
|
};
|
|
1950
|
+
this.check = async (filePath, basePath = process.cwd()) => {
|
|
1951
|
+
this.loggerService.log("loaderService check", {
|
|
1952
|
+
filePath,
|
|
1953
|
+
basePath,
|
|
1954
|
+
});
|
|
1955
|
+
const instance = this.getInstance(basePath);
|
|
1956
|
+
return instance.check(filePath);
|
|
1957
|
+
};
|
|
1915
1958
|
}
|
|
1916
1959
|
}
|
|
1917
1960
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/cli",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.2",
|
|
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",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@babel/plugin-transform-modules-umd": "7.27.1",
|
|
62
62
|
"@babel/standalone": "7.29.1",
|
|
63
|
-
"@backtest-kit/ui": "5.5.
|
|
64
|
-
"@backtest-kit/graph": "5.5.
|
|
65
|
-
"@backtest-kit/ollama": "5.5.
|
|
66
|
-
"@backtest-kit/pinets": "5.5.
|
|
67
|
-
"@backtest-kit/signals": "5.5.
|
|
63
|
+
"@backtest-kit/ui": "5.5.2",
|
|
64
|
+
"@backtest-kit/graph": "5.5.2",
|
|
65
|
+
"@backtest-kit/ollama": "5.5.2",
|
|
66
|
+
"@backtest-kit/pinets": "5.5.2",
|
|
67
|
+
"@backtest-kit/signals": "5.5.2",
|
|
68
68
|
"@rollup/plugin-replace": "6.0.3",
|
|
69
69
|
"@rollup/plugin-typescript": "11.1.6",
|
|
70
70
|
"@types/image-size": "0.7.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/mustache": "4.2.6",
|
|
73
73
|
"@types/node": "22.9.0",
|
|
74
74
|
"@types/stack-trace": "0.0.33",
|
|
75
|
-
"backtest-kit": "5.5.
|
|
75
|
+
"backtest-kit": "5.5.2",
|
|
76
76
|
"glob": "11.0.1",
|
|
77
77
|
"markdown-it": "14.1.1",
|
|
78
78
|
"rimraf": "6.0.1",
|
|
@@ -87,12 +87,12 @@
|
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"@babel/plugin-transform-modules-umd": "^7.27.1",
|
|
89
89
|
"@babel/standalone": "^7.29.1",
|
|
90
|
-
"@backtest-kit/ui": "^5.5.
|
|
91
|
-
"@backtest-kit/graph": "^5.5.
|
|
92
|
-
"@backtest-kit/ollama": "^5.5.
|
|
93
|
-
"@backtest-kit/pinets": "^5.5.
|
|
94
|
-
"@backtest-kit/signals": "^5.5.
|
|
95
|
-
"backtest-kit": "^5.5.
|
|
90
|
+
"@backtest-kit/ui": "^5.5.2",
|
|
91
|
+
"@backtest-kit/graph": "^5.5.2",
|
|
92
|
+
"@backtest-kit/ollama": "^5.5.2",
|
|
93
|
+
"@backtest-kit/pinets": "^5.5.2",
|
|
94
|
+
"@backtest-kit/signals": "^5.5.2",
|
|
95
|
+
"backtest-kit": "^5.5.2",
|
|
96
96
|
"markdown-it": "^14.1.1",
|
|
97
97
|
"typescript": "^5.0.0"
|
|
98
98
|
},
|
package/types.d.ts
CHANGED
|
@@ -91,7 +91,8 @@ declare class LoaderService {
|
|
|
91
91
|
private readonly babelService;
|
|
92
92
|
private readonly loggerService;
|
|
93
93
|
private getInstance;
|
|
94
|
-
import: (filePath: string, basePath?: string) =>
|
|
94
|
+
import: (filePath: string, basePath?: string) => any;
|
|
95
|
+
check: (filePath: string, basePath?: string) => Promise<boolean>;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
declare class ResolveService {
|
|
@@ -242,6 +243,7 @@ declare const cli: {
|
|
|
242
243
|
|
|
243
244
|
interface ILoader {
|
|
244
245
|
import(filePath: string): any;
|
|
246
|
+
check(filePath: string): boolean;
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
declare enum ExchangeName {
|