@sanity/client 6.4.12 → 6.5.1-canary.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 +11 -74
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +11 -74
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +12 -75
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -75
- package/dist/index.js.map +1 -1
- package/package.json +16 -16
- package/src/data/dataMethods.ts +1 -1
- package/src/datasets/DatasetsClient.ts +11 -3
- package/umd/sanityClient.js +458 -118
- package/umd/sanityClient.min.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/client",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.1-canary.0",
|
|
4
4
|
"description": "Client for retrieving, creating and patching data from Sanity.io",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -95,31 +95,31 @@
|
|
|
95
95
|
"rxjs": "^7.0.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@edge-runtime/types": "^2.2.
|
|
99
|
-
"@edge-runtime/vm": "^3.1.
|
|
100
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
101
|
-
"@rollup/plugin-node-resolve": "^15.2.
|
|
102
|
-
"@sanity/pkg-utils": "^
|
|
103
|
-
"@types/node": "^20.
|
|
104
|
-
"@typescript-eslint/eslint-plugin": "^6.7.
|
|
105
|
-
"@typescript-eslint/parser": "^6.7.
|
|
106
|
-
"@vitest/coverage-v8": "^0.34.
|
|
107
|
-
"eslint": "^8.
|
|
98
|
+
"@edge-runtime/types": "^2.2.4",
|
|
99
|
+
"@edge-runtime/vm": "^3.1.4",
|
|
100
|
+
"@rollup/plugin-commonjs": "^25.0.5",
|
|
101
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
102
|
+
"@sanity/pkg-utils": "^3.0.0",
|
|
103
|
+
"@types/node": "^20.8.4",
|
|
104
|
+
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
|
105
|
+
"@typescript-eslint/parser": "^6.7.5",
|
|
106
|
+
"@vitest/coverage-v8": "^0.34.6",
|
|
107
|
+
"eslint": "^8.51.0",
|
|
108
108
|
"eslint-config-prettier": "^9.0.0",
|
|
109
109
|
"eslint-plugin-prettier": "^5.0.0",
|
|
110
110
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
111
111
|
"faucet": "^0.0.4",
|
|
112
|
-
"happy-dom": "^
|
|
112
|
+
"happy-dom": "^12.9.1",
|
|
113
113
|
"ls-engines": "^0.9.0",
|
|
114
114
|
"nock": "^13.3.3",
|
|
115
115
|
"prettier": "^3.0.3",
|
|
116
|
-
"prettier-plugin-packagejson": "^2.4.
|
|
116
|
+
"prettier-plugin-packagejson": "^2.4.6",
|
|
117
117
|
"rimraf": "^5.0.1",
|
|
118
|
-
"rollup": "^
|
|
118
|
+
"rollup": "^4.0.2",
|
|
119
119
|
"sse-channel": "^4.0.0",
|
|
120
|
-
"terser": "^5.
|
|
120
|
+
"terser": "^5.21.0",
|
|
121
121
|
"typescript": "^5.2.2",
|
|
122
|
-
"vitest": "^0.34.
|
|
122
|
+
"vitest": "^0.34.6",
|
|
123
123
|
"vitest-github-actions-reporter": "^0.10.0"
|
|
124
124
|
},
|
|
125
125
|
"engines": {
|
package/src/data/dataMethods.ts
CHANGED
|
@@ -314,7 +314,7 @@ export function _requestObservable<R>(
|
|
|
314
314
|
? [config.requestTagPrefix, options.tag].join('.')
|
|
315
315
|
: options.tag || config.requestTagPrefix
|
|
316
316
|
|
|
317
|
-
if (tag) {
|
|
317
|
+
if (tag && options.tag !== null) {
|
|
318
318
|
options.query = {tag: validate.requestTag(tag), ...options.query}
|
|
319
319
|
}
|
|
320
320
|
|
|
@@ -47,7 +47,10 @@ export class ObservableDatasetsClient {
|
|
|
47
47
|
* Fetch a list of datasets for the configured project
|
|
48
48
|
*/
|
|
49
49
|
list(): Observable<DatasetsResponse> {
|
|
50
|
-
return _request<DatasetsResponse>(this.#client, this.#httpRequest, {
|
|
50
|
+
return _request<DatasetsResponse>(this.#client, this.#httpRequest, {
|
|
51
|
+
uri: '/datasets',
|
|
52
|
+
tag: null,
|
|
53
|
+
})
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
|
|
@@ -98,7 +101,7 @@ export class DatasetsClient {
|
|
|
98
101
|
*/
|
|
99
102
|
list(): Promise<DatasetsResponse> {
|
|
100
103
|
return lastValueFrom(
|
|
101
|
-
_request<DatasetsResponse>(this.#client, this.#httpRequest, {uri: '/datasets'}),
|
|
104
|
+
_request<DatasetsResponse>(this.#client, this.#httpRequest, {uri: '/datasets', tag: null}),
|
|
102
105
|
)
|
|
103
106
|
}
|
|
104
107
|
}
|
|
@@ -111,5 +114,10 @@ function _modify<R = unknown>(
|
|
|
111
114
|
options?: {aclMode?: DatasetAclMode},
|
|
112
115
|
) {
|
|
113
116
|
validate.dataset(name)
|
|
114
|
-
return _request<R>(client, httpRequest, {
|
|
117
|
+
return _request<R>(client, httpRequest, {
|
|
118
|
+
method,
|
|
119
|
+
uri: `/datasets/${name}`,
|
|
120
|
+
body: options,
|
|
121
|
+
tag: null,
|
|
122
|
+
})
|
|
115
123
|
}
|