@sanity/client 6.24.0 → 6.24.2-canary.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.
Files changed (45) hide show
  1. package/dist/_chunks-cjs/resolveEditInfo.cjs +1 -2
  2. package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
  3. package/dist/_chunks-cjs/stegaClean.cjs +1 -2
  4. package/dist/_chunks-cjs/stegaClean.cjs.map +1 -1
  5. package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +1 -2
  6. package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
  7. package/dist/_chunks-es/resolveEditInfo.js +1 -2
  8. package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
  9. package/dist/_chunks-es/stegaClean.js +1 -2
  10. package/dist/_chunks-es/stegaClean.js.map +1 -1
  11. package/dist/_chunks-es/stegaEncodeSourceMap.js +1 -2
  12. package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
  13. package/dist/csm.cjs +1 -2
  14. package/dist/csm.cjs.map +1 -1
  15. package/dist/csm.d.cts +99 -34
  16. package/dist/csm.d.ts +99 -34
  17. package/dist/csm.js +1 -2
  18. package/dist/csm.js.map +1 -1
  19. package/dist/index.browser.cjs +4 -4
  20. package/dist/index.browser.cjs.map +1 -1
  21. package/dist/index.browser.d.cts +6 -5
  22. package/dist/index.browser.d.ts +6 -5
  23. package/dist/index.browser.js +4 -4
  24. package/dist/index.browser.js.map +1 -1
  25. package/dist/index.cjs +5 -5
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +6 -5
  28. package/dist/index.d.ts +6 -5
  29. package/dist/index.js +5 -5
  30. package/dist/index.js.map +1 -1
  31. package/dist/stega.browser.d.cts +3312 -98
  32. package/dist/stega.browser.d.ts +3312 -98
  33. package/dist/stega.d.cts +3312 -98
  34. package/dist/stega.d.ts +3312 -98
  35. package/package.json +16 -16
  36. package/src/config.ts +3 -1
  37. package/src/csm/types.ts +1 -1
  38. package/src/http/request.ts +1 -1
  39. package/src/index.browser.ts +1 -1
  40. package/src/index.ts +1 -1
  41. package/src/stega/stegaEncodeSourceMap.ts +5 -1
  42. package/src/util/pick.ts +1 -1
  43. package/src/warnings.ts +1 -1
  44. package/umd/sanityClient.js +102 -117
  45. package/umd/sanityClient.min.js +2 -2
@@ -116,8 +116,7 @@ function defineHttpRequest(envMiddleware2) {
116
116
  ]);
117
117
  }
118
118
  function shouldRetry(err, attempt, options) {
119
- if (options.maxRetries === 0)
120
- return !1;
119
+ if (options.maxRetries === 0) return !1;
121
120
  const isSafe = options.method === "GET" || options.method === "HEAD", isQuery = (options.uri || options.url).startsWith("/data/query"), isRetriableResponse = err.response && (err.response.statusCode === 429 || err.response.statusCode === 502 || err.response.statusCode === 503);
122
121
  return (isSafe || isQuery) && isRetriableResponse ? !0 : middleware.retry.shouldRetry(err, attempt, options);
123
122
  }
@@ -207,7 +206,7 @@ function validateApiVersion(apiVersion) {
207
206
  if (!(/^\d{4}-\d{2}-\d{2}$/.test(apiVersion) && apiDate instanceof Date && apiDate.getTime() > 0))
208
207
  throw new Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`");
209
208
  }
210
- const validateApiPerspective = function(perspective) {
209
+ function validateApiPerspective(perspective) {
211
210
  if (Array.isArray(perspective)) {
212
211
  for (const perspectiveValue of perspective)
213
212
  if (perspectiveValue !== "published" && perspectiveValue !== "drafts" && !(typeof perspectiveValue == "string" && perspectiveValue.startsWith("r") && perspectiveValue !== "raw"))
@@ -227,7 +226,8 @@ const validateApiPerspective = function(perspective) {
227
226
  "Invalid API perspective string, expected `published`, `previewDrafts` or `raw`"
228
227
  );
229
228
  }
230
- }, initConfig = (config, prevConfig) => {
229
+ }
230
+ const initConfig = (config, prevConfig) => {
231
231
  const specifiedConfig = {
232
232
  ...prevConfig,
233
233
  ...config,