/** * The result of comparing in-memory generator output against files on disk. * * - `stale`: file exists on disk but its content differs from what the generator produces today * - `missing`: file expected by the generator but absent from disk * - `extra`: file found on disk that the generator would not produce (stale artifact or manual addition) */ export interface DriftReport { stale: Array<{ filename: string; reason: 'stale'; }>; missing: Array<{ filename: string; reason: 'missing'; }>; extra: Array<{ filename: string; reason: 'extra'; }>; /** Total count of drifted files across all three categories. */ total: number; /** True when no files are stale, missing, or extra. */ clean: boolean; } /** * Compare in-memory generator output against files on disk. * * @param expected Map of filename (basename only, e.g. "models.ts") to formatted file content. * This must be the already-formatted output (prettier applied) to match the write path. * @param outputDir Absolute path to the directory that holds the committed generated files. * @returns A DriftReport describing any stale, missing, or extra files. */ export declare function compareOutput(expected: Map, outputDir: string): Promise; /** * Print per-file diagnostics for a DriftReport and optionally emit GitHub Actions * annotations and a step summary panel. * * When `opts.github` is true, this function emits `::error file=::` * workflow commands for each stale or missing file so GitHub renders inline * annotations on the PR. It also appends a markdown summary panel to the file * at `process.env.GITHUB_STEP_SUMMARY` when that env var is set. * * @param report The DriftReport returned by compareOutput(). * @param opts.github When true, emit GitHub Actions annotations. Set this only when * process.env.GITHUB_ACTIONS === 'true'. * @param opts.fixCommand The exact shell command consumers should run to fix drift. * @param opts.outputDir The output directory path relative to the repo root. When * provided, annotation file paths are prefixed so GitHub can * pin them to the correct file in the PR diff. * @returns An object with the appropriate process exit code: 0 when clean, 1 when drifted. */ export declare function reportDrift(report: DriftReport, opts: { github: boolean; fixCommand: string; outputDir?: string; }): { exitCode: number; }; //# sourceMappingURL=drift-check.d.ts.map