import { CliOutputMode } from "../shared/outfitter-fhahf9f3.js"; import { OutfitterError } from "@outfitter/contracts"; import { Result } from "@outfitter/contracts"; /** Options for the Commander-to-builder codemod. */ interface UpgradeCodemodBuilderOptions { /** Working directory (defaults to cwd) */ readonly cwd: string; /** Preview changes without writing to disk */ readonly dryRun: boolean; } /** Result of the Commander-to-builder codemod. */ interface UpgradeCodemodBuilderResult { /** Files that were successfully transformed */ readonly changedFiles: readonly string[]; /** Whether this was a dry run */ readonly dryRun: boolean; /** Errors encountered during transformation */ readonly errors: readonly string[]; /** Whether all operations succeeded (no errors) */ readonly ok: boolean; /** Files skipped (too complex or already migrated) */ readonly skippedFiles: readonly string[]; /** Total files scanned */ readonly totalChanged: number; /** Total files skipped */ readonly totalSkipped: number; } /** * Run the Commander-to-builder codemod on a target directory. * * Scans TypeScript files for Commander-style `.command().action()` patterns * and transforms them to the builder pattern with generated Zod schema * skeletons. * * @param options - Codemod options including cwd and dryRun * @returns Result with transformation report */ declare function runUpgradeCodemodBuilder(options: UpgradeCodemodBuilderOptions): Promise>; /** * Render codemod results to stdout. */ declare function printUpgradeCodemodBuilderResult(result: UpgradeCodemodBuilderResult, options?: { mode?: CliOutputMode; }): Promise; export { runUpgradeCodemodBuilder, printUpgradeCodemodBuilderResult, UpgradeCodemodBuilderResult, UpgradeCodemodBuilderOptions };