@cj-tech-master/excelts 4.2.1-canary.20260111102127.f808a37 → 4.2.1
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/THIRD_PARTY_NOTICES.md +31 -0
- package/dist/browser/index.browser.d.ts +0 -1
- package/dist/browser/index.browser.js +0 -12
- package/dist/browser/modules/archive/byte-queue.d.ts +18 -0
- package/dist/browser/modules/archive/byte-queue.js +125 -0
- package/dist/browser/modules/archive/{compression/compress.base.js → compress.base.js} +1 -1
- package/dist/browser/modules/archive/{compression/compress.browser.d.ts → compress.browser.d.ts} +8 -2
- package/dist/{esm/modules/archive/compression → browser/modules/archive}/compress.browser.js +11 -3
- package/dist/browser/modules/archive/{compression/compress.d.ts → compress.d.ts} +2 -2
- package/dist/{esm/modules/archive/compression → browser/modules/archive}/compress.js +1 -1
- package/dist/browser/modules/archive/{compression/crc32.browser.d.ts → crc32.browser.d.ts} +1 -1
- package/dist/browser/modules/archive/{compression/crc32.d.ts → crc32.d.ts} +1 -1
- package/dist/browser/modules/archive/{compression/crc32.js → crc32.js} +1 -1
- package/dist/browser/modules/archive/defaults.d.ts +0 -1
- package/dist/browser/modules/archive/defaults.js +3 -6
- package/dist/browser/modules/archive/{compression/deflate-fallback.js → deflate-fallback.js} +1 -1
- package/dist/browser/modules/archive/{unzip/extract.d.ts → extract.d.ts} +2 -2
- package/dist/browser/modules/archive/index.base.d.ts +4 -4
- package/dist/browser/modules/archive/index.base.js +6 -3
- package/dist/browser/modules/archive/index.browser.d.ts +4 -3
- package/dist/browser/modules/archive/index.browser.js +7 -3
- package/dist/browser/modules/archive/index.d.ts +4 -3
- package/dist/browser/modules/archive/index.js +5 -3
- package/dist/browser/modules/archive/{unzip/stream.base.d.ts → parse.base.d.ts} +2 -36
- package/dist/browser/modules/archive/parse.base.js +644 -0
- package/dist/browser/modules/archive/{unzip/stream.browser.d.ts → parse.browser.d.ts} +1 -1
- package/dist/{esm/modules/archive/unzip/stream.browser.js → browser/modules/archive/parse.browser.js} +110 -371
- package/dist/browser/modules/archive/{unzip/stream.d.ts → parse.d.ts} +2 -2
- package/dist/{esm/modules/archive/unzip/stream.js → browser/modules/archive/parse.js} +5 -6
- package/dist/browser/modules/archive/{compression/streaming-compress.browser.d.ts → streaming-compress.browser.d.ts} +2 -2
- package/dist/browser/modules/archive/{compression/streaming-compress.browser.js → streaming-compress.browser.js} +3 -3
- package/dist/browser/modules/archive/{compression/streaming-compress.d.ts → streaming-compress.d.ts} +2 -2
- package/dist/browser/modules/archive/{compression/streaming-compress.js → streaming-compress.js} +2 -2
- package/dist/browser/modules/archive/{zip/stream.d.ts → streaming-zip.d.ts} +5 -28
- package/dist/{esm/modules/archive/zip/stream.js → browser/modules/archive/streaming-zip.js} +48 -192
- package/dist/browser/modules/archive/utils/bytes.js +16 -16
- package/dist/browser/modules/archive/utils/parse-buffer.js +23 -21
- package/dist/browser/modules/archive/utils/timestamps.js +1 -62
- package/dist/browser/modules/archive/utils/zip-extra-fields.d.ts +1 -1
- package/dist/browser/modules/archive/utils/zip-extra-fields.js +14 -26
- package/dist/browser/modules/archive/utils/zip-extra.d.ts +18 -0
- package/dist/browser/modules/archive/utils/zip-extra.js +68 -0
- package/dist/browser/modules/archive/zip-builder.d.ts +117 -0
- package/dist/browser/modules/archive/zip-builder.js +292 -0
- package/dist/browser/modules/archive/zip-constants.d.ts +18 -0
- package/dist/browser/modules/archive/zip-constants.js +23 -0
- package/dist/{esm/modules/archive/zip → browser/modules/archive}/zip-entry-metadata.js +3 -3
- package/dist/{types/modules/archive/unzip → browser/modules/archive}/zip-parser.d.ts +1 -1
- package/dist/{esm/modules/archive/unzip → browser/modules/archive}/zip-parser.js +24 -38
- package/dist/browser/modules/archive/{zip-spec/zip-records.d.ts → zip-records.d.ts} +0 -20
- package/dist/browser/modules/archive/zip-records.js +84 -0
- package/dist/browser/modules/excel/stream/workbook-reader.browser.js +1 -1
- package/dist/browser/modules/excel/stream/workbook-writer.browser.d.ts +1 -1
- package/dist/browser/modules/excel/stream/workbook-writer.browser.js +1 -1
- package/dist/browser/modules/excel/xlsx/xlsx.browser.js +6 -3
- package/dist/browser/modules/excel/xlsx/xlsx.js +1 -1
- package/dist/browser/modules/stream/streams.browser.d.ts +30 -28
- package/dist/browser/modules/stream/streams.browser.js +710 -830
- package/dist/browser/modules/stream/streams.js +58 -140
- package/dist/cjs/modules/archive/byte-queue.js +129 -0
- package/dist/cjs/modules/archive/{compression/compress.base.js → compress.base.js} +1 -1
- package/dist/cjs/modules/archive/{compression/compress.browser.js → compress.browser.js} +11 -3
- package/dist/cjs/modules/archive/{compression/compress.js → compress.js} +1 -1
- package/dist/cjs/modules/archive/{compression/crc32.js → crc32.js} +1 -1
- package/dist/cjs/modules/archive/defaults.js +4 -7
- package/dist/cjs/modules/archive/{compression/deflate-fallback.js → deflate-fallback.js} +1 -1
- package/dist/cjs/modules/archive/index.base.js +19 -9
- package/dist/cjs/modules/archive/index.browser.js +10 -4
- package/dist/cjs/modules/archive/index.js +8 -4
- package/dist/cjs/modules/archive/parse.base.js +666 -0
- package/dist/cjs/modules/archive/{unzip/stream.browser.js → parse.browser.js} +111 -372
- package/dist/cjs/modules/archive/{unzip/stream.js → parse.js} +8 -9
- package/dist/cjs/modules/archive/{compression/streaming-compress.browser.js → streaming-compress.browser.js} +3 -3
- package/dist/cjs/modules/archive/{compression/streaming-compress.js → streaming-compress.js} +2 -2
- package/dist/cjs/modules/archive/{zip/stream.js → streaming-zip.js} +50 -194
- package/dist/cjs/modules/archive/utils/bytes.js +16 -16
- package/dist/cjs/modules/archive/utils/parse-buffer.js +23 -21
- package/dist/cjs/modules/archive/utils/timestamps.js +3 -64
- package/dist/cjs/modules/archive/utils/zip-extra-fields.js +14 -26
- package/dist/cjs/modules/archive/utils/zip-extra.js +74 -0
- package/dist/cjs/modules/archive/zip-builder.js +297 -0
- package/dist/cjs/modules/archive/zip-constants.js +26 -0
- package/dist/cjs/modules/archive/{zip/zip-entry-metadata.js → zip-entry-metadata.js} +5 -5
- package/dist/cjs/modules/archive/{unzip/zip-parser.js → zip-parser.js} +33 -47
- package/dist/cjs/modules/archive/zip-records.js +90 -0
- package/dist/cjs/modules/excel/stream/workbook-reader.browser.js +2 -2
- package/dist/cjs/modules/excel/stream/workbook-writer.browser.js +4 -4
- package/dist/cjs/modules/excel/xlsx/xlsx.browser.js +9 -6
- package/dist/cjs/modules/excel/xlsx/xlsx.js +2 -2
- package/dist/cjs/modules/stream/streams.browser.js +710 -830
- package/dist/cjs/modules/stream/streams.js +58 -140
- package/dist/esm/index.browser.js +0 -12
- package/dist/esm/modules/archive/byte-queue.js +125 -0
- package/dist/esm/modules/archive/{compression/compress.base.js → compress.base.js} +1 -1
- package/dist/{browser/modules/archive/compression → esm/modules/archive}/compress.browser.js +11 -3
- package/dist/{browser/modules/archive/compression → esm/modules/archive}/compress.js +1 -1
- package/dist/esm/modules/archive/{compression/crc32.js → crc32.js} +1 -1
- package/dist/esm/modules/archive/defaults.js +3 -6
- package/dist/esm/modules/archive/{compression/deflate-fallback.js → deflate-fallback.js} +1 -1
- package/dist/esm/modules/archive/index.base.js +6 -3
- package/dist/esm/modules/archive/index.browser.js +7 -3
- package/dist/esm/modules/archive/index.js +5 -3
- package/dist/esm/modules/archive/parse.base.js +644 -0
- package/dist/{browser/modules/archive/unzip/stream.browser.js → esm/modules/archive/parse.browser.js} +110 -371
- package/dist/{browser/modules/archive/unzip/stream.js → esm/modules/archive/parse.js} +5 -6
- package/dist/esm/modules/archive/{compression/streaming-compress.browser.js → streaming-compress.browser.js} +3 -3
- package/dist/esm/modules/archive/{compression/streaming-compress.js → streaming-compress.js} +2 -2
- package/dist/{browser/modules/archive/zip/stream.js → esm/modules/archive/streaming-zip.js} +48 -192
- package/dist/esm/modules/archive/utils/bytes.js +16 -16
- package/dist/esm/modules/archive/utils/parse-buffer.js +23 -21
- package/dist/esm/modules/archive/utils/timestamps.js +1 -62
- package/dist/esm/modules/archive/utils/zip-extra-fields.js +14 -26
- package/dist/esm/modules/archive/utils/zip-extra.js +68 -0
- package/dist/esm/modules/archive/zip-builder.js +292 -0
- package/dist/esm/modules/archive/zip-constants.js +23 -0
- package/dist/{browser/modules/archive/zip → esm/modules/archive}/zip-entry-metadata.js +3 -3
- package/dist/{browser/modules/archive/unzip → esm/modules/archive}/zip-parser.js +24 -38
- package/dist/esm/modules/archive/zip-records.js +84 -0
- package/dist/esm/modules/excel/stream/workbook-reader.browser.js +1 -1
- package/dist/esm/modules/excel/stream/workbook-writer.browser.js +1 -1
- package/dist/esm/modules/excel/xlsx/xlsx.browser.js +6 -3
- package/dist/esm/modules/excel/xlsx/xlsx.js +1 -1
- package/dist/esm/modules/stream/streams.browser.js +710 -830
- package/dist/esm/modules/stream/streams.js +58 -140
- package/dist/iife/THIRD_PARTY_NOTICES.md +31 -0
- package/dist/iife/excelts.iife.js +4425 -6215
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +31 -103
- package/dist/types/index.browser.d.ts +0 -1
- package/dist/types/modules/archive/byte-queue.d.ts +18 -0
- package/dist/types/modules/archive/{compression/compress.browser.d.ts → compress.browser.d.ts} +8 -2
- package/dist/types/modules/archive/defaults.d.ts +0 -1
- package/dist/types/modules/archive/index.base.d.ts +4 -4
- package/dist/types/modules/archive/index.browser.d.ts +4 -3
- package/dist/types/modules/archive/index.d.ts +4 -3
- package/dist/types/modules/archive/{unzip/stream.base.d.ts → parse.base.d.ts} +4 -38
- package/dist/types/modules/archive/{unzip/stream.browser.d.ts → parse.browser.d.ts} +2 -2
- package/dist/types/modules/archive/{unzip/stream.d.ts → parse.d.ts} +3 -3
- package/dist/types/modules/archive/{compression/streaming-compress.browser.d.ts → streaming-compress.browser.d.ts} +1 -1
- package/dist/types/modules/archive/{zip/stream.d.ts → streaming-zip.d.ts} +6 -29
- package/dist/types/modules/archive/utils/zip-extra-fields.d.ts +1 -1
- package/dist/types/modules/archive/utils/zip-extra.d.ts +18 -0
- package/dist/types/modules/archive/zip-builder.d.ts +117 -0
- package/dist/types/modules/archive/zip-constants.d.ts +18 -0
- package/dist/types/modules/archive/{zip/zip-entry-metadata.d.ts → zip-entry-metadata.d.ts} +1 -1
- package/dist/{browser/modules/archive/unzip → types/modules/archive}/zip-parser.d.ts +1 -1
- package/dist/types/modules/archive/{zip-spec/zip-records.d.ts → zip-records.d.ts} +0 -20
- package/dist/types/modules/excel/stream/workbook-writer.browser.d.ts +1 -1
- package/dist/types/modules/stream/streams.browser.d.ts +30 -28
- package/package.json +1 -5
- package/dist/browser/modules/archive/internal/byte-queue.d.ts +0 -33
- package/dist/browser/modules/archive/internal/byte-queue.js +0 -407
- package/dist/browser/modules/archive/io/archive-sink.d.ts +0 -9
- package/dist/browser/modules/archive/io/archive-sink.js +0 -77
- package/dist/browser/modules/archive/io/archive-source.d.ts +0 -8
- package/dist/browser/modules/archive/io/archive-source.js +0 -107
- package/dist/browser/modules/archive/unzip/index.d.ts +0 -40
- package/dist/browser/modules/archive/unzip/index.js +0 -164
- package/dist/browser/modules/archive/unzip/stream.base.js +0 -1022
- package/dist/browser/modules/archive/utils/async-queue.d.ts +0 -7
- package/dist/browser/modules/archive/utils/async-queue.js +0 -103
- package/dist/browser/modules/archive/utils/compressibility.d.ts +0 -10
- package/dist/browser/modules/archive/utils/compressibility.js +0 -57
- package/dist/browser/modules/archive/utils/pattern-scanner.d.ts +0 -21
- package/dist/browser/modules/archive/utils/pattern-scanner.js +0 -27
- package/dist/browser/modules/archive/zip/index.d.ts +0 -42
- package/dist/browser/modules/archive/zip/index.js +0 -157
- package/dist/browser/modules/archive/zip/zip-bytes.d.ts +0 -73
- package/dist/browser/modules/archive/zip/zip-bytes.js +0 -239
- package/dist/browser/modules/archive/zip-spec/zip-records.js +0 -126
- package/dist/cjs/modules/archive/internal/byte-queue.js +0 -411
- package/dist/cjs/modules/archive/io/archive-sink.js +0 -82
- package/dist/cjs/modules/archive/io/archive-source.js +0 -114
- package/dist/cjs/modules/archive/unzip/index.js +0 -170
- package/dist/cjs/modules/archive/unzip/stream.base.js +0 -1044
- package/dist/cjs/modules/archive/utils/async-queue.js +0 -106
- package/dist/cjs/modules/archive/utils/compressibility.js +0 -60
- package/dist/cjs/modules/archive/utils/pattern-scanner.js +0 -31
- package/dist/cjs/modules/archive/zip/index.js +0 -162
- package/dist/cjs/modules/archive/zip/zip-bytes.js +0 -242
- package/dist/cjs/modules/archive/zip-spec/zip-records.js +0 -136
- package/dist/esm/modules/archive/internal/byte-queue.js +0 -407
- package/dist/esm/modules/archive/io/archive-sink.js +0 -77
- package/dist/esm/modules/archive/io/archive-source.js +0 -107
- package/dist/esm/modules/archive/unzip/index.js +0 -164
- package/dist/esm/modules/archive/unzip/stream.base.js +0 -1022
- package/dist/esm/modules/archive/utils/async-queue.js +0 -103
- package/dist/esm/modules/archive/utils/compressibility.js +0 -57
- package/dist/esm/modules/archive/utils/pattern-scanner.js +0 -27
- package/dist/esm/modules/archive/zip/index.js +0 -157
- package/dist/esm/modules/archive/zip/zip-bytes.js +0 -239
- package/dist/esm/modules/archive/zip-spec/zip-records.js +0 -126
- package/dist/types/modules/archive/internal/byte-queue.d.ts +0 -33
- package/dist/types/modules/archive/io/archive-sink.d.ts +0 -9
- package/dist/types/modules/archive/io/archive-source.d.ts +0 -8
- package/dist/types/modules/archive/unzip/index.d.ts +0 -40
- package/dist/types/modules/archive/utils/async-queue.d.ts +0 -7
- package/dist/types/modules/archive/utils/compressibility.d.ts +0 -10
- package/dist/types/modules/archive/utils/pattern-scanner.d.ts +0 -21
- package/dist/types/modules/archive/zip/index.d.ts +0 -42
- package/dist/types/modules/archive/zip/zip-bytes.d.ts +0 -73
- /package/dist/browser/modules/archive/{compression/compress.base.d.ts → compress.base.d.ts} +0 -0
- /package/dist/browser/modules/archive/{compression/crc32.base.d.ts → crc32.base.d.ts} +0 -0
- /package/dist/browser/modules/archive/{compression/crc32.base.js → crc32.base.js} +0 -0
- /package/dist/browser/modules/archive/{compression/crc32.browser.js → crc32.browser.js} +0 -0
- /package/dist/browser/modules/archive/{compression/deflate-fallback.d.ts → deflate-fallback.d.ts} +0 -0
- /package/dist/browser/modules/archive/{unzip/extract.js → extract.js} +0 -0
- /package/dist/browser/modules/archive/{compression/streaming-compress.base.d.ts → streaming-compress.base.d.ts} +0 -0
- /package/dist/browser/modules/archive/{compression/streaming-compress.base.js → streaming-compress.base.js} +0 -0
- /package/dist/browser/modules/archive/{zip-spec/zip-entry-info.d.ts → zip-entry-info.d.ts} +0 -0
- /package/dist/browser/modules/archive/{zip-spec/zip-entry-info.js → zip-entry-info.js} +0 -0
- /package/dist/browser/modules/archive/{zip/zip-entry-metadata.d.ts → zip-entry-metadata.d.ts} +0 -0
- /package/dist/cjs/modules/archive/{compression/crc32.base.js → crc32.base.js} +0 -0
- /package/dist/cjs/modules/archive/{compression/crc32.browser.js → crc32.browser.js} +0 -0
- /package/dist/cjs/modules/archive/{unzip/extract.js → extract.js} +0 -0
- /package/dist/cjs/modules/archive/{compression/streaming-compress.base.js → streaming-compress.base.js} +0 -0
- /package/dist/cjs/modules/archive/{zip-spec/zip-entry-info.js → zip-entry-info.js} +0 -0
- /package/dist/esm/modules/archive/{compression/crc32.base.js → crc32.base.js} +0 -0
- /package/dist/esm/modules/archive/{compression/crc32.browser.js → crc32.browser.js} +0 -0
- /package/dist/esm/modules/archive/{unzip/extract.js → extract.js} +0 -0
- /package/dist/esm/modules/archive/{compression/streaming-compress.base.js → streaming-compress.base.js} +0 -0
- /package/dist/esm/modules/archive/{zip-spec/zip-entry-info.js → zip-entry-info.js} +0 -0
- /package/dist/types/modules/archive/{compression/compress.base.d.ts → compress.base.d.ts} +0 -0
- /package/dist/types/modules/archive/{compression/compress.d.ts → compress.d.ts} +0 -0
- /package/dist/types/modules/archive/{compression/crc32.base.d.ts → crc32.base.d.ts} +0 -0
- /package/dist/types/modules/archive/{compression/crc32.browser.d.ts → crc32.browser.d.ts} +0 -0
- /package/dist/types/modules/archive/{compression/crc32.d.ts → crc32.d.ts} +0 -0
- /package/dist/types/modules/archive/{compression/deflate-fallback.d.ts → deflate-fallback.d.ts} +0 -0
- /package/dist/types/modules/archive/{unzip/extract.d.ts → extract.d.ts} +0 -0
- /package/dist/types/modules/archive/{compression/streaming-compress.base.d.ts → streaming-compress.base.d.ts} +0 -0
- /package/dist/types/modules/archive/{compression/streaming-compress.d.ts → streaming-compress.d.ts} +0 -0
- /package/dist/types/modules/archive/{zip-spec/zip-entry-info.d.ts → zip-entry-info.d.ts} +0 -0
|
@@ -16,34 +16,20 @@ export class Writable extends NodeWritable {
|
|
|
16
16
|
constructor(options) {
|
|
17
17
|
// If wrapping an existing stream, proxy to it
|
|
18
18
|
if (options?.stream) {
|
|
19
|
-
const underlying = options.stream;
|
|
20
19
|
// Create a pass-through wrapper that proxies to the underlying stream
|
|
21
20
|
super({
|
|
22
21
|
highWaterMark: options?.highWaterMark,
|
|
23
22
|
objectMode: options?.objectMode,
|
|
24
23
|
write(chunk, encoding, callback) {
|
|
25
|
-
|
|
24
|
+
options.stream.write(chunk, encoding, callback);
|
|
26
25
|
},
|
|
27
26
|
final(callback) {
|
|
28
|
-
|
|
27
|
+
options.stream.end(callback);
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
|
-
// Proxy events from underlying stream
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.emit("error", err);
|
|
35
|
-
};
|
|
36
|
-
const onUnderlyingClose = () => {
|
|
37
|
-
this.emit("close");
|
|
38
|
-
};
|
|
39
|
-
const cleanup = () => {
|
|
40
|
-
underlying.off("error", onUnderlyingError);
|
|
41
|
-
underlying.off("close", onUnderlyingClose);
|
|
42
|
-
};
|
|
43
|
-
underlying.on("error", onUnderlyingError);
|
|
44
|
-
underlying.on("close", onUnderlyingClose);
|
|
45
|
-
this.once("close", cleanup);
|
|
46
|
-
this.once("finish", cleanup);
|
|
30
|
+
// Proxy events from underlying stream
|
|
31
|
+
options.stream.on("error", err => this.emit("error", err));
|
|
32
|
+
options.stream.on("close", () => this.emit("close"));
|
|
47
33
|
}
|
|
48
34
|
else {
|
|
49
35
|
super({
|
|
@@ -71,16 +57,17 @@ export function normalizeWritable(stream) {
|
|
|
71
57
|
if (stream instanceof Writable) {
|
|
72
58
|
return stream;
|
|
73
59
|
}
|
|
74
|
-
// Node.js Writable:
|
|
60
|
+
// Node.js Writable: accept structurally even if typed as unknown.
|
|
75
61
|
if (stream instanceof NodeWritable) {
|
|
76
|
-
return stream;
|
|
62
|
+
return new Writable({ stream: stream });
|
|
77
63
|
}
|
|
78
64
|
// Web WritableStream: detect by getWriter() (avoid relying on global WritableStream).
|
|
79
65
|
if (stream?.getWriter) {
|
|
80
|
-
|
|
66
|
+
const nodeWritable = NodeWritable.fromWeb(stream);
|
|
67
|
+
return new Writable({ stream: nodeWritable });
|
|
81
68
|
}
|
|
82
|
-
// Assume it structurally matches Node's Writable.
|
|
83
|
-
return stream;
|
|
69
|
+
// Assume it structurally matches Node's Writable; wrap for consistent API.
|
|
70
|
+
return new Writable({ stream: stream });
|
|
84
71
|
}
|
|
85
72
|
// Import for internal use
|
|
86
73
|
import { textDecoder } from "./shared.js";
|
|
@@ -193,13 +180,12 @@ export function finished(stream, optionsOrCallback, callback) {
|
|
|
193
180
|
const promise = new Promise((resolve, reject) => {
|
|
194
181
|
const normalizedStream = toNodePipelineStream(stream);
|
|
195
182
|
nodeFinished(normalizedStream, options, (err) => {
|
|
196
|
-
|
|
197
|
-
// If options.error === false, ignore errors and resolve.
|
|
198
|
-
if (err && options?.error !== false) {
|
|
183
|
+
if (err && !(options && options.error)) {
|
|
199
184
|
reject(err);
|
|
200
|
-
return;
|
|
201
185
|
}
|
|
202
|
-
|
|
186
|
+
else {
|
|
187
|
+
resolve();
|
|
188
|
+
}
|
|
203
189
|
});
|
|
204
190
|
});
|
|
205
191
|
if (cb) {
|
|
@@ -547,28 +533,13 @@ export function addAbortSignal(signal, stream) {
|
|
|
547
533
|
stream.destroy(new Error("Aborted"));
|
|
548
534
|
return stream;
|
|
549
535
|
}
|
|
550
|
-
const cleanup = () => {
|
|
551
|
-
signal.removeEventListener("abort", onAbort);
|
|
552
|
-
stream.off?.("close", onDone);
|
|
553
|
-
stream.off?.("end", onDone);
|
|
554
|
-
stream.off?.("finish", onDone);
|
|
555
|
-
stream.off?.("error", onError);
|
|
556
|
-
};
|
|
557
536
|
const onAbort = () => {
|
|
558
|
-
cleanup();
|
|
559
537
|
stream.destroy(new Error("Aborted"));
|
|
560
538
|
};
|
|
561
|
-
const onDone = () => {
|
|
562
|
-
cleanup();
|
|
563
|
-
};
|
|
564
|
-
const onError = () => {
|
|
565
|
-
cleanup();
|
|
566
|
-
};
|
|
567
539
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
568
|
-
stream.
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
stream.once?.("error", onError);
|
|
540
|
+
stream.on("close", () => {
|
|
541
|
+
signal.removeEventListener("abort", onAbort);
|
|
542
|
+
});
|
|
572
543
|
return stream;
|
|
573
544
|
}
|
|
574
545
|
/**
|
|
@@ -611,109 +582,56 @@ export function compose(...transforms) {
|
|
|
611
582
|
if (len === 1 && isNativeTransform(transforms[0])) {
|
|
612
583
|
return transforms[0];
|
|
613
584
|
}
|
|
614
|
-
// Chain all transforms together
|
|
585
|
+
// Chain all transforms together
|
|
615
586
|
for (let i = 0; i < len - 1; i++) {
|
|
616
587
|
transforms[i].pipe(transforms[i + 1]);
|
|
617
588
|
}
|
|
589
|
+
// Create a Duplex that writes to first and reads from last
|
|
618
590
|
const first = transforms[0];
|
|
619
591
|
const last = transforms[len - 1];
|
|
620
|
-
//
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
while (true) {
|
|
630
|
-
const chunk = output.read();
|
|
631
|
-
if (chunk === null) {
|
|
632
|
-
break;
|
|
633
|
-
}
|
|
634
|
-
if (!target.push(chunk)) {
|
|
635
|
-
break;
|
|
636
|
-
}
|
|
592
|
+
// Create a PassThrough as the composed stream
|
|
593
|
+
const composed = new PassThrough({ objectMode: first.readableObjectMode });
|
|
594
|
+
// Store original methods for forwarding
|
|
595
|
+
const passthroughWrite = composed.write.bind(composed);
|
|
596
|
+
const passthroughEnd = composed.end.bind(composed);
|
|
597
|
+
// Override write to write to first transform
|
|
598
|
+
composed.write = function (chunk, encodingOrCallback, callback) {
|
|
599
|
+
if (typeof encodingOrCallback === "function") {
|
|
600
|
+
return first.write(chunk, encodingOrCallback);
|
|
637
601
|
}
|
|
602
|
+
return first.write(chunk, encodingOrCallback, callback);
|
|
638
603
|
};
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
try {
|
|
644
|
-
// Forward writes into the head of the chain.
|
|
645
|
-
first.write(chunk, encoding, callback);
|
|
646
|
-
}
|
|
647
|
-
catch (err) {
|
|
648
|
-
callback(err);
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
flush(callback) {
|
|
652
|
-
// End the head of the chain; readable completion is driven by `output` ending.
|
|
653
|
-
const onFinish = () => {
|
|
654
|
-
cleanupFlush();
|
|
655
|
-
callback();
|
|
656
|
-
};
|
|
657
|
-
const onError = (err) => {
|
|
658
|
-
cleanupFlush();
|
|
659
|
-
callback(err);
|
|
660
|
-
};
|
|
661
|
-
const cleanupFlush = () => {
|
|
662
|
-
first.off?.("finish", onFinish);
|
|
663
|
-
first.off?.("error", onError);
|
|
664
|
-
};
|
|
665
|
-
first.once?.("finish", onFinish);
|
|
666
|
-
first.once?.("error", onError);
|
|
667
|
-
first.end();
|
|
668
|
-
},
|
|
669
|
-
read() {
|
|
670
|
-
pumpOutput(this);
|
|
671
|
-
},
|
|
672
|
-
destroy(err, callback) {
|
|
673
|
-
try {
|
|
674
|
-
output.destroy(err ?? undefined);
|
|
675
|
-
for (const t of transforms) {
|
|
676
|
-
t.destroy?.(err ?? undefined);
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
finally {
|
|
680
|
-
callback(err);
|
|
681
|
-
}
|
|
604
|
+
// Override end to end first transform
|
|
605
|
+
composed.end = function (chunkOrCallback, encodingOrCallback, callback) {
|
|
606
|
+
if (typeof chunkOrCallback === "function") {
|
|
607
|
+
first.end(chunkOrCallback);
|
|
682
608
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
cleanupListeners();
|
|
689
|
-
outputEnded = true;
|
|
690
|
-
composed.push(null);
|
|
691
|
-
};
|
|
692
|
-
const onAnyError = (err) => {
|
|
693
|
-
cleanupListeners();
|
|
694
|
-
composed.destroy(err);
|
|
695
|
-
};
|
|
696
|
-
const transformErrorListeners = [];
|
|
697
|
-
const cleanupListeners = () => {
|
|
698
|
-
output.off("readable", onOutputReadable);
|
|
699
|
-
output.off("end", onOutputEnd);
|
|
700
|
-
output.off("error", onAnyError);
|
|
701
|
-
for (const { t, fn } of transformErrorListeners) {
|
|
702
|
-
t.off?.("error", fn);
|
|
609
|
+
else if (typeof encodingOrCallback === "function") {
|
|
610
|
+
first.end(chunkOrCallback, encodingOrCallback);
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
first.end(chunkOrCallback, encodingOrCallback, callback);
|
|
703
614
|
}
|
|
704
|
-
|
|
615
|
+
return composed;
|
|
616
|
+
};
|
|
617
|
+
// Override pipe to pipe from last transform
|
|
618
|
+
composed.pipe = function (dest) {
|
|
619
|
+
return last.pipe(dest);
|
|
705
620
|
};
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
}
|
|
714
|
-
composed.once("close", () => {
|
|
715
|
-
cleanupListeners();
|
|
621
|
+
// Forward data from last to composed
|
|
622
|
+
last.on("data", (chunk) => {
|
|
623
|
+
passthroughWrite(chunk);
|
|
624
|
+
});
|
|
625
|
+
// Forward end from last
|
|
626
|
+
last.on("end", () => {
|
|
627
|
+
passthroughEnd();
|
|
716
628
|
});
|
|
629
|
+
// Forward errors from any transform
|
|
630
|
+
for (const transform of transforms) {
|
|
631
|
+
transform.on("error", (err) => {
|
|
632
|
+
composed.emit("error", err);
|
|
633
|
+
});
|
|
634
|
+
}
|
|
717
635
|
return composed;
|
|
718
636
|
}
|
|
719
637
|
/**
|
|
@@ -794,7 +712,7 @@ export function once(emitter, event, options) {
|
|
|
794
712
|
onAbort();
|
|
795
713
|
return;
|
|
796
714
|
}
|
|
797
|
-
options.signal.addEventListener("abort", onAbort
|
|
715
|
+
options.signal.addEventListener("abort", onAbort);
|
|
798
716
|
}
|
|
799
717
|
});
|
|
800
718
|
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ByteQueue = void 0;
|
|
4
|
+
class ByteQueue {
|
|
5
|
+
constructor(initial) {
|
|
6
|
+
this._start = 0;
|
|
7
|
+
this._end = 0;
|
|
8
|
+
this._cachedView = null;
|
|
9
|
+
this._cachedBuf = null;
|
|
10
|
+
this._cachedStart = 0;
|
|
11
|
+
this._cachedEnd = 0;
|
|
12
|
+
this._buf = new Uint8Array(0);
|
|
13
|
+
if (initial && initial.length > 0) {
|
|
14
|
+
this.reset(initial);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
get length() {
|
|
18
|
+
return this._end - this._start;
|
|
19
|
+
}
|
|
20
|
+
isEmpty() {
|
|
21
|
+
return this.length === 0;
|
|
22
|
+
}
|
|
23
|
+
view() {
|
|
24
|
+
if (this._start === this._end) {
|
|
25
|
+
return ByteQueue.EMPTY;
|
|
26
|
+
}
|
|
27
|
+
if (this._cachedView &&
|
|
28
|
+
this._cachedBuf === this._buf &&
|
|
29
|
+
this._cachedStart === this._start &&
|
|
30
|
+
this._cachedEnd === this._end) {
|
|
31
|
+
return this._cachedView;
|
|
32
|
+
}
|
|
33
|
+
const view = this._buf.subarray(this._start, this._end);
|
|
34
|
+
this._cachedView = view;
|
|
35
|
+
this._cachedBuf = this._buf;
|
|
36
|
+
this._cachedStart = this._start;
|
|
37
|
+
this._cachedEnd = this._end;
|
|
38
|
+
return view;
|
|
39
|
+
}
|
|
40
|
+
reset(data) {
|
|
41
|
+
this._cachedView = null;
|
|
42
|
+
this._cachedBuf = null;
|
|
43
|
+
if (!data || data.length === 0) {
|
|
44
|
+
this._buf = ByteQueue.EMPTY;
|
|
45
|
+
this._start = 0;
|
|
46
|
+
this._end = 0;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
// Keep a private copy to ensure future writes cannot mutate the source.
|
|
50
|
+
const copy = new Uint8Array(data.length);
|
|
51
|
+
copy.set(data);
|
|
52
|
+
this._buf = copy;
|
|
53
|
+
this._start = 0;
|
|
54
|
+
this._end = copy.length;
|
|
55
|
+
}
|
|
56
|
+
append(chunk) {
|
|
57
|
+
if (chunk.length === 0) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
this._cachedView = null;
|
|
61
|
+
this._cachedBuf = null;
|
|
62
|
+
const unread = this.length;
|
|
63
|
+
// Fast path: enough tail room.
|
|
64
|
+
if (this._end + chunk.length <= this._buf.length) {
|
|
65
|
+
this._buf.set(chunk, this._end);
|
|
66
|
+
this._end += chunk.length;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// Allocate a new buffer and copy unread bytes (never compacts in-place).
|
|
70
|
+
const required = unread + chunk.length;
|
|
71
|
+
const nextSize = this._buf.length === 0 ? required : Math.max(this._buf.length * 2, required);
|
|
72
|
+
const next = new Uint8Array(nextSize);
|
|
73
|
+
if (unread > 0) {
|
|
74
|
+
next.set(this._buf.subarray(this._start, this._end), 0);
|
|
75
|
+
}
|
|
76
|
+
next.set(chunk, unread);
|
|
77
|
+
this._buf = next;
|
|
78
|
+
this._start = 0;
|
|
79
|
+
this._end = required;
|
|
80
|
+
}
|
|
81
|
+
read(length) {
|
|
82
|
+
if (length <= 0) {
|
|
83
|
+
return new Uint8Array(0);
|
|
84
|
+
}
|
|
85
|
+
if (length > this.length) {
|
|
86
|
+
throw new RangeError("ByteQueue: read beyond available data");
|
|
87
|
+
}
|
|
88
|
+
// Return a view for performance.
|
|
89
|
+
// To keep this safe for async consumers, we must ensure we never write into
|
|
90
|
+
// the same backing buffer again after it becomes fully consumed.
|
|
91
|
+
const out = this._buf.subarray(this._start, this._start + length);
|
|
92
|
+
this._start += length;
|
|
93
|
+
this._cachedView = null;
|
|
94
|
+
this._cachedBuf = null;
|
|
95
|
+
if (this._start === this._end) {
|
|
96
|
+
// Release backing storage to avoid reusing memory that might still be
|
|
97
|
+
// referenced by previously returned views.
|
|
98
|
+
this._buf = ByteQueue.EMPTY;
|
|
99
|
+
this._start = 0;
|
|
100
|
+
this._end = 0;
|
|
101
|
+
}
|
|
102
|
+
return out;
|
|
103
|
+
}
|
|
104
|
+
discard(length) {
|
|
105
|
+
if (length <= 0) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (length >= this.length) {
|
|
109
|
+
// Release backing storage for the same reason as read(): previously
|
|
110
|
+
// returned views may still be referenced by consumers.
|
|
111
|
+
this._buf = ByteQueue.EMPTY;
|
|
112
|
+
this._start = 0;
|
|
113
|
+
this._end = 0;
|
|
114
|
+
this._cachedView = null;
|
|
115
|
+
this._cachedBuf = null;
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this._start += length;
|
|
119
|
+
this._cachedView = null;
|
|
120
|
+
this._cachedBuf = null;
|
|
121
|
+
if (this._start === this._end) {
|
|
122
|
+
this._buf = ByteQueue.EMPTY;
|
|
123
|
+
this._start = 0;
|
|
124
|
+
this._end = 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
exports.ByteQueue = ByteQueue;
|
|
129
|
+
ByteQueue.EMPTY = new Uint8Array(0);
|
|
@@ -21,7 +21,7 @@ exports.hasDeflateRawDecompressionStream = hasDeflateRawDecompressionStream;
|
|
|
21
21
|
exports.hasDeflateRawWebStreams = hasDeflateRawWebStreams;
|
|
22
22
|
exports.compressWithStream = compressWithStream;
|
|
23
23
|
exports.decompressWithStream = decompressWithStream;
|
|
24
|
-
const byte_queue_1 = require("
|
|
24
|
+
const byte_queue_1 = require("./byte-queue.js");
|
|
25
25
|
/**
|
|
26
26
|
* Default threshold (in bytes) to choose the lower-overhead path.
|
|
27
27
|
*
|
|
@@ -12,15 +12,23 @@
|
|
|
12
12
|
* - Edge >= 89
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.hasCompressionStream =
|
|
15
|
+
exports.hasCompressionStream = hasCompressionStream;
|
|
16
16
|
exports.compress = compress;
|
|
17
17
|
exports.compressSync = compressSync;
|
|
18
18
|
exports.decompress = decompress;
|
|
19
19
|
exports.decompressSync = decompressSync;
|
|
20
20
|
const compress_base_1 = require("./compress.base.js");
|
|
21
|
-
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_base_1.hasCompressionStream; } });
|
|
22
21
|
const deflate_fallback_1 = require("./deflate-fallback.js");
|
|
23
|
-
const defaults_1 = require("
|
|
22
|
+
const defaults_1 = require("./defaults.js");
|
|
23
|
+
/**
|
|
24
|
+
* Check if CompressionStream is available in this environment.
|
|
25
|
+
*
|
|
26
|
+
* Note: Some environments may expose CompressionStream but not support
|
|
27
|
+
* the "deflate-raw" format that ZIP requires.
|
|
28
|
+
*/
|
|
29
|
+
function hasCompressionStream() {
|
|
30
|
+
return typeof CompressionStream !== "undefined";
|
|
31
|
+
}
|
|
24
32
|
/**
|
|
25
33
|
* Compress data using browser's native CompressionStream or JS fallback
|
|
26
34
|
*
|
|
@@ -46,7 +46,7 @@ exports.decompress = decompress;
|
|
|
46
46
|
exports.decompressSync = decompressSync;
|
|
47
47
|
const util_1 = require("util");
|
|
48
48
|
const zlib = __importStar(require("zlib"));
|
|
49
|
-
const defaults_1 = require("
|
|
49
|
+
const defaults_1 = require("./defaults.js");
|
|
50
50
|
// Re-export shared types and utilities
|
|
51
51
|
var compress_base_1 = require("./compress.base.js");
|
|
52
52
|
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_base_1.hasCompressionStream; } });
|
|
@@ -47,7 +47,7 @@ exports.crc32Finalize = void 0;
|
|
|
47
47
|
exports.crc32 = crc32;
|
|
48
48
|
exports.ensureCrc32 = ensureCrc32;
|
|
49
49
|
exports.crc32Update = crc32Update;
|
|
50
|
-
const env_1 = require("
|
|
50
|
+
const env_1 = require("../../utils/env.js");
|
|
51
51
|
const crc32_base_1 = require("./crc32.base.js");
|
|
52
52
|
Object.defineProperty(exports, "crc32Finalize", { enumerable: true, get: function () { return crc32_base_1.crc32Finalize; } });
|
|
53
53
|
// Lazy-loaded zlib module for Node.js
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_ZIP_TIMESTAMPS = exports.DEFAULT_ZIP_LEVEL = exports.DEFAULT_COMPRESS_LEVEL =
|
|
4
|
-
exports.
|
|
5
|
-
|
|
6
|
-
exports.
|
|
7
|
-
exports.DEFAULT_ZIP_LEVEL = exports.DEFAULT_DEFLATE_LEVEL;
|
|
8
|
-
// Prefer reproducible output by default: omit the Info-ZIP UTC mtime extra field.
|
|
9
|
-
exports.DEFAULT_ZIP_TIMESTAMPS = "dos";
|
|
3
|
+
exports.DEFAULT_ZIP_TIMESTAMPS = exports.DEFAULT_ZIP_LEVEL = exports.DEFAULT_COMPRESS_LEVEL = void 0;
|
|
4
|
+
exports.DEFAULT_COMPRESS_LEVEL = 6;
|
|
5
|
+
exports.DEFAULT_ZIP_LEVEL = 6;
|
|
6
|
+
exports.DEFAULT_ZIP_TIMESTAMPS = "dos+utc";
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.inflateRaw = inflateRaw;
|
|
16
16
|
exports.deflateRawStore = deflateRawStore;
|
|
17
17
|
exports.deflateRawCompressed = deflateRawCompressed;
|
|
18
|
-
const bytes_1 = require("
|
|
18
|
+
const bytes_1 = require("./utils/bytes.js");
|
|
19
19
|
// ============================================================================
|
|
20
20
|
// DEFLATE Decompression (Full implementation)
|
|
21
21
|
// ============================================================================
|
|
@@ -7,12 +7,22 @@
|
|
|
7
7
|
* from this file and then layer their platform-specific bindings.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
11
|
-
//
|
|
12
|
-
var
|
|
13
|
-
Object.defineProperty(exports, "
|
|
14
|
-
Object.defineProperty(exports, "
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(exports, "
|
|
10
|
+
exports.ZipParser = exports.forEachEntry = exports.listFiles = exports.extractFile = exports.extractAll = exports.ZipDeflate = exports.Zip = exports.ZipDeflateFile = exports.StreamingZip = exports.ZipBuilder = exports.createZipSync = exports.createZip = void 0;
|
|
11
|
+
// ZIP builders
|
|
12
|
+
var zip_builder_1 = require("./zip-builder.js");
|
|
13
|
+
Object.defineProperty(exports, "createZip", { enumerable: true, get: function () { return zip_builder_1.createZip; } });
|
|
14
|
+
Object.defineProperty(exports, "createZipSync", { enumerable: true, get: function () { return zip_builder_1.createZipSync; } });
|
|
15
|
+
Object.defineProperty(exports, "ZipBuilder", { enumerable: true, get: function () { return zip_builder_1.ZipBuilder; } });
|
|
16
|
+
// Streaming ZIP (fflate-like API)
|
|
17
|
+
var streaming_zip_1 = require("./streaming-zip.js");
|
|
18
|
+
Object.defineProperty(exports, "StreamingZip", { enumerable: true, get: function () { return streaming_zip_1.StreamingZip; } });
|
|
19
|
+
Object.defineProperty(exports, "ZipDeflateFile", { enumerable: true, get: function () { return streaming_zip_1.ZipDeflateFile; } });
|
|
20
|
+
Object.defineProperty(exports, "Zip", { enumerable: true, get: function () { return streaming_zip_1.Zip; } });
|
|
21
|
+
Object.defineProperty(exports, "ZipDeflate", { enumerable: true, get: function () { return streaming_zip_1.ZipDeflate; } });
|
|
22
|
+
// Buffer-based unzip API (cross-platform)
|
|
23
|
+
var extract_1 = require("./extract.js");
|
|
24
|
+
Object.defineProperty(exports, "extractAll", { enumerable: true, get: function () { return extract_1.extractAll; } });
|
|
25
|
+
Object.defineProperty(exports, "extractFile", { enumerable: true, get: function () { return extract_1.extractFile; } });
|
|
26
|
+
Object.defineProperty(exports, "listFiles", { enumerable: true, get: function () { return extract_1.listFiles; } });
|
|
27
|
+
Object.defineProperty(exports, "forEachEntry", { enumerable: true, get: function () { return extract_1.forEachEntry; } });
|
|
28
|
+
Object.defineProperty(exports, "ZipParser", { enumerable: true, get: function () { return extract_1.ZipParser; } });
|
|
@@ -20,22 +20,28 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.hasDeflateRaw = exports.createInflateStream = exports.createDeflateStream = exports.hasCompressionStream = exports.decompressSync = exports.decompress = exports.compressSync = exports.compress = exports.crc32Finalize = exports.crc32Update = exports.crc32 = void 0;
|
|
23
|
+
exports.createParse = exports.Parse = exports.hasDeflateRaw = exports.createInflateStream = exports.createDeflateStream = exports.hasCompressionStream = exports.decompressSync = exports.decompress = exports.compressSync = exports.compress = exports.crc32Finalize = exports.crc32Update = exports.crc32 = void 0;
|
|
24
24
|
__exportStar(require("./index.base.js"), exports);
|
|
25
25
|
// CRC32
|
|
26
|
-
var crc32_browser_1 = require("./
|
|
26
|
+
var crc32_browser_1 = require("./crc32.browser.js");
|
|
27
27
|
Object.defineProperty(exports, "crc32", { enumerable: true, get: function () { return crc32_browser_1.crc32; } });
|
|
28
28
|
Object.defineProperty(exports, "crc32Update", { enumerable: true, get: function () { return crc32_browser_1.crc32Update; } });
|
|
29
29
|
Object.defineProperty(exports, "crc32Finalize", { enumerable: true, get: function () { return crc32_browser_1.crc32Finalize; } });
|
|
30
30
|
// Compression
|
|
31
|
-
var compress_browser_1 = require("./
|
|
31
|
+
var compress_browser_1 = require("./compress.browser.js");
|
|
32
32
|
Object.defineProperty(exports, "compress", { enumerable: true, get: function () { return compress_browser_1.compress; } });
|
|
33
33
|
Object.defineProperty(exports, "compressSync", { enumerable: true, get: function () { return compress_browser_1.compressSync; } });
|
|
34
34
|
Object.defineProperty(exports, "decompress", { enumerable: true, get: function () { return compress_browser_1.decompress; } });
|
|
35
35
|
Object.defineProperty(exports, "decompressSync", { enumerable: true, get: function () { return compress_browser_1.decompressSync; } });
|
|
36
36
|
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_browser_1.hasCompressionStream; } });
|
|
37
37
|
// Streaming compression
|
|
38
|
-
var streaming_compress_browser_1 = require("./
|
|
38
|
+
var streaming_compress_browser_1 = require("./streaming-compress.browser.js");
|
|
39
39
|
Object.defineProperty(exports, "createDeflateStream", { enumerable: true, get: function () { return streaming_compress_browser_1.createDeflateStream; } });
|
|
40
40
|
Object.defineProperty(exports, "createInflateStream", { enumerable: true, get: function () { return streaming_compress_browser_1.createInflateStream; } });
|
|
41
41
|
Object.defineProperty(exports, "hasDeflateRaw", { enumerable: true, get: function () { return streaming_compress_browser_1.hasDeflateRaw; } });
|
|
42
|
+
// Stream-based unzip API (browser implementation)
|
|
43
|
+
var parse_browser_1 = require("./parse.browser.js");
|
|
44
|
+
Object.defineProperty(exports, "Parse", { enumerable: true, get: function () { return parse_browser_1.Parse; } });
|
|
45
|
+
Object.defineProperty(exports, "createParse", { enumerable: true, get: function () { return parse_browser_1.createParse; } });
|
|
46
|
+
// Buffer-based unzip API (cross-platform)
|
|
47
|
+
// (re-exported from ./index.base)
|
|
@@ -20,22 +20,26 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.hasDeflateRaw = exports.createInflateStream = exports.createDeflateStream = exports.hasCompressionStream = exports.decompressSync = exports.decompress = exports.compressSync = exports.compress = exports.crc32Finalize = exports.crc32Update = exports.crc32 = void 0;
|
|
23
|
+
exports.createParse = exports.Parse = exports.hasDeflateRaw = exports.createInflateStream = exports.createDeflateStream = exports.hasCompressionStream = exports.decompressSync = exports.decompress = exports.compressSync = exports.compress = exports.crc32Finalize = exports.crc32Update = exports.crc32 = void 0;
|
|
24
24
|
__exportStar(require("./index.base.js"), exports);
|
|
25
25
|
// CRC32
|
|
26
|
-
var crc32_1 = require("./
|
|
26
|
+
var crc32_1 = require("./crc32.js");
|
|
27
27
|
Object.defineProperty(exports, "crc32", { enumerable: true, get: function () { return crc32_1.crc32; } });
|
|
28
28
|
Object.defineProperty(exports, "crc32Update", { enumerable: true, get: function () { return crc32_1.crc32Update; } });
|
|
29
29
|
Object.defineProperty(exports, "crc32Finalize", { enumerable: true, get: function () { return crc32_1.crc32Finalize; } });
|
|
30
30
|
// Compression
|
|
31
|
-
var compress_1 = require("./
|
|
31
|
+
var compress_1 = require("./compress.js");
|
|
32
32
|
Object.defineProperty(exports, "compress", { enumerable: true, get: function () { return compress_1.compress; } });
|
|
33
33
|
Object.defineProperty(exports, "compressSync", { enumerable: true, get: function () { return compress_1.compressSync; } });
|
|
34
34
|
Object.defineProperty(exports, "decompress", { enumerable: true, get: function () { return compress_1.decompress; } });
|
|
35
35
|
Object.defineProperty(exports, "decompressSync", { enumerable: true, get: function () { return compress_1.decompressSync; } });
|
|
36
36
|
Object.defineProperty(exports, "hasCompressionStream", { enumerable: true, get: function () { return compress_1.hasCompressionStream; } });
|
|
37
37
|
// Streaming compression
|
|
38
|
-
var streaming_compress_1 = require("./
|
|
38
|
+
var streaming_compress_1 = require("./streaming-compress.js");
|
|
39
39
|
Object.defineProperty(exports, "createDeflateStream", { enumerable: true, get: function () { return streaming_compress_1.createDeflateStream; } });
|
|
40
40
|
Object.defineProperty(exports, "createInflateStream", { enumerable: true, get: function () { return streaming_compress_1.createInflateStream; } });
|
|
41
41
|
Object.defineProperty(exports, "hasDeflateRaw", { enumerable: true, get: function () { return streaming_compress_1.hasDeflateRaw; } });
|
|
42
|
+
// Stream-based unzip API (Node.js; browser build aliases to ./parse.browser.ts)
|
|
43
|
+
var parse_1 = require("./parse.js");
|
|
44
|
+
Object.defineProperty(exports, "Parse", { enumerable: true, get: function () { return parse_1.Parse; } });
|
|
45
|
+
Object.defineProperty(exports, "createParse", { enumerable: true, get: function () { return parse_1.createParse; } });
|