Files
seal-use/src/cli/commands/corps.ts
T
2026-09-22 14:25:06 +08:00

22 lines
1007 B
TypeScript

import { handleCorpBindings } from "./corps/bindings.js";
import { handleCorpOnboarding, extractKeysFromLinkAction, showCorpKeysAction } from "./corps/onboarding.js";
import { handleCorpOverview } from "./corps/overview.js";
import { handleCorpSync, buildTestHosecloudOutboundName } from "./corps/sync.js";
import { maskCellphone } from "./corps/shared.js";
import type { ParsedArgs } from "../types.js";
export { buildTestHosecloudOutboundName, extractKeysFromLinkAction, maskCellphone, showCorpKeysAction };
export async function handleCorpsCommand(
action: string | undefined,
maybeName: string | undefined,
args: ParsedArgs
) {
if (await handleCorpOverview(action, maybeName, args)) return;
if (await handleCorpBindings(action, maybeName, args)) return;
if (await handleCorpSync(action, maybeName, args)) return;
if (await handleCorpOnboarding(action, maybeName, args)) return;
throw new Error(`Unknown corps command: ${action ?? ""}. Run 'seal-use help' for available commands.`);
}