@h4ad/node-modules-packer
Version:
<h1 align="center"> 🚀 Node Modules Packer </h1>
20 lines • 1.11 kB
TypeScript
import { ZipFile } from 'yazl';
export declare type TransformAsyncCode = (code: Uint8Array) => Promise<string>;
export interface ZipArtifact {
path: string;
/**
* @deprecated It will be removed in the next versions because it is not used
*/
name: string;
metadataPath?: string;
type: 'file' | 'directory';
shouldIgnore?: (fileName: string) => boolean;
transformer?: (filePath: string, metadataPath: string) => TransformAsyncCode | undefined;
}
export declare class FasterZip {
run(rootPath: string, outputPath: string, zipArtifacts: ZipArtifact[]): Promise<void>;
protected readdirAndAddToZip(zipFile: ZipFile, rootPath: string, source: ZipArtifact, path: string, onErrorOnStream: (reason?: any) => void): Promise<void>;
protected addFileToZip(zipFile: ZipFile, source: ZipArtifact, rootPath: string, filePath: string, onErrorOnStream: (reason?: any) => void): Promise<void>;
protected handleArtifact(artifact: ZipArtifact, zipfile: ZipFile, rootPath: string, onErrorOnStream: (reason?: any) => void): Promise<void>;
}
//# sourceMappingURL=zip.d.ts.map