@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.cjs
CHANGED
|
@@ -116,8 +116,7 @@ function defineHttpRequest(envMiddleware) {
|
|
|
116
116
|
]);
|
|
117
117
|
}
|
|
118
118
|
function shouldRetry(err, attempt, options) {
|
|
119
|
-
if (options.maxRetries === 0)
|
|
120
|
-
return !1;
|
|
119
|
+
if (options.maxRetries === 0) return !1;
|
|
121
120
|
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);
|
|
122
121
|
return (isSafe || isQuery) && isRetriableResponse ? !0 : middleware$1.retry.shouldRetry(err, attempt, options);
|
|
123
122
|
}
|
|
@@ -912,7 +911,7 @@ function _listen(query, params, opts = {}) {
|
|
|
912
911
|
shouldEmitReconnect && observer.next({ type: "reconnect" });
|
|
913
912
|
}
|
|
914
913
|
async function getEventSource() {
|
|
915
|
-
const {
|
|
914
|
+
const { EventSource: EventSource2 } = await import("eventsource");
|
|
916
915
|
if (unsubscribed)
|
|
917
916
|
return;
|
|
918
917
|
const evs = new EventSource2(uri, esOptions);
|
|
@@ -1010,7 +1009,7 @@ class LiveClient {
|
|
|
1010
1009
|
}
|
|
1011
1010
|
}
|
|
1012
1011
|
async function getEventSource() {
|
|
1013
|
-
const EventSourceImplementation = typeof EventSource > "u" || esOptions.headers || esOptions.withCredentials ? (await import("
|
|
1012
|
+
const EventSourceImplementation = typeof EventSource > "u" || esOptions.headers || esOptions.withCredentials ? (await import("eventsource")).EventSource : EventSource;
|
|
1014
1013
|
if (unsubscribed)
|
|
1015
1014
|
return;
|
|
1016
1015
|
try {
|
|
@@ -1568,7 +1567,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1568
1567
|
return printNoDefaultExport(), createClient2(config);
|
|
1569
1568
|
};
|
|
1570
1569
|
}
|
|
1571
|
-
var name = "@sanity/client", version = "6.22.
|
|
1570
|
+
var name = "@sanity/client", version = "6.22.5-beta.0";
|
|
1572
1571
|
const middleware = [
|
|
1573
1572
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1574
1573
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|