@ucm-kit/cli 0.1.143 → 0.1.149

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/README.md CHANGED
@@ -16,7 +16,7 @@ matches them.
16
16
  Requires Node 20 or later. At the root of the repository:
17
17
 
18
18
  ```sh
19
- npx --yes @ucm-kit/cli@0.1.143 init
19
+ npx --yes @ucm-kit/cli@0.1.149 init
20
20
  ```
21
21
 
22
22
  1. Commit and push the files `init` wrote.
@@ -27,7 +27,7 @@ npx --yes @ucm-kit/cli@0.1.143 init
27
27
  To run the check locally:
28
28
 
29
29
  ```sh
30
- npx --yes @ucm-kit/cli@0.1.143 check --report ci-report.md
30
+ npx --yes @ucm-kit/cli@0.1.149 check --report ci-report.md
31
31
  ```
32
32
 
33
33
  `--yes` skips the npx confirmation prompt. Pin an exact version, without `^`:
@@ -78,7 +78,7 @@ contract would resolve to the same file. A repository that does not write React
78
78
  states its own extension:
79
79
 
80
80
  ```sh
81
- npx --yes @ucm-kit/cli@0.1.143 init --components Sources/DesignSystem --implementation '{dir}/{id}.swift'
81
+ npx --yes @ucm-kit/cli@0.1.149 init --components Sources/DesignSystem --implementation '{dir}/{id}.swift'
82
82
  ```
83
83
 
84
84
  The three path options act only on a first install. `ucm init` never overwrites
@@ -188,7 +188,7 @@ directory. It writes a minimal report when the check stopped before writing
188
188
  one, then posts the report:
189
189
 
190
190
  ```sh
191
- npx --yes @ucm-kit/cli@0.1.143 rapport-gitlab --projet "$CI_PROJECT_ID" --merge-request "$CI_MERGE_REQUEST_IID" --fichier "$CI_PROJECT_DIR/ci-report.md" --api "$CI_API_V4_URL"
191
+ npx --yes @ucm-kit/cli@0.1.149 rapport-gitlab --projet "$CI_PROJECT_ID" --merge-request "$CI_MERGE_REQUEST_IID" --fichier "$CI_PROJECT_DIR/ci-report.md" --api "$CI_API_V4_URL"
192
192
  ```
193
193
 
194
194
  | Option | Effect |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ucm-kit/cli",
3
- "version": "0.1.143",
3
+ "version": "0.1.149",
4
4
  "description": "La ligne de commande UCM : initialiser un repository, lister ce qu'il doit couvrir.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -29,7 +29,7 @@
29
29
  "test": "node scripts/run-tests.cjs"
30
30
  },
31
31
  "dependencies": {
32
- "@ucm-kit/core": "0.14.10"
32
+ "@ucm-kit/core": "0.15.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "yaml": "^2.9.1"
package/src/aides.mjs CHANGED
@@ -16,6 +16,9 @@ import {
16
16
  marqueurDeCopie,
17
17
  sectionsARelire,
18
18
  } from "./conventions.mjs";
19
+ import { TYPES_D_ALERTE } from "@ucm-kit/core/referentiel";
20
+
21
+ const GLYPHES = Object.fromEntries(TYPES_D_ALERTE.map(({ id, texte }) => [id, texte]));
19
22
 
20
23
  export const DOSSIER_AIDES = fileURLToPath(new URL("../aides/", import.meta.url));
21
24
 
@@ -80,10 +83,10 @@ export function avertissements(conventions, chemin, racine, catalogue) {
80
83
  if (!conventions) return [];
81
84
  const ou = relative(racine, chemin).split("\\").join("/");
82
85
  return [
83
- ...conventions.anomalies.map((anomalie) => `⚠ ${ou} : ${anomalie}`),
86
+ ...conventions.anomalies.map((anomalie) => `${GLYPHES.corriger.brut} ${ou} : ${anomalie}`),
84
87
  ...sectionsARelire(conventions, catalogue).map(({ nom, version, sansEmpreinte }) => (sansEmpreinte
85
- ? `⚠ ${ou} : la section « ${nom} » copie l'écriture par défaut de la version ${version}, sans empreinte qui dise si elle a changé depuis. Comparez-la à \`ucm aides ${nom}\`.`
86
- : `⚠ ${ou} : la section « ${nom} » copie l'écriture par défaut de la version ${version}, qui a changé depuis. Relisez-la.`
88
+ ? `${GLYPHES.corriger.brut} ${ou} : la section « ${nom} » copie l'écriture par défaut de la version ${version}, sans empreinte qui dise si elle a changé depuis. Comparez-la à \`ucm aides ${nom}\`.`
89
+ : `${GLYPHES.corriger.brut} ${ou} : la section « ${nom} » copie l'écriture par défaut de la version ${version}, qui a changé depuis. Relisez-la.`
87
90
  )),
88
91
  ];
89
92
  }
package/src/guide.mjs CHANGED
@@ -35,6 +35,9 @@ import { avertissements, catalogueDesAides } from "./aides.mjs";
35
35
  import { contratsDuDossier } from "./contrats.mjs";
36
36
  import { conventionsLesPlusProches, lireConventions } from "./conventions.mjs";
37
37
  import { attributsDesAxes, memeFichier, refusDuGrapheDesTokens } from "./tokens-css.mjs";
38
+ import { TYPES_D_ALERTE } from "@ucm-kit/core/referentiel";
39
+
40
+ const GLYPHES = Object.fromEntries(TYPES_D_ALERTE.map(({ id, texte }) => [id, texte]));
38
41
 
39
42
  export const USAGE_GUIDE = "ucm guide <contrat> [--out <fichier>]";
40
43
 
@@ -219,7 +222,7 @@ export function pinsEnDesaccord(racine) {
219
222
  }
220
223
  if (new Set(trouves.map(({ version }) => version)).size < 2) return [];
221
224
  return [
222
- "⚠ Les pins de @ucm-kit/cli diffèrent : alignez-les sur une seule version.",
225
+ `${GLYPHES.corriger.brut} Les pins de @ucm-kit/cli diffèrent : alignez-les sur une seule version.`,
223
226
  ...trouves.map(({ chemin, version }) => ` ${chemin} : ${version}`),
224
227
  ];
225
228
  }
package/src/init.mjs CHANGED
@@ -38,6 +38,9 @@ import { MARQUEUR_RAPPORT, MARQUEUR_SANS_OBJET, lireConfiguration } from "@ucm-k
38
38
 
39
39
  import { NOM_ADAPTATEUR_TYPESCRIPT } from "./adaptateur.mjs";
40
40
  import { CHEMIN_CONVENTIONS } from "./conventions.mjs";
41
+ import { TYPES_D_ALERTE } from "@ucm-kit/core/referentiel";
42
+
43
+ const GLYPHES = Object.fromEntries(TYPES_D_ALERTE.map(({ id, texte }) => [id, texte]));
41
44
 
42
45
  /** Les options qui reçoivent un dossier, et la clé que chacune décide. */
43
46
  const OPTIONS_DE_DOSSIER = { "--components": "components", "--tokens": "tokens" };
@@ -489,7 +492,7 @@ function workflow(version) {
489
492
  // que le noyau aurait posé. Sans lui, le commentaire qu'il crée ne serait
490
493
  // retrouvé par aucune exécution suivante, et chaque push en empilerait un.
491
494
  ` ${MARQUEUR_RAPPORT}`,
492
- " ## ❌ La vérification n'a pas pu rendre son diagnostic",
495
+ ` ## ${GLYPHES.bloquant.forge} La vérification n'a pas pu rendre son diagnostic`,
493
496
  "",
494
497
  " Les contrôles se sont arrêtés avant d'avoir pu analyser cet export : le rapport habituel n'a pas été produit. **Votre design n'est pas en cause** et ré-exporter depuis Figma n'y changerait rien.",
495
498
  "",
@@ -649,7 +652,7 @@ function workflowGitlab(version) {
649
652
  " - |",
650
653
  " if [ ! -f ci-report.md ]; then",
651
654
  " printf '%s\\n\\n%s\\n\\n%s\\n' \\",
652
- " \"## ❌ La vérification n'a pas pu rendre son diagnostic\" \\",
655
+ ` "## ${GLYPHES.bloquant.forge} La vérification n'a pas pu rendre son diagnostic" \\`,
653
656
  " \"Les contrôles se sont arrêtés avant d'avoir pu analyser cet export : le rapport habituel n'a pas été produit. **Votre design n'est pas en cause** et réexporter depuis Figma n'y changerait rien.\" \\",
654
657
  " \"**Action attendue :** un développeur doit ouvrir [le pipeline de la CI]($CI_PIPELINE_URL) pour en connaître la raison.\" \\",
655
658
  " > ci-report.md",
@@ -833,7 +836,7 @@ export function rendreInit({
833
836
  lignes: restantes = [],
834
837
  }) {
835
838
  const lignes = [];
836
- for (const chemin of ecrits) lignes.push(`✓ ${chemin}`);
839
+ for (const chemin of ecrits) lignes.push(`${GLYPHES.tenu.brut} ${chemin}`);
837
840
  for (const chemin of conserves) lignes.push(`· ${chemin} existait déjà, laissé tel quel`);
838
841
  lignes.push("");
839
842
  // L'endroit vient de la configuration écrite, jamais d'une convention