feat: move web-probe to top-level cli (#933)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user