@sanity/client 6.1.0-scope.0 → 6.1.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/index.browser.cjs +13 -11
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +13 -11
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/data/dataMethods.ts +8 -6
- package/src/types.ts +1 -6
- package/umd/sanityClient.js +19 -13
- package/umd/sanityClient.min.js +3 -3
package/dist/index.browser.js
CHANGED
|
@@ -830,17 +830,19 @@ function _requestObservable(client, httpRequest, options) {
|
|
|
830
830
|
...options.query
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
if (
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
833
|
+
if (["GET", "HEAD"].indexOf(options.method || "GET") >= 0 && uri.indexOf("/data/query/") === 0) {
|
|
834
|
+
if (config.resultSourceMap) {
|
|
835
|
+
options.query = {
|
|
836
|
+
resultSourceMap: true,
|
|
837
|
+
...options.query
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
if (typeof config.perspective === "string" && config.perspective !== "all") {
|
|
841
|
+
options.query = {
|
|
842
|
+
perspective: config.perspective,
|
|
843
|
+
...options.query
|
|
844
|
+
};
|
|
845
|
+
}
|
|
844
846
|
}
|
|
845
847
|
const reqOptions = requestOptions(config, Object.assign({}, options, {
|
|
846
848
|
url: _getUrl(client, uri, useCdn)
|