Skip to content

restoreRepositoryExportSession

restoreRepositoryExportSession(source, options?): Promise<RepositoryExportSession>

Replay a saved export’s own bytes back into a fresh verification session.

This is the offline twin of readRepositoryExportStream: the same header, canonical-row, ordering, and trailer checks, run over a file rather than a response body, and against no expected repository — a saved export is checked for what it says it is, not for what a caller hoped it would be. It returns the session rather than the rows, because the two things a caller needs from a saved file are proof (complete, contentSha256, rowCount) and the cursor a resume continues from (header, lastDurableId).

Pass partial to accept bytes that stop before the trailer.

ReadableStream<Uint8Array<unknown>> | AsyncIterable<Uint8Array<unknown>, any, any>

RepositoryExportRestoreOptions = {}

Promise<RepositoryExportSession>