UNPKG

fast-extract

Version:

Extract contents from various archive types (tar, tar.bz2, tar.gz, tar.xz, tgz, zip)

44 lines (43 loc) 1.06 kB
import type { Transform, Writable } from 'stream'; export interface StreamSource extends NodeJS.ReadableStream { statusCode?: number; headers?: Record<string, string>; size?: number; basename?: string; filename?: string; } export interface SourceStats { size?: number; basename?: string; } export type Pipeline = Array<Transform | Writable>; export type Source = StreamSource | string; export interface Progress { percentage: number; transferred: number; length: number; remaining: number; eta: number; runtime: number; delta: number; speed: number; progress: string; basename?: string; } export type Options = { basename?: string; filename?: string; size?: number; type?: string; force?: boolean; strip?: number; progress?: (update: Progress) => void; concurrency?: number; }; export interface OptionsInternal extends Options { fullPath?: string; source?: Source; now?: Date; time?: number; } export type Callback = (error?: Error | null) => void;