@sanity/client 5.3.2 → 5.4.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 +1 -1
- package/dist/index.browser.cjs +13 -1
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +2 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +14 -2
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
- package/src/assets/AssetsClient.ts +1 -1
- package/src/index.browser.ts +3 -0
- package/src/index.ts +3 -0
- package/umd/sanityClient.js +11 -4
- package/umd/sanityClient.min.js +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import {Observable} from 'rxjs'
|
|
4
4
|
import {Requester} from 'get-it'
|
|
5
|
+
import {adapter as unstable__adapter} from 'get-it'
|
|
6
|
+
import {environment as unstable__environment} from 'get-it'
|
|
5
7
|
|
|
6
8
|
/** @internal */
|
|
7
9
|
export declare type AllDocumentIdsMutationOptions = BaseMutationOptions & {
|
|
@@ -2172,6 +2174,10 @@ export declare type UnfilteredResponseQueryOptions = RequestOptions & {
|
|
|
2172
2174
|
filterResponse: false
|
|
2173
2175
|
}
|
|
2174
2176
|
|
|
2177
|
+
export {unstable__adapter}
|
|
2178
|
+
|
|
2179
|
+
export {unstable__environment}
|
|
2180
|
+
|
|
2175
2181
|
/** @public */
|
|
2176
2182
|
export declare type UploadBody = File | Blob | Buffer | NodeJS.ReadableStream
|
|
2177
2183
|
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { debug, headers, retry, jsonRequest, jsonResponse, progress, observable } from 'get-it/middleware';
|
|
2
2
|
import { getIt } from 'get-it';
|
|
3
|
+
export { adapter as unstable__adapter, environment as unstable__environment } from 'get-it';
|
|
3
4
|
import { Observable, lastValueFrom } from 'rxjs';
|
|
4
5
|
import { map, filter } from 'rxjs/operators';
|
|
5
6
|
import polyfilledEventSource from '@sanity/eventsource';
|
|
6
7
|
var name = "@sanity/client";
|
|
7
|
-
var version = "5.
|
|
8
|
+
var version = "5.4.0";
|
|
8
9
|
const middleware = [debug({
|
|
9
10
|
verbose: true,
|
|
10
11
|
namespace: "sanity:client"
|
|
@@ -957,7 +958,7 @@ function _upload(client, httpRequest, assetType, body) {
|
|
|
957
958
|
});
|
|
958
959
|
}
|
|
959
960
|
function optionsFromFile(opts, file) {
|
|
960
|
-
if (typeof
|
|
961
|
+
if (typeof File === "undefined" || !(file instanceof File)) {
|
|
961
962
|
return opts;
|
|
962
963
|
}
|
|
963
964
|
return Object.assign({
|