@sanity/client 6.22.3 → 6.22.5-beta.0
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/_chunks-cjs/resolveEditInfo.cjs +1 -2
- package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaClean.cjs +1 -2
- package/dist/_chunks-cjs/stegaClean.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +3 -3
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
- package/dist/_chunks-es/resolveEditInfo.js +1 -2
- package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
- package/dist/_chunks-es/stegaClean.js +1 -2
- package/dist/_chunks-es/stegaClean.js.map +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +3 -3
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
- package/dist/csm.cjs +1 -2
- package/dist/csm.cjs.map +1 -1
- package/dist/csm.js +1 -2
- package/dist/csm.js.map +1 -1
- package/dist/index.browser.cjs +3 -4
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +3 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +4 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/data/listen.ts +3 -3
- package/src/data/live.ts +1 -1
- package/src/stega/filterDefault.ts +3 -2
- package/umd/sanityClient.js +321 -1088
- package/umd/sanityClient.min.js +1 -6
package/dist/index.browser.js
CHANGED
|
@@ -100,8 +100,7 @@ function defineHttpRequest(envMiddleware2) {
|
|
|
100
100
|
]);
|
|
101
101
|
}
|
|
102
102
|
function shouldRetry(err, attempt, options) {
|
|
103
|
-
if (options.maxRetries === 0)
|
|
104
|
-
return !1;
|
|
103
|
+
if (options.maxRetries === 0) return !1;
|
|
105
104
|
const isSafe = options.method === "GET" || options.method === "HEAD", isQuery = (options.uri || options.url).startsWith("/data/query"), isRetriableResponse = err.response && (err.response.statusCode === 429 || err.response.statusCode === 502 || err.response.statusCode === 503);
|
|
106
105
|
return (isSafe || isQuery) && isRetriableResponse ? !0 : retry.shouldRetry(err, attempt, options);
|
|
107
106
|
}
|
|
@@ -894,7 +893,7 @@ function _listen(query, params, opts = {}) {
|
|
|
894
893
|
shouldEmitReconnect && observer.next({ type: "reconnect" });
|
|
895
894
|
}
|
|
896
895
|
async function getEventSource() {
|
|
897
|
-
const {
|
|
896
|
+
const { EventSource: EventSource2 } = await import("eventsource");
|
|
898
897
|
if (unsubscribed)
|
|
899
898
|
return;
|
|
900
899
|
const evs = new EventSource2(uri, esOptions);
|
|
@@ -992,7 +991,7 @@ class LiveClient {
|
|
|
992
991
|
}
|
|
993
992
|
}
|
|
994
993
|
async function getEventSource() {
|
|
995
|
-
const EventSourceImplementation = typeof EventSource > "u" || esOptions.headers || esOptions.withCredentials ? (await import("
|
|
994
|
+
const EventSourceImplementation = typeof EventSource > "u" || esOptions.headers || esOptions.withCredentials ? (await import("eventsource")).EventSource : EventSource;
|
|
996
995
|
if (unsubscribed)
|
|
997
996
|
return;
|
|
998
997
|
try {
|