feat: move web-probe to top-level cli (#933)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-26 09:57:14 +08:00
committed by GitHub
parent 0328967e58
commit 241a2d511f
18 changed files with 249 additions and 274 deletions
+14
View File
@@ -316,6 +316,20 @@ async function main(): Promise<void> {
return;
}
if (top === "web-probe") {
const { runWebProbeCommand } = await import("./src/web-probe");
const result = await runWebProbeCommand(readConfig(), args.slice(1));
const ok = (result as { ok?: unknown }).ok !== false;
if (isRenderedCliResult(result)) {
emitText(result.renderedText, result.command || commandName);
if (!ok) process.exitCode = 1;
return;
}
emitJson(commandName, result, ok);
if (!ok) process.exitCode = 1;
return;
}
if (top === "hwlab") {
if (sub === "node" || sub === "nodes") {
const { runHwlabNodeCommand } = await import("./src/hwlab-node");