node-stream-zip 1.13.6 → 1.14.0

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/README.md CHANGED
@@ -214,7 +214,10 @@ npm test
214
214
  ## Known issues
215
215
 
216
216
  - [utf8](https://github.com/rubyzip/rubyzip/wiki/Files-with-non-ascii-filenames) file names
217
- - AES encrypted files
217
+
218
+ ## Out of scope
219
+
220
+ - AES encrypted files: the library will throw an error if you try to open it
218
221
 
219
222
  ## Contributors
220
223
 
@@ -121,29 +121,29 @@ declare namespace StreamZip {
121
121
  */
122
122
  offset: number;
123
123
  }
124
- }
125
124
 
126
- type StreamZipOptions = StreamZip.StreamZipOptions;
127
- type ZipEntry = StreamZip.ZipEntry;
125
+ class StreamZipAsync {
126
+ constructor(config: StreamZipOptions);
128
127
 
129
- declare class StreamZipAsync {
130
- constructor(config: StreamZipOptions);
128
+ entriesCount: Promise<number>;
129
+ comment: Promise<string>;
131
130
 
132
- entriesCount: Promise<number>;
133
- comment: Promise<string>;
131
+ entry(name: string): Promise<ZipEntry | undefined>;
132
+ entries(): Promise<{ [name: string]: ZipEntry }>;
133
+ entryData(entry: string | ZipEntry): Promise<Buffer>;
134
+ stream(entry: string | ZipEntry): Promise<NodeJS.ReadableStream>;
135
+ extract(entry: string | ZipEntry | null, outPath: string): Promise<number | undefined>;
134
136
 
135
- entry(name: string): Promise<ZipEntry | undefined>;
136
- entries(): Promise<{ [name: string]: ZipEntry }>;
137
- entryData(entry: string | ZipEntry): Promise<Buffer>;
138
- stream(entry: string | ZipEntry): Promise<NodeJS.ReadableStream>;
139
- extract(entry: string | ZipEntry | null, outPath: string): Promise<number | undefined>;
137
+ on(event: 'entry', handler: (entry: ZipEntry) => void): void;
138
+ on(event: 'extract', handler: (entry: ZipEntry, outPath: string) => void): void;
140
139
 
141
- on(event: 'entry', handler: (entry: ZipEntry) => void): void;
142
- on(event: 'extract', handler: (entry: ZipEntry, outPath: string) => void): void;
143
-
144
- close(): Promise<void>;
140
+ close(): Promise<void>;
141
+ }
145
142
  }
146
143
 
144
+ type StreamZipOptions = StreamZip.StreamZipOptions;
145
+ type ZipEntry = StreamZip.ZipEntry;
146
+
147
147
  declare class StreamZip {
148
148
  constructor(config: StreamZipOptions);
149
149
 
@@ -187,7 +187,7 @@ declare class StreamZip {
187
187
 
188
188
  close(callback?: (err?: any) => void): void;
189
189
 
190
- static async: typeof StreamZipAsync;
190
+ static async: typeof StreamZip.StreamZipAsync;
191
191
  }
192
192
 
193
193
  export = StreamZip;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-stream-zip",
3
- "version": "1.13.6",
3
+ "version": "1.14.0",
4
4
  "description": "node.js library for reading and extraction of ZIP archives",
5
5
  "keywords": [
6
6
  "zip",