build: regenerate dist/ for v0.1.0
All checks were successful
ci / test (pull_request) Successful in 17s
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/'.
This commit is contained in:
29
dist/migrate.d.ts
vendored
Normal file
29
dist/migrate.d.ts
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import type Database from 'better-sqlite3';
|
||||
export interface MigrationFile {
|
||||
version: string;
|
||||
name: string;
|
||||
checksum: string;
|
||||
body: string;
|
||||
}
|
||||
export interface MigrationRow {
|
||||
version: string;
|
||||
name: string;
|
||||
checksum: string;
|
||||
applied_at: number;
|
||||
}
|
||||
export interface MigrationSummary {
|
||||
applied: number;
|
||||
pending: number;
|
||||
alreadyApplied: number;
|
||||
stamped: string[];
|
||||
}
|
||||
export interface ApplyOptions {
|
||||
logger?: (msg: string) => void;
|
||||
stampGenesis?: boolean;
|
||||
/** Default 'users'. Probe table that decides "is this a pre-existing prod DB needing genesis-stamping?". */
|
||||
genesisProbeTable?: string;
|
||||
}
|
||||
export declare function listMigrations(migrationsDir: string): MigrationFile[];
|
||||
export declare function readAppliedRows(db: Database.Database): MigrationRow[];
|
||||
export declare function applyMigrations(db: Database.Database, migrationsDir: string, opts?: ApplyOptions): MigrationSummary;
|
||||
export declare function stampMigration(db: Database.Database, migrationsDir: string, version: string): MigrationFile;
|
||||
Reference in New Issue
Block a user