@sanity/client 5.3.1 → 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 +15 -6
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
- package/src/assets/AssetsClient.ts +11 -10
- package/src/index.browser.ts +3 -0
- package/src/index.ts +3 -0
- package/src/types.ts +9 -0
- package/umd/sanityClient.js +11 -4
- package/umd/sanityClient.min.js +3 -3
package/dist/index.browser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getIt } from 'get-it';
|
|
2
|
+
export { adapter as unstable__adapter, environment as unstable__environment } from 'get-it';
|
|
2
3
|
import { jsonRequest, jsonResponse, progress, observable } from 'get-it/middleware';
|
|
3
4
|
import { Observable, lastValueFrom } from 'rxjs';
|
|
4
5
|
import { map, filter } from 'rxjs/operators';
|
|
@@ -948,7 +949,7 @@ function _upload(client, httpRequest, assetType, body) {
|
|
|
948
949
|
});
|
|
949
950
|
}
|
|
950
951
|
function optionsFromFile(opts, file) {
|
|
951
|
-
if (typeof
|
|
952
|
+
if (typeof File === "undefined" || !(file instanceof File)) {
|
|
952
953
|
return opts;
|
|
953
954
|
}
|
|
954
955
|
return Object.assign({
|