UNPKG

fast-extract

Version:

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

37 lines (36 loc) 971 B
import type { Progress as ProgressBase } from 'progress-stream'; import type { Transform, Writable } from 'stream'; export interface StreamSource extends NodeJS.ReadableStream { statusCode?: number; headers?: object; 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 extends ProgressBase { progress: string; basename?: string; } export type Options = { basename?: string; filename?: string; size?: number; type?: string; force?: boolean; strip?: number; progress?: (update: Progress) => undefined; }; export interface OptionsInternal extends Options { _tempPaths?: string[]; fullPath?: string; source?: Source; now?: Date; time?: number; } export type Callback = (error?: Error) => undefined;