@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.cjs
CHANGED
|
@@ -15,7 +15,7 @@ function _interopDefaultCompat(e) {
|
|
|
15
15
|
}
|
|
16
16
|
var polyfilledEventSource__default = /*#__PURE__*/_interopDefaultCompat(polyfilledEventSource);
|
|
17
17
|
var name = "@sanity/client";
|
|
18
|
-
var version = "5.
|
|
18
|
+
var version = "5.4.0";
|
|
19
19
|
const middleware = [middleware$1.debug({
|
|
20
20
|
verbose: true,
|
|
21
21
|
namespace: "sanity:client"
|
|
@@ -968,7 +968,7 @@ function _upload(client, httpRequest, assetType, body) {
|
|
|
968
968
|
});
|
|
969
969
|
}
|
|
970
970
|
function optionsFromFile(opts, file) {
|
|
971
|
-
if (typeof
|
|
971
|
+
if (typeof File === "undefined" || !(file instanceof File)) {
|
|
972
972
|
return opts;
|
|
973
973
|
}
|
|
974
974
|
return Object.assign({
|
|
@@ -1765,6 +1765,18 @@ function deprecatedCreateClient(config) {
|
|
|
1765
1765
|
printNoDefaultExport();
|
|
1766
1766
|
return new SanityClient(httpRequest, config);
|
|
1767
1767
|
}
|
|
1768
|
+
Object.defineProperty(exports, 'unstable__adapter', {
|
|
1769
|
+
enumerable: true,
|
|
1770
|
+
get: function () {
|
|
1771
|
+
return getIt.adapter;
|
|
1772
|
+
}
|
|
1773
|
+
});
|
|
1774
|
+
Object.defineProperty(exports, 'unstable__environment', {
|
|
1775
|
+
enumerable: true,
|
|
1776
|
+
get: function () {
|
|
1777
|
+
return getIt.environment;
|
|
1778
|
+
}
|
|
1779
|
+
});
|
|
1768
1780
|
exports.BasePatch = BasePatch;
|
|
1769
1781
|
exports.BaseTransaction = BaseTransaction;
|
|
1770
1782
|
exports.ClientError = ClientError;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import cjs from './index.cjs';
|
|
2
2
|
|
|
3
|
+
export const unstable__adapter = cjs.unstable__adapter;
|
|
4
|
+
export const unstable__environment = cjs.unstable__environment;
|
|
3
5
|
export const BasePatch = cjs.BasePatch;
|
|
4
6
|
export const BaseTransaction = cjs.BaseTransaction;
|
|
5
7
|
export const ClientError = cjs.ClientError;
|