@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 CHANGED
@@ -738,7 +738,7 @@ An important note on this approach is that you cannot call `commit()` on transac
738
738
  Assets can be uploaded using the `client.assets.upload(...)` method.
739
739
 
740
740
  ```
741
- client.assets.upload(type: 'file' | image', body: File | Blob | Buffer | NodeStream, options = {}): Promise<AssetDocument>
741
+ client.assets.upload(type: 'file' | image', body: File | Blob | Buffer | NodeJS.ReadableStream, options = {}): Promise<AssetDocument>
742
742
  ```
743
743
 
744
744
  👉 Read more about [assets in Sanity](https://sanity.io/docs/assets)
@@ -959,7 +959,7 @@ function _upload(client, httpRequest, assetType, body) {
959
959
  });
960
960
  }
961
961
  function optionsFromFile(opts, file) {
962
- if (typeof window === "undefined" || !(file instanceof window.File)) {
962
+ if (typeof File === "undefined" || !(file instanceof File)) {
963
963
  return opts;
964
964
  }
965
965
  return Object.assign({
@@ -1756,6 +1756,18 @@ function deprecatedCreateClient(config) {
1756
1756
  printNoDefaultExport();
1757
1757
  return new SanityClient(httpRequest, config);
1758
1758
  }
1759
+ Object.defineProperty(exports, 'unstable__adapter', {
1760
+ enumerable: true,
1761
+ get: function () {
1762
+ return getIt.adapter;
1763
+ }
1764
+ });
1765
+ Object.defineProperty(exports, 'unstable__environment', {
1766
+ enumerable: true,
1767
+ get: function () {
1768
+ return getIt.environment;
1769
+ }
1770
+ });
1759
1771
  exports.BasePatch = BasePatch;
1760
1772
  exports.BaseTransaction = BaseTransaction;
1761
1773
  exports.ClientError = ClientError;