64 lines
2.0 KiB
TypeScript
64 lines
2.0 KiB
TypeScript
import { defineCommand, runMain as cittyRunMain } from "citty";
|
|
import { addCommand } from "./commands/add/index.js";
|
|
import { auditCommand } from "./commands/audit/index.js";
|
|
import { backupCommand } from "./commands/backup/index.js";
|
|
import { createCommand } from "./commands/create/index.js";
|
|
import { dsgvoCommand } from "./commands/dsgvo/index.js";
|
|
import { featureFlagsCommand } from "./commands/feature-flags/index.js";
|
|
import { formsCommand } from "./commands/forms/index.js";
|
|
import { leadsCommand } from "./commands/leads/index.js";
|
|
import { marketingCommand } from "./commands/marketing/index.js";
|
|
import { opsCommand } from "./commands/ops/index.js";
|
|
import { outboxCommand } from "./commands/outbox/index.js";
|
|
import { pluginsCommand } from "./commands/plugins/index.js";
|
|
import { searchCommand } from "./commands/search/index.js";
|
|
import { sequencesCommand } from "./commands/sequences/index.js";
|
|
import { tenantCommand } from "./commands/tenant/index.js";
|
|
|
|
export const mainCommand = defineCommand({
|
|
meta: {
|
|
name: "toolctrl-cli",
|
|
version: "0.0.0",
|
|
description: "ToolCTRL operator CLI (audit, backup, restore, verify, tenant snapshots, search reindex, feature-flags, forms, leads, marketing, create, add, ops).",
|
|
},
|
|
subCommands: {
|
|
add: addCommand,
|
|
audit: auditCommand,
|
|
backup: backupCommand,
|
|
create: createCommand,
|
|
dsgvo: dsgvoCommand,
|
|
"feature-flags": featureFlagsCommand,
|
|
forms: formsCommand,
|
|
leads: leadsCommand,
|
|
marketing: marketingCommand,
|
|
ops: opsCommand,
|
|
outbox: outboxCommand,
|
|
plugins: pluginsCommand,
|
|
search: searchCommand,
|
|
sequences: sequencesCommand,
|
|
tenant: tenantCommand,
|
|
},
|
|
});
|
|
|
|
export async function runMain(): Promise<void> {
|
|
await cittyRunMain(mainCommand);
|
|
}
|
|
|
|
export {
|
|
addCommand,
|
|
auditCommand,
|
|
backupCommand,
|
|
createCommand,
|
|
dsgvoCommand,
|
|
featureFlagsCommand,
|
|
formsCommand,
|
|
leadsCommand,
|
|
marketingCommand,
|
|
opsCommand,
|
|
outboxCommand,
|
|
pluginsCommand,
|
|
searchCommand,
|
|
sequencesCommand,
|
|
tenantCommand,
|
|
};
|