import { type ParsedArgs } from './args.js'; /** One thing `migrateSource()` changed, or found and left for a person. */ export interface MigrationNote { /** The line, starting at 1. */ line: number; /** What was done, or what to do. */ message: string; } /** What `migrateSource()` produced for one file's text. */ export interface MigrationOutcome { /** The text after migration; the input itself when nothing changed. */ text: string; /** Imports rewritten and names renamed. */ changes: MigrationNote[]; /** What it found and could not rewrite safely, for a person to finish. */ notes: MigrationNote[]; } /** * Migrates one file's text to 2.0's imports and 3.0's names: names the root import drops are imported * from their subpaths, names that moved under another name keep their local name through an alias, and * deprecated aliases are replaced. What cannot be rewritten safely — a namespace import of the root, a * dynamic import, a read of `estimatedCost` or of the OpenAPI tools' `skipped` — is reported instead * of guessed at. * * Markdown is migrated inside its TypeScript and JavaScript code blocks only. Running it twice changes * nothing the second time. */ export declare function migrateSource(text: string, options?: { file?: string; }): MigrationOutcome; /** Options for `migrateFiles()`. */ export interface MigrateFilesOptions { /** Writes the migrated files. Without it, nothing is written and the result says what would change. */ write?: boolean; } /** What `migrateFiles()` did with one file. */ export interface FileMigration extends Omit { /** The file, as given or found. */ file: string; /** Whether its text changed. */ changed: boolean; } /** * Migrates every source and Markdown file under the given paths, skipping `node_modules`, build * output, and version control. Files are written only with `write`. */ export declare function migrateFiles(paths: readonly string[], options?: MigrateFilesOptions): Promise; /** * `nexus migrate [paths…] [--write] [--check] [--json]` moves imports of the root to the subpaths the * 2.0 root import keeps them on. Without `--write` it only reports; `--check` exits 1 when a file still * needs migrating, for a CI job that keeps a codebase ready. */ export declare function runMigrateCommand({ positionals, flags }: ParsedArgs): Promise;