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.
@@ -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,3 @@
1
+ import type { NoParamCallback } from 'fs';
2
+ import type { AbstractEntry, ExtractOptions } from '../types.js';
3
+ export default function chmodFn(fullPath: string, entry: AbstractEntry, _options: ExtractOptions, callback: NoParamCallback): void;
@@ -0,0 +1,3 @@
1
+ import type { NoParamCallback } from 'fs';
2
+ import type { AbstractEntry, ExtractOptions } from '../types.js';
3
+ export default function chownFn(fullPath: string, entry: AbstractEntry, _options: ExtractOptions, callback: NoParamCallback): void;
@@ -0,0 +1,3 @@
1
+ import { type BigIntStats, type Stats } from 'fs';
2
+ export type Callback = (err: NodeJS.ErrnoException | null, stats?: Stats | BigIntStats) => void;
3
+ export default function lstatReal(path: string, callback: Callback): undefined;
@@ -0,0 +1,2 @@
1
+ import type { NoParamCallback } from 'fs';
2
+ export default function symlinkWin32(linkFullPath: string, linkpath: string, fullPath: string, callback: NoParamCallback): void;
@@ -0,0 +1,3 @@
1
+ import type { NoParamCallback } from 'fs';
2
+ import type { AbstractEntry, ExtractOptions } from '../types.js';
3
+ export default function utimes(fullPath: string, entry: AbstractEntry, options: ExtractOptions, callback: NoParamCallback): undefined;
@@ -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,2 @@
1
+ import type { ExtractOptions } from './types.js';
2
+ export default function stripPath(relativePath: string, options: ExtractOptions): string;
@@ -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;
@@ -0,0 +1,2 @@
1
+ import type { NoParamCallback } from './types.js';
2
+ export default function waitForAccess(fullPath: string, callback: NoParamCallback): undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extract-base-iterator",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "description": "Base iterator for extract iterators like tar-iterator and zip-iterator",
5
5
  "keywords": [
6
6
  "extract",