histoire
Version:
A fast story book powered by Vite
16 lines • 1.25 kB
TypeScript
import type { ArtifactInventoryEntry } from './artifact-schema.js';
import { Buffer } from 'node:buffer';
/** Bound aggregate validation work before opening inventory files. */
export declare const MAX_ARTIFACT_INVENTORY_BYTES: number;
/** Opens only regular inventory files below canonical root, rejecting symlinks. */
export declare function openArtifactFile(root: string, path: string, expected?: ArtifactInventoryEntry): Promise<{
file: import("fs/promises").FileHandle;
stat: import("fs").Stats;
}>;
/** Verify one already-owned descriptor without closing or replacing its byte authority. */
export declare function verifyOpenedArtifactFile(root: string, entry: ArtifactInventoryEntry, owned: Awaited<ReturnType<typeof openArtifactFile>>, retain?: boolean): Promise<Buffer<ArrayBuffer>>;
/** Stream bounded bytes into digest; optionally retain only small private text. */
export declare function readArtifactFile(root: string, entry: ArtifactInventoryEntry, retain?: boolean): Promise<Buffer<ArrayBuffer>>;
/** Reads manifest with fixed allocation and one extra byte to detect growth. */
export declare function readArtifactManifest(root: string, maximum: number): Promise<Buffer<ArrayBuffer>>;
//# sourceMappingURL=artifact-files.d.ts.map