@zip.js/zip.js 2.8.44 → 2.8.45
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 +21 -1
- package/dist/zip-core-external.js +138 -123
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +137 -96
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +190 -131
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +189 -104
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +211 -1725
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +212 -1700
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +211 -1699
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +139 -98
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +139 -98
- package/dist/zip-native.min.js +1 -1
- package/dist/zip-web-worker-native.js +1 -1
- package/dist/zip-web-worker.js +1 -1
- package/dist/zip.js +138 -97
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +31 -2
- package/index-native.cjs +212 -1700
- package/index-native.min.js +1 -1
- package/index.cjs +211 -1699
- package/index.d.cts +49 -1
- package/index.d.ts +49 -1
- package/index.min.js +1 -1
- package/lib/core/codec-worker.js +2 -2
- package/lib/core/constants.js +4 -0
- package/lib/core/options.js +2 -0
- package/lib/core/streams/aes-crypto-stream.js +15 -18
- package/lib/core/streams/codec-stream.js +2 -2
- package/lib/core/streams/zip-entry-stream.js +5 -10
- package/lib/core/util/mime-type-data.js +3 -0
- package/lib/core/util/mime-type.js +23 -1596
- package/lib/core/web-worker-base.js +2 -2
- package/lib/core/web-worker-inline-native.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/zip-entry.js +8 -1
- package/lib/core/zip-fs.js +62 -5
- package/lib/core/zip-reader.js +45 -17
- package/lib/core/zip-writer.js +58 -44
- package/lib/zip-core-external.js +2 -0
- package/lib/zip-fs-core-external.js +2 -0
- package/lib/zip-fs-external.js +2 -0
- package/lib/zip-mime-types.js +2 -0
- package/package.json +9 -3
- package/worker-message-property-names.js +1 -1
package/index.d.cts
CHANGED
|
@@ -1292,6 +1292,30 @@ export interface EntryExtraFieldAES extends EntryExtraField {
|
|
|
1292
1292
|
*/
|
|
1293
1293
|
originalCompressionMethod?: number;
|
|
1294
1294
|
}
|
|
1295
|
+
/**
|
|
1296
|
+
* Represents a Unix extra field record storing timestamps: the Info-ZIP Unix type 1 extra field (0x5855),
|
|
1297
|
+
* written notably by macOS Archive Utility and `ditto`, or the PKWARE Unix extra field (0x000d). Both store
|
|
1298
|
+
* the last access/modification dates as 32-bit Unix times, followed by the optional uid/gid in the local
|
|
1299
|
+
* file header.
|
|
1300
|
+
*/
|
|
1301
|
+
export interface EntryExtraFieldUnixDates extends EntryExtraField {
|
|
1302
|
+
/**
|
|
1303
|
+
* The last access date.
|
|
1304
|
+
*/
|
|
1305
|
+
lastAccessDate?: Date;
|
|
1306
|
+
/**
|
|
1307
|
+
* The last modification date.
|
|
1308
|
+
*/
|
|
1309
|
+
lastModDate?: Date;
|
|
1310
|
+
/**
|
|
1311
|
+
* The Unix user id.
|
|
1312
|
+
*/
|
|
1313
|
+
uid?: number;
|
|
1314
|
+
/**
|
|
1315
|
+
* The Unix group id.
|
|
1316
|
+
*/
|
|
1317
|
+
gid?: number;
|
|
1318
|
+
}
|
|
1295
1319
|
/**
|
|
1296
1320
|
* Represents a Unicode path or comment extra field record of an entry.
|
|
1297
1321
|
*/
|
|
@@ -1387,6 +1411,14 @@ export interface LocalDirectory {
|
|
|
1387
1411
|
* The Info-ZIP Unix extra field.
|
|
1388
1412
|
*/
|
|
1389
1413
|
extraFieldInfoZip?: EntryExtraField;
|
|
1414
|
+
/**
|
|
1415
|
+
* The Info-ZIP Unix type 1 extra field (0x5855).
|
|
1416
|
+
*/
|
|
1417
|
+
extraFieldUnixType1?: EntryExtraFieldUnixDates;
|
|
1418
|
+
/**
|
|
1419
|
+
* The PKWARE Unix extra field (0x000d).
|
|
1420
|
+
*/
|
|
1421
|
+
extraFieldPkwareUnix?: EntryExtraFieldUnixDates;
|
|
1390
1422
|
/**
|
|
1391
1423
|
* The extended timestamp extra field.
|
|
1392
1424
|
*/
|
|
@@ -1660,6 +1692,14 @@ export interface EntryMetaData {
|
|
|
1660
1692
|
* The Info-ZIP Unix extra field.
|
|
1661
1693
|
*/
|
|
1662
1694
|
extraFieldInfoZip?: EntryExtraField;
|
|
1695
|
+
/**
|
|
1696
|
+
* The Info-ZIP Unix type 1 extra field (0x5855).
|
|
1697
|
+
*/
|
|
1698
|
+
extraFieldUnixType1?: EntryExtraFieldUnixDates;
|
|
1699
|
+
/**
|
|
1700
|
+
* The PKWARE Unix extra field (0x000d).
|
|
1701
|
+
*/
|
|
1702
|
+
extraFieldPkwareUnix?: EntryExtraFieldUnixDates;
|
|
1663
1703
|
/**
|
|
1664
1704
|
* The extended timestamp extra field.
|
|
1665
1705
|
*/
|
|
@@ -1968,15 +2008,23 @@ export interface ZipWriterAddDataOptions
|
|
|
1968
2008
|
*/
|
|
1969
2009
|
comment?: string;
|
|
1970
2010
|
/**
|
|
1971
|
-
* The extra field of the entry.
|
|
2011
|
+
* The extra field of the entry, written in the local file header and the central directory.
|
|
1972
2012
|
*/
|
|
1973
2013
|
extraField?: Map<number, Uint8Array>;
|
|
2014
|
+
/**
|
|
2015
|
+
* The extra field of the entry written only in the local file header.
|
|
2016
|
+
*/
|
|
2017
|
+
localExtraField?: Map<number, Uint8Array>;
|
|
1974
2018
|
/**
|
|
1975
2019
|
* The uncompressed size of the entry. This option is ignored if the {@link ZipWriterConstructorOptions#passThrough} option is not set to `true`.
|
|
1976
2020
|
*/
|
|
1977
2021
|
uncompressedSize?: number;
|
|
1978
2022
|
/**
|
|
1979
2023
|
* The CRC-32 checksum of the content. This option is ignored if the {@link ZipWriterConstructorOptions#passThrough} option is not set to `true`.
|
|
2024
|
+
*
|
|
2025
|
+
* When the entry is AES-encrypted (see {@link ZipWriterConstructorOptions#encrypted}), setting this option marks the entry as AE-1
|
|
2026
|
+
* and stores the checksum in the entry headers, e.g. when copying an AE-1 entry read with the
|
|
2027
|
+
* {@link ZipReaderOptions#passThrough} option. Otherwise, the entry is marked as AE-2 and the checksum fields are set to 0.
|
|
1980
2028
|
*/
|
|
1981
2029
|
crc32?: number;
|
|
1982
2030
|
/**
|
package/index.d.ts
CHANGED
|
@@ -1292,6 +1292,30 @@ export interface EntryExtraFieldAES extends EntryExtraField {
|
|
|
1292
1292
|
*/
|
|
1293
1293
|
originalCompressionMethod?: number;
|
|
1294
1294
|
}
|
|
1295
|
+
/**
|
|
1296
|
+
* Represents a Unix extra field record storing timestamps: the Info-ZIP Unix type 1 extra field (0x5855),
|
|
1297
|
+
* written notably by macOS Archive Utility and `ditto`, or the PKWARE Unix extra field (0x000d). Both store
|
|
1298
|
+
* the last access/modification dates as 32-bit Unix times, followed by the optional uid/gid in the local
|
|
1299
|
+
* file header.
|
|
1300
|
+
*/
|
|
1301
|
+
export interface EntryExtraFieldUnixDates extends EntryExtraField {
|
|
1302
|
+
/**
|
|
1303
|
+
* The last access date.
|
|
1304
|
+
*/
|
|
1305
|
+
lastAccessDate?: Date;
|
|
1306
|
+
/**
|
|
1307
|
+
* The last modification date.
|
|
1308
|
+
*/
|
|
1309
|
+
lastModDate?: Date;
|
|
1310
|
+
/**
|
|
1311
|
+
* The Unix user id.
|
|
1312
|
+
*/
|
|
1313
|
+
uid?: number;
|
|
1314
|
+
/**
|
|
1315
|
+
* The Unix group id.
|
|
1316
|
+
*/
|
|
1317
|
+
gid?: number;
|
|
1318
|
+
}
|
|
1295
1319
|
/**
|
|
1296
1320
|
* Represents a Unicode path or comment extra field record of an entry.
|
|
1297
1321
|
*/
|
|
@@ -1387,6 +1411,14 @@ export interface LocalDirectory {
|
|
|
1387
1411
|
* The Info-ZIP Unix extra field.
|
|
1388
1412
|
*/
|
|
1389
1413
|
extraFieldInfoZip?: EntryExtraField;
|
|
1414
|
+
/**
|
|
1415
|
+
* The Info-ZIP Unix type 1 extra field (0x5855).
|
|
1416
|
+
*/
|
|
1417
|
+
extraFieldUnixType1?: EntryExtraFieldUnixDates;
|
|
1418
|
+
/**
|
|
1419
|
+
* The PKWARE Unix extra field (0x000d).
|
|
1420
|
+
*/
|
|
1421
|
+
extraFieldPkwareUnix?: EntryExtraFieldUnixDates;
|
|
1390
1422
|
/**
|
|
1391
1423
|
* The extended timestamp extra field.
|
|
1392
1424
|
*/
|
|
@@ -1660,6 +1692,14 @@ export interface EntryMetaData {
|
|
|
1660
1692
|
* The Info-ZIP Unix extra field.
|
|
1661
1693
|
*/
|
|
1662
1694
|
extraFieldInfoZip?: EntryExtraField;
|
|
1695
|
+
/**
|
|
1696
|
+
* The Info-ZIP Unix type 1 extra field (0x5855).
|
|
1697
|
+
*/
|
|
1698
|
+
extraFieldUnixType1?: EntryExtraFieldUnixDates;
|
|
1699
|
+
/**
|
|
1700
|
+
* The PKWARE Unix extra field (0x000d).
|
|
1701
|
+
*/
|
|
1702
|
+
extraFieldPkwareUnix?: EntryExtraFieldUnixDates;
|
|
1663
1703
|
/**
|
|
1664
1704
|
* The extended timestamp extra field.
|
|
1665
1705
|
*/
|
|
@@ -1968,15 +2008,23 @@ export interface ZipWriterAddDataOptions
|
|
|
1968
2008
|
*/
|
|
1969
2009
|
comment?: string;
|
|
1970
2010
|
/**
|
|
1971
|
-
* The extra field of the entry.
|
|
2011
|
+
* The extra field of the entry, written in the local file header and the central directory.
|
|
1972
2012
|
*/
|
|
1973
2013
|
extraField?: Map<number, Uint8Array>;
|
|
2014
|
+
/**
|
|
2015
|
+
* The extra field of the entry written only in the local file header.
|
|
2016
|
+
*/
|
|
2017
|
+
localExtraField?: Map<number, Uint8Array>;
|
|
1974
2018
|
/**
|
|
1975
2019
|
* The uncompressed size of the entry. This option is ignored if the {@link ZipWriterConstructorOptions#passThrough} option is not set to `true`.
|
|
1976
2020
|
*/
|
|
1977
2021
|
uncompressedSize?: number;
|
|
1978
2022
|
/**
|
|
1979
2023
|
* The CRC-32 checksum of the content. This option is ignored if the {@link ZipWriterConstructorOptions#passThrough} option is not set to `true`.
|
|
2024
|
+
*
|
|
2025
|
+
* When the entry is AES-encrypted (see {@link ZipWriterConstructorOptions#encrypted}), setting this option marks the entry as AE-1
|
|
2026
|
+
* and stores the checksum in the entry headers, e.g. when copying an AE-1 entry read with the
|
|
2027
|
+
* {@link ZipReaderOptions#passThrough} option. Otherwise, the entry is marked as AE-2 and the checksum fields are set to 0.
|
|
1980
2028
|
*/
|
|
1981
2029
|
crc32?: number;
|
|
1982
2030
|
/**
|