Add runtime detection and unified mcp and probe CLI commands
This commit is contained in:
1 parent
551fb9177f
commit
b109f3f49f
8 files changed
+118
-19
No files matched your search
+5
-6
@@ -1,19 +1,18 @@
|
||||
#!/usr/bin/env bun
|
||||
|
||||
import { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { runCli } from "./cli/runner.js";
|
||||
import { isCompiledBinary, resolveAppRoot, resolveDefaultLauncher } from "./core/runtime.js";
|
||||
|
||||
const entryFile = fileURLToPath(import.meta.url);
|
||||
const appRoot = dirname(dirname(entryFile));
|
||||
const isCompiled = isCompiledBinary();
|
||||
const appRoot = resolveAppRoot(entryFile, isCompiled);
|
||||
const launcher = resolveDefaultLauncher(entryFile, isCompiled);
|
||||
|
||||
const result = await runCli(Bun.argv.slice(2), {
|
||||
appRoot,
|
||||
entryFile,
|
||||
launcher: {
|
||||
command: process.execPath,
|
||||
args: [entryFile]
|
||||
}
|
||||
launcher
|
||||
});
|
||||
|
||||
if (result.stdout) process.stdout.write(result.stdout);
|
||||
|
||||
Reference in new issue
Block a user