/** * This file was generated by @pikku/cli@0.12.89 */ /** * CLI-specific type definitions for tree-shaking optimization */ import { CoreCLI, CorePikkuCLIRender, CoreCLICommandConfig } from '@pikku/core/cli'; import type { PikkuFunctionConfig, PikkuMiddleware } from '../function/pikku-function-types.gen.js'; import type { UserSession } from '../../types/application-types.d.js'; import type { SingletonServices } from '../../types/application-types.d.js'; type Session = UserSession; /** * Type-safe CLI renderer definition that can access your application's services. * Use this to define custom renderers for CLI command output. * * @template Data - The output data type from the CLI command * @template RequiredServices - The services required for this renderer */ type PikkuCLIRender = CorePikkuCLIRender; /** * Creates a type-safe CLI renderer with access to your application's singleton services. * The renderer receives the full singleton services and output data to format and display results. * * @template Data - The output data type from the CLI command * @template RequiredServices - The minimum services required for type checking (defaults to SingletonServices) * @param render - Function that receives singleton services and data to render output * @returns A CLI renderer configuration * * @example * ```typescript * const myRenderer = pikkuCLIRender(({ logger }, data) => { * logger.info(data.message) * }) * ``` */ export declare const pikkuCLIRender: (render: (services: SingletonServices, data: Data) => void | Promise) => PikkuCLIRender; /** * CLI command configuration with project-specific types. * Uses CoreCLICommandConfig from @pikku/core with local middleware and render types. */ type CLICommandConfig, In = any, Out = any, Params extends string = string> = CoreCLICommandConfig, Params>; /** * Type definition for CLI applications with commands and global options. * * @template Commands - Type describing the command structure * @template GlobalOptions - Type for global CLI options */ type CLIWiring, any>>, GlobalOptions> = CoreCLI>; /** * Registers a CLI application with the Pikku framework. * Creates command-line interfaces with type-safe commands and options. * * @template Commands - Type describing the command structure * @template GlobalOptions - Type for global CLI options * @param cli - CLI definition with program name, commands, and global options */ export declare const wireCLI: , any>>, GlobalOptions>(cli: CLIWiring) => void; /** * Creates a CLI command definition with automatic option inference from the function's input type. * This allows TypeScript to automatically derive CLI options from the function signature. * * @template FuncConfig - The Pikku function config type * @template Params - The parameters string literal type * @param config - CLI command configuration * @returns CLI command configuration with inferred types */ export declare const pikkuCLICommand: , Params extends string>(config: CLICommandConfig) => CoreCLICommandConfig, string>; /** * Type-safe helper for defining CLI commands that can be composed and spread into wireCLI. * * @template T - Record of CLI command configurations * @param commands - The CLI commands record * @returns The same commands record (identity function for type safety) */ export declare const defineCLICommands: , any>>>(commands: T) => T; export {};