@zip.js/zip.js 2.7.69 → 2.7.71
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/deno.json +1 -1
- package/dist/z-worker-fflate.js +1 -1
- package/dist/z-worker-pako.js +1 -1
- package/dist/z-worker.js +1 -1
- package/dist/zip-fs-full.js +281 -121
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +281 -121
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-full.js +280 -120
- package/dist/zip-full.min.js +1 -1
- package/dist/zip-no-worker-deflate.min.js +1 -1
- package/dist/zip-no-worker-inflate.min.js +1 -1
- package/dist/zip-no-worker.min.js +1 -1
- package/dist/zip.js +280 -120
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +1 -1
- package/index-fflate.js +2 -0
- package/index.cjs +281 -121
- package/index.d.ts +26 -1
- package/index.js +2 -0
- package/index.min.js +1 -1
- package/lib/core/codec-pool.js +2 -0
- package/lib/core/constants.js +8 -1
- package/lib/core/io.js +6 -4
- package/lib/core/options.js +89 -0
- package/lib/core/streams/codec-stream.js +5 -0
- package/lib/core/streams/zip-crypto-stream.js +1 -1
- package/lib/core/streams/zip-entry-stream.js +7 -30
- package/lib/core/zip-entry.js +17 -6
- package/lib/core/zip-fs-core.js +1 -1
- package/lib/core/zip-reader.js +176 -46
- package/lib/core/zip-writer.js +69 -37
- package/lib/z-worker-inline.js +1 -1
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -555,7 +555,7 @@ export class SplitDataReader extends Reader<
|
|
|
555
555
|
/**
|
|
556
556
|
* Represents a URL stored into a `string`.
|
|
557
557
|
*/
|
|
558
|
-
|
|
558
|
+
type URLString = string;
|
|
559
559
|
|
|
560
560
|
/**
|
|
561
561
|
* Represents a {@link Reader} instance used to fetch data from a URL.
|
|
@@ -978,6 +978,23 @@ export interface ZipReaderOptions {
|
|
|
978
978
|
* @defaultValue false
|
|
979
979
|
*/
|
|
980
980
|
checkSignature?: boolean;
|
|
981
|
+
/**
|
|
982
|
+
* `true` to throw an {@link ERR_OVERLAPPING_ENTRY} error when calling {@link FileEntry#getData} if the entry
|
|
983
|
+
* overlaps with another entry on which {@link FileEntry#getData} has already been called (with the option
|
|
984
|
+
* `checkOverlappingEntry` or `checkOverlappingEntryOnly` set to `true`).
|
|
985
|
+
*
|
|
986
|
+
* @defaultValue false
|
|
987
|
+
*/
|
|
988
|
+
checkOverlappingEntry?: boolean;
|
|
989
|
+
/**
|
|
990
|
+
* `true` to throw an {@link ERR_OVERLAPPING_ENTRY} error when calling {@link FileEntry#getData} if the entry
|
|
991
|
+
* overlaps with another entry on which {@link FileEntry#getData} has already been called (with the option
|
|
992
|
+
* `checkOverlappingEntry` or `checkOverlappingEntryOnly` set to `true`) without trying to read the content of the
|
|
993
|
+
* entry.
|
|
994
|
+
*
|
|
995
|
+
* @defaultValue false
|
|
996
|
+
*/
|
|
997
|
+
checkOverlappingEntryOnly?: boolean;
|
|
981
998
|
/**
|
|
982
999
|
* The password used to decrypt the content of the entry.
|
|
983
1000
|
*/
|
|
@@ -2284,6 +2301,10 @@ export const ERR_UNSUPPORTED_COMPRESSION: string;
|
|
|
2284
2301
|
* Invalid signature error
|
|
2285
2302
|
*/
|
|
2286
2303
|
export const ERR_INVALID_SIGNATURE: string;
|
|
2304
|
+
/**
|
|
2305
|
+
* Invalid uncompressed size error
|
|
2306
|
+
*/
|
|
2307
|
+
export const ERR_INVALID_UNCOMPRESSED_SIZE: string;
|
|
2287
2308
|
/**
|
|
2288
2309
|
* Invalid password error
|
|
2289
2310
|
*/
|
|
@@ -2328,6 +2349,10 @@ export const ERR_UNSUPPORTED_FORMAT: string;
|
|
|
2328
2349
|
* Split zip file error
|
|
2329
2350
|
*/
|
|
2330
2351
|
export const ERR_SPLIT_ZIP_FILE: string;
|
|
2352
|
+
/**
|
|
2353
|
+
* Overlapping entry error
|
|
2354
|
+
*/
|
|
2355
|
+
export const ERR_OVERLAPPING_ENTRY: string;
|
|
2331
2356
|
/**
|
|
2332
2357
|
* Iteration completed too soon error
|
|
2333
2358
|
*/
|
package/index.js
CHANGED
|
@@ -71,6 +71,7 @@ export {
|
|
|
71
71
|
ERR_UNSUPPORTED_ENCRYPTION,
|
|
72
72
|
ERR_UNSUPPORTED_COMPRESSION,
|
|
73
73
|
ERR_INVALID_SIGNATURE,
|
|
74
|
+
ERR_INVALID_UNCOMPRESSED_SIZE,
|
|
74
75
|
ERR_INVALID_PASSWORD,
|
|
75
76
|
ERR_DUPLICATED_NAME,
|
|
76
77
|
ERR_INVALID_COMMENT,
|
|
@@ -84,6 +85,7 @@ export {
|
|
|
84
85
|
ERR_UNDEFINED_UNCOMPRESSED_SIZE,
|
|
85
86
|
ERR_ZIP_NOT_EMPTY,
|
|
86
87
|
ERR_SPLIT_ZIP_FILE,
|
|
88
|
+
ERR_OVERLAPPING_ENTRY,
|
|
87
89
|
ERR_ITERATOR_COMPLETED_TOO_SOON,
|
|
88
90
|
ERR_WRITER_NOT_INITIALIZED
|
|
89
91
|
} from "./lib/zip-fs.js";
|