import type { MigrationCommandRunner } from './types.js'; export interface PromptAwareRunnerOptions { /** Project root whose node_modules holds the pinned drizzle-kit. */ projectRoot: string; /** Verbose progress sink. Defaults to silence. */ log?: (message: string) => void; } /** * A migration command runner that can answer drizzle-kit's create-or-rename * prompt. * * ── The two-attempt strategy ───────────────────────────────────────────── * * 1. Run drizzle-kit normally. Fast and clean for the common additive diff, * which has no prompt at all. We deliberately do NOT fake a TTY here: * under a TTY drizzle renders interactive spinners that never settle in a * non-real terminal, so faking it unconditionally would hang the common * case to serve the rare one. * * 2. Only if drizzle aborted on its non-TTY create/rename resolver, retry * through the fake-TTY wrapper so the prompt actually renders and * keystrokes can answer it. * * CRITICAL: drizzle-kit 0.31 prints "Interactive prompts require a TTY" on * stderr and then EXITS 0. The retry must key off that message, never off a * non-zero exit code. Gating on failure is a bug that already shipped * compiler-side once (see run-compilation.ts) and silently skipped generation * for every add+drop diff — a compile that looks successful and produces no * migration. */ export declare function createPromptAwareMigrationRunner(options: PromptAwareRunnerOptions): MigrationCommandRunner; //# sourceMappingURL=prompt-runner.d.ts.map