@sanity/client 6.21.0 → 6.21.1
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 +2 -0
- package/dist/index.browser.cjs +3 -2
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +6 -0
- package/dist/index.browser.d.ts +6 -0
- package/dist/index.browser.js +3 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/data/encodeQueryString.ts +4 -1
- package/src/data/listen.ts +1 -0
- package/src/types.ts +7 -0
- package/umd/sanityClient.js +3 -2
- package/umd/sanityClient.min.js +1 -1
package/dist/index.cjs
CHANGED
|
@@ -609,13 +609,13 @@ const encodeQueryString = ({
|
|
|
609
609
|
params = {},
|
|
610
610
|
options = {}
|
|
611
611
|
}) => {
|
|
612
|
-
const searchParams = new URLSearchParams(), { tag, returnQuery, ...opts } = options;
|
|
612
|
+
const searchParams = new URLSearchParams(), { tag, includeMutations, returnQuery, ...opts } = options;
|
|
613
613
|
tag && searchParams.append("tag", tag), searchParams.append("query", query);
|
|
614
614
|
for (const [key, value] of Object.entries(params))
|
|
615
615
|
searchParams.append(`$${key}`, JSON.stringify(value));
|
|
616
616
|
for (const [key, value] of Object.entries(opts))
|
|
617
617
|
value && searchParams.append(key, `${value}`);
|
|
618
|
-
return returnQuery === !1 && searchParams.append("returnQuery", "false"), `?${searchParams}`;
|
|
618
|
+
return returnQuery === !1 && searchParams.append("returnQuery", "false"), includeMutations === !1 && searchParams.append("includeMutations", "false"), `?${searchParams}`;
|
|
619
619
|
}, excludeFalsey = (param, defValue) => param === !1 ? void 0 : typeof param > "u" ? defValue : param, getMutationQuery = (options = {}) => ({
|
|
620
620
|
dryRun: options.dryRun,
|
|
621
621
|
returnIds: !0,
|
|
@@ -876,6 +876,7 @@ var defaults = (obj, defaults2) => Object.keys(defaults2).concat(Object.keys(obj
|
|
|
876
876
|
const pick = (obj, props) => props.reduce((selection, prop) => (typeof obj[prop] > "u" || (selection[prop] = obj[prop]), selection), {}), MAX_URL_LENGTH = 14800, possibleOptions = [
|
|
877
877
|
"includePreviousRevision",
|
|
878
878
|
"includeResult",
|
|
879
|
+
"includeMutations",
|
|
879
880
|
"visibility",
|
|
880
881
|
"effectFormat",
|
|
881
882
|
"tag"
|
|
@@ -1547,7 +1548,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1547
1548
|
return printNoDefaultExport(), createClient2(config);
|
|
1548
1549
|
};
|
|
1549
1550
|
}
|
|
1550
|
-
var name = "@sanity/client", version = "6.21.
|
|
1551
|
+
var name = "@sanity/client", version = "6.21.1";
|
|
1551
1552
|
const middleware = [
|
|
1552
1553
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1553
1554
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|