mta-mcp 2.4.0 → 2.5.0
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/bin/mta.cjs +4 -2
- package/dist/index.js +100 -516
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/standards/workflows/large-project-split.md +1 -1
package/bin/mta.cjs
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
const { existsSync } = require('fs');
|
|
9
9
|
const { join } = require('path');
|
|
10
|
+
const { pathToFileURL } = require('url');
|
|
10
11
|
|
|
11
12
|
// 检测 Node.js 版本
|
|
12
13
|
const nodeVersion = process.versions.node;
|
|
@@ -30,8 +31,9 @@ if (!existsSync(esmPath)) {
|
|
|
30
31
|
process.exit(1);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
// 加载 ES Module
|
|
34
|
-
|
|
34
|
+
// 加载 ES Module - 在 Windows 上必须转换为 file:// URL
|
|
35
|
+
const esmUrl = pathToFileURL(esmPath).href;
|
|
36
|
+
import(esmUrl).catch(err => {
|
|
35
37
|
console.error('[MCP Error] 启动失败:', err.message);
|
|
36
38
|
process.exit(1);
|
|
37
39
|
});
|