@types/tar 4.0.0 → 4.0.4
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.
- tar/LICENSE +1 -1
- tar/README.md +5 -5
- tar/index.d.ts +68 -7
- tar/package.json +7 -4
tar/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
tar/README.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
This package contains type definitions for tar (https://github.com/npm/node-tar).
|
|
6
6
|
|
|
7
7
|
# Details
|
|
8
|
-
Files were exported from https://
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tar.
|
|
9
9
|
|
|
10
|
-
Additional Details
|
|
11
|
-
* Last updated:
|
|
12
|
-
* Dependencies:
|
|
10
|
+
### Additional Details
|
|
11
|
+
* Last updated: Wed, 18 Nov 2020 00:19:43 GMT
|
|
12
|
+
* Dependencies: [@types/minipass](https://npmjs.com/package/@types/minipass), [@types/node](https://npmjs.com/package/@types/node)
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by Maxime LUCE
|
|
16
|
+
These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), and [Connor Peet](https://github.com/connor4312).
|
tar/index.d.ts
CHANGED
|
@@ -6,20 +6,22 @@
|
|
|
6
6
|
|
|
7
7
|
/// <reference types="node" />
|
|
8
8
|
|
|
9
|
-
import stream = require(
|
|
10
|
-
import events = require(
|
|
11
|
-
import zlib = require(
|
|
9
|
+
import stream = require('stream');
|
|
10
|
+
import events = require('events');
|
|
11
|
+
import zlib = require('zlib');
|
|
12
|
+
import MiniPass = require('minipass');
|
|
12
13
|
|
|
13
14
|
// #region Interfaces
|
|
14
15
|
|
|
15
16
|
export interface HeaderProperties {
|
|
16
|
-
path
|
|
17
|
+
path: string;
|
|
17
18
|
mode?: number;
|
|
18
19
|
noProprietary?: boolean;
|
|
19
20
|
uid?: number;
|
|
20
21
|
gid?: number;
|
|
21
22
|
size?: number;
|
|
22
23
|
mtime?: number;
|
|
24
|
+
type?: string;
|
|
23
25
|
uname?: string;
|
|
24
26
|
gname?: string;
|
|
25
27
|
devmaj?: number;
|
|
@@ -234,6 +236,24 @@ export interface FileStat extends stream.Readable, Fields {
|
|
|
234
236
|
size: number;
|
|
235
237
|
}
|
|
236
238
|
|
|
239
|
+
export interface ReadEntry extends MiniPass, HeaderProperties {
|
|
240
|
+
/** The extended metadata object provided to the constructor. */
|
|
241
|
+
extended: any;
|
|
242
|
+
/** The global extended metadata object provided to the constructor. */
|
|
243
|
+
globalExtended: any;
|
|
244
|
+
/** The number of bytes remaining to be written into the stream. */
|
|
245
|
+
remain: number;
|
|
246
|
+
/** The number of 512-byte blocks remaining to be written into the stream. */
|
|
247
|
+
blockRemain: number;
|
|
248
|
+
/** Whether this entry should be ignored. */
|
|
249
|
+
ignore: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* True if this represents metadata about the next entry, false if it
|
|
252
|
+
* represents a filesystem object.
|
|
253
|
+
*/
|
|
254
|
+
meta: boolean;
|
|
255
|
+
}
|
|
256
|
+
|
|
237
257
|
export interface CreateOptions {
|
|
238
258
|
/**
|
|
239
259
|
* A function that will get called with (message, data)
|
|
@@ -317,11 +337,16 @@ export interface CreateOptions {
|
|
|
317
337
|
h?: boolean;
|
|
318
338
|
|
|
319
339
|
/**
|
|
320
|
-
*
|
|
340
|
+
* Suppress pax extended headers. Note that this means that long paths and
|
|
321
341
|
* linkpaths will be truncated, and large or negative numeric values
|
|
322
342
|
* may be interpreted incorrectly.
|
|
323
343
|
*/
|
|
324
344
|
noPax?: boolean;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* A path portion to prefix onto the entries in the archive.
|
|
348
|
+
*/
|
|
349
|
+
prefix?: string;
|
|
325
350
|
}
|
|
326
351
|
|
|
327
352
|
export interface ExtractOptions {
|
|
@@ -440,7 +465,43 @@ export interface ExtractOptions {
|
|
|
440
465
|
* group id, regardless of the gid field in the archive. Cannot be used
|
|
441
466
|
* along with preserveOwner. Requires also setting a uid option
|
|
442
467
|
*/
|
|
443
|
-
|
|
468
|
+
gid?: number;
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Set to true to omit writing mtime value for extracted entries.
|
|
472
|
+
* [Alias: m, no-mtime]
|
|
473
|
+
*/
|
|
474
|
+
noMtime?: boolean;
|
|
475
|
+
m?: boolean;
|
|
476
|
+
'no-mtime'?: boolean;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Provide a function that takes an entry object, and returns a stream,
|
|
480
|
+
* or any falsey value. If a stream is provided, then that stream's data
|
|
481
|
+
* will be written instead of the contents of the archive entry. If a
|
|
482
|
+
* falsey value is provided, then the entry is written to disk as normal.
|
|
483
|
+
* (To exclude items from extraction, use the filter option described above.)
|
|
484
|
+
*/
|
|
485
|
+
transform?(entry: ReadEntry): NodeJS.WritableStream | undefined | false | null;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* A function that gets called with (entry) for each entry that passes the
|
|
489
|
+
* filter.
|
|
490
|
+
*/
|
|
491
|
+
onentry?(entry: ReadEntry): void;
|
|
492
|
+
|
|
493
|
+
// The following options are mostly internal, but can be modified in some
|
|
494
|
+
// advanced use cases, such as re-using caches between runs.
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* The maximum buffer size for fs.read() operations (in bytes). Defaults to 16 MB.
|
|
498
|
+
*/
|
|
499
|
+
maxReadSize?: number;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* The maximum size of meta entries that is supported. Defaults to 1 MB.
|
|
503
|
+
*/
|
|
504
|
+
maxMetaEntrySize?: number;
|
|
444
505
|
}
|
|
445
506
|
|
|
446
507
|
export interface ListOptions {
|
|
@@ -655,7 +716,7 @@ export const x: typeof extract;
|
|
|
655
716
|
*
|
|
656
717
|
* Archive data should be written to the returned stream.
|
|
657
718
|
*/
|
|
658
|
-
export function list(options?: ListOptions, fileList?: ReadonlyArray<string>, callback?: (err?: Error) => void): stream.Writable;
|
|
719
|
+
export function list(options?: ListOptions & FileOptions, fileList?: ReadonlyArray<string>, callback?: (err?: Error) => void): stream.Writable;
|
|
659
720
|
|
|
660
721
|
/**
|
|
661
722
|
* List the contents of a tarball archive. The fileList is an array of paths
|
tar/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/tar",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "TypeScript definitions for tar",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -16,14 +16,17 @@
|
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
18
|
"main": "",
|
|
19
|
+
"types": "index.d.ts",
|
|
19
20
|
"repository": {
|
|
20
21
|
"type": "git",
|
|
21
|
-
"url": "https://
|
|
22
|
+
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
23
|
+
"directory": "types/tar"
|
|
22
24
|
},
|
|
23
25
|
"scripts": {},
|
|
24
26
|
"dependencies": {
|
|
27
|
+
"@types/minipass": "*",
|
|
25
28
|
"@types/node": "*"
|
|
26
29
|
},
|
|
27
|
-
"typesPublisherContentHash": "
|
|
28
|
-
"typeScriptVersion": "2
|
|
30
|
+
"typesPublisherContentHash": "30d331e61e5cf0331015727fdf7fd167e90c67d9c6f2edcb26a0aab9a4f4dd92",
|
|
31
|
+
"typeScriptVersion": "3.2"
|
|
29
32
|
}
|