@roomi-fields/grillhouse 0.26.0 → 0.28.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/agents/explorateur.md +1 -1
- package/cadre/templates/paquet/docs/CADRE.md +36 -0
- package/cadre/templates/paquet/docs/INTERFACE.md +10 -0
- package/cadre/templates/projet/CLAUDE.md +7 -0
- package/cadre/templates/projet/docs/ARCHITECTURE.md +15 -0
- package/cadre/templates/python/package.json +18 -0
- package/charte.md +48 -1
- package/docs/ARCHITECTURE.md +113 -20
- package/docs/CADRE.md +7 -6
- package/docs/INTERFACE.md +111 -32
- package/package.json +1 -1
- package/scripts/circuit.mjs +304 -40
- package/scripts/commande-du-langage.mjs +2 -2
- package/scripts/commandes-composees.mjs +156 -0
- package/scripts/composition-des-langages.mjs +306 -0
- package/scripts/conformite.mjs +1 -3
- package/scripts/dernier-vert.mjs +15 -2
- package/scripts/engendres.mjs +170 -0
- package/scripts/enveloppe/lancer.sh +10 -6
- package/scripts/enveloppe/travail-de-la-copie.mjs +82 -8
- package/scripts/etapes.mjs +18 -5
- package/scripts/gardes-du-cadre.mjs +7 -4
- package/scripts/grillhouse-maj.mjs +157 -103
- package/scripts/index-interfaces.mjs +78 -0
- package/scripts/init.mjs +5 -5
- package/scripts/integration/file.mjs +74 -13
- package/scripts/integration/integrer.mjs +50 -62
- package/scripts/jointure.d.ts +44 -13
- package/scripts/langages/cargo/binaires.mjs +29 -6
- package/scripts/langages/cargo/clippy.mjs +4 -2
- package/scripts/langages/cargo/commandes.mjs +45 -7
- package/scripts/langages/cargo/exemples.mjs +1 -15
- package/scripts/langages/cargo/index-interfaces.mjs +20 -3
- package/scripts/langages/cargo/index.mjs +12 -10
- package/scripts/langages/cargo/mise-a-jour.mjs +2 -1
- package/scripts/langages/cargo/sccache.mjs +29 -0
- package/scripts/langages/cargo/squelette.mjs +111 -0
- package/scripts/langages/python/binaires.json +3 -0
- package/scripts/langages/python/binaires.mjs +59 -0
- package/scripts/langages/python/commandes.mjs +411 -0
- package/scripts/langages/python/composants.mjs +272 -0
- package/scripts/langages/python/exemples.mjs +260 -0
- package/scripts/langages/python/index-interfaces.mjs +77 -0
- package/scripts/langages/python/index.mjs +97 -0
- package/scripts/langages/python/lot.mjs +76 -0
- package/scripts/langages/python/mise-a-jour.mjs +54 -0
- package/scripts/langages/python/squelette.mjs +66 -0
- package/scripts/langages/python/tailles-des-tests.mjs +102 -0
- package/scripts/langages/python/verdict.mjs +85 -0
- package/scripts/langages/typescript/exemples.mjs +1 -20
- package/scripts/langages/typescript/frontieres.mjs +14 -1
- package/scripts/langages/typescript/index-interfaces.mjs +10 -3
- package/scripts/langages/typescript/index.mjs +14 -15
- package/scripts/langages/typescript/squelette.mjs +120 -0
- package/scripts/langages-des-paquets.mjs +171 -0
- package/scripts/langages.mjs +60 -41
- package/scripts/migrations/0.27.0-langages-dans-l-architecture.mjs +182 -0
- package/scripts/migrations.mjs +2 -0
- package/scripts/outils-cles.mjs +1 -1
- package/scripts/paquet.mjs +261 -0
- package/scripts/resultats.mjs +54 -1
- package/scripts/session-start.sh +34 -9
- package/scripts/sources.mjs +2 -1
- package/scripts/sous-commandes.mjs +6 -3
- package/scripts/tableau-des-composants.mjs +140 -0
- package/scripts/verrous/verrou.mjs +3 -2
- package/skills/explorateur/SKILL.md +33 -4
- package/skills/grill/SKILL.md +14 -1
- package/skills/pitmaster/SKILL.md +34 -4
- package/skills/pitmaster/references/consigne-agent.md +33 -4
- package/skills/redacteur/references/documents-d-un-composant.md +12 -0
- package/skills/relecteur/SKILL.md +12 -0
- package/skills/testwriter/SKILL.md +6 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// From 0.27.0 the language of each package is declared at the design, in the column « Langage »
|
|
2
|
+
// of the table of the components of docs/ARCHITECTURE.md (decision D8 of grillhouse-1zu, as the
|
|
3
|
+
// BUILD file of Bazel names the rule of each target): the architecture is the one source of the
|
|
4
|
+
// languages, and the key `grillhouse.langages` of the package.json, which named them before,
|
|
5
|
+
// disappears.
|
|
6
|
+
//
|
|
7
|
+
// - A project whose package.json holds the key: the declaration is written in the column when it
|
|
8
|
+
// lacks, then the key is removed (the section `grillhouse` with it, when it held nothing else).
|
|
9
|
+
// A table whose column holds a language already: the key alone is removed.
|
|
10
|
+
// - The table: the first table of docs/ARCHITECTURE.md where a cell names a component of the
|
|
11
|
+
// modules of the key (./tableau-des-composants.mjs), as the project wrote it (BPScript's names
|
|
12
|
+
// the phase before the package, SyntHub's the crates of other repositories). The column is added
|
|
13
|
+
// at the end of its header, of its separator, in their style, and of each row: the language of
|
|
14
|
+
// the component the row names, empty for a row that names none. A package of the modules (its
|
|
15
|
+
// manifest in its folder) that no row names goes to a section « Les paquets » that ends the
|
|
16
|
+
// document (written when absent), a table `Paquet | Langage`, one row each: a table that says
|
|
17
|
+
// « each stage does a step » (BPScript's) receives no row without its step. A language of the
|
|
18
|
+
// key that no package carries has a row naming the root, `.`, there. The text of the document is
|
|
19
|
+
// kept otherwise.
|
|
20
|
+
// - `aReporter`: whether a project holds the former declaration, which the session start names
|
|
21
|
+
// with `npx grillhouse maj`, which reports it.
|
|
22
|
+
// - A key that names a language the frame lacks, or whose modules claim one folder twice, is left
|
|
23
|
+
// to the project (`aFaire`), nothing written.
|
|
24
|
+
// - A project without the key, or already migrated, is not written: a second pass changes nothing.
|
|
25
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
26
|
+
import path from 'node:path';
|
|
27
|
+
import { composantsRanges } from '../composition-des-langages.mjs';
|
|
28
|
+
import { LANGAGES, langage } from '../langages.mjs';
|
|
29
|
+
import {
|
|
30
|
+
ARCHITECTURE,
|
|
31
|
+
COLONNE,
|
|
32
|
+
colonneDesNoms,
|
|
33
|
+
nomme,
|
|
34
|
+
nomsDe,
|
|
35
|
+
tableauxDesComposants,
|
|
36
|
+
tableaux,
|
|
37
|
+
} from '../tableau-des-composants.mjs';
|
|
38
|
+
|
|
39
|
+
export const version = '0.27.0';
|
|
40
|
+
export const nom = 'langages dans l’architecture';
|
|
41
|
+
|
|
42
|
+
const lireJson = f => JSON.parse(readFileSync(f, 'utf8'));
|
|
43
|
+
const ecrireJson = (f, v) => writeFileSync(f, `${JSON.stringify(v, null, 2)}\n`);
|
|
44
|
+
|
|
45
|
+
// A row of Markdown of <cellules>, an empty cell a single space.
|
|
46
|
+
const ligne = cellules => `|${cellules.map(c => (c ? ` ${c} ` : ' ')).join('|')}|`;
|
|
47
|
+
|
|
48
|
+
// <texte> of a line of a table, <ajout> cells added at its end (each a text, empty for none),
|
|
49
|
+
// padded first to <largeur> cells; a separator <sep> takes its own style.
|
|
50
|
+
function prolonger(texte, nombre, largeur, ajout, sep = null) {
|
|
51
|
+
const base = texte.replace(/\s+$/, '');
|
|
52
|
+
const ferme = base.endsWith('|') ? base : `${base} |`;
|
|
53
|
+
const vides = Array.from({ length: Math.max(0, largeur - nombre) }, () => '');
|
|
54
|
+
const cellules = [...vides, ...ajout];
|
|
55
|
+
if (sep !== null) {
|
|
56
|
+
return ferme + cellules.map(() => `${sep}|`).join('');
|
|
57
|
+
}
|
|
58
|
+
return ferme + cellules.map(c => (c ? ` ${c} |` : ' |')).join('');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Removes the key from the package.json <f>, its read <p>.
|
|
62
|
+
function retirerLaCle(f, p) {
|
|
63
|
+
const { langages: _, ...reste } = p.grillhouse;
|
|
64
|
+
const out = { ...p };
|
|
65
|
+
if (Object.keys(reste).length) {
|
|
66
|
+
out.grillhouse = reste;
|
|
67
|
+
} else {
|
|
68
|
+
delete out.grillhouse;
|
|
69
|
+
}
|
|
70
|
+
ecrireJson(f, out);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// The former declaration of the project at <projet>, the list of its package.json; null without.
|
|
74
|
+
function cleDe(projet) {
|
|
75
|
+
const f = path.join(projet, 'package.json');
|
|
76
|
+
if (!existsSync(f)) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
const cle = lireJson(f).grillhouse?.langages;
|
|
80
|
+
return Array.isArray(cle) ? cle : null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Whether the project at <projet> holds the former declaration, which `maj` reports. */
|
|
84
|
+
export const aReporter = projet => cleDe(projet) !== null;
|
|
85
|
+
|
|
86
|
+
export function migrer(projet) {
|
|
87
|
+
const cle = cleDe(projet);
|
|
88
|
+
if (cle === null) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
const f = path.join(projet, 'package.json');
|
|
92
|
+
const p = lireJson(f);
|
|
93
|
+
const ecrites = tableauxDesComposants(projet).some(x =>
|
|
94
|
+
x.lignes.some(l => (l.cellules[x.colonne] ?? '').trim())
|
|
95
|
+
);
|
|
96
|
+
if (ecrites) {
|
|
97
|
+
retirerLaCle(f, p);
|
|
98
|
+
return [
|
|
99
|
+
`grillhouse.langages retiré du package.json : ${ARCHITECTURE} déclare les langages (colonne « ${COLONNE} »).`,
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
const inconnus = cle.filter(n => !Object.hasOwn(LANGAGES, n));
|
|
103
|
+
if (inconnus.length) {
|
|
104
|
+
return [
|
|
105
|
+
{
|
|
106
|
+
aFaire: `grillhouse.langages nomme ${inconnus.join(', ')}, que le cadre n'a pas (ses langages : ${Object.keys(LANGAGES).join(', ')}) ; écrire le langage de chaque paquet dans la colonne « ${COLONNE} » de ${ARCHITECTURE}, puis retirer la clé.`,
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
let ranges;
|
|
111
|
+
try {
|
|
112
|
+
ranges = composantsRanges(cle.map(langage), projet);
|
|
113
|
+
} catch (e) {
|
|
114
|
+
return [{ aFaire: e.message.replace(/^⛔ /, '') }];
|
|
115
|
+
}
|
|
116
|
+
const doc = path.join(projet, ARCHITECTURE);
|
|
117
|
+
const texte = existsSync(doc) ? readFileSync(doc, 'utf8') : '# Architecture\n';
|
|
118
|
+
const composants = ranges.map(r => r.composant);
|
|
119
|
+
const paquets = ranges.filter(r =>
|
|
120
|
+
existsSync(path.join(r.composant.dossier, r.module.manifeste))
|
|
121
|
+
);
|
|
122
|
+
const nommes = new Set();
|
|
123
|
+
const lignes = texte.split('\n');
|
|
124
|
+
const table = tableaux(texte).find(x => colonneDesNoms(x.lignes, composants, projet) >= 0);
|
|
125
|
+
const nomDe = c => `\`${c.nom}\``;
|
|
126
|
+
if (table) {
|
|
127
|
+
const colonne = colonneDesNoms(table.lignes, composants, projet);
|
|
128
|
+
const largeur = Math.max(table.entete.length, ...table.lignes.map(l => l.cellules.length));
|
|
129
|
+
const sep = lignes[table.ligneEntete + 1].includes(' -') ? ' --- ' : '---';
|
|
130
|
+
lignes[table.ligneEntete] = prolonger(lignes[table.ligneEntete], table.entete.length, largeur, [
|
|
131
|
+
COLONNE,
|
|
132
|
+
]);
|
|
133
|
+
lignes[table.ligneEntete + 1] = prolonger(
|
|
134
|
+
lignes[table.ligneEntete + 1],
|
|
135
|
+
table.entete.length,
|
|
136
|
+
largeur,
|
|
137
|
+
[''],
|
|
138
|
+
sep
|
|
139
|
+
);
|
|
140
|
+
for (const l of table.lignes) {
|
|
141
|
+
const r = ranges.find(x => nomme(nomsDe(l.cellules[colonne]), x.composant, projet));
|
|
142
|
+
if (r) {
|
|
143
|
+
nommes.add(r);
|
|
144
|
+
}
|
|
145
|
+
lignes[l.index] = prolonger(lignes[l.index], l.cellules.length, largeur, [
|
|
146
|
+
r ? r.module.nom : '',
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const ajout = [
|
|
151
|
+
...paquets
|
|
152
|
+
.filter(r => !nommes.has(r))
|
|
153
|
+
.map(r => ({ nom: nomDe(r.composant), langage: r.module.nom })),
|
|
154
|
+
...racines(cle, [...nommes, ...paquets]),
|
|
155
|
+
];
|
|
156
|
+
if (ajout.length) {
|
|
157
|
+
while (lignes.length && lignes.at(-1).trim() === '') {
|
|
158
|
+
lignes.pop();
|
|
159
|
+
}
|
|
160
|
+
lignes.push(
|
|
161
|
+
'',
|
|
162
|
+
'## Les paquets',
|
|
163
|
+
'',
|
|
164
|
+
`Les paquets qu’aucun tableau ne nomme, et leur langage (colonne « ${COLONNE} »).`,
|
|
165
|
+
'',
|
|
166
|
+
ligne(['Paquet', COLONNE]),
|
|
167
|
+
ligne(['---', '---']),
|
|
168
|
+
...ajout.map(r => ligne([r.nom, r.langage])),
|
|
169
|
+
''
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
mkdirSync(path.dirname(doc), { recursive: true });
|
|
173
|
+
writeFileSync(doc, lignes.join('\n'));
|
|
174
|
+
retirerLaCle(f, p);
|
|
175
|
+
return [
|
|
176
|
+
`${ARCHITECTURE} : la colonne « ${COLONNE} » déclare le langage de chaque paquet (${cle.join(', ')}), grillhouse.langages retiré du package.json.`,
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// The rows naming the root, `.`, for each language of <cle> that none of <portes> carries.
|
|
181
|
+
const racines = (cle, portes) =>
|
|
182
|
+
cle.filter(n => !portes.some(r => r.module.nom === n)).map(n => ({ nom: '`.`', langage: n }));
|
package/scripts/migrations.mjs
CHANGED
|
@@ -31,6 +31,7 @@ import * as circuitSimplifie from './migrations/0.24.0-circuit-simplifie.mjs';
|
|
|
31
31
|
import * as apiExtractorDuPaquet from './migrations/0.24.2-api-extractor-du-paquet.mjs';
|
|
32
32
|
import * as triDesDecouvertes from './migrations/0.24.12-tri-des-decouvertes.mjs';
|
|
33
33
|
import * as scriptDesTests from './migrations/0.25.0-script-des-tests.mjs';
|
|
34
|
+
import * as langagesDansLArchitecture from './migrations/0.27.0-langages-dans-l-architecture.mjs';
|
|
34
35
|
|
|
35
36
|
/** The migrations of the core. */
|
|
36
37
|
export const MIGRATIONS = [
|
|
@@ -42,6 +43,7 @@ export const MIGRATIONS = [
|
|
|
42
43
|
apiExtractorDuPaquet,
|
|
43
44
|
triDesDecouvertes,
|
|
44
45
|
scriptDesTests,
|
|
46
|
+
langagesDansLArchitecture,
|
|
45
47
|
];
|
|
46
48
|
|
|
47
49
|
/**
|
package/scripts/outils-cles.mjs
CHANGED
|
@@ -129,7 +129,7 @@ export function lireOutils(
|
|
|
129
129
|
|
|
130
130
|
// The main tree of the repository that holds <dir>, from git's common directory; <dir> itself out
|
|
131
131
|
// of a repository.
|
|
132
|
-
function arbrePrincipal(dir) {
|
|
132
|
+
export function arbrePrincipal(dir) {
|
|
133
133
|
const r = spawnSync(
|
|
134
134
|
'git',
|
|
135
135
|
['-C', dir, 'rev-parse', '--path-format=absolute', '--git-common-dir'],
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The creation of a package, out of the circuit: the third of the four times of a package's birth
|
|
3
|
+
// (the common charter, « La naissance d'un paquet »: the grill, the writing of its row and its
|
|
4
|
+
// documents, this command, then a ticket of code), as the generators of Nx (`nx g @nx/js:lib`,
|
|
5
|
+
// after `nx add` installs the tools of its plugin), `turbo gen workspace` and `cargo new --lib`
|
|
6
|
+
// added to the members of the workspace write one. A skeleton has neither behaviour nor test: it
|
|
7
|
+
// does not pass by the circuit, which works on a package that exists.
|
|
8
|
+
//
|
|
9
|
+
// npx grillhouse paquet <chemin> from the root of the project, <chemin> from it
|
|
10
|
+
//
|
|
11
|
+
// - The row first: a row of a table of the components of docs/ARCHITECTURE.md
|
|
12
|
+
// (./tableau-des-composants.mjs) names <chemin> when one name of its cell of the names is the
|
|
13
|
+
// path, or else the folder's name, as the guard of the languages reads a component; a row that
|
|
14
|
+
// names the path itself comes first. Refused, by its name, and nothing written: a path no row
|
|
15
|
+
// names; a row whose cell of the column « Langage » is empty; a language out of the frame's
|
|
16
|
+
// list; a folder that already holds the manifest of its language (`manifeste` of its module). A
|
|
17
|
+
// folder that holds docs/ alone, the documents of the second time, is accepted, as `cargo init`
|
|
18
|
+
// takes a folder without its Cargo.toml.
|
|
19
|
+
// - The skeleton: the module of the row's language gives the files of the package and the entry
|
|
20
|
+
// of the workspace (`squelette`, scripts/jointure.d.ts), the versions of its tools from its
|
|
21
|
+
// template (`miseAJour.gabarit`); the documents of the package, docs/CADRE.md and
|
|
22
|
+
// docs/INTERFACE.md, come from the frame's template of a package (`templates/paquet/`), its name
|
|
23
|
+
// and its language written in. Each file absent is written, a file present stays; the manifest
|
|
24
|
+
// of the workspace receives the entry. The command commits nothing: the second and the third
|
|
25
|
+
// times enter one commit, after a green verification.
|
|
26
|
+
// - The tools of the language, as `nx add` installs them before the first generator: the share
|
|
27
|
+
// of the update of each declared language (`mettreAJour` of ./grillhouse-maj.mjs: its tools at
|
|
28
|
+
// its template's versions, its scripts, its files, `turbo.json` for typescript), then `npm
|
|
29
|
+
// install` when the update asks it, the module's command that locks the versions of the new
|
|
30
|
+
// package (`verrouiller`), the binaries of the declared languages (`installerBinaires`), and the
|
|
31
|
+
// generators (`regenerer`), those of the package's language whatever files the project holds:
|
|
32
|
+
// the first package of a language receives its boundaries' configuration and its index.
|
|
33
|
+
// - The report: each file written, then the lines of the update; on the error stream, each
|
|
34
|
+
// command that fails, named with its output. The exit code: 0; 1 for a refusal (⛔ and its
|
|
35
|
+
// reason) or a command that fails; 2 for the usage.
|
|
36
|
+
import { spawnSync } from 'node:child_process';
|
|
37
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
38
|
+
import path from 'node:path';
|
|
39
|
+
import { pathToFileURL } from 'node:url';
|
|
40
|
+
import { CADRE } from './cadre.mjs';
|
|
41
|
+
import {
|
|
42
|
+
aInstaller,
|
|
43
|
+
installerBinaires,
|
|
44
|
+
mettreAJour,
|
|
45
|
+
rapport,
|
|
46
|
+
regenerer,
|
|
47
|
+
} from './grillhouse-maj.mjs';
|
|
48
|
+
import { LANGAGES, langage } from './langages.mjs';
|
|
49
|
+
import {
|
|
50
|
+
ARCHITECTURE,
|
|
51
|
+
colonneDesNoms,
|
|
52
|
+
COLONNE,
|
|
53
|
+
langageDeLaCellule,
|
|
54
|
+
nomme,
|
|
55
|
+
nomsDe,
|
|
56
|
+
tableauxDesComposants,
|
|
57
|
+
} from './tableau-des-composants.mjs';
|
|
58
|
+
|
|
59
|
+
/** The frame's template of the documents of a package, from the frame's files. */
|
|
60
|
+
export const GABARIT_DU_PAQUET = 'templates/paquet';
|
|
61
|
+
const DOCUMENTS = ['docs/CADRE.md', 'docs/INTERFACE.md'];
|
|
62
|
+
|
|
63
|
+
/** A refusal of the command, its message the reason. */
|
|
64
|
+
export class Refus extends Error {}
|
|
65
|
+
|
|
66
|
+
// <chemin> from the root of the project at <racine>, `/` its separator, without `./` nor a
|
|
67
|
+
// trailing `/`; refused out of the project or at its root.
|
|
68
|
+
function normaliser(racine, chemin) {
|
|
69
|
+
const rel = path.relative(racine, path.resolve(racine, chemin)).split(path.sep).join('/');
|
|
70
|
+
if (rel === '' || rel.startsWith('..') || path.isAbsolute(rel)) {
|
|
71
|
+
throw new Refus(`${chemin} : un paquet vit dans un dossier du projet, sous sa racine.`);
|
|
72
|
+
}
|
|
73
|
+
return rel;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The row of the tables of the components of the project at <racine> that names the package at
|
|
78
|
+
* <rel> (from the root): `{ ligne, langage }`, `ligne` its number in docs/ARCHITECTURE.md, `langage`
|
|
79
|
+
* its cell of the column « Langage » (empty for none); null when no row names it.
|
|
80
|
+
* @param {string} racine
|
|
81
|
+
* @param {string} rel
|
|
82
|
+
*/
|
|
83
|
+
export function ligneDuPaquet(racine, rel) {
|
|
84
|
+
const virtuel = { dossier: path.join(racine, rel), nom: path.posix.basename(rel), paquet: null };
|
|
85
|
+
const trouvees = tableauxDesComposants(racine).flatMap(t => {
|
|
86
|
+
const colonne = colonneDesNoms(t.lignes, [virtuel], racine, t.colonne);
|
|
87
|
+
return colonne < 0
|
|
88
|
+
? []
|
|
89
|
+
: t.lignes
|
|
90
|
+
.filter(l => nomme(nomsDe(l.cellules[colonne]), virtuel, racine))
|
|
91
|
+
.map(l => ({
|
|
92
|
+
exacte: nomsDe(l.cellules[colonne]).includes(rel),
|
|
93
|
+
ligne: l.index + 1,
|
|
94
|
+
langage: langageDeLaCellule(l.cellules[t.colonne]),
|
|
95
|
+
}));
|
|
96
|
+
});
|
|
97
|
+
const l = trouvees.find(x => x.exacte) ?? trouvees[0];
|
|
98
|
+
return l ? { ligne: l.ligne, langage: l.langage } : null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const lireJson = f => (existsSync(f) ? JSON.parse(readFileSync(f, 'utf8')) : {});
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The plan of the package at <chemin> of the project at <racine>, nothing written: `{ chemin,
|
|
105
|
+
* langage, fichiers, espace, verrouiller }`, `fichiers` the skeleton of its language and its
|
|
106
|
+
* documents (path from the root → text), `espace` the manifest of the workspace with its entry
|
|
107
|
+
* (null when it holds it), `verrouiller` the command that locks its versions. Throws a Refus, by
|
|
108
|
+
* its name, for a path no row names, a row without language, a language out of the frame's list,
|
|
109
|
+
* or a folder that holds the manifest of its language.
|
|
110
|
+
* @param {string} racine the root of the project
|
|
111
|
+
* @param {string} chemin the package's folder, from the root
|
|
112
|
+
* @param {{ source?: string }} [o] the frame's files (CADRE)
|
|
113
|
+
*/
|
|
114
|
+
export function planDuPaquet(racine, chemin, { source = CADRE } = {}) {
|
|
115
|
+
const rel = normaliser(racine, chemin);
|
|
116
|
+
const l = ligneDuPaquet(racine, rel);
|
|
117
|
+
if (!l) {
|
|
118
|
+
throw new Refus(
|
|
119
|
+
`${rel} : aucune ligne d'un tableau des composants de ${ARCHITECTURE} ne le nomme ; le grill tranche le paquet, puis sa ligne s'y écrit avec son langage (colonne « ${COLONNE} »), avant la commande.`
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
const ou = `${ARCHITECTURE}:${l.ligne}`;
|
|
123
|
+
if (!l.langage) {
|
|
124
|
+
throw new Refus(
|
|
125
|
+
`${rel} : sa ligne (${ou}) ne nomme pas son langage ; la colonne « ${COLONNE} » le déclare (les langages du cadre : ${Object.keys(LANGAGES).join(', ')}).`
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
if (!Object.hasOwn(LANGAGES, l.langage)) {
|
|
129
|
+
throw new Refus(
|
|
130
|
+
`${rel} : langage inconnu du cadre, ${l.langage} (${ou}) ; les langages du cadre : ${Object.keys(LANGAGES).join(', ')}.`
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
const m = langage(l.langage);
|
|
134
|
+
if (existsSync(path.join(racine, rel, m.manifeste))) {
|
|
135
|
+
throw new Refus(
|
|
136
|
+
`${rel} : le dossier porte déjà son ${m.manifeste} ; le paquet existe, un ticket de code le travaille par le circuit.`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
const modele = lireJson(path.join(source, m.miseAJour.gabarit, 'package.json'));
|
|
140
|
+
let s;
|
|
141
|
+
try {
|
|
142
|
+
s = m.squelette(racine, { chemin: rel, modele });
|
|
143
|
+
} catch (e) {
|
|
144
|
+
throw new Refus(e.message);
|
|
145
|
+
}
|
|
146
|
+
const nom = path.posix.basename(rel);
|
|
147
|
+
const documents = Object.fromEntries(
|
|
148
|
+
DOCUMENTS.map(d => [
|
|
149
|
+
`${rel}/${d}`,
|
|
150
|
+
readFileSync(path.join(source, GABARIT_DU_PAQUET, d), 'utf8')
|
|
151
|
+
.replaceAll('<nom>', nom)
|
|
152
|
+
.replaceAll('<langage>', l.langage),
|
|
153
|
+
])
|
|
154
|
+
);
|
|
155
|
+
return {
|
|
156
|
+
chemin: rel,
|
|
157
|
+
langage: m,
|
|
158
|
+
fichiers: { ...s.fichiers, ...documents },
|
|
159
|
+
espace: s.espace,
|
|
160
|
+
verrouiller: s.verrouiller,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Writes the plan <plan> (`planDuPaquet`) in the project at <racine>: each file absent, then the
|
|
166
|
+
* manifest of the workspace. Returns the files written, from the root.
|
|
167
|
+
* @param {string} racine
|
|
168
|
+
* @param {ReturnType<typeof planDuPaquet>} plan
|
|
169
|
+
*/
|
|
170
|
+
export function ecrireLePaquet(racine, plan) {
|
|
171
|
+
const ecrits = [];
|
|
172
|
+
for (const [f, texte] of Object.entries(plan.fichiers)) {
|
|
173
|
+
const abs = path.join(racine, f);
|
|
174
|
+
if (existsSync(abs)) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
mkdirSync(path.dirname(abs), { recursive: true });
|
|
178
|
+
writeFileSync(abs, texte);
|
|
179
|
+
ecrits.push(f);
|
|
180
|
+
}
|
|
181
|
+
if (plan.espace) {
|
|
182
|
+
writeFileSync(path.join(racine, plan.espace.fichier), plan.espace.texte);
|
|
183
|
+
ecrits.push(plan.espace.fichier);
|
|
184
|
+
}
|
|
185
|
+
return ecrits;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Runs <commande> <args> in <dossier>, its output this process's error stream; its code.
|
|
189
|
+
const lancer = (commande, args, dossier) =>
|
|
190
|
+
spawnSync(commande, args, { cwd: dossier, stdio: ['ignore', 2, 2] }).status ?? 1;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Creates the package at <chemin> of the project at <racine>: its plan written, then the tools of
|
|
194
|
+
* its language (see the header). Returns `{ ecrits, lignes, echecs }`: the files written, the
|
|
195
|
+
* lines of the report, the lines of each command that fails. Throws a Refus as `planDuPaquet`.
|
|
196
|
+
* @param {string} racine
|
|
197
|
+
* @param {string} chemin
|
|
198
|
+
* @param {{ source?: string, executer?: (commande: string, args: string[], dossier: string) => number }} [o]
|
|
199
|
+
*/
|
|
200
|
+
export function creerPaquet(racine, chemin, { source = CADRE, executer = lancer } = {}) {
|
|
201
|
+
const plan = planDuPaquet(racine, chemin, { source });
|
|
202
|
+
const ecrits = ecrireLePaquet(racine, plan);
|
|
203
|
+
const b = mettreAJour(racine, source);
|
|
204
|
+
const echecs = [];
|
|
205
|
+
const vus = new Set();
|
|
206
|
+
const jouer = (commande, args, dossier) => {
|
|
207
|
+
const cle = JSON.stringify([commande, ...args, dossier]);
|
|
208
|
+
if (vus.has(cle)) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
vus.add(cle);
|
|
212
|
+
const code = executer(commande, args, path.join(racine, dossier));
|
|
213
|
+
if (code !== 0) {
|
|
214
|
+
echecs.push(
|
|
215
|
+
`\`${[commande, ...args].join(' ')}\` (${dossier}) échoue, code ${code} ; lance-le, puis \`npx grillhouse maj\`.`
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
if (aInstaller(b)) {
|
|
220
|
+
jouer('npm', ['install'], '.');
|
|
221
|
+
}
|
|
222
|
+
const v = plan.verrouiller;
|
|
223
|
+
jouer(v.commande, v.args, v.dossier);
|
|
224
|
+
const binaires = installerBinaires(racine);
|
|
225
|
+
echecs.push(...binaires.lignes, ...regenerer(racine, { langage: plan.langage.nom }));
|
|
226
|
+
const lignes = rapport(b)
|
|
227
|
+
.split('\n')
|
|
228
|
+
.filter(Boolean)
|
|
229
|
+
.concat(
|
|
230
|
+
binaires.installes.length ? [`Binaires installés : ${binaires.installes.join(', ')}.`] : []
|
|
231
|
+
);
|
|
232
|
+
return { ecrits, lignes, echecs };
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const USAGE =
|
|
236
|
+
'Usage : npx grillhouse paquet <chemin> crée le paquet que sa ligne de docs/ARCHITECTURE.md déclare\n';
|
|
237
|
+
|
|
238
|
+
if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
239
|
+
const args = process.argv.slice(2);
|
|
240
|
+
if (args.length !== 1 || args[0].startsWith('-')) {
|
|
241
|
+
process.stderr.write(USAGE);
|
|
242
|
+
process.exitCode = 2;
|
|
243
|
+
} else {
|
|
244
|
+
try {
|
|
245
|
+
const { ecrits, lignes, echecs } = creerPaquet(process.cwd(), args[0]);
|
|
246
|
+
process.stdout.write(
|
|
247
|
+
`Paquet ${args[0]} : ${ecrits.join(', ') || 'aucun fichier'} écrits ; rien n'est commité.\n${lignes.map(l => `${l}\n`).join('')}`
|
|
248
|
+
);
|
|
249
|
+
for (const l of echecs) {
|
|
250
|
+
process.stderr.write(`${l}\n`);
|
|
251
|
+
}
|
|
252
|
+
process.exitCode = echecs.length ? 1 : 0;
|
|
253
|
+
} catch (e) {
|
|
254
|
+
if (!(e instanceof Refus)) {
|
|
255
|
+
throw e;
|
|
256
|
+
}
|
|
257
|
+
process.stderr.write(`⛔ ${e.message}\n`);
|
|
258
|
+
process.exitCode = 1;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
package/scripts/resultats.mjs
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
// exists only when a reader reads it:
|
|
12
12
|
// - `statut` (FAIT, BLOQUÉ, BESOIN), with `raison` for BLOQUÉ and `question` for BESOIN, each
|
|
13
13
|
// with its `piece`: the circuit goes on, or stops at « hors-portee » or « besoin », the piece
|
|
14
|
-
// with the stop (testwriter, developpeur
|
|
14
|
+
// with the stop (testwriter, developpeur, and the explorateur's gesture of a mechanical ticket,
|
|
15
|
+
// its own schema, `geste`);
|
|
15
16
|
// - `verts_attendus` (`fichier` from the root, `test` its full name, or none for every green of a
|
|
16
17
|
// file HEAD holds, `raison`): the proof of the red (testwriter);
|
|
17
18
|
// - `renvoi` (`role` testwriter): the circuit relaunches the testwriter, then the proof and the
|
|
@@ -64,6 +65,14 @@
|
|
|
64
65
|
// a removal of a criterion written among them, go up to the supervisor, each naming why: the
|
|
65
66
|
// language, the architecture, a gap to the reference, or no answer (BP 328: a question the
|
|
66
67
|
// ticket settled stopped the plan) (explorateur);
|
|
68
|
+
// - `sorte` (`genre` mécanique or comportement, its `raison`, the `commande` a mechanical ticket
|
|
69
|
+
// plays, and, for a comportement, `comportement` changé or inchangé): as Google's large-scale
|
|
70
|
+
// changes let a tool make a change that a verification and a review judge (Rosie, ClangMR),
|
|
71
|
+
// a ticket the plan says mechanical skips the testwriter, the proof and the developpeur, and
|
|
72
|
+
// under a plan « comportement inchangé » every green of the proof is expected and the
|
|
73
|
+
// developpeur writes the code; a sort
|
|
74
|
+
// absent, out of its kinds, or without its reason or its command is comportement, the whole
|
|
75
|
+
// circuit (`sorteDuPlan`, grillhouse-sos) (explorateur);
|
|
67
76
|
// - `ecartes` (`composant`, `raison`): the components of the survey the plan does not touch,
|
|
68
77
|
// which the circuit writes at the ticket; each other component of the survey the circuit
|
|
69
78
|
// plays is in the packages (explorateur);
|
|
@@ -186,6 +195,10 @@ export const VERDICTS_ROUVERTS = ['a-porter', 'non-confirmee'];
|
|
|
186
195
|
// The verdicts whose piece is a command played again on main and its output, or file:line.
|
|
187
196
|
const VERDICTS_PROUVES = ['traitee', 'a-porter'];
|
|
188
197
|
|
|
198
|
+
// The sorts of a ticket the explorateur judges at the plan (grillhouse-sos): a gesture without new
|
|
199
|
+
// behaviour, which its command makes, or a change of behaviour, which the circuit of code makes.
|
|
200
|
+
export const SORTES = ['mécanique', 'comportement'];
|
|
201
|
+
|
|
189
202
|
// The schema of the sheet of each role the circuit leads, and of the tri of the discoveries
|
|
190
203
|
// (`tri`), the explorateur's after the queue.
|
|
191
204
|
const FICHES = {
|
|
@@ -199,6 +212,28 @@ const FICHES = {
|
|
|
199
212
|
texte('Un paquet, comme le titre le nomme : le nom de son paquet, ou son chemin.'),
|
|
200
213
|
'Les paquets à toucher, le fournisseur d’abord ; le circuit les écrit au titre, et chaque séance n’écrit qu’eux.'
|
|
201
214
|
),
|
|
215
|
+
sorte: objet(
|
|
216
|
+
{
|
|
217
|
+
genre: {
|
|
218
|
+
type: 'string',
|
|
219
|
+
enum: SORTES,
|
|
220
|
+
description:
|
|
221
|
+
'mécanique : un geste sans comportement neuf (montée du cadre, documents seuls, renommage ou déplacement, montée de dépendance, configuration seule, correction de style, seuil relevé), que sa commande fait ; comportement : tout autre ticket, et tout doute.',
|
|
222
|
+
},
|
|
223
|
+
raison: texte('Pourquoi le ticket est de cette sorte.'),
|
|
224
|
+
commande: texte(
|
|
225
|
+
'mécanique : la commande ou l’outil qui fait le geste, tel qu’il se lance à la racine de la copie.'
|
|
226
|
+
),
|
|
227
|
+
comportement: {
|
|
228
|
+
type: 'string',
|
|
229
|
+
enum: ['changé', 'inchangé'],
|
|
230
|
+
description:
|
|
231
|
+
'comportement : inchangé quand le lot ne change aucun comportement que ses tests mesurent (un test adapté, un seuil relevé dans un test) ; changé sinon.',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
['genre', 'raison'],
|
|
235
|
+
'La sorte du ticket, et sa raison ; un ticket mécanique saute le testwriter, la preuve du rouge et le développeur. Une sorte absente vaut comportement.'
|
|
236
|
+
),
|
|
202
237
|
ecartes: liste(
|
|
203
238
|
objet(
|
|
204
239
|
{
|
|
@@ -240,6 +275,8 @@ const FICHES = {
|
|
|
240
275
|
},
|
|
241
276
|
['criteres', 'paquets', 'questions']
|
|
242
277
|
),
|
|
278
|
+
// The explorateur's sheet after the gesture of a mechanical ticket (1.1), in the copy.
|
|
279
|
+
geste: objet({ ...STATUT, ...DECOUVERTES }, ['statut']),
|
|
243
280
|
testwriter: objet(
|
|
244
281
|
{
|
|
245
282
|
...STATUT,
|
|
@@ -426,6 +463,22 @@ const FICHES = {
|
|
|
426
463
|
// The schema of the sheet of <role>, or null for a role the circuit does not lead.
|
|
427
464
|
export const schemaDeFiche = role => FICHES[role] ?? null;
|
|
428
465
|
|
|
466
|
+
// The sort of the ticket the explorateur's sheet of the plan <fiche> says (`sorte`): `{ genre:
|
|
467
|
+
// 'mécanique', raison, commande }` for a mechanical ticket with its reason and its command; else
|
|
468
|
+
// `{ genre: 'comportement', raison, inchange }`, `inchange` for a plan « comportement inchangé »
|
|
469
|
+
// with its reason. A sort absent, out of its kinds or without what it needs is comportement, the
|
|
470
|
+
// whole circuit, as a doubt goes to the circuit (grillhouse-sos).
|
|
471
|
+
export function sorteDuPlan(fiche) {
|
|
472
|
+
const s = fiche?.sorte;
|
|
473
|
+
const plein = v => typeof v === 'string' && v.trim() !== '';
|
|
474
|
+
const raison = s && typeof s === 'object' && plein(s.raison) ? s.raison.trim() : null;
|
|
475
|
+
if (raison && s.genre === 'mécanique' && plein(s.commande)) {
|
|
476
|
+
return { genre: 'mécanique', raison, commande: s.commande.trim() };
|
|
477
|
+
}
|
|
478
|
+
const inchange = Boolean(raison) && s.genre === 'comportement' && s.comportement === 'inchangé';
|
|
479
|
+
return { genre: 'comportement', raison, inchange };
|
|
480
|
+
}
|
|
481
|
+
|
|
429
482
|
// The errors of <valeur> against <schema>, each naming its field by its path <ou>.
|
|
430
483
|
function erreurs(schema, valeur, ou) {
|
|
431
484
|
const nom = ou || 'la fiche';
|
package/scripts/session-start.sh
CHANGED
|
@@ -11,8 +11,13 @@
|
|
|
11
11
|
# written; the session start goes on. Without the key (or with null), nothing runs; a value that is
|
|
12
12
|
# not a non-blank string runs nothing and adds a line that says so. An agent's copy does not play it.
|
|
13
13
|
#
|
|
14
|
-
# The project's
|
|
15
|
-
#
|
|
14
|
+
# The project's languages: a project whose docs/ARCHITECTURE.md declares none (the column
|
|
15
|
+
# « Langage » of its table of the components, scripts/langages.mjs) joins « Manque » as « le
|
|
16
|
+
# langage de chaque paquet », with the grill, which writes it, or with `npx grillhouse maj` for a
|
|
17
|
+
# project that holds the declaration of a former version, which it reports. A document of the project that holds
|
|
18
|
+
# a field <…> of its template (the template's docs/ARCHITECTURE.md declares its language, its
|
|
19
|
+
# other fields left to the grill) is not yet written: it stays under « Pas encore renseignés », and
|
|
20
|
+
# the line of the night waits for it.
|
|
16
21
|
#
|
|
17
22
|
# The frame's plugins: scripts/greffons.mjs --absents reads `.claude/settings.json` and
|
|
18
23
|
# `claude plugin list --json` (each call stopped after 5 s). Each declared plugin not installed for
|
|
@@ -69,10 +74,23 @@ if [ -z "$copie_agent" ]; then
|
|
|
69
74
|
[ -d "$root/.codegraph" ] || missing+=("l'index CodeGraph du code (\`codegraph init .\`)")
|
|
70
75
|
fi
|
|
71
76
|
[ ! -f "$root/package.json" ] || [ -d "$root/node_modules" ] || missing+=("les dépendances npm (\`npm install\`)")
|
|
72
|
-
# The project's
|
|
73
|
-
#
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
# The project's languages (scripts/langages.mjs): a project whose docs/ARCHITECTURE.md declares
|
|
78
|
+
# none (the column « Langage » of its table of the components) is refused by the frame's scripts
|
|
79
|
+
# and locks until the grill writes it, or, for a project that holds the declaration of a former
|
|
80
|
+
# version (the migration of 0.27.0, `aReporter`), until `npx grillhouse maj` reports it. The
|
|
81
|
+
# reading gives « declare », « maj » or « grill ».
|
|
82
|
+
if [ -f "$root/package.json" ]; then
|
|
83
|
+
langues="$(node --input-type=module -e '
|
|
84
|
+
const { pathToFileURL } = await import("node:url");
|
|
85
|
+
const { langagesDeclares } = await import(pathToFileURL(process.argv[1]).href);
|
|
86
|
+
const { aReporter } = await import(pathToFileURL(process.argv[2]).href);
|
|
87
|
+
process.stdout.write(langagesDeclares(process.argv[3]).length > 0 ? "declare" : aReporter(process.argv[3]) ? "maj" : "grill");
|
|
88
|
+
' "$ici/langages.mjs" "$ici/migrations/0.27.0-langages-dans-l-architecture.mjs" "$root" 2>/dev/null)"
|
|
89
|
+
case "$langues" in
|
|
90
|
+
declare) ;;
|
|
91
|
+
maj) missing+=("le langage de chaque paquet (colonne « Langage » du tableau des composants de docs/ARCHITECTURE.md : \`npx grillhouse maj\` y reporte la déclaration du package.json)") ;;
|
|
92
|
+
*) missing+=("le langage de chaque paquet (colonne « Langage » du tableau des composants de docs/ARCHITECTURE.md : le grill l'écrit, branche 8)") ;;
|
|
93
|
+
esac
|
|
76
94
|
fi
|
|
77
95
|
# The frame's plugins not installed for the project (scripts/greffons.mjs): the plugins are the
|
|
78
96
|
# machine's installation for the project, so an agent's copy does not read them.
|
|
@@ -97,12 +115,19 @@ command -v bwrap >/dev/null || missing+=("bubblewrap (bwrap), l'enveloppe des ag
|
|
|
97
115
|
|
|
98
116
|
# The key elements the skills read; each one still empty is proposed for a grill.
|
|
99
117
|
pending=()
|
|
118
|
+
# Whether the document <$1> holds a field <…> of its template, outside code spans.
|
|
119
|
+
a_des_champs() {
|
|
120
|
+
node -e 'const t=require("fs").readFileSync(process.argv[1],"utf8").replace(/`[^`]*`/g,"");process.exit(/<[^<>\n]+>/.test(t)?0:1)' "$1"
|
|
121
|
+
}
|
|
122
|
+
# Whether the document <$1> is written: present, without a field of its template (the template's
|
|
123
|
+
# docs/ARCHITECTURE.md holds the declaration of its language, its fields left to the grill).
|
|
124
|
+
ecrit() { [ -f "$1" ] && ! a_des_champs "$1"; }
|
|
100
125
|
charter="$root/CLAUDE.md"
|
|
101
126
|
if [ ! -f "$charter" ]; then
|
|
102
127
|
pending+=("la charte (CLAUDE.md)")
|
|
103
128
|
else
|
|
104
129
|
# an unfilled field of the charter template: <…> outside code spans
|
|
105
|
-
|
|
130
|
+
a_des_champs "$charter" \
|
|
106
131
|
&& pending+=("les champs <…> encore vides de la charte (CLAUDE.md)")
|
|
107
132
|
# the arbitration criteria: a heading about arbitration in the charter or a reference document
|
|
108
133
|
grep -qiE '^#+ .*(arbitr)' "$charter" "$root"/docs/*.md 2>/dev/null \
|
|
@@ -129,7 +154,7 @@ if ls -d "$root"/packages/*/ >/dev/null 2>&1; then
|
|
|
129
154
|
done
|
|
130
155
|
else
|
|
131
156
|
for doc in ARCHITECTURE CADRE INTERFACE; do
|
|
132
|
-
|
|
157
|
+
ecrit "$root/docs/$doc.md" || pending+=("docs/$doc.md")
|
|
133
158
|
done
|
|
134
159
|
fi
|
|
135
160
|
[ -f "$root/CONTEXT.md" ] || pending+=("le lexique du domaine (CONTEXT.md)")
|
|
@@ -182,7 +207,7 @@ fi
|
|
|
182
207
|
# (the frame's script before the package, 0.24.0; a relative path after `cd <root>`), is named
|
|
183
208
|
# with the line that replaces it, as brew doctor names a configuration that aims at a missing path.
|
|
184
209
|
nuit_absente=
|
|
185
|
-
if
|
|
210
|
+
if ecrit "$root/docs/ARCHITECTURE.md"; then
|
|
186
211
|
noeud="$(dirname "$(command -v node)")"
|
|
187
212
|
table="$(crontab -l 2>/dev/null | grep -v '^[[:space:]]*#')"
|
|
188
213
|
if ! printf '%s\n' "$table" | grep -F "cd $root && node_modules/.bin/grillhouse nuit" | grep -qF "PATH=$noeud:"; then
|
package/scripts/sources.mjs
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
// dist, coverage, .claude, .beads, .codegraph, .rtfm), and what the tools of the project's
|
|
7
7
|
// language write (`ignorer` of its module, scripts/jointure.d.ts: typescript's `.turbo`, cargo's
|
|
8
8
|
// `target`), as git leaves out what a `.gitignore` names. A project that declares no language
|
|
9
|
-
// (
|
|
9
|
+
// (the column « Langage » of its docs/ARCHITECTURE.md) leaves out what every language of the
|
|
10
|
+
// frame writes.
|
|
10
11
|
import { readdirSync } from 'node:fs';
|
|
11
12
|
import path from 'node:path';
|
|
12
13
|
import { LANGAGES, langage, langageDe, langagesDeclares } from './langages.mjs';
|