UNPKG

appwrite-utils-cli

Version:

Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.

38 lines (37 loc) 2.19 kB
export interface MessageOptions { prefix?: string; skipLogging?: boolean; logLevel?: "info" | "warn" | "error" | "debug"; } export declare class MessageFormatter { static success(message: string, options?: MessageOptions): void; static error(message: string, error?: Error | string, options?: MessageOptions): void; static warning(message: string, options?: MessageOptions): void; static info(message: string, options?: MessageOptions): void; static step(step: number, total: number, message: string, options?: MessageOptions): void; static progress(message: string, options?: MessageOptions): void; static debug(message: string, data?: any, options?: MessageOptions): void; static banner(title: string, subtitle?: string): void; static section(title: string): void; static list(items: string[], title?: string): void; static table(data: Record<string, string | number>[], headers?: string[]): void; static operationSummary(title: string, stats: Record<string, string | number>, duration?: number): void; static formatBytes(bytes: number): string; static formatDuration(ms: number): string; static formatNumber(num: number): string; } export declare const Messages: { readonly CONFIG_NOT_FOUND: "Appwrite configuration not found. Run 'appwrite-migrate setup' first."; readonly CONFIG_LOADED: (type: string, path: string) => string; readonly DATABASE_CONNECTION_FAILED: "Failed to connect to Appwrite. Check your endpoint and API key."; readonly OPERATION_CANCELLED: "Operation cancelled by user."; readonly OPERATION_COMPLETED: (operation: string) => string; readonly BACKUP_STARTED: (database: string) => string; readonly BACKUP_COMPLETED: (database: string, size: number) => string; readonly IMPORT_STARTED: (collections: number) => string; readonly IMPORT_COMPLETED: (documents: number) => string; readonly FUNCTION_DEPLOYED: (name: string) => string; readonly FUNCTION_DEPLOYMENT_FAILED: (name: string, error: string) => string; readonly TRANSFER_STARTED: (source: string, target: string) => string; readonly TRANSFER_COMPLETED: (items: number) => string; };