@sanity/client 7.26.0 → 7.26.2
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/README.md +1 -1
- package/dist/_chunks-cjs/resolveEditInfo.cjs +4 -4
- package/dist/_chunks-cjs/resolveEditInfo.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 +4 -4
- package/dist/_chunks-es/resolveEditInfo.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.map +1 -1
- package/dist/csm.d.cts +5 -17
- package/dist/csm.d.ts +5 -17
- package/dist/csm.js.map +1 -1
- package/dist/index.browser.cjs +1 -1
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +23 -62
- package/dist/index.browser.d.ts +23 -62
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -57
- package/dist/index.d.ts +22 -57
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.cjs.map +1 -1
- package/dist/stega.browser.d.cts +29 -69
- package/dist/stega.browser.d.ts +29 -69
- package/dist/stega.browser.js.map +1 -1
- package/dist/stega.cjs.map +1 -1
- package/dist/stega.d.cts +29 -69
- package/dist/stega.d.ts +29 -69
- package/dist/stega.js.map +1 -1
- package/package.json +31 -31
- package/src/agent/actions/commonTypes.ts +1 -2
- package/src/agent/actions/generate.ts +3 -6
- package/src/agent/actions/patch.ts +3 -6
- package/src/agent/actions/prompt.ts +1 -2
- package/src/agent/actions/transform.ts +1 -2
- package/src/agent/actions/translate.ts +1 -2
- package/src/csm/applySourceDocuments.ts +1 -3
- package/src/csm/types.ts +1 -3
- package/src/data/listen.ts +1 -2
- package/src/releases/ReleasesClient.ts +2 -4
- package/src/stega/stegaBrand.ts +3 -1
- package/src/stega/types.ts +1 -2
- package/src/types.ts +9 -38
- package/umd/sanityClient.js +21 -14
- package/umd/sanityClient.min.js +2 -2
package/dist/index.cjs
CHANGED
|
@@ -20,7 +20,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
20
|
));
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
22
22
|
var getIt = require("get-it"), middleware$1 = require("get-it/middleware"), rxjs = require("rxjs"), isRecord = require("./_chunks-cjs/isRecord.cjs"), stegaClean = require("./_chunks-cjs/stegaClean.cjs"), operators = require("rxjs/operators"), csm = require("@sanity/client/csm"), nanoid = require("nanoid"), config = require("./_chunks-cjs/config.cjs");
|
|
23
|
-
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
23
|
+
const EXPERIMENTAL_API_WARNING = "This is an experimental API version", NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
24
24
|
function codeFrame(query, location2, message) {
|
|
25
25
|
const lines = query.split(NEWLINE), loc = {
|
|
26
26
|
start: columnToLine(location2.start, lines),
|
|
@@ -232,7 +232,6 @@ function shouldRetry(err, attempt, options) {
|
|
|
232
232
|
const isSafe = options.method === "GET" || options.method === "HEAD", isQuery2 = (options.uri || options.url).startsWith("/data/query"), isRetriableResponse = err.response && (err.response.statusCode === 429 || err.response.statusCode === 502 || err.response.statusCode === 503);
|
|
233
233
|
return (isSafe || isQuery2) && isRetriableResponse ? !0 : middleware$1.retry.shouldRetry(err, attempt, options);
|
|
234
234
|
}
|
|
235
|
-
const EXPERIMENTAL_API_WARNING = "This is an experimental API version";
|
|
236
235
|
class ConnectionFailedError extends Error {
|
|
237
236
|
name = "ConnectionFailedError";
|
|
238
237
|
/**
|
|
@@ -700,7 +699,7 @@ function requestOptions(config2, overrides = {}) {
|
|
|
700
699
|
const withCredentials = !!(typeof overrides.withCredentials > "u" ? config2.withCredentials : overrides.withCredentials), timeout = typeof overrides.timeout > "u" ? config2.timeout : overrides.timeout;
|
|
701
700
|
return Object.assign({}, overrides, {
|
|
702
701
|
headers: Object.assign({}, headers, overrides.headers || {}),
|
|
703
|
-
timeout: typeof timeout > "u" ?
|
|
702
|
+
timeout: typeof timeout > "u" ? 300 * 1e3 : timeout,
|
|
704
703
|
proxy: overrides.proxy || config2.proxy,
|
|
705
704
|
json: !0,
|
|
706
705
|
withCredentials,
|
|
@@ -2880,7 +2879,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
2880
2879
|
return config.printNoDefaultExport(), createClient2(config$1);
|
|
2881
2880
|
};
|
|
2882
2881
|
}
|
|
2883
|
-
var name = "@sanity/client", version = "7.26.
|
|
2882
|
+
var name = "@sanity/client", version = "7.26.2";
|
|
2884
2883
|
const middleware = [
|
|
2885
2884
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
2886
2885
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|