@loaders.gl/tile-converter 4.0.0-alpha.14 → 4.0.0-alpha.15
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/bin/i3s-server.js +4 -0
- package/dist/converter.min.js +58 -58
- package/dist/dist.min.js +241 -127
- package/dist/es5/deps-installer/deps-installer.js +1 -1
- package/dist/es5/i3s-converter/i3s-converter.js +26 -22
- package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/es5/i3s-server/README.md +46 -2
- package/dist/es5/i3s-server/app.js +3 -3
- package/dist/es5/i3s-server/app.js.map +1 -1
- package/dist/es5/i3s-server/bin/www.js +61 -0
- package/dist/es5/i3s-server/bin/www.js.map +1 -0
- package/dist/es5/i3s-server/controllers/slpk-controller.js +14 -18
- package/dist/es5/i3s-server/controllers/slpk-controller.js.map +1 -1
- package/dist/es5/index.js +7 -0
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/es5/slpk-extractor/helpers/file-handle-provider.js +59 -26
- package/dist/es5/slpk-extractor/helpers/file-handle-provider.js.map +1 -1
- package/dist/es5/slpk-extractor/helpers/fs-promises.js +77 -0
- package/dist/es5/slpk-extractor/helpers/fs-promises.js.map +1 -0
- package/dist/es5/slpk-extractor/slpk-extractor.js +7 -7
- package/dist/es5/slpk-extractor/slpk-extractor.js.map +1 -1
- package/dist/esm/deps-installer/deps-installer.js +1 -1
- package/dist/esm/i3s-converter/i3s-converter.js +5 -1
- package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
- package/dist/esm/i3s-server/README.md +46 -2
- package/dist/esm/i3s-server/app.js +4 -4
- package/dist/esm/i3s-server/app.js.map +1 -1
- package/dist/esm/i3s-server/bin/i3s-server.min.js +614 -0
- package/dist/esm/i3s-server/bin/{www → www.js} +12 -55
- package/dist/esm/i3s-server/bin/www.js.map +1 -0
- package/dist/esm/i3s-server/controllers/slpk-controller.js +6 -12
- package/dist/esm/i3s-server/controllers/slpk-controller.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/slpk-extractor/helpers/file-handle-provider.js +17 -6
- package/dist/esm/slpk-extractor/helpers/file-handle-provider.js.map +1 -1
- package/dist/esm/slpk-extractor/helpers/fs-promises.js +32 -0
- package/dist/esm/slpk-extractor/helpers/fs-promises.js.map +1 -0
- package/dist/esm/slpk-extractor/slpk-extractor.js +2 -2
- package/dist/esm/slpk-extractor/slpk-extractor.js.map +1 -1
- package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
- package/dist/i3s-converter/i3s-converter.js +5 -1
- package/dist/i3s-server/app.d.ts.map +1 -1
- package/dist/i3s-server/app.js +1 -1
- package/dist/i3s-server/bin/www.d.ts +3 -0
- package/dist/i3s-server/bin/www.d.ts.map +1 -0
- package/dist/i3s-server/bin/www.js +83 -0
- package/dist/i3s-server/controllers/slpk-controller.d.ts.map +1 -1
- package/dist/i3s-server/controllers/slpk-controller.js +4 -9
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/slpk-extractor/helpers/file-handle-provider.d.ts +15 -12
- package/dist/slpk-extractor/helpers/file-handle-provider.d.ts.map +1 -1
- package/dist/slpk-extractor/helpers/file-handle-provider.js +25 -10
- package/dist/slpk-extractor/helpers/fs-promises.d.ts +38 -0
- package/dist/slpk-extractor/helpers/fs-promises.d.ts.map +1 -0
- package/dist/slpk-extractor/helpers/fs-promises.js +51 -0
- package/dist/slpk-extractor/slpk-extractor.d.ts +2 -2
- package/dist/slpk-extractor/slpk-extractor.d.ts.map +1 -1
- package/dist/slpk-extractor/slpk-extractor.js +4 -7
- package/dist/slpk-extractor.min.js +44 -44
- package/package.json +21 -20
- package/src/i3s-converter/i3s-converter.ts +5 -1
- package/src/i3s-server/README.md +46 -2
- package/src/i3s-server/app.js +1 -1
- package/{dist/es5/i3s-server/bin/www → src/i3s-server/bin/www.js} +7 -7
- package/src/i3s-server/controllers/slpk-controller.js +4 -11
- package/src/index.ts +1 -0
- package/src/slpk-extractor/helpers/file-handle-provider.ts +36 -18
- package/src/slpk-extractor/helpers/fs-promises.ts +66 -0
- package/src/slpk-extractor/slpk-extractor.ts +5 -6
- package/src/i3s-server/bin/www +0 -102
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { FileProvider } from '@loaders.gl/i3s';
|
|
3
|
-
import { PathLike } from 'fs';
|
|
4
2
|
/**
|
|
5
3
|
* Provides file data using node fs library
|
|
6
4
|
*/
|
|
@@ -9,7 +7,7 @@ export declare class FileHandleProvider implements FileProvider {
|
|
|
9
7
|
* Returns a new copy of FileHandleProvider
|
|
10
8
|
* @param path The path to the file in file system
|
|
11
9
|
*/
|
|
12
|
-
static from(path:
|
|
10
|
+
static from(path: string): Promise<FileHandleProvider>;
|
|
13
11
|
/**
|
|
14
12
|
* The FileHandle from which data is provided
|
|
15
13
|
*/
|
|
@@ -20,29 +18,34 @@ export declare class FileHandleProvider implements FileProvider {
|
|
|
20
18
|
private size;
|
|
21
19
|
private constructor();
|
|
22
20
|
/**
|
|
23
|
-
* Gets an unsigned 8-bit integer
|
|
21
|
+
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
24
22
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
25
23
|
*/
|
|
26
|
-
getUint8(offset:
|
|
24
|
+
getUint8(offset: bigint): Promise<number>;
|
|
27
25
|
/**
|
|
28
|
-
* Gets an unsigned 16-bit integer
|
|
26
|
+
* Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.
|
|
29
27
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
30
28
|
*/
|
|
31
|
-
getUint16(offset:
|
|
29
|
+
getUint16(offset: bigint): Promise<number>;
|
|
32
30
|
/**
|
|
33
|
-
* Gets an unsigned 32-bit integer
|
|
31
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
34
32
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
35
33
|
*/
|
|
36
|
-
getUint32(offset:
|
|
34
|
+
getUint32(offset: bigint): Promise<number>;
|
|
35
|
+
/**
|
|
36
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
37
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
38
|
+
*/
|
|
39
|
+
getBigUint64(offset: bigint): Promise<bigint>;
|
|
37
40
|
/**
|
|
38
41
|
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
39
|
-
* @param
|
|
42
|
+
* @param startOffsset The offset, in byte, from the start of the file where to start reading the data.
|
|
40
43
|
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
41
44
|
*/
|
|
42
|
-
slice(
|
|
45
|
+
slice(startOffsset: bigint, endOffset: bigint): Promise<ArrayBuffer>;
|
|
43
46
|
/**
|
|
44
47
|
* the length (in bytes) of the data.
|
|
45
48
|
*/
|
|
46
|
-
get length():
|
|
49
|
+
get length(): bigint;
|
|
47
50
|
}
|
|
48
51
|
//# sourceMappingURL=file-handle-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-handle-provider.d.ts","sourceRoot":"","sources":["../../../src/slpk-extractor/helpers/file-handle-provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-handle-provider.d.ts","sourceRoot":"","sources":["../../../src/slpk-extractor/helpers/file-handle-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAG7C;;GAEG;AACH,qBAAa,kBAAmB,YAAW,YAAY;IACrD;;;OAGG;WACU,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAK5D;;OAEG;IACH,OAAO,CAAC,cAAc,CAAa;IAEnC;;OAEG;IACH,OAAO,CAAC,IAAI,CAAS;IAErB,OAAO;IAKP;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAU/C;;;OAGG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUhD;;;OAGG;IACG,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUhD;;;OAGG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUnD;;;;OAIG;IACG,KAAK,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAU1E;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FileHandleProvider = void 0;
|
|
4
|
-
const
|
|
4
|
+
const fs_promises_1 = require("./fs-promises");
|
|
5
5
|
/**
|
|
6
6
|
* Provides file data using node fs library
|
|
7
7
|
*/
|
|
@@ -11,15 +11,15 @@ class FileHandleProvider {
|
|
|
11
11
|
* @param path The path to the file in file system
|
|
12
12
|
*/
|
|
13
13
|
static async from(path) {
|
|
14
|
-
const fileDescriptor = await
|
|
15
|
-
return new FileHandleProvider(fileDescriptor,
|
|
14
|
+
const fileDescriptor = await fs_promises_1.FileHandle.open(path);
|
|
15
|
+
return new FileHandleProvider(fileDescriptor, fileDescriptor.stat.size);
|
|
16
16
|
}
|
|
17
17
|
constructor(fileDescriptor, size) {
|
|
18
18
|
this.fileDescriptor = fileDescriptor;
|
|
19
19
|
this.size = size;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Gets an unsigned 8-bit integer
|
|
22
|
+
* Gets an unsigned 8-bit integer at the specified byte offset from the start of the file.
|
|
23
23
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
24
24
|
*/
|
|
25
25
|
async getUint8(offset) {
|
|
@@ -30,7 +30,7 @@ class FileHandleProvider {
|
|
|
30
30
|
return val;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Gets an unsigned 16-bit integer
|
|
33
|
+
* Gets an unsigned 16-bit integer at the specified byte offset from the start of the file.
|
|
34
34
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
35
35
|
*/
|
|
36
36
|
async getUint16(offset) {
|
|
@@ -41,7 +41,7 @@ class FileHandleProvider {
|
|
|
41
41
|
return val;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Gets an unsigned 32-bit integer
|
|
44
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
45
45
|
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
46
46
|
*/
|
|
47
47
|
async getUint32(offset) {
|
|
@@ -51,14 +51,29 @@ class FileHandleProvider {
|
|
|
51
51
|
}
|
|
52
52
|
return val;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Gets an unsigned 32-bit integer at the specified byte offset from the start of the file.
|
|
56
|
+
* @param offset The offset, in bytes, from the start of the file where to read the data.
|
|
57
|
+
*/
|
|
58
|
+
async getBigUint64(offset) {
|
|
59
|
+
const val = new BigInt64Array((await this.fileDescriptor.read(Buffer.alloc(8), 0, 4, offset)).buffer.buffer).at(0);
|
|
60
|
+
if (val === undefined) {
|
|
61
|
+
throw new Error('something went wrong');
|
|
62
|
+
}
|
|
63
|
+
return val;
|
|
64
|
+
}
|
|
54
65
|
/**
|
|
55
66
|
* returns an ArrayBuffer whose contents are a copy of this file bytes from startOffset, inclusive, up to endOffset, exclusive.
|
|
56
|
-
* @param
|
|
67
|
+
* @param startOffsset The offset, in byte, from the start of the file where to start reading the data.
|
|
57
68
|
* @param endOffset The offset, in bytes, from the start of the file where to end reading the data.
|
|
58
69
|
*/
|
|
59
|
-
async slice(
|
|
60
|
-
const
|
|
61
|
-
|
|
70
|
+
async slice(startOffsset, endOffset) {
|
|
71
|
+
const bigLength = endOffset - startOffsset;
|
|
72
|
+
if (bigLength > Number.MAX_SAFE_INTEGER) {
|
|
73
|
+
throw new Error('too big slice');
|
|
74
|
+
}
|
|
75
|
+
const length = Number(bigLength);
|
|
76
|
+
return (await this.fileDescriptor.read(Buffer.alloc(length), 0, length, startOffsset)).buffer
|
|
62
77
|
.buffer;
|
|
63
78
|
}
|
|
64
79
|
/**
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { BigIntStats } from 'fs';
|
|
4
|
+
/** file reading result */
|
|
5
|
+
export type FileReadResult = {
|
|
6
|
+
/** amount of the bytes read */
|
|
7
|
+
bytesRead: number;
|
|
8
|
+
/** the buffer filled with data from file*/
|
|
9
|
+
buffer: Buffer;
|
|
10
|
+
};
|
|
11
|
+
/** Object handling file info */
|
|
12
|
+
export declare class FileHandle {
|
|
13
|
+
private fileDescriptor;
|
|
14
|
+
private stats;
|
|
15
|
+
private constructor();
|
|
16
|
+
/**
|
|
17
|
+
* Opens a `FileHandle`.
|
|
18
|
+
*
|
|
19
|
+
* @param path path to the file
|
|
20
|
+
* @return Fulfills with a {FileHandle} object.
|
|
21
|
+
*/
|
|
22
|
+
static open: (path: string) => Promise<FileHandle>;
|
|
23
|
+
/**
|
|
24
|
+
* Reads data from the file and stores that in the given buffer.
|
|
25
|
+
*
|
|
26
|
+
* If the file is not modified concurrently, the end-of-file is reached when the
|
|
27
|
+
* number of bytes read is zero.
|
|
28
|
+
* @param buffer A buffer that will be filled with the file data read.
|
|
29
|
+
* @param offset The location in the buffer at which to start filling.
|
|
30
|
+
* @param length The number of bytes to read.
|
|
31
|
+
* @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
|
|
32
|
+
* integer, the current file position will remain unchanged.
|
|
33
|
+
* @return Fulfills upon success with a FileReadResult object
|
|
34
|
+
*/
|
|
35
|
+
read: (buffer: Buffer, offset: number, length: number, position: number | bigint) => Promise<FileReadResult>;
|
|
36
|
+
get stat(): BigIntStats;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=fs-promises.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs-promises.d.ts","sourceRoot":"","sources":["../../../src/slpk-extractor/helpers/fs-promises.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAmB,WAAW,EAAC,MAAM,IAAI,CAAC;AAEjD,0BAA0B;AAC1B,MAAM,MAAM,cAAc,GAAG;IAC3B,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gCAAgC;AAChC,qBAAa,UAAU;IACrB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO;IAIP;;;;;OAKG;IAEH,MAAM,CAAC,IAAI,SAAgB,MAAM,KAAG,QAAQ,UAAU,CAAC,CAUrD;IAEF;;;;;;;;;;;OAWG;IACH,IAAI,WACM,MAAM,UACN,MAAM,UACN,MAAM,YACJ,MAAM,GAAG,MAAM,KACxB,QAAQ,cAAc,CAAC,CAMxB;IAEF,IAAI,IAAI,IAAI,WAAW,CAEtB;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.FileHandle = void 0;
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
/** Object handling file info */
|
|
7
|
+
class FileHandle {
|
|
8
|
+
constructor(fileDescriptor, stats) {
|
|
9
|
+
/**
|
|
10
|
+
* Reads data from the file and stores that in the given buffer.
|
|
11
|
+
*
|
|
12
|
+
* If the file is not modified concurrently, the end-of-file is reached when the
|
|
13
|
+
* number of bytes read is zero.
|
|
14
|
+
* @param buffer A buffer that will be filled with the file data read.
|
|
15
|
+
* @param offset The location in the buffer at which to start filling.
|
|
16
|
+
* @param length The number of bytes to read.
|
|
17
|
+
* @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
|
|
18
|
+
* integer, the current file position will remain unchanged.
|
|
19
|
+
* @return Fulfills upon success with a FileReadResult object
|
|
20
|
+
*/
|
|
21
|
+
this.read = (buffer, offset, length, position) => {
|
|
22
|
+
return new Promise((s) => {
|
|
23
|
+
(0, fs_1.read)(this.fileDescriptor, buffer, offset, length, position, (_err, bytesRead, buffer) => s({ bytesRead, buffer }));
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
this.fileDescriptor = fileDescriptor;
|
|
27
|
+
this.stats = stats;
|
|
28
|
+
}
|
|
29
|
+
get stat() {
|
|
30
|
+
return this.stats;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.FileHandle = FileHandle;
|
|
34
|
+
_a = FileHandle;
|
|
35
|
+
/**
|
|
36
|
+
* Opens a `FileHandle`.
|
|
37
|
+
*
|
|
38
|
+
* @param path path to the file
|
|
39
|
+
* @return Fulfills with a {FileHandle} object.
|
|
40
|
+
*/
|
|
41
|
+
FileHandle.open = async (path) => {
|
|
42
|
+
const [fd, stats] = await Promise.all([
|
|
43
|
+
new Promise((s) => {
|
|
44
|
+
(0, fs_1.open)(path, undefined, undefined, (_err, fd) => s(fd));
|
|
45
|
+
}),
|
|
46
|
+
new Promise((s) => {
|
|
47
|
+
(0, fs_1.stat)(path, { bigint: true }, (_err, stats) => s(stats));
|
|
48
|
+
})
|
|
49
|
+
]);
|
|
50
|
+
return new FileHandle(fd, stats);
|
|
51
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Converter from slpk to i3s
|
|
3
3
|
*/
|
|
4
|
-
export default class
|
|
4
|
+
export default class SLPKConverter {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Extract slpk to i3s
|
|
7
7
|
* @param options
|
|
8
8
|
* @param options.inputUrl the url to read SLPK file
|
|
9
9
|
* @param options.outputPath the output filename
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slpk-extractor.d.ts","sourceRoot":"","sources":["../../src/slpk-extractor/slpk-extractor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"slpk-extractor.d.ts","sourceRoot":"","sources":["../../src/slpk-extractor/slpk-extractor.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,aAAa;IAChC;;;;;OAKG;IACU,OAAO,CAAC,OAAO,EAAE;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IA8BtF;;;OAGG;IAEH,OAAO,CAAC,iBAAiB;YAYX,MAAM;YAWN,SAAS;CASxB"}
|
|
@@ -7,9 +7,6 @@ const i3s_1 = require("@loaders.gl/i3s");
|
|
|
7
7
|
const loader_utils_1 = require("@loaders.gl/loader-utils");
|
|
8
8
|
const compression_1 = require("@loaders.gl/compression");
|
|
9
9
|
const file_utils_1 = require("../lib/utils/file-utils");
|
|
10
|
-
/**
|
|
11
|
-
* names of files that should be changed to index
|
|
12
|
-
*/
|
|
13
10
|
const indexNames = [
|
|
14
11
|
'3dSceneLayer.json.gz',
|
|
15
12
|
'3dNodeIndexDocument.json.gz',
|
|
@@ -18,9 +15,9 @@ const indexNames = [
|
|
|
18
15
|
/**
|
|
19
16
|
* Converter from slpk to i3s
|
|
20
17
|
*/
|
|
21
|
-
class
|
|
18
|
+
class SLPKConverter {
|
|
22
19
|
/**
|
|
23
|
-
*
|
|
20
|
+
* Extract slpk to i3s
|
|
24
21
|
* @param options
|
|
25
22
|
* @param options.inputUrl the url to read SLPK file
|
|
26
23
|
* @param options.outputPath the output filename
|
|
@@ -32,7 +29,7 @@ class SLPKExtractor {
|
|
|
32
29
|
}
|
|
33
30
|
const { inputUrl } = options;
|
|
34
31
|
const provider = await file_handle_provider_1.FileHandleProvider.from(inputUrl);
|
|
35
|
-
let localHeader = await (0, i3s_1.parseZipLocalFileHeader)(
|
|
32
|
+
let localHeader = await (0, i3s_1.parseZipLocalFileHeader)(0n, provider);
|
|
36
33
|
while (localHeader) {
|
|
37
34
|
await this.writeFile(await this.unGzip({
|
|
38
35
|
name: this.correctIndexNames(localHeader.fileName),
|
|
@@ -75,4 +72,4 @@ class SLPKExtractor {
|
|
|
75
72
|
await (0, file_utils_1.writeFile)(dirName, options.data, fileName);
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
|
-
exports.default =
|
|
75
|
+
exports.default = SLPKConverter;
|