sloth-d2c-mcp 1.0.4-beta100 → 1.0.4-beta101
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/cli/run.js
CHANGED
|
@@ -82,11 +82,11 @@ if (args[0] === 'config') {
|
|
|
82
82
|
} else if (args[0] === 'server' && args[1] === 'start') {
|
|
83
83
|
// run 命令:后台运行 sloth --stdio
|
|
84
84
|
const { spawn } = await import('node:child_process');
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
const { fileURLToPath } = await import('node:url');
|
|
86
|
+
const path = await import('node:path');
|
|
87
87
|
|
|
88
88
|
// // 获取当前脚本路径(兼容 Node.js 18)
|
|
89
|
-
|
|
89
|
+
const scriptPath = fileURLToPath(import.meta.url);
|
|
90
90
|
// // 指向scriptPath目录下的log
|
|
91
91
|
const logPath = path.resolve(path.dirname(scriptPath), 'sloth-server.log');
|
|
92
92
|
|