@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/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.3.2";
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 window === "undefined" || !(file instanceof window.File)) {
961
+ if (typeof File === "undefined" || !(file instanceof File)) {
961
962
  return opts;
962
963
  }
963
964
  return Object.assign({