@roomi-fields/grillhouse 0.31.0 → 0.33.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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +40 -0
- package/bin/grillhouse.mjs +6 -4
- package/cadre/templates/projet/.github/workflows/ci.yml +136 -16
- package/cadre/templates/projet/.github/workflows/nuit.yml +111 -0
- package/cadre/templates/projet/deployment/docs/01-INSTALL.md +4 -4
- package/cadre/templates/projet/package.json +2 -2
- package/charte.md +8 -5
- package/dist/temporal/circuit/contrat.d.ts +15 -0
- package/dist/temporal/circuit/deroule.js +37 -14
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/deroules.d.ts +1 -0
- package/dist/temporal/deroules.js +3 -1
- package/dist/temporal/deroules.js.map +1 -1
- package/dist/temporal/file/activites.d.ts +1 -0
- package/dist/temporal/file/activites.js +5 -2
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +50 -33
- package/dist/temporal/file/contrat.js +2 -2
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.d.ts +3 -1
- package/dist/temporal/file/deroule.js +128 -26
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/installation.d.ts +3 -2
- package/dist/temporal/installation.js +7 -4
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/nuits/activites.d.ts +10 -0
- package/dist/temporal/nuits/activites.js +114 -0
- package/dist/temporal/nuits/activites.js.map +1 -0
- package/dist/temporal/nuits/appel.d.ts +23 -0
- package/dist/temporal/nuits/appel.js +40 -0
- package/dist/temporal/nuits/appel.js.map +1 -0
- package/dist/temporal/nuits/choix.d.ts +14 -0
- package/dist/temporal/nuits/choix.js +119 -0
- package/dist/temporal/nuits/choix.js.map +1 -0
- package/dist/temporal/nuits/client.d.ts +28 -0
- package/dist/temporal/nuits/client.js +83 -0
- package/dist/temporal/nuits/client.js.map +1 -0
- package/dist/temporal/nuits/commande.d.ts +2 -0
- package/dist/temporal/nuits/commande.js +107 -0
- package/dist/temporal/nuits/commande.js.map +1 -0
- package/dist/temporal/nuits/contrat.d.ts +98 -0
- package/dist/temporal/nuits/contrat.js +30 -0
- package/dist/temporal/nuits/contrat.js.map +1 -0
- package/dist/temporal/nuits/deroule.d.ts +5 -0
- package/dist/temporal/nuits/deroule.js +100 -0
- package/dist/temporal/nuits/deroule.js.map +1 -0
- package/dist/temporal/tickets/activites.d.ts +1 -0
- package/dist/temporal/tickets/activites.js +5 -0
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +10 -0
- package/dist/temporal/tickets/deroule.js +8 -1
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/dist/temporal/travailleur.js +4 -1
- package/dist/temporal/travailleur.js.map +1 -1
- package/docs/ARCHITECTURE.md +257 -54
- package/docs/CADRE.md +41 -1
- package/docs/INTERFACE.md +54 -7
- package/hooks/hooks.json +4 -0
- package/hooks/register.tsx +11 -3
- package/package.json +4 -1
- package/scripts/abi-des-dependances.mjs +105 -0
- package/scripts/activites.mjs +99 -48
- package/scripts/aiguillage.mjs +3 -0
- package/scripts/attente-au-tour.mjs +99 -0
- package/scripts/avancement.mjs +8 -18
- package/scripts/base-des-workflows.mjs +57 -0
- package/scripts/ci-des-branches.mjs +91 -0
- package/scripts/circuit.mjs +99 -5
- package/scripts/composants-affectes.mjs +24 -7
- package/scripts/composition-des-langages.mjs +3 -0
- package/scripts/copies-finies.mjs +8 -1
- package/scripts/crochets.mjs +4 -0
- package/scripts/dernier-vert.mjs +30 -4
- package/scripts/effets.mjs +9 -0
- package/scripts/enveloppe/enveloppe.mjs +3 -1
- package/scripts/enveloppe/lancer.sh +1 -1
- package/scripts/enveloppe/travail-de-la-copie.mjs +219 -59
- package/scripts/etapes.mjs +19 -2
- package/scripts/faits-du-circuit.mjs +43 -20
- package/scripts/fichier-du-poste.mjs +87 -0
- package/scripts/grillhouse-maj.mjs +15 -1
- package/scripts/integration/file.mjs +215 -275
- package/scripts/integration/integrer.mjs +82 -41
- package/scripts/integration/rejeu.mjs +13 -64
- package/scripts/jointure.d.ts +30 -2
- package/scripts/journal-des-etats.d.mts +41 -0
- package/scripts/journal-des-etats.mjs +273 -0
- package/scripts/journal.mjs +119 -0
- package/scripts/langages/cargo/commandes.mjs +81 -19
- package/scripts/langages/cargo/exemples.mjs +2 -2
- package/scripts/langages/cargo/index.mjs +14 -5
- package/scripts/langages/cargo/tailles-des-tests.mjs +19 -11
- package/scripts/langages/python/commandes.mjs +11 -7
- package/scripts/langages/python/exemples.mjs +1 -1
- package/scripts/langages/python/index.mjs +11 -2
- package/scripts/langages/python/tailles-des-tests.mjs +19 -11
- package/scripts/langages/typescript/code-mort.mjs +41 -24
- package/scripts/langages/typescript/consommateurs.mjs +28 -17
- package/scripts/langages/typescript/exemples.mjs +2 -0
- package/scripts/langages/typescript/frontieres.mjs +46 -0
- package/scripts/langages/typescript/index.mjs +24 -3
- package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +34 -0
- package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +31 -0
- package/scripts/langages/typescript/resumes.mjs +17 -7
- package/scripts/langages/typescript/tailles-des-tests.mjs +251 -22
- package/scripts/langages/typescript/tests-de-nuit.mjs +101 -9
- package/scripts/langages/typescript/tests-du-poste.mjs +172 -0
- package/scripts/langages/typescript/tranches.mjs +273 -0
- package/scripts/langages/typescript/verifier.mjs +154 -23
- package/scripts/langages/typescript/vitest-config/base.mjs +3 -0
- package/scripts/langages/typescript/vitest-config/cibles.mjs +78 -7
- package/scripts/langages/typescript/vitest-config/lances.mjs +4 -4
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +9 -0
- package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
- package/scripts/langages.d.mts +20 -0
- package/scripts/lint-des-scripts.mjs +23 -6
- package/scripts/matiere-de-test.d.ts +11 -0
- package/scripts/migrations/0.33.0-cache-distant.mjs +36 -0
- package/scripts/migrations/0.33.0-ci-des-branches-de-ticket.mjs +31 -0
- package/scripts/migrations/0.33.0-ci-du-cadre.mjs +31 -0
- package/scripts/migrations/0.33.0-node-26.mjs +58 -0
- package/scripts/migrations.mjs +8 -0
- package/scripts/newday.mjs +18 -0
- package/scripts/nuit.sh +40 -13
- package/scripts/places-de-la-machine.mjs +6 -0
- package/scripts/registre.d.mts +90 -0
- package/scripts/registre.mjs +28 -3
- package/scripts/reprise.mjs +12 -8
- package/scripts/services-du-noyau.mjs +4 -0
- package/scripts/session-start.sh +28 -32
- package/scripts/sous-commandes.mjs +31 -10
- package/scripts/superviseur.mjs +127 -75
- package/scripts/tableau.mjs +222 -17
- package/scripts/taches-du-graphe.mjs +39 -6
- package/scripts/ticket-du-circuit.mjs +37 -7
- package/scripts/transitions.mjs +60 -8
- package/scripts/verrou-de-machine.mjs +1 -2
- package/scripts/workflows-du-cadre.mjs +75 -0
- package/skills/developpeur/SKILL.md +1 -1
- package/skills/explorateur/SKILL.md +1 -1
- package/skills/grill/SKILL.md +10 -62
- package/skills/grill/references/paquets.md +60 -0
- package/skills/pitmaster/SKILL.md +21 -31
- package/skills/questionneur/SKILL.md +1 -1
- package/skills/relecteur/SKILL.md +1 -1
- package/skills/testwriter/SKILL.md +7 -1
- package/skills/release/SKILL.md +0 -134
- package/skills/release/scripts/update-version.cjs +0 -92
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// The variables of the poste a tool of a language reads: a file of the poste, out of every
|
|
2
|
+
// repository, under the frame's directory of configuration (`$XDG_CONFIG_HOME/grillhouse/`,
|
|
3
|
+
// `~/.config/grillhouse/` without it, as the XDG Base Directory Specification places a user's
|
|
4
|
+
// configuration), whose name the module of the language gives (`environnementDuPoste`,
|
|
5
|
+
// scripts/jointure.d.ts): the server of a remote cache, its token, which never enter a
|
|
6
|
+
// repository.
|
|
7
|
+
//
|
|
8
|
+
// - The file holds one `VARIABLE=valeur` per line, as a `.env` of the shell: `export ` before the
|
|
9
|
+
// name, a value between quotes, a blank line and a line of comment (`#`) are read too; any
|
|
10
|
+
// other line is passed over.
|
|
11
|
+
// - The caller decides: when the environment already holds one of the file's variables (a CI
|
|
12
|
+
// that names its own server, empty or not), the file is not applied, and the environment stays
|
|
13
|
+
// as it is. Otherwise the file's variables enter, then the additions of the module (the cache
|
|
14
|
+
// read-only).
|
|
15
|
+
// - A file absent or unreadable, an environment without HOME nor XDG_CONFIG_HOME (the session of
|
|
16
|
+
// an agent, whose home the envelope empties, has no such file): the environment stays as it
|
|
17
|
+
// is.
|
|
18
|
+
import { readFileSync } from 'node:fs';
|
|
19
|
+
import path from 'node:path';
|
|
20
|
+
|
|
21
|
+
const NOM = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The frame's directory of configuration on the poste, from <env>: `$XDG_CONFIG_HOME/grillhouse`,
|
|
25
|
+
* `$HOME/.config/grillhouse` without it; null without either.
|
|
26
|
+
* @param {Record<string, string | undefined>} env
|
|
27
|
+
* @returns {string | null}
|
|
28
|
+
*/
|
|
29
|
+
export function configurationDuPoste(env) {
|
|
30
|
+
const base = env.XDG_CONFIG_HOME || (env.HOME ? path.join(env.HOME, '.config') : '');
|
|
31
|
+
return base ? path.join(base, 'grillhouse') : null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The variables of the text <texte> of a file of the poste (see the header).
|
|
36
|
+
* @param {string} texte
|
|
37
|
+
* @returns {Record<string, string>}
|
|
38
|
+
*/
|
|
39
|
+
export function variablesDuTexte(texte) {
|
|
40
|
+
/** @type {Record<string, string>} */
|
|
41
|
+
const variables = {};
|
|
42
|
+
for (const brute of texte.split('\n')) {
|
|
43
|
+
const ligne = brute.trim().replace(/^export\s+/, '');
|
|
44
|
+
const egal = ligne.indexOf('=');
|
|
45
|
+
if (ligne.startsWith('#') || egal <= 0) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const nom = ligne.slice(0, egal).trim();
|
|
49
|
+
let valeur = ligne.slice(egal + 1).trim();
|
|
50
|
+
if (/^(['"]).*\1$/.test(valeur) && valeur.length >= 2) {
|
|
51
|
+
valeur = valeur.slice(1, -1);
|
|
52
|
+
}
|
|
53
|
+
if (NOM.test(nom)) {
|
|
54
|
+
variables[nom] = valeur;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return variables;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// The text of <fichier>, or null when it does not read.
|
|
61
|
+
const lireLeFichier = fichier => {
|
|
62
|
+
try {
|
|
63
|
+
return readFileSync(fichier, 'utf8');
|
|
64
|
+
} catch {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The environment <env> with the variables of the file <fichier> of the poste, then <ajouts>; <env>
|
|
71
|
+
* itself when the file is absent, holds no variable, or names one that <env> already holds (see
|
|
72
|
+
* the header).
|
|
73
|
+
* @template {Record<string, string | undefined>} T
|
|
74
|
+
* @param {T} env
|
|
75
|
+
* @param {{ fichier: string, ajouts?: Record<string, string>, lire?: (f: string) => string | null }} o
|
|
76
|
+
* @returns {T}
|
|
77
|
+
*/
|
|
78
|
+
export function avecLeFichierDuPoste(env, { fichier, ajouts = {}, lire = lireLeFichier }) {
|
|
79
|
+
const dossier = configurationDuPoste(env);
|
|
80
|
+
const texte = dossier === null ? null : lire(path.join(dossier, fichier));
|
|
81
|
+
const variables = texte === null ? {} : variablesDuTexte(texte);
|
|
82
|
+
const noms = Object.keys(variables);
|
|
83
|
+
if (noms.length === 0 || noms.some(n => env[n] !== undefined)) {
|
|
84
|
+
return env;
|
|
85
|
+
}
|
|
86
|
+
return { ...env, ...variables, ...ajouts };
|
|
87
|
+
}
|
|
@@ -22,7 +22,13 @@
|
|
|
22
22
|
// migration played, scripts/migrations.mjs: in 0.24.0, a file that still calls a former copy of
|
|
23
23
|
// the frame; in 0.24.2, API Extractor still declared by the project) is reported on the standard output, « reste au projet », with no effect on the exit
|
|
24
24
|
// code nor on the version recorded.
|
|
25
|
-
// - The frame
|
|
25
|
+
// - The frame's workflows of GitHub Actions (scripts/workflows-du-cadre.mjs): each workflow of the
|
|
26
|
+
// template's `.github/workflows/` (the CI of a lot, `ci.yml`; the night of a shared machine,
|
|
27
|
+
// `nuit.yml`) that the project holds with the frame's mark on its first line is rewritten when
|
|
28
|
+
// it differs, and one it lacks is written once the project holds one of them; a workflow without
|
|
29
|
+
// the mark is the project's, and stays. Their machine is the repository's variable RUNNER on
|
|
30
|
+
// GitHub, which no file holds. The report names each workflow written.
|
|
31
|
+
// - The frame copies no other file into a project: its scripts are the package's, its skills, agents,
|
|
26
32
|
// hooks of Claude Code, common charter and meta-frame the plugin's, which the package carries
|
|
27
33
|
// (scripts/cadre.mjs): the frame arrives in one piece, at the version npm installs.
|
|
28
34
|
// - The frame's plugin is a setting of the project: in a project whose `.claude/settings.json`
|
|
@@ -149,6 +155,7 @@ import { installerGreffons } from './greffons.mjs';
|
|
|
149
155
|
import { migrer, restesAuProjet } from './migrations.mjs';
|
|
150
156
|
import { langageDe, langagesDe } from './langages.mjs';
|
|
151
157
|
import * as langagesDansLArchitecture from './migrations/0.27.0-langages-dans-l-architecture.mjs';
|
|
158
|
+
import { poserLesWorkflows } from './workflows-du-cadre.mjs';
|
|
152
159
|
|
|
153
160
|
const SCRIPTS = {
|
|
154
161
|
tableau: 'grillhouse tableau --texte',
|
|
@@ -321,6 +328,7 @@ export function mettreAJour(projet, source, { inscrite = VERSION } = {}) {
|
|
|
321
328
|
gardes: null,
|
|
322
329
|
ligneEtat: false,
|
|
323
330
|
greffon: false,
|
|
331
|
+
workflows: [],
|
|
324
332
|
duLangage: { lignes: [], aFaire: [], installer: false, sansVerifier: null },
|
|
325
333
|
};
|
|
326
334
|
const pkg = path.join(projet, 'package.json');
|
|
@@ -431,6 +439,7 @@ export function mettreAJour(projet, source, { inscrite = VERSION } = {}) {
|
|
|
431
439
|
bilan.greffon = declarerGreffon(projet);
|
|
432
440
|
poserCrochets(projet);
|
|
433
441
|
attribuer(projet);
|
|
442
|
+
bilan.workflows = poserLesWorkflows(projet, source);
|
|
434
443
|
return bilan;
|
|
435
444
|
}
|
|
436
445
|
|
|
@@ -544,6 +553,11 @@ export function rapport(b) {
|
|
|
544
553
|
`Greffon du cadre : .claude/settings.json déclare la place de marché ${MARCHE_DU_CADRE} (${SOURCE_DU_MARCHE.repo}) et active ${GREFFON_DU_CADRE}.`
|
|
545
554
|
);
|
|
546
555
|
}
|
|
556
|
+
if (b.workflows?.length > 0) {
|
|
557
|
+
lignes.push(
|
|
558
|
+
`Workflows du cadre : ${b.workflows.join(', ')} écrit(s) depuis le gabarit ; leur machine est la variable RUNNER du dépôt sur GitHub (ubuntu-latest sans elle), que la mise à jour ne touche pas.`
|
|
559
|
+
);
|
|
560
|
+
}
|
|
547
561
|
if (b.gardes?.deplace) {
|
|
548
562
|
lignes.push(
|
|
549
563
|
`Gardes du projet : le script integration:gardes devient gardes, que \`npm run verifier\` joue à côté des tests.`
|