@loaders.gl/loader-utils 4.0.0-alpha.18 → 4.0.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.JSONLoader = void 0;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
- var VERSION = typeof "4.0.0-alpha.18" !== 'undefined' ? "4.0.0-alpha.18" : 'latest';
10
+ var VERSION = typeof "4.0.0-alpha.19" !== 'undefined' ? "4.0.0-alpha.19" : 'latest';
11
11
  var JSONLoader = {
12
12
  name: 'JSON',
13
13
  id: 'json',
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["// Typed arrays\n\nexport type TypedIntArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Int32Array\n | Uint32Array;\n\nexport type TypedFloatArray = Uint16Array | Float32Array | Float64Array;\n\nexport type TypedArray = TypedIntArray | TypedFloatArray;\n\nexport type BigTypedArray = TypedArray | BigInt64Array | BigUint64Array;\n\nexport type TypedArrayConstructor =\n | Int8ArrayConstructor\n | Uint8ArrayConstructor\n | Int16ArrayConstructor\n | Uint16ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Float32ArrayConstructor\n | Float64ArrayConstructor;\n\nexport type BigTypedArrayConstructor =\n | TypedArrayConstructor\n | BigInt64ArrayConstructor\n | BigUint64ArrayConstructor;\n\n/** Any numeric array: typed array or `number[]` */\nexport type NumberArray = number[] | TypedArray;\n\nexport type NumericArray = number[] | TypedArray;\n\ntype FetchLike = (url: string, options?: RequestInit) => Promise<Response>;\n\n// LOADERS\n\n/**\n * Core Loader Options\n */\nexport type LoaderOptions = {\n /** fetch options or a custom fetch function */\n fetch?: typeof fetch | FetchLike | RequestInit | null;\n /** Do not throw on errors */\n nothrow?: boolean;\n\n /** loader selection, search first for supplied mimeType */\n mimeType?: string;\n /** loader selection, provide fallback mimeType is server does not provide */\n fallbackMimeType?: string;\n /** loader selection, avoid searching registered loaders */\n ignoreRegisteredLoaders?: boolean;\n\n // general\n /** Experimental: Supply a logger to the parser */\n log?: any;\n\n // batched parsing\n\n /** Size of each batch. `auto` matches batches to size of incoming chunks */\n batchSize?: number | 'auto';\n /** Minimal amount of time between batches */\n batchDebounceMs?: number;\n /** Stop loading after a given number of rows (compare SQL limit clause) */\n limit?: 0;\n /** Experimental: Stop loading after reaching */\n _limitMB?: 0;\n /** Generate metadata batches */\n metadata?: boolean;\n /** Transforms to run on incoming batches */\n transforms?: TransformBatches[];\n\n // workers\n\n /** CDN load workers from */\n CDN?: string | null;\n /** Set to `false` to disable workers */\n worker?: boolean;\n /** Number of concurrent workers (per loader) on desktop browser */\n maxConcurrency?: number;\n /** Number of concurrent workers (per loader) on mobile browsers */\n maxMobileConcurrency?: number;\n /** Set to `false` to prevent reuse workers */\n reuseWorkers?: boolean;\n /** Whether to use workers under Node.js (experimental) */\n _nodeWorkers?: boolean;\n /** set to 'test' to run local worker */\n _workerType?: string;\n\n /** @deprecated `options.batchType` removed, Use `options.<loader>.type` instead */\n batchType?: 'row' | 'columnar' | 'arrow';\n /** @deprecated `options.throw removed`, Use `options.nothrow` instead */\n throws?: boolean;\n /** @deprecated `options.dataType` no longer used */\n dataType?: never;\n /** @deprecated `options.uri` no longer used */\n uri?: never;\n /** @deprecated `options.method` removed. Use `options.fetch.method` */\n method?: never;\n /** @deprecated `options.headers` removed. Use `options.fetch.headers` */\n headers?: never;\n /** @deprecated `options.body` removed. Use `options.fetch.body` */\n body?: never;\n /** @deprecated `options.mode` removed. Use `options.fetch.mode` */\n mode?: never;\n /** @deprecated `options.credentials` removed. Use `options.fetch.credentials` */\n credentials?: never;\n /** @deprecated `options.cache` removed. Use `options.fetch.cache` */\n cache?: never;\n /** @deprecated `options.redirect` removed. Use `options.fetch.redirect` */\n redirect?: never;\n /** @deprecated `options.referrer` removed. Use `options.fetch.referrer` */\n referrer?: never;\n /** @deprecated `options.referrerPolicy` removed. Use `options.fetch.referrerPolicy` */\n referrerPolicy?: never;\n /** @deprecated `options.integrity` removed. Use `options.fetch.integrity` */\n integrity?: never;\n /** @deprecated `options.keepalive` removed. Use `options.fetch.keepalive` */\n keepalive?: never;\n /** @deprecated `options.signal` removed. Use `options.fetch.signal` */\n signal?: never;\n\n // Accept other keys (loader options objects, e.g. `options.csv`, `options.json` ...)\n [loaderId: string]: unknown;\n};\n\ntype PreloadOptions = {\n [key: string]: unknown;\n};\n\n/**\n * A worker loader definition that can be used with `@loaders.gl/core` functions\n */\nexport type Loader<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = {\n // Types\n dataType?: DataT;\n batchType?: BatchT;\n\n /** Default Options */\n options: LoaderOptionsT;\n /** Deprecated Options */\n deprecatedOptions?: Record<string, string | Record<string, string>>;\n\n // Worker\n name: string;\n /** id should be the same as the field used in LoaderOptions */\n id: string;\n /** module is used to generate worker threads, need to be the module directory name */\n module: string;\n /** Version should be injected by build tools */\n version: string;\n /** A boolean, or a URL */\n worker?: string | boolean;\n // end Worker\n\n /** Which category does this loader belong to */\n category?: string;\n /** What extensions does this loader generate */\n extensions: string[];\n mimeTypes: string[];\n\n binary?: boolean;\n text?: boolean;\n\n tests?: (((ArrayBuffer: ArrayBuffer) => boolean) | ArrayBuffer | string)[];\n\n // TODO - deprecated\n supported?: boolean;\n testText?: (string: string) => boolean;\n};\n\n/**\n * A \"bundled\" loader definition that can be used with `@loaders.gl/core` functions\n * If a worker loader is supported it will also be supported.\n */\nexport type LoaderWithParser<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = Loader<\n DataT,\n BatchT,\n LoaderOptionsT\n> & {\n // TODO - deprecated\n testText?: (string: string) => boolean;\n\n parse: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => Promise<DataT>;\n preload?: Preload;\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => DataT;\n parseText?: (text: string, options?: LoaderOptionsT) => Promise<DataT>;\n parseTextSync?: (text: string, options?: LoaderOptionsT) => DataT;\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n parseFileInBatches?: (\n file: Blob,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n};\n\n/**\n * A Loader context is provided as a third parameters to a loader object's\n * parse functions when that loader is called by other loaders rather then\n * directly by the application.\n *\n * - The context object allows the subloaders to be aware of the parameters and\n * options that the application provided in the top level call.\n * - The context also providedsaccess to parse functions so that the subloader\n * does not need to include the core module.\n * - In addition, the context's parse functions may also redirect loads from worker\n * threads back to main thread.\n */\nexport type LoaderContext = {\n loaders?: Loader[] | null;\n /** If URL is available. */\n url?: string;\n /** the file name component of the URL (leading path and query string removed) */\n filename?: string;\n /** the directory name component of the URL (leading path excluding file name and query string) */\n baseUrl?: string;\n /** Query string (characters after `?`) */\n queryString?: string;\n\n /** Provides access to any application overrides of fetch() */\n fetch: typeof fetch | FetchLike;\n /** TBD */\n response?: Response;\n /** Parse function. Use instead of importing `core`. In workers, may redirect to main thread */\n parse: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => Promise<any>;\n /** ParseSync function. Use instead of importing `core`. In workers, may redirect to main thread */\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => any;\n /** ParseInBatches function. Use instead of importing `core`. */\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => AsyncIterable<any> | Promise<AsyncIterable<any>>;\n};\n\n// type Parse = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => Promise<any>;\n// type ParseSync = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => any;\n// type ParseText = (text: string, options?: LoaderOptions) => Promise<any>;\n// type ParseTextSync = (text: string, options?: LoaderOptions) => any;\n// type ParseInBatches = (\n// iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n// type ParseFileInBatches = (\n// file: Blob,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n\ntype Preload = (url: string, options?: PreloadOptions) => any;\n\n/** Typescript helper to extract options type from a generic loader type */\nexport type LoaderOptionsType<T = Loader> = T extends Loader<any, any, infer Options>\n ? Options\n : never;\n/** Typescript helper to extract data type from a generic loader type */\nexport type LoaderReturnType<T = Loader> = T extends Loader<infer Return, any, any>\n ? Return\n : never;\n/** Typescript helper to extract batch type from a generic loader type */\nexport type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any> ? Batch : never;\n\n// WRITERS\n\n/** Options for writers */\nexport type WriterOptions = {\n /** worker source. If is set will be used instead of loading worker from the Internet */\n souce?: string | null;\n /** writer-specific options */\n [writerId: string]: any;\n};\n\n/**\n * A writer definition that can be used with `@loaders.gl/core` functions\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type Writer<DataT = unknown, BatchT = unknown, WriterOptionsT = WriterOptions> = {\n name: string;\n\n id: string;\n module: string;\n version: string;\n worker?: string | boolean;\n\n // TODO - are these are needed?\n extensions?: string[];\n mimeTypes?: string[];\n binary?: boolean;\n text?: boolean;\n\n options: WriterOptionsT;\n deprecatedOptions?: Record<string, string>;\n\n // encodeText?: EncodeText;\n // encode?: Encode;\n encodeSync?: EncodeSync;\n // encodeInBatches?: EncodeInBatches;\n encodeURLtoURL?: EncodeURLtoURL;\n\n encode?(data: DataT, options?: WriterOptionsT): Promise<ArrayBuffer>;\n encodeText?(table: DataT, options?: WriterOptionsT): Promise<string> | string;\n encodeInBatches?(data: AsyncIterable<any>, options?: WriterOptionsT): AsyncIterable<ArrayBuffer>;\n};\n\n// type Encode = (data: any, options?: WriterOptions) => Promise<ArrayBuffer>;\ntype EncodeSync = (data: any, options?: WriterOptions) => ArrayBuffer;\n// TODO\n// type EncodeText = Function;\n// type EncodeInBatches = Function;\ntype EncodeURLtoURL = (\n inputUrl: string,\n outputUrl: string,\n options?: WriterOptions\n) => Promise<string>;\n\n/** Typescript helper to extract the writer options type from a generic writer type */\nexport type WriterOptionsType<T = Writer> = T extends Writer<unknown, unknown, infer Options>\n ? Options\n : never;\n\n// MISC TYPES\n\nexport type TransformBatches = (\n asyncIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>\n) => AsyncIterable<ArrayBuffer>;\n\n/** Types that can be synchronously parsed */\nexport type SyncDataType = string | ArrayBuffer; // TODO File | Blob can be read synchronously...\n\n/** Types that can be parsed async */\nexport type DataType =\n | string\n | ArrayBuffer\n | File\n | Blob\n | Response\n | ReadableStream\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>;\n\n/** Types that can be parsed in batches */\nexport type BatchableDataType =\n | DataType\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>\n | Promise<AsyncIterable<ArrayBuffer>>;\n\n/**\n * A FileSystem interface can encapsulate a FileList, a ZipFile, a GoogleDrive etc.\n */\nexport interface IFileSystem {\n /**\n * Return a list of file names\n * @param dirname directory name. file system root directory if omitted\n */\n readdir(dirname?: string, options?: {recursive?: boolean}): Promise<string[]>;\n\n /**\n * Gets information from a local file from the filesystem\n * @param filename file name to stat\n * @param options currently unused\n * @throws if filename is not in local filesystem\n */\n stat(filename: string, options?: object): Promise<{size: number}>;\n\n /**\n * Fetches a local file from the filesystem (or a URL)\n * @param filename\n * @param options\n */\n fetch(filename: string, options?: object): Promise<Response>;\n}\n\ntype ReadOptions = {buffer?: ArrayBuffer; offset?: number; length?: number; position?: number};\nexport interface IRandomAccessReadFileSystem extends IFileSystem {\n open(path: string, flags: string | number, mode?: any): Promise<any>;\n close(fd: any): Promise<void>;\n fstat(fd: any): Promise<object>;\n read(fd: any, options?: ReadOptions): Promise<{bytesRead: number; buffer: Buffer}>;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["// Typed arrays\n\nexport type TypedIntArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Int32Array\n | Uint32Array;\n\nexport type TypedFloatArray = Uint16Array | Float32Array | Float64Array;\n\nexport type TypedArray = TypedIntArray | TypedFloatArray;\n\nexport type BigTypedArray = TypedArray | BigInt64Array | BigUint64Array;\n\nexport type TypedArrayConstructor =\n | Int8ArrayConstructor\n | Uint8ArrayConstructor\n | Int16ArrayConstructor\n | Uint16ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Float32ArrayConstructor\n | Float64ArrayConstructor;\n\nexport type BigTypedArrayConstructor =\n | TypedArrayConstructor\n | BigInt64ArrayConstructor\n | BigUint64ArrayConstructor;\n\n/** Any numeric array: typed array or `number[]` */\nexport type NumberArray = number[] | TypedArray;\n\nexport type NumericArray = number[] | TypedArray;\n\ntype FetchLike = (url: string, options?: RequestInit) => Promise<Response>;\n\n// LOADERS\n\n/**\n * Core Loader Options\n */\nexport type LoaderOptions = {\n /** fetch options or a custom fetch function */\n fetch?: typeof fetch | FetchLike | RequestInit | null;\n /** Do not throw on errors */\n nothrow?: boolean;\n\n /** loader selection, search first for supplied mimeType */\n mimeType?: string;\n /** loader selection, provide fallback mimeType is server does not provide */\n fallbackMimeType?: string;\n /** loader selection, avoid searching registered loaders */\n ignoreRegisteredLoaders?: boolean;\n\n // general\n /** Experimental: Supply a logger to the parser */\n log?: any;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n\n // batched parsing\n\n /** Size of each batch. `auto` matches batches to size of incoming chunks */\n batchSize?: number | 'auto';\n /** Minimal amount of time between batches */\n batchDebounceMs?: number;\n /** Stop loading after a given number of rows (compare SQL limit clause) */\n limit?: 0;\n /** Experimental: Stop loading after reaching */\n _limitMB?: 0;\n /** Generate metadata batches */\n metadata?: boolean;\n /** Transforms to run on incoming batches */\n transforms?: TransformBatches[];\n\n // workers\n\n /** CDN load workers from */\n CDN?: string | null;\n /** Set to `false` to disable workers */\n worker?: boolean;\n /** Number of concurrent workers (per loader) on desktop browser */\n maxConcurrency?: number;\n /** Number of concurrent workers (per loader) on mobile browsers */\n maxMobileConcurrency?: number;\n /** Set to `false` to prevent reuse workers */\n reuseWorkers?: boolean;\n /** Whether to use workers under Node.js (experimental) */\n _nodeWorkers?: boolean;\n /** set to 'test' to run local worker */\n _workerType?: string;\n\n /** @deprecated `options.batchType` removed, Use `options.<loader>.type` instead */\n batchType?: 'row' | 'columnar' | 'arrow';\n /** @deprecated `options.throw removed`, Use `options.nothrow` instead */\n throws?: boolean;\n /** @deprecated `options.dataType` no longer used */\n dataType?: never;\n /** @deprecated `options.uri` no longer used */\n uri?: never;\n /** @deprecated `options.method` removed. Use `options.fetch.method` */\n method?: never;\n /** @deprecated `options.headers` removed. Use `options.fetch.headers` */\n headers?: never;\n /** @deprecated `options.body` removed. Use `options.fetch.body` */\n body?: never;\n /** @deprecated `options.mode` removed. Use `options.fetch.mode` */\n mode?: never;\n /** @deprecated `options.credentials` removed. Use `options.fetch.credentials` */\n credentials?: never;\n /** @deprecated `options.cache` removed. Use `options.fetch.cache` */\n cache?: never;\n /** @deprecated `options.redirect` removed. Use `options.fetch.redirect` */\n redirect?: never;\n /** @deprecated `options.referrer` removed. Use `options.fetch.referrer` */\n referrer?: never;\n /** @deprecated `options.referrerPolicy` removed. Use `options.fetch.referrerPolicy` */\n referrerPolicy?: never;\n /** @deprecated `options.integrity` removed. Use `options.fetch.integrity` */\n integrity?: never;\n /** @deprecated `options.keepalive` removed. Use `options.fetch.keepalive` */\n keepalive?: never;\n /** @deprecated `options.signal` removed. Use `options.fetch.signal` */\n signal?: never;\n\n // Accept other keys (loader options objects, e.g. `options.csv`, `options.json` ...)\n [loaderId: string]: unknown;\n};\n\ntype PreloadOptions = {\n [key: string]: unknown;\n};\n\n/**\n * A worker loader definition that can be used with `@loaders.gl/core` functions\n */\nexport type Loader<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = {\n // Types\n dataType?: DataT;\n batchType?: BatchT;\n\n /** Default Options */\n options: LoaderOptionsT;\n /** Deprecated Options */\n deprecatedOptions?: Record<string, string | Record<string, string>>;\n\n // Worker\n name: string;\n /** id should be the same as the field used in LoaderOptions */\n id: string;\n /** module is used to generate worker threads, need to be the module directory name */\n module: string;\n /** Version should be injected by build tools */\n version: string;\n /** A boolean, or a URL */\n worker?: string | boolean;\n // end Worker\n\n /** Which category does this loader belong to */\n category?: string;\n /** What extensions does this loader generate */\n extensions: string[];\n mimeTypes: string[];\n\n binary?: boolean;\n text?: boolean;\n\n tests?: (((ArrayBuffer: ArrayBuffer) => boolean) | ArrayBuffer | string)[];\n\n // TODO - deprecated\n supported?: boolean;\n testText?: (string: string) => boolean;\n};\n\n/**\n * A \"bundled\" loader definition that can be used with `@loaders.gl/core` functions\n * If a worker loader is supported it will also be supported.\n */\nexport type LoaderWithParser<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = Loader<\n DataT,\n BatchT,\n LoaderOptionsT\n> & {\n // TODO - deprecated\n testText?: (string: string) => boolean;\n\n parse: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => Promise<DataT>;\n preload?: Preload;\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => DataT;\n parseText?: (text: string, options?: LoaderOptionsT) => Promise<DataT>;\n parseTextSync?: (text: string, options?: LoaderOptionsT) => DataT;\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n parseFileInBatches?: (\n file: Blob,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n};\n\n/**\n * A Loader context is provided as a third parameters to a loader object's\n * parse functions when that loader is called by other loaders rather then\n * directly by the application.\n *\n * - The context object allows the subloaders to be aware of the parameters and\n * options that the application provided in the top level call.\n * - The context also providedsaccess to parse functions so that the subloader\n * does not need to include the core module.\n * - In addition, the context's parse functions may also redirect loads from worker\n * threads back to main thread.\n */\nexport type LoaderContext = {\n loaders?: Loader[] | null;\n /** If URL is available. */\n url?: string;\n /** the file name component of the URL (leading path and query string removed) */\n filename?: string;\n /** the directory name component of the URL (leading path excluding file name and query string) */\n baseUrl?: string;\n /** Query string (characters after `?`) */\n queryString?: string;\n\n /** Provides access to any application overrides of fetch() */\n fetch: typeof fetch | FetchLike;\n /** TBD */\n response?: Response;\n /** Parse function. Use instead of importing `core`. In workers, may redirect to main thread */\n parse: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => Promise<any>;\n /** ParseSync function. Use instead of importing `core`. In workers, may redirect to main thread */\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => any;\n /** ParseInBatches function. Use instead of importing `core`. */\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => AsyncIterable<any> | Promise<AsyncIterable<any>>;\n};\n\n// type Parse = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => Promise<any>;\n// type ParseSync = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => any;\n// type ParseText = (text: string, options?: LoaderOptions) => Promise<any>;\n// type ParseTextSync = (text: string, options?: LoaderOptions) => any;\n// type ParseInBatches = (\n// iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n// type ParseFileInBatches = (\n// file: Blob,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n\ntype Preload = (url: string, options?: PreloadOptions) => any;\n\n/** Typescript helper to extract options type from a generic loader type */\nexport type LoaderOptionsType<T = Loader> = T extends Loader<any, any, infer Options>\n ? Options\n : never;\n/** Typescript helper to extract data type from a generic loader type */\nexport type LoaderReturnType<T = Loader> = T extends Loader<infer Return, any, any>\n ? Return\n : never;\n/** Typescript helper to extract batch type from a generic loader type */\nexport type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any> ? Batch : never;\n\n// WRITERS\n\n/** Options for writers */\nexport type WriterOptions = {\n /** worker source. If is set will be used instead of loading worker from the Internet */\n souce?: string | null;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n /** writer-specific options */\n [writerId: string]: any;\n};\n\n/**\n * A writer definition that can be used with `@loaders.gl/core` functions\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type Writer<DataT = unknown, BatchT = unknown, WriterOptionsT = WriterOptions> = {\n name: string;\n\n id: string;\n module: string;\n version: string;\n worker?: string | boolean;\n\n // TODO - are these are needed?\n extensions?: string[];\n mimeTypes?: string[];\n binary?: boolean;\n text?: boolean;\n\n options: WriterOptionsT;\n deprecatedOptions?: Record<string, string>;\n\n // encodeText?: EncodeText;\n // encode?: Encode;\n encodeSync?: EncodeSync;\n // encodeInBatches?: EncodeInBatches;\n encodeURLtoURL?: EncodeURLtoURL;\n\n encode?(data: DataT, options?: WriterOptionsT): Promise<ArrayBuffer>;\n encodeText?(table: DataT, options?: WriterOptionsT): Promise<string> | string;\n encodeInBatches?(data: AsyncIterable<any>, options?: WriterOptionsT): AsyncIterable<ArrayBuffer>;\n};\n\n// type Encode = (data: any, options?: WriterOptions) => Promise<ArrayBuffer>;\ntype EncodeSync = (data: any, options?: WriterOptions) => ArrayBuffer;\n// TODO\n// type EncodeText = Function;\n// type EncodeInBatches = Function;\ntype EncodeURLtoURL = (\n inputUrl: string,\n outputUrl: string,\n options?: WriterOptions\n) => Promise<string>;\n\n/** Typescript helper to extract the writer options type from a generic writer type */\nexport type WriterOptionsType<T = Writer> = T extends Writer<unknown, unknown, infer Options>\n ? Options\n : never;\n\n// MISC TYPES\n\nexport type TransformBatches = (\n asyncIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>\n) => AsyncIterable<ArrayBuffer>;\n\n/** Types that can be synchronously parsed */\nexport type SyncDataType = string | ArrayBuffer; // TODO File | Blob can be read synchronously...\n\n/** Types that can be parsed async */\nexport type DataType =\n | string\n | ArrayBuffer\n | File\n | Blob\n | Response\n | ReadableStream\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>;\n\n/** Types that can be parsed in batches */\nexport type BatchableDataType =\n | DataType\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>\n | Promise<AsyncIterable<ArrayBuffer>>;\n\n/**\n * A FileSystem interface can encapsulate a FileList, a ZipFile, a GoogleDrive etc.\n */\nexport interface IFileSystem {\n /**\n * Return a list of file names\n * @param dirname directory name. file system root directory if omitted\n */\n readdir(dirname?: string, options?: {recursive?: boolean}): Promise<string[]>;\n\n /**\n * Gets information from a local file from the filesystem\n * @param filename file name to stat\n * @param options currently unused\n * @throws if filename is not in local filesystem\n */\n stat(filename: string, options?: object): Promise<{size: number}>;\n\n /**\n * Fetches a local file from the filesystem (or a URL)\n * @param filename\n * @param options\n */\n fetch(filename: string, options?: object): Promise<Response>;\n}\n\ntype ReadOptions = {buffer?: ArrayBuffer; offset?: number; length?: number; position?: number};\nexport interface IRandomAccessReadFileSystem extends IFileSystem {\n open(path: string, flags: string | number, mode?: any): Promise<any>;\n close(fd: any): Promise<void>;\n fstat(fd: any): Promise<object>;\n read(fd: any, options?: ReadOptions): Promise<{bytesRead: number; buffer: Buffer}>;\n}\n"],"mappings":""}
@@ -1,4 +1,4 @@
1
- const VERSION = typeof "4.0.0-alpha.18" !== 'undefined' ? "4.0.0-alpha.18" : 'latest';
1
+ const VERSION = typeof "4.0.0-alpha.19" !== 'undefined' ? "4.0.0-alpha.19" : 'latest';
2
2
  export const JSONLoader = {
3
3
  name: 'JSON',
4
4
  id: 'json',
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["// Typed arrays\n\nexport type TypedIntArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Int32Array\n | Uint32Array;\n\nexport type TypedFloatArray = Uint16Array | Float32Array | Float64Array;\n\nexport type TypedArray = TypedIntArray | TypedFloatArray;\n\nexport type BigTypedArray = TypedArray | BigInt64Array | BigUint64Array;\n\nexport type TypedArrayConstructor =\n | Int8ArrayConstructor\n | Uint8ArrayConstructor\n | Int16ArrayConstructor\n | Uint16ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Float32ArrayConstructor\n | Float64ArrayConstructor;\n\nexport type BigTypedArrayConstructor =\n | TypedArrayConstructor\n | BigInt64ArrayConstructor\n | BigUint64ArrayConstructor;\n\n/** Any numeric array: typed array or `number[]` */\nexport type NumberArray = number[] | TypedArray;\n\nexport type NumericArray = number[] | TypedArray;\n\ntype FetchLike = (url: string, options?: RequestInit) => Promise<Response>;\n\n// LOADERS\n\n/**\n * Core Loader Options\n */\nexport type LoaderOptions = {\n /** fetch options or a custom fetch function */\n fetch?: typeof fetch | FetchLike | RequestInit | null;\n /** Do not throw on errors */\n nothrow?: boolean;\n\n /** loader selection, search first for supplied mimeType */\n mimeType?: string;\n /** loader selection, provide fallback mimeType is server does not provide */\n fallbackMimeType?: string;\n /** loader selection, avoid searching registered loaders */\n ignoreRegisteredLoaders?: boolean;\n\n // general\n /** Experimental: Supply a logger to the parser */\n log?: any;\n\n // batched parsing\n\n /** Size of each batch. `auto` matches batches to size of incoming chunks */\n batchSize?: number | 'auto';\n /** Minimal amount of time between batches */\n batchDebounceMs?: number;\n /** Stop loading after a given number of rows (compare SQL limit clause) */\n limit?: 0;\n /** Experimental: Stop loading after reaching */\n _limitMB?: 0;\n /** Generate metadata batches */\n metadata?: boolean;\n /** Transforms to run on incoming batches */\n transforms?: TransformBatches[];\n\n // workers\n\n /** CDN load workers from */\n CDN?: string | null;\n /** Set to `false` to disable workers */\n worker?: boolean;\n /** Number of concurrent workers (per loader) on desktop browser */\n maxConcurrency?: number;\n /** Number of concurrent workers (per loader) on mobile browsers */\n maxMobileConcurrency?: number;\n /** Set to `false` to prevent reuse workers */\n reuseWorkers?: boolean;\n /** Whether to use workers under Node.js (experimental) */\n _nodeWorkers?: boolean;\n /** set to 'test' to run local worker */\n _workerType?: string;\n\n /** @deprecated `options.batchType` removed, Use `options.<loader>.type` instead */\n batchType?: 'row' | 'columnar' | 'arrow';\n /** @deprecated `options.throw removed`, Use `options.nothrow` instead */\n throws?: boolean;\n /** @deprecated `options.dataType` no longer used */\n dataType?: never;\n /** @deprecated `options.uri` no longer used */\n uri?: never;\n /** @deprecated `options.method` removed. Use `options.fetch.method` */\n method?: never;\n /** @deprecated `options.headers` removed. Use `options.fetch.headers` */\n headers?: never;\n /** @deprecated `options.body` removed. Use `options.fetch.body` */\n body?: never;\n /** @deprecated `options.mode` removed. Use `options.fetch.mode` */\n mode?: never;\n /** @deprecated `options.credentials` removed. Use `options.fetch.credentials` */\n credentials?: never;\n /** @deprecated `options.cache` removed. Use `options.fetch.cache` */\n cache?: never;\n /** @deprecated `options.redirect` removed. Use `options.fetch.redirect` */\n redirect?: never;\n /** @deprecated `options.referrer` removed. Use `options.fetch.referrer` */\n referrer?: never;\n /** @deprecated `options.referrerPolicy` removed. Use `options.fetch.referrerPolicy` */\n referrerPolicy?: never;\n /** @deprecated `options.integrity` removed. Use `options.fetch.integrity` */\n integrity?: never;\n /** @deprecated `options.keepalive` removed. Use `options.fetch.keepalive` */\n keepalive?: never;\n /** @deprecated `options.signal` removed. Use `options.fetch.signal` */\n signal?: never;\n\n // Accept other keys (loader options objects, e.g. `options.csv`, `options.json` ...)\n [loaderId: string]: unknown;\n};\n\ntype PreloadOptions = {\n [key: string]: unknown;\n};\n\n/**\n * A worker loader definition that can be used with `@loaders.gl/core` functions\n */\nexport type Loader<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = {\n // Types\n dataType?: DataT;\n batchType?: BatchT;\n\n /** Default Options */\n options: LoaderOptionsT;\n /** Deprecated Options */\n deprecatedOptions?: Record<string, string | Record<string, string>>;\n\n // Worker\n name: string;\n /** id should be the same as the field used in LoaderOptions */\n id: string;\n /** module is used to generate worker threads, need to be the module directory name */\n module: string;\n /** Version should be injected by build tools */\n version: string;\n /** A boolean, or a URL */\n worker?: string | boolean;\n // end Worker\n\n /** Which category does this loader belong to */\n category?: string;\n /** What extensions does this loader generate */\n extensions: string[];\n mimeTypes: string[];\n\n binary?: boolean;\n text?: boolean;\n\n tests?: (((ArrayBuffer: ArrayBuffer) => boolean) | ArrayBuffer | string)[];\n\n // TODO - deprecated\n supported?: boolean;\n testText?: (string: string) => boolean;\n};\n\n/**\n * A \"bundled\" loader definition that can be used with `@loaders.gl/core` functions\n * If a worker loader is supported it will also be supported.\n */\nexport type LoaderWithParser<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = Loader<\n DataT,\n BatchT,\n LoaderOptionsT\n> & {\n // TODO - deprecated\n testText?: (string: string) => boolean;\n\n parse: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => Promise<DataT>;\n preload?: Preload;\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => DataT;\n parseText?: (text: string, options?: LoaderOptionsT) => Promise<DataT>;\n parseTextSync?: (text: string, options?: LoaderOptionsT) => DataT;\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n parseFileInBatches?: (\n file: Blob,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n};\n\n/**\n * A Loader context is provided as a third parameters to a loader object's\n * parse functions when that loader is called by other loaders rather then\n * directly by the application.\n *\n * - The context object allows the subloaders to be aware of the parameters and\n * options that the application provided in the top level call.\n * - The context also providedsaccess to parse functions so that the subloader\n * does not need to include the core module.\n * - In addition, the context's parse functions may also redirect loads from worker\n * threads back to main thread.\n */\nexport type LoaderContext = {\n loaders?: Loader[] | null;\n /** If URL is available. */\n url?: string;\n /** the file name component of the URL (leading path and query string removed) */\n filename?: string;\n /** the directory name component of the URL (leading path excluding file name and query string) */\n baseUrl?: string;\n /** Query string (characters after `?`) */\n queryString?: string;\n\n /** Provides access to any application overrides of fetch() */\n fetch: typeof fetch | FetchLike;\n /** TBD */\n response?: Response;\n /** Parse function. Use instead of importing `core`. In workers, may redirect to main thread */\n parse: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => Promise<any>;\n /** ParseSync function. Use instead of importing `core`. In workers, may redirect to main thread */\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => any;\n /** ParseInBatches function. Use instead of importing `core`. */\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => AsyncIterable<any> | Promise<AsyncIterable<any>>;\n};\n\n// type Parse = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => Promise<any>;\n// type ParseSync = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => any;\n// type ParseText = (text: string, options?: LoaderOptions) => Promise<any>;\n// type ParseTextSync = (text: string, options?: LoaderOptions) => any;\n// type ParseInBatches = (\n// iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n// type ParseFileInBatches = (\n// file: Blob,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n\ntype Preload = (url: string, options?: PreloadOptions) => any;\n\n/** Typescript helper to extract options type from a generic loader type */\nexport type LoaderOptionsType<T = Loader> = T extends Loader<any, any, infer Options>\n ? Options\n : never;\n/** Typescript helper to extract data type from a generic loader type */\nexport type LoaderReturnType<T = Loader> = T extends Loader<infer Return, any, any>\n ? Return\n : never;\n/** Typescript helper to extract batch type from a generic loader type */\nexport type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any> ? Batch : never;\n\n// WRITERS\n\n/** Options for writers */\nexport type WriterOptions = {\n /** worker source. If is set will be used instead of loading worker from the Internet */\n souce?: string | null;\n /** writer-specific options */\n [writerId: string]: any;\n};\n\n/**\n * A writer definition that can be used with `@loaders.gl/core` functions\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type Writer<DataT = unknown, BatchT = unknown, WriterOptionsT = WriterOptions> = {\n name: string;\n\n id: string;\n module: string;\n version: string;\n worker?: string | boolean;\n\n // TODO - are these are needed?\n extensions?: string[];\n mimeTypes?: string[];\n binary?: boolean;\n text?: boolean;\n\n options: WriterOptionsT;\n deprecatedOptions?: Record<string, string>;\n\n // encodeText?: EncodeText;\n // encode?: Encode;\n encodeSync?: EncodeSync;\n // encodeInBatches?: EncodeInBatches;\n encodeURLtoURL?: EncodeURLtoURL;\n\n encode?(data: DataT, options?: WriterOptionsT): Promise<ArrayBuffer>;\n encodeText?(table: DataT, options?: WriterOptionsT): Promise<string> | string;\n encodeInBatches?(data: AsyncIterable<any>, options?: WriterOptionsT): AsyncIterable<ArrayBuffer>;\n};\n\n// type Encode = (data: any, options?: WriterOptions) => Promise<ArrayBuffer>;\ntype EncodeSync = (data: any, options?: WriterOptions) => ArrayBuffer;\n// TODO\n// type EncodeText = Function;\n// type EncodeInBatches = Function;\ntype EncodeURLtoURL = (\n inputUrl: string,\n outputUrl: string,\n options?: WriterOptions\n) => Promise<string>;\n\n/** Typescript helper to extract the writer options type from a generic writer type */\nexport type WriterOptionsType<T = Writer> = T extends Writer<unknown, unknown, infer Options>\n ? Options\n : never;\n\n// MISC TYPES\n\nexport type TransformBatches = (\n asyncIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>\n) => AsyncIterable<ArrayBuffer>;\n\n/** Types that can be synchronously parsed */\nexport type SyncDataType = string | ArrayBuffer; // TODO File | Blob can be read synchronously...\n\n/** Types that can be parsed async */\nexport type DataType =\n | string\n | ArrayBuffer\n | File\n | Blob\n | Response\n | ReadableStream\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>;\n\n/** Types that can be parsed in batches */\nexport type BatchableDataType =\n | DataType\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>\n | Promise<AsyncIterable<ArrayBuffer>>;\n\n/**\n * A FileSystem interface can encapsulate a FileList, a ZipFile, a GoogleDrive etc.\n */\nexport interface IFileSystem {\n /**\n * Return a list of file names\n * @param dirname directory name. file system root directory if omitted\n */\n readdir(dirname?: string, options?: {recursive?: boolean}): Promise<string[]>;\n\n /**\n * Gets information from a local file from the filesystem\n * @param filename file name to stat\n * @param options currently unused\n * @throws if filename is not in local filesystem\n */\n stat(filename: string, options?: object): Promise<{size: number}>;\n\n /**\n * Fetches a local file from the filesystem (or a URL)\n * @param filename\n * @param options\n */\n fetch(filename: string, options?: object): Promise<Response>;\n}\n\ntype ReadOptions = {buffer?: ArrayBuffer; offset?: number; length?: number; position?: number};\nexport interface IRandomAccessReadFileSystem extends IFileSystem {\n open(path: string, flags: string | number, mode?: any): Promise<any>;\n close(fd: any): Promise<void>;\n fstat(fd: any): Promise<object>;\n read(fd: any, options?: ReadOptions): Promise<{bytesRead: number; buffer: Buffer}>;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":["// Typed arrays\n\nexport type TypedIntArray =\n | Int8Array\n | Uint8Array\n | Uint8ClampedArray\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Int32Array\n | Uint32Array;\n\nexport type TypedFloatArray = Uint16Array | Float32Array | Float64Array;\n\nexport type TypedArray = TypedIntArray | TypedFloatArray;\n\nexport type BigTypedArray = TypedArray | BigInt64Array | BigUint64Array;\n\nexport type TypedArrayConstructor =\n | Int8ArrayConstructor\n | Uint8ArrayConstructor\n | Int16ArrayConstructor\n | Uint16ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Float32ArrayConstructor\n | Float64ArrayConstructor;\n\nexport type BigTypedArrayConstructor =\n | TypedArrayConstructor\n | BigInt64ArrayConstructor\n | BigUint64ArrayConstructor;\n\n/** Any numeric array: typed array or `number[]` */\nexport type NumberArray = number[] | TypedArray;\n\nexport type NumericArray = number[] | TypedArray;\n\ntype FetchLike = (url: string, options?: RequestInit) => Promise<Response>;\n\n// LOADERS\n\n/**\n * Core Loader Options\n */\nexport type LoaderOptions = {\n /** fetch options or a custom fetch function */\n fetch?: typeof fetch | FetchLike | RequestInit | null;\n /** Do not throw on errors */\n nothrow?: boolean;\n\n /** loader selection, search first for supplied mimeType */\n mimeType?: string;\n /** loader selection, provide fallback mimeType is server does not provide */\n fallbackMimeType?: string;\n /** loader selection, avoid searching registered loaders */\n ignoreRegisteredLoaders?: boolean;\n\n // general\n /** Experimental: Supply a logger to the parser */\n log?: any;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n\n // batched parsing\n\n /** Size of each batch. `auto` matches batches to size of incoming chunks */\n batchSize?: number | 'auto';\n /** Minimal amount of time between batches */\n batchDebounceMs?: number;\n /** Stop loading after a given number of rows (compare SQL limit clause) */\n limit?: 0;\n /** Experimental: Stop loading after reaching */\n _limitMB?: 0;\n /** Generate metadata batches */\n metadata?: boolean;\n /** Transforms to run on incoming batches */\n transforms?: TransformBatches[];\n\n // workers\n\n /** CDN load workers from */\n CDN?: string | null;\n /** Set to `false` to disable workers */\n worker?: boolean;\n /** Number of concurrent workers (per loader) on desktop browser */\n maxConcurrency?: number;\n /** Number of concurrent workers (per loader) on mobile browsers */\n maxMobileConcurrency?: number;\n /** Set to `false` to prevent reuse workers */\n reuseWorkers?: boolean;\n /** Whether to use workers under Node.js (experimental) */\n _nodeWorkers?: boolean;\n /** set to 'test' to run local worker */\n _workerType?: string;\n\n /** @deprecated `options.batchType` removed, Use `options.<loader>.type` instead */\n batchType?: 'row' | 'columnar' | 'arrow';\n /** @deprecated `options.throw removed`, Use `options.nothrow` instead */\n throws?: boolean;\n /** @deprecated `options.dataType` no longer used */\n dataType?: never;\n /** @deprecated `options.uri` no longer used */\n uri?: never;\n /** @deprecated `options.method` removed. Use `options.fetch.method` */\n method?: never;\n /** @deprecated `options.headers` removed. Use `options.fetch.headers` */\n headers?: never;\n /** @deprecated `options.body` removed. Use `options.fetch.body` */\n body?: never;\n /** @deprecated `options.mode` removed. Use `options.fetch.mode` */\n mode?: never;\n /** @deprecated `options.credentials` removed. Use `options.fetch.credentials` */\n credentials?: never;\n /** @deprecated `options.cache` removed. Use `options.fetch.cache` */\n cache?: never;\n /** @deprecated `options.redirect` removed. Use `options.fetch.redirect` */\n redirect?: never;\n /** @deprecated `options.referrer` removed. Use `options.fetch.referrer` */\n referrer?: never;\n /** @deprecated `options.referrerPolicy` removed. Use `options.fetch.referrerPolicy` */\n referrerPolicy?: never;\n /** @deprecated `options.integrity` removed. Use `options.fetch.integrity` */\n integrity?: never;\n /** @deprecated `options.keepalive` removed. Use `options.fetch.keepalive` */\n keepalive?: never;\n /** @deprecated `options.signal` removed. Use `options.fetch.signal` */\n signal?: never;\n\n // Accept other keys (loader options objects, e.g. `options.csv`, `options.json` ...)\n [loaderId: string]: unknown;\n};\n\ntype PreloadOptions = {\n [key: string]: unknown;\n};\n\n/**\n * A worker loader definition that can be used with `@loaders.gl/core` functions\n */\nexport type Loader<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = {\n // Types\n dataType?: DataT;\n batchType?: BatchT;\n\n /** Default Options */\n options: LoaderOptionsT;\n /** Deprecated Options */\n deprecatedOptions?: Record<string, string | Record<string, string>>;\n\n // Worker\n name: string;\n /** id should be the same as the field used in LoaderOptions */\n id: string;\n /** module is used to generate worker threads, need to be the module directory name */\n module: string;\n /** Version should be injected by build tools */\n version: string;\n /** A boolean, or a URL */\n worker?: string | boolean;\n // end Worker\n\n /** Which category does this loader belong to */\n category?: string;\n /** What extensions does this loader generate */\n extensions: string[];\n mimeTypes: string[];\n\n binary?: boolean;\n text?: boolean;\n\n tests?: (((ArrayBuffer: ArrayBuffer) => boolean) | ArrayBuffer | string)[];\n\n // TODO - deprecated\n supported?: boolean;\n testText?: (string: string) => boolean;\n};\n\n/**\n * A \"bundled\" loader definition that can be used with `@loaders.gl/core` functions\n * If a worker loader is supported it will also be supported.\n */\nexport type LoaderWithParser<DataT = any, BatchT = any, LoaderOptionsT = LoaderOptions> = Loader<\n DataT,\n BatchT,\n LoaderOptionsT\n> & {\n // TODO - deprecated\n testText?: (string: string) => boolean;\n\n parse: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => Promise<DataT>;\n preload?: Preload;\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => DataT;\n parseText?: (text: string, options?: LoaderOptionsT) => Promise<DataT>;\n parseTextSync?: (text: string, options?: LoaderOptionsT) => DataT;\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n parseFileInBatches?: (\n file: Blob,\n options?: LoaderOptionsT,\n context?: LoaderContext\n ) => AsyncIterable<BatchT>;\n};\n\n/**\n * A Loader context is provided as a third parameters to a loader object's\n * parse functions when that loader is called by other loaders rather then\n * directly by the application.\n *\n * - The context object allows the subloaders to be aware of the parameters and\n * options that the application provided in the top level call.\n * - The context also providedsaccess to parse functions so that the subloader\n * does not need to include the core module.\n * - In addition, the context's parse functions may also redirect loads from worker\n * threads back to main thread.\n */\nexport type LoaderContext = {\n loaders?: Loader[] | null;\n /** If URL is available. */\n url?: string;\n /** the file name component of the URL (leading path and query string removed) */\n filename?: string;\n /** the directory name component of the URL (leading path excluding file name and query string) */\n baseUrl?: string;\n /** Query string (characters after `?`) */\n queryString?: string;\n\n /** Provides access to any application overrides of fetch() */\n fetch: typeof fetch | FetchLike;\n /** TBD */\n response?: Response;\n /** Parse function. Use instead of importing `core`. In workers, may redirect to main thread */\n parse: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => Promise<any>;\n /** ParseSync function. Use instead of importing `core`. In workers, may redirect to main thread */\n parseSync?: (\n arrayBuffer: ArrayBuffer,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => any;\n /** ParseInBatches function. Use instead of importing `core`. */\n parseInBatches?: (\n iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n ) => AsyncIterable<any> | Promise<AsyncIterable<any>>;\n};\n\n// type Parse = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => Promise<any>;\n// type ParseSync = (\n// arrayBuffer: ArrayBuffer,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => any;\n// type ParseText = (text: string, options?: LoaderOptions) => Promise<any>;\n// type ParseTextSync = (text: string, options?: LoaderOptions) => any;\n// type ParseInBatches = (\n// iterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n// type ParseFileInBatches = (\n// file: Blob,\n// options?: LoaderOptions,\n// context?: LoaderContext\n// ) => AsyncIterable<any>;\n\ntype Preload = (url: string, options?: PreloadOptions) => any;\n\n/** Typescript helper to extract options type from a generic loader type */\nexport type LoaderOptionsType<T = Loader> = T extends Loader<any, any, infer Options>\n ? Options\n : never;\n/** Typescript helper to extract data type from a generic loader type */\nexport type LoaderReturnType<T = Loader> = T extends Loader<infer Return, any, any>\n ? Return\n : never;\n/** Typescript helper to extract batch type from a generic loader type */\nexport type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any> ? Batch : never;\n\n// WRITERS\n\n/** Options for writers */\nexport type WriterOptions = {\n /** worker source. If is set will be used instead of loading worker from the Internet */\n souce?: string | null;\n /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */\n useLocalLibraries?: boolean;\n /** writer-specific options */\n [writerId: string]: any;\n};\n\n/**\n * A writer definition that can be used with `@loaders.gl/core` functions\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type Writer<DataT = unknown, BatchT = unknown, WriterOptionsT = WriterOptions> = {\n name: string;\n\n id: string;\n module: string;\n version: string;\n worker?: string | boolean;\n\n // TODO - are these are needed?\n extensions?: string[];\n mimeTypes?: string[];\n binary?: boolean;\n text?: boolean;\n\n options: WriterOptionsT;\n deprecatedOptions?: Record<string, string>;\n\n // encodeText?: EncodeText;\n // encode?: Encode;\n encodeSync?: EncodeSync;\n // encodeInBatches?: EncodeInBatches;\n encodeURLtoURL?: EncodeURLtoURL;\n\n encode?(data: DataT, options?: WriterOptionsT): Promise<ArrayBuffer>;\n encodeText?(table: DataT, options?: WriterOptionsT): Promise<string> | string;\n encodeInBatches?(data: AsyncIterable<any>, options?: WriterOptionsT): AsyncIterable<ArrayBuffer>;\n};\n\n// type Encode = (data: any, options?: WriterOptions) => Promise<ArrayBuffer>;\ntype EncodeSync = (data: any, options?: WriterOptions) => ArrayBuffer;\n// TODO\n// type EncodeText = Function;\n// type EncodeInBatches = Function;\ntype EncodeURLtoURL = (\n inputUrl: string,\n outputUrl: string,\n options?: WriterOptions\n) => Promise<string>;\n\n/** Typescript helper to extract the writer options type from a generic writer type */\nexport type WriterOptionsType<T = Writer> = T extends Writer<unknown, unknown, infer Options>\n ? Options\n : never;\n\n// MISC TYPES\n\nexport type TransformBatches = (\n asyncIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>\n) => AsyncIterable<ArrayBuffer>;\n\n/** Types that can be synchronously parsed */\nexport type SyncDataType = string | ArrayBuffer; // TODO File | Blob can be read synchronously...\n\n/** Types that can be parsed async */\nexport type DataType =\n | string\n | ArrayBuffer\n | File\n | Blob\n | Response\n | ReadableStream\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>;\n\n/** Types that can be parsed in batches */\nexport type BatchableDataType =\n | DataType\n | Iterable<ArrayBuffer>\n | AsyncIterable<ArrayBuffer>\n | Promise<AsyncIterable<ArrayBuffer>>;\n\n/**\n * A FileSystem interface can encapsulate a FileList, a ZipFile, a GoogleDrive etc.\n */\nexport interface IFileSystem {\n /**\n * Return a list of file names\n * @param dirname directory name. file system root directory if omitted\n */\n readdir(dirname?: string, options?: {recursive?: boolean}): Promise<string[]>;\n\n /**\n * Gets information from a local file from the filesystem\n * @param filename file name to stat\n * @param options currently unused\n * @throws if filename is not in local filesystem\n */\n stat(filename: string, options?: object): Promise<{size: number}>;\n\n /**\n * Fetches a local file from the filesystem (or a URL)\n * @param filename\n * @param options\n */\n fetch(filename: string, options?: object): Promise<Response>;\n}\n\ntype ReadOptions = {buffer?: ArrayBuffer; offset?: number; length?: number; position?: number};\nexport interface IRandomAccessReadFileSystem extends IFileSystem {\n open(path: string, flags: string | number, mode?: any): Promise<any>;\n close(fd: any): Promise<void>;\n fstat(fd: any): Promise<object>;\n read(fd: any, options?: ReadOptions): Promise<{bytesRead: number; buffer: Buffer}>;\n}\n"],"mappings":""}
package/dist/types.d.ts CHANGED
@@ -25,6 +25,8 @@ export type LoaderOptions = {
25
25
  ignoreRegisteredLoaders?: boolean;
26
26
  /** Experimental: Supply a logger to the parser */
27
27
  log?: any;
28
+ /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */
29
+ useLocalLibraries?: boolean;
28
30
  /** Size of each batch. `auto` matches batches to size of incoming chunks */
29
31
  batchSize?: number | 'auto';
30
32
  /** Minimal amount of time between batches */
@@ -176,6 +178,8 @@ export type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any
176
178
  export type WriterOptions = {
177
179
  /** worker source. If is set will be used instead of loading worker from the Internet */
178
180
  souce?: string | null;
181
+ /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */
182
+ useLocalLibraries?: boolean;
179
183
  /** writer-specific options */
180
184
  [writerId: string]: any;
181
185
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAEA,MAAM,MAAM,aAA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KAAK,WAAW,GAAG;IAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAC/F,MAAM,WAAW,2BAA4B,SAAQ,WAAW;IAC9D,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACrE,KAAK,CAAC,EAAE,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CACpF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/loader-utils",
3
- "version": "4.0.0-alpha.18",
3
+ "version": "4.0.0-alpha.19",
4
4
  "description": "Framework-independent loaders for 3D graphics formats",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -38,8 +38,8 @@
38
38
  "scripts": {},
39
39
  "dependencies": {
40
40
  "@babel/runtime": "^7.3.1",
41
- "@loaders.gl/worker-utils": "4.0.0-alpha.18",
41
+ "@loaders.gl/worker-utils": "4.0.0-alpha.19",
42
42
  "@probe.gl/stats": "^4.0.2"
43
43
  },
44
- "gitHead": "7bc633f46560f661bdd46cf1015ea27b3694ebce"
44
+ "gitHead": "2ca50ec4e1d312c124eb7c93c60ab6fd17ee833e"
45
45
  }
package/src/types.ts CHANGED
@@ -62,6 +62,8 @@ export type LoaderOptions = {
62
62
  // general
63
63
  /** Experimental: Supply a logger to the parser */
64
64
  log?: any;
65
+ /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */
66
+ useLocalLibraries?: boolean;
65
67
 
66
68
  // batched parsing
67
69
 
@@ -306,6 +308,8 @@ export type LoaderBatchType<T = Loader> = T extends Loader<any, infer Batch, any
306
308
  export type WriterOptions = {
307
309
  /** worker source. If is set will be used instead of loading worker from the Internet */
308
310
  souce?: string | null;
311
+ /** Force to load WASM libraries from local file system in NodeJS or from loaders.gl CDN in a web browser */
312
+ useLocalLibraries?: boolean;
309
313
  /** writer-specific options */
310
314
  [writerId: string]: any;
311
315
  };