@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,379 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { resolveCredentials } from "./authentication.js";
|
|
5
|
+
const DEFAULT_REFRESH_STATUS_CODES = [401, 403];
|
|
6
|
+
const AUTHENTICATED_FETCH = Symbol('loaders.gl.authenticated-fetch');
|
|
7
|
+
const refreshPromises = new WeakMap();
|
|
8
|
+
/** Creates a token credential placed in a URL query parameter. */
|
|
9
|
+
export function createQueryParameterCredential(options) {
|
|
10
|
+
return {
|
|
11
|
+
id: options.id,
|
|
12
|
+
origins: normalizeOrigins(options.origins),
|
|
13
|
+
type: 'query-parameter',
|
|
14
|
+
name: options.parameterName,
|
|
15
|
+
token: options.token,
|
|
16
|
+
refreshStatusCodes: options.refreshStatusCodes || DEFAULT_REFRESH_STATUS_CODES
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Creates a token credential placed in an HTTP bearer header. */
|
|
20
|
+
export function createBearerTokenCredential(options) {
|
|
21
|
+
return {
|
|
22
|
+
id: options.id,
|
|
23
|
+
origins: normalizeOrigins(options.origins),
|
|
24
|
+
type: 'header',
|
|
25
|
+
name: options.headerName || 'Authorization',
|
|
26
|
+
prefix: options.prefix ?? 'Bearer ',
|
|
27
|
+
token: options.token,
|
|
28
|
+
refreshStatusCodes: options.refreshStatusCodes || DEFAULT_REFRESH_STATUS_CODES
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** Base for authentication classes that adapt configuration to a token credential. */
|
|
32
|
+
export class TokenAuthentication {
|
|
33
|
+
/** Stable identifier used in diagnostics. */
|
|
34
|
+
id;
|
|
35
|
+
/** Exact origins authorized to receive the token. */
|
|
36
|
+
origins;
|
|
37
|
+
/** Transport placement of the token. */
|
|
38
|
+
type;
|
|
39
|
+
/** Header or query parameter name. */
|
|
40
|
+
name;
|
|
41
|
+
/** Optional prefix for header values. */
|
|
42
|
+
prefix;
|
|
43
|
+
/** Static token or application-managed token provider. */
|
|
44
|
+
token;
|
|
45
|
+
/** Statuses that permit one refresh and replay. */
|
|
46
|
+
refreshStatusCodes;
|
|
47
|
+
/** Provider-specific response failure detection. */
|
|
48
|
+
shouldRefresh;
|
|
49
|
+
/** Provider-specific read-only request replay predicate. */
|
|
50
|
+
canReplayRequest;
|
|
51
|
+
/** Initializes the instance from an existing transport credential. */
|
|
52
|
+
constructor(credential) {
|
|
53
|
+
this.id = credential.id;
|
|
54
|
+
this.origins = credential.origins;
|
|
55
|
+
this.type = credential.type;
|
|
56
|
+
this.name = credential.name;
|
|
57
|
+
this.prefix = credential.prefix;
|
|
58
|
+
this.token = credential.token;
|
|
59
|
+
this.refreshStatusCodes = credential.refreshStatusCodes;
|
|
60
|
+
this.shouldRefresh = credential.shouldRefresh;
|
|
61
|
+
this.canReplayRequest = credential.canReplayRequest;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Instantiates a query-token credential from declarative configuration. */
|
|
65
|
+
export class QueryParameterAuthentication extends TokenAuthentication {
|
|
66
|
+
/** Discriminator used in `core.credentials`. */
|
|
67
|
+
static type = 'query-parameter';
|
|
68
|
+
/** Creates a scoped query-token credential. */
|
|
69
|
+
constructor(options) {
|
|
70
|
+
super(createQueryParameterCredential(options));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** Instantiates a bearer credential from declarative configuration. */
|
|
74
|
+
export class BearerTokenAuthentication extends TokenAuthentication {
|
|
75
|
+
/** Discriminator used in `core.credentials`. */
|
|
76
|
+
static type = 'bearer-token';
|
|
77
|
+
/** Creates a scoped bearer credential. */
|
|
78
|
+
constructor(options) {
|
|
79
|
+
super(createBearerTokenCredential(options));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** Wraps a fetch function with exact-origin credential application and one refresh replay. */
|
|
83
|
+
export function createAuthenticatedFetch(options) {
|
|
84
|
+
const suppliedFetch = options.fetch || ((url, requestOptions) => fetch(url, requestOptions));
|
|
85
|
+
const existingMetadata = suppliedFetch[AUTHENTICATED_FETCH];
|
|
86
|
+
const credentialResolutions = new Map(existingMetadata?.credentialResolutions);
|
|
87
|
+
const resolvedCredentials = resolveCredentials(options.credentials.map(credential => credentialResolutions.get(credential) || credential), options.authentications);
|
|
88
|
+
options.credentials.forEach((credential, index) => {
|
|
89
|
+
credentialResolutions.set(credential, resolvedCredentials[index]);
|
|
90
|
+
});
|
|
91
|
+
if (!options.fetchOptions &&
|
|
92
|
+
(!resolvedCredentials.length ||
|
|
93
|
+
(existingMetadata?.credentials.length === resolvedCredentials.length &&
|
|
94
|
+
resolvedCredentials.every((credential, index) => credential === existingMetadata.credentials[index]))))
|
|
95
|
+
return suppliedFetch;
|
|
96
|
+
const baseFetch = existingMetadata?.fetch || suppliedFetch;
|
|
97
|
+
const credentials = existingMetadata
|
|
98
|
+
? [...new Set([...resolvedCredentials, ...existingMetadata.credentials])]
|
|
99
|
+
: resolvedCredentials;
|
|
100
|
+
const fetchOptions = mergeFetchOptions(existingMetadata?.fetchOptions || {}, options.fetchOptions);
|
|
101
|
+
const tokenCredentials = credentials.filter((credential) => credential.type !== 'request');
|
|
102
|
+
const requestCredentials = credentials.filter((credential) => credential.type === 'request');
|
|
103
|
+
// Validate scopes before any request, including custom scheme authorities for callbacks.
|
|
104
|
+
for (const credential of requestCredentials)
|
|
105
|
+
normalizeRequestOrigins(credential.origins);
|
|
106
|
+
const authenticatedFetch = async (url, requestOptions = {}) => {
|
|
107
|
+
requestOptions = mergeFetchOptions(fetchOptions, requestOptions);
|
|
108
|
+
if (requestOptions.signal?.aborted)
|
|
109
|
+
throw createAbortError();
|
|
110
|
+
// Request defaults alone must not normalize URLs or defer the transport invocation.
|
|
111
|
+
if (!credentials.length)
|
|
112
|
+
return baseFetch(url, requestOptions);
|
|
113
|
+
const resolvedURL = parseHTTPURL(url);
|
|
114
|
+
const authorization = resolvedURL
|
|
115
|
+
? await authorizeRequest(resolvedURL, requestOptions, tokenCredentials)
|
|
116
|
+
: { url, options: requestOptions, credentials: [] };
|
|
117
|
+
const signedRequest = await authenticateRequest(authorization, requestCredentials, 'request');
|
|
118
|
+
const response = await baseFetch(signedRequest.url, signedRequest.options);
|
|
119
|
+
const refreshableCredentials = [];
|
|
120
|
+
for (const resolvedCredential of authorization.credentials) {
|
|
121
|
+
const { credential } = resolvedCredential;
|
|
122
|
+
if (typeof credential.token === 'function' &&
|
|
123
|
+
(isReplayableRequest(requestOptions) ||
|
|
124
|
+
credential.canReplayRequest?.(url, requestOptions)) &&
|
|
125
|
+
(isReplayableRequest(signedRequest.options) ||
|
|
126
|
+
credential.canReplayRequest?.(signedRequest.url, signedRequest.options)) &&
|
|
127
|
+
(credential.refreshStatusCodes.includes(response.status) ||
|
|
128
|
+
(await credential.shouldRefresh?.(response))))
|
|
129
|
+
refreshableCredentials.push(resolvedCredential);
|
|
130
|
+
}
|
|
131
|
+
const shouldRetrySignature = isReplayableRequest(requestOptions) &&
|
|
132
|
+
isReplayableRequest(signedRequest.options) &&
|
|
133
|
+
signedRequest.credentials.some(credential => credential.refreshStatusCodes?.includes(response.status));
|
|
134
|
+
if (!refreshableCredentials.length && !shouldRetrySignature)
|
|
135
|
+
return response;
|
|
136
|
+
if (requestOptions.signal?.aborted)
|
|
137
|
+
throw createAbortError();
|
|
138
|
+
const refreshedTokens = new Map();
|
|
139
|
+
await Promise.all(refreshableCredentials.map(async ({ credential }) => {
|
|
140
|
+
const token = await refreshCredential(credential, url, response);
|
|
141
|
+
if (token)
|
|
142
|
+
refreshedTokens.set(credential, token);
|
|
143
|
+
}));
|
|
144
|
+
if (!refreshedTokens.size && !shouldRetrySignature)
|
|
145
|
+
return response;
|
|
146
|
+
await response.body?.cancel().catch(() => { });
|
|
147
|
+
if (requestOptions.signal?.aborted)
|
|
148
|
+
throw createAbortError();
|
|
149
|
+
const replayAuthorization = resolvedURL
|
|
150
|
+
? await authorizeRequest(resolvedURL, requestOptions, tokenCredentials, refreshedTokens, authorization.credentials)
|
|
151
|
+
: { url, options: requestOptions };
|
|
152
|
+
const replayRequest = await authenticateRequest(replayAuthorization, requestCredentials, 'retry', response);
|
|
153
|
+
return baseFetch(replayRequest.url, replayRequest.options);
|
|
154
|
+
};
|
|
155
|
+
Object.defineProperty(authenticatedFetch, AUTHENTICATED_FETCH, {
|
|
156
|
+
value: {
|
|
157
|
+
fetch: baseFetch,
|
|
158
|
+
credentials,
|
|
159
|
+
credentialResolutions,
|
|
160
|
+
fetchOptions
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return authenticatedFetch;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Creates a credential-aware fetch function from standard loader options.
|
|
167
|
+
* @param options Loader options containing an optional fetch override and scoped credentials.
|
|
168
|
+
* @returns A fetch function that preserves request defaults and applies matching credentials.
|
|
169
|
+
*/
|
|
170
|
+
export function getAuthenticatedFetch(options = {}) {
|
|
171
|
+
const fetchOption = options.fetch ?? options.core?.fetch;
|
|
172
|
+
let fetchFunction;
|
|
173
|
+
if (typeof fetchOption === 'function') {
|
|
174
|
+
fetchFunction = fetchOption;
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
fetchFunction = (url, requestOptions) => fetch(url, requestOptions);
|
|
178
|
+
}
|
|
179
|
+
return createAuthenticatedFetch({
|
|
180
|
+
fetch: fetchFunction,
|
|
181
|
+
fetchOptions: typeof fetchOption === 'object' && fetchOption ? fetchOption : undefined,
|
|
182
|
+
credentials: options.core?.credentials || [],
|
|
183
|
+
authentications: options.core?.authentications
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/** Combines default and per-request fetch options without replacing either header collection. */
|
|
187
|
+
function mergeFetchOptions(defaultOptions, requestOptions) {
|
|
188
|
+
const mergedOptions = { ...defaultOptions, ...requestOptions };
|
|
189
|
+
if (defaultOptions.headers || requestOptions?.headers) {
|
|
190
|
+
const headers = new Headers(defaultOptions.headers);
|
|
191
|
+
new Headers(requestOptions?.headers).forEach((value, key) => headers.set(key, value));
|
|
192
|
+
mergedOptions.headers = headers;
|
|
193
|
+
}
|
|
194
|
+
return mergedOptions;
|
|
195
|
+
}
|
|
196
|
+
/** Redacts credential-bearing query parameters from a URL used in diagnostics. */
|
|
197
|
+
export function redactCredentialURL(url, credentials) {
|
|
198
|
+
const resolvedURL = parseHTTPURL(url);
|
|
199
|
+
if (!resolvedURL)
|
|
200
|
+
return url;
|
|
201
|
+
if (credentials.some(credential => credential.type === 'request')) {
|
|
202
|
+
// A signer can rewrite the destination; its input scope cannot identify output URLs.
|
|
203
|
+
for (const name of [...resolvedURL.searchParams.keys()]) {
|
|
204
|
+
resolvedURL.searchParams.set(name, '[REDACTED]');
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
for (const credential of credentials) {
|
|
208
|
+
if (credential.type === 'query-parameter' &&
|
|
209
|
+
Array.isArray(credential.origins) &&
|
|
210
|
+
credential.origins.includes(resolvedURL.origin) &&
|
|
211
|
+
typeof credential.name === 'string' &&
|
|
212
|
+
resolvedURL.searchParams.has(credential.name)) {
|
|
213
|
+
resolvedURL.searchParams.set(credential.name, '[REDACTED]');
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return resolvedURL.toString();
|
|
217
|
+
}
|
|
218
|
+
/** Applies request callbacks after token placement, preserving cancellation across URL rewrites. */
|
|
219
|
+
async function authenticateRequest(request, credentials, reason, response) {
|
|
220
|
+
const appliedCredentials = [];
|
|
221
|
+
const signal = request.options.signal;
|
|
222
|
+
for (const credential of credentials) {
|
|
223
|
+
const origin = getRequestOrigin(request.url);
|
|
224
|
+
if (!origin || !normalizeRequestOrigins(credential.origins).includes(origin))
|
|
225
|
+
continue;
|
|
226
|
+
if (signal?.aborted)
|
|
227
|
+
throw createAbortError();
|
|
228
|
+
const authenticatedRequest = await credential.authenticate({
|
|
229
|
+
url: request.url,
|
|
230
|
+
options: { ...request.options, headers: new Headers(request.options.headers) },
|
|
231
|
+
reason,
|
|
232
|
+
response: response
|
|
233
|
+
? { status: response.status, headers: new Headers(response.headers) }
|
|
234
|
+
: undefined
|
|
235
|
+
});
|
|
236
|
+
if (!authenticatedRequest ||
|
|
237
|
+
typeof authenticatedRequest.url !== 'string' ||
|
|
238
|
+
!authenticatedRequest.options ||
|
|
239
|
+
typeof authenticatedRequest.options !== 'object') {
|
|
240
|
+
throw new Error('Authentication callback returned an invalid request.');
|
|
241
|
+
}
|
|
242
|
+
request = {
|
|
243
|
+
url: authenticatedRequest.url,
|
|
244
|
+
options: { ...authenticatedRequest.options, ...(signal ? { signal } : {}) }
|
|
245
|
+
};
|
|
246
|
+
appliedCredentials.push(credential);
|
|
247
|
+
}
|
|
248
|
+
if (signal?.aborted)
|
|
249
|
+
throw createAbortError();
|
|
250
|
+
return { ...request, credentials: appliedCredentials };
|
|
251
|
+
}
|
|
252
|
+
/** Returns an exact origin or custom-scheme authority without collapsing opaque URL origins. */
|
|
253
|
+
function getRequestOrigin(url) {
|
|
254
|
+
try {
|
|
255
|
+
const parsedURL = new URL(url);
|
|
256
|
+
if (!parsedURL.host || parsedURL.username || parsedURL.password)
|
|
257
|
+
return null;
|
|
258
|
+
return parsedURL.origin !== 'null'
|
|
259
|
+
? parsedURL.origin
|
|
260
|
+
: `${parsedURL.protocol}//${parsedURL.host}`;
|
|
261
|
+
}
|
|
262
|
+
catch {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/** Validates callback scopes, including custom scheme authorities such as `s3://bucket`. */
|
|
267
|
+
function normalizeRequestOrigins(origins) {
|
|
268
|
+
if (!origins.length)
|
|
269
|
+
throw new Error('Request authentication requires at least one exact origin.');
|
|
270
|
+
return origins.map(origin => {
|
|
271
|
+
const resolvedOrigin = getRequestOrigin(origin);
|
|
272
|
+
let url;
|
|
273
|
+
try {
|
|
274
|
+
url = new URL(origin);
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
throw new Error('Invalid request authentication origin.');
|
|
278
|
+
}
|
|
279
|
+
if (!resolvedOrigin || (url.pathname && url.pathname !== '/') || url.search || url.hash) {
|
|
280
|
+
throw new Error('Invalid request authentication origin.');
|
|
281
|
+
}
|
|
282
|
+
return resolvedOrigin;
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
/** Resolves matching tokens and applies them to a fresh URL and header collection. */
|
|
286
|
+
async function authorizeRequest(sourceURL, requestOptions, credentials, tokenOverrides = new Map(), previousCredentials = []) {
|
|
287
|
+
const url = new URL(sourceURL);
|
|
288
|
+
const headers = new Headers(requestOptions.headers);
|
|
289
|
+
const resolvedCredentials = [];
|
|
290
|
+
const previousTokens = new Map(previousCredentials.map(({ credential, token }) => [credential, token]));
|
|
291
|
+
for (const credential of credentials) {
|
|
292
|
+
if (!credential.origins.includes(url.origin))
|
|
293
|
+
continue;
|
|
294
|
+
const overrideToken = tokenOverrides.get(credential);
|
|
295
|
+
const previousToken = previousTokens.get(credential);
|
|
296
|
+
const ownsQueryParameter = credential.type === 'query-parameter' && previousToken !== undefined;
|
|
297
|
+
const ownsHeader = credential.type === 'header' && previousToken !== undefined;
|
|
298
|
+
if ((credential.type === 'query-parameter' &&
|
|
299
|
+
url.searchParams.has(credential.name) &&
|
|
300
|
+
!ownsQueryParameter) ||
|
|
301
|
+
(credential.type === 'header' && headers.has(credential.name) && !ownsHeader)) {
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
const token = overrideToken ??
|
|
305
|
+
previousToken ??
|
|
306
|
+
(await resolveToken(credential.token, { url: sourceURL.toString(), reason: 'request' }));
|
|
307
|
+
if (!token)
|
|
308
|
+
continue;
|
|
309
|
+
if (credential.type === 'query-parameter') {
|
|
310
|
+
url.searchParams.set(credential.name, token);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
headers.set(credential.name, `${credential.prefix || ''}${token}`);
|
|
314
|
+
}
|
|
315
|
+
resolvedCredentials.push({ credential, token });
|
|
316
|
+
}
|
|
317
|
+
return {
|
|
318
|
+
url: url.toString(),
|
|
319
|
+
options: { ...requestOptions, headers },
|
|
320
|
+
credentials: resolvedCredentials
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
/** Shares one in-flight refresh for concurrent requests using the same credential object. */
|
|
324
|
+
async function refreshCredential(credential, url, response) {
|
|
325
|
+
const existingPromise = refreshPromises.get(credential);
|
|
326
|
+
if (existingPromise)
|
|
327
|
+
return existingPromise;
|
|
328
|
+
const tokenProvider = credential.token;
|
|
329
|
+
const promise = Promise.resolve(tokenProvider({
|
|
330
|
+
url,
|
|
331
|
+
reason: 'refresh',
|
|
332
|
+
response: { status: response.status, headers: response.headers }
|
|
333
|
+
})).finally(() => refreshPromises.delete(credential));
|
|
334
|
+
refreshPromises.set(credential, promise);
|
|
335
|
+
return promise;
|
|
336
|
+
}
|
|
337
|
+
/** Resolves a static token or invokes an application token provider. */
|
|
338
|
+
async function resolveToken(token, context) {
|
|
339
|
+
return typeof token === 'function' ? token(context) : token;
|
|
340
|
+
}
|
|
341
|
+
/** Validates and canonicalizes an exact-origin allowlist. */
|
|
342
|
+
function normalizeOrigins(origins) {
|
|
343
|
+
if (!origins.length)
|
|
344
|
+
throw new Error('Request credentials require at least one exact origin.');
|
|
345
|
+
return origins.map(origin => {
|
|
346
|
+
const url = new URL(origin);
|
|
347
|
+
if (!['http:', 'https:'].includes(url.protocol) ||
|
|
348
|
+
url.pathname !== '/' ||
|
|
349
|
+
url.search ||
|
|
350
|
+
url.hash) {
|
|
351
|
+
throw new Error(`Credential origin must contain only scheme, host, and port: ${origin}`);
|
|
352
|
+
}
|
|
353
|
+
return url.origin;
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
/** Parses an HTTP(S) URL without throwing for other fetch-compatible inputs. */
|
|
357
|
+
function parseHTTPURL(url) {
|
|
358
|
+
try {
|
|
359
|
+
const parsedURL = new URL(url);
|
|
360
|
+
return ['http:', 'https:'].includes(parsedURL.protocol) ? parsedURL : null;
|
|
361
|
+
}
|
|
362
|
+
catch {
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
/** Returns whether a failed request can safely reuse its method and body once. */
|
|
367
|
+
function isReplayableRequest(options) {
|
|
368
|
+
const method = (options.method || 'GET').toUpperCase();
|
|
369
|
+
if (!['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE'].includes(method))
|
|
370
|
+
return false;
|
|
371
|
+
return !(options.body &&
|
|
372
|
+
typeof ReadableStream !== 'undefined' &&
|
|
373
|
+
options.body instanceof ReadableStream);
|
|
374
|
+
}
|
|
375
|
+
/** Creates the standard DOM exception used for an aborted fetch. */
|
|
376
|
+
function createAbortError() {
|
|
377
|
+
return new DOMException('The operation was aborted.', 'AbortError');
|
|
378
|
+
}
|
|
379
|
+
//# sourceMappingURL=request-credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-credentials.js","sourceRoot":"","sources":["../../../../src/loader-utils/lib/request-utils/request-credentials.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAWpC,OAAO,EAAC,kBAAkB,EAAC,4BAAyB;AAiGpD,MAAM,4BAA4B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAU,CAAC;AACzD,MAAM,mBAAmB,GAAG,MAAM,CAAC,gCAAgC,CAAC,CAAC;AACrE,MAAM,eAAe,GAAG,IAAI,OAAO,EAA6C,CAAC;AAcjF,kEAAkE;AAClE,MAAM,UAAU,8BAA8B,CAC5C,OAAwC;IAExC,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC;QAC1C,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,OAAO,CAAC,aAAa;QAC3B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,4BAA4B;KAC/E,CAAC;AACJ,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,2BAA2B,CACzC,OAAqC;IAErC,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC;QAC1C,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO,CAAC,UAAU,IAAI,eAAe;QAC3C,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,SAAS;QACnC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,4BAA4B;KAC/E,CAAC;AACJ,CAAC;AAED,sFAAsF;AACtF,MAAM,OAAO,mBAAmB;IAC9B,6CAA6C;IACpC,EAAE,CAAS;IACpB,qDAAqD;IAC5C,OAAO,CAAoB;IACp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,CAAC,OAAO,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IAChF,OAAO,CAAC,CACN,OAAO,CAAC,IAAI;QACZ,OAAO,cAAc,KAAK,WAAW;QACrC,OAAO,CAAC,IAAI,YAAY,cAAc,CACvC,CAAC;AACJ,CAAC;AAED,oEAAoE;AACpE,SAAS,gBAAgB;IACvB,OAAO,IAAI,YAAY,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Stats } from 'probe.gl/stats';
|
|
2
|
+
type Handle = any;
|
|
3
|
+
type DoneFunction = () => any;
|
|
4
|
+
type GetPriorityFunction = () => number;
|
|
5
|
+
type RequestResult = {
|
|
6
|
+
done: DoneFunction;
|
|
7
|
+
} | null;
|
|
8
|
+
/** RequestScheduler Options */
|
|
9
|
+
export type RequestSchedulerProps = {
|
|
10
|
+
id?: string;
|
|
11
|
+
throttleRequests?: boolean;
|
|
12
|
+
maxRequests?: number;
|
|
13
|
+
/** Quiet period after the most recent new request; completions never restart this timer. */
|
|
14
|
+
debounceTime?: number;
|
|
15
|
+
};
|
|
16
|
+
/** Tracks one request */
|
|
17
|
+
type Request = {
|
|
18
|
+
handle: Handle;
|
|
19
|
+
priority: number;
|
|
20
|
+
getPriority: GetPriorityFunction;
|
|
21
|
+
resolve?: (value: any) => any;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
25
|
+
* @todo - Track requests globally, across multiple servers
|
|
26
|
+
*/
|
|
27
|
+
export default class RequestScheduler {
|
|
28
|
+
readonly props: Required<RequestSchedulerProps>;
|
|
29
|
+
readonly stats: Stats;
|
|
30
|
+
activeRequestCount: number;
|
|
31
|
+
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
32
|
+
private requestQueue;
|
|
33
|
+
private requestMap;
|
|
34
|
+
/** Pending arrival debounce or next-tick refill; only new arrivals replace this timer. */
|
|
35
|
+
private updateTimer;
|
|
36
|
+
constructor(props?: RequestSchedulerProps);
|
|
37
|
+
/**
|
|
38
|
+
* Update scheduler props. Preserves active and queued requests.
|
|
39
|
+
*/
|
|
40
|
+
setProps(props: Omit<RequestSchedulerProps, 'id'>): void;
|
|
41
|
+
/**
|
|
42
|
+
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
43
|
+
*
|
|
44
|
+
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
45
|
+
* The promise resolves to an object that contains a `done` method.
|
|
46
|
+
* When the application's request has completed (or failed), the application must call the `done` function
|
|
47
|
+
*
|
|
48
|
+
* @param handle
|
|
49
|
+
* @param getPriority will be called when request "slots" open up,
|
|
50
|
+
* allowing the caller to update priority or cancel the request
|
|
51
|
+
* Highest priority executes first, priority < 0 cancels the request
|
|
52
|
+
* @returns a promise
|
|
53
|
+
* - resolves to a object (with a `done` field) when the request can be issued without queueing,
|
|
54
|
+
* - resolves to `null` if the request has been cancelled (by the callback return < 0).
|
|
55
|
+
* In this case the application should not issue the request
|
|
56
|
+
*/
|
|
57
|
+
scheduleRequest(handle: Handle, getPriority?: GetPriorityFunction): Promise<RequestResult>;
|
|
58
|
+
_issueRequest(request: Request): Promise<any>;
|
|
59
|
+
/** Refills freed slots on the next tick while preserving any pending arrival debounce. */
|
|
60
|
+
private scheduleRefill;
|
|
61
|
+
/** Restarts the quiet period when a new request enters the queue. */
|
|
62
|
+
_issueNewRequests(): void;
|
|
63
|
+
/** Clears timer ownership before updating priorities and dispatching queued requests. */
|
|
64
|
+
_issueNewRequestsAsync(): void;
|
|
65
|
+
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
66
|
+
_updateAllRequests(): void;
|
|
67
|
+
/** Update a single request by calling the callback */
|
|
68
|
+
_updateRequest(request: any): boolean;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=request-scheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-scheduler.d.ts","sourceRoot":"","sources":["../../../../src/loader-utils/lib/request-utils/request-scheduler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,KAAK,MAAM,GAAG,GAAG,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,GAAG,CAAC;AAC9B,KAAK,mBAAmB,GAAG,MAAM,MAAM,CAAC;AACxC,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB,GAAG,IAAI,CAAC;AAET,+BAA+B;AAC/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAqBF,yBAAyB;AACzB,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,mBAAmB,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CAC/B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IACnC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAK;IAE/B,oFAAoF;IACpF,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,UAAU,CAAkD;IACpE,0FAA0F;IAC1F,OAAO,CAAC,WAAW,CAA8C;gBAErD,KAAK,GAAE,qBAA0B;IAY7C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,GAAG,IAAI;IAYxD;;;;;;;;;;;;;;;OAeG;IACH,eAAe,CACb,MAAM,EAAE,MAAM,EACd,WAAW,GAAE,mBAA6B,GACzC,OAAO,CAAC,aAAa,CAAC;IA0BzB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;IAsB7C,0FAA0F;IAC1F,OAAO,CAAC,cAAc;IAOtB,qEAAqE;IACrE,iBAAiB,IAAI,IAAI;IAOzB,yFAAyF;IACzF,sBAAsB;IA0BtB,mGAAmG;IACnG,kBAAkB;IAgBlB,sDAAsD;IACtD,cAAc,CAAC,OAAO,KAAA;CAUvB"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// loaders.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { Stats } from 'probe.gl/stats';
|
|
5
|
+
const STAT_QUEUED_REQUESTS = 'Queued Requests';
|
|
6
|
+
const STAT_ACTIVE_REQUESTS = 'Active Requests';
|
|
7
|
+
const STAT_CANCELLED_REQUESTS = 'Cancelled Requests';
|
|
8
|
+
const STAT_QUEUED_REQUESTS_EVER = 'Queued Requests Ever';
|
|
9
|
+
const STAT_ACTIVE_REQUESTS_EVER = 'Active Requests Ever';
|
|
10
|
+
const DEFAULT_PROPS = {
|
|
11
|
+
id: 'request-scheduler',
|
|
12
|
+
/** Specifies if the request scheduler should throttle incoming requests, mainly for comparative testing. */
|
|
13
|
+
throttleRequests: true,
|
|
14
|
+
/** The maximum number of simultaneous active requests. Un-throttled requests do not observe this limit. */
|
|
15
|
+
maxRequests: 6,
|
|
16
|
+
/**
|
|
17
|
+
* Specifies a debounce time, in milliseconds. All requests are queued, until no new requests have
|
|
18
|
+
* been added to the queue for this amount of time.
|
|
19
|
+
*/
|
|
20
|
+
debounceTime: 0
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Used to issue a request, without having them "deeply queued" by the browser.
|
|
24
|
+
* @todo - Track requests globally, across multiple servers
|
|
25
|
+
*/
|
|
26
|
+
export default class RequestScheduler {
|
|
27
|
+
props;
|
|
28
|
+
stats;
|
|
29
|
+
activeRequestCount = 0;
|
|
30
|
+
/** Tracks the number of active requests and prioritizes/cancels queued requests. */
|
|
31
|
+
requestQueue = [];
|
|
32
|
+
requestMap = new Map();
|
|
33
|
+
/** Pending arrival debounce or next-tick refill; only new arrivals replace this timer. */
|
|
34
|
+
updateTimer = null;
|
|
35
|
+
constructor(props = {}) {
|
|
36
|
+
this.props = { ...DEFAULT_PROPS, ...props };
|
|
37
|
+
// Returns the statistics used by the request scheduler.
|
|
38
|
+
this.stats = new Stats({ id: this.props.id });
|
|
39
|
+
this.stats.get(STAT_QUEUED_REQUESTS);
|
|
40
|
+
this.stats.get(STAT_ACTIVE_REQUESTS);
|
|
41
|
+
this.stats.get(STAT_CANCELLED_REQUESTS);
|
|
42
|
+
this.stats.get(STAT_QUEUED_REQUESTS_EVER);
|
|
43
|
+
this.stats.get(STAT_ACTIVE_REQUESTS_EVER);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Update scheduler props. Preserves active and queued requests.
|
|
47
|
+
*/
|
|
48
|
+
setProps(props) {
|
|
49
|
+
if (props.throttleRequests !== undefined) {
|
|
50
|
+
this.props.throttleRequests = props.throttleRequests;
|
|
51
|
+
}
|
|
52
|
+
if (props.maxRequests !== undefined) {
|
|
53
|
+
this.props.maxRequests = props.maxRequests;
|
|
54
|
+
}
|
|
55
|
+
if (props.debounceTime !== undefined) {
|
|
56
|
+
this.props.debounceTime = props.debounceTime;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Called by an application that wants to issue a request, without having it deeply queued by the browser
|
|
61
|
+
*
|
|
62
|
+
* When the returned promise resolved, it is OK for the application to issue a request.
|
|
63
|
+
* The promise resolves to an object that contains a `done` method.
|
|
64
|
+
* When the application's request has completed (or failed), the application must call the `done` function
|
|
65
|
+
*
|
|
66
|
+
* @param handle
|
|
67
|
+
* @param getPriority will be called when request "slots" open up,
|
|
68
|
+
* allowing the caller to update priority or cancel the request
|
|
69
|
+
* Highest priority executes first, priority < 0 cancels the request
|
|
70
|
+
* @returns a promise
|
|
71
|
+
* - resolves to a object (with a `done` field) when the request can be issued without queueing,
|
|
72
|
+
* - resolves to `null` if the request has been cancelled (by the callback return < 0).
|
|
73
|
+
* In this case the application should not issue the request
|
|
74
|
+
*/
|
|
75
|
+
scheduleRequest(handle, getPriority = () => 0) {
|
|
76
|
+
// Allows throttling to be disabled
|
|
77
|
+
if (!this.props.throttleRequests) {
|
|
78
|
+
return Promise.resolve({ done: () => { } });
|
|
79
|
+
}
|
|
80
|
+
// dedupe
|
|
81
|
+
if (this.requestMap.has(handle)) {
|
|
82
|
+
return this.requestMap.get(handle);
|
|
83
|
+
}
|
|
84
|
+
const request = { handle, priority: 0, getPriority };
|
|
85
|
+
const promise = new Promise(resolve => {
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
request.resolve = resolve;
|
|
88
|
+
return request;
|
|
89
|
+
});
|
|
90
|
+
this.requestQueue.push(request);
|
|
91
|
+
this.requestMap.set(handle, promise);
|
|
92
|
+
this._issueNewRequests();
|
|
93
|
+
return promise;
|
|
94
|
+
}
|
|
95
|
+
// PRIVATE
|
|
96
|
+
_issueRequest(request) {
|
|
97
|
+
const { handle, resolve } = request;
|
|
98
|
+
let isDone = false;
|
|
99
|
+
const done = () => {
|
|
100
|
+
// can only be called once
|
|
101
|
+
if (!isDone) {
|
|
102
|
+
isDone = true;
|
|
103
|
+
// Stop tracking a request - it has completed, failed, cancelled etc
|
|
104
|
+
this.requestMap.delete(handle);
|
|
105
|
+
this.activeRequestCount--;
|
|
106
|
+
this.scheduleRefill();
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
// Track this request
|
|
110
|
+
this.activeRequestCount++;
|
|
111
|
+
return resolve ? resolve({ done }) : Promise.resolve({ done });
|
|
112
|
+
}
|
|
113
|
+
/** Refills freed slots on the next tick while preserving any pending arrival debounce. */
|
|
114
|
+
scheduleRefill() {
|
|
115
|
+
if (this.updateTimer !== null) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this.updateTimer = setTimeout(() => this._issueNewRequestsAsync(), 0);
|
|
119
|
+
}
|
|
120
|
+
/** Restarts the quiet period when a new request enters the queue. */
|
|
121
|
+
_issueNewRequests() {
|
|
122
|
+
if (this.updateTimer !== null) {
|
|
123
|
+
clearTimeout(this.updateTimer);
|
|
124
|
+
}
|
|
125
|
+
this.updateTimer = setTimeout(() => this._issueNewRequestsAsync(), this.props.debounceTime);
|
|
126
|
+
}
|
|
127
|
+
/** Clears timer ownership before updating priorities and dispatching queued requests. */
|
|
128
|
+
_issueNewRequestsAsync() {
|
|
129
|
+
if (this.updateTimer !== null) {
|
|
130
|
+
clearTimeout(this.updateTimer);
|
|
131
|
+
}
|
|
132
|
+
this.updateTimer = null;
|
|
133
|
+
const freeSlots = Math.max(this.props.maxRequests - this.activeRequestCount, 0);
|
|
134
|
+
if (freeSlots === 0) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this._updateAllRequests();
|
|
138
|
+
// Resolve pending promises for the top-priority requests
|
|
139
|
+
for (let i = 0; i < freeSlots; ++i) {
|
|
140
|
+
const request = this.requestQueue.shift();
|
|
141
|
+
if (request) {
|
|
142
|
+
this._issueRequest(request); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Uncomment to debug
|
|
146
|
+
// console.log(`${freeSlots} free slots, ${this.requestQueue.length} queued requests`);
|
|
147
|
+
}
|
|
148
|
+
/** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */
|
|
149
|
+
_updateAllRequests() {
|
|
150
|
+
const requestQueue = this.requestQueue;
|
|
151
|
+
for (let i = 0; i < requestQueue.length; ++i) {
|
|
152
|
+
const request = requestQueue[i];
|
|
153
|
+
if (!this._updateRequest(request)) {
|
|
154
|
+
// Remove the element and make sure to adjust the counter to account for shortened array
|
|
155
|
+
requestQueue.splice(i, 1);
|
|
156
|
+
this.requestMap.delete(request.handle);
|
|
157
|
+
i--;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// Sort the remaining requests based on priority
|
|
161
|
+
requestQueue.sort((a, b) => a.priority - b.priority);
|
|
162
|
+
}
|
|
163
|
+
/** Update a single request by calling the callback */
|
|
164
|
+
_updateRequest(request) {
|
|
165
|
+
request.priority = request.getPriority(request.handle); // eslint-disable-line callback-return
|
|
166
|
+
// by returning a negative priority, the callback cancels the request
|
|
167
|
+
if (request.priority < 0) {
|
|
168
|
+
request.resolve(null);
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=request-scheduler.js.map
|