@zip.js/zip.js 2.5.26 → 2.6.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 +62 -0
- package/cli-deno/mc-zip.js +1 -3
- package/dist/zip-fs-full.js +2 -43
- package/dist/zip-fs-full.min.js +1 -1
- package/dist/zip-fs.js +2 -43
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-full.js +2 -43
- 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 +2 -43
- package/dist/zip.min.js +1 -1
- package/index-fflate.js +1 -5
- package/index.d.ts +2 -14
- package/index.js +1 -5
- package/lib/core/codec-interface.js +1 -3
- package/lib/core/codec-pool.js +4 -15
- package/lib/core/io.js +1 -31
- package/lib/core/zip-fs-core.js +0 -1
- package/lib/zip-fs.js +2 -6
- package/lib/zip-full-fflate.js +2 -6
- package/lib/zip-full.js +2 -6
- package/lib/zip-no-worker-deflate.js +2 -6
- package/lib/zip-no-worker-fflate-deflate.js +2 -6
- package/lib/zip-no-worker-fflate-inflate.js +2 -6
- package/lib/zip-no-worker-fflate.js +2 -6
- package/lib/zip-no-worker-inflate.js +2 -6
- package/lib/zip-no-worker.js +2 -6
- package/lib/zip.js +2 -6
- package/package.json +1 -1
- package/tests/all/test-abort-signal-read.js +1 -1
- package/tests/all/test-abort-signal-write.js +1 -1
package/lib/core/io.js
CHANGED
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
const ERR_HTTP_STATUS = "HTTP error ";
|
|
32
32
|
const ERR_HTTP_RANGE = "HTTP Range not supported";
|
|
33
|
-
const ERR_NOT_SEEKABLE_READER = "Reader is not seekable";
|
|
34
33
|
|
|
35
34
|
const CONTENT_TYPE_TEXT_PLAIN = "text/plain";
|
|
36
35
|
const HTTP_HEADER_CONTENT_LENGTH = "Content-Length";
|
|
@@ -267,32 +266,6 @@ function flushArrayBuffers(blobWriter) {
|
|
|
267
266
|
blobWriter.arrayBuffers = [];
|
|
268
267
|
}
|
|
269
268
|
|
|
270
|
-
class ReadableStreamReader extends Stream {
|
|
271
|
-
|
|
272
|
-
constructor(readable) {
|
|
273
|
-
super();
|
|
274
|
-
if (!readable) {
|
|
275
|
-
this.readable = new ReadableStream({});
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
class WritableStreamWriter extends Writer {
|
|
281
|
-
|
|
282
|
-
constructor(writable, { preventClose } = {}) {
|
|
283
|
-
super();
|
|
284
|
-
this.preventClose = preventClose;
|
|
285
|
-
if (!writable) {
|
|
286
|
-
writable = new WritableStream({});
|
|
287
|
-
}
|
|
288
|
-
Object.defineProperty(this, "writable", {
|
|
289
|
-
get() {
|
|
290
|
-
return writable;
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
269
|
class FetchReader extends Reader {
|
|
297
270
|
|
|
298
271
|
constructor(url, options) {
|
|
@@ -559,8 +532,5 @@ export {
|
|
|
559
532
|
Uint8ArrayWriter,
|
|
560
533
|
HttpReader,
|
|
561
534
|
HttpRangeReader,
|
|
562
|
-
|
|
563
|
-
WritableStreamWriter,
|
|
564
|
-
ERR_HTTP_RANGE,
|
|
565
|
-
ERR_NOT_SEEKABLE_READER
|
|
535
|
+
ERR_HTTP_RANGE
|
|
566
536
|
};
|
package/lib/core/zip-fs-core.js
CHANGED
package/lib/zip-fs.js
CHANGED
|
@@ -30,10 +30,7 @@ import { configure } from "./core/configuration.js";
|
|
|
30
30
|
import configureWebWorker from "./z-worker-inline.js";
|
|
31
31
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
32
32
|
import initShimAsyncCodec from "./core/util/stream-codec-shim.js";
|
|
33
|
-
import {
|
|
34
|
-
terminateWorkers,
|
|
35
|
-
ERR_ABORT
|
|
36
|
-
} from "./core/codec-pool.js";
|
|
33
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
37
34
|
|
|
38
35
|
let baseURL;
|
|
39
36
|
try {
|
|
@@ -52,6 +49,5 @@ export {
|
|
|
52
49
|
configure,
|
|
53
50
|
getMimeType,
|
|
54
51
|
initShimAsyncCodec,
|
|
55
|
-
terminateWorkers
|
|
56
|
-
ERR_ABORT
|
|
52
|
+
terminateWorkers
|
|
57
53
|
};
|
package/lib/zip-full-fflate.js
CHANGED
|
@@ -31,10 +31,7 @@ import { configure } from "./core/configuration.js";
|
|
|
31
31
|
import configureWebWorker from "./z-worker-inline.js";
|
|
32
32
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
33
33
|
import initShimAsyncCodec from "./core/util/stream-codec-shim.js";
|
|
34
|
-
import {
|
|
35
|
-
terminateWorkers,
|
|
36
|
-
ERR_ABORT
|
|
37
|
-
} from "./core/codec-pool.js";
|
|
34
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
38
35
|
|
|
39
36
|
let baseURL;
|
|
40
37
|
try {
|
|
@@ -52,6 +49,5 @@ export {
|
|
|
52
49
|
configure,
|
|
53
50
|
getMimeType,
|
|
54
51
|
initShimAsyncCodec,
|
|
55
|
-
terminateWorkers
|
|
56
|
-
ERR_ABORT
|
|
52
|
+
terminateWorkers
|
|
57
53
|
};
|
package/lib/zip-full.js
CHANGED
|
@@ -32,10 +32,7 @@ import { configure } from "./core/configuration.js";
|
|
|
32
32
|
import configureWebWorker from "./z-worker-inline.js";
|
|
33
33
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
34
34
|
import initShimAsyncCodec from "./core/util/stream-codec-shim.js";
|
|
35
|
-
import {
|
|
36
|
-
terminateWorkers,
|
|
37
|
-
ERR_ABORT
|
|
38
|
-
} from "./core/codec-pool.js";
|
|
35
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
39
36
|
|
|
40
37
|
let baseURL;
|
|
41
38
|
try {
|
|
@@ -53,6 +50,5 @@ export {
|
|
|
53
50
|
configure,
|
|
54
51
|
getMimeType,
|
|
55
52
|
initShimAsyncCodec,
|
|
56
|
-
terminateWorkers
|
|
57
|
-
ERR_ABORT
|
|
53
|
+
terminateWorkers
|
|
58
54
|
};
|
|
@@ -29,10 +29,7 @@
|
|
|
29
29
|
import Deflate from "./core/streams/codecs/deflate.js";
|
|
30
30
|
import { configure } from "./core/configuration.js";
|
|
31
31
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
32
|
-
import {
|
|
33
|
-
terminateWorkers,
|
|
34
|
-
ERR_ABORT
|
|
35
|
-
} from "./core/codec-pool.js";
|
|
32
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
36
33
|
|
|
37
34
|
configure({ Deflate });
|
|
38
35
|
|
|
@@ -41,6 +38,5 @@ export * from "./core/zip-writer.js";
|
|
|
41
38
|
export {
|
|
42
39
|
configure,
|
|
43
40
|
getMimeType,
|
|
44
|
-
terminateWorkers
|
|
45
|
-
ERR_ABORT
|
|
41
|
+
terminateWorkers
|
|
46
42
|
};
|
|
@@ -29,10 +29,7 @@
|
|
|
29
29
|
import { Deflate } from "./zip-fflate-shim.js";
|
|
30
30
|
import { configure } from "./core/configuration.js";
|
|
31
31
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
32
|
-
import {
|
|
33
|
-
terminateWorkers,
|
|
34
|
-
ERR_ABORT
|
|
35
|
-
} from "./core/codec-pool.js";
|
|
32
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
36
33
|
|
|
37
34
|
configure({ Deflate });
|
|
38
35
|
|
|
@@ -41,6 +38,5 @@ export * from "./core/zip-writer.js";
|
|
|
41
38
|
export {
|
|
42
39
|
configure,
|
|
43
40
|
getMimeType,
|
|
44
|
-
terminateWorkers
|
|
45
|
-
ERR_ABORT
|
|
41
|
+
terminateWorkers
|
|
46
42
|
};
|
|
@@ -29,10 +29,7 @@
|
|
|
29
29
|
import { Inflate } from "./zip-fflate-shim.js";
|
|
30
30
|
import { configure } from "./core/configuration.js";
|
|
31
31
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
32
|
-
import {
|
|
33
|
-
terminateWorkers,
|
|
34
|
-
ERR_ABORT
|
|
35
|
-
} from "./core/codec-pool.js";
|
|
32
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
36
33
|
|
|
37
34
|
configure({ Inflate });
|
|
38
35
|
|
|
@@ -41,6 +38,5 @@ export * from "./core/zip-reader.js";
|
|
|
41
38
|
export {
|
|
42
39
|
configure,
|
|
43
40
|
getMimeType,
|
|
44
|
-
terminateWorkers
|
|
45
|
-
ERR_ABORT
|
|
41
|
+
terminateWorkers
|
|
46
42
|
};
|
|
@@ -29,10 +29,7 @@
|
|
|
29
29
|
import { Deflate, Inflate } from "./zip-fflate-shim.js";
|
|
30
30
|
import { configure } from "./core/configuration.js";
|
|
31
31
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
32
|
-
import {
|
|
33
|
-
terminateWorkers,
|
|
34
|
-
ERR_ABORT
|
|
35
|
-
} from "./core/codec-pool.js";
|
|
32
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
36
33
|
|
|
37
34
|
configure({ Deflate, Inflate });
|
|
38
35
|
|
|
@@ -42,6 +39,5 @@ export * from "./core/zip-writer.js";
|
|
|
42
39
|
export {
|
|
43
40
|
configure,
|
|
44
41
|
getMimeType,
|
|
45
|
-
terminateWorkers
|
|
46
|
-
ERR_ABORT
|
|
42
|
+
terminateWorkers
|
|
47
43
|
};
|
|
@@ -29,10 +29,7 @@
|
|
|
29
29
|
import Inflate from "./core/streams/codecs/inflate.js";
|
|
30
30
|
import { configure } from "./core/configuration.js";
|
|
31
31
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
32
|
-
import {
|
|
33
|
-
terminateWorkers,
|
|
34
|
-
ERR_ABORT
|
|
35
|
-
} from "./core/codec-pool.js";
|
|
32
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
36
33
|
|
|
37
34
|
configure({ Inflate });
|
|
38
35
|
|
|
@@ -41,6 +38,5 @@ export * from "./core/zip-reader.js";
|
|
|
41
38
|
export {
|
|
42
39
|
configure,
|
|
43
40
|
getMimeType,
|
|
44
|
-
terminateWorkers
|
|
45
|
-
ERR_ABORT
|
|
41
|
+
terminateWorkers
|
|
46
42
|
};
|
package/lib/zip-no-worker.js
CHANGED
|
@@ -30,10 +30,7 @@ import Deflate from "./core/streams/codecs/deflate.js";
|
|
|
30
30
|
import Inflate from "./core/streams/codecs/inflate.js";
|
|
31
31
|
import { configure } from "./core/configuration.js";
|
|
32
32
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
33
|
-
import {
|
|
34
|
-
terminateWorkers,
|
|
35
|
-
ERR_ABORT
|
|
36
|
-
} from "./core/codec-pool.js";
|
|
33
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
37
34
|
|
|
38
35
|
configure({ Deflate, Inflate });
|
|
39
36
|
|
|
@@ -43,6 +40,5 @@ export * from "./core/zip-writer.js";
|
|
|
43
40
|
export {
|
|
44
41
|
configure,
|
|
45
42
|
getMimeType,
|
|
46
|
-
terminateWorkers
|
|
47
|
-
ERR_ABORT
|
|
43
|
+
terminateWorkers
|
|
48
44
|
};
|
package/lib/zip.js
CHANGED
|
@@ -30,10 +30,7 @@ import { configure } from "./core/configuration.js";
|
|
|
30
30
|
import configureWebWorker from "./z-worker-inline.js";
|
|
31
31
|
import { getMimeType } from "./core/util/default-mime-type.js";
|
|
32
32
|
import initShimAsyncCodec from "./core/util/stream-codec-shim.js";
|
|
33
|
-
import {
|
|
34
|
-
terminateWorkers,
|
|
35
|
-
ERR_ABORT
|
|
36
|
-
} from "./core/codec-pool.js";
|
|
33
|
+
import { terminateWorkers } from "./core/codec-pool.js";
|
|
37
34
|
|
|
38
35
|
let baseURL;
|
|
39
36
|
try {
|
|
@@ -51,6 +48,5 @@ export {
|
|
|
51
48
|
configure,
|
|
52
49
|
getMimeType,
|
|
53
50
|
initShimAsyncCodec,
|
|
54
|
-
terminateWorkers
|
|
55
|
-
ERR_ABORT
|
|
51
|
+
terminateWorkers
|
|
56
52
|
};
|
package/package.json
CHANGED