@loaders.gl/core 5.0.0-beta.1 → 5.0.0-beta.11
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 +1 -1
- package/README.md +4 -2
- package/SCAN-README.md +3 -3
- package/SCHEMA-UTILS-README.md +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 +295 -18
- package/dist/arrow-geometry/geojson-table.cjs.map +3 -3
- package/dist/arrow-geometry/geojson-table.d.ts +10 -3
- package/dist/arrow-geometry/geojson-table.d.ts.map +1 -1
- package/dist/arrow-geometry/geojson-table.js +23 -13
- 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/index.cjs +0 -11
- package/dist/arrow-geometry/index.cjs.map +2 -2
- package/dist/arrow-geometry/index.d.ts +0 -1
- package/dist/arrow-geometry/index.d.ts.map +1 -1
- package/dist/arrow-geometry/index.js +0 -1
- package/dist/arrow-geometry/index.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 +105 -0
- package/dist/arrow-worker-transport.cjs.map +6 -0
- package/dist/arrow-worker-transport.d.ts +11 -0
- package/dist/arrow-worker-transport.d.ts.map +1 -0
- package/dist/arrow-worker-transport.js +77 -0
- package/dist/arrow-worker-transport.js.map +1 -0
- package/dist/cluster-source.cjs +6874 -0
- package/dist/cluster-source.cjs.map +6 -0
- package/dist/cluster-source.d.ts +2 -0
- package/dist/cluster-source.d.ts.map +1 -0
- package/dist/cluster-source.js +2 -0
- package/dist/cluster-source.js.map +1 -0
- package/dist/dist.dev.js +3040 -817
- package/dist/dist.min.js +3 -3
- package/dist/federated-table-scan-source.cjs +2409 -0
- package/dist/federated-table-scan-source.cjs.map +6 -0
- package/dist/federated-table-scan-source.d.ts +2 -0
- package/dist/federated-table-scan-source.d.ts.map +1 -0
- package/dist/federated-table-scan-source.js +2 -0
- package/dist/federated-table-scan-source.js.map +1 -0
- 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/geoarrow-bounds.cjs +7 -7
- package/dist/geoarrow/geoarrow-bounds.cjs.map +2 -2
- 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 +8 -8
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.cjs.map +2 -2
- package/dist/geoarrow/geoarrow-converter/convert-geoarrow-geometry.js +2 -2
- 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 +11 -12
- 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 +10 -13
- 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/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 +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.cjs.map +2 -2
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.d.ts.map +1 -1
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js +4 -8
- package/dist/geoarrow/lib/feature-collection-converters/convert-geometry-column-to-binary-feature-collection.js.map +1 -1
- package/dist/geoarrow/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/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 +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.cjs.map +2 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.d.ts.map +1 -1
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js +3 -2
- package/dist/geoarrow/mesharrow/arrow-fixed-size-list-utils.js.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs +44 -2
- package/dist/geoarrow/metadata/geoarrow-metadata.cjs.map +4 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.d.ts.map +1 -1
- package/dist/geoarrow/metadata/geoarrow-metadata.js +3 -4
- package/dist/geoarrow/metadata/geoarrow-metadata.js.map +1 -1
- package/dist/index.cjs +746 -1365
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +20 -9
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +55 -45
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode.d.ts +1 -1
- package/dist/lib/api/encode.d.ts.map +1 -1
- package/dist/lib/api/encode.js +11 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +3 -2
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +3 -3
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +15 -19
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +7 -3
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +15 -67
- 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 +5 -3
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +8 -6
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +5 -3
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +60 -9
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +5 -3
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +3 -4
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +5 -3
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +22 -14
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/select-loader.d.ts +4 -2
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +47 -53
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/api/select-source.js +1 -1
- package/dist/lib/api/select-source.js.map +1 -1
- package/dist/lib/init.js +1 -1
- package/dist/lib/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/loggers.d.ts +2 -37
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +2 -63
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/native-arrow.d.ts +13 -0
- package/dist/lib/loader-utils/native-arrow.d.ts.map +1 -0
- package/dist/lib/loader-utils/native-arrow.js +66 -0
- package/dist/lib/loader-utils/native-arrow.js.map +1 -0
- 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 +9 -10
- 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 +31 -114
- 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 +854 -1295
- package/dist/loader-utils/index.cjs.map +3 -3
- package/dist/loader-utils/index.d.ts +17 -8
- package/dist/loader-utils/index.d.ts.map +1 -1
- package/dist/loader-utils/index.js +9 -5
- 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/files/http-file-transport.d.ts +4 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/http-file-transport.js +45 -1
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -1
- package/dist/loader-utils/lib/files/http-file-types.d.ts +2 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -1
- package/dist/loader-utils/lib/files/read-range-response.d.ts +3 -0
- package/dist/loader-utils/lib/files/read-range-response.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/read-range-response.js +62 -0
- package/dist/loader-utils/lib/files/read-range-response.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +23 -1
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -1
- package/dist/loader-utils/lib/log-utils/log.js +32 -1
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -1
- package/dist/loader-utils/lib/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/logical-table-query.d.ts +43 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js +104 -0
- package/dist/loader-utils/lib/scan-utils/logical-table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/{experimental-scan-options.d.ts → query-options.d.ts} +5 -8
- package/dist/loader-utils/lib/scan-utils/query-options.d.ts.map +1 -0
- package/dist/{schema-utils/lib/table/batch-builder/table-batch-aggregator.js → loader-utils/lib/scan-utils/query-options.js} +1 -1
- package/dist/loader-utils/lib/scan-utils/query-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +58 -18
- 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 +17 -6
- 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 +54 -3
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-query.js +6 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -1
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +18 -12
- 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 +58 -29
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.d.ts +4 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -1
- package/dist/loader-utils/lib/sources/data-source.js +53 -14
- 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 +31 -0
- package/dist/loader-utils/lib/sources/table-source-collection.d.ts.map +1 -0
- package/dist/loader-utils/lib/{scan-utils/experimental-scan-options.js → sources/table-source-collection.js} +1 -1
- package/dist/loader-utils/lib/sources/table-source-collection.js.map +1 -0
- 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/encode-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +2 -5
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -1
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +40 -21
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -1
- package/dist/loader-utils/loader-types.d.ts +118 -91
- 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 +7 -5
- package/dist/loader-utils/source-types.d.ts.map +1 -1
- package/dist/loader-utils/source-types.js +9 -1
- package/dist/loader-utils/source-types.js.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 +771 -82
- package/dist/null-worker.js +742 -81
- package/dist/polyfills/images/encode-image-node.d.ts +18 -15
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/encode-image-node.js +19 -33
- package/dist/polyfills/images/encode-image-node.js.map +1 -1
- package/dist/polyfills/images/image-codecs-node.d.ts +2 -6
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -1
- package/dist/polyfills/images/image-codecs-node.js +2 -24
- package/dist/polyfills/images/image-codecs-node.js.map +1 -1
- package/dist/polyfills/images/load-sharp.d.ts +3 -0
- package/dist/polyfills/images/load-sharp.d.ts.map +1 -0
- package/dist/polyfills/images/load-sharp.js +11 -0
- package/dist/polyfills/images/load-sharp.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +1 -1
- package/dist/polyfills/images/node-image-bitmap.js +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts +1 -1
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -1
- package/dist/polyfills/images/node-image-formats.js +10 -4
- package/dist/polyfills/images/node-image-formats.js.map +1 -1
- package/dist/polyfills/images/parse-image-node.d.ts +10 -2
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -1
- package/dist/polyfills/images/parse-image-node.js +20 -32
- package/dist/polyfills/images/parse-image-node.js.map +1 -1
- package/dist/polyfills/index.cjs +76 -151
- package/dist/polyfills/index.d.ts.map +1 -1
- package/dist/polyfills/index.js +2 -2
- package/dist/polyfills/index.js.map +1 -1
- package/dist/scan/arrow-execution/expressions.cjs +134 -0
- package/dist/scan/arrow-execution/expressions.cjs.map +7 -0
- package/dist/scan/arrow-execution/expressions.d.ts +11 -0
- package/dist/scan/arrow-execution/expressions.d.ts.map +1 -0
- package/dist/scan/arrow-execution/expressions.js +86 -0
- package/dist/scan/arrow-execution/expressions.js.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs +255 -0
- package/dist/scan/arrow-execution/filter-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts +18 -0
- package/dist/scan/arrow-execution/filter-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js +224 -0
- package/dist/scan/arrow-execution/filter-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs +70 -0
- package/dist/scan/arrow-execution/project-arrow-table.cjs.map +7 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts +8 -0
- package/dist/scan/arrow-execution/project-arrow-table.d.ts.map +1 -0
- package/dist/scan/arrow-execution/project-arrow-table.js +39 -0
- package/dist/scan/arrow-execution/project-arrow-table.js.map +1 -0
- package/dist/scan/arrow-execution.cjs +34 -0
- package/dist/scan/arrow-execution.cjs.map +7 -0
- package/dist/scan/arrow-execution.d.ts +4 -0
- package/dist/scan/arrow-execution.d.ts.map +1 -0
- package/dist/scan/arrow-execution.js +6 -0
- package/dist/scan/arrow-execution.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.map +1 -1
- package/dist/scan/arrow-query.d.ts +1 -1
- package/dist/scan/arrow-query.d.ts.map +1 -1
- package/dist/scan/catalog-query-source.cjs +122 -0
- package/dist/scan/catalog-query-source.cjs.map +7 -0
- package/dist/scan/catalog-query-source.d.ts +6 -0
- package/dist/scan/catalog-query-source.d.ts.map +1 -0
- package/dist/scan/catalog-query-source.js +115 -0
- package/dist/scan/catalog-query-source.js.map +1 -0
- package/dist/scan/federated-table-scan-source.cjs +42 -43
- package/dist/scan/federated-table-scan-source.cjs.map +2 -2
- package/dist/scan/federated-table-scan-source.d.ts +6 -10
- package/dist/scan/federated-table-scan-source.d.ts.map +1 -1
- package/dist/scan/federated-table-scan-source.js +39 -40
- package/dist/scan/federated-table-scan-source.js.map +1 -1
- package/dist/scan/index.cjs +213 -6
- package/dist/scan/index.cjs.map +4 -4
- package/dist/scan/index.d.ts +15 -4
- package/dist/scan/index.d.ts.map +1 -1
- package/dist/scan/index.js +8 -2
- package/dist/scan/index.js.map +1 -1
- package/dist/scan/parse-sql-predicate.cjs +3 -294
- package/dist/scan/parse-sql-predicate.cjs.map +3 -3
- package/dist/scan/parse-sql-predicate.d.ts +6 -9
- package/dist/scan/parse-sql-predicate.d.ts.map +1 -1
- package/dist/scan/parse-sql-predicate.js +5 -314
- package/dist/scan/parse-sql-predicate.js.map +1 -1
- package/dist/scan/query-arrow-table-in-batches.cjs +75 -0
- package/dist/scan/query-arrow-table-in-batches.cjs.map +7 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts +8 -0
- package/dist/scan/query-arrow-table-in-batches.d.ts.map +1 -0
- package/dist/scan/query-arrow-table-in-batches.js +54 -0
- package/dist/scan/query-arrow-table-in-batches.js.map +1 -0
- package/dist/scan/query-arrow-table.cjs +65 -202
- package/dist/scan/query-arrow-table.cjs.map +3 -3
- package/dist/scan/query-arrow-table.d.ts +7 -40
- package/dist/scan/query-arrow-table.d.ts.map +1 -1
- package/dist/scan/query-arrow-table.js +51 -211
- package/dist/scan/query-arrow-table.js.map +1 -1
- 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 +190 -0
- package/dist/scan/query-progressive.cjs.map +7 -0
- package/dist/scan/query-progressive.d.ts +39 -0
- package/dist/scan/query-progressive.d.ts.map +1 -0
- package/dist/scan/query-progressive.js +173 -0
- package/dist/scan/query-progressive.js.map +1 -0
- 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 +140 -0
- package/dist/scan/query-scales.cjs.map +7 -0
- package/dist/scan/query-scales.d.ts +35 -0
- package/dist/scan/query-scales.d.ts.map +1 -0
- package/dist/scan/query-scales.js +120 -0
- package/dist/scan/query-scales.js.map +1 -0
- package/dist/scan/query.cjs +385 -0
- package/dist/scan/query.cjs.map +7 -0
- package/dist/scan/query.d.ts +67 -0
- package/dist/scan/query.d.ts.map +1 -0
- package/dist/scan/query.js +402 -0
- package/dist/scan/query.js.map +1 -0
- package/dist/scan/resolve-query-source.cjs +59 -0
- package/dist/scan/resolve-query-source.cjs.map +7 -0
- package/dist/scan/resolve-query-source.d.ts +6 -0
- package/dist/scan/resolve-query-source.d.ts.map +1 -0
- package/dist/scan/resolve-query-source.js +37 -0
- package/dist/scan/resolve-query-source.js.map +1 -0
- 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.map +2 -2
- package/dist/scan/scan-engine.d.ts +5 -5
- package/dist/scan/scan-engine.d.ts.map +1 -1
- package/dist/scan/scan-engine.js.map +1 -1
- package/dist/scan/sql-catalog.cjs +110 -0
- package/dist/scan/sql-catalog.cjs.map +7 -0
- package/dist/scan/sql-catalog.d.ts +47 -0
- package/dist/scan/sql-catalog.d.ts.map +1 -0
- package/dist/scan/sql-catalog.js +97 -0
- package/dist/scan/sql-catalog.js.map +1 -0
- package/dist/scan/table-query.cjs.map +2 -2
- package/dist/scan/table-query.d.ts +4 -1
- package/dist/scan/table-query.d.ts.map +1 -1
- package/dist/scan/table-query.js.map +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/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 +3 -6
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -1
- package/dist/schema/index.cjs +11 -7
- 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 +404 -620
- package/dist/schema-utils/index.cjs.map +3 -3
- package/dist/schema-utils/index.d.ts +6 -6
- package/dist/schema-utils/index.d.ts.map +1 -1
- package/dist/schema-utils/index.js +6 -5
- 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/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/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 +7 -3
- 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 +13 -75
- 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/row-utils.js +2 -2
- package/dist/schema-utils/lib/table/tables/row-utils.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 +1766 -0
- package/dist/vector-table-scan-source.cjs.map +6 -0
- package/dist/vector-table-scan-source.d.ts +2 -0
- package/dist/vector-table-scan-source.d.ts.map +1 -0
- package/dist/vector-table-scan-source.js +2 -0
- package/dist/vector-table-scan-source.js.map +1 -0
- package/dist/worker-utils/index.cjs +407 -1184
- package/dist/worker-utils/index.cjs.map +3 -3
- package/dist/worker-utils/index.d.ts +2 -8
- package/dist/worker-utils/index.d.ts.map +1 -1
- package/dist/worker-utils/index.js +1 -10
- package/dist/worker-utils/index.js.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/library-utils/library-utils.d.ts.map +1 -1
- package/dist/worker-utils/lib/library-utils/library-utils.js +3 -2
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -1
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +8 -7
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +5 -7
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/create-worker.js +76 -146
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +5 -2
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +17 -45
- 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 +214 -312
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -1
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts +36 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js +23 -0
- package/dist/worker-utils/lib/worker-api/task-runtime.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +1 -6
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +3 -1
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -1
- package/dist/worker-utils/null-worker-node.js +836 -147
- package/dist/worker-utils/null-worker-node.js.map +4 -4
- package/dist/worker-utils/null-worker.js +804 -143
- package/dist/worker-utils/null-worker.js.map +4 -4
- package/dist/worker-utils/types.d.ts +55 -72
- package/dist/worker-utils/types.d.ts.map +1 -1
- package/package.json +141 -35
- 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 +32 -21
- package/src/arrow-geometry/geometry-codecs.ts +2 -2
- package/src/arrow-geometry/geometry-to-wkt.ts +2 -2
- package/src/arrow-geometry/index.ts +0 -9
- 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 +126 -0
- package/src/cluster-source.ts +1 -0
- package/src/federated-table-scan-source.ts +1 -0
- 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/geoarrow-bounds.ts +3 -3
- package/src/geoarrow/geoarrow-capabilities.ts +1 -1
- package/src/geoarrow/geoarrow-converter/convert-geoarrow-geometry.ts +3 -3
- 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 +16 -16
- package/src/geoarrow/get-geoarrow-vertex-count.ts +1 -1
- 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 +4 -11
- 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/table-converters/convert-geoarrow-table.ts +11 -11
- package/src/geoarrow/mesharrow/arrow-fixed-size-list-utils.ts +3 -2
- package/src/geoarrow/metadata/geoarrow-metadata.ts +3 -4
- package/src/index.ts +2 -6
- package/src/lib/api/create-data-source.ts +148 -58
- package/src/lib/api/encode.ts +14 -3
- package/src/lib/api/load-in-batches.ts +15 -7
- package/src/lib/api/load-loader.ts +22 -21
- package/src/lib/api/load.ts +51 -127
- package/src/lib/api/loader-options.ts +69 -0
- package/src/lib/api/parse-file.ts +32 -22
- package/src/lib/api/parse-in-batches.ts +121 -20
- package/src/lib/api/parse-sync.ts +30 -16
- package/src/lib/api/parse.ts +46 -29
- package/src/lib/api/select-loader.ts +54 -69
- package/src/lib/api/select-source.ts +7 -1
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +2 -70
- package/src/lib/loader-utils/native-arrow.ts +83 -0
- package/src/lib/loader-utils/option-defaults.ts +9 -10
- package/src/lib/loader-utils/option-utils.ts +33 -122
- package/src/loader-utils/format-types.ts +4 -0
- package/src/loader-utils/index.ts +50 -10
- package/src/loader-utils/lib/files/http-file-transport.ts +65 -1
- package/src/loader-utils/lib/files/http-file-types.ts +2 -0
- package/src/loader-utils/lib/files/read-range-response.ts +66 -0
- package/src/loader-utils/lib/log-utils/log.ts +36 -1
- 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/logical-table-query.ts +174 -0
- package/src/loader-utils/lib/scan-utils/query-options.ts +44 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +81 -28
- package/src/loader-utils/lib/scan-utils/table-query.ts +76 -8
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +101 -53
- package/src/loader-utils/lib/sources/data-source.ts +57 -16
- package/src/loader-utils/lib/sources/image-source.ts +1 -1
- package/src/loader-utils/lib/sources/table-source-collection.ts +39 -0
- 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/encode-with-worker.ts +5 -6
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +41 -24
- package/src/loader-utils/loader-types.ts +190 -111
- package/src/loader-utils/source-types.ts +17 -6
- package/src/null-loader.ts +1 -20
- package/src/polyfills/README.md +2 -2
- package/src/polyfills/images/encode-image-node.ts +44 -37
- package/src/polyfills/images/image-codecs-node.ts +2 -37
- package/src/polyfills/images/load-sharp.ts +13 -0
- package/src/polyfills/images/node-image-bitmap.ts +1 -1
- package/src/polyfills/images/node-image-formats.ts +10 -4
- package/src/polyfills/images/parse-image-node.ts +31 -40
- package/src/polyfills/index.ts +3 -3
- package/src/scan/arrow-execution/expressions.ts +116 -0
- package/src/scan/arrow-execution/filter-arrow-table.ts +298 -0
- package/src/scan/arrow-execution/project-arrow-table.ts +53 -0
- package/src/scan/arrow-execution.ts +7 -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 -0
- package/src/scan/catalog-query-source.ts +132 -0
- package/src/scan/federated-table-scan-source.ts +67 -78
- package/src/scan/index.ts +64 -6
- package/src/scan/parse-sql-predicate.ts +14 -367
- package/src/scan/query-arrow-table-in-batches.ts +55 -0
- package/src/scan/query-arrow-table.ts +81 -271
- package/src/scan/query-open-source.ts +39 -0
- package/src/scan/query-progressive.ts +229 -0
- package/src/scan/query-pushdown.ts +184 -0
- package/src/scan/query-scales.ts +199 -0
- package/src/scan/query.ts +594 -0
- package/src/scan/resolve-query-source.ts +47 -0
- package/src/scan/rows-to-arrow.ts +3 -39
- package/src/scan/scan-engine.ts +6 -6
- package/src/scan/sql-catalog.ts +167 -0
- package/src/scan/table-query.ts +6 -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/geometry/arrow-binary-features.ts +1 -1
- package/src/schema/geometry/geoarrow.ts +8 -19
- package/src/schema/index.ts +4 -5
- package/src/schema/types/batch.ts +0 -5
- package/src/schema-utils/index.ts +19 -10
- package/src/schema-utils/lib/arrow/arrow-metadata.ts +139 -0
- 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/deduce-table-schema.ts +8 -4
- 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 +27 -95
- 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/row-utils.ts +2 -2
- 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/vector-table-scan-source.ts +1 -0
- package/src/worker-utils/index.ts +2 -18
- package/src/worker-utils/lib/library-utils/library-utils.ts +3 -2
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +8 -7
- package/src/worker-utils/lib/worker-api/create-worker.ts +89 -188
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +4 -3
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +246 -402
- package/src/worker-utils/lib/worker-api/task-runtime.ts +66 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +1 -6
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +2 -0
- package/src/worker-utils/types.ts +74 -109
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs +0 -477
- package/dist/arrow-geometry/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts +0 -29
- package/dist/arrow-geometry/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js +0 -434
- package/dist/arrow-geometry/arrow-geoarrow-adapter.js.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs +0 -39
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.cjs.map +0 -7
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts +0 -2
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.d.ts.map +0 -1
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.js +0 -5
- package/dist/geoarrow/lib/arrow-geoarrow-adapter.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/loader-utils/lib/scan-utils/experimental-scan-options.d.ts.map +0 -1
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.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/arrow-transport.cjs +0 -691
- package/dist/schema-utils/arrow-transport.cjs.map +0 -6
- package/dist/schema-utils/arrow-transport.d.ts +0 -4
- package/dist/schema-utils/arrow-transport.d.ts.map +0 -1
- package/dist/schema-utils/arrow-transport.js +0 -7
- package/dist/schema-utils/arrow-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts +0 -76
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js +0 -182
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts +0 -33
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts.map +0 -1
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js +0 -134
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.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.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts +0 -32
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +0 -1
- package/dist/worker-utils/lib/async-queue/async-queue.js +0 -91
- package/dist/worker-utils/lib/async-queue/async-queue.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +0 -20
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-body.js +0 -131
- package/dist/worker-utils/lib/worker-farm/worker-body.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +0 -58
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-farm.js +0 -116
- package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +0 -34
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-job.js +0 -74
- package/dist/worker-utils/lib/worker-farm/worker-job.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +0 -94
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-pool.js +0 -246
- package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +0 -67
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +0 -1
- package/dist/worker-utils/lib/worker-farm/worker-thread.js +0 -175
- package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +0 -1
- package/src/arrow-geometry/arrow-geoarrow-adapter.ts +0 -568
- package/src/geoarrow/lib/arrow-geoarrow-adapter.ts +0 -12
- 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/loader-utils/lib/scan-utils/experimental-scan-options.ts +0 -46
- package/src/polyfills/images/encode-image.node.ts.disabled +0 -41
- package/src/polyfills/images/parse-image.node.ts.disabled +0 -55
- package/src/schema/deprecated/mesh-utils.ts +0 -46
- package/src/schema-utils/arrow-transport.ts +0 -7
- package/src/schema-utils/lib/arrow/arrow-table-transport.ts +0 -282
- package/src/schema-utils/lib/arrow/split-arrow-buffers.ts +0 -247
- 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/worker-utils/lib/async-queue/async-queue.ts +0 -100
- package/src/worker-utils/lib/worker-farm/worker-body.ts +0 -145
- package/src/worker-utils/lib/worker-farm/worker-farm.ts +0 -144
- package/src/worker-utils/lib/worker-farm/worker-job.ts +0 -85
- package/src/worker-utils/lib/worker-farm/worker-pool.ts +0 -316
- package/src/worker-utils/lib/worker-farm/worker-thread.ts +0 -206
package/dist/null-worker-node.js
CHANGED
|
@@ -5,6 +5,18 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res, err) => function __init() {
|
|
9
|
+
if (err) throw err[0];
|
|
10
|
+
try {
|
|
11
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw err = [e], e;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
8
20
|
var __copyProps = (to, from, except, desc) => {
|
|
9
21
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
22
|
for (let key of __getOwnPropNames(from))
|
|
@@ -23,23 +35,81 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
35
|
));
|
|
24
36
|
|
|
25
37
|
// src/worker-utils/lib/node/worker_threads.ts
|
|
26
|
-
var
|
|
27
|
-
|
|
38
|
+
var worker_threads_exports = {};
|
|
39
|
+
__export(worker_threads_exports, {
|
|
40
|
+
BroadcastChannel: () => import_worker_threads3.BroadcastChannel,
|
|
41
|
+
MessageChannel: () => import_worker_threads3.MessageChannel,
|
|
42
|
+
MessagePort: () => import_worker_threads3.MessagePort,
|
|
43
|
+
NodeWorker: () => NodeWorker,
|
|
44
|
+
SHARE_ENV: () => import_worker_threads3.SHARE_ENV,
|
|
45
|
+
Worker: () => import_worker_threads3.Worker,
|
|
46
|
+
getEnvironmentData: () => import_worker_threads3.getEnvironmentData,
|
|
47
|
+
isInternalThread: () => isInternalThread2,
|
|
48
|
+
isMainThread: () => import_worker_threads3.isMainThread,
|
|
49
|
+
isMarkedAsUntransferable: () => import_worker_threads3.isMarkedAsUntransferable,
|
|
50
|
+
locks: () => locks2,
|
|
51
|
+
markAsUncloneable: () => import_worker_threads3.markAsUncloneable,
|
|
52
|
+
markAsUntransferable: () => import_worker_threads3.markAsUntransferable,
|
|
53
|
+
moveMessagePortToContext: () => import_worker_threads3.moveMessagePortToContext,
|
|
54
|
+
parentPort: () => parentPort2,
|
|
55
|
+
postMessageToThread: () => import_worker_threads3.postMessageToThread,
|
|
56
|
+
receiveMessageOnPort: () => import_worker_threads3.receiveMessageOnPort,
|
|
57
|
+
resourceLimits: () => import_worker_threads3.resourceLimits,
|
|
58
|
+
setEnvironmentData: () => import_worker_threads3.setEnvironmentData,
|
|
59
|
+
structuredClone: () => structuredClone3,
|
|
60
|
+
threadId: () => import_worker_threads3.threadId,
|
|
61
|
+
threadName: () => threadName2,
|
|
62
|
+
workerData: () => import_worker_threads3.workerData
|
|
63
|
+
});
|
|
64
|
+
var WorkerThreads, import_worker_threads3, parentPort2, NodeWorker, isInternalThread2, threadName2, locks2, structuredClone3;
|
|
65
|
+
var init_worker_threads = __esm({
|
|
66
|
+
"src/worker-utils/lib/node/worker_threads.ts"() {
|
|
67
|
+
"use strict";
|
|
68
|
+
WorkerThreads = __toESM(require("worker_threads"), 1);
|
|
69
|
+
import_worker_threads3 = require("worker_threads");
|
|
70
|
+
parentPort2 = WorkerThreads == null ? void 0 : WorkerThreads.parentPort;
|
|
71
|
+
NodeWorker = WorkerThreads.Worker;
|
|
72
|
+
isInternalThread2 = WorkerThreads.isInternalThread;
|
|
73
|
+
threadName2 = WorkerThreads.threadName;
|
|
74
|
+
locks2 = WorkerThreads.locks;
|
|
75
|
+
structuredClone3 = WorkerThreads.structuredClone;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
28
78
|
|
|
29
|
-
//
|
|
79
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/node/worker_threads.js
|
|
80
|
+
var import_worker_threads = require("worker_threads");
|
|
81
|
+
var parentPort = import_worker_threads.parentPort;
|
|
82
|
+
|
|
83
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-utils/get-transfer-list.js
|
|
30
84
|
function getTransferList(object, recursive = true, transfers) {
|
|
31
85
|
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
86
|
+
const seen = /* @__PURE__ */ new Set();
|
|
87
|
+
function visit(value) {
|
|
88
|
+
if (!value || typeof value !== "object" || seen.has(value))
|
|
89
|
+
return;
|
|
90
|
+
seen.add(value);
|
|
91
|
+
if (isTransferable(value))
|
|
92
|
+
transfersSet.add(value);
|
|
93
|
+
else if (ArrayBuffer.isView(value)) {
|
|
94
|
+
if (isTransferable(value.buffer))
|
|
95
|
+
transfersSet.add(value.buffer);
|
|
96
|
+
} else if (recursive && typeof MessageChannel !== "undefined" && value instanceof MessageChannel) {
|
|
97
|
+
visit(value.port1);
|
|
98
|
+
visit(value.port2);
|
|
99
|
+
} else if (recursive && value instanceof Map) {
|
|
100
|
+
for (const [key, item] of value) {
|
|
101
|
+
visit(key);
|
|
102
|
+
visit(item);
|
|
103
|
+
}
|
|
104
|
+
} else if (recursive && value instanceof Set) {
|
|
105
|
+
for (const item of value)
|
|
106
|
+
visit(item);
|
|
107
|
+
} else if (recursive) {
|
|
108
|
+
for (const key of Object.keys(value))
|
|
109
|
+
visit(value[key]);
|
|
41
110
|
}
|
|
42
111
|
}
|
|
112
|
+
visit(object);
|
|
43
113
|
return transfers === void 0 ? Array.from(transfersSet) : [];
|
|
44
114
|
}
|
|
45
115
|
function isTransferable(object) {
|
|
@@ -61,7 +131,7 @@ function isTransferable(object) {
|
|
|
61
131
|
return false;
|
|
62
132
|
}
|
|
63
133
|
|
|
64
|
-
//
|
|
134
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-farm/worker-body.js
|
|
65
135
|
async function getParentPort() {
|
|
66
136
|
return parentPort;
|
|
67
137
|
}
|
|
@@ -69,23 +139,24 @@ var onMessageWrapperMap = /* @__PURE__ */ new Map();
|
|
|
69
139
|
var WorkerBody = class {
|
|
70
140
|
/** Check that we are actually in a worker thread */
|
|
71
141
|
static async inWorkerThread() {
|
|
72
|
-
|
|
142
|
+
const workerGlobalScope = globalThis.WorkerGlobalScope;
|
|
143
|
+
return typeof workerGlobalScope === "function" && globalThis instanceof workerGlobalScope || Boolean(await getParentPort());
|
|
73
144
|
}
|
|
74
145
|
/*
|
|
75
146
|
* (type: WorkerMessageType, payload: WorkerMessagePayload) => any
|
|
76
147
|
*/
|
|
77
148
|
static set onmessage(onMessage) {
|
|
78
149
|
async function handleMessage(message) {
|
|
79
|
-
const
|
|
80
|
-
const { type, payload } =
|
|
150
|
+
const parentPort3 = await getParentPort();
|
|
151
|
+
const { type, payload } = parentPort3 ? message : message.data;
|
|
81
152
|
onMessage(type, payload);
|
|
82
153
|
}
|
|
83
|
-
getParentPort().then((
|
|
84
|
-
if (
|
|
85
|
-
|
|
154
|
+
getParentPort().then((parentPort3) => {
|
|
155
|
+
if (parentPort3) {
|
|
156
|
+
parentPort3.on("message", (message) => {
|
|
86
157
|
handleMessage(message);
|
|
87
158
|
});
|
|
88
|
-
|
|
159
|
+
parentPort3.on("exit", () => console.debug("Node worker closing"));
|
|
89
160
|
} else {
|
|
90
161
|
globalThis.onmessage = handleMessage;
|
|
91
162
|
}
|
|
@@ -103,9 +174,9 @@ var WorkerBody = class {
|
|
|
103
174
|
};
|
|
104
175
|
onMessageWrapperMap.set(onMessage, onMessageWrapper);
|
|
105
176
|
}
|
|
106
|
-
const
|
|
107
|
-
if (
|
|
108
|
-
|
|
177
|
+
const parentPort3 = await getParentPort();
|
|
178
|
+
if (parentPort3) {
|
|
179
|
+
parentPort3.on("message", onMessageWrapper);
|
|
109
180
|
} else {
|
|
110
181
|
globalThis.addEventListener("message", onMessageWrapper);
|
|
111
182
|
}
|
|
@@ -116,9 +187,9 @@ var WorkerBody = class {
|
|
|
116
187
|
if (!onMessageWrapper) {
|
|
117
188
|
return;
|
|
118
189
|
}
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
|
|
190
|
+
const parentPort3 = await getParentPort();
|
|
191
|
+
if (parentPort3) {
|
|
192
|
+
parentPort3.off("message", onMessageWrapper);
|
|
122
193
|
} else {
|
|
123
194
|
globalThis.removeEventListener("message", onMessageWrapper);
|
|
124
195
|
}
|
|
@@ -128,12 +199,12 @@ var WorkerBody = class {
|
|
|
128
199
|
* @param type
|
|
129
200
|
* @param payload
|
|
130
201
|
*/
|
|
131
|
-
static async postMessage(type, payload) {
|
|
202
|
+
static async postMessage(type, payload, copy = false) {
|
|
132
203
|
const data = { source: "loaders.gl", type, payload };
|
|
133
|
-
const transferList = getTransferList(payload);
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
|
|
204
|
+
const transferList = copy ? [] : getTransferList(payload);
|
|
205
|
+
const parentPort3 = await getParentPort();
|
|
206
|
+
if (parentPort3) {
|
|
207
|
+
parentPort3.postMessage(data, transferList);
|
|
137
208
|
} else {
|
|
138
209
|
globalThis.postMessage(data, transferList);
|
|
139
210
|
}
|
|
@@ -147,11 +218,8 @@ function getWorkerMessageData(message) {
|
|
|
147
218
|
return messageData && typeof messageData.source === "string" && messageData.source.startsWith("loaders.gl") ? messageData : null;
|
|
148
219
|
}
|
|
149
220
|
|
|
150
|
-
//
|
|
221
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/async-queue/async-queue.js
|
|
151
222
|
var AsyncQueue = class {
|
|
152
|
-
_values;
|
|
153
|
-
_settlers;
|
|
154
|
-
_closed;
|
|
155
223
|
constructor() {
|
|
156
224
|
this._values = [];
|
|
157
225
|
this._settlers = [];
|
|
@@ -217,11 +285,58 @@ var AsyncQueue = class {
|
|
|
217
285
|
}
|
|
218
286
|
};
|
|
219
287
|
|
|
220
|
-
//
|
|
288
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/shared-state.js
|
|
289
|
+
var SharedWorkerState = class {
|
|
290
|
+
constructor(buffer) {
|
|
291
|
+
if (typeof SharedArrayBuffer === "undefined" || !(buffer instanceof SharedArrayBuffer) || buffer.byteLength !== 16)
|
|
292
|
+
throw new Error("Expected a 16-byte shared worker control buffer");
|
|
293
|
+
this.buffer = buffer;
|
|
294
|
+
this.values = new Int32Array(buffer);
|
|
295
|
+
}
|
|
296
|
+
get snapshot() {
|
|
297
|
+
return {
|
|
298
|
+
cancelled: Atomics.load(this.values, 0) !== 0,
|
|
299
|
+
completed: Atomics.load(this.values, 1),
|
|
300
|
+
total: Atomics.load(this.values, 2),
|
|
301
|
+
revision: Atomics.load(this.values, 3)
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
cancel() {
|
|
305
|
+
Atomics.store(this.values, 0, 1);
|
|
306
|
+
Atomics.add(this.values, 3, 1);
|
|
307
|
+
Atomics.notify(this.values, 0);
|
|
308
|
+
}
|
|
309
|
+
throwIfCancelled() {
|
|
310
|
+
if (Atomics.load(this.values, 0) !== 0) {
|
|
311
|
+
const error = new Error("Shared worker task was cancelled");
|
|
312
|
+
error.name = "AbortError";
|
|
313
|
+
throw error;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/** Integer counters for application-defined work; messages still carry phase names and units. */
|
|
317
|
+
setProgress(completed, total = -1) {
|
|
318
|
+
if (!Number.isInteger(completed) || completed < 0 || completed > 2147483647 || !Number.isInteger(total) || total < -1 || total > 2147483647) {
|
|
319
|
+
throw new RangeError("Shared progress requires nonnegative int32 counts (or total -1)");
|
|
320
|
+
}
|
|
321
|
+
Atomics.store(this.values, 1, completed);
|
|
322
|
+
Atomics.store(this.values, 2, total);
|
|
323
|
+
Atomics.add(this.values, 3, 1);
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/validate-output-ownership.js
|
|
328
|
+
function validateOutputOwnership(ownership) {
|
|
329
|
+
if (ownership !== void 0 && ownership !== "copy" && ownership !== "transfer") {
|
|
330
|
+
throw new Error("Invalid worker output ownership");
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/lib/worker-api/create-worker.js
|
|
221
335
|
var requestId = 0;
|
|
336
|
+
var activeController = null;
|
|
222
337
|
var activeInputBatches = null;
|
|
223
338
|
var activeOutputAcknowledgements = null;
|
|
224
|
-
async function createWorker(
|
|
339
|
+
async function createWorker(process2, processInBatches, preload) {
|
|
225
340
|
if (!await WorkerBody.inWorkerThread()) {
|
|
226
341
|
return;
|
|
227
342
|
}
|
|
@@ -229,27 +344,60 @@ async function createWorker(process, processInBatches) {
|
|
|
229
344
|
process: processOnMainThread
|
|
230
345
|
};
|
|
231
346
|
WorkerBody.onmessage = async (type, payload) => {
|
|
347
|
+
var _a, _b, _c, _d, _e;
|
|
348
|
+
if (type === "cancel") {
|
|
349
|
+
activeController == null ? void 0 : activeController.abort();
|
|
350
|
+
activeInputBatches == null ? void 0 : activeInputBatches.close();
|
|
351
|
+
activeOutputAcknowledgements == null ? void 0 : activeOutputAcknowledgements.close();
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
const controller = type === "process" || type === "process-in-batches" ? new AbortController() : void 0;
|
|
355
|
+
if (controller)
|
|
356
|
+
activeController = controller;
|
|
357
|
+
const startedAt = performance.now();
|
|
232
358
|
const reporter = type === "process" || type === "process-in-batches" ? createProgressReporter() : void 0;
|
|
233
|
-
|
|
359
|
+
let sharedState;
|
|
360
|
+
const throwIfAborted = () => {
|
|
361
|
+
controller == null ? void 0 : controller.signal.throwIfAborted();
|
|
362
|
+
sharedState == null ? void 0 : sharedState.throwIfCancelled();
|
|
363
|
+
};
|
|
364
|
+
const jobContext = {
|
|
365
|
+
...context,
|
|
366
|
+
signal: controller == null ? void 0 : controller.signal,
|
|
367
|
+
sharedState,
|
|
368
|
+
throwIfAborted,
|
|
369
|
+
reportProgress: (progress) => {
|
|
370
|
+
if (!(controller == null ? void 0 : controller.signal.aborted) && !(sharedState == null ? void 0 : sharedState.snapshot.cancelled))
|
|
371
|
+
reporter == null ? void 0 : reporter.report(progress);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
234
374
|
try {
|
|
375
|
+
if (controller && ((_a = payload.options) == null ? void 0 : _a["sharedState"])) {
|
|
376
|
+
sharedState = new SharedWorkerState(payload.options["sharedState"]);
|
|
377
|
+
jobContext.sharedState = sharedState;
|
|
378
|
+
}
|
|
235
379
|
switch (type) {
|
|
236
380
|
case "preload":
|
|
381
|
+
await (preload == null ? void 0 : preload());
|
|
237
382
|
WorkerBody.postMessage("done", {});
|
|
238
383
|
break;
|
|
239
384
|
case "process":
|
|
240
|
-
|
|
385
|
+
throwIfAborted();
|
|
386
|
+
validateOutputOwnership((_b = payload.options) == null ? void 0 : _b["outputOwnership"]);
|
|
387
|
+
if (!process2) {
|
|
241
388
|
throw new Error("Worker does not support atomic processing");
|
|
242
389
|
}
|
|
243
|
-
const result = await
|
|
244
|
-
|
|
245
|
-
payload.options || {},
|
|
246
|
-
jobContext,
|
|
247
|
-
payload.context || {}
|
|
248
|
-
);
|
|
390
|
+
const result = await process2(payload.input, payload.options || {}, jobContext, payload.context || {});
|
|
391
|
+
throwIfAborted();
|
|
249
392
|
reporter == null ? void 0 : reporter.finish();
|
|
250
|
-
WorkerBody.postMessage("done", {
|
|
393
|
+
await WorkerBody.postMessage("done", {
|
|
394
|
+
result,
|
|
395
|
+
executionMs: performance.now() - startedAt
|
|
396
|
+
}, ((_c = payload.options) == null ? void 0 : _c["outputOwnership"]) === "copy");
|
|
251
397
|
break;
|
|
252
398
|
case "process-in-batches":
|
|
399
|
+
throwIfAborted();
|
|
400
|
+
validateOutputOwnership((_d = payload.options) == null ? void 0 : _d["outputOwnership"]);
|
|
253
401
|
if (!processInBatches) {
|
|
254
402
|
throw new Error("Worker does not support batched processing");
|
|
255
403
|
}
|
|
@@ -258,18 +406,15 @@ async function createWorker(process, processInBatches) {
|
|
|
258
406
|
activeInputBatches = inputBatches;
|
|
259
407
|
activeOutputAcknowledgements = outputAcknowledgements;
|
|
260
408
|
try {
|
|
261
|
-
const resultIterator = processInBatches(
|
|
262
|
-
createDemandDrivenIterator(inputBatches),
|
|
263
|
-
payload.options || {},
|
|
264
|
-
jobContext,
|
|
265
|
-
payload.context || {}
|
|
266
|
-
);
|
|
409
|
+
const resultIterator = processInBatches(createDemandDrivenIterator(inputBatches), payload.options || {}, jobContext, payload.context || {});
|
|
267
410
|
for await (const batch of resultIterator) {
|
|
268
|
-
|
|
411
|
+
throwIfAborted();
|
|
412
|
+
await WorkerBody.postMessage("output-batch", { result: batch }, ((_e = payload.options) == null ? void 0 : _e["outputOwnership"]) === "copy");
|
|
269
413
|
await outputAcknowledgements.next();
|
|
270
414
|
}
|
|
415
|
+
throwIfAborted();
|
|
271
416
|
reporter == null ? void 0 : reporter.finish();
|
|
272
|
-
await WorkerBody.postMessage("done", {});
|
|
417
|
+
await WorkerBody.postMessage("done", { executionMs: performance.now() - startedAt });
|
|
273
418
|
} finally {
|
|
274
419
|
activeInputBatches = null;
|
|
275
420
|
activeOutputAcknowledgements = null;
|
|
@@ -296,11 +441,18 @@ async function createWorker(process, processInBatches) {
|
|
|
296
441
|
default:
|
|
297
442
|
}
|
|
298
443
|
} catch (error) {
|
|
299
|
-
reporter == null ? void 0 : reporter.finish();
|
|
444
|
+
reporter == null ? void 0 : reporter.finish((controller == null ? void 0 : controller.signal.aborted) || (sharedState == null ? void 0 : sharedState.snapshot.cancelled));
|
|
300
445
|
const message = error instanceof Error ? error.message : "";
|
|
301
|
-
WorkerBody.postMessage("error", {
|
|
446
|
+
await WorkerBody.postMessage("error", {
|
|
447
|
+
error: message,
|
|
448
|
+
errorName: error instanceof Error ? error.name : "Error"
|
|
449
|
+
});
|
|
450
|
+
} finally {
|
|
451
|
+
if (controller && activeController === controller)
|
|
452
|
+
activeController = null;
|
|
302
453
|
}
|
|
303
454
|
};
|
|
455
|
+
await WorkerBody.postMessage("ready", {});
|
|
304
456
|
}
|
|
305
457
|
async function* createDemandDrivenIterator(inputBatches) {
|
|
306
458
|
while (true) {
|
|
@@ -313,62 +465,599 @@ async function* createDemandDrivenIterator(inputBatches) {
|
|
|
313
465
|
}
|
|
314
466
|
}
|
|
315
467
|
function processOnMainThread(arrayBuffer, options = {}, jobContext = {}) {
|
|
468
|
+
const signal = activeController == null ? void 0 : activeController.signal;
|
|
469
|
+
signal == null ? void 0 : signal.throwIfAborted();
|
|
316
470
|
return new Promise((resolve, reject) => {
|
|
317
471
|
const id = requestId++;
|
|
318
|
-
const
|
|
319
|
-
|
|
472
|
+
const cleanup = () => {
|
|
473
|
+
signal == null ? void 0 : signal.removeEventListener("abort", abort);
|
|
474
|
+
void WorkerBody.removeEventListener(onMessage);
|
|
475
|
+
};
|
|
476
|
+
const abort = () => {
|
|
477
|
+
cleanup();
|
|
478
|
+
reject(signal == null ? void 0 : signal.reason);
|
|
479
|
+
};
|
|
480
|
+
const onMessage = (type, payload) => {
|
|
481
|
+
if (payload.id !== id)
|
|
320
482
|
return;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
case "error":
|
|
328
|
-
WorkerBody.removeEventListener(onMessage);
|
|
329
|
-
reject(payload2.error);
|
|
330
|
-
break;
|
|
331
|
-
default:
|
|
483
|
+
if (type === "done") {
|
|
484
|
+
cleanup();
|
|
485
|
+
resolve(payload.result);
|
|
486
|
+
} else if (type === "error") {
|
|
487
|
+
cleanup();
|
|
488
|
+
reject(payload.error);
|
|
332
489
|
}
|
|
333
490
|
};
|
|
334
|
-
WorkerBody.addEventListener(onMessage)
|
|
335
|
-
|
|
336
|
-
|
|
491
|
+
void WorkerBody.addEventListener(onMessage).then(async () => {
|
|
492
|
+
if (signal == null ? void 0 : signal.aborted) {
|
|
493
|
+
abort();
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
signal == null ? void 0 : signal.addEventListener("abort", abort, { once: true });
|
|
497
|
+
await WorkerBody.postMessage("process", {
|
|
498
|
+
id,
|
|
499
|
+
input: arrayBuffer,
|
|
500
|
+
options,
|
|
501
|
+
context: jobContext
|
|
502
|
+
});
|
|
503
|
+
}).catch((error) => {
|
|
504
|
+
cleanup();
|
|
505
|
+
reject(error);
|
|
506
|
+
});
|
|
337
507
|
});
|
|
338
508
|
}
|
|
339
509
|
function createProgressReporter() {
|
|
340
|
-
let
|
|
510
|
+
let pending2;
|
|
341
511
|
let finished = false;
|
|
342
512
|
let scheduled = false;
|
|
343
513
|
const flush = () => {
|
|
344
514
|
scheduled = false;
|
|
345
|
-
if (
|
|
346
|
-
WorkerBody.postMessage("progress", { progress:
|
|
347
|
-
|
|
515
|
+
if (pending2) {
|
|
516
|
+
WorkerBody.postMessage("progress", { progress: pending2 });
|
|
517
|
+
pending2 = void 0;
|
|
348
518
|
}
|
|
349
519
|
};
|
|
350
520
|
return {
|
|
351
521
|
/** Records progress while retaining phase transitions. */
|
|
352
522
|
report(progress) {
|
|
353
|
-
if (finished)
|
|
354
|
-
|
|
355
|
-
|
|
523
|
+
if (finished)
|
|
524
|
+
return;
|
|
525
|
+
if (pending2 && pending2.phase !== progress.phase)
|
|
526
|
+
flush();
|
|
527
|
+
pending2 = { ...progress };
|
|
356
528
|
if (!scheduled) {
|
|
357
529
|
scheduled = true;
|
|
358
530
|
setTimeout(flush, 0);
|
|
359
531
|
}
|
|
360
532
|
},
|
|
361
533
|
/** Flushes final progress and suppresses reports from stale callbacks. */
|
|
362
|
-
finish() {
|
|
534
|
+
finish(discard = false) {
|
|
535
|
+
if (discard)
|
|
536
|
+
pending2 = void 0;
|
|
363
537
|
flush();
|
|
364
538
|
finished = true;
|
|
365
539
|
}
|
|
366
540
|
};
|
|
367
541
|
}
|
|
368
542
|
|
|
543
|
+
// ../../node_modules/@math.gl/tasks/dist/worker-utils/index.js
|
|
544
|
+
var import_meta = {};
|
|
545
|
+
var path = typeof __filename === "string" ? __filename.replace(/\\/g, "/") : "";
|
|
546
|
+
var moduleUrl = path ? `file://${path.startsWith("/") ? "" : "/"}${encodeURI(path).replace(/#/g, "%23").replace(/\?/g, "%3F")}` : import_meta.url;
|
|
547
|
+
|
|
548
|
+
// ../../node_modules/@math.gl/tasks/dist/tasks/task-preload.js
|
|
549
|
+
var pending = /* @__PURE__ */ new WeakMap();
|
|
550
|
+
var loaded = /* @__PURE__ */ new WeakSet();
|
|
551
|
+
function preloadTaskCode(task, signal) {
|
|
552
|
+
if (!task.preload)
|
|
553
|
+
return Promise.resolve();
|
|
554
|
+
let promise = pending.get(task);
|
|
555
|
+
if (!promise) {
|
|
556
|
+
promise = Promise.resolve().then(() => task.preload()).then(() => {
|
|
557
|
+
loaded.add(task);
|
|
558
|
+
});
|
|
559
|
+
pending.set(task, promise);
|
|
560
|
+
void promise.catch(() => pending.delete(task));
|
|
561
|
+
}
|
|
562
|
+
return withSignal(promise, signal);
|
|
563
|
+
}
|
|
564
|
+
function withSignal(operation, signal) {
|
|
565
|
+
if (!signal)
|
|
566
|
+
return operation;
|
|
567
|
+
return new Promise((resolve, reject) => {
|
|
568
|
+
const abort = () => {
|
|
569
|
+
signal.removeEventListener("abort", abort);
|
|
570
|
+
reject(signal.reason);
|
|
571
|
+
};
|
|
572
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
573
|
+
if (signal.aborted)
|
|
574
|
+
abort();
|
|
575
|
+
operation.then((value) => {
|
|
576
|
+
signal.removeEventListener("abort", abort);
|
|
577
|
+
resolve(value);
|
|
578
|
+
}, (error) => {
|
|
579
|
+
signal.removeEventListener("abort", abort);
|
|
580
|
+
reject(error);
|
|
581
|
+
});
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
// ../../node_modules/@math.gl/tasks/dist/tasks/task-channel.js
|
|
586
|
+
var TaskRequestError = class extends Error {
|
|
587
|
+
};
|
|
588
|
+
var TaskChannel = class {
|
|
589
|
+
constructor(options) {
|
|
590
|
+
this.options = options;
|
|
591
|
+
this.nextId = 1;
|
|
592
|
+
this.pending = /* @__PURE__ */ new Map();
|
|
593
|
+
this.incoming = /* @__PURE__ */ new Map();
|
|
594
|
+
}
|
|
595
|
+
/** Send a request without serializing other in-flight requests. */
|
|
596
|
+
request(operation, value, signal, transfer = []) {
|
|
597
|
+
if (this.failure)
|
|
598
|
+
return Promise.reject(this.failure.reason);
|
|
599
|
+
if (signal == null ? void 0 : signal.aborted)
|
|
600
|
+
return Promise.reject(signal.reason);
|
|
601
|
+
const id = this.nextId++;
|
|
602
|
+
return new Promise((resolve, reject) => {
|
|
603
|
+
const abort = () => {
|
|
604
|
+
const pending2 = this.pending.get(id);
|
|
605
|
+
if (!pending2)
|
|
606
|
+
return;
|
|
607
|
+
this.pending.delete(id);
|
|
608
|
+
pending2.cleanup();
|
|
609
|
+
reject(signal == null ? void 0 : signal.reason);
|
|
610
|
+
this.send({ source: "math.gl/tasks", kind: "cancel", id });
|
|
611
|
+
};
|
|
612
|
+
this.pending.set(id, {
|
|
613
|
+
resolve,
|
|
614
|
+
reject,
|
|
615
|
+
cleanup: () => signal == null ? void 0 : signal.removeEventListener("abort", abort)
|
|
616
|
+
});
|
|
617
|
+
signal == null ? void 0 : signal.addEventListener("abort", abort, { once: true });
|
|
618
|
+
this.send({ source: "math.gl/tasks", kind: "request", id, operation, value }, transfer);
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
/** Send a one-way notification. */
|
|
622
|
+
emit(operation, value, transfer = []) {
|
|
623
|
+
if (this.failure)
|
|
624
|
+
throw this.failure.reason;
|
|
625
|
+
this.send({ source: "math.gl/tasks", kind: "event", id: 0, operation, value }, transfer);
|
|
626
|
+
}
|
|
627
|
+
/** Dispatch a transport message; unrelated protocols are ignored. */
|
|
628
|
+
receive(message) {
|
|
629
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
630
|
+
if (this.failure || (message == null ? void 0 : message.source) !== "math.gl/tasks")
|
|
631
|
+
return;
|
|
632
|
+
if (message.kind === "failure") {
|
|
633
|
+
const reason = new Error(((_a = message.error) == null ? void 0 : _a.message) ?? "Task channel failed");
|
|
634
|
+
this.close(reason);
|
|
635
|
+
(_c = (_b = this.options).onFailure) == null ? void 0 : _c.call(_b, reason);
|
|
636
|
+
} else if (message.kind === "result" || message.kind === "error") {
|
|
637
|
+
const pending2 = this.pending.get(message.id);
|
|
638
|
+
if (!pending2)
|
|
639
|
+
return;
|
|
640
|
+
this.pending.delete(message.id);
|
|
641
|
+
pending2.cleanup();
|
|
642
|
+
if (message.kind === "result")
|
|
643
|
+
pending2.resolve(message.value);
|
|
644
|
+
else {
|
|
645
|
+
const error = new TaskRequestError(((_d = message.error) == null ? void 0 : _d.message) ?? "Task request failed");
|
|
646
|
+
error.name = ((_e = message.error) == null ? void 0 : _e.name) ?? "Error";
|
|
647
|
+
pending2.reject(error);
|
|
648
|
+
}
|
|
649
|
+
} else if (message.kind === "cancel") {
|
|
650
|
+
(_f = this.incoming.get(message.id)) == null ? void 0 : _f.abort(new DOMException("Task request cancelled", "AbortError"));
|
|
651
|
+
} else if (message.kind === "event") {
|
|
652
|
+
try {
|
|
653
|
+
(_h = (_g = this.options).handleEvent) == null ? void 0 : _h.call(_g, message.operation, message.value);
|
|
654
|
+
} catch (error) {
|
|
655
|
+
this.fail(error);
|
|
656
|
+
}
|
|
657
|
+
} else if (message.kind === "request") {
|
|
658
|
+
if (this.incoming.has(message.id)) {
|
|
659
|
+
this.fail(new Error("Duplicate task request identifier"));
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
const controller = new AbortController();
|
|
663
|
+
this.incoming.set(message.id, controller);
|
|
664
|
+
void Promise.resolve().then(() => {
|
|
665
|
+
controller.signal.throwIfAborted();
|
|
666
|
+
return this.options.handleRequest(message.operation, message.value, controller.signal);
|
|
667
|
+
}).then((value) => {
|
|
668
|
+
var _a2, _b2;
|
|
669
|
+
if (!controller.signal.aborted && !this.failure) {
|
|
670
|
+
this.send({ source: "math.gl/tasks", kind: "result", id: message.id, value }, (_b2 = (_a2 = this.options).getResultTransferList) == null ? void 0 : _b2.call(_a2, value, message.value));
|
|
671
|
+
}
|
|
672
|
+
}).catch((reason) => {
|
|
673
|
+
if (!controller.signal.aborted && !this.failure) {
|
|
674
|
+
this.send({
|
|
675
|
+
source: "math.gl/tasks",
|
|
676
|
+
kind: "error",
|
|
677
|
+
id: message.id,
|
|
678
|
+
error: {
|
|
679
|
+
name: reason instanceof Error ? reason.name : "Error",
|
|
680
|
+
message: reason instanceof Error ? reason.message : String(reason)
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
}).finally(() => this.incoming.delete(message.id));
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
/** Reject all outstanding calls with a common cause and abort incoming callbacks. */
|
|
688
|
+
close(reason = new Error("Task channel closed")) {
|
|
689
|
+
if (this.failure)
|
|
690
|
+
return;
|
|
691
|
+
this.failure = { reason };
|
|
692
|
+
for (const pending2 of this.pending.values()) {
|
|
693
|
+
pending2.cleanup();
|
|
694
|
+
pending2.reject(reason);
|
|
695
|
+
}
|
|
696
|
+
this.pending.clear();
|
|
697
|
+
for (const controller of this.incoming.values())
|
|
698
|
+
controller.abort(reason);
|
|
699
|
+
this.incoming.clear();
|
|
700
|
+
}
|
|
701
|
+
send(message, transfer = []) {
|
|
702
|
+
if (this.failure)
|
|
703
|
+
return;
|
|
704
|
+
try {
|
|
705
|
+
this.options.send(message, transfer);
|
|
706
|
+
} catch (error) {
|
|
707
|
+
this.fail(error);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
/** Invalidate the channel and notify the peer when the transport still works. */
|
|
711
|
+
fail(reason) {
|
|
712
|
+
var _a, _b;
|
|
713
|
+
if (this.failure)
|
|
714
|
+
return;
|
|
715
|
+
this.close(reason);
|
|
716
|
+
try {
|
|
717
|
+
this.options.send({
|
|
718
|
+
source: "math.gl/tasks",
|
|
719
|
+
kind: "failure",
|
|
720
|
+
id: 0,
|
|
721
|
+
error: {
|
|
722
|
+
name: reason instanceof Error ? reason.name : "Error",
|
|
723
|
+
message: reason instanceof Error ? reason.message : String(reason)
|
|
724
|
+
}
|
|
725
|
+
}, []);
|
|
726
|
+
} catch {
|
|
727
|
+
}
|
|
728
|
+
(_b = (_a = this.options).onFailure) == null ? void 0 : _b.call(_a, reason);
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
|
|
732
|
+
// ../../node_modules/@math.gl/tasks/dist/tasks/task-runtime.js
|
|
733
|
+
function assertPayload(value) {
|
|
734
|
+
if (!value || typeof value !== "object" || Object.getPrototypeOf(value) !== Object.prototype) {
|
|
735
|
+
throw new TypeError("Task payloads must be plain objects with named fields");
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
function clonePayload(value, ownership = "copy") {
|
|
739
|
+
assertPayload(value);
|
|
740
|
+
if (!["copy", "transfer", "share"].includes(ownership))
|
|
741
|
+
throw new TypeError("Invalid input ownership");
|
|
742
|
+
const transfer = getTransferList(value);
|
|
743
|
+
if (ownership === "share" && transfer.length)
|
|
744
|
+
throw new TypeError("Share requires shared storage");
|
|
745
|
+
return structuredClone(value, {
|
|
746
|
+
transfer: ownership === "transfer" ? transfer : []
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
function taskContext(state, context = {}) {
|
|
750
|
+
const signal = context.signal ?? new AbortController().signal;
|
|
751
|
+
return {
|
|
752
|
+
state,
|
|
753
|
+
signal,
|
|
754
|
+
requestHost: async (operation, payload, controls) => {
|
|
755
|
+
signal.throwIfAborted();
|
|
756
|
+
if (!context.requestHost)
|
|
757
|
+
throw new Error("No host request handler configured");
|
|
758
|
+
return context.requestHost(operation, payload, controls);
|
|
759
|
+
},
|
|
760
|
+
emitHost: (operation, payload) => {
|
|
761
|
+
var _a;
|
|
762
|
+
signal.throwIfAborted();
|
|
763
|
+
(_a = context.emitHost) == null ? void 0 : _a.call(context, operation, payload);
|
|
764
|
+
},
|
|
765
|
+
throwIfAborted: () => {
|
|
766
|
+
var _a;
|
|
767
|
+
signal.throwIfAborted();
|
|
768
|
+
(_a = context.throwIfAborted) == null ? void 0 : _a.call(context);
|
|
769
|
+
},
|
|
770
|
+
reportProgress: (progress) => {
|
|
771
|
+
var _a;
|
|
772
|
+
return (_a = context.reportProgress) == null ? void 0 : _a.call(context, {
|
|
773
|
+
...progress,
|
|
774
|
+
phase: progress.phase ?? "process",
|
|
775
|
+
unit: progress.unit ?? "items"
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
var TaskRuntime = class {
|
|
781
|
+
constructor(task) {
|
|
782
|
+
this.task = task;
|
|
783
|
+
this.initialized = false;
|
|
784
|
+
}
|
|
785
|
+
async initialize(input, context = {}) {
|
|
786
|
+
var _a, _b, _c;
|
|
787
|
+
if (this.initialized)
|
|
788
|
+
throw new Error("Task is already initialized");
|
|
789
|
+
assertPayload(input);
|
|
790
|
+
await preloadTaskCode(this.task, context.signal);
|
|
791
|
+
(_a = context.signal) == null ? void 0 : _a.throwIfAborted();
|
|
792
|
+
this.state = await ((_c = (_b = this.task).initialize) == null ? void 0 : _c.call(_b, input, taskContext(void 0, context)));
|
|
793
|
+
this.initialized = true;
|
|
794
|
+
return {};
|
|
795
|
+
}
|
|
796
|
+
async destroy() {
|
|
797
|
+
var _a, _b;
|
|
798
|
+
if (this.initialized) {
|
|
799
|
+
this.initialized = false;
|
|
800
|
+
const state = this.state;
|
|
801
|
+
this.state = void 0;
|
|
802
|
+
if (this.task.initialize)
|
|
803
|
+
await ((_b = (_a = this.task).destroy) == null ? void 0 : _b.call(_a, state));
|
|
804
|
+
}
|
|
805
|
+
return {};
|
|
806
|
+
}
|
|
807
|
+
async process(input, options, context = {}) {
|
|
808
|
+
if (!this.initialized)
|
|
809
|
+
throw new Error("Task is not initialized");
|
|
810
|
+
if (!this.task.process)
|
|
811
|
+
throw new Error("Task has no atomic processor");
|
|
812
|
+
assertPayload(input);
|
|
813
|
+
const result = await this.task.process(input, options, taskContext(this.state, context));
|
|
814
|
+
assertPayload(result);
|
|
815
|
+
return result;
|
|
816
|
+
}
|
|
817
|
+
async *stream(inputs, options, context = {}) {
|
|
818
|
+
if (!this.initialized)
|
|
819
|
+
throw new Error("Task is not initialized");
|
|
820
|
+
if (!this.task.processInBatches)
|
|
821
|
+
throw new Error("Task has no streaming processor");
|
|
822
|
+
for await (const output of this.task.processInBatches(inputs, options, taskContext(this.state, context))) {
|
|
823
|
+
assertPayload(output);
|
|
824
|
+
yield output;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
async function initializeTaskWorker(task) {
|
|
829
|
+
if (!await WorkerBody.inWorkerThread())
|
|
830
|
+
throw new Error("initializeTaskWorker must run inside a worker");
|
|
831
|
+
if (installed)
|
|
832
|
+
throw new Error("A task is already installed in this worker");
|
|
833
|
+
installed = true;
|
|
834
|
+
const runtime = new TaskRuntime(task);
|
|
835
|
+
let channelStream;
|
|
836
|
+
const channel = new TaskChannel({
|
|
837
|
+
getResultTransferList: (value, request) => request.outputOwnership === "transfer" ? getTransferList(value) : [],
|
|
838
|
+
send: (message, transfer) => {
|
|
839
|
+
const snapshot = structuredClone(message, { transfer });
|
|
840
|
+
void WorkerBody.postMessage("task-channel", snapshot).catch((reason) => channel.fail(reason));
|
|
841
|
+
},
|
|
842
|
+
handleRequest: async (operation, value, signal) => {
|
|
843
|
+
var _a;
|
|
844
|
+
const request = value;
|
|
845
|
+
const context = {
|
|
846
|
+
signal,
|
|
847
|
+
reportProgress: (progress) => channel.emit("task:progress", { id: request.progressId, progress }),
|
|
848
|
+
requestHost: (operation2, payload, controls = {}) => {
|
|
849
|
+
const request2 = {
|
|
850
|
+
operation: operation2,
|
|
851
|
+
payload: clonePayload(payload, controls.inputOwnership),
|
|
852
|
+
outputOwnership: controls.outputOwnership ?? "copy"
|
|
853
|
+
};
|
|
854
|
+
return channel.request("task:host-request", request2, signal, getTransferList(request2));
|
|
855
|
+
},
|
|
856
|
+
emitHost: (operation2, payload) => channel.emit("task:host-event", { operation: operation2, payload, id: request.progressId })
|
|
857
|
+
};
|
|
858
|
+
switch (operation) {
|
|
859
|
+
case "initialize":
|
|
860
|
+
return runtime.initialize(request.input, context);
|
|
861
|
+
case "process":
|
|
862
|
+
return runtime.process(request.input, request.options, context);
|
|
863
|
+
case "stream-open": {
|
|
864
|
+
if (channelStream)
|
|
865
|
+
throw new Error("A task stream is already open");
|
|
866
|
+
async function* inputs() {
|
|
867
|
+
while (true) {
|
|
868
|
+
const result = await channel.request("task:next-input", { outputOwnership: "transfer" }, signal);
|
|
869
|
+
if (result.done)
|
|
870
|
+
return;
|
|
871
|
+
yield result.value;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
channelStream = runtime.stream(inputs(), request.options, context)[Symbol.asyncIterator]();
|
|
875
|
+
return {};
|
|
876
|
+
}
|
|
877
|
+
case "stream-next":
|
|
878
|
+
if (!channelStream)
|
|
879
|
+
throw new Error("No active task stream");
|
|
880
|
+
return channelStream.next();
|
|
881
|
+
case "stream-close":
|
|
882
|
+
try {
|
|
883
|
+
await ((_a = channelStream == null ? void 0 : channelStream.return) == null ? void 0 : _a.call(channelStream));
|
|
884
|
+
} finally {
|
|
885
|
+
channelStream = void 0;
|
|
886
|
+
}
|
|
887
|
+
return {};
|
|
888
|
+
case "destroy":
|
|
889
|
+
return runtime.destroy();
|
|
890
|
+
default:
|
|
891
|
+
throw new Error("Unknown task channel operation");
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
await WorkerBody.addEventListener((type, payload) => {
|
|
896
|
+
if (type === "task-channel")
|
|
897
|
+
channel.receive(payload);
|
|
898
|
+
});
|
|
899
|
+
let streamOptions = {};
|
|
900
|
+
return createWorker(async (request, _options, context) => {
|
|
901
|
+
switch (request.operation) {
|
|
902
|
+
case "initialize":
|
|
903
|
+
return runtime.initialize(request.input, context);
|
|
904
|
+
case "destroy":
|
|
905
|
+
return runtime.destroy();
|
|
906
|
+
case "stream-options":
|
|
907
|
+
streamOptions = request.options;
|
|
908
|
+
return {};
|
|
909
|
+
case "process":
|
|
910
|
+
return runtime.process(request.input, request.options, context);
|
|
911
|
+
default:
|
|
912
|
+
throw new Error("Unknown task operation");
|
|
913
|
+
}
|
|
914
|
+
}, async function* (inputs, _options, context) {
|
|
915
|
+
async function* batches() {
|
|
916
|
+
for await (const input of inputs) {
|
|
917
|
+
assertPayload(input);
|
|
918
|
+
yield input;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
try {
|
|
922
|
+
yield* runtime.stream(batches(), streamOptions, context);
|
|
923
|
+
} finally {
|
|
924
|
+
streamOptions = {};
|
|
925
|
+
}
|
|
926
|
+
}, () => preloadTaskCode(task));
|
|
927
|
+
}
|
|
928
|
+
var installed = false;
|
|
929
|
+
|
|
930
|
+
// src/worker-utils/lib/worker-api/task-runtime.ts
|
|
931
|
+
function normalizeTaskProgress(progress) {
|
|
932
|
+
return { ...progress, phase: progress.phase ?? "process", unit: progress.unit ?? "items" };
|
|
933
|
+
}
|
|
934
|
+
async function isWorkerThread() {
|
|
935
|
+
var _a;
|
|
936
|
+
if (typeof self !== "undefined" && typeof document === "undefined" && typeof self.postMessage === "function")
|
|
937
|
+
return true;
|
|
938
|
+
if (typeof process !== "undefined" && ((_a = process.versions) == null ? void 0 : _a.node)) {
|
|
939
|
+
const { isMainThread: isMainThread2 } = await Promise.resolve().then(() => (init_worker_threads(), worker_threads_exports));
|
|
940
|
+
return !isMainThread2;
|
|
941
|
+
}
|
|
942
|
+
return false;
|
|
943
|
+
}
|
|
944
|
+
var initializeTaskWorker2 = initializeTaskWorker;
|
|
945
|
+
|
|
946
|
+
// src/worker-utils/lib/worker-utils/get-transfer-list.ts
|
|
947
|
+
function getTransferList2(object, recursive = true, transfers) {
|
|
948
|
+
const transfersSet = transfers || /* @__PURE__ */ new Set();
|
|
949
|
+
if (!object) {
|
|
950
|
+
} else if (isTransferable2(object)) {
|
|
951
|
+
transfersSet.add(object);
|
|
952
|
+
} else if (isTransferable2(object.buffer)) {
|
|
953
|
+
transfersSet.add(object.buffer);
|
|
954
|
+
} else if (ArrayBuffer.isView(object)) {
|
|
955
|
+
} else if (recursive && typeof object === "object") {
|
|
956
|
+
for (const key in object) {
|
|
957
|
+
getTransferList2(object[key], recursive, transfersSet);
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
return transfers === void 0 ? Array.from(transfersSet) : [];
|
|
961
|
+
}
|
|
962
|
+
function isTransferable2(object) {
|
|
963
|
+
if (!object) {
|
|
964
|
+
return false;
|
|
965
|
+
}
|
|
966
|
+
if (object instanceof ArrayBuffer) {
|
|
967
|
+
return true;
|
|
968
|
+
}
|
|
969
|
+
if (typeof MessagePort !== "undefined" && object instanceof MessagePort) {
|
|
970
|
+
return true;
|
|
971
|
+
}
|
|
972
|
+
if (typeof ImageBitmap !== "undefined" && object instanceof ImageBitmap) {
|
|
973
|
+
return true;
|
|
974
|
+
}
|
|
975
|
+
if (typeof OffscreenCanvas !== "undefined" && object instanceof OffscreenCanvas) {
|
|
976
|
+
return true;
|
|
977
|
+
}
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
// src/worker-utils/lib/worker-api/create-worker.ts
|
|
982
|
+
async function createWorker2(process2, processInBatches) {
|
|
983
|
+
if (!await isWorkerThread()) return;
|
|
984
|
+
await initializeTaskWorker2(createWorkerTask(process2, processInBatches));
|
|
985
|
+
}
|
|
986
|
+
function createWorkerTask(process2, processInBatches) {
|
|
987
|
+
return {
|
|
988
|
+
id: "loaders.gl",
|
|
989
|
+
initialize: (state) => state,
|
|
990
|
+
destroy: (state) => {
|
|
991
|
+
var _a;
|
|
992
|
+
return (_a = state.port) == null ? void 0 : _a.close();
|
|
993
|
+
},
|
|
994
|
+
process: async ({ value }, options, context) => {
|
|
995
|
+
if (!process2) throw new Error("Worker does not support atomic processing");
|
|
996
|
+
return { value: await process2(value, options, createContext(context), context.state.context) };
|
|
997
|
+
},
|
|
998
|
+
...processInBatches ? {
|
|
999
|
+
processInBatches: async function* (inputs, options, context) {
|
|
1000
|
+
async function* values() {
|
|
1001
|
+
for await (const input of inputs) yield input.value;
|
|
1002
|
+
}
|
|
1003
|
+
for await (const value of processInBatches(
|
|
1004
|
+
values(),
|
|
1005
|
+
options,
|
|
1006
|
+
createContext(context),
|
|
1007
|
+
context.state.context
|
|
1008
|
+
)) {
|
|
1009
|
+
yield { value };
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
} : {}
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
function createContext(context) {
|
|
1016
|
+
let requestIdentifier = 0;
|
|
1017
|
+
const port = context.state.port;
|
|
1018
|
+
return {
|
|
1019
|
+
signal: context.signal,
|
|
1020
|
+
throwIfAborted: () => context.throwIfAborted(),
|
|
1021
|
+
reportProgress: (progress) => context.reportProgress(normalizeTaskProgress(progress)),
|
|
1022
|
+
process: port ? (input, options = {}, jobContext = {}) => {
|
|
1023
|
+
context.throwIfAborted();
|
|
1024
|
+
const identifier = ++requestIdentifier;
|
|
1025
|
+
return new Promise((resolve, reject) => {
|
|
1026
|
+
const onMessage = (event) => {
|
|
1027
|
+
if (event.data.identifier !== identifier) return;
|
|
1028
|
+
cleanup();
|
|
1029
|
+
if (event.data.error) {
|
|
1030
|
+
const error = new Error(event.data.error.message);
|
|
1031
|
+
error.name = event.data.error.name;
|
|
1032
|
+
reject(error);
|
|
1033
|
+
} else resolve(event.data.value);
|
|
1034
|
+
};
|
|
1035
|
+
const onAbort = () => {
|
|
1036
|
+
cleanup();
|
|
1037
|
+
reject(context.signal.reason);
|
|
1038
|
+
};
|
|
1039
|
+
const cleanup = () => {
|
|
1040
|
+
port.removeEventListener("message", onMessage);
|
|
1041
|
+
context.signal.removeEventListener("abort", onAbort);
|
|
1042
|
+
};
|
|
1043
|
+
port.addEventListener("message", onMessage);
|
|
1044
|
+
context.signal.addEventListener("abort", onAbort, { once: true });
|
|
1045
|
+
port.start();
|
|
1046
|
+
try {
|
|
1047
|
+
const request = { identifier, input, options, context: jobContext };
|
|
1048
|
+
port.postMessage(request, getTransferList2(request));
|
|
1049
|
+
} catch (error) {
|
|
1050
|
+
cleanup();
|
|
1051
|
+
reject(error);
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
} : void 0
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
|
|
369
1058
|
// src/loader-utils/lib/worker-loader-utils/create-loader-worker.ts
|
|
370
1059
|
async function createLoaderWorker(loader, selectLoader = () => loader) {
|
|
371
|
-
await
|
|
1060
|
+
await createWorker2(
|
|
372
1061
|
(input, options, workerContext, loaderContext) => processLoaderWorkerData(
|
|
373
1062
|
selectLoader(options || {}),
|
|
374
1063
|
input,
|
|
@@ -506,7 +1195,7 @@ function getWorkerLoaderOptions(loader, options) {
|
|
|
506
1195
|
}
|
|
507
1196
|
|
|
508
1197
|
// src/null-loader.ts
|
|
509
|
-
var VERSION = true ? "5.0.0-beta.
|
|
1198
|
+
var VERSION = true ? "5.0.0-beta.11" : "latest";
|
|
510
1199
|
var NullLoader = {
|
|
511
1200
|
dataType: null,
|
|
512
1201
|
batchType: null,
|