@roomi-fields/grillhouse 0.30.0 → 0.32.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 +48 -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 +3 -6
- package/dist/temporal/installation.js +19 -38
- package/dist/temporal/installation.js.map +1 -1
- package/dist/temporal/tickets/activites.d.ts +1 -0
- package/dist/temporal/tickets/activites.js +5 -0
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/dist/temporal/tickets/contrat.d.ts +10 -0
- package/dist/temporal/tickets/deroule.js +8 -1
- package/dist/temporal/tickets/deroule.js.map +1 -1
- package/docs/ARCHITECTURE.md +119 -27
- package/docs/CADRE.md +20 -0
- package/docs/INTERFACE.md +17 -4
- package/hooks/hooks.json +4 -0
- package/package.json +2 -2
- package/scripts/activites.mjs +155 -84
- package/scripts/aiguillage.mjs +35 -11
- package/scripts/attente-au-tour.mjs +99 -0
- package/scripts/avancement.mjs +27 -10
- package/scripts/base-des-workflows.mjs +57 -0
- package/scripts/bilan.mjs +101 -25
- package/scripts/cadre.mjs +5 -2
- package/scripts/circuit.mjs +173 -58
- package/scripts/composants-affectes.mjs +64 -21
- package/scripts/composition-des-langages.mjs +5 -3
- package/scripts/conformite.mjs +54 -19
- package/scripts/copies-finies.mjs +8 -1
- package/scripts/dependances-internes.mjs +9 -3
- package/scripts/dernier-vert.mjs +84 -23
- package/scripts/dette.mjs +32 -11
- package/scripts/donnees-cles.mjs +24 -8
- package/scripts/droits.mjs +40 -15
- package/scripts/effets.mjs +9 -0
- 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/etapes.mjs +1 -1
- 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 +10 -1
- package/scripts/journal-des-etats.d.mts +41 -0
- package/scripts/journal-des-etats.mjs +273 -0
- package/scripts/journal.mjs +119 -0
- package/scripts/langages/cargo/commandes.mjs +97 -18
- package/scripts/langages/cargo/composants.mjs +24 -8
- package/scripts/langages/cargo/index.mjs +7 -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 +6 -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 +112 -22
- package/scripts/langages/typescript/index-interfaces.mjs +36 -13
- package/scripts/langages/typescript/index.mjs +12 -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 +61 -14
- package/scripts/langages/typescript/vitest-config/avancement.reporter.mjs +15 -5
- package/scripts/langages/typescript/vitest-config/base.mjs +10 -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/langages.d.mts +20 -0
- package/scripts/lint-des-scripts.mjs +58 -0
- package/scripts/matiere-de-test.d.ts +11 -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 +24 -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 +72 -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 +5 -1
- package/scripts/style-a-l-ecriture.mjs +48 -17
- package/scripts/superviseur.mjs +127 -75
- package/scripts/tableau.mjs +133 -10
- package/scripts/taches-du-graphe.mjs +33 -13
- package/scripts/ticket-du-circuit.mjs +40 -0
- package/scripts/transitions.mjs +159 -29
- 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/developpeur/SKILL.md +1 -1
- package/skills/explorateur/SKILL.md +8 -2
- package/skills/grill/SKILL.md +3 -57
- package/skills/grill/references/paquets.md +60 -0
- package/skills/mesure/SKILL.md +3 -0
- package/skills/pitmaster/SKILL.md +16 -27
- package/skills/questionneur/SKILL.md +1 -1
- package/skills/relecteur/SKILL.md +2 -2
- package/skills/testwriter/SKILL.md +19 -7
- package/skills/release/SKILL.md +0 -134
- package/skills/release/scripts/update-version.cjs +0 -92
|
@@ -48,7 +48,9 @@ export function interfaces(racine) {
|
|
|
48
48
|
const found = composants(racine)
|
|
49
49
|
.map(c => path.relative(racine, path.join(c.dir, 'docs', 'INTERFACE.md')))
|
|
50
50
|
.filter(rel => existsSync(path.join(racine, rel)));
|
|
51
|
-
if (existsSync(path.join(racine, 'docs', 'INTERFACE.md')))
|
|
51
|
+
if (existsSync(path.join(racine, 'docs', 'INTERFACE.md'))) {
|
|
52
|
+
found.push('docs/INTERFACE.md');
|
|
53
|
+
}
|
|
52
54
|
return found.sort();
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -85,7 +87,9 @@ export function lire(rel, contenu) {
|
|
|
85
87
|
// A code block is skipped whole: a `## …` written inside it is code, not a heading.
|
|
86
88
|
const f = /^\s*(```|~~~)/.exec(l);
|
|
87
89
|
if (cloture) {
|
|
88
|
-
if (f && f[1] === cloture)
|
|
90
|
+
if (f && f[1] === cloture) {
|
|
91
|
+
cloture = null;
|
|
92
|
+
}
|
|
89
93
|
continue;
|
|
90
94
|
}
|
|
91
95
|
if (f) {
|
|
@@ -100,7 +104,9 @@ export function lire(rel, contenu) {
|
|
|
100
104
|
}
|
|
101
105
|
const m = /^(#{1,3}) (.+)$/.exec(l);
|
|
102
106
|
if (m) {
|
|
103
|
-
if (m[1].length === 1)
|
|
107
|
+
if (m[1].length === 1) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
104
110
|
fermer();
|
|
105
111
|
courante = { niveau: m[1].length, titre: m[2].trim(), corps: [], generee };
|
|
106
112
|
} else if (courante.generee && (courante.fermee || /^\*\*[^*]+\*\*/.test(l))) {
|
|
@@ -108,17 +114,22 @@ export function lire(rel, contenu) {
|
|
|
108
114
|
// `**Paramètres**`…) are read at its address.
|
|
109
115
|
courante.fermee = true;
|
|
110
116
|
} else if (!l.trim()) {
|
|
111
|
-
if (courante.generee && courante.corps.length)
|
|
117
|
+
if (courante.generee && courante.corps.length) {
|
|
118
|
+
courante.fermee = true;
|
|
119
|
+
}
|
|
112
120
|
} else if (!l.startsWith('|')) {
|
|
113
|
-
if (courante.corps.length < 6 || courante.titre === 'Consommateurs')
|
|
121
|
+
if (courante.corps.length < 6 || courante.titre === 'Consommateurs') {
|
|
114
122
|
courante.corps.push(l.replace(/^[-*]\s+/, ''));
|
|
123
|
+
}
|
|
115
124
|
}
|
|
116
125
|
}
|
|
117
126
|
fermer();
|
|
118
127
|
const [tete, ...reste] = sections;
|
|
119
128
|
const parties = [];
|
|
120
129
|
for (const s of reste) {
|
|
121
|
-
if (s.ignoree)
|
|
130
|
+
if (s.ignoree) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
122
133
|
if (s.niveau === 2 && s.titre === 'Consommateurs') {
|
|
123
134
|
parties.push({
|
|
124
135
|
consommateurs: declares(`## Consommateurs\n${s.corps.map(l => `- ${l}`).join('\n')}`),
|
|
@@ -161,17 +172,23 @@ const TITRE_PUBLIE = "## Ce que les composants d'avant publient";
|
|
|
161
172
|
// `{ absent: true }` without the file, null without the rubric.
|
|
162
173
|
function rend(racine, rel) {
|
|
163
174
|
const fichier = path.join(racine, rel);
|
|
164
|
-
if (!existsSync(fichier))
|
|
175
|
+
if (!existsSync(fichier)) {
|
|
176
|
+
return { absent: true };
|
|
177
|
+
}
|
|
165
178
|
let cloture = null;
|
|
166
179
|
for (const l of readFileSync(fichier, 'utf8').split('\n')) {
|
|
167
180
|
const f = /^\s*(```|~~~)/.exec(l);
|
|
168
181
|
if (cloture) {
|
|
169
|
-
if (f && f[1] === cloture)
|
|
182
|
+
if (f && f[1] === cloture) {
|
|
183
|
+
cloture = null;
|
|
184
|
+
}
|
|
170
185
|
} else if (f) {
|
|
171
186
|
cloture = f[1];
|
|
172
187
|
} else {
|
|
173
188
|
const m = /^## ((?:\d+\.\s*)?Rend)\s*$/.exec(l);
|
|
174
|
-
if (m)
|
|
189
|
+
if (m) {
|
|
190
|
+
return { titre: m[1] };
|
|
191
|
+
}
|
|
175
192
|
}
|
|
176
193
|
}
|
|
177
194
|
return null;
|
|
@@ -254,9 +271,13 @@ export function publie(racine, composant) {
|
|
|
254
271
|
}
|
|
255
272
|
const cadre = path.join(path.dirname(f.rel), 'CADRE.md');
|
|
256
273
|
const r = rend(racine, cadre);
|
|
257
|
-
if (r?.absent)
|
|
258
|
-
|
|
259
|
-
else
|
|
274
|
+
if (r?.absent) {
|
|
275
|
+
out.push(`Son cadre manque : \`${cadre}\` n’existe pas.`);
|
|
276
|
+
} else if (!r) {
|
|
277
|
+
out.push(`Son cadre n’a pas de rubrique « Rend » (\`${cadre}\`).`);
|
|
278
|
+
} else {
|
|
279
|
+
out.push(`Son cadre rend : \`${cadre}\` § ${r.titre}.`);
|
|
280
|
+
}
|
|
260
281
|
}
|
|
261
282
|
return out.join('\n');
|
|
262
283
|
}
|
|
@@ -310,7 +331,9 @@ function commande(racine, args) {
|
|
|
310
331
|
message: `${SORTIE} n'est pas à jour avec les interfaces : npx grillhouse index-interfaces le régénère.`,
|
|
311
332
|
},
|
|
312
333
|
];
|
|
313
|
-
for (const r of refus)
|
|
334
|
+
for (const r of refus) {
|
|
335
|
+
process.stderr.write(`⛔ ${r.message}\n`);
|
|
336
|
+
}
|
|
314
337
|
ecrireSarif({ garde: 'index-interfaces', racine, constats: refus });
|
|
315
338
|
return refus.length ? 1 : 0;
|
|
316
339
|
}
|
|
@@ -51,7 +51,7 @@ import { elementsDuLot } from './elements-du-lot.mjs';
|
|
|
51
51
|
import { A_ELAGUER, lireSarif, RESULTATS } from '../../resultats.mjs';
|
|
52
52
|
import { lecteurs } from './lecteurs.mjs';
|
|
53
53
|
import { estUnTest, manifestes, soeurDAvant } from './regle-des-tests.mjs';
|
|
54
|
-
import { SCRIPT_DES_TESTS } from '../../services-du-noyau.mjs';
|
|
54
|
+
import { empreintesDesTaches, SCRIPT_DES_TESTS } from '../../services-du-noyau.mjs';
|
|
55
55
|
import { verdict } from './verdict.mjs';
|
|
56
56
|
import { miseAJour } from './mise-a-jour.mjs';
|
|
57
57
|
import { squelette } from './squelette.mjs';
|
|
@@ -164,12 +164,16 @@ export default {
|
|
|
164
164
|
// directory, through the graph of the project's packages, the cache reading what did not move;
|
|
165
165
|
// inside the graph's own run (`TURBO_HASH`) the providers are built already, nothing plays.
|
|
166
166
|
construireLesPaquets: noms => {
|
|
167
|
-
if (process.env.TURBO_HASH)
|
|
167
|
+
if (process.env.TURBO_HASH) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
168
170
|
for (const nom of noms) {
|
|
169
171
|
const r = spawnSync('npx', ['--no-install', 'turbo', 'run', 'build', `--filter=${nom}`], {
|
|
170
172
|
stdio: 'inherit',
|
|
171
173
|
});
|
|
172
|
-
if (r.status !== 0)
|
|
174
|
+
if (r.status !== 0) {
|
|
175
|
+
throw new Error(`la construction du fournisseur ${nom} échoue.`);
|
|
176
|
+
}
|
|
173
177
|
}
|
|
174
178
|
},
|
|
175
179
|
// No output of a package of TypeScript is a datum of another package's tests.
|
|
@@ -191,6 +195,8 @@ export default {
|
|
|
191
195
|
],
|
|
192
196
|
// No binary of the machine: its tools are packages of npm.
|
|
193
197
|
binaires: {},
|
|
198
|
+
// No program the installer of Temporal looks for: Node is a tool of the account.
|
|
199
|
+
executables: [],
|
|
194
200
|
// What its tools write in a project: Turborepo's runs and cache.
|
|
195
201
|
ignorer: ['.turbo'],
|
|
196
202
|
// Where its tools write: the cache of Turborepo in the main tree, shared by every copy, written;
|
|
@@ -227,6 +233,9 @@ export default {
|
|
|
227
233
|
joueDesTests,
|
|
228
234
|
lecteurs,
|
|
229
235
|
elementsDuLot,
|
|
236
|
+
// The hashes of the inputs of the tests tasks of the packages and their dependents, as
|
|
237
|
+
// Turborepo plans them.
|
|
238
|
+
empreintes: (racine, noms) => empreintesDesTaches('turbo', racine, noms),
|
|
230
239
|
commandes: racine => ({
|
|
231
240
|
tester: { script: ici('tests.mjs'), args: [] },
|
|
232
241
|
verifier: { script: ici('verifier.mjs'), args: [] },
|
|
@@ -76,11 +76,17 @@ const lireJson = p => JSON.parse(readFileSync(p, 'utf8'));
|
|
|
76
76
|
// has none.
|
|
77
77
|
export function sansApi(c) {
|
|
78
78
|
const pj = path.join(c.dir, 'package.json');
|
|
79
|
-
if (!existsSync(pj))
|
|
79
|
+
if (!existsSync(pj)) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
80
82
|
const p = lireJson(pj);
|
|
81
83
|
const exp = p.exports;
|
|
82
|
-
if (exp === undefined)
|
|
83
|
-
|
|
84
|
+
if (exp === undefined) {
|
|
85
|
+
return [p.main, p.types, p.typings].every(e => e === undefined);
|
|
86
|
+
}
|
|
87
|
+
if (!exp || typeof exp !== 'object' || Array.isArray(exp)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
84
90
|
const cles = Object.keys(exp);
|
|
85
91
|
return cles.length > 0 && cles.every(k => k.startsWith('.')) && !cles.includes('.');
|
|
86
92
|
}
|
|
@@ -97,7 +103,9 @@ export function entree(racine, c) {
|
|
|
97
103
|
}
|
|
98
104
|
const racinePj = path.join(racine, 'package.json');
|
|
99
105
|
const types = existsSync(racinePj) ? lireJson(racinePj).types : null;
|
|
100
|
-
if (!types)
|
|
106
|
+
if (!types) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
101
109
|
return path.join(racine, path.dirname(types), path.basename(c.dir), 'index.d.ts');
|
|
102
110
|
}
|
|
103
111
|
|
|
@@ -108,14 +116,22 @@ export function declare(texte) {
|
|
|
108
116
|
let section = null;
|
|
109
117
|
let bloc = false;
|
|
110
118
|
for (const l of ecrite(texte)) {
|
|
111
|
-
if (/^\s*(```|~~~)/.test(l))
|
|
119
|
+
if (/^\s*(```|~~~)/.test(l)) {
|
|
120
|
+
bloc = !bloc;
|
|
121
|
+
}
|
|
112
122
|
const titre = !bloc && /^(#{2,3}) (.+)$/.exec(l);
|
|
113
123
|
if (titre) {
|
|
114
124
|
section = titre[1] === '##' ? titre[2].trim() : section;
|
|
115
|
-
if (section === 'Les fautes' && fautes === null)
|
|
125
|
+
if (section === 'Les fautes' && fautes === null) {
|
|
126
|
+
fautes = new Set();
|
|
127
|
+
}
|
|
116
128
|
continue;
|
|
117
129
|
}
|
|
118
|
-
if (section === 'Les fautes')
|
|
130
|
+
if (section === 'Les fautes') {
|
|
131
|
+
for (const m of l.matchAll(CODE)) {
|
|
132
|
+
fautes.add(m[0]);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
119
135
|
}
|
|
120
136
|
return { fautes };
|
|
121
137
|
}
|
|
@@ -131,7 +147,9 @@ function codesDuCode(dir, racine, prefixes) {
|
|
|
131
147
|
).filter(p => SOURCE.test(nom(p)) && !isTest(path.relative(racine, p)));
|
|
132
148
|
for (const p of sources) {
|
|
133
149
|
for (const m of (lireSiPresent(p) ?? '').matchAll(CODE)) {
|
|
134
|
-
if (prefixes.some(pr => m[0].startsWith(pr)))
|
|
150
|
+
if (prefixes.some(pr => m[0].startsWith(pr))) {
|
|
151
|
+
trouves.add(m[0]);
|
|
152
|
+
}
|
|
135
153
|
}
|
|
136
154
|
}
|
|
137
155
|
return trouves;
|
|
@@ -214,7 +232,9 @@ const CODE_SEUL = new RegExp(`^${CODE.source}$`);
|
|
|
214
232
|
|
|
215
233
|
// The text of a TSDoc node, its paragraphs apart by a blank line, each on one line.
|
|
216
234
|
function texteDoc(noeud) {
|
|
217
|
-
if (!noeud)
|
|
235
|
+
if (!noeud) {
|
|
236
|
+
return '';
|
|
237
|
+
}
|
|
218
238
|
const feuilles = n =>
|
|
219
239
|
n.kind === 'Excerpt' ? n.content.toString() : n.getChildNodes().map(feuilles).join('');
|
|
220
240
|
const paragraphes = noeud.kind === 'Section' ? noeud.getChildNodes() : [noeud];
|
|
@@ -287,7 +307,9 @@ function fautesJugees(nom, textes, fautes, refus, codes) {
|
|
|
287
307
|
regle: 'faute-hors-catalogue',
|
|
288
308
|
texte: `${nom} : le @faute ${code} n'est pas au catalogue « ## Les fautes ».`,
|
|
289
309
|
});
|
|
290
|
-
} else
|
|
310
|
+
} else {
|
|
311
|
+
codes.add(code);
|
|
312
|
+
}
|
|
291
313
|
}
|
|
292
314
|
}
|
|
293
315
|
|
|
@@ -297,35 +319,42 @@ export function jugerExport(item, fautes) {
|
|
|
297
319
|
const refus = [];
|
|
298
320
|
const nom = `\`${item.displayName}\``;
|
|
299
321
|
const k = contratDe(item);
|
|
300
|
-
if (!k.resume)
|
|
322
|
+
if (!k.resume) {
|
|
323
|
+
refus.push({ regle: 'resume', texte: `${nom} n'a pas de résumé TSDoc.` });
|
|
324
|
+
}
|
|
301
325
|
const codes = new Set();
|
|
302
326
|
if (estFonction(item)) {
|
|
303
327
|
const noms = new Set(k.parametres.filter(p => !p.destructure).map(p => p.name));
|
|
304
328
|
const prises = new Set();
|
|
305
329
|
k.parametres.forEach((p, i) => {
|
|
306
330
|
const parNom = p.destructure ? -1 : k.params.findIndex(b => b.nom === p.name);
|
|
307
|
-
if (parNom >= 0)
|
|
308
|
-
|
|
331
|
+
if (parNom >= 0) {
|
|
332
|
+
prises.add(parNom);
|
|
333
|
+
} else if (!p.destructure) {
|
|
309
334
|
refus.push({
|
|
310
335
|
regle: 'param',
|
|
311
336
|
texte: `${nom} : le paramètre « ${p.name} » n'a pas de @param.`,
|
|
312
337
|
});
|
|
313
|
-
else if (!k.params[i] || noms.has(k.params[i].nom))
|
|
338
|
+
} else if (!k.params[i] || noms.has(k.params[i].nom)) {
|
|
314
339
|
refus.push({
|
|
315
340
|
regle: 'param',
|
|
316
341
|
texte: `${nom} : le paramètre déstructuré en position ${i + 1} n'a pas son @param à cette position.`,
|
|
317
342
|
});
|
|
318
|
-
else
|
|
343
|
+
} else {
|
|
344
|
+
prises.add(i);
|
|
345
|
+
}
|
|
319
346
|
});
|
|
320
347
|
k.params.forEach((b, i) => {
|
|
321
|
-
if (!prises.has(i))
|
|
348
|
+
if (!prises.has(i)) {
|
|
322
349
|
refus.push({
|
|
323
350
|
regle: 'param-orphelin',
|
|
324
351
|
texte: `${nom} : le @param « ${b.nom} » ne nomme aucun paramètre.`,
|
|
325
352
|
});
|
|
353
|
+
}
|
|
326
354
|
});
|
|
327
|
-
if (k.rendUneValeur && k.retour === null)
|
|
355
|
+
if (k.rendUneValeur && k.retour === null) {
|
|
328
356
|
refus.push({ regle: 'returns', texte: `${nom} rend une valeur mais n'a pas de @returns.` });
|
|
357
|
+
}
|
|
329
358
|
}
|
|
330
359
|
fautesJugees(nom, k.fautes, fautes, refus, codes);
|
|
331
360
|
for (const m of item.members ?? []) {
|
|
@@ -350,19 +379,28 @@ export function marques(texte) {
|
|
|
350
379
|
lignes.forEach((l, i) => {
|
|
351
380
|
const f = /^\s*(```|~~~)/.exec(l);
|
|
352
381
|
if (cloture) {
|
|
353
|
-
if (f && f[1] === cloture)
|
|
382
|
+
if (f && f[1] === cloture) {
|
|
383
|
+
cloture = null;
|
|
384
|
+
}
|
|
354
385
|
return;
|
|
355
386
|
}
|
|
356
387
|
if (f) {
|
|
357
388
|
cloture = f[1];
|
|
358
389
|
return;
|
|
359
390
|
}
|
|
360
|
-
if (l.trim() === DEBUT)
|
|
361
|
-
|
|
391
|
+
if (l.trim() === DEBUT) {
|
|
392
|
+
debuts.push(i);
|
|
393
|
+
}
|
|
394
|
+
if (l.trim() === FIN) {
|
|
395
|
+
fins.push(i);
|
|
396
|
+
}
|
|
362
397
|
});
|
|
363
|
-
if (!debuts.length && !fins.length)
|
|
364
|
-
|
|
398
|
+
if (!debuts.length && !fins.length) {
|
|
399
|
+
return { etat: 'absentes', lignes };
|
|
400
|
+
}
|
|
401
|
+
if (debuts.length === 1 && fins.length === 1 && debuts[0] < fins[0]) {
|
|
365
402
|
return { etat: 'ok', lignes, debut: debuts[0], fin: fins[0] };
|
|
403
|
+
}
|
|
366
404
|
return { etat: 'invalides', lignes };
|
|
367
405
|
}
|
|
368
406
|
|
|
@@ -379,10 +417,12 @@ const signature = item => {
|
|
|
379
417
|
/^(?:(?:export|declare|default|async)\s+)*(?:function|class|interface|type|enum|namespace|const|let|var)\b/.test(
|
|
380
418
|
texte
|
|
381
419
|
)
|
|
382
|
-
)
|
|
420
|
+
) {
|
|
383
421
|
return texte;
|
|
384
|
-
|
|
422
|
+
}
|
|
423
|
+
if (item.kind === 'Variable') {
|
|
385
424
|
return `export declare ${item.isReadonly ? 'const' : 'let'} ${texte}`;
|
|
425
|
+
}
|
|
386
426
|
return item.kind === 'Function' ? `const ${texte}` : texte;
|
|
387
427
|
};
|
|
388
428
|
|
|
@@ -391,15 +431,21 @@ const signature = item => {
|
|
|
391
431
|
function entreeDe(item) {
|
|
392
432
|
const k = contratDe(item);
|
|
393
433
|
const out = [`### \`${item.displayName}\``, ''];
|
|
394
|
-
if (k.resume)
|
|
434
|
+
if (k.resume) {
|
|
435
|
+
out.push(k.resume, '');
|
|
436
|
+
}
|
|
395
437
|
out.push('```ts', `${signature(item)};`, '```');
|
|
396
438
|
const params = k.params.filter(b => b.texte);
|
|
397
|
-
if (params.length)
|
|
439
|
+
if (params.length) {
|
|
398
440
|
out.push('', '**Paramètres**', '', ...params.map(b => `- \`${b.nom}\` — ${b.texte}`));
|
|
399
|
-
|
|
441
|
+
}
|
|
442
|
+
if (k.retour) {
|
|
443
|
+
out.push('', `**Retour** — ${k.retour}`);
|
|
444
|
+
}
|
|
400
445
|
const codes = [...new Set(k.fautes.map(f => f.replace(/\s+/g, ' ')))];
|
|
401
|
-
if (codes.length)
|
|
446
|
+
if (codes.length) {
|
|
402
447
|
out.push('', '**Fautes**', '', ...codes.map(f => `- ${f.replace(/^(\S+)/, '`$1`')}`));
|
|
448
|
+
}
|
|
403
449
|
const membres = [...(item.members ?? [])];
|
|
404
450
|
if (membres.length) {
|
|
405
451
|
out.push('', '**Membres**', '');
|
|
@@ -418,8 +464,9 @@ export const partieGeneree = exports =>
|
|
|
418
464
|
// The text of an interface with its generated part replaced; the marks are added at the end of a
|
|
419
465
|
// text that has none.
|
|
420
466
|
export function avecPartie(m, texte, partie) {
|
|
421
|
-
if (m.etat === 'absentes')
|
|
467
|
+
if (m.etat === 'absentes') {
|
|
422
468
|
return `${texte}${texte.endsWith('\n') ? '' : '\n'}\n${DEBUT}${partie}${FIN}\n`;
|
|
469
|
+
}
|
|
423
470
|
const avant = m.lignes.slice(0, m.debut).join('\n');
|
|
424
471
|
const apres = m.lignes.slice(m.fin + 1).join('\n');
|
|
425
472
|
return `${avant}${m.debut ? '\n' : ''}${DEBUT}${partie}${FIN}\n${apres}`;
|
|
@@ -456,7 +503,9 @@ export function verifierComposant(racine, c, { ecrire = false } = {}) {
|
|
|
456
503
|
const { fautes } = declare(texte);
|
|
457
504
|
const m = marques(texte);
|
|
458
505
|
if (sansApi(c)) {
|
|
459
|
-
if (fautes)
|
|
506
|
+
if (fautes) {
|
|
507
|
+
codesContreCatalogue(c, racine, fautes, refuser);
|
|
508
|
+
}
|
|
460
509
|
return { refus, signaux };
|
|
461
510
|
}
|
|
462
511
|
if (m.etat === 'invalides') {
|
|
@@ -474,7 +523,9 @@ export function verifierComposant(racine, c, { ecrire = false } = {}) {
|
|
|
474
523
|
const { TSDocConfigFile } = require('@microsoft/tsdoc-config');
|
|
475
524
|
const config = TSDocConfigFile.loadFile(fichierTsdoc);
|
|
476
525
|
const api = rapportApi(racine, c, dts, ecrire, config);
|
|
477
|
-
for (const msg of api.messages)
|
|
526
|
+
for (const msg of api.messages) {
|
|
527
|
+
signaux.push(`${rel} : ${msg}`);
|
|
528
|
+
}
|
|
478
529
|
for (const t of api.tsdoc) {
|
|
479
530
|
refuser(`TSDoc : ${t.texte}`, t.regle, t.fichier ?? relIface, t.ligne);
|
|
480
531
|
}
|
|
@@ -493,17 +544,24 @@ export function verifierComposant(racine, c, { ecrire = false } = {}) {
|
|
|
493
544
|
const nommees = new Set();
|
|
494
545
|
for (const item of api.exports) {
|
|
495
546
|
const j = jugerExport(item, fautes);
|
|
496
|
-
for (const r of j.refus)
|
|
497
|
-
|
|
547
|
+
for (const r of j.refus) {
|
|
548
|
+
refuser(r.texte, r.regle);
|
|
549
|
+
}
|
|
550
|
+
for (const code of j.codes) {
|
|
551
|
+
nommees.add(code);
|
|
552
|
+
}
|
|
498
553
|
}
|
|
499
554
|
for (const f of fautes ?? []) {
|
|
500
|
-
if (!nommees.has(f))
|
|
555
|
+
if (!nommees.has(f)) {
|
|
501
556
|
refuser(`la faute ${f} du catalogue n'est nommée par aucun @faute.`, 'faute-non-nommee');
|
|
557
|
+
}
|
|
502
558
|
}
|
|
503
559
|
if (m.etat !== 'invalides') {
|
|
504
560
|
const attendu = avecPartie(m, texte, partieGeneree(api.exports));
|
|
505
561
|
if (ecrire) {
|
|
506
|
-
if (attendu !== texte)
|
|
562
|
+
if (attendu !== texte) {
|
|
563
|
+
writeFileSync(iface, attendu);
|
|
564
|
+
}
|
|
507
565
|
} else if (attendu !== texte) {
|
|
508
566
|
aRegenerer(
|
|
509
567
|
`la part générée de docs/INTERFACE.md (entre ${DEBUT} et ${FIN}) n'est pas celle du code ; npm run api la refait.`,
|
|
@@ -512,7 +570,9 @@ export function verifierComposant(racine, c, { ecrire = false } = {}) {
|
|
|
512
570
|
}
|
|
513
571
|
}
|
|
514
572
|
}
|
|
515
|
-
if (fautes)
|
|
573
|
+
if (fautes) {
|
|
574
|
+
codesContreCatalogue(c, racine, fautes, refuser);
|
|
575
|
+
}
|
|
516
576
|
return { refus, signaux };
|
|
517
577
|
}
|
|
518
578
|
|
|
@@ -522,12 +582,14 @@ function codesContreCatalogue(c, racine, fautes, refuser) {
|
|
|
522
582
|
const prefixes = [...new Set([...fautes].map(f => f.slice(0, f.indexOf('_') + 1)))];
|
|
523
583
|
const dansLeCode = codesDuCode(c.dir, racine, prefixes);
|
|
524
584
|
for (const f of fautes) {
|
|
525
|
-
if (!dansLeCode.has(f))
|
|
585
|
+
if (!dansLeCode.has(f)) {
|
|
526
586
|
refuser(`la faute ${f} est listée, mais le code ne la produit pas.`, 'faute-non-produite');
|
|
587
|
+
}
|
|
527
588
|
}
|
|
528
589
|
for (const f of dansLeCode) {
|
|
529
|
-
if (!fautes.has(f))
|
|
590
|
+
if (!fautes.has(f)) {
|
|
530
591
|
refuser(`le code produit ${f}, que « Les fautes » ne liste pas.`, 'faute-non-listee');
|
|
592
|
+
}
|
|
531
593
|
}
|
|
532
594
|
}
|
|
533
595
|
|
|
@@ -546,11 +608,17 @@ if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
|
546
608
|
const constats = [];
|
|
547
609
|
for (const c of aVerifier(racine)) {
|
|
548
610
|
const { refus, signaux } = verifierComposant(racine, c, { ecrire });
|
|
549
|
-
for (const s of signaux)
|
|
611
|
+
for (const s of signaux) {
|
|
612
|
+
process.stderr.write(`⚠️ ${s}\n`);
|
|
613
|
+
}
|
|
550
614
|
constats.push(...refus);
|
|
551
615
|
}
|
|
552
616
|
const { refus, lignes } = trancher(racine, 'interfaces-contre-code', constats);
|
|
553
|
-
for (const r of refus)
|
|
554
|
-
|
|
617
|
+
for (const r of refus) {
|
|
618
|
+
process.stderr.write(`⛔ ${r.message}\n`);
|
|
619
|
+
}
|
|
620
|
+
for (const l of lignes) {
|
|
621
|
+
process.stderr.write(`${l}\n`);
|
|
622
|
+
}
|
|
555
623
|
process.exitCode = refus.length ? 1 : 0;
|
|
556
624
|
}
|
|
@@ -41,7 +41,9 @@ function sourcesDe(tous) {
|
|
|
41
41
|
return tous.flatMap(c =>
|
|
42
42
|
parcourir(c.dir, p => SAUTES.has(path.basename(p)))
|
|
43
43
|
.filter(f => {
|
|
44
|
-
if (!SOURCE.test(f) || NOM_DE_TEST.test(path.basename(f)))
|
|
44
|
+
if (!SOURCE.test(f) || NOM_DE_TEST.test(path.basename(f))) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
45
47
|
return !path
|
|
46
48
|
.relative(c.dir, f)
|
|
47
49
|
.split(path.sep)
|
|
@@ -56,7 +58,9 @@ function interfacesDe(racine, tous) {
|
|
|
56
58
|
const out = new Map();
|
|
57
59
|
for (const c of tous) {
|
|
58
60
|
const f = path.join(c.dir, 'docs', 'INTERFACE.md');
|
|
59
|
-
if (!existsSync(f))
|
|
61
|
+
if (!existsSync(f)) {
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
60
64
|
const i = lire(path.relative(racine, f).split(path.sep).join('/'), readFileSync(f, 'utf8'));
|
|
61
65
|
const publies = new Set(
|
|
62
66
|
i.parties.filter(p => !p.consommateurs).map(p => p.titre.replace(/`/g, '').trim())
|
|
@@ -71,7 +75,9 @@ function interfacesDe(racine, tous) {
|
|
|
71
75
|
// files left out.
|
|
72
76
|
function testsDe(c) {
|
|
73
77
|
return parcourir(c.dir, p => SAUTES.has(path.basename(p))).filter(f => {
|
|
74
|
-
if (!SOURCE.test(f))
|
|
78
|
+
if (!SOURCE.test(f)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
75
81
|
const rel = path.relative(c.dir, f).split(path.sep);
|
|
76
82
|
return NOM_DE_TEST.test(path.basename(f)) || rel.some(d => DOSSIERS_DE_TEST.has(d));
|
|
77
83
|
});
|
|
@@ -102,11 +108,12 @@ export function lecteurs(racine, { composants, noms, texte, nommes }) {
|
|
|
102
108
|
const ifaces = interfacesDe(racine, tous);
|
|
103
109
|
const tests = new Map();
|
|
104
110
|
const testsDuComposant = c => {
|
|
105
|
-
if (!tests.has(c))
|
|
111
|
+
if (!tests.has(c)) {
|
|
106
112
|
tests.set(
|
|
107
113
|
c,
|
|
108
114
|
testsDe(c).map(f => ({ f, texte: lireSiPresent(f) ?? '' }))
|
|
109
115
|
);
|
|
116
|
+
}
|
|
110
117
|
return tests.get(c);
|
|
111
118
|
};
|
|
112
119
|
const elements = [];
|
|
@@ -114,25 +121,35 @@ export function lecteurs(racine, { composants, noms, texte, nommes }) {
|
|
|
114
121
|
for (const nom of noms) {
|
|
115
122
|
const fournisseurs = tous.filter(c => ifaces.get(c)?.publies.has(nom));
|
|
116
123
|
if (fournisseurs.length === 0) {
|
|
117
|
-
if (!tous.some(c => c.paquet === nom))
|
|
124
|
+
if (!tous.some(c => c.paquet === nom)) {
|
|
125
|
+
sansFournisseur.push(nom);
|
|
126
|
+
}
|
|
118
127
|
continue;
|
|
119
128
|
}
|
|
120
129
|
for (const p of fournisseurs) {
|
|
121
130
|
const lus = [];
|
|
122
131
|
for (const c of tous) {
|
|
123
|
-
if (c === p)
|
|
132
|
+
if (c === p) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
124
135
|
const par = [];
|
|
125
136
|
const declare =
|
|
126
137
|
ifaces.get(p).consommateurs.get(c.nom) ?? ifaces.get(p).consommateurs.get(c.paquet);
|
|
127
|
-
if (declare && (declare.has(nom) || declare.has('*')))
|
|
138
|
+
if (declare && (declare.has(nom) || declare.has('*'))) {
|
|
139
|
+
par.push('consommateurs');
|
|
140
|
+
}
|
|
128
141
|
const n = reel.get(p.nom)?.get(c.nom);
|
|
129
|
-
if (n && (n.has(nom) || n.has('*')))
|
|
142
|
+
if (n && (n.has(nom) || n.has('*'))) {
|
|
143
|
+
par.push('import');
|
|
144
|
+
}
|
|
130
145
|
for (const t of testsDuComposant(c)) {
|
|
131
146
|
if (identifiant(nom).test(t.texte) && importe(t.texte, t.f, p)) {
|
|
132
147
|
par.push(path.relative(racine, t.f).split(path.sep).join('/'));
|
|
133
148
|
}
|
|
134
149
|
}
|
|
135
|
-
if (par.length)
|
|
150
|
+
if (par.length) {
|
|
151
|
+
lus.push({ composant: exterieur(c), par });
|
|
152
|
+
}
|
|
136
153
|
}
|
|
137
154
|
elements.push({ nom, fournisseur: exterieur(p), lecteurs: lus });
|
|
138
155
|
}
|
|
@@ -149,10 +166,18 @@ export function lecteurs(racine, { composants, noms, texte, nommes }) {
|
|
|
149
166
|
const lit = new Map(composants.map(c => [c, new Set()]));
|
|
150
167
|
for (const p of tous) {
|
|
151
168
|
for (const nomLecteur of reel.get(p.nom)?.keys() ?? []) {
|
|
152
|
-
for (const c of tous)
|
|
169
|
+
for (const c of tous) {
|
|
170
|
+
if (c.nom === nomLecteur) {
|
|
171
|
+
lit.get(c.c).add(p.c);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
for (const e of elements) {
|
|
177
|
+
for (const l of e.lecteurs) {
|
|
178
|
+
lit.get(l.composant).add(e.fournisseur);
|
|
153
179
|
}
|
|
154
180
|
}
|
|
155
|
-
for (const e of elements) for (const l of e.lecteurs) lit.get(l.composant).add(e.fournisseur);
|
|
156
181
|
const parLesTests = new Map(composants.map(c => [c, new Set()]));
|
|
157
182
|
for (const [c, lus] of testsLisent) {
|
|
158
183
|
for (const p of lus) {
|
|
@@ -53,14 +53,18 @@ export function migrer(projet) {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
const fracine = path.join(projet, 'package.json');
|
|
56
|
-
if (!existsSync(fracine))
|
|
56
|
+
if (!existsSync(fracine)) {
|
|
57
|
+
return lignes;
|
|
58
|
+
}
|
|
57
59
|
const racine = lireJson(fracine);
|
|
58
60
|
const plage =
|
|
59
61
|
CHAMPS.map(c => racine[c]?.[PAQUET]).find(v => v !== undefined) ?? `^${versionDuCadre()}`;
|
|
60
62
|
const declarer = pkg => {
|
|
61
63
|
let change = false;
|
|
62
64
|
for (const c of CHAMPS) {
|
|
63
|
-
if (pkg[c]?.[ANCIEN] === undefined)
|
|
65
|
+
if (pkg[c]?.[ANCIEN] === undefined) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
64
68
|
const { [ANCIEN]: _ancien, ...reste } = pkg[c];
|
|
65
69
|
const deja = CHAMPS.some(d => pkg[d]?.[PAQUET] !== undefined);
|
|
66
70
|
pkg[c] = Object.fromEntries(
|
|
@@ -73,12 +77,16 @@ export function migrer(projet) {
|
|
|
73
77
|
return change;
|
|
74
78
|
};
|
|
75
79
|
for (const { dossier, pkg } of paquets(projet)) {
|
|
76
|
-
if (ANCIENS_ESPACES.includes(dossier) || !declarer(pkg))
|
|
80
|
+
if (ANCIENS_ESPACES.includes(dossier) || !declarer(pkg)) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
77
83
|
ecrireJson(path.join(projet, dossier, 'package.json'), pkg);
|
|
78
84
|
lignes.push(`${dossier}/package.json : déclare ${PAQUET} à la place de ${ANCIEN}`);
|
|
79
85
|
}
|
|
80
86
|
const declare = declarer(racine);
|
|
81
|
-
if (declare)
|
|
87
|
+
if (declare) {
|
|
88
|
+
lignes.push(`package.json : déclare ${PAQUET} à la place de ${ANCIEN}`);
|
|
89
|
+
}
|
|
82
90
|
const liste = Array.isArray(racine.workspaces) ? racine.workspaces : racine.workspaces?.packages;
|
|
83
91
|
const restants = Array.isArray(liste) ? liste.filter(e => !ANCIENS_ESPACES.includes(e)) : liste;
|
|
84
92
|
const espaces = Array.isArray(liste) && restants.length !== liste.length;
|
|
@@ -88,6 +96,8 @@ export function migrer(projet) {
|
|
|
88
96
|
: { ...racine.workspaces, packages: restants };
|
|
89
97
|
lignes.push(`package.json : l'ancien dossier de ${ANCIEN} quitte les workspaces`);
|
|
90
98
|
}
|
|
91
|
-
if (declare || espaces)
|
|
99
|
+
if (declare || espaces) {
|
|
100
|
+
ecrireJson(fracine, racine);
|
|
101
|
+
}
|
|
92
102
|
return lignes;
|
|
93
103
|
}
|
|
@@ -17,9 +17,13 @@ export const nom = 'chemins des tests';
|
|
|
17
17
|
|
|
18
18
|
/** Inscribes the paths the tests of the project at <projet> name undeclared; what it did. */
|
|
19
19
|
export function migrer(projet) {
|
|
20
|
-
if (lire(projet)[GARDE])
|
|
20
|
+
if (lire(projet)[GARDE]) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
21
23
|
const constats = verifier(projet);
|
|
22
|
-
if (constats.length === 0)
|
|
24
|
+
if (constats.length === 0) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
23
27
|
trancher(projet, GARDE, constats, 'inscrire', {});
|
|
24
28
|
return [
|
|
25
29
|
`${FICHIER} : ${constats.length} chemin(s) qu'un test nomme sans que le cadre le lise, inscrit(s) dans la dette de ${GARDE}, gelée ; un neuf est refusé, et chaque test écrit le chemin entier`,
|
|
@@ -21,9 +21,13 @@ export const nom = 'tailles des tests';
|
|
|
21
21
|
|
|
22
22
|
/** Inscribes the large tests of the day of the project at <projet> in its debt; what it did. */
|
|
23
23
|
export function migrer(projet) {
|
|
24
|
-
if (lire(projet)[GARDE])
|
|
24
|
+
if (lire(projet)[GARDE]) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
25
27
|
const constats = verifier(projet);
|
|
26
|
-
if (constats.length === 0)
|
|
28
|
+
if (constats.length === 0) {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
27
31
|
trancher(projet, GARDE, constats, 'inscrire', {});
|
|
28
32
|
return [
|
|
29
33
|
`${FICHIER} : ${constats.length} grand(s) test(s) de jour inscrit(s) dans la dette de ${GARDE}, gelée ; un grand test de jour neuf est refusé, et chacun passe à la nuit (*.nuit.test.*) ou se réduit`,
|