/** * CLI Command Types */ export type FlagType = 'string' | 'number' | 'boolean'; export type ArgumentType = 'string' | 'number'; export interface Flag { name: string; alias?: string; description: string; type: FlagType; required?: boolean; default?: string | number | boolean; choices?: string[]; } export interface Argument { name: string; description: string; type: ArgumentType; required?: boolean; variadic?: boolean; } export interface ParsedArgs { command: string; subcommand?: string; arguments: Record; flags: Record; positional: string[]; raw: string; } export type CommandHandler = (args: ParsedArgs, context: CommandContext) => Promise; export interface CommandContext { cwd: string; projectId?: number; extension?: import('../index.js').NovelWriterExtension; output: OutputFormatter; } export interface Command { name: string; description: string; aliases?: string[]; subcommands?: Command[]; flags?: Flag[]; arguments?: Argument[]; handler?: CommandHandler; examples?: string[]; requiresProject?: boolean; } export interface OutputFormatter { success(message: string): void; error(message: string): void; warning(message: string): void; info(message: string): void; dim(message: string): void; table(data: Record[], columns?: string[]): void; list(items: string[], icon?: string): void; section(title: string, content: string): void; spinner(message: string): { stop: (message?: string) => void; }; newline(): void; heading(title: string): void; keyValue(data: Record): void; code(content: string, language?: string): void; } export interface ParseError { type: 'unknown-command' | 'missing-argument' | 'invalid-flag' | 'missing-flag' | 'invalid-value'; message: string; command?: string; suggestion?: string; } //# sourceMappingURL=types.d.ts.map