@navios/commander 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":["ClassTypeWithInstance","NaviosModule","Container","CommanderApplicationOptions","CommanderApplication","Promise","ClassTypeWithInstance","NaviosModule","CommanderApplicationOptions","CommanderApplication","CommanderFactory","Promise","ClassType","ZodObject","CommandOptions","Command","path","optionsSchema","ClassDecoratorContext","ClassType","CliModuleOptions","Set","CliModule","commands","imports","ClassDecoratorContext","CommandHandler","TOptions","Promise","ClassType","ZodObject","CommandMetadataKey","CommandMetadata","Map","getCommandMetadata","ClassDecoratorContext","extractCommandMetadata","hasCommandMetadata","CommandMetadata","CommanderExecutionContext","ClassType","CliModuleMetadataKey","CliModuleMetadata","Set","Map","getCliModuleMetadata","ClassDecoratorContext","extractCliModuleMetadata","hasCliModuleMetadata","ClassTypeWithInstance","NaviosModule","Container","CommandHandler","CliModuleMetadata","CommandMetadata","CommandWithMetadata","CliModuleLoaderService","Promise","Map","ZodObject","ParsedCliArgs","Record","CliParserService","Array","InjectionToken","CommanderExecutionContext","CommandExecutionContext"],"sources":["../src/commander.application.d.mts","../src/commander.factory.d.mts","../src/decorators/command.decorator.d.mts","../src/decorators/cli-module.decorator.d.mts","../src/interfaces/command-handler.interface.d.mts","../src/metadata/command.metadata.d.mts","../src/interfaces/commander-execution-context.interface.d.mts","../src/metadata/cli-module.metadata.d.mts","../src/services/module-loader.service.d.mts","../src/services/cli-parser.service.d.mts","../src/tokens/execution-context.token.d.mts"],"sourcesContent":["import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\n/**\n * Configuration options for CommanderApplication.\n *\n * @public\n */\nexport interface CommanderApplicationOptions {\n}\n/**\n * Main application class for managing CLI command execution.\n *\n * This class handles module loading, command registration, and command execution.\n * It provides both programmatic and CLI-based command execution capabilities.\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * ```\n */\nexport declare class CommanderApplication {\n private moduleLoader;\n private cliParser;\n protected container: Container;\n private appModule;\n private options;\n /**\n * Indicates whether the application has been initialized.\n * Set to `true` after `init()` is called successfully.\n */\n isInitialized: boolean;\n /**\n * @internal\n * Sets up the application with the provided module and options.\n * This is called automatically by CommanderFactory.create().\n */\n setup(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<void>;\n /**\n * Gets the dependency injection container used by this application.\n *\n * @returns The Container instance\n *\n * @example\n * ```typescript\n * const container = app.getContainer()\n * const service = await container.get(MyService)\n * ```\n */\n getContainer(): Container;\n /**\n * Initializes the application by loading all modules and registering commands.\n *\n * This method must be called before executing commands or running the CLI.\n * It traverses the module tree, loads all imported modules, and collects command metadata.\n *\n * @throws {Error} If the app module is not set (setup() was not called)\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init() // Must be called before run() or executeCommand()\n * ```\n */\n init(): Promise<void>;\n /**\n * Executes a command programmatically with the provided options.\n *\n * This method is useful for testing, automation, or programmatic workflows.\n * The options will be validated against the command's Zod schema if one is provided.\n *\n * @param commandPath - The command path (e.g., 'greet', 'user:create')\n * @param options - The command options object (will be validated if schema exists)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If the command is not found\n * @throws {Error} If the command does not implement the execute method\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * await app.executeCommand('greet', {\n * name: 'World',\n * greeting: 'Hi'\n * })\n * ```\n */\n executeCommand(commandPath: string, options?: any): Promise<void>;\n /**\n * Gets all registered commands with their paths and class references.\n *\n * @returns An array of objects containing the command path and class\n *\n * @example\n * ```typescript\n * const commands = app.getAllCommands()\n * commands.forEach(({ path }) => {\n * console.log(`Available: ${path}`)\n * })\n * ```\n */\n getAllCommands(): {\n path: string;\n class: ClassTypeWithInstance<any>;\n }[];\n /**\n * Runs the CLI application by parsing command-line arguments and executing the appropriate command.\n *\n * This is the main entry point for CLI usage. It parses `argv`, validates options,\n * and executes the matching command. Supports help command (`help`, `--help`, `-h`)\n * which displays all available commands.\n *\n * @param argv - Command-line arguments array (defaults to `process.argv`)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If no command is provided\n * @throws {Error} If the command is not found\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * // Parse and execute from process.argv\n * await app.run()\n *\n * // Or provide custom arguments\n * await app.run(['node', 'cli.js', 'greet', '--name', 'World'])\n * ```\n */\n run(argv?: string[]): Promise<void>;\n /**\n * @internal\n * Disposes of resources used by the application.\n */\n dispose(): Promise<void>;\n /**\n * Closes the application and cleans up resources.\n *\n * This should be called when the application is no longer needed to free up resources.\n *\n * @example\n * ```typescript\n * await app.run(process.argv)\n * await app.close()\n * ```\n */\n close(): Promise<void>;\n}\n//# sourceMappingURL=commander.application.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport type { CommanderApplicationOptions } from './commander.application.mjs';\nimport { CommanderApplication } from './commander.application.mjs';\n/**\n * Factory class for creating and configuring CLI applications.\n *\n * @example\n * ```typescript\n * import { CommanderFactory } from '@navios/commander'\n * import { AppModule } from './app.module'\n *\n * async function bootstrap() {\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * await app.close()\n * }\n * ```\n */\nexport declare class CommanderFactory {\n /**\n * Creates a new CommanderApplication instance and configures it with the provided module.\n *\n * @param appModule - The root CLI module class that contains commands and/or imports other modules\n * @param options - Optional configuration options for the application\n * @returns A promise that resolves to a configured CommanderApplication instance\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * ```\n */\n static create(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<CommanderApplication>;\n}\n//# sourceMappingURL=commander.factory.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * Options for the `@Command` decorator.\n *\n * @public\n */\nexport interface CommandOptions {\n /**\n * The command path that users will invoke from the CLI.\n * Can be a single word (e.g., 'greet') or multi-word with colons (e.g., 'user:create', 'db:migrate').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n * If provided, options will be validated and parsed according to this schema.\n */\n optionsSchema?: ZodObject;\n}\n/**\n * Decorator that marks a class as a CLI command.\n *\n * The decorated class must implement the `CommandHandler` interface with an `execute` method.\n * The command will be automatically registered when its module is loaded.\n *\n * @param options - Configuration options for the command\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string(),\n * greeting: z.string().optional().default('Hello')\n * })\n *\n * @Command({\n * path: 'greet',\n * optionsSchema: optionsSchema\n * })\n * export class GreetCommand implements CommandHandler<z.infer<typeof optionsSchema>> {\n * async execute(options) {\n * console.log(`${options.greeting}, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport declare function Command({ path, optionsSchema }: CommandOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=command.decorator.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * Options for the `@CliModule` decorator.\n *\n * @public\n */\nexport interface CliModuleOptions {\n /**\n * Array or Set of command classes to register in this module.\n * Commands must be decorated with `@Command`.\n */\n commands?: ClassType[] | Set<ClassType>;\n /**\n * Array or Set of other CLI modules to import.\n * Imported modules' commands will be available in this module.\n */\n imports?: ClassType[] | Set<ClassType>;\n}\n/**\n * Decorator that marks a class as a CLI module.\n *\n * Modules organize commands and can import other modules to compose larger CLI applications.\n * The module can optionally implement `NaviosModule` interface for lifecycle hooks.\n *\n * @param options - Configuration options for the module\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { CliModule } from '@navios/commander'\n * import { GreetCommand } from './greet.command'\n * import { UserModule } from './user.module'\n *\n * @CliModule({\n * commands: [GreetCommand],\n * imports: [UserModule]\n * })\n * export class AppModule {}\n * ```\n */\nexport declare function CliModule({ commands, imports }?: CliModuleOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=cli-module.decorator.d.mts.map","/**\n * Interface that all command classes must implement.\n *\n * Commands decorated with `@Command` must implement this interface.\n * The `execute` method is called when the command is invoked.\n *\n * @template TOptions - The type of options that the command accepts\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string()\n * })\n *\n * type Options = z.infer<typeof optionsSchema>\n *\n * @Command({ path: 'greet', optionsSchema })\n * export class GreetCommand implements CommandHandler<Options> {\n * async execute(options: Options) {\n * console.log(`Hello, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport interface CommandHandler<TOptions = any> {\n /**\n * Executes the command with the provided options.\n *\n * @param options - The validated command options (validated against the command's schema if provided)\n * @returns A promise or void\n */\n execute(options: TOptions): void | Promise<void>;\n}\n//# sourceMappingURL=command-handler.interface.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * @internal\n * Symbol key used to store command metadata on classes.\n */\nexport declare const CommandMetadataKey: unique symbol;\n/**\n * Metadata associated with a command.\n *\n * @public\n */\nexport interface CommandMetadata {\n /**\n * The command path (e.g., 'greet', 'user:create').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n */\n optionsSchema?: ZodObject;\n /**\n * Map of custom attributes that can be attached to the command.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates command metadata for a class.\n *\n * @internal\n * @param target - The command class\n * @param context - The decorator context\n * @param path - The command path\n * @param optionsSchema - Optional Zod schema\n * @returns The command metadata\n */\nexport declare function getCommandMetadata(target: ClassType, context: ClassDecoratorContext, path: string, optionsSchema?: ZodObject): CommandMetadata;\n/**\n * Extracts command metadata from a class.\n *\n * @param target - The command class\n * @returns The command metadata\n * @throws {Error} If the class is not decorated with @Command\n *\n * @example\n * ```typescript\n * const metadata = extractCommandMetadata(GreetCommand)\n * console.log(metadata.path) // 'greet'\n * ```\n */\nexport declare function extractCommandMetadata(target: ClassType): CommandMetadata;\n/**\n * Checks if a class has command metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @Command, `false` otherwise\n */\nexport declare function hasCommandMetadata(target: ClassType): boolean;\n//# sourceMappingURL=command.metadata.d.mts.map","import type { CommandMetadata } from '../metadata/command.metadata.mjs';\n/**\n * Execution context for a command execution.\n *\n * Provides access to command metadata, path, and validated options during command execution.\n * This context is automatically injected and available via the `CommandExecutionContext` token.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class CommandLogger {\n * private ctx = inject(CommandExecutionContext)\n *\n * log() {\n * console.log('Command:', this.ctx.getCommandPath())\n * console.log('Options:', this.ctx.getOptions())\n * }\n * }\n * ```\n */\nexport declare class CommanderExecutionContext {\n private readonly command;\n private readonly commandPath;\n private readonly options;\n /**\n * @internal\n * Creates a new execution context.\n */\n constructor(command: CommandMetadata, commandPath: string, options: any);\n /**\n * Gets the command metadata.\n *\n * @returns The command metadata including path and options schema\n */\n getCommand(): CommandMetadata;\n /**\n * Gets the command path that was invoked.\n *\n * @returns The command path (e.g., 'greet', 'user:create')\n */\n getCommandPath(): string;\n /**\n * Gets the validated command options.\n *\n * Options are validated against the command's Zod schema if one was provided.\n *\n * @returns The validated options object\n */\n getOptions(): any;\n}\n//# sourceMappingURL=commander-execution-context.interface.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * @internal\n * Symbol key used to store CLI module metadata on classes.\n */\nexport declare const CliModuleMetadataKey: unique symbol;\n/**\n * Metadata associated with a CLI module.\n *\n * @public\n */\nexport interface CliModuleMetadata {\n /**\n * Set of command classes registered in this module.\n */\n commands: Set<ClassType>;\n /**\n * Set of other modules imported by this module.\n */\n imports: Set<ClassType>;\n /**\n * Map of custom attributes that can be attached to the module.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates CLI module metadata for a class.\n *\n * @internal\n * @param target - The module class\n * @param context - The decorator context\n * @returns The module metadata\n */\nexport declare function getCliModuleMetadata(target: ClassType, context: ClassDecoratorContext): CliModuleMetadata;\n/**\n * Extracts CLI module metadata from a class.\n *\n * @param target - The module class\n * @returns The module metadata\n * @throws {Error} If the class is not decorated with @CliModule\n *\n * @example\n * ```typescript\n * const metadata = extractCliModuleMetadata(AppModule)\n * console.log(metadata.commands.size) // Number of commands\n * ```\n */\nexport declare function extractCliModuleMetadata(target: ClassType): CliModuleMetadata;\n/**\n * Checks if a class has CLI module metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @CliModule, `false` otherwise\n */\nexport declare function hasCliModuleMetadata(target: ClassType): boolean;\n//# sourceMappingURL=cli-module.metadata.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\nimport type { CommandHandler } from '../interfaces/index.mjs';\nimport type { CliModuleMetadata, CommandMetadata } from '../metadata/index.mjs';\n/**\n * Command class with its associated metadata.\n *\n * @public\n */\nexport interface CommandWithMetadata {\n /**\n * The command class constructor.\n */\n class: ClassTypeWithInstance<CommandHandler>;\n /**\n * The command metadata including path and options schema.\n */\n metadata: CommandMetadata;\n}\n/**\n * Service for loading and managing CLI modules and commands.\n *\n * Handles module traversal, command registration, and metadata collection.\n * This service is used internally by CommanderApplication.\n *\n * @public\n */\nexport declare class CliModuleLoaderService {\n protected container: Container;\n private modulesMetadata;\n private loadedModules;\n private commandsMetadata;\n private initialized;\n /**\n * Loads all modules starting from the root app module.\n *\n * Traverses the module tree, loads imported modules, and collects command metadata.\n *\n * @param appModule - The root CLI module\n */\n loadModules(appModule: ClassTypeWithInstance<NaviosModule>): Promise<void>;\n private traverseModules;\n private mergeMetadata;\n /**\n * Gets all loaded module metadata.\n *\n * @returns Map of module names to their metadata\n */\n getAllModules(): Map<string, CliModuleMetadata>;\n /**\n * Gets all command classes indexed by command class name.\n *\n * @returns Map of command class names to command classes\n */\n getAllCommands(): Map<string, ClassTypeWithInstance<any>>;\n /**\n * Get all commands with their metadata, indexed by command path.\n * This is populated during loadModules, so path information is available\n * before parsing CLI argv.\n */\n getAllCommandsWithMetadata(): Map<string, CommandWithMetadata>;\n /**\n * Get a command by its path, with metadata already extracted.\n * Returns undefined if command is not found.\n */\n getCommandByPath(path: string): CommandWithMetadata | undefined;\n /**\n * Disposes of all loaded modules and commands, clearing internal state.\n */\n dispose(): void;\n}\n//# sourceMappingURL=module-loader.service.d.mts.map","import type { ZodObject } from 'zod';\n/**\n * Result of parsing command-line arguments.\n *\n * @public\n */\nexport interface ParsedCliArgs {\n /**\n * The command path (e.g., 'greet', 'user:create').\n * Multi-word commands are joined with spaces.\n */\n command: string;\n /**\n * Parsed options as key-value pairs.\n * Keys are converted from kebab-case to camelCase.\n */\n options: Record<string, any>;\n /**\n * Positional arguments that don't match any option flags.\n */\n positionals: string[];\n}\n/**\n * Service for parsing command-line arguments.\n *\n * Handles parsing of various CLI argument formats including:\n * - Long options: `--key value` or `--key=value`\n * - Short options: `-k value` or `-abc` (multiple flags)\n * - Boolean flags\n * - Array options\n * - Positional arguments\n *\n * @public\n */\nexport declare class CliParserService {\n /**\n * Parses command-line arguments from process.argv\n * Commands can be multi-word (e.g., 'db migrate', 'cache clear')\n * Expected format: node script.js command [subcommand...] --flag value --boolean-flag positional1 positional2\n *\n * @param argv - Array of command-line arguments (typically process.argv)\n * @param optionsSchema - Optional Zod schema to determine boolean flags and option types\n * @returns Parsed command (space-separated if multi-word), options, and positional arguments\n */\n parse(argv: string[], optionsSchema?: ZodObject): ParsedCliArgs;\n /**\n * Converts kebab-case to camelCase\n */\n private camelCase;\n /**\n * Attempts to parse string values into appropriate types\n */\n private parseValue;\n /**\n * Extracts boolean field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractBooleanFields;\n /**\n * Extracts array field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractArrayFields;\n /**\n * Checks if a Zod schema represents a boolean type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaBoolean;\n /**\n * Checks if a Zod schema represents an array type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaArray;\n /**\n * Formats help text listing all available commands.\n *\n * @param commands - Array of command objects with path and class\n * @returns Formatted string listing all commands\n */\n formatCommandList(commands: Array<{\n path: string;\n class: any;\n }>): string;\n}\n//# sourceMappingURL=cli-parser.service.d.mts.map","import { InjectionToken } from '@navios/core';\nimport type { CommanderExecutionContext } from '../interfaces/index.mjs';\n/**\n * Injection token for accessing the current command execution context.\n *\n * Use this token with `inject()` to access the `CommanderExecutionContext` in services\n * that need information about the currently executing command.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class MyService {\n * private ctx = inject(CommandExecutionContext)\n *\n * doSomething() {\n * const commandPath = this.ctx.getCommandPath()\n * const options = this.ctx.getOptions()\n * // Use context information...\n * }\n * }\n * ```\n */\nexport declare const CommandExecutionContext: InjectionToken<CommanderExecutionContext, undefined, false>;\n//# sourceMappingURL=execution-context.token.d.mts.map"],"mappings":";;;;;;;;;;AAOA;AAeqBI,UAfJD,2BAAAA,CAewB;;;;;;;;;;;;;;cAApBC,oBAAAA;;ECHAM,QAAAA,SAAAA;EAc8BH,UAAAA,SAAAA,EDR1BL,SCQ0BK;EAAtBD,QAAAA,SAAAA;EAA+CE,QAAAA,OAAAA;EAAsCC;;;;;;AC1BlH;AA0CA;;;EAAyDK,KAAAA,CAAAA,SAAAA,EFXpCd,qBEWoCc,CFXdb,YEWca,CAAAA,EAAAA,OAAAA,CAAAA,EFXWX,2BEWXW,CAAAA,EFXyCT,OEWzCS,CAAAA,IAAAA,CAAAA;EAA0BF;;;;;;;AC3CnF;;;;EAUcO,YAAAA,CAAAA,CAAAA,EHkCMjB,SGlCNiB;EAAkBA;;;AAwBhC;;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HA;AAcmDhC,cSR9B2D,uBTQ8B3D,ESRLyD,cTQKzD,CSRU0D,yBTQV1D,EAAAA,SAAAA,EAAAA,KAAAA,CAAAA"}
1
+ {"version":3,"file":"index.d.cts","names":["ClassTypeWithInstance","NaviosModule","Container","CommanderApplicationOptions","CommanderApplication","Promise","ClassTypeWithInstance","NaviosModule","CommanderApplicationOptions","CommanderApplication","CommanderFactory","Promise","ClassType","ZodObject","CommandOptions","Command","path","optionsSchema","ClassDecoratorContext","ClassType","CliModuleOptions","Set","CliModule","commands","imports","ClassDecoratorContext","CommandHandler","TOptions","Promise","ClassType","ZodObject","CommandMetadataKey","CommandMetadata","Map","getCommandMetadata","ClassDecoratorContext","extractCommandMetadata","hasCommandMetadata","CommandMetadata","CommanderExecutionContext","ClassType","CliModuleMetadataKey","CliModuleMetadata","Set","Map","getCliModuleMetadata","ClassDecoratorContext","extractCliModuleMetadata","hasCliModuleMetadata","ClassTypeWithInstance","NaviosModule","Container","CommandHandler","CliModuleMetadata","CommandMetadata","CommandWithMetadata","CliModuleLoaderService","Promise","Map","ZodObject","ParsedCliArgs","Record","CliParserService","Array","InjectionToken","CommanderExecutionContext","CommandExecutionContext"],"sources":["../src/commander.application.d.mts","../src/commander.factory.d.mts","../src/decorators/command.decorator.d.mts","../src/decorators/cli-module.decorator.d.mts","../src/interfaces/command-handler.interface.d.mts","../src/metadata/command.metadata.d.mts","../src/interfaces/commander-execution-context.interface.d.mts","../src/metadata/cli-module.metadata.d.mts","../src/services/module-loader.service.d.mts","../src/services/cli-parser.service.d.mts","../src/tokens/execution-context.token.d.mts"],"sourcesContent":["import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\n/**\n * Configuration options for CommanderApplication.\n *\n * @public\n */\nexport interface CommanderApplicationOptions {\n}\n/**\n * Main application class for managing CLI command execution.\n *\n * This class handles module loading, command registration, and command execution.\n * It provides both programmatic and CLI-based command execution capabilities.\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * ```\n */\nexport declare class CommanderApplication {\n private moduleLoader;\n private cliParser;\n protected container: Container;\n private appModule;\n private options;\n /**\n * Indicates whether the application has been initialized.\n * Set to `true` after `init()` is called successfully.\n */\n isInitialized: boolean;\n /**\n * @internal\n * Sets up the application with the provided module and options.\n * This is called automatically by CommanderFactory.create().\n */\n setup(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<void>;\n /**\n * Gets the dependency injection container used by this application.\n *\n * @returns The Container instance\n *\n * @example\n * ```typescript\n * const container = app.getContainer()\n * const service = await container.get(MyService)\n * ```\n */\n getContainer(): Container;\n /**\n * Initializes the application by loading all modules and registering commands.\n *\n * This method must be called before executing commands or running the CLI.\n * It traverses the module tree, loads all imported modules, and collects command metadata.\n *\n * @throws {Error} If the app module is not set (setup() was not called)\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init() // Must be called before run() or executeCommand()\n * ```\n */\n init(): Promise<void>;\n /**\n * Executes a command programmatically with the provided options.\n *\n * This method is useful for testing, automation, or programmatic workflows.\n * The options will be validated against the command's Zod schema if one is provided.\n *\n * @param commandPath - The command path (e.g., 'greet', 'user:create')\n * @param options - The command options object (will be validated if schema exists)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If the command is not found\n * @throws {Error} If the command does not implement the execute method\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * await app.executeCommand('greet', {\n * name: 'World',\n * greeting: 'Hi'\n * })\n * ```\n */\n executeCommand(commandPath: string, options?: any): Promise<void>;\n /**\n * Gets all registered commands with their paths and class references.\n *\n * @returns An array of objects containing the command path and class\n *\n * @example\n * ```typescript\n * const commands = app.getAllCommands()\n * commands.forEach(({ path }) => {\n * console.log(`Available: ${path}`)\n * })\n * ```\n */\n getAllCommands(): {\n path: string;\n class: ClassTypeWithInstance<any>;\n }[];\n /**\n * Runs the CLI application by parsing command-line arguments and executing the appropriate command.\n *\n * This is the main entry point for CLI usage. It parses `argv`, validates options,\n * and executes the matching command. Supports help command (`help`, `--help`, `-h`)\n * which displays all available commands.\n *\n * @param argv - Command-line arguments array (defaults to `process.argv`)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If no command is provided\n * @throws {Error} If the command is not found\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * // Parse and execute from process.argv\n * await app.run()\n *\n * // Or provide custom arguments\n * await app.run(['node', 'cli.js', 'greet', '--name', 'World'])\n * ```\n */\n run(argv?: string[]): Promise<void>;\n /**\n * @internal\n * Disposes of resources used by the application.\n */\n dispose(): Promise<void>;\n /**\n * Closes the application and cleans up resources.\n *\n * This should be called when the application is no longer needed to free up resources.\n *\n * @example\n * ```typescript\n * await app.run(process.argv)\n * await app.close()\n * ```\n */\n close(): Promise<void>;\n}\n//# sourceMappingURL=commander.application.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport type { CommanderApplicationOptions } from './commander.application.mjs';\nimport { CommanderApplication } from './commander.application.mjs';\n/**\n * Factory class for creating and configuring CLI applications.\n *\n * @example\n * ```typescript\n * import { CommanderFactory } from '@navios/commander'\n * import { AppModule } from './app.module'\n *\n * async function bootstrap() {\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * await app.close()\n * }\n * ```\n */\nexport declare class CommanderFactory {\n /**\n * Creates a new CommanderApplication instance and configures it with the provided module.\n *\n * @param appModule - The root CLI module class that contains commands and/or imports other modules\n * @param options - Optional configuration options for the application\n * @returns A promise that resolves to a configured CommanderApplication instance\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * ```\n */\n static create(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<CommanderApplication>;\n}\n//# sourceMappingURL=commander.factory.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * Options for the `@Command` decorator.\n *\n * @public\n */\nexport interface CommandOptions {\n /**\n * The command path that users will invoke from the CLI.\n * Can be a single word (e.g., 'greet') or multi-word with colons (e.g., 'user:create', 'db:migrate').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n * If provided, options will be validated and parsed according to this schema.\n */\n optionsSchema?: ZodObject;\n}\n/**\n * Decorator that marks a class as a CLI command.\n *\n * The decorated class must implement the `CommandHandler` interface with an `execute` method.\n * The command will be automatically registered when its module is loaded.\n *\n * @param options - Configuration options for the command\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string(),\n * greeting: z.string().optional().default('Hello')\n * })\n *\n * @Command({\n * path: 'greet',\n * optionsSchema: optionsSchema\n * })\n * export class GreetCommand implements CommandHandler<z.infer<typeof optionsSchema>> {\n * async execute(options) {\n * console.log(`${options.greeting}, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport declare function Command({ path, optionsSchema }: CommandOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=command.decorator.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * Options for the `@CliModule` decorator.\n *\n * @public\n */\nexport interface CliModuleOptions {\n /**\n * Array or Set of command classes to register in this module.\n * Commands must be decorated with `@Command`.\n */\n commands?: ClassType[] | Set<ClassType>;\n /**\n * Array or Set of other CLI modules to import.\n * Imported modules' commands will be available in this module.\n */\n imports?: ClassType[] | Set<ClassType>;\n}\n/**\n * Decorator that marks a class as a CLI module.\n *\n * Modules organize commands and can import other modules to compose larger CLI applications.\n * The module can optionally implement `NaviosModule` interface for lifecycle hooks.\n *\n * @param options - Configuration options for the module\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { CliModule } from '@navios/commander'\n * import { GreetCommand } from './greet.command'\n * import { UserModule } from './user.module'\n *\n * @CliModule({\n * commands: [GreetCommand],\n * imports: [UserModule]\n * })\n * export class AppModule {}\n * ```\n */\nexport declare function CliModule({ commands, imports }?: CliModuleOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=cli-module.decorator.d.mts.map","/**\n * Interface that all command classes must implement.\n *\n * Commands decorated with `@Command` must implement this interface.\n * The `execute` method is called when the command is invoked.\n *\n * @template TOptions - The type of options that the command accepts\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string()\n * })\n *\n * type Options = z.infer<typeof optionsSchema>\n *\n * @Command({ path: 'greet', optionsSchema })\n * export class GreetCommand implements CommandHandler<Options> {\n * async execute(options: Options) {\n * console.log(`Hello, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport interface CommandHandler<TOptions = any> {\n /**\n * Executes the command with the provided options.\n *\n * @param options - The validated command options (validated against the command's schema if provided)\n * @returns A promise or void\n */\n execute(options: TOptions): void | Promise<void>;\n}\n//# sourceMappingURL=command-handler.interface.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * @internal\n * Symbol key used to store command metadata on classes.\n */\nexport declare const CommandMetadataKey: unique symbol;\n/**\n * Metadata associated with a command.\n *\n * @public\n */\nexport interface CommandMetadata {\n /**\n * The command path (e.g., 'greet', 'user:create').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n */\n optionsSchema?: ZodObject;\n /**\n * Map of custom attributes that can be attached to the command.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates command metadata for a class.\n *\n * @internal\n * @param target - The command class\n * @param context - The decorator context\n * @param path - The command path\n * @param optionsSchema - Optional Zod schema\n * @returns The command metadata\n */\nexport declare function getCommandMetadata(target: ClassType, context: ClassDecoratorContext, path: string, optionsSchema?: ZodObject): CommandMetadata;\n/**\n * Extracts command metadata from a class.\n *\n * @param target - The command class\n * @returns The command metadata\n * @throws {Error} If the class is not decorated with @Command\n *\n * @example\n * ```typescript\n * const metadata = extractCommandMetadata(GreetCommand)\n * console.log(metadata.path) // 'greet'\n * ```\n */\nexport declare function extractCommandMetadata(target: ClassType): CommandMetadata;\n/**\n * Checks if a class has command metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @Command, `false` otherwise\n */\nexport declare function hasCommandMetadata(target: ClassType): boolean;\n//# sourceMappingURL=command.metadata.d.mts.map","import type { CommandMetadata } from '../metadata/command.metadata.mjs';\n/**\n * Execution context for a command execution.\n *\n * Provides access to command metadata, path, and validated options during command execution.\n * This context is automatically injected and available via the `CommandExecutionContext` token.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class CommandLogger {\n * private ctx = inject(CommandExecutionContext)\n *\n * log() {\n * console.log('Command:', this.ctx.getCommandPath())\n * console.log('Options:', this.ctx.getOptions())\n * }\n * }\n * ```\n */\nexport declare class CommanderExecutionContext {\n private readonly command;\n private readonly commandPath;\n private readonly options;\n /**\n * @internal\n * Creates a new execution context.\n */\n constructor(command: CommandMetadata, commandPath: string, options: any);\n /**\n * Gets the command metadata.\n *\n * @returns The command metadata including path and options schema\n */\n getCommand(): CommandMetadata;\n /**\n * Gets the command path that was invoked.\n *\n * @returns The command path (e.g., 'greet', 'user:create')\n */\n getCommandPath(): string;\n /**\n * Gets the validated command options.\n *\n * Options are validated against the command's Zod schema if one was provided.\n *\n * @returns The validated options object\n */\n getOptions(): any;\n}\n//# sourceMappingURL=commander-execution-context.interface.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * @internal\n * Symbol key used to store CLI module metadata on classes.\n */\nexport declare const CliModuleMetadataKey: unique symbol;\n/**\n * Metadata associated with a CLI module.\n *\n * @public\n */\nexport interface CliModuleMetadata {\n /**\n * Set of command classes registered in this module.\n */\n commands: Set<ClassType>;\n /**\n * Set of other modules imported by this module.\n */\n imports: Set<ClassType>;\n /**\n * Map of custom attributes that can be attached to the module.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates CLI module metadata for a class.\n *\n * @internal\n * @param target - The module class\n * @param context - The decorator context\n * @returns The module metadata\n */\nexport declare function getCliModuleMetadata(target: ClassType, context: ClassDecoratorContext): CliModuleMetadata;\n/**\n * Extracts CLI module metadata from a class.\n *\n * @param target - The module class\n * @returns The module metadata\n * @throws {Error} If the class is not decorated with @CliModule\n *\n * @example\n * ```typescript\n * const metadata = extractCliModuleMetadata(AppModule)\n * console.log(metadata.commands.size) // Number of commands\n * ```\n */\nexport declare function extractCliModuleMetadata(target: ClassType): CliModuleMetadata;\n/**\n * Checks if a class has CLI module metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @CliModule, `false` otherwise\n */\nexport declare function hasCliModuleMetadata(target: ClassType): boolean;\n//# sourceMappingURL=cli-module.metadata.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\nimport type { CommandHandler } from '../interfaces/index.mjs';\nimport type { CliModuleMetadata, CommandMetadata } from '../metadata/index.mjs';\n/**\n * Command class with its associated metadata.\n *\n * @public\n */\nexport interface CommandWithMetadata {\n /**\n * The command class constructor.\n */\n class: ClassTypeWithInstance<CommandHandler>;\n /**\n * The command metadata including path and options schema.\n */\n metadata: CommandMetadata;\n}\n/**\n * Service for loading and managing CLI modules and commands.\n *\n * Handles module traversal, command registration, and metadata collection.\n * This service is used internally by CommanderApplication.\n *\n * @public\n */\nexport declare class CliModuleLoaderService {\n protected container: Container;\n private modulesMetadata;\n private loadedModules;\n private commandsMetadata;\n private initialized;\n /**\n * Loads all modules starting from the root app module.\n *\n * Traverses the module tree, loads imported modules, and collects command metadata.\n *\n * @param appModule - The root CLI module\n */\n loadModules(appModule: ClassTypeWithInstance<NaviosModule>): Promise<void>;\n private traverseModules;\n private mergeMetadata;\n /**\n * Gets all loaded module metadata.\n *\n * @returns Map of module names to their metadata\n */\n getAllModules(): Map<string, CliModuleMetadata>;\n /**\n * Gets all command classes indexed by command class name.\n *\n * @returns Map of command class names to command classes\n */\n getAllCommands(): Map<string, ClassTypeWithInstance<any>>;\n /**\n * Get all commands with their metadata, indexed by command path.\n * This is populated during loadModules, so path information is available\n * before parsing CLI argv.\n */\n getAllCommandsWithMetadata(): Map<string, CommandWithMetadata>;\n /**\n * Get a command by its path, with metadata already extracted.\n * Returns undefined if command is not found.\n */\n getCommandByPath(path: string): CommandWithMetadata | undefined;\n /**\n * Disposes of all loaded modules and commands, clearing internal state.\n */\n dispose(): void;\n}\n//# sourceMappingURL=module-loader.service.d.mts.map","import type { ZodObject } from 'zod';\n/**\n * Result of parsing command-line arguments.\n *\n * @public\n */\nexport interface ParsedCliArgs {\n /**\n * The command path (e.g., 'greet', 'user:create').\n * Multi-word commands are joined with spaces.\n */\n command: string;\n /**\n * Parsed options as key-value pairs.\n * Keys are converted from kebab-case to camelCase.\n */\n options: Record<string, any>;\n /**\n * Positional arguments that don't match any option flags.\n */\n positionals: string[];\n}\n/**\n * Service for parsing command-line arguments.\n *\n * Handles parsing of various CLI argument formats including:\n * - Long options: `--key value` or `--key=value`\n * - Short options: `-k value` or `-abc` (multiple flags)\n * - Boolean flags\n * - Array options\n * - Positional arguments\n *\n * @public\n */\nexport declare class CliParserService {\n /**\n * Parses command-line arguments from process.argv\n * Commands can be multi-word (e.g., 'db migrate', 'cache clear')\n * Expected format: node script.js command [subcommand...] --flag value --boolean-flag positional1 positional2\n *\n * @param argv - Array of command-line arguments (typically process.argv)\n * @param optionsSchema - Optional Zod schema to determine boolean flags and option types\n * @returns Parsed command (space-separated if multi-word), options, and positional arguments\n */\n parse(argv: string[], optionsSchema?: ZodObject): ParsedCliArgs;\n /**\n * Converts kebab-case to camelCase\n */\n private camelCase;\n /**\n * Attempts to parse string values into appropriate types\n */\n private parseValue;\n /**\n * Extracts boolean field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractBooleanFields;\n /**\n * Extracts array field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractArrayFields;\n /**\n * Checks if a Zod schema represents a boolean type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaBoolean;\n /**\n * Checks if a Zod schema represents an array type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaArray;\n /**\n * Formats help text listing all available commands.\n *\n * @param commands - Array of command objects with path and class\n * @returns Formatted string listing all commands\n */\n formatCommandList(commands: Array<{\n path: string;\n class: any;\n }>): string;\n}\n//# sourceMappingURL=cli-parser.service.d.mts.map","import { InjectionToken } from '@navios/core';\nimport type { CommanderExecutionContext } from '../interfaces/index.mjs';\n/**\n * Injection token for accessing the current command execution context.\n *\n * Use this token with `inject()` to access the `CommanderExecutionContext` in services\n * that need information about the currently executing command.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class MyService {\n * private ctx = inject(CommandExecutionContext)\n *\n * doSomething() {\n * const commandPath = this.ctx.getCommandPath()\n * const options = this.ctx.getOptions()\n * // Use context information...\n * }\n * }\n * ```\n */\nexport declare const CommandExecutionContext: InjectionToken<CommanderExecutionContext, undefined, false>;\n//# sourceMappingURL=execution-context.token.d.mts.map"],"mappings":";;;;;;;;;;AAOA;AAeqBI,UAfJD,2BAAAA,CAewB;;;;;;;;;;;;;;cAApBC,oBAAAA;;ECHAM,QAAAA,SAAAA;EAc8BH,UAAAA,SAAAA,EDR1BL,SCQ0BK;EAAtBD,QAAAA,SAAAA;EAA+CE,QAAAA,OAAAA;EAAsCC;;;;;;AC1BlH;AA0CA;;;EAAyDK,KAAAA,CAAAA,SAAAA,EFXpCd,qBEWoCc,CFXdb,YEWca,CAAAA,EAAAA,OAAAA,CAAAA,EFXWX,2BEWXW,CAAAA,EFXyCT,OEWzCS,CAAAA,IAAAA,CAAAA;EAA0BF;;;;;;;AC3CnF;;;;EAUcO,YAAAA,CAAAA,CAAAA,EHkCMjB,SGlCNiB;EAAkBA;;;AAwBhC;;;;;;;;;;;EC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SR9B2D,uBTQ8B3D,ESRLyD,cTQKzD,CSRU0D,yBTQV1D,EAAAA,SAAAA,EAAAA,KAAAA,CAAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":["ClassTypeWithInstance","NaviosModule","Container","CommanderApplicationOptions","CommanderApplication","Promise","ClassTypeWithInstance","NaviosModule","CommanderApplicationOptions","CommanderApplication","CommanderFactory","Promise","ClassType","ZodObject","CommandOptions","Command","path","optionsSchema","ClassDecoratorContext","ClassType","CliModuleOptions","Set","CliModule","commands","imports","ClassDecoratorContext","CommandHandler","TOptions","Promise","ClassType","ZodObject","CommandMetadataKey","CommandMetadata","Map","getCommandMetadata","ClassDecoratorContext","extractCommandMetadata","hasCommandMetadata","CommandMetadata","CommanderExecutionContext","ClassType","CliModuleMetadataKey","CliModuleMetadata","Set","Map","getCliModuleMetadata","ClassDecoratorContext","extractCliModuleMetadata","hasCliModuleMetadata","ClassTypeWithInstance","NaviosModule","Container","CommandHandler","CliModuleMetadata","CommandMetadata","CommandWithMetadata","CliModuleLoaderService","Promise","Map","ZodObject","ParsedCliArgs","Record","CliParserService","Array","InjectionToken","CommanderExecutionContext","CommandExecutionContext"],"sources":["../src/commander.application.d.mts","../src/commander.factory.d.mts","../src/decorators/command.decorator.d.mts","../src/decorators/cli-module.decorator.d.mts","../src/interfaces/command-handler.interface.d.mts","../src/metadata/command.metadata.d.mts","../src/interfaces/commander-execution-context.interface.d.mts","../src/metadata/cli-module.metadata.d.mts","../src/services/module-loader.service.d.mts","../src/services/cli-parser.service.d.mts","../src/tokens/execution-context.token.d.mts"],"sourcesContent":["import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\n/**\n * Configuration options for CommanderApplication.\n *\n * @public\n */\nexport interface CommanderApplicationOptions {\n}\n/**\n * Main application class for managing CLI command execution.\n *\n * This class handles module loading, command registration, and command execution.\n * It provides both programmatic and CLI-based command execution capabilities.\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * ```\n */\nexport declare class CommanderApplication {\n private moduleLoader;\n private cliParser;\n protected container: Container;\n private appModule;\n private options;\n /**\n * Indicates whether the application has been initialized.\n * Set to `true` after `init()` is called successfully.\n */\n isInitialized: boolean;\n /**\n * @internal\n * Sets up the application with the provided module and options.\n * This is called automatically by CommanderFactory.create().\n */\n setup(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<void>;\n /**\n * Gets the dependency injection container used by this application.\n *\n * @returns The Container instance\n *\n * @example\n * ```typescript\n * const container = app.getContainer()\n * const service = await container.get(MyService)\n * ```\n */\n getContainer(): Container;\n /**\n * Initializes the application by loading all modules and registering commands.\n *\n * This method must be called before executing commands or running the CLI.\n * It traverses the module tree, loads all imported modules, and collects command metadata.\n *\n * @throws {Error} If the app module is not set (setup() was not called)\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init() // Must be called before run() or executeCommand()\n * ```\n */\n init(): Promise<void>;\n /**\n * Executes a command programmatically with the provided options.\n *\n * This method is useful for testing, automation, or programmatic workflows.\n * The options will be validated against the command's Zod schema if one is provided.\n *\n * @param commandPath - The command path (e.g., 'greet', 'user:create')\n * @param options - The command options object (will be validated if schema exists)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If the command is not found\n * @throws {Error} If the command does not implement the execute method\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * await app.executeCommand('greet', {\n * name: 'World',\n * greeting: 'Hi'\n * })\n * ```\n */\n executeCommand(commandPath: string, options?: any): Promise<void>;\n /**\n * Gets all registered commands with their paths and class references.\n *\n * @returns An array of objects containing the command path and class\n *\n * @example\n * ```typescript\n * const commands = app.getAllCommands()\n * commands.forEach(({ path }) => {\n * console.log(`Available: ${path}`)\n * })\n * ```\n */\n getAllCommands(): {\n path: string;\n class: ClassTypeWithInstance<any>;\n }[];\n /**\n * Runs the CLI application by parsing command-line arguments and executing the appropriate command.\n *\n * This is the main entry point for CLI usage. It parses `argv`, validates options,\n * and executes the matching command. Supports help command (`help`, `--help`, `-h`)\n * which displays all available commands.\n *\n * @param argv - Command-line arguments array (defaults to `process.argv`)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If no command is provided\n * @throws {Error} If the command is not found\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * // Parse and execute from process.argv\n * await app.run()\n *\n * // Or provide custom arguments\n * await app.run(['node', 'cli.js', 'greet', '--name', 'World'])\n * ```\n */\n run(argv?: string[]): Promise<void>;\n /**\n * @internal\n * Disposes of resources used by the application.\n */\n dispose(): Promise<void>;\n /**\n * Closes the application and cleans up resources.\n *\n * This should be called when the application is no longer needed to free up resources.\n *\n * @example\n * ```typescript\n * await app.run(process.argv)\n * await app.close()\n * ```\n */\n close(): Promise<void>;\n}\n//# sourceMappingURL=commander.application.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport type { CommanderApplicationOptions } from './commander.application.mjs';\nimport { CommanderApplication } from './commander.application.mjs';\n/**\n * Factory class for creating and configuring CLI applications.\n *\n * @example\n * ```typescript\n * import { CommanderFactory } from '@navios/commander'\n * import { AppModule } from './app.module'\n *\n * async function bootstrap() {\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * await app.close()\n * }\n * ```\n */\nexport declare class CommanderFactory {\n /**\n * Creates a new CommanderApplication instance and configures it with the provided module.\n *\n * @param appModule - The root CLI module class that contains commands and/or imports other modules\n * @param options - Optional configuration options for the application\n * @returns A promise that resolves to a configured CommanderApplication instance\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * ```\n */\n static create(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<CommanderApplication>;\n}\n//# sourceMappingURL=commander.factory.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * Options for the `@Command` decorator.\n *\n * @public\n */\nexport interface CommandOptions {\n /**\n * The command path that users will invoke from the CLI.\n * Can be a single word (e.g., 'greet') or multi-word with colons (e.g., 'user:create', 'db:migrate').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n * If provided, options will be validated and parsed according to this schema.\n */\n optionsSchema?: ZodObject;\n}\n/**\n * Decorator that marks a class as a CLI command.\n *\n * The decorated class must implement the `CommandHandler` interface with an `execute` method.\n * The command will be automatically registered when its module is loaded.\n *\n * @param options - Configuration options for the command\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string(),\n * greeting: z.string().optional().default('Hello')\n * })\n *\n * @Command({\n * path: 'greet',\n * optionsSchema: optionsSchema\n * })\n * export class GreetCommand implements CommandHandler<z.infer<typeof optionsSchema>> {\n * async execute(options) {\n * console.log(`${options.greeting}, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport declare function Command({ path, optionsSchema }: CommandOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=command.decorator.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * Options for the `@CliModule` decorator.\n *\n * @public\n */\nexport interface CliModuleOptions {\n /**\n * Array or Set of command classes to register in this module.\n * Commands must be decorated with `@Command`.\n */\n commands?: ClassType[] | Set<ClassType>;\n /**\n * Array or Set of other CLI modules to import.\n * Imported modules' commands will be available in this module.\n */\n imports?: ClassType[] | Set<ClassType>;\n}\n/**\n * Decorator that marks a class as a CLI module.\n *\n * Modules organize commands and can import other modules to compose larger CLI applications.\n * The module can optionally implement `NaviosModule` interface for lifecycle hooks.\n *\n * @param options - Configuration options for the module\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { CliModule } from '@navios/commander'\n * import { GreetCommand } from './greet.command'\n * import { UserModule } from './user.module'\n *\n * @CliModule({\n * commands: [GreetCommand],\n * imports: [UserModule]\n * })\n * export class AppModule {}\n * ```\n */\nexport declare function CliModule({ commands, imports }?: CliModuleOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=cli-module.decorator.d.mts.map","/**\n * Interface that all command classes must implement.\n *\n * Commands decorated with `@Command` must implement this interface.\n * The `execute` method is called when the command is invoked.\n *\n * @template TOptions - The type of options that the command accepts\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string()\n * })\n *\n * type Options = z.infer<typeof optionsSchema>\n *\n * @Command({ path: 'greet', optionsSchema })\n * export class GreetCommand implements CommandHandler<Options> {\n * async execute(options: Options) {\n * console.log(`Hello, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport interface CommandHandler<TOptions = any> {\n /**\n * Executes the command with the provided options.\n *\n * @param options - The validated command options (validated against the command's schema if provided)\n * @returns A promise or void\n */\n execute(options: TOptions): void | Promise<void>;\n}\n//# sourceMappingURL=command-handler.interface.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * @internal\n * Symbol key used to store command metadata on classes.\n */\nexport declare const CommandMetadataKey: unique symbol;\n/**\n * Metadata associated with a command.\n *\n * @public\n */\nexport interface CommandMetadata {\n /**\n * The command path (e.g., 'greet', 'user:create').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n */\n optionsSchema?: ZodObject;\n /**\n * Map of custom attributes that can be attached to the command.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates command metadata for a class.\n *\n * @internal\n * @param target - The command class\n * @param context - The decorator context\n * @param path - The command path\n * @param optionsSchema - Optional Zod schema\n * @returns The command metadata\n */\nexport declare function getCommandMetadata(target: ClassType, context: ClassDecoratorContext, path: string, optionsSchema?: ZodObject): CommandMetadata;\n/**\n * Extracts command metadata from a class.\n *\n * @param target - The command class\n * @returns The command metadata\n * @throws {Error} If the class is not decorated with @Command\n *\n * @example\n * ```typescript\n * const metadata = extractCommandMetadata(GreetCommand)\n * console.log(metadata.path) // 'greet'\n * ```\n */\nexport declare function extractCommandMetadata(target: ClassType): CommandMetadata;\n/**\n * Checks if a class has command metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @Command, `false` otherwise\n */\nexport declare function hasCommandMetadata(target: ClassType): boolean;\n//# sourceMappingURL=command.metadata.d.mts.map","import type { CommandMetadata } from '../metadata/command.metadata.mjs';\n/**\n * Execution context for a command execution.\n *\n * Provides access to command metadata, path, and validated options during command execution.\n * This context is automatically injected and available via the `CommandExecutionContext` token.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class CommandLogger {\n * private ctx = inject(CommandExecutionContext)\n *\n * log() {\n * console.log('Command:', this.ctx.getCommandPath())\n * console.log('Options:', this.ctx.getOptions())\n * }\n * }\n * ```\n */\nexport declare class CommanderExecutionContext {\n private readonly command;\n private readonly commandPath;\n private readonly options;\n /**\n * @internal\n * Creates a new execution context.\n */\n constructor(command: CommandMetadata, commandPath: string, options: any);\n /**\n * Gets the command metadata.\n *\n * @returns The command metadata including path and options schema\n */\n getCommand(): CommandMetadata;\n /**\n * Gets the command path that was invoked.\n *\n * @returns The command path (e.g., 'greet', 'user:create')\n */\n getCommandPath(): string;\n /**\n * Gets the validated command options.\n *\n * Options are validated against the command's Zod schema if one was provided.\n *\n * @returns The validated options object\n */\n getOptions(): any;\n}\n//# sourceMappingURL=commander-execution-context.interface.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * @internal\n * Symbol key used to store CLI module metadata on classes.\n */\nexport declare const CliModuleMetadataKey: unique symbol;\n/**\n * Metadata associated with a CLI module.\n *\n * @public\n */\nexport interface CliModuleMetadata {\n /**\n * Set of command classes registered in this module.\n */\n commands: Set<ClassType>;\n /**\n * Set of other modules imported by this module.\n */\n imports: Set<ClassType>;\n /**\n * Map of custom attributes that can be attached to the module.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates CLI module metadata for a class.\n *\n * @internal\n * @param target - The module class\n * @param context - The decorator context\n * @returns The module metadata\n */\nexport declare function getCliModuleMetadata(target: ClassType, context: ClassDecoratorContext): CliModuleMetadata;\n/**\n * Extracts CLI module metadata from a class.\n *\n * @param target - The module class\n * @returns The module metadata\n * @throws {Error} If the class is not decorated with @CliModule\n *\n * @example\n * ```typescript\n * const metadata = extractCliModuleMetadata(AppModule)\n * console.log(metadata.commands.size) // Number of commands\n * ```\n */\nexport declare function extractCliModuleMetadata(target: ClassType): CliModuleMetadata;\n/**\n * Checks if a class has CLI module metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @CliModule, `false` otherwise\n */\nexport declare function hasCliModuleMetadata(target: ClassType): boolean;\n//# sourceMappingURL=cli-module.metadata.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\nimport type { CommandHandler } from '../interfaces/index.mjs';\nimport type { CliModuleMetadata, CommandMetadata } from '../metadata/index.mjs';\n/**\n * Command class with its associated metadata.\n *\n * @public\n */\nexport interface CommandWithMetadata {\n /**\n * The command class constructor.\n */\n class: ClassTypeWithInstance<CommandHandler>;\n /**\n * The command metadata including path and options schema.\n */\n metadata: CommandMetadata;\n}\n/**\n * Service for loading and managing CLI modules and commands.\n *\n * Handles module traversal, command registration, and metadata collection.\n * This service is used internally by CommanderApplication.\n *\n * @public\n */\nexport declare class CliModuleLoaderService {\n protected container: Container;\n private modulesMetadata;\n private loadedModules;\n private commandsMetadata;\n private initialized;\n /**\n * Loads all modules starting from the root app module.\n *\n * Traverses the module tree, loads imported modules, and collects command metadata.\n *\n * @param appModule - The root CLI module\n */\n loadModules(appModule: ClassTypeWithInstance<NaviosModule>): Promise<void>;\n private traverseModules;\n private mergeMetadata;\n /**\n * Gets all loaded module metadata.\n *\n * @returns Map of module names to their metadata\n */\n getAllModules(): Map<string, CliModuleMetadata>;\n /**\n * Gets all command classes indexed by command class name.\n *\n * @returns Map of command class names to command classes\n */\n getAllCommands(): Map<string, ClassTypeWithInstance<any>>;\n /**\n * Get all commands with their metadata, indexed by command path.\n * This is populated during loadModules, so path information is available\n * before parsing CLI argv.\n */\n getAllCommandsWithMetadata(): Map<string, CommandWithMetadata>;\n /**\n * Get a command by its path, with metadata already extracted.\n * Returns undefined if command is not found.\n */\n getCommandByPath(path: string): CommandWithMetadata | undefined;\n /**\n * Disposes of all loaded modules and commands, clearing internal state.\n */\n dispose(): void;\n}\n//# sourceMappingURL=module-loader.service.d.mts.map","import type { ZodObject } from 'zod';\n/**\n * Result of parsing command-line arguments.\n *\n * @public\n */\nexport interface ParsedCliArgs {\n /**\n * The command path (e.g., 'greet', 'user:create').\n * Multi-word commands are joined with spaces.\n */\n command: string;\n /**\n * Parsed options as key-value pairs.\n * Keys are converted from kebab-case to camelCase.\n */\n options: Record<string, any>;\n /**\n * Positional arguments that don't match any option flags.\n */\n positionals: string[];\n}\n/**\n * Service for parsing command-line arguments.\n *\n * Handles parsing of various CLI argument formats including:\n * - Long options: `--key value` or `--key=value`\n * - Short options: `-k value` or `-abc` (multiple flags)\n * - Boolean flags\n * - Array options\n * - Positional arguments\n *\n * @public\n */\nexport declare class CliParserService {\n /**\n * Parses command-line arguments from process.argv\n * Commands can be multi-word (e.g., 'db migrate', 'cache clear')\n * Expected format: node script.js command [subcommand...] --flag value --boolean-flag positional1 positional2\n *\n * @param argv - Array of command-line arguments (typically process.argv)\n * @param optionsSchema - Optional Zod schema to determine boolean flags and option types\n * @returns Parsed command (space-separated if multi-word), options, and positional arguments\n */\n parse(argv: string[], optionsSchema?: ZodObject): ParsedCliArgs;\n /**\n * Converts kebab-case to camelCase\n */\n private camelCase;\n /**\n * Attempts to parse string values into appropriate types\n */\n private parseValue;\n /**\n * Extracts boolean field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractBooleanFields;\n /**\n * Extracts array field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractArrayFields;\n /**\n * Checks if a Zod schema represents a boolean type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaBoolean;\n /**\n * Checks if a Zod schema represents an array type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaArray;\n /**\n * Formats help text listing all available commands.\n *\n * @param commands - Array of command objects with path and class\n * @returns Formatted string listing all commands\n */\n formatCommandList(commands: Array<{\n path: string;\n class: any;\n }>): string;\n}\n//# sourceMappingURL=cli-parser.service.d.mts.map","import { InjectionToken } from '@navios/core';\nimport type { CommanderExecutionContext } from '../interfaces/index.mjs';\n/**\n * Injection token for accessing the current command execution context.\n *\n * Use this token with `inject()` to access the `CommanderExecutionContext` in services\n * that need information about the currently executing command.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class MyService {\n * private ctx = inject(CommandExecutionContext)\n *\n * doSomething() {\n * const commandPath = this.ctx.getCommandPath()\n * const options = this.ctx.getOptions()\n * // Use context information...\n * }\n * }\n * ```\n */\nexport declare const CommandExecutionContext: InjectionToken<CommanderExecutionContext, undefined, false>;\n//# sourceMappingURL=execution-context.token.d.mts.map"],"mappings":";;;;;;;;;;AAOA;AAeqBI,UAfJD,2BAAAA,CAewB;;;;;;;;;;;;;;cAApBC,oBAAAA;;ECHAM,QAAAA,SAAAA;EAc8BH,UAAAA,SAAAA,EDR1BL,SCQ0BK;EAAtBD,QAAAA,SAAAA;EAA+CE,QAAAA,OAAAA;EAAsCC;;;;;;AC1BlH;AA0CA;;;EAAyDK,KAAAA,CAAAA,SAAAA,EFXpCd,qBEWoCc,CFXdb,YEWca,CAAAA,EAAAA,OAAAA,CAAAA,EFXWX,2BEWXW,CAAAA,EFXyCT,OEWzCS,CAAAA,IAAAA,CAAAA;EAA0BF;;;;;;;AC3CnF;;;;EAUcO,YAAAA,CAAAA,CAAAA,EHkCMjB,SGlCNiB;EAAkBA;;;AAwBhC;;;;;;;;;;;ECb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cSR9B2D,uBTQ8B3D,ESRLyD,cTQKzD,CSRU0D,yBTQV1D,EAAAA,SAAAA,EAAAA,KAAAA,CAAAA"}
1
+ {"version":3,"file":"index.d.mts","names":["ClassTypeWithInstance","NaviosModule","Container","CommanderApplicationOptions","CommanderApplication","Promise","ClassTypeWithInstance","NaviosModule","CommanderApplicationOptions","CommanderApplication","CommanderFactory","Promise","ClassType","ZodObject","CommandOptions","Command","path","optionsSchema","ClassDecoratorContext","ClassType","CliModuleOptions","Set","CliModule","commands","imports","ClassDecoratorContext","CommandHandler","TOptions","Promise","ClassType","ZodObject","CommandMetadataKey","CommandMetadata","Map","getCommandMetadata","ClassDecoratorContext","extractCommandMetadata","hasCommandMetadata","CommandMetadata","CommanderExecutionContext","ClassType","CliModuleMetadataKey","CliModuleMetadata","Set","Map","getCliModuleMetadata","ClassDecoratorContext","extractCliModuleMetadata","hasCliModuleMetadata","ClassTypeWithInstance","NaviosModule","Container","CommandHandler","CliModuleMetadata","CommandMetadata","CommandWithMetadata","CliModuleLoaderService","Promise","Map","ZodObject","ParsedCliArgs","Record","CliParserService","Array","InjectionToken","CommanderExecutionContext","CommandExecutionContext"],"sources":["../src/commander.application.d.mts","../src/commander.factory.d.mts","../src/decorators/command.decorator.d.mts","../src/decorators/cli-module.decorator.d.mts","../src/interfaces/command-handler.interface.d.mts","../src/metadata/command.metadata.d.mts","../src/interfaces/commander-execution-context.interface.d.mts","../src/metadata/cli-module.metadata.d.mts","../src/services/module-loader.service.d.mts","../src/services/cli-parser.service.d.mts","../src/tokens/execution-context.token.d.mts"],"sourcesContent":["import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\n/**\n * Configuration options for CommanderApplication.\n *\n * @public\n */\nexport interface CommanderApplicationOptions {\n}\n/**\n * Main application class for managing CLI command execution.\n *\n * This class handles module loading, command registration, and command execution.\n * It provides both programmatic and CLI-based command execution capabilities.\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * ```\n */\nexport declare class CommanderApplication {\n private moduleLoader;\n private cliParser;\n protected container: Container;\n private appModule;\n private options;\n /**\n * Indicates whether the application has been initialized.\n * Set to `true` after `init()` is called successfully.\n */\n isInitialized: boolean;\n /**\n * @internal\n * Sets up the application with the provided module and options.\n * This is called automatically by CommanderFactory.create().\n */\n setup(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<void>;\n /**\n * Gets the dependency injection container used by this application.\n *\n * @returns The Container instance\n *\n * @example\n * ```typescript\n * const container = app.getContainer()\n * const service = await container.get(MyService)\n * ```\n */\n getContainer(): Container;\n /**\n * Initializes the application by loading all modules and registering commands.\n *\n * This method must be called before executing commands or running the CLI.\n * It traverses the module tree, loads all imported modules, and collects command metadata.\n *\n * @throws {Error} If the app module is not set (setup() was not called)\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init() // Must be called before run() or executeCommand()\n * ```\n */\n init(): Promise<void>;\n /**\n * Executes a command programmatically with the provided options.\n *\n * This method is useful for testing, automation, or programmatic workflows.\n * The options will be validated against the command's Zod schema if one is provided.\n *\n * @param commandPath - The command path (e.g., 'greet', 'user:create')\n * @param options - The command options object (will be validated if schema exists)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If the command is not found\n * @throws {Error} If the command does not implement the execute method\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * await app.executeCommand('greet', {\n * name: 'World',\n * greeting: 'Hi'\n * })\n * ```\n */\n executeCommand(commandPath: string, options?: any): Promise<void>;\n /**\n * Gets all registered commands with their paths and class references.\n *\n * @returns An array of objects containing the command path and class\n *\n * @example\n * ```typescript\n * const commands = app.getAllCommands()\n * commands.forEach(({ path }) => {\n * console.log(`Available: ${path}`)\n * })\n * ```\n */\n getAllCommands(): {\n path: string;\n class: ClassTypeWithInstance<any>;\n }[];\n /**\n * Runs the CLI application by parsing command-line arguments and executing the appropriate command.\n *\n * This is the main entry point for CLI usage. It parses `argv`, validates options,\n * and executes the matching command. Supports help command (`help`, `--help`, `-h`)\n * which displays all available commands.\n *\n * @param argv - Command-line arguments array (defaults to `process.argv`)\n * @throws {Error} If the application is not initialized\n * @throws {Error} If no command is provided\n * @throws {Error} If the command is not found\n * @throws {ZodError} If options validation fails\n *\n * @example\n * ```typescript\n * // Parse and execute from process.argv\n * await app.run()\n *\n * // Or provide custom arguments\n * await app.run(['node', 'cli.js', 'greet', '--name', 'World'])\n * ```\n */\n run(argv?: string[]): Promise<void>;\n /**\n * @internal\n * Disposes of resources used by the application.\n */\n dispose(): Promise<void>;\n /**\n * Closes the application and cleans up resources.\n *\n * This should be called when the application is no longer needed to free up resources.\n *\n * @example\n * ```typescript\n * await app.run(process.argv)\n * await app.close()\n * ```\n */\n close(): Promise<void>;\n}\n//# sourceMappingURL=commander.application.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport type { CommanderApplicationOptions } from './commander.application.mjs';\nimport { CommanderApplication } from './commander.application.mjs';\n/**\n * Factory class for creating and configuring CLI applications.\n *\n * @example\n * ```typescript\n * import { CommanderFactory } from '@navios/commander'\n * import { AppModule } from './app.module'\n *\n * async function bootstrap() {\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * await app.run(process.argv)\n * await app.close()\n * }\n * ```\n */\nexport declare class CommanderFactory {\n /**\n * Creates a new CommanderApplication instance and configures it with the provided module.\n *\n * @param appModule - The root CLI module class that contains commands and/or imports other modules\n * @param options - Optional configuration options for the application\n * @returns A promise that resolves to a configured CommanderApplication instance\n *\n * @example\n * ```typescript\n * const app = await CommanderFactory.create(AppModule)\n * await app.init()\n * ```\n */\n static create(appModule: ClassTypeWithInstance<NaviosModule>, options?: CommanderApplicationOptions): Promise<CommanderApplication>;\n}\n//# sourceMappingURL=commander.factory.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * Options for the `@Command` decorator.\n *\n * @public\n */\nexport interface CommandOptions {\n /**\n * The command path that users will invoke from the CLI.\n * Can be a single word (e.g., 'greet') or multi-word with colons (e.g., 'user:create', 'db:migrate').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n * If provided, options will be validated and parsed according to this schema.\n */\n optionsSchema?: ZodObject;\n}\n/**\n * Decorator that marks a class as a CLI command.\n *\n * The decorated class must implement the `CommandHandler` interface with an `execute` method.\n * The command will be automatically registered when its module is loaded.\n *\n * @param options - Configuration options for the command\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string(),\n * greeting: z.string().optional().default('Hello')\n * })\n *\n * @Command({\n * path: 'greet',\n * optionsSchema: optionsSchema\n * })\n * export class GreetCommand implements CommandHandler<z.infer<typeof optionsSchema>> {\n * async execute(options) {\n * console.log(`${options.greeting}, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport declare function Command({ path, optionsSchema }: CommandOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=command.decorator.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * Options for the `@CliModule` decorator.\n *\n * @public\n */\nexport interface CliModuleOptions {\n /**\n * Array or Set of command classes to register in this module.\n * Commands must be decorated with `@Command`.\n */\n commands?: ClassType[] | Set<ClassType>;\n /**\n * Array or Set of other CLI modules to import.\n * Imported modules' commands will be available in this module.\n */\n imports?: ClassType[] | Set<ClassType>;\n}\n/**\n * Decorator that marks a class as a CLI module.\n *\n * Modules organize commands and can import other modules to compose larger CLI applications.\n * The module can optionally implement `NaviosModule` interface for lifecycle hooks.\n *\n * @param options - Configuration options for the module\n * @returns A class decorator function\n *\n * @example\n * ```typescript\n * import { CliModule } from '@navios/commander'\n * import { GreetCommand } from './greet.command'\n * import { UserModule } from './user.module'\n *\n * @CliModule({\n * commands: [GreetCommand],\n * imports: [UserModule]\n * })\n * export class AppModule {}\n * ```\n */\nexport declare function CliModule({ commands, imports }?: CliModuleOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;\n//# sourceMappingURL=cli-module.decorator.d.mts.map","/**\n * Interface that all command classes must implement.\n *\n * Commands decorated with `@Command` must implement this interface.\n * The `execute` method is called when the command is invoked.\n *\n * @template TOptions - The type of options that the command accepts\n *\n * @example\n * ```typescript\n * import { Command, CommandHandler } from '@navios/commander'\n * import { z } from 'zod'\n *\n * const optionsSchema = z.object({\n * name: z.string()\n * })\n *\n * type Options = z.infer<typeof optionsSchema>\n *\n * @Command({ path: 'greet', optionsSchema })\n * export class GreetCommand implements CommandHandler<Options> {\n * async execute(options: Options) {\n * console.log(`Hello, ${options.name}!`)\n * }\n * }\n * ```\n */\nexport interface CommandHandler<TOptions = any> {\n /**\n * Executes the command with the provided options.\n *\n * @param options - The validated command options (validated against the command's schema if provided)\n * @returns A promise or void\n */\n execute(options: TOptions): void | Promise<void>;\n}\n//# sourceMappingURL=command-handler.interface.d.mts.map","import type { ClassType } from '@navios/core';\nimport type { ZodObject } from 'zod';\n/**\n * @internal\n * Symbol key used to store command metadata on classes.\n */\nexport declare const CommandMetadataKey: unique symbol;\n/**\n * Metadata associated with a command.\n *\n * @public\n */\nexport interface CommandMetadata {\n /**\n * The command path (e.g., 'greet', 'user:create').\n */\n path: string;\n /**\n * Optional Zod schema for validating command options.\n */\n optionsSchema?: ZodObject;\n /**\n * Map of custom attributes that can be attached to the command.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates command metadata for a class.\n *\n * @internal\n * @param target - The command class\n * @param context - The decorator context\n * @param path - The command path\n * @param optionsSchema - Optional Zod schema\n * @returns The command metadata\n */\nexport declare function getCommandMetadata(target: ClassType, context: ClassDecoratorContext, path: string, optionsSchema?: ZodObject): CommandMetadata;\n/**\n * Extracts command metadata from a class.\n *\n * @param target - The command class\n * @returns The command metadata\n * @throws {Error} If the class is not decorated with @Command\n *\n * @example\n * ```typescript\n * const metadata = extractCommandMetadata(GreetCommand)\n * console.log(metadata.path) // 'greet'\n * ```\n */\nexport declare function extractCommandMetadata(target: ClassType): CommandMetadata;\n/**\n * Checks if a class has command metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @Command, `false` otherwise\n */\nexport declare function hasCommandMetadata(target: ClassType): boolean;\n//# sourceMappingURL=command.metadata.d.mts.map","import type { CommandMetadata } from '../metadata/command.metadata.mjs';\n/**\n * Execution context for a command execution.\n *\n * Provides access to command metadata, path, and validated options during command execution.\n * This context is automatically injected and available via the `CommandExecutionContext` token.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class CommandLogger {\n * private ctx = inject(CommandExecutionContext)\n *\n * log() {\n * console.log('Command:', this.ctx.getCommandPath())\n * console.log('Options:', this.ctx.getOptions())\n * }\n * }\n * ```\n */\nexport declare class CommanderExecutionContext {\n private readonly command;\n private readonly commandPath;\n private readonly options;\n /**\n * @internal\n * Creates a new execution context.\n */\n constructor(command: CommandMetadata, commandPath: string, options: any);\n /**\n * Gets the command metadata.\n *\n * @returns The command metadata including path and options schema\n */\n getCommand(): CommandMetadata;\n /**\n * Gets the command path that was invoked.\n *\n * @returns The command path (e.g., 'greet', 'user:create')\n */\n getCommandPath(): string;\n /**\n * Gets the validated command options.\n *\n * Options are validated against the command's Zod schema if one was provided.\n *\n * @returns The validated options object\n */\n getOptions(): any;\n}\n//# sourceMappingURL=commander-execution-context.interface.d.mts.map","import type { ClassType } from '@navios/core';\n/**\n * @internal\n * Symbol key used to store CLI module metadata on classes.\n */\nexport declare const CliModuleMetadataKey: unique symbol;\n/**\n * Metadata associated with a CLI module.\n *\n * @public\n */\nexport interface CliModuleMetadata {\n /**\n * Set of command classes registered in this module.\n */\n commands: Set<ClassType>;\n /**\n * Set of other modules imported by this module.\n */\n imports: Set<ClassType>;\n /**\n * Map of custom attributes that can be attached to the module.\n */\n customAttributes: Map<string | symbol, any>;\n}\n/**\n * Gets or creates CLI module metadata for a class.\n *\n * @internal\n * @param target - The module class\n * @param context - The decorator context\n * @returns The module metadata\n */\nexport declare function getCliModuleMetadata(target: ClassType, context: ClassDecoratorContext): CliModuleMetadata;\n/**\n * Extracts CLI module metadata from a class.\n *\n * @param target - The module class\n * @returns The module metadata\n * @throws {Error} If the class is not decorated with @CliModule\n *\n * @example\n * ```typescript\n * const metadata = extractCliModuleMetadata(AppModule)\n * console.log(metadata.commands.size) // Number of commands\n * ```\n */\nexport declare function extractCliModuleMetadata(target: ClassType): CliModuleMetadata;\n/**\n * Checks if a class has CLI module metadata.\n *\n * @param target - The class to check\n * @returns `true` if the class is decorated with @CliModule, `false` otherwise\n */\nexport declare function hasCliModuleMetadata(target: ClassType): boolean;\n//# sourceMappingURL=cli-module.metadata.d.mts.map","import type { ClassTypeWithInstance, NaviosModule } from '@navios/core';\nimport { Container } from '@navios/core';\nimport type { CommandHandler } from '../interfaces/index.mjs';\nimport type { CliModuleMetadata, CommandMetadata } from '../metadata/index.mjs';\n/**\n * Command class with its associated metadata.\n *\n * @public\n */\nexport interface CommandWithMetadata {\n /**\n * The command class constructor.\n */\n class: ClassTypeWithInstance<CommandHandler>;\n /**\n * The command metadata including path and options schema.\n */\n metadata: CommandMetadata;\n}\n/**\n * Service for loading and managing CLI modules and commands.\n *\n * Handles module traversal, command registration, and metadata collection.\n * This service is used internally by CommanderApplication.\n *\n * @public\n */\nexport declare class CliModuleLoaderService {\n protected container: Container;\n private modulesMetadata;\n private loadedModules;\n private commandsMetadata;\n private initialized;\n /**\n * Loads all modules starting from the root app module.\n *\n * Traverses the module tree, loads imported modules, and collects command metadata.\n *\n * @param appModule - The root CLI module\n */\n loadModules(appModule: ClassTypeWithInstance<NaviosModule>): Promise<void>;\n private traverseModules;\n private mergeMetadata;\n /**\n * Gets all loaded module metadata.\n *\n * @returns Map of module names to their metadata\n */\n getAllModules(): Map<string, CliModuleMetadata>;\n /**\n * Gets all command classes indexed by command class name.\n *\n * @returns Map of command class names to command classes\n */\n getAllCommands(): Map<string, ClassTypeWithInstance<any>>;\n /**\n * Get all commands with their metadata, indexed by command path.\n * This is populated during loadModules, so path information is available\n * before parsing CLI argv.\n */\n getAllCommandsWithMetadata(): Map<string, CommandWithMetadata>;\n /**\n * Get a command by its path, with metadata already extracted.\n * Returns undefined if command is not found.\n */\n getCommandByPath(path: string): CommandWithMetadata | undefined;\n /**\n * Disposes of all loaded modules and commands, clearing internal state.\n */\n dispose(): void;\n}\n//# sourceMappingURL=module-loader.service.d.mts.map","import type { ZodObject } from 'zod';\n/**\n * Result of parsing command-line arguments.\n *\n * @public\n */\nexport interface ParsedCliArgs {\n /**\n * The command path (e.g., 'greet', 'user:create').\n * Multi-word commands are joined with spaces.\n */\n command: string;\n /**\n * Parsed options as key-value pairs.\n * Keys are converted from kebab-case to camelCase.\n */\n options: Record<string, any>;\n /**\n * Positional arguments that don't match any option flags.\n */\n positionals: string[];\n}\n/**\n * Service for parsing command-line arguments.\n *\n * Handles parsing of various CLI argument formats including:\n * - Long options: `--key value` or `--key=value`\n * - Short options: `-k value` or `-abc` (multiple flags)\n * - Boolean flags\n * - Array options\n * - Positional arguments\n *\n * @public\n */\nexport declare class CliParserService {\n /**\n * Parses command-line arguments from process.argv\n * Commands can be multi-word (e.g., 'db migrate', 'cache clear')\n * Expected format: node script.js command [subcommand...] --flag value --boolean-flag positional1 positional2\n *\n * @param argv - Array of command-line arguments (typically process.argv)\n * @param optionsSchema - Optional Zod schema to determine boolean flags and option types\n * @returns Parsed command (space-separated if multi-word), options, and positional arguments\n */\n parse(argv: string[], optionsSchema?: ZodObject): ParsedCliArgs;\n /**\n * Converts kebab-case to camelCase\n */\n private camelCase;\n /**\n * Attempts to parse string values into appropriate types\n */\n private parseValue;\n /**\n * Extracts boolean field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractBooleanFields;\n /**\n * Extracts array field names from a Zod schema\n * Handles ZodObject, ZodOptional, and ZodDefault wrappers\n */\n private extractArrayFields;\n /**\n * Checks if a Zod schema represents a boolean type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaBoolean;\n /**\n * Checks if a Zod schema represents an array type\n * Unwraps ZodOptional and ZodDefault\n */\n private isSchemaArray;\n /**\n * Formats help text listing all available commands.\n *\n * @param commands - Array of command objects with path and class\n * @returns Formatted string listing all commands\n */\n formatCommandList(commands: Array<{\n path: string;\n class: any;\n }>): string;\n}\n//# sourceMappingURL=cli-parser.service.d.mts.map","import { InjectionToken } from '@navios/core';\nimport type { CommanderExecutionContext } from '../interfaces/index.mjs';\n/**\n * Injection token for accessing the current command execution context.\n *\n * Use this token with `inject()` to access the `CommanderExecutionContext` in services\n * that need information about the currently executing command.\n *\n * @example\n * ```typescript\n * import { inject, Injectable } from '@navios/di'\n * import { CommandExecutionContext } from '@navios/commander'\n *\n * @Injectable()\n * class MyService {\n * private ctx = inject(CommandExecutionContext)\n *\n * doSomething() {\n * const commandPath = this.ctx.getCommandPath()\n * const options = this.ctx.getOptions()\n * // Use context information...\n * }\n * }\n * ```\n */\nexport declare const CommandExecutionContext: InjectionToken<CommanderExecutionContext, undefined, false>;\n//# sourceMappingURL=execution-context.token.d.mts.map"],"mappings":";;;;;;;;;;AAOA;AAeqBI,UAfJD,2BAAAA,CAewB;;;;;;;;;;;;;;cAApBC,oBAAAA;;ECHAM,QAAAA,SAAAA;EAc8BH,UAAAA,SAAAA,EDR1BL,SCQ0BK;EAAtBD,QAAAA,SAAAA;EAA+CE,QAAAA,OAAAA;EAAsCC;;;;;;AC1BlH;AA0CA;;;EAAyDK,KAAAA,CAAAA,SAAAA,EFXpCd,qBEWoCc,CFXdb,YEWca,CAAAA,EAAAA,OAAAA,CAAAA,EFXWX,2BEWXW,CAAAA,EFXyCT,OEWzCS,CAAAA,IAAAA,CAAAA;EAA0BF;;;;;;;AC3CnF;;;;EAUcO,YAAAA,CAAAA,CAAAA,EHkCMjB,SGlCNiB;EAAkBA;;;AAwBhC;;;;;;;;;;;ECbiBO,IAAAA,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