@sanity/client 6.27.3-canary.2 → 6.28.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/README.md +85 -5
- package/dist/_chunks-cjs/config.cjs +4 -1
- package/dist/_chunks-cjs/config.cjs.map +1 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +1 -1
- package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
- package/dist/_chunks-es/config.js +4 -1
- package/dist/_chunks-es/config.js.map +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js +1 -1
- package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
- package/dist/csm.d.cts +6 -1
- package/dist/csm.d.ts +6 -1
- package/dist/index.browser.cjs +6 -3
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +6 -1
- package/dist/index.browser.d.ts +6 -1
- package/dist/index.browser.js +7 -4
- 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 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +6 -1
- package/dist/stega.browser.d.ts +6 -1
- package/dist/stega.browser.js +1 -1
- package/dist/stega.d.cts +6 -1
- package/dist/stega.d.ts +6 -1
- package/dist/stega.js +1 -1
- package/package.json +11 -12
- package/src/data/dataMethods.ts +12 -3
- package/src/types.ts +6 -1
- package/src/warnings.ts +5 -1
- package/umd/sanityClient.js +81 -84
- package/umd/sanityClient.min.js +2 -2
package/dist/index.cjs
CHANGED
|
@@ -745,10 +745,11 @@ function _requestObservable(client, httpRequest, options) {
|
|
|
745
745
|
const resultSourceMap = options.resultSourceMap ?? config$1.resultSourceMap;
|
|
746
746
|
resultSourceMap !== void 0 && resultSourceMap !== !1 && (options.query = { resultSourceMap, ...options.query });
|
|
747
747
|
const perspectiveOption = options.perspective || config$1.perspective;
|
|
748
|
-
typeof perspectiveOption < "u" && (config.validateApiPerspective(perspectiveOption), options.query = {
|
|
748
|
+
typeof perspectiveOption < "u" && (perspectiveOption === "previewDrafts" && config.printPreviewDraftsDeprecationWarning(), config.validateApiPerspective(perspectiveOption), options.query = {
|
|
749
749
|
perspective: Array.isArray(perspectiveOption) ? perspectiveOption.join(",") : perspectiveOption,
|
|
750
750
|
...options.query
|
|
751
|
-
},
|
|
751
|
+
}, (Array.isArray(perspectiveOption) && perspectiveOption.length > 0 || // previewDrafts was renamed to drafts, but keep for backwards compat
|
|
752
|
+
perspectiveOption === "previewDrafts" || perspectiveOption === "drafts") && useCdn && (useCdn = !1, config.printCdnPreviewDraftsWarning())), options.lastLiveEventId && (options.query = { ...options.query, lastLiveEventId: options.lastLiveEventId }), options.returnQuery === !1 && (options.query = { returnQuery: "false", ...options.query }), useCdn && options.cacheMode == "noStale" && (options.query = { cacheMode: "noStale", ...options.query });
|
|
752
753
|
}
|
|
753
754
|
const reqOptions = requestOptions(
|
|
754
755
|
config$1,
|
|
@@ -1524,7 +1525,7 @@ function defineDeprecatedCreateClient(createClient2) {
|
|
|
1524
1525
|
return config.printNoDefaultExport(), createClient2(config$1);
|
|
1525
1526
|
};
|
|
1526
1527
|
}
|
|
1527
|
-
var name = "@sanity/client", version = "6.
|
|
1528
|
+
var name = "@sanity/client", version = "6.28.0";
|
|
1528
1529
|
const middleware = [
|
|
1529
1530
|
middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
|
|
1530
1531
|
middleware$1.headers({ "User-Agent": `${name} ${version}` }),
|