Files
sqlite-migrate/dist/cli.d.ts
Brendan Chen accd3ca340
All checks were successful
ci / test (pull_request) Successful in 17s
build: regenerate dist/ for v0.1.0
Pre-compiled ESM JS + .d.ts from tsconfig.build.json. Consumers install
via 'git+https://gitea.bchen.dev/...#v0.1.0' so the built output must
travel with the source. CI verifies in-sync via 'git diff --exit-code
dist/'.
2026-05-12 02:17:02 -07:00

19 lines
735 B
TypeScript

import type Database from 'better-sqlite3';
export type DbCommand = 'migrate' | 'status' | 'stamp';
export interface RunCliOptions {
/** Caller-controlled DB open. Wrapper closes it before returning. */
openDb: () => Database.Database;
migrationsDir: string;
command: DbCommand;
/** Required for `stamp`. */
version?: string;
/** Default false. Forwarded to applyMigrations. */
stampGenesis?: boolean;
/** Default 'users'. Forwarded to applyMigrations. */
genesisProbeTable?: string;
/** Default process.stdout / process.stderr. Wired for tests. */
stdout?: NodeJS.WritableStream;
stderr?: NodeJS.WritableStream;
}
export declare function runMigrateCli(opts: RunCliOptions): number;