@loaders.gl/splats 5.0.0-alpha.13 → 5.0.0-alpha.14
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 +7 -9
- package/dist/dist.min.js +13 -13
- package/dist/index.cjs +12 -14
- package/dist/index.cjs.map +1 -1
- package/dist/ksplat-loader-types.js +1 -1
- package/dist/rad-loader-types.js +1 -1
- package/dist/rad-source-loader.js +1 -1
- package/dist/splat-loader-types.js +1 -1
- package/dist/spz-loader-types.js +1 -1
- package/package.json +3 -3
package/dist/dist.dev.js
CHANGED
|
@@ -982,7 +982,7 @@ var __exports__ = (() => {
|
|
|
982
982
|
for (const credential of requestCredentials) normalizeRequestOrigins(credential.origins);
|
|
983
983
|
const authenticatedFetch = async (url2, requestOptions = {}) => {
|
|
984
984
|
requestOptions = mergeFetchOptions(fetchOptions, requestOptions);
|
|
985
|
-
|
|
985
|
+
requestOptions.signal?.throwIfAborted();
|
|
986
986
|
if (!credentials.length) return baseFetch(url2, requestOptions);
|
|
987
987
|
const resolvedURL = parseHTTPURL(url2);
|
|
988
988
|
const authorization = resolvedURL ? await authorizeRequest(resolvedURL, requestOptions, tokenCredentials) : { url: url2, options: requestOptions, credentials: [] };
|
|
@@ -998,7 +998,7 @@ var __exports__ = (() => {
|
|
|
998
998
|
(credential) => credential.refreshStatusCodes?.includes(response.status)
|
|
999
999
|
);
|
|
1000
1000
|
if (!refreshableCredentials.length && !shouldRetrySignature) return response;
|
|
1001
|
-
|
|
1001
|
+
requestOptions.signal?.throwIfAborted();
|
|
1002
1002
|
const refreshedTokens = /* @__PURE__ */ new Map();
|
|
1003
1003
|
await Promise.all(
|
|
1004
1004
|
refreshableCredentials.map(async ({ credential }) => {
|
|
@@ -1009,7 +1009,7 @@ var __exports__ = (() => {
|
|
|
1009
1009
|
if (!refreshedTokens.size && !shouldRetrySignature) return response;
|
|
1010
1010
|
await response.body?.cancel().catch(() => {
|
|
1011
1011
|
});
|
|
1012
|
-
|
|
1012
|
+
requestOptions.signal?.throwIfAborted();
|
|
1013
1013
|
const replayAuthorization = resolvedURL ? await authorizeRequest(
|
|
1014
1014
|
resolvedURL,
|
|
1015
1015
|
requestOptions,
|
|
@@ -1043,9 +1043,10 @@ var __exports__ = (() => {
|
|
|
1043
1043
|
} else {
|
|
1044
1044
|
fetchFunction = (url2, requestOptions) => fetch(url2, requestOptions);
|
|
1045
1045
|
}
|
|
1046
|
+
const fetchOptions = typeof fetchOption === "object" && fetchOption ? fetchOption : void 0;
|
|
1046
1047
|
return createAuthenticatedFetch({
|
|
1047
1048
|
fetch: fetchFunction,
|
|
1048
|
-
fetchOptions:
|
|
1049
|
+
fetchOptions: options.signal ? { ...fetchOptions, signal: options.signal } : fetchOptions,
|
|
1049
1050
|
credentials: options.core?.credentials || [],
|
|
1050
1051
|
authentications: options.core?.authentications
|
|
1051
1052
|
});
|
|
@@ -1065,7 +1066,7 @@ var __exports__ = (() => {
|
|
|
1065
1066
|
for (const credential of credentials) {
|
|
1066
1067
|
const origin = getRequestOrigin(request.url);
|
|
1067
1068
|
if (!origin || !normalizeRequestOrigins(credential.origins).includes(origin)) continue;
|
|
1068
|
-
|
|
1069
|
+
signal?.throwIfAborted();
|
|
1069
1070
|
const authenticatedRequest = await credential.authenticate({
|
|
1070
1071
|
url: request.url,
|
|
1071
1072
|
options: { ...request.options, headers: new Headers(request.options.headers) },
|
|
@@ -1081,7 +1082,7 @@ var __exports__ = (() => {
|
|
|
1081
1082
|
};
|
|
1082
1083
|
appliedCredentials.push(credential);
|
|
1083
1084
|
}
|
|
1084
|
-
|
|
1085
|
+
signal?.throwIfAborted();
|
|
1085
1086
|
return { ...request, credentials: appliedCredentials };
|
|
1086
1087
|
}
|
|
1087
1088
|
function getRequestOrigin(url2) {
|
|
@@ -1171,9 +1172,6 @@ var __exports__ = (() => {
|
|
|
1171
1172
|
if (!["GET", "HEAD", "OPTIONS", "PUT", "DELETE"].includes(method)) return false;
|
|
1172
1173
|
return !(options.body && typeof ReadableStream !== "undefined" && options.body instanceof ReadableStream);
|
|
1173
1174
|
}
|
|
1174
|
-
function createAbortError() {
|
|
1175
|
-
return new DOMException("The operation was aborted.", "AbortError");
|
|
1176
|
-
}
|
|
1177
1175
|
var AUTHENTICATED_FETCH, refreshPromises;
|
|
1178
1176
|
var init_request_credentials = __esm({
|
|
1179
1177
|
"../core/src/loader-utils/lib/request-utils/request-credentials.ts"() {
|