@sanity/client 6.0.1 → 6.1.0-scope.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 +6 -0
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +6 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/data/dataMethods.ts +4 -0
- package/src/types.ts +9 -0
- package/umd/sanityClient.js +6 -0
- package/umd/sanityClient.min.js +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ var getIt = require('get-it');
|
|
|
8
8
|
var rxjs = require('rxjs');
|
|
9
9
|
var operators = require('rxjs/operators');
|
|
10
10
|
var name = "@sanity/client";
|
|
11
|
-
var version = "6.0.
|
|
11
|
+
var version = "6.1.0-scope.0";
|
|
12
12
|
const middleware = [middleware$1.debug({
|
|
13
13
|
verbose: true,
|
|
14
14
|
namespace: "sanity:client"
|
|
@@ -847,6 +847,12 @@ function _requestObservable(client, httpRequest, options) {
|
|
|
847
847
|
...options.query
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
|
+
if (config.scope) {
|
|
851
|
+
options.query = {
|
|
852
|
+
scope: config.scope,
|
|
853
|
+
...options.query
|
|
854
|
+
};
|
|
855
|
+
}
|
|
850
856
|
const reqOptions = requestOptions(config, Object.assign({}, options, {
|
|
851
857
|
url: _getUrl(client, uri, useCdn)
|
|
852
858
|
}));
|