import { type MigrationHazard, type Severity } from './safety.js'; import { type PragmaKind } from './pragma.js'; import type { AppliedState } from './applied.js'; export interface FileHazards { file: string; hazards: MigrationHazard[]; /** Hazard classes this file raises but does not declare a pragma for. */ undeclared: PragmaKind[]; } export interface MigrationCheckResult { safe: boolean; hasDestructive: boolean; hasLocking: boolean; hasDynamic: boolean; /** True when every hazard raised is declared by its own migration. */ declared: boolean; fileHazards: FileHazards[]; } /** * Scans pending migrations for destructive and locking operations. * * `applied` is what the tracker table records as already applied (see * `readAppliedState`); applied entries are skipped — their hazards are * history, not a decision the operator still gets to make. Membership is by * tag on an upgraded tracker, or by the old `when`-timestamp high-water mark * on a tracker `applyMigrations` has not upgraded yet. Omitting `applied` * (or passing null — no tracker table) scans every entry, the correct * behaviour when nothing is known to be applied. */ export declare function checkMigrations(migrationsFolder: string, applied?: AppliedState | null): MigrationCheckResult; export declare function formatCheckResult(result: MigrationCheckResult): string; export type { MigrationHazard, Severity }; //# sourceMappingURL=check.d.ts.map