@types/archiver
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -1,4 +0,7 @@ | ||
// Type definitions for archiver 3.0.0 | ||
// Type definitions for archiver 3.1 | ||
// Project: https://github.com/archiverjs/node-archiver | ||
// Definitions by: Esri <https://github.com/archiverjs/node-archiver>, Dolan Miu <https://github.com/dolanmiu>, Crevil <https://github.com/crevil> | ||
// Definitions by: Esri <https://github.com/archiverjs/node-archiver> | ||
// Dolan Miu <https://github.com/dolanmiu> | ||
// Crevil <https://github.com/crevil> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -11,2 +14,6 @@ | ||
type Partial<T> = { | ||
[P in keyof T]?: T[P]; | ||
}; | ||
declare function archiver(format: archiver.Format, options?: archiver.ArchiverOptions): archiver.Archiver; | ||
@@ -21,9 +28,27 @@ | ||
interface EntryData { | ||
name?: string; | ||
/** Sets the entry name including internal path */ | ||
name: string; | ||
/** Sets the entry date */ | ||
date?: Date | string; | ||
/** Sets the entry permissions */ | ||
mode?: number; | ||
/** | ||
* Sets a path prefix for the entry name. | ||
* Useful when working with methods like `directory` or `glob` | ||
*/ | ||
prefix?: string; | ||
/** | ||
* Sets the fs stat data for this entry allowing | ||
* for reduction of fs stat calls when stat data is already known | ||
*/ | ||
stats?: fs.Stats; | ||
date?: Date | string; | ||
mode?: number; | ||
} | ||
interface ZipEntryData extends EntryData { | ||
/** Sets the compression method to STORE */ | ||
store?: boolean; | ||
} | ||
type TarEntryData = EntryData; | ||
interface ProgressData { | ||
@@ -44,3 +69,3 @@ entries: { | ||
class ArchiverError extends Error { | ||
code: string; // Since archiver format support is modular, we cannot enumerate all possible error codes, as the modules can throw arbitrary ones. | ||
code: string; // Since archiver format support is modular, we cannot enumerate all possible error codes, as the modules can throw arbitrary ones. | ||
data: any; | ||
@@ -54,8 +79,8 @@ path?: any; | ||
abort(): this; | ||
append(source: stream.Readable | Buffer | string, name?: EntryData): this; | ||
append(source: stream.Readable | Buffer | string, data?: EntryData | ZipEntryData | TarEntryData): this; | ||
/** if false is passed for destpath, the path of a chunk of data in the archive is set to the root */ | ||
directory(dirpath: string, destpath: false | string, data?: EntryData | EntryDataFunction): this; | ||
directory(dirpath: string, destpath: false | string, data?: Partial<EntryData> | EntryDataFunction): this; | ||
file(filename: string, data: EntryData): this; | ||
glob(pattern: string, options?: glob.IOptions, data?: EntryData): this; | ||
glob(pattern: string, options?: glob.IOptions, data?: Partial<EntryData>): this; | ||
finalize(): Promise<void>; | ||
@@ -62,0 +87,0 @@ |
{ | ||
"name": "@types/archiver", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "TypeScript definitions for archiver", | ||
@@ -8,3 +8,3 @@ "license": "MIT", | ||
{ | ||
"name": "Esri", | ||
"name": " Esri", | ||
"url": "https://github.com/archiverjs/node-archiver" | ||
@@ -21,6 +21,11 @@ }, | ||
"githubUsername": "crevil" | ||
}, | ||
{ | ||
"name": "Piotr Błażejewicz", | ||
"url": "https://github.com/peterblazejewicz", | ||
"githubUsername": "peterblazejewicz" | ||
} | ||
], | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -35,4 +40,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "53c5e70d94cd8c974a625ebbf16a7bbb5bd4999c5006d515710b99fd04ea9501", | ||
"typeScriptVersion": "2.0" | ||
"typesPublisherContentHash": "76ffad7ad6b4121e08642387720c02328def6ba89284691d5385959debd8775d", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -5,13 +5,13 @@ # Installation | ||
# Summary | ||
This package contains type definitions for archiver ( https://github.com/archiverjs/node-archiver ). | ||
This package contains type definitions for archiver (https://github.com/archiverjs/node-archiver). | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/archiver | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/archiver. | ||
Additional Details | ||
* Last updated: Mon, 20 May 2019 17:25:06 GMT | ||
* Dependencies: @types/glob | ||
### Additional Details | ||
* Last updated: Tue, 25 Feb 2020 19:05:38 GMT | ||
* Dependencies: [@types/glob](https://npmjs.com/package/@types/glob) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Esri <https://github.com/archiverjs/node-archiver>, Dolan Miu <https://github.com/dolanmiu>, Crevil <https://github.com/crevil>. | ||
These definitions were written by [ Esri](https://github.com/archiverjs/node-archiver), [Dolan Miu](https://github.com/dolanmiu), [Crevil](https://github.com/crevil), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7526
107