extract-base-iterator 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DirectoryEntry.d.cts +12 -0
- package/dist/cjs/FileEntry.d.cts +12 -0
- package/dist/cjs/LinkEntry.d.cts +13 -0
- package/dist/cjs/SymbolicLinkEntry.d.cts +13 -0
- package/dist/cjs/fs/chmod.d.cts +3 -0
- package/dist/cjs/fs/chown.d.cts +3 -0
- package/dist/cjs/fs/lstatReal.d.cts +3 -0
- package/dist/cjs/fs/symlinkWin32.d.cts +2 -0
- package/dist/cjs/fs/utimes.d.cts +3 -0
- package/dist/cjs/index.d.cts +11 -0
- package/dist/cjs/polyfills.d.cts +1 -0
- package/dist/cjs/stripPath.d.cts +2 -0
- package/dist/cjs/types.d.cts +40 -0
- package/dist/cjs/validateAttributes.d.cts +1 -0
- package/dist/cjs/waitForAccess.d.cts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Mode } from 'fs';
|
|
2
|
+
import type { DirectoryAttributes, ExtractOptions, NoParamCallback } from './types.js';
|
|
3
|
+
export default class DirectoryEntry {
|
|
4
|
+
mode: Mode;
|
|
5
|
+
mtime: number;
|
|
6
|
+
path: string;
|
|
7
|
+
basename: string;
|
|
8
|
+
type: string;
|
|
9
|
+
constructor(attributes: DirectoryAttributes);
|
|
10
|
+
create(dest: string, options: ExtractOptions | NoParamCallback, callback?: NoParamCallback): undefined | Promise<boolean>;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Mode } from 'fs';
|
|
2
|
+
import type { ExtractOptions, FileAttributes, NoParamCallback } from './types.js';
|
|
3
|
+
export default class FileEntry {
|
|
4
|
+
mode: Mode;
|
|
5
|
+
mtime: number;
|
|
6
|
+
path: string;
|
|
7
|
+
basename: string;
|
|
8
|
+
type: string;
|
|
9
|
+
constructor(attributes: FileAttributes);
|
|
10
|
+
create(dest: string, options: ExtractOptions | NoParamCallback, callback?: NoParamCallback): undefined | Promise<boolean>;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Mode } from 'fs';
|
|
2
|
+
import type { ExtractOptions, LinkAttributes, NoParamCallback } from './types.js';
|
|
3
|
+
export default class LinkEntry {
|
|
4
|
+
mode: Mode;
|
|
5
|
+
mtime: number;
|
|
6
|
+
path: string;
|
|
7
|
+
linkpath: string;
|
|
8
|
+
basename: string;
|
|
9
|
+
type: string;
|
|
10
|
+
constructor(attributes: LinkAttributes);
|
|
11
|
+
create(dest: string, options: ExtractOptions | NoParamCallback, callback?: NoParamCallback): undefined | Promise<boolean>;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Mode } from 'fs';
|
|
2
|
+
import type { ExtractOptions, LinkAttributes, NoParamCallback } from './types.js';
|
|
3
|
+
export default class SymbolicLinkEntry {
|
|
4
|
+
mode: Mode;
|
|
5
|
+
mtime: number;
|
|
6
|
+
path: string;
|
|
7
|
+
linkpath: string;
|
|
8
|
+
basename: string;
|
|
9
|
+
type: string;
|
|
10
|
+
constructor(attributes: LinkAttributes);
|
|
11
|
+
create(dest: string, options: ExtractOptions | NoParamCallback, callback?: NoParamCallback): undefined | Promise<boolean>;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './polyfills.js';
|
|
2
|
+
import StackBaseIterator from 'stack-base-iterator';
|
|
3
|
+
import type { Entry } from './types.js';
|
|
4
|
+
export default class ExtractBaseIterator extends StackBaseIterator<Entry> {
|
|
5
|
+
}
|
|
6
|
+
export { default as DirectoryEntry } from './DirectoryEntry.js';
|
|
7
|
+
export { default as FileEntry } from './FileEntry.js';
|
|
8
|
+
export { default as LinkEntry } from './LinkEntry.js';
|
|
9
|
+
export { default as SymbolicLinkEntry } from './SymbolicLinkEntry.js';
|
|
10
|
+
export * from './types.js';
|
|
11
|
+
export { default as waitForAccess } from './waitForAccess.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Mode } from 'fs';
|
|
2
|
+
import type { StackOptions } from 'stack-base-iterator';
|
|
3
|
+
export interface ExtractOptions extends StackOptions {
|
|
4
|
+
force?: boolean;
|
|
5
|
+
strip?: number;
|
|
6
|
+
now?: Date;
|
|
7
|
+
}
|
|
8
|
+
export type NoParamCallback = (error?: Error) => void;
|
|
9
|
+
export type WriteFileFn = (path: string, options: object, callback: NoParamCallback) => void;
|
|
10
|
+
export interface FileAttributes {
|
|
11
|
+
mode: Mode;
|
|
12
|
+
mtime: number;
|
|
13
|
+
path: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DirectoryAttributes {
|
|
16
|
+
mode: Mode;
|
|
17
|
+
mtime: number | Date;
|
|
18
|
+
path: string;
|
|
19
|
+
}
|
|
20
|
+
export interface LinkAttributes {
|
|
21
|
+
mode: Mode;
|
|
22
|
+
mtime: number;
|
|
23
|
+
path: string;
|
|
24
|
+
linkpath: string;
|
|
25
|
+
}
|
|
26
|
+
import type { default as DirectoryEntry } from './DirectoryEntry.js';
|
|
27
|
+
import type { default as FileEntry } from './FileEntry.js';
|
|
28
|
+
import type { default as LinkEntry } from './LinkEntry.js';
|
|
29
|
+
import type { default as SymbolicLinkEntry } from './SymbolicLinkEntry.js';
|
|
30
|
+
export type Entry = DirectoryEntry | FileEntry | LinkEntry | SymbolicLinkEntry;
|
|
31
|
+
export interface AbstractEntry {
|
|
32
|
+
mode: Mode;
|
|
33
|
+
mtime: number;
|
|
34
|
+
path: string;
|
|
35
|
+
basename: string;
|
|
36
|
+
type: string;
|
|
37
|
+
linkpath?: string;
|
|
38
|
+
uid?: number;
|
|
39
|
+
gid?: number;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function validateAttributes(attributes: object, keys: string[]): undefined;
|