@roomi-fields/grillhouse 0.29.0 → 0.30.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 +739 -0
- package/bin/grillhouse.mjs +79 -18
- package/cadre/templates/projet/.github/workflows/ci.yml +2 -13
- package/cadre/templates/projet/CLAUDE.md +5 -1
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/cadre/templates/projet/package.json +2 -2
- package/charte.md +24 -0
- package/dist/temporal/acte.d.ts +24 -0
- package/dist/temporal/acte.js +139 -0
- package/dist/temporal/acte.js.map +1 -0
- package/dist/temporal/attributs.d.ts +6 -0
- package/dist/temporal/attributs.js +15 -0
- package/dist/temporal/attributs.js.map +1 -0
- package/dist/temporal/circuit/activites.d.ts +13 -0
- package/dist/temporal/circuit/activites.js +33 -0
- package/dist/temporal/circuit/activites.js.map +1 -0
- package/dist/temporal/circuit/client.d.ts +72 -0
- package/dist/temporal/circuit/client.js +247 -0
- package/dist/temporal/circuit/client.js.map +1 -0
- package/dist/temporal/circuit/commande.d.ts +2 -0
- package/dist/temporal/circuit/commande.js +238 -0
- package/dist/temporal/circuit/commande.js.map +1 -0
- package/dist/temporal/circuit/contrat.d.ts +305 -0
- package/dist/temporal/circuit/contrat.js +24 -0
- package/dist/temporal/circuit/contrat.js.map +1 -0
- package/dist/temporal/circuit/deroule.d.ts +3 -0
- package/dist/temporal/circuit/deroule.js +540 -0
- package/dist/temporal/circuit/deroule.js.map +1 -0
- package/dist/temporal/client.d.ts +47 -0
- package/dist/temporal/client.js +69 -0
- package/dist/temporal/client.js.map +1 -0
- package/dist/temporal/commande.d.ts +2 -0
- package/dist/temporal/commande.js +95 -0
- package/dist/temporal/commande.js.map +1 -0
- package/dist/temporal/deroules.d.ts +5 -0
- package/dist/temporal/deroules.js +10 -0
- package/dist/temporal/deroules.js.map +1 -0
- package/dist/temporal/etat.d.ts +33 -0
- package/dist/temporal/etat.js +59 -0
- package/dist/temporal/etat.js.map +1 -0
- package/dist/temporal/file/activites.d.ts +10 -0
- package/dist/temporal/file/activites.js +25 -0
- package/dist/temporal/file/activites.js.map +1 -0
- package/dist/temporal/file/client.d.ts +4 -0
- package/dist/temporal/file/client.js +6 -0
- package/dist/temporal/file/client.js.map +1 -0
- package/dist/temporal/file/contrat.d.ts +158 -0
- package/dist/temporal/file/contrat.js +14 -0
- package/dist/temporal/file/contrat.js.map +1 -0
- package/dist/temporal/file/deroule.d.ts +15 -0
- package/dist/temporal/file/deroule.js +235 -0
- package/dist/temporal/file/deroule.js.map +1 -0
- package/dist/temporal/installation.d.ts +124 -0
- package/dist/temporal/installation.js +408 -0
- package/dist/temporal/installation.js.map +1 -0
- package/dist/temporal/places/activites.d.ts +8 -0
- package/dist/temporal/places/activites.js +13 -0
- package/dist/temporal/places/activites.js.map +1 -0
- package/dist/temporal/places/client.d.ts +28 -0
- package/dist/temporal/places/client.js +64 -0
- package/dist/temporal/places/client.js.map +1 -0
- package/dist/temporal/places/contrat.d.ts +106 -0
- package/dist/temporal/places/contrat.js +21 -0
- package/dist/temporal/places/contrat.js.map +1 -0
- package/dist/temporal/places/deroule.d.ts +3 -0
- package/dist/temporal/places/deroule.js +198 -0
- package/dist/temporal/places/deroule.js.map +1 -0
- package/dist/temporal/sonde/activites.d.ts +6 -0
- package/dist/temporal/sonde/activites.js +52 -0
- package/dist/temporal/sonde/activites.js.map +1 -0
- package/dist/temporal/sonde/contrat.d.ts +35 -0
- package/dist/temporal/sonde/contrat.js +10 -0
- package/dist/temporal/sonde/contrat.js.map +1 -0
- package/dist/temporal/sonde/deroule.d.ts +3 -0
- package/dist/temporal/sonde/deroule.js +39 -0
- package/dist/temporal/sonde/deroule.js.map +1 -0
- package/dist/temporal/tickets/activites.d.ts +7 -0
- package/dist/temporal/tickets/activites.js +81 -0
- package/dist/temporal/tickets/activites.js.map +1 -0
- package/dist/temporal/tickets/client.d.ts +10 -0
- package/dist/temporal/tickets/client.js +31 -0
- package/dist/temporal/tickets/client.js.map +1 -0
- package/dist/temporal/tickets/contrat.d.ts +56 -0
- package/dist/temporal/tickets/contrat.js +13 -0
- package/dist/temporal/tickets/contrat.js.map +1 -0
- package/dist/temporal/tickets/deroule.d.ts +3 -0
- package/dist/temporal/tickets/deroule.js +94 -0
- package/dist/temporal/tickets/deroule.js.map +1 -0
- package/dist/temporal/travailleur.d.ts +2 -0
- package/dist/temporal/travailleur.js +69 -0
- package/dist/temporal/travailleur.js.map +1 -0
- package/docs/ARCHITECTURE.md +609 -80
- package/docs/CADRE.md +17 -0
- package/docs/INTERFACE.md +134 -42
- package/hooks/crochet.mjs +19 -2
- package/hooks/hooks.json +11 -0
- package/package.json +16 -4
- package/scripts/activites.mjs +2182 -0
- package/scripts/aiguillage.d.mts +37 -0
- package/scripts/aiguillage.mjs +7 -3
- package/scripts/avancement.mjs +128 -16
- package/scripts/bilan.mjs +37 -19
- package/scripts/cadre.mjs +11 -2
- package/scripts/circuit.mjs +881 -4059
- package/scripts/circuits-cles.d.mts +4 -0
- package/scripts/circuits-cles.mjs +21 -0
- package/scripts/circuits-du-serveur.mjs +105 -0
- package/scripts/codes-de-sortie.mjs +9 -0
- package/scripts/commandes-composees.mjs +45 -41
- package/scripts/commandes-du-path.d.mts +7 -0
- package/scripts/commandes-du-path.mjs +25 -0
- package/scripts/composition-des-langages.mjs +16 -12
- package/scripts/conformite.mjs +6 -13
- package/scripts/copies-finies.mjs +52 -47
- package/scripts/depart-du-ticket.d.mts +53 -0
- package/scripts/depart-du-ticket.mjs +124 -0
- package/scripts/dependances-internes.mjs +115 -0
- package/scripts/dernier-vert.mjs +7 -15
- package/scripts/donnees-cles.mjs +228 -0
- package/scripts/droits.mjs +11 -1
- package/scripts/effets.mjs +352 -0
- package/scripts/enveloppe/enveloppe.mjs +119 -8
- package/scripts/enveloppe/lancer.sh +14 -18
- package/scripts/enveloppe/paquets-du-plan.mjs +2 -2
- package/scripts/enveloppe/travail-de-la-copie.mjs +5 -1
- package/scripts/etapes.mjs +5 -2
- package/scripts/faits-du-circuit.mjs +493 -0
- package/scripts/file-des-tickets.d.mts +21 -0
- package/scripts/file-des-tickets.mjs +58 -0
- package/scripts/flux-des-paquets.mjs +187 -0
- package/scripts/gardes-du-cadre.mjs +12 -2
- package/scripts/integration/file.mjs +475 -420
- package/scripts/integration/integrer.mjs +17 -19
- package/scripts/integration/rejeu.mjs +19 -4
- package/scripts/jointure.d.ts +145 -27
- package/scripts/langages/cargo/commandes.mjs +289 -109
- package/scripts/langages/cargo/composants.mjs +130 -34
- package/scripts/langages/cargo/exemples.mjs +12 -21
- package/scripts/langages/cargo/index.mjs +18 -8
- package/scripts/langages/cargo/sccache.mjs +8 -14
- package/scripts/langages/python/commandes.mjs +216 -100
- package/scripts/langages/python/composants.mjs +53 -21
- package/scripts/langages/python/exemples.mjs +6 -16
- package/scripts/langages/python/index.mjs +24 -8
- package/scripts/langages/python/lot.mjs +1 -36
- package/scripts/langages/typescript/construire.mjs +6 -163
- package/scripts/langages/typescript/exemples.mjs +3 -11
- package/scripts/langages/typescript/frontieres.mjs +1 -1
- package/scripts/langages/typescript/index.mjs +43 -61
- package/scripts/langages/typescript/interfaces-contre-code.mjs +4 -4
- package/scripts/langages/typescript/migrations/0.30.0-prefixe-des-tickets.mjs +63 -0
- package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +31 -0
- package/scripts/langages/typescript/migrations/0.30.0-titres-nommant-un-ticket.mjs +40 -0
- package/scripts/langages/typescript/mise-a-jour.mjs +1 -2
- package/scripts/langages/typescript/tailles-des-tests.mjs +40 -9
- package/scripts/langages/typescript/tests-de-nuit.mjs +12 -9
- package/scripts/langages/typescript/tests.mjs +17 -8
- package/scripts/langages/typescript/titres-de-tests.mjs +297 -0
- package/scripts/langages/typescript/turbo-des-paquets.mjs +183 -38
- package/scripts/langages/typescript/verdict.mjs +1 -1
- package/scripts/langages/typescript/verifier.mjs +31 -11
- package/scripts/langages/typescript/vitest-config/base.mjs +22 -1
- package/scripts/langages/typescript/vitest-config/bornes.mjs +13 -0
- package/scripts/langages/typescript/vitest-config/cibles.mjs +36 -14
- package/scripts/langages/typescript/vitest-config/delais.mjs +54 -0
- package/scripts/langages/typescript/vitest-config/delais.setup.mjs +11 -0
- package/scripts/langages/typescript/vitest-config/duree.classement.mjs +100 -0
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +49 -63
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +3 -0
- package/scripts/langages/typescript/vitest.nuit.config.mjs +4 -0
- package/scripts/mesure/pression.mjs +3 -3
- package/scripts/mesure-de-la-machine.d.mts +21 -0
- package/scripts/mesure-de-la-machine.mjs +76 -0
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +8 -2
- package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +120 -0
- package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +81 -0
- package/scripts/migrations.mjs +5 -0
- package/scripts/nuit.sh +10 -3
- package/scripts/outils-cles.d.mts +24 -0
- package/scripts/outils-cles.mjs +0 -1
- package/scripts/paquet-npm.mjs +147 -0
- package/scripts/paquet.mjs +73 -4
- package/scripts/paquets.mjs +34 -6
- package/scripts/passe-de-la-machine.mjs +66 -0
- package/scripts/places-de-la-machine.mjs +360 -0
- package/scripts/places-du-serveur.mjs +170 -0
- package/scripts/prefixe-des-tickets.mjs +68 -0
- package/scripts/preparation.mjs +10 -3
- package/scripts/registre.mjs +3 -2
- package/scripts/regles-des-places.d.mts +36 -0
- package/scripts/regles-des-places.mjs +70 -0
- package/scripts/reponses-du-circuit.d.mts +6 -0
- package/scripts/reponses-du-circuit.mjs +28 -0
- package/scripts/resultats.mjs +7 -9
- package/scripts/retirer-les-copies-finies.mjs +25 -0
- package/scripts/sans-reponse.d.mts +4 -0
- package/scripts/sans-reponse.mjs +13 -0
- package/scripts/seances.mjs +918 -0
- package/scripts/services-du-noyau.mjs +26 -8
- package/scripts/session-start.sh +2 -2
- package/scripts/sortie.mjs +3 -3
- package/scripts/sous-commandes.mjs +38 -9
- package/scripts/style-a-l-ecriture.mjs +229 -0
- package/scripts/superviseur.mjs +122 -111
- package/scripts/tableau.mjs +148 -110
- package/scripts/taches-du-graphe.mjs +328 -0
- package/scripts/ticket-du-circuit.mjs +206 -0
- package/scripts/transitions.d.mts +148 -0
- package/scripts/transitions.mjs +901 -0
- package/scripts/verrou-de-fichier.mjs +2 -2
- package/scripts/verrou-de-machine.mjs +28 -13
- package/skills/explorateur/SKILL.md +2 -1
- package/skills/pitmaster/SKILL.md +17 -18
- package/skills/pitmaster/references/consigne-agent.md +5 -1
- package/skills/release/SKILL.md +3 -3
- package/skills/relecteur/SKILL.md +4 -2
- package/skills/testwriter/SKILL.md +36 -24
- package/scripts/demon.mjs +0 -251
- package/scripts/integration/file-attente.mjs +0 -61
- package/scripts/langages/cargo/touches.mjs +0 -93
- package/scripts/langages/typescript/script-des-tests.mjs +0 -6
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// The mechanical steps of one integration, run by the circuit of the ticket (scripts/circuit.mjs)
|
|
3
3
|
// once the reviewer has accepted the lot, which the circuit builds from the ticket's copy. It
|
|
4
4
|
// commits the lot on the branch of the ticket, or refuses it with the full output of the step that
|
|
5
|
-
// refused. The
|
|
6
|
-
//
|
|
7
|
-
// common directory.
|
|
5
|
+
// refused. The circuit of the ticket then sends the branch to the queue of the project (the
|
|
6
|
+
// workflow `file:<racine>`, src/temporal/file/deroule.ts), which brings it onto main. Run from any
|
|
7
|
+
// working tree of the repository, it works on the main tree, found from git's common directory.
|
|
8
8
|
//
|
|
9
9
|
// npx grillhouse integrer --ticket <id>
|
|
10
10
|
// [--tests <patch>] [--code <patch>] --message <file> [--references <file>]
|
|
@@ -56,8 +56,7 @@
|
|
|
56
56
|
// directory of the ticket's circuit, `<copie>.travail`, stays for the circuit that still runs,
|
|
57
57
|
// and the queue removes it at the ticket's closure): a refusal, a locked copy for
|
|
58
58
|
// example, is written to the ticket, the commit stands. The ticket is labelled
|
|
59
|
-
// `en-file
|
|
60
|
-
// (scripts/integration/file-attente.mjs). main does not move here.
|
|
59
|
+
// `en-file`, which the queue removes. main does not move here.
|
|
61
60
|
//
|
|
62
61
|
// The references written in full are the generated files the project declares
|
|
63
62
|
// (`grillhouse.engendres`), then the frame's the circuit hands over (`--references`, a JSON file the
|
|
@@ -93,12 +92,12 @@ import { pathToFileURL } from 'node:url';
|
|
|
93
92
|
import { arbitrageTranche, estArbitrage } from '../arbitrages.mjs';
|
|
94
93
|
import { couvertPar, engendresDe, regenerer, touchesPar } from '../engendres.mjs';
|
|
95
94
|
import { langageDe } from '../langages.mjs';
|
|
95
|
+
import { avecLesDonnees, donneesDe } from '../donnees-cles.mjs';
|
|
96
96
|
import { avecLesOutils, outilsDe } from '../outils-cles.mjs';
|
|
97
97
|
import { lacherVerrou, prendreVerrou } from '../verrou-de-fichier.mjs';
|
|
98
|
-
import { dossierCommun, inscrireEntree } from './file-attente.mjs';
|
|
99
98
|
import { ouvrirCopie, RETIRER_COPIE } from './rejeu.mjs';
|
|
100
99
|
import { verdictDe } from './verdict.mjs';
|
|
101
|
-
import { A_REPASSER } from '../
|
|
100
|
+
import { A_REPASSER } from '../codes-de-sortie.mjs';
|
|
102
101
|
import { ouvrirBase } from '../mesure/base-de-passe.mjs';
|
|
103
102
|
|
|
104
103
|
// A file name as git writes it in a patch: a name with a character outside ASCII, a quote, a
|
|
@@ -250,11 +249,10 @@ function main(argv) {
|
|
|
250
249
|
return 2;
|
|
251
250
|
}
|
|
252
251
|
// The main tree, from git's common directory: run from a copy, the integration still works on it.
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
);
|
|
252
|
+
const commun = spawnSync('git', ['rev-parse', '--path-format=absolute', '--git-common-dir'], {
|
|
253
|
+
encoding: 'utf8',
|
|
254
|
+
}).stdout.trim();
|
|
255
|
+
const racine = path.dirname(commun);
|
|
258
256
|
const git = (...args) => spawnSync('git', ['-C', racine, ...args], { encoding: 'utf8' });
|
|
259
257
|
const bd = (...a) =>
|
|
260
258
|
spawnSync('bd', a, { cwd: racine, encoding: 'utf8', maxBuffer: 256 * 1024 * 1024 });
|
|
@@ -267,7 +265,7 @@ function main(argv) {
|
|
|
267
265
|
|
|
268
266
|
// One integration at a time: a second waits for the end of the first; a lock whose process is
|
|
269
267
|
// gone is taken over.
|
|
270
|
-
const verrou = path.join(
|
|
268
|
+
const verrou = path.join(commun, 'integration.lock');
|
|
271
269
|
prendreVerrou(verrou, { attendre: true });
|
|
272
270
|
const debut = Date.now();
|
|
273
271
|
// The working directory of the integration: a base of its own, removed at its end, swept by the
|
|
@@ -278,9 +276,11 @@ function main(argv) {
|
|
|
278
276
|
// 0. The keys of the project, before any work.
|
|
279
277
|
let engendres;
|
|
280
278
|
let outils;
|
|
279
|
+
let donnees;
|
|
281
280
|
try {
|
|
282
281
|
engendres = engendresDe(racine);
|
|
283
282
|
outils = outilsDe(racine);
|
|
283
|
+
donnees = donneesDe(racine);
|
|
284
284
|
} catch (e) {
|
|
285
285
|
return refuser(`Une clé grillhouse du package.json est refusée :\n${e.message}`);
|
|
286
286
|
}
|
|
@@ -385,7 +385,7 @@ function main(argv) {
|
|
|
385
385
|
const installation = installer();
|
|
386
386
|
if (installation) return refuser(installation);
|
|
387
387
|
if (aRegenerer.length) {
|
|
388
|
-
const env = avecLesOutils(outils, process.env);
|
|
388
|
+
const env = avecLesDonnees(donnees, avecLesOutils(outils, process.env));
|
|
389
389
|
const refus = regenerer({
|
|
390
390
|
refs: aRegenerer,
|
|
391
391
|
dansCopie,
|
|
@@ -403,7 +403,7 @@ function main(argv) {
|
|
|
403
403
|
|
|
404
404
|
// 6. The tests: the build, the guards and every test of the day, green required.
|
|
405
405
|
dire('— npm run verifier (construction, gardes, tests)');
|
|
406
|
-
const verdict = tester().status;
|
|
406
|
+
const verdict = tester({ sorte: 'Intégration', ticket: o.ticket }).status;
|
|
407
407
|
if (verdict === A_REPASSER) {
|
|
408
408
|
dire(
|
|
409
409
|
`⏱ À repasser (code ${A_REPASSER}) : l'attente de la machine a atteint sa borne. Le lot n'est ni commis ni refusé ; relance la même commande.`
|
|
@@ -428,7 +428,7 @@ function main(argv) {
|
|
|
428
428
|
const commit = dansCopie('rev-parse', 'HEAD').stdout.trim();
|
|
429
429
|
|
|
430
430
|
// 8. The branch of the ticket takes the commit; the ticket's copy follows it (it carried the
|
|
431
|
-
// lot, which the commit now holds) and is removed; the ticket
|
|
431
|
+
// lot, which the commit now holds) and is removed; the ticket is labelled `en-file`.
|
|
432
432
|
const pose = git('update-ref', `refs/heads/${branche}`, commit);
|
|
433
433
|
if (pose.status !== 0) {
|
|
434
434
|
return refuser(`La branche ${branche} ne prend pas ${commit.slice(0, 7)} :\n${pose.stderr}`);
|
|
@@ -445,12 +445,10 @@ function main(argv) {
|
|
|
445
445
|
})
|
|
446
446
|
: { status: 0, stderr: '' };
|
|
447
447
|
if (retrait.status !== 0) {
|
|
448
|
-
const raison = `La copie ${copieTicket} n'est pas retirée après le commit de ${branche} : ${retrait.stderr.trim()}
|
|
448
|
+
const raison = `La copie ${copieTicket} n'est pas retirée après le commit de ${branche} : ${retrait.stderr.trim()}`;
|
|
449
449
|
bd('comments', 'add', o.ticket, raison);
|
|
450
450
|
dire(`⚠ ${raison}`);
|
|
451
451
|
}
|
|
452
|
-
inscrireEntree(racine, branche, o.ticket);
|
|
453
|
-
dire('✓ en file');
|
|
454
452
|
const duree = Math.round((Date.now() - debut) / 100) / 10;
|
|
455
453
|
dire(`⏱ ${duree} s`);
|
|
456
454
|
return 0;
|
|
@@ -120,9 +120,10 @@ export function ouvrirCopie({ racine, copie, ref, dire }) {
|
|
|
120
120
|
];
|
|
121
121
|
const montage = spawnSync('bash', monter('true'), { encoding: 'utf8' });
|
|
122
122
|
if (montage.status !== 0) return { refus: montage.stderr.trim() };
|
|
123
|
-
const lancer = (commande, args) => {
|
|
123
|
+
const lancer = (commande, args, envPlus = null) => {
|
|
124
124
|
const r = spawnSync('bash', monter(commande, ...args), {
|
|
125
125
|
cwd: copie,
|
|
126
|
+
...(envPlus ? { env: { ...process.env, ...envPlus } } : {}),
|
|
126
127
|
encoding: 'utf8',
|
|
127
128
|
maxBuffer: SORTIE_MAX,
|
|
128
129
|
});
|
|
@@ -154,10 +155,24 @@ export function ouvrirCopie({ racine, copie, ref, dire }) {
|
|
|
154
155
|
|
|
155
156
|
// The checks of the copy: its preparation, then its verification; the first that is not green
|
|
156
157
|
// ends them.
|
|
157
|
-
|
|
158
|
+
// `identite` (`{ sorte, ticket }`, the ticket null when unknown) is set in the environment of
|
|
159
|
+
// `npm run verifier` alone, which names itself so at the lock of the machine; the preparation
|
|
160
|
+
// does not receive it.
|
|
161
|
+
const tester = identite => {
|
|
158
162
|
let r;
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
const commandes = commandesDeVerification(copie);
|
|
164
|
+
for (const [i, [commande, args]] of commandes.entries()) {
|
|
165
|
+
const verifier = i === commandes.length - 1 && identite;
|
|
166
|
+
r = lancer(
|
|
167
|
+
commande,
|
|
168
|
+
args,
|
|
169
|
+
verifier
|
|
170
|
+
? {
|
|
171
|
+
GRILLHOUSE_VERIFICATION_SORTE: identite.sorte,
|
|
172
|
+
GRILLHOUSE_VERIFICATION_TICKET: identite.ticket ?? '',
|
|
173
|
+
}
|
|
174
|
+
: null
|
|
175
|
+
);
|
|
161
176
|
if (r.status !== 0) {
|
|
162
177
|
break;
|
|
163
178
|
}
|
package/scripts/jointure.d.ts
CHANGED
|
@@ -230,36 +230,43 @@ export interface Composition {
|
|
|
230
230
|
racine: string,
|
|
231
231
|
o: { composants: Composant[]; noms: string[]; texte: string; nommes: Composant[] }
|
|
232
232
|
): Lecteurs;
|
|
233
|
-
touches(
|
|
234
|
-
racine: string,
|
|
235
|
-
o: { depuis: string }
|
|
236
|
-
): { touches: Composant[]; dependants: Composant[]; horsGraphe: string[] };
|
|
237
233
|
elementsDuLot(racine: string, o: { avant: string; apres: string }): ElementsDuLot;
|
|
238
234
|
commandes(
|
|
239
235
|
racine: string
|
|
240
236
|
): { tester: Commande; verifier: Commande; typer: Commande } & Record<string, Commande>;
|
|
241
237
|
verdict(dossier: string): { rapports: RapportDeTest[]; taches: TacheJouee[] };
|
|
242
238
|
estUnTest(chemin: string, racine: string): ClasseDeTest;
|
|
243
|
-
/**
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
239
|
+
/** Whether the test file `chemin` (from `racine`) is out of the day, one that only the night
|
|
240
|
+
* plays (a night test, a time budget bench, a time witness), by the module's own definitions;
|
|
241
|
+
* false for any other file. */
|
|
242
|
+
horsDuJour(chemin: string, racine: string): boolean;
|
|
243
|
+
/** Optional, for a tool that reads a test file beside it (typescript): the sibling of HEAD's
|
|
244
|
+
* version of the test file `chemin` (from `racine`), from the root: a file beside it, a test
|
|
245
|
+
* the tool plays in the same run as it, its tests named in the run's report as the file's, of
|
|
246
|
+
* its class (day, night, bench), which the proof of the red writes, plays and removes; null for
|
|
247
|
+
* a file that has none. */
|
|
248
|
+
soeurDAvant?(chemin: string, racine: string): string | null;
|
|
249
|
+
/** Whether HEAD's version of the test file `chemin` (from `racine`) plays in a tree of its own,
|
|
250
|
+
* the copy's with that file alone replaced, under the file's own name, which the proof of the
|
|
251
|
+
* red builds, plays and removes (cargo, python); false for a file the tool cannot play so
|
|
252
|
+
* (cargo: a target `tests/<dossier>/main.rs`, a unit test of `src/`: `testsDeHead`), plays
|
|
253
|
+
* beside it (typescript: `soeurDAvant`) or does not play. */
|
|
254
|
+
arbreDAvant(chemin: string, racine: string): boolean;
|
|
255
|
+
/** The environment a tree of HEAD's version of `chemin` plays under (cargo: the target
|
|
256
|
+
* directory of the copy's compilations); empty for none. */
|
|
257
|
+
envDArbre(chemin: string, racine: string): Record<string, string>;
|
|
249
258
|
/** The names of the tests of HEAD's version of the test file `chemin` (from `racine`), as the
|
|
250
|
-
* verdict names them, read without playing them, for a file
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
* grillhouse-3e2.2). Null for any other file, or one HEAD does not hold. */
|
|
259
|
+
* verdict names them, read without playing them, for a file whose tree the proof does not play
|
|
260
|
+
* (cargo: a unit test of `src/`, a target `tests/<dossier>/main.rs`, its out-of-line modules read
|
|
261
|
+
* too), or whose tree breaks the build of its package while the lot alone builds (cargo: a
|
|
262
|
+
* target `tests/<nom>.rs` whose HEAD's version no longer compiles against the lot's
|
|
263
|
+
* `tests/common`, grillhouse-3e2.2); the proof of the red holds each for a green HEAD already
|
|
264
|
+
* holds. `lire` gives HEAD's text of a file from the root, null for none. Null for any other
|
|
265
|
+
* file, or one HEAD does not hold. */
|
|
258
266
|
testsDeHead(
|
|
259
267
|
chemin: string,
|
|
260
268
|
racine: string,
|
|
261
|
-
lire: (fichier: string) => string | null
|
|
262
|
-
options?: { sansSoeur?: boolean }
|
|
269
|
+
lire: (fichier: string) => string | null
|
|
263
270
|
): string[] | null;
|
|
264
271
|
manifestes: Manifestes;
|
|
265
272
|
fichiersEngendres(racine: string): FichierEngendre[];
|
|
@@ -272,6 +279,35 @@ export interface Langage extends Composition {
|
|
|
272
279
|
/** The manifest of a package of this language, in its folder (`package.json`, `Cargo.toml`):
|
|
273
280
|
* the guard of the languages asks it of a package the architecture declares of this language. */
|
|
274
281
|
manifeste: string;
|
|
282
|
+
/** The name the text of a manifest of this language gives its package (the `name` of a
|
|
283
|
+
* `package.json`, of the `[package]` of a `Cargo.toml`, of the `[project]` of a
|
|
284
|
+
* `pyproject.toml`); null for none. */
|
|
285
|
+
nomDuManifeste(texte: string): string | null;
|
|
286
|
+
/** The internal dependencies the manifest of the package at `chemin` (from `racine`) links by a
|
|
287
|
+
* path or a workspace entry, as the names of the packages (`nomA` gives the name of the package
|
|
288
|
+
* whose manifest lies in a folder, null for none; a dependency without one keeps its key);
|
|
289
|
+
* `table` names where the manifest links them and `outil` the tool that builds by them. None for
|
|
290
|
+
* a language whose manifest is the package.json. */
|
|
291
|
+
liensDuManifeste(
|
|
292
|
+
racine: string,
|
|
293
|
+
chemin: string,
|
|
294
|
+
nomA: (dossier: string) => string | null
|
|
295
|
+
): { noms: string[]; table: string; outil: string };
|
|
296
|
+
/** Builds the packages `noms` (by their package.json name) of the project in the working
|
|
297
|
+
* directory, before the tests of a package that declares them as data; throws, named, on a
|
|
298
|
+
* failure. Held by the module of the language whose manifest is the package.json. */
|
|
299
|
+
construireLesPaquets(noms: string[]): void;
|
|
300
|
+
/** The absolute path of the output `sortie` that the package at `chemin` (from `racine`) builds,
|
|
301
|
+
* which another package's tests run (`grillhouse.donnees`, scripts/donnees-cles.mjs): for a
|
|
302
|
+
* crate, a binary of `cargo metadata` in its target directory, `release` or `debug` as `release`
|
|
303
|
+
* says. Throws, named, for a package without that output, and « sortie non prise en charge pour
|
|
304
|
+
* <langage> » for a language whose outputs are not data. */
|
|
305
|
+
sortieDuPaquet(
|
|
306
|
+
racine: string,
|
|
307
|
+
chemin: string,
|
|
308
|
+
sortie: string,
|
|
309
|
+
options?: { release?: boolean }
|
|
310
|
+
): string;
|
|
275
311
|
/** The entries of the index of the interfaces, one per interface of the module's components and
|
|
276
312
|
* the root's, `lignes` as the index writes them, which the core assembles for a project of
|
|
277
313
|
* several languages (scripts/index-interfaces.mjs). */
|
|
@@ -339,7 +375,7 @@ export function ouvrirAvancement(o: {
|
|
|
339
375
|
/** Writes the plan of the tasks of a pass in its progress. */
|
|
340
376
|
export function inscrireLePlan(dossier: string, o: { racine: string; taches: unknown[] }): void;
|
|
341
377
|
/** Keeps the total of a pass that ended, for the next one's measure. */
|
|
342
|
-
export function garderLeTotal(dossier: string
|
|
378
|
+
export function garderLeTotal(dossier: string): void;
|
|
343
379
|
/** Names the progress directory of the measure that holds the lock of the machine under `env`,
|
|
344
380
|
* beside the lock (scripts/verrou-de-machine.mjs); the function that takes it out. */
|
|
345
381
|
export function nommerLAvancement(o: { env?: NodeJS.ProcessEnv; dossier: string }): () => void;
|
|
@@ -350,6 +386,8 @@ export function dansLeTemporaire(chemin: string, env?: NodeJS.ProcessEnv): boole
|
|
|
350
386
|
/** The cache of compilation of `outil`, under `~/.cache/grillhouse/`, never in the temporary
|
|
351
387
|
* directory. */
|
|
352
388
|
export function cacheDeCompilation(outil: string, env?: NodeJS.ProcessEnv): string;
|
|
389
|
+
/** The path of the command <nom> in the PATH of <env>, or null (scripts/commandes-du-path.mjs). */
|
|
390
|
+
export function trouverDansLePath(nom: string, env?: NodeJS.ProcessEnv): string | null;
|
|
353
391
|
/** The cache of `outil` for the build rooted at `racine`, swept once `racine` is gone. */
|
|
354
392
|
export function cacheDeLaRacine(
|
|
355
393
|
outil: string,
|
|
@@ -365,8 +403,14 @@ export function ligneDesRestes(restes: string[]): string | null;
|
|
|
365
403
|
export function retirerALInterruption(retirer: () => void): () => void;
|
|
366
404
|
/** The pressure of the processor above which a pass is « à repasser » (scripts/mesure/pression.mjs). */
|
|
367
405
|
export const SEUIL_PRESSION: number;
|
|
368
|
-
/** The exit code of a pass « à repasser
|
|
406
|
+
/** The exit code of a pass « à repasser » (scripts/codes-de-sortie.mjs). */
|
|
369
407
|
export const A_REPASSER: number;
|
|
408
|
+
/** The file of Beads that holds the prefix of the tickets (scripts/prefixe-des-tickets.mjs). */
|
|
409
|
+
export const CONFIG_BEADS: string;
|
|
410
|
+
/** The prefix of the tickets, read from the key `issue-prefix`; throws when it is missing. */
|
|
411
|
+
export function prefixe(racine: string): string;
|
|
412
|
+
/** Writes the key `issue-prefix`, unless it holds a value; the line written, or null. */
|
|
413
|
+
export function ecrireLePrefixe(racine: string, valeur: string): string | null;
|
|
370
414
|
/** The pressure of the processor, in percent, or null when it cannot be read. */
|
|
371
415
|
export function lirePression(fichier?: string): number | null;
|
|
372
416
|
/** The pressure `p` as a line says it. */
|
|
@@ -375,20 +419,94 @@ export function ecrirePression(p: number | null): string;
|
|
|
375
419
|
export const CHANGEMENTS: string;
|
|
376
420
|
/** The variable naming the commit of the last green a run measures itself from. */
|
|
377
421
|
export const DEPUIS_LE_VERT: string;
|
|
378
|
-
/**
|
|
379
|
-
*
|
|
380
|
-
export
|
|
422
|
+
/** The variable the composed command sets for a module that plays after a module whose pass was
|
|
423
|
+
* red: the pass of the verification then keeps no green. */
|
|
424
|
+
export const PASSE_ROUGE: string;
|
|
425
|
+
/** Keeps the green of a pass, which the next one measures itself from: the one pass of the
|
|
426
|
+
* verification keeps it, once, when every task of every language of the graph is green; no module
|
|
427
|
+
* of language keeps one. */
|
|
428
|
+
export function garderLeVert(etat: unknown): void;
|
|
381
429
|
/** The measure of the repository at `racine` against its last green. */
|
|
382
430
|
export function mesure(racine: string, o?: { tout?: boolean; dans?: string }): unknown;
|
|
431
|
+
/** The workers a session of an agent plays its tests on (`GRILLHOUSE_TRAVAILLEURS` of `env`), or
|
|
432
|
+
* null in a heavy pass (every core); refuses a value that is not a positive integer, by name. */
|
|
433
|
+
export function travailleursDeLaSeance(env?: NodeJS.ProcessEnv): number | null;
|
|
383
434
|
/** The wait for the lock of the machine, ended without it (scripts/verrou-de-machine.mjs). */
|
|
384
435
|
export class AttenteDeLaMachine extends Error {}
|
|
385
|
-
/** Runs `faire`
|
|
386
|
-
export function
|
|
436
|
+
/** Runs `faire` on a place of the machine, then under its lock (scripts/places-de-la-machine.mjs). */
|
|
437
|
+
export function avecLaMachineEtUnePlace(...args: unknown[]): unknown;
|
|
438
|
+
/** Plays a pass on a place of the machine: its exit code, or the code of the wait that stops. */
|
|
439
|
+
export function surUnePlace(
|
|
440
|
+
passe: (env: NodeJS.ProcessEnv) => number,
|
|
441
|
+
o?: { env?: NodeJS.ProcessEnv; dire?: (l: string) => void }
|
|
442
|
+
): number;
|
|
387
443
|
/** Waits for room in the temporary directory, as a heavy pass does before it plays. */
|
|
388
444
|
export function attendreDeLaPlace(o?: Record<string, unknown>): void;
|
|
389
445
|
/** The source files of the project at `racine` under `dossier`, as paths from `racine`, what the
|
|
390
446
|
* tools of its language write left out (scripts/sources.mjs). */
|
|
391
447
|
export function sources(racine: string, dossier?: string): string[];
|
|
448
|
+
/** The packages of a language that has no package.json of its own (a crate, a project of Python)
|
|
449
|
+
* the tables of docs/ARCHITECTURE.md declare at `racine`, each `{ langage, chemin, nom }` (`chemin`
|
|
450
|
+
* from the root, `nom` the manifest's name); none for a project that declares neither language
|
|
451
|
+
* (scripts/paquet-npm.mjs). */
|
|
452
|
+
export function paquetsSansPackageJson(
|
|
453
|
+
racine: string
|
|
454
|
+
): { langage: string; chemin: string; nom: string }[];
|
|
455
|
+
/** The name of the script and of the task of the tests of a package, the same for every language. */
|
|
456
|
+
export const SCRIPT_DES_TESTS: string;
|
|
457
|
+
/** The name of the environment variable that carries the paths and the options of a targeted run
|
|
458
|
+
* to the task of the tests (`{ arguments, rejouer? }` in JSON), the same for every language. */
|
|
459
|
+
export const TESTS_CIBLES: string;
|
|
460
|
+
/** The variable the composed command sets for the modules of a `verifier` that plays beside the
|
|
461
|
+
* module of package.json, whose pass already plays every task of the graph: they play none. */
|
|
462
|
+
export const GRAPHE_JOUE: string;
|
|
463
|
+
/** The beginning of the name of a trace task, the output of a package that another's tests read. */
|
|
464
|
+
export const TRACE: string;
|
|
465
|
+
/** The name of the package of the graph whose folder is `dossier` (absolute) in `racine`, or null
|
|
466
|
+
* when that folder is no package of the graph (scripts/taches-du-graphe.mjs). */
|
|
467
|
+
export function nomDuPaquet(racine: string, dossier: string): string | null;
|
|
468
|
+
/** Runs the tasks `taches` of the packages `noms` (all when empty) with the task runner `outil`,
|
|
469
|
+
* each task whose dependencies succeed played to its end: the runner's exit code. `tests` is the
|
|
470
|
+
* content of the variable `TESTS_CIBLES` of the run; the variable of `env` never passes on. */
|
|
471
|
+
export function lancerLesTaches(o: {
|
|
472
|
+
outil: string;
|
|
473
|
+
racine: string;
|
|
474
|
+
taches: string[];
|
|
475
|
+
noms?: Iterable<string>;
|
|
476
|
+
tests?: { arguments: string[]; rejouer?: string };
|
|
477
|
+
env?: NodeJS.ProcessEnv;
|
|
478
|
+
}): number;
|
|
479
|
+
/** The content of the variable `TESTS_CIBLES` for a targeted run: the paths and options it names, and
|
|
480
|
+
* the moment of the run when `force` (the task plays for real); undefined when there is nothing to
|
|
481
|
+
* carry. */
|
|
482
|
+
export function testsCibles(o: {
|
|
483
|
+
arguments: string[];
|
|
484
|
+
force?: boolean;
|
|
485
|
+
}): { arguments: string[]; rejouer?: string } | undefined;
|
|
486
|
+
/** The paths and the options of a task of the tests of a package, run by its script: the paths
|
|
487
|
+
* `donnes` its script names, each replaced by those of the variable `TESTS_CIBLES` of `env` that
|
|
488
|
+
* lie in the same component (`dossierDe`: the folder of the component of an absolute path, or
|
|
489
|
+
* null), and the options of the variable. */
|
|
490
|
+
export function cheminsDeLaTache(o: {
|
|
491
|
+
racine: string;
|
|
492
|
+
donnes: string[];
|
|
493
|
+
env?: NodeJS.ProcessEnv;
|
|
494
|
+
dossierDe: (absolu: string) => string | null;
|
|
495
|
+
}): { chemins: string[]; options: string[] };
|
|
496
|
+
/** The trace tasks of a plan of the runner (`run … --dry=json`, parsed), those `garder` keeps: their
|
|
497
|
+
* task ids, sorted. */
|
|
498
|
+
export function tracesDuPlan(
|
|
499
|
+
plan: { tasks: { task: string; taskId: string }[] },
|
|
500
|
+
garder?: (t: any) => boolean
|
|
501
|
+
): string[];
|
|
502
|
+
/** The command `construire --echec <fichier> <plan>` of a module, run from the root of the copy:
|
|
503
|
+
* builds the plan and its providers with the task runner `outil`, `run build --filter=<paquet>…`
|
|
504
|
+
* (the whole copy for a plan with a path that is no package); its exit code. */
|
|
505
|
+
export function construireDepuisLesArguments(
|
|
506
|
+
outil: string,
|
|
507
|
+
args: string[],
|
|
508
|
+
racine?: string
|
|
509
|
+
): number;
|
|
392
510
|
/** What `lire` returns, read once under `cle` while the core holds a scope of readings done once
|
|
393
511
|
* (a sweep that asks many questions of a tree that does not move), at each call otherwise
|
|
394
512
|
* (scripts/lecture-unique.mjs). */
|