9 lines
407 B
TypeScript
9 lines
407 B
TypeScript
import { runProbe } from "../../probe.js";
|
|
import { stringOption } from "../parser.js";
|
|
import type { ParsedArgs } from "../types.js";
|
|
|
|
export async function handleProbeCommand(action: string | undefined, maybeName: string | undefined, args: ParsedArgs) {
|
|
const corpId = maybeName ?? stringOption(args.options.corp) ?? (action && action !== "--corp" ? action : undefined);
|
|
await runProbe({ corpId });
|
|
}
|