UNPKG

874 BTypeScriptView Raw
1/// <reference types="node" />
2import { FakeFS, PortablePath, ZipCompression, ZipFS } from '@yarnpkg/fslib';
3interface MakeArchiveFromDirectoryOptions {
4 baseFs?: FakeFS<PortablePath>;
5 prefixPath?: PortablePath | null;
6 compressionLevel?: ZipCompression;
7 inMemory?: boolean;
8}
9export declare function makeArchiveFromDirectory(source: PortablePath, { baseFs, prefixPath, compressionLevel, inMemory }?: MakeArchiveFromDirectoryOptions): Promise<ZipFS>;
10interface ExtractBufferOptions {
11 compressionLevel?: ZipCompression;
12 prefixPath?: PortablePath;
13 stripComponents?: number;
14}
15export declare function convertToZip(tgz: Buffer, opts: ExtractBufferOptions): Promise<ZipFS>;
16export declare function extractArchiveTo<T extends FakeFS<PortablePath>>(tgz: Buffer, targetFs: T, { stripComponents, prefixPath }?: ExtractBufferOptions): Promise<T>;
17export {};