@zip.js/zip.js 2.7.25 → 2.7.27

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.
@@ -1341,6 +1341,7 @@ const table = {
1341
1341
  "vnd.gdl": "gdl",
1342
1342
  "vnd.gtw": "gtw",
1343
1343
  "vnd.mts": "mts",
1344
+ "vnd.usdz+zip": "usdz",
1344
1345
  "vnd.vtu": "vtu"
1345
1346
  },
1346
1347
  "text": {
@@ -48,6 +48,7 @@ import {
48
48
  EXTRAFIELD_TYPE_NTFS,
49
49
  EXTRAFIELD_TYPE_NTFS_TAG1,
50
50
  EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,
51
+ EXTRAFIELD_TYPE_USDZ,
51
52
  END_OF_CENTRAL_DIR_LENGTH,
52
53
  ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,
53
54
  ZIP64_END_OF_CENTRAL_DIR_LENGTH,
@@ -526,6 +527,10 @@ async function readCommonFooter(fileEntry, directory, dataView, offset, localDir
526
527
  readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory);
527
528
  directory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;
528
529
  }
530
+ const extraFieldUSDZ = extraField.get(EXTRAFIELD_TYPE_USDZ);
531
+ if (extraFieldUSDZ) {
532
+ directory.extraFieldUSDZ = extraFieldUSDZ;
533
+ }
529
534
  }
530
535
 
531
536
  function readExtraFieldZip64(extraFieldZip64, directory) {
@@ -392,7 +392,7 @@ async function getFileEntry(zipWriter, name, reader, entryInfo, options) {
392
392
  writingEntryData = true;
393
393
  fileEntry.diskNumberStart = diskNumber;
394
394
  if (usdz) {
395
- appendExtraFieldUSDZ(entryInfo, zipWriter.offset);
395
+ appendExtraFieldUSDZ(entryInfo, zipWriter.offset - diskOffset);
396
396
  }
397
397
  fileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);
398
398
  writingEntryData = false;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A JavaScript library to zip and unzip files in the browser, Deno and Node.js",
4
4
  "author": "Gildas Lormeau",
5
5
  "license": "BSD-3-Clause",
6
- "version": "2.7.25",
6
+ "version": "2.7.27",
7
7
  "type": "module",
8
8
  "keywords": [
9
9
  "zip",