@nocode-factory/sanity-kit 2.70.2 → 2.70.3
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/CHANGELOG.md +25 -1
- package/README.md +2 -2
- package/bin/ncf-kit.mjs +6 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useKitUpdate.ts +1 -1
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Journal des versions
|
|
2
2
|
|
|
3
|
+
## 2.70.3 : instructions Claude du dépôt, docs renommées
|
|
4
|
+
|
|
5
|
+
### Modifié
|
|
6
|
+
|
|
7
|
+
- **`doctor`, Langues : consignes** : cherche les trois règles des langues dans `CLAUDE.md` ET
|
|
8
|
+
dans `.claude/rules/*.md`. Le starter range désormais ces règles dans
|
|
9
|
+
`.claude/rules/i18n.md` : sans ce changement, un projet créé depuis le nouveau starter
|
|
10
|
+
recevrait une fausse alerte.
|
|
11
|
+
- **Consigne copiée par le bouton « Kit x.y.z » du Studio** : « push a branch to preprod »
|
|
12
|
+
devient « commit on `preprod` and push `preprod` (never another branch, never `main`) ».
|
|
13
|
+
L'ancienne formule faisait pousser une branche de travail par mise à jour sur GitHub,
|
|
14
|
+
contraire à la règle Git des projets (preprod, puis main après validation explicite).
|
|
15
|
+
- **`doctor`, purge du cache (webhook)** : le message renvoie à `docs/handover.md` du
|
|
16
|
+
starter (anciennement `PASSATION.md`, nom toujours valable dans les projets plus anciens).
|
|
17
|
+
- **Dépôt du kit** : un `CLAUDE.md` (aucune consigne n'était chargée par Claude Code) et
|
|
18
|
+
des docs renommées en anglais, en minuscules avec tirets : `install.md`,
|
|
19
|
+
`new-project-setup.md`, `conventions.md`, `decisions.md`, `publishing.md`,
|
|
20
|
+
`original-brief.md` (ex-`BRIEF.md` à la racine). `CHANGELOG.md` garde son nom (lu par
|
|
21
|
+
le code du kit).
|
|
22
|
+
|
|
23
|
+
### À brancher dans le projet
|
|
24
|
+
|
|
25
|
+
Rien.
|
|
26
|
+
|
|
3
27
|
## 2.70.2 : création dans chaque langue (correction de la consigne de la 2.70.1)
|
|
4
28
|
|
|
5
29
|
### Corrigé
|
|
@@ -2322,5 +2346,5 @@ columns 5, faq 4`, blocs imbriqués dans `section.columns` compris.
|
|
|
2322
2346
|
### À savoir
|
|
2323
2347
|
|
|
2324
2348
|
- Le playground utilise le dataset `staging` du projet `xrwnc0un`
|
|
2325
|
-
(voir `docs/
|
|
2349
|
+
(voir `docs/decisions.md`, point 6).
|
|
2326
2350
|
- Les trois outils n'affichent pas encore de données réelles : phases 2 à 4.
|
package/README.md
CHANGED
|
@@ -262,6 +262,6 @@ fetchpriority). `doctor` vérifie l'étape de CI.
|
|
|
262
262
|
|
|
263
263
|
## Documentation
|
|
264
264
|
|
|
265
|
-
Dans le dépôt `nocode-factory/ncf-sanity-kit` : `docs/
|
|
266
|
-
`docs/
|
|
265
|
+
Dans le dépôt `nocode-factory/ncf-sanity-kit` : `docs/install.md` (options),
|
|
266
|
+
`docs/new-project-setup.md` (prompt d'installation), `docs/CHANGELOG.md`. Le
|
|
267
267
|
starter `nocode-factory/sanity-next-starter` est déjà câblé de bout en bout.
|
package/bin/ncf-kit.mjs
CHANGED
|
@@ -549,8 +549,11 @@ async function doctor() {
|
|
|
549
549
|
: ok('Langues : titres du registre', 'complets')
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
// Consignes Claude : CLAUDE.md, et depuis le starter de nov. 2026 les règles par domaine (.claude/rules/).
|
|
553
|
+
const rulesDir = join(root, '.claude', 'rules')
|
|
554
|
+
const ruleFiles = existsSync(rulesDir) ? readdirSync(rulesDir).filter((f) => f.endsWith('.md')).map((f) => join(rulesDir, f)) : []
|
|
555
|
+
const rules = [join(root, 'CLAUDE.md'), ...ruleFiles].map(read).join('\n')
|
|
556
|
+
rules.trim() && !/trois règles/i.test(rules) && warn('Langues : consignes', need('les trois règles des langues dans les consignes Claude (CLAUDE.md ou .claude/rules/)', 'Claude ne les connaîtrait pas dans ce projet', 'reprendre .claude/rules/i18n.md du starter (bloc « LANGUES » du CLAUDE.md dans les anciens projets).'))
|
|
554
557
|
}
|
|
555
558
|
const hasDefaults = studioFiles.some((f) => /defineComponentDefaults\(|name:\s*['"]componentDefaults['"]/.test(read(f)))
|
|
556
559
|
if (!hasDefaults) {
|
|
@@ -718,7 +721,7 @@ async function doctor() {
|
|
|
718
721
|
const host = new URL(previewUrl).host
|
|
719
722
|
const hook = hooks.find((h) => typeof h.url === 'string' && /\/api\/revalidate/.test(h.url) && h.url.includes(host))
|
|
720
723
|
if (!list.ok) warn('Purge du cache (webhook)', `webhooks Sanity illisibles (${list.status}) : le jeton administre-t-il ce projet ?`)
|
|
721
|
-
else if (!hook) ko('Purge du cache (webhook)', `le kit a besoin d'un webhook Sanity vers ${endpoint} (purge du cache à la publication, relayée à la préprod) ; le projet ne l'a pas : Sanity → API → Webhooks, avec le secret SANITY_REVALIDATE_SECRET (voir
|
|
724
|
+
else if (!hook) ko('Purge du cache (webhook)', `le kit a besoin d'un webhook Sanity vers ${endpoint} (purge du cache à la publication, relayée à la préprod) ; le projet ne l'a pas : Sanity → API → Webhooks, avec le secret SANITY_REVALIDATE_SECRET (voir docs/handover.md du starter ; PASSATION.md dans les projets plus anciens).`)
|
|
722
725
|
else if (hook.isDisabled || hook.isDisabledByUser) ko('Purge du cache (webhook)', `webhook « ${hook.name} » désactivé : la publication ne purge plus le cache.`)
|
|
723
726
|
else ok('Purge du cache (webhook)', `« ${hook.name} » → ${hook.url.split('?')[0]}`) // jamais le secret à l'écran
|
|
724
727
|
} else warn('Purge du cache (webhook)', 'non vérifié : SANITY_STUDIO_PROJECT_ID ou jeton Sanity absent (npx sanity login).')
|
package/dist/index.d.ts
CHANGED
|
@@ -1509,7 +1509,7 @@ export declare function ActorName(props: {
|
|
|
1509
1509
|
* quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
|
|
1510
1510
|
* le vérifie.
|
|
1511
1511
|
*/
|
|
1512
|
-
export declare const KIT_VERSION = "2.70.
|
|
1512
|
+
export declare const KIT_VERSION = "2.70.3";
|
|
1513
1513
|
/**
|
|
1514
1514
|
* Données de la page proposées comme colonnes.
|
|
1515
1515
|
*
|
package/dist/index.js
CHANGED
|
@@ -1485,7 +1485,7 @@ function explainGrantError(error) {
|
|
|
1485
1485
|
* quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
|
|
1486
1486
|
* le vérifie.
|
|
1487
1487
|
*/
|
|
1488
|
-
const KIT_VERSION = "2.70.
|
|
1488
|
+
const KIT_VERSION = "2.70.3";
|
|
1489
1489
|
/**
|
|
1490
1490
|
* Signale ce Studio au service du kit, une fois par montage.
|
|
1491
1491
|
*
|
|
@@ -1969,7 +1969,7 @@ function upgradePrompt(latest) {
|
|
|
1969
1969
|
`1. From studio/, run \`${UPGRADE_COMMAND}\` (never a plain npm install: it shows nothing of what is left to do).`,
|
|
1970
1970
|
"2. Wire everything it lists under \"À brancher dans le projet\", taking the code from the starter (nocode-factory/sanity-next-starter).",
|
|
1971
1971
|
"3. Fix every ✖ reported by `npx ncf-kit doctor` until there are none (list items without _type: `npx ncf-kit item-types`, then `--apply`).",
|
|
1972
|
-
"4. Typecheck and build web/, deploy the Studio (`npm run deploy` in studio/),
|
|
1972
|
+
"4. Typecheck and build web/, deploy the Studio (`npm run deploy` in studio/), commit on `preprod` and push `preprod` (never another branch, never `main`: production only after my explicit validation), then tell me in plain words what changed and what to check."
|
|
1973
1973
|
].join("\n");
|
|
1974
1974
|
}
|
|
1975
1975
|
/**
|
|
@@ -1993,7 +1993,7 @@ function useKitUpdate() {
|
|
|
1993
1993
|
!controller.signal.aborted && body?.version && setLatest(body.version);
|
|
1994
1994
|
}).catch(() => {}), () => controller.abort();
|
|
1995
1995
|
}, []);
|
|
1996
|
-
let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.70.
|
|
1996
|
+
let available = !!(latest && !isPrerelease(latest) && compareVersions(latest, "2.70.3") > 0);
|
|
1997
1997
|
return {
|
|
1998
1998
|
current: KIT_VERSION,
|
|
1999
1999
|
latest,
|