@loaders.gl/core 5.0.0-beta.8 → 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/GEOARROW-README.md +6 -0
- package/SCAN-README.md +10 -10
- package/SCHEMA-UTILS-README.md +1 -1
- package/dist/arrow-geometry/binary-features.cjs +6 -3
- package/dist/arrow-geometry/binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/binary-features.d.ts.map +1 -1
- package/dist/arrow-geometry/binary-features.js +2 -2
- package/dist/arrow-geometry/binary-features.js.map +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.cjs.map +2 -2
- package/dist/arrow-geometry/binary-geometry-to-wkb.js +1 -1
- package/dist/arrow-geometry/binary-geometry-to-wkb.js.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.cjs.map +2 -2
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts +4 -3
- package/dist/arrow-geometry/feature-collection-to-arrow.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js +1 -1
- package/dist/arrow-geometry/feature-collection-to-arrow.js.map +1 -1
- package/dist/arrow-geometry/feature-table.cjs +2 -6
- package/dist/arrow-geometry/feature-table.cjs.map +2 -2
- package/dist/arrow-geometry/feature-table.d.ts +6 -5
- package/dist/arrow-geometry/feature-table.d.ts.map +1 -1
- package/dist/arrow-geometry/feature-table.js +5 -9
- package/dist/arrow-geometry/feature-table.js.map +1 -1
- package/dist/arrow-geometry/geojson-table.cjs +270 -4
- package/dist/arrow-geometry/geojson-table.cjs.map +4 -4
- package/dist/arrow-geometry/geojson-table.d.ts +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +5 -4
- package/dist/arrow-geometry/geojson-table.js.map +1 -1
- package/dist/arrow-geometry/geometry-codecs.cjs +6 -6
- package/dist/arrow-geometry/geometry-codecs.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-codecs.js +1 -1
- package/dist/arrow-geometry/geometry-codecs.js.map +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.cjs +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.cjs.map +2 -2
- package/dist/arrow-geometry/geometry-to-wkt.js +1 -1
- package/dist/arrow-geometry/geometry-to-wkt.js.map +1 -1
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs +4 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.cjs.map +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js +4 -2
- package/dist/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.js.map +1 -1
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.cjs +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.cjs.map +2 -2
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.js +1 -1
- package/dist/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.js.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.cjs +1 -5
- package/dist/arrow-geometry/wkb-arrow-utils.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts +7 -7
- package/dist/arrow-geometry/wkb-arrow-utils.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-arrow-utils.js +4 -8
- package/dist/arrow-geometry/wkb-arrow-utils.js.map +1 -1
- package/dist/arrow-geometry/wkb-builder.cjs +3 -3
- package/dist/arrow-geometry/wkb-builder.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-builder.d.ts +1 -1
- package/dist/arrow-geometry/wkb-builder.d.ts.map +1 -1
- package/dist/arrow-geometry/wkb-builder.js +1 -1
- package/dist/arrow-geometry/wkb-builder.js.map +1 -1
- package/dist/arrow-geometry/wkb-statistics.cjs +2 -2
- package/dist/arrow-geometry/wkb-statistics.cjs.map +2 -2
- package/dist/arrow-geometry/wkb-statistics.js +1 -1
- package/dist/arrow-geometry/wkb-statistics.js.map +1 -1
- package/dist/arrow-worker-transport.cjs +59 -35
- package/dist/arrow-worker-transport.cjs.map +1 -1
- package/dist/arrow-worker-transport.d.ts +9 -7
- package/dist/arrow-worker-transport.d.ts.map +1 -1
- package/dist/arrow-worker-transport.js +59 -42
- package/dist/arrow-worker-transport.js.map +1 -1
- package/dist/cluster-source.cjs +201 -506
- package/dist/cluster-source.cjs.map +3 -3
- package/dist/dist.dev.js +269 -228
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +174 -627
- package/dist/federated-table-scan-source.cjs.map +3 -3
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js +1 -1
- package/dist/geoarrow/binary-polygon-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.cjs +16 -19
- package/dist/geoarrow/clustering/cluster-source.cjs.map +2 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts +3 -2
- package/dist/geoarrow/clustering/cluster-source.d.ts.map +1 -1
- package/dist/geoarrow/clustering/cluster-source.js +13 -18
- package/dist/geoarrow/clustering/cluster-source.js.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.cjs +5 -12
- package/dist/geoarrow/convert-table-to-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts +6 -6
- package/dist/geoarrow/convert-table-to-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/convert-table-to-geoarrow.js +8 -14
- package/dist/geoarrow/convert-table-to-geoarrow.js.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.cjs.map +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts +1 -1
- package/dist/geoarrow/geo-column/geo-column.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-bounds.js +3 -3
- package/dist/geoarrow/geoarrow-bounds.js.map +1 -1
- package/dist/geoarrow/geoarrow-capabilities.cjs +2 -2
- package/dist/geoarrow/geoarrow-capabilities.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-capabilities.js +1 -1
- package/dist/geoarrow/geoarrow-capabilities.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs +13 -15
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +8 -11
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs +6 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js +9 -4
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow.js.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts +3 -3
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js +5 -4
- package/dist/geoarrow/geoarrow-converter/geoarrow-converter.js.map +1 -1
- package/dist/geoarrow/geoarrow-inspection.cjs +2 -2
- package/dist/geoarrow/geoarrow-inspection.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-inspection.js +1 -1
- package/dist/geoarrow/geoarrow-inspection.js.map +1 -1
- package/dist/geoarrow/geoarrow-stream.cjs +10 -11
- package/dist/geoarrow/geoarrow-stream.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts +2 -2
- package/dist/geoarrow/geoarrow-stream.d.ts.map +1 -1
- package/dist/geoarrow/geoarrow-stream.js +9 -12
- package/dist/geoarrow/geoarrow-stream.js.map +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.cjs.map +2 -2
- package/dist/geoarrow/get-geoarrow-vertex-count.js +1 -1
- package/dist/geoarrow/get-geoarrow-vertex-count.js.map +1 -1
- package/dist/geoarrow/index.cjs +0 -3
- package/dist/geoarrow/index.cjs.map +2 -2
- package/dist/geoarrow/index.d.ts +0 -2
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +0 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.cjs.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs +7 -4
- 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.js +3 -3
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.cjs.map +2 -2
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.d.ts.map +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js +1 -1
- package/dist/geoarrow/lib/geoarrow/geoarrow-union-kind.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs +4 -4
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.js.map +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs +3 -3
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.cjs.map +2 -2
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js +1 -1
- package/dist/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.js.map +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs +3 -3
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js +1 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-box.js.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.cjs.map +2 -2
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.d.ts.map +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js +1 -1
- package/dist/geoarrow/lib/kernels/geoarrow-union.js.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.cjs.map +2 -2
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts +5 -3
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.d.ts.map +1 -1
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js +0 -6
- package/dist/geoarrow/lib/table-converters/convert-geoarrow-table.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts +1 -1
- package/dist/geoarrow/mesharrow/get-deck-binary-data.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.cjs.map +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts +1 -1
- package/dist/geoarrow/mesharrow/mesh-accessors.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +1 -1
- package/dist/index.cjs +261 -207
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +7 -1
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +2 -2
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/load-loader.js +1 -1
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +44 -14
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/loader-options.d.ts +6 -0
- package/dist/lib/api/loader-options.d.ts.map +1 -1
- package/dist/lib/api/loader-options.js +48 -0
- package/dist/lib/api/loader-options.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +2 -5
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +55 -15
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +2 -5
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +7 -7
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +15 -24
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +2 -2
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +7 -5
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -1
- package/dist/lib/loader-utils/native-arrow.js +34 -20
- package/dist/lib/loader-utils/native-arrow.js.map +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts +3 -2
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +7 -8
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +0 -6
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +11 -105
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +3 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -1
- package/dist/loader-utils/index.cjs +160 -68
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +7 -2
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +4 -2
- package/dist/loader-utils/index.js.map +1 -1
- package/dist/loader-utils/json-loader.js +1 -1
- package/dist/loader-utils/json-loader.js.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts +0 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +2 -2
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts +14 -0
- package/dist/loader-utils/lib/pace-batch-iterator.d.ts.map +1 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js +51 -0
- package/dist/loader-utils/lib/pace-batch-iterator.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +1 -1
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +48 -3
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +12 -1
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +17 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- 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 +15 -14
- 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 +36 -22
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +0 -10
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -1
- package/dist/loader-utils/lib/sources/image-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts +2 -1
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +7 -2
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/tile-grid.js +32 -14
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -1
- package/dist/loader-utils/lib/sources/tile-source-adapter.js +1 -1
- package/dist/loader-utils/lib/sources/tile-source-adapter.js.map +1 -1
- package/dist/loader-utils/lib/sources/tile-source.d.ts +1 -1
- package/dist/loader-utils/lib/sources/tile-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js +1 -1
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -1
- package/dist/loader-utils/lib/sources/vector-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +4 -3
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.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 +12 -15
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +25 -67
- 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 +2 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +4 -0
- package/dist/loader-utils/source-types.js.map +1 -1
- package/dist/loader-utils/tile-grid.cjs +24 -12
- package/dist/loader-utils/tile-grid.cjs.map +1 -1
- package/dist/null-loader.d.ts +0 -18
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -19
- package/dist/null-loader.js.map +1 -1
- package/dist/null-worker-node.js +1 -1
- package/dist/null-worker.js +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +32 -8
- package/dist/scan/arrow-execution/expressions.cjs.map +2 -2
- package/dist/scan/arrow-execution/expressions.d.ts +7 -4
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -1
- package/dist/scan/arrow-execution/expressions.js +32 -6
- package/dist/scan/arrow-execution/expressions.js.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +3 -18
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +2 -2
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -1
- package/dist/scan/arrow-execution/filter-arrow-table.js +3 -9
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -1
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs +41 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.cjs.map +7 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts +5 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.d.ts.map +1 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js +23 -0
- package/dist/scan/arrow-execution/portable-predicate-compatibility.js.map +1 -0
- package/dist/scan/arrow-query-worker-entry.cjs +121 -0
- package/dist/scan/arrow-query-worker-entry.cjs.map +7 -0
- package/dist/scan/arrow-query-worker-entry.d.ts +2 -0
- package/dist/scan/arrow-query-worker-entry.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker-entry.js +7 -0
- package/dist/scan/arrow-query-worker-entry.js.map +1 -0
- package/dist/scan/arrow-query-worker.cjs +197 -0
- package/dist/scan/arrow-query-worker.cjs.map +7 -0
- package/dist/scan/arrow-query-worker.d.ts +47 -0
- package/dist/scan/arrow-query-worker.d.ts.map +1 -0
- package/dist/scan/arrow-query-worker.js +101 -0
- package/dist/scan/arrow-query-worker.js.map +1 -0
- package/dist/scan/arrow-query.cjs +6 -2
- package/dist/scan/arrow-query.cjs.map +2 -2
- package/dist/scan/arrow-query.d.ts +3 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/arrow-query.js +3 -1
- package/dist/scan/arrow-query.js.map +1 -1
- package/dist/scan/federated-table-scan-source.cjs +38 -39
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +5 -9
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +35 -36
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +15 -6
- package/dist/scan/index.cjs.map +3 -3
- package/dist/scan/index.d.ts +9 -5
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +7 -4
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +2 -2
- package/dist/scan/parse-sql-predicate.cjs.map +2 -2
- package/dist/scan/parse-sql-predicate.js +1 -1
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +60 -26
- package/dist/scan/query-arrow-table-in-batches.cjs.map +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts +3 -3
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.js +52 -24
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -1
- package/dist/{geoarrow/get-geoarrow-native-geometry.cjs → scan/query-arrow-table-math.cjs} +18 -8
- package/dist/scan/query-arrow-table-math.cjs.map +7 -0
- package/dist/scan/query-arrow-table-math.d.ts +5 -0
- package/dist/scan/query-arrow-table-math.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-math.js +14 -0
- package/dist/scan/query-arrow-table-math.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +32 -62
- package/dist/scan/query-arrow-table.cjs.map +2 -2
- package/dist/scan/query-arrow-table.d.ts +13 -8
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +35 -67
- package/dist/scan/query-arrow-table.js.map +1 -1
- package/dist/scan/query-grouped-sql.cjs +66 -0
- package/dist/scan/query-grouped-sql.cjs.map +7 -0
- package/dist/scan/query-grouped-sql.d.ts +5 -0
- package/dist/scan/query-grouped-sql.d.ts.map +1 -0
- package/dist/scan/query-grouped-sql.js +58 -0
- package/dist/scan/query-grouped-sql.js.map +1 -0
- package/dist/scan/query-open-source.cjs +52 -0
- package/dist/scan/query-open-source.cjs.map +7 -0
- package/dist/scan/query-open-source.d.ts +4 -0
- package/dist/scan/query-open-source.d.ts.map +1 -0
- package/dist/scan/query-open-source.js +26 -0
- package/dist/scan/query-open-source.js.map +1 -0
- package/dist/scan/query-progressive.cjs +7 -8
- package/dist/scan/query-progressive.cjs.map +2 -2
- package/dist/scan/query-progressive.d.ts +5 -3
- package/dist/scan/query-progressive.d.ts.map +1 -1
- package/dist/scan/query-progressive.js +7 -8
- package/dist/scan/query-progressive.js.map +1 -1
- package/dist/scan/query-pushdown.cjs +140 -0
- package/dist/scan/query-pushdown.cjs.map +7 -0
- package/dist/scan/query-pushdown.d.ts +14 -0
- package/dist/scan/query-pushdown.d.ts.map +1 -0
- package/dist/scan/query-pushdown.js +133 -0
- package/dist/scan/query-pushdown.js.map +1 -0
- package/dist/scan/query-scales.cjs +196 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +48 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +202 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +118 -103
- package/dist/scan/query.cjs.map +2 -2
- package/dist/scan/query.d.ts +29 -22
- package/dist/scan/query.d.ts.map +1 -1
- package/dist/scan/query.js +111 -111
- package/dist/scan/query.js.map +1 -1
- package/dist/scan/rows-to-arrow.cjs +1 -28
- package/dist/scan/rows-to-arrow.cjs.map +2 -2
- package/dist/scan/rows-to-arrow.d.ts +3 -3
- package/dist/scan/rows-to-arrow.d.ts.map +1 -1
- package/dist/scan/rows-to-arrow.js +2 -32
- package/dist/scan/rows-to-arrow.js.map +1 -1
- package/dist/scan/scan-engine.cjs +1 -1
- package/dist/scan/scan-engine.cjs.map +2 -2
- package/dist/scan/scan-engine.d.ts +6 -6
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js +2 -2
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/sql-predicate-schema.cjs +10 -94
- package/dist/scan/sql-predicate-schema.cjs.map +3 -3
- package/dist/scan/sql-predicate-schema.d.ts +1 -1
- package/dist/scan/sql-predicate-schema.d.ts.map +1 -1
- package/dist/scan/sql-predicate-schema.js +9 -103
- package/dist/scan/sql-predicate-schema.js.map +1 -1
- package/dist/scan/sql-predicate-zod.cjs.map +1 -1
- package/dist/scan/sql-predicate-zod.d.ts +1 -1
- package/dist/scan/sql-predicate-zod.js +1 -1
- package/dist/scan/vector-table-scan-source.cjs +24 -17
- package/dist/scan/vector-table-scan-source.cjs.map +4 -4
- package/dist/scan/vector-table-scan-source.d.ts +8 -8
- package/dist/scan/vector-table-scan-source.d.ts.map +1 -1
- package/dist/scan/vector-table-scan-source.js +19 -17
- package/dist/scan/vector-table-scan-source.js.map +1 -1
- package/dist/schema/categories/category-mesh.d.ts +3 -10
- package/dist/schema/categories/category-mesh.d.ts.map +1 -1
- package/dist/schema/categories/category-mesh.js.map +1 -1
- package/dist/schema/categories/category-table.d.ts +2 -19
- package/dist/schema/categories/category-table.d.ts.map +1 -1
- package/dist/schema/float16.js +1 -1
- package/dist/schema/float16.js.map +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts +1 -1
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -1
- package/dist/schema/geometry/geoarrow.d.ts +2 -2
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +14 -10
- package/dist/schema/index.cjs.map +2 -2
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/types/batch.d.ts +0 -4
- package/dist/schema/types/batch.d.ts.map +1 -1
- package/dist/schema-utils/index.cjs +623 -860
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -7
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -6
- package/dist/schema-utils/index.js.map +1 -1
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts +16 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js +109 -0
- package/dist/schema-utils/lib/arrow/arrow-metadata.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +1 -1
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/converters/convert.js +9 -2
- package/dist/schema-utils/lib/converters/convert.js.map +1 -1
- package/dist/schema-utils/lib/converters/types.d.ts +2 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +8 -12
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +8 -21
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +5 -4
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +18 -13
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -1
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js +39 -0
- package/dist/schema-utils/lib/mesh/get-mesh-bounding-box.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +2 -14
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/mesh-utils.js +1 -35
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -1
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +6 -5
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -1
- package/dist/schema-utils/lib/schema/data-type.js +1 -1
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +2 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +3 -1
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +6 -5
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +9 -9
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +13 -46
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +9 -20
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +61 -73
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +4 -3
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/convert-batches.js +27 -9
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +6 -9
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +22 -15
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +4 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +13 -9
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +3 -3
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/query-arrow-table.js +9 -23
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +9 -10
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +15 -76
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +6 -36
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/convert-table.js +5 -42
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +3 -55
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/make-table.js +3 -59
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +18 -16
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-accessors.js +36 -39
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +6 -5
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +2 -2
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +8 -5
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +1 -3
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -1
- package/dist/schema-utils/lib/table/tables/table-types.js +0 -4
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -1
- package/dist/vector-table-scan-source.cjs +249 -388
- package/dist/vector-table-scan-source.cjs.map +3 -3
- package/dist/wkt/index.cjs.map +1 -1
- package/dist/wkt/index.d.ts.map +1 -1
- package/dist/wkt/index.js.map +1 -1
- package/dist/worker-utils/index.cjs +33 -9
- package/dist/worker-utils/index.cjs.map +1 -1
- package/dist/worker-utils/lib/env-utils/version.js +1 -1
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -1
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -1
- package/dist/worker-utils/lib/npm-tag.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +8 -2
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +42 -8
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js.map +1 -1
- package/dist/worker-utils/null-worker.js.map +1 -1
- package/package.json +38 -29
- package/src/arrow-geometry/binary-features.ts +5 -2
- package/src/arrow-geometry/binary-geometry-to-wkb.ts +1 -1
- package/src/arrow-geometry/feature-collection-to-arrow.ts +4 -3
- package/src/arrow-geometry/feature-table.ts +8 -17
- package/src/arrow-geometry/geojson-table.ts +5 -4
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/legacy-binary/convert-flat-geojson-to-binary-features.ts +4 -2
- package/src/arrow-geometry/legacy-binary/convert-geojson-to-flat-geojson.ts +1 -1
- package/src/arrow-geometry/wkb-arrow-utils.ts +8 -12
- package/src/arrow-geometry/wkb-builder.ts +2 -2
- package/src/arrow-geometry/wkb-statistics.ts +2 -2
- package/src/arrow-worker-transport.ts +89 -50
- package/src/geoarrow/binary-polygon-to-geoarrow.ts +2 -2
- package/src/geoarrow/clustering/cluster-source.ts +20 -30
- package/src/geoarrow/convert-table-to-geoarrow.ts +14 -24
- package/src/geoarrow/geo-column/geo-column.ts +1 -1
- package/src/geoarrow/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +12 -15
- package/src/geoarrow/geoarrow-converter/convert-geoarrow.ts +14 -9
- package/src/geoarrow/geoarrow-converter/geoarrow-converter.ts +7 -6
- package/src/geoarrow/geoarrow-inspection.ts +2 -2
- package/src/geoarrow/geoarrow-stream.ts +15 -15
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- package/src/geoarrow/index.ts +0 -2
- package/src/geoarrow/lib/feature-collection-converters/convert-arrow-binary-feature-collection.ts +3 -3
- package/src/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.ts +6 -3
- package/src/geoarrow/lib/geoarrow/geoarrow-union-kind.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/convert-wkb-to-binary-geometry.ts +1 -1
- package/src/geoarrow/lib/geometry-converters/wkb/helpers/parse-wkb-header.ts +2 -2
- package/src/geoarrow/lib/kernels/encode-geoarrow-box.ts +1 -1
- package/src/geoarrow/lib/kernels/geoarrow-union.ts +1 -1
- package/src/geoarrow/lib/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +2 -2
- package/src/geoarrow/mesharrow/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/geoarrow/mesharrow/get-deck-binary-data.ts +1 -1
- package/src/geoarrow/mesharrow/mesh-accessors.ts +1 -1
- package/src/index.ts +1 -5
- package/src/lib/api/create-data-source.ts +15 -3
- package/src/lib/api/load-loader.ts +1 -1
- package/src/lib/api/load.ts +53 -28
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +2 -11
- package/src/lib/api/parse-in-batches.ts +81 -17
- package/src/lib/api/parse-sync.ts +3 -7
- package/src/lib/api/parse.ts +8 -8
- package/src/lib/api/select-loader.ts +15 -33
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/native-arrow.ts +38 -25
- package/src/lib/loader-utils/option-defaults.ts +7 -8
- package/src/lib/loader-utils/option-utils.ts +12 -112
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +17 -2
- package/src/loader-utils/lib/log-utils/log.ts +2 -5
- package/src/loader-utils/lib/pace-batch-iterator.ts +66 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +1 -1
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +68 -6
- package/src/loader-utils/lib/scan-utils/table-query.ts +18 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +64 -43
- package/src/loader-utils/lib/sources/data-source.ts +0 -12
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +2 -1
- package/src/loader-utils/lib/sources/tile-grid.ts +39 -19
- package/src/loader-utils/lib/sources/tile-source-adapter.ts +1 -1
- package/src/loader-utils/lib/sources/tile-source.ts +1 -1
- package/src/loader-utils/lib/sources/utils/utils.ts +1 -1
- package/src/loader-utils/lib/sources/vector-source.ts +3 -3
- package/src/loader-utils/lib/sources/vector-tile-source.ts +4 -9
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +12 -18
- package/src/loader-utils/loader-types.ts +29 -69
- package/src/loader-utils/source-types.ts +5 -0
- package/src/null-loader.ts +1 -20
- package/src/scan/arrow-execution/expressions.ts +42 -7
- package/src/scan/arrow-execution/filter-arrow-table.ts +3 -18
- package/src/scan/arrow-execution/portable-predicate-compatibility.ts +27 -0
- package/src/scan/arrow-query-worker-entry.ts +8 -0
- package/src/scan/arrow-query-worker.ts +158 -0
- package/src/scan/arrow-query.ts +3 -1
- package/src/scan/federated-table-scan-source.ts +48 -59
- package/src/scan/index.ts +34 -10
- package/src/scan/parse-sql-predicate.ts +1 -1
- package/src/scan/query-arrow-table-in-batches.ts +62 -33
- package/src/scan/query-arrow-table-math.ts +23 -0
- package/src/scan/query-arrow-table.ts +62 -97
- package/src/scan/query-grouped-sql.ts +69 -0
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +12 -13
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +298 -0
- package/src/scan/query.ts +210 -165
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +8 -8
- package/src/scan/sql-predicate-schema.ts +14 -125
- package/src/scan/sql-predicate-zod.ts +1 -1
- package/src/scan/vector-table-scan-source.ts +25 -26
- package/src/schema/categories/category-mesh.ts +3 -11
- package/src/schema/categories/category-table.ts +2 -28
- package/src/schema/float16.ts +1 -1
- package/src/schema/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +2 -2
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +20 -16
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +1 -1
- package/src/schema-utils/lib/converters/convert.ts +7 -2
- package/src/schema-utils/lib/converters/types.ts +2 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +15 -43
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +19 -16
- package/src/schema-utils/lib/mesh/get-mesh-bounding-box.ts +52 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +3 -49
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +6 -5
- package/src/schema-utils/lib/schema/data-type.ts +1 -1
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +4 -2
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +10 -9
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +21 -51
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +68 -83
- package/src/schema-utils/lib/table/batches/convert-batches.ts +38 -21
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +29 -19
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +26 -7
- package/src/schema-utils/lib/table/query-arrow-table.ts +14 -32
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +29 -96
- package/src/schema-utils/lib/table/tables/convert-table.ts +11 -57
- package/src/schema-utils/lib/table/tables/make-table.ts +6 -70
- package/src/schema-utils/lib/table/tables/table-accessors.ts +60 -63
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +12 -14
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +12 -9
- package/src/schema-utils/lib/table/tables/table-types.ts +1 -7
- package/src/wkt/index.ts +1 -1
- package/src/worker-utils/lib/npm-tag.ts +1 -1
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +46 -10
- package/dist/arrow-geometry/native-geometry.cjs +0 -215
- package/dist/arrow-geometry/native-geometry.cjs.map +0 -7
- package/dist/arrow-geometry/native-geometry.d.ts +0 -41
- package/dist/arrow-geometry/native-geometry.d.ts.map +0 -1
- package/dist/arrow-geometry/native-geometry.js +0 -224
- package/dist/arrow-geometry/native-geometry.js.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.cjs.map +0 -7
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts +0 -2
- package/dist/geoarrow/get-geoarrow-native-geometry.d.ts.map +0 -1
- package/dist/geoarrow/get-geoarrow-native-geometry.js +0 -5
- package/dist/geoarrow/get-geoarrow-native-geometry.js.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs +0 -290
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.cjs.map +0 -7
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts +0 -16
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.d.ts.map +0 -1
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js +0 -334
- package/dist/geoarrow/lib/kernels/encode-geoarrow-wkt.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +0 -40
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/data-view-file.js +0 -68
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +0 -54
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +0 -102
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +0 -45
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +0 -13
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +0 -57
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +0 -1
- package/dist/loader-utils/lib/file-provider/file-provider.js +0 -114
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +0 -1
- package/dist/schema/deprecated/mesh-utils.d.ts +0 -12
- package/dist/schema/deprecated/mesh-utils.d.ts.map +0 -1
- package/dist/schema/deprecated/mesh-utils.js +0 -37
- package/dist/schema/deprecated/mesh-utils.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +0 -10
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +0 -71
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +0 -19
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +0 -64
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +0 -20
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +0 -83
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +0 -21
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +0 -86
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +0 -24
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +0 -5
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts +0 -28
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.d.ts.map +0 -1
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js +0 -26
- package/dist/schema-utils/lib/table/tables/convert-arrow-table-wrapper.js.map +0 -1
- package/src/arrow-geometry/native-geometry.ts +0 -278
- package/src/geoarrow/get-geoarrow-native-geometry.ts +0 -8
- package/src/geoarrow/lib/kernels/encode-geoarrow-wkt.ts +0 -373
- package/src/loader-utils/lib/file-provider/data-view-file.ts +0 -83
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +0 -114
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +0 -60
- package/src/loader-utils/lib/file-provider/file-provider.ts +0 -130
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +0 -190
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +0 -85
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +0 -82
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +0 -103
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +0 -108
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +0 -28
- package/src/schema-utils/lib/table/tables/convert-arrow-table-wrapper.ts +0 -58
package/dist/index.cjs
CHANGED
|
@@ -23,13 +23,13 @@ __export(index_exports, {
|
|
|
23
23
|
FetchError: () => FetchError,
|
|
24
24
|
JSONLoader: () => JSONLoader,
|
|
25
25
|
NullLoader: () => NullLoader,
|
|
26
|
-
NullWorkerLoader: () => NullWorkerLoader,
|
|
27
26
|
RequestScheduler: () => RequestScheduler,
|
|
28
27
|
_BrowserFileSystem: () => BrowserFileSystem,
|
|
29
28
|
_fetchProgress: () => fetchProgress,
|
|
30
29
|
_selectSource: () => selectSource,
|
|
31
30
|
_unregisterLoaders: () => _unregisterLoaders,
|
|
32
31
|
assert: () => assert,
|
|
32
|
+
compareLoaderOptions: () => compareLoaderOptions,
|
|
33
33
|
concatenateArrayBuffersAsync: () => concatenateArrayBuffersAsync,
|
|
34
34
|
coreApi: () => coreApi,
|
|
35
35
|
createDataSource: () => createDataSource,
|
|
@@ -152,7 +152,7 @@ function ignoreMessage() {
|
|
|
152
152
|
var nullLog = new NullLog();
|
|
153
153
|
function getLoaderLog(options) {
|
|
154
154
|
var _a;
|
|
155
|
-
const logger = (
|
|
155
|
+
const logger = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a.log;
|
|
156
156
|
return logger === null ? nullLog : logger || log;
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -379,18 +379,43 @@ function canProcessOnWorkerInBatches(worker, options = {}) {
|
|
|
379
379
|
return Boolean(worker.workerInBatches && !getConfiguredWorkerURL(worker, options));
|
|
380
380
|
}
|
|
381
381
|
async function processOnWorker(worker, data, options = {}, context = {}, jobContext = {}) {
|
|
382
|
-
const
|
|
382
|
+
const controller = new AbortController();
|
|
383
|
+
const signal = options.signal ? AbortSignal.any([options.signal, controller.signal]) : controller.signal;
|
|
384
|
+
const sessionPromise = openSession(worker, { ...options, signal }, context, jobContext);
|
|
385
|
+
void sessionPromise.catch(() => {
|
|
386
|
+
});
|
|
383
387
|
try {
|
|
388
|
+
const input = data instanceof Promise ? await waitForInput(data, signal) : data;
|
|
389
|
+
const session = await sessionPromise;
|
|
384
390
|
const result = await session.handle.runTask(
|
|
385
|
-
{ value:
|
|
391
|
+
{ value: input },
|
|
386
392
|
{
|
|
387
393
|
...getControls(options),
|
|
388
394
|
options: getParserOptions(options)
|
|
389
395
|
}
|
|
390
396
|
);
|
|
391
397
|
return result.value;
|
|
398
|
+
} catch (error) {
|
|
399
|
+
controller.abort(error);
|
|
400
|
+
throw error;
|
|
392
401
|
} finally {
|
|
393
|
-
await
|
|
402
|
+
const session = await sessionPromise.catch(() => void 0);
|
|
403
|
+
await (session == null ? void 0 : session.close());
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
async function waitForInput(input, signal) {
|
|
407
|
+
let onAbort;
|
|
408
|
+
try {
|
|
409
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
410
|
+
onAbort = () => reject(signal.reason);
|
|
411
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
412
|
+
if (signal.aborted) {
|
|
413
|
+
onAbort();
|
|
414
|
+
}
|
|
415
|
+
});
|
|
416
|
+
return await Promise.race([input, aborted]);
|
|
417
|
+
} finally {
|
|
418
|
+
signal.removeEventListener("abort", onAbort);
|
|
394
419
|
}
|
|
395
420
|
}
|
|
396
421
|
async function* processOnWorkerInBatches(worker, input, options = {}, context = {}, jobContext = {}) {
|
|
@@ -418,12 +443,11 @@ function getTask(worker, options) {
|
|
|
418
443
|
"Inline legacy worker source is unsupported; use a TaskRunner worker URL or factory"
|
|
419
444
|
);
|
|
420
445
|
const create = !getCustomWorkerURL(worker, options) && isBrowser2 ? worker.loadWorker : void 0;
|
|
421
|
-
const url = getWorkerURL(worker, options);
|
|
422
446
|
return {
|
|
423
447
|
id: `${worker.module}:${worker.id}`,
|
|
424
448
|
initialize: (state) => state,
|
|
425
449
|
worker: {
|
|
426
|
-
...create ? { create: () => create() ?? createModuleWorker(
|
|
450
|
+
...create ? { create: () => create() ?? createModuleWorker(getWorkerURL(worker, options)) } : { url: getWorkerURL(worker, options) },
|
|
427
451
|
capabilities: { atomic: true, streaming: true }
|
|
428
452
|
}
|
|
429
453
|
};
|
|
@@ -441,8 +465,8 @@ function getControls(options) {
|
|
|
441
465
|
};
|
|
442
466
|
}
|
|
443
467
|
function getParserOptions(options) {
|
|
444
|
-
const { signal, onProgress,
|
|
445
|
-
return getTransferListForWriter(parserOptions);
|
|
468
|
+
const { signal, onProgress, parserOptions, ...workerOptions } = options;
|
|
469
|
+
return getTransferListForWriter(parserOptions ?? workerOptions);
|
|
446
470
|
}
|
|
447
471
|
async function openSession(worker, options, context, jobContext) {
|
|
448
472
|
var _a, _b;
|
|
@@ -603,8 +627,7 @@ function canParseWithWorker(loader, options) {
|
|
|
603
627
|
(credential) => credential.type === "request" || "token" in credential && typeof credential.token === "function"
|
|
604
628
|
))
|
|
605
629
|
return false;
|
|
606
|
-
if (loader.id === "shapefile" &&
|
|
607
|
-
return false;
|
|
630
|
+
if (loader.id === "shapefile" && typeof ((_e = options == null ? void 0 : options.core) == null ? void 0 : _e.fetch) === "function") return false;
|
|
608
631
|
const workerOptions = getWorkerOptions(options);
|
|
609
632
|
const nodeWorkers = workerOptions._nodeWorkers;
|
|
610
633
|
if (!isBrowser2 && !nodeWorkers) {
|
|
@@ -757,13 +780,12 @@ function resolveWorkerLoaders(loader, loaderIds, loaderIsArray, context, options
|
|
|
757
780
|
}
|
|
758
781
|
}
|
|
759
782
|
function getWorkerOptions(options = {}, loader) {
|
|
760
|
-
var _a;
|
|
783
|
+
var _a, _b;
|
|
761
784
|
const portableOptions = ((_a = loader == null ? void 0 : loader.serializeWorkerOptions) == null ? void 0 : _a.call(loader, options)) || options;
|
|
762
785
|
const optionsToSerialize = {
|
|
763
786
|
...portableOptions,
|
|
764
787
|
signal: void 0,
|
|
765
788
|
onProgress: void 0,
|
|
766
|
-
log: isDisabledLog(portableOptions.log) ? null : void 0,
|
|
767
789
|
...portableOptions.core ? {
|
|
768
790
|
core: {
|
|
769
791
|
...portableOptions.core,
|
|
@@ -781,17 +803,17 @@ function getWorkerOptions(options = {}, loader) {
|
|
|
781
803
|
})
|
|
782
804
|
);
|
|
783
805
|
restoreBigIntOptions(optionsToSerialize, serializedOptions);
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
...serializedOptions
|
|
787
|
-
};
|
|
788
|
-
if (workerOptions.worker === "auto") {
|
|
789
|
-
workerOptions.worker = true;
|
|
806
|
+
if (((_b = serializedOptions.core) == null ? void 0 : _b.worker) === "auto") {
|
|
807
|
+
serializedOptions.core.worker = true;
|
|
790
808
|
}
|
|
791
809
|
if (loader) {
|
|
792
|
-
|
|
810
|
+
serializedOptions._workerLoaderId = loader.id;
|
|
793
811
|
}
|
|
794
|
-
return
|
|
812
|
+
return {
|
|
813
|
+
...serializedOptions,
|
|
814
|
+
...serializedOptions.core,
|
|
815
|
+
parserOptions: serializedOptions
|
|
816
|
+
};
|
|
795
817
|
}
|
|
796
818
|
function restoreBigIntOptions(original, serialized) {
|
|
797
819
|
if (!serialized || typeof serialized !== "object") return;
|
|
@@ -821,7 +843,7 @@ function getSerializableLoaderContext(context) {
|
|
|
821
843
|
function shouldParseCSVWithWorker(options) {
|
|
822
844
|
var _a, _b;
|
|
823
845
|
const csvOptions = options;
|
|
824
|
-
return (((_a = csvOptions == null ? void 0 : csvOptions.csv) == null ? void 0 : _a.shape) ?? ((_b = csvOptions == null ? void 0 : csvOptions.core) == null ? void 0 : _b.shape)) === "arrow
|
|
846
|
+
return (((_a = csvOptions == null ? void 0 : csvOptions.csv) == null ? void 0 : _a.shape) ?? ((_b = csvOptions == null ? void 0 : csvOptions.core) == null ? void 0 : _b.shape)) === "arrow";
|
|
825
847
|
}
|
|
826
848
|
function isLoaderWithWorkerResultDeserializer(loader) {
|
|
827
849
|
return typeof loader.deserializeWorkerResult === "function";
|
|
@@ -1745,11 +1767,50 @@ var NodeFileFacade = class {
|
|
|
1745
1767
|
}
|
|
1746
1768
|
};
|
|
1747
1769
|
|
|
1748
|
-
// src/loader-utils/
|
|
1749
|
-
function
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1770
|
+
// src/loader-utils/lib/pace-batch-iterator.ts
|
|
1771
|
+
function validateBatchDeliveryRate(rate) {
|
|
1772
|
+
if (!Number.isFinite(rate) || rate < 0) {
|
|
1773
|
+
throw new RangeError("core.batchMaxRowsPerSecond must be a finite nonnegative number");
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
async function* paceBatchIterator(batches, { batchMaxRowsPerSecond = 0, getRowCount, signal }) {
|
|
1777
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
1778
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1779
|
+
if (batchMaxRowsPerSecond === 0) {
|
|
1780
|
+
yield* batches;
|
|
1781
|
+
return;
|
|
1782
|
+
}
|
|
1783
|
+
let deadline = 0;
|
|
1784
|
+
for await (const batch of batches) {
|
|
1785
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1786
|
+
const rowCount = getRowCount(batch);
|
|
1787
|
+
if (rowCount !== void 0 && rowCount > 0) {
|
|
1788
|
+
let remaining = deadline - performance.now();
|
|
1789
|
+
while (remaining > 0) {
|
|
1790
|
+
await waitForBatch(Math.min(Math.ceil(remaining), 2 ** 31 - 1), signal);
|
|
1791
|
+
remaining = deadline - performance.now();
|
|
1792
|
+
}
|
|
1793
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1794
|
+
deadline = performance.now() + rowCount / batchMaxRowsPerSecond * 1e3;
|
|
1795
|
+
}
|
|
1796
|
+
yield batch;
|
|
1797
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
function waitForBatch(delay, signal) {
|
|
1801
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
1802
|
+
return new Promise((resolve2, reject) => {
|
|
1803
|
+
const timer = setTimeout(() => {
|
|
1804
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
1805
|
+
resolve2();
|
|
1806
|
+
}, delay);
|
|
1807
|
+
function abort() {
|
|
1808
|
+
clearTimeout(timer);
|
|
1809
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
1810
|
+
reject(signal == null ? void 0 : signal.reason);
|
|
1811
|
+
}
|
|
1812
|
+
signal == null ? void 0 : signal.addEventListener("abort", abort, { once: true });
|
|
1813
|
+
});
|
|
1753
1814
|
}
|
|
1754
1815
|
|
|
1755
1816
|
// dist/lib/fetch/fetch-error.js
|
|
@@ -1980,7 +2041,7 @@ var import_log6 = require("probe.gl/log");
|
|
|
1980
2041
|
|
|
1981
2042
|
// dist/loader-utils/lib/log-utils/log.js
|
|
1982
2043
|
var import_log5 = require("probe.gl/log");
|
|
1983
|
-
var VERSION4 = true ? "5.0.0-
|
|
2044
|
+
var VERSION4 = true ? "5.0.0-rc.2" : "latest";
|
|
1984
2045
|
var version2 = VERSION4[0] >= "0" && VERSION4[0] <= "9" ? `v${VERSION4}` : "";
|
|
1985
2046
|
function createLog2() {
|
|
1986
2047
|
const log3 = new import_log5.Log({ id: "loaders.gl" });
|
|
@@ -2048,18 +2109,17 @@ var DEFAULT_LOADER_OPTIONS = {
|
|
|
2048
2109
|
// By default do not support node workers
|
|
2049
2110
|
_workerType: "",
|
|
2050
2111
|
// 'test' to use locally generated workers
|
|
2051
|
-
limit: 0,
|
|
2052
|
-
_limitMB: 0,
|
|
2053
2112
|
batchSize: "auto",
|
|
2054
|
-
|
|
2113
|
+
batchMaxRowsPerSecond: 0,
|
|
2055
2114
|
metadata: false,
|
|
2056
2115
|
// TODO - currently only implemented for parseInBatches, adds initial metadata batch,
|
|
2057
2116
|
transforms: []
|
|
2058
2117
|
}
|
|
2059
2118
|
};
|
|
2060
2119
|
var REMOVED_LOADER_OPTIONS = {
|
|
2061
|
-
//
|
|
2120
|
+
// Removed top-level aliases
|
|
2062
2121
|
baseUri: "core.baseUrl",
|
|
2122
|
+
baseUrl: "core.baseUrl",
|
|
2063
2123
|
fetch: "core.fetch",
|
|
2064
2124
|
mimeType: "core.mimeType",
|
|
2065
2125
|
fallbackMimeType: "core.fallbackMimeType",
|
|
@@ -2069,17 +2129,17 @@ var REMOVED_LOADER_OPTIONS = {
|
|
|
2069
2129
|
useLocalLibraries: "core.useLocalLibraries",
|
|
2070
2130
|
CDN: "core.CDN",
|
|
2071
2131
|
worker: "core.worker",
|
|
2132
|
+
workerThreshold: "core.workerThreshold",
|
|
2133
|
+
workerTransferBufferCopy: "core.workerTransferBufferCopy",
|
|
2072
2134
|
maxConcurrency: "core.maxConcurrency",
|
|
2073
2135
|
maxMobileConcurrency: "core.maxMobileConcurrency",
|
|
2074
2136
|
reuseWorkers: "core.reuseWorkers",
|
|
2075
|
-
_nodeWorkers: "core.
|
|
2137
|
+
_nodeWorkers: "core._nodeWorkers",
|
|
2076
2138
|
_workerType: "core._workerType",
|
|
2077
2139
|
_worker: "core._workerType",
|
|
2078
|
-
limit: "core.limit",
|
|
2079
|
-
_limitMB: "core._limitMB",
|
|
2080
2140
|
shape: "core.shape",
|
|
2081
2141
|
batchSize: "core.batchSize",
|
|
2082
|
-
batchDebounceMs: "core.
|
|
2142
|
+
batchDebounceMs: "(removed; use core.batchMaxRowsPerSecond)",
|
|
2083
2143
|
metadata: "core.metadata",
|
|
2084
2144
|
transforms: "core.transforms",
|
|
2085
2145
|
// Older deprecations
|
|
@@ -2110,66 +2170,41 @@ function getShapeOptionKey(loader) {
|
|
|
2110
2170
|
});
|
|
2111
2171
|
return keys.includes(loader.id) ? loader.id : keys.length === 1 ? keys[0] : void 0;
|
|
2112
2172
|
}
|
|
2113
|
-
function
|
|
2114
|
-
var _a
|
|
2173
|
+
function usesNativeArrowBatches(loader, options) {
|
|
2174
|
+
var _a;
|
|
2115
2175
|
const key = getShapeOptionKey(loader);
|
|
2116
2176
|
const scopedOptions = key && options[key];
|
|
2117
2177
|
if (!scopedOptions || typeof scopedOptions !== "object" || !("shape" in scopedOptions) || scopedOptions.shape !== "arrow") {
|
|
2118
|
-
return
|
|
2119
|
-
}
|
|
2120
|
-
if (inBatches && ((_a = options.core) == null ? void 0 : _a.metadata)) {
|
|
2121
|
-
throw new Error('shape: "arrow" does not support core.metadata; use "arrow-table" for batch metadata');
|
|
2178
|
+
return false;
|
|
2122
2179
|
}
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
core: { ...options.core, ...((_b = options.core) == null ? void 0 : _b.shape) === "arrow" ? { shape: "arrow-table" } : {} },
|
|
2126
|
-
[key]: { ...scopedOptions, shape: "arrow-table" }
|
|
2127
|
-
};
|
|
2128
|
-
}
|
|
2129
|
-
function unwrapArrowTable(result) {
|
|
2130
|
-
const table = result;
|
|
2131
|
-
if ((table == null ? void 0 : table.shape) !== "arrow-table" || !table.data || !Array.isArray(table.data.batches)) {
|
|
2132
|
-
throw new Error('shape: "arrow" requires a loader that supports "arrow-table" output');
|
|
2180
|
+
if ((_a = options.core) == null ? void 0 : _a.metadata) {
|
|
2181
|
+
throw new Error('shape: "arrow" carries metadata in the Arrow schema and does not support core.metadata envelopes');
|
|
2133
2182
|
}
|
|
2134
|
-
return
|
|
2183
|
+
return true;
|
|
2135
2184
|
}
|
|
2136
|
-
async function*
|
|
2185
|
+
async function* normalizeNativeArrowBatches(batches) {
|
|
2137
2186
|
for await (const batch of batches) {
|
|
2138
2187
|
const batchType = batch == null ? void 0 : batch.batchType;
|
|
2139
2188
|
if (batchType === "metadata" || batchType === "partial-result" || batchType === "final-result") {
|
|
2140
2189
|
continue;
|
|
2141
2190
|
}
|
|
2142
|
-
|
|
2191
|
+
if (isArrowRecordBatch(batch)) {
|
|
2192
|
+
yield batch;
|
|
2193
|
+
} else if (isArrowTable(batch)) {
|
|
2194
|
+
yield* batch.batches;
|
|
2195
|
+
} else {
|
|
2196
|
+
throw new Error('shape: "arrow" requires a native Arrow table or record batch');
|
|
2197
|
+
}
|
|
2143
2198
|
}
|
|
2144
2199
|
}
|
|
2200
|
+
function isArrowTable(value) {
|
|
2201
|
+
return Boolean(value && typeof value === "object" && "schema" in value && "batches" in value && Array.isArray(value.batches) && "numRows" in value && typeof value.numRows === "number" && "getChildAt" in value && typeof value.getChildAt === "function");
|
|
2202
|
+
}
|
|
2203
|
+
function isArrowRecordBatch(value) {
|
|
2204
|
+
return Boolean(value && typeof value === "object" && value[/* @__PURE__ */ Symbol.for("apache-arrow/RecordBatch")] === true);
|
|
2205
|
+
}
|
|
2145
2206
|
|
|
2146
2207
|
// dist/lib/loader-utils/option-utils.js
|
|
2147
|
-
var CORE_LOADER_OPTION_KEYS = [
|
|
2148
|
-
"baseUrl",
|
|
2149
|
-
"fetch",
|
|
2150
|
-
"mimeType",
|
|
2151
|
-
"fallbackMimeType",
|
|
2152
|
-
"ignoreRegisteredLoaders",
|
|
2153
|
-
"nothrow",
|
|
2154
|
-
"log",
|
|
2155
|
-
"useLocalLibraries",
|
|
2156
|
-
"CDN",
|
|
2157
|
-
"worker",
|
|
2158
|
-
"workerThreshold",
|
|
2159
|
-
"maxConcurrency",
|
|
2160
|
-
"maxMobileConcurrency",
|
|
2161
|
-
"reuseWorkers",
|
|
2162
|
-
"workerTransferBufferCopy",
|
|
2163
|
-
"_nodeWorkers",
|
|
2164
|
-
"_workerType",
|
|
2165
|
-
"limit",
|
|
2166
|
-
"_limitMB",
|
|
2167
|
-
"shape",
|
|
2168
|
-
"batchSize",
|
|
2169
|
-
"batchDebounceMs",
|
|
2170
|
-
"metadata",
|
|
2171
|
-
"transforms"
|
|
2172
|
-
];
|
|
2173
2208
|
function applySearchParamsToUrl(url, options) {
|
|
2174
2209
|
const searchParams = options == null ? void 0 : options.searchParams;
|
|
2175
2210
|
if (!searchParams || Object.keys(searchParams).length === 0 || /^(?:data|blob):/i.test(url)) {
|
|
@@ -2205,12 +2240,15 @@ function getGlobalLoaderOptions() {
|
|
|
2205
2240
|
...DEFAULT_LOADER_OPTIONS,
|
|
2206
2241
|
core: { ...DEFAULT_LOADER_OPTIONS.core }
|
|
2207
2242
|
};
|
|
2208
|
-
return
|
|
2243
|
+
return cloneLoaderOptions(state.globalOptions);
|
|
2209
2244
|
}
|
|
2210
2245
|
function setGlobalOptions(options) {
|
|
2211
2246
|
const state = getGlobalLoaderState();
|
|
2212
2247
|
const globalOptions = getGlobalLoaderOptions();
|
|
2213
|
-
|
|
2248
|
+
validateOptions(options, []);
|
|
2249
|
+
validateWorkerThreshold(options);
|
|
2250
|
+
mergeNestedFields(globalOptions, options);
|
|
2251
|
+
state.globalOptions = globalOptions;
|
|
2214
2252
|
registerJSModules(options.modules);
|
|
2215
2253
|
}
|
|
2216
2254
|
function normalizeOptions(options, loader, loaders, url) {
|
|
@@ -2218,23 +2256,10 @@ function normalizeOptions(options, loader, loaders, url) {
|
|
|
2218
2256
|
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
2219
2257
|
validateOptions(options, loaders);
|
|
2220
2258
|
validateWorkerThreshold(options);
|
|
2221
|
-
const normalizedOptions =
|
|
2259
|
+
const normalizedOptions = normalizeOptionsInternal(loader, options, url);
|
|
2222
2260
|
validateWorkerThreshold(normalizedOptions);
|
|
2223
2261
|
return normalizedOptions;
|
|
2224
2262
|
}
|
|
2225
|
-
function normalizeLoaderOptions(options) {
|
|
2226
|
-
const normalized = cloneLoaderOptions(options);
|
|
2227
|
-
moveDeprecatedTopLevelOptionsToCore(normalized);
|
|
2228
|
-
for (const key of CORE_LOADER_OPTION_KEYS) {
|
|
2229
|
-
if (normalized.core && normalized.core[key] !== void 0) {
|
|
2230
|
-
delete normalized[key];
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
if (normalized.core && normalized.core._workerType !== void 0) {
|
|
2234
|
-
delete normalized._worker;
|
|
2235
|
-
}
|
|
2236
|
-
return normalized;
|
|
2237
|
-
}
|
|
2238
2263
|
function validateOptions(options, loaders) {
|
|
2239
2264
|
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
2240
2265
|
for (const loader of loaders) {
|
|
@@ -2256,9 +2281,9 @@ function validateOptionsObject(options, id, defaultOptions, deprecatedOptions, l
|
|
|
2256
2281
|
const prefix = id ? `${id}.` : "";
|
|
2257
2282
|
for (const key in options) {
|
|
2258
2283
|
const isSubOptions = !id && isObject(options[key]);
|
|
2259
|
-
const
|
|
2284
|
+
const isLifecycleOption = !id && ["signal", "onProgress"].includes(key);
|
|
2260
2285
|
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
2261
|
-
if (!(key in defaultOptions) && !
|
|
2286
|
+
if (!(key in defaultOptions) && !isLifecycleOption && !isWorkerUrlOption) {
|
|
2262
2287
|
if (key in deprecatedOptions) {
|
|
2263
2288
|
if (log2.level > 0) {
|
|
2264
2289
|
log2.warn(`${loaderName} loader option '${prefix}${key}' no longer supported, use '${deprecatedOptions[key]}'`)();
|
|
@@ -2296,7 +2321,6 @@ function normalizeOptionsInternal(loader, options, url) {
|
|
|
2296
2321
|
if (loaderDefaultOptions.core) {
|
|
2297
2322
|
mergedOptions.core = { ...loaderDefaultOptions.core };
|
|
2298
2323
|
}
|
|
2299
|
-
moveDeprecatedTopLevelOptionsToCore(mergedOptions);
|
|
2300
2324
|
const shapeKey = loader.defaultShape && getShapeOptionKey(loader);
|
|
2301
2325
|
if (shapeKey) {
|
|
2302
2326
|
mergedOptions[shapeKey] = {
|
|
@@ -2304,15 +2328,13 @@ function normalizeOptionsInternal(loader, options, url) {
|
|
|
2304
2328
|
shape: loader.defaultShape
|
|
2305
2329
|
};
|
|
2306
2330
|
}
|
|
2307
|
-
mergeNestedFields(mergedOptions,
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
applyCoreShapeDefault(mergedOptions, userOptions, loader);
|
|
2331
|
+
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
2332
|
+
mergeNestedFields(mergedOptions, options);
|
|
2333
|
+
applyCoreShapeDefault(mergedOptions, options, loader);
|
|
2311
2334
|
if (((_a = mergedOptions.core) == null ? void 0 : _a.log) === null) {
|
|
2312
2335
|
mergedOptions.core = { ...mergedOptions.core, log: getLoaderLog(mergedOptions) };
|
|
2313
2336
|
}
|
|
2314
2337
|
addUrlOptions(mergedOptions, url);
|
|
2315
|
-
addDeprecatedTopLevelOptions(mergedOptions);
|
|
2316
2338
|
return mergedOptions;
|
|
2317
2339
|
}
|
|
2318
2340
|
function applyCoreShapeDefault(mergedOptions, userOptions, loader) {
|
|
@@ -2376,41 +2398,46 @@ function cloneLoaderOptions(options) {
|
|
|
2376
2398
|
}
|
|
2377
2399
|
return clonedOptions;
|
|
2378
2400
|
}
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2401
|
+
|
|
2402
|
+
// dist/lib/api/loader-options.js
|
|
2403
|
+
function compareLoaderOptions(left, right) {
|
|
2404
|
+
return Object.is(left, right) || compareOptionValues(left, right, /* @__PURE__ */ new WeakMap());
|
|
2405
|
+
}
|
|
2406
|
+
function compareOptionValues(left, right, visited) {
|
|
2407
|
+
if (Object.is(left, right)) {
|
|
2408
|
+
return true;
|
|
2385
2409
|
}
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
options.core ||= {};
|
|
2389
|
-
const coreOptions = options.core;
|
|
2390
|
-
const coreRecord = coreOptions;
|
|
2391
|
-
if (coreRecord[key] === void 0) {
|
|
2392
|
-
coreRecord[key] = options[key];
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2410
|
+
if (!left || !right || typeof left !== "object" || typeof right !== "object") {
|
|
2411
|
+
return false;
|
|
2395
2412
|
}
|
|
2396
|
-
const
|
|
2397
|
-
if (
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2413
|
+
const leftPrototype = Object.getPrototypeOf(left);
|
|
2414
|
+
if (leftPrototype !== Object.getPrototypeOf(right)) {
|
|
2415
|
+
return false;
|
|
2416
|
+
}
|
|
2417
|
+
if (Array.isArray(left)) {
|
|
2418
|
+
if (!Array.isArray(right) || left.length !== right.length) {
|
|
2419
|
+
return false;
|
|
2401
2420
|
}
|
|
2421
|
+
} else if (leftPrototype !== Object.prototype && leftPrototype !== null) {
|
|
2422
|
+
return false;
|
|
2402
2423
|
}
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
if (!coreOptions) {
|
|
2407
|
-
return;
|
|
2424
|
+
let rightValues = visited.get(left);
|
|
2425
|
+
if (rightValues == null ? void 0 : rightValues.has(right)) {
|
|
2426
|
+
return true;
|
|
2408
2427
|
}
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
}
|
|
2428
|
+
if (!rightValues) {
|
|
2429
|
+
rightValues = /* @__PURE__ */ new WeakSet();
|
|
2430
|
+
visited.set(left, rightValues);
|
|
2413
2431
|
}
|
|
2432
|
+
rightValues.add(right);
|
|
2433
|
+
const leftKeys = getEnumerableKeys(left);
|
|
2434
|
+
const rightKeys = getEnumerableKeys(right);
|
|
2435
|
+
const leftOptions = left;
|
|
2436
|
+
const rightOptions = right;
|
|
2437
|
+
return leftKeys.length === rightKeys.length && leftKeys.every((key) => Object.prototype.propertyIsEnumerable.call(right, key) && compareOptionValues(leftOptions[key], rightOptions[key], visited));
|
|
2438
|
+
}
|
|
2439
|
+
function getEnumerableKeys(value) {
|
|
2440
|
+
return Reflect.ownKeys(value).filter((key) => Object.prototype.propertyIsEnumerable.call(value, key));
|
|
2414
2441
|
}
|
|
2415
2442
|
|
|
2416
2443
|
// dist/lib/loader-utils/normalize-loader.js
|
|
@@ -2472,11 +2499,10 @@ function _unregisterLoaders() {
|
|
|
2472
2499
|
// dist/lib/api/select-loader.js
|
|
2473
2500
|
var EXT_PATTERN = /\.([^.]+)$/;
|
|
2474
2501
|
async function selectLoader(data, loaders = [], options, context, operation = "parse") {
|
|
2502
|
+
var _a, _b;
|
|
2475
2503
|
if (!validHTTPResponse(data)) {
|
|
2476
2504
|
return null;
|
|
2477
2505
|
}
|
|
2478
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
2479
|
-
normalizedOptions.core ||= {};
|
|
2480
2506
|
if (loaders && !Array.isArray(loaders)) {
|
|
2481
2507
|
return normalizeLoader(loaders);
|
|
2482
2508
|
}
|
|
@@ -2484,18 +2510,18 @@ async function selectLoader(data, loaders = [], options, context, operation = "p
|
|
|
2484
2510
|
let initialBytes;
|
|
2485
2511
|
async function matchCandidates(candidates) {
|
|
2486
2512
|
normalizeLoaders(candidates);
|
|
2487
|
-
const loader2 = text !== null && selectLoaderInternal(text, candidates,
|
|
2513
|
+
const loader2 = text !== null && selectLoaderInternal(text, candidates, options, context, operation) || selectLoaderInternal(data, candidates, options, context, operation);
|
|
2488
2514
|
if (!loader2 && isBlob(data) && candidates.length) {
|
|
2489
2515
|
initialBytes ??= await data.slice(0, 10).arrayBuffer();
|
|
2490
|
-
return selectLoaderInternal(initialBytes, candidates,
|
|
2516
|
+
return selectLoaderInternal(initialBytes, candidates, options, context, operation);
|
|
2491
2517
|
}
|
|
2492
2518
|
return loader2;
|
|
2493
2519
|
}
|
|
2494
2520
|
let loader = await matchCandidates(loaders || []);
|
|
2495
|
-
if (!loader && !
|
|
2521
|
+
if (!loader && !((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.ignoreRegisteredLoaders)) {
|
|
2496
2522
|
loader = await matchCandidates(getRegisteredLoaders());
|
|
2497
2523
|
}
|
|
2498
|
-
if (!loader && !
|
|
2524
|
+
if (!loader && !((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.nothrow)) {
|
|
2499
2525
|
throw new Error(getNoValidLoaderMessage(data));
|
|
2500
2526
|
}
|
|
2501
2527
|
return loader;
|
|
@@ -2505,21 +2531,20 @@ function mayContainText(response) {
|
|
|
2505
2531
|
return Boolean(mimeType && (mimeType.startsWith("text/") || mimeType === "application/json" || mimeType.endsWith("+json")));
|
|
2506
2532
|
}
|
|
2507
2533
|
function selectLoaderSync(data, loaders = [], options, context, operation = "parse") {
|
|
2534
|
+
var _a, _b;
|
|
2508
2535
|
if (!validHTTPResponse(data)) {
|
|
2509
2536
|
return null;
|
|
2510
2537
|
}
|
|
2511
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
2512
|
-
normalizedOptions.core ||= {};
|
|
2513
2538
|
if (loaders && !Array.isArray(loaders)) {
|
|
2514
2539
|
return normalizeLoader(loaders);
|
|
2515
2540
|
}
|
|
2516
2541
|
const candidates = loaders || [];
|
|
2517
2542
|
normalizeLoaders(candidates);
|
|
2518
|
-
let loader = selectLoaderInternal(data, candidates,
|
|
2519
|
-
if (!loader && !
|
|
2520
|
-
loader = selectLoaderInternal(data, getRegisteredLoaders(),
|
|
2543
|
+
let loader = selectLoaderInternal(data, candidates, options, context, operation);
|
|
2544
|
+
if (!loader && !((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.ignoreRegisteredLoaders)) {
|
|
2545
|
+
loader = selectLoaderInternal(data, getRegisteredLoaders(), options, context, operation);
|
|
2521
2546
|
}
|
|
2522
|
-
if (!loader && !
|
|
2547
|
+
if (!loader && !((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.nothrow)) {
|
|
2523
2548
|
throw new Error(getNoValidLoaderMessage(data));
|
|
2524
2549
|
}
|
|
2525
2550
|
return loader;
|
|
@@ -2544,7 +2569,7 @@ function selectLoaderInternal(data, loaders, options, context, operation = "pars
|
|
|
2544
2569
|
loader = findSourceLoaderByTestURL(loaders, testUrl);
|
|
2545
2570
|
reason = loader ? `matched source url ${testUrl}` : "";
|
|
2546
2571
|
}
|
|
2547
|
-
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !
|
|
2572
|
+
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !candidate.testURL) : loaders;
|
|
2548
2573
|
loader = loader || findLoaderByUrl(fallbackLoaders, testUrl);
|
|
2549
2574
|
reason = reason || (loader ? `matched url ${testUrl}` : "");
|
|
2550
2575
|
if (!loader && operation === "parse") {
|
|
@@ -2610,18 +2635,19 @@ function findLoaderByExtension(loaders, extension) {
|
|
|
2610
2635
|
}
|
|
2611
2636
|
function findSourceLoaderByType(loaders, type) {
|
|
2612
2637
|
for (const loader of loaders) {
|
|
2613
|
-
if (
|
|
2638
|
+
if ((loader.type ?? loader.id) === type) {
|
|
2614
2639
|
return loader;
|
|
2615
2640
|
}
|
|
2616
2641
|
}
|
|
2617
2642
|
return null;
|
|
2618
2643
|
}
|
|
2619
2644
|
function findSourceLoaderByTestURL(loaders, url) {
|
|
2645
|
+
var _a;
|
|
2620
2646
|
if (!url) {
|
|
2621
2647
|
return null;
|
|
2622
2648
|
}
|
|
2623
2649
|
for (const loader of loaders) {
|
|
2624
|
-
if (
|
|
2650
|
+
if ((_a = loader.testURL) == null ? void 0 : _a.call(loader, url)) {
|
|
2625
2651
|
return loader;
|
|
2626
2652
|
}
|
|
2627
2653
|
}
|
|
@@ -2630,7 +2656,7 @@ function findSourceLoaderByTestURL(loaders, url) {
|
|
|
2630
2656
|
function findSourceLoaderByTestData(loaders, data) {
|
|
2631
2657
|
var _a;
|
|
2632
2658
|
for (const loader of loaders) {
|
|
2633
|
-
if (
|
|
2659
|
+
if (loader.testData) {
|
|
2634
2660
|
if ((_a = loader.testData) == null ? void 0 : _a.call(loader, data)) {
|
|
2635
2661
|
return loader;
|
|
2636
2662
|
}
|
|
@@ -2964,7 +2990,7 @@ function getFetchFunction(options, context) {
|
|
|
2964
2990
|
var _a, _b, _c;
|
|
2965
2991
|
const globalOptions = getGlobalLoaderOptions();
|
|
2966
2992
|
const loaderOptions = options || globalOptions;
|
|
2967
|
-
const fetchOption =
|
|
2993
|
+
const fetchOption = (_a = loaderOptions.core) == null ? void 0 : _a.fetch;
|
|
2968
2994
|
let fetchFunction;
|
|
2969
2995
|
if (typeof fetchOption === "function") {
|
|
2970
2996
|
fetchFunction = fetchOption;
|
|
@@ -3056,7 +3082,7 @@ async function resolveLoaderImplementation(loader, options, url) {
|
|
|
3056
3082
|
}
|
|
3057
3083
|
function getLoaderImplementationSpecifier(loader, options) {
|
|
3058
3084
|
var _a;
|
|
3059
|
-
const workerType = (
|
|
3085
|
+
const workerType = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a._workerType;
|
|
3060
3086
|
if (workerType === "test") {
|
|
3061
3087
|
const sourcePath = `modules/${loader.module}/src/${loader.id}-loader.ts`;
|
|
3062
3088
|
if (typeof window !== "undefined") {
|
|
@@ -3196,15 +3222,13 @@ async function parseFile(file, loaders, options, context) {
|
|
|
3196
3222
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
3197
3223
|
const authenticationLoader = !loader.getAuthentications && ((_c = (_b = normalizedOptions.core) == null ? void 0 : _b.credentials) == null ? void 0 : _c.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3198
3224
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url, normalizedOptions);
|
|
3199
|
-
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
3200
3225
|
context = getLoaderContext(
|
|
3201
3226
|
// @ts-expect-error candidateLoaders may be a single forced loader
|
|
3202
3227
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
3203
|
-
|
|
3228
|
+
strictOptions,
|
|
3204
3229
|
context || null
|
|
3205
3230
|
);
|
|
3206
|
-
|
|
3207
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
3231
|
+
return parseFileWithLoader(loader, file, strictOptions, context);
|
|
3208
3232
|
}
|
|
3209
3233
|
async function parseFileWithLoader(loader, file, options, context) {
|
|
3210
3234
|
var _a, _b;
|
|
@@ -3251,11 +3275,9 @@ function parseSync(data, loaders, options, context) {
|
|
|
3251
3275
|
const parse2 = () => {
|
|
3252
3276
|
throw new Error("parseSync called parse (which is async");
|
|
3253
3277
|
};
|
|
3254
|
-
|
|
3255
|
-
context = getLoaderContext({ url, _parseSync: parse2, _parse: parse2, loaders }, nativeArrowOptions || strictOptions, context || null);
|
|
3278
|
+
context = getLoaderContext({ url, _parseSync: parse2, _parse: parse2, loaders }, strictOptions, context || null);
|
|
3256
3279
|
const loaderWithParser = getLoaderImplementationSync(loader);
|
|
3257
|
-
|
|
3258
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
3280
|
+
return parseWithLoaderSync(loaderWithParser || loader, data, strictOptions, context);
|
|
3259
3281
|
}
|
|
3260
3282
|
function parseWithLoaderSync(loader, data, options, context) {
|
|
3261
3283
|
data = getArrayBufferOrStringFromDataSync(data, loader, options);
|
|
@@ -3295,17 +3317,28 @@ async function parseInBatches(data, loaders, options, context) {
|
|
|
3295
3317
|
const normalizedOptions = normalizeOptions(options, loader, loaderArray, url);
|
|
3296
3318
|
const authenticationLoader = !loader.getAuthentications && ((_d = (_c = normalizedOptions.core) == null ? void 0 : _c.credentials) == null ? void 0 : _d.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3297
3319
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url || "", normalizedOptions);
|
|
3298
|
-
const
|
|
3299
|
-
context = getLoaderContext({ url, _parseInBatches: parseInBatches, _parse: parse, loaders: loaderArray },
|
|
3320
|
+
const nativeArrow = usesNativeArrowBatches(loader, strictOptions);
|
|
3321
|
+
context = getLoaderContext({ url, _parseInBatches: parseInBatches, _parse: parse, loaders: loaderArray }, strictOptions, context || null);
|
|
3300
3322
|
const loaderWithParser = await getLoaderImplementation(loader, strictOptions, context.url);
|
|
3301
|
-
const batches = await parseWithLoaderInBatches(loader, loaderWithParser, data,
|
|
3302
|
-
return
|
|
3323
|
+
const batches = await parseWithLoaderInBatches(loader, loaderWithParser, data, strictOptions, context);
|
|
3324
|
+
return nativeArrow ? normalizeNativeArrowBatches(batches) : batches;
|
|
3303
3325
|
}
|
|
3304
3326
|
async function parseWithLoaderInBatches(originalLoader, loader, data, options, context) {
|
|
3305
3327
|
var _a, _b;
|
|
3306
|
-
const
|
|
3307
|
-
|
|
3308
|
-
|
|
3328
|
+
const { batchMaxRowsPerSecond = 0, batchSize } = options.core ?? {};
|
|
3329
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
3330
|
+
if (batchSize !== void 0 && batchSize !== "auto" && (!Number.isSafeInteger(batchSize) || batchSize < 1)) {
|
|
3331
|
+
throw new RangeError('core.batchSize must be a positive integer or "auto"');
|
|
3332
|
+
}
|
|
3333
|
+
const parserOptions = batchMaxRowsPerSecond ? { ...options, core: { ...options.core, batchMaxRowsPerSecond: 0 } } : options;
|
|
3334
|
+
const output = loader.parseInBatches ? (_a = loader.prepareParseBatchOutput) == null ? void 0 : _a.call(loader, parserOptions) : null;
|
|
3335
|
+
const decoded = await parseToOutputIterator(loader, data, (output == null ? void 0 : output.options) ?? parserOptions, context);
|
|
3336
|
+
const batches = output ? convertOutputBatches(decoded, output.convert) : decoded;
|
|
3337
|
+
const outputIterator = batchMaxRowsPerSecond ? paceBatchIterator(batches, {
|
|
3338
|
+
batchMaxRowsPerSecond,
|
|
3339
|
+
getRowCount: (batch) => getBatchRowCount(batch, loader.module),
|
|
3340
|
+
signal: options.signal ?? context.signal
|
|
3341
|
+
}) : batches;
|
|
3309
3342
|
if (!((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.metadata)) {
|
|
3310
3343
|
return outputIterator;
|
|
3311
3344
|
}
|
|
@@ -3352,6 +3385,10 @@ async function* parseChunkInBatches(transformedIterator, loader, options, contex
|
|
|
3352
3385
|
{ ...options, core: { ...options == null ? void 0 : options.core, mimeType: loader.mimeTypes[0] } },
|
|
3353
3386
|
context
|
|
3354
3387
|
);
|
|
3388
|
+
if (isArrowTable(parsedData)) {
|
|
3389
|
+
yield* parsedData.batches;
|
|
3390
|
+
return;
|
|
3391
|
+
}
|
|
3355
3392
|
const batch = convertDataToBatch(parsedData, loader);
|
|
3356
3393
|
yield batch;
|
|
3357
3394
|
}
|
|
@@ -3378,8 +3415,6 @@ function isTable(value) {
|
|
|
3378
3415
|
return Array.isArray(table.features);
|
|
3379
3416
|
case "columnar-table":
|
|
3380
3417
|
return Boolean(table.data && typeof table.data === "object");
|
|
3381
|
-
case "arrow-table":
|
|
3382
|
-
return Boolean(table.data && typeof table.data === "object" && "numRows" in table.data);
|
|
3383
3418
|
default:
|
|
3384
3419
|
return false;
|
|
3385
3420
|
}
|
|
@@ -3391,8 +3426,6 @@ function getTableLength(table) {
|
|
|
3391
3426
|
return table.data.length;
|
|
3392
3427
|
case "geojson-table":
|
|
3393
3428
|
return table.features.length;
|
|
3394
|
-
case "arrow-table":
|
|
3395
|
-
return table.data.numRows;
|
|
3396
3429
|
case "columnar-table":
|
|
3397
3430
|
for (const column of Object.values(table.data)) {
|
|
3398
3431
|
return column.length || 0;
|
|
@@ -3407,10 +3440,26 @@ async function applyInputTransforms(inputIterator, transforms = []) {
|
|
|
3407
3440
|
}
|
|
3408
3441
|
return iteratorChain;
|
|
3409
3442
|
}
|
|
3443
|
+
function getBatchRowCount(batch, module2) {
|
|
3444
|
+
var _a, _b, _c;
|
|
3445
|
+
if (!batch || typeof batch !== "object")
|
|
3446
|
+
return void 0;
|
|
3447
|
+
if (module2 === "geospatial" && Array.isArray(batch))
|
|
3448
|
+
return batch.length;
|
|
3449
|
+
const result = batch;
|
|
3450
|
+
if (module2 === "traces" && result.table !== void 0 && result.table !== "spans" && result.table !== "slices") {
|
|
3451
|
+
return void 0;
|
|
3452
|
+
}
|
|
3453
|
+
if (result.batchType !== void 0 && result.batchType !== "data")
|
|
3454
|
+
return void 0;
|
|
3455
|
+
if (result.shape === "unknown")
|
|
3456
|
+
return void 0;
|
|
3457
|
+
return ((_a = result.data) == null ? void 0 : _a.numRows) ?? result.numRows ?? ((_b = result.header) == null ? void 0 : _b.vertexCount) ?? ((_c = result.features) == null ? void 0 : _c.length) ?? result.length;
|
|
3458
|
+
}
|
|
3410
3459
|
|
|
3411
3460
|
// dist/lib/api/load.js
|
|
3412
3461
|
async function load(url, loaders, options, context) {
|
|
3413
|
-
var _a;
|
|
3462
|
+
var _a, _b;
|
|
3414
3463
|
let resolvedLoaders;
|
|
3415
3464
|
let resolvedOptions;
|
|
3416
3465
|
if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
@@ -3422,23 +3471,46 @@ async function load(url, loaders, options, context) {
|
|
|
3422
3471
|
resolvedOptions = options;
|
|
3423
3472
|
}
|
|
3424
3473
|
resolvedOptions ||= getGlobalLoaderOptions();
|
|
3474
|
+
let fetchedResponse;
|
|
3425
3475
|
if (typeof url === "string" || isBlob(url)) {
|
|
3426
3476
|
const selectedLoader = await selectLoader(url, resolvedLoaders, {
|
|
3427
3477
|
...resolvedOptions,
|
|
3428
3478
|
core: { ...resolvedOptions == null ? void 0 : resolvedOptions.core, nothrow: true }
|
|
3429
3479
|
});
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3480
|
+
const canFetchBeforePreload = typeof url === "string" && (selectedLoader == null ? void 0 : selectedLoader.fetchBeforePreload);
|
|
3481
|
+
const loaderImplementation = selectedLoader && (typeof url === "string" || selectedLoader.createDataSourceSync) ? getLoaderImplementation(selectedLoader, resolvedOptions, typeof url === "string" ? url : void 0) : null;
|
|
3482
|
+
if (canFetchBeforePreload) {
|
|
3483
|
+
const loadOptions = resolvedOptions;
|
|
3484
|
+
const controller = new AbortController();
|
|
3485
|
+
const fetchOption = (_a = loadOptions.core) == null ? void 0 : _a.fetch;
|
|
3486
|
+
const callerSignal = loadOptions.signal || (context == null ? void 0 : context.signal) || (typeof fetchOption === "object" ? fetchOption == null ? void 0 : fetchOption.signal : void 0);
|
|
3487
|
+
const signal = callerSignal ? AbortSignal.any([callerSignal, controller.signal]) : controller.signal;
|
|
3488
|
+
try {
|
|
3489
|
+
[, fetchedResponse] = await Promise.all([
|
|
3490
|
+
loaderImplementation,
|
|
3491
|
+
resolveLoaderAuthenticationOptions(selectedLoader, url, loadOptions).then((options2) => {
|
|
3492
|
+
signal.throwIfAborted();
|
|
3493
|
+
resolvedOptions = resolveAuthenticationOptions(options2);
|
|
3494
|
+
const fetch3 = getFetchFunction({ ...resolvedOptions, signal }, context);
|
|
3495
|
+
return fetch3(applySearchParamsToUrl(url, resolvedOptions));
|
|
3496
|
+
})
|
|
3497
|
+
]);
|
|
3498
|
+
} catch (error) {
|
|
3499
|
+
controller.abort(error);
|
|
3500
|
+
throw error;
|
|
3434
3501
|
}
|
|
3435
|
-
|
|
3436
|
-
|
|
3502
|
+
}
|
|
3503
|
+
const implementation = await loaderImplementation;
|
|
3504
|
+
if (selectedLoader && (implementation == null ? void 0 : implementation.createDataSourceSync) && !isLoaderWithParser(implementation)) {
|
|
3505
|
+
throw new Error(`${selectedLoader.id} creates sources. Use createDataSource() instead of load().`);
|
|
3506
|
+
}
|
|
3507
|
+
if (!fetchedResponse && selectedLoader && implementation && typeof url === "string") {
|
|
3508
|
+
resolvedOptions = await resolveLoaderAuthenticationOptions(selectedLoader.getAuthentications ? selectedLoader : implementation, url, resolvedOptions || {});
|
|
3509
|
+
const { parseUrl } = implementation;
|
|
3437
3510
|
if (parseUrl) {
|
|
3438
3511
|
const requestUrl = applySearchParamsToUrl(url, resolvedOptions);
|
|
3439
|
-
const
|
|
3440
|
-
|
|
3441
|
-
return nativeOptions ? unwrapArrowTable(result) : result;
|
|
3512
|
+
const options2 = normalizeOptions(resolvedOptions, selectedLoader, [selectedLoader], url);
|
|
3513
|
+
return parseUrl(requestUrl, options2, context);
|
|
3442
3514
|
}
|
|
3443
3515
|
}
|
|
3444
3516
|
}
|
|
@@ -3447,14 +3519,13 @@ async function load(url, loaders, options, context) {
|
|
|
3447
3519
|
const fetch2 = getFetchFunction(resolvedOptions);
|
|
3448
3520
|
let data = url;
|
|
3449
3521
|
if (typeof url === "string") {
|
|
3450
|
-
data = await fetch2(applySearchParamsToUrl(url, resolvedOptions));
|
|
3522
|
+
data = fetchedResponse ?? await fetch2(applySearchParamsToUrl(url, resolvedOptions));
|
|
3451
3523
|
}
|
|
3452
3524
|
if (isBlob(url)) {
|
|
3453
3525
|
data = await fetch2(url);
|
|
3454
3526
|
}
|
|
3455
3527
|
if (typeof url === "string") {
|
|
3456
|
-
|
|
3457
|
-
if (!((_a = normalizedOptions.core) == null ? void 0 : _a.baseUrl)) {
|
|
3528
|
+
if (!((_b = resolvedOptions == null ? void 0 : resolvedOptions.core) == null ? void 0 : _b.baseUrl)) {
|
|
3458
3529
|
resolvedOptions = {
|
|
3459
3530
|
...resolvedOptions,
|
|
3460
3531
|
core: {
|
|
@@ -3579,15 +3650,13 @@ async function parse(data, loaders, options, context) {
|
|
|
3579
3650
|
const normalizedOptions = normalizeOptions(options, loader, candidateLoaders, url);
|
|
3580
3651
|
const authenticationLoader = !loader.getAuthentications && ((_d = (_c = normalizedOptions.core) == null ? void 0 : _c.credentials) == null ? void 0 : _d.length) ? await getLoaderImplementation(loader, normalizedOptions, url || (context == null ? void 0 : context.url)) : loader;
|
|
3581
3652
|
const strictOptions = await resolveLoaderAuthenticationOptions(authenticationLoader, url || "", normalizedOptions);
|
|
3582
|
-
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
3583
3653
|
context = getLoaderContext(
|
|
3584
3654
|
// @ts-expect-error
|
|
3585
3655
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
3586
|
-
|
|
3656
|
+
strictOptions,
|
|
3587
3657
|
context || null
|
|
3588
3658
|
);
|
|
3589
|
-
|
|
3590
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
3659
|
+
return parseWithLoader(loader, data, strictOptions, context);
|
|
3591
3660
|
}
|
|
3592
3661
|
async function parseWithLoader(loader, data, options, context) {
|
|
3593
3662
|
var _a, _b;
|
|
@@ -3607,8 +3676,8 @@ async function parseWithLoader(loader, data, options, context) {
|
|
|
3607
3676
|
const parseOptions = (output == null ? void 0 : output.options) ?? options;
|
|
3608
3677
|
let result;
|
|
3609
3678
|
if (shouldParseWithWorker(loaderWithParser, data, parseOptions, context, loader)) {
|
|
3610
|
-
|
|
3611
|
-
result = await parseWithWorker(loaderWithParser,
|
|
3679
|
+
const input = isResponse(data) && data.ok ? getArrayBufferFromData(data, parseOptions) : await getArrayBufferFromData(data, parseOptions);
|
|
3680
|
+
result = await parseWithWorker(loaderWithParser, input, parseOptions, context, parse);
|
|
3612
3681
|
} else if (isBlob(data) && loaderWithParser.parseBlob) {
|
|
3613
3682
|
result = await loaderWithParser.parseBlob(data, parseOptions, context);
|
|
3614
3683
|
} else {
|
|
@@ -3819,7 +3888,7 @@ function getCandidates(loaders, options) {
|
|
|
3819
3888
|
var _a;
|
|
3820
3889
|
const candidates = Array.isArray(loaders) ? [...loaders] : [loaders];
|
|
3821
3890
|
const type = ((_a = options.core) == null ? void 0 : _a.type) || options.type;
|
|
3822
|
-
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) =>
|
|
3891
|
+
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) => (loader.type ?? loader.id) === type) : candidates;
|
|
3823
3892
|
}
|
|
3824
3893
|
function getSelectionOptions(options) {
|
|
3825
3894
|
return { ...options, core: { ...options.core, ignoreRegisteredLoaders: true, nothrow: true } };
|
|
@@ -3894,22 +3963,7 @@ function makeStream(source, options) {
|
|
|
3894
3963
|
}
|
|
3895
3964
|
|
|
3896
3965
|
// dist/null-loader.js
|
|
3897
|
-
var VERSION5 = true ? "5.0.0-
|
|
3898
|
-
var NullWorkerLoader = {
|
|
3899
|
-
dataType: null,
|
|
3900
|
-
batchType: null,
|
|
3901
|
-
name: "Null loader",
|
|
3902
|
-
id: "null",
|
|
3903
|
-
module: "core",
|
|
3904
|
-
version: VERSION5,
|
|
3905
|
-
worker: true,
|
|
3906
|
-
mimeTypes: ["application/x.empty"],
|
|
3907
|
-
extensions: ["null"],
|
|
3908
|
-
tests: [() => false],
|
|
3909
|
-
options: {
|
|
3910
|
-
null: {}
|
|
3911
|
-
}
|
|
3912
|
-
};
|
|
3966
|
+
var VERSION5 = true ? "5.0.0-rc.2" : "latest";
|
|
3913
3967
|
var NullLoader = {
|
|
3914
3968
|
dataType: null,
|
|
3915
3969
|
batchType: null,
|