tar-iterator 2.2.8 → 2.2.9

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,11 @@
1
+ import { type FileAttributes, FileEntry, type NoParamCallback } from 'extract-base-iterator';
2
+ import type Lock from './lib/Lock.js';
3
+ import type { ExtractOptions } from './types.js';
4
+ export default class TarFileEntry extends FileEntry {
5
+ private lock;
6
+ private stream;
7
+ constructor(attributes: FileAttributes, stream: NodeJS.ReadableStream, lock: Lock);
8
+ create(dest: string, options: ExtractOptions | NoParamCallback, callback: NoParamCallback): undefined | Promise<boolean>;
9
+ _writeFile(fullPath: string, _options: ExtractOptions, callback: NoParamCallback): undefined;
10
+ destroy(): void;
11
+ }
@@ -0,0 +1,9 @@
1
+ import BaseIterator from 'extract-base-iterator';
2
+ import Lock from './lib/Lock.js';
3
+ import type { ExtractOptions } from './types.js';
4
+ export default class TarIterator extends BaseIterator {
5
+ lock: Lock;
6
+ extract: NodeJS.WritableStream;
7
+ constructor(source: string | NodeJS.ReadableStream, options?: ExtractOptions);
8
+ end(err?: Error): void;
9
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './TarIterator.js';
2
+ export * from './types.js';
@@ -0,0 +1,9 @@
1
+ import BaseIterator from 'extract-base-iterator';
2
+ export default class Lock {
3
+ private count;
4
+ iterator: BaseIterator;
5
+ err: Error;
6
+ retain(): void;
7
+ release(): void;
8
+ private __destroy;
9
+ }
@@ -0,0 +1,5 @@
1
+ import type Iterator from './TarIterator.js';
2
+ import type { Entry, EntryCallback } from './types.js';
3
+ export type TarNext = () => undefined;
4
+ export type NextCallback = (error?: Error, entry?: Entry, next?: TarNext) => undefined;
5
+ export default function nextEntry(next: TarNext, iterator: Iterator, callback: EntryCallback): undefined;
@@ -0,0 +1,5 @@
1
+ export { DirectoryEntry, type Entry, type ExtractOptions, LinkEntry, SymbolicLinkEntry } from 'extract-base-iterator';
2
+ export { default as FileEntry } from './FileEntry.js';
3
+ export type { default as Lock } from './lib/Lock.js';
4
+ import type { Entry } from 'extract-base-iterator';
5
+ export type EntryCallback = (error?: Error, result?: IteratorResult<Entry>) => undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tar-iterator",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "description": "Extract contents from tar archive type using an iterator API using streams or paths. Use stream interface and pipe transforms to add decompression algorithms",
5
5
  "keywords": [
6
6
  "extract",