From 8884a8896f687552f485c1d73ab1ae38e250d958 Mon Sep 17 00:00:00 2001 From: Ib Green Date: Wed, 2 Oct 2024 10:48:44 -0400 Subject: [PATCH 1/2] feat: Improve loader type safety --- .../helpers/parse-3d-tile-gltf-view.ts | 3 +- modules/core/src/lib/api/parse-in-batches.ts | 9 +- modules/core/src/lib/api/select-loader.ts | 15 +- .../src/lib/loader-utils/option-defaults.ts | 69 ++++++--- .../core/src/lib/loader-utils/option-utils.ts | 13 +- modules/csv/src/csv-loader.ts | 4 +- modules/geotiff/src/geotiff-loader.ts | 4 +- modules/geotiff/src/loaders.ts | 10 +- modules/gltf/src/glb-loader.ts | 14 +- modules/gltf/src/gltf-loader.ts | 7 +- modules/gltf/test/gltf-loader.spec.ts | 9 +- modules/i3s/src/i3s-loader.ts | 9 +- .../src/lib/helpers/i3s-nodepages-tiles.ts | 2 - modules/i3s/src/lib/parsers/parse-i3s.ts | 1 - modules/i3s/src/lib/utils/customize-colors.ts | 6 +- modules/images/src/image-loader.ts | 2 +- .../src/lib/parsers/parse-json-in-batches.ts | 2 +- .../src/lib/sources/data-source.ts | 2 +- .../src/lib/sources/utils/utils.ts | 2 +- .../create-loader-worker.ts | 5 +- .../worker-loader-utils/parse-with-worker.ts | 2 +- modules/loader-utils/src/loader-types.ts | 146 +++++++----------- modules/mvt/src/lib/parse-mvt.ts | 1 + modules/mvt/src/mvt-source.ts | 2 +- .../src/lib/parsers/parse-geoparquet.ts | 7 +- .../parquet/src/lib/parsers/parse-parquet.ts | 6 +- modules/pmtiles/src/pmtiles-source.ts | 2 +- modules/terrain/src/index.ts | 4 +- .../3d-tiles-converter/3d-tiles-converter.ts | 18 ++- .../3d-tiles-converter/helpers/load-i3s.ts | 2 +- .../i3s-converter/helpers/load-3d-tiles.ts | 2 +- .../src/i3s-converter/i3s-converter.ts | 8 +- modules/tiles/src/tileset/tile-3d.ts | 3 +- modules/tiles/src/tileset/tileset-3d.ts | 1 - modules/wms/src/csw-source.ts | 13 +- tsconfig.build.tsbuildinfo | 1 + 36 files changed, 217 insertions(+), 189 deletions(-) create mode 100644 tsconfig.build.tsbuildinfo diff --git a/modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-gltf-view.ts b/modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-gltf-view.ts index 71e8ebcc4c..d5124c37ef 100644 --- a/modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-gltf-view.ts +++ b/modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-gltf-view.ts @@ -80,7 +80,8 @@ export async function extractGLTF( } if (tile.gltfUrl) { const {fetch} = context; - const response = await fetch(tile.gltfUrl, options); + // @ts-expect-error TODO - This may not work + const response = await fetch(tile.gltfUrl, options?.core); tile.gltfArrayBuffer = await response.arrayBuffer(); tile.gltfByteOffset = 0; } diff --git a/modules/core/src/lib/api/parse-in-batches.ts b/modules/core/src/lib/api/parse-in-batches.ts index d727b3b511..7331d83ef6 100644 --- a/modules/core/src/lib/api/parse-in-batches.ts +++ b/modules/core/src/lib/api/parse-in-batches.ts @@ -79,7 +79,7 @@ export async function parseInBatches( // Signature: parseInBatches(data, options, url) - Uses registered loaders if (!Array.isArray(loaders) && !isLoaderObject(loaders)) { context = undefined; // context not supported in short signature - options = loaders as LoaderOptions; + options = loaders as unknown as LoaderOptions; loaders = undefined; } @@ -161,7 +161,10 @@ async function parseToOutputIterator( const inputIterator = await getAsyncIterableFromData(data, options); // Apply any iterator transforms (options.transforms) - const transformedIterator = await applyInputTransforms(inputIterator, options?.transforms || []); + const transformedIterator = await applyInputTransforms( + inputIterator, + options?.core?.transforms || [] + ); // If loader supports parseInBatches, we are done if (loader.parseInBatches) { @@ -184,7 +187,7 @@ async function* parseChunkInBatches( arrayBuffer, loader, // TODO - Hack: supply loaders MIME type to ensure we match it - {...options, mimeType: loader.mimeTypes[0]}, + {...options, core: {...options?.core, mimeType: loader.mimeTypes[0]}}, context ); diff --git a/modules/core/src/lib/api/select-loader.ts b/modules/core/src/lib/api/select-loader.ts index aca0d97996..4208ea1f13 100644 --- a/modules/core/src/lib/api/select-loader.ts +++ b/modules/core/src/lib/api/select-loader.ts @@ -38,7 +38,12 @@ export async function selectLoader( } // First make a sync attempt, disabling exceptions - let loader = selectLoaderSync(data, loaders, {...options, nothrow: true}, context); + let loader = selectLoaderSync( + data, + loaders, + {...options, core: {...options?.core, nothrow: true}}, + context + ); if (loader) { return loader; } @@ -126,8 +131,8 @@ function selectLoaderInternal( let reason: string = ''; // if options.mimeType is supplied, it takes precedence - if (options?.mimeType) { - loader = findLoaderByMIMEType(loaders, options?.mimeType); + if (options?.core?.mimeType) { + loader = findLoaderByMIMEType(loaders, options?.core?.mimeType); reason = `match forced by supplied MIME type ${options?.mimeType}`; } @@ -146,8 +151,8 @@ function selectLoaderInternal( reason = reason || (loader ? `matched initial data ${getFirstCharacters(data)}` : ''); // Look up loader by fallback mime type - if (options?.fallbackMimeType) { - loader = loader || findLoaderByMIMEType(loaders, options?.fallbackMimeType); + if (options?.core?.fallbackMimeType) { + loader = loader || findLoaderByMIMEType(loaders, options?.core?.fallbackMimeType); reason = reason || (loader ? `matched fallback MIME type ${type}` : ''); } diff --git a/modules/core/src/lib/loader-utils/option-defaults.ts b/modules/core/src/lib/loader-utils/option-defaults.ts index 6b5520729e..c93a3c2f34 100644 --- a/modules/core/src/lib/loader-utils/option-defaults.ts +++ b/modules/core/src/lib/loader-utils/option-defaults.ts @@ -7,34 +7,59 @@ import {isBrowser} from '@loaders.gl/loader-utils'; import {ConsoleLog} from './loggers'; export const DEFAULT_LOADER_OPTIONS: LoaderOptions = { - // baseUri - fetch: null, - mimeType: undefined, - nothrow: false, - log: new ConsoleLog(), // A probe.gl compatible (`log.log()()` syntax) that just logs to console - useLocalLibraries: false, - - CDN: 'https://unpkg.com/@loaders.gl', - worker: true, // By default, use worker if provided by loader. - maxConcurrency: 3, // How many worker instances should be created for each loader. - maxMobileConcurrency: 1, // How many worker instances should be created for each loader on mobile devices. - reuseWorkers: isBrowser, // By default reuse workers in browser (Node.js refuses to terminate if browsers are running) - _nodeWorkers: false, // By default do not support node workers - _workerType: '', // 'test' to use locally generated workers - - limit: 0, - _limitMB: 0, - batchSize: 'auto', - batchDebounceMs: 0, - metadata: false, // TODO - currently only implemented for parseInBatches, adds initial metadata batch, - transforms: [] + core: { + // baseUri + fetch: null, + mimeType: undefined, + nothrow: false, + log: new ConsoleLog(), // A probe.gl compatible (`log.log()()` syntax) that just logs to console + useLocalLibraries: false, + + CDN: 'https://unpkg.com/@loaders.gl', + worker: true, // By default, use worker if provided by loader. + maxConcurrency: 3, // How many worker instances should be created for each loader. + maxMobileConcurrency: 1, // How many worker instances should be created for each loader on mobile devices. + reuseWorkers: isBrowser, // By default reuse workers in browser (Node.js refuses to terminate if browsers are running) + _nodeWorkers: false, // By default do not support node workers + _workerType: '', // 'test' to use locally generated workers + + limit: 0, + _limitMB: 0, + batchSize: 'auto', + batchDebounceMs: 0, + metadata: false, // TODO - currently only implemented for parseInBatches, adds initial metadata batch, + transforms: [] + } }; export const REMOVED_LOADER_OPTIONS = { + // baseUri + fetch: 'core.fetch', + mimeType: 'core.mimeType', + nothrow: 'core.nothrow', + log: 'core.log', + useLocalLibraries: 'core.useLocalLibraries', + + CDN: 'core.CDN', + worker: 'core,worker', + maxConcurrency: 'core.maxConcurrency', + maxMobileConcurrency: 'core.maxMobileConcurrency', + reuseWorkers: 'core.reuseWorkers', + _nodeWorkers: 'core.nodeWorkers', + _workerType: 'core._workerType', + + limit: 'core.limit', + _limitMB: 'core._limitMB', + batchSize: 'core.batchSize', + batchDebounceMs: 'core.batchDebounceMs', + metadata: 'core.metadata', + transforms: 'core.transforms', + + // Older deprecations throws: 'nothrow', dataType: '(no longer used)', uri: 'baseUri', - // Warn if fetch options are used on top-level + // Warn if fetch options are used on toplevel method: 'fetch.method', headers: 'fetch.headers', body: 'fetch.body', diff --git a/modules/core/src/lib/loader-utils/option-utils.ts b/modules/core/src/lib/loader-utils/option-utils.ts index 48c91e67ca..940db1cb99 100644 --- a/modules/core/src/lib/loader-utils/option-utils.ts +++ b/modules/core/src/lib/loader-utils/option-utils.ts @@ -89,10 +89,7 @@ function validateOptions(options: LoaderOptions, loaders: Loader[]): void { validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders); for (const loader of loaders) { // Get the scoped, loader specific options from the user supplied options - const idOptions: Record = ((options && options[loader.id]) || {}) as Record< - string, - unknown - >; + const idOptions: Record = (options && options[loader.id]) || {}; // Get scoped, loader specific default and deprecated options from the selected loader const loaderOptions = (loader.options && loader.options[loader.id]) || {}; @@ -169,8 +166,8 @@ function normalizeOptionsInternal( addUrlOptions(mergedOptions, url); // LOGGING: options.log can be set to `null` to defeat logging - if (mergedOptions.log === null) { - mergedOptions.log = new NullLog(); + if (mergedOptions.core?.log === null) { + mergedOptions.core = {...mergedOptions.core, log: new NullLog()}; } mergeNestedFields(mergedOptions, getGlobalLoaderOptions()); @@ -209,6 +206,8 @@ function mergeNestedFields(mergedOptions: LoaderOptions, options: LoaderOptions) */ function addUrlOptions(options: LoaderOptions, url?: string): void { if (url && !('baseUri' in options)) { - options.baseUri = url; + options.core ||= {}; + // @ts-expect-error TODO - remove + options.core.baseUri = url; } } diff --git a/modules/csv/src/csv-loader.ts b/modules/csv/src/csv-loader.ts index ef30551879..b9cd142fd7 100644 --- a/modules/csv/src/csv-loader.ts +++ b/modules/csv/src/csv-loader.ts @@ -139,8 +139,8 @@ function parseCSVInBatches( // Papaparse does not support standard batch size handling // TODO - investigate papaparse chunks mode options = {...options}; - if (options.batchSize === 'auto') { - options.batchSize = 4000; + if (options?.core?.batchSize === 'auto') { + options.core.batchSize = 4000; } // Apps can call the parse method directly, we so apply default options here diff --git a/modules/geotiff/src/geotiff-loader.ts b/modules/geotiff/src/geotiff-loader.ts index cbb411cf2e..b8e8172f4f 100644 --- a/modules/geotiff/src/geotiff-loader.ts +++ b/modules/geotiff/src/geotiff-loader.ts @@ -37,7 +37,9 @@ export const GeoTIFFLoader = { module: 'geotiff', version: VERSION, options: { - enableAlpha: true + geotiff: { + enableAlpha: true + } }, mimeTypes: ['image/tiff', 'image/geotiff'], extensions: ['geotiff', 'tiff', 'geotif', 'tif'], diff --git a/modules/geotiff/src/loaders.ts b/modules/geotiff/src/loaders.ts index 796f9b5ecc..914f84e916 100644 --- a/modules/geotiff/src/loaders.ts +++ b/modules/geotiff/src/loaders.ts @@ -18,7 +18,9 @@ type GeoTiffData = { }; interface GeoTiffLoaderOptions extends LoaderOptions { - enableAlpha: boolean; + geotiff?: { + enableAlpha?: boolean; + }; } /** @@ -38,7 +40,7 @@ const loadGeoTiff = async ( // TODO: Add support for worker pools here. // TODO: Add support for more image formats. const rgbData = await image.readRGB({ - enableAlpha: options?.enableAlpha + enableAlpha: options?.geotiff?.enableAlpha }); const width = image.getWidth(); const height = image.getHeight(); @@ -67,7 +69,9 @@ export const GeoTiffLoader = { module: 'geotiff', version: VERSION, options: { - enableAlpha: true + geotiff: { + enableAlpha: true + } }, mimeTypes: ['image/tiff', 'image/geotiff'], extensions: ['geotiff', 'tiff', 'geotif', 'tif'], diff --git a/modules/gltf/src/glb-loader.ts b/modules/gltf/src/glb-loader.ts index e56244d3ca..41b74f6c3f 100644 --- a/modules/gltf/src/glb-loader.ts +++ b/modules/gltf/src/glb-loader.ts @@ -6,10 +6,13 @@ import {parseGLBSync} from './lib/parsers/parse-glb'; /** GLB loader options */ export type GLBLoaderOptions = LoaderOptions & { - /** GLB Parser Options */ - glb?: ParseGLBOptions; - /** GLB specific: byteOffset to start parsing from */ - byteOffset?: number; + glb?: { + /** GLB Parser Options */ + glb?: ParseGLBOptions; + /** GLB specific: byteOffset to start parsing from */ + byteOffset?: number; + strict?: boolean; + }; }; /** @@ -40,8 +43,7 @@ async function parse(arrayBuffer: ArrayBuffer, options?: GLBLoaderOptions): Prom } function parseSync(arrayBuffer: ArrayBuffer, options?: GLBLoaderOptions): GLB { - const {byteOffset = 0} = options || {}; const glb: GLB = {} as GLB; - parseGLBSync(glb, arrayBuffer, byteOffset, options?.glb); + parseGLBSync(glb, arrayBuffer, options?.glb?.byteOffset || 0, options?.glb); return glb; } diff --git a/modules/gltf/src/gltf-loader.ts b/modules/gltf/src/gltf-loader.ts index 75598d5847..bde8e26895 100644 --- a/modules/gltf/src/gltf-loader.ts +++ b/modules/gltf/src/gltf-loader.ts @@ -43,10 +43,7 @@ export const GLTFLoader = { loadBuffers: true, // Fetch any linked .BIN buffers, decode base64 loadImages: true, // Create image objects decompressMeshes: true // Decompress Draco encoded meshes - }, - - // common? - log: console // eslint-disable-line + } } } as const satisfies LoaderWithParser; @@ -60,7 +57,7 @@ export async function parse( // @ts-ignore options.gltf = {...GLTFLoader.options.gltf, ...options.gltf}; - const {byteOffset = 0} = options; + const byteOffset = options?.glb?.byteOffset || 0; const gltf = {}; return await parseGLTF(gltf as GLTFWithBuffers, arrayBuffer, byteOffset, options, context); } diff --git a/modules/gltf/test/gltf-loader.spec.ts b/modules/gltf/test/gltf-loader.spec.ts index 5e29e44460..d0a0d3c076 100644 --- a/modules/gltf/test/gltf-loader.spec.ts +++ b/modules/gltf/test/gltf-loader.spec.ts @@ -54,12 +54,11 @@ test('GLTFLoader#load(text)', async (t) => { }); test('GLTFLoader#load(3d tile GLB)', async (t) => { - t.ok(await load(GLB_TILE_URL, [GLTFLoader, DracoLoader]), 'Test that GLB from 3D tile parses'); + const result = await load(GLB_TILE_URL, [GLTFLoader, DracoLoader]); + t.ok(result, 'Test that GLB from 3D tile parses'); - t.ok( - await load(GLB_TILE_WITH_DRACO_URL, [GLTFLoader, DracoLoader, ImageLoader]), - 'Parses Draco GLB with supplied DracoLoader' - ); + const result2 = await load(GLB_TILE_WITH_DRACO_URL, [GLTFLoader, DracoLoader, ImageLoader]); + t.ok(result2, 'Parses Draco GLB with supplied DracoLoader'); // TODO - prone to flakiness since we have async unregisterLoaders calls registerLoaders([DracoLoader, ImageLoader]); diff --git a/modules/i3s/src/i3s-loader.ts b/modules/i3s/src/i3s-loader.ts index 5716e4f709..9fca6e1ce9 100644 --- a/modules/i3s/src/i3s-loader.ts +++ b/modules/i3s/src/i3s-loader.ts @@ -22,7 +22,12 @@ const SLPK_HEX = '504b0304'; const POINT_CLOUD = 'PointCloud'; export type I3SLoaderOptions = LoaderOptions & { - i3s?: I3SParseOptions; + i3s?: I3SParseOptions & { + /** For I3SAttributeLoader */ + attributeName?: string; + /** For I3SAttributeLoader */ + attributeType?: string; + }; }; /** @@ -77,7 +82,7 @@ async function parseI3S(data, options: I3SLoaderOptions = {}, context): Promise< } let isTileHeader; - if (options.isTileHeader === 'auto') { + if (options.i3s.isTileHeader === 'auto') { isTileHeader = TILE_HEADER_REGEX.test(urlWithoutParams); } else { isTileHeader = options.i3s.isTileHeader; diff --git a/modules/i3s/src/lib/helpers/i3s-nodepages-tiles.ts b/modules/i3s/src/lib/helpers/i3s-nodepages-tiles.ts index 031d5c8677..4aad7ba4e3 100644 --- a/modules/i3s/src/lib/helpers/i3s-nodepages-tiles.ts +++ b/modules/i3s/src/lib/helpers/i3s-nodepages-tiles.ts @@ -159,7 +159,6 @@ export default class I3SNodePagesTiles { const geometryDefinition = this.tileset.geometryDefinitions[meshGeometryData.definition]; let geometryIndex = -1; // Try to find DRACO geometryDefinition of `useDracoGeometry` option is set - // @ts-expect-error this.options is not properly typed if (this.options.i3s && this.options.i3s.useDracoGeometry) { geometryIndex = geometryDefinition.geometryBuffers.findIndex( (buffer) => buffer.compressedAttributes && buffer.compressedAttributes.encoding === 'draco' @@ -274,7 +273,6 @@ export default class I3SNodePagesTiles { */ private getSupportedTextureFormats(): I3STextureFormat[] { const formats: I3STextureFormat[] = []; - // @ts-expect-error this.options is not properly typed if (!this.options.i3s || this.options.i3s.useCompressedTextures) { // I3S 1.7 selection const supportedCompressedFormats = getSupportedGPUTextureFormats(); diff --git a/modules/i3s/src/lib/parsers/parse-i3s.ts b/modules/i3s/src/lib/parsers/parse-i3s.ts index da12855284..33de3c754b 100644 --- a/modules/i3s/src/lib/parsers/parse-i3s.ts +++ b/modules/i3s/src/lib/parsers/parse-i3s.ts @@ -97,7 +97,6 @@ export async function normalizeTilesetData(tileset : SceneLayer3D, options : Loa root = await load(rootNodeUrl, I3SLoader, { ...options, i3s: { - // @ts-expect-error options is not properly typed ...options.i3s, loadContent: false, isTileHeader: true, isTileset: false} }); diff --git a/modules/i3s/src/lib/utils/customize-colors.ts b/modules/i3s/src/lib/utils/customize-colors.ts index 5db1d6cc88..45f97c8d2a 100644 --- a/modules/i3s/src/lib/utils/customize-colors.ts +++ b/modules/i3s/src/lib/utils/customize-colors.ts @@ -161,8 +161,10 @@ async function loadFeatureAttributeData( const objectIdAttributeUrl = getUrlWithToken(attributeUrls[attributeIndex], token); const attributeType = getAttributeValueType(attributeStorageInfo[attributeIndex]); const objectIdAttributeData = await load(objectIdAttributeUrl, I3SAttributeLoader, { - attributeName, - attributeType + i3s: { + attributeName, + attributeType + } }); return objectIdAttributeData; diff --git a/modules/images/src/image-loader.ts b/modules/images/src/image-loader.ts index a485c30eaf..f7ca2b7ceb 100644 --- a/modules/images/src/image-loader.ts +++ b/modules/images/src/image-loader.ts @@ -21,8 +21,8 @@ export type ImageLoaderOptions = LoaderOptions & { image?: { type?: 'auto' | 'data' | 'imagebitmap' | 'image'; decode?: boolean; + imagebitmap?: ImageBitmapOptions; }; - imagebitmap?: ImageBitmapOptions; }; const DEFAULT_IMAGE_LOADER_OPTIONS: ImageLoaderOptions = { diff --git a/modules/json/src/lib/parsers/parse-json-in-batches.ts b/modules/json/src/lib/parsers/parse-json-in-batches.ts index b2c42054f7..a18f458cd4 100644 --- a/modules/json/src/lib/parsers/parse-json-in-batches.ts +++ b/modules/json/src/lib/parsers/parse-json-in-batches.ts @@ -24,7 +24,7 @@ export async function* parseJSONInBatches( // @ts-expect-error TODO fix Schema deduction const schema: Schema = null; - const tableBatchBuilder = new TableBatchBuilder(schema, options); + const tableBatchBuilder = new TableBatchBuilder(schema, options?.core); const parser = new StreamingJSONParser({jsonpaths}); diff --git a/modules/loader-utils/src/lib/sources/data-source.ts b/modules/loader-utils/src/lib/sources/data-source.ts index 1b226a7e70..afd1501259 100644 --- a/modules/loader-utils/src/lib/sources/data-source.ts +++ b/modules/loader-utils/src/lib/sources/data-source.ts @@ -94,7 +94,7 @@ export abstract class DataSource { * @param context */ export function getFetchFunction(options?: LoaderOptions) { - const fetchFunction = options?.fetch; + const fetchFunction = options?.core?.fetch; // options.fetch can be a function if (fetchFunction && typeof fetchFunction === 'function') { diff --git a/modules/loader-utils/src/lib/sources/utils/utils.ts b/modules/loader-utils/src/lib/sources/utils/utils.ts index 64b30b3c60..e194ff7bfa 100644 --- a/modules/loader-utils/src/lib/sources/utils/utils.ts +++ b/modules/loader-utils/src/lib/sources/utils/utils.ts @@ -12,7 +12,7 @@ import type {LoaderOptions} from '@loaders.gl/loader-utils'; * @param context */ export function getFetchFunction(options?: LoaderOptions) { - const fetchFunction = options?.fetch; + const fetchFunction = options?.core?.fetch; // options.fetch can be a function if (fetchFunction && typeof fetchFunction === 'function') { diff --git a/modules/loader-utils/src/lib/worker-loader-utils/create-loader-worker.ts b/modules/loader-utils/src/lib/worker-loader-utils/create-loader-worker.ts index 4ee872d87f..c5df779ddb 100644 --- a/modules/loader-utils/src/lib/worker-loader-utils/create-loader-worker.ts +++ b/modules/loader-utils/src/lib/worker-loader-utils/create-loader-worker.ts @@ -117,7 +117,10 @@ async function parseData({ options = { ...options, modules: (loader && loader.options && loader.options.modules) || {}, - worker: false + core: { + ...options.core, + worker: false + } }; return await parser(data, {...options}, context, loader); diff --git a/modules/loader-utils/src/lib/worker-loader-utils/parse-with-worker.ts b/modules/loader-utils/src/lib/worker-loader-utils/parse-with-worker.ts index 947801ff91..e7a57eefe0 100644 --- a/modules/loader-utils/src/lib/worker-loader-utils/parse-with-worker.ts +++ b/modules/loader-utils/src/lib/worker-loader-utils/parse-with-worker.ts @@ -40,7 +40,7 @@ export async function parseWithWorker( const name = loader.id; // TODO const url = getWorkerURL(loader, options); - const workerFarm = WorkerFarm.getWorkerFarm(options); + const workerFarm = WorkerFarm.getWorkerFarm(options?.core); const workerPool = workerFarm.getWorkerPool({name, url}); // options.log object contains functions which cannot be transferred diff --git a/modules/loader-utils/src/loader-types.ts b/modules/loader-utils/src/loader-types.ts index bedf2b86cb..ed2659f7bd 100644 --- a/modules/loader-utils/src/loader-types.ts +++ b/modules/loader-utils/src/loader-types.ts @@ -13,98 +13,68 @@ import {ReadableFile} from './lib/files/file'; /** * Core Loader Options */ -export type LoaderOptions = { - /** fetch options or a custom fetch function */ - fetch?: typeof fetch | FetchLike | RequestInit | null; - /** Do not throw on errors */ - nothrow?: boolean; - - /** loader selection, search first for supplied mimeType */ - mimeType?: string; - /** loader selection, provide fallback mimeType is server does not provide */ - fallbackMimeType?: string; - /** loader selection, avoid searching registered loaders */ - ignoreRegisteredLoaders?: boolean; - - // general - /** Experimental: Supply a logger to the parser */ - log?: any; - - // batched parsing - - /** Size of each batch. `auto` matches batches to size of incoming chunks */ - batchSize?: number | 'auto'; - /** Minimal amount of time between batches */ - batchDebounceMs?: number; - /** Stop loading after a given number of rows (compare SQL limit clause) */ - limit?: 0; - /** Experimental: Stop loading after reaching */ - _limitMB?: 0; - /** Generate metadata batches */ - metadata?: boolean; - /** Transforms to run on incoming batches */ - transforms?: TransformBatches[]; - - // module loading +export type LoaderOptions = Partial<{ + core: { + /** fetch options or a custom fetch function */ + fetch?: typeof fetch | FetchLike | RequestInit | null; + /** Do not throw on errors */ + nothrow?: boolean; + + /** loader selection, search first for supplied mimeType */ + mimeType?: string; + /** loader selection, provide fallback mimeType is server does not provide */ + fallbackMimeType?: string; + /** loader selection, avoid searching registered loaders */ + ignoreRegisteredLoaders?: boolean; + + // general + /** Experimental: Supply a logger to the parser */ + log?: any; + + // batched parsing + + /** Size of each batch. `auto` matches batches to size of incoming chunks */ + batchSize?: number | 'auto'; + /** Minimal amount of time between batches */ + batchDebounceMs?: number; + /** Stop loading after a given number of rows (compare SQL limit clause) */ + limit?: 0; + /** Experimental: Stop loading after reaching */ + _limitMB?: 0; + /** Generate metadata batches */ + metadata?: boolean; + /** Transforms to run on incoming batches */ + transforms?: TransformBatches[]; + + // module loading + + /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */ + useLocalLibraries?: boolean; + + // workers + + /** CDN load workers from */ + CDN?: string | null; + /** Set to `false` to disable workers */ + worker?: boolean; + /** Number of concurrent workers (per loader) on desktop browser */ + maxConcurrency?: number; + /** Number of concurrent workers (per loader) on mobile browsers */ + maxMobileConcurrency?: number; + /** Set to `false` to prevent reuse workers */ + reuseWorkers?: boolean; + /** Whether to use workers under Node.js (experimental) */ + _nodeWorkers?: boolean; + /** set to 'test' to run local worker */ + _workerType?: string; + }; /** Any additional JS libraries */ - modules?: Record; - /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */ - useLocalLibraries?: boolean; - - // workers - - /** CDN load workers from */ - CDN?: string | null; - /** Set to `false` to disable workers */ - worker?: boolean; - /** Number of concurrent workers (per loader) on desktop browser */ - maxConcurrency?: number; - /** Number of concurrent workers (per loader) on mobile browsers */ - maxMobileConcurrency?: number; - /** Set to `false` to prevent reuse workers */ - reuseWorkers?: boolean; - /** Whether to use workers under Node.js (experimental) */ - _nodeWorkers?: boolean; - /** set to 'test' to run local worker */ - _workerType?: string; - - /** @deprecated `options.batchType` removed, Use `options..type` instead */ - batchType?: 'row' | 'columnar' | 'arrow'; - /** @deprecated `options.throw removed`, Use `options.nothrow` instead */ - throws?: boolean; - /** @deprecated `options.dataType` no longer used */ - dataType?: never; - /** @deprecated `options.uri` no longer used */ - uri?: never; - /** @deprecated Use `options.fetch.method` */ - method?: never; - /** @deprecated Use `options.fetch.headers` */ - headers?: never; - /** @deprecated Use `options.fetch.body` */ - body?: never; - /** @deprecated Use `options.fetch.mode` */ - mode?: never; - /** @deprecated Use `options.fetch.credentials` */ - credentials?: never; - /** @deprecated Use `options.fetch.cache` */ - cache?: never; - /** @deprecated Use `options.fetch.redirect` */ - redirect?: never; - /** @deprecated Use `options.fetch.referrer` */ - referrer?: never; - /** @deprecated Use `options.fetch.referrerPolicy` */ - referrerPolicy?: never; - /** @deprecated Use `options.fetch.integrity` */ - integrity?: never; - /** @deprecated Use `options.fetch.keepalive` */ - keepalive?: never; - /** @deprecated Use `options.fetch.signal` */ - signal?: never; + modules: Record; // Accept other keys (loader options objects, e.g. `options.csv`, `options.json` ...) - [loaderId: string]: unknown; -}; + [loaderId: string]: Record; +}>; type PreloadOptions = { [key: string]: unknown; diff --git a/modules/mvt/src/lib/parse-mvt.ts b/modules/mvt/src/lib/parse-mvt.ts index ee4fca9ae4..20587dd477 100644 --- a/modules/mvt/src/lib/parse-mvt.ts +++ b/modules/mvt/src/lib/parse-mvt.ts @@ -30,6 +30,7 @@ export function parseMVT(arrayBuffer: ArrayBuffer, options?: MVTLoaderOptions) { const mvtOptions = checkOptions(options); const shape: string | undefined = + // @ts-expect-error TODO should we support top-level shape? options?.gis?.format || options?.mvt?.shape || (options?.shape as string); switch (shape) { case 'columnar-table': // binary + some JS arrays diff --git a/modules/mvt/src/mvt-source.ts b/modules/mvt/src/mvt-source.ts index e8f4fd3108..98b3bcb7ad 100644 --- a/modules/mvt/src/mvt-source.ts +++ b/modules/mvt/src/mvt-source.ts @@ -185,8 +185,8 @@ export class MVTTileSource tileParams: GetTileParameters ): Promise { const loadOptions: MVTLoaderOptions = { - shape: 'geojson-table', mvt: { + shape: 'geojson-table', coordinates: 'wgs84', tileIndex: {x: tileParams.x, y: tileParams.y, z: tileParams.z}, ...(this.loadOptions as MVTLoaderOptions)?.mvt diff --git a/modules/parquet/src/lib/parsers/parse-geoparquet.ts b/modules/parquet/src/lib/parsers/parse-geoparquet.ts index da65e2688e..54de11525d 100644 --- a/modules/parquet/src/lib/parsers/parse-geoparquet.ts +++ b/modules/parquet/src/lib/parsers/parse-geoparquet.ts @@ -20,7 +20,7 @@ export async function parseGeoParquetFile( file: ReadableFile, options?: ParquetLoaderOptions ): Promise { - const table = await parseParquetFile(file, {...options, shape: 'object-row-table'}); + const table = await parseParquetFile(file, {...options, parquet: {shape: 'object-row-table'}}); const shape = options?.parquet?.shape; return convertTable(table, shape); } @@ -29,7 +29,10 @@ export async function* parseGeoParquetFileInBatches( file: ReadableFile, options?: ParquetLoaderOptions ): AsyncIterable { - const tableBatches = parseParquetFileInBatches(file, {...options, shape: 'object-row-table'}); + const tableBatches = parseParquetFileInBatches(file, { + ...options, + parquet: {shape: 'object-row-table'} + }); for await (const batch of tableBatches) { const shape = options?.parquet?.shape; diff --git a/modules/parquet/src/lib/parsers/parse-parquet.ts b/modules/parquet/src/lib/parsers/parse-parquet.ts index e3957b9935..3f6e2d6fc8 100644 --- a/modules/parquet/src/lib/parsers/parse-parquet.ts +++ b/modules/parquet/src/lib/parsers/parse-parquet.ts @@ -39,14 +39,16 @@ export async function parseParquetFile( let limitHasReached = false; // we have only one input batch so return for (const row of rowBatch) { - if (options?.limit && rows.length >= options?.limit) { + if (options?.limit && rows.length >= options?.core?.limit!) { limitHasReached = true; break; } rows.push(row); } if (limitHasReached) { - log.warn(`Rows number limit has been reached. Only first ${options?.limit} are loaded`)(); + log.warn( + `Rows number limit has been reached. Only first ${options?.core?.limit} are loaded` + )(); break; } } diff --git a/modules/pmtiles/src/pmtiles-source.ts b/modules/pmtiles/src/pmtiles-source.ts index 48aa91ac50..5798beaa96 100644 --- a/modules/pmtiles/src/pmtiles-source.ts +++ b/modules/pmtiles/src/pmtiles-source.ts @@ -139,8 +139,8 @@ export class PMTilesTileSource async getVectorTile(tileParams: GetTileParameters): Promise { const arrayBuffer = await this.getTile(tileParams); const loadOptions: MVTLoaderOptions = { - shape: 'geojson-table', mvt: { + shape: 'geojson-table', coordinates: 'wgs84', tileIndex: {x: tileParams.x, y: tileParams.y, z: tileParams.z}, ...(this.loadOptions as MVTLoaderOptions)?.mvt diff --git a/modules/terrain/src/index.ts b/modules/terrain/src/index.ts index 7e1cf782c8..f27d94489f 100644 --- a/modules/terrain/src/index.ts +++ b/modules/terrain/src/index.ts @@ -29,13 +29,13 @@ export async function parseTerrain( ) { const loadImageOptions = { ...options, - mimeType: 'application/x.image', + core: {...options?.core, mimeType: 'application/x.image'}, image: {...options?.image, type: 'data'} }; const image = await parseFromContext(arrayBuffer, [], loadImageOptions, context!); // Extend function to support additional mesh generation options (square grid or delatin) const terrainOptions = {...TerrainLoader.options.terrain, ...options?.terrain} as TerrainOptions; - // @ts-expect-error sort out image typing asap + // @ts-expect-error TODO - fix typing return makeTerrainMeshFromImage(image, terrainOptions); } diff --git a/modules/tile-converter/src/3d-tiles-converter/3d-tiles-converter.ts b/modules/tile-converter/src/3d-tiles-converter/3d-tiles-converter.ts index 056f6970ed..aafb129068 100644 --- a/modules/tile-converter/src/3d-tiles-converter/3d-tiles-converter.ts +++ b/modules/tile-converter/src/3d-tiles-converter/3d-tiles-converter.ts @@ -51,10 +51,12 @@ export default class Tiles3DConverter { workerSource: {[key: string]: string} = {}; slpkFilesystem: ZipFileSystem | null = null; loaderOptions: I3SLoaderOptions = { - _nodeWorkers: true, - reuseWorkers: true, - // TODO: converter freezes in the end because of i3s-content-worker - worker: false, + core: { + _nodeWorkers: true, + reuseWorkers: true, + // TODO: converter freezes in the end because of i3s-content-worker + worker: false + }, i3s: {coordinateSystem: COORDINATE_SYSTEM.LNGLAT_OFFSETS, decodeTextures: false}, // We need to load local fs workers because nodejs can't load workers from the Internet 'i3s-content': { @@ -451,9 +453,11 @@ export default class Tiles3DConverter { const inputUrl = attributeUrls[index]; const attribute = attributeStorageInfo[index]; const options = { - attributeName: attribute.name, - attributeType: this._getAttributeType(attribute) - }; + i3s: { + attributeName: attribute.name, + attributeType: this._getAttributeType(attribute) + } + }; // as const satisfies I3SLoaderOptions; promises.push(loadFromArchive(inputUrl, I3SAttributeLoader, options, this.slpkFilesystem)); } diff --git a/modules/tile-converter/src/3d-tiles-converter/helpers/load-i3s.ts b/modules/tile-converter/src/3d-tiles-converter/helpers/load-i3s.ts index c51054f2ea..9e1d647a04 100644 --- a/modules/tile-converter/src/3d-tiles-converter/helpers/load-i3s.ts +++ b/modules/tile-converter/src/3d-tiles-converter/helpers/load-i3s.ts @@ -99,7 +99,7 @@ export async function loadFromArchive( if (fileSystem !== null) { const content = await load(url, loader, { ...loadOptions, - fetch: fileSystem.fetch.bind(fileSystem) + core: {...loadOptions?.core, fetch: fileSystem.fetch.bind(fileSystem)} }); return content; } diff --git a/modules/tile-converter/src/i3s-converter/helpers/load-3d-tiles.ts b/modules/tile-converter/src/i3s-converter/helpers/load-3d-tiles.ts index f59c4b07b0..322e79a3ac 100644 --- a/modules/tile-converter/src/i3s-converter/helpers/load-3d-tiles.ts +++ b/modules/tile-converter/src/i3s-converter/helpers/load-3d-tiles.ts @@ -119,7 +119,7 @@ export async function loadFromArchive( const fileSystem = new ZipFileSystem(archive); const content = await load(filename, loader, { ...loadOptions, - fetch: fileSystem.fetch.bind(fileSystem) + core: {...loadOptions?.core, fetch: fileSystem.fetch.bind(fileSystem)} }); await fileSystem.destroy(); return content; diff --git a/modules/tile-converter/src/i3s-converter/i3s-converter.ts b/modules/tile-converter/src/i3s-converter/i3s-converter.ts index fd17026266..99681eed17 100644 --- a/modules/tile-converter/src/i3s-converter/i3s-converter.ts +++ b/modules/tile-converter/src/i3s-converter/i3s-converter.ts @@ -135,9 +135,11 @@ export default class I3SConverter { refreshTokenTime: [number, number] = [0, 0]; sourceTileset: Tiles3DTilesetJSONPostprocessed | null = null; loadOptions: Tiles3DLoaderOptions = { - _nodeWorkers: true, - reuseWorkers: true, - useLocalLibraries: true, + core: { + _nodeWorkers: true, + reuseWorkers: true, + useLocalLibraries: true + }, basis: { format: 'rgba32', // We need to load local fs workers because nodejs can't load workers from the Internet diff --git a/modules/tiles/src/tileset/tile-3d.ts b/modules/tiles/src/tileset/tile-3d.ts index f0785293e8..8b3275fcad 100644 --- a/modules/tiles/src/tileset/tile-3d.ts +++ b/modules/tiles/src/tileset/tile-3d.ts @@ -382,11 +382,10 @@ export class Tile3D { const options = { ...this.tileset.loadOptions, [loader.id]: { - // @ts-expect-error ...this.tileset.loadOptions[loader.id], isTileset: this.type === 'json', ...this._getLoaderSpecificOptions(loader.id) - } + } // TODO add typecheck - as const satisfies ... }; this.content = await load(contentUrl, loader, options); diff --git a/modules/tiles/src/tileset/tileset-3d.ts b/modules/tiles/src/tileset/tileset-3d.ts index ce8cc122bb..3d06c974b2 100644 --- a/modules/tiles/src/tileset/tileset-3d.ts +++ b/modules/tiles/src/tileset/tileset-3d.ts @@ -978,7 +978,6 @@ export class Tileset3D { } _initializeI3STileset() { - // @ts-expect-error if (this.loadOptions.i3s && 'token' in this.loadOptions.i3s) { // @ts-ignore this._queryParams.token = this.loadOptions.i3s.token as string; diff --git a/modules/wms/src/csw-source.ts b/modules/wms/src/csw-source.ts index d5b00464a4..50eaf31001 100644 --- a/modules/wms/src/csw-source.ts +++ b/modules/wms/src/csw-source.ts @@ -163,7 +163,10 @@ export class CSWCatalogSource extends DataSource { const response = await this.fetch(url); const arrayBuffer = await response.arrayBuffer(); this._checkResponse(response, arrayBuffer); - const capabilities = await CSWCapabilitiesLoader.parse(arrayBuffer, this.options.loadOptions); + const capabilities = await CSWCapabilitiesLoader.parse( + arrayBuffer, + this.options.core.loadOptions + ); return capabilities; } @@ -176,7 +179,7 @@ export class CSWCatalogSource extends DataSource { const response = await this.fetch(url); const arrayBuffer = await response.arrayBuffer(); this._checkResponse(response, arrayBuffer); - return await CSWRecordsLoader.parse(arrayBuffer, this.options.loadOptions); + return await CSWRecordsLoader.parse(arrayBuffer, this.options.core.loadOptions); } /** Get Domain */ @@ -188,7 +191,7 @@ export class CSWCatalogSource extends DataSource { const response = await this.fetch(url); const arrayBuffer = await response.arrayBuffer(); this._checkResponse(response, arrayBuffer); - return await CSWDomainLoader.parse(arrayBuffer, this.options.loadOptions); + return await CSWDomainLoader.parse(arrayBuffer, this.options.core.loadOptions); } // Typed URL creators @@ -267,14 +270,14 @@ export class CSWCatalogSource extends DataSource { protected _checkResponse(response: Response, arrayBuffer: ArrayBuffer): void { const contentType = response.headers['content-type']; if (!response.ok || CSWErrorLoader.mimeTypes.includes(contentType)) { - const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.options.loadOptions); + const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.options.core.loadOptions); throw new Error(error); } } /** Error situation detected */ protected _parseError(arrayBuffer: ArrayBuffer): Error { - const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.options.loadOptions); + const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.options.core.loadOptions); return new Error(error); } } diff --git a/tsconfig.build.tsbuildinfo b/tsconfig.build.tsbuildinfo new file mode 100644 index 0000000000..270e4473d0 --- /dev/null +++ b/tsconfig.build.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./modules/3d-tiles/src/3d-tiles-archive-loader.ts","./modules/3d-tiles/src/cesium-ion-loader.ts","./modules/3d-tiles/src/index.ts","./modules/3d-tiles/src/tile-3d-subtree-loader.ts","./modules/3d-tiles/src/tile-3d-writer.ts","./modules/3d-tiles/src/tiles-3d-loader.ts","./modules/3d-tiles/src/types.ts","./modules/3d-tiles/src/3d-tiles-archive/3d-tiles-archive-archive.ts","./modules/3d-tiles/src/3d-tiles-archive/3d-tiles-archive-parser.ts","./modules/3d-tiles/src/lib/constants.ts","./modules/3d-tiles/src/lib/classes/tile-3d-batch-table-hierarchy.ts","./modules/3d-tiles/src/lib/classes/tile-3d-batch-table.ts","./modules/3d-tiles/src/lib/classes/tile-3d-feature-table.ts","./modules/3d-tiles/src/lib/classes/helpers/tile-3d-accessor-utils.ts","./modules/3d-tiles/src/lib/encoders/encode-3d-tile-batched-model.ts","./modules/3d-tiles/src/lib/encoders/encode-3d-tile-composite.ts","./modules/3d-tiles/src/lib/encoders/encode-3d-tile-instanced-model.ts","./modules/3d-tiles/src/lib/encoders/encode-3d-tile-point-cloud.ts","./modules/3d-tiles/src/lib/encoders/encode-3d-tile.ts","./modules/3d-tiles/src/lib/encoders/helpers/encode-3d-tile-header.ts","./modules/3d-tiles/src/lib/ion/ion.ts","./modules/3d-tiles/src/lib/parsers/parse-3d-tile-batched-model.ts","./modules/3d-tiles/src/lib/parsers/parse-3d-tile-composite.ts","./modules/3d-tiles/src/lib/parsers/parse-3d-tile-gltf.ts","./modules/3d-tiles/src/lib/parsers/parse-3d-tile-header.ts","./modules/3d-tiles/src/lib/parsers/parse-3d-tile-instanced-model.ts","./modules/3d-tiles/src/lib/parsers/parse-3d-tile-point-cloud.ts","./modules/3d-tiles/src/lib/parsers/parse-3d-tile.ts","./modules/3d-tiles/src/lib/parsers/helpers/normalize-3d-tile-colors.ts","./modules/3d-tiles/src/lib/parsers/helpers/normalize-3d-tile-normals.ts","./modules/3d-tiles/src/lib/parsers/helpers/normalize-3d-tile-positions.ts","./modules/3d-tiles/src/lib/parsers/helpers/parse-3d-implicit-tiles.ts","./modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-gltf-view.ts","./modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-header.ts","./modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-subtree.ts","./modules/3d-tiles/src/lib/parsers/helpers/parse-3d-tile-tables.ts","./modules/3d-tiles/src/lib/parsers/helpers/parse-utils.ts","./modules/3d-tiles/src/lib/utils/version.ts","./modules/3d-tiles/src/lib/utils/obb/s2-corners-to-obb.ts","./modules/3d-tiles/src/lib/utils/s2/index.ts","./modules/3d-tiles/src/lib/utils/s2/s2-geometry-functions.ts","./modules/3d-tiles/src/lib/utils/s2/s2-token-functions.ts","./modules/3d-tiles/src/lib/utils/s2/converters/s2-to-boundary.ts","./modules/3d-tiles/src/lib/utils/s2/converters/s2-to-obb-points.ts","./modules/3d-tiles/src/lib/utils/s2/converters/s2-to-region.ts","./modules/3d-tiles/src/lib/utils/s2/s2geometry/s2-cell-utils.ts","./modules/3d-tiles/src/lib/utils/s2/s2geometry/s2-geometry.ts","./modules/arrow/src/arrow-loader.ts","./modules/arrow/src/arrow-writer.ts","./modules/arrow/src/geoarrow-loader.ts","./modules/arrow/src/geoarrow-writer.ts","./modules/arrow/src/index.ts","./modules/arrow/src/triangulate-on-worker.ts","./modules/arrow/src/exports/arrow-loader.ts","./modules/arrow/src/exports/geoarrow-loader.ts","./modules/arrow/src/lib/types.ts","./modules/arrow/src/lib/encoders/encode-arrow.ts","./modules/arrow/src/lib/encoders/encode-geoarrow.ts","./modules/arrow/src/lib/geoarrow/convert-geoarrow-to-binary-geometry.ts","./modules/arrow/src/lib/geoarrow/convert-geoarrow-to-geojson-geometry.ts","./modules/arrow/src/lib/geoarrow/get-arrow-bounds.ts","./modules/arrow/src/lib/parsers/parse-arrow.ts","./modules/arrow/src/lib/parsers/parse-geoarrow.ts","./modules/arrow/src/lib/tables/convert-arrow-schema.ts","./modules/arrow/src/lib/tables/convert-arrow-to-table.ts","./modules/arrow/src/lib/tables/convert-table-to-arrow.ts","./modules/arrow/src/schema/arrow-table-batch.ts","./modules/arrow/src/schema/arrow-table-type.ts","./modules/arrow/src/workers/arrow-worker.ts","./modules/arrow/src/workers/hard-clone.ts","./modules/arrow/src/workers/triangulation-worker-node.ts","./modules/arrow/src/workers/triangulation-worker.ts","./modules/bson/src/bson-loader.ts","./modules/bson/src/bson-writer.ts","./modules/bson/src/index.ts","./modules/bson/src/lib/encoders/encode-bson.ts","./modules/bson/src/lib/parsers/parse-bson.ts","./modules/compression/src/compress-on-worker.ts","./modules/compression/src/index.ts","./modules/compression/src/types.ts","./modules/compression/src/brotli/decode.ts","./modules/compression/src/lib/brotli-compression.ts","./modules/compression/src/lib/compression.ts","./modules/compression/src/lib/deflate-compression.ts","./modules/compression/src/lib/gzip-compression.ts","./modules/compression/src/lib/lz4-compression.ts","./modules/compression/src/lib/lzo-compression.ts","./modules/compression/src/lib/no-compression.ts","./modules/compression/src/lib/snappy-compression.ts","./modules/compression/src/lib/zstd-compression.ts","./modules/compression/src/workers/compression-worker-node.ts","./modules/compression/src/workers/compression-worker.ts","./modules/copc/src/copc-source.ts","./modules/copc/src/index.ts","./modules/core/src/index.ts","./modules/core/src/null-loader.ts","./modules/core/src/core-addons/write-file-browser.ts","./modules/core/src/iterators/batch-iterators/timed-batch-iterator.ts","./modules/core/src/iterators/make-iterator/make-array-buffer-iterator.ts","./modules/core/src/iterators/make-iterator/make-blob-iterator.ts","./modules/core/src/iterators/make-iterator/make-iterator.ts","./modules/core/src/iterators/make-iterator/make-stream-iterator.ts","./modules/core/src/iterators/make-iterator/make-string-iterator.ts","./modules/core/src/iterators/make-stream/make-stream.ts","./modules/core/src/javascript-utils/is-type.ts","./modules/core/src/lib/common.ts","./modules/core/src/lib/init.ts","./modules/core/src/lib/api/create-data-source.ts","./modules/core/src/lib/api/encode-table.ts","./modules/core/src/lib/api/encode.ts","./modules/core/src/lib/api/load-in-batches.ts","./modules/core/src/lib/api/load.ts","./modules/core/src/lib/api/loader-options.ts","./modules/core/src/lib/api/parse-in-batches.ts","./modules/core/src/lib/api/parse-sync.ts","./modules/core/src/lib/api/parse.ts","./modules/core/src/lib/api/register-loaders.ts","./modules/core/src/lib/api/select-loader.ts","./modules/core/src/lib/api/select-source.ts","./modules/core/src/lib/fetch/fetch-error-message.ts","./modules/core/src/lib/fetch/fetch-error.ts","./modules/core/src/lib/fetch/fetch-file.ts","./modules/core/src/lib/fetch/read-array-buffer.ts","./modules/core/src/lib/filesystems/browser-filesystem.ts","./modules/core/src/lib/filesystems/read-array-buffer.ts","./modules/core/src/lib/loader-utils/check-errors.ts","./modules/core/src/lib/loader-utils/get-data.ts","./modules/core/src/lib/loader-utils/get-fetch-function.ts","./modules/core/src/lib/loader-utils/loader-context.ts","./modules/core/src/lib/loader-utils/loggers.ts","./modules/core/src/lib/loader-utils/normalize-loader.ts","./modules/core/src/lib/loader-utils/option-defaults.ts","./modules/core/src/lib/loader-utils/option-utils.ts","./modules/core/src/lib/progress/fetch-progress.ts","./modules/core/src/lib/utils/mime-type-utils.ts","./modules/core/src/lib/utils/resource-utils.ts","./modules/core/src/lib/utils/response-utils.ts","./modules/core/src/lib/utils/url-utils.ts","./modules/core/src/workers/null-worker-node.ts","./modules/core/src/workers/null-worker.ts","./modules/crypto/src/index.ts","./modules/crypto/src/types.ts","./modules/crypto/src/lib/crc32-hash.ts","./modules/crypto/src/lib/crc32c-hash.ts","./modules/crypto/src/lib/crypto-hash.ts","./modules/crypto/src/lib/hash.ts","./modules/crypto/src/lib/md5-hash.ts","./modules/crypto/src/lib/node-hash.ts","./modules/crypto/src/lib/sha256-hash.ts","./modules/crypto/src/lib/algorithms/crc32.ts","./modules/crypto/src/lib/algorithms/crc32c.ts","./modules/crypto/src/lib/algorithms/md5-wasm.ts","./modules/crypto/src/lib/utils/base64-utils.ts","./modules/crypto/src/lib/utils/digest-utils.ts","./modules/crypto/src/workers/crypto-worker-node.ts","./modules/crypto/src/workers/crypto-worker.ts","./modules/csv/src/csv-loader.ts","./modules/csv/src/csv-writer.ts","./modules/csv/src/index.ts","./modules/csv/src/lib/encoders/encode-csv.ts","./modules/csv/src/papaparse/async-iterator-streamer.ts","./modules/csv/src/papaparse/papaparse.ts","./modules/draco/src/draco-loader.ts","./modules/draco/src/draco-writer.ts","./modules/draco/src/index.ts","./modules/draco/src/draco3d/draco3d-types.ts","./modules/draco/src/lib/draco-builder.ts","./modules/draco/src/lib/draco-module-loader.ts","./modules/draco/src/lib/draco-parser.ts","./modules/draco/src/lib/draco-types.ts","./modules/draco/src/lib/utils/get-draco-schema.ts","./modules/draco/src/lib/utils/version.ts","./modules/draco/src/workers/draco-worker-node.ts","./modules/draco/src/workers/draco-worker.ts","./modules/draco/src/workers/draco-writer-worker-node.ts","./modules/draco/src/workers/draco-writer-worker.ts","./modules/excel/src/excel-loader.ts","./modules/excel/src/index.ts","./modules/excel/src/lib/encode-excel.ts","./modules/excel/src/lib/parse-excel.ts","./modules/excel/src/workers/excel-worker.ts","./modules/flatgeobuf/src/flatgeobuf-loader.ts","./modules/flatgeobuf/src/floatgeobuf-source.ts","./modules/flatgeobuf/src/index.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/column-meta.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/config.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/constants.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/crs-meta.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/dumptree.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/feature.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/generic.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/geojson.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/header-meta.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/header.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/http-reader.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/index.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/logger.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/packedrtree.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf/column-type.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf/column.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf/crs.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf/feature.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf/geometry-type.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf/geometry.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/flat-geobuf/header.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/generic/feature.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/generic/featurecollection.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/generic/geometry.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/generic/header.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/generic/index.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/geojson/feature.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/geojson/featurecollection.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/geojson/geometry.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/geojson/index.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/streams/utils.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/types/jsts.d.ts","./modules/flatgeobuf/src/flatgeobuf/3.27.2/types/slice.d.ts","./modules/flatgeobuf/src/lib/binary-geometries.ts","./modules/flatgeobuf/src/lib/get-schema-from-fgb-header.ts","./modules/flatgeobuf/src/lib/parse-flatgeobuf.ts","./modules/flatgeobuf/src/workers/flatgeobuf-worker.ts","./modules/geopackage/src/geopackage-loader.ts","./modules/geopackage/src/index.ts","./modules/geopackage/src/lib/parse-geopackage.ts","./modules/geopackage/src/lib/types.ts","./modules/geopackage/src/workers/geopackage-worker.ts","./modules/geotiff/src/geotiff-loader.ts","./modules/geotiff/src/index.ts","./modules/geotiff/src/loaders.ts","./modules/geotiff/src/types.ts","./modules/geotiff/src/lib/load-geotiff.ts","./modules/geotiff/src/lib/tiff-pixel-source.ts","./modules/geotiff/src/lib/ome/load-ome-tiff.ts","./modules/geotiff/src/lib/ome/ome-indexers.ts","./modules/geotiff/src/lib/ome/ome-utils.ts","./modules/geotiff/src/lib/ome/omexml.ts","./modules/geotiff/src/lib/ome/utils.ts","./modules/geotiff/src/lib/utils/tiff-utils.ts","./modules/gis/src/index.ts","./modules/gis/src/lib/binary-features/binary-to-geojson.ts","./modules/gis/src/lib/binary-features/extract-geometry-info.ts","./modules/gis/src/lib/binary-features/flat-geojson-to-binary-types.ts","./modules/gis/src/lib/binary-features/flat-geojson-to-binary.ts","./modules/gis/src/lib/binary-features/geojson-to-binary.ts","./modules/gis/src/lib/binary-features/geojson-to-flat-geojson.ts","./modules/gis/src/lib/binary-features/transform.ts","./modules/gis/src/lib/geo/geoarrow-metadata.ts","./modules/gis/src/lib/geo/geoparquet-metadata-schema.ts","./modules/gis/src/lib/geo/geoparquet-metadata.ts","./modules/gis/src/lib/tables/convert-table-to-geojson.ts","./modules/gltf/src/glb-loader.ts","./modules/gltf/src/glb-writer.ts","./modules/gltf/src/gltf-loader.ts","./modules/gltf/src/gltf-writer.ts","./modules/gltf/src/index.ts","./modules/gltf/src/lib/api/gltf-extensions.ts","./modules/gltf/src/lib/api/gltf-scenegraph.ts","./modules/gltf/src/lib/api/normalize-gltf-v1.ts","./modules/gltf/src/lib/api/post-process-gltf.ts","./modules/gltf/src/lib/encoders/encode-glb.ts","./modules/gltf/src/lib/encoders/encode-gltf.ts","./modules/gltf/src/lib/extensions/ext_mesh_features.ts","./modules/gltf/src/lib/extensions/ext_meshopt_compression.ts","./modules/gltf/src/lib/extensions/ext_structural_metadata.ts","./modules/gltf/src/lib/extensions/ext_texture_webp.ts","./modules/gltf/src/lib/extensions/khr_binary_gltf.ts","./modules/gltf/src/lib/extensions/khr_draco_mesh_compression.ts","./modules/gltf/src/lib/extensions/khr_texture_basisu.ts","./modules/gltf/src/lib/extensions/khr_texture_transform.ts","./modules/gltf/src/lib/extensions/deprecated/ext_feature_metadata.ts","./modules/gltf/src/lib/extensions/deprecated/khr_lights_punctual.ts","./modules/gltf/src/lib/extensions/deprecated/khr_materials_unlit.ts","./modules/gltf/src/lib/extensions/deprecated/khr_techniques_webgl.ts","./modules/gltf/src/lib/extensions/utils/3d-tiles-utils.ts","./modules/gltf/src/lib/gltf-utils/get-typed-array.ts","./modules/gltf/src/lib/gltf-utils/gltf-attribute-utils.ts","./modules/gltf/src/lib/gltf-utils/gltf-constants.ts","./modules/gltf/src/lib/gltf-utils/gltf-utils.ts","./modules/gltf/src/lib/gltf-utils/resolve-url.ts","./modules/gltf/src/lib/parsers/parse-glb.ts","./modules/gltf/src/lib/parsers/parse-gltf.ts","./modules/gltf/src/lib/types/glb-types.ts","./modules/gltf/src/lib/types/gltf-ext-feature-metadata-schema.ts","./modules/gltf/src/lib/types/gltf-ext-mesh-features-schema.ts","./modules/gltf/src/lib/types/gltf-ext-structural-metadata-schema.ts","./modules/gltf/src/lib/types/gltf-json-schema.ts","./modules/gltf/src/lib/types/gltf-postprocessed-schema.ts","./modules/gltf/src/lib/types/gltf-types.ts","./modules/gltf/src/lib/utils/assert.ts","./modules/gltf/src/lib/utils/version.ts","./modules/gltf/src/meshopt/meshopt-decoder.ts","./modules/gltf/src/webp/webp.ts","./modules/i3s/src/arcgis-webscene-loader.ts","./modules/i3s/src/i3s-attribute-loader.ts","./modules/i3s/src/i3s-building-scene-layer-loader.ts","./modules/i3s/src/i3s-content-loader.ts","./modules/i3s/src/i3s-loader.ts","./modules/i3s/src/i3s-node-page-loader.ts","./modules/i3s/src/i3s-slpk-loader.ts","./modules/i3s/src/index.ts","./modules/i3s/src/types.ts","./modules/i3s/src/lib/helpers/i3s-nodepages-tiles.ts","./modules/i3s/src/lib/parsers/constants.ts","./modules/i3s/src/lib/parsers/parse-arcgis-webscene.ts","./modules/i3s/src/lib/parsers/parse-i3s-attribute.ts","./modules/i3s/src/lib/parsers/parse-i3s-building-scene-layer.ts","./modules/i3s/src/lib/parsers/parse-i3s-tile-content.ts","./modules/i3s/src/lib/parsers/parse-i3s.ts","./modules/i3s/src/lib/parsers/parse-slpk/parse-slpk.ts","./modules/i3s/src/lib/parsers/parse-slpk/slpk-archieve.ts","./modules/i3s/src/lib/utils/convert-i3s-obb-to-mbs.ts","./modules/i3s/src/lib/utils/customize-colors.ts","./modules/i3s/src/lib/utils/url-utils.ts","./modules/i3s/src/workers/i3s-content-worker-node.ts","./modules/i3s/src/workers/i3s-content-worker.ts","./modules/images/src/image-loader.ts","./modules/images/src/image-writer.ts","./modules/images/src/index.ts","./modules/images/src/types.ts","./modules/images/src/lib/category-api/binary-image-api.ts","./modules/images/src/lib/category-api/image-format.ts","./modules/images/src/lib/category-api/image-type.ts","./modules/images/src/lib/category-api/parse-isobmff-binary.ts","./modules/images/src/lib/category-api/parsed-image-api.ts","./modules/images/src/lib/encoders/encode-image.ts","./modules/images/src/lib/parsers/parse-image.ts","./modules/images/src/lib/parsers/parse-to-image-bitmap.ts","./modules/images/src/lib/parsers/parse-to-image.ts","./modules/images/src/lib/parsers/parse-to-node-image.ts","./modules/images/src/lib/parsers/svg-utils.ts","./modules/images/src/lib/utils/version.ts","./modules/json/src/geojson-loader.ts","./modules/json/src/geojson-writer.ts","./modules/json/src/index.ts","./modules/json/src/json-loader.ts","./modules/json/src/json-writer.ts","./modules/json/src/ndgeoson-loader.ts","./modules/json/src/ndjson-loader.ts","./modules/json/src/lib/clarinet/clarinet.ts","./modules/json/src/lib/encoder-utils/encode-table-row.ts","./modules/json/src/lib/encoder-utils/encode-utils.ts","./modules/json/src/lib/encoder-utils/utf8-encoder.ts","./modules/json/src/lib/encoders/geojson-encoder.ts","./modules/json/src/lib/encoders/json-encoder.ts","./modules/json/src/lib/json-parser/json-parser.ts","./modules/json/src/lib/json-parser/streaming-json-parser.ts","./modules/json/src/lib/jsonpath/jsonpath.ts","./modules/json/src/lib/parsers/parse-json-in-batches.ts","./modules/json/src/lib/parsers/parse-json.ts","./modules/json/src/lib/parsers/parse-ndjson-in-batches.ts","./modules/json/src/lib/parsers/parse-ndjson.ts","./modules/json/src/workers/geojson-worker.ts","./modules/kml/src/gpx-loader.ts","./modules/kml/src/index.ts","./modules/kml/src/kml-loader.ts","./modules/kml/src/tcx-loader.ts","./modules/las/src/index.ts","./modules/las/src/las-loader.ts","./modules/las/src/lib/get-las-schema.ts","./modules/las/src/lib/las-types.ts","./modules/las/src/lib/laslaz-decoder.ts","./modules/las/src/lib/parse-las.ts","./modules/las/src/lib/libs/laz-perf.ts","./modules/las/src/workers/las-worker.ts","./modules/lerc/src/index.ts","./modules/lerc/src/lerc-loader.ts","./modules/lerc/src/lib/parsers/lerc/lerc-types.ts","./modules/lerc/src/workers/lerc-worker.ts","./modules/loader-utils/src/index.ts","./modules/loader-utils/src/json-loader.ts","./modules/loader-utils/src/loader-types.ts","./modules/loader-utils/src/source-types.ts","./modules/loader-utils/src/types.ts","./modules/loader-utils/src/writer-types.ts","./modules/loader-utils/src/lib/binary-utils/array-buffer-utils.ts","./modules/loader-utils/src/lib/binary-utils/dataview-copy-utils.ts","./modules/loader-utils/src/lib/binary-utils/get-first-characters.ts","./modules/loader-utils/src/lib/binary-utils/memory-conversion-utils.ts","./modules/loader-utils/src/lib/binary-utils/memory-copy-utils.ts","./modules/loader-utils/src/lib/env-utils/assert.ts","./modules/loader-utils/src/lib/env-utils/globals.ts","./modules/loader-utils/src/lib/file-provider/data-view-file.ts","./modules/loader-utils/src/lib/file-provider/file-handle-file.ts","./modules/loader-utils/src/lib/file-provider/file-provider-interface.ts","./modules/loader-utils/src/lib/file-provider/file-provider.ts","./modules/loader-utils/src/lib/files/blob-file.ts","./modules/loader-utils/src/lib/files/file.ts","./modules/loader-utils/src/lib/files/http-file.ts","./modules/loader-utils/src/lib/files/node-file-facade.ts","./modules/loader-utils/src/lib/files/sources.ts","./modules/loader-utils/src/lib/filesystems/filesystem.ts","./modules/loader-utils/src/lib/filesystems/node-filesystem-facade.ts","./modules/loader-utils/src/lib/iterators/async-iteration.ts","./modules/loader-utils/src/lib/iterators/text-iterators.ts","./modules/loader-utils/src/lib/log-utils/log.ts","./modules/loader-utils/src/lib/module-utils/js-module-utils.ts","./modules/loader-utils/src/lib/node/buffer.browser.ts","./modules/loader-utils/src/lib/node/buffer.ts","./modules/loader-utils/src/lib/node/fs.browser.ts","./modules/loader-utils/src/lib/node/promisify.ts","./modules/loader-utils/src/lib/node/stream.browser.ts","./modules/loader-utils/src/lib/node/stream.ts","./modules/loader-utils/src/lib/option-utils/merge-options.ts","./modules/loader-utils/src/lib/parser-utils/parse-json.ts","./modules/loader-utils/src/lib/path-utils/file-aliases.ts","./modules/loader-utils/src/lib/path-utils/get-cwd.ts","./modules/loader-utils/src/lib/path-utils/path.ts","./modules/loader-utils/src/lib/request-utils/request-scheduler.ts","./modules/loader-utils/src/lib/sources/data-source.ts","./modules/loader-utils/src/lib/sources/image-source.ts","./modules/loader-utils/src/lib/sources/image-tile-source.ts","./modules/loader-utils/src/lib/sources/tile-source-adapter.ts","./modules/loader-utils/src/lib/sources/tile-source.ts","./modules/loader-utils/src/lib/sources/vector-source.ts","./modules/loader-utils/src/lib/sources/vector-tile-source.ts","./modules/loader-utils/src/lib/sources/utils/image-type.ts","./modules/loader-utils/src/lib/sources/utils/utils.ts","./modules/loader-utils/src/lib/worker-loader-utils/create-loader-worker.ts","./modules/loader-utils/src/lib/worker-loader-utils/encode-with-worker.ts","./modules/loader-utils/src/lib/worker-loader-utils/parse-with-worker.ts","./modules/loader-utils/src/workers/json-worker.ts","./modules/math/src/index.ts","./modules/math/src/geometry/constants.ts","./modules/math/src/geometry/is-geometry.ts","./modules/math/src/geometry/attributes/compute-bounding-box.ts","./modules/math/src/geometry/attributes/compute-bounding-sphere.ts","./modules/math/src/geometry/attributes/compute-tangents.ts","./modules/math/src/geometry/attributes/compute-vertex-normals.ts","./modules/math/src/geometry/attributes/convert-to-non-indexed.ts","./modules/math/src/geometry/attributes/get-attribute-from-geometry.ts","./modules/math/src/geometry/attributes/normalize.ts","./modules/math/src/geometry/colors/rgb565.ts","./modules/math/src/geometry/compression/attribute-compression.ts","./modules/math/src/geometry/gl/gl-type.ts","./modules/math/src/geometry/iterators/attribute-iterator.ts","./modules/math/src/geometry/iterators/primitive-iterator.ts","./modules/math/src/geometry/primitives/modes.ts","./modules/math/src/geometry/typed-arrays/typed-array-utils.ts","./modules/math/src/geometry/utils/assert.ts","./modules/math/src/geometry/utils/coordinates.ts","./modules/math/src/utils/assert.ts","./modules/mvt/src/index.ts","./modules/mvt/src/mvt-loader.ts","./modules/mvt/src/mvt-source.ts","./modules/mvt/src/table-tile-source.ts","./modules/mvt/src/tilejson-loader.ts","./modules/mvt/src/lib/get-schemas-from-tilejson.ts","./modules/mvt/src/lib/parse-mvt.ts","./modules/mvt/src/lib/parse-tilejson.ts","./modules/mvt/src/lib/types.ts","./modules/mvt/src/lib/utils/geometry-utils.ts","./modules/mvt/src/lib/vector-tile/vector-tile-feature.ts","./modules/mvt/src/lib/vector-tile/vector-tile-layer.ts","./modules/mvt/src/lib/vector-tile/vector-tile.ts","./modules/mvt/src/lib/vector-tiler/proto-tile.ts","./modules/mvt/src/lib/vector-tiler/tile-to-geojson.ts","./modules/mvt/src/lib/vector-tiler/transform-tile.ts","./modules/mvt/src/lib/vector-tiler/features/clip-features.ts","./modules/mvt/src/lib/vector-tiler/features/convert-feature.ts","./modules/mvt/src/lib/vector-tiler/features/proto-feature.ts","./modules/mvt/src/lib/vector-tiler/features/simplify-path.ts","./modules/mvt/src/lib/vector-tiler/features/wrap-features.ts","./modules/mvt/src/workers/mvt-worker.ts","./modules/netcdf/src/index.ts","./modules/netcdf/src/netcdf-loader.ts","./modules/netcdf/src/iobuffer/iobuffer.ts","./modules/netcdf/src/netcdfjs/netcdf-reader.ts","./modules/netcdf/src/netcdfjs/netcdf-types.ts","./modules/netcdf/src/netcdfjs/read-data.ts","./modules/netcdf/src/netcdfjs/read-header.ts","./modules/netcdf/src/netcdfjs/read-type.ts","./modules/obj/src/index.ts","./modules/obj/src/mtl-loader.ts","./modules/obj/src/obj-loader.ts","./modules/obj/src/lib/get-obj-schema.ts","./modules/obj/src/lib/obj-types.ts","./modules/obj/src/lib/parse-mtl.ts","./modules/obj/src/lib/parse-obj-meshes.ts","./modules/obj/src/lib/parse-obj.ts","./modules/obj/src/workers/obj-worker.ts","./modules/parquet/src/index.ts","./modules/parquet/src/parquet-loader.ts","./modules/parquet/src/parquet-wasm-loader.ts","./modules/parquet/src/parquet-wasm-writer.ts","./modules/parquet/src/parquet-writer.ts","./modules/parquet/src/lib/constants.ts","./modules/parquet/src/lib/arrow/convert-columns-to-row-group.ts","./modules/parquet/src/lib/arrow/convert-row-group-to-columns.ts","./modules/parquet/src/lib/arrow/convert-schema-from-parquet.ts","./modules/parquet/src/lib/arrow/convert-schema-to-parquet.ts","./modules/parquet/src/lib/encoders/encode-parquet-wasm.ts","./modules/parquet/src/lib/parsers/get-parquet-schema.ts","./modules/parquet/src/lib/parsers/parse-geoparquet.ts","./modules/parquet/src/lib/parsers/parse-parquet-to-columns.ts","./modules/parquet/src/lib/parsers/parse-parquet-wasm.ts","./modules/parquet/src/lib/parsers/parse-parquet.ts","./modules/parquet/src/lib/utils/load-wasm.ts","./modules/parquet/src/lib/utils/make-stream-iterator.ts","./modules/parquet/src/parquetjs/compression.ts","./modules/parquet/src/parquetjs/modules.d.ts","./modules/parquet/src/parquetjs/codecs/declare.ts","./modules/parquet/src/parquetjs/codecs/dictionary.ts","./modules/parquet/src/parquetjs/codecs/index.ts","./modules/parquet/src/parquetjs/codecs/plain.ts","./modules/parquet/src/parquetjs/codecs/rle.ts","./modules/parquet/src/parquetjs/encoder/parquet-encoder.ts","./modules/parquet/src/parquetjs/parquet-thrift/boundaryorder.ts","./modules/parquet/src/parquetjs/parquet-thrift/bsontype.ts","./modules/parquet/src/parquetjs/parquet-thrift/columnchunk.ts","./modules/parquet/src/parquetjs/parquet-thrift/columnindex.ts","./modules/parquet/src/parquetjs/parquet-thrift/columnmetadata.ts","./modules/parquet/src/parquetjs/parquet-thrift/columnorder.ts","./modules/parquet/src/parquetjs/parquet-thrift/compressioncodec.ts","./modules/parquet/src/parquetjs/parquet-thrift/convertedtype.ts","./modules/parquet/src/parquetjs/parquet-thrift/datapageheader.ts","./modules/parquet/src/parquetjs/parquet-thrift/datapageheaderv2.ts","./modules/parquet/src/parquetjs/parquet-thrift/datetype.ts","./modules/parquet/src/parquetjs/parquet-thrift/decimaltype.ts","./modules/parquet/src/parquetjs/parquet-thrift/dictionarypageheader.ts","./modules/parquet/src/parquetjs/parquet-thrift/encoding.ts","./modules/parquet/src/parquetjs/parquet-thrift/enumtype.ts","./modules/parquet/src/parquetjs/parquet-thrift/fieldrepetitiontype.ts","./modules/parquet/src/parquetjs/parquet-thrift/filemetadata.ts","./modules/parquet/src/parquetjs/parquet-thrift/indexpageheader.ts","./modules/parquet/src/parquetjs/parquet-thrift/inttype.ts","./modules/parquet/src/parquetjs/parquet-thrift/jsontype.ts","./modules/parquet/src/parquetjs/parquet-thrift/keyvalue.ts","./modules/parquet/src/parquetjs/parquet-thrift/listtype.ts","./modules/parquet/src/parquetjs/parquet-thrift/logicaltype.ts","./modules/parquet/src/parquetjs/parquet-thrift/maptype.ts","./modules/parquet/src/parquetjs/parquet-thrift/microseconds.ts","./modules/parquet/src/parquetjs/parquet-thrift/milliseconds.ts","./modules/parquet/src/parquetjs/parquet-thrift/nulltype.ts","./modules/parquet/src/parquetjs/parquet-thrift/offsetindex.ts","./modules/parquet/src/parquetjs/parquet-thrift/pageencodingstats.ts","./modules/parquet/src/parquetjs/parquet-thrift/pageheader.ts","./modules/parquet/src/parquetjs/parquet-thrift/pagelocation.ts","./modules/parquet/src/parquetjs/parquet-thrift/pagetype.ts","./modules/parquet/src/parquetjs/parquet-thrift/rowgroup.ts","./modules/parquet/src/parquetjs/parquet-thrift/schemaelement.ts","./modules/parquet/src/parquetjs/parquet-thrift/sortingcolumn.ts","./modules/parquet/src/parquetjs/parquet-thrift/statistics.ts","./modules/parquet/src/parquetjs/parquet-thrift/stringtype.ts","./modules/parquet/src/parquetjs/parquet-thrift/timetype.ts","./modules/parquet/src/parquetjs/parquet-thrift/timeunit.ts","./modules/parquet/src/parquetjs/parquet-thrift/timestamptype.ts","./modules/parquet/src/parquetjs/parquet-thrift/type.ts","./modules/parquet/src/parquetjs/parquet-thrift/typedefinedorder.ts","./modules/parquet/src/parquetjs/parquet-thrift/uuidtype.ts","./modules/parquet/src/parquetjs/parquet-thrift/index.ts","./modules/parquet/src/parquetjs/parser/decoders.ts","./modules/parquet/src/parquetjs/parser/parquet-reader.ts","./modules/parquet/src/parquetjs/schema/declare.ts","./modules/parquet/src/parquetjs/schema/schema.ts","./modules/parquet/src/parquetjs/schema/shred.ts","./modules/parquet/src/parquetjs/schema/types.ts","./modules/parquet/src/parquetjs/utils/file-utils.ts","./modules/parquet/src/parquetjs/utils/read-utils.ts","./modules/parquet/src/polyfills/util.js","./modules/parquet/src/polyfills/buffer/buffer-polyfill.browser.ts","./modules/parquet/src/polyfills/buffer/buffer-polyfill.node.ts","./modules/parquet/src/polyfills/buffer/buffer.ts","./modules/parquet/src/polyfills/buffer/index.ts","./modules/parquet/src/polyfills/buffer/install-buffer-polyfill.ts","./modules/parquet/src/workers/parquet-worker.ts","./modules/pcd/src/index.ts","./modules/pcd/src/pcd-loader.ts","./modules/pcd/src/lib/decompress-lzf.ts","./modules/pcd/src/lib/get-pcd-schema.ts","./modules/pcd/src/lib/parse-pcd.ts","./modules/pcd/src/lib/pcd-types.ts","./modules/pcd/src/workers/pcd-worker.ts","./modules/ply/src/index.ts","./modules/ply/src/ply-loader.ts","./modules/ply/src/lib/get-ply-schema.ts","./modules/ply/src/lib/normalize-ply.ts","./modules/ply/src/lib/parse-ply-in-batches.ts","./modules/ply/src/lib/parse-ply.ts","./modules/ply/src/lib/ply-types.ts","./modules/ply/src/workers/ply-worker.ts","./modules/pmtiles/src/index.ts","./modules/pmtiles/src/pmtiles-loader.ts","./modules/pmtiles/src/pmtiles-source.ts","./modules/pmtiles/src/source-info.ts","./modules/pmtiles/src/lib/blob-source.ts","./modules/pmtiles/src/lib/parse-pmtiles.ts","./modules/pmtiles/src/lib/version.ts","./modules/polyfills/src/index.browser.ts","./modules/polyfills/src/index.ts","./modules/polyfills/src/buffer/btoa.node.ts","./modules/polyfills/src/buffer/to-array-buffer.node.ts","./modules/polyfills/src/crypto/node-hash.ts","./modules/polyfills/src/fetch/decode-data-uri.ts","./modules/polyfills/src/fetch/fetch-polyfill.ts","./modules/polyfills/src/fetch/headers-polyfill.ts","./modules/polyfills/src/fetch/response-polyfill.ts","./modules/polyfills/src/fetch/utils/decode-data-uri.node.ts","./modules/polyfills/src/file/blob-stream-controller.ts","./modules/polyfills/src/file/blob-stream.ts","./modules/polyfills/src/file/blob.ts","./modules/polyfills/src/file/file-reader.ts","./modules/polyfills/src/file/file.ts","./modules/polyfills/src/file/install-blob-polyfills.ts","./modules/polyfills/src/file/install-file-polyfills.ts","./modules/polyfills/src/file/readable-stream.ts","./modules/polyfills/src/filesystems/fetch-node.ts","./modules/polyfills/src/filesystems/node-file.ts","./modules/polyfills/src/filesystems/node-filesystem.ts","./modules/polyfills/src/filesystems/stream-utils.node.ts","./modules/polyfills/src/images/encode-image-node.ts","./modules/polyfills/src/images/encode-image.node.ts","./modules/polyfills/src/images/parse-image-node.ts","./modules/polyfills/src/images/parse-image.node.ts","./modules/polyfills/src/load-library/require-utils.node.ts","./modules/polyfills/src/streams/make-node-stream.ts","./modules/polyfills/src/text-encoder/encoding-indexes.ts","./modules/polyfills/src/text-encoder/text-encoder.ts","./modules/polyfills/src/utils/assert.ts","./modules/polyfills/src/utils/is-browser.ts","./modules/potree/src/index.ts","./modules/potree/src/potree-bin-loader.ts","./modules/potree/src/potree-hierarchy-chunk-loader.ts","./modules/potree/src/potree-loader.ts","./modules/potree/src/potree-source.ts","./modules/potree/src/lib/octree.ts","./modules/potree/src/lib/potree-node-source.ts","./modules/potree/src/parsers/parse-potree-bin.ts","./modules/potree/src/parsers/parse-potree-hierarchy-chunk.ts","./modules/potree/src/types/potree-metadata.ts","./modules/potree/src/utils/parse-version.ts","./modules/schema/src/index.ts","./modules/schema/src/lib/mesh/convert-mesh.ts","./modules/schema/src/lib/mesh/deduce-mesh-schema.ts","./modules/schema/src/lib/mesh/mesh-to-arrow-table.ts","./modules/schema/src/lib/mesh/mesh-utils.ts","./modules/schema/src/lib/table/arrow-api/arrow-like-field.ts","./modules/schema/src/lib/table/arrow-api/arrow-like-interface.ts","./modules/schema/src/lib/table/arrow-api/arrow-like-schema.ts","./modules/schema/src/lib/table/arrow-api/arrow-like-table.ts","./modules/schema/src/lib/table/arrow-api/arrow-like-type.ts","./modules/schema/src/lib/table/arrow-api/enum.ts","./modules/schema/src/lib/table/arrow-api/get-type-info.ts","./modules/schema/src/lib/table/arrow-api/index.ts","./modules/schema/src/lib/table/batches/base-table-batch-aggregator.ts","./modules/schema/src/lib/table/batches/columnar-table-batch-aggregator.ts","./modules/schema/src/lib/table/batches/row-table-batch-aggregator.ts","./modules/schema/src/lib/table/batches/table-batch-aggregator.ts","./modules/schema/src/lib/table/batches/table-batch-builder.ts","./modules/schema/src/lib/table/simple-table/convert-table.ts","./modules/schema/src/lib/table/simple-table/data-type.ts","./modules/schema/src/lib/table/simple-table/make-table-from-batches.ts","./modules/schema/src/lib/table/simple-table/make-table.ts","./modules/schema/src/lib/table/simple-table/row-utils.ts","./modules/schema/src/lib/table/simple-table/table-accessors.ts","./modules/schema/src/lib/table/simple-table/table-column.ts","./modules/schema/src/lib/table/simple-table/table-schema.ts","./modules/schema/src/lib/utils/assert.ts","./modules/schema/src/lib/utils/async-queue.ts","./modules/schema/src/types/batch.ts","./modules/schema/src/types/binary-geometries.ts","./modules/schema/src/types/category-gis.ts","./modules/schema/src/types/category-image.ts","./modules/schema/src/types/category-mesh.ts","./modules/schema/src/types/category-table.ts","./modules/schema/src/types/category-texture.ts","./modules/schema/src/types/flat-geometries.ts","./modules/schema/src/types/schema.ts","./modules/schema/src/types/types.ts","./modules/shapefile/src/dbf-loader.ts","./modules/shapefile/src/index.ts","./modules/shapefile/src/shapefile-loader.ts","./modules/shapefile/src/shp-loader.ts","./modules/shapefile/src/lib/parsers/parse-dbf.ts","./modules/shapefile/src/lib/parsers/parse-shapefile.ts","./modules/shapefile/src/lib/parsers/parse-shp-geometry.ts","./modules/shapefile/src/lib/parsers/parse-shp-header.ts","./modules/shapefile/src/lib/parsers/parse-shp.ts","./modules/shapefile/src/lib/parsers/parse-shx.ts","./modules/shapefile/src/lib/parsers/types.ts","./modules/shapefile/src/lib/streaming/binary-chunk-reader.ts","./modules/shapefile/src/lib/streaming/binary-reader.ts","./modules/shapefile/src/lib/streaming/zip-batch-iterators.ts","./modules/shapefile/src/workers/dbf-worker.ts","./modules/shapefile/src/workers/shp-worker.ts","./modules/terrain/src/index.ts","./modules/terrain/src/quantized-mesh-loader.ts","./modules/terrain/src/terrain-loader.ts","./modules/terrain/src/lib/decode-quantized-mesh.ts","./modules/terrain/src/lib/parse-quantized-mesh.ts","./modules/terrain/src/lib/parse-terrain.ts","./modules/terrain/src/lib/delatin/index.ts","./modules/terrain/src/lib/helpers/skirt.ts","./modules/terrain/src/lib/utils/version.ts","./modules/terrain/src/workers/quantized-mesh-worker.ts","./modules/terrain/src/workers/terrain-worker.ts","./modules/textures/src/basis-loader.ts","./modules/textures/src/compressed-texture-loader.ts","./modules/textures/src/compressed-texture-writer.ts","./modules/textures/src/crunch-loader.ts","./modules/textures/src/index.ts","./modules/textures/src/ktx2-basis-writer.ts","./modules/textures/src/npy-loader.ts","./modules/textures/src/lib/gl-extensions.ts","./modules/textures/src/lib/encoders/encode-ktx.ts","./modules/textures/src/lib/encoders/encode-ktx2-basis-texture.ts","./modules/textures/src/lib/encoders/encode-texture.ts","./modules/textures/src/lib/parsers/basis-module-loader.ts","./modules/textures/src/lib/parsers/crunch-module-loader.ts","./modules/textures/src/lib/parsers/parse-basis.ts","./modules/textures/src/lib/parsers/parse-compressed-texture.ts","./modules/textures/src/lib/parsers/parse-crunch.ts","./modules/textures/src/lib/parsers/parse-dds.ts","./modules/textures/src/lib/parsers/parse-ktx.ts","./modules/textures/src/lib/parsers/parse-npy.ts","./modules/textures/src/lib/parsers/parse-pvr.ts","./modules/textures/src/lib/texture-api/async-deep-map.ts","./modules/textures/src/lib/texture-api/deep-load.ts","./modules/textures/src/lib/texture-api/generate-url.ts","./modules/textures/src/lib/texture-api/load-image-array.ts","./modules/textures/src/lib/texture-api/load-image-cube.ts","./modules/textures/src/lib/texture-api/load-image.ts","./modules/textures/src/lib/texture-api/texture-api-types.ts","./modules/textures/src/lib/utils/extract-mipmap-images.ts","./modules/textures/src/lib/utils/ktx-format-helper.ts","./modules/textures/src/lib/utils/texture-formats.ts","./modules/textures/src/lib/utils/version.ts","./modules/textures/src/workers/basis-worker-node.ts","./modules/textures/src/workers/basis-worker.ts","./modules/textures/src/workers/compressed-texture-worker.ts","./modules/textures/src/workers/crunch-worker.ts","./modules/textures/src/workers/ktx2-basis-writer-worker-node.ts","./modules/textures/src/workers/ktx2-basis-writer-worker.ts","./modules/textures/src/workers/npy-worker.ts","./modules/tiles/src/constants.ts","./modules/tiles/src/index.ts","./modules/tiles/src/types.ts","./modules/tiles/src/tileset/tile-3d.ts","./modules/tiles/src/tileset/tileset-3d.ts","./modules/tiles/src/tileset/tileset-cache.ts","./modules/tiles/src/tileset/tileset-traverser.ts","./modules/tiles/src/tileset/format-3d-tiles/tileset-3d-traverser.ts","./modules/tiles/src/tileset/format-i3s/i3s-pending-tiles-register.ts","./modules/tiles/src/tileset/format-i3s/i3s-tile-manager.ts","./modules/tiles/src/tileset/format-i3s/i3s-tileset-traverser.ts","./modules/tiles/src/tileset/helpers/3d-tiles-options.ts","./modules/tiles/src/tileset/helpers/bounding-volume.ts","./modules/tiles/src/tileset/helpers/frame-state.ts","./modules/tiles/src/tileset/helpers/i3s-lod.ts","./modules/tiles/src/tileset/helpers/tiles-3d-lod.ts","./modules/tiles/src/tileset/helpers/transform-utils.ts","./modules/tiles/src/tileset/helpers/zoom.ts","./modules/tiles/src/utils/doubly-linked-list-node.ts","./modules/tiles/src/utils/doubly-linked-list.ts","./modules/tiles/src/utils/managed-array.ts","./modules/video/src/gif-builder.ts","./modules/video/src/index.ts","./modules/video/src/video-loader.ts","./modules/video/src/lib/gifshot/gifshot-loader.ts","./modules/video/src/lib/gifshot/gifshot.ts","./modules/video/src/lib/parsers/parse-video.ts","./modules/video/src/lib/utils/assert.ts","./modules/wkt/src/hex-wkb-loader.ts","./modules/wkt/src/index.ts","./modules/wkt/src/twkb-loader.ts","./modules/wkt/src/twkb-writer.ts","./modules/wkt/src/wkb-loader.ts","./modules/wkt/src/wkb-writer.ts","./modules/wkt/src/wkt-crs-loader.ts","./modules/wkt/src/wkt-crs-writer.ts","./modules/wkt/src/wkt-loader.ts","./modules/wkt/src/wkt-writer.ts","./modules/wkt/src/lib/encode-twkb.ts","./modules/wkt/src/lib/encode-wkb.ts","./modules/wkt/src/lib/encode-wkt-crs.ts","./modules/wkt/src/lib/encode-wkt.ts","./modules/wkt/src/lib/parse-hex-wkb.ts","./modules/wkt/src/lib/parse-twkb.ts","./modules/wkt/src/lib/parse-wkb-header.ts","./modules/wkt/src/lib/parse-wkb.ts","./modules/wkt/src/lib/parse-wkt-crs.ts","./modules/wkt/src/lib/parse-wkt.ts","./modules/wkt/src/lib/utils/base64-encoder.ts","./modules/wkt/src/lib/utils/binary-reader.ts","./modules/wkt/src/lib/utils/binary-writer.ts","./modules/wkt/src/lib/utils/hex-encoder.ts","./modules/wkt/src/lib/utils/hex-transcoder.ts","./modules/wkt/src/lib/utils/version.ts","./modules/wkt/src/workers/wkb-worker.ts","./modules/wkt/src/workers/wkt-worker.ts","./modules/wms/src/csw-capabilities-loader.ts","./modules/wms/src/csw-domain-loader.ts","./modules/wms/src/csw-records-loader.ts","./modules/wms/src/csw-source.ts","./modules/wms/src/gml-loader.ts","./modules/wms/src/index.ts","./modules/wms/src/wfs-capabilities-loader.ts","./modules/wms/src/wfs-source.ts","./modules/wms/src/wms-capabilities-loader.ts","./modules/wms/src/wms-error-loader.ts","./modules/wms/src/wms-source.ts","./modules/wms/src/arcgis/arcgis-feature-source.ts","./modules/wms/src/arcgis/arcgis-image-source.ts","./modules/wms/src/arcgis/arcgis-server.ts","./modules/wms/src/lib/deprecated/create-image-source.ts","./modules/wms/src/lib/parsers/csw/parse-csw-capabilities.ts","./modules/wms/src/lib/parsers/csw/parse-csw-domain.ts","./modules/wms/src/lib/parsers/csw/parse-csw-records.ts","./modules/wms/src/lib/parsers/csw/parse-exception-report.ts","./modules/wms/src/lib/parsers/gml/deep-strict-equal.ts","./modules/wms/src/lib/parsers/gml/parse-gml.ts","./modules/wms/src/lib/parsers/wfs/parse-wfs-capabilities.ts","./modules/wms/src/lib/parsers/wfs/parse-wfs.ts","./modules/wms/src/lib/parsers/wms/parse-wms-capabilities.ts","./modules/wms/src/lib/parsers/wms/parse-wms-error.ts","./modules/wms/src/lib/parsers/wms/parse-wms-features.ts","./modules/wms/src/lib/parsers/wms/parse-wms-layer-description.ts","./modules/wms/src/lib/parsers/xml/parse-xml-helpers.ts","./modules/wms/src/wip/data-source.ts","./modules/wms/src/wip/wcs-capabilities-loader.ts","./modules/wms/src/wip/wms-feature-info-loader.ts","./modules/wms/src/wip/wms-layer-description-loader.ts","./modules/wms/src/wip/wmts-capabilities-loader.ts","./modules/wms/src/wip/lib/wcs/parse-wcs-capabilities.ts","./modules/wms/src/wip/lib/wmts/parse-wmts-capabilities.ts","./modules/wms/src/wip/lib/wmts/parse-wmts.ts","./modules/worker-utils/src/index.ts","./modules/worker-utils/src/types.ts","./modules/worker-utils/src/lib/async-queue/async-queue.ts","./modules/worker-utils/src/lib/env-utils/assert.ts","./modules/worker-utils/src/lib/env-utils/globals.ts","./modules/worker-utils/src/lib/env-utils/version.ts","./modules/worker-utils/src/lib/library-utils/library-utils.ts","./modules/worker-utils/src/lib/node/worker_threads-browser.ts","./modules/worker-utils/src/lib/node/worker_threads.ts","./modules/worker-utils/src/lib/process-utils/child-process-proxy.ts","./modules/worker-utils/src/lib/process-utils/process-utils.ts","./modules/worker-utils/src/lib/worker-api/create-worker.ts","./modules/worker-utils/src/lib/worker-api/get-worker-url.ts","./modules/worker-utils/src/lib/worker-api/process-on-worker.ts","./modules/worker-utils/src/lib/worker-api/validate-worker-version.ts","./modules/worker-utils/src/lib/worker-farm/worker-body.ts","./modules/worker-utils/src/lib/worker-farm/worker-farm.ts","./modules/worker-utils/src/lib/worker-farm/worker-job.ts","./modules/worker-utils/src/lib/worker-farm/worker-pool.ts","./modules/worker-utils/src/lib/worker-farm/worker-thread.ts","./modules/worker-utils/src/lib/worker-utils/get-loadable-worker-url.ts","./modules/worker-utils/src/lib/worker-utils/get-transfer-list.ts","./modules/worker-utils/src/lib/worker-utils/remove-nontransferable-options.ts","./modules/worker-utils/src/workers/null-worker.ts","./modules/xml/src/html-loader.ts","./modules/xml/src/index.ts","./modules/xml/src/xml-loader.ts","./modules/xml/src/lib/parsers/parse-xml.ts","./modules/xml/src/lib/parsers/streaming-xml-parser.ts","./modules/xml/src/lib/xml-utils/uncapitalize.ts","./modules/xml/src/lib/xml-utils/xml-utils.ts","./modules/xml/src/sax-ts/sax.ts","./modules/zarr/src/index.ts","./modules/zarr/src/types.ts","./modules/zarr/src/lib/load-zarr.ts","./modules/zarr/src/lib/utils.ts","./modules/zarr/src/lib/zarr-pixel-source.ts","./modules/zip/src/hash-file-utility.ts","./modules/zip/src/index.ts","./modules/zip/src/tar-builder.ts","./modules/zip/src/zip-loader.ts","./modules/zip/src/zip-writer.ts","./modules/zip/src/filesystems/indexedarchive.ts","./modules/zip/src/filesystems/zip-filesystem.ts","./modules/zip/src/lib/tar/header.ts","./modules/zip/src/lib/tar/tar.ts","./modules/zip/src/lib/tar/types.ts","./modules/zip/src/lib/tar/utils.ts","./modules/zip/src/parse-zip/cd-file-header.ts","./modules/zip/src/parse-zip/end-of-central-directory.ts","./modules/zip/src/parse-zip/local-file-header.ts","./modules/zip/src/parse-zip/search-from-the-end.ts","./modules/zip/src/parse-zip/zip-composition.ts","./modules/zip/src/parse-zip/zip64-info-generation.ts"],"version":"5.6.2"} \ No newline at end of file From 99b819454b426d5b577059cb79081ff06cd7fbe6 Mon Sep 17 00:00:00 2001 From: Ib Green Date: Wed, 2 Oct 2024 12:54:22 -0400 Subject: [PATCH 2/2] testfixes --- docs/developer-guide/using-worker-loaders.md | 8 +- docs/specifications/category-image.md | 2 +- docs/whats-new.mdx | 2 +- .../3d-tiles-with-cesium/tileset-loader.js | 2 +- .../experimental/slpk-in-browser/src/app.tsx | 6 +- .../slpk-via-range-requests/src/app.tsx | 8 +- examples/website/geospatial/app.tsx | 10 +- .../lib/parsers/point-cloud-3d-tile.spec.ts | 2 +- modules/arrow/test/arrow-loader.spec.ts | 10 +- ...onvert-geoarrow-to-binary-geometry.spec.ts | 6 +- .../convert-geoarrow-to-geojson.spec.ts | 6 +- .../convert-geojson-to-arrow-table.spec.ts | 6 +- .../lib/loader-utils/option-utils.spec.ts | 2 +- modules/draco/test/draco-loader.spec.ts | 14 +- modules/draco/test/draco-writer.spec.ts | 6 +- .../flatgeobuf/test/flatgeobuf-loader.spec.ts | 6 +- modules/i3s/test/i3s-loader.spec.ts | 10 +- modules/las/test/las-loader.spec.js | 13 +- .../parquet/test/geoparquet-loader.spec.ts | 18 ++- .../test/parquet-columnar-loader.spec.ts | 124 ++++++++++++++---- modules/parquet/test/parquet-loader.spec.ts | 105 ++++++++++++--- .../parquet/test/parquet-wasm-loader.spec.ts | 4 +- modules/parquet/test/parquet.bench.ts | 12 +- modules/pcd/test/pcd-loader.spec.ts | 8 +- modules/ply/test/ply-loader.spec.js | 4 +- modules/shapefile/test/dbf-loader.spec.ts | 2 +- modules/shapefile/test/shapefile.bench.ts | 4 +- modules/shapefile/test/shp.bench.ts | 10 +- modules/terrain/test/terrain-loader.spec.js | 2 +- modules/textures/test/basis-loader.spec.ts | 11 +- modules/textures/test/crunch-loader.spec.ts | 4 +- 31 files changed, 301 insertions(+), 126 deletions(-) diff --git a/docs/developer-guide/using-worker-loaders.md b/docs/developer-guide/using-worker-loaders.md index 4c29ec4c49..2270a8dee3 100644 --- a/docs/developer-guide/using-worker-loaders.md +++ b/docs/developer-guide/using-worker-loaders.md @@ -47,18 +47,18 @@ async function loadInParallel(url1, url2) { ## Disabling Worker Loaders -Applications can use the `worker: false` option to disable worker loaders, for instance to simplify debugging of parsing issues: +Applications can use the `core.worker: false` option to disable worker loaders, for instance to simplify debugging of parsing issues: ```typescript async function loadWithoutWorker(url1) { - const data = await load(url1, DracoLoader, {worker: false}); + const data = await load(url1, DracoLoader, {core: {worker: false}}); } ``` ## Disabling Reuse of Workers Applications reuse already created workers by default. To avoid `enlarge memory arrays` error it is really necessary to disable it if you need to load multiple datasets in a sequence. -This functionality can be disabled by `reuseWorkers: false` option: +This functionality can be disabled by `core.reuseWorkers: false` option: ```typescript async function loadWithoutWorker(url1) { @@ -103,7 +103,7 @@ A worker loader starts a separate thread with a javascript bundle that only cont ## Debugging Worker Loaders (Advanced) -Debugging worker loaders is tricky. While it is always possible to specify `options.worker: false` which helps in many situations, there are cases where the worker loader itself must be debugged. +Debugging worker loaders is tricky. While it is always possible to specify `options.core.worker: false` which helps in many situations, there are cases where the worker loader itself must be debugged. TBA - There is an ambition to provide better support for debugging worker loaders: diff --git a/docs/specifications/category-image.md b/docs/specifications/category-image.md index 003d66a423..b26ef9f303 100644 --- a/docs/specifications/category-image.md +++ b/docs/specifications/category-image.md @@ -81,7 +81,7 @@ The image category support some generic options (specified using `options.image. ### About worker loading -Worker loading is only supported for the `data` and `imagebitmap` formats. Since image worker loading is only available on some browsers (Chrome and Firefox), the `ImageLoader` dynamically determines if worker loading is available. Use `options.worker: false` to disable worker loading of images. +Worker loading is only supported for the `data` and `imagebitmap` formats. Since image worker loading is only available on some browsers (Chrome and Firefox), the `ImageLoader` dynamically determines if worker loading is available. Use `options.core.worker: false` to disable worker loading of images. ## Image API diff --git a/docs/whats-new.mdx b/docs/whats-new.mdx index a07ba94b68..4f42aa28d8 100644 --- a/docs/whats-new.mdx +++ b/docs/whats-new.mdx @@ -783,7 +783,7 @@ The 2.0 release brings potentially dramatic bundle size savings through dynamic - **Worker Loaders** - Ease-of-use: Worker loading is provided by the main loader objects. It is not necessary to import the `...WorkerLoader` objects to enable worker loading (but see below about bundle size) - - Performance: Loading on worker threads is now the default: All worker enabled loaders now run on worker threads by default (set `options.worker: false` to disable worker-thread loading and run the loader on the main thread). + - Performance: Loading on worker threads is now the default: All worker enabled loaders now run on worker threads by default (set `options.core.worker: false` to disable worker-thread loading and run the loader on the main thread). - Debugging: Development builds of workers are now available on `unpkg.com` CDN, eabling debugging of worker loaders. - Bundle size: Workers are no longer bundled, but loaded from from the `unpkg.com` CDN. - Bundle size: Note that the old `...WorkerLoader` classes are still available. Using these can save even more bundle space since during tree-shaking since they do not depend on the non-worker parser. diff --git a/examples/experimental/3d-tiles-with-cesium/tileset-loader.js b/examples/experimental/3d-tiles-with-cesium/tileset-loader.js index 8cd39814eb..efba3a3291 100644 --- a/examples/experimental/3d-tiles-with-cesium/tileset-loader.js +++ b/examples/experimental/3d-tiles-with-cesium/tileset-loader.js @@ -13,7 +13,7 @@ const tileMap = {}; // Map the contentUri -> tile so we can unload/set visibilit let viewer; // set up loaders -setLoaderOptions({worker: false}); +setLoaderOptions({core: {worker: false}}); export async function loadTileset({tilesetUrl, ionAssetId, ionAccessToken, viewerInstance}) { let fetchOptions = null; diff --git a/examples/experimental/slpk-in-browser/src/app.tsx b/examples/experimental/slpk-in-browser/src/app.tsx index 65e21d4caa..1a89a137f8 100644 --- a/examples/experimental/slpk-in-browser/src/app.tsx +++ b/examples/experimental/slpk-in-browser/src/app.tsx @@ -78,8 +78,10 @@ export default function App() { } const loadOptions = { i3s: {coordinateSystem: COORDINATE_SYSTEM.LNGLAT_OFFSETS}, - fetch: fileSystem.fetch.bind(fileSystem), - worker: false + core: { + fetch: fileSystem.fetch.bind(fileSystem), + worker: false + } }; // @ts-expect-error const layers = new CustomTile3DLayer({ diff --git a/examples/experimental/slpk-via-range-requests/src/app.tsx b/examples/experimental/slpk-via-range-requests/src/app.tsx index 389ac8b0af..f174bded5e 100644 --- a/examples/experimental/slpk-via-range-requests/src/app.tsx +++ b/examples/experimental/slpk-via-range-requests/src/app.tsx @@ -48,7 +48,7 @@ export default function App() { } const createFileSystem = async (url: string) => { - console.log("New url", url) + console.log('New url', url); const fileProvider = await FileProvider.create(new HttpFile(url)); const archive = await parseSLPKArchive(fileProvider, undefined, url); const fileSystem = new ZipFileSystem(archive); @@ -78,8 +78,10 @@ export default function App() { } const loadOptions = { i3s: {coordinateSystem: COORDINATE_SYSTEM.LNGLAT_OFFSETS}, - fetch: fileSystem.fetch.bind(fileSystem), - worker: false + core: { + fetch: fileSystem.fetch.bind(fileSystem), + worker: false + } }; // @ts-expect-error const layers = new CustomTile3DLayer({ diff --git a/examples/website/geospatial/app.tsx b/examples/website/geospatial/app.tsx index 9cb46d9eea..79e553015e 100644 --- a/examples/website/geospatial/app.tsx +++ b/examples/website/geospatial/app.tsx @@ -19,7 +19,7 @@ import type {Example} from './examples'; import {INITIAL_LOADER_NAME, INITIAL_EXAMPLE_NAME, EXAMPLES} from './examples'; import {Table, GeoJSON} from '@loaders.gl/schema'; -import {Loader, load /* registerLoaders */} from '@loaders.gl/core'; +import {Loader, load, LoaderOptions} from '@loaders.gl/core'; import {GeoArrowLoader} from '@loaders.gl/arrow'; import {GeoParquetLoader, installBufferPolyfill, preloadCompressions} from '@loaders.gl/parquet'; import {FlatGeobufLoader} from '@loaders.gl/flatgeobuf'; @@ -47,8 +47,10 @@ const LOADERS = [ ] as const; const LOADER_OPTIONS = { - worker: false, - limit: 1800000, + core: { + worker: false, + limit: 1800000 + }, modules: { 'zstd-codec': ZstdCodec }, @@ -79,7 +81,7 @@ const LOADER_OPTIONS = { tcx: { shape: 'geojson-table' } -} as const; +} as const satisfies LoaderOptions; const VIEW_STATE = { height: 600, diff --git a/modules/3d-tiles/test/lib/parsers/point-cloud-3d-tile.spec.ts b/modules/3d-tiles/test/lib/parsers/point-cloud-3d-tile.spec.ts index 8f42821c4e..76dcbb6894 100644 --- a/modules/3d-tiles/test/lib/parsers/point-cloud-3d-tile.spec.ts +++ b/modules/3d-tiles/test/lib/parsers/point-cloud-3d-tile.spec.ts @@ -127,7 +127,7 @@ test('loadDraco# Pass options to draco loader properly', async (t) => { // TODO - we need a test file with 64 bit data test.skip('point cloud tile#64bit attribute', async (t) => { const POINTCLOUD_64BIT_URL = '@loaders.gl/3d-tiles/test/data/64-bit-attribute/1.pnts'; - const result = await load(POINTCLOUD_64BIT_URL, Tiles3DLoader, {worker: false}); + const result = await load(POINTCLOUD_64BIT_URL, Tiles3DLoader, {core: {worker: false}}); t.ok(result.attributes.gpstime instanceof Float64Array); t.equal(result.attributes.gpstime.length, 31648); t.end(); diff --git a/modules/arrow/test/arrow-loader.spec.ts b/modules/arrow/test/arrow-loader.spec.ts index d682b7e911..64142cf244 100644 --- a/modules/arrow/test/arrow-loader.spec.ts +++ b/modules/arrow/test/arrow-loader.spec.ts @@ -37,7 +37,9 @@ test('ArrowLoader#loader conformance', (t) => { }); test('ArrowLoader#parseSync(simple.arrow)', async (t) => { - const arrowTable = await parse(fetchFile(ARROW_SIMPLE), ArrowLoader, {worker: false}); + const arrowTable = await parse(fetchFile(ARROW_SIMPLE), ArrowLoader, { + core: {worker: false} + }); // Check loader specific results t.equal(arrowTable.shape, 'columnar-table'); if (arrowTable.shape === 'columnar-table') { @@ -50,10 +52,8 @@ test('ArrowLoader#parseSync(simple.arrow)', async (t) => { test('ArrowLoader#parseSync(simple.arrow) type="object-row-table"', async (t) => { const rowFormatTable = await parse(fetchFile(ARROW_SIMPLE), ArrowLoader, { - worker: false, - arrow: { - shape: 'object-row-table' - } + core: {worker: false}, + arrow: {shape: 'object-row-table'} }); t.equal(rowFormatTable.shape, 'object-row-table'); if (rowFormatTable.shape === 'object-row-table') { diff --git a/modules/arrow/test/geoarrow/convert-geoarrow-to-binary-geometry.spec.ts b/modules/arrow/test/geoarrow/convert-geoarrow-to-binary-geometry.spec.ts index a22d677305..839e6d6d6e 100644 --- a/modules/arrow/test/geoarrow/convert-geoarrow-to-binary-geometry.spec.ts +++ b/modules/arrow/test/geoarrow/convert-geoarrow-to-binary-geometry.spec.ts @@ -324,10 +324,8 @@ async function testGetBinaryGeometriesFromArrow( expectedBinaryGeometries ): Promise { const arrowTable = await load(arrowFile, ArrowLoader, { - worker: false, - arrow: { - shape: 'arrow-table' - } + core: {worker: false}, + arrow: {shape: 'arrow-table'} }); t.equal(arrowTable.shape, 'arrow-table'); diff --git a/modules/arrow/test/geoarrow/convert-geoarrow-to-geojson.spec.ts b/modules/arrow/test/geoarrow/convert-geoarrow-to-geojson.spec.ts index 4a12e50b1c..4da8c43a45 100644 --- a/modules/arrow/test/geoarrow/convert-geoarrow-to-geojson.spec.ts +++ b/modules/arrow/test/geoarrow/convert-geoarrow-to-geojson.spec.ts @@ -23,10 +23,8 @@ async function testParseFromArrow( expectedGeojson: FeatureCollection ): Promise { const arrowTable = await load(arrowFile, ArrowLoader, { - worker: false, - arrow: { - shape: 'arrow-table' - } + core: {worker: false}, + arrow: {shape: 'arrow-table'} }); t.equal(arrowTable.shape, 'arrow-table'); diff --git a/modules/arrow/test/tables/convert-geojson-to-arrow-table.spec.ts b/modules/arrow/test/tables/convert-geojson-to-arrow-table.spec.ts index 7863ad84d3..a378f37139 100644 --- a/modules/arrow/test/tables/convert-geojson-to-arrow-table.spec.ts +++ b/modules/arrow/test/tables/convert-geojson-to-arrow-table.spec.ts @@ -22,10 +22,8 @@ async function testConversion( expectedGeojson: FeatureCollection ): Promise { const table = await parse(fetchFile(arrowFile), GeoArrowLoader, { - worker: false, - arrow: { - shape: 'geojson-table' - } + core: {worker: false}, + arrow: {shape: 'geojson-table'} }); t.equal(table.shape, 'geojson-table'); diff --git a/modules/core/test/lib/loader-utils/option-utils.spec.ts b/modules/core/test/lib/loader-utils/option-utils.spec.ts index 01b91fbbdf..0c598771c6 100644 --- a/modules/core/test/lib/loader-utils/option-utils.spec.ts +++ b/modules/core/test/lib/loader-utils/option-utils.spec.ts @@ -19,7 +19,7 @@ const TEST_CASES = [ }, { loader: LASLoader, - options: {las: {skip: 10}, worker: false}, + options: {las: {skip: 10}, core: {worker: false}}, assert: (t, options) => { t.equal(options.las.skip, 10); t.equal(options.worker, false); diff --git a/modules/draco/test/draco-loader.spec.ts b/modules/draco/test/draco-loader.spec.ts index f8fcb5efe4..9842935075 100644 --- a/modules/draco/test/draco-loader.spec.ts +++ b/modules/draco/test/draco-loader.spec.ts @@ -20,7 +20,9 @@ test('DracoLoader#loader conformance', (t) => { }); test('DracoLoader#parse(mainthread)', async (t) => { - const data = await load(BUNNY_DRC_URL, DracoLoader, {worker: false}); + const data = await load(BUNNY_DRC_URL, DracoLoader, { + core: {worker: false} + }); validateMeshCategoryData(t, data); t.equal(data.attributes.POSITION.value.length, 104502, 'POSITION attribute was found'); t.ok(data.schema, 'Has arrow-like schema'); @@ -29,10 +31,8 @@ test('DracoLoader#parse(mainthread)', async (t) => { test('DracoLoader#draco3d npm package', async (t) => { const data = await load(BUNNY_DRC_URL, DracoLoader, { - worker: false, - modules: { - draco3d - } + core: {worker: false}, + modules: {draco3d} }); validateMeshCategoryData(t, data); t.equal(data.attributes.POSITION.value.length, 104502, 'POSITION attribute was found'); @@ -41,7 +41,7 @@ test('DracoLoader#draco3d npm package', async (t) => { test('DracoLoader#parse custom attributes(mainthread)', async (t) => { let data = await load(CESIUM_TILE_URL, DracoLoader, { - worker: false + core: {worker: false} }); t.equal( data.attributes.CUSTOM_ATTRIBUTE_2.value.length, @@ -55,7 +55,7 @@ test('DracoLoader#parse custom attributes(mainthread)', async (t) => { ); data = await load(CESIUM_TILE_URL, DracoLoader, { - worker: false, + core: {worker: false}, draco: { extraAttributes: { Intensity: 2, diff --git a/modules/draco/test/draco-writer.spec.ts b/modules/draco/test/draco-writer.spec.ts index ef8d70bf11..ffe71a04f6 100644 --- a/modules/draco/test/draco-writer.spec.ts +++ b/modules/draco/test/draco-writer.spec.ts @@ -367,7 +367,7 @@ test('DracoWriter#geometry metadata', async (t) => { // Decode the mesh const data2 = await parse(compressedMesh, DracoLoader, { - worker: false + core: {worker: false} }); validateMeshCategoryData(t, data2); @@ -430,7 +430,7 @@ test('DracoWriter#attributes metadata', async (t) => { // Decode the mesh const data2 = await parse(compressedMesh, DracoLoader, { - worker: false + core: {worker: false} }); validateMeshCategoryData(t, data2); validatePositionMetadata(t, data2); @@ -465,7 +465,7 @@ test('DracoWriter#metadata - should be able to define optional "name entry" for } }); const data2 = await parse(compressedMesh, DracoLoader, { - worker: false, + core: {worker: false}, draco: { attributeNameEntry: 'custom-attribute-name' } diff --git a/modules/flatgeobuf/test/flatgeobuf-loader.spec.ts b/modules/flatgeobuf/test/flatgeobuf-loader.spec.ts index ed6fd3255b..cc23e6c0e6 100644 --- a/modules/flatgeobuf/test/flatgeobuf-loader.spec.ts +++ b/modules/flatgeobuf/test/flatgeobuf-loader.spec.ts @@ -57,7 +57,9 @@ setLoaderOptions({ }); test('FlatGeobufLoader#load', async (t) => { - const geojsonTable = await load(FLATGEOBUF_COUNTRIES_DATA_URL, FlatGeobufLoader, {worker: false}); + const geojsonTable = await load(FLATGEOBUF_COUNTRIES_DATA_URL, FlatGeobufLoader, { + core: {worker: false} + }); t.equal(geojsonTable.features.length, 179); t.equal(geojsonTable.schema.fields.length, 2); t.deepEqual(geojsonTable.schema, FGB_METADATA); @@ -66,7 +68,7 @@ test('FlatGeobufLoader#load', async (t) => { test('FlatGeobufLoader#loadInBatches', async (t) => { const iterator = await loadInBatches(FLATGEOBUF_COUNTRIES_DATA_URL, FlatGeobufLoader, { - worker: false + core: {worker: false} }); t.ok(iterator); diff --git a/modules/i3s/test/i3s-loader.spec.ts b/modules/i3s/test/i3s-loader.spec.ts index beb995d167..97acd35f77 100644 --- a/modules/i3s/test/i3s-loader.spec.ts +++ b/modules/i3s/test/i3s-loader.spec.ts @@ -4,7 +4,11 @@ import {loadI3STileContent} from './test-utils/load-utils'; import {I3SLoader} from '@loaders.gl/i3s'; test('I3SLoader#Load tile content', async (t) => { - const content = await loadI3STileContent({loadOptions: {worker: false}}); + const content = await loadI3STileContent({ + loadOptions: { + core: {worker: false} + } + }); t.ok(content); t.ok(content.attributes); t.ok(content.attributes.positions); @@ -30,7 +34,9 @@ test('I3SLoader#Load tile content', async (t) => { test('I3SLoader#DRACO geometry', async (t) => { const content = await loadI3STileContent({ i3s: {useDracoGeometry: true}, - loadOptions: {worker: false} + loadOptions: { + core: {worker: false} + } }); t.ok(content); t.ok(content.attributes); diff --git a/modules/las/test/las-loader.spec.js b/modules/las/test/las-loader.spec.js index 786f076dbd..0ea8cd07e5 100644 --- a/modules/las/test/las-loader.spec.js +++ b/modules/las/test/las-loader.spec.js @@ -24,7 +24,10 @@ test('LASLoader#loader conformance', (t) => { }); test('LASLoader#parse(binary)', async (t) => { - const data = await parse(fetchFile(LAS_BINARY_URL), LASLoader, {las: {skip: 10}, worker: false}); + const data = await parse(fetchFile(LAS_BINARY_URL), LASLoader, { + las: {skip: 10}, + core: {worker: false} + }); validateMeshCategoryData(t, data); t.is(data.header?.vertexCount, data.loaderData.totalRead, 'Original header was found'); @@ -39,7 +42,7 @@ test('LASLoader#parse(binary)', async (t) => { test('LASLoader#options', async (t) => { const data = await parse(fetchFile(LAS_BINARY_URL), LASLoader, { las: {skip: 100, fp64: false}, - worker: false + core: {worker: false} }); t.ok( data.attributes.POSITION.value instanceof Float32Array, @@ -48,7 +51,7 @@ test('LASLoader#options', async (t) => { const data64 = await parse(fetchFile(LAS_BINARY_URL), LASLoader, { las: {skip: 100, fp64: true}, - worker: false + core: {worker: false} }); t.ok( data64.attributes.POSITION.value instanceof Float64Array, @@ -61,7 +64,7 @@ test('LASLoader#options', async (t) => { test('LASWorker#parse(binary) extra bytes', async (t) => { const data = await parse(fetchFile(LAS_EXTRABYTES_BINARY_URL), LASLoader, { las: {skip: 10}, - worker: false + core: {worker: false} }); validateMeshCategoryData(t, data); @@ -108,7 +111,7 @@ test.skip('LASLoader#shape="columnar-table"', async (t) => { test.skip('LAS#shape="arrow-table"', async (t) => { const result = await parse(fetchFile(LAS_BINARY_URL), LASLoader, { las: {shape: 'arrow-table', skip: 10}, - worker: false + core:{ worker: false} }); t.ok(result); diff --git a/modules/parquet/test/geoparquet-loader.spec.ts b/modules/parquet/test/geoparquet-loader.spec.ts index 5977fdb8cb..4784fb0d2a 100644 --- a/modules/parquet/test/geoparquet-loader.spec.ts +++ b/modules/parquet/test/geoparquet-loader.spec.ts @@ -19,7 +19,7 @@ setLoaderOptions({_workerType: 'test'}); test.skip('Load GeoParquet#airports.parquet', async (t) => { const table = await load(`${PARQUET_DIR}/airports.parquet`, ParquetLoader, { - worker: false, + core: {worker: false}, parquet: { shape: 'geojson-table', preserveBinary: true @@ -36,7 +36,9 @@ test.skip('Load GeoParquet#airports.parquet', async (t) => { }); test('Load GeoParquet file', async (t) => { - const table = await load(GEOPARQUET_EXAMPLE, ParquetColumnarLoader, {worker: false}); + const table = await load(GEOPARQUET_EXAMPLE, ParquetColumnarLoader, { + core: {worker: false} + }); t.equal(getTableLength(table), 5); t.deepEqual( @@ -50,7 +52,9 @@ test.skip('GeoParquetColumnarLoader#load', async (t) => { // t.comment('SUPPORTED FILES'); for (const fileName of GEOPARQUET_FILES) { const url = `${PARQUET_DIR}/geoparquet/${fileName}`; - const data = await load(url, ParquetColumnarLoader, {worker: false}); + const data = await load(url, ParquetColumnarLoader, { + core: {worker: false} + }); t.ok(data, `GOOD(${fileName})`); } @@ -60,8 +64,12 @@ test.skip('GeoParquetColumnarLoader#load', async (t) => { test.skip('ParquetWriterLoader round trip', async (t) => { const table = createArrowTable(); - const parquetBuffer = await encode(table, ParquetWriter, {worker: false}); - const newTable = await load(parquetBuffer, ParquetColumnarLoader, {worker: false}); + const parquetBuffer = await encode(table, ParquetWriter, { + core: {worker: false} +}); + const newTable = await load(parquetBuffer, ParquetColumnarLoader, { + core: {worker: false} +}); t.deepEqual(table.schema, newTable.schema); t.end(); diff --git a/modules/parquet/test/parquet-columnar-loader.spec.ts b/modules/parquet/test/parquet-columnar-loader.spec.ts index e02b8fd08f..5faa50da92 100644 --- a/modules/parquet/test/parquet-columnar-loader.spec.ts +++ b/modules/parquet/test/parquet-columnar-loader.spec.ts @@ -8,8 +8,7 @@ import {getTableLength} from '@loaders.gl/schema'; import {isBrowser, load, setLoaderOptions} from '@loaders.gl/core'; import {SUPPORTED_FILES, UNSUPPORTED_FILES, ENCRYPTED_FILES, BAD_FILES} from './data/files'; -import { -// ALL_TYPES_DICTIONARY_EXPECTED, +import {} from // ALL_TYPES_DICTIONARY_EXPECTED, // ALL_TYPES_PLAIN_EXPECTED, // ALL_TYPES_PLAIN_SNAPPY_EXPECTED, // BINARY_EXPECTED, @@ -26,7 +25,7 @@ import { // LZ4_RAW_COMPRESSED_LARGER_LAST_EXPECTED, // LZ4_RAW_COMPRESSED_EXPECTED, // NON_HADOOP_LZ4_COMPRESSED_EXPECTED -} from './expected'; +'./expected'; const PARQUET_DIR = '@loaders.gl/parquet/test/data/apache'; @@ -39,8 +38,14 @@ test('ParquetColumnarLoader#loader objects', (t) => { test('ParquetColumnarLoader#load alltypes_plain file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/alltypes_plain.parquet'; - // const tableRows = await load(url, ParquetLoader, {parquet: {url}, worker: false}); - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + // const tableRows = await load(url, ParquetLoader, { + // parquet: {url}, + // core: {worker: false} + // }); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 8); // t.deepEqual(data, ALL_TYPES_PLAIN_EXPECTED); t.end(); @@ -48,7 +53,10 @@ test('ParquetColumnarLoader#load alltypes_plain file', async (t) => { test('ParquetColumnarLoader#load alltypes_dictionary file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/alltypes_dictionary.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 2, 'length is correct'); // console.error(JSON.stringify(data, (key, token) => token instanceof Map ? Object.fromEntries(token) : token, 2)); @@ -58,7 +66,10 @@ test('ParquetColumnarLoader#load alltypes_dictionary file', async (t) => { test('ParquetColumnarLoader#load alltypes_plain_snappy file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/alltypes_plain.snappy.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 2); // t.deepEqual(data, ALL_TYPES_PLAIN_SNAPPY_EXPECTED); @@ -67,7 +78,10 @@ test('ParquetColumnarLoader#load alltypes_plain_snappy file', async (t) => { test('ParquetColumnarLoader#load binary file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/binary.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 12); // t.deepEqual(data, BINARY_EXPECTED()); @@ -76,7 +90,10 @@ test('ParquetColumnarLoader#load binary file', async (t) => { test('ParquetColumnarLoader#load binary file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/binary.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 12); // t.deepEqual(data, BINARY_EXPECTED()); @@ -85,7 +102,10 @@ test('ParquetColumnarLoader#load binary file', async (t) => { test('ParquetColumnarLoader#load dict file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/dict-page-offset-zero.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 39); // t.deepEqual(data, DICT_EXPECTED()); @@ -94,8 +114,14 @@ test('ParquetColumnarLoader#load dict file', async (t) => { test('ParquetColumnarLoader#load list_columns file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/list_columns.parquet'; - // const tableRows = await load(url, ParquetLoader, {parquet: {url}, worker: false}); - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + // const tableRows = await load(url, ParquetLoader, { + // parquet: {url}, + // core: {worker: false} + // }); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 3); // t.deepEqual(data, LIST_COLUMNS_EXPECTED); t.end(); @@ -104,7 +130,10 @@ test('ParquetColumnarLoader#load list_columns file', async (t) => { // TODO fix malformed dictionary before adding deep equal test test('ParquetColumnarLoader#load nation file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nation.dict-malformed.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table); t.equal(getTableLength(table), 25); @@ -113,7 +142,10 @@ test('ParquetColumnarLoader#load nation file', async (t) => { test('ParquetColumnarLoader#load nested_lists file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nested_lists.snappy.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 3); // t.deepEqual(data, NESTED_LIST_EXPECTED); @@ -122,7 +154,10 @@ test('ParquetColumnarLoader#load nested_lists file', async (t) => { test('ParquetColumnarLoader#load nested_maps file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nested_maps.snappy.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 6); // t.deepEqual(data, NESTED_MAPS_EXPECTED); @@ -131,7 +166,10 @@ test('ParquetColumnarLoader#load nested_maps file', async (t) => { test('ParquetColumnarLoader#load nonnullable file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nonnullable.impala.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 1); // t.deepEqual(data, NO_NULLABLE_EXPECTED); @@ -140,7 +178,10 @@ test('ParquetColumnarLoader#load nonnullable file', async (t) => { test('ParquetColumnarLoader#load nullable file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nullable.impala.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 7); // t.deepEqual(data, NULLABLE_EXPECTED); @@ -149,7 +190,10 @@ test('ParquetColumnarLoader#load nullable file', async (t) => { test('ParquetColumnarLoader#load nulls file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nulls.snappy.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 8); // t.deepEqual(data, NULLS_EXPECTED); @@ -165,17 +209,23 @@ test('ParquetColumnarLoader#decimal files', async (t) => { '@loaders.gl/parquet/test/data/apache/good/int64_decimal.parquet' ]; for (const url of urls) { - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(typeof getTableLength(table) === 'number'); // t.deepEqual(data, DECIMAL_EXPECTED); } - + t.end(); }); test('ParquetColumnarLoader#load repeated_no_annotation file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/repeated_no_annotation.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 6); // t.deepEqual(data, REPEATED_NO_ANNOTATION_EXPECTED); @@ -184,8 +234,10 @@ test('ParquetColumnarLoader#load repeated_no_annotation file', async (t) => { test('ParquetColumnarLoader#load lz4_raw_compressed file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/lz4_raw_compressed.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); - + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 4); // t.deepEqual(data, LZ4_RAW_COMPRESSED_EXPECTED); @@ -194,7 +246,10 @@ test('ParquetColumnarLoader#load lz4_raw_compressed file', async (t) => { test('ParquetColumnarLoader#load lz4_raw_compressed_larger file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/lz4_raw_compressed_larger.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 10000); // Compare only first and last items in data because file is huge. @@ -205,7 +260,10 @@ test('ParquetColumnarLoader#load lz4_raw_compressed_larger file', async (t) => { test('ParquetColumnarLoader#load non_hadoop_lz4_compressed file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/non_hadoop_lz4_compressed.parquet'; - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(getTableLength(table), 4); // t.deepEqual(data, NON_HADOOP_LZ4_COMPRESSED_EXPECTED); @@ -213,7 +271,6 @@ test('ParquetColumnarLoader#load non_hadoop_lz4_compressed file', async (t) => { }); test('ParquetColumnarLoader#load', async (t) => { - // Buffer is not defined issue in worker thread of browser. if (!isBrowser) { // t.comment('SUPPORTED FILES with worker'); @@ -228,7 +285,10 @@ test('ParquetColumnarLoader#load', async (t) => { for (const {title, path} of UNSUPPORTED_FILES) { const url = `${PARQUET_DIR}/${path}`; try { - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table, `GOOD(${title})`); } catch (error) { // @ts-ignore TS2571 @@ -240,7 +300,10 @@ test('ParquetColumnarLoader#load', async (t) => { for (const {title, path} of ENCRYPTED_FILES) { const url = `${PARQUET_DIR}/${path}`; try { - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table, `GOOD(${title})`); } catch (error) { // @ts-ignore TS2571 @@ -252,7 +315,10 @@ test('ParquetColumnarLoader#load', async (t) => { for (const {title, path} of BAD_FILES) { const url = `${PARQUET_DIR}/${path}`; try { - const table = await load(url, ParquetColumnarLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetColumnarLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table, `GOOD(${title})`); } catch (error) { // @ts-ignore TS2571 diff --git a/modules/parquet/test/parquet-loader.spec.ts b/modules/parquet/test/parquet-loader.spec.ts index 23d3667fc4..e845d5cc89 100644 --- a/modules/parquet/test/parquet-loader.spec.ts +++ b/modules/parquet/test/parquet-loader.spec.ts @@ -39,7 +39,10 @@ test('ParquetLoader#loader objects', (t) => { test('ParquetLoader#load alltypes_dictionary file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/alltypes_dictionary.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -51,7 +54,10 @@ test('ParquetLoader#load alltypes_dictionary file', async (t) => { test('ParquetLoader#load alltypes_plain file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/alltypes_plain.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -63,7 +69,10 @@ test('ParquetLoader#load alltypes_plain file', async (t) => { test('ParquetLoader#load alltypes_plain_snappy file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/alltypes_plain.snappy.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -75,7 +84,10 @@ test('ParquetLoader#load alltypes_plain_snappy file', async (t) => { test('ParquetLoader#load binary file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/binary.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -87,7 +99,10 @@ test('ParquetLoader#load binary file', async (t) => { test('ParquetLoader#load binary file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/binary.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -99,7 +114,10 @@ test('ParquetLoader#load binary file', async (t) => { test('ParquetLoader#load dict file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/dict-page-offset-zero.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -111,7 +129,10 @@ test('ParquetLoader#load dict file', async (t) => { test('ParquetLoader#load list_columns file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/list_columns.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -124,7 +145,10 @@ test('ParquetLoader#load list_columns file', async (t) => { // TODO fix malformed dictionary before adding deep equal test test('ParquetLoader#load nation file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nation.dict-malformed.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table); t.equal(table.shape, 'object-row-table'); @@ -136,7 +160,10 @@ test('ParquetLoader#load nation file', async (t) => { test('ParquetLoader#load nested_lists file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nested_lists.snappy.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -148,7 +175,10 @@ test('ParquetLoader#load nested_lists file', async (t) => { test('ParquetLoader#load nested_maps file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nested_maps.snappy.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -160,7 +190,10 @@ test('ParquetLoader#load nested_maps file', async (t) => { test('ParquetLoader#load nonnullable file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nonnullable.impala.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -172,7 +205,10 @@ test('ParquetLoader#load nonnullable file', async (t) => { test('ParquetLoader#load nullable file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nullable.impala.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -184,7 +220,10 @@ test('ParquetLoader#load nullable file', async (t) => { test('ParquetLoader#load nulls file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/nulls.snappy.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -203,7 +242,10 @@ test('ParquetLoader#decimal files', async (t) => { '@loaders.gl/parquet/test/data/apache/good/int64_decimal.parquet' ]; for (const url of urls) { - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { t.deepEqual(table.data, DECIMAL_EXPECTED); @@ -215,7 +257,10 @@ test('ParquetLoader#decimal files', async (t) => { test('ParquetLoader#load repeated_no_annotation file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/repeated_no_annotation.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -227,7 +272,10 @@ test('ParquetLoader#load repeated_no_annotation file', async (t) => { test('ParquetLoader#load lz4_raw_compressed file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/lz4_raw_compressed.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { t.equal(table.data.length, 4); @@ -238,7 +286,10 @@ test('ParquetLoader#load lz4_raw_compressed file', async (t) => { test('ParquetLoader#load lz4_raw_compressed_larger file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/lz4_raw_compressed_larger.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -252,7 +303,10 @@ test('ParquetLoader#load lz4_raw_compressed_larger file', async (t) => { test('ParquetLoader#load non_hadoop_lz4_compressed file', async (t) => { const url = '@loaders.gl/parquet/test/data/apache/good/non_hadoop_lz4_compressed.parquet'; - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.equal(table.shape, 'object-row-table'); if (table.shape === 'object-row-table') { @@ -277,7 +331,10 @@ test('ParquetLoader#load', async (t) => { for (const {title, path} of UNSUPPORTED_FILES) { const url = `${PARQUET_DIR}/${path}`; try { - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table, `GOOD(${title})`); } catch (error) { // @ts-ignore TS2571 @@ -289,7 +346,10 @@ test('ParquetLoader#load', async (t) => { for (const {title, path} of ENCRYPTED_FILES) { const url = `${PARQUET_DIR}/${path}`; try { - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table, `GOOD(${title})`); } catch (error) { // @ts-ignore TS2571 @@ -301,7 +361,10 @@ test('ParquetLoader#load', async (t) => { for (const {title, path} of BAD_FILES) { const url = `${PARQUET_DIR}/${path}`; try { - const table = await load(url, ParquetLoader, {parquet: {url}, worker: false}); + const table = await load(url, ParquetLoader, { + parquet: {url}, + core: {worker: false} + }); t.ok(table, `GOOD(${title})`); } catch (error) { // @ts-ignore TS2571 diff --git a/modules/parquet/test/parquet-wasm-loader.spec.ts b/modules/parquet/test/parquet-wasm-loader.spec.ts index eb83229fbb..918d6bafef 100644 --- a/modules/parquet/test/parquet-wasm-loader.spec.ts +++ b/modules/parquet/test/parquet-wasm-loader.spec.ts @@ -52,10 +52,10 @@ test('ParquetWasmWriter#writer/loader round trip', async (t) => { const table = createArrowTable(); const parquetBuffer = await encode(table, ParquetWasmWriter, { - worker: false, + // core: {worker: false}, }); const newTable = await load(parquetBuffer, ParquetWasmLoader, { - worker: false, + core: {worker: false}, }); t.deepEqual(table.data.schema, newTable.data.schema); diff --git a/modules/parquet/test/parquet.bench.ts b/modules/parquet/test/parquet.bench.ts index ae4ce9560d..a2fc7cd9f3 100644 --- a/modules/parquet/test/parquet.bench.ts +++ b/modules/parquet/test/parquet.bench.ts @@ -15,18 +15,24 @@ export async function parquetBench(suite) { const geoArrayBuffer = await response.arrayBuffer(); suite.addAsync('load(ParquetLoader) - Parquet load', {multiplier: 40000, unit: 'rows'}, async () => { - await load(arrayBuffer, ParquetLoader, {worker: false}); + await load(arrayBuffer, ParquetLoader, { + core: {worker: false} + }); }); // let i = 0; suite.addAsync('load(ParquetColumnarLoader) - Parquet load', {multiplier: 40000, unit: 'rows'}, async () => { // const j = i++; // console.time(`load-${j}`); - await load(arrayBuffer, ParquetColumnarLoader, {worker: false}); + await load(arrayBuffer, ParquetColumnarLoader, { + core: {worker: false} + }); // console.timeEnd(`load-${j}`); }); suite.addAsync('load(ParquetColumnarLoader) - GeoParquet load', {multiplier: 40000, unit: 'rows'}, async () => { - await load(geoArrayBuffer, ParquetColumnarLoader, {worker: false}); + await load(geoArrayBuffer, ParquetColumnarLoader, { + core: {worker: false} + }); }); } diff --git a/modules/pcd/test/pcd-loader.spec.ts b/modules/pcd/test/pcd-loader.spec.ts index c3aa9dbb41..fc06a0e428 100644 --- a/modules/pcd/test/pcd-loader.spec.ts +++ b/modules/pcd/test/pcd-loader.spec.ts @@ -19,7 +19,9 @@ test('PCDLoader#loader conformance', (t) => { }); test('PCDLoader#parse(text)', async (t) => { - const data = await parse(fetchFile(PCD_ASCII_URL), PCDLoader, {worker: false}); + const data = await parse(fetchFile(PCD_ASCII_URL), PCDLoader, { + core: {worker: false} + }); validateMeshCategoryData(t, data); t.equal(Object.keys(data.schema.fields).length, 2, 'schema field count is correct'); @@ -51,7 +53,9 @@ test('PCDLoader#parse(text)', async (t) => { }); test('PCDLoader#parse(binary)', async (t) => { - const data = await parse(fetchFile(PCD_BINARY_URL), PCDLoader, {worker: false}); + const data = await parse(fetchFile(PCD_BINARY_URL), PCDLoader, { + core: {worker: false} + }); validateMeshCategoryData(t, data); t.equal(data.mode, 0, 'mode is POINTS (0)'); diff --git a/modules/ply/test/ply-loader.spec.js b/modules/ply/test/ply-loader.spec.js index fad92502dc..1bdc29d3d9 100644 --- a/modules/ply/test/ply-loader.spec.js +++ b/modules/ply/test/ply-loader.spec.js @@ -50,7 +50,9 @@ test('PLYLoader#parse(binary)', async (t) => { }); test('PLYLoader#parse(ascii)', async (t) => { - const data = await parse(fetchFile(PLY_BUN_ZIPPER_URL), PLYLoader, {worker: false}); + const data = await parse(fetchFile(PLY_BUN_ZIPPER_URL), PLYLoader, { + core: {worker: false} + }); validateMeshCategoryData(t, data); t.equal(data.attributes.POSITION.value.length, 107841, 'POSITION attribute was found'); diff --git a/modules/shapefile/test/dbf-loader.spec.ts b/modules/shapefile/test/dbf-loader.spec.ts index 9768d17171..2a088aecd5 100644 --- a/modules/shapefile/test/dbf-loader.spec.ts +++ b/modules/shapefile/test/dbf-loader.spec.ts @@ -31,7 +31,7 @@ test('Shapefile JS DBF tests', async (t) => { for (const testFileName of SHAPEFILE_JS_TEST_FILES) { let response = await fetchFile(`${SHAPEFILE_JS_DATA_FOLDER}/${testFileName}.dbf`); const body = await response.arrayBuffer(); - const options = {worker: false, dbf: {encoding: 'utf8'}}; + const options = {core: {worker: false}, dbf: {encoding: 'utf8'}}; if (testFileName === 'latin1-property') { options.dbf.encoding = 'latin1'; diff --git a/modules/shapefile/test/shapefile.bench.ts b/modules/shapefile/test/shapefile.bench.ts index b62d229a5d..292182ac1f 100644 --- a/modules/shapefile/test/shapefile.bench.ts +++ b/modules/shapefile/test/shapefile.bench.ts @@ -19,7 +19,9 @@ export default async function shapefileLoaderBench(suite) { 'parse(ShapefileLoader without worker)', {multiplier: 77, unit: 'MB'}, async () => { - await load(arrayBuffer.slice(0), ShapefileLoader, {worker: false}); + await load(arrayBuffer.slice(0), ShapefileLoader, { + core: {worker: false} + }); } ); } diff --git a/modules/shapefile/test/shp.bench.ts b/modules/shapefile/test/shp.bench.ts index 6557fba507..151c033555 100644 --- a/modules/shapefile/test/shp.bench.ts +++ b/modules/shapefile/test/shp.bench.ts @@ -18,12 +18,18 @@ export default async function shpLoaderBench(suite) { suite.addAsync( 'parse(SHPLoader without worker)', {multiplier: 77, unit: 'MB'}, - async () => await parse(arrayBuffer, SHPLoader, {worker: false}) + async () => + await parse(arrayBuffer, SHPLoader, { + core: {worker: false} + }) ); suite.addAsync( 'parseInBatches(SHPLoader without worker)', {multiplier: 77, unit: 'MB'}, - async () => await parseInBatches(arrayBuffer, SHPLoader, {worker: false}) + async () => + await parseInBatches(arrayBuffer, SHPLoader, { + core: {worker: false} + }) ); // TODO: optionally test for equality of batched and atomic loaders diff --git a/modules/terrain/test/terrain-loader.spec.js b/modules/terrain/test/terrain-loader.spec.js index 22857b28d3..5fe3eb9fd6 100644 --- a/modules/terrain/test/terrain-loader.spec.js +++ b/modules/terrain/test/terrain-loader.spec.js @@ -39,7 +39,7 @@ test('TerrainLoader#parse mapbox martini', async (t) => { bounds: [83, 329.5, 83.125, 329.625], // note: not the real tile bounds tesselator: 'martini' }, - worker: false + core: {worker: false} }); validateMeshCategoryData(t, data); // TODO: should there be a validateMeshCategoryData? diff --git a/modules/textures/test/basis-loader.spec.ts b/modules/textures/test/basis-loader.spec.ts index bd14c4d0ea..1a51961bba 100644 --- a/modules/textures/test/basis-loader.spec.ts +++ b/modules/textures/test/basis-loader.spec.ts @@ -22,7 +22,9 @@ test('BasisLoader#imports', (t) => { }); test('BasisLoader#load(URL, worker: false)', async (t) => { - const images = await load(BASIS_TEST_URL, BasisLoader, {worker: false}); + const images = await load(BASIS_TEST_URL, BasisLoader, { + core: {worker: false} + }); const image = images[0][0]; @@ -62,7 +64,10 @@ test('BasisLoader#load(URL, worker: true)', async (t) => { test('BasisLoader#auto-select a target format', async (t) => { // Can't auto-select format in worker because gl context isn't not available on a worker thread - const images = await load(BASIS_TEST_URL, BasisLoader, {worker: false, basis: {format: 'auto'}}); + const images = await load(BASIS_TEST_URL, BasisLoader, { + core: {worker: false}, + basis: {format: 'auto'} + }); const image = images[0][0]; @@ -82,7 +87,7 @@ test('BasisLoader#auto-select a target format', async (t) => { t.ok(image.compressed, 'Basis transcodes to compressed texture'); } else { t.notOk(image.format, 'Basis transcodes to RGB565 in NodeJS'); - t.notOk(image.compressed, 'Basis can\'t transcode to compressed texture in NodeJS'); + t.notOk(image.compressed, "Basis can't transcode to compressed texture in NodeJS"); } t.end(); diff --git a/modules/textures/test/crunch-loader.spec.ts b/modules/textures/test/crunch-loader.spec.ts index 3192c32758..fa4614651b 100644 --- a/modules/textures/test/crunch-loader.spec.ts +++ b/modules/textures/test/crunch-loader.spec.ts @@ -22,7 +22,9 @@ test('CrunchWorkerLoader#imports', (t) => { test.skip('CrunchWorkerLoader#load', async (t) => { // Decoder lib `src/libs/crunch.js` works only in browser if (isBrowser) { - const texture = await load(CRUNCH_URL, CrunchWorkerLoader, {worker: false}); + const texture = await load(CRUNCH_URL, CrunchWorkerLoader, { + core: {worker: false} + }); t.ok(texture, 'Crunch container loaded OK'); } t.end();