import { PGlite } from '@electric-sql/pglite'; import { ServerState } from './state.js'; import 'valibot'; interface DBServer { close(): Promise; readonly connectionLimit: number; readonly connectionString: string; readonly connectTimeout: number; readonly database: string; dump(destinationPath: string): Promise; readonly maxIdleConnectionLifetime: number; readonly password: string; readonly poolTimeout: number; readonly port: number; readonly prismaORMConnectionString: string; readonly socketTimeout: number; readonly sslMode: string; readonly terminalCommand: string; readonly username: string; } interface DBDump { dumpPath: string; } type DBServerPurpose = "database" | "shadow_database"; declare function startDBServer(purpose: DBServerPurpose, serverState: ServerState): Promise; type DumpDBOptions = { dataDir: string; db?: never; debug?: boolean; destinationPath?: D; } | { dataDir?: never; db: PGlite; debug?: boolean; destinationPath?: D; }; declare function dumpDB(options: DumpDBOptions): Promise<[D] extends [never] ? string : void>; export { type DBDump, type DBServer, type DBServerPurpose, type DumpDBOptions, dumpDB, startDBServer };