1 |
|
2 |
|
3 | import { type Stats } from 'fs';
|
4 | import { WriteEntry, WriteEntrySync, WriteEntryTar } from './write-entry.js';
|
5 | export declare class PackJob {
|
6 | path: string;
|
7 | absolute: string;
|
8 | entry?: WriteEntry | WriteEntryTar;
|
9 | stat?: Stats;
|
10 | readdir?: string[];
|
11 | pending: boolean;
|
12 | ignore: boolean;
|
13 | piped: boolean;
|
14 | constructor(path: string, absolute: string);
|
15 | }
|
16 | import { Minipass } from 'minipass';
|
17 | import * as zlib from 'minizlib';
|
18 | import { Yallist } from 'yallist';
|
19 | import { ReadEntry } from './read-entry.js';
|
20 | import { WarnEvent, type WarnData, type Warner } from './warn-method.js';
|
21 | declare const ONSTAT: unique symbol;
|
22 | declare const ENDED: unique symbol;
|
23 | declare const QUEUE: unique symbol;
|
24 | declare const CURRENT: unique symbol;
|
25 | declare const PROCESS: unique symbol;
|
26 | declare const PROCESSING: unique symbol;
|
27 | declare const PROCESSJOB: unique symbol;
|
28 | declare const JOBS: unique symbol;
|
29 | declare const JOBDONE: unique symbol;
|
30 | declare const ADDFSENTRY: unique symbol;
|
31 | declare const ADDTARENTRY: unique symbol;
|
32 | declare const STAT: unique symbol;
|
33 | declare const READDIR: unique symbol;
|
34 | declare const ONREADDIR: unique symbol;
|
35 | declare const PIPE: unique symbol;
|
36 | declare const ENTRY: unique symbol;
|
37 | declare const ENTRYOPT: unique symbol;
|
38 | declare const WRITEENTRYCLASS: unique symbol;
|
39 | declare const WRITE: unique symbol;
|
40 | declare const ONDRAIN: unique symbol;
|
41 | import { TarOptions } from './options.js';
|
42 | export declare class Pack extends Minipass<Buffer, ReadEntry | string, WarnEvent<Buffer>> implements Warner {
|
43 | opt: TarOptions;
|
44 | cwd: string;
|
45 | maxReadSize?: number;
|
46 | preservePaths: boolean;
|
47 | strict: boolean;
|
48 | noPax: boolean;
|
49 | prefix: string;
|
50 | linkCache: Exclude<TarOptions['linkCache'], undefined>;
|
51 | statCache: Exclude<TarOptions['statCache'], undefined>;
|
52 | file: string;
|
53 | portable: boolean;
|
54 | zip?: zlib.BrotliCompress | zlib.Gzip;
|
55 | readdirCache: Exclude<TarOptions['readdirCache'], undefined>;
|
56 | noDirRecurse: boolean;
|
57 | follow: boolean;
|
58 | noMtime: boolean;
|
59 | mtime?: Date;
|
60 | filter: Exclude<TarOptions['filter'], undefined>;
|
61 | jobs: number;
|
62 | [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync;
|
63 | onWriteEntry?: (entry: WriteEntry) => void;
|
64 | [QUEUE]: Yallist<PackJob>;
|
65 | [JOBS]: number;
|
66 | [PROCESSING]: boolean;
|
67 | [ENDED]: boolean;
|
68 | constructor(opt?: TarOptions);
|
69 | [WRITE](chunk: Buffer): boolean;
|
70 | add(path: string | ReadEntry): this;
|
71 | end(cb?: () => void): this;
|
72 | end(path: string | ReadEntry, cb?: () => void): this;
|
73 | end(path: string | ReadEntry, encoding?: Minipass.Encoding, cb?: () => void): this;
|
74 | write(path: string | ReadEntry): boolean;
|
75 | [ADDTARENTRY](p: ReadEntry): void;
|
76 | [ADDFSENTRY](p: string): void;
|
77 | [STAT](job: PackJob): void;
|
78 | [ONSTAT](job: PackJob, stat: Stats): void;
|
79 | [READDIR](job: PackJob): void;
|
80 | [ONREADDIR](job: PackJob, entries: string[]): void;
|
81 | [PROCESS](): void;
|
82 | get [CURRENT](): PackJob | undefined;
|
83 | [JOBDONE](_job: PackJob): void;
|
84 | [PROCESSJOB](job: PackJob): void;
|
85 | [ENTRYOPT](job: PackJob): TarOptions;
|
86 | [ENTRY](job: PackJob): WriteEntry | undefined;
|
87 | [ONDRAIN](): void;
|
88 | [PIPE](job: PackJob): void;
|
89 | pause(): void;
|
90 | warn(code: string, message: string | Error, data?: WarnData): void;
|
91 | }
|
92 | export declare class PackSync extends Pack {
|
93 | sync: true;
|
94 | constructor(opt: TarOptions);
|
95 | pause(): void;
|
96 | resume(): void;
|
97 | [STAT](job: PackJob): void;
|
98 | [READDIR](job: PackJob): void;
|
99 | [PIPE](job: PackJob): void;
|
100 | }
|
101 | export {};
|
102 |
|
\ | No newline at end of file |