import { MigrationFile } from '../types'; /** * Calculate checksum of a file */ export declare const calculateChecksum: (filePath: string) => string; export interface MigrationLoaderHandle { loadMigrations(): Promise; invalidateCache(): void; getPendingMigrations(appliedVersions: string[]): Promise; getMigration(version: string): Promise; getNextVersion(): Promise; calculateChecksum(filePath: string): string; } /** * Create a migration loader for the given directory. * * Internally memoizes `loadMigrations()` — the runner consults the loader * many times per command (per-version checksum check, per-rollback * lookup, status display) — without this, each call re-runs `readdirSync`, * re-imports every migration module, and re-md5s every file, turning an * O(N) operation into O(N²) in IO and require()s. Call `invalidateCache()` * if you need to pick up newly-added files mid-process. */ export declare const createMigrationLoader: (migrationsDir: string) => MigrationLoaderHandle; //# sourceMappingURL=loader.d.ts.map