@loaders.gl/schema 3.4.11 → 3.4.12

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.
Files changed (32) hide show
  1. package/package.json +2 -2
  2. package/dist/bundle.js +0 -5
  3. package/dist/category/common.js +0 -10
  4. package/dist/category/gis.js +0 -2
  5. package/dist/category/image/image.js +0 -2
  6. package/dist/category/mesh/convert-mesh.js +0 -40
  7. package/dist/category/mesh/deduce-mesh-schema.js +0 -62
  8. package/dist/category/mesh/mesh-to-arrow-table.js +0 -34
  9. package/dist/category/mesh/mesh-types.js +0 -2
  10. package/dist/category/mesh/mesh-utils.js +0 -51
  11. package/dist/category/table/deduce-table-schema.js +0 -106
  12. package/dist/category/table/table-types.js +0 -2
  13. package/dist/category/texture/texture.js +0 -2
  14. package/dist/index.js +0 -75
  15. package/dist/lib/arrow/arrow-like-type-utils.js +0 -27
  16. package/dist/lib/arrow/arrow-type-utils.js +0 -50
  17. package/dist/lib/arrow/get-type-info.js +0 -28
  18. package/dist/lib/batches/base-table-batch-aggregator.js +0 -58
  19. package/dist/lib/batches/columnar-table-batch-aggregator.js +0 -90
  20. package/dist/lib/batches/row-table-batch-aggregator.js +0 -79
  21. package/dist/lib/batches/table-batch-aggregator.js +0 -2
  22. package/dist/lib/batches/table-batch-builder.js +0 -153
  23. package/dist/lib/schema/impl/enum.js +0 -97
  24. package/dist/lib/schema/impl/field.js +0 -32
  25. package/dist/lib/schema/impl/schema.js +0 -83
  26. package/dist/lib/schema/impl/type.js +0 -462
  27. package/dist/lib/schema/schema.js +0 -90
  28. package/dist/lib/schema-utils/deduce-column-type.js +0 -92
  29. package/dist/lib/utils/assert.js +0 -12
  30. package/dist/lib/utils/async-queue.js +0 -92
  31. package/dist/lib/utils/row-utils.js +0 -33
  32. package/dist/types.js +0 -2
@@ -1,92 +0,0 @@
1
- "use strict";
2
- // From https://github.com/rauschma/async-iter-demo/tree/master/src under MIT license
3
- // http://2ality.com/2016/10/asynchronous-iteration.html
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.takeAsync = void 0;
6
- class ArrayQueue extends Array {
7
- enqueue(value) {
8
- // Add at the end
9
- return this.push(value);
10
- }
11
- dequeue() {
12
- // Remove first element
13
- return this.shift();
14
- }
15
- }
16
- class AsyncQueue {
17
- constructor() {
18
- // enqueues > dequeues
19
- this._values = new ArrayQueue();
20
- // dequeues > enqueues
21
- this._settlers = new ArrayQueue();
22
- this._closed = false;
23
- }
24
- close() {
25
- while (this._settlers.length > 0) {
26
- this._settlers.dequeue().resolve({ done: true });
27
- }
28
- this._closed = true;
29
- }
30
- [Symbol.asyncIterator]() {
31
- return this;
32
- }
33
- enqueue(value) {
34
- if (this._closed) {
35
- throw new Error('Closed');
36
- }
37
- if (this._settlers.length > 0) {
38
- if (this._values.length > 0) {
39
- throw new Error('Illegal internal state');
40
- }
41
- const settler = this._settlers.dequeue();
42
- if (value instanceof Error) {
43
- settler.reject(value);
44
- }
45
- else {
46
- settler.resolve({ value });
47
- }
48
- }
49
- else {
50
- this._values.enqueue(value);
51
- }
52
- }
53
- /**
54
- * @returns a Promise for an IteratorResult
55
- */
56
- next() {
57
- if (this._values.length > 0) {
58
- const value = this._values.dequeue();
59
- if (value instanceof Error) {
60
- return Promise.reject(value);
61
- }
62
- return Promise.resolve({ value });
63
- }
64
- if (this._closed) {
65
- if (this._settlers.length > 0) {
66
- throw new Error('Illegal internal state');
67
- }
68
- return Promise.resolve({ done: true });
69
- }
70
- // Wait for new values to be enqueued
71
- return new Promise((resolve, reject) => {
72
- this._settlers.enqueue({ resolve, reject });
73
- });
74
- }
75
- }
76
- exports.default = AsyncQueue;
77
- /**
78
- * @returns a Promise for an Array with the elements in `asyncIterable`
79
- */
80
- async function takeAsync(asyncIterable, count = Infinity) {
81
- const result = [];
82
- const iterator = asyncIterable[Symbol.asyncIterator]();
83
- while (result.length < count) {
84
- const { value, done } = await iterator.next();
85
- if (done) {
86
- break;
87
- }
88
- result.push(value);
89
- }
90
- return result;
91
- }
92
- exports.takeAsync = takeAsync;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.convertToArrayRow = exports.convertToObjectRow = void 0;
4
- /** Convert an object row to an array row */
5
- function convertToObjectRow(arrayRow, headers) {
6
- if (!arrayRow) {
7
- throw new Error('null row');
8
- }
9
- if (!headers) {
10
- throw new Error('no headers');
11
- }
12
- const objectRow = {};
13
- for (let i = 0; i < headers.length; i++) {
14
- objectRow[headers[i]] = arrayRow[i];
15
- }
16
- return objectRow;
17
- }
18
- exports.convertToObjectRow = convertToObjectRow;
19
- /** Convert an object row to an array row */
20
- function convertToArrayRow(objectRow, headers) {
21
- if (!objectRow) {
22
- throw new Error('null row');
23
- }
24
- if (!headers) {
25
- throw new Error('no headers');
26
- }
27
- const arrayRow = new Array(headers.length);
28
- for (let i = 0; i < headers.length; i++) {
29
- arrayRow[i] = objectRow[headers[i]];
30
- }
31
- return arrayRow;
32
- }
33
- exports.convertToArrayRow = convertToArrayRow;
package/dist/types.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });