@loaders.gl/shapefile 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.
@@ -2,6 +2,10 @@
2
2
  (() => {
3
3
  // src/lib/streaming/binary-chunk-reader.ts
4
4
  var BinaryChunkReader = class {
5
+ offset;
6
+ arrayBuffers;
7
+ ended;
8
+ maxRewindBytes;
5
9
  constructor(options) {
6
10
  const { maxRewindBytes = 0 } = options || {};
7
11
  this.offset = 0;
@@ -359,21 +363,21 @@
359
363
  ERROR: 3
360
364
  };
361
365
  var SHPParser = class {
366
+ options = {};
367
+ binaryReader = new BinaryChunkReader({ maxRewindBytes: SHP_RECORD_HEADER_SIZE });
368
+ state = STATE.EXPECTING_HEADER;
369
+ result = {
370
+ geometries: [],
371
+ // Initialize with number values to make TS happy
372
+ // These are initialized for real in STATE.EXPECTING_HEADER
373
+ progress: {
374
+ bytesTotal: NaN,
375
+ bytesUsed: NaN,
376
+ rows: NaN
377
+ },
378
+ currentIndex: NaN
379
+ };
362
380
  constructor(options) {
363
- this.options = {};
364
- this.binaryReader = new BinaryChunkReader({ maxRewindBytes: SHP_RECORD_HEADER_SIZE });
365
- this.state = STATE.EXPECTING_HEADER;
366
- this.result = {
367
- geometries: [],
368
- // Initialize with number values to make TS happy
369
- // These are initialized for real in STATE.EXPECTING_HEADER
370
- progress: {
371
- bytesTotal: NaN,
372
- bytesUsed: NaN,
373
- rows: NaN
374
- },
375
- currentIndex: NaN
376
- };
377
381
  this.options = options;
378
382
  }
379
383
  write(arrayBuffer) {
@@ -480,7 +484,7 @@
480
484
  }
481
485
 
482
486
  // src/shp-loader.ts
483
- var VERSION = true ? "4.2.0-alpha.4" : "latest";
487
+ var VERSION = true ? "4.2.0-alpha.5" : "latest";
484
488
  var SHP_MAGIC_NUMBER2 = [0, 0, 39, 10];
485
489
  var SHPWorkerLoader = {
486
490
  name: "SHP",
@@ -565,7 +569,9 @@
565
569
  }
566
570
  getParentPort().then((parentPort2) => {
567
571
  if (parentPort2) {
568
- parentPort2.on("message", handleMessage);
572
+ parentPort2.on("message", (message) => {
573
+ handleMessage(message);
574
+ });
569
575
  parentPort2.on("exit", () => console.debug("Node worker closing"));
570
576
  } else {
571
577
  globalThis.onmessage = handleMessage;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@loaders.gl/shapefile",
3
3
  "description": "Loader for the Shapefile Format",
4
- "version": "4.2.0-alpha.5",
4
+ "version": "4.2.0-alpha.6",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "publishConfig": {
@@ -45,13 +45,13 @@
45
45
  "build-worker-dbf": "esbuild src/workers/dbf-worker.ts --bundle --outfile=dist/dbf-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
46
46
  },
47
47
  "dependencies": {
48
- "@loaders.gl/gis": "4.2.0-alpha.5",
49
- "@loaders.gl/loader-utils": "4.2.0-alpha.5",
50
- "@loaders.gl/schema": "4.2.0-alpha.5",
48
+ "@loaders.gl/gis": "4.2.0-alpha.6",
49
+ "@loaders.gl/loader-utils": "4.2.0-alpha.6",
50
+ "@loaders.gl/schema": "4.2.0-alpha.6",
51
51
  "@math.gl/proj4": "^4.0.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@loaders.gl/core": "^4.0.0"
55
55
  },
56
- "gitHead": "32d95a81971f104e4dfeb88ab57065f05321a76a"
56
+ "gitHead": "37bd8ca71763529f18727ee4bf29dd176aa914ca"
57
57
  }