@ppdocs/mcp 3.2.15 → 3.2.16
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/dist/index.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,9 +26,11 @@ if (args.length > 0) {
|
|
|
26
26
|
if (result === 'exit')
|
|
27
27
|
process.exit(0);
|
|
28
28
|
if (result === 'keep-alive') {
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
|
|
29
|
+
// webui 长驻模式,不继续执行 MCP Server
|
|
30
|
+
// 用 setInterval 保活,避免 Node.js 'unsettled top-level await' 警告
|
|
31
|
+
setInterval(() => { }, 1 << 30);
|
|
32
|
+
// @ts-ignore: 防止后续 main() 执行
|
|
33
|
+
await new Promise(() => { });
|
|
32
34
|
}
|
|
33
35
|
// result === false → 继续作为 MCP Server
|
|
34
36
|
}
|