/** * Build a deterministic zip archive of a directory. * * Uses fflate (pure JS) so publish works on platforms without a system * `zip` binary (notably Windows). Entries are walked via the platform * FileSystem service, sorted by relative path, and stamped with a fixed * mtime so the byte output is reproducible. * * @experimental This API is unstable and may change without notice. */ import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; /** @experimental This API is unstable and may change without notice. */ export interface BuildZipArchiveOptions { /** * Glob patterns matched against archive-relative POSIX paths. Absent or * empty leaves the archive exactly as it would have been built without this * option — the default path is unchanged, so already-published integrity * digests stay reproducible. */ readonly ignore?: ReadonlyArray | undefined; } /** One file in the deterministic Registry archive plan. */ export interface ArchivePlanFile { readonly path: string; readonly size: number; readonly matchedPatterns: ReadonlyArray; } /** Match accounting for one declared ignore pattern. */ export interface ArchivePlanPattern { readonly pattern: string; readonly matchCount: number; } /** The effective Registry-only distribution boundary before ZIP construction. */ export interface ArchivePlan { readonly included: ReadonlyArray; readonly excluded: ReadonlyArray; readonly patterns: ReadonlyArray; readonly warnings: ReadonlyArray; readonly includedCount: number; readonly excludedCount: number; readonly uncompressedBytes: number; } /** Deterministic archive bytes paired with the exact plan that produced them. */ export interface PlannedZipArchive { readonly archive: Uint8Array; readonly plan: ArchivePlan; } /** * Build a zip archive of a directory. * Files are stored at the root of the zip (no enclosing directory). * Directory entries are not emitted. */ export declare const planZipArchive: (dir: string, options?: BuildZipArchiveOptions) => Effect.Effect<{ archive: Uint8Array; plan: { included: ArchivePlanFile[]; excluded: ArchivePlanFile[]; patterns: { pattern: string; matchCount: number; }[]; warnings: string[]; includedCount: number; excludedCount: number; uncompressedBytes: number; }; }, import("../app-error/app-error.ts").AppError, Path.Path | FileSystem.FileSystem>; export declare const buildZipArchive: (dir: string, options?: BuildZipArchiveOptions) => Effect.Effect, import("../app-error/app-error.ts").AppError, Path.Path | FileSystem.FileSystem>; //# sourceMappingURL=build-zip-archive.d.ts.map