Add runtime detection and unified mcp and probe CLI commands

This commit is contained in:
gitea committed 2026-08-25 13:49:00 +08:00
1 parent 551fb9177f
commit b109f3f49f
8 files changed
+118 -19

No files matched your search

+4 -3
View File
@@ -199,9 +199,10 @@ async function runEmbeddedCli() {
process.exitCode = result.exitCode;
}
const isMainModule = process.argv[1]
? resolve(process.argv[1]) === resolve(serverEntryFile)
: false;
const isMainModule = Boolean(
(import.meta as any).main ||
(!import.meta.url.includes("$bunfs") && process.argv[1] && resolve(process.argv[1]) === resolve(serverEntryFile))
);
if (isMainModule) {
if (process.argv[2] === "--seal-home-cli") {