@loaders.gl/parquet 5.0.0-alpha.7 → 5.0.0-alpha.8
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/delta-source-loader-types.js +1 -1
- package/dist/delta-source.js +1 -1
- package/dist/geoparquet-loader.js +1 -1
- package/dist/iceberg-rest-catalog.js +1 -1
- package/dist/iceberg-rest-catalog.js.map +1 -1
- package/dist/index.cjs +261 -81
- package/dist/index.cjs.map +3 -3
- package/dist/lib/constants.js +1 -1
- package/dist/parquet-dataset-source.cjs +257 -77
- package/dist/parquet-dataset-source.cjs.map +3 -3
- package/dist/parquet-js-loader-types.js +1 -1
- package/dist/parquet-js-writer.js +1 -1
- package/dist/parquet-loader-base.js +1 -1
- package/dist/parquet-source-loader-types.js +1 -1
- package/dist/parquet-source-loader.cjs +257 -77
- package/dist/parquet-source-loader.cjs.map +3 -3
- package/dist/parquet-source-worker.js +20 -95
- package/dist/parquet-source-worker.js.map +4 -4
- package/dist/parquet-worker-node.cjs +24373 -17868
- package/dist/parquet-worker-node.cjs.map +4 -4
- package/dist/parquet-worker.js +5 -1
- package/dist/parquet-worker.js.map +2 -2
- package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
- package/dist/parquetjs/codecs/rle.js +15 -6
- package/dist/parquetjs/codecs/rle.js.map +1 -1
- package/package.json +13 -18
- package/src/iceberg-rest-catalog.ts +1 -1
- package/src/parquetjs/codecs/rle.ts +17 -6
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { DeltaFormat } from "./delta-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-alpha.
|
|
7
|
+
const VERSION = typeof "5.0.0-alpha.8" !== 'undefined' ? "5.0.0-alpha.8" : 'latest';
|
|
8
8
|
/** Loads the parser-bearing Delta source implementation on demand. */
|
|
9
9
|
async function preloadDeltaSourceLoader() {
|
|
10
10
|
const { DeltaSourceLoaderWithParser } = await import('@loaders.gl/parquet/delta-source');
|
package/dist/delta-source.js
CHANGED
|
@@ -7,7 +7,7 @@ import { PARQUET_TABLE_QUERY_CAPABILITIES } from "./parquet-source-capabilities.
|
|
|
7
7
|
import { DeltaFormat } from "./delta-format.js";
|
|
8
8
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
9
9
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
10
|
-
const VERSION = typeof "5.0.0-alpha.
|
|
10
|
+
const VERSION = typeof "5.0.0-alpha.8" !== 'undefined' ? "5.0.0-alpha.8" : 'latest';
|
|
11
11
|
/** Lightweight Delta Lake snapshot source backed by a newline-delimited commit log. */
|
|
12
12
|
export class DeltaTableSource extends DataSource {
|
|
13
13
|
actionsPromises = new Map();
|
|
@@ -5,7 +5,7 @@ import { ParquetFormat } from "./parquet-format.js";
|
|
|
5
5
|
import { PARQUET_LOADER_DEFAULT_OPTIONS } from "./parquet-loader-options.js";
|
|
6
6
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
7
7
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
8
|
-
const VERSION = typeof "5.0.0-alpha.
|
|
8
|
+
const VERSION = typeof "5.0.0-alpha.8" !== 'undefined' ? "5.0.0-alpha.8" : 'latest';
|
|
9
9
|
/** Preloads the parser-bearing GeoParquet loader implementation. */
|
|
10
10
|
async function preloadGeoParquetLoader() {
|
|
11
11
|
const { GeoParquetLoaderWithParser } = await import("./geoparquet-loader-with-parser.js");
|
|
@@ -58,7 +58,7 @@ export class IcebergRestCatalog {
|
|
|
58
58
|
getSourceOptions() {
|
|
59
59
|
const options = { iceberg: { headers: this.options.headers } };
|
|
60
60
|
if (this.options.fetch) {
|
|
61
|
-
options.core = {
|
|
61
|
+
options.core = { fetch: this.options.fetch };
|
|
62
62
|
}
|
|
63
63
|
return options;
|
|
64
64
|
}
|
|
@@ -1 +1 @@
|
|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quet_loader_base = __esm({
|
|
|
73
73
|
"use strict";
|
|
74
74
|
init_parquet_format();
|
|
75
75
|
init_parquet_loader_options();
|
|
76
|
-
VERSION = true ? "5.0.0-alpha.
|
|
76
|
+
VERSION = true ? "5.0.0-alpha.8" : "latest";
|
|
77
77
|
PARQUET_LOADER_BASE = {
|
|
78
78
|
...ParquetFormat,
|
|
79
79
|
dataType: null,
|
|
@@ -1120,13 +1120,17 @@ var init_src = __esm({
|
|
|
1120
1120
|
|
|
1121
1121
|
// ../loader-utils/src/lib/worker-loader-utils/parse-with-worker.ts
|
|
1122
1122
|
function canParseWithWorker(loader, options) {
|
|
1123
|
-
var _a;
|
|
1123
|
+
var _a, _b, _c;
|
|
1124
|
+
if ((_b = (_a = options == null ? void 0 : options.core) == null ? void 0 : _a.credentials) == null ? void 0 : _b.some(
|
|
1125
|
+
(credential) => credential.type === "request" || "token" in credential && typeof credential.token === "function"
|
|
1126
|
+
))
|
|
1127
|
+
return false;
|
|
1124
1128
|
const workerOptions = getWorkerOptions(options);
|
|
1125
1129
|
const nodeWorkers = workerOptions._nodeWorkers;
|
|
1126
1130
|
if (!isBrowser2 && !nodeWorkers) {
|
|
1127
1131
|
return false;
|
|
1128
1132
|
}
|
|
1129
|
-
if (loader.id === "las" && (((
|
|
1133
|
+
if (loader.id === "las" && (((_c = options == null ? void 0 : options.las) == null ? void 0 : _c.shape) ?? "arrow-table") === "arrow-table") {
|
|
1130
1134
|
return false;
|
|
1131
1135
|
}
|
|
1132
1136
|
if (loader.id === "csv" && !shouldParseCSVWithWorker(options)) {
|
|
@@ -1173,7 +1177,12 @@ function callParseOnMainThread(parseOnMainThread, input, options, context) {
|
|
|
1173
1177
|
return parseOnMainThread(input, void 0, options, context);
|
|
1174
1178
|
}
|
|
1175
1179
|
function getWorkerOptions(options = {}, loader) {
|
|
1176
|
-
const serializedOptions = JSON.parse(
|
|
1180
|
+
const serializedOptions = JSON.parse(
|
|
1181
|
+
JSON.stringify({
|
|
1182
|
+
...options,
|
|
1183
|
+
...options.core ? { core: { ...options.core, authentications: void 0 } } : {}
|
|
1184
|
+
})
|
|
1185
|
+
);
|
|
1177
1186
|
const workerOptions = {
|
|
1178
1187
|
...serializedOptions.core,
|
|
1179
1188
|
...serializedOptions
|
|
@@ -1262,6 +1271,48 @@ var init_async_iteration = __esm({
|
|
|
1262
1271
|
}
|
|
1263
1272
|
});
|
|
1264
1273
|
|
|
1274
|
+
// ../loader-utils/src/lib/request-utils/authentication.ts
|
|
1275
|
+
function resolveCredentials(credentials, authentications = []) {
|
|
1276
|
+
if (credentials.every(isAuthentication)) return credentials;
|
|
1277
|
+
return credentials.map((credential, index) => {
|
|
1278
|
+
if (isAuthentication(credential)) return credential;
|
|
1279
|
+
const AuthenticationClass = authentications.find(
|
|
1280
|
+
(authentication2) => authentication2.type === (credential == null ? void 0 : credential.type)
|
|
1281
|
+
);
|
|
1282
|
+
if (!AuthenticationClass) {
|
|
1283
|
+
throw new Error(`No authentication class registered for credential at index ${index}.`);
|
|
1284
|
+
}
|
|
1285
|
+
let authentication;
|
|
1286
|
+
try {
|
|
1287
|
+
authentication = new AuthenticationClass(credential);
|
|
1288
|
+
} catch {
|
|
1289
|
+
throw new Error(`Invalid authentication configuration at index ${index}.`);
|
|
1290
|
+
}
|
|
1291
|
+
if (!isAuthentication(authentication)) {
|
|
1292
|
+
throw new Error(`Authentication class returned an invalid credential at index ${index}.`);
|
|
1293
|
+
}
|
|
1294
|
+
return authentication;
|
|
1295
|
+
});
|
|
1296
|
+
}
|
|
1297
|
+
function resolveAuthenticationOptions(options) {
|
|
1298
|
+
var _a, _b;
|
|
1299
|
+
if (!((_b = (_a = options.core) == null ? void 0 : _a.credentials) == null ? void 0 : _b.length)) return options;
|
|
1300
|
+
const credentials = resolveCredentials(options.core.credentials, options.core.authentications);
|
|
1301
|
+
if (credentials === options.core.credentials) return options;
|
|
1302
|
+
return { ...options, core: { ...options.core, credentials } };
|
|
1303
|
+
}
|
|
1304
|
+
function isAuthentication(credential) {
|
|
1305
|
+
if (!credential || typeof credential !== "object") return false;
|
|
1306
|
+
if (typeof credential.id !== "string" || !Array.isArray(credential.origins)) return false;
|
|
1307
|
+
if (credential.type === "request") return typeof credential.authenticate === "function";
|
|
1308
|
+
return (credential.type === "header" || credential.type === "query-parameter") && typeof credential.name === "string" && (typeof credential.token === "string" || typeof credential.token === "function") && Array.isArray(credential.refreshStatusCodes);
|
|
1309
|
+
}
|
|
1310
|
+
var init_authentication = __esm({
|
|
1311
|
+
"../loader-utils/src/lib/request-utils/authentication.ts"() {
|
|
1312
|
+
"use strict";
|
|
1313
|
+
}
|
|
1314
|
+
});
|
|
1315
|
+
|
|
1265
1316
|
// ../loader-utils/src/lib/request-utils/request-cache.ts
|
|
1266
1317
|
function createAbortError3() {
|
|
1267
1318
|
const error = new Error("Request aborted");
|
|
@@ -1496,21 +1547,54 @@ var init_request_cache = __esm({
|
|
|
1496
1547
|
|
|
1497
1548
|
// ../loader-utils/src/lib/request-utils/request-credentials.ts
|
|
1498
1549
|
function createAuthenticatedFetch(options) {
|
|
1499
|
-
const
|
|
1500
|
-
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1550
|
+
const suppliedFetch = options.fetch || ((url, requestOptions) => fetch(url, requestOptions));
|
|
1551
|
+
const existingMetadata = suppliedFetch[AUTHENTICATED_FETCH];
|
|
1552
|
+
const credentialResolutions = new Map(existingMetadata == null ? void 0 : existingMetadata.credentialResolutions);
|
|
1553
|
+
const resolvedCredentials = resolveCredentials(
|
|
1554
|
+
options.credentials.map((credential) => credentialResolutions.get(credential) || credential),
|
|
1555
|
+
options.authentications
|
|
1556
|
+
);
|
|
1557
|
+
options.credentials.forEach((credential, index) => {
|
|
1558
|
+
credentialResolutions.set(credential, resolvedCredentials[index]);
|
|
1559
|
+
});
|
|
1560
|
+
if (!options.fetchOptions && (!resolvedCredentials.length || (existingMetadata == null ? void 0 : existingMetadata.credentials.length) === resolvedCredentials.length && resolvedCredentials.every(
|
|
1561
|
+
(credential, index) => credential === existingMetadata.credentials[index]
|
|
1562
|
+
)))
|
|
1563
|
+
return suppliedFetch;
|
|
1564
|
+
const baseFetch = (existingMetadata == null ? void 0 : existingMetadata.fetch) || suppliedFetch;
|
|
1565
|
+
const credentials = existingMetadata ? [.../* @__PURE__ */ new Set([...resolvedCredentials, ...existingMetadata.credentials])] : resolvedCredentials;
|
|
1566
|
+
const fetchOptions = mergeFetchOptions(
|
|
1567
|
+
(existingMetadata == null ? void 0 : existingMetadata.fetchOptions) || {},
|
|
1568
|
+
options.fetchOptions
|
|
1569
|
+
);
|
|
1570
|
+
const tokenCredentials = credentials.filter(
|
|
1571
|
+
(credential) => credential.type !== "request"
|
|
1572
|
+
);
|
|
1573
|
+
const requestCredentials = credentials.filter(
|
|
1574
|
+
(credential) => credential.type === "request"
|
|
1575
|
+
);
|
|
1576
|
+
for (const credential of requestCredentials) normalizeRequestOrigins(credential.origins);
|
|
1503
1577
|
const authenticatedFetch = async (url, requestOptions = {}) => {
|
|
1504
|
-
var _a, _b, _c;
|
|
1578
|
+
var _a, _b, _c, _d;
|
|
1579
|
+
requestOptions = mergeFetchOptions(fetchOptions, requestOptions);
|
|
1580
|
+
if ((_a = requestOptions.signal) == null ? void 0 : _a.aborted) throw createAbortError4();
|
|
1581
|
+
if (!credentials.length) return baseFetch(url, requestOptions);
|
|
1505
1582
|
const resolvedURL = parseHTTPURL(url);
|
|
1506
|
-
|
|
1507
|
-
const
|
|
1508
|
-
const response = await baseFetch(
|
|
1583
|
+
const authorization = resolvedURL ? await authorizeRequest(resolvedURL, requestOptions, tokenCredentials) : { url, options: requestOptions, credentials: [] };
|
|
1584
|
+
const signedRequest = await authenticateRequest(authorization, requestCredentials, "request");
|
|
1585
|
+
const response = await baseFetch(signedRequest.url, signedRequest.options);
|
|
1509
1586
|
const refreshableCredentials = authorization.credentials.filter(
|
|
1510
1587
|
({ credential }) => typeof credential.token === "function" && credential.refreshStatusCodes.includes(response.status)
|
|
1511
1588
|
);
|
|
1512
|
-
|
|
1513
|
-
|
|
1589
|
+
const shouldRetrySignature = signedRequest.credentials.some(
|
|
1590
|
+
(credential) => {
|
|
1591
|
+
var _a2;
|
|
1592
|
+
return (_a2 = credential.refreshStatusCodes) == null ? void 0 : _a2.includes(response.status);
|
|
1593
|
+
}
|
|
1594
|
+
);
|
|
1595
|
+
if (!refreshableCredentials.length && !shouldRetrySignature || !isReplayableRequest(requestOptions) || !isReplayableRequest(signedRequest.options))
|
|
1596
|
+
return response;
|
|
1597
|
+
if ((_b = requestOptions.signal) == null ? void 0 : _b.aborted) throw createAbortError4();
|
|
1514
1598
|
const refreshedTokens = /* @__PURE__ */ new Map();
|
|
1515
1599
|
await Promise.all(
|
|
1516
1600
|
refreshableCredentials.map(async ({ credential }) => {
|
|
@@ -1518,24 +1602,111 @@ function createAuthenticatedFetch(options) {
|
|
|
1518
1602
|
if (token) refreshedTokens.set(credential, token);
|
|
1519
1603
|
})
|
|
1520
1604
|
);
|
|
1521
|
-
if (!refreshedTokens.size) return response;
|
|
1522
|
-
await ((
|
|
1605
|
+
if (!refreshedTokens.size && !shouldRetrySignature) return response;
|
|
1606
|
+
await ((_c = response.body) == null ? void 0 : _c.cancel().catch(() => {
|
|
1523
1607
|
}));
|
|
1524
|
-
if ((
|
|
1525
|
-
const replayAuthorization = await authorizeRequest(
|
|
1608
|
+
if ((_d = requestOptions.signal) == null ? void 0 : _d.aborted) throw createAbortError4();
|
|
1609
|
+
const replayAuthorization = resolvedURL ? await authorizeRequest(
|
|
1526
1610
|
resolvedURL,
|
|
1527
1611
|
requestOptions,
|
|
1528
|
-
|
|
1612
|
+
tokenCredentials,
|
|
1529
1613
|
refreshedTokens,
|
|
1530
1614
|
authorization.credentials
|
|
1615
|
+
) : { url, options: requestOptions };
|
|
1616
|
+
const replayRequest = await authenticateRequest(
|
|
1617
|
+
replayAuthorization,
|
|
1618
|
+
requestCredentials,
|
|
1619
|
+
"retry",
|
|
1620
|
+
response
|
|
1531
1621
|
);
|
|
1532
|
-
return baseFetch(
|
|
1622
|
+
return baseFetch(replayRequest.url, replayRequest.options);
|
|
1533
1623
|
};
|
|
1534
1624
|
Object.defineProperty(authenticatedFetch, AUTHENTICATED_FETCH, {
|
|
1535
|
-
value:
|
|
1625
|
+
value: {
|
|
1626
|
+
fetch: baseFetch,
|
|
1627
|
+
credentials,
|
|
1628
|
+
credentialResolutions,
|
|
1629
|
+
fetchOptions
|
|
1630
|
+
}
|
|
1536
1631
|
});
|
|
1537
1632
|
return authenticatedFetch;
|
|
1538
1633
|
}
|
|
1634
|
+
function getAuthenticatedFetch(options = {}) {
|
|
1635
|
+
var _a, _b, _c;
|
|
1636
|
+
const fetchOption = options.fetch ?? ((_a = options.core) == null ? void 0 : _a.fetch);
|
|
1637
|
+
let fetchFunction;
|
|
1638
|
+
if (typeof fetchOption === "function") {
|
|
1639
|
+
fetchFunction = fetchOption;
|
|
1640
|
+
} else {
|
|
1641
|
+
fetchFunction = (url, requestOptions) => fetch(url, requestOptions);
|
|
1642
|
+
}
|
|
1643
|
+
return createAuthenticatedFetch({
|
|
1644
|
+
fetch: fetchFunction,
|
|
1645
|
+
fetchOptions: typeof fetchOption === "object" && fetchOption ? fetchOption : void 0,
|
|
1646
|
+
credentials: ((_b = options.core) == null ? void 0 : _b.credentials) || [],
|
|
1647
|
+
authentications: (_c = options.core) == null ? void 0 : _c.authentications
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
function mergeFetchOptions(defaultOptions, requestOptions) {
|
|
1651
|
+
const mergedOptions = { ...defaultOptions, ...requestOptions };
|
|
1652
|
+
if (defaultOptions.headers || (requestOptions == null ? void 0 : requestOptions.headers)) {
|
|
1653
|
+
const headers = new Headers(defaultOptions.headers);
|
|
1654
|
+
new Headers(requestOptions == null ? void 0 : requestOptions.headers).forEach((value, key) => headers.set(key, value));
|
|
1655
|
+
mergedOptions.headers = headers;
|
|
1656
|
+
}
|
|
1657
|
+
return mergedOptions;
|
|
1658
|
+
}
|
|
1659
|
+
async function authenticateRequest(request, credentials, reason, response) {
|
|
1660
|
+
const appliedCredentials = [];
|
|
1661
|
+
const signal = request.options.signal;
|
|
1662
|
+
for (const credential of credentials) {
|
|
1663
|
+
const origin = getRequestOrigin(request.url);
|
|
1664
|
+
if (!origin || !normalizeRequestOrigins(credential.origins).includes(origin)) continue;
|
|
1665
|
+
if (signal == null ? void 0 : signal.aborted) throw createAbortError4();
|
|
1666
|
+
const authenticatedRequest = await credential.authenticate({
|
|
1667
|
+
url: request.url,
|
|
1668
|
+
options: { ...request.options, headers: new Headers(request.options.headers) },
|
|
1669
|
+
reason,
|
|
1670
|
+
response: response ? { status: response.status, headers: new Headers(response.headers) } : void 0
|
|
1671
|
+
});
|
|
1672
|
+
if (!authenticatedRequest || typeof authenticatedRequest.url !== "string" || !authenticatedRequest.options || typeof authenticatedRequest.options !== "object") {
|
|
1673
|
+
throw new Error("Authentication callback returned an invalid request.");
|
|
1674
|
+
}
|
|
1675
|
+
request = {
|
|
1676
|
+
url: authenticatedRequest.url,
|
|
1677
|
+
options: { ...authenticatedRequest.options, ...signal ? { signal } : {} }
|
|
1678
|
+
};
|
|
1679
|
+
appliedCredentials.push(credential);
|
|
1680
|
+
}
|
|
1681
|
+
if (signal == null ? void 0 : signal.aborted) throw createAbortError4();
|
|
1682
|
+
return { ...request, credentials: appliedCredentials };
|
|
1683
|
+
}
|
|
1684
|
+
function getRequestOrigin(url) {
|
|
1685
|
+
try {
|
|
1686
|
+
const parsedURL = new URL(url);
|
|
1687
|
+
if (!parsedURL.host || parsedURL.username || parsedURL.password) return null;
|
|
1688
|
+
return parsedURL.origin !== "null" ? parsedURL.origin : `${parsedURL.protocol}//${parsedURL.host}`;
|
|
1689
|
+
} catch {
|
|
1690
|
+
return null;
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
function normalizeRequestOrigins(origins) {
|
|
1694
|
+
if (!origins.length)
|
|
1695
|
+
throw new Error("Request authentication requires at least one exact origin.");
|
|
1696
|
+
return origins.map((origin) => {
|
|
1697
|
+
const resolvedOrigin = getRequestOrigin(origin);
|
|
1698
|
+
let url;
|
|
1699
|
+
try {
|
|
1700
|
+
url = new URL(origin);
|
|
1701
|
+
} catch {
|
|
1702
|
+
throw new Error("Invalid request authentication origin.");
|
|
1703
|
+
}
|
|
1704
|
+
if (!resolvedOrigin || url.pathname && url.pathname !== "/" || url.search || url.hash) {
|
|
1705
|
+
throw new Error("Invalid request authentication origin.");
|
|
1706
|
+
}
|
|
1707
|
+
return resolvedOrigin;
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1539
1710
|
async function authorizeRequest(sourceURL, requestOptions, credentials, tokenOverrides = /* @__PURE__ */ new Map(), previousCredentials = []) {
|
|
1540
1711
|
const url = new URL(sourceURL);
|
|
1541
1712
|
const headers = new Headers(requestOptions.headers);
|
|
@@ -1604,6 +1775,7 @@ var AUTHENTICATED_FETCH, refreshPromises;
|
|
|
1604
1775
|
var init_request_credentials = __esm({
|
|
1605
1776
|
"../loader-utils/src/lib/request-utils/request-credentials.ts"() {
|
|
1606
1777
|
"use strict";
|
|
1778
|
+
init_authentication();
|
|
1607
1779
|
AUTHENTICATED_FETCH = /* @__PURE__ */ Symbol("loaders.gl.authenticated-fetch");
|
|
1608
1780
|
refreshPromises = /* @__PURE__ */ new WeakMap();
|
|
1609
1781
|
}
|
|
@@ -1849,6 +2021,7 @@ var init_range_request_scheduler = __esm({
|
|
|
1849
2021
|
/** Optional event callback for range batching diagnostics. */
|
|
1850
2022
|
onEvent;
|
|
1851
2023
|
pendingRequests = [];
|
|
2024
|
+
/** Pending batch window, independent of in-flight transport requests. */
|
|
1852
2025
|
flushTimer = null;
|
|
1853
2026
|
/** Creates a scheduler for one group of byte-range-addressable resources. */
|
|
1854
2027
|
constructor(props = {}) {
|
|
@@ -1925,7 +2098,7 @@ var init_range_request_scheduler = __esm({
|
|
|
1925
2098
|
}
|
|
1926
2099
|
/** Immediately starts loading the currently queued requests. */
|
|
1927
2100
|
flush() {
|
|
1928
|
-
if (this.flushTimer) {
|
|
2101
|
+
if (this.flushTimer !== null) {
|
|
1929
2102
|
clearTimeout(this.flushTimer);
|
|
1930
2103
|
this.flushTimer = null;
|
|
1931
2104
|
}
|
|
@@ -1947,9 +2120,9 @@ var init_range_request_scheduler = __esm({
|
|
|
1947
2120
|
this.fetchMergedRequest(mergedRequest);
|
|
1948
2121
|
}
|
|
1949
2122
|
}
|
|
1950
|
-
/**
|
|
2123
|
+
/** Starts a fixed batch window only when no flush is already scheduled. */
|
|
1951
2124
|
scheduleFlush() {
|
|
1952
|
-
if (this.flushTimer) {
|
|
2125
|
+
if (this.flushTimer !== null) {
|
|
1953
2126
|
return;
|
|
1954
2127
|
}
|
|
1955
2128
|
this.flushTimer = setTimeout(() => this.flush(), this.props.batchDelayMs);
|
|
@@ -2509,39 +2682,25 @@ var init_blob_file = __esm({
|
|
|
2509
2682
|
|
|
2510
2683
|
// ../loader-utils/src/lib/sources/data-source.ts
|
|
2511
2684
|
function getFetchFunction(options) {
|
|
2512
|
-
|
|
2513
|
-
const fetchOption = (options == null ? void 0 : options.fetch) ?? ((_a = options == null ? void 0 : options.core) == null ? void 0 : _a.fetch);
|
|
2514
|
-
let fetchFunction;
|
|
2515
|
-
if (typeof fetchOption === "function") {
|
|
2516
|
-
fetchFunction = (url, fetchOptions) => fetchOption(url, fetchOptions);
|
|
2517
|
-
} else if (fetchOption) {
|
|
2518
|
-
fetchFunction = (url, requestOptions) => fetch(url, mergeFetchOptions(fetchOption, requestOptions));
|
|
2519
|
-
} else {
|
|
2520
|
-
fetchFunction = (url, requestOptions) => fetch(url, requestOptions);
|
|
2521
|
-
}
|
|
2522
|
-
return createAuthenticatedFetch({
|
|
2523
|
-
fetch: fetchFunction,
|
|
2524
|
-
credentials: ((_b = options == null ? void 0 : options.core) == null ? void 0 : _b.credentials) || []
|
|
2525
|
-
});
|
|
2685
|
+
return getAuthenticatedFetch(options);
|
|
2526
2686
|
}
|
|
2527
|
-
function
|
|
2528
|
-
|
|
2529
|
-
if (
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
}
|
|
2534
|
-
function mergeHeaders(defaultHeaders, requestHeaders) {
|
|
2535
|
-
const headers = new Headers(defaultHeaders);
|
|
2536
|
-
if (requestHeaders) {
|
|
2537
|
-
new Headers(requestHeaders).forEach((value, key) => headers.set(key, value));
|
|
2687
|
+
function getSourceLoaderOptions(options) {
|
|
2688
|
+
var _a;
|
|
2689
|
+
if (options.loadOptions !== void 0 || ((_a = options.core) == null ? void 0 : _a.loadOptions) !== void 0) {
|
|
2690
|
+
throw new Error(
|
|
2691
|
+
"Source loadOptions and core.loadOptions were removed. Use core and root loader namespaces directly."
|
|
2692
|
+
);
|
|
2538
2693
|
}
|
|
2539
|
-
return headers;
|
|
2540
|
-
}
|
|
2541
|
-
function normalizeDirectLoaderOptions(options) {
|
|
2542
2694
|
const loadOptions = { ...options };
|
|
2543
2695
|
if (options == null ? void 0 : options.core) {
|
|
2544
2696
|
loadOptions.core = { ...options.core };
|
|
2697
|
+
const parserCore = loadOptions.core;
|
|
2698
|
+
for (const key of ["type", "attributions", "loaders", "onError", "loadOptions"]) {
|
|
2699
|
+
delete parserCore[key];
|
|
2700
|
+
}
|
|
2701
|
+
if (Object.keys(parserCore).length === 0) {
|
|
2702
|
+
delete loadOptions.core;
|
|
2703
|
+
}
|
|
2545
2704
|
}
|
|
2546
2705
|
const topLevelBaseUri = typeof loadOptions.baseUri === "string" ? loadOptions.baseUri : void 0;
|
|
2547
2706
|
const topLevelBaseUrl = typeof loadOptions.baseUrl === "string" ? loadOptions.baseUrl : void 0;
|
|
@@ -2579,6 +2738,7 @@ var init_data_source = __esm({
|
|
|
2579
2738
|
init_file_aliases();
|
|
2580
2739
|
init_log();
|
|
2581
2740
|
init_request_credentials();
|
|
2741
|
+
init_authentication();
|
|
2582
2742
|
UNAVAILABLE_CORE_API = {
|
|
2583
2743
|
fetchFile: unavailableCoreApiMethod("fetchFile"),
|
|
2584
2744
|
parse: unavailableCoreApiMethod("parse"),
|
|
@@ -2593,7 +2753,6 @@ var init_data_source = __esm({
|
|
|
2593
2753
|
core: {
|
|
2594
2754
|
type: "auto",
|
|
2595
2755
|
attributions: [],
|
|
2596
|
-
loadOptions: {},
|
|
2597
2756
|
loaders: [],
|
|
2598
2757
|
onError: void 0
|
|
2599
2758
|
}
|
|
@@ -2602,9 +2761,9 @@ var init_data_source = __esm({
|
|
|
2602
2761
|
options;
|
|
2603
2762
|
data;
|
|
2604
2763
|
url;
|
|
2605
|
-
/**
|
|
2764
|
+
/** Shared parser options derived from the source options, excluding source-only core controls. */
|
|
2606
2765
|
loadOptions;
|
|
2607
|
-
/** A resolved fetch function extracted from
|
|
2766
|
+
/** A resolved fetch function extracted from the shared core options. */
|
|
2608
2767
|
fetch;
|
|
2609
2768
|
/** Shared source-level runtime hooks, when supplied by the source factory. */
|
|
2610
2769
|
coreApi;
|
|
@@ -2612,15 +2771,13 @@ var init_data_source = __esm({
|
|
|
2612
2771
|
hasCoreApi;
|
|
2613
2772
|
_needsRefresh = true;
|
|
2614
2773
|
constructor(data, options, defaultOptions, coreApi) {
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
this.options = { ...options };
|
|
2620
|
-
}
|
|
2774
|
+
this.options = mergeOptions(
|
|
2775
|
+
mergeOptions(_DataSource.defaultOptions, defaultOptions || {}),
|
|
2776
|
+
options
|
|
2777
|
+
);
|
|
2621
2778
|
this.data = data;
|
|
2622
2779
|
this.url = typeof data === "string" ? resolvePath(data) : "";
|
|
2623
|
-
const loadOptions =
|
|
2780
|
+
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(this.options));
|
|
2624
2781
|
this.loadOptions = loadOptions;
|
|
2625
2782
|
const fetch2 = getFetchFunction(loadOptions);
|
|
2626
2783
|
this.coreApi = coreApi || UNAVAILABLE_CORE_API;
|
|
@@ -2628,7 +2785,11 @@ var init_data_source = __esm({
|
|
|
2628
2785
|
this.fetch = fetch2;
|
|
2629
2786
|
}
|
|
2630
2787
|
setProps(options) {
|
|
2631
|
-
|
|
2788
|
+
const mergedOptions = mergeOptions(this.options, options);
|
|
2789
|
+
const loadOptions = resolveAuthenticationOptions(getSourceLoaderOptions(mergedOptions));
|
|
2790
|
+
this.options = mergedOptions;
|
|
2791
|
+
this.loadOptions = loadOptions;
|
|
2792
|
+
this.fetch = getFetchFunction(loadOptions);
|
|
2632
2793
|
this.setNeedsRefresh();
|
|
2633
2794
|
}
|
|
2634
2795
|
/** Mark this data source as needing a refresh (redraw) */
|
|
@@ -2965,6 +3126,10 @@ function getDataTypeFromTypedArray(array) {
|
|
|
2965
3126
|
return "int32";
|
|
2966
3127
|
case Uint32Array:
|
|
2967
3128
|
return "uint32";
|
|
3129
|
+
case BigInt64Array:
|
|
3130
|
+
return "int64";
|
|
3131
|
+
case BigUint64Array:
|
|
3132
|
+
return "uint64";
|
|
2968
3133
|
case Float32Array:
|
|
2969
3134
|
return "float32";
|
|
2970
3135
|
case Float64Array:
|
|
@@ -7307,7 +7472,7 @@ var init_geoparquet_loader = __esm({
|
|
|
7307
7472
|
"use strict";
|
|
7308
7473
|
init_parquet_format();
|
|
7309
7474
|
init_parquet_loader_options();
|
|
7310
|
-
VERSION5 = true ? "5.0.0-alpha.
|
|
7475
|
+
VERSION5 = true ? "5.0.0-alpha.8" : "latest";
|
|
7311
7476
|
GeoParquetLoader = {
|
|
7312
7477
|
...ParquetFormat,
|
|
7313
7478
|
dataType: null,
|
|
@@ -8448,6 +8613,18 @@ function readUnsignedVarIntNumber(cursor) {
|
|
|
8448
8613
|
}
|
|
8449
8614
|
throw new Error("invalid RLE run header");
|
|
8450
8615
|
}
|
|
8616
|
+
function encodeUnsignedVarIntNumber(value) {
|
|
8617
|
+
if (!Number.isSafeInteger(value) || value < 0) {
|
|
8618
|
+
throw new Error("RLE run header must be a non-negative safe integer");
|
|
8619
|
+
}
|
|
8620
|
+
const bytes = [];
|
|
8621
|
+
while (value >= 128) {
|
|
8622
|
+
bytes.push(value % 128 | 128);
|
|
8623
|
+
value = Math.floor(value / 128);
|
|
8624
|
+
}
|
|
8625
|
+
bytes.push(value);
|
|
8626
|
+
return Uint8Array.from(bytes);
|
|
8627
|
+
}
|
|
8451
8628
|
function assertReadable(cursor, byteLength) {
|
|
8452
8629
|
const size = cursor.size ?? cursor.buffer.length;
|
|
8453
8630
|
if (byteLength < 0 || cursor.offset + byteLength > size) {
|
|
@@ -8469,10 +8646,7 @@ function encodeRunBitpacked(values, opts) {
|
|
|
8469
8646
|
buf[Math.floor(b / 8)] |= 1 << b % 8;
|
|
8470
8647
|
}
|
|
8471
8648
|
}
|
|
8472
|
-
return concatUint8Arrays([
|
|
8473
|
-
Uint8Array.from(import_varint.default.encode(paddedValues.length / 8 << 1 | 1)),
|
|
8474
|
-
buf
|
|
8475
|
-
]);
|
|
8649
|
+
return concatUint8Arrays([encodeUnsignedVarIntNumber(paddedValues.length / 8 << 1 | 1), buf]);
|
|
8476
8650
|
}
|
|
8477
8651
|
function encodeRunRepeated(value, count, opts) {
|
|
8478
8652
|
const bitWidth = opts.bitWidth;
|
|
@@ -8481,15 +8655,13 @@ function encodeRunRepeated(value, count, opts) {
|
|
|
8481
8655
|
buf[i] = value & 255;
|
|
8482
8656
|
value = Math.floor(value / 256);
|
|
8483
8657
|
}
|
|
8484
|
-
return concatUint8Arrays([
|
|
8658
|
+
return concatUint8Arrays([encodeUnsignedVarIntNumber(count << 1), buf]);
|
|
8485
8659
|
}
|
|
8486
|
-
var import_varint;
|
|
8487
8660
|
var init_rle = __esm({
|
|
8488
8661
|
"src/parquetjs/codecs/rle.ts"() {
|
|
8489
8662
|
"use strict";
|
|
8490
8663
|
init_declare();
|
|
8491
8664
|
init_binary_utils();
|
|
8492
|
-
import_varint = __toESM(require("varint"), 1);
|
|
8493
8665
|
}
|
|
8494
8666
|
});
|
|
8495
8667
|
|
|
@@ -28141,7 +28313,7 @@ init_geoparquet_loader();
|
|
|
28141
28313
|
|
|
28142
28314
|
// dist/parquet-js-loader-types.js
|
|
28143
28315
|
init_parquet_format();
|
|
28144
|
-
var VERSION8 = true ? "5.0.0-alpha.
|
|
28316
|
+
var VERSION8 = true ? "5.0.0-alpha.8" : "latest";
|
|
28145
28317
|
var DEFAULT_PARQUET_JS_OPTIONS3 = {
|
|
28146
28318
|
columns: void 0,
|
|
28147
28319
|
preserveBinary: false,
|
|
@@ -28168,7 +28340,7 @@ var ParquetJSLoader2 = {
|
|
|
28168
28340
|
|
|
28169
28341
|
// dist/parquet-source-loader-types.js
|
|
28170
28342
|
init_parquet_format();
|
|
28171
|
-
var VERSION10 = true ? "5.0.0-alpha.
|
|
28343
|
+
var VERSION10 = true ? "5.0.0-alpha.8" : "latest";
|
|
28172
28344
|
async function preloadParquetSourceLoader2() {
|
|
28173
28345
|
const { ParquetSourceLoaderWithParser: ParquetSourceLoaderWithParser2 } = await Promise.resolve().then(() => (init_parquet_source_loader(), parquet_source_loader_exports));
|
|
28174
28346
|
return ParquetSourceLoaderWithParser2;
|
|
@@ -28292,7 +28464,7 @@ init_normalize_parquet_options2();
|
|
|
28292
28464
|
init_parquet_format();
|
|
28293
28465
|
|
|
28294
28466
|
// dist/lib/constants.js
|
|
28295
|
-
var VERSION11 = true ? "5.0.0-alpha.
|
|
28467
|
+
var VERSION11 = true ? "5.0.0-alpha.8" : "latest";
|
|
28296
28468
|
var PARQUET_MAGIC2 = "PAR1";
|
|
28297
28469
|
var PARQUET_MAGIC_ENCRYPTED2 = "PARE";
|
|
28298
28470
|
var PARQUET_RDLVL_TYPE2 = "INT32";
|
|
@@ -28759,7 +28931,6 @@ function toPrimitiveBytes2(value) {
|
|
|
28759
28931
|
}
|
|
28760
28932
|
|
|
28761
28933
|
// dist/parquetjs/codecs/rle.js
|
|
28762
|
-
var import_varint2 = __toESM(require("varint"), 1);
|
|
28763
28934
|
function encodeValues6(type, values, opts) {
|
|
28764
28935
|
if (!("bitWidth" in opts)) {
|
|
28765
28936
|
throw new Error("bitWidth is required");
|
|
@@ -29338,6 +29509,18 @@ function readUnsignedVarIntNumber3(cursor) {
|
|
|
29338
29509
|
}
|
|
29339
29510
|
throw new Error("invalid RLE run header");
|
|
29340
29511
|
}
|
|
29512
|
+
function encodeUnsignedVarIntNumber2(value) {
|
|
29513
|
+
if (!Number.isSafeInteger(value) || value < 0) {
|
|
29514
|
+
throw new Error("RLE run header must be a non-negative safe integer");
|
|
29515
|
+
}
|
|
29516
|
+
const bytes = [];
|
|
29517
|
+
while (value >= 128) {
|
|
29518
|
+
bytes.push(value % 128 | 128);
|
|
29519
|
+
value = Math.floor(value / 128);
|
|
29520
|
+
}
|
|
29521
|
+
bytes.push(value);
|
|
29522
|
+
return Uint8Array.from(bytes);
|
|
29523
|
+
}
|
|
29341
29524
|
function assertReadable3(cursor, byteLength) {
|
|
29342
29525
|
const size = cursor.size ?? cursor.buffer.length;
|
|
29343
29526
|
if (byteLength < 0 || cursor.offset + byteLength > size) {
|
|
@@ -29357,10 +29540,7 @@ function encodeRunBitpacked2(values, opts) {
|
|
|
29357
29540
|
buf[Math.floor(b / 8)] |= 1 << b % 8;
|
|
29358
29541
|
}
|
|
29359
29542
|
}
|
|
29360
|
-
return concatUint8Arrays2([
|
|
29361
|
-
Uint8Array.from(import_varint2.default.encode(paddedValues.length / 8 << 1 | 1)),
|
|
29362
|
-
buf
|
|
29363
|
-
]);
|
|
29543
|
+
return concatUint8Arrays2([encodeUnsignedVarIntNumber2(paddedValues.length / 8 << 1 | 1), buf]);
|
|
29364
29544
|
}
|
|
29365
29545
|
function encodeRunRepeated2(value, count, opts) {
|
|
29366
29546
|
const bitWidth = opts.bitWidth;
|
|
@@ -29369,7 +29549,7 @@ function encodeRunRepeated2(value, count, opts) {
|
|
|
29369
29549
|
buf[i] = value & 255;
|
|
29370
29550
|
value = Math.floor(value / 256);
|
|
29371
29551
|
}
|
|
29372
|
-
return concatUint8Arrays2([
|
|
29552
|
+
return concatUint8Arrays2([encodeUnsignedVarIntNumber2(count << 1), buf]);
|
|
29373
29553
|
}
|
|
29374
29554
|
|
|
29375
29555
|
// dist/parquetjs/codecs/dictionary.js
|
|
@@ -39155,7 +39335,7 @@ function formatDataType(dataType) {
|
|
|
39155
39335
|
|
|
39156
39336
|
// dist/parquet-js-writer.js
|
|
39157
39337
|
init_parquet_format();
|
|
39158
|
-
var VERSION12 = true ? "5.0.0-alpha.
|
|
39338
|
+
var VERSION12 = true ? "5.0.0-alpha.8" : "latest";
|
|
39159
39339
|
var DEFAULT_PARQUET_JS_OPTIONS4 = {};
|
|
39160
39340
|
var ParquetJSWriter = {
|
|
39161
39341
|
...ParquetFormat,
|