@loaders.gl/core 5.0.0-alpha.11 → 5.0.0-alpha.13
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/LICENSE +1 -1
- package/SCHEMA-README.md +9 -0
- package/SCHEMA-UTILS-README.md +11 -0
- package/dist/dist.dev.js +180 -146
- package/dist/dist.min.js +3 -3
- package/dist/index.cjs +107 -98
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/iterators/make-iterator/make-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-stream-iterator.js.map +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js +1 -1
- package/dist/iterators/make-iterator/make-string-iterator.js.map +1 -1
- package/dist/lib/api/core-api.d.ts +1 -1
- package/dist/lib/api/core-api.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.d.ts +1 -1
- package/dist/lib/api/create-data-source.d.ts.map +1 -1
- package/dist/lib/api/create-data-source.js +1 -1
- package/dist/lib/api/create-data-source.js.map +1 -1
- package/dist/lib/api/encode-table.d.ts +2 -2
- package/dist/lib/api/encode-table.d.ts.map +1 -1
- package/dist/lib/api/encode-table.js +1 -1
- package/dist/lib/api/encode-table.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 +2 -2
- package/dist/lib/api/encode.js.map +1 -1
- package/dist/lib/api/load-in-batches.d.ts +1 -1
- package/dist/lib/api/load-in-batches.d.ts.map +1 -1
- package/dist/lib/api/load-in-batches.js +1 -1
- package/dist/lib/api/load-in-batches.js.map +1 -1
- package/dist/lib/api/load-loader.d.ts +1 -1
- package/dist/lib/api/load-loader.d.ts.map +1 -1
- package/dist/lib/api/load-loader.js +1 -1
- package/dist/lib/api/load-loader.js.map +1 -1
- package/dist/lib/api/load.d.ts +1 -1
- package/dist/lib/api/load.d.ts.map +1 -1
- package/dist/lib/api/load.js +1 -1
- package/dist/lib/api/load.js.map +1 -1
- package/dist/lib/api/parse-file.d.ts +1 -1
- package/dist/lib/api/parse-file.d.ts.map +1 -1
- package/dist/lib/api/parse-file.js +2 -2
- package/dist/lib/api/parse-file.js.map +1 -1
- package/dist/lib/api/parse-in-batches.d.ts +1 -1
- package/dist/lib/api/parse-in-batches.d.ts.map +1 -1
- package/dist/lib/api/parse-in-batches.js +40 -4
- package/dist/lib/api/parse-in-batches.js.map +1 -1
- package/dist/lib/api/parse-sync.d.ts +1 -1
- package/dist/lib/api/parse-sync.d.ts.map +1 -1
- package/dist/lib/api/parse-sync.js +1 -1
- package/dist/lib/api/parse-sync.js.map +1 -1
- package/dist/lib/api/parse.d.ts +1 -1
- package/dist/lib/api/parse.d.ts.map +1 -1
- package/dist/lib/api/parse.js +3 -3
- package/dist/lib/api/parse.js.map +1 -1
- package/dist/lib/api/preload.d.ts +1 -1
- package/dist/lib/api/preload.d.ts.map +1 -1
- package/dist/lib/api/preload.js.map +1 -1
- package/dist/lib/api/register-loaders.d.ts +1 -1
- package/dist/lib/api/register-loaders.d.ts.map +1 -1
- package/dist/lib/api/select-loader.d.ts +1 -1
- package/dist/lib/api/select-loader.d.ts.map +1 -1
- package/dist/lib/api/select-loader.js +1 -1
- package/dist/lib/api/select-loader.js.map +1 -1
- package/dist/lib/api/select-source.d.ts +1 -1
- package/dist/lib/api/select-source.d.ts.map +1 -1
- package/dist/lib/common.d.ts +1 -1
- package/dist/lib/common.d.ts.map +1 -1
- package/dist/lib/fetch/fetch-file.js +2 -2
- package/dist/lib/fetch/fetch-file.js.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts +1 -1
- package/dist/lib/filesystems/browser-filesystem.d.ts.map +1 -1
- package/dist/lib/filesystems/browser-filesystem.js +1 -1
- package/dist/lib/filesystems/browser-filesystem.js.map +1 -1
- package/dist/lib/init.js +2 -2
- package/dist/lib/init.js.map +1 -1
- package/dist/lib/loader-utils/get-data.d.ts +1 -1
- package/dist/lib/loader-utils/get-data.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-data.js +1 -1
- package/dist/lib/loader-utils/get-data.js.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts +1 -1
- package/dist/lib/loader-utils/get-fetch-function.d.ts.map +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js +1 -1
- package/dist/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts +1 -1
- package/dist/lib/loader-utils/loader-context.d.ts.map +1 -1
- package/dist/lib/loader-utils/loader-context.js +1 -1
- package/dist/lib/loader-utils/loader-context.js.map +1 -1
- package/dist/lib/loader-utils/loggers.d.ts +1 -1
- package/dist/lib/loader-utils/loggers.d.ts.map +1 -1
- package/dist/lib/loader-utils/loggers.js +1 -1
- package/dist/lib/loader-utils/loggers.js.map +1 -1
- package/dist/lib/loader-utils/normalize-loader.d.ts +1 -1
- package/dist/lib/loader-utils/normalize-loader.d.ts.map +1 -1
- package/dist/lib/loader-utils/normalize-loader.js +1 -1
- package/dist/lib/loader-utils/normalize-loader.js.map +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts +1 -1
- package/dist/lib/loader-utils/option-defaults.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-defaults.js +1 -1
- package/dist/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts +1 -1
- package/dist/lib/loader-utils/option-utils.d.ts.map +1 -1
- package/dist/lib/loader-utils/option-utils.js +1 -1
- package/dist/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/lib/utils/resource-utils.js +1 -1
- package/dist/lib/utils/resource-utils.js.map +1 -1
- package/dist/lib/utils/response-utils.js +1 -1
- package/dist/lib/utils/response-utils.js.map +1 -1
- package/dist/loader-utils/format-types.d.ts +32 -0
- package/dist/loader-utils/format-types.d.ts.map +1 -0
- package/dist/loader-utils/format-types.js +5 -0
- package/dist/loader-utils/format-types.js.map +1 -0
- package/dist/loader-utils/index.cjs +12416 -0
- package/dist/loader-utils/index.cjs.map +6 -0
- package/dist/loader-utils/index.d.ts +122 -0
- package/dist/loader-utils/index.d.ts.map +1 -0
- package/dist/loader-utils/index.js +91 -0
- package/dist/loader-utils/index.js.map +1 -0
- package/dist/loader-utils/json-loader.d.ts +27 -0
- package/dist/loader-utils/json-loader.d.ts.map +1 -0
- package/dist/loader-utils/json-loader.js +32 -0
- package/dist/loader-utils/json-loader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts +32 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js +88 -0
- package/dist/loader-utils/lib/binary-utils/array-buffer-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts +67 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js +245 -0
- package/dist/loader-utils/lib/binary-utils/binary-chunk-reader.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts +43 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js +92 -0
- package/dist/loader-utils/lib/binary-utils/dataview-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts +3 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js +15 -0
- package/dist/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts +17 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js +43 -0
- package/dist/loader-utils/lib/binary-utils/get-first-characters.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts +15 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js +51 -0
- package/dist/loader-utils/lib/binary-utils/hex-transcoder.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts +20 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js +82 -0
- package/dist/loader-utils/lib/binary-utils/memory-conversion-utils.js.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts +25 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js +59 -0
- package/dist/loader-utils/lib/binary-utils/memory-copy-utils.js.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts +31 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.d.ts.map +1 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js +20 -0
- package/dist/loader-utils/lib/crs/crs-reprojection.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts +6 -0
- package/dist/loader-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/assert.js +13 -0
- package/dist/loader-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts +15 -0
- package/dist/loader-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/loader-utils/lib/env-utils/globals.js +28 -0
- package/dist/loader-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts +40 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.js +68 -0
- package/dist/loader-utils/lib/file-provider/data-view-file.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts +54 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.js +102 -0
- package/dist/loader-utils/lib/file-provider/file-handle-file.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts +45 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js +13 -0
- package/dist/loader-utils/lib/file-provider/file-provider-interface.js.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts +57 -0
- package/dist/loader-utils/lib/file-provider/file-provider.d.ts.map +1 -0
- package/dist/loader-utils/lib/file-provider/file-provider.js +114 -0
- package/dist/loader-utils/lib/file-provider/file-provider.js.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts +21 -0
- package/dist/loader-utils/lib/files/array-buffer-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js +36 -0
- package/dist/loader-utils/lib/files/array-buffer-file.js.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts +19 -0
- package/dist/loader-utils/lib/files/blob-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/blob-file.js +39 -0
- package/dist/loader-utils/lib/files/blob-file.js.map +1 -0
- package/dist/loader-utils/lib/files/file.d.ts +33 -0
- package/dist/loader-utils/lib/files/file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/file.js +5 -0
- package/dist/loader-utils/lib/files/file.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts +37 -0
- package/dist/loader-utils/lib/files/http-file-transport.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-transport.js +290 -0
- package/dist/loader-utils/lib/files/http-file-transport.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts +49 -0
- package/dist/loader-utils/lib/files/http-file-types.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file-types.js +5 -0
- package/dist/loader-utils/lib/files/http-file-types.js.map +1 -0
- package/dist/loader-utils/lib/files/http-file.d.ts +55 -0
- package/dist/loader-utils/lib/files/http-file.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/http-file.js +213 -0
- package/dist/loader-utils/lib/files/http-file.js.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts +22 -0
- package/dist/loader-utils/lib/files/node-file-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/node-file-facade.js +45 -0
- package/dist/loader-utils/lib/files/node-file-facade.js.map +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts +1 -0
- package/dist/loader-utils/lib/files/sources.d.ts.map +1 -0
- package/dist/loader-utils/lib/files/sources.js +155 -0
- package/dist/loader-utils/lib/files/sources.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts +33 -0
- package/dist/loader-utils/lib/filesystems/filesystem.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js +5 -0
- package/dist/loader-utils/lib/filesystems/filesystem.js.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts +23 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.d.ts.map +1 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js +48 -0
- package/dist/loader-utils/lib/filesystems/node-filesystem-facade.js.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts +20 -0
- package/dist/loader-utils/lib/iterators/async-iteration.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js +102 -0
- package/dist/loader-utils/lib/iterators/async-iteration.js.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts +19 -0
- package/dist/loader-utils/lib/iterators/text-iterators.d.ts.map +1 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js +60 -0
- package/dist/loader-utils/lib/iterators/text-iterators.js.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts +59 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js +68 -0
- package/dist/loader-utils/lib/javascript-utils/is-type.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts +118 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js +427 -0
- package/dist/loader-utils/lib/laz/laz-arithmetic-encoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts +204 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js +4226 -0
- package/dist/loader-utils/lib/laz/laz-chunk-decoder.js.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts +40 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.d.ts.map +1 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js +1518 -0
- package/dist/loader-utils/lib/laz/laz-chunk-encoder.js.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts +4 -0
- package/dist/loader-utils/lib/log-utils/log.d.ts.map +1 -0
- package/dist/loader-utils/lib/log-utils/log.js +21 -0
- package/dist/loader-utils/lib/log-utils/log.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts +10 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js +44 -0
- package/dist/loader-utils/lib/module-utils/initialize-wasm-module.js.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts +18 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js +40 -0
- package/dist/loader-utils/lib/module-utils/js-module-utils.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.browser.js +20 -0
- package/dist/loader-utils/lib/node/buffer.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/buffer.d.ts +11 -0
- package/dist/loader-utils/lib/node/buffer.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/buffer.js +35 -0
- package/dist/loader-utils/lib/node/buffer.js.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/fs.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/fs.browser.js +5 -0
- package/dist/loader-utils/lib/node/fs.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/promisify.d.ts +13 -0
- package/dist/loader-utils/lib/node/promisify.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/promisify.js +19 -0
- package/dist/loader-utils/lib/node/promisify.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts +2 -0
- package/dist/loader-utils/lib/node/stream.browser.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.browser.js +5 -0
- package/dist/loader-utils/lib/node/stream.browser.js.map +1 -0
- package/dist/loader-utils/lib/node/stream.d.ts +6 -0
- package/dist/loader-utils/lib/node/stream.d.ts.map +1 -0
- package/dist/loader-utils/lib/node/stream.js +8 -0
- package/dist/loader-utils/lib/node/stream.js.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts +12 -0
- package/dist/loader-utils/lib/option-utils/merge-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js +34 -0
- package/dist/loader-utils/lib/option-utils/merge-options.js.map +1 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.d.ts +5 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.d.ts.map +1 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js +16 -0
- package/dist/loader-utils/lib/parser-utils/parse-json.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts +35 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js +64 -0
- package/dist/loader-utils/lib/path-utils/cached-uri-resolver.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts +17 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js +44 -0
- package/dist/loader-utils/lib/path-utils/file-aliases.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts +3 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js +12 -0
- package/dist/loader-utils/lib/path-utils/get-cwd.js.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts +24 -0
- package/dist/loader-utils/lib/path-utils/path.d.ts.map +1 -0
- package/dist/loader-utils/lib/path-utils/path.js +173 -0
- package/dist/loader-utils/lib/path-utils/path.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts +5 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js +59 -0
- package/dist/loader-utils/lib/request-utils/abort-utils.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts +56 -0
- package/dist/loader-utils/lib/request-utils/authentication.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/authentication.js +67 -0
- package/dist/loader-utils/lib/request-utils/authentication.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts +7 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js +20 -0
- package/dist/loader-utils/lib/request-utils/parse-content-type.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts +70 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js +203 -0
- package/dist/loader-utils/lib/request-utils/range-request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts +201 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js +636 -0
- package/dist/loader-utils/lib/request-utils/range-request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts +62 -0
- package/dist/loader-utils/lib/request-utils/request-cache.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js +236 -0
- package/dist/loader-utils/lib/request-utils/request-cache.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts +137 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js +379 -0
- package/dist/loader-utils/lib/request-utils/request-credentials.js.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts +71 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.d.ts.map +1 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js +174 -0
- package/dist/loader-utils/lib/request-utils/request-scheduler.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js +261 -0
- package/dist/loader-utils/lib/scan-utils/columnar-predicate.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts +42 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js +5 -0
- package/dist/loader-utils/lib/scan-utils/experimental-scan-options.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts +56 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js +86 -0
- package/dist/loader-utils/lib/scan-utils/point-cloud-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts +36 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js +49 -0
- package/dist/loader-utils/lib/scan-utils/raster-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts +75 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js +107 -0
- package/dist/loader-utils/lib/scan-utils/relational-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts +20 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js +183 -0
- package/dist/loader-utils/lib/scan-utils/scan-executor.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts +23 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js +5 -0
- package/dist/loader-utils/lib/scan-utils/scan-fragments.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts +272 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js +97 -0
- package/dist/loader-utils/lib/scan-utils/scan-query-metadata.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts +39 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js +35 -0
- package/dist/loader-utils/lib/scan-utils/table-query-explain.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts +77 -0
- package/dist/loader-utils/lib/scan-utils/table-query.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js +56 -0
- package/dist/loader-utils/lib/scan-utils/table-query.js.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts +30 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.d.ts.map +1 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js +161 -0
- package/dist/loader-utils/lib/scan-utils/table-scan-batch.js.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts +36 -0
- package/dist/loader-utils/lib/sources/catalog-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/catalog-source.js +5 -0
- package/dist/loader-utils/lib/sources/catalog-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts +136 -0
- package/dist/loader-utils/lib/sources/data-source-manager.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js +376 -0
- package/dist/loader-utils/lib/sources/data-source-manager.js.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts +79 -0
- package/dist/loader-utils/lib/sources/data-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/data-source.js +145 -0
- package/dist/loader-utils/lib/sources/data-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts +55 -0
- package/dist/loader-utils/lib/sources/image-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts +12 -0
- package/dist/loader-utils/lib/sources/image-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/image-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts +17 -0
- package/dist/loader-utils/lib/sources/raster-coverage.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js +62 -0
- package/dist/loader-utils/lib/sources/raster-coverage.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts +4 -0
- package/dist/loader-utils/lib/sources/raster-region.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-region.js +22 -0
- package/dist/loader-utils/lib/sources/raster-region.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts +35 -0
- package/dist/loader-utils/lib/sources/raster-sampling.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js +152 -0
- package/dist/loader-utils/lib/sources/raster-sampling.js.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts +302 -0
- package/dist/loader-utils/lib/sources/raster-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/raster-source.js +20 -0
- package/dist/loader-utils/lib/sources/raster-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts +36 -0
- package/dist/loader-utils/lib/sources/service-capabilities.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js +5 -0
- package/dist/loader-utils/lib/sources/service-capabilities.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts +46 -0
- package/dist/loader-utils/lib/sources/tile-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-grid.js +128 -0
- package/dist/loader-utils/lib/sources/tile-grid.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts +24 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js +109 -0
- package/dist/loader-utils/lib/sources/tile-source-adapter.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts +6 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js +13 -0
- package/dist/loader-utils/lib/sources/tile-source-utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts +190 -0
- package/dist/loader-utils/lib/sources/tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts +10 -0
- package/dist/loader-utils/lib/sources/utils/image-type.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js +5 -0
- package/dist/loader-utils/lib/sources/utils/image-type.js.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts +13 -0
- package/dist/loader-utils/lib/sources/utils/utils.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/utils/utils.js +26 -0
- package/dist/loader-utils/lib/sources/utils/utils.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts +76 -0
- package/dist/loader-utils/lib/sources/vector-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts +15 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js +5 -0
- package/dist/loader-utils/lib/sources/vector-tile-source.js.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts +9 -0
- package/dist/loader-utils/lib/sources/xyz-grid.d.ts.map +1 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js +63 -0
- package/dist/loader-utils/lib/sources/xyz-grid.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts +22 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js +155 -0
- package/dist/loader-utils/lib/worker-loader-utils/create-loader-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts +8 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js +23 -0
- package/dist/loader-utils/lib/worker-loader-utils/encode-with-worker.js.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts +41 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.d.ts.map +1 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js +239 -0
- package/dist/loader-utils/lib/worker-loader-utils/parse-with-worker.js.map +1 -0
- package/dist/loader-utils/loader-types.d.ts +322 -0
- package/dist/loader-utils/loader-types.d.ts.map +1 -0
- package/dist/loader-utils/loader-types.js +33 -0
- package/dist/loader-utils/loader-types.js.map +1 -0
- package/dist/loader-utils/source-types.d.ts +42 -0
- package/dist/loader-utils/source-types.d.ts.map +1 -0
- package/dist/loader-utils/source-types.js +8 -0
- package/dist/loader-utils/source-types.js.map +1 -0
- package/dist/loader-utils/types.d.ts +24 -0
- package/dist/loader-utils/types.d.ts.map +1 -0
- package/dist/loader-utils/types.js +6 -0
- package/dist/loader-utils/types.js.map +1 -0
- package/dist/loader-utils/workers/json-worker.d.ts +2 -0
- package/dist/loader-utils/workers/json-worker.d.ts.map +1 -0
- package/dist/loader-utils/workers/json-worker.js +7 -0
- package/dist/loader-utils/workers/json-worker.js.map +1 -0
- package/dist/loader-utils/writer-types.d.ts +74 -0
- package/dist/loader-utils/writer-types.d.ts.map +1 -0
- package/dist/loader-utils/writer-types.js +5 -0
- package/dist/loader-utils/writer-types.js.map +1 -0
- package/dist/null-loader.d.ts +2 -2
- package/dist/null-loader.d.ts.map +1 -1
- package/dist/null-loader.js +1 -1
- package/dist/null-worker-node.js +7 -19
- package/dist/null-worker.js +7 -7
- package/dist/polyfills/buffer/btoa.node.d.ts +3 -0
- package/dist/polyfills/buffer/btoa.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/btoa.node.js +13 -0
- package/dist/polyfills/buffer/btoa.node.js.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts +2 -0
- package/dist/polyfills/buffer/to-array-buffer.node.d.ts.map +1 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js +12 -0
- package/dist/polyfills/buffer/to-array-buffer.node.js.map +1 -0
- package/dist/polyfills/crypto/node-hash.d.ts +29 -0
- package/dist/polyfills/crypto/node-hash.d.ts.map +1 -0
- package/dist/polyfills/crypto/node-hash.js +63 -0
- package/dist/polyfills/crypto/node-hash.js.map +1 -0
- package/dist/polyfills/fetch/decode-data-uri.d.ts +11 -0
- package/dist/polyfills/fetch/decode-data-uri.d.ts.map +1 -0
- package/dist/polyfills/fetch/decode-data-uri.js +63 -0
- package/dist/polyfills/fetch/decode-data-uri.js.map +1 -0
- package/dist/polyfills/fetch/fetch-polyfill.d.ts +11 -0
- package/dist/polyfills/fetch/fetch-polyfill.d.ts.map +1 -0
- package/dist/polyfills/fetch/fetch-polyfill.js +141 -0
- package/dist/polyfills/fetch/fetch-polyfill.js.map +1 -0
- package/dist/polyfills/fetch/headers-polyfill.d.ts +34 -0
- package/dist/polyfills/fetch/headers-polyfill.d.ts.map +1 -0
- package/dist/polyfills/fetch/headers-polyfill.js +105 -0
- package/dist/polyfills/fetch/headers-polyfill.js.map +1 -0
- package/dist/polyfills/fetch/response-polyfill.d.ts +22 -0
- package/dist/polyfills/fetch/response-polyfill.d.ts.map +1 -0
- package/dist/polyfills/fetch/response-polyfill.js +81 -0
- package/dist/polyfills/fetch/response-polyfill.js.map +1 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.d.ts +11 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.d.ts.map +1 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.js +32 -0
- package/dist/polyfills/fetch/utils/decode-data-uri.node.js.map +1 -0
- package/dist/polyfills/file/blob-stream-controller.d.ts +29 -0
- package/dist/polyfills/file/blob-stream-controller.d.ts.map +1 -0
- package/dist/polyfills/file/blob-stream-controller.js +64 -0
- package/dist/polyfills/file/blob-stream-controller.js.map +1 -0
- package/dist/polyfills/file/blob-stream.d.ts +25 -0
- package/dist/polyfills/file/blob-stream.d.ts.map +1 -0
- package/dist/polyfills/file/blob-stream.js +38 -0
- package/dist/polyfills/file/blob-stream.js.map +1 -0
- package/dist/polyfills/file/blob.d.ts +58 -0
- package/dist/polyfills/file/blob.d.ts.map +1 -0
- package/dist/polyfills/file/blob.js +166 -0
- package/dist/polyfills/file/blob.js.map +1 -0
- package/dist/polyfills/file/file-reader.d.ts +24 -0
- package/dist/polyfills/file/file-reader.d.ts.map +1 -0
- package/dist/polyfills/file/file-reader.js +51 -0
- package/dist/polyfills/file/file-reader.js.map +1 -0
- package/dist/polyfills/file/file.d.ts +24 -0
- package/dist/polyfills/file/file.d.ts.map +1 -0
- package/dist/polyfills/file/file.js +41 -0
- package/dist/polyfills/file/file.js.map +1 -0
- package/dist/polyfills/file/install-blob-polyfills.d.ts +9 -0
- package/dist/polyfills/file/install-blob-polyfills.d.ts.map +1 -0
- package/dist/polyfills/file/install-blob-polyfills.js +14 -0
- package/dist/polyfills/file/install-blob-polyfills.js.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts +3 -0
- package/dist/polyfills/file/install-file-polyfills.d.ts.map +1 -0
- package/dist/polyfills/file/install-file-polyfills.js +20 -0
- package/dist/polyfills/file/install-file-polyfills.js.map +1 -0
- package/dist/polyfills/file/readable-stream.d.ts +5 -0
- package/dist/polyfills/file/readable-stream.d.ts.map +1 -0
- package/dist/polyfills/file/readable-stream.js +8 -0
- package/dist/polyfills/file/readable-stream.js.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts +8 -0
- package/dist/polyfills/filesystems/fetch-node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/fetch-node.js +88 -0
- package/dist/polyfills/filesystems/fetch-node.js.map +1 -0
- package/dist/polyfills/filesystems/node-file.d.ts +15 -0
- package/dist/polyfills/filesystems/node-file.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-file.js +138 -0
- package/dist/polyfills/filesystems/node-file.js.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts +19 -0
- package/dist/polyfills/filesystems/node-filesystem.d.ts.map +1 -0
- package/dist/polyfills/filesystems/node-filesystem.js +44 -0
- package/dist/polyfills/filesystems/node-filesystem.js.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts +18 -0
- package/dist/polyfills/filesystems/stream-utils.node.d.ts.map +1 -0
- package/dist/polyfills/filesystems/stream-utils.node.js +67 -0
- package/dist/polyfills/filesystems/stream-utils.node.js.map +1 -0
- package/dist/polyfills/images/encode-image-node.d.ts +20 -0
- package/dist/polyfills/images/encode-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/encode-image-node.js +37 -0
- package/dist/polyfills/images/encode-image-node.js.map +1 -0
- package/dist/polyfills/images/image-codecs-node.d.ts +8 -0
- package/dist/polyfills/images/image-codecs-node.d.ts.map +1 -0
- package/dist/polyfills/images/image-codecs-node.js +27 -0
- package/dist/polyfills/images/image-codecs-node.js.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts +38 -0
- package/dist/polyfills/images/node-image-bitmap.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-bitmap.js +64 -0
- package/dist/polyfills/images/node-image-bitmap.js.map +1 -0
- package/dist/polyfills/images/node-image-formats.d.ts +3 -0
- package/dist/polyfills/images/node-image-formats.d.ts.map +1 -0
- package/dist/polyfills/images/node-image-formats.js +6 -0
- package/dist/polyfills/images/node-image-formats.js.map +1 -0
- package/dist/polyfills/images/parse-image-node.d.ts +11 -0
- package/dist/polyfills/images/parse-image-node.d.ts.map +1 -0
- package/dist/polyfills/images/parse-image-node.js +36 -0
- package/dist/polyfills/images/parse-image-node.js.map +1 -0
- package/dist/polyfills/index.browser.d.ts +8 -0
- package/dist/polyfills/index.browser.d.ts.map +1 -0
- package/dist/polyfills/index.browser.js +18 -0
- package/dist/polyfills/index.browser.js.map +1 -0
- package/dist/polyfills/index.cjs +2918 -0
- package/dist/polyfills/index.cjs.map +6 -0
- package/dist/polyfills/index.d.ts +7 -0
- package/dist/polyfills/index.d.ts.map +1 -0
- package/dist/polyfills/index.js +110 -0
- package/dist/polyfills/index.js.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts +10 -0
- package/dist/polyfills/libs/encoding-indexes-asian.d.ts.map +1 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js +14 -0
- package/dist/polyfills/libs/encoding-indexes-asian.js.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts +19 -0
- package/dist/polyfills/load-library/require-utils.node.d.ts.map +1 -0
- package/dist/polyfills/load-library/require-utils.node.js +88 -0
- package/dist/polyfills/load-library/require-utils.node.js.map +1 -0
- package/dist/polyfills/streams/make-node-stream.d.ts +10 -0
- package/dist/polyfills/streams/make-node-stream.d.ts.map +1 -0
- package/dist/polyfills/streams/make-node-stream.js +70 -0
- package/dist/polyfills/streams/make-node-stream.js.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts +31 -0
- package/dist/polyfills/text-encoder/encoding-indexes.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js +35 -0
- package/dist/polyfills/text-encoder/encoding-indexes.js.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts +15 -0
- package/dist/polyfills/text-encoder/text-encoder.d.ts.map +1 -0
- package/dist/polyfills/text-encoder/text-encoder.js +2778 -0
- package/dist/polyfills/text-encoder/text-encoder.js.map +1 -0
- package/dist/polyfills/utils/assert.d.ts +2 -0
- package/dist/polyfills/utils/assert.d.ts.map +1 -0
- package/dist/polyfills/utils/assert.js +9 -0
- package/dist/polyfills/utils/assert.js.map +1 -0
- package/dist/polyfills/utils/buffer-utils.d.ts +5 -0
- package/dist/polyfills/utils/buffer-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/buffer-utils.js +34 -0
- package/dist/polyfills/utils/buffer-utils.js.map +1 -0
- package/dist/polyfills/utils/filesystem-types.d.ts +10 -0
- package/dist/polyfills/utils/filesystem-types.d.ts.map +1 -0
- package/dist/polyfills/utils/filesystem-types.js +5 -0
- package/dist/polyfills/utils/filesystem-types.js.map +1 -0
- package/dist/polyfills/utils/is-browser.d.ts +2 -0
- package/dist/polyfills/utils/is-browser.d.ts.map +1 -0
- package/dist/polyfills/utils/is-browser.js +8 -0
- package/dist/polyfills/utils/is-browser.js.map +1 -0
- package/dist/polyfills/utils/path-utils.d.ts +7 -0
- package/dist/polyfills/utils/path-utils.d.ts.map +1 -0
- package/dist/polyfills/utils/path-utils.js +28 -0
- package/dist/polyfills/utils/path-utils.js.map +1 -0
- package/dist/schema/categories/category-gis.d.ts +7 -0
- package/dist/schema/categories/category-gis.d.ts.map +1 -0
- package/dist/schema/categories/category-gis.js +5 -0
- package/dist/schema/categories/category-gis.js.map +1 -0
- package/dist/schema/categories/category-image.d.ts +18 -0
- package/dist/schema/categories/category-image.d.ts.map +1 -0
- package/dist/schema/categories/category-image.js +5 -0
- package/dist/schema/categories/category-image.js.map +1 -0
- package/dist/schema/categories/category-mesh.d.ts +99 -0
- package/dist/schema/categories/category-mesh.d.ts.map +1 -0
- package/dist/schema/categories/category-mesh.js +14 -0
- package/dist/schema/categories/category-mesh.js.map +1 -0
- package/dist/schema/categories/category-table.d.ts +106 -0
- package/dist/schema/categories/category-table.d.ts.map +1 -0
- package/dist/schema/categories/category-table.js +5 -0
- package/dist/schema/categories/category-table.js.map +1 -0
- package/dist/schema/categories/category-texture.d.ts +115 -0
- package/dist/schema/categories/category-texture.d.ts.map +1 -0
- package/dist/schema/categories/category-texture.js +5 -0
- package/dist/schema/categories/category-texture.js.map +1 -0
- package/dist/schema/deprecated/mesh-utils.d.ts +12 -0
- package/dist/schema/deprecated/mesh-utils.d.ts.map +1 -0
- package/dist/schema/deprecated/mesh-utils.js +37 -0
- package/dist/schema/deprecated/mesh-utils.js.map +1 -0
- package/dist/schema/float16.d.ts +19 -0
- package/dist/schema/float16.d.ts.map +1 -0
- package/dist/schema/float16.js +90 -0
- package/dist/schema/float16.js.map +1 -0
- package/dist/schema/geoarrow-metadata.schema.json +117 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts +45 -0
- package/dist/schema/geometry/arrow-binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/arrow-binary-features.js +5 -0
- package/dist/schema/geometry/arrow-binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-features.d.ts +30 -0
- package/dist/schema/geometry/binary-features.d.ts.map +1 -0
- package/dist/schema/geometry/binary-features.js +5 -0
- package/dist/schema/geometry/binary-features.js.map +1 -0
- package/dist/schema/geometry/binary-geometries.d.ts +33 -0
- package/dist/schema/geometry/binary-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/binary-geometries.js +5 -0
- package/dist/schema/geometry/binary-geometries.js.map +1 -0
- package/dist/schema/geometry/flat-geometries.d.ts +61 -0
- package/dist/schema/geometry/flat-geometries.d.ts.map +1 -0
- package/dist/schema/geometry/flat-geometries.js +5 -0
- package/dist/schema/geometry/flat-geometries.js.map +1 -0
- package/dist/schema/geometry/geoarrow.d.ts +69 -0
- package/dist/schema/geometry/geoarrow.d.ts.map +1 -0
- package/dist/schema/geometry/geoarrow.js +5 -0
- package/dist/schema/geometry/geoarrow.js.map +1 -0
- package/dist/schema/geoparquet.schema.json +222 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs +154 -0
- package/dist/schema/geospatial-metadata-zod-schema.cjs.map +6 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts +44 -0
- package/dist/schema/geospatial-metadata-zod-schema.d.ts.map +1 -0
- package/dist/schema/geospatial-metadata-zod-schema.js +151 -0
- package/dist/schema/geospatial-metadata-zod-schema.js.map +1 -0
- package/dist/schema/index.cjs +259 -0
- package/dist/schema/index.cjs.map +6 -0
- package/dist/schema/index.d.ts +21 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +9 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/metadata.d.ts +40 -0
- package/dist/schema/metadata.d.ts.map +1 -0
- package/dist/schema/metadata.js +86 -0
- package/dist/schema/metadata.js.map +1 -0
- package/dist/schema/types/batch.d.ts +37 -0
- package/dist/schema/types/batch.d.ts.map +1 -0
- package/dist/schema/types/batch.js +5 -0
- package/dist/schema/types/batch.js.map +1 -0
- package/dist/schema/types/schema.d.ts +70 -0
- package/dist/schema/types/schema.d.ts.map +1 -0
- package/dist/schema/types/schema.js +5 -0
- package/dist/schema/types/schema.js.map +1 -0
- package/dist/schema/types/types.d.ts +16 -0
- package/dist/schema/types/types.d.ts.map +1 -0
- package/dist/schema/types/types.js +6 -0
- package/dist/schema/types/types.js.map +1 -0
- package/dist/schema-utils/arrow-transport.cjs +665 -0
- package/dist/schema-utils/arrow-transport.cjs.map +6 -0
- package/dist/schema-utils/arrow-transport.d.ts +4 -0
- package/dist/schema-utils/arrow-transport.d.ts.map +1 -0
- package/dist/schema-utils/arrow-transport.js +7 -0
- package/dist/schema-utils/arrow-transport.js.map +1 -0
- package/dist/schema-utils/deprecated.d.ts +24 -0
- package/dist/schema-utils/deprecated.d.ts.map +1 -0
- package/dist/schema-utils/deprecated.js +27 -0
- package/dist/schema-utils/deprecated.js.map +1 -0
- package/dist/schema-utils/index.cjs +3423 -0
- package/dist/schema-utils/index.cjs.map +6 -0
- package/dist/schema-utils/index.d.ts +38 -0
- package/dist/schema-utils/index.d.ts.map +1 -0
- package/dist/schema-utils/index.js +77 -0
- package/dist/schema-utils/index.js.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts +72 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js +162 -0
- package/dist/schema-utils/lib/arrow/arrow-table-transport.js.map +1 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts +33 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js +128 -0
- package/dist/schema-utils/lib/arrow/split-arrow-buffers.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js +45 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts +11 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js +33 -0
- package/dist/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.js.map +1 -0
- package/dist/schema-utils/lib/converters/convert.d.ts +10 -0
- package/dist/schema-utils/lib/converters/convert.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/convert.js +98 -0
- package/dist/schema-utils/lib/converters/convert.js.map +1 -0
- package/dist/schema-utils/lib/converters/converters.d.ts +3 -0
- package/dist/schema-utils/lib/converters/converters.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/converters.js +5 -0
- package/dist/schema-utils/lib/converters/converters.js.map +1 -0
- package/dist/schema-utils/lib/converters/types.d.ts +35 -0
- package/dist/schema-utils/lib/converters/types.d.ts.map +1 -0
- package/dist/schema-utils/lib/converters/types.js +5 -0
- package/dist/schema-utils/lib/converters/types.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts +44 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js +187 -0
- package/dist/schema-utils/lib/mesh/convert-mesh-to-table.js.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts +14 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js +217 -0
- package/dist/schema-utils/lib/mesh/convert-table-to-mesh.js.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts +23 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js +72 -0
- package/dist/schema-utils/lib/mesh/deduce-mesh-schema.js.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts +23 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js +54 -0
- package/dist/schema-utils/lib/mesh/mesh-utils.js.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts +98 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.d.ts.map +1 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js +407 -0
- package/dist/schema-utils/lib/mesh/point-cloud-tiler.js.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts +39 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js +441 -0
- package/dist/schema-utils/lib/schema/convert-arrow-schema.js.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts +16 -0
- package/dist/schema-utils/lib/schema/data-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/data-type.js +102 -0
- package/dist/schema-utils/lib/schema/data-type.js.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts +14 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js +101 -0
- package/dist/schema-utils/lib/schema/deduce-table-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts +19 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js +37 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-field.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts +43 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js +5 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-interface.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts +12 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js +82 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-schema.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts +28 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js +64 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-table.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts +177 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js +441 -0
- package/dist/schema-utils/lib/table/arrow-api/arrow-like-type.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts +92 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js +98 -0
- package/dist/schema-utils/lib/table/arrow-api/enum.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts +13 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js +28 -0
- package/dist/schema-utils/lib/table/arrow-api/get-type-info.js.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts +6 -0
- package/dist/schema-utils/lib/table/arrow-api/index.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js +8 -0
- package/dist/schema-utils/lib/table/arrow-api/index.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts +10 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js +71 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts +28 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js +104 -0
- package/dist/schema-utils/lib/table/batch-builder/arrow-table-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts +19 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js +64 -0
- package/dist/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts +20 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js +84 -0
- package/dist/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts +21 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js +86 -0
- package/dist/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts +24 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js +5 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-aggregator.js.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts +52 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js +149 -0
- package/dist/schema-utils/lib/table/batch-builder/table-batch-builder.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts +10 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js +46 -0
- package/dist/schema-utils/lib/table/batches/convert-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts +17 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js +61 -0
- package/dist/schema-utils/lib/table/batches/make-arrow-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts +15 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js +22 -0
- package/dist/schema-utils/lib/table/batches/make-table-batch-iterator.js.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts +9 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js +63 -0
- package/dist/schema-utils/lib/table/batches/make-table-from-batches.js.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts +23 -0
- package/dist/schema-utils/lib/table/query-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js +73 -0
- package/dist/schema-utils/lib/table/query-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts +24 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js +151 -0
- package/dist/schema-utils/lib/table/tables/convert-arrow-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts +43 -0
- package/dist/schema-utils/lib/table/tables/convert-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js +122 -0
- package/dist/schema-utils/lib/table/tables/convert-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts +67 -0
- package/dist/schema-utils/lib/table/tables/make-table.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/make-table.js +102 -0
- package/dist/schema-utils/lib/table/tables/make-table.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts +15 -0
- package/dist/schema-utils/lib/table/tables/row-utils.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js +50 -0
- package/dist/schema-utils/lib/table/tables/row-utils.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts +68 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js +352 -0
- package/dist/schema-utils/lib/table/tables/table-accessors.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts +7 -0
- package/dist/schema-utils/lib/table/tables/table-column.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-column.js +40 -0
- package/dist/schema-utils/lib/table/tables/table-column.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts +9 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js +19 -0
- package/dist/schema-utils/lib/table/tables/table-converter/convert-tables.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts +16 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js +45 -0
- package/dist/schema-utils/lib/table/tables/table-converter/table-converter.js.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts +12 -0
- package/dist/schema-utils/lib/table/tables/table-types.d.ts.map +1 -0
- package/dist/schema-utils/lib/table/tables/table-types.js +24 -0
- package/dist/schema-utils/lib/table/tables/table-types.js.map +1 -0
- package/dist/schema-utils/lib/utils/assert.d.ts +2 -0
- package/dist/schema-utils/lib/utils/assert.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/assert.js +12 -0
- package/dist/schema-utils/lib/utils/assert.js.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts +18 -0
- package/dist/schema-utils/lib/utils/async-queue.d.ts.map +1 -0
- package/dist/schema-utils/lib/utils/async-queue.js +96 -0
- package/dist/schema-utils/lib/utils/async-queue.js.map +1 -0
- package/dist/schema-utils/types/types.d.ts +15 -0
- package/dist/schema-utils/types/types.d.ts.map +1 -0
- package/dist/schema-utils/types/types.js +5 -0
- package/dist/schema-utils/types/types.js.map +1 -0
- package/dist/worker-utils/index.cjs +1448 -0
- package/dist/worker-utils/index.cjs.map +6 -0
- package/dist/worker-utils/index.d.ts +22 -0
- package/dist/worker-utils/index.d.ts.map +1 -0
- package/dist/worker-utils/index.js +40 -0
- package/dist/worker-utils/index.js.map +1 -0
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts +32 -0
- package/dist/worker-utils/lib/async-queue/async-queue.d.ts.map +1 -0
- package/dist/worker-utils/lib/async-queue/async-queue.js +91 -0
- package/dist/worker-utils/lib/async-queue/async-queue.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts +3 -0
- package/dist/worker-utils/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/assert.js +13 -0
- package/dist/worker-utils/lib/env-utils/assert.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts +22 -0
- package/dist/worker-utils/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/globals.js +30 -0
- package/dist/worker-utils/lib/env-utils/globals.js.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts +2 -0
- package/dist/worker-utils/lib/env-utils/version.d.ts.map +1 -0
- package/dist/worker-utils/lib/env-utils/version.js +20 -0
- package/dist/worker-utils/lib/env-utils/version.js.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts +42 -0
- package/dist/worker-utils/lib/library-utils/library-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js +248 -0
- package/dist/worker-utils/lib/library-utils/library-utils.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts +14 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js +22 -0
- package/dist/worker-utils/lib/node/worker_threads-browser.js.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts +15 -0
- package/dist/worker-utils/lib/node/worker_threads.d.ts.map +1 -0
- package/dist/worker-utils/lib/node/worker_threads.js +16 -0
- package/dist/worker-utils/lib/node/worker_threads.js.map +1 -0
- package/dist/worker-utils/lib/npm-tag.d.ts +8 -0
- package/dist/worker-utils/lib/npm-tag.d.ts.map +1 -0
- package/dist/worker-utils/lib/npm-tag.js +11 -0
- package/dist/worker-utils/lib/npm-tag.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts +8 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js +18 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.browser.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts +45 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js +123 -0
- package/dist/worker-utils/lib/process-utils/child-process-proxy.js.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts +2 -0
- package/dist/worker-utils/lib/process-utils/process-utils.d.ts.map +1 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js +32 -0
- package/dist/worker-utils/lib/process-utils/process-utils.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts +9 -0
- package/dist/worker-utils/lib/worker-api/create-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js +123 -0
- package/dist/worker-utils/lib/worker-api/create-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts +27 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js +103 -0
- package/dist/worker-utils/lib/worker-api/get-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts +44 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js +312 -0
- package/dist/worker-utils/lib/worker-api/process-on-worker.js.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts +9 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js +35 -0
- package/dist/worker-utils/lib/worker-api/validate-worker-version.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts +20 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.js +131 -0
- package/dist/worker-utils/lib/worker-farm/worker-body.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts +58 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.js +116 -0
- package/dist/worker-utils/lib/worker-farm/worker-farm.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts +34 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.js +73 -0
- package/dist/worker-utils/lib/worker-farm/worker-job.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts +94 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.js +193 -0
- package/dist/worker-utils/lib/worker-farm/worker-pool.js.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts +67 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.js +175 -0
- package/dist/worker-utils/lib/worker-farm/worker-thread.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts +14 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js +72 -0
- package/dist/worker-utils/lib/worker-utils/get-loadable-worker-url.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts +15 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js +86 -0
- package/dist/worker-utils/lib/worker-utils/get-transfer-list.js.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts +6 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.d.ts.map +1 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js +27 -0
- package/dist/worker-utils/lib/worker-utils/remove-nontransferable-options.js.map +1 -0
- package/dist/worker-utils/null-worker-node.js +349 -0
- package/dist/worker-utils/null-worker-node.js.map +7 -0
- package/dist/worker-utils/null-worker.js +327 -0
- package/dist/worker-utils/null-worker.js.map +7 -0
- package/dist/worker-utils/types.d.ts +79 -0
- package/dist/worker-utils/types.d.ts.map +1 -0
- package/dist/worker-utils/types.js +5 -0
- package/dist/worker-utils/types.js.map +1 -0
- package/dist/worker-utils/workers/null-worker.d.ts +2 -0
- package/dist/worker-utils/workers/null-worker.d.ts.map +1 -0
- package/dist/worker-utils/workers/null-worker.js +17 -0
- package/dist/worker-utils/workers/null-worker.js.map +1 -0
- package/dist/workers/null-worker-node.js +1 -1
- package/dist/workers/null-worker-node.js.map +1 -1
- package/dist/workers/null-worker.js +1 -1
- package/dist/workers/null-worker.js.map +1 -1
- package/package.json +101 -11
- package/src/index.ts +10 -10
- package/src/iterators/make-iterator/make-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-stream-iterator.ts +1 -1
- package/src/iterators/make-iterator/make-string-iterator.ts +1 -1
- package/src/lib/api/core-api.ts +1 -1
- package/src/lib/api/create-data-source.ts +2 -2
- package/src/lib/api/encode-table.ts +2 -2
- package/src/lib/api/encode.ts +3 -3
- package/src/lib/api/load-in-batches.ts +2 -2
- package/src/lib/api/load-loader.ts +2 -2
- package/src/lib/api/load.ts +2 -2
- package/src/lib/api/parse-file.ts +3 -3
- package/src/lib/api/parse-in-batches.ts +44 -6
- package/src/lib/api/parse-sync.ts +2 -2
- package/src/lib/api/parse.ts +4 -4
- package/src/lib/api/preload.ts +6 -1
- package/src/lib/api/register-loaders.ts +1 -1
- package/src/lib/api/select-loader.ts +3 -3
- package/src/lib/api/select-source.ts +1 -1
- package/src/lib/common.ts +1 -1
- package/src/lib/fetch/fetch-file.ts +2 -2
- package/src/lib/filesystems/browser-filesystem.ts +2 -2
- package/src/lib/init.ts +1 -1
- package/src/lib/loader-utils/get-data.ts +2 -2
- package/src/lib/loader-utils/get-fetch-function.ts +2 -2
- package/src/lib/loader-utils/loader-context.ts +2 -2
- package/src/lib/loader-utils/loggers.ts +1 -1
- package/src/lib/loader-utils/normalize-loader.ts +2 -2
- package/src/lib/loader-utils/option-defaults.ts +2 -2
- package/src/lib/loader-utils/option-utils.ts +1 -1
- package/src/lib/utils/resource-utils.ts +1 -1
- package/src/lib/utils/response-utils.ts +1 -1
- package/src/loader-utils/format-types.ts +49 -0
- package/src/loader-utils/index.ts +522 -0
- package/src/loader-utils/json-loader.ts +39 -0
- package/src/loader-utils/lib/binary-utils/array-buffer-utils.ts +114 -0
- package/src/loader-utils/lib/binary-utils/binary-chunk-reader.ts +297 -0
- package/src/loader-utils/lib/binary-utils/dataview-copy-utils.ts +121 -0
- package/src/loader-utils/lib/binary-utils/encode-array-buffer-to-base64.ts +17 -0
- package/src/loader-utils/lib/binary-utils/get-first-characters.ts +46 -0
- package/src/loader-utils/lib/binary-utils/hex-transcoder.ts +54 -0
- package/src/loader-utils/lib/binary-utils/memory-conversion-utils.ts +105 -0
- package/src/loader-utils/lib/binary-utils/memory-copy-utils.ts +69 -0
- package/src/loader-utils/lib/crs/crs-reprojection.ts +52 -0
- package/src/loader-utils/lib/env-utils/assert.ts +13 -0
- package/src/loader-utils/lib/env-utils/globals.ts +36 -0
- package/src/loader-utils/lib/file-provider/data-view-file.ts +83 -0
- package/src/loader-utils/lib/file-provider/file-handle-file.ts +114 -0
- package/src/loader-utils/lib/file-provider/file-provider-interface.ts +60 -0
- package/src/loader-utils/lib/file-provider/file-provider.ts +130 -0
- package/src/loader-utils/lib/files/array-buffer-file.ts +46 -0
- package/src/loader-utils/lib/files/blob-file.ts +45 -0
- package/src/loader-utils/lib/files/file.ts +39 -0
- package/src/loader-utils/lib/files/http-file-transport.ts +432 -0
- package/src/loader-utils/lib/files/http-file-types.ts +60 -0
- package/src/loader-utils/lib/files/http-file.ts +267 -0
- package/src/loader-utils/lib/files/node-file-facade.ts +57 -0
- package/src/loader-utils/lib/files/sources.ts +154 -0
- package/src/loader-utils/lib/filesystems/filesystem.ts +40 -0
- package/src/loader-utils/lib/filesystems/node-filesystem-facade.ts +65 -0
- package/src/loader-utils/lib/iterators/async-iteration.ts +136 -0
- package/src/loader-utils/lib/iterators/text-iterators.ts +76 -0
- package/src/loader-utils/lib/javascript-utils/is-type.ts +130 -0
- package/src/loader-utils/lib/laz/LASZIP-LICENSE +202 -0
- package/src/loader-utils/lib/laz/LASZIP-NOTICE +6 -0
- package/src/loader-utils/lib/laz/laz-arithmetic-encoder.ts +446 -0
- package/src/loader-utils/lib/laz/laz-chunk-decoder.ts +5251 -0
- package/src/loader-utils/lib/laz/laz-chunk-encoder.ts +1909 -0
- package/src/loader-utils/lib/log-utils/log.ts +28 -0
- package/src/loader-utils/lib/module-utils/initialize-wasm-module.ts +51 -0
- package/src/loader-utils/lib/module-utils/js-module-utils.ts +44 -0
- package/src/loader-utils/lib/node/buffer.browser.ts +22 -0
- package/src/loader-utils/lib/node/buffer.ts +40 -0
- package/src/loader-utils/lib/node/fs.browser.ts +5 -0
- package/src/loader-utils/lib/node/promisify.ts +72 -0
- package/src/loader-utils/lib/node/stream.browser.ts +5 -0
- package/src/loader-utils/lib/node/stream.ts +12 -0
- package/src/loader-utils/lib/option-utils/merge-options.ts +50 -0
- package/src/loader-utils/lib/parser-utils/parse-json.ts +16 -0
- package/src/loader-utils/lib/path-utils/cached-uri-resolver.ts +69 -0
- package/src/loader-utils/lib/path-utils/file-aliases.ts +49 -0
- package/src/loader-utils/lib/path-utils/get-cwd.ts +12 -0
- package/src/loader-utils/lib/path-utils/path.ts +173 -0
- package/src/loader-utils/lib/request-utils/abort-utils.ts +64 -0
- package/src/loader-utils/lib/request-utils/authentication.ts +134 -0
- package/src/loader-utils/lib/request-utils/parse-content-type.ts +22 -0
- package/src/loader-utils/lib/request-utils/range-request-cache.ts +279 -0
- package/src/loader-utils/lib/request-utils/range-request-scheduler.ts +899 -0
- package/src/loader-utils/lib/request-utils/request-cache.ts +296 -0
- package/src/loader-utils/lib/request-utils/request-credentials.ts +576 -0
- package/src/loader-utils/lib/request-utils/request-scheduler.ts +230 -0
- package/src/loader-utils/lib/scan-utils/columnar-predicate.ts +397 -0
- package/src/loader-utils/lib/scan-utils/experimental-scan-options.ts +46 -0
- package/src/loader-utils/lib/scan-utils/point-cloud-query.ts +176 -0
- package/src/loader-utils/lib/scan-utils/raster-query.ts +82 -0
- package/src/loader-utils/lib/scan-utils/relational-query.ts +188 -0
- package/src/loader-utils/lib/scan-utils/scan-executor.ts +208 -0
- package/src/loader-utils/lib/scan-utils/scan-fragments.ts +33 -0
- package/src/loader-utils/lib/scan-utils/scan-query-metadata.ts +439 -0
- package/src/loader-utils/lib/scan-utils/table-query-explain.ts +88 -0
- package/src/loader-utils/lib/scan-utils/table-query.ts +163 -0
- package/src/loader-utils/lib/scan-utils/table-scan-batch.ts +200 -0
- package/src/loader-utils/lib/sources/catalog-source.ts +42 -0
- package/src/loader-utils/lib/sources/data-source-manager.ts +569 -0
- package/src/loader-utils/lib/sources/data-source.ts +236 -0
- package/src/loader-utils/lib/sources/image-source.ts +66 -0
- package/src/loader-utils/lib/sources/image-tile-source.ts +22 -0
- package/src/loader-utils/lib/sources/raster-coverage.ts +92 -0
- package/src/loader-utils/lib/sources/raster-region.ts +35 -0
- package/src/loader-utils/lib/sources/raster-sampling.ts +213 -0
- package/src/loader-utils/lib/sources/raster-source.ts +344 -0
- package/src/loader-utils/lib/sources/service-capabilities.ts +50 -0
- package/src/loader-utils/lib/sources/tile-grid.ts +162 -0
- package/src/loader-utils/lib/sources/tile-source-adapter.ts +126 -0
- package/src/loader-utils/lib/sources/tile-source-utils.ts +19 -0
- package/src/loader-utils/lib/sources/tile-source.ts +198 -0
- package/src/loader-utils/lib/sources/utils/image-type.ts +14 -0
- package/src/loader-utils/lib/sources/utils/utils.ts +31 -0
- package/src/loader-utils/lib/sources/vector-source.ts +89 -0
- package/src/loader-utils/lib/sources/vector-tile-source.ts +29 -0
- package/src/loader-utils/lib/sources/xyz-grid.ts +82 -0
- package/src/loader-utils/lib/worker-loader-utils/create-loader-worker.ts +233 -0
- package/src/loader-utils/lib/worker-loader-utils/encode-with-worker.ts +28 -0
- package/src/loader-utils/lib/worker-loader-utils/parse-with-worker.ts +347 -0
- package/src/loader-utils/loader-types.ts +531 -0
- package/src/loader-utils/source-types.ts +76 -0
- package/src/loader-utils/types.ts +83 -0
- package/src/loader-utils/workers/json-worker.ts +8 -0
- package/src/loader-utils/writer-types.ts +107 -0
- package/src/null-loader.ts +2 -2
- package/src/polyfills/README.md +16 -0
- package/src/polyfills/buffer/btoa.node.ts +15 -0
- package/src/polyfills/buffer/to-array-buffer.node.ts +12 -0
- package/src/polyfills/crypto/node-hash.ts +78 -0
- package/src/polyfills/fetch/decode-data-uri.ts +71 -0
- package/src/polyfills/fetch/fetch-polyfill.ts +165 -0
- package/src/polyfills/fetch/headers-polyfill.ts +119 -0
- package/src/polyfills/fetch/response-polyfill.ts +101 -0
- package/src/polyfills/fetch/utils/decode-data-uri.node.ts +34 -0
- package/src/polyfills/file/blob-stream-controller.ts +69 -0
- package/src/polyfills/file/blob-stream.ts +40 -0
- package/src/polyfills/file/blob.ts +177 -0
- package/src/polyfills/file/file-reader.ts +59 -0
- package/src/polyfills/file/file.ts +45 -0
- package/src/polyfills/file/install-blob-polyfills.ts +17 -0
- package/src/polyfills/file/install-file-polyfills.ts +24 -0
- package/src/polyfills/file/readable-stream.ts +8 -0
- package/src/polyfills/filesystems/fetch-node.ts +98 -0
- package/src/polyfills/filesystems/node-file.ts +169 -0
- package/src/polyfills/filesystems/node-filesystem.ts +54 -0
- package/src/polyfills/filesystems/stream-utils.node.ts +81 -0
- package/src/polyfills/images/encode-image-node.ts +45 -0
- package/src/polyfills/images/encode-image.node.ts.disabled +41 -0
- package/src/polyfills/images/image-codecs-node.ts +40 -0
- package/src/polyfills/images/node-image-bitmap.ts +81 -0
- package/src/polyfills/images/node-image-formats.ts +6 -0
- package/src/polyfills/images/parse-image-node.ts +54 -0
- package/src/polyfills/images/parse-image.node.ts.disabled +55 -0
- package/src/polyfills/index.browser.ts +23 -0
- package/src/polyfills/index.ts +154 -0
- package/src/polyfills/libs/encoding-indexes-asian.js +15 -0
- package/src/polyfills/load-library/require-utils.node.ts +108 -0
- package/src/polyfills/streams/make-node-stream.ts +83 -0
- package/src/polyfills/text-encoder/encoding-indexes.ts +36 -0
- package/src/polyfills/text-encoder/text-encoder.ts +3085 -0
- package/src/polyfills/utils/assert.ts +9 -0
- package/src/polyfills/utils/buffer-utils.ts +40 -0
- package/src/polyfills/utils/filesystem-types.ts +13 -0
- package/src/polyfills/utils/is-browser.ts +8 -0
- package/src/polyfills/utils/path-utils.ts +31 -0
- package/src/polyfills/wip/fetch-browser/fetch-file.browser.d.ts +34 -0
- package/src/schema/categories/category-gis.ts +63 -0
- package/src/schema/categories/category-image.ts +23 -0
- package/src/schema/categories/category-mesh.ts +138 -0
- package/src/schema/categories/category-table.ts +125 -0
- package/src/schema/categories/category-texture.ts +259 -0
- package/src/schema/deprecated/mesh-utils.ts +46 -0
- package/src/schema/float16.ts +111 -0
- package/src/schema/geometry/arrow-binary-features.ts +54 -0
- package/src/schema/geometry/binary-features.ts +43 -0
- package/src/schema/geometry/binary-geometries.ts +45 -0
- package/src/schema/geometry/flat-geometries.ts +72 -0
- package/src/schema/geometry/geoarrow.ts +116 -0
- package/src/schema/geospatial-metadata-zod-schema.ts +163 -0
- package/src/schema/index.ts +169 -0
- package/src/schema/metadata.ts +115 -0
- package/src/schema/types/batch.ts +47 -0
- package/src/schema/types/schema.ts +86 -0
- package/src/schema/types/types.ts +52 -0
- package/src/schema-utils/arrow-transport.ts +7 -0
- package/src/schema-utils/deprecated.ts +53 -0
- package/src/schema-utils/index.ts +165 -0
- package/src/schema-utils/lib/arrow/arrow-table-transport.ts +260 -0
- package/src/schema-utils/lib/arrow/split-arrow-buffers.ts +235 -0
- package/src/schema-utils/lib/arrow-utils/arrow-fixed-size-list-utils.ts +78 -0
- package/src/schema-utils/lib/arrow-utils/arrow-list-of-fixed-size-list-utils.ts +48 -0
- package/src/schema-utils/lib/converters/convert.ts +142 -0
- package/src/schema-utils/lib/converters/converters.ts +6 -0
- package/src/schema-utils/lib/converters/types.ts +44 -0
- package/src/schema-utils/lib/mesh/convert-mesh-to-table.ts +311 -0
- package/src/schema-utils/lib/mesh/convert-table-to-mesh.ts +257 -0
- package/src/schema-utils/lib/mesh/deduce-mesh-schema.ts +85 -0
- package/src/schema-utils/lib/mesh/mesh-utils.ts +73 -0
- package/src/schema-utils/lib/mesh/point-cloud-tiler.ts +485 -0
- package/src/schema-utils/lib/schema/convert-arrow-schema.ts +552 -0
- package/src/schema-utils/lib/schema/data-type.ts +122 -0
- package/src/schema-utils/lib/schema/deduce-table-schema.ts +119 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-field.ts +53 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-interface.ts +84 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-schema.ts +101 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-table.ts +85 -0
- package/src/schema-utils/lib/table/arrow-api/arrow-like-type.ts +500 -0
- package/src/schema-utils/lib/table/arrow-api/enum.ts +99 -0
- package/src/schema-utils/lib/table/arrow-api/get-type-info.ts +38 -0
- package/src/schema-utils/lib/table/arrow-api/index.ts +50 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator-builders.ts.disabled +190 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-batch-aggregator.ts +85 -0
- package/src/schema-utils/lib/table/batch-builder/arrow-table-builder.ts +123 -0
- package/src/schema-utils/lib/table/batch-builder/base-table-batch-aggregator.ts +82 -0
- package/src/schema-utils/lib/table/batch-builder/columnar-table-batch-aggregator.ts +104 -0
- package/src/schema-utils/lib/table/batch-builder/row-table-batch-aggregator.ts +108 -0
- package/src/schema-utils/lib/table/batch-builder/table-batch-aggregator.ts +28 -0
- package/src/schema-utils/lib/table/batch-builder/table-batch-builder.ts +185 -0
- package/src/schema-utils/lib/table/batches/convert-batches.ts +83 -0
- package/src/schema-utils/lib/table/batches/make-arrow-batch-iterator.ts +81 -0
- package/src/schema-utils/lib/table/batches/make-table-batch-iterator.ts +25 -0
- package/src/schema-utils/lib/table/batches/make-table-from-batches.ts +84 -0
- package/src/schema-utils/lib/table/query-arrow-table.ts +130 -0
- package/src/schema-utils/lib/table/tables/convert-arrow-table.ts +198 -0
- package/src/schema-utils/lib/table/tables/convert-table.ts +152 -0
- package/src/schema-utils/lib/table/tables/make-table.ts +127 -0
- package/src/schema-utils/lib/table/tables/row-utils.ts +59 -0
- package/src/schema-utils/lib/table/tables/table-accessors.ts +418 -0
- package/src/schema-utils/lib/table/tables/table-column.ts +49 -0
- package/src/schema-utils/lib/table/tables/table-converter/convert-tables.ts +35 -0
- package/src/schema-utils/lib/table/tables/table-converter/table-converter.ts +57 -0
- package/src/schema-utils/lib/table/tables/table-types.ts +37 -0
- package/src/schema-utils/lib/utils/assert.ts +12 -0
- package/src/schema-utils/lib/utils/async-queue.ts +109 -0
- package/src/schema-utils/types/types.ts +45 -0
- package/src/worker-utils/index.ts +80 -0
- package/src/worker-utils/lib/async-queue/async-queue.ts +100 -0
- package/src/worker-utils/lib/env-utils/assert.ts +14 -0
- package/src/worker-utils/lib/env-utils/globals.ts +40 -0
- package/src/worker-utils/lib/env-utils/version.ts +25 -0
- package/src/worker-utils/lib/library-utils/library-utils.ts +303 -0
- package/src/worker-utils/lib/node/worker_threads-browser.ts +34 -0
- package/src/worker-utils/lib/node/worker_threads.ts +58 -0
- package/src/worker-utils/lib/npm-tag.ts +11 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.browser.ts +23 -0
- package/src/worker-utils/lib/process-utils/child-process-proxy.ts +165 -0
- package/src/worker-utils/lib/process-utils/process-utils.ts +34 -0
- package/src/worker-utils/lib/worker-api/create-worker.ts +166 -0
- package/src/worker-utils/lib/worker-api/get-worker-url.ts +129 -0
- package/src/worker-utils/lib/worker-api/process-on-worker.ts +413 -0
- package/src/worker-utils/lib/worker-api/validate-worker-version.ts +44 -0
- package/src/worker-utils/lib/worker-farm/worker-body.ts +145 -0
- package/src/worker-utils/lib/worker-farm/worker-farm.ts +144 -0
- package/src/worker-utils/lib/worker-farm/worker-job.ts +83 -0
- package/src/worker-utils/lib/worker-farm/worker-pool.ts +263 -0
- package/src/worker-utils/lib/worker-farm/worker-thread.ts +206 -0
- package/src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts +81 -0
- package/src/worker-utils/lib/worker-utils/get-transfer-list.ts +93 -0
- package/src/worker-utils/lib/worker-utils/remove-nontransferable-options.ts +27 -0
- package/src/worker-utils/types.ts +125 -0
- package/src/worker-utils/workers/null-worker.ts +20 -0
- package/src/workers/null-worker-node.ts +1 -1
- package/src/workers/null-worker.ts +1 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { isMobile } from "../env-utils/globals.js";
|
|
5
|
+
import WorkerThread from "./worker-thread.js";
|
|
6
|
+
import WorkerJob from "./worker-job.js";
|
|
7
|
+
/**
|
|
8
|
+
* Process multiple data messages with small pool of identical workers
|
|
9
|
+
*/
|
|
10
|
+
export default class WorkerPool {
|
|
11
|
+
name = 'unnamed';
|
|
12
|
+
source; // | Function;
|
|
13
|
+
url;
|
|
14
|
+
/** Lazily resolves a classic worker fallback URL. */
|
|
15
|
+
getUrl;
|
|
16
|
+
/** Creates a browser Worker directly. */
|
|
17
|
+
loadWorker;
|
|
18
|
+
maxConcurrency = 1;
|
|
19
|
+
maxMobileConcurrency = 1;
|
|
20
|
+
onDebug = () => { };
|
|
21
|
+
reuseWorkers = true;
|
|
22
|
+
props = {};
|
|
23
|
+
jobQueue = [];
|
|
24
|
+
idleQueue = [];
|
|
25
|
+
activeJobs = new Set();
|
|
26
|
+
count = 0;
|
|
27
|
+
isDestroyed = false;
|
|
28
|
+
/** Checks if workers are supported on this platform */
|
|
29
|
+
static isSupported() {
|
|
30
|
+
return WorkerThread.isSupported();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @param processor - worker function
|
|
34
|
+
* @param maxConcurrency - max count of workers
|
|
35
|
+
*/
|
|
36
|
+
constructor(props) {
|
|
37
|
+
this.source = props.source;
|
|
38
|
+
this.url = props.url;
|
|
39
|
+
this.getUrl = props.getUrl;
|
|
40
|
+
this.loadWorker = props.loadWorker;
|
|
41
|
+
this.setProps(props);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Terminates all workers in the pool and aborts active jobs.
|
|
45
|
+
* @param reason Optional error delivered to active jobs.
|
|
46
|
+
* @note Can free up significant memory
|
|
47
|
+
*/
|
|
48
|
+
destroy(reason = new Error('Worker pool was destroyed')) {
|
|
49
|
+
// Abort active jobs so callers receive an error when a development worker is invalidated.
|
|
50
|
+
this.activeJobs.forEach(job => job.abort(reason));
|
|
51
|
+
const queuedJobs = this.jobQueue.splice(0);
|
|
52
|
+
queuedJobs.forEach(queuedJob => queuedJob.onReject(reason));
|
|
53
|
+
this.idleQueue.forEach(worker => worker.destroy());
|
|
54
|
+
this.isDestroyed = true;
|
|
55
|
+
}
|
|
56
|
+
setProps(props) {
|
|
57
|
+
this.props = { ...this.props, ...props };
|
|
58
|
+
if (props.name !== undefined) {
|
|
59
|
+
this.name = props.name;
|
|
60
|
+
}
|
|
61
|
+
if (props.maxConcurrency !== undefined) {
|
|
62
|
+
this.maxConcurrency = props.maxConcurrency;
|
|
63
|
+
}
|
|
64
|
+
if (props.maxMobileConcurrency !== undefined) {
|
|
65
|
+
this.maxMobileConcurrency = props.maxMobileConcurrency;
|
|
66
|
+
}
|
|
67
|
+
if (props.reuseWorkers !== undefined) {
|
|
68
|
+
this.reuseWorkers = props.reuseWorkers;
|
|
69
|
+
}
|
|
70
|
+
if (props.onDebug !== undefined) {
|
|
71
|
+
this.onDebug = props.onDebug;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async startJob(name, onMessage = (job, type, data) => job.done(data), onError = (job, error) => job.error(error)) {
|
|
75
|
+
if (this.isDestroyed) {
|
|
76
|
+
return Promise.reject(new Error('Worker pool was destroyed'));
|
|
77
|
+
}
|
|
78
|
+
// Promise resolves when thread starts working on this job
|
|
79
|
+
const startPromise = new Promise((onStart, onReject) => {
|
|
80
|
+
// Promise resolves when thread completes or fails working on this job
|
|
81
|
+
this.jobQueue.push({ name, onMessage, onError, onStart, onReject });
|
|
82
|
+
return this;
|
|
83
|
+
});
|
|
84
|
+
this._startQueuedJob(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
85
|
+
return await startPromise;
|
|
86
|
+
}
|
|
87
|
+
// PRIVATE
|
|
88
|
+
/**
|
|
89
|
+
* Starts first queued job if worker is available or can be created
|
|
90
|
+
* Called when job is started and whenever a worker returns to the idleQueue
|
|
91
|
+
*/
|
|
92
|
+
async _startQueuedJob() {
|
|
93
|
+
if (!this.jobQueue.length) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const workerThread = this._getAvailableWorker();
|
|
97
|
+
if (!workerThread) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
// We have a worker, dequeue and start the job
|
|
101
|
+
const queuedJob = this.jobQueue.shift();
|
|
102
|
+
if (queuedJob) {
|
|
103
|
+
// Emit a debug event
|
|
104
|
+
// @ts-ignore
|
|
105
|
+
this.onDebug({
|
|
106
|
+
message: 'Starting job',
|
|
107
|
+
name: queuedJob.name,
|
|
108
|
+
workerThread,
|
|
109
|
+
backlog: this.jobQueue.length
|
|
110
|
+
});
|
|
111
|
+
// Create a worker job to let the app access thread and manage job completion
|
|
112
|
+
const job = new WorkerJob(queuedJob.name, workerThread);
|
|
113
|
+
this.activeJobs.add(job);
|
|
114
|
+
workerThread.ref();
|
|
115
|
+
// Set the worker thread's message handlers
|
|
116
|
+
workerThread.onMessage = data => queuedJob.onMessage(job, data.type, data.payload);
|
|
117
|
+
workerThread.onError = error => queuedJob.onError(job, error);
|
|
118
|
+
// Resolve the start promise so that the app can start sending messages to worker
|
|
119
|
+
queuedJob.onStart(job);
|
|
120
|
+
// Wait for the app to signal that the job is complete, then return worker to queue
|
|
121
|
+
try {
|
|
122
|
+
await job.result;
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
// The job result promise carries worker errors back to the caller; do not duplicate-log
|
|
126
|
+
// handled rejections here.
|
|
127
|
+
}
|
|
128
|
+
finally {
|
|
129
|
+
this.activeJobs.delete(job);
|
|
130
|
+
this.returnWorkerToQueue(workerThread);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Returns a worker to the idle queue
|
|
136
|
+
* Destroys the worker if
|
|
137
|
+
* - pool is destroyed
|
|
138
|
+
* - if this pool doesn't reuse workers
|
|
139
|
+
* - if maxConcurrency has been lowered
|
|
140
|
+
* @param worker
|
|
141
|
+
*/
|
|
142
|
+
returnWorkerToQueue(worker) {
|
|
143
|
+
const shouldDestroyWorker =
|
|
144
|
+
// Aborted jobs terminate their worker immediately.
|
|
145
|
+
worker.terminated ||
|
|
146
|
+
// If the pool is destroyed, there is no reason to keep the worker around
|
|
147
|
+
this.isDestroyed ||
|
|
148
|
+
// If the app has disabled worker reuse, any completed workers should be destroyed
|
|
149
|
+
!this.reuseWorkers ||
|
|
150
|
+
// If concurrency has been lowered, this worker might be surplus to requirements
|
|
151
|
+
this.count > this._getMaxConcurrency();
|
|
152
|
+
if (shouldDestroyWorker) {
|
|
153
|
+
if (!worker.terminated) {
|
|
154
|
+
worker.destroy();
|
|
155
|
+
}
|
|
156
|
+
this.count--;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
worker.unref();
|
|
160
|
+
this.idleQueue.push(worker);
|
|
161
|
+
}
|
|
162
|
+
if (!this.isDestroyed) {
|
|
163
|
+
this._startQueuedJob(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Returns idle worker or creates new worker if maxConcurrency has not been reached
|
|
168
|
+
*/
|
|
169
|
+
_getAvailableWorker() {
|
|
170
|
+
// If a worker has completed and returned to the queue, it can be used
|
|
171
|
+
if (this.idleQueue.length > 0) {
|
|
172
|
+
return this.idleQueue.shift() || null;
|
|
173
|
+
}
|
|
174
|
+
// Create fresh worker if we haven't yet created the max amount of worker threads for this worker source
|
|
175
|
+
if (this.count < this._getMaxConcurrency()) {
|
|
176
|
+
this.count++;
|
|
177
|
+
const name = `${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;
|
|
178
|
+
return new WorkerThread({
|
|
179
|
+
name,
|
|
180
|
+
source: this.source,
|
|
181
|
+
url: this.url,
|
|
182
|
+
getUrl: this.getUrl,
|
|
183
|
+
loadWorker: this.loadWorker
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
// No worker available, have to wait
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
_getMaxConcurrency() {
|
|
190
|
+
return isMobile ? this.maxMobileConcurrency : this.maxConcurrency;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=worker-pool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-pool.js","sourceRoot":"","sources":["../../../../src/worker-utils/lib/worker-farm/worker-pool.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,QAAQ,EAAC,gCAA6B;AAC9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,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,8DAA8D;QACxF,CAAC;IACH,CAAC;IAED;;OAEG;IACH,mBAAmB;QACjB,sEAAsE;QACtE,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC;QACxC,CAAC;QAED,wGAAwG;QACxG,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,cAAc,GAAG,CAAC;YACrF,OAAO,IAAI,YAAY,CAAC;gBACtB,IAAI;gBACJ,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,UAAU,EAAE,IAAI,CAAC,UAAU;aAC5B,CAAC,CAAC;QACL,CAAC;QAED,oCAAoC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kBAAkB;QAChB,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { LoadWorker } from "../../types.js";
|
|
2
|
+
import { NodeWorkerType } from "../node/worker_threads.js";
|
|
3
|
+
export type WorkerThreadProps = {
|
|
4
|
+
/** Human-readable worker name. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Inline worker source. */
|
|
7
|
+
source?: string;
|
|
8
|
+
/** Worker script URL. */
|
|
9
|
+
url?: string;
|
|
10
|
+
/** Lazily resolves the classic worker URL used as a fallback. */
|
|
11
|
+
getUrl?: () => string;
|
|
12
|
+
/** Creates a browser Worker directly. */
|
|
13
|
+
loadWorker?: LoadWorker;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Represents one worker thread
|
|
17
|
+
*/
|
|
18
|
+
export default class WorkerThread {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly source: string | undefined;
|
|
21
|
+
readonly url: string | undefined;
|
|
22
|
+
/** Lazily resolves the classic worker URL used as a fallback. */
|
|
23
|
+
readonly getUrl: (() => string) | undefined;
|
|
24
|
+
/** Creates a browser Worker directly. */
|
|
25
|
+
readonly loadWorker: LoadWorker | undefined;
|
|
26
|
+
terminated: boolean;
|
|
27
|
+
worker: Worker | NodeWorkerType;
|
|
28
|
+
onMessage: (message: any) => void;
|
|
29
|
+
onError: (error: Error) => void;
|
|
30
|
+
private _loadableURL;
|
|
31
|
+
/** Checks if workers are supported on this platform */
|
|
32
|
+
static isSupported(): boolean;
|
|
33
|
+
constructor(props: WorkerThreadProps);
|
|
34
|
+
/**
|
|
35
|
+
* Terminate this worker thread
|
|
36
|
+
* @note Can free up significant memory
|
|
37
|
+
*/
|
|
38
|
+
destroy(): void;
|
|
39
|
+
/** Keeps this worker from preventing Node.js process exit while idle. */
|
|
40
|
+
unref(): void;
|
|
41
|
+
/** Keeps this worker alive while it is actively processing a job. */
|
|
42
|
+
ref(): void;
|
|
43
|
+
get isRunning(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Send a message to this worker thread
|
|
46
|
+
* @param data any data structure, ideally consisting mostly of transferrable objects
|
|
47
|
+
* @param transferList If not supplied, calculated automatically by traversing data
|
|
48
|
+
*/
|
|
49
|
+
postMessage(data: any, transferList?: any[]): void;
|
|
50
|
+
/**
|
|
51
|
+
* Generate a standard Error from an ErrorEvent
|
|
52
|
+
* @param event
|
|
53
|
+
*/
|
|
54
|
+
_getErrorFromErrorEvent(event: ErrorEvent): Error;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a worker thread on the browser
|
|
57
|
+
*/
|
|
58
|
+
_createBrowserWorker(): Worker;
|
|
59
|
+
/** Attaches protocol handlers to a browser worker. */
|
|
60
|
+
_initializeBrowserWorker(worker: Worker): Worker;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a worker thread in node.js
|
|
63
|
+
* @todo https://nodejs.org/api/async_hooks.html#async-resource-worker-pool
|
|
64
|
+
*/
|
|
65
|
+
_createNodeWorker(): NodeWorkerType;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=worker-thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-thread.d.ts","sourceRoot":"","sources":["../../../../src/worker-utils/lib/worker-farm/worker-thread.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,uBAAoB;AAC5C,OAAO,EAAa,cAAc,EAAC,kCAA+B;AAQlE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;IACtB,yCAAyC;IACzC,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,SAAS,CAAC;IAC5C,yCAAyC;IACzC,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAS;IAC5B,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC;IAChC,SAAS,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEhC,OAAO,CAAC,YAAY,CAAc;IAElC,uDAAuD;IACvD,MAAM,CAAC,WAAW,IAAI,OAAO;gBAOjB,KAAK,EAAE,iBAAiB;IAcpC;;;OAGG;IACH,OAAO,IAAI,IAAI;IAOf,yEAAyE;IACzE,KAAK,IAAI,IAAI;IAMb,qEAAqE;IACrE,GAAG,IAAI,IAAI;IAMX,IAAI,SAAS,YAEZ;IAED;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI;IAQlD;;;OAGG;IACH,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK;IAiBjD;;OAEG;IACH,oBAAoB,IAAI,MAAM;IAqB9B,sDAAsD;IACtD,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAmBhD;;;OAGG;IACH,iBAAiB,IAAI,cAAc;CA4BpC"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { NodeWorker } from "../node/worker_threads.js";
|
|
5
|
+
import { isBrowser } from "../env-utils/globals.js";
|
|
6
|
+
import { assert } from "../env-utils/assert.js";
|
|
7
|
+
import { getLoadableWorkerURL } from "../worker-utils/get-loadable-worker-url.js";
|
|
8
|
+
import { getTransferList } from "../worker-utils/get-transfer-list.js";
|
|
9
|
+
const NOOP = () => { };
|
|
10
|
+
/**
|
|
11
|
+
* Represents one worker thread
|
|
12
|
+
*/
|
|
13
|
+
export default class WorkerThread {
|
|
14
|
+
name;
|
|
15
|
+
source;
|
|
16
|
+
url;
|
|
17
|
+
/** Lazily resolves the classic worker URL used as a fallback. */
|
|
18
|
+
getUrl;
|
|
19
|
+
/** Creates a browser Worker directly. */
|
|
20
|
+
loadWorker;
|
|
21
|
+
terminated = false;
|
|
22
|
+
worker;
|
|
23
|
+
onMessage;
|
|
24
|
+
onError;
|
|
25
|
+
_loadableURL = '';
|
|
26
|
+
/** Checks if workers are supported on this platform */
|
|
27
|
+
static isSupported() {
|
|
28
|
+
return ((typeof Worker !== 'undefined' && isBrowser) ||
|
|
29
|
+
(typeof NodeWorker !== 'undefined' && !isBrowser));
|
|
30
|
+
}
|
|
31
|
+
constructor(props) {
|
|
32
|
+
const { name, source, url, getUrl, loadWorker } = props;
|
|
33
|
+
assert(source || url || getUrl || loadWorker);
|
|
34
|
+
this.name = name;
|
|
35
|
+
this.source = source;
|
|
36
|
+
this.url = url;
|
|
37
|
+
this.getUrl = getUrl;
|
|
38
|
+
this.loadWorker = loadWorker;
|
|
39
|
+
this.onMessage = NOOP;
|
|
40
|
+
this.onError = error => console.log(error); // eslint-disable-line
|
|
41
|
+
this.worker = isBrowser ? this._createBrowserWorker() : this._createNodeWorker();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Terminate this worker thread
|
|
45
|
+
* @note Can free up significant memory
|
|
46
|
+
*/
|
|
47
|
+
destroy() {
|
|
48
|
+
this.onMessage = NOOP;
|
|
49
|
+
this.onError = NOOP;
|
|
50
|
+
this.worker.terminate(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
51
|
+
this.terminated = true;
|
|
52
|
+
}
|
|
53
|
+
/** Keeps this worker from preventing Node.js process exit while idle. */
|
|
54
|
+
unref() {
|
|
55
|
+
if (!isBrowser && typeof this.worker.unref === 'function') {
|
|
56
|
+
this.worker.unref();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/** Keeps this worker alive while it is actively processing a job. */
|
|
60
|
+
ref() {
|
|
61
|
+
if (!isBrowser && typeof this.worker.ref === 'function') {
|
|
62
|
+
this.worker.ref();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
get isRunning() {
|
|
66
|
+
return Boolean(this.onMessage);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Send a message to this worker thread
|
|
70
|
+
* @param data any data structure, ideally consisting mostly of transferrable objects
|
|
71
|
+
* @param transferList If not supplied, calculated automatically by traversing data
|
|
72
|
+
*/
|
|
73
|
+
postMessage(data, transferList) {
|
|
74
|
+
transferList = transferList || getTransferList(data);
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
this.worker.postMessage(data, transferList);
|
|
77
|
+
}
|
|
78
|
+
// PRIVATE
|
|
79
|
+
/**
|
|
80
|
+
* Generate a standard Error from an ErrorEvent
|
|
81
|
+
* @param event
|
|
82
|
+
*/
|
|
83
|
+
_getErrorFromErrorEvent(event) {
|
|
84
|
+
// Note Error object does not have the expected fields if loading failed completely
|
|
85
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Worker#Event_handlers
|
|
86
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent
|
|
87
|
+
let message = 'Failed to load ';
|
|
88
|
+
message += `worker ${this.name} from ${this.url || 'built-in worker factory'}. `;
|
|
89
|
+
if (event.message) {
|
|
90
|
+
message += `${event.message} in `;
|
|
91
|
+
}
|
|
92
|
+
// const hasFilename = event.filename && !event.filename.startsWith('blob:');
|
|
93
|
+
// message += hasFilename ? event.filename : this.source.slice(0, 100);
|
|
94
|
+
if (event.lineno) {
|
|
95
|
+
message += `:${event.lineno}:${event.colno}`;
|
|
96
|
+
}
|
|
97
|
+
return new Error(message);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Creates a worker thread on the browser
|
|
101
|
+
*/
|
|
102
|
+
_createBrowserWorker() {
|
|
103
|
+
if (this.loadWorker) {
|
|
104
|
+
try {
|
|
105
|
+
const worker = this.loadWorker();
|
|
106
|
+
if (worker) {
|
|
107
|
+
return this._initializeBrowserWorker(worker);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (!this.source && !this.url && !this.getUrl) {
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const url = this.url || this.getUrl?.();
|
|
117
|
+
this._loadableURL = getLoadableWorkerURL({ source: this.source, url });
|
|
118
|
+
const worker = new Worker(this._loadableURL, { name: this.name });
|
|
119
|
+
return this._initializeBrowserWorker(worker);
|
|
120
|
+
}
|
|
121
|
+
/** Attaches protocol handlers to a browser worker. */
|
|
122
|
+
_initializeBrowserWorker(worker) {
|
|
123
|
+
worker.onmessage = event => {
|
|
124
|
+
if (!event.data) {
|
|
125
|
+
this.onError(new Error('No data received'));
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this.onMessage(event.data);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
// This callback represents an uncaught exception in the worker thread
|
|
132
|
+
worker.onerror = (error) => {
|
|
133
|
+
this.onError(this._getErrorFromErrorEvent(error));
|
|
134
|
+
this.terminated = true;
|
|
135
|
+
};
|
|
136
|
+
// TODO - not clear when this would be called, for now just log in case it happens
|
|
137
|
+
worker.onmessageerror = event => console.error(event); // eslint-disable-line
|
|
138
|
+
return worker;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Creates a worker thread in node.js
|
|
142
|
+
* @todo https://nodejs.org/api/async_hooks.html#async-resource-worker-pool
|
|
143
|
+
*/
|
|
144
|
+
_createNodeWorker() {
|
|
145
|
+
let worker;
|
|
146
|
+
if (this.url) {
|
|
147
|
+
// Make sure relative URLs start with './'
|
|
148
|
+
const absolute = this.url.includes(':/') || this.url.startsWith('/');
|
|
149
|
+
const url = absolute ? this.url : `./${this.url}`;
|
|
150
|
+
const workerUrl = url.startsWith('file:') ? new URL(url) : url;
|
|
151
|
+
const type = this.url.endsWith('.ts') || this.url.endsWith('.mjs') ? 'module' : 'commonjs';
|
|
152
|
+
// console.log('Starting work from', url);
|
|
153
|
+
// @ts-expect-error type is not known
|
|
154
|
+
worker = new NodeWorker(workerUrl, { eval: false, type });
|
|
155
|
+
}
|
|
156
|
+
else if (this.source) {
|
|
157
|
+
worker = new NodeWorker(this.source, { eval: true });
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
throw new Error('no worker');
|
|
161
|
+
}
|
|
162
|
+
worker.on('message', data => {
|
|
163
|
+
// console.error('message', data);
|
|
164
|
+
this.onMessage(data);
|
|
165
|
+
});
|
|
166
|
+
worker.on('error', error => {
|
|
167
|
+
this.onError(error);
|
|
168
|
+
});
|
|
169
|
+
worker.on('exit', _code => {
|
|
170
|
+
// console.error('exit', code);
|
|
171
|
+
});
|
|
172
|
+
return worker;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=worker-thread.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-thread.js","sourceRoot":"","sources":["../../../../src/worker-utils/lib/worker-farm/worker-thread.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,UAAU,EAAiB,kCAA+B;AAClE,OAAO,EAAC,SAAS,EAAC,gCAA6B;AAC/C,OAAO,EAAC,MAAM,EAAC,+BAA4B;AAC3C,OAAO,EAAC,oBAAoB,EAAC,mDAAgD;AAC7E,OAAO,EAAC,eAAe,EAAC,6CAA0C;AAElE,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAetB;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY;IACtB,IAAI,CAAS;IACb,MAAM,CAAqB;IAC3B,GAAG,CAAqB;IACjC,iEAAiE;IACxD,MAAM,CAA6B;IAC5C,yCAAyC;IAChC,UAAU,CAAyB;IAC5C,UAAU,GAAY,KAAK,CAAC;IAC5B,MAAM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;QACrD,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;QAC/B,CAAC;QACD,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE;YAC1B,kCAAkC;YAClC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;YACzB,IAAI,CAAC,OAAO,CAAC,KAAc,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;YACxB,+BAA+B;QACjC,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a loadable URL from worker source or URL
|
|
3
|
+
* that can be used to create `Worker` instances.
|
|
4
|
+
* Due to CORS issues it may be necessary to wrap a URL in a small importScripts
|
|
5
|
+
* @param props
|
|
6
|
+
* @param props.source Worker source
|
|
7
|
+
* @param props.url Worker URL
|
|
8
|
+
* @returns loadable url
|
|
9
|
+
*/
|
|
10
|
+
export declare function getLoadableWorkerURL(props: {
|
|
11
|
+
source?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
}): any;
|
|
14
|
+
//# sourceMappingURL=get-loadable-worker-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-loadable-worker-url.d.ts","sourceRoot":"","sources":["../../../../src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAC,OAmB1E"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { assert } from "../env-utils/assert.js";
|
|
5
|
+
const workerURLCache = new Map();
|
|
6
|
+
/**
|
|
7
|
+
* Creates a loadable URL from worker source or URL
|
|
8
|
+
* that can be used to create `Worker` instances.
|
|
9
|
+
* Due to CORS issues it may be necessary to wrap a URL in a small importScripts
|
|
10
|
+
* @param props
|
|
11
|
+
* @param props.source Worker source
|
|
12
|
+
* @param props.url Worker URL
|
|
13
|
+
* @returns loadable url
|
|
14
|
+
*/
|
|
15
|
+
export function getLoadableWorkerURL(props) {
|
|
16
|
+
assert((props.source && !props.url) || (!props.source && props.url)); // Either source or url must be defined
|
|
17
|
+
let workerURL = workerURLCache.get(props.source || props.url);
|
|
18
|
+
if (!workerURL) {
|
|
19
|
+
// Differentiate worker urls from worker source code
|
|
20
|
+
if (props.url) {
|
|
21
|
+
workerURL = getLoadableWorkerURLFromURL(props.url);
|
|
22
|
+
workerURLCache.set(props.url, workerURL);
|
|
23
|
+
}
|
|
24
|
+
if (props.source) {
|
|
25
|
+
workerURL = getLoadableWorkerURLFromSource(props.source);
|
|
26
|
+
workerURLCache.set(props.source, workerURL);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
assert(workerURL);
|
|
30
|
+
return workerURL;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Build a loadable worker URL from worker URL
|
|
34
|
+
* @param url
|
|
35
|
+
* @returns loadable URL
|
|
36
|
+
*/
|
|
37
|
+
function getLoadableWorkerURLFromURL(url) {
|
|
38
|
+
// A local script url, we can use it to initialize a Worker directly
|
|
39
|
+
if (!url.startsWith('http')) {
|
|
40
|
+
return url;
|
|
41
|
+
}
|
|
42
|
+
// A remote script, we need to use `importScripts` to load from different origin
|
|
43
|
+
const workerSource = buildScriptSource(url);
|
|
44
|
+
return getLoadableWorkerURLFromSource(workerSource);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Build a loadable worker URL from worker source
|
|
48
|
+
* @param workerSource
|
|
49
|
+
* @returns loadable url
|
|
50
|
+
*/
|
|
51
|
+
function getLoadableWorkerURLFromSource(workerSource) {
|
|
52
|
+
const blob = new Blob([workerSource], { type: 'application/javascript' });
|
|
53
|
+
return URL.createObjectURL(blob);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Per spec, worker cannot be initialized with a script from a different origin
|
|
57
|
+
* However a local worker script can still import scripts from other origins,
|
|
58
|
+
* so we simply build a wrapper script.
|
|
59
|
+
*
|
|
60
|
+
* @param workerUrl
|
|
61
|
+
* @returns source
|
|
62
|
+
*/
|
|
63
|
+
function buildScriptSource(workerUrl) {
|
|
64
|
+
return `\
|
|
65
|
+
try {
|
|
66
|
+
importScripts('${workerUrl}');
|
|
67
|
+
} catch (error) {
|
|
68
|
+
console.error(error);
|
|
69
|
+
throw error;
|
|
70
|
+
}`;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=get-loadable-worker-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-loadable-worker-url.js","sourceRoot":"","sources":["../../../../src/worker-utils/lib/worker-utils/get-loadable-worker-url.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,MAAM,EAAC,+BAA4B;AAE3C,MAAM,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;AAEjC;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAsC;IACzE,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,uCAAuC;IAE7G,IAAI,SAAS,GAAG,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,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be used with postMessage
|
|
3
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage
|
|
4
|
+
* @param object data to be sent via postMessage
|
|
5
|
+
* @param recursive - not for application use
|
|
6
|
+
* @param transfers - not for application use
|
|
7
|
+
* @returns a transfer list that can be passed to postMessage
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTransferList(object: any, recursive?: boolean, transfers?: Set<any>): Transferable[];
|
|
10
|
+
/**
|
|
11
|
+
* Recursively drop non serializable values like functions and regexps.
|
|
12
|
+
* @param object
|
|
13
|
+
*/
|
|
14
|
+
export declare function getTransferListForWriter(object: object | null): object;
|
|
15
|
+
//# sourceMappingURL=get-transfer-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-transfer-list.d.ts","sourceRoot":"","sources":["../../../../src/worker-utils/lib/worker-utils/get-transfer-list.ts"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,GAAG,EACX,SAAS,GAAE,OAAc,EACzB,SAAS,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GACnB,YAAY,EAAE,CAwBhB;AAuBD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAsBtE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
// NOTE - there is a copy of this function is both in core and loader-utils
|
|
5
|
+
// core does not need all the utils in loader-utils, just this one.
|
|
6
|
+
/**
|
|
7
|
+
* Returns an array of Transferrable objects that can be used with postMessage
|
|
8
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage
|
|
9
|
+
* @param object data to be sent via postMessage
|
|
10
|
+
* @param recursive - not for application use
|
|
11
|
+
* @param transfers - not for application use
|
|
12
|
+
* @returns a transfer list that can be passed to postMessage
|
|
13
|
+
*/
|
|
14
|
+
export function getTransferList(object, recursive = true, transfers) {
|
|
15
|
+
// Make sure that items in the transfer list is unique
|
|
16
|
+
const transfersSet = transfers || new Set();
|
|
17
|
+
if (!object) {
|
|
18
|
+
// ignore
|
|
19
|
+
}
|
|
20
|
+
else if (isTransferable(object)) {
|
|
21
|
+
transfersSet.add(object);
|
|
22
|
+
}
|
|
23
|
+
else if (isTransferable(object.buffer)) {
|
|
24
|
+
// Typed array
|
|
25
|
+
transfersSet.add(object.buffer);
|
|
26
|
+
}
|
|
27
|
+
else if (ArrayBuffer.isView(object)) {
|
|
28
|
+
// object is a TypeArray viewing into a SharedArrayBuffer (not transferable)
|
|
29
|
+
// Do not iterate through the content in this case
|
|
30
|
+
}
|
|
31
|
+
else if (recursive && typeof object === 'object') {
|
|
32
|
+
for (const key in object) {
|
|
33
|
+
// Avoid perf hit - only go one level deep
|
|
34
|
+
getTransferList(object[key], recursive, transfersSet);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// If transfers is defined, is internal recursive call
|
|
38
|
+
// Otherwise it's called by the user
|
|
39
|
+
return transfers === undefined ? Array.from(transfersSet) : [];
|
|
40
|
+
}
|
|
41
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Transferable
|
|
42
|
+
function isTransferable(object) {
|
|
43
|
+
if (!object) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (object instanceof ArrayBuffer) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
if (typeof MessagePort !== 'undefined' && object instanceof MessagePort) {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
if (typeof ImageBitmap !== 'undefined' && object instanceof ImageBitmap) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
if (typeof OffscreenCanvas !== 'undefined' && object instanceof OffscreenCanvas) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Recursively drop non serializable values like functions and regexps.
|
|
63
|
+
* @param object
|
|
64
|
+
*/
|
|
65
|
+
export function getTransferListForWriter(object) {
|
|
66
|
+
if (object === null) {
|
|
67
|
+
return {};
|
|
68
|
+
}
|
|
69
|
+
const clone = Object.assign({}, object);
|
|
70
|
+
Object.keys(clone).forEach(key => {
|
|
71
|
+
// Typed Arrays and Arrays are passed with no change
|
|
72
|
+
if (typeof object[key] === 'object' &&
|
|
73
|
+
!ArrayBuffer.isView(object[key]) &&
|
|
74
|
+
!(object[key] instanceof Array)) {
|
|
75
|
+
clone[key] = getTransferListForWriter(object[key]);
|
|
76
|
+
}
|
|
77
|
+
else if (typeof clone[key] === 'function' || clone[key] instanceof RegExp) {
|
|
78
|
+
clone[key] = {};
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
clone[key] = object[key];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return clone;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=get-transfer-list.js.map
|