@ogygie/cli 0.3.0 → 0.4.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/dist/cli.js +34 -3
- package/package.json +2 -2
- package/templates/project/AGENTS.md +8 -0
package/dist/cli.js
CHANGED
|
@@ -14667,7 +14667,20 @@ var OgygieManifestSchema = external_exports.object({
|
|
|
14667
14667
|
name: external_exports.string(),
|
|
14668
14668
|
path: external_exports.string(),
|
|
14669
14669
|
type: external_exports.enum(["api", "front", "gateway"]),
|
|
14670
|
-
entryPoint: external_exports.string()
|
|
14670
|
+
entryPoint: external_exports.string(),
|
|
14671
|
+
/**
|
|
14672
|
+
* Code the product HOSTS without maintaining it — imported as-is from
|
|
14673
|
+
* elsewhere, the framework's own dev tooling being the typical case.
|
|
14674
|
+
* A vendored app is skipped by the vocabulary gate: a product's business
|
|
14675
|
+
* vocabulary has no claim over code it will never rename.
|
|
14676
|
+
*
|
|
14677
|
+
* A literal `true`, like `shared` on a table: an app is either vendored
|
|
14678
|
+
* (and says so) or the product's own (and stays silent) — no third
|
|
14679
|
+
* state. The derogation is declared here, machine-readably, and the gate
|
|
14680
|
+
* ANNOUNCES it on every run — one that stops being visible is one that
|
|
14681
|
+
* gets forgotten.
|
|
14682
|
+
*/
|
|
14683
|
+
vendored: external_exports.literal(true).optional()
|
|
14671
14684
|
})
|
|
14672
14685
|
),
|
|
14673
14686
|
features: external_exports.array(FeatureManifestSchema),
|
|
@@ -15279,13 +15292,22 @@ function collectCodeFiles(projectRoot, folder) {
|
|
|
15279
15292
|
}
|
|
15280
15293
|
function productCodeFoldersOf(manifest) {
|
|
15281
15294
|
return [
|
|
15282
|
-
...manifest.apps.map((app) => app.path),
|
|
15295
|
+
...manifest.apps.filter((app) => app.vendored !== true).map((app) => app.path),
|
|
15283
15296
|
...(manifest.framework?.packages ?? []).map((packageEntry) => packageEntry.path)
|
|
15284
15297
|
];
|
|
15285
15298
|
}
|
|
15299
|
+
function vendoredAppsOf(manifest) {
|
|
15300
|
+
return manifest.apps.filter((app) => app.vendored === true).map((app) => ({ name: app.name, path: app.path }));
|
|
15301
|
+
}
|
|
15286
15302
|
function verifyVocabulary(deps) {
|
|
15287
15303
|
const manifest = readManifest(deps.projectRoot);
|
|
15288
15304
|
if (manifest.vocabulary === void 0) return [];
|
|
15305
|
+
const vendored = vendoredAppsOf(manifest);
|
|
15306
|
+
if (vendored.length > 0 && deps.log !== void 0) {
|
|
15307
|
+
deps.log(
|
|
15308
|
+
`${vendored.length} app(s) hors du scan (vendored \u2014 code h\xE9berg\xE9, non maintenu par le produit) : ${vendored.map((app) => `${app.name} (${app.path})`).join(", ")}`
|
|
15309
|
+
);
|
|
15310
|
+
}
|
|
15289
15311
|
const sourceFiles = productCodeFoldersOf(manifest).flatMap(
|
|
15290
15312
|
(folder) => collectCodeFiles(deps.projectRoot, folder)
|
|
15291
15313
|
);
|
|
@@ -15333,6 +15355,12 @@ var governedChecksumsByVersion = {
|
|
|
15333
15355
|
"AGENTS.md": "ca73ab619d8c55fac11858d815bf5fbab6537ecebe7ae4123cbdeb3e3e36bf1a",
|
|
15334
15356
|
"CLAUDE.md": "785ee8d90e368806d8cf0b4d84a15f29d1dc961168bda86cf1a6c60a923c8c9b",
|
|
15335
15357
|
"tsconfig.base.json": "0f8919e9ed8bbc88e0308fa2fa91471dabb18d1df721bd78c04076597eba89a2"
|
|
15358
|
+
},
|
|
15359
|
+
"0.4.0": {
|
|
15360
|
+
".github/workflows/ogygie-gates.yml": "48c40efe9fe66dd0f9c3b94287026d80eae9afd6782b5833fdf8846d8662babf",
|
|
15361
|
+
"AGENTS.md": "c7d51a0cd97b67343b486bdb7c54914da68d96409eaa985959d2a525c65549fd",
|
|
15362
|
+
"CLAUDE.md": "785ee8d90e368806d8cf0b4d84a15f29d1dc961168bda86cf1a6c60a923c8c9b",
|
|
15363
|
+
"tsconfig.base.json": "0f8919e9ed8bbc88e0308fa2fa91471dabb18d1df721bd78c04076597eba89a2"
|
|
15336
15364
|
}
|
|
15337
15365
|
};
|
|
15338
15366
|
|
|
@@ -15419,7 +15447,10 @@ ogygie check \u2014 ${problems.length} probl\xE8me(s).`);
|
|
|
15419
15447
|
`ogygie check \u2014 OK, lockstep ${cliVersion()} et fichiers gouvern\xE9s intacts.`
|
|
15420
15448
|
);
|
|
15421
15449
|
} else if (command === "verify-vocabulary") {
|
|
15422
|
-
const problems = verifyVocabulary({
|
|
15450
|
+
const problems = verifyVocabulary({
|
|
15451
|
+
projectRoot: process.cwd(),
|
|
15452
|
+
log: (line) => console.log(line)
|
|
15453
|
+
});
|
|
15423
15454
|
if (problems.length > 0) {
|
|
15424
15455
|
for (const problem of problems) printError(problem);
|
|
15425
15456
|
console.error(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogygie/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Ogygie framework CLI: deterministic scaffolding (init), governed-file upgrades (upgrade) and lockstep verification (check) for Ogygie products.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"tsx": "^4.20.0",
|
|
23
23
|
"typescript": "^5.8.0",
|
|
24
24
|
"zod": "^4.0.0",
|
|
25
|
-
"@ogygie/core": "0.
|
|
25
|
+
"@ogygie/core": "0.4.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"typecheck": "tsc -p tsconfig.json",
|
|
@@ -272,6 +272,14 @@ se fait PAR RACINE, donc une racine trop courte attrape des mots génériques
|
|
|
272
272
|
(déclarer `memo` interdit fait tomber `memory`, `createInMemoryDb`…). Une racine
|
|
273
273
|
se déclare assez longue pour ne nommer que le concept.
|
|
274
274
|
|
|
275
|
+
**Le code que le produit héberge sans le maintenir** — l'outil de dev du
|
|
276
|
+
framework propagé dans le dépôt en est le cas type — se déclare
|
|
277
|
+
`"vendored": true` sur son entrée d'`apps[]`, et sort du scan : un vocabulaire
|
|
278
|
+
métier n'a pas de prise sur du code que le produit ne renommera jamais. La
|
|
279
|
+
dérogation se déclare au manifeste, comme celle d'une table partagée, et le
|
|
280
|
+
gate l'ANNONCE à chaque exécution — une dérogation qu'on ne voit plus est une
|
|
281
|
+
dérogation qui s'oublie. Elle ne couvre JAMAIS le code du produit lui-même.
|
|
282
|
+
|
|
275
283
|
## Front (apps/web) — règles et templates canoniques
|
|
276
284
|
|
|
277
285
|
### Stack imposée (toute autre lib = amendement DECISIONS.md d'abord)
|