UNPKG

@pgxsinkit/pgwasm

Version:
17 lines • 1.13 kB
/** * Store backups: a data directory as a tarball (ADR-0035). pgwasm owns the format so every build * produces the same artefact: ustar, entry names relative to the data directory with a leading `/`, * a directory before its contents, optionally gzipped. Backups written by earlier releases restore. */ import type { DataDirEntry } from "../build/seam"; import type { DumpCompression } from "../interface"; /** * Normalize a backup member's name to a data-directory path: a leading `/`, no trailing `/`, no empty, * `.` or `..` segments. A name that would leave the data directory is refused. */ export declare function normalizeDataDirPath(name: string): string; /** Read a Store backup (gzipped or not, whatever its MIME type or name says) into entries. */ export declare function readDataDirArchive(archive: Blob): Promise<DataDirEntry[]>; /** Write entries as a Store backup `File`, named `<baseName>.tar` or `<baseName>.tar.gz`. */ export declare function writeDataDirArchive(entries: readonly DataDirEntry[], baseName: string, compression?: DumpCompression): Promise<File>; //# sourceMappingURL=data-dir-archive.d.ts.map