All checks were successful
ci / test (pull_request) Successful in 17s
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/'.
19 lines
735 B
TypeScript
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;
|