/** * Client-side implementations of the six migration postprocessors the * compiler names in `ClientMigrationTarget.postprocessors`. * * These are behavior-for-behavior ports of `apps/compiler/src/runner/ * migrations.ts`, which is what makes the cutover verifiable: the output * matrix normalizes drizzle's known nondeterminism (codenames, journal * `when`, snapshot ids), so a correct port leaves every golden unchanged. * * Two differences from the server, both deliberate and both narrowing: * * - **Per-target, not a sweep.** The server iterated a fixed list of three * journal paths because it could not know which targets ran. The executor * invokes each postprocessor with the target that just generated, so each * handler touches exactly one migration directory. The executor's * `assertNewPathsBelongToTarget` enforces that. * * - **`harden-audit` uses the real prior inventory.** The server approximated * "files that existed before this compile" from the uploaded `existingFiles` * map. The executor hands us `inventoryBeforeTarget` — the actual on-disk * state before drizzle ran — which is a strictly better hash-drift guard. * * `d1-safety` is intentionally a NO-OP. It is named on every sqlite target but * has never had an implementation on either side, and plan 001 never specifies * one. Making it do something here would change behavior relative to the * server path and break golden parity — it must stay inert until it is * specified and landed as its own reviewed change. */ import type { MigrationPostprocessorHandler } from '../executor.js'; import type { ClientMigrationPostprocessor } from '../types.js'; import { type RlsJournalMigrationMeta, type TriggerJournalMigrationMeta } from './trigger-sql.js'; export interface MigrationPostprocessorDeps { /** * The compiler-computed RLS migration for this compile, from * `meta.rlsJournalMigration`. Undefined on non-Postgres targets. */ rlsJournalMigration?: RlsJournalMigrationMeta; /** * The compiler-computed trigger set, from `meta.triggerJournalMigration`. * Undefined when the project renders no SQL triggers. */ triggerJournalMigration?: TriggerJournalMigrationMeta; /** Verbose progress sink. Defaults to silence. */ log?: (message: string) => void; /** * Collector for non-fatal drift diagnostics (snapshot drift). The compile * command surfaces these the way the server's `commandWarnings` were. */ warnings?: string[]; } /** * Build the complete handler registry the executor requires. Every member of * `ClientMigrationPostprocessor` must be present — the executor throws on an * unregistered operation, which is the behavior that catches a compiler that * starts naming a postprocessor this CLI does not implement. */ export declare function createMigrationPostprocessors(deps?: MigrationPostprocessorDeps): Record; //# sourceMappingURL=index.d.ts.map