@loaders.gl/zip 4.2.0-alpha.5 → 4.2.0-alpha.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/zip",
3
- "version": "4.2.0-alpha.5",
3
+ "version": "4.2.0-alpha.6",
4
4
  "description": "Zip Archive Loader",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -39,14 +39,14 @@
39
39
  "build-bundle-dev": "ocular-bundle ./bundle.ts --env=dev --output=dist/dist.dev.js"
40
40
  },
41
41
  "dependencies": {
42
- "@loaders.gl/compression": "4.2.0-alpha.5",
43
- "@loaders.gl/crypto": "4.2.0-alpha.5",
44
- "@loaders.gl/loader-utils": "4.2.0-alpha.5",
42
+ "@loaders.gl/compression": "4.2.0-alpha.6",
43
+ "@loaders.gl/crypto": "4.2.0-alpha.6",
44
+ "@loaders.gl/loader-utils": "4.2.0-alpha.6",
45
45
  "jszip": "^3.1.5",
46
46
  "md5": "^2.3.0"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@loaders.gl/core": "^4.0.0"
50
50
  },
51
- "gitHead": "32d95a81971f104e4dfeb88ab57065f05321a76a"
51
+ "gitHead": "37bd8ca71763529f18727ee4bf29dd176aa914ca"
52
52
  }
@@ -94,6 +94,10 @@ export class ZipFileSystem implements FileSystem {
94
94
  * @returns - Response with file data
95
95
  */
96
96
  async fetch(filename: string): Promise<Response> {
97
+ if (this.fileName && filename.indexOf(this.fileName) === 0) {
98
+ filename = filename.substring(this.fileName.length + 1);
99
+ }
100
+
97
101
  let uncompressedFile: ArrayBuffer;
98
102
  if (this.archive) {
99
103
  uncompressedFile = await this.archive.getFile(filename, 'http');