19 lines
548 B
TypeScript
19 lines
548 B
TypeScript
/** Execution aliases shared by dispatch, help, and the read-only gateway. */
|
|
export const AREA_ALIASES: Readonly<Record<string, string>> = {
|
|
corp: "corps",
|
|
webhooks: "webhook",
|
|
preferences: "preference",
|
|
server: "mcp",
|
|
invoice: "invoices",
|
|
expense: "expenses"
|
|
}
|
|
|
|
export const UPDATE_ALIASES = new Set([
|
|
"update", "upgrade", "up", "self-update", "selfupdate"
|
|
])
|
|
|
|
export function normalizeCliArea(area: string): string {
|
|
const lower = area.toLowerCase()
|
|
return UPDATE_ALIASES.has(lower) ? "update" : AREA_ALIASES[lower] ?? lower
|
|
}
|