import type { DatabaseConfig, MigrationStorage } from "./DatabaseConfig.js"; import { type ValidScriptFormat, type ValidScriptName } from "./script-name-parsing/index.js"; import { type SortedScripts } from "./script-utils.js"; import { type AbsolutePath, type FileBaseName } from "./utils.js"; type ResolveScriptFn = OmitThisParameter["resolveScript"], undefined>>; /** * Prepares script application with snapshot support. * * - If no snapshot exists, or if _none_ of the snapshot's archived scripts have * been executed, do nothing; we let umzug run the migrations as normal. * * - If some archived scripts have been executed, run the missing ones from the * archive and mark snapshot as executed. This essentially catches the db up * to the snapshot. * * Then, return to umzug which migrations it will see, accounting for the * env-fallback logic of snapshots. */ export declare function prepareScriptApplication(opts: { env: string; /** All script file paths on disk (absolute paths), already sorted */ sortedScripts: SortedScripts; snapshotArchivesDirectory: AbsolutePath; supportedScriptFormats: readonly ValidScriptFormat[]; storage: MigrationStorage; context: Context; resolveScript: ResolveScriptFn; logger?: { log: (msg: string) => void; }; /** If specified, only apply snapshots and migrations up to this script name */ upTo?: FileBaseName; }): Promise<{ migrationsForUmzug: ValidScriptName[]; }>; export {}; //# sourceMappingURL=script-operations.d.ts.map