@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/dist.dev.js
CHANGED
|
@@ -30,13 +30,13 @@ var __exports__ = (() => {
|
|
|
30
30
|
FetchError: () => FetchError,
|
|
31
31
|
JSONLoader: () => JSONLoader,
|
|
32
32
|
NullLoader: () => NullLoader,
|
|
33
|
-
NullWorkerLoader: () => NullWorkerLoader,
|
|
34
33
|
RequestScheduler: () => RequestScheduler,
|
|
35
34
|
_BrowserFileSystem: () => BrowserFileSystem,
|
|
36
35
|
_fetchProgress: () => fetchProgress,
|
|
37
36
|
_selectSource: () => selectSource,
|
|
38
37
|
_unregisterLoaders: () => _unregisterLoaders,
|
|
39
38
|
assert: () => assert,
|
|
39
|
+
compareLoaderOptions: () => compareLoaderOptions,
|
|
40
40
|
concatenateArrayBuffersAsync: () => concatenateArrayBuffersAsync,
|
|
41
41
|
coreApi: () => coreApi,
|
|
42
42
|
createDataSource: () => createDataSource,
|
|
@@ -701,7 +701,7 @@ var __exports__ = (() => {
|
|
|
701
701
|
}
|
|
702
702
|
var nullLog = new NullLog();
|
|
703
703
|
function getLoaderLog(options) {
|
|
704
|
-
const logger = options?.core?.log
|
|
704
|
+
const logger = options?.core?.log;
|
|
705
705
|
return logger === null ? nullLog : logger || log2;
|
|
706
706
|
}
|
|
707
707
|
|
|
@@ -3820,18 +3820,43 @@ var __exports__ = (() => {
|
|
|
3820
3820
|
return Boolean(worker.workerInBatches && !getConfiguredWorkerURL2(worker, options));
|
|
3821
3821
|
}
|
|
3822
3822
|
async function processOnWorker2(worker, data, options = {}, context = {}, jobContext = {}) {
|
|
3823
|
-
const
|
|
3823
|
+
const controller = new AbortController();
|
|
3824
|
+
const signal = options.signal ? AbortSignal.any([options.signal, controller.signal]) : controller.signal;
|
|
3825
|
+
const sessionPromise = openSession(worker, { ...options, signal }, context, jobContext);
|
|
3826
|
+
void sessionPromise.catch(() => {
|
|
3827
|
+
});
|
|
3824
3828
|
try {
|
|
3829
|
+
const input = data instanceof Promise ? await waitForInput(data, signal) : data;
|
|
3830
|
+
const session = await sessionPromise;
|
|
3825
3831
|
const result = await session.handle.runTask(
|
|
3826
|
-
{ value:
|
|
3832
|
+
{ value: input },
|
|
3827
3833
|
{
|
|
3828
3834
|
...getControls(options),
|
|
3829
3835
|
options: getParserOptions(options)
|
|
3830
3836
|
}
|
|
3831
3837
|
);
|
|
3832
3838
|
return result.value;
|
|
3839
|
+
} catch (error) {
|
|
3840
|
+
controller.abort(error);
|
|
3841
|
+
throw error;
|
|
3833
3842
|
} finally {
|
|
3834
|
-
await
|
|
3843
|
+
const session = await sessionPromise.catch(() => void 0);
|
|
3844
|
+
await session?.close();
|
|
3845
|
+
}
|
|
3846
|
+
}
|
|
3847
|
+
async function waitForInput(input, signal) {
|
|
3848
|
+
let onAbort;
|
|
3849
|
+
try {
|
|
3850
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
3851
|
+
onAbort = () => reject(signal.reason);
|
|
3852
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
3853
|
+
if (signal.aborted) {
|
|
3854
|
+
onAbort();
|
|
3855
|
+
}
|
|
3856
|
+
});
|
|
3857
|
+
return await Promise.race([input, aborted]);
|
|
3858
|
+
} finally {
|
|
3859
|
+
signal.removeEventListener("abort", onAbort);
|
|
3835
3860
|
}
|
|
3836
3861
|
}
|
|
3837
3862
|
async function* processOnWorkerInBatches2(worker, input, options = {}, context = {}, jobContext = {}) {
|
|
@@ -3857,12 +3882,11 @@ var __exports__ = (() => {
|
|
|
3857
3882
|
"Inline legacy worker source is unsupported; use a TaskRunner worker URL or factory"
|
|
3858
3883
|
);
|
|
3859
3884
|
const create = !getCustomWorkerURL2(worker, options) && isBrowser3 ? worker.loadWorker : void 0;
|
|
3860
|
-
const url = getWorkerURL2(worker, options);
|
|
3861
3885
|
return {
|
|
3862
3886
|
id: `${worker.module}:${worker.id}`,
|
|
3863
3887
|
initialize: (state) => state,
|
|
3864
3888
|
worker: {
|
|
3865
|
-
...create ? { create: () => create() ?? createModuleWorker(
|
|
3889
|
+
...create ? { create: () => create() ?? createModuleWorker(getWorkerURL2(worker, options)) } : { url: getWorkerURL2(worker, options) },
|
|
3866
3890
|
capabilities: { atomic: true, streaming: true }
|
|
3867
3891
|
}
|
|
3868
3892
|
};
|
|
@@ -3877,8 +3901,8 @@ var __exports__ = (() => {
|
|
|
3877
3901
|
};
|
|
3878
3902
|
}
|
|
3879
3903
|
function getParserOptions(options) {
|
|
3880
|
-
const { signal, onProgress,
|
|
3881
|
-
return getTransferListForWriter2(parserOptions);
|
|
3904
|
+
const { signal, onProgress, parserOptions, ...workerOptions } = options;
|
|
3905
|
+
return getTransferListForWriter2(parserOptions ?? workerOptions);
|
|
3882
3906
|
}
|
|
3883
3907
|
async function openSession(worker, options, context, jobContext) {
|
|
3884
3908
|
options.signal?.throwIfAborted();
|
|
@@ -4031,8 +4055,7 @@ var __exports__ = (() => {
|
|
|
4031
4055
|
(credential) => credential.type === "request" || "token" in credential && typeof credential.token === "function"
|
|
4032
4056
|
))
|
|
4033
4057
|
return false;
|
|
4034
|
-
if (loader.id === "shapefile" &&
|
|
4035
|
-
return false;
|
|
4058
|
+
if (loader.id === "shapefile" && typeof options?.core?.fetch === "function") return false;
|
|
4036
4059
|
const workerOptions = getWorkerOptions(options);
|
|
4037
4060
|
const nodeWorkers = workerOptions._nodeWorkers;
|
|
4038
4061
|
if (!isBrowser3 && !nodeWorkers) {
|
|
@@ -4187,7 +4210,6 @@ var __exports__ = (() => {
|
|
|
4187
4210
|
...portableOptions,
|
|
4188
4211
|
signal: void 0,
|
|
4189
4212
|
onProgress: void 0,
|
|
4190
|
-
log: isDisabledLog(portableOptions.log) ? null : void 0,
|
|
4191
4213
|
...portableOptions.core ? {
|
|
4192
4214
|
core: {
|
|
4193
4215
|
...portableOptions.core,
|
|
@@ -4205,17 +4227,17 @@ var __exports__ = (() => {
|
|
|
4205
4227
|
})
|
|
4206
4228
|
);
|
|
4207
4229
|
restoreBigIntOptions(optionsToSerialize, serializedOptions);
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
...serializedOptions
|
|
4211
|
-
};
|
|
4212
|
-
if (workerOptions.worker === "auto") {
|
|
4213
|
-
workerOptions.worker = true;
|
|
4230
|
+
if (serializedOptions.core?.worker === "auto") {
|
|
4231
|
+
serializedOptions.core.worker = true;
|
|
4214
4232
|
}
|
|
4215
4233
|
if (loader) {
|
|
4216
|
-
|
|
4234
|
+
serializedOptions._workerLoaderId = loader.id;
|
|
4217
4235
|
}
|
|
4218
|
-
return
|
|
4236
|
+
return {
|
|
4237
|
+
...serializedOptions,
|
|
4238
|
+
...serializedOptions.core,
|
|
4239
|
+
parserOptions: serializedOptions
|
|
4240
|
+
};
|
|
4219
4241
|
}
|
|
4220
4242
|
function restoreBigIntOptions(original, serialized) {
|
|
4221
4243
|
if (!serialized || typeof serialized !== "object") return;
|
|
@@ -4244,7 +4266,7 @@ var __exports__ = (() => {
|
|
|
4244
4266
|
}
|
|
4245
4267
|
function shouldParseCSVWithWorker(options) {
|
|
4246
4268
|
const csvOptions = options;
|
|
4247
|
-
return (csvOptions?.csv?.shape ?? csvOptions?.core?.shape) === "arrow
|
|
4269
|
+
return (csvOptions?.csv?.shape ?? csvOptions?.core?.shape) === "arrow";
|
|
4248
4270
|
}
|
|
4249
4271
|
function isLoaderWithWorkerResultDeserializer(loader) {
|
|
4250
4272
|
return typeof loader.deserializeWorkerResult === "function";
|
|
@@ -5351,11 +5373,50 @@ var __exports__ = (() => {
|
|
|
5351
5373
|
}
|
|
5352
5374
|
};
|
|
5353
5375
|
|
|
5354
|
-
// src/loader-utils/
|
|
5355
|
-
function
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5376
|
+
// src/loader-utils/lib/pace-batch-iterator.ts
|
|
5377
|
+
function validateBatchDeliveryRate(rate) {
|
|
5378
|
+
if (!Number.isFinite(rate) || rate < 0) {
|
|
5379
|
+
throw new RangeError("core.batchMaxRowsPerSecond must be a finite nonnegative number");
|
|
5380
|
+
}
|
|
5381
|
+
}
|
|
5382
|
+
async function* paceBatchIterator(batches, { batchMaxRowsPerSecond = 0, getRowCount, signal }) {
|
|
5383
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
5384
|
+
signal?.throwIfAborted();
|
|
5385
|
+
if (batchMaxRowsPerSecond === 0) {
|
|
5386
|
+
yield* batches;
|
|
5387
|
+
return;
|
|
5388
|
+
}
|
|
5389
|
+
let deadline = 0;
|
|
5390
|
+
for await (const batch of batches) {
|
|
5391
|
+
signal?.throwIfAborted();
|
|
5392
|
+
const rowCount = getRowCount(batch);
|
|
5393
|
+
if (rowCount !== void 0 && rowCount > 0) {
|
|
5394
|
+
let remaining = deadline - performance.now();
|
|
5395
|
+
while (remaining > 0) {
|
|
5396
|
+
await waitForBatch(Math.min(Math.ceil(remaining), 2 ** 31 - 1), signal);
|
|
5397
|
+
remaining = deadline - performance.now();
|
|
5398
|
+
}
|
|
5399
|
+
signal?.throwIfAborted();
|
|
5400
|
+
deadline = performance.now() + rowCount / batchMaxRowsPerSecond * 1e3;
|
|
5401
|
+
}
|
|
5402
|
+
yield batch;
|
|
5403
|
+
signal?.throwIfAborted();
|
|
5404
|
+
}
|
|
5405
|
+
}
|
|
5406
|
+
function waitForBatch(delay, signal) {
|
|
5407
|
+
signal?.throwIfAborted();
|
|
5408
|
+
return new Promise((resolve2, reject) => {
|
|
5409
|
+
const timer = setTimeout(() => {
|
|
5410
|
+
signal?.removeEventListener("abort", abort);
|
|
5411
|
+
resolve2();
|
|
5412
|
+
}, delay);
|
|
5413
|
+
function abort() {
|
|
5414
|
+
clearTimeout(timer);
|
|
5415
|
+
signal?.removeEventListener("abort", abort);
|
|
5416
|
+
reject(signal?.reason);
|
|
5417
|
+
}
|
|
5418
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
5419
|
+
});
|
|
5359
5420
|
}
|
|
5360
5421
|
|
|
5361
5422
|
// src/lib/fetch/fetch-error.ts
|
|
@@ -5604,18 +5665,17 @@ var __exports__ = (() => {
|
|
|
5604
5665
|
// By default do not support node workers
|
|
5605
5666
|
_workerType: "",
|
|
5606
5667
|
// 'test' to use locally generated workers
|
|
5607
|
-
limit: 0,
|
|
5608
|
-
_limitMB: 0,
|
|
5609
5668
|
batchSize: "auto",
|
|
5610
|
-
|
|
5669
|
+
batchMaxRowsPerSecond: 0,
|
|
5611
5670
|
metadata: false,
|
|
5612
5671
|
// TODO - currently only implemented for parseInBatches, adds initial metadata batch,
|
|
5613
5672
|
transforms: []
|
|
5614
5673
|
}
|
|
5615
5674
|
};
|
|
5616
5675
|
var REMOVED_LOADER_OPTIONS = {
|
|
5617
|
-
//
|
|
5676
|
+
// Removed top-level aliases
|
|
5618
5677
|
baseUri: "core.baseUrl",
|
|
5678
|
+
baseUrl: "core.baseUrl",
|
|
5619
5679
|
fetch: "core.fetch",
|
|
5620
5680
|
mimeType: "core.mimeType",
|
|
5621
5681
|
fallbackMimeType: "core.fallbackMimeType",
|
|
@@ -5625,17 +5685,17 @@ var __exports__ = (() => {
|
|
|
5625
5685
|
useLocalLibraries: "core.useLocalLibraries",
|
|
5626
5686
|
CDN: "core.CDN",
|
|
5627
5687
|
worker: "core.worker",
|
|
5688
|
+
workerThreshold: "core.workerThreshold",
|
|
5689
|
+
workerTransferBufferCopy: "core.workerTransferBufferCopy",
|
|
5628
5690
|
maxConcurrency: "core.maxConcurrency",
|
|
5629
5691
|
maxMobileConcurrency: "core.maxMobileConcurrency",
|
|
5630
5692
|
reuseWorkers: "core.reuseWorkers",
|
|
5631
|
-
_nodeWorkers: "core.
|
|
5693
|
+
_nodeWorkers: "core._nodeWorkers",
|
|
5632
5694
|
_workerType: "core._workerType",
|
|
5633
5695
|
_worker: "core._workerType",
|
|
5634
|
-
limit: "core.limit",
|
|
5635
|
-
_limitMB: "core._limitMB",
|
|
5636
5696
|
shape: "core.shape",
|
|
5637
5697
|
batchSize: "core.batchSize",
|
|
5638
|
-
batchDebounceMs: "core.
|
|
5698
|
+
batchDebounceMs: "(removed; use core.batchMaxRowsPerSecond)",
|
|
5639
5699
|
metadata: "core.metadata",
|
|
5640
5700
|
transforms: "core.transforms",
|
|
5641
5701
|
// Older deprecations
|
|
@@ -5665,67 +5725,46 @@ var __exports__ = (() => {
|
|
|
5665
5725
|
});
|
|
5666
5726
|
return keys.includes(loader.id) ? loader.id : keys.length === 1 ? keys[0] : void 0;
|
|
5667
5727
|
}
|
|
5668
|
-
function
|
|
5728
|
+
function usesNativeArrowBatches(loader, options) {
|
|
5669
5729
|
const key = getShapeOptionKey(loader);
|
|
5670
5730
|
const scopedOptions = key && options[key];
|
|
5671
5731
|
if (!scopedOptions || typeof scopedOptions !== "object" || !("shape" in scopedOptions) || scopedOptions.shape !== "arrow") {
|
|
5672
|
-
return
|
|
5732
|
+
return false;
|
|
5673
5733
|
}
|
|
5674
|
-
if (
|
|
5734
|
+
if (options.core?.metadata) {
|
|
5675
5735
|
throw new Error(
|
|
5676
|
-
'shape: "arrow" does not support core.metadata
|
|
5736
|
+
'shape: "arrow" carries metadata in the Arrow schema and does not support core.metadata envelopes'
|
|
5677
5737
|
);
|
|
5678
5738
|
}
|
|
5679
|
-
return
|
|
5680
|
-
...options,
|
|
5681
|
-
core: { ...options.core, ...options.core?.shape === "arrow" ? { shape: "arrow-table" } : {} },
|
|
5682
|
-
[key]: { ...scopedOptions, shape: "arrow-table" }
|
|
5683
|
-
};
|
|
5684
|
-
}
|
|
5685
|
-
function unwrapArrowTable(result) {
|
|
5686
|
-
const table = result;
|
|
5687
|
-
if (table?.shape !== "arrow-table" || !table.data || !Array.isArray(table.data.batches)) {
|
|
5688
|
-
throw new Error('shape: "arrow" requires a loader that supports "arrow-table" output');
|
|
5689
|
-
}
|
|
5690
|
-
return table.data;
|
|
5739
|
+
return true;
|
|
5691
5740
|
}
|
|
5692
|
-
async function*
|
|
5741
|
+
async function* normalizeNativeArrowBatches(batches) {
|
|
5693
5742
|
for await (const batch of batches) {
|
|
5694
5743
|
const batchType = batch?.batchType;
|
|
5695
5744
|
if (batchType === "metadata" || batchType === "partial-result" || batchType === "final-result") {
|
|
5696
5745
|
continue;
|
|
5697
5746
|
}
|
|
5698
|
-
|
|
5747
|
+
if (isArrowRecordBatch(batch)) {
|
|
5748
|
+
yield batch;
|
|
5749
|
+
} else if (isArrowTable(batch)) {
|
|
5750
|
+
yield* batch.batches;
|
|
5751
|
+
} else {
|
|
5752
|
+
throw new Error('shape: "arrow" requires a native Arrow table or record batch');
|
|
5753
|
+
}
|
|
5699
5754
|
}
|
|
5700
5755
|
}
|
|
5756
|
+
function isArrowTable(value) {
|
|
5757
|
+
return Boolean(
|
|
5758
|
+
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"
|
|
5759
|
+
);
|
|
5760
|
+
}
|
|
5761
|
+
function isArrowRecordBatch(value) {
|
|
5762
|
+
return Boolean(
|
|
5763
|
+
value && typeof value === "object" && value[/* @__PURE__ */ Symbol.for("apache-arrow/RecordBatch")] === true
|
|
5764
|
+
);
|
|
5765
|
+
}
|
|
5701
5766
|
|
|
5702
5767
|
// src/lib/loader-utils/option-utils.ts
|
|
5703
|
-
var CORE_LOADER_OPTION_KEYS = [
|
|
5704
|
-
"baseUrl",
|
|
5705
|
-
"fetch",
|
|
5706
|
-
"mimeType",
|
|
5707
|
-
"fallbackMimeType",
|
|
5708
|
-
"ignoreRegisteredLoaders",
|
|
5709
|
-
"nothrow",
|
|
5710
|
-
"log",
|
|
5711
|
-
"useLocalLibraries",
|
|
5712
|
-
"CDN",
|
|
5713
|
-
"worker",
|
|
5714
|
-
"workerThreshold",
|
|
5715
|
-
"maxConcurrency",
|
|
5716
|
-
"maxMobileConcurrency",
|
|
5717
|
-
"reuseWorkers",
|
|
5718
|
-
"workerTransferBufferCopy",
|
|
5719
|
-
"_nodeWorkers",
|
|
5720
|
-
"_workerType",
|
|
5721
|
-
"limit",
|
|
5722
|
-
"_limitMB",
|
|
5723
|
-
"shape",
|
|
5724
|
-
"batchSize",
|
|
5725
|
-
"batchDebounceMs",
|
|
5726
|
-
"metadata",
|
|
5727
|
-
"transforms"
|
|
5728
|
-
];
|
|
5729
5768
|
function applySearchParamsToUrl(url, options) {
|
|
5730
5769
|
const searchParams = options?.searchParams;
|
|
5731
5770
|
if (!searchParams || Object.keys(searchParams).length === 0 || /^(?:data|blob):/i.test(url)) {
|
|
@@ -5761,12 +5800,15 @@ var __exports__ = (() => {
|
|
|
5761
5800
|
...DEFAULT_LOADER_OPTIONS,
|
|
5762
5801
|
core: { ...DEFAULT_LOADER_OPTIONS.core }
|
|
5763
5802
|
};
|
|
5764
|
-
return
|
|
5803
|
+
return cloneLoaderOptions(state.globalOptions);
|
|
5765
5804
|
}
|
|
5766
5805
|
function setGlobalOptions(options) {
|
|
5767
5806
|
const state = getGlobalLoaderState();
|
|
5768
5807
|
const globalOptions = getGlobalLoaderOptions();
|
|
5769
|
-
|
|
5808
|
+
validateOptions(options, []);
|
|
5809
|
+
validateWorkerThreshold(options);
|
|
5810
|
+
mergeNestedFields(globalOptions, options);
|
|
5811
|
+
state.globalOptions = globalOptions;
|
|
5770
5812
|
registerJSModules(options.modules);
|
|
5771
5813
|
}
|
|
5772
5814
|
function normalizeOptions(options, loader, loaders, url) {
|
|
@@ -5774,23 +5816,10 @@ var __exports__ = (() => {
|
|
|
5774
5816
|
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
5775
5817
|
validateOptions(options, loaders);
|
|
5776
5818
|
validateWorkerThreshold(options);
|
|
5777
|
-
const normalizedOptions =
|
|
5819
|
+
const normalizedOptions = normalizeOptionsInternal(loader, options, url);
|
|
5778
5820
|
validateWorkerThreshold(normalizedOptions);
|
|
5779
5821
|
return normalizedOptions;
|
|
5780
5822
|
}
|
|
5781
|
-
function normalizeLoaderOptions(options) {
|
|
5782
|
-
const normalized = cloneLoaderOptions(options);
|
|
5783
|
-
moveDeprecatedTopLevelOptionsToCore(normalized);
|
|
5784
|
-
for (const key of CORE_LOADER_OPTION_KEYS) {
|
|
5785
|
-
if (normalized.core && normalized.core[key] !== void 0) {
|
|
5786
|
-
delete normalized[key];
|
|
5787
|
-
}
|
|
5788
|
-
}
|
|
5789
|
-
if (normalized.core && normalized.core._workerType !== void 0) {
|
|
5790
|
-
delete normalized._worker;
|
|
5791
|
-
}
|
|
5792
|
-
return normalized;
|
|
5793
|
-
}
|
|
5794
5823
|
function validateOptions(options, loaders) {
|
|
5795
5824
|
validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);
|
|
5796
5825
|
for (const loader of loaders) {
|
|
@@ -5811,9 +5840,9 @@ var __exports__ = (() => {
|
|
|
5811
5840
|
const prefix = id ? `${id}.` : "";
|
|
5812
5841
|
for (const key in options) {
|
|
5813
5842
|
const isSubOptions = !id && isObject(options[key]);
|
|
5814
|
-
const
|
|
5843
|
+
const isLifecycleOption = !id && ["signal", "onProgress"].includes(key);
|
|
5815
5844
|
const isWorkerUrlOption = key === "workerUrl" && id;
|
|
5816
|
-
if (!(key in defaultOptions) && !
|
|
5845
|
+
if (!(key in defaultOptions) && !isLifecycleOption && !isWorkerUrlOption) {
|
|
5817
5846
|
if (key in deprecatedOptions) {
|
|
5818
5847
|
if (log2.level > 0) {
|
|
5819
5848
|
log2.warn(
|
|
@@ -5854,7 +5883,6 @@ var __exports__ = (() => {
|
|
|
5854
5883
|
if (loaderDefaultOptions.core) {
|
|
5855
5884
|
mergedOptions.core = { ...loaderDefaultOptions.core };
|
|
5856
5885
|
}
|
|
5857
|
-
moveDeprecatedTopLevelOptionsToCore(mergedOptions);
|
|
5858
5886
|
const shapeKey = loader.defaultShape && getShapeOptionKey(loader);
|
|
5859
5887
|
if (shapeKey) {
|
|
5860
5888
|
mergedOptions[shapeKey] = {
|
|
@@ -5862,15 +5890,13 @@ var __exports__ = (() => {
|
|
|
5862
5890
|
shape: loader.defaultShape
|
|
5863
5891
|
};
|
|
5864
5892
|
}
|
|
5865
|
-
mergeNestedFields(mergedOptions,
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
applyCoreShapeDefault(mergedOptions, userOptions, loader);
|
|
5893
|
+
mergeNestedFields(mergedOptions, getGlobalLoaderOptions());
|
|
5894
|
+
mergeNestedFields(mergedOptions, options);
|
|
5895
|
+
applyCoreShapeDefault(mergedOptions, options, loader);
|
|
5869
5896
|
if (mergedOptions.core?.log === null) {
|
|
5870
5897
|
mergedOptions.core = { ...mergedOptions.core, log: getLoaderLog(mergedOptions) };
|
|
5871
5898
|
}
|
|
5872
5899
|
addUrlOptions(mergedOptions, url);
|
|
5873
|
-
addDeprecatedTopLevelOptions(mergedOptions);
|
|
5874
5900
|
return mergedOptions;
|
|
5875
5901
|
}
|
|
5876
5902
|
function applyCoreShapeDefault(mergedOptions, userOptions, loader) {
|
|
@@ -5932,41 +5958,50 @@ var __exports__ = (() => {
|
|
|
5932
5958
|
}
|
|
5933
5959
|
return clonedOptions;
|
|
5934
5960
|
}
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
if (options[key] !== void 0) {
|
|
5944
|
-
options.core ||= {};
|
|
5945
|
-
const coreOptions = options.core;
|
|
5946
|
-
const coreRecord = coreOptions;
|
|
5947
|
-
if (coreRecord[key] === void 0) {
|
|
5948
|
-
coreRecord[key] = options[key];
|
|
5949
|
-
}
|
|
5950
|
-
}
|
|
5961
|
+
|
|
5962
|
+
// src/lib/api/loader-options.ts
|
|
5963
|
+
function compareLoaderOptions(left, right) {
|
|
5964
|
+
return Object.is(left, right) || compareOptionValues(left, right, /* @__PURE__ */ new WeakMap());
|
|
5965
|
+
}
|
|
5966
|
+
function compareOptionValues(left, right, visited) {
|
|
5967
|
+
if (Object.is(left, right)) {
|
|
5968
|
+
return true;
|
|
5951
5969
|
}
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
options.core ||= {};
|
|
5955
|
-
if (options.core._workerType === void 0) {
|
|
5956
|
-
options.core._workerType = workerTypeAlias;
|
|
5957
|
-
}
|
|
5970
|
+
if (!left || !right || typeof left !== "object" || typeof right !== "object") {
|
|
5971
|
+
return false;
|
|
5958
5972
|
}
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
if (!coreOptions) {
|
|
5963
|
-
return;
|
|
5973
|
+
const leftPrototype = Object.getPrototypeOf(left);
|
|
5974
|
+
if (leftPrototype !== Object.getPrototypeOf(right)) {
|
|
5975
|
+
return false;
|
|
5964
5976
|
}
|
|
5965
|
-
|
|
5966
|
-
if (
|
|
5967
|
-
|
|
5977
|
+
if (Array.isArray(left)) {
|
|
5978
|
+
if (!Array.isArray(right) || left.length !== right.length) {
|
|
5979
|
+
return false;
|
|
5968
5980
|
}
|
|
5981
|
+
} else if (leftPrototype !== Object.prototype && leftPrototype !== null) {
|
|
5982
|
+
return false;
|
|
5969
5983
|
}
|
|
5984
|
+
let rightValues = visited.get(left);
|
|
5985
|
+
if (rightValues?.has(right)) {
|
|
5986
|
+
return true;
|
|
5987
|
+
}
|
|
5988
|
+
if (!rightValues) {
|
|
5989
|
+
rightValues = /* @__PURE__ */ new WeakSet();
|
|
5990
|
+
visited.set(left, rightValues);
|
|
5991
|
+
}
|
|
5992
|
+
rightValues.add(right);
|
|
5993
|
+
const leftKeys = getEnumerableKeys(left);
|
|
5994
|
+
const rightKeys = getEnumerableKeys(right);
|
|
5995
|
+
const leftOptions = left;
|
|
5996
|
+
const rightOptions = right;
|
|
5997
|
+
return leftKeys.length === rightKeys.length && leftKeys.every(
|
|
5998
|
+
(key) => Object.prototype.propertyIsEnumerable.call(right, key) && compareOptionValues(leftOptions[key], rightOptions[key], visited)
|
|
5999
|
+
);
|
|
6000
|
+
}
|
|
6001
|
+
function getEnumerableKeys(value) {
|
|
6002
|
+
return Reflect.ownKeys(value).filter(
|
|
6003
|
+
(key) => Object.prototype.propertyIsEnumerable.call(value, key)
|
|
6004
|
+
);
|
|
5970
6005
|
}
|
|
5971
6006
|
|
|
5972
6007
|
// src/lib/loader-utils/normalize-loader.ts
|
|
@@ -6031,8 +6066,6 @@ var __exports__ = (() => {
|
|
|
6031
6066
|
if (!validHTTPResponse(data)) {
|
|
6032
6067
|
return null;
|
|
6033
6068
|
}
|
|
6034
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
6035
|
-
normalizedOptions.core ||= {};
|
|
6036
6069
|
if (loaders && !Array.isArray(loaders)) {
|
|
6037
6070
|
return normalizeLoader(loaders);
|
|
6038
6071
|
}
|
|
@@ -6040,18 +6073,18 @@ var __exports__ = (() => {
|
|
|
6040
6073
|
let initialBytes;
|
|
6041
6074
|
async function matchCandidates(candidates) {
|
|
6042
6075
|
normalizeLoaders(candidates);
|
|
6043
|
-
const loader2 = text !== null && selectLoaderInternal(text, candidates,
|
|
6076
|
+
const loader2 = text !== null && selectLoaderInternal(text, candidates, options, context, operation) || selectLoaderInternal(data, candidates, options, context, operation);
|
|
6044
6077
|
if (!loader2 && isBlob(data) && candidates.length) {
|
|
6045
6078
|
initialBytes ??= await data.slice(0, 10).arrayBuffer();
|
|
6046
|
-
return selectLoaderInternal(initialBytes, candidates,
|
|
6079
|
+
return selectLoaderInternal(initialBytes, candidates, options, context, operation);
|
|
6047
6080
|
}
|
|
6048
6081
|
return loader2;
|
|
6049
6082
|
}
|
|
6050
6083
|
let loader = await matchCandidates(loaders || []);
|
|
6051
|
-
if (!loader && !
|
|
6084
|
+
if (!loader && !options?.core?.ignoreRegisteredLoaders) {
|
|
6052
6085
|
loader = await matchCandidates(getRegisteredLoaders());
|
|
6053
6086
|
}
|
|
6054
|
-
if (!loader && !
|
|
6087
|
+
if (!loader && !options?.core?.nothrow) {
|
|
6055
6088
|
throw new Error(getNoValidLoaderMessage(data));
|
|
6056
6089
|
}
|
|
6057
6090
|
return loader;
|
|
@@ -6066,24 +6099,16 @@ var __exports__ = (() => {
|
|
|
6066
6099
|
if (!validHTTPResponse(data)) {
|
|
6067
6100
|
return null;
|
|
6068
6101
|
}
|
|
6069
|
-
const normalizedOptions = normalizeLoaderOptions(options || {});
|
|
6070
|
-
normalizedOptions.core ||= {};
|
|
6071
6102
|
if (loaders && !Array.isArray(loaders)) {
|
|
6072
6103
|
return normalizeLoader(loaders);
|
|
6073
6104
|
}
|
|
6074
6105
|
const candidates = loaders || [];
|
|
6075
6106
|
normalizeLoaders(candidates);
|
|
6076
|
-
let loader = selectLoaderInternal(data, candidates,
|
|
6077
|
-
if (!loader && !
|
|
6078
|
-
loader = selectLoaderInternal(
|
|
6079
|
-
data,
|
|
6080
|
-
getRegisteredLoaders(),
|
|
6081
|
-
normalizedOptions,
|
|
6082
|
-
context,
|
|
6083
|
-
operation
|
|
6084
|
-
);
|
|
6107
|
+
let loader = selectLoaderInternal(data, candidates, options, context, operation);
|
|
6108
|
+
if (!loader && !options?.core?.ignoreRegisteredLoaders) {
|
|
6109
|
+
loader = selectLoaderInternal(data, getRegisteredLoaders(), options, context, operation);
|
|
6085
6110
|
}
|
|
6086
|
-
if (!loader && !
|
|
6111
|
+
if (!loader && !options?.core?.nothrow) {
|
|
6087
6112
|
throw new Error(getNoValidLoaderMessage(data));
|
|
6088
6113
|
}
|
|
6089
6114
|
return loader;
|
|
@@ -6107,7 +6132,7 @@ var __exports__ = (() => {
|
|
|
6107
6132
|
loader = findSourceLoaderByTestURL(loaders, testUrl);
|
|
6108
6133
|
reason = loader ? `matched source url ${testUrl}` : "";
|
|
6109
6134
|
}
|
|
6110
|
-
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !
|
|
6135
|
+
const fallbackLoaders = operation === "source" && testUrl ? loaders.filter((candidate) => !candidate.testURL) : loaders;
|
|
6111
6136
|
loader = loader || findLoaderByUrl(fallbackLoaders, testUrl);
|
|
6112
6137
|
reason = reason || (loader ? `matched url ${testUrl}` : "");
|
|
6113
6138
|
if (!loader && operation === "parse") {
|
|
@@ -6173,7 +6198,7 @@ var __exports__ = (() => {
|
|
|
6173
6198
|
}
|
|
6174
6199
|
function findSourceLoaderByType(loaders, type) {
|
|
6175
6200
|
for (const loader of loaders) {
|
|
6176
|
-
if (
|
|
6201
|
+
if ((loader.type ?? loader.id) === type) {
|
|
6177
6202
|
return loader;
|
|
6178
6203
|
}
|
|
6179
6204
|
}
|
|
@@ -6184,7 +6209,7 @@ var __exports__ = (() => {
|
|
|
6184
6209
|
return null;
|
|
6185
6210
|
}
|
|
6186
6211
|
for (const loader of loaders) {
|
|
6187
|
-
if (
|
|
6212
|
+
if (loader.testURL?.(url)) {
|
|
6188
6213
|
return loader;
|
|
6189
6214
|
}
|
|
6190
6215
|
}
|
|
@@ -6192,7 +6217,7 @@ var __exports__ = (() => {
|
|
|
6192
6217
|
}
|
|
6193
6218
|
function findSourceLoaderByTestData(loaders, data) {
|
|
6194
6219
|
for (const loader of loaders) {
|
|
6195
|
-
if (
|
|
6220
|
+
if (loader.testData) {
|
|
6196
6221
|
if (loader.testData?.(data)) {
|
|
6197
6222
|
return loader;
|
|
6198
6223
|
}
|
|
@@ -6524,7 +6549,7 @@ var __exports__ = (() => {
|
|
|
6524
6549
|
function getFetchFunction(options, context) {
|
|
6525
6550
|
const globalOptions = getGlobalLoaderOptions();
|
|
6526
6551
|
const loaderOptions = options || globalOptions;
|
|
6527
|
-
const fetchOption = loaderOptions.
|
|
6552
|
+
const fetchOption = loaderOptions.core?.fetch;
|
|
6528
6553
|
let fetchFunction;
|
|
6529
6554
|
if (typeof fetchOption === "function") {
|
|
6530
6555
|
fetchFunction = fetchOption;
|
|
@@ -6615,7 +6640,7 @@ var __exports__ = (() => {
|
|
|
6615
6640
|
return await importLoaderImplementation(implementationSpecifier, loader.id);
|
|
6616
6641
|
}
|
|
6617
6642
|
function getLoaderImplementationSpecifier(loader, options) {
|
|
6618
|
-
const workerType = options?.
|
|
6643
|
+
const workerType = options?.core?._workerType;
|
|
6619
6644
|
if (workerType === "test") {
|
|
6620
6645
|
const sourcePath = `modules/${loader.module}/src/${loader.id}-loader.ts`;
|
|
6621
6646
|
if (typeof window !== "undefined") {
|
|
@@ -6772,20 +6797,13 @@ var __exports__ = (() => {
|
|
|
6772
6797
|
url,
|
|
6773
6798
|
normalizedOptions
|
|
6774
6799
|
);
|
|
6775
|
-
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
6776
6800
|
context = getLoaderContext(
|
|
6777
6801
|
// @ts-expect-error candidateLoaders may be a single forced loader
|
|
6778
6802
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
6779
|
-
|
|
6803
|
+
strictOptions,
|
|
6780
6804
|
context || null
|
|
6781
6805
|
);
|
|
6782
|
-
|
|
6783
|
-
loader,
|
|
6784
|
-
file,
|
|
6785
|
-
nativeArrowOptions || strictOptions,
|
|
6786
|
-
context
|
|
6787
|
-
);
|
|
6788
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
6806
|
+
return parseFileWithLoader(loader, file, strictOptions, context);
|
|
6789
6807
|
}
|
|
6790
6808
|
async function parseFileWithLoader(loader, file, options, context) {
|
|
6791
6809
|
(options.signal || context.signal)?.throwIfAborted();
|
|
@@ -6831,20 +6849,18 @@ var __exports__ = (() => {
|
|
|
6831
6849
|
const parse2 = () => {
|
|
6832
6850
|
throw new Error("parseSync called parse (which is async");
|
|
6833
6851
|
};
|
|
6834
|
-
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
6835
6852
|
context = getLoaderContext(
|
|
6836
6853
|
{ url, _parseSync: parse2, _parse: parse2, loaders },
|
|
6837
|
-
|
|
6854
|
+
strictOptions,
|
|
6838
6855
|
context || null
|
|
6839
6856
|
);
|
|
6840
6857
|
const loaderWithParser = getLoaderImplementationSync(loader);
|
|
6841
|
-
|
|
6858
|
+
return parseWithLoaderSync(
|
|
6842
6859
|
loaderWithParser || loader,
|
|
6843
6860
|
data,
|
|
6844
|
-
|
|
6861
|
+
strictOptions,
|
|
6845
6862
|
context
|
|
6846
6863
|
);
|
|
6847
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
6848
6864
|
}
|
|
6849
6865
|
function parseWithLoaderSync(loader, data, options, context) {
|
|
6850
6866
|
data = getArrayBufferOrStringFromDataSync(data, loader, options);
|
|
@@ -6893,10 +6909,10 @@ var __exports__ = (() => {
|
|
|
6893
6909
|
url || "",
|
|
6894
6910
|
normalizedOptions
|
|
6895
6911
|
);
|
|
6896
|
-
const
|
|
6912
|
+
const nativeArrow = usesNativeArrowBatches(loader, strictOptions);
|
|
6897
6913
|
context = getLoaderContext(
|
|
6898
6914
|
{ url, _parseInBatches: parseInBatches, _parse: parse, loaders: loaderArray },
|
|
6899
|
-
|
|
6915
|
+
strictOptions,
|
|
6900
6916
|
context || null
|
|
6901
6917
|
);
|
|
6902
6918
|
const loaderWithParser = await getLoaderImplementation(loader, strictOptions, context.url);
|
|
@@ -6904,15 +6920,31 @@ var __exports__ = (() => {
|
|
|
6904
6920
|
loader,
|
|
6905
6921
|
loaderWithParser,
|
|
6906
6922
|
data,
|
|
6907
|
-
|
|
6923
|
+
strictOptions,
|
|
6908
6924
|
context
|
|
6909
6925
|
);
|
|
6910
|
-
return
|
|
6926
|
+
return nativeArrow ? normalizeNativeArrowBatches(batches) : batches;
|
|
6911
6927
|
}
|
|
6912
6928
|
async function parseWithLoaderInBatches(originalLoader, loader, data, options, context) {
|
|
6913
|
-
const
|
|
6914
|
-
|
|
6915
|
-
|
|
6929
|
+
const { batchMaxRowsPerSecond = 0, batchSize } = options.core ?? {};
|
|
6930
|
+
validateBatchDeliveryRate(batchMaxRowsPerSecond);
|
|
6931
|
+
if (batchSize !== void 0 && batchSize !== "auto" && (!Number.isSafeInteger(batchSize) || batchSize < 1)) {
|
|
6932
|
+
throw new RangeError('core.batchSize must be a positive integer or "auto"');
|
|
6933
|
+
}
|
|
6934
|
+
const parserOptions = batchMaxRowsPerSecond ? { ...options, core: { ...options.core, batchMaxRowsPerSecond: 0 } } : options;
|
|
6935
|
+
const output = loader.parseInBatches ? loader.prepareParseBatchOutput?.(parserOptions) : null;
|
|
6936
|
+
const decoded = await parseToOutputIterator(
|
|
6937
|
+
loader,
|
|
6938
|
+
data,
|
|
6939
|
+
output?.options ?? parserOptions,
|
|
6940
|
+
context
|
|
6941
|
+
);
|
|
6942
|
+
const batches = output ? convertOutputBatches(decoded, output.convert) : decoded;
|
|
6943
|
+
const outputIterator = batchMaxRowsPerSecond ? paceBatchIterator(batches, {
|
|
6944
|
+
batchMaxRowsPerSecond,
|
|
6945
|
+
getRowCount: (batch) => getBatchRowCount(batch, loader.module),
|
|
6946
|
+
signal: options.signal ?? context.signal
|
|
6947
|
+
}) : batches;
|
|
6916
6948
|
if (!options?.core?.metadata) {
|
|
6917
6949
|
return outputIterator;
|
|
6918
6950
|
}
|
|
@@ -6961,6 +6993,10 @@ var __exports__ = (() => {
|
|
|
6961
6993
|
{ ...options, core: { ...options?.core, mimeType: loader.mimeTypes[0] } },
|
|
6962
6994
|
context
|
|
6963
6995
|
);
|
|
6996
|
+
if (isArrowTable(parsedData)) {
|
|
6997
|
+
yield* parsedData.batches;
|
|
6998
|
+
return;
|
|
6999
|
+
}
|
|
6964
7000
|
const batch = convertDataToBatch(parsedData, loader);
|
|
6965
7001
|
yield batch;
|
|
6966
7002
|
}
|
|
@@ -6987,8 +7023,6 @@ var __exports__ = (() => {
|
|
|
6987
7023
|
return Array.isArray(table.features);
|
|
6988
7024
|
case "columnar-table":
|
|
6989
7025
|
return Boolean(table.data && typeof table.data === "object");
|
|
6990
|
-
case "arrow-table":
|
|
6991
|
-
return Boolean(table.data && typeof table.data === "object" && "numRows" in table.data);
|
|
6992
7026
|
default:
|
|
6993
7027
|
return false;
|
|
6994
7028
|
}
|
|
@@ -7000,8 +7034,6 @@ var __exports__ = (() => {
|
|
|
7000
7034
|
return table.data.length;
|
|
7001
7035
|
case "geojson-table":
|
|
7002
7036
|
return table.features.length;
|
|
7003
|
-
case "arrow-table":
|
|
7004
|
-
return table.data.numRows;
|
|
7005
7037
|
case "columnar-table":
|
|
7006
7038
|
for (const column of Object.values(table.data)) {
|
|
7007
7039
|
return column.length || 0;
|
|
@@ -7016,6 +7048,17 @@ var __exports__ = (() => {
|
|
|
7016
7048
|
}
|
|
7017
7049
|
return iteratorChain;
|
|
7018
7050
|
}
|
|
7051
|
+
function getBatchRowCount(batch, module) {
|
|
7052
|
+
if (!batch || typeof batch !== "object") return void 0;
|
|
7053
|
+
if (module === "geospatial" && Array.isArray(batch)) return batch.length;
|
|
7054
|
+
const result = batch;
|
|
7055
|
+
if (module === "traces" && result.table !== void 0 && result.table !== "spans" && result.table !== "slices") {
|
|
7056
|
+
return void 0;
|
|
7057
|
+
}
|
|
7058
|
+
if (result.batchType !== void 0 && result.batchType !== "data") return void 0;
|
|
7059
|
+
if (result.shape === "unknown") return void 0;
|
|
7060
|
+
return result.data?.numRows ?? result.numRows ?? result.header?.vertexCount ?? result.features?.length ?? result.length;
|
|
7061
|
+
}
|
|
7019
7062
|
|
|
7020
7063
|
// src/lib/api/load.ts
|
|
7021
7064
|
async function load(url, loaders, options, context) {
|
|
@@ -7030,40 +7073,56 @@ var __exports__ = (() => {
|
|
|
7030
7073
|
resolvedOptions = options;
|
|
7031
7074
|
}
|
|
7032
7075
|
resolvedOptions ||= getGlobalLoaderOptions();
|
|
7076
|
+
let fetchedResponse;
|
|
7033
7077
|
if (typeof url === "string" || isBlob(url)) {
|
|
7034
7078
|
const selectedLoader = await selectLoader(url, resolvedLoaders, {
|
|
7035
7079
|
...resolvedOptions,
|
|
7036
7080
|
core: { ...resolvedOptions?.core, nothrow: true }
|
|
7037
7081
|
});
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7082
|
+
const canFetchBeforePreload = typeof url === "string" && selectedLoader?.fetchBeforePreload;
|
|
7083
|
+
const loaderImplementation = selectedLoader && (typeof url === "string" || selectedLoader.createDataSourceSync) ? getLoaderImplementation(
|
|
7084
|
+
selectedLoader,
|
|
7085
|
+
resolvedOptions,
|
|
7086
|
+
typeof url === "string" ? url : void 0
|
|
7087
|
+
) : null;
|
|
7088
|
+
if (canFetchBeforePreload) {
|
|
7089
|
+
const loadOptions = resolvedOptions;
|
|
7090
|
+
const controller = new AbortController();
|
|
7091
|
+
const fetchOption = loadOptions.core?.fetch;
|
|
7092
|
+
const callerSignal = loadOptions.signal || context?.signal || (typeof fetchOption === "object" ? fetchOption?.signal : void 0);
|
|
7093
|
+
const signal = callerSignal ? AbortSignal.any([callerSignal, controller.signal]) : controller.signal;
|
|
7094
|
+
try {
|
|
7095
|
+
[, fetchedResponse] = await Promise.all([
|
|
7096
|
+
loaderImplementation,
|
|
7097
|
+
resolveLoaderAuthenticationOptions(selectedLoader, url, loadOptions).then((options2) => {
|
|
7098
|
+
signal.throwIfAborted();
|
|
7099
|
+
resolvedOptions = resolveAuthenticationOptions(options2);
|
|
7100
|
+
const fetch3 = getFetchFunction({ ...resolvedOptions, signal }, context);
|
|
7101
|
+
return fetch3(applySearchParamsToUrl(url, resolvedOptions));
|
|
7102
|
+
})
|
|
7103
|
+
]);
|
|
7104
|
+
} catch (error) {
|
|
7105
|
+
controller.abort(error);
|
|
7106
|
+
throw error;
|
|
7048
7107
|
}
|
|
7108
|
+
}
|
|
7109
|
+
const implementation = await loaderImplementation;
|
|
7110
|
+
if (selectedLoader && implementation?.createDataSourceSync && !isLoaderWithParser(implementation)) {
|
|
7111
|
+
throw new Error(
|
|
7112
|
+
`${selectedLoader.id} creates sources. Use createDataSource() instead of load().`
|
|
7113
|
+
);
|
|
7114
|
+
}
|
|
7115
|
+
if (!fetchedResponse && selectedLoader && implementation && typeof url === "string") {
|
|
7049
7116
|
resolvedOptions = await resolveLoaderAuthenticationOptions(
|
|
7050
|
-
selectedLoader.getAuthentications ? selectedLoader :
|
|
7117
|
+
selectedLoader.getAuthentications ? selectedLoader : implementation,
|
|
7051
7118
|
url,
|
|
7052
7119
|
resolvedOptions || {}
|
|
7053
7120
|
);
|
|
7054
|
-
const { parseUrl } =
|
|
7121
|
+
const { parseUrl } = implementation;
|
|
7055
7122
|
if (parseUrl) {
|
|
7056
7123
|
const requestUrl = applySearchParamsToUrl(url, resolvedOptions);
|
|
7057
|
-
const
|
|
7058
|
-
|
|
7059
|
-
normalizeOptions(resolvedOptions, selectedLoader, [selectedLoader], url)
|
|
7060
|
-
);
|
|
7061
|
-
const result = await parseUrl(
|
|
7062
|
-
requestUrl,
|
|
7063
|
-
nativeOptions || resolvedOptions,
|
|
7064
|
-
context
|
|
7065
|
-
);
|
|
7066
|
-
return nativeOptions ? unwrapArrowTable(result) : result;
|
|
7124
|
+
const options2 = normalizeOptions(resolvedOptions, selectedLoader, [selectedLoader], url);
|
|
7125
|
+
return parseUrl(requestUrl, options2, context);
|
|
7067
7126
|
}
|
|
7068
7127
|
}
|
|
7069
7128
|
}
|
|
@@ -7071,14 +7130,13 @@ var __exports__ = (() => {
|
|
|
7071
7130
|
const fetch2 = getFetchFunction(resolvedOptions);
|
|
7072
7131
|
let data = url;
|
|
7073
7132
|
if (typeof url === "string") {
|
|
7074
|
-
data = await fetch2(applySearchParamsToUrl(url, resolvedOptions));
|
|
7133
|
+
data = fetchedResponse ?? await fetch2(applySearchParamsToUrl(url, resolvedOptions));
|
|
7075
7134
|
}
|
|
7076
7135
|
if (isBlob(url)) {
|
|
7077
7136
|
data = await fetch2(url);
|
|
7078
7137
|
}
|
|
7079
7138
|
if (typeof url === "string") {
|
|
7080
|
-
|
|
7081
|
-
if (!normalizedOptions.core?.baseUrl) {
|
|
7139
|
+
if (!resolvedOptions?.core?.baseUrl) {
|
|
7082
7140
|
resolvedOptions = {
|
|
7083
7141
|
...resolvedOptions,
|
|
7084
7142
|
core: {
|
|
@@ -7205,15 +7263,13 @@ var __exports__ = (() => {
|
|
|
7205
7263
|
url || "",
|
|
7206
7264
|
normalizedOptions
|
|
7207
7265
|
);
|
|
7208
|
-
const nativeArrowOptions = getNativeArrowOptions(loader, strictOptions, false);
|
|
7209
7266
|
context = getLoaderContext(
|
|
7210
7267
|
// @ts-expect-error
|
|
7211
7268
|
{ url, _parse: parse, loaders: candidateLoaders },
|
|
7212
|
-
|
|
7269
|
+
strictOptions,
|
|
7213
7270
|
context || null
|
|
7214
7271
|
);
|
|
7215
|
-
|
|
7216
|
-
return nativeArrowOptions ? unwrapArrowTable(result) : result;
|
|
7272
|
+
return parseWithLoader(loader, data, strictOptions, context);
|
|
7217
7273
|
}
|
|
7218
7274
|
async function parseWithLoader(loader, data, options, context) {
|
|
7219
7275
|
(options.signal || context.signal)?.throwIfAborted();
|
|
@@ -7232,8 +7288,8 @@ var __exports__ = (() => {
|
|
|
7232
7288
|
const parseOptions = output?.options ?? options;
|
|
7233
7289
|
let result;
|
|
7234
7290
|
if (shouldParseWithWorker(loaderWithParser, data, parseOptions, context, loader)) {
|
|
7235
|
-
|
|
7236
|
-
result = await parseWithWorker(loaderWithParser,
|
|
7291
|
+
const input = isResponse(data) && data.ok ? getArrayBufferFromData(data, parseOptions) : await getArrayBufferFromData(data, parseOptions);
|
|
7292
|
+
result = await parseWithWorker(loaderWithParser, input, parseOptions, context, parse);
|
|
7237
7293
|
} else if (isBlob(data) && loaderWithParser.parseBlob) {
|
|
7238
7294
|
result = await loaderWithParser.parseBlob(data, parseOptions, context);
|
|
7239
7295
|
} else {
|
|
@@ -7463,7 +7519,7 @@ var __exports__ = (() => {
|
|
|
7463
7519
|
function getCandidates(loaders, options) {
|
|
7464
7520
|
const candidates = Array.isArray(loaders) ? [...loaders] : [loaders];
|
|
7465
7521
|
const type = options.core?.type || options.type;
|
|
7466
|
-
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) =>
|
|
7522
|
+
return candidates.length > 1 && type && type !== "auto" ? candidates.filter((loader) => (loader.type ?? loader.id) === type) : candidates;
|
|
7467
7523
|
}
|
|
7468
7524
|
function getSelectionOptions(options) {
|
|
7469
7525
|
return { ...options, core: { ...options.core, ignoreRegisteredLoaders: true, nothrow: true } };
|
|
@@ -7546,21 +7602,6 @@ var __exports__ = (() => {
|
|
|
7546
7602
|
|
|
7547
7603
|
// src/null-loader.ts
|
|
7548
7604
|
var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
7549
|
-
var NullWorkerLoader = {
|
|
7550
|
-
dataType: null,
|
|
7551
|
-
batchType: null,
|
|
7552
|
-
name: "Null loader",
|
|
7553
|
-
id: "null",
|
|
7554
|
-
module: "core",
|
|
7555
|
-
version: VERSION6,
|
|
7556
|
-
worker: true,
|
|
7557
|
-
mimeTypes: ["application/x.empty"],
|
|
7558
|
-
extensions: ["null"],
|
|
7559
|
-
tests: [() => false],
|
|
7560
|
-
options: {
|
|
7561
|
-
null: {}
|
|
7562
|
-
}
|
|
7563
|
-
};
|
|
7564
7605
|
var NullLoader = {
|
|
7565
7606
|
dataType: null,
|
|
7566
7607
|
batchType: null,
|