@nocode-factory/sanity-kit 2.11.0 → 2.12.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.js CHANGED
@@ -1621,12 +1621,12 @@ function useOpenOnline() {
1621
1621
  let { projectId, dataset, token } = client.config();
1622
1622
  if (!projectId || !dataset) throw Error("unknown_project");
1623
1623
  let key = `${config.serviceEndpoint}|${projectId}|${dataset}`, grant = cache.get(key);
1624
- (!grant || new Date(grant.expiresAt).getTime() - Date.now() < 36e5) && (grant = await requestPreviewGrant(config.serviceEndpoint, {
1624
+ (!grant || new Date(grant.expiresAt).getTime() - Date.now() < 864e5) && (grant = await requestPreviewGrant(config.serviceEndpoint, {
1625
1625
  projectId,
1626
1626
  dataset,
1627
1627
  sanityToken: token ?? "",
1628
1628
  label: "Ouverture depuis le Studio",
1629
- days: 1
1629
+ days: 30
1630
1630
  }), cache.set(key, grant));
1631
1631
  let signed = onlineUrl(environment, perspective, {
1632
1632
  path: options.path,