@roomi-fields/grillhouse 0.46.0 → 0.47.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 +14 -0
- package/cadre/templates/c/package.json +19 -0
- package/cadre/templates/projet/.github/workflows/ci.yml +34 -49
- package/cadre/templates/projet/CLAUDE.md +6 -0
- package/cadre/templates/projet/docs/agents/issue-tracker.md +1 -1
- package/charte.md +17 -9
- package/dist/temporal/circuit/client.d.ts +14 -5
- package/dist/temporal/circuit/client.js +39 -9
- package/dist/temporal/circuit/client.js.map +1 -1
- package/dist/temporal/file/activites.d.ts +2 -0
- package/dist/temporal/file/activites.js +7 -0
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +26 -18
- package/dist/temporal/file/contrat.js +8 -5
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.d.ts +1 -1
- package/dist/temporal/file/deroule.js +91 -42
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/tickets/activites.js +4 -13
- package/dist/temporal/tickets/activites.js.map +1 -1
- package/docs/ARCHITECTURE.md +117 -82
- package/docs/INTERFACE.md +36 -19
- package/hooks/register.tsx +1 -1
- package/package.json +1 -1
- package/scripts/activites.mjs +5 -11
- package/scripts/arbres-juges.mjs +59 -0
- package/scripts/avancement.mjs +2 -38
- package/scripts/branche-de-nuit.mjs +14 -45
- package/scripts/ci-de-main.mjs +273 -0
- package/scripts/dernier-vert.mjs +12 -8
- package/scripts/etapes.mjs +1 -1
- package/scripts/faits-du-circuit.mjs +41 -25
- package/scripts/integration/file.mjs +126 -587
- package/scripts/integration/integrer.mjs +6 -5
- package/scripts/langages/c/binaires.json +4 -0
- package/scripts/langages/c/binaires.mjs +83 -0
- package/scripts/langages/c/clang-format.mjs +62 -0
- package/scripts/langages/c/clang-tidy.mjs +93 -0
- package/scripts/langages/c/clang.mjs +42 -0
- package/scripts/langages/c/commandes.mjs +530 -0
- package/scripts/langages/c/composants.mjs +209 -0
- package/scripts/langages/c/exemples.mjs +250 -0
- package/scripts/langages/c/index-interfaces.mjs +77 -0
- package/scripts/langages/c/index.mjs +120 -0
- package/scripts/langages/c/lot.mjs +41 -0
- package/scripts/langages/c/mise-a-jour.mjs +70 -0
- package/scripts/langages/c/squelette.mjs +61 -0
- package/scripts/langages/c/verdict.mjs +99 -0
- package/scripts/langages/typescript/turbo-des-paquets.mjs +16 -5
- package/scripts/langages-des-paquets.mjs +30 -2
- package/scripts/langages.mjs +1 -0
- package/scripts/mesure/avancement.mjs +1 -1
- package/scripts/migrations/0.47.0-ci-de-main.mjs +48 -0
- package/scripts/migrations.mjs +2 -2
- package/scripts/session-start.sh +0 -9
- package/scripts/sortie.mjs +1 -1
- package/scripts/superviseur.mjs +146 -88
- package/scripts/tableau.mjs +23 -8
- package/skills/grill/SKILL.md +6 -5
- package/skills/pitmaster/SKILL.md +9 -7
- package/skills/redacteur/references/documents-d-un-composant.md +1 -1
- package/scripts/ci-des-branches.mjs +0 -93
- package/scripts/migrations/0.33.0-ci-des-branches-de-ticket.mjs +0 -31
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// The CI of a project's ticket branches: the queue enters a lot on main only once the CI of its
|
|
3
|
-
// branch `agent/<ticket>` judged it green (scripts/integration/file.mjs), so the project's CI must
|
|
4
|
-
// run on a push to `agent/**`, as bors needs a status on its staging branch.
|
|
5
|
-
//
|
|
6
|
-
// node ci-des-branches.mjs --absente <project> prints one line when no workflow of the project
|
|
7
|
-
// runs on a push to a ticket's branch
|
|
8
|
-
//
|
|
9
|
-
// - Whether a workflow runs on a push to a ticket's branch is the queue's own reading of the
|
|
10
|
-
// workflows (`fluxDeLaBranche` of scripts/integration/file.mjs), here on the working tree's
|
|
11
|
-
// `.github/workflows/*.yml` and `*.yaml`, for the branch `agent/ticket`.
|
|
12
|
-
// - `ajouterLesBranchesDeTicket` adds `agent/**` to the `on.push.branches` list of each workflow
|
|
13
|
-
// that runs on a push to the branch main is pushed to (`grillhouse.poussee.commit`, `main` by
|
|
14
|
-
// default), the CI of the lots, its comments and its layout kept (the library yaml's document);
|
|
15
|
-
// a project already listening, or none to judge, is left as it is, `GESTE` the line left to it.
|
|
16
|
-
import { existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
17
|
-
import path from 'node:path';
|
|
18
|
-
import { pathToFileURL } from 'node:url';
|
|
19
|
-
import { parseDocument } from 'yaml';
|
|
20
|
-
import { fluxDeLaBranche } from './integration/file.mjs';
|
|
21
|
-
import { lireCommit } from './poussee-cles.mjs';
|
|
22
|
-
|
|
23
|
-
/** The pattern of the ticket branches the queue pushes. */
|
|
24
|
-
export const BRANCHES_DE_TICKET = 'agent/**';
|
|
25
|
-
// A branch of a ticket, which the pattern matches.
|
|
26
|
-
const TEMOIN = 'agent/ticket';
|
|
27
|
-
const DOSSIER = '.github/workflows';
|
|
28
|
-
/** The gesture left to a project none of whose workflows runs on a push to `agent/**`. */
|
|
29
|
-
export const GESTE = `aucun flux de ${DOSSIER} ne se lance sur un push vers les branches de ticket : la file n'entre un lot sur main qu'une fois la CI de sa branche verte ; ajoute '${BRANCHES_DE_TICKET}' aux branches du push du flux de la CI du projet.`;
|
|
30
|
-
|
|
31
|
-
// The workflows of the working tree of <racine>: `{ chemin, texte }`.
|
|
32
|
-
function lesFlux(racine) {
|
|
33
|
-
const dossier = path.join(racine, DOSSIER);
|
|
34
|
-
if (!existsSync(dossier)) {
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
return readdirSync(dossier)
|
|
38
|
-
.filter(n => /\.ya?ml$/.test(n))
|
|
39
|
-
.sort()
|
|
40
|
-
.map(n => ({ chemin: `${DOSSIER}/${n}`, texte: readFileSync(path.join(dossier, n), 'utf8') }));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/** Whether a workflow of the project at <racine> runs on a push to a ticket's branch. */
|
|
44
|
-
export function ecouteLesBranchesDeTicket(racine) {
|
|
45
|
-
return fluxDeLaBranche(lesFlux(racine), TEMOIN).length > 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// The branch main is pushed to, from the package.json of <racine>; `main` without it.
|
|
49
|
-
function principale(racine) {
|
|
50
|
-
const f = path.join(racine, 'package.json');
|
|
51
|
-
try {
|
|
52
|
-
return lireCommit(JSON.parse(readFileSync(f, 'utf8'))).commit ?? 'main';
|
|
53
|
-
} catch {
|
|
54
|
-
return 'main';
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* `agent/**` added to the push of the CI of the lots of the project at <racine>: the workflows
|
|
60
|
-
* written, none when the project already listens or has no workflow that runs on a push to main
|
|
61
|
-
* with a list of branches to add it to. A workflow filtered on paths (a documentation published
|
|
62
|
-
* when its sources change) is no CI of the lots, and is left.
|
|
63
|
-
*/
|
|
64
|
-
export function ajouterLesBranchesDeTicket(racine) {
|
|
65
|
-
const flux = lesFlux(racine);
|
|
66
|
-
if (fluxDeLaBranche(flux, TEMOIN).length > 0) {
|
|
67
|
-
return [];
|
|
68
|
-
}
|
|
69
|
-
const surMain = new Set(fluxDeLaBranche(flux, principale(racine)));
|
|
70
|
-
const ajoutes = [];
|
|
71
|
-
for (const { chemin, texte } of flux.filter(f => surMain.has(f.chemin))) {
|
|
72
|
-
const doc = parseDocument(texte);
|
|
73
|
-
const branches = doc.getIn(['on', 'push', 'branches'], true);
|
|
74
|
-
const chemins = ['paths', 'paths-ignore'].some(c => doc.hasIn(['on', 'push', c]));
|
|
75
|
-
if (chemins || !branches || typeof branches.add !== 'function') {
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
branches.add(doc.createNode(BRANCHES_DE_TICKET));
|
|
79
|
-
writeFileSync(path.join(racine, chemin), doc.toString());
|
|
80
|
-
ajoutes.push(chemin);
|
|
81
|
-
}
|
|
82
|
-
return ajoutes;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (import.meta.url === pathToFileURL(process.argv[1] ?? '').href) {
|
|
86
|
-
const [option, racine] = process.argv.slice(2);
|
|
87
|
-
if (option !== '--absente' || !racine) {
|
|
88
|
-
process.stderr.write('usage: ci-des-branches.mjs --absente <projet>\n');
|
|
89
|
-
process.exitCode = 2;
|
|
90
|
-
} else if (!ecouteLesBranchesDeTicket(racine)) {
|
|
91
|
-
process.stdout.write(`${BRANCHES_DE_TICKET}\n`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// From 0.33.0 the queue enters a lot on main only once the CI of its branch `agent/<ticket>`
|
|
2
|
-
// judged it green (grillhouse-44b.12.5): the CI of the project runs on a push to `agent/**`.
|
|
3
|
-
//
|
|
4
|
-
// - The workflows of `.github/workflows/` that run on a push to the branch main is pushed to, and
|
|
5
|
-
// list the branches of their push, gain `agent/**` (scripts/ci-des-branches.mjs).
|
|
6
|
-
// - A project whose CI already runs on a push to `agent/**` is left, nothing said: a second pass
|
|
7
|
-
// changes nothing.
|
|
8
|
-
// - A project without such a workflow is left; `restes` says the gesture, which the update
|
|
9
|
-
// reports without failing, as the opening of a session names it under « Manque ».
|
|
10
|
-
import {
|
|
11
|
-
ajouterLesBranchesDeTicket,
|
|
12
|
-
BRANCHES_DE_TICKET,
|
|
13
|
-
ecouteLesBranchesDeTicket,
|
|
14
|
-
GESTE,
|
|
15
|
-
} from '../ci-des-branches.mjs';
|
|
16
|
-
|
|
17
|
-
export const version = '0.33.0';
|
|
18
|
-
export const nom = 'ci des branches de ticket';
|
|
19
|
-
|
|
20
|
-
/** Adds `agent/**` to the push of the CI of the lots; returns what it did. */
|
|
21
|
-
export function migrer(projet) {
|
|
22
|
-
return ajouterLesBranchesDeTicket(projet).map(
|
|
23
|
-
f =>
|
|
24
|
-
`${f} : '${BRANCHES_DE_TICKET}' ajoutée aux branches de son push, que la file pousse et dont la CI juge chaque lot`
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** What stays to the project: the gesture, while no workflow runs on a push to `agent/**`. */
|
|
29
|
-
export function restes(projet) {
|
|
30
|
-
return ecouteLesBranchesDeTicket(projet) ? [] : [GESTE];
|
|
31
|
-
}
|