import type { CliCommand, CliContext } from '../../context/types.js'; import type { CodemodRunOptions, CodemodRunResult } from './runner.js'; import type { CodemodVersionMetadata } from './versioning.js'; /** * Describes a runnable codemod exposed in the interactive codemods menu. */ export interface CodemodDefinition { /** Stable codemod identifier used in prompt selection values. */ id: string; /** Human-readable menu label. */ label: string; /** Short description shown in the prompt hint column. */ hint: string; /** Executes the codemod for the provided CLI context. */ run: (options: CodemodRunOptions) => Promise; /** Version metadata used to determine codemod applicability. */ versioning?: CodemodVersionMetadata; /** * Release the transform migrates to. Only `2.0.0` transforms join `--all` * and the interactive menu; later ones run when named. */ targetVersion?: string; } /** * Runs one or more selected codemods for the current project. * * @param context CLI execution context. * @returns Promise that resolves when selected codemods complete. */ export declare const runCodemods: (context: CliContext) => Promise<{ codemods: { fromRange?: string; toRange?: string; description: string; id: string; applicable: boolean; targetVersion?: string | undefined; }[]; declaredVersion: string | null; kind: string; sourceVersion: string | null; targetVersion: string; dryRun?: undefined; results?: undefined; } | { codemods?: undefined; declaredVersion: string | null; dryRun: boolean; kind: string; results: { id: string; result: CodemodRunResult; targetVersion: string; }[]; sourceVersion: string | null; targetVersion: string; }>; /** * Top-level CLI command definition for project codemods. */ export declare const codemodsCommand: CliCommand;