@ogygie/generate 0.34.0 → 0.34.1

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.
@@ -11851,9 +11851,23 @@ async function fillLogicHoles(project, featureId, argv, out, deps) {
11851
11851
  }
11852
11852
  });
11853
11853
  const summary = await fillFeature(inputs, fillDeps, wiring.options);
11854
+ for (const path of refreshHoleDocs(project.root, folder, plan, loadHolesLibrary(wiring.libraryDir))) out.log(` r\xE9\xE9crite ${path}`);
11854
11855
  report(wiring, summary, { unit: "trou", human: "HUMAIN (todo)" });
11855
11856
  return summary.unfilled === 0 ? 0 : 1;
11856
11857
  }
11858
+ function refreshHoleDocs(projectRoot, folder, plan, library) {
11859
+ const changed = [];
11860
+ for (const hole of plan.holes) {
11861
+ const relativePath = `${folder}/holes/${hole.id}.gen.md`;
11862
+ const path = join6(projectRoot, relativePath);
11863
+ const content = emitHoleDoc(plan, hole, library);
11864
+ if (existsSync5(path) && readFileSync6(path, "utf8") === content) continue;
11865
+ mkdirSync3(join6(projectRoot, folder, "holes"), { recursive: true });
11866
+ writeFileSync3(path, content, "utf8");
11867
+ changed.push(relativePath);
11868
+ }
11869
+ return changed;
11870
+ }
11857
11871
  function viewContextOf(projectRoot, plan, view) {
11858
11872
  const docPath = join6(projectRoot, plan.folder, "holes", `${view.hole.id}.gen.md`);
11859
11873
  const doc = existsSync5(docPath) ? readFileSync6(docPath, "utf8") : `# ${view.hole.id}`;
@@ -1,3 +1,4 @@
1
+ import { type FeaturePlan } from "../emit/plan.js";
1
2
  import type { CustomViewPlan, ScreenPlan } from "../emit/screen-plan.js";
2
3
  import { type HoleLibraryEntry } from "../hole-shape.js";
3
4
  import { type FillOptions } from "../fill/fill.js";
@@ -46,6 +47,8 @@ export interface FillCommandDeps {
46
47
  }
47
48
  /** An entry recorded in the library: a new file, or the provenance of an existing one extended. */
48
49
  export declare function recordLibraryEntry(libraryDir: string, entry: HoleLibraryEntry): "created" | "extended" | "unchanged";
50
+ /** Re-emits the `holes/<id>.gen.md` of a feature against the library as it stands; answers the repo-relative paths it changed. */
51
+ export declare function refreshHoleDocs(projectRoot: string, folder: string, plan: FeaturePlan, library: readonly HoleLibraryEntry[]): string[];
49
52
  /** The context a view candidate is drawn on: the view's hole doc, then the product's pattern catalogue when the repo keeps one (D53). */
50
53
  export declare function viewContextOf(projectRoot: string, plan: ScreenPlan, view: CustomViewPlan): string;
51
54
  export declare function runFillCommand(project: GenerateProject, featureId: string | undefined, argv: readonly string[], out: CommandOutput, deps?: FillCommandDeps): Promise<number>;
package/dist/cli/run.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  throwOgygieError,
38
38
  verifyGeneration,
39
39
  writeExtensionRegistries
40
- } from "../chunk-UTS27UEI.js";
40
+ } from "../chunk-VPJEACPK.js";
41
41
 
42
42
  // src/cli/check-command.ts
43
43
  import { existsSync, readFileSync, readdirSync } from "node:fs";
package/dist/index.js CHANGED
@@ -193,7 +193,7 @@ import {
193
193
  viewCandidateTextOf,
194
194
  viewExampleTestName,
195
195
  vocabularyOf
196
- } from "./chunk-UTS27UEI.js";
196
+ } from "./chunk-VPJEACPK.js";
197
197
 
198
198
  // src/prompt-card.ts
199
199
  var phrase = (caseKey) => caseKey.replace(/^with:/u, "avec ").replace(/^without:/u, "sans ");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogygie/generate",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "Ogygie generator: reads the `# Génération` block of a spec and its schemas.ts, derives everything deterministic without a model (routes, pipeline, database, factories, tests, screens, previews), fills the typed holes of logic.ts by library, draw and escalation, and draws the first schemas.ts of a new feature — judged by the gates. Sixth package of the lockstep (D55).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@ogygie/core": "0.34.0",
32
+ "@ogygie/core": "0.34.1",
33
33
  "tsx": "^4.20.0",
34
34
  "yaml": "^2.9.0",
35
35
  "zod": "^4.0.0"
@@ -38,7 +38,7 @@
38
38
  "@lingui/babel-plugin-lingui-macro": "^5.9.5",
39
39
  "@lingui/core": "^5.9.5",
40
40
  "@lingui/react": "^5.9.5",
41
- "@ogygie/ui": "0.34.0",
41
+ "@ogygie/ui": "0.34.1",
42
42
  "@starter/api": "0.1.0",
43
43
  "@tanstack/react-query": "^5.102.2",
44
44
  "@tanstack/react-router": "^1.170.32",