@sanity/client 7.2.1 → 7.3.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.cjs CHANGED
@@ -568,7 +568,9 @@ class ObservableTransaction extends BaseTransaction {
568
568
  }
569
569
  const projectHeader = "X-Sanity-Project-ID";
570
570
  function requestOptions(config2, overrides = {}) {
571
- const headers = {}, token = overrides.token || config2.token;
571
+ const headers = {};
572
+ config2.headers && Object.assign(headers, config2.headers);
573
+ const token = overrides.token || config2.token;
572
574
  token && (headers.Authorization = `Bearer ${token}`), !overrides.useGlobalApi && !config2.useProjectHostname && config2.projectId && (headers[projectHeader] = config2.projectId);
573
575
  const withCredentials = !!(typeof overrides.withCredentials > "u" ? config2.withCredentials : overrides.withCredentials), timeout = typeof overrides.timeout > "u" ? config2.timeout : overrides.timeout;
574
576
  return Object.assign({}, overrides, {
@@ -2401,7 +2403,7 @@ function defineDeprecatedCreateClient(createClient2) {
2401
2403
  return config.printNoDefaultExport(), createClient2(config$1);
2402
2404
  };
2403
2405
  }
2404
- var name = "@sanity/client", version = "7.2.1";
2406
+ var name = "@sanity/client", version = "7.3.0";
2405
2407
  const middleware = [
2406
2408
  middleware$1.debug({ verbose: !0, namespace: "sanity:client" }),
2407
2409
  middleware$1.headers({ "User-Agent": `${name} ${version}` }),