@zip.js/zip.js 2.7.70 → 2.7.72

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/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
- interface URLString extends String {}
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
  */
@@ -2332,6 +2349,10 @@ export const ERR_UNSUPPORTED_FORMAT: string;
2332
2349
  * Split zip file error
2333
2350
  */
2334
2351
  export const ERR_SPLIT_ZIP_FILE: string;
2352
+ /**
2353
+ * Overlapping entry error
2354
+ */
2355
+ export const ERR_OVERLAPPING_ENTRY: string;
2335
2356
  /**
2336
2357
  * Iteration completed too soon error
2337
2358
  */
package/index.js CHANGED
@@ -85,6 +85,7 @@ export {
85
85
  ERR_UNDEFINED_UNCOMPRESSED_SIZE,
86
86
  ERR_ZIP_NOT_EMPTY,
87
87
  ERR_SPLIT_ZIP_FILE,
88
+ ERR_OVERLAPPING_ENTRY,
88
89
  ERR_ITERATOR_COMPLETED_TOO_SOON,
89
90
  ERR_WRITER_NOT_INITIALIZED
90
91
  } from "./lib/zip-fs.js";