@loaders.gl/json 4.0.4 → 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist.dev.js +3 -3
- package/dist/geojson-loader.js +1 -1
- package/dist/geojson-loader.js.map +1 -1
- package/dist/geojson-worker.js +1 -1
- package/dist/json-loader.js +1 -1
- package/dist/json-loader.js.map +1 -1
- package/dist/ndgeoson-loader.js +1 -1
- package/dist/ndgeoson-loader.js.map +1 -1
- package/dist/ndjson-loader.js +1 -1
- package/dist/ndjson-loader.js.map +1 -1
- package/package.json +5 -5
package/dist/dist.dev.js
CHANGED
|
@@ -1682,7 +1682,7 @@ Char: ${this.c}`;
|
|
|
1682
1682
|
}
|
|
1683
1683
|
|
|
1684
1684
|
// src/json-loader.ts
|
|
1685
|
-
var VERSION =
|
|
1685
|
+
var VERSION = true ? "4.0.6" : "latest";
|
|
1686
1686
|
var DEFAULT_JSON_LOADER_OPTIONS = {
|
|
1687
1687
|
json: {
|
|
1688
1688
|
shape: "object-row-table",
|
|
@@ -1775,7 +1775,7 @@ Char: ${this.c}`;
|
|
|
1775
1775
|
}
|
|
1776
1776
|
|
|
1777
1777
|
// src/ndjson-loader.ts
|
|
1778
|
-
var VERSION2 =
|
|
1778
|
+
var VERSION2 = true ? "4.0.6" : "latest";
|
|
1779
1779
|
var NDJSONLoader = {
|
|
1780
1780
|
name: "NDJSON",
|
|
1781
1781
|
id: "ndjson",
|
|
@@ -2844,7 +2844,7 @@ Char: ${this.c}`;
|
|
|
2844
2844
|
}
|
|
2845
2845
|
|
|
2846
2846
|
// src/geojson-loader.ts
|
|
2847
|
-
var VERSION3 =
|
|
2847
|
+
var VERSION3 = true ? "4.0.6" : "latest";
|
|
2848
2848
|
var GeoJSONWorkerLoader = {
|
|
2849
2849
|
name: "GeoJSON",
|
|
2850
2850
|
id: "geojson",
|
package/dist/geojson-loader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { geojsonToBinary } from '@loaders.gl/gis';
|
|
2
2
|
import { parseJSONInBatches } from "./lib/parsers/parse-json-in-batches.js";
|
|
3
|
-
const VERSION = typeof
|
|
3
|
+
const VERSION = typeof "4.0.6" !== 'undefined' ? "4.0.6" : 'latest';
|
|
4
4
|
export const GeoJSONWorkerLoader = {
|
|
5
5
|
name: 'GeoJSON',
|
|
6
6
|
id: 'geojson',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geojson-loader.js","names":["geojsonToBinary","parseJSONInBatches","VERSION","
|
|
1
|
+
{"version":3,"file":"geojson-loader.js","names":["geojsonToBinary","parseJSONInBatches","VERSION","GeoJSONWorkerLoader","name","id","module","version","worker","extensions","mimeTypes","category","text","options","geojson","shape","json","jsonpaths","gis","format","GeoJSONLoader","parse","parseTextSync","parseInBatches","arrayBuffer","TextDecoder","decode","_geojson","JSON","table","type","features","asyncIterator","geojsonIterator","makeBinaryGeometryIterator","batch","data"],"sources":["../src/geojson-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {Loader, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {GeoJSON, GeoJSONTable, TableBatch} from '@loaders.gl/schema';\nimport type {JSONLoaderOptions} from './json-loader';\nimport {geojsonToBinary} from '@loaders.gl/gis';\n// import {parseJSONSync} from './lib/parsers/parse-json';\nimport {parseJSONInBatches} from './lib/parsers/parse-json-in-batches';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport type GeoJSONLoaderOptions = JSONLoaderOptions & {\n geojson?: {\n shape?: 'object-row-table';\n };\n gis?: {\n format?: 'geojson' | 'binary';\n };\n};\n\n/**\n * GeoJSON loader\n */\nexport const GeoJSONWorkerLoader: Loader<GeoJSON, TableBatch, GeoJSONLoaderOptions> = {\n name: 'GeoJSON',\n id: 'geojson',\n module: 'geojson',\n version: VERSION,\n worker: true,\n extensions: ['geojson'],\n mimeTypes: ['application/geo+json'],\n category: 'geometry',\n text: true,\n options: {\n geojson: {\n shape: 'object-row-table'\n },\n json: {\n shape: 'object-row-table',\n jsonpaths: ['$', '$.features']\n },\n gis: {\n format: 'geojson'\n }\n }\n};\n\nexport const GeoJSONLoader: LoaderWithParser<GeoJSON, TableBatch, GeoJSONLoaderOptions> = {\n ...GeoJSONWorkerLoader,\n // @ts-expect-error\n parse,\n // @ts-expect-error\n parseTextSync,\n parseInBatches\n};\n\nasync function parse(arrayBuffer: ArrayBuffer, options?: GeoJSONLoaderOptions) {\n return parseTextSync(new TextDecoder().decode(arrayBuffer), options);\n}\n\nfunction parseTextSync(text: string, options?: GeoJSONLoaderOptions) {\n // Apps can call the parse method directly, we so apply default options here\n options = {...GeoJSONLoader.options, ...options};\n options.geojson = {...GeoJSONLoader.options.geojson, ...options.geojson};\n options.gis = options.gis || {};\n\n let geojson;\n try {\n geojson = JSON.parse(text);\n } catch {\n geojson = {};\n }\n\n const table: GeoJSONTable = {\n shape: 'geojson-table',\n // TODO - deduce schema from geojson\n // TODO check that parsed data is of type FeatureCollection\n type: 'FeatureCollection',\n features: geojson?.features || []\n };\n\n switch (options.gis.format) {\n case 'binary':\n return geojsonToBinary(table.features);\n default:\n return table;\n }\n}\n\nfunction parseInBatches(asyncIterator, options): AsyncIterable<TableBatch> {\n // Apps can call the parse method directly, we so apply default options here\n options = {...GeoJSONLoader.options, ...options};\n options.json = {...GeoJSONLoader.options.geojson, ...options.geojson};\n\n const geojsonIterator = parseJSONInBatches(asyncIterator, options);\n\n switch (options.gis.format) {\n case 'binary':\n return makeBinaryGeometryIterator(geojsonIterator);\n default:\n return geojsonIterator;\n }\n}\n\nasync function* makeBinaryGeometryIterator(geojsonIterator) {\n for await (const batch of geojsonIterator) {\n batch.data = geojsonToBinary(batch.data);\n yield batch;\n }\n}\n"],"mappings":"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"}
|
package/dist/geojson-worker.js
CHANGED
package/dist/json-loader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseJSONSync } from "./lib/parsers/parse-json.js";
|
|
2
2
|
import { parseJSONInBatches } from "./lib/parsers/parse-json-in-batches.js";
|
|
3
|
-
const VERSION = typeof
|
|
3
|
+
const VERSION = typeof "4.0.6" !== 'undefined' ? "4.0.6" : 'latest';
|
|
4
4
|
const DEFAULT_JSON_LOADER_OPTIONS = {
|
|
5
5
|
json: {
|
|
6
6
|
shape: 'object-row-table',
|
package/dist/json-loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-loader.js","names":["parseJSONSync","parseJSONInBatches","VERSION","
|
|
1
|
+
{"version":3,"file":"json-loader.js","names":["parseJSONSync","parseJSONInBatches","VERSION","DEFAULT_JSON_LOADER_OPTIONS","json","shape","table","jsonpaths","JSONLoader","name","id","module","version","extensions","mimeTypes","category","text","parse","parseTextSync","parseInBatches","options","arrayBuffer","TextDecoder","decode","jsonOptions","asyncIterator"],"sources":["../src/json-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {Table, TableBatch} from '@loaders.gl/schema';\nimport type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {parseJSONSync} from './lib/parsers/parse-json';\nimport {parseJSONInBatches} from './lib/parsers/parse-json-in-batches';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\ntype ParseJSONOptions = {\n shape: 'object-row-table'; // TODO - 'auto'?\n table?: boolean;\n jsonpaths?: string[];\n};\n\n/**\n * @param table -\n * @param jsonpaths -\n */\nexport type JSONLoaderOptions = LoaderOptions & {\n json?: ParseJSONOptions;\n};\n\nconst DEFAULT_JSON_LOADER_OPTIONS: {json: Required<ParseJSONOptions>} = {\n json: {\n shape: 'object-row-table',\n table: false,\n jsonpaths: []\n // batchSize: 'auto'\n }\n};\n\nexport const JSONLoader: LoaderWithParser<Table, TableBatch, JSONLoaderOptions> = {\n name: 'JSON',\n id: 'json',\n module: 'json',\n version: VERSION,\n extensions: ['json', 'geojson'],\n mimeTypes: ['application/json'],\n category: 'table',\n text: true,\n parse,\n parseTextSync,\n parseInBatches,\n options: DEFAULT_JSON_LOADER_OPTIONS\n};\n\nasync function parse(arrayBuffer: ArrayBuffer, options?: JSONLoaderOptions) {\n return parseTextSync(new TextDecoder().decode(arrayBuffer), options);\n}\n\nfunction parseTextSync(text: string, options?: JSONLoaderOptions) {\n const jsonOptions = {...options, json: {...DEFAULT_JSON_LOADER_OPTIONS.json, ...options?.json}};\n return parseJSONSync(text, jsonOptions as JSONLoaderOptions);\n}\n\nfunction parseInBatches(\n asyncIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>,\n options?: JSONLoaderOptions\n): AsyncIterable<TableBatch> {\n const jsonOptions = {...options, json: {...DEFAULT_JSON_LOADER_OPTIONS.json, ...options?.json}};\n return parseJSONInBatches(asyncIterator, jsonOptions as JSONLoaderOptions);\n}\n"],"mappings":"SAKQA,aAAa;AAAA,SACbC,kBAAkB;AAI1B,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAgB3E,MAAMC,2BAA+D,GAAG;EACtEC,IAAI,EAAE;IACJC,KAAK,EAAE,kBAAkB;IACzBC,KAAK,EAAE,KAAK;IACZC,SAAS,EAAE;EAEb;AACF,CAAC;AAED,OAAO,MAAMC,UAAkE,GAAG;EAChFC,IAAI,EAAE,MAAM;EACZC,EAAE,EAAE,MAAM;EACVC,MAAM,EAAE,MAAM;EACdC,OAAO,EAAEV,OAAO;EAChBW,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;EAC/BC,SAAS,EAAE,CAAC,kBAAkB,CAAC;EAC/BC,QAAQ,EAAE,OAAO;EACjBC,IAAI,EAAE,IAAI;EACVC,KAAK;EACLC,aAAa;EACbC,cAAc;EACdC,OAAO,EAAEjB;AACX,CAAC;AAED,eAAec,KAAKA,CAACI,WAAwB,EAAED,OAA2B,EAAE;EAC1E,OAAOF,aAAa,CAAC,IAAII,WAAW,CAAC,CAAC,CAACC,MAAM,CAACF,WAAW,CAAC,EAAED,OAAO,CAAC;AACtE;AAEA,SAASF,aAAaA,CAACF,IAAY,EAAEI,OAA2B,EAAE;EAChE,MAAMI,WAAW,GAAG;IAAC,GAAGJ,OAAO;IAAEhB,IAAI,EAAE;MAAC,GAAGD,2BAA2B,CAACC,IAAI;MAAE,IAAGgB,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEhB,IAAI;IAAA;EAAC,CAAC;EAC/F,OAAOJ,aAAa,CAACgB,IAAI,EAAEQ,WAAgC,CAAC;AAC9D;AAEA,SAASL,cAAcA,CACrBM,aAAiE,EACjEL,OAA2B,EACA;EAC3B,MAAMI,WAAW,GAAG;IAAC,GAAGJ,OAAO;IAAEhB,IAAI,EAAE;MAAC,GAAGD,2BAA2B,CAACC,IAAI;MAAE,IAAGgB,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEhB,IAAI;IAAA;EAAC,CAAC;EAC/F,OAAOH,kBAAkB,CAACwB,aAAa,EAAED,WAAgC,CAAC;AAC5E"}
|
package/dist/ndgeoson-loader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseNDJSONSync } from "./lib/parsers/parse-ndjson.js";
|
|
2
2
|
import { parseNDJSONInBatches } from "./lib/parsers/parse-ndjson-in-batches.js";
|
|
3
|
-
const VERSION = typeof
|
|
3
|
+
const VERSION = typeof "4.0.6" !== 'undefined' ? "4.0.6" : 'latest';
|
|
4
4
|
export const NDJSONLoader = {
|
|
5
5
|
name: 'NDJSON',
|
|
6
6
|
id: 'ndjson',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ndgeoson-loader.js","names":["parseNDJSONSync","parseNDJSONInBatches","VERSION","
|
|
1
|
+
{"version":3,"file":"ndgeoson-loader.js","names":["parseNDJSONSync","parseNDJSONInBatches","VERSION","NDJSONLoader","name","id","module","version","extensions","mimeTypes","category","text","parse","arrayBuffer","TextDecoder","decode","parseTextSync","parseInBatches","options","geojson","shape","gis","format"],"sources":["../src/ndgeoson-loader.ts"],"sourcesContent":["import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {parseNDJSONSync} from './lib/parsers/parse-ndjson';\nimport {parseNDJSONInBatches} from './lib/parsers/parse-ndjson-in-batches';\nimport {ArrayRowTable, ObjectRowTable, Batch} from '@loaders.gl/schema';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/** Options for NDGeoJSONLoader */\nexport type NDGeoJSONLoaderOptions = LoaderOptions & {\n geojson?: {\n shape?: 'object-row-table';\n };\n gis?: {\n format: 'geojson';\n };\n};\n\n/** NDGeoJSONLoader */\nexport const NDJSONLoader: LoaderWithParser<\n ArrayRowTable | ObjectRowTable,\n Batch,\n NDGeoJSONLoaderOptions\n> = {\n name: 'NDJSON',\n id: 'ndjson',\n module: 'json',\n version: VERSION,\n extensions: ['ndjson', 'ndgeojson'],\n mimeTypes: [\n 'application/geo+x-ndjson',\n 'application/geo+x-ldjson',\n 'application/jsonlines', // https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html#cm-batch\n 'application/geo+json-seq',\n 'application/x-ndjson'\n ],\n category: 'table',\n text: true,\n parse: async (arrayBuffer: ArrayBuffer) => parseNDJSONSync(new TextDecoder().decode(arrayBuffer)),\n parseTextSync: parseNDJSONSync,\n parseInBatches: parseNDJSONInBatches,\n options: {\n geojson: {\n shape: 'object-row-table'\n },\n gis: {\n format: 'geojson'\n }\n }\n};\n"],"mappings":"SACQA,eAAe;AAAA,SACfC,oBAAoB;AAK5B,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAa3E,OAAO,MAAMC,YAIZ,GAAG;EACFC,IAAI,EAAE,QAAQ;EACdC,EAAE,EAAE,QAAQ;EACZC,MAAM,EAAE,MAAM;EACdC,OAAO,EAAEL,OAAO;EAChBM,UAAU,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;EACnCC,SAAS,EAAE,CACT,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,CACvB;EACDC,QAAQ,EAAE,OAAO;EACjBC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE,MAAOC,WAAwB,IAAKb,eAAe,CAAC,IAAIc,WAAW,CAAC,CAAC,CAACC,MAAM,CAACF,WAAW,CAAC,CAAC;EACjGG,aAAa,EAAEhB,eAAe;EAC9BiB,cAAc,EAAEhB,oBAAoB;EACpCiB,OAAO,EAAE;IACPC,OAAO,EAAE;MACPC,KAAK,EAAE;IACT,CAAC;IACDC,GAAG,EAAE;MACHC,MAAM,EAAE;IACV;EACF;AACF,CAAC"}
|
package/dist/ndjson-loader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseNDJSONSync } from "./lib/parsers/parse-ndjson.js";
|
|
2
2
|
import { parseNDJSONInBatches } from "./lib/parsers/parse-ndjson-in-batches.js";
|
|
3
|
-
const VERSION = typeof
|
|
3
|
+
const VERSION = typeof "4.0.6" !== 'undefined' ? "4.0.6" : 'latest';
|
|
4
4
|
export const NDJSONLoader = {
|
|
5
5
|
name: 'NDJSON',
|
|
6
6
|
id: 'ndjson',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ndjson-loader.js","names":["parseNDJSONSync","parseNDJSONInBatches","VERSION","
|
|
1
|
+
{"version":3,"file":"ndjson-loader.js","names":["parseNDJSONSync","parseNDJSONInBatches","VERSION","NDJSONLoader","name","id","module","version","extensions","mimeTypes","category","text","parse","arrayBuffer","TextDecoder","decode","parseTextSync","parseInBatches","options"],"sources":["../src/ndjson-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {ObjectRowTable, ArrayRowTable, TableBatch} from '@loaders.gl/schema';\nimport {parseNDJSONSync} from './lib/parsers/parse-ndjson';\nimport {parseNDJSONInBatches} from './lib/parsers/parse-ndjson-in-batches';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nexport const NDJSONLoader: LoaderWithParser<\n ObjectRowTable | ArrayRowTable,\n TableBatch,\n LoaderOptions\n> = {\n name: 'NDJSON',\n id: 'ndjson',\n module: 'json',\n version: VERSION,\n extensions: ['ndjson', 'jsonl'],\n mimeTypes: [\n 'application/x-ndjson',\n 'application/jsonlines', // https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html#cm-batch\n 'application/json-seq'\n ],\n category: 'table',\n text: true,\n parse: async (arrayBuffer: ArrayBuffer) => parseNDJSONSync(new TextDecoder().decode(arrayBuffer)),\n parseTextSync: parseNDJSONSync,\n parseInBatches: parseNDJSONInBatches,\n options: {}\n};\n"],"mappings":"SAKQA,eAAe;AAAA,SACfC,oBAAoB;AAI5B,MAAMC,OAAO,GAAG,cAAkB,KAAK,WAAW,aAAiB,QAAQ;AAE3E,OAAO,MAAMC,YAIZ,GAAG;EACFC,IAAI,EAAE,QAAQ;EACdC,EAAE,EAAE,QAAQ;EACZC,MAAM,EAAE,MAAM;EACdC,OAAO,EAAEL,OAAO;EAChBM,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;EAC/BC,SAAS,EAAE,CACT,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,CACvB;EACDC,QAAQ,EAAE,OAAO;EACjBC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE,MAAOC,WAAwB,IAAKb,eAAe,CAAC,IAAIc,WAAW,CAAC,CAAC,CAACC,MAAM,CAACF,WAAW,CAAC,CAAC;EACjGG,aAAa,EAAEhB,eAAe;EAC9BiB,cAAc,EAAEhB,oBAAoB;EACpCiB,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/json",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"description": "Framework-independent loader for JSON and streaming JSON formats",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"build-worker": "esbuild src/workers/geojson-worker.ts --bundle --outfile=dist/geojson-worker.js --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@loaders.gl/gis": "4.0.
|
|
47
|
-
"@loaders.gl/loader-utils": "4.0.
|
|
48
|
-
"@loaders.gl/schema": "4.0.
|
|
46
|
+
"@loaders.gl/gis": "4.0.6",
|
|
47
|
+
"@loaders.gl/loader-utils": "4.0.6",
|
|
48
|
+
"@loaders.gl/schema": "4.0.6"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "1582e06e4ac81b61091148f3d872f67478fe7511"
|
|
51
51
|
}
|