UNPKG

3.77 kBTypeScriptView Raw
1/// <reference types="node" />
2import { type Stats } from 'node:fs';
3import { MkdirError } from './mkdir.js';
4import { Parser } from './parse.js';
5import { TarOptions } from './options.js';
6import { PathReservations } from './path-reservations.js';
7import { ReadEntry } from './read-entry.js';
8import { WarnData } from './warn-method.js';
9declare const ONENTRY: unique symbol;
10declare const CHECKFS: unique symbol;
11declare const CHECKFS2: unique symbol;
12declare const PRUNECACHE: unique symbol;
13declare const ISREUSABLE: unique symbol;
14declare const MAKEFS: unique symbol;
15declare const FILE: unique symbol;
16declare const DIRECTORY: unique symbol;
17declare const LINK: unique symbol;
18declare const SYMLINK: unique symbol;
19declare const HARDLINK: unique symbol;
20declare const UNSUPPORTED: unique symbol;
21declare const CHECKPATH: unique symbol;
22declare const MKDIR: unique symbol;
23declare const ONERROR: unique symbol;
24declare const PENDING: unique symbol;
25declare const PEND: unique symbol;
26declare const UNPEND: unique symbol;
27declare const ENDED: unique symbol;
28declare const MAYBECLOSE: unique symbol;
29declare const SKIP: unique symbol;
30declare const DOCHOWN: unique symbol;
31declare const UID: unique symbol;
32declare const GID: unique symbol;
33declare const CHECKED_CWD: unique symbol;
34export declare class Unpack extends Parser {
35 [ENDED]: boolean;
36 [CHECKED_CWD]: boolean;
37 [PENDING]: number;
38 reservations: PathReservations;
39 transform?: TarOptions['transform'];
40 writable: true;
41 readable: false;
42 dirCache: Exclude<TarOptions['dirCache'], undefined>;
43 uid?: number;
44 gid?: number;
45 setOwner: boolean;
46 preserveOwner: boolean;
47 processGid?: number;
48 processUid?: number;
49 maxDepth: number;
50 forceChown: boolean;
51 win32: boolean;
52 newer: boolean;
53 keep: boolean;
54 noMtime: boolean;
55 preservePaths: boolean;
56 unlink: boolean;
57 cwd: string;
58 strip: number;
59 processUmask: number;
60 umask: number;
61 dmode: number;
62 fmode: number;
63 chmod: boolean;
64 constructor(opt?: TarOptions);
65 warn(code: string, msg: string | Error, data?: WarnData): void;
66 [MAYBECLOSE](): void;
67 [CHECKPATH](entry: ReadEntry): boolean;
68 [ONENTRY](entry: ReadEntry): void;
69 [ONERROR](er: Error, entry: ReadEntry): void;
70 [MKDIR](dir: string, mode: number, cb: (er?: null | MkdirError, made?: string) => void): void;
71 [DOCHOWN](entry: ReadEntry): boolean;
72 [UID](entry: ReadEntry): number | undefined;
73 [GID](entry: ReadEntry): number | undefined;
74 [FILE](entry: ReadEntry, fullyDone: () => void): void;
75 [DIRECTORY](entry: ReadEntry, fullyDone: () => void): void;
76 [UNSUPPORTED](entry: ReadEntry): void;
77 [SYMLINK](entry: ReadEntry, done: () => void): void;
78 [HARDLINK](entry: ReadEntry, done: () => void): void;
79 [PEND](): void;
80 [UNPEND](): void;
81 [SKIP](entry: ReadEntry): void;
82 [ISREUSABLE](entry: ReadEntry, st: Stats): boolean;
83 [CHECKFS](entry: ReadEntry): void;
84 [PRUNECACHE](entry: ReadEntry): void;
85 [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void): void;
86 [MAKEFS](er: null | undefined | Error, entry: ReadEntry, done: () => void): void;
87 [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void;
88}
89export declare class UnpackSync extends Unpack {
90 sync: true;
91 [MAKEFS](er: null | Error | undefined, entry: ReadEntry): void;
92 [CHECKFS](entry: ReadEntry): void;
93 [FILE](entry: ReadEntry, done: () => void): void;
94 [DIRECTORY](entry: ReadEntry, done: () => void): void;
95 [MKDIR](dir: string, mode: number): unknown;
96 [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void;
97}
98export {};
99//# sourceMappingURL=unpack.d.ts.map
\No newline at end of file