@roomi-fields/grillhouse 0.30.0 → 0.31.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 +30 -0
- package/agents/developpeur.md +0 -1
- package/agents/explorateur.md +0 -1
- package/agents/questionneur.md +0 -1
- package/agents/testwriter.md +0 -1
- package/dist/temporal/circuit/client.d.ts +2 -2
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/circuit/commande.js +4 -4
- package/dist/temporal/circuit/commande.js.map +1 -1
- package/dist/temporal/circuit/contrat.d.ts +3 -3
- package/dist/temporal/circuit/contrat.js +8 -2
- package/dist/temporal/circuit/contrat.js.map +1 -1
- package/dist/temporal/circuit/deroule.js +3 -3
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/commande.js +5 -6
- package/dist/temporal/commande.js.map +1 -1
- package/dist/temporal/installation.d.ts +0 -4
- package/dist/temporal/installation.js +12 -34
- package/dist/temporal/installation.js.map +1 -1
- package/docs/ARCHITECTURE.md +49 -19
- package/docs/CADRE.md +10 -0
- package/docs/INTERFACE.md +8 -3
- package/package.json +2 -2
- package/scripts/activites.mjs +150 -77
- package/scripts/aiguillage.mjs +33 -11
- package/scripts/avancement.mjs +27 -10
- package/scripts/bilan.mjs +101 -25
- package/scripts/cadre.mjs +5 -2
- package/scripts/circuit.mjs +153 -57
- package/scripts/composants-affectes.mjs +64 -21
- package/scripts/composition-des-langages.mjs +5 -3
- package/scripts/conformite.mjs +54 -19
- package/scripts/dependances-internes.mjs +9 -3
- package/scripts/dernier-vert.mjs +54 -19
- package/scripts/dette.mjs +32 -11
- package/scripts/donnees-cles.mjs +24 -8
- package/scripts/droits.mjs +40 -15
- package/scripts/empreinte-d-etape.mjs +17 -0
- package/scripts/engendres.mjs +15 -5
- package/scripts/enveloppe/enveloppe.mjs +141 -48
- package/scripts/enveloppe/travail-de-la-copie.mjs +36 -12
- package/scripts/faits-du-circuit.mjs +1 -1
- package/scripts/flux-des-paquets.mjs +21 -7
- package/scripts/gardes-du-cadre.mjs +9 -3
- package/scripts/init.mjs +11 -4
- package/scripts/integration/file.mjs +84 -29
- package/scripts/integration/integrer.mjs +70 -24
- package/scripts/integration/rejeu.mjs +26 -9
- package/scripts/jointure.d.ts +6 -1
- package/scripts/langages/cargo/commandes.mjs +97 -18
- package/scripts/langages/cargo/composants.mjs +24 -8
- package/scripts/langages/cargo/index.mjs +4 -0
- package/scripts/langages/cargo/tests-de-head.mjs +25 -9
- package/scripts/langages/python/commandes.mjs +3 -1
- package/scripts/langages/python/index.mjs +4 -0
- package/scripts/langages/typescript/chemins-des-tests.mjs +6 -2
- package/scripts/langages/typescript/composants.mjs +9 -3
- package/scripts/langages/typescript/consommateurs-arbitres.mjs +40 -14
- package/scripts/langages/typescript/consommateurs.mjs +39 -14
- package/scripts/langages/typescript/elements-du-lot.mjs +36 -12
- package/scripts/langages/typescript/frontieres.mjs +66 -22
- package/scripts/langages/typescript/index-interfaces.mjs +36 -13
- package/scripts/langages/typescript/index.mjs +10 -3
- package/scripts/langages/typescript/interfaces-contre-code.mjs +109 -41
- package/scripts/langages/typescript/lecteurs.mjs +36 -11
- package/scripts/langages/typescript/migrations/0.23.0-config-vitest.mjs +15 -5
- package/scripts/langages/typescript/migrations/0.25.0-chemins-des-tests.mjs +6 -2
- package/scripts/langages/typescript/migrations/0.25.0-tailles-des-tests.mjs +6 -2
- package/scripts/langages/typescript/migrations/0.30.0-tailles-des-outils-lourds.mjs +3 -1
- package/scripts/langages/typescript/parcours.mjs +12 -4
- package/scripts/langages/typescript/regle-des-tests.mjs +9 -3
- package/scripts/langages/typescript/resumes.mjs +9 -3
- package/scripts/langages/typescript/tailles-des-tests.mjs +58 -16
- package/scripts/langages/typescript/tests-de-nuit.mjs +3 -1
- package/scripts/langages/typescript/tests.mjs +24 -8
- package/scripts/langages/typescript/titres-de-tests.mjs +35 -12
- package/scripts/langages/typescript/turbo-des-paquets.mjs +152 -51
- package/scripts/langages/typescript/verdict.mjs +3 -1
- package/scripts/langages/typescript/verifier.mjs +28 -10
- package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +15 -5
- package/scripts/langages/typescript/vitest-config/base.mjs +7 -2
- package/scripts/langages/typescript/vitest-config/changements.mjs +21 -8
- package/scripts/langages/typescript/vitest-config/delais.mjs +9 -3
- package/scripts/langages/typescript/vitest-config/duree.classement.mjs +12 -4
- package/scripts/langages/typescript/vitest-config/duree.reporter.mjs +17 -6
- package/scripts/langages/typescript/vitest-config/lances.mjs +83 -27
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +7 -0
- package/scripts/langages/typescript/vitest-config/resultats.mjs +3 -1
- package/scripts/lint-des-scripts.mjs +58 -0
- package/scripts/mesure/base-de-passe.mjs +117 -25
- package/scripts/mesure/pression.mjs +9 -3
- package/scripts/migrations/0.23.0-charte-importee.mjs +6 -2
- package/scripts/migrations/0.23.0-crochets-de-seance.mjs +25 -8
- package/scripts/migrations/0.23.0-marche-du-projet.mjs +18 -6
- package/scripts/migrations/0.23.2-copies-du-cadre.mjs +48 -16
- package/scripts/migrations/0.24.12-tri-des-decouvertes.mjs +6 -2
- package/scripts/migrations/0.25.0-script-des-tests.mjs +15 -5
- package/scripts/migrations/0.30.0-ci-appelle-la-verification.mjs +6 -2
- package/scripts/migrations/0.31.0-paquets-dans-le-graphe.mjs +7 -7
- package/scripts/nuit.sh +15 -0
- package/scripts/outil.mjs +3 -1
- package/scripts/outils-cles.mjs +18 -7
- package/scripts/paquet-npm.mjs +15 -5
- package/scripts/paquets.mjs +12 -4
- package/scripts/passe-de-la-machine.mjs +7 -2
- package/scripts/places-de-la-machine.mjs +66 -12
- package/scripts/preparation.mjs +15 -5
- package/scripts/registre.mjs +6 -2
- package/scripts/reprise.mjs +66 -0
- package/scripts/resultats.mjs +105 -37
- package/scripts/seances.mjs +22 -4
- package/scripts/services-du-noyau.mjs +1 -0
- package/scripts/sous-commandes.mjs +3 -1
- package/scripts/style-a-l-ecriture.mjs +48 -17
- package/scripts/tableau.mjs +34 -9
- package/scripts/taches-du-graphe.mjs +33 -13
- package/scripts/ticket-du-circuit.mjs +10 -0
- package/scripts/transitions.mjs +141 -24
- package/scripts/verrou-de-fichier.mjs +6 -2
- package/scripts/verrou-de-machine.mjs +123 -39
- package/scripts/verrous/commande.mjs +50 -17
- package/scripts/verrous/ticket-du-sous-agent.mjs +9 -3
- package/scripts/verrous/verrou.mjs +42 -14
- package/skills/explorateur/SKILL.md +7 -1
- package/skills/grill/SKILL.md +1 -1
- package/skills/mesure/SKILL.md +3 -0
- package/skills/relecteur/SKILL.md +1 -1
- package/skills/testwriter/SKILL.md +12 -6
package/scripts/resultats.mjs
CHANGED
|
@@ -504,25 +504,35 @@ export function sorteDuPlan(fiche) {
|
|
|
504
504
|
function erreurs(schema, valeur, ou) {
|
|
505
505
|
const nom = ou || 'la fiche';
|
|
506
506
|
if (schema.type === 'object') {
|
|
507
|
-
if (!valeur || typeof valeur !== 'object' || Array.isArray(valeur))
|
|
507
|
+
if (!valeur || typeof valeur !== 'object' || Array.isArray(valeur)) {
|
|
508
508
|
return [`${nom} : un objet`];
|
|
509
|
+
}
|
|
509
510
|
const out = [];
|
|
510
511
|
for (const k of schema.required ?? []) {
|
|
511
|
-
if (!(k in valeur))
|
|
512
|
+
if (!(k in valeur)) {
|
|
513
|
+
out.push(`${ou ? `${ou}.` : ''}${k} : manque`);
|
|
514
|
+
}
|
|
512
515
|
}
|
|
513
516
|
for (const [k, v] of Object.entries(valeur)) {
|
|
514
517
|
const sous = schema.properties[k];
|
|
515
518
|
const chemin = `${ou ? `${ou}.` : ''}${k}`;
|
|
516
|
-
if (!sous)
|
|
517
|
-
|
|
519
|
+
if (!sous) {
|
|
520
|
+
out.push(`${chemin} : hors du schéma`);
|
|
521
|
+
} else {
|
|
522
|
+
out.push(...erreurs(sous, v, chemin));
|
|
523
|
+
}
|
|
518
524
|
}
|
|
519
525
|
return out;
|
|
520
526
|
}
|
|
521
527
|
if (schema.type === 'array') {
|
|
522
|
-
if (!Array.isArray(valeur))
|
|
528
|
+
if (!Array.isArray(valeur)) {
|
|
529
|
+
return [`${nom} : une liste`];
|
|
530
|
+
}
|
|
523
531
|
return valeur.flatMap((v, i) => erreurs(schema.items, v, `${ou}[${i}]`));
|
|
524
532
|
}
|
|
525
|
-
if (typeof valeur !== 'string')
|
|
533
|
+
if (typeof valeur !== 'string') {
|
|
534
|
+
return [`${nom} : un texte`];
|
|
535
|
+
}
|
|
526
536
|
if (schema.enum && !schema.enum.includes(valeur)) {
|
|
527
537
|
return [`${nom} : « ${valeur} » n'est pas l'un de ${schema.enum.join(', ')}`];
|
|
528
538
|
}
|
|
@@ -561,13 +571,17 @@ export function conformiteDuLot(fiche, { elements, fichiers }) {
|
|
|
561
571
|
const ids = new Set(elements.map(e => e.id));
|
|
562
572
|
const hors = new Set(fichiers ?? []);
|
|
563
573
|
const duLot = element => {
|
|
564
|
-
if (ids.has(element) || hors.has(element))
|
|
574
|
+
if (ids.has(element) || hors.has(element)) {
|
|
575
|
+
return true;
|
|
576
|
+
}
|
|
565
577
|
const diese = element.lastIndexOf('#');
|
|
566
578
|
return diese > 0 && diese < element.length - 1 && hors.has(element.slice(0, diese));
|
|
567
579
|
};
|
|
568
580
|
const fautes = [];
|
|
569
581
|
const sans = elements.filter(e => !lignes.some(l => l.element === e.id)).map(e => e.id);
|
|
570
|
-
if (sans.length)
|
|
582
|
+
if (sans.length) {
|
|
583
|
+
fautes.push(`conformite : sans ligne pour ${sans.join(', ')}`);
|
|
584
|
+
}
|
|
571
585
|
for (const [i, l] of lignes.entries()) {
|
|
572
586
|
if (!duLot(l.element)) {
|
|
573
587
|
fautes.push(`conformite[${i}].element : ${l.element} n'est pas un élément du lot`);
|
|
@@ -610,10 +624,14 @@ export function cleDuConstat(titre) {
|
|
|
610
624
|
// (<titres>), as the author answers in each thread of a review: a FAIT without the answer to one,
|
|
611
625
|
// by its title (a BLOQUÉ or a BESOIN stops the circuit before any review). The fault, or null.
|
|
612
626
|
export function reponsesAuxConstats(fiche, titres) {
|
|
613
|
-
if (fiche.statut !== 'FAIT')
|
|
627
|
+
if (fiche.statut !== 'FAIT') {
|
|
628
|
+
return null;
|
|
629
|
+
}
|
|
614
630
|
const repondus = new Set((fiche.reponses ?? []).map(r => cleDuConstat(r.titre)));
|
|
615
631
|
const sans = titres.filter(t => !repondus.has(t)).map(t => `« ${t} »`);
|
|
616
|
-
if (!sans.length)
|
|
632
|
+
if (!sans.length) {
|
|
633
|
+
return null;
|
|
634
|
+
}
|
|
617
635
|
return `reponses : sans réponse ${sans.length > 1 ? 'aux constats' : 'au constat'} ${sans.join(', ')}`;
|
|
618
636
|
}
|
|
619
637
|
|
|
@@ -629,7 +647,9 @@ export function suiviDesConstats(fiche, titres) {
|
|
|
629
647
|
return `suivi : sans ligne pour ${sans.length > 1 ? 'les constats' : 'le constat'} ${liste(sans)}`;
|
|
630
648
|
}
|
|
631
649
|
const tenus = fiche.verdict === 'ACCEPTÉ' ? titres.filter(t => etats.get(t) !== 'levé') : [];
|
|
632
|
-
if (!tenus.length)
|
|
650
|
+
if (!tenus.length) {
|
|
651
|
+
return null;
|
|
652
|
+
}
|
|
633
653
|
return `suivi : un ACCEPTÉ tient ${tenus.length > 1 ? 'les constats' : 'le constat'} ${liste(tenus)} non levé${tenus.length > 1 ? 's' : ''}`;
|
|
634
654
|
}
|
|
635
655
|
|
|
@@ -641,10 +661,15 @@ export function conformiteDuTri(fiche, decouvertes) {
|
|
|
641
661
|
const lignes = (fiche.verdicts ?? []).map(l => l.decouverte);
|
|
642
662
|
const fautes = [];
|
|
643
663
|
const sans = decouvertes.filter(d => !lignes.includes(d));
|
|
644
|
-
if (sans.length)
|
|
664
|
+
if (sans.length) {
|
|
665
|
+
fautes.push(`verdicts : sans ligne pour ${sans.join(', ')}`);
|
|
666
|
+
}
|
|
645
667
|
for (const d of new Set(lignes)) {
|
|
646
|
-
if (!decouvertes.includes(d))
|
|
647
|
-
|
|
668
|
+
if (!decouvertes.includes(d)) {
|
|
669
|
+
fautes.push(`verdicts : ${d} n'est pas une découverte du ticket`);
|
|
670
|
+
} else if (lignes.filter(x => x === d).length > 1) {
|
|
671
|
+
fautes.push(`verdicts : ${d} a deux lignes`);
|
|
672
|
+
}
|
|
648
673
|
}
|
|
649
674
|
return fautes.length ? fautes.join(' ; ') : null;
|
|
650
675
|
}
|
|
@@ -661,7 +686,9 @@ export function conformiteDuTri(fiche, decouvertes) {
|
|
|
661
686
|
export function lirePiece(texte) {
|
|
662
687
|
const t = String(texte ?? '').trim();
|
|
663
688
|
const ticket = /^ticket\s*,\s*/i.exec(t);
|
|
664
|
-
if (ticket)
|
|
689
|
+
if (ticket) {
|
|
690
|
+
return pieceDuTicket(t.slice(ticket[0].length));
|
|
691
|
+
}
|
|
665
692
|
if (t.startsWith('$ ')) {
|
|
666
693
|
const vrai = t.indexOf('\n');
|
|
667
694
|
const saut = vrai < 0 ? t.indexOf('\\n') : vrai;
|
|
@@ -670,15 +697,25 @@ export function lirePiece(texte) {
|
|
|
670
697
|
return commande && sortie ? { commande, sortie } : null;
|
|
671
698
|
}
|
|
672
699
|
let lieu = t.split(/\s/)[0];
|
|
673
|
-
while (lieu && '`.,;:)'.includes(lieu.at(-1)))
|
|
674
|
-
|
|
700
|
+
while (lieu && '`.,;:)'.includes(lieu.at(-1))) {
|
|
701
|
+
lieu = lieu.slice(0, -1);
|
|
702
|
+
}
|
|
703
|
+
while (lieu.startsWith('`')) {
|
|
704
|
+
lieu = lieu.slice(1);
|
|
705
|
+
}
|
|
675
706
|
const deux = lieu.lastIndexOf(':');
|
|
676
707
|
const [debut, fin, ...reste] = lieu.slice(deux + 1).split('-');
|
|
677
708
|
const nombre = n => (/^\d+$/.test(n ?? '') && Number(n) >= 1 ? Number(n) : null);
|
|
678
709
|
const ligne = nombre(debut);
|
|
679
|
-
if (deux < 1 || !ligne || reste.length)
|
|
680
|
-
|
|
681
|
-
|
|
710
|
+
if (deux < 1 || !ligne || reste.length) {
|
|
711
|
+
return null;
|
|
712
|
+
}
|
|
713
|
+
if (fin === undefined) {
|
|
714
|
+
return { fichier: lieu.slice(0, deux), ligne };
|
|
715
|
+
}
|
|
716
|
+
if (!nombre(fin) || nombre(fin) < ligne) {
|
|
717
|
+
return null;
|
|
718
|
+
}
|
|
682
719
|
return { fichier: lieu.slice(0, deux), ligne, fin: nombre(fin) };
|
|
683
720
|
}
|
|
684
721
|
|
|
@@ -687,8 +724,12 @@ export function lirePiece(texte) {
|
|
|
687
724
|
// piece cites one criterion: « critère 1 et 7 » is none.
|
|
688
725
|
function pieceDuTicket(reste) {
|
|
689
726
|
const critere = /^critère\s+([1-9]\d*)(?!\d)(?!\s*(?:et|,)\s*\d)(?:$|[\s.,;:])/i.exec(reste);
|
|
690
|
-
if (critere)
|
|
691
|
-
|
|
727
|
+
if (critere) {
|
|
728
|
+
return { critere: Number(critere[1]) };
|
|
729
|
+
}
|
|
730
|
+
if (!reste.startsWith('§')) {
|
|
731
|
+
return null;
|
|
732
|
+
}
|
|
692
733
|
const apres = reste.slice(1).trim();
|
|
693
734
|
const cite = /^«\s*([^»]*?)\s*»/.exec(apres);
|
|
694
735
|
const section = (cite ? cite[1] : apres.split(/\s:(?:\s|$)|:$/)[0]).trim();
|
|
@@ -712,7 +753,9 @@ function introuvables(f, copie) {
|
|
|
712
753
|
const racine = path.resolve(copie);
|
|
713
754
|
for (const [ou, p] of piecesDe(f)) {
|
|
714
755
|
const lu = lirePiece(p);
|
|
715
|
-
if (!lu?.fichier)
|
|
756
|
+
if (!lu?.fichier) {
|
|
757
|
+
continue;
|
|
758
|
+
}
|
|
716
759
|
const abs = path.resolve(racine, lu.fichier);
|
|
717
760
|
const lieu = `${lu.fichier}:${lu.ligne}${lu.fin ? `-${lu.fin}` : ''}`;
|
|
718
761
|
if (!abs.startsWith(`${racine}${path.sep}`) || !existsSync(abs) || !statSync(abs).isFile()) {
|
|
@@ -746,7 +789,9 @@ function horsDuTicket(f, description) {
|
|
|
746
789
|
continue;
|
|
747
790
|
}
|
|
748
791
|
const numero = /^\s*(\d+)[.)]\s/.exec(ligne);
|
|
749
|
-
if (dedans && numero)
|
|
792
|
+
if (dedans && numero) {
|
|
793
|
+
criteres.add(Number(numero[1]));
|
|
794
|
+
}
|
|
750
795
|
}
|
|
751
796
|
const out = [];
|
|
752
797
|
for (const [ou, p] of piecesDe(f)) {
|
|
@@ -776,8 +821,12 @@ function horsDuTicket(f, description) {
|
|
|
776
821
|
function manques(role, f) {
|
|
777
822
|
const out = [];
|
|
778
823
|
const plein = k => typeof f[k] === 'string' && f[k].trim() !== '';
|
|
779
|
-
if (f.statut === 'BLOQUÉ' && !plein('raison'))
|
|
780
|
-
|
|
824
|
+
if (f.statut === 'BLOQUÉ' && !plein('raison')) {
|
|
825
|
+
out.push('raison : manque, pour BLOQUÉ');
|
|
826
|
+
}
|
|
827
|
+
if (f.statut === 'BESOIN' && !plein('question')) {
|
|
828
|
+
out.push('question : manque, pour BESOIN');
|
|
829
|
+
}
|
|
781
830
|
if (['BLOQUÉ', 'BESOIN'].includes(f.statut) && !('piece' in f)) {
|
|
782
831
|
out.push(`piece : manque, pour ${f.statut}`);
|
|
783
832
|
}
|
|
@@ -829,7 +878,9 @@ function manques(role, f) {
|
|
|
829
878
|
}
|
|
830
879
|
}
|
|
831
880
|
if (role === 'explorateur') {
|
|
832
|
-
if (!(f.paquets ?? []).length)
|
|
881
|
+
if (!(f.paquets ?? []).length) {
|
|
882
|
+
out.push('paquets : manque, pour un plan');
|
|
883
|
+
}
|
|
833
884
|
for (const [i, r] of (f.reponses ?? []).entries()) {
|
|
834
885
|
if (!/^[1-9]\d*$/.test(r.numero)) {
|
|
835
886
|
out.push(`reponses[${i}].numero : « ${r.numero} » n'est pas le numéro d'une question`);
|
|
@@ -838,7 +889,9 @@ function manques(role, f) {
|
|
|
838
889
|
}
|
|
839
890
|
if (role === 'tri') {
|
|
840
891
|
for (const [i, l] of (f.verdicts ?? []).entries()) {
|
|
841
|
-
if (!l.texte.trim())
|
|
892
|
+
if (!l.texte.trim()) {
|
|
893
|
+
out.push(`verdicts[${i}].texte : manque, pour ${l.verdict}`);
|
|
894
|
+
}
|
|
842
895
|
if (VERDICTS_PROUVES.includes(l.verdict) && !('piece' in l)) {
|
|
843
896
|
out.push(
|
|
844
897
|
`verdicts[${i}].piece : manque, pour ${l.verdict} : « $ <commande> » rejouée sur main et sa sortie, ou fichier:ligne ; sans elle, le verdict est non-confirmee`
|
|
@@ -861,7 +914,9 @@ function manques(role, f) {
|
|
|
861
914
|
// the description of the ticket, each piece of the ticket names a criterion or a section of it.
|
|
862
915
|
export function lireFiche(role, sortie, { copie, ticket } = {}) {
|
|
863
916
|
const schema = schemaDeFiche(role);
|
|
864
|
-
if (!schema)
|
|
917
|
+
if (!schema) {
|
|
918
|
+
return { erreur: `le rôle ${role} n'a pas de fiche` };
|
|
919
|
+
}
|
|
865
920
|
let resultat;
|
|
866
921
|
try {
|
|
867
922
|
resultat = JSON.parse(String(sortie ?? ''));
|
|
@@ -873,16 +928,26 @@ export function lireFiche(role, sortie, { copie, ticket } = {}) {
|
|
|
873
928
|
}
|
|
874
929
|
const fiche = resultat.structured_output;
|
|
875
930
|
const fautes = erreurs(schema, fiche, '');
|
|
876
|
-
if (!fautes.length)
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
if (fautes.length
|
|
931
|
+
if (!fautes.length) {
|
|
932
|
+
fautes.push(...manques(role, fiche));
|
|
933
|
+
}
|
|
934
|
+
if (!fautes.length && copie) {
|
|
935
|
+
fautes.push(...introuvables(fiche, copie));
|
|
936
|
+
}
|
|
937
|
+
if (!fautes.length && typeof ticket === 'string') {
|
|
938
|
+
fautes.push(...horsDuTicket(fiche, ticket));
|
|
939
|
+
}
|
|
940
|
+
if (fautes.length) {
|
|
941
|
+
return { erreur: `fiche non conforme : ${fautes.join(' ; ')}` };
|
|
942
|
+
}
|
|
880
943
|
return { fiche, seance: resultat.session_id ?? null };
|
|
881
944
|
}
|
|
882
945
|
|
|
883
946
|
// The directory of the package of <racine> that holds <fichier> (from the root), null for none.
|
|
884
947
|
function paquetDe(racine, fichier) {
|
|
885
|
-
if (!fichier)
|
|
948
|
+
if (!fichier) {
|
|
949
|
+
return null;
|
|
950
|
+
}
|
|
886
951
|
const p = paquets(racine)
|
|
887
952
|
.filter(({ dossier }) => fichier === dossier || fichier.startsWith(`${dossier}/`))
|
|
888
953
|
.sort((a, b) => b.dossier.length - a.dossier.length)[0];
|
|
@@ -932,7 +997,9 @@ let numero = 0;
|
|
|
932
997
|
// its path, or null without the variable.
|
|
933
998
|
export function ecrireSarif({ garde, constats, racine = process.cwd(), env = process.env }) {
|
|
934
999
|
const dossier = env[RESULTATS];
|
|
935
|
-
if (!dossier)
|
|
1000
|
+
if (!dossier) {
|
|
1001
|
+
return null;
|
|
1002
|
+
}
|
|
936
1003
|
const f = path.join(dossier, SARIF, `${garde}-${process.pid}-${++numero}.sarif`);
|
|
937
1004
|
mkdirSync(path.dirname(f), { recursive: true });
|
|
938
1005
|
writeFileSync(f, `${JSON.stringify(sarif({ garde, constats, racine }), null, 2)}\n`);
|
|
@@ -987,8 +1054,9 @@ export function lireSarif(dossier) {
|
|
|
987
1054
|
if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
988
1055
|
const [option, role] = process.argv.slice(2);
|
|
989
1056
|
const schema = option === '--schema' ? schemaDeFiche(role) : null;
|
|
990
|
-
if (schema)
|
|
991
|
-
|
|
1057
|
+
if (schema) {
|
|
1058
|
+
process.stdout.write(`${JSON.stringify(schema)}\n`);
|
|
1059
|
+
} else {
|
|
992
1060
|
process.stderr.write(
|
|
993
1061
|
option === '--schema'
|
|
994
1062
|
? `⛔ le rôle ${role} n'a pas de fiche.\n`
|
package/scripts/seances.mjs
CHANGED
|
@@ -82,7 +82,10 @@ export class SeanceAnnulee extends Error {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
// The model of each session under the envelope is named by the circuit, never taken from the
|
|
86
|
+
// account; no session fixes the effort, which stays adaptive.
|
|
87
|
+
const SONNET = ['--modele', 'sonnet'];
|
|
88
|
+
const FORT = ['--modele', 'opus'];
|
|
86
89
|
|
|
87
90
|
const LANCEUR = path.join(import.meta.dirname, 'enveloppe', 'lancer.sh');
|
|
88
91
|
|
|
@@ -281,7 +284,7 @@ export async function lancer(
|
|
|
281
284
|
args: [
|
|
282
285
|
// GRILLHOUSE_LANCEUR names a launcher of trial in place of lancer.sh, as CLAUDE_BIN does claude.
|
|
283
286
|
process.env.GRILLHOUSE_LANCEUR || LANCEUR,
|
|
284
|
-
...(fort ? FORT :
|
|
287
|
+
...(fort ? FORT : SONNET),
|
|
285
288
|
...(ouvre ? ['--seance', ouvre] : []),
|
|
286
289
|
...(reprend ? ['--reprise', reprend] : []),
|
|
287
290
|
// The schema of its sheet when it is not its role's (the explorateur's gesture).
|
|
@@ -560,7 +563,8 @@ export async function seance(
|
|
|
560
563
|
role,
|
|
561
564
|
{
|
|
562
565
|
tentative,
|
|
563
|
-
rapport,
|
|
566
|
+
rapport: rapportBrut,
|
|
567
|
+
fichiers = null,
|
|
564
568
|
fort,
|
|
565
569
|
derniere,
|
|
566
570
|
change,
|
|
@@ -572,6 +576,11 @@ export async function seance(
|
|
|
572
576
|
...activite
|
|
573
577
|
}
|
|
574
578
|
) {
|
|
579
|
+
// A resumption at the step that carries a red (`fichiers`, the files the red names): the session
|
|
580
|
+
// carries these files alone, the rest of the lot being green.
|
|
581
|
+
const rapport = fichiers?.length
|
|
582
|
+
? `${rapportBrut ?? ''}\n\nCette séance ne porte que ${fichiers.join(', ')} : le reste du lot est vert et ne se touche pas.`.trim()
|
|
583
|
+
: rapportBrut;
|
|
575
584
|
const nom = nomDuRole(role);
|
|
576
585
|
const reprise = tentative > 1 && !derniere && gardee?.agent === role ? gardee : null;
|
|
577
586
|
const { tache, ouverts, constats, valider, repondre } = constatsDeLaSeance(
|
|
@@ -628,7 +637,7 @@ export async function seance(
|
|
|
628
637
|
`reprise de la séance ${reprise.seance} finie en erreur : séance neuve et entière.`
|
|
629
638
|
);
|
|
630
639
|
}
|
|
631
|
-
const lots = lectures.lots();
|
|
640
|
+
const lots = fichiers?.length ? fichiers : lectures.lots();
|
|
632
641
|
const { description, notes } = leTicket(ctx);
|
|
633
642
|
// The last handover of this agent; for a developpeur without one yet, the testwriter's last.
|
|
634
643
|
const passation =
|
|
@@ -756,6 +765,15 @@ export function seanceLancee(ctx, role, r) {
|
|
|
756
765
|
`La transcription de la séance du ${role} n'a pas bougé en ${minutes ? `${minutes} min` : `${ctx.immobileMs} ms`} : la séance est arrêtée. Les dernières lignes du journal :\n\n${fin(lire(ctx.journal), 40)}`
|
|
757
766
|
);
|
|
758
767
|
}
|
|
768
|
+
// The envelope's refusal (a line of the error stream that begins with `bwrap: `) of a session
|
|
769
|
+
// that wrote no transcript: the launch died before its session, as bwrap says.
|
|
770
|
+
const refus = (r.erreur ?? '').split('\n').find(l => l.startsWith('bwrap: '));
|
|
771
|
+
if (refus !== undefined && r.seance !== 0 && derniereTrace(ctx.transcriptions) === 0) {
|
|
772
|
+
throw new Arret(
|
|
773
|
+
'lancement',
|
|
774
|
+
`L'enveloppe refuse le lancement de la séance du ${role} (code ${r.seance ?? r.code}).\n${refus.trim()}\n\n${fin(lire(ctx.journal), 20)}`
|
|
775
|
+
);
|
|
776
|
+
}
|
|
759
777
|
if (r.seance === null) {
|
|
760
778
|
throw new Arret(
|
|
761
779
|
'lancement',
|
|
@@ -97,7 +97,9 @@ export function sousCommandes(racine = process.cwd()) {
|
|
|
97
97
|
*/
|
|
98
98
|
export function commandeDe(nom, racine = process.cwd()) {
|
|
99
99
|
const s = Object.hasOwn(SOUS_COMMANDES, nom) ? SOUS_COMMANDES[nom] : null;
|
|
100
|
-
if (typeof s === 'string')
|
|
100
|
+
if (typeof s === 'string') {
|
|
101
|
+
return { script: path.join(SCRIPTS, s), args: [] };
|
|
102
|
+
}
|
|
101
103
|
const commandes = langageDe(racine).commandes(racine);
|
|
102
104
|
const n = s?.langage ?? (DU_NOYAU.has(nom) ? null : nom);
|
|
103
105
|
return n !== null && Object.hasOwn(commandes, n) ? commandes[n] : null;
|
|
@@ -48,21 +48,32 @@ const AVEC_VALEUR = new Set([
|
|
|
48
48
|
// The patterns and the extensions the script <script> names for the tool <outil> (`prettier` or
|
|
49
49
|
// `eslint`), or null when the script does not run it.
|
|
50
50
|
function motifsDuScript(script, outil) {
|
|
51
|
-
if (typeof script !== 'string')
|
|
51
|
+
if (typeof script !== 'string') {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
52
54
|
const mots = (script.match(/"[^"]*"|'[^']*'|\S+/g) ?? []).map(m =>
|
|
53
55
|
m.replace(/^(["'])(.*)\1$/, '$2')
|
|
54
56
|
);
|
|
55
57
|
const i = mots.findIndex(m => m === outil || m.endsWith(`/${outil}`));
|
|
56
|
-
if (i < 0)
|
|
58
|
+
if (i < 0) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
57
61
|
const motifs = [];
|
|
58
62
|
const ext = [];
|
|
59
63
|
for (let j = i + 1; j < mots.length; j++) {
|
|
60
64
|
const m = mots[j];
|
|
61
|
-
if (['&&', '||', ';', '|'].includes(m))
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
if (['&&', '||', ';', '|'].includes(m)) {
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
if (m === '--ext') {
|
|
69
|
+
ext.push(...String(mots[++j] ?? '').split(','));
|
|
70
|
+
} else if (m.startsWith('--ext=')) {
|
|
71
|
+
ext.push(...m.slice(6).split(','));
|
|
72
|
+
} else if (AVEC_VALEUR.has(m)) {
|
|
73
|
+
j++;
|
|
74
|
+
} else if (!m.startsWith('-')) {
|
|
75
|
+
motifs.push(m.replace(/^\.\//, ''));
|
|
76
|
+
}
|
|
66
77
|
}
|
|
67
78
|
return { motifs, ext: ext.filter(Boolean).map(e => (e.startsWith('.') ? e : `.${e}`)) };
|
|
68
79
|
}
|
|
@@ -72,9 +83,13 @@ function motifsDuScript(script, outil) {
|
|
|
72
83
|
// decides, when given, which files of a folder count).
|
|
73
84
|
function couvre(rel, motifs, extension) {
|
|
74
85
|
return motifs.some(m => {
|
|
75
|
-
if (/[*?[\]{}]/.test(m))
|
|
86
|
+
if (/[*?[\]{}]/.test(m)) {
|
|
87
|
+
return path.matchesGlob(rel, m);
|
|
88
|
+
}
|
|
76
89
|
const net = m.replace(/\/+$/, '');
|
|
77
|
-
if (net === '.' || net === '')
|
|
90
|
+
if (net === '.' || net === '') {
|
|
91
|
+
return extension(rel);
|
|
92
|
+
}
|
|
78
93
|
return rel === net || (rel.startsWith(`${net}/`) && extension(rel));
|
|
79
94
|
});
|
|
80
95
|
}
|
|
@@ -91,7 +106,9 @@ function paquetDe(projet, fichier) {
|
|
|
91
106
|
return null;
|
|
92
107
|
}
|
|
93
108
|
}
|
|
94
|
-
if (dossier === projet || path.dirname(dossier) === dossier)
|
|
109
|
+
if (dossier === projet || path.dirname(dossier) === dossier) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
95
112
|
dossier = path.dirname(dossier);
|
|
96
113
|
}
|
|
97
114
|
}
|
|
@@ -106,9 +123,13 @@ async function main() {
|
|
|
106
123
|
} catch {
|
|
107
124
|
return [];
|
|
108
125
|
}
|
|
109
|
-
if (!['Write', 'Edit', 'MultiEdit'].includes(entree?.tool_name))
|
|
126
|
+
if (!['Write', 'Edit', 'MultiEdit'].includes(entree?.tool_name)) {
|
|
127
|
+
return [];
|
|
128
|
+
}
|
|
110
129
|
const brut = entree.tool_input?.file_path;
|
|
111
|
-
if (typeof brut !== 'string')
|
|
130
|
+
if (typeof brut !== 'string') {
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
112
133
|
const projet = realpathSync(process.env.CLAUDE_PROJECT_DIR || process.cwd());
|
|
113
134
|
let fichier;
|
|
114
135
|
try {
|
|
@@ -116,9 +137,13 @@ async function main() {
|
|
|
116
137
|
} catch {
|
|
117
138
|
return [];
|
|
118
139
|
}
|
|
119
|
-
if (!fichier.startsWith(`${projet}${path.sep}`))
|
|
140
|
+
if (!fichier.startsWith(`${projet}${path.sep}`)) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
120
143
|
const paquet = paquetDe(projet, fichier);
|
|
121
|
-
if (!paquet)
|
|
144
|
+
if (!paquet) {
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
122
147
|
const rel = path.relative(paquet.dossier, fichier).split(path.sep).join('/');
|
|
123
148
|
const depuisRacine = path.relative(projet, fichier).split(path.sep).join('/');
|
|
124
149
|
|
|
@@ -149,9 +174,13 @@ async function main() {
|
|
|
149
174
|
const eslint = fix => new ESLint({ cwd: paquet.dossier, fix });
|
|
150
175
|
const juger = async fix => {
|
|
151
176
|
const moteur = eslint(fix);
|
|
152
|
-
if (await moteur.isPathIgnored(fichier))
|
|
177
|
+
if (await moteur.isPathIgnored(fichier)) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
153
180
|
const [resultat] = await moteur.lintFiles([fichier]);
|
|
154
|
-
if (fix)
|
|
181
|
+
if (fix) {
|
|
182
|
+
await ESLint.outputFixes([resultat]);
|
|
183
|
+
}
|
|
155
184
|
return resultat;
|
|
156
185
|
};
|
|
157
186
|
let dernier = null;
|
|
@@ -196,7 +225,9 @@ async function main() {
|
|
|
196
225
|
for (const m of resultat?.messages ?? []) {
|
|
197
226
|
if (m.severity === 2) {
|
|
198
227
|
dit(m.line ?? 1, m.column ?? 1, m.ruleId ?? 'erreur', m.message);
|
|
199
|
-
if (m.fatal)
|
|
228
|
+
if (m.fatal) {
|
|
229
|
+
fatale = true;
|
|
230
|
+
}
|
|
200
231
|
}
|
|
201
232
|
}
|
|
202
233
|
} catch (e) {
|
package/scripts/tableau.mjs
CHANGED
|
@@ -685,12 +685,14 @@ export function lecture(t, prefix) {
|
|
|
685
685
|
* repository (scripts/aiguillage.mjs `echecDeLOutil`); `places`, the places of the machine
|
|
686
686
|
* (scripts/places-de-la-machine.mjs `etatDesPlaces`), whose line heads AGENTS; `muet`, the Temporal
|
|
687
687
|
* server did not answer the reading of the circuits, which the first alert says; `faute`, any
|
|
688
|
-
* other fault of that reading, said in the first alert as it is
|
|
688
|
+
* other fault of that reading, said in the first alert as it is; `echecPrefixe`, the cause of a
|
|
689
|
+
* ticket prefix that did not read, named in an alert.
|
|
689
690
|
* @param {{ tous: any[], prefix?: string, registre: any[], vivants: any[], circuits?: any[],
|
|
690
691
|
* verdicts?: Record<string, any>, maintenant: number, jour: number,
|
|
691
692
|
* machine?: Machine | null, outil?: { version: string, raison: string } | null,
|
|
692
693
|
* places?: { prises: number, plafond: number, charge: number, coeurs: number, memoireGo: number,
|
|
693
|
-
* attentes: { ticket: string, depuis: number }[] } | null, muet?: boolean, faute?: string | null
|
|
694
|
+
* attentes: { ticket: string, depuis: number }[] } | null, muet?: boolean, faute?: string | null,
|
|
695
|
+
* echecPrefixe?: string | null }} lu
|
|
694
696
|
*/
|
|
695
697
|
export function assembler({
|
|
696
698
|
tous,
|
|
@@ -706,6 +708,7 @@ export function assembler({
|
|
|
706
708
|
places: placesDeLaMachine = null,
|
|
707
709
|
muet = false,
|
|
708
710
|
faute = null,
|
|
711
|
+
echecPrefixe = null,
|
|
709
712
|
}) {
|
|
710
713
|
// A circuit's lines are its steps, no agent's passage.
|
|
711
714
|
const etapesFinies = lignesDuRegistre.filter(r => r.role === ROLE_DU_CIRCUIT);
|
|
@@ -742,8 +745,13 @@ export function assembler({
|
|
|
742
745
|
for (const l of enfants.values()) {
|
|
743
746
|
l.sort(ordre);
|
|
744
747
|
}
|
|
745
|
-
// The circuits of the open tickets
|
|
746
|
-
|
|
748
|
+
// The circuits of the open tickets, and the running ones of the closed tickets (the queue closes
|
|
749
|
+
// a ticket before it reads the CI); a ticket whose circuit runs is in progress.
|
|
750
|
+
const parCircuit = new Map(
|
|
751
|
+
circuits
|
|
752
|
+
.filter(c => ouvert(c.ticket) || (c.vivant && parId.has(c.ticket)))
|
|
753
|
+
.map(c => [c.ticket, c])
|
|
754
|
+
);
|
|
747
755
|
const actifs = new Set([
|
|
748
756
|
...enCoursMesures.map(v => v.ticket).filter(Boolean),
|
|
749
757
|
...[...parCircuit.values()].filter(c => c.vivant).map(c => c.ticket),
|
|
@@ -762,12 +770,12 @@ export function assembler({
|
|
|
762
770
|
// A ticket's state: done, in progress, deferred, awaiting validation; else, with the owner's go,
|
|
763
771
|
// waiting (ready) or blocked (an open ticket it depends on); without it, awaiting his go.
|
|
764
772
|
const etat = t => {
|
|
765
|
-
if (t.status === 'closed') {
|
|
766
|
-
return 'fermes';
|
|
767
|
-
}
|
|
768
773
|
if (t.status === 'in_progress' || actifs.has(t.id)) {
|
|
769
774
|
return 'enCours';
|
|
770
775
|
}
|
|
776
|
+
if (t.status === 'closed') {
|
|
777
|
+
return 'fermes';
|
|
778
|
+
}
|
|
771
779
|
if (t.status === 'deferred') {
|
|
772
780
|
return 'reportes';
|
|
773
781
|
}
|
|
@@ -990,7 +998,9 @@ export function assembler({
|
|
|
990
998
|
}
|
|
991
999
|
const debutJour = jour;
|
|
992
1000
|
const faitsDuJour = tous
|
|
993
|
-
.filter(
|
|
1001
|
+
.filter(
|
|
1002
|
+
t => travail(t) && !actifs.has(t.id) && t.closed_at && Date.parse(t.closed_at) >= debutJour
|
|
1003
|
+
)
|
|
994
1004
|
.sort((a, b) => Date.parse(b.closed_at) - Date.parse(a.closed_at))
|
|
995
1005
|
.map(t => ({
|
|
996
1006
|
id: t.id,
|
|
@@ -1008,6 +1018,10 @@ export function assembler({
|
|
|
1008
1018
|
} else if (faute) {
|
|
1009
1019
|
alertes.push({ niveau: 'rouge', texte: `Circuits illisibles : ${faute}` });
|
|
1010
1020
|
}
|
|
1021
|
+
// The ticket prefix did not read: the project keeps its folder's name, and the alert says why.
|
|
1022
|
+
if (echecPrefixe) {
|
|
1023
|
+
alertes.push({ niveau: 'rouge', texte: `Préfixe des tickets illisible : ${echecPrefixe}` });
|
|
1024
|
+
}
|
|
1011
1025
|
// A red night says the night it turned red, short enough to stand whole on its line: the local
|
|
1012
1026
|
// day and month its ticket was opened, the night's date (scripts/nuit.sh), whatever its title names, a
|
|
1013
1027
|
// commit in older ones.
|
|
@@ -1831,15 +1845,25 @@ function lire(
|
|
|
1831
1845
|
racine,
|
|
1832
1846
|
{ home, maintenant, circuits, muet = false, faute = null, machine = null, places = null }
|
|
1833
1847
|
) {
|
|
1848
|
+
// The prefix is read once, with no delay of its own; a read that fails leaves it empty (the
|
|
1849
|
+
// project is labelled by its folder) and its cause is named in an alert (`echecPrefixe`).
|
|
1834
1850
|
let prefix = '';
|
|
1851
|
+
let echecPrefixe = null;
|
|
1835
1852
|
try {
|
|
1836
1853
|
prefix = execFileSync('bd', ['config', 'get', 'issue_prefix'], {
|
|
1837
1854
|
cwd: racine,
|
|
1838
1855
|
encoding: 'utf8',
|
|
1856
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
1839
1857
|
maxBuffer: 256 * 1024 * 1024,
|
|
1840
1858
|
}).trim();
|
|
1841
|
-
} catch {
|
|
1859
|
+
} catch (e) {
|
|
1842
1860
|
prefix = '';
|
|
1861
|
+
const message = String(e?.stderr ?? '').trim() || String(e?.message ?? e);
|
|
1862
|
+
const ligne = message.split('\n')[0];
|
|
1863
|
+
echecPrefixe =
|
|
1864
|
+
e?.status === null || e?.status === undefined
|
|
1865
|
+
? `${e?.code ?? 'échec'} ${ligne}`.trim()
|
|
1866
|
+
: `code ${e.status} ${ligne}`.trim();
|
|
1843
1867
|
}
|
|
1844
1868
|
let ps = '';
|
|
1845
1869
|
try {
|
|
@@ -1920,6 +1944,7 @@ function lire(
|
|
|
1920
1944
|
places,
|
|
1921
1945
|
muet,
|
|
1922
1946
|
faute,
|
|
1947
|
+
echecPrefixe,
|
|
1923
1948
|
outil: echecDeLOutil(racine),
|
|
1924
1949
|
});
|
|
1925
1950
|
return { t, prefix, tous, vivants, commun };
|
|
@@ -82,25 +82,18 @@ export function nomDuPaquet(racine, dossier) {
|
|
|
82
82
|
* tests?: { arguments: string[], rejouer?: string }, env?: NodeJS.ProcessEnv }} o
|
|
83
83
|
* @returns {number}
|
|
84
84
|
*/
|
|
85
|
-
export function lancerLesTaches({
|
|
86
|
-
outil,
|
|
87
|
-
racine,
|
|
88
|
-
taches,
|
|
89
|
-
noms = [],
|
|
90
|
-
tests,
|
|
91
|
-
env = process.env,
|
|
92
|
-
}) {
|
|
85
|
+
export function lancerLesTaches({ outil, racine, taches, noms = [], tests, env = process.env }) {
|
|
93
86
|
const e = { ...env };
|
|
94
87
|
delete e[TESTS_CIBLES];
|
|
95
88
|
if (tests) {
|
|
96
89
|
e[TESTS_CIBLES] = JSON.stringify(tests);
|
|
97
90
|
}
|
|
98
91
|
const filtres = [...new Set(noms)].sort().map(n => `--filter=${n}`);
|
|
99
|
-
const r = spawnSync(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
);
|
|
92
|
+
const r = spawnSync(outil, ['run', ...taches, ...filtres, '--continue=dependencies-successful'], {
|
|
93
|
+
cwd: racine,
|
|
94
|
+
stdio: 'inherit',
|
|
95
|
+
env: e,
|
|
96
|
+
});
|
|
104
97
|
return r.status ?? 1;
|
|
105
98
|
}
|
|
106
99
|
|
|
@@ -210,6 +203,33 @@ function plan(outil, racine, args) {
|
|
|
210
203
|
return JSON.parse(r.stdout);
|
|
211
204
|
}
|
|
212
205
|
|
|
206
|
+
/**
|
|
207
|
+
* The hashes of the inputs of the tests tasks of the packages <noms> (by their package name) and
|
|
208
|
+
* of their dependents, as the runner <outil> plans them in <racine> (the hash of a task covers the
|
|
209
|
+
* content of the files it reads and of the tasks it waits for): `{ <paquet>: <hash> }`; null when
|
|
210
|
+
* the runner gives no plan. The fingerprint of a step of the circuit reads it
|
|
211
|
+
* (scripts/reprise.mjs).
|
|
212
|
+
* @param {string} outil the task runner
|
|
213
|
+
* @param {string} racine
|
|
214
|
+
* @param {string[]} noms
|
|
215
|
+
* @returns {Record<string, string> | null}
|
|
216
|
+
*/
|
|
217
|
+
export function empreintesDesTaches(outil, racine, noms) {
|
|
218
|
+
if (!noms.length) {
|
|
219
|
+
return {};
|
|
220
|
+
}
|
|
221
|
+
try {
|
|
222
|
+
const graphe = plan(outil, racine, [
|
|
223
|
+
'run',
|
|
224
|
+
SCRIPT_DES_TESTS,
|
|
225
|
+
...noms.map(n => `--filter=...${n}`),
|
|
226
|
+
]);
|
|
227
|
+
return Object.fromEntries((graphe.tasks ?? []).map(t => [t.package, t.hash]));
|
|
228
|
+
} catch {
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
213
233
|
// The build <args> in <racine>, its output in <echec> then on this process's: when it fails,
|
|
214
234
|
// <echec> holds <ligne> then that output, and the warning <alerte> follows it.
|
|
215
235
|
function construireJusquOuIlConstruit(outil, racine, args, echec, ligne, alerte) {
|