@roomi-fields/grillhouse 0.32.0 → 0.33.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 +22 -0
- package/bin/grillhouse.mjs +6 -4
- package/cadre/templates/projet/.github/workflows/ci.yml +136 -16
- package/cadre/templates/projet/.github/workflows/nuit.yml +111 -0
- package/cadre/templates/projet/deployment/docs/01-INSTALL.md +4 -4
- package/cadre/templates/projet/package.json +2 -2
- package/charte.md +8 -5
- package/dist/temporal/circuit/contrat.d.ts +15 -0
- package/dist/temporal/circuit/deroule.js +37 -14
- package/dist/temporal/circuit/deroule.js.map +1 -1
- package/dist/temporal/deroules.d.ts +1 -0
- package/dist/temporal/deroules.js +3 -1
- package/dist/temporal/deroules.js.map +1 -1
- package/dist/temporal/file/activites.d.ts +1 -0
- package/dist/temporal/file/activites.js +5 -2
- package/dist/temporal/file/activites.js.map +1 -1
- package/dist/temporal/file/contrat.d.ts +50 -33
- package/dist/temporal/file/contrat.js +2 -2
- package/dist/temporal/file/contrat.js.map +1 -1
- package/dist/temporal/file/deroule.d.ts +3 -1
- package/dist/temporal/file/deroule.js +128 -26
- package/dist/temporal/file/deroule.js.map +1 -1
- package/dist/temporal/nuits/activites.d.ts +10 -0
- package/dist/temporal/nuits/activites.js +114 -0
- package/dist/temporal/nuits/activites.js.map +1 -0
- package/dist/temporal/nuits/appel.d.ts +23 -0
- package/dist/temporal/nuits/appel.js +40 -0
- package/dist/temporal/nuits/appel.js.map +1 -0
- package/dist/temporal/nuits/choix.d.ts +14 -0
- package/dist/temporal/nuits/choix.js +119 -0
- package/dist/temporal/nuits/choix.js.map +1 -0
- package/dist/temporal/nuits/client.d.ts +28 -0
- package/dist/temporal/nuits/client.js +83 -0
- package/dist/temporal/nuits/client.js.map +1 -0
- package/dist/temporal/nuits/commande.d.ts +2 -0
- package/dist/temporal/nuits/commande.js +107 -0
- package/dist/temporal/nuits/commande.js.map +1 -0
- package/dist/temporal/nuits/contrat.d.ts +98 -0
- package/dist/temporal/nuits/contrat.js +30 -0
- package/dist/temporal/nuits/contrat.js.map +1 -0
- package/dist/temporal/nuits/deroule.d.ts +5 -0
- package/dist/temporal/nuits/deroule.js +100 -0
- package/dist/temporal/nuits/deroule.js.map +1 -0
- package/dist/temporal/travailleur.js +4 -1
- package/dist/temporal/travailleur.js.map +1 -1
- package/docs/ARCHITECTURE.md +186 -45
- package/docs/CADRE.md +31 -1
- package/docs/INTERFACE.md +45 -6
- package/hooks/register.tsx +11 -3
- package/package.json +4 -1
- package/scripts/abi-des-dependances.mjs +105 -0
- package/scripts/activites.mjs +94 -41
- package/scripts/aiguillage.mjs +1 -0
- package/scripts/avancement.mjs +8 -18
- package/scripts/ci-des-branches.mjs +91 -0
- package/scripts/circuit.mjs +79 -4
- package/scripts/composants-affectes.mjs +24 -7
- package/scripts/composition-des-langages.mjs +3 -0
- package/scripts/crochets.mjs +4 -0
- package/scripts/enveloppe/enveloppe.mjs +3 -1
- package/scripts/enveloppe/lancer.sh +1 -1
- package/scripts/enveloppe/travail-de-la-copie.mjs +219 -59
- package/scripts/etapes.mjs +18 -1
- package/scripts/faits-du-circuit.mjs +43 -20
- package/scripts/fichier-du-poste.mjs +87 -0
- package/scripts/grillhouse-maj.mjs +15 -1
- package/scripts/integration/file.mjs +215 -275
- package/scripts/integration/integrer.mjs +82 -41
- package/scripts/integration/rejeu.mjs +13 -64
- package/scripts/jointure.d.ts +26 -2
- package/scripts/langages/cargo/commandes.mjs +81 -19
- package/scripts/langages/cargo/exemples.mjs +2 -2
- package/scripts/langages/cargo/index.mjs +11 -5
- package/scripts/langages/cargo/tailles-des-tests.mjs +19 -11
- package/scripts/langages/python/commandes.mjs +11 -7
- package/scripts/langages/python/exemples.mjs +1 -1
- package/scripts/langages/python/index.mjs +9 -2
- package/scripts/langages/python/tailles-des-tests.mjs +19 -11
- package/scripts/langages/typescript/code-mort.mjs +41 -24
- package/scripts/langages/typescript/consommateurs.mjs +28 -17
- package/scripts/langages/typescript/exemples.mjs +2 -0
- package/scripts/langages/typescript/index.mjs +22 -3
- package/scripts/langages/typescript/migrations/0.33.0-binaire-de-jour.mjs +34 -0
- package/scripts/langages/typescript/migrations/0.33.0-tests-du-poste.mjs +31 -0
- package/scripts/langages/typescript/resumes.mjs +17 -7
- package/scripts/langages/typescript/tailles-des-tests.mjs +251 -22
- package/scripts/langages/typescript/tests-de-nuit.mjs +101 -9
- package/scripts/langages/typescript/tests-du-poste.mjs +172 -0
- package/scripts/langages/typescript/tranches.mjs +273 -0
- package/scripts/langages/typescript/verifier.mjs +131 -29
- package/scripts/langages/typescript/vitest-config/cibles.mjs +78 -7
- package/scripts/langages/typescript/vitest-config/lances.mjs +4 -4
- package/scripts/langages/typescript/vitest-config/machine.setup.mjs +9 -0
- package/scripts/langages/typescript/vitest.nuit.config.mjs +3 -2
- package/scripts/lint-des-scripts.mjs +23 -6
- package/scripts/migrations/0.33.0-cache-distant.mjs +36 -0
- package/scripts/migrations/0.33.0-ci-des-branches-de-ticket.mjs +31 -0
- package/scripts/migrations/0.33.0-ci-du-cadre.mjs +31 -0
- package/scripts/migrations/0.33.0-node-26.mjs +58 -0
- package/scripts/migrations.mjs +8 -0
- package/scripts/newday.mjs +18 -0
- package/scripts/nuit.sh +35 -17
- package/scripts/registre.d.mts +90 -0
- package/scripts/registre.mjs +28 -3
- package/scripts/reprise.mjs +12 -8
- package/scripts/services-du-noyau.mjs +4 -0
- package/scripts/session-start.sh +28 -32
- package/scripts/sous-commandes.mjs +29 -10
- package/scripts/tableau.mjs +124 -17
- package/scripts/taches-du-graphe.mjs +39 -6
- package/scripts/transitions.mjs +42 -3
- package/scripts/verrou-de-machine.mjs +1 -2
- package/scripts/workflows-du-cadre.mjs +75 -0
- package/skills/grill/SKILL.md +8 -6
- package/skills/pitmaster/SKILL.md +5 -4
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/** The workflow's type that plays the nights of the machine, one project after the other. */
|
|
2
|
+
export declare const NUITS = "nuitsDeLaMachine";
|
|
3
|
+
/** The id of the one workflow of the nights of the machine. */
|
|
4
|
+
export declare const ID_DES_NUITS = "grillhouse-nuits-de-la-machine";
|
|
5
|
+
/**
|
|
6
|
+
* The workflow's type that the schedule starts at each firing: it asks the workflow of the nights
|
|
7
|
+
* for the nights of the projects that moved, and ends. A schedule suffixes the id of the workflow
|
|
8
|
+
* it starts with the time of its firing; the workflow of the nights keeps its fixed id so.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NUIT_PLANIFIEE = "nuitPlanifiee";
|
|
11
|
+
/** The id the schedule gives the workflow it starts (suffixed by the server with its time). */
|
|
12
|
+
export declare const ID_DE_LA_NUIT_PLANIFIEE = "grillhouse-nuit-planifiee";
|
|
13
|
+
/** The id of the one schedule of the machine. */
|
|
14
|
+
export declare const ID_DE_LA_PLANIFICATION = "grillhouse-nuits";
|
|
15
|
+
/** The window within which a firing missed (the machine off) is taken at the server's return. */
|
|
16
|
+
export declare const RATTRAPAGE = "24 hours";
|
|
17
|
+
/**
|
|
18
|
+
* The signal that asks for nights: `{ projet }` the night of that project, its marker unread (a
|
|
19
|
+
* request by hand); `{ planifiee: true }` the nights of the projects of the register that moved
|
|
20
|
+
* since their last green night (the schedule).
|
|
21
|
+
*/
|
|
22
|
+
export declare const DEMANDER = "demander";
|
|
23
|
+
/** The query of the nights: the project under way, those that wait, those played, skipped, left out. */
|
|
24
|
+
export declare const L_ETAT_DES_NUITS = "etatDesNuits";
|
|
25
|
+
/** A request of nights. */
|
|
26
|
+
export type DemandeDeNuit = {
|
|
27
|
+
projet: string;
|
|
28
|
+
} | {
|
|
29
|
+
planifiee: true;
|
|
30
|
+
};
|
|
31
|
+
/** A project skipped: its top equals the commit of its last green night. */
|
|
32
|
+
export interface Saut {
|
|
33
|
+
racine: string;
|
|
34
|
+
raison: string;
|
|
35
|
+
/** HEAD of its main tree. */
|
|
36
|
+
sommet: string;
|
|
37
|
+
/** The commit of its last green night. */
|
|
38
|
+
reference: string;
|
|
39
|
+
}
|
|
40
|
+
/** A project of the register left out of the night, and why (its root gone, no night wired). */
|
|
41
|
+
interface Ecart {
|
|
42
|
+
racine: string;
|
|
43
|
+
raison: string;
|
|
44
|
+
}
|
|
45
|
+
/** The choice of a scheduled night: the projects that play, in their order, those skipped, those left out. */
|
|
46
|
+
export interface ChoixDesNuits {
|
|
47
|
+
jouer: string[];
|
|
48
|
+
sautes: Saut[];
|
|
49
|
+
ecartes: Ecart[];
|
|
50
|
+
}
|
|
51
|
+
/** A night played: its project and the exit code of its pass (`grillhouse nuit`), or its failure. */
|
|
52
|
+
interface NuitJouee {
|
|
53
|
+
racine: string;
|
|
54
|
+
/** 0 green, 75 to play again, any other red; null when the activity failed. */
|
|
55
|
+
code: number | null;
|
|
56
|
+
/** The failure of the activity, by its message; null when the pass ran. */
|
|
57
|
+
echec: string | null;
|
|
58
|
+
}
|
|
59
|
+
/** The nights as the query gives them. */
|
|
60
|
+
export interface VueDesNuits {
|
|
61
|
+
enCours: string | null;
|
|
62
|
+
attente: string[];
|
|
63
|
+
jouees: NuitJouee[];
|
|
64
|
+
sautes: Saut[];
|
|
65
|
+
ecartes: Ecart[];
|
|
66
|
+
}
|
|
67
|
+
/** What the workflow of the nights receives: nothing, or the state of a Continue-As-New. */
|
|
68
|
+
export interface EntreeDesNuits {
|
|
69
|
+
/** The length of history past which the workflow continues as new; 2000 by default. */
|
|
70
|
+
limiteDHistoire?: number;
|
|
71
|
+
etat?: {
|
|
72
|
+
attente: string[];
|
|
73
|
+
planifiees: number;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface ActivitesDesNuits {
|
|
77
|
+
/**
|
|
78
|
+
* The projects of the register of the machine (`~/.claude/grillhouse/registre.jsonl`), each
|
|
79
|
+
* judged (./choix.ts): left out (its root gone, no night wired), skipped (its top at its last
|
|
80
|
+
* green night), or played, in the order of their paths.
|
|
81
|
+
*/
|
|
82
|
+
choisirLesNuits(): Promise<ChoixDesNuits>;
|
|
83
|
+
/**
|
|
84
|
+
* The reason of a skip written in the journal of the night of its project
|
|
85
|
+
* (`<git common dir>/nuit/<date>.log`) and in the register of the machine, once per top and day.
|
|
86
|
+
*/
|
|
87
|
+
noterLeSaut(saut: Saut): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* The pass of the night of the project at <racine> (`node_modules/.bin/grillhouse nuit`, which
|
|
90
|
+
* runs scripts/nuit.sh), in its main tree, in a process group of its own: its exit code.
|
|
91
|
+
*/
|
|
92
|
+
jouerLaNuit(e: {
|
|
93
|
+
racine: string;
|
|
94
|
+
}): Promise<number>;
|
|
95
|
+
/** The scheduled nights asked of the workflow of the nights, started when none runs. */
|
|
96
|
+
demanderLesNuitsPlanifiees(): Promise<void>;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// The contract of the nights of the machine (grillhouse-4nr.13, decision D6): the one schedule of
|
|
2
|
+
// the machine, the workflow it starts at each firing, the one workflow that plays the nights one
|
|
3
|
+
// after the other, their signal and query by their names, their ids, what they receive and give
|
|
4
|
+
// back, and the activities they call (./activites.ts). The workflows, their activities and their
|
|
5
|
+
// client share it without importing each other.
|
|
6
|
+
/** The workflow's type that plays the nights of the machine, one project after the other. */
|
|
7
|
+
export const NUITS = 'nuitsDeLaMachine';
|
|
8
|
+
/** The id of the one workflow of the nights of the machine. */
|
|
9
|
+
export const ID_DES_NUITS = 'grillhouse-nuits-de-la-machine';
|
|
10
|
+
/**
|
|
11
|
+
* The workflow's type that the schedule starts at each firing: it asks the workflow of the nights
|
|
12
|
+
* for the nights of the projects that moved, and ends. A schedule suffixes the id of the workflow
|
|
13
|
+
* it starts with the time of its firing; the workflow of the nights keeps its fixed id so.
|
|
14
|
+
*/
|
|
15
|
+
export const NUIT_PLANIFIEE = 'nuitPlanifiee';
|
|
16
|
+
/** The id the schedule gives the workflow it starts (suffixed by the server with its time). */
|
|
17
|
+
export const ID_DE_LA_NUIT_PLANIFIEE = 'grillhouse-nuit-planifiee';
|
|
18
|
+
/** The id of the one schedule of the machine. */
|
|
19
|
+
export const ID_DE_LA_PLANIFICATION = 'grillhouse-nuits';
|
|
20
|
+
/** The window within which a firing missed (the machine off) is taken at the server's return. */
|
|
21
|
+
export const RATTRAPAGE = '24 hours';
|
|
22
|
+
/**
|
|
23
|
+
* The signal that asks for nights: `{ projet }` the night of that project, its marker unread (a
|
|
24
|
+
* request by hand); `{ planifiee: true }` the nights of the projects of the register that moved
|
|
25
|
+
* since their last green night (the schedule).
|
|
26
|
+
*/
|
|
27
|
+
export const DEMANDER = 'demander';
|
|
28
|
+
/** The query of the nights: the project under way, those that wait, those played, skipped, left out. */
|
|
29
|
+
export const L_ETAT_DES_NUITS = 'etatDesNuits';
|
|
30
|
+
//# sourceMappingURL=contrat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrat.js","sourceRoot":"","sources":["../../../src/temporal/nuits/contrat.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,iGAAiG;AACjG,gGAAgG;AAChG,iGAAiG;AACjG,gDAAgD;AAEhD,6FAA6F;AAC7F,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC;AACxC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,YAAY,GAAG,gCAAgC,CAAC;AAC7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;AAC9C,+FAA+F;AAC/F,MAAM,CAAC,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AACnE,iDAAiD;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AACzD,iGAAiG;AACjG,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;AACrC;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,wGAAwG;AACxG,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type EntreeDesNuits, type VueDesNuits } from './contrat.js';
|
|
2
|
+
/** The nights of the machine, one project after the other, until the queue is empty. */
|
|
3
|
+
export declare function nuitsDeLaMachine(entree?: EntreeDesNuits): Promise<VueDesNuits>;
|
|
4
|
+
/** The workflow the schedule starts: it asks for the scheduled nights, and ends. */
|
|
5
|
+
export declare function nuitPlanifiee(): Promise<void>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// The nights of the machine (grillhouse-4nr.13, decision D6), as a Temporal schedule replaces the
|
|
2
|
+
// lines of a table of tasks: one schedule (`ID_DE_LA_PLANIFICATION`) starts `nuitPlanifiee` at the
|
|
3
|
+
// start of the night, which asks the one workflow of the nights (`nuitsDeLaMachine`,
|
|
4
|
+
// `ID_DES_NUITS`) for the scheduled nights and ends; a request by hand (`npx grillhouse nuit
|
|
5
|
+
// <projet>`) asks the same workflow, started when none runs. So two nights never run at once.
|
|
6
|
+
//
|
|
7
|
+
// - A scheduled request chooses the projects of the register (`choisirLesNuits`): each project
|
|
8
|
+
// left out or skipped keeps its reason (a skip noted in the journal of its night and in the
|
|
9
|
+
// register, `noterLeSaut`), each project that moved enters the queue.
|
|
10
|
+
// - A request by hand puts its project in the queue, its marker unread.
|
|
11
|
+
// - A project already in the queue or under way is not put in twice.
|
|
12
|
+
// - The nights play one after the other, each starting at the end of the one before, whatever its
|
|
13
|
+
// verdict: a red night, or an activity that fails, never stops those after it.
|
|
14
|
+
// - Once the queue is empty and no request waits, the workflow ends; the next request starts it
|
|
15
|
+
// again. Past its length of history it continues as new with its queue.
|
|
16
|
+
// Deterministic: it imports the workflow API and the contract.
|
|
17
|
+
import { allHandlersFinished, condition, continueAsNew, defineQuery, defineSignal, proxyActivities, setHandler, workflowInfo, } from '@temporalio/workflow';
|
|
18
|
+
import { DEMANDER, L_ETAT_DES_NUITS, } from './contrat.js';
|
|
19
|
+
const actes = proxyActivities({
|
|
20
|
+
startToCloseTimeout: '5 minutes',
|
|
21
|
+
retry: { initialInterval: '1 second', maximumAttempts: 4 },
|
|
22
|
+
});
|
|
23
|
+
// A night lasts hours; its heartbeat says it lives. Played again once after its worker died: the
|
|
24
|
+
// attempt ends the group the dead one left before it plays.
|
|
25
|
+
const { jouerLaNuit } = proxyActivities({
|
|
26
|
+
startToCloseTimeout: '12 hours',
|
|
27
|
+
heartbeatTimeout: '5 minutes',
|
|
28
|
+
retry: { maximumAttempts: 2 },
|
|
29
|
+
});
|
|
30
|
+
const demander = defineSignal(DEMANDER);
|
|
31
|
+
const lEtat = defineQuery(L_ETAT_DES_NUITS);
|
|
32
|
+
const LIMITE_D_HISTOIRE = 2000;
|
|
33
|
+
/** The nights of the machine, one project after the other, until the queue is empty. */
|
|
34
|
+
export async function nuitsDeLaMachine(entree = {}) {
|
|
35
|
+
const vue = {
|
|
36
|
+
enCours: null,
|
|
37
|
+
attente: [...(entree.etat?.attente ?? [])],
|
|
38
|
+
jouees: [],
|
|
39
|
+
sautes: [],
|
|
40
|
+
ecartes: [],
|
|
41
|
+
};
|
|
42
|
+
let planifiees = entree.etat?.planifiees ?? 0;
|
|
43
|
+
const inscrire = (racine) => {
|
|
44
|
+
if (vue.enCours !== racine && !vue.attente.includes(racine)) {
|
|
45
|
+
vue.attente.push(racine);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
setHandler(demander, d => {
|
|
49
|
+
if ('projet' in d) {
|
|
50
|
+
inscrire(d.projet);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
planifiees += 1;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
setHandler(lEtat, () => vue);
|
|
57
|
+
const limite = entree.limiteDHistoire ?? LIMITE_D_HISTOIRE;
|
|
58
|
+
for (;;) {
|
|
59
|
+
if (planifiees > 0) {
|
|
60
|
+
planifiees = 0;
|
|
61
|
+
const choix = await actes.choisirLesNuits();
|
|
62
|
+
for (const saut of choix.sautes) {
|
|
63
|
+
await actes.noterLeSaut(saut);
|
|
64
|
+
}
|
|
65
|
+
vue.sautes.push(...choix.sautes);
|
|
66
|
+
vue.ecartes.push(...choix.ecartes);
|
|
67
|
+
choix.jouer.forEach(inscrire);
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const racine = vue.attente.shift();
|
|
71
|
+
if (racine === undefined) {
|
|
72
|
+
// A request that arrives while the handlers finish is read before the end.
|
|
73
|
+
await condition(allHandlersFinished);
|
|
74
|
+
if (planifiees > 0 || vue.attente.length > 0) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
return vue;
|
|
78
|
+
}
|
|
79
|
+
vue.enCours = racine;
|
|
80
|
+
try {
|
|
81
|
+
vue.jouees.push({ racine, code: await jouerLaNuit({ racine }), echec: null });
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
vue.jouees.push({ racine, code: null, echec: e instanceof Error ? e.message : String(e) });
|
|
85
|
+
}
|
|
86
|
+
vue.enCours = null;
|
|
87
|
+
if (workflowInfo().continueAsNewSuggested || workflowInfo().historyLength >= limite) {
|
|
88
|
+
await condition(allHandlersFinished);
|
|
89
|
+
await continueAsNew({
|
|
90
|
+
...entree,
|
|
91
|
+
etat: { attente: vue.attente, planifiees },
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** The workflow the schedule starts: it asks for the scheduled nights, and ends. */
|
|
97
|
+
export async function nuitPlanifiee() {
|
|
98
|
+
await actes.demanderLesNuitsPlanifiees();
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=deroule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deroule.js","sourceRoot":"","sources":["../../../src/temporal/nuits/deroule.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,mGAAmG;AACnG,qFAAqF;AACrF,6FAA6F;AAC7F,8FAA8F;AAC9F,EAAE;AACF,+FAA+F;AAC/F,8FAA8F;AAC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./deroules.ts: the sonde, the places of the machine, the circuit of a ticket, the queue of a
|
|
9
|
-
// project and the CI of a commit, the queue of the tickets of a project
|
|
9
|
+
// project and the CI of a commit, the queue of the tickets of a project, the nights of the
|
|
10
|
+
// machine) and serves them
|
|
10
11
|
// with their activities on the task queue <file>. It writes `prêt <file>` on its standard output once it polls.
|
|
11
12
|
// - SIGINT and SIGTERM stop it cleanly, as the SDK's runtime has it: its running activities are
|
|
12
13
|
// cancelled, then it exits 0. Killed, the server gives its work to the next worker of the queue.
|
|
@@ -19,6 +20,7 @@ import * as activitesDeLaFile from './file/activites.js';
|
|
|
19
20
|
import * as activitesDesPlaces from './places/activites.js';
|
|
20
21
|
import * as activitesDesTickets from './tickets/activites.js';
|
|
21
22
|
import * as activitesDeLaSonde from './sonde/activites.js';
|
|
23
|
+
import { activitesDesNuits } from './nuits/activites.js';
|
|
22
24
|
const DEROULES = fileURLToPath(new URL('./deroules.js', import.meta.url));
|
|
23
25
|
// The task queue that the arguments <args> name (`--file <file>`), or null.
|
|
24
26
|
function fileDesArguments(args) {
|
|
@@ -45,6 +47,7 @@ async function principal(args) {
|
|
|
45
47
|
...activitesDuCircuit,
|
|
46
48
|
...activitesDeLaFile,
|
|
47
49
|
...activitesDesTickets,
|
|
50
|
+
...activitesDesNuits,
|
|
48
51
|
},
|
|
49
52
|
// A heartbeat reaches the server within the second: the last sign of life of a session
|
|
50
53
|
// survives a worker that dies, and a cancellation reaches its activity at once.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"travailleur.js","sourceRoot":"","sources":["../../src/temporal/travailleur.ts"],"names":[],"mappings":";AACA,kGAAkG;AAClG,2CAA2C;AAC3C,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,oGAAoG;AACpG,wHAAwH;AACxH,
|
|
1
|
+
{"version":3,"file":"travailleur.js","sourceRoot":"","sources":["../../src/temporal/travailleur.ts"],"names":[],"mappings":";AACA,kGAAkG;AAClG,2CAA2C;AAC3C,EAAE;AAC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