@loaders.gl/core 5.0.0-beta.7 → 5.0.0-beta.8
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/dist/arrow-geometry/geojson-table.cjs +26 -15
- package/dist/arrow-geometry/geojson-table.cjs.map +2 -2
- package/dist/arrow-geometry/geojson-table.d.ts +8 -1
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +18 -9
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/cluster-source.cjs +78 -8
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +354 -319
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +177 -176
- package/dist/federated-table-scan-source.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +351 -281
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +14 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +14 -18
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +11 -64
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +12 -7
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +14 -3
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +8 -6
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +26 -15
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +43 -40
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +11 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +52 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- package/dist/lib/loader-utils/option-defaults.js +2 -2
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +21 -10
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/index.cjs +143 -42
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +2 -2
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +1 -1
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts +24 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts +5 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +13 -5
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +5 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +6 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +27 -20
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +3 -3
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +15 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +102 -27
- package/dist/loader-utils/loader-types.d.ts.map +1 -1
- package/dist/loader-utils/loader-types.js.map +1 -1
- package/dist/loader-utils/source-types.d.ts +5 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +5 -1
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/null-loader.js +1 -1
- package/dist/null-worker-node.js +1 -1
- package/dist/null-worker.js +1 -1
- package/dist/polyfills/index.cjs +3 -2
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +9 -9
- package/dist/scan/arrow-execution/expressions.cjs.map +3 -3
- package/dist/scan/arrow-execution/expressions.d.ts +3 -3
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-execution/expressions.js +4 -4
- package/dist/scan/arrow-execution/expressions.js.map +1 -1
- package/dist/scan/index.cjs +21 -6
- package/dist/scan/index.cjs.map +2 -2
- package/dist/scan/index.d.ts +2 -1
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +1 -1
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +1 -1
- package/dist/scan/parse-sql-predicate.cjs.map +1 -1
- package/dist/scan/parse-sql-predicate.js +1 -1
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-progressive.cjs +191 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +39 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +174 -0
- package/dist/scan/query-progressive.js.map +1 -0
- package/dist/scan/query.cjs +42 -8
- package/dist/scan/query.cjs.map +3 -3
- package/dist/scan/query.d.ts +26 -6
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +48 -7
- package/dist/scan/query.js.map +1 -1
- package/dist/schema-utils/index.cjs +262 -241
- package/dist/schema-utils/index.cjs.map +2 -2
- package/dist/schema-utils/index.d.ts +1 -0
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +1 -0
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +4 -2
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts +28 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js +26 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +2 -1
- package/dist/vector-table-scan-source.cjs.map +1 -1
- package/dist/worker-utils/index.cjs +49 -9
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +2 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/package.json +8 -7
- package/src/arrow-geometry/geojson-table.ts +27 -17
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +4 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +3 -2
- package/src/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +1 -1
- package/src/lib/api/create-data-source.ts +136 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +21 -20
- package/src/lib/api/load.ts +49 -121
- package/src/lib/api/parse-file.ts +42 -23
- package/src/lib/api/parse-in-batches.ts +49 -12
- package/src/lib/api/parse-sync.ts +37 -19
- package/src/lib/api/parse.ts +51 -30
- package/src/lib/api/select-loader.ts +56 -53
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +70 -0
- package/src/lib/loader-utils/option-defaults.ts +2 -2
- package/src/lib/loader-utils/option-utils.ts +21 -10
- package/src/loader-utils/index.ts +2 -1
- package/src/loader-utils/lib/log-utils/log.ts +39 -1
- package/src/loader-utils/lib/scan-utils/logical-table-query.ts +18 -8
- package/src/loader-utils/lib/scan-utils/table-query.ts +10 -1
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +36 -25
- package/src/loader-utils/lib/sources/data-source.ts +3 -3
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +16 -1
- package/src/loader-utils/loader-types.ts +168 -43
- package/src/loader-utils/source-types.ts +12 -6
- package/src/polyfills/index.ts +3 -3
- package/src/scan/arrow-execution/expressions.ts +5 -5
- package/src/scan/index.ts +7 -1
- package/src/scan/parse-sql-predicate.ts +1 -1
- package/src/scan/query-progressive.ts +231 -0
- package/src/scan/query.ts +92 -10
- package/src/schema-utils/index.ts +5 -0
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +4 -2
- package/src/schema-utils/lib/table/tables/convert-arrow-table-wrapper.ts +58 -0
- package/src/schema-utils/lib/table/tables/row-utils.ts +2 -2
- package/src/worker-utils/lib/library-utils/library-utils.ts +2 -1
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
|
@@ -141,6 +141,7 @@ __export(index_exports, {
|
|
|
141
141
|
getLAZChunkByteLength: () => getLAZChunkByteLength,
|
|
142
142
|
getLAZChunkDeclaredByteLength: () => getLAZChunkDeclaredByteLength,
|
|
143
143
|
getLAZChunkHeaderByteLength: () => getLAZChunkHeaderByteLength,
|
|
144
|
+
getLoaderLog: () => getLoaderLog,
|
|
144
145
|
getMagicString: () => getMagicString,
|
|
145
146
|
getPathPrefix: () => getPathPrefix,
|
|
146
147
|
getRangeStats: () => getRangeStats,
|
|
@@ -288,18 +289,48 @@ var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
|
288
289
|
|
|
289
290
|
// dist/loader-utils/lib/log-utils/log.js
|
|
290
291
|
var import_log = require("probe.gl/log");
|
|
291
|
-
var VERSION = true ? "5.0.0-beta.
|
|
292
|
+
var VERSION = true ? "5.0.0-beta.8" : "latest";
|
|
292
293
|
var version = VERSION[0] >= "0" && VERSION[0] <= "9" ? `v${VERSION}` : "";
|
|
293
294
|
function createLog() {
|
|
294
|
-
const
|
|
295
|
+
const log3 = new import_log.Log({ id: "loaders.gl" });
|
|
295
296
|
globalThis.loaders ||= {};
|
|
296
|
-
globalThis.loaders.log =
|
|
297
|
+
globalThis.loaders.log = log3;
|
|
297
298
|
globalThis.loaders.version = version;
|
|
298
299
|
globalThis.probe ||= {};
|
|
299
|
-
globalThis.probe.loaders =
|
|
300
|
-
return
|
|
300
|
+
globalThis.probe.loaders = log3;
|
|
301
|
+
return log3;
|
|
301
302
|
}
|
|
302
303
|
var log = createLog();
|
|
304
|
+
var NullLog = class {
|
|
305
|
+
/** Discards debug messages. */
|
|
306
|
+
log() {
|
|
307
|
+
return ignoreMessage;
|
|
308
|
+
}
|
|
309
|
+
/** Discards informational messages. */
|
|
310
|
+
info() {
|
|
311
|
+
return ignoreMessage;
|
|
312
|
+
}
|
|
313
|
+
/** Discards messages marked to be emitted once. */
|
|
314
|
+
once() {
|
|
315
|
+
return ignoreMessage;
|
|
316
|
+
}
|
|
317
|
+
/** Discards warnings. */
|
|
318
|
+
warn() {
|
|
319
|
+
return ignoreMessage;
|
|
320
|
+
}
|
|
321
|
+
/** Discards errors. */
|
|
322
|
+
error() {
|
|
323
|
+
return ignoreMessage;
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
function ignoreMessage() {
|
|
327
|
+
}
|
|
328
|
+
var nullLog = new NullLog();
|
|
329
|
+
function getLoaderLog(options) {
|
|
330
|
+
var _a;
|
|
331
|
+
const logger = ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.log) !== void 0 ? options.core.log : options == null ? void 0 : options.log;
|
|
332
|
+
return logger === null ? nullLog : logger || log;
|
|
333
|
+
}
|
|
303
334
|
|
|
304
335
|
// dist/loader-utils/lib/javascript-utils/is-type.js
|
|
305
336
|
var isBoolean = (value) => typeof value === "boolean";
|
|
@@ -437,6 +468,46 @@ var nodeVersion2 = matches2 && parseFloat(matches2[1]) || 0;
|
|
|
437
468
|
// src/worker-utils/lib/worker-api/process-on-worker.ts
|
|
438
469
|
var import_tasks2 = require("@math.gl/tasks");
|
|
439
470
|
|
|
471
|
+
// src/loader-utils/lib/log-utils/log.ts
|
|
472
|
+
var import_log3 = require("probe.gl/log");
|
|
473
|
+
var VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
474
|
+
var version2 = VERSION2[0] >= "0" && VERSION2[0] <= "9" ? `v${VERSION2}` : "";
|
|
475
|
+
function createLog2() {
|
|
476
|
+
const log3 = new import_log3.Log({ id: "loaders.gl" });
|
|
477
|
+
globalThis.loaders ||= {};
|
|
478
|
+
globalThis.loaders.log = log3;
|
|
479
|
+
globalThis.loaders.version = version2;
|
|
480
|
+
globalThis.probe ||= {};
|
|
481
|
+
globalThis.probe.loaders = log3;
|
|
482
|
+
return log3;
|
|
483
|
+
}
|
|
484
|
+
var log2 = createLog2();
|
|
485
|
+
var NullLog2 = class {
|
|
486
|
+
/** Discards debug messages. */
|
|
487
|
+
log() {
|
|
488
|
+
return ignoreMessage2;
|
|
489
|
+
}
|
|
490
|
+
/** Discards informational messages. */
|
|
491
|
+
info() {
|
|
492
|
+
return ignoreMessage2;
|
|
493
|
+
}
|
|
494
|
+
/** Discards messages marked to be emitted once. */
|
|
495
|
+
once() {
|
|
496
|
+
return ignoreMessage2;
|
|
497
|
+
}
|
|
498
|
+
/** Discards warnings. */
|
|
499
|
+
warn() {
|
|
500
|
+
return ignoreMessage2;
|
|
501
|
+
}
|
|
502
|
+
/** Discards errors. */
|
|
503
|
+
error() {
|
|
504
|
+
return ignoreMessage2;
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
function ignoreMessage2() {
|
|
508
|
+
}
|
|
509
|
+
var nullLog2 = new NullLog2();
|
|
510
|
+
|
|
440
511
|
// src/worker-utils/lib/worker-api/get-worker-url.ts
|
|
441
512
|
var warnedWorkerVersionFallbacks = /* @__PURE__ */ new Set();
|
|
442
513
|
function getCustomWorkerURL(worker, options = {}) {
|
|
@@ -468,11 +539,11 @@ function getWorkerURL(worker, options = {}) {
|
|
|
468
539
|
}
|
|
469
540
|
function getDefaultWorkerURL(worker, warn = false) {
|
|
470
541
|
const workerFile = isBrowser2 ? worker.workerFile || `${worker.id}-worker.js` : worker.workerNode || `${worker.id}-worker-node.js`;
|
|
471
|
-
let
|
|
472
|
-
if (
|
|
473
|
-
|
|
542
|
+
let version3 = worker.version;
|
|
543
|
+
if (version3 === "latest") {
|
|
544
|
+
version3 = NPM_TAG;
|
|
474
545
|
}
|
|
475
|
-
const versionTag =
|
|
546
|
+
const versionTag = version3 ? `@${version3}` : "";
|
|
476
547
|
const url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;
|
|
477
548
|
if (warn) {
|
|
478
549
|
warnIfUsingNpmTagFallback(worker, url);
|
|
@@ -488,9 +559,9 @@ function warnIfUsingNpmTagFallback(worker, url) {
|
|
|
488
559
|
return;
|
|
489
560
|
}
|
|
490
561
|
warnedWorkerVersionFallbacks.add(workerId);
|
|
491
|
-
|
|
562
|
+
log2.warn(
|
|
492
563
|
`loaders.gl: ${worker.name} loader worker version is "latest" because __VERSION__ was not injected. Fetching ${url} from CDN.`
|
|
493
|
-
);
|
|
564
|
+
)();
|
|
494
565
|
}
|
|
495
566
|
|
|
496
567
|
// src/worker-utils/lib/worker-api/task-runtime.ts
|
|
@@ -1110,7 +1181,14 @@ function getWorkerOptions(options = {}, loader) {
|
|
|
1110
1181
|
...portableOptions,
|
|
1111
1182
|
signal: void 0,
|
|
1112
1183
|
onProgress: void 0,
|
|
1113
|
-
|
|
1184
|
+
log: isDisabledLog(portableOptions.log) ? null : void 0,
|
|
1185
|
+
...portableOptions.core ? {
|
|
1186
|
+
core: {
|
|
1187
|
+
...portableOptions.core,
|
|
1188
|
+
authentications: void 0,
|
|
1189
|
+
log: isDisabledLog(portableOptions.core.log) ? null : void 0
|
|
1190
|
+
}
|
|
1191
|
+
} : {}
|
|
1114
1192
|
};
|
|
1115
1193
|
const serializedOptions = JSON.parse(JSON.stringify(optionsToSerialize, (_key, value) => {
|
|
1116
1194
|
if (typeof Headers !== "undefined" && value instanceof Headers)
|
|
@@ -1158,6 +1236,9 @@ function shouldParseCSVWithWorker(options) {
|
|
|
1158
1236
|
function isLoaderWithWorkerResultDeserializer(loader) {
|
|
1159
1237
|
return typeof loader.deserializeWorkerResult === "function";
|
|
1160
1238
|
}
|
|
1239
|
+
function isDisabledLog(logger) {
|
|
1240
|
+
return logger === null || logger instanceof NullLog;
|
|
1241
|
+
}
|
|
1161
1242
|
|
|
1162
1243
|
// dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js
|
|
1163
1244
|
function canEncodeWithWorker(writer, options) {
|
|
@@ -5398,14 +5479,14 @@ var Byte14Decompressor = class {
|
|
|
5398
5479
|
};
|
|
5399
5480
|
function createPointDecompressor(stream, metadata, outputMode, selection) {
|
|
5400
5481
|
const extraByteCount = getExtraByteCount(metadata);
|
|
5401
|
-
for (const
|
|
5482
|
+
for (const version3 of [
|
|
5402
5483
|
metadata.point10ItemVersion,
|
|
5403
5484
|
metadata.gpsTime11ItemVersion,
|
|
5404
5485
|
metadata.rgb12ItemVersion,
|
|
5405
5486
|
metadata.byteItemVersion
|
|
5406
5487
|
]) {
|
|
5407
|
-
if (
|
|
5408
|
-
throw new Error(`Unsupported legacy LASzip item version ${
|
|
5488
|
+
if (version3 !== void 0 && version3 !== 1 && version3 !== 2) {
|
|
5489
|
+
throw new Error(`Unsupported legacy LASzip item version ${version3}`);
|
|
5409
5490
|
}
|
|
5410
5491
|
}
|
|
5411
5492
|
switch (metadata.pointDataRecordFormat) {
|
|
@@ -8709,7 +8790,7 @@ function validateMetadata(rawBytes, metadata) {
|
|
|
8709
8790
|
metadata.gpsTime11ItemVersion,
|
|
8710
8791
|
metadata.rgb12ItemVersion,
|
|
8711
8792
|
metadata.byteItemVersion
|
|
8712
|
-
].some((
|
|
8793
|
+
].some((version3) => version3 !== void 0 && version3 !== 2)) {
|
|
8713
8794
|
throw new Error("TypeScript LAZ encoder only supports legacy item version 2");
|
|
8714
8795
|
}
|
|
8715
8796
|
if (!Number.isInteger(metadata.pointCount) || metadata.pointCount < 0) {
|
|
@@ -9126,14 +9207,14 @@ var CachedUriResolver = class {
|
|
|
9126
9207
|
};
|
|
9127
9208
|
|
|
9128
9209
|
// dist/loader-utils/json-loader.js
|
|
9129
|
-
var
|
|
9210
|
+
var VERSION3 = true ? "5.0.0-beta.8" : "latest";
|
|
9130
9211
|
var JSONLoader = {
|
|
9131
9212
|
dataType: null,
|
|
9132
9213
|
batchType: null,
|
|
9133
9214
|
name: "JSON",
|
|
9134
9215
|
id: "json",
|
|
9135
9216
|
module: "json",
|
|
9136
|
-
version:
|
|
9217
|
+
version: VERSION3,
|
|
9137
9218
|
encoding: "json",
|
|
9138
9219
|
format: "json",
|
|
9139
9220
|
extensions: ["json", "geojson"],
|
|
@@ -9925,7 +10006,7 @@ var NodeFileSystemFacade = class {
|
|
|
9925
10006
|
|
|
9926
10007
|
// dist/loader-utils/source-types.js
|
|
9927
10008
|
function isSourceLoader(loader) {
|
|
9928
|
-
return Boolean(loader && typeof loader === "object" && "
|
|
10009
|
+
return Boolean(loader && typeof loader === "object" && "createDataSourceSync" in loader && "fromUrl" in loader && "testURL" in loader);
|
|
9929
10010
|
}
|
|
9930
10011
|
|
|
9931
10012
|
// dist/loader-utils/lib/sources/data-source.js
|
|
@@ -10008,7 +10089,7 @@ var DataSource = class _DataSource {
|
|
|
10008
10089
|
if (callback) {
|
|
10009
10090
|
callback(normalizedError, this);
|
|
10010
10091
|
} else {
|
|
10011
|
-
|
|
10092
|
+
getLoaderLog(this.options).warn(`${this.constructor.name}: ${normalizedError.message}`)();
|
|
10012
10093
|
}
|
|
10013
10094
|
return normalizedError;
|
|
10014
10095
|
}
|
|
@@ -10055,7 +10136,7 @@ function normalizeError(error, message) {
|
|
|
10055
10136
|
}
|
|
10056
10137
|
function unavailableCoreApiMethod(methodName) {
|
|
10057
10138
|
return () => {
|
|
10058
|
-
throw new Error(`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.
|
|
10139
|
+
throw new Error(`CoreAPI.${methodName} is unavailable. Use @loaders.gl/core.createDataSourceSync().`);
|
|
10059
10140
|
};
|
|
10060
10141
|
}
|
|
10061
10142
|
function getDataSourceName(data, options) {
|
|
@@ -10952,6 +11033,11 @@ function validateTableQueryLimit(limit) {
|
|
|
10952
11033
|
throw new Error("Table query limit must be a non-negative safe integer.");
|
|
10953
11034
|
}
|
|
10954
11035
|
}
|
|
11036
|
+
function validateTableQueryOffset(offset) {
|
|
11037
|
+
if (offset !== void 0 && (!Number.isSafeInteger(offset) || offset < 0)) {
|
|
11038
|
+
throw new Error("Table query offset must be a non-negative safe integer.");
|
|
11039
|
+
}
|
|
11040
|
+
}
|
|
10955
11041
|
|
|
10956
11042
|
// dist/loader-utils/lib/scan-utils/table-scan-batch.js
|
|
10957
11043
|
function makeTableScanBatch(table) {
|
|
@@ -10960,6 +11046,8 @@ function makeTableScanBatch(table) {
|
|
|
10960
11046
|
async function* executeTableScanBatches(readBatches, options = {}, operators = {}) {
|
|
10961
11047
|
var _a, _b, _c, _d, _e;
|
|
10962
11048
|
validateTableQueryLimit(options.limit);
|
|
11049
|
+
validateTableQueryOffset(options.offset);
|
|
11050
|
+
let skip = options.offset ?? 0;
|
|
10963
11051
|
const startedAt = Date.now();
|
|
10964
11052
|
let sourcesRead = 0;
|
|
10965
11053
|
let batchesRead = 0;
|
|
@@ -10993,23 +11081,22 @@ async function* executeTableScanBatches(readBatches, options = {}, operators = {
|
|
|
10993
11081
|
rowsTested += batch.length;
|
|
10994
11082
|
rowsRetained += filteredBatch.length;
|
|
10995
11083
|
}
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
const outputBatch = truncateTableBatch(projectedBatch, remaining);
|
|
11008
|
-
rowsReturned += outputBatch.length;
|
|
11084
|
+
if (skip >= filteredBatch.length && (skip > 0 || options.skipEmptyBatches)) {
|
|
11085
|
+
skip -= filteredBatch.length;
|
|
11086
|
+
continue;
|
|
11087
|
+
}
|
|
11088
|
+
const end = Math.min(filteredBatch.length, skip + remaining);
|
|
11089
|
+
const window2 = skip || end < filteredBatch.length ? sliceTableBatch(filteredBatch, skip, end) : filteredBatch;
|
|
11090
|
+
skip = 0;
|
|
11091
|
+
const output = (operators.project || projectTableBatch)(window2, options.columns);
|
|
11092
|
+
remaining -= window2.length;
|
|
11093
|
+
rowsReturned += output.length;
|
|
11094
|
+
if (remaining === 0)
|
|
11009
11095
|
earlyTerminationReason = "limit";
|
|
11010
|
-
|
|
11096
|
+
yield output;
|
|
11097
|
+
if (remaining === 0)
|
|
11011
11098
|
return;
|
|
11012
|
-
|
|
11099
|
+
(_d = options.signal) == null ? void 0 : _d.throwIfAborted();
|
|
11013
11100
|
}
|
|
11014
11101
|
status = "completed";
|
|
11015
11102
|
} catch (error) {
|
|
@@ -11041,22 +11128,26 @@ async function* executeTableScanBatches(readBatches, options = {}, operators = {
|
|
|
11041
11128
|
}
|
|
11042
11129
|
}
|
|
11043
11130
|
function truncateTableBatch(batch, length) {
|
|
11131
|
+
return sliceTableBatch(batch, 0, length);
|
|
11132
|
+
}
|
|
11133
|
+
function sliceTableBatch(batch, start, end) {
|
|
11134
|
+
const length = end - start;
|
|
11044
11135
|
if (batch.shape === "object-row-table" || batch.shape === "array-row-table") {
|
|
11045
|
-
return { ...batch, data: batch.data.slice(
|
|
11136
|
+
return { ...batch, data: batch.data.slice(start, end), length };
|
|
11046
11137
|
}
|
|
11047
11138
|
if (batch.shape === "columnar-table") {
|
|
11048
11139
|
return {
|
|
11049
11140
|
...batch,
|
|
11050
11141
|
data: Object.fromEntries(Object.entries(batch.data).map(([name, values]) => [
|
|
11051
11142
|
name,
|
|
11052
|
-
Array.from(values).slice(
|
|
11143
|
+
Array.from(values).slice(start, end)
|
|
11053
11144
|
])),
|
|
11054
11145
|
length
|
|
11055
11146
|
};
|
|
11056
11147
|
}
|
|
11057
11148
|
if (batch.shape === "arrow-table")
|
|
11058
|
-
return { ...batch, data: batch.data.slice(
|
|
11059
|
-
return { ...batch, features: batch.features.slice(
|
|
11149
|
+
return { ...batch, data: batch.data.slice(start, end), length };
|
|
11150
|
+
return { ...batch, features: batch.features.slice(start, end), length };
|
|
11060
11151
|
}
|
|
11061
11152
|
function projectTableBatch(batch, columns) {
|
|
11062
11153
|
if (columns === void 0)
|
|
@@ -12044,7 +12135,7 @@ function normalizeTableQuery(sourceColumnNames, query = {}) {
|
|
|
12044
12135
|
throw new Error("Table query must be an object.");
|
|
12045
12136
|
}
|
|
12046
12137
|
for (const key of Object.keys(query)) {
|
|
12047
|
-
if (!["from", "select", "where", "limit"].includes(key)) {
|
|
12138
|
+
if (!["from", "select", "where", "offset", "limit"].includes(key)) {
|
|
12048
12139
|
throw new Error(`Unsupported table query option: ${key}`);
|
|
12049
12140
|
}
|
|
12050
12141
|
}
|
|
@@ -12052,6 +12143,7 @@ function normalizeTableQuery(sourceColumnNames, query = {}) {
|
|
|
12052
12143
|
throw new Error("Table query select must be a non-empty array.");
|
|
12053
12144
|
}
|
|
12054
12145
|
validateTableReference(query.from);
|
|
12146
|
+
validateTableQueryOffset(query.offset);
|
|
12055
12147
|
validateTableQueryLimit(query.limit);
|
|
12056
12148
|
if (query.where !== void 0) {
|
|
12057
12149
|
validateColumnarPredicate(query.where, new Set(sourceColumnNames));
|
|
@@ -12087,6 +12179,7 @@ function normalizeTableQuery(sourceColumnNames, query = {}) {
|
|
|
12087
12179
|
select: Object.freeze(select),
|
|
12088
12180
|
...query.from === void 0 ? {} : { from: typeof query.from === "string" ? query.from : Object.freeze({ ...query.from }) },
|
|
12089
12181
|
...query.where === void 0 ? {} : { where: query.where },
|
|
12182
|
+
...query.offset === void 0 ? {} : { offset: query.offset },
|
|
12090
12183
|
...query.limit === void 0 ? {} : { limit: query.limit }
|
|
12091
12184
|
});
|
|
12092
12185
|
}
|
|
@@ -12097,7 +12190,15 @@ function planLogicalTableQuery(sourceColumnNames, query = {}) {
|
|
|
12097
12190
|
predicate: normalized.where,
|
|
12098
12191
|
limit: normalized.limit
|
|
12099
12192
|
});
|
|
12100
|
-
|
|
12193
|
+
const steps = [];
|
|
12194
|
+
for (const step of plan) {
|
|
12195
|
+
if (step.kind === "limit" && normalized.offset !== void 0)
|
|
12196
|
+
steps.push(Object.freeze({ kind: "offset", offset: normalized.offset }));
|
|
12197
|
+
steps.push(step.kind === "project" ? Object.freeze({ kind: "project", select: normalized.select }) : step);
|
|
12198
|
+
}
|
|
12199
|
+
if (normalized.limit === void 0 && normalized.offset !== void 0)
|
|
12200
|
+
steps.push(Object.freeze({ kind: "offset", offset: normalized.offset }));
|
|
12201
|
+
return Object.freeze(steps);
|
|
12101
12202
|
}
|
|
12102
12203
|
function validateTableReference(reference) {
|
|
12103
12204
|
if (reference === void 0)
|