@nocode-factory/sanity-kit 2.42.0 → 2.42.1
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/bin/ncf-kit.mjs +10 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/version.ts +1 -1
package/bin/ncf-kit.mjs
CHANGED
|
@@ -752,7 +752,16 @@ async function checkDeploy({quiet = false} = {}) {
|
|
|
752
752
|
const app = apps.find((a) => a.id === appId)
|
|
753
753
|
if (!app) return {level: 'ko', detail: `SANITY_STUDIO_APP_ID=${appId} n'est pas un Studio du projet ${projectId} : il vient sans doute d'un autre projet (dépôt dupliqué). Le vider pour créer le Studio de ce projet au déploiement.`}
|
|
754
754
|
if (hostname && app.appHost && app.appHost !== hostname) return {level: 'ko', detail: `SANITY_STUDIO_APP_ID=${appId} est le Studio « ${app.appHost} », pas « ${hostname} » : déployer l'écraserait. Mettre l'appId de ${hostname} (ou le vider).`}
|
|
755
|
-
|
|
755
|
+
// Le .env de CE poste fait le Studio déployé (non versionné) : un .env incomplet ou
|
|
756
|
+
// différent change le Studio de toute l'équipe (vécu : nom changé, aperçu de la
|
|
757
|
+
// préproduction bloqué « Blocked preview URL »). Bloquant.
|
|
758
|
+
const title = (env.SANITY_STUDIO_TITLE ?? '').trim()
|
|
759
|
+
if (app.title && title !== app.title)
|
|
760
|
+
return {level: 'ko', detail: `SANITY_STUDIO_TITLE=${title ? `« ${title} »` : '(absent)'} : le Studio s'appelle « ${app.title} », ce déploiement le renommerait${title ? '' : ' « Studio »'}. Mettre SANITY_STUDIO_TITLE="${app.title}" dans studio/.env.`}
|
|
761
|
+
for (const key of ['SANITY_STUDIO_PREVIEW_URL', 'SANITY_STUDIO_PREVIEW_URL_PREPROD'])
|
|
762
|
+
if (!/^https:\/\//.test(env[key] ?? ''))
|
|
763
|
+
return {level: 'ko', detail: `${key} absent du studio/.env de ce poste : le Studio déployé refuserait l'aperçu ${key.endsWith('PREPROD') ? 'de la préproduction' : 'du site'} (« Blocked preview URL »). Le recopier depuis un poste à jour ou Vercel (Settings → Domains).`}
|
|
764
|
+
return {level: 'ok', detail: `${app.appHost ?? appId}.sanity.studio, « ${app.title ?? title} »`}
|
|
756
765
|
}
|
|
757
766
|
|
|
758
767
|
// ─── translate-json : textes du site (fichiers de messages, titres du registre) ───
|
package/dist/index.d.ts
CHANGED
|
@@ -1096,7 +1096,7 @@ export declare function ActorName(props: {
|
|
|
1096
1096
|
* quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
|
|
1097
1097
|
* le vérifie.
|
|
1098
1098
|
*/
|
|
1099
|
-
export declare const KIT_VERSION = "2.42.
|
|
1099
|
+
export declare const KIT_VERSION = "2.42.1";
|
|
1100
1100
|
/**
|
|
1101
1101
|
* Données de la page proposées comme colonnes.
|
|
1102
1102
|
*
|
package/dist/index.js
CHANGED
|
@@ -1260,7 +1260,7 @@ function explainGrantError(error) {
|
|
|
1260
1260
|
* quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
|
|
1261
1261
|
* le vérifie.
|
|
1262
1262
|
*/
|
|
1263
|
-
const KIT_VERSION = "2.42.
|
|
1263
|
+
const KIT_VERSION = "2.42.1";
|
|
1264
1264
|
/**
|
|
1265
1265
|
* Signale ce Studio au service du kit, une fois par montage.
|
|
1266
1266
|
*
|
|
@@ -1603,7 +1603,7 @@ function useKitUpdate() {
|
|
|
1603
1603
|
!controller.signal.aborted && body?.version && setLatest(body.version);
|
|
1604
1604
|
}).catch(() => {}), () => controller.abort();
|
|
1605
1605
|
}, []);
|
|
1606
|
-
let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.42.
|
|
1606
|
+
let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.42.1") > 0);
|
|
1607
1607
|
return {
|
|
1608
1608
|
current: KIT_VERSION,
|
|
1609
1609
|
latest,
|