@versatiles/versatiles-rs 4.15.0 → 5.0.0-rc.2
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/README.md +22 -11
- package/index.cjs +54 -55
- package/index.d.ts +18 -36
- package/index.js +55 -56
- package/package.json +19 -19
- package/vpl.d.ts +1 -1
package/README.md
CHANGED
|
@@ -217,14 +217,14 @@ Open a tile container.
|
|
|
217
217
|
|
|
218
218
|
**Returns:** `Promise<TileSource>`
|
|
219
219
|
|
|
220
|
-
#### `TileSource.
|
|
220
|
+
#### `TileSource.fromVpl(vpl, dir?, options?)`
|
|
221
221
|
|
|
222
222
|
Create a tile source from VPL (VersaTiles Pipeline Language).
|
|
223
223
|
|
|
224
224
|
**Parameters:**
|
|
225
225
|
|
|
226
226
|
- `vpl` (string): VPL query string
|
|
227
|
-
- `
|
|
227
|
+
- `dir` (string, optional): Base directory for resolving relative paths in the VPL; defaults to the current working directory
|
|
228
228
|
- `options` (SourceOptions, optional): Same as `TileSource.fromPath()`
|
|
229
229
|
|
|
230
230
|
**Returns:** `Promise<TileSource>`
|
|
@@ -249,13 +249,24 @@ Get TileJSON metadata.
|
|
|
249
249
|
|
|
250
250
|
```typescript
|
|
251
251
|
interface TileJSON {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
//
|
|
252
|
+
version: string;
|
|
253
|
+
minzoom: number;
|
|
254
|
+
maxzoom: number;
|
|
255
|
+
bounds?: number[]; // [west, south, east, north]
|
|
256
|
+
center?: number[]; // [longitude, latitude, zoom]
|
|
257
|
+
vectorLayers?: VectorLayer[];
|
|
258
|
+
tileType?: string; // "raster", "vector", …
|
|
259
|
+
tileFormat?: string; // e.g. "image/png", "application/x-protobuf"
|
|
260
|
+
tileSchema?: string;
|
|
261
|
+
tileSize?: number;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
interface VectorLayer {
|
|
265
|
+
id: string;
|
|
266
|
+
fields: Record<string, string>;
|
|
267
|
+
description?: string;
|
|
268
|
+
minzoom?: number;
|
|
269
|
+
maxzoom?: number;
|
|
259
270
|
}
|
|
260
271
|
```
|
|
261
272
|
|
|
@@ -336,7 +347,7 @@ Remove a tile source.
|
|
|
336
347
|
|
|
337
348
|
- `name` (string): Source name to remove
|
|
338
349
|
|
|
339
|
-
**Returns:** `Promise<
|
|
350
|
+
**Returns:** `Promise<boolean>` — `true` if a source with that name was removed
|
|
340
351
|
|
|
341
352
|
#### `server.addStaticSource(path, urlPrefix?)`
|
|
342
353
|
|
|
@@ -521,7 +532,7 @@ npx tsx examples/<filename>.ts
|
|
|
521
532
|
|
|
522
533
|
### Requirements
|
|
523
534
|
|
|
524
|
-
- Node.js >=
|
|
535
|
+
- Node.js >= 22
|
|
525
536
|
- Rust toolchain (for building from source)
|
|
526
537
|
|
|
527
538
|
### Build Process
|
package/index.cjs
CHANGED
|
@@ -89,8 +89,8 @@ function requireNative() {
|
|
|
89
89
|
try {
|
|
90
90
|
const binding = require('@versatiles/versatiles-rs-android-arm64')
|
|
91
91
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-android-arm64/package.json').version
|
|
92
|
-
if (bindingPackageVersion !== '
|
|
93
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
92
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
93
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
94
94
|
}
|
|
95
95
|
return binding
|
|
96
96
|
} catch (e) {
|
|
@@ -105,8 +105,8 @@ function requireNative() {
|
|
|
105
105
|
try {
|
|
106
106
|
const binding = require('@versatiles/versatiles-rs-android-arm-eabi')
|
|
107
107
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-android-arm-eabi/package.json').version
|
|
108
|
-
if (bindingPackageVersion !== '
|
|
109
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
108
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
109
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
110
110
|
}
|
|
111
111
|
return binding
|
|
112
112
|
} catch (e) {
|
|
@@ -126,8 +126,8 @@ function requireNative() {
|
|
|
126
126
|
try {
|
|
127
127
|
const binding = require('@versatiles/versatiles-rs-win32-x64-gnu')
|
|
128
128
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-x64-gnu/package.json').version
|
|
129
|
-
if (bindingPackageVersion !== '
|
|
130
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
129
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
130
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
131
131
|
}
|
|
132
132
|
return binding
|
|
133
133
|
} catch (e) {
|
|
@@ -142,8 +142,8 @@ function requireNative() {
|
|
|
142
142
|
try {
|
|
143
143
|
const binding = require('@versatiles/versatiles-rs-win32-x64-msvc')
|
|
144
144
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-x64-msvc/package.json').version
|
|
145
|
-
if (bindingPackageVersion !== '
|
|
146
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
145
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
146
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
147
147
|
}
|
|
148
148
|
return binding
|
|
149
149
|
} catch (e) {
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@versatiles/versatiles-rs-win32-ia32-msvc')
|
|
161
161
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-ia32-msvc/package.json').version
|
|
162
|
-
if (bindingPackageVersion !== '
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
162
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
164
164
|
}
|
|
165
165
|
return binding
|
|
166
166
|
} catch (e) {
|
|
@@ -175,8 +175,8 @@ function requireNative() {
|
|
|
175
175
|
try {
|
|
176
176
|
const binding = require('@versatiles/versatiles-rs-win32-arm64-msvc')
|
|
177
177
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-arm64-msvc/package.json').version
|
|
178
|
-
if (bindingPackageVersion !== '
|
|
179
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
178
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
179
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
180
180
|
}
|
|
181
181
|
return binding
|
|
182
182
|
} catch (e) {
|
|
@@ -194,8 +194,8 @@ function requireNative() {
|
|
|
194
194
|
try {
|
|
195
195
|
const binding = require('@versatiles/versatiles-rs-darwin-universal')
|
|
196
196
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-darwin-universal/package.json').version
|
|
197
|
-
if (bindingPackageVersion !== '
|
|
198
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
197
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
198
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
199
199
|
}
|
|
200
200
|
return binding
|
|
201
201
|
} catch (e) {
|
|
@@ -210,8 +210,8 @@ function requireNative() {
|
|
|
210
210
|
try {
|
|
211
211
|
const binding = require('@versatiles/versatiles-rs-darwin-x64')
|
|
212
212
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-darwin-x64/package.json').version
|
|
213
|
-
if (bindingPackageVersion !== '
|
|
214
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
213
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
214
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
215
215
|
}
|
|
216
216
|
return binding
|
|
217
217
|
} catch (e) {
|
|
@@ -226,8 +226,8 @@ function requireNative() {
|
|
|
226
226
|
try {
|
|
227
227
|
const binding = require('@versatiles/versatiles-rs-darwin-arm64')
|
|
228
228
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-darwin-arm64/package.json').version
|
|
229
|
-
if (bindingPackageVersion !== '
|
|
230
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
229
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
230
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
231
231
|
}
|
|
232
232
|
return binding
|
|
233
233
|
} catch (e) {
|
|
@@ -246,8 +246,8 @@ function requireNative() {
|
|
|
246
246
|
try {
|
|
247
247
|
const binding = require('@versatiles/versatiles-rs-freebsd-x64')
|
|
248
248
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-freebsd-x64/package.json').version
|
|
249
|
-
if (bindingPackageVersion !== '
|
|
250
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
249
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
250
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
251
251
|
}
|
|
252
252
|
return binding
|
|
253
253
|
} catch (e) {
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@versatiles/versatiles-rs-freebsd-arm64')
|
|
264
264
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-freebsd-arm64/package.json').version
|
|
265
|
-
if (bindingPackageVersion !== '
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
265
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
267
267
|
}
|
|
268
268
|
return binding
|
|
269
269
|
} catch (e) {
|
|
@@ -283,8 +283,8 @@ function requireNative() {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = require('@versatiles/versatiles-rs-linux-x64-musl')
|
|
285
285
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-x64-musl/package.json').version
|
|
286
|
-
if (bindingPackageVersion !== '
|
|
287
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
286
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
287
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
288
288
|
}
|
|
289
289
|
return binding
|
|
290
290
|
} catch (e) {
|
|
@@ -299,8 +299,8 @@ function requireNative() {
|
|
|
299
299
|
try {
|
|
300
300
|
const binding = require('@versatiles/versatiles-rs-linux-x64-gnu')
|
|
301
301
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-x64-gnu/package.json').version
|
|
302
|
-
if (bindingPackageVersion !== '
|
|
303
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
302
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
303
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
304
304
|
}
|
|
305
305
|
return binding
|
|
306
306
|
} catch (e) {
|
|
@@ -317,8 +317,8 @@ function requireNative() {
|
|
|
317
317
|
try {
|
|
318
318
|
const binding = require('@versatiles/versatiles-rs-linux-arm64-musl')
|
|
319
319
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm64-musl/package.json').version
|
|
320
|
-
if (bindingPackageVersion !== '
|
|
321
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
320
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
321
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
322
322
|
}
|
|
323
323
|
return binding
|
|
324
324
|
} catch (e) {
|
|
@@ -333,8 +333,8 @@ function requireNative() {
|
|
|
333
333
|
try {
|
|
334
334
|
const binding = require('@versatiles/versatiles-rs-linux-arm64-gnu')
|
|
335
335
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm64-gnu/package.json').version
|
|
336
|
-
if (bindingPackageVersion !== '
|
|
337
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
336
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
337
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
338
338
|
}
|
|
339
339
|
return binding
|
|
340
340
|
} catch (e) {
|
|
@@ -351,8 +351,8 @@ function requireNative() {
|
|
|
351
351
|
try {
|
|
352
352
|
const binding = require('@versatiles/versatiles-rs-linux-arm-musleabihf')
|
|
353
353
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm-musleabihf/package.json').version
|
|
354
|
-
if (bindingPackageVersion !== '
|
|
355
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
354
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
355
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
356
356
|
}
|
|
357
357
|
return binding
|
|
358
358
|
} catch (e) {
|
|
@@ -367,8 +367,8 @@ function requireNative() {
|
|
|
367
367
|
try {
|
|
368
368
|
const binding = require('@versatiles/versatiles-rs-linux-arm-gnueabihf')
|
|
369
369
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm-gnueabihf/package.json').version
|
|
370
|
-
if (bindingPackageVersion !== '
|
|
371
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
370
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
371
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
372
372
|
}
|
|
373
373
|
return binding
|
|
374
374
|
} catch (e) {
|
|
@@ -385,8 +385,8 @@ function requireNative() {
|
|
|
385
385
|
try {
|
|
386
386
|
const binding = require('@versatiles/versatiles-rs-linux-loong64-musl')
|
|
387
387
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-loong64-musl/package.json').version
|
|
388
|
-
if (bindingPackageVersion !== '
|
|
389
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
388
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
389
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
390
390
|
}
|
|
391
391
|
return binding
|
|
392
392
|
} catch (e) {
|
|
@@ -401,8 +401,8 @@ function requireNative() {
|
|
|
401
401
|
try {
|
|
402
402
|
const binding = require('@versatiles/versatiles-rs-linux-loong64-gnu')
|
|
403
403
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-loong64-gnu/package.json').version
|
|
404
|
-
if (bindingPackageVersion !== '
|
|
405
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
404
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
405
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
406
406
|
}
|
|
407
407
|
return binding
|
|
408
408
|
} catch (e) {
|
|
@@ -419,8 +419,8 @@ function requireNative() {
|
|
|
419
419
|
try {
|
|
420
420
|
const binding = require('@versatiles/versatiles-rs-linux-riscv64-musl')
|
|
421
421
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-riscv64-musl/package.json').version
|
|
422
|
-
if (bindingPackageVersion !== '
|
|
423
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
422
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
423
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
424
424
|
}
|
|
425
425
|
return binding
|
|
426
426
|
} catch (e) {
|
|
@@ -435,8 +435,8 @@ function requireNative() {
|
|
|
435
435
|
try {
|
|
436
436
|
const binding = require('@versatiles/versatiles-rs-linux-riscv64-gnu')
|
|
437
437
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-riscv64-gnu/package.json').version
|
|
438
|
-
if (bindingPackageVersion !== '
|
|
439
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
438
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
439
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
440
440
|
}
|
|
441
441
|
return binding
|
|
442
442
|
} catch (e) {
|
|
@@ -452,8 +452,8 @@ function requireNative() {
|
|
|
452
452
|
try {
|
|
453
453
|
const binding = require('@versatiles/versatiles-rs-linux-ppc64-gnu')
|
|
454
454
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-ppc64-gnu/package.json').version
|
|
455
|
-
if (bindingPackageVersion !== '
|
|
456
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
455
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
456
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
457
457
|
}
|
|
458
458
|
return binding
|
|
459
459
|
} catch (e) {
|
|
@@ -468,8 +468,8 @@ function requireNative() {
|
|
|
468
468
|
try {
|
|
469
469
|
const binding = require('@versatiles/versatiles-rs-linux-s390x-gnu')
|
|
470
470
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-s390x-gnu/package.json').version
|
|
471
|
-
if (bindingPackageVersion !== '
|
|
472
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
471
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
472
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
473
473
|
}
|
|
474
474
|
return binding
|
|
475
475
|
} catch (e) {
|
|
@@ -488,8 +488,8 @@ function requireNative() {
|
|
|
488
488
|
try {
|
|
489
489
|
const binding = require('@versatiles/versatiles-rs-openharmony-arm64')
|
|
490
490
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-openharmony-arm64/package.json').version
|
|
491
|
-
if (bindingPackageVersion !== '
|
|
492
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
491
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
492
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
493
493
|
}
|
|
494
494
|
return binding
|
|
495
495
|
} catch (e) {
|
|
@@ -504,8 +504,8 @@ function requireNative() {
|
|
|
504
504
|
try {
|
|
505
505
|
const binding = require('@versatiles/versatiles-rs-openharmony-x64')
|
|
506
506
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-openharmony-x64/package.json').version
|
|
507
|
-
if (bindingPackageVersion !== '
|
|
508
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
507
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
508
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
509
509
|
}
|
|
510
510
|
return binding
|
|
511
511
|
} catch (e) {
|
|
@@ -520,8 +520,8 @@ function requireNative() {
|
|
|
520
520
|
try {
|
|
521
521
|
const binding = require('@versatiles/versatiles-rs-openharmony-arm')
|
|
522
522
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-openharmony-arm/package.json').version
|
|
523
|
-
if (bindingPackageVersion !== '
|
|
524
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
523
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
524
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
525
525
|
}
|
|
526
526
|
return binding
|
|
527
527
|
} catch (e) {
|
|
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
661
661
|
if (!candidateFailed) {
|
|
662
662
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
663
663
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-wasm32-wasi/package.json').version
|
|
664
|
-
if (bindingPackageVersion !== '
|
|
665
|
-
throw new Error(`WASI binding package version mismatch, expected
|
|
664
|
+
if (bindingPackageVersion !== '5.0.0-rc.2') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
wasiBinding = require('@versatiles/versatiles-rs-wasm32-wasi')
|
|
@@ -778,7 +778,6 @@ function __napiStampBindingTarget(exportsObject, target) {
|
|
|
778
778
|
// linked import resolves to `undefined`.
|
|
779
779
|
module.exports.__napiBindingTarget = __napiStampBindingTarget(nativeBinding, __napiLoadedBindingTarget)
|
|
780
780
|
module.exports = nativeBinding
|
|
781
|
-
module.exports.Progress = nativeBinding.Progress
|
|
782
781
|
module.exports.SourceType = nativeBinding.SourceType
|
|
783
782
|
module.exports.TileCoord = nativeBinding.TileCoord
|
|
784
783
|
module.exports.TileServer = nativeBinding.TileServer
|
package/index.d.ts
CHANGED
|
@@ -9,28 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const __napiBindingTarget: 'native' | 'wasm32-wasi' | 'wasm32-wasip1'
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Progress monitor for long-running operations
|
|
14
|
-
*
|
|
15
|
-
* This class allows monitoring the progress of tile conversion and other
|
|
16
|
-
* long-running operations through event listeners.
|
|
17
|
-
*/
|
|
18
|
-
export declare class Progress {
|
|
19
|
-
/**
|
|
20
|
-
* Register a progress event listener
|
|
21
|
-
*
|
|
22
|
-
* The callback receives ProgressData with position, total, percentage, speed, eta, and message.
|
|
23
|
-
* The eta field is a JavaScript Date object representing the estimated time of completion.
|
|
24
|
-
*/
|
|
25
|
-
onProgress(callback: (data: ProgressData) => void): this
|
|
26
|
-
/**
|
|
27
|
-
* Register a message event listener for step, warning, and error messages
|
|
28
|
-
*
|
|
29
|
-
* The callback receives (type, message) where type is 'step', 'warning', or 'error'
|
|
30
|
-
*/
|
|
31
|
-
onMessage(callback: (type: string, message: string) => void): this
|
|
32
|
-
}
|
|
33
|
-
|
|
34
12
|
/**
|
|
35
13
|
* Information about the tile source type and origin
|
|
36
14
|
*
|
|
@@ -513,7 +491,7 @@ export declare class TileSource {
|
|
|
513
491
|
*
|
|
514
492
|
* # Returns
|
|
515
493
|
*
|
|
516
|
-
* A `
|
|
494
|
+
* A `TileSource` ready to read tiles
|
|
517
495
|
*
|
|
518
496
|
* # Errors
|
|
519
497
|
*
|
|
@@ -526,10 +504,10 @@ export declare class TileSource {
|
|
|
526
504
|
*
|
|
527
505
|
* ```javascript
|
|
528
506
|
* // Open local file
|
|
529
|
-
* const
|
|
507
|
+
* const source = await TileSource.fromPath('tiles.versatiles');
|
|
530
508
|
*
|
|
531
509
|
* // Open remote file
|
|
532
|
-
* const
|
|
510
|
+
* const source = await TileSource.fromPath('https://example.com/tiles.pmtiles');
|
|
533
511
|
*
|
|
534
512
|
* // Open an SFTP file with a specific key
|
|
535
513
|
* const reader = await TileSource.fromPath('sftp://host/tiles.pmtiles', {
|
|
@@ -652,9 +630,11 @@ export declare class TileSource {
|
|
|
652
630
|
* - `total`: Total tile count
|
|
653
631
|
* - `percentage`: Progress percentage (0-100)
|
|
654
632
|
* - `speed`: Processing speed (tiles/second)
|
|
655
|
-
* - `
|
|
633
|
+
* - `estimatedSecondsRemaining`: Seconds left, if it can be estimated yet
|
|
634
|
+
* - `etaTimestamp`: Expected completion as milliseconds since the epoch, for `new Date(…)`
|
|
635
|
+
* - `message`: The current step, if any
|
|
656
636
|
*
|
|
657
|
-
* **onMessage callback** receives:
|
|
637
|
+
* **onMessage callback** receives one object with:
|
|
658
638
|
* - `type`: Message type ("step", "warning", or "error")
|
|
659
639
|
* - `message`: The message text
|
|
660
640
|
*
|
|
@@ -696,7 +676,7 @@ export declare class TileSource {
|
|
|
696
676
|
* (progress) => {
|
|
697
677
|
* console.log(`${progress.percentage.toFixed(1)}% complete`);
|
|
698
678
|
* },
|
|
699
|
-
* (type, message) => {
|
|
679
|
+
* ({ type, message }) => {
|
|
700
680
|
* if (type === 'error') console.error(message);
|
|
701
681
|
* }
|
|
702
682
|
* );
|
|
@@ -865,9 +845,11 @@ export declare function checkVpl(vpl: string): string
|
|
|
865
845
|
* - `total`: Total tile count
|
|
866
846
|
* - `percentage`: Progress percentage (0-100)
|
|
867
847
|
* - `speed`: Processing speed (tiles/second)
|
|
868
|
-
* - `
|
|
848
|
+
* - `estimatedSecondsRemaining`: Seconds left, if it can be estimated yet
|
|
849
|
+
* - `etaTimestamp`: Expected completion as milliseconds since the epoch, for `new Date(…)`
|
|
850
|
+
* - `message`: The current step, if any
|
|
869
851
|
*
|
|
870
|
-
* **onMessage callback** receives:
|
|
852
|
+
* **onMessage callback** receives one object with:
|
|
871
853
|
* - `type`: Message type ("step", "warning", or "error")
|
|
872
854
|
* - `message`: The message text
|
|
873
855
|
*
|
|
@@ -908,9 +890,9 @@ export declare function checkVpl(vpl: string): string
|
|
|
908
890
|
* (progress) => {
|
|
909
891
|
* console.log(`${progress.percentage.toFixed(1)}% complete`);
|
|
910
892
|
* console.log(`Speed: ${progress.speed.toFixed(0)} tiles/sec`);
|
|
911
|
-
* console.log(`ETA: ${new Date(progress.
|
|
893
|
+
* if (progress.etaTimestamp) console.log(`ETA: ${new Date(progress.etaTimestamp)}`);
|
|
912
894
|
* },
|
|
913
|
-
* (type, message) => {
|
|
895
|
+
* ({ type, message }) => {
|
|
914
896
|
* if (type === 'error') console.error(message);
|
|
915
897
|
* else if (type === 'warning') console.warn(message);
|
|
916
898
|
* else console.log(message);
|
|
@@ -1260,16 +1242,16 @@ export interface ProgressData {
|
|
|
1260
1242
|
*/
|
|
1261
1243
|
estimatedSecondsRemaining?: number
|
|
1262
1244
|
/**
|
|
1263
|
-
* Estimated completion time
|
|
1245
|
+
* Estimated completion time
|
|
1264
1246
|
*
|
|
1265
1247
|
* Timestamp in milliseconds since UNIX epoch (January 1, 1970).
|
|
1266
|
-
* Can be converted to a JavaScript Date object with `new Date(
|
|
1248
|
+
* Can be converted to a JavaScript Date object with `new Date(etaTimestamp)`.
|
|
1267
1249
|
* Returns `null` if insufficient data to estimate.
|
|
1268
1250
|
*
|
|
1269
1251
|
* **Example:**
|
|
1270
1252
|
* ```javascript
|
|
1271
|
-
* if (progress.
|
|
1272
|
-
* const completionTime = new Date(progress.
|
|
1253
|
+
* if (progress.etaTimestamp) {
|
|
1254
|
+
* const completionTime = new Date(progress.etaTimestamp);
|
|
1273
1255
|
* console.log(`Expected completion: ${completionTime.toLocaleTimeString()}`);
|
|
1274
1256
|
* }
|
|
1275
1257
|
* ```
|
package/index.js
CHANGED
|
@@ -92,8 +92,8 @@ function requireNative() {
|
|
|
92
92
|
try {
|
|
93
93
|
const binding = require('@versatiles/versatiles-rs-android-arm64')
|
|
94
94
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-android-arm64/package.json').version
|
|
95
|
-
if (bindingPackageVersion !== '
|
|
96
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
95
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
96
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
97
97
|
}
|
|
98
98
|
return binding
|
|
99
99
|
} catch (e) {
|
|
@@ -108,8 +108,8 @@ function requireNative() {
|
|
|
108
108
|
try {
|
|
109
109
|
const binding = require('@versatiles/versatiles-rs-android-arm-eabi')
|
|
110
110
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-android-arm-eabi/package.json').version
|
|
111
|
-
if (bindingPackageVersion !== '
|
|
112
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
111
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
112
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
113
113
|
}
|
|
114
114
|
return binding
|
|
115
115
|
} catch (e) {
|
|
@@ -129,8 +129,8 @@ function requireNative() {
|
|
|
129
129
|
try {
|
|
130
130
|
const binding = require('@versatiles/versatiles-rs-win32-x64-gnu')
|
|
131
131
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-x64-gnu/package.json').version
|
|
132
|
-
if (bindingPackageVersion !== '
|
|
133
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
132
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
133
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
134
134
|
}
|
|
135
135
|
return binding
|
|
136
136
|
} catch (e) {
|
|
@@ -145,8 +145,8 @@ function requireNative() {
|
|
|
145
145
|
try {
|
|
146
146
|
const binding = require('@versatiles/versatiles-rs-win32-x64-msvc')
|
|
147
147
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-x64-msvc/package.json').version
|
|
148
|
-
if (bindingPackageVersion !== '
|
|
149
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
148
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
149
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
150
150
|
}
|
|
151
151
|
return binding
|
|
152
152
|
} catch (e) {
|
|
@@ -162,8 +162,8 @@ function requireNative() {
|
|
|
162
162
|
try {
|
|
163
163
|
const binding = require('@versatiles/versatiles-rs-win32-ia32-msvc')
|
|
164
164
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-ia32-msvc/package.json').version
|
|
165
|
-
if (bindingPackageVersion !== '
|
|
166
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
165
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
166
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
167
167
|
}
|
|
168
168
|
return binding
|
|
169
169
|
} catch (e) {
|
|
@@ -178,8 +178,8 @@ function requireNative() {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = require('@versatiles/versatiles-rs-win32-arm64-msvc')
|
|
180
180
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-win32-arm64-msvc/package.json').version
|
|
181
|
-
if (bindingPackageVersion !== '
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
181
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
182
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
183
183
|
}
|
|
184
184
|
return binding
|
|
185
185
|
} catch (e) {
|
|
@@ -197,8 +197,8 @@ function requireNative() {
|
|
|
197
197
|
try {
|
|
198
198
|
const binding = require('@versatiles/versatiles-rs-darwin-universal')
|
|
199
199
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-darwin-universal/package.json').version
|
|
200
|
-
if (bindingPackageVersion !== '
|
|
201
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
200
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
201
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
202
202
|
}
|
|
203
203
|
return binding
|
|
204
204
|
} catch (e) {
|
|
@@ -213,8 +213,8 @@ function requireNative() {
|
|
|
213
213
|
try {
|
|
214
214
|
const binding = require('@versatiles/versatiles-rs-darwin-x64')
|
|
215
215
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-darwin-x64/package.json').version
|
|
216
|
-
if (bindingPackageVersion !== '
|
|
217
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
216
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
217
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
218
218
|
}
|
|
219
219
|
return binding
|
|
220
220
|
} catch (e) {
|
|
@@ -229,8 +229,8 @@ function requireNative() {
|
|
|
229
229
|
try {
|
|
230
230
|
const binding = require('@versatiles/versatiles-rs-darwin-arm64')
|
|
231
231
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-darwin-arm64/package.json').version
|
|
232
|
-
if (bindingPackageVersion !== '
|
|
233
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
232
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
233
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
234
234
|
}
|
|
235
235
|
return binding
|
|
236
236
|
} catch (e) {
|
|
@@ -249,8 +249,8 @@ function requireNative() {
|
|
|
249
249
|
try {
|
|
250
250
|
const binding = require('@versatiles/versatiles-rs-freebsd-x64')
|
|
251
251
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-freebsd-x64/package.json').version
|
|
252
|
-
if (bindingPackageVersion !== '
|
|
253
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
252
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
253
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
254
254
|
}
|
|
255
255
|
return binding
|
|
256
256
|
} catch (e) {
|
|
@@ -265,8 +265,8 @@ function requireNative() {
|
|
|
265
265
|
try {
|
|
266
266
|
const binding = require('@versatiles/versatiles-rs-freebsd-arm64')
|
|
267
267
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-freebsd-arm64/package.json').version
|
|
268
|
-
if (bindingPackageVersion !== '
|
|
269
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
268
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
269
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
270
270
|
}
|
|
271
271
|
return binding
|
|
272
272
|
} catch (e) {
|
|
@@ -286,8 +286,8 @@ function requireNative() {
|
|
|
286
286
|
try {
|
|
287
287
|
const binding = require('@versatiles/versatiles-rs-linux-x64-musl')
|
|
288
288
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-x64-musl/package.json').version
|
|
289
|
-
if (bindingPackageVersion !== '
|
|
290
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
289
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
290
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
291
291
|
}
|
|
292
292
|
return binding
|
|
293
293
|
} catch (e) {
|
|
@@ -302,8 +302,8 @@ function requireNative() {
|
|
|
302
302
|
try {
|
|
303
303
|
const binding = require('@versatiles/versatiles-rs-linux-x64-gnu')
|
|
304
304
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-x64-gnu/package.json').version
|
|
305
|
-
if (bindingPackageVersion !== '
|
|
306
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
305
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
306
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
307
307
|
}
|
|
308
308
|
return binding
|
|
309
309
|
} catch (e) {
|
|
@@ -320,8 +320,8 @@ function requireNative() {
|
|
|
320
320
|
try {
|
|
321
321
|
const binding = require('@versatiles/versatiles-rs-linux-arm64-musl')
|
|
322
322
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm64-musl/package.json').version
|
|
323
|
-
if (bindingPackageVersion !== '
|
|
324
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
323
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
324
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
325
325
|
}
|
|
326
326
|
return binding
|
|
327
327
|
} catch (e) {
|
|
@@ -336,8 +336,8 @@ function requireNative() {
|
|
|
336
336
|
try {
|
|
337
337
|
const binding = require('@versatiles/versatiles-rs-linux-arm64-gnu')
|
|
338
338
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm64-gnu/package.json').version
|
|
339
|
-
if (bindingPackageVersion !== '
|
|
340
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
339
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
340
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
341
341
|
}
|
|
342
342
|
return binding
|
|
343
343
|
} catch (e) {
|
|
@@ -354,8 +354,8 @@ function requireNative() {
|
|
|
354
354
|
try {
|
|
355
355
|
const binding = require('@versatiles/versatiles-rs-linux-arm-musleabihf')
|
|
356
356
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm-musleabihf/package.json').version
|
|
357
|
-
if (bindingPackageVersion !== '
|
|
358
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
357
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
358
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
359
359
|
}
|
|
360
360
|
return binding
|
|
361
361
|
} catch (e) {
|
|
@@ -370,8 +370,8 @@ function requireNative() {
|
|
|
370
370
|
try {
|
|
371
371
|
const binding = require('@versatiles/versatiles-rs-linux-arm-gnueabihf')
|
|
372
372
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-arm-gnueabihf/package.json').version
|
|
373
|
-
if (bindingPackageVersion !== '
|
|
374
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
373
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
374
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
375
375
|
}
|
|
376
376
|
return binding
|
|
377
377
|
} catch (e) {
|
|
@@ -388,8 +388,8 @@ function requireNative() {
|
|
|
388
388
|
try {
|
|
389
389
|
const binding = require('@versatiles/versatiles-rs-linux-loong64-musl')
|
|
390
390
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-loong64-musl/package.json').version
|
|
391
|
-
if (bindingPackageVersion !== '
|
|
392
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
391
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
392
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
393
393
|
}
|
|
394
394
|
return binding
|
|
395
395
|
} catch (e) {
|
|
@@ -404,8 +404,8 @@ function requireNative() {
|
|
|
404
404
|
try {
|
|
405
405
|
const binding = require('@versatiles/versatiles-rs-linux-loong64-gnu')
|
|
406
406
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-loong64-gnu/package.json').version
|
|
407
|
-
if (bindingPackageVersion !== '
|
|
408
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
407
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
408
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
409
409
|
}
|
|
410
410
|
return binding
|
|
411
411
|
} catch (e) {
|
|
@@ -422,8 +422,8 @@ function requireNative() {
|
|
|
422
422
|
try {
|
|
423
423
|
const binding = require('@versatiles/versatiles-rs-linux-riscv64-musl')
|
|
424
424
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-riscv64-musl/package.json').version
|
|
425
|
-
if (bindingPackageVersion !== '
|
|
426
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
425
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
426
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
427
427
|
}
|
|
428
428
|
return binding
|
|
429
429
|
} catch (e) {
|
|
@@ -438,8 +438,8 @@ function requireNative() {
|
|
|
438
438
|
try {
|
|
439
439
|
const binding = require('@versatiles/versatiles-rs-linux-riscv64-gnu')
|
|
440
440
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-riscv64-gnu/package.json').version
|
|
441
|
-
if (bindingPackageVersion !== '
|
|
442
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
441
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
442
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
443
443
|
}
|
|
444
444
|
return binding
|
|
445
445
|
} catch (e) {
|
|
@@ -455,8 +455,8 @@ function requireNative() {
|
|
|
455
455
|
try {
|
|
456
456
|
const binding = require('@versatiles/versatiles-rs-linux-ppc64-gnu')
|
|
457
457
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-ppc64-gnu/package.json').version
|
|
458
|
-
if (bindingPackageVersion !== '
|
|
459
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
458
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
459
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
460
460
|
}
|
|
461
461
|
return binding
|
|
462
462
|
} catch (e) {
|
|
@@ -471,8 +471,8 @@ function requireNative() {
|
|
|
471
471
|
try {
|
|
472
472
|
const binding = require('@versatiles/versatiles-rs-linux-s390x-gnu')
|
|
473
473
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-linux-s390x-gnu/package.json').version
|
|
474
|
-
if (bindingPackageVersion !== '
|
|
475
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
474
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
475
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
476
476
|
}
|
|
477
477
|
return binding
|
|
478
478
|
} catch (e) {
|
|
@@ -491,8 +491,8 @@ function requireNative() {
|
|
|
491
491
|
try {
|
|
492
492
|
const binding = require('@versatiles/versatiles-rs-openharmony-arm64')
|
|
493
493
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-openharmony-arm64/package.json').version
|
|
494
|
-
if (bindingPackageVersion !== '
|
|
495
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
494
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
495
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
496
496
|
}
|
|
497
497
|
return binding
|
|
498
498
|
} catch (e) {
|
|
@@ -507,8 +507,8 @@ function requireNative() {
|
|
|
507
507
|
try {
|
|
508
508
|
const binding = require('@versatiles/versatiles-rs-openharmony-x64')
|
|
509
509
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-openharmony-x64/package.json').version
|
|
510
|
-
if (bindingPackageVersion !== '
|
|
511
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
510
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
511
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
512
512
|
}
|
|
513
513
|
return binding
|
|
514
514
|
} catch (e) {
|
|
@@ -523,8 +523,8 @@ function requireNative() {
|
|
|
523
523
|
try {
|
|
524
524
|
const binding = require('@versatiles/versatiles-rs-openharmony-arm')
|
|
525
525
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-openharmony-arm/package.json').version
|
|
526
|
-
if (bindingPackageVersion !== '
|
|
527
|
-
throw new Error(`Native binding package version mismatch, expected
|
|
526
|
+
if (bindingPackageVersion !== '5.0.0-rc.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
527
|
+
throw new Error(`Native binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
528
528
|
}
|
|
529
529
|
return binding
|
|
530
530
|
} catch (e) {
|
|
@@ -664,8 +664,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
664
664
|
if (!candidateFailed) {
|
|
665
665
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
666
666
|
const bindingPackageVersion = require('@versatiles/versatiles-rs-wasm32-wasi/package.json').version
|
|
667
|
-
if (bindingPackageVersion !== '
|
|
668
|
-
throw new Error(`WASI binding package version mismatch, expected
|
|
667
|
+
if (bindingPackageVersion !== '5.0.0-rc.2') {
|
|
668
|
+
throw new Error(`WASI binding package version mismatch, expected 5.0.0-rc.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
wasiBinding = require('@versatiles/versatiles-rs-wasm32-wasi')
|
|
@@ -716,8 +716,7 @@ if (!nativeBinding) {
|
|
|
716
716
|
throw new Error(`Failed to load native binding`)
|
|
717
717
|
}
|
|
718
718
|
|
|
719
|
-
const {
|
|
720
|
-
export { Progress }
|
|
719
|
+
const { SourceType, TileCoord, TileServer, TileSource, checkVpl, convert, formatVplCst, generateVplTypescript, layerStats, parseVpl, parseVplCst, stringifyVpl, stringifyVplCst } = nativeBinding
|
|
721
720
|
export { SourceType }
|
|
722
721
|
export { TileCoord }
|
|
723
722
|
export { TileServer }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versatiles/versatiles-rs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-rc.2",
|
|
4
4
|
"description": "Node.js bindings for VersaTiles - convert, serve, and process map tiles",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"author": "Michael Kreil <versatiles@michael-kreil.de>",
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
57
|
+
"node": ">= 22"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"artifacts": "napi artifacts",
|
|
@@ -87,29 +87,29 @@
|
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@eslint/js": "^10.0.1",
|
|
90
|
-
"@napi-rs/cli": "^3.10.
|
|
91
|
-
"@types/node": "^26.6.
|
|
92
|
-
"@vitest/ui": "^5.0.
|
|
93
|
-
"chalk": "^6.0.
|
|
94
|
-
"eslint": "^10.
|
|
90
|
+
"@napi-rs/cli": "^3.10.6",
|
|
91
|
+
"@types/node": "^26.6.4",
|
|
92
|
+
"@vitest/ui": "^5.0.3",
|
|
93
|
+
"chalk": "^6.0.1",
|
|
94
|
+
"eslint": "^10.12.0",
|
|
95
95
|
"eslint-config-prettier": "^10.1.8",
|
|
96
96
|
"npm-check-updates": "^23.1.0",
|
|
97
|
-
"prettier": "^3.9.
|
|
98
|
-
"tsx": "^4.23.
|
|
97
|
+
"prettier": "^3.9.9",
|
|
98
|
+
"tsx": "^4.23.15",
|
|
99
99
|
"typedoc": "^0.28.20",
|
|
100
100
|
"typescript": "^6.0.3",
|
|
101
|
-
"typescript-eslint": "^8.
|
|
102
|
-
"vitest": "^5.0.
|
|
101
|
+
"typescript-eslint": "^8.71.0",
|
|
102
|
+
"vitest": "^5.0.3"
|
|
103
103
|
},
|
|
104
104
|
"optionalDependencies": {
|
|
105
|
-
"@versatiles/versatiles-rs-darwin-arm64": "
|
|
106
|
-
"@versatiles/versatiles-rs-darwin-x64": "
|
|
107
|
-
"@versatiles/versatiles-rs-linux-arm64-gnu": "
|
|
108
|
-
"@versatiles/versatiles-rs-linux-arm64-musl": "
|
|
109
|
-
"@versatiles/versatiles-rs-linux-x64-gnu": "
|
|
110
|
-
"@versatiles/versatiles-rs-linux-x64-musl": "
|
|
111
|
-
"@versatiles/versatiles-rs-win32-arm64-msvc": "
|
|
112
|
-
"@versatiles/versatiles-rs-win32-x64-msvc": "
|
|
105
|
+
"@versatiles/versatiles-rs-darwin-arm64": "5.0.0-rc.2",
|
|
106
|
+
"@versatiles/versatiles-rs-darwin-x64": "5.0.0-rc.2",
|
|
107
|
+
"@versatiles/versatiles-rs-linux-arm64-gnu": "5.0.0-rc.2",
|
|
108
|
+
"@versatiles/versatiles-rs-linux-arm64-musl": "5.0.0-rc.2",
|
|
109
|
+
"@versatiles/versatiles-rs-linux-x64-gnu": "5.0.0-rc.2",
|
|
110
|
+
"@versatiles/versatiles-rs-linux-x64-musl": "5.0.0-rc.2",
|
|
111
|
+
"@versatiles/versatiles-rs-win32-arm64-msvc": "5.0.0-rc.2",
|
|
112
|
+
"@versatiles/versatiles-rs-win32-x64-msvc": "5.0.0-rc.2"
|
|
113
113
|
},
|
|
114
114
|
"allowScripts": {
|
|
115
115
|
"esbuild": true,
|
package/vpl.d.ts
CHANGED
|
@@ -406,7 +406,7 @@ export interface MetaUpdateOptions {
|
|
|
406
406
|
/** Name of the tileset. Defaults to the source's. */
|
|
407
407
|
name?: string;
|
|
408
408
|
/** What the tiles contain. Defaults to the source's. */
|
|
409
|
-
schema?: "rgb" | "rgba" | "dem/mapbox" | "dem/terrarium" | "dem/versatiles" | "openmaptiles" | "shortbread@1.0" | "other";
|
|
409
|
+
schema?: "rgb" | "rgba" | "dem/mapbox" | "dem/terrarium" | "dem/versatiles" | "openmaptiles" | "shortbread@1.0" | "shortbread@1.1" | "other";
|
|
410
410
|
/** Complete TileJSON document, as a JSON string. Defaults to the source's metadata. */
|
|
411
411
|
tilejson?: string;
|
|
412
412
|
/** Path to a file holding a complete TileJSON document. Defaults to the source's metadata. */
|