@beehexa/hexasync-template-report-render 2608.15.1 → 2608.20.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beehexa/hexasync-template-report-render",
3
- "version": "2608.15.1",
3
+ "version": "2608.20.18",
4
4
  "description": "Markdown and HTML renderers for the report models.",
5
5
  "license": "SEE LICENSE IN ../../LICENSE",
6
6
  "type": "module",
@@ -20,11 +20,11 @@
20
20
  "build": "tsc -p tsconfig.build.json"
21
21
  },
22
22
  "dependencies": {
23
- "@beehexa/hexasync-template-compose": "2608.15.1",
24
- "@beehexa/hexasync-template-frontend-flow": "2608.15.1",
25
- "@beehexa/hexasync-template-report-model": "2608.15.1",
26
- "@beehexa/hexasync-template-validate": "2608.15.1",
27
- "@beehexa/hexasync-template-worker-flow": "2608.15.1"
23
+ "@beehexa/hexasync-template-compose": "2608.20.18",
24
+ "@beehexa/hexasync-template-frontend-flow": "2608.20.18",
25
+ "@beehexa/hexasync-template-report-model": "2608.20.18",
26
+ "@beehexa/hexasync-template-validate": "2608.20.18",
27
+ "@beehexa/hexasync-template-worker-flow": "2608.20.18"
28
28
  },
29
29
  "hexasync": {
30
30
  "layer": "adapter"
@@ -1,12 +0,0 @@
1
- /** A run of diff lines: either shown as-is, or a collapsible run of unchanged context. */
2
- export interface DiffSegment {
3
- collapsed: boolean;
4
- lines: string[];
5
- }
6
- /**
7
- * Split a unified diff (lines prefixed ' '/'- '/'+ ') into segments, keeping
8
- * `context` unchanged lines around every change and collapsing longer unchanged
9
- * runs so a caller can render them behind an expandable ellipsis.
10
- */
11
- export declare function collapseDiff(diffText: string, context?: number): DiffSegment[];
12
- //# sourceMappingURL=diffCollapse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diffCollapse.d.ts","sourceRoot":"","sources":["../src/diffCollapse.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,WAAW,EAAE,CAuBzE"}
@@ -1,31 +0,0 @@
1
- /**
2
- * Split a unified diff (lines prefixed ' '/'- '/'+ ') into segments, keeping
3
- * `context` unchanged lines around every change and collapsing longer unchanged
4
- * runs so a caller can render them behind an expandable ellipsis.
5
- */
6
- export function collapseDiff(diffText, context = 2) {
7
- const lines = diffText.split('\n');
8
- const isChange = (l) => !!l && (l.startsWith('+ ') || l.startsWith('- '));
9
- const keep = lines.map((l, i) => {
10
- if (isChange(l))
11
- return true;
12
- for (let d = 1; d <= context; d++) {
13
- if (isChange(lines[i - d]) || isChange(lines[i + d]))
14
- return true;
15
- }
16
- return false;
17
- });
18
- const segments = [];
19
- let i = 0;
20
- while (i < lines.length) {
21
- const k = keep[i];
22
- const start = i;
23
- while (i < lines.length && keep[i] === k)
24
- i++;
25
- const run = lines.slice(start, i);
26
- // Collapse only unchanged runs long enough to be worth hiding.
27
- segments.push({ collapsed: !k && run.length > context, lines: run });
28
- }
29
- return segments;
30
- }
31
- //# sourceMappingURL=diffCollapse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diffCollapse.js","sourceRoot":"","sources":["../src/diffCollapse.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,OAAO,GAAG,CAAC;IACxD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,QAAQ,GAAG,CAAC,CAAqB,EAAE,EAAE,CACzC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC9B,IAAI,QAAQ,CAAC,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;QACpE,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACxB,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,KAAK,GAAG,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;YAAE,CAAC,EAAE,CAAC;QAC9C,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAClC,+DAA+D;QAC/D,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,82 +0,0 @@
1
- import { ComponentFlow, FlowStep } from '@beehexa/hexasync-template-report-model';
2
- /**
3
- * Build a Mermaid `flowchart LR` for a puller/pusher's step phases, mirroring the
4
- * conventions dashboard-v2 uses in its Sync Logs → Flow tab:
5
- * - one subgraph per non-empty phase (`beforePullSteps`, `pullSteps`, …),
6
- * - one rectangle node per step (label = step `name` falling back to `key`),
7
- * - edges driven by each step's `next` (string key, `{if,then,else}` object, or
8
- * a Scriban expression referencing quoted step keys),
9
- * - phases chained entry-to-entry so the overall order reads left-to-right.
10
- * Pure string formatting — no I/O.
11
- */
12
- /** Step keys quoted inside a Scriban/expression string (e.g. `"SAVE_ORDER"`). */
13
- /**
14
- * The step keys a routing EXPRESSION can name — every quoted identifier in it.
15
- *
16
- * Exported (2026-08-07) so the VS Code extension's diagram resolves a route leaf exactly as this chart and
17
- * the FLOW-6 rule do. It previously had no way to, and the module header already records what happens when
18
- * two views each grow their own idea of routing: both were wrong about `data`-branching IF steps, differently.
19
- */
20
- export declare function quotedKeys(expr: string): string[];
21
- /** Whether a route value is an expression rather than a step key. Exported with `quotedKeys`, and for the
22
- * same reason. */
23
- export declare function looksLikeExpression(s: string): boolean;
24
- /**
25
- * Render a creation-workflow (`creationSteps`) as a `flowchart TD` Mermaid string,
26
- * mirroring control-center's connector-workflow generator: a START stadium into the
27
- * `root` step(s); rectangles for normal steps and rhombi for decisions (`type: IF`/
28
- * `SWITCH` or an object `next`); edges from linear `next` (string), IF `then`/`else`
29
- * (YES/NO), SWITCH `cases`/`default`, object `next` `then`/`else` (aka `success`/
30
- * `failed`), and `onCancelled` (Cancel); a shared END stadium for terminal steps.
31
- */
32
- /** One resolved route out of a step. */
33
- export interface FlowEdge {
34
- readonly from: string;
35
- /** The target step key, or undefined when the target names no step in this phase. */
36
- readonly to?: string;
37
- /** `YES` / `NO` for a conditional, the branch key for a SWITCH, `onError`, else undefined. */
38
- readonly label?: string;
39
- /** The raw value the route was written as, for a reader who needs to see the expression. */
40
- readonly raw?: string;
41
- }
42
- /**
43
- * Every route out of every step, as DATA — the same resolution the mermaid builder draws.
44
- *
45
- * Exported so a second renderer cannot grow a second idea of what routes where. That is not hypothetical: the
46
- * chart and the FLOW-6 rule each had their own, and both were wrong about `data`-branching IF steps in
47
- * different ways. One definition, two consumers.
48
- *
49
- * The semantics are the runtime's (`core.api/hexasync.steps/Execution/NextStepBuilder.cs`):
50
- *
51
- * * a **string** is a step key, or a scriban expression that renders to one — for a static view, every
52
- * quoted key inside the expression that names a real step is a possible route;
53
- * * an **object** `{ if, then, else }` is a branch, and `then`/`else` are themselves routes;
54
- * * for a step whose type is `IF`, its **`data`** is that object — `IfStepExecutor` passes `StepData` to the
55
- * builder — and for a `SWITCH`, `data`'s keys are the branches;
56
- * * an empty or absent route is the end of the flow, and yields no edge.
57
- */
58
- export declare function flowEdges(steps: readonly FlowStep[]): readonly FlowEdge[];
59
- /**
60
- * The report's chart, drawn by the SHARED flow models (Story 4.6, AC-1).
61
- *
62
- * ⛔ This file used to draw it — `buildPhase`, `buildCreationMermaid`, `mermaidId`, `escapeLabel`, the phase-chaining
63
- * loop, ~310 lines. That was the third of three implementations answering *"what is this component's flow?"*, and this
64
- * epic exists because the three disagreed. The editor swapped in Story 4.5; this is the report.
65
- *
66
- * The evidence that it mattered is this file's own history: `escapeLabel` had to be fixed for `<` and `&` in Story 4.4's
67
- * review **separately** from the identical fix in the flow packages, because the golden suite — the one named "holds the
68
- * consumers to one answer" — renders through those packages and could not see this emitter. One emitter cannot drift
69
- * from itself.
70
- *
71
- * Direction is preserved PER RUNTIME, exactly as shipped: `LR` for a puller/pusher, the shared default `TD` for a
72
- * creation workflow. The retired emitter drew them that way — its own docblock said *"a `flowchart TD`"* of
73
- * `creationSteps` — and the report's stylesheet gives the puller/pusher chart a horizontally scrolling box that a
74
- * creation workflow's tall branch tree does not want. Direction is a presentation choice the renderer already takes as
75
- * an argument, which is what separates a styling option from a second geometry; unifying the two would have been a
76
- * visible change to the shipped report that no AC asks for.
77
- *
78
- * A flow with no `source` renders the empty node rather than a legacy chart: there is no second emitter left to fall
79
- * back to, and drawing a diagram from the `phases` projection is exactly what this change removes.
80
- */
81
- export declare function buildMermaid(flow: ComponentFlow): string;
82
- //# sourceMappingURL=flowChart.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowChart.d.ts","sourceRoot":"","sources":["../src/flowChart.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,QAAQ,EACT,MAAM,yCAAyC,CAAC;AAWjD;;;;;;;;;GASG;AAEH,iFAAiF;AACjF;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAMjD;AAED;mBACmB;AACnB,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;;;GAOG;AACH,wCAAwC;AACxC,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,8FAA8F;IAC9F,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,4FAA4F;IAC5F,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,SAAS,QAAQ,EAAE,CAqGzE;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CA6DxD"}
package/dist/flowChart.js DELETED
@@ -1,250 +0,0 @@
1
- import { workerFlow, renderMermaid as renderWorkerMermaid, } from '@beehexa/hexasync-template-worker-flow';
2
- import { frontendFlow, renderMermaid as renderFrontendMermaid, } from '@beehexa/hexasync-template-frontend-flow';
3
- /**
4
- * Build a Mermaid `flowchart LR` for a puller/pusher's step phases, mirroring the
5
- * conventions dashboard-v2 uses in its Sync Logs → Flow tab:
6
- * - one subgraph per non-empty phase (`beforePullSteps`, `pullSteps`, …),
7
- * - one rectangle node per step (label = step `name` falling back to `key`),
8
- * - edges driven by each step's `next` (string key, `{if,then,else}` object, or
9
- * a Scriban expression referencing quoted step keys),
10
- * - phases chained entry-to-entry so the overall order reads left-to-right.
11
- * Pure string formatting — no I/O.
12
- */
13
- /** Step keys quoted inside a Scriban/expression string (e.g. `"SAVE_ORDER"`). */
14
- /**
15
- * The step keys a routing EXPRESSION can name — every quoted identifier in it.
16
- *
17
- * Exported (2026-08-07) so the VS Code extension's diagram resolves a route leaf exactly as this chart and
18
- * the FLOW-6 rule do. It previously had no way to, and the module header already records what happens when
19
- * two views each grow their own idea of routing: both were wrong about `data`-branching IF steps, differently.
20
- */
21
- export function quotedKeys(expr) {
22
- const out = [];
23
- const re = /"([A-Za-z0-9_]+)"/g;
24
- let m;
25
- while ((m = re.exec(expr)))
26
- out.push(m[1]);
27
- return out;
28
- }
29
- /** Whether a route value is an expression rather than a step key. Exported with `quotedKeys`, and for the
30
- * same reason. */
31
- export function looksLikeExpression(s) {
32
- return s.includes('{{') || s.includes('}}') || /"[A-Za-z0-9_]+"/.test(s);
33
- }
34
- /**
35
- * Every route out of every step, as DATA — the same resolution the mermaid builder draws.
36
- *
37
- * Exported so a second renderer cannot grow a second idea of what routes where. That is not hypothetical: the
38
- * chart and the FLOW-6 rule each had their own, and both were wrong about `data`-branching IF steps in
39
- * different ways. One definition, two consumers.
40
- *
41
- * The semantics are the runtime's (`core.api/hexasync.steps/Execution/NextStepBuilder.cs`):
42
- *
43
- * * a **string** is a step key, or a scriban expression that renders to one — for a static view, every
44
- * quoted key inside the expression that names a real step is a possible route;
45
- * * an **object** `{ if, then, else }` is a branch, and `then`/`else` are themselves routes;
46
- * * for a step whose type is `IF`, its **`data`** is that object — `IfStepExecutor` passes `StepData` to the
47
- * builder — and for a `SWITCH`, `data`'s keys are the branches;
48
- * * an empty or absent route is the end of the flow, and yields no edge.
49
- */
50
- export function flowEdges(steps) {
51
- const known = new Set(steps.map((s) => s.key));
52
- const out = [];
53
- /** Walk one route value, iteratively — `then`/`else` nest without bound. */
54
- const routes = (from, value, label) => {
55
- /**
56
- * Branch objects already entered on THIS step's walk — the cycle guard.
57
- *
58
- * ⛔ Added at the Epic 4 close (2026-08-12). `routeGraph.ts` and the frontend twin both carry this guard, with the
59
- * reason recorded: a cyclic branch does not loop, it **kills the process** with an uncatchable V8 fatal, and this
60
- * code is bundled into the VS Code extension host. This walker never received it, and it is the one the
61
- * extension's fallback SVG still consumes on every preview — so the guarded packages closed the hole on the new
62
- * path and left it open on the shipped one.
63
- *
64
- * Measured: `const a = {}; a.then = a;` walked through here under `--max-old-space-size=200` gives
65
- * `FATAL ERROR: … heap out of memory`, process aborted. A `try/catch` around the preview does not help.
66
- *
67
- * REACHABLE FROM YAML with the parser the CLI already uses — a recursive anchor is all it takes:
68
- *
69
- * ```yaml
70
- * next: &loop
71
- * if: "x"
72
- * then: *loop
73
- * ```
74
- *
75
- * Identity, not path: the same object reached twice is the cycle, however long the path to it.
76
- */
77
- const entered = new WeakSet();
78
- const stack = [
79
- { value, ...(label ? { label } : {}) },
80
- ];
81
- while (stack.length > 0) {
82
- const item = stack.pop();
83
- const node = item.value;
84
- if (node == null || node === '')
85
- continue;
86
- if (typeof node === 'object' && !Array.isArray(node)) {
87
- if (entered.has(node))
88
- continue;
89
- entered.add(node);
90
- const cond = node;
91
- stack.push({ value: cond.else, label: 'NO' });
92
- stack.push({ value: cond.then, label: 'YES' });
93
- continue;
94
- }
95
- const text = String(node);
96
- if (known.has(text)) {
97
- out.push({
98
- from,
99
- to: text,
100
- ...(item.label ? { label: item.label } : {}),
101
- });
102
- continue;
103
- }
104
- if (looksLikeExpression(text)) {
105
- // A scriban expression: every quoted key naming a real step is a route it can take. Reported with the
106
- // raw expression, because which one it takes is a run-time fact a static view cannot know.
107
- const targets = quotedKeys(text).filter((k) => known.has(k));
108
- for (const target of targets) {
109
- out.push({
110
- from,
111
- to: target,
112
- raw: text,
113
- ...(item.label ? { label: item.label } : {}),
114
- });
115
- }
116
- if (targets.length === 0)
117
- out.push({
118
- from,
119
- raw: text,
120
- ...(item.label ? { label: item.label } : {}),
121
- });
122
- continue;
123
- }
124
- // Names no step in this phase — a route out of it, kept so the reader sees the dead end.
125
- out.push({
126
- from,
127
- raw: text,
128
- ...(item.label ? { label: item.label } : {}),
129
- });
130
- }
131
- };
132
- for (const step of steps) {
133
- const type = String(step.stepType ?? '').toUpperCase();
134
- const data = step.data && typeof step.data === 'object' && !Array.isArray(step.data)
135
- ? step.data
136
- : undefined;
137
- if (type === 'IF' && data) {
138
- if (data.then != null)
139
- routes(step.key, data.then, 'YES');
140
- if (data.else != null)
141
- routes(step.key, data.else, 'NO');
142
- if (data.then == null && data.else == null)
143
- routes(step.key, step.next);
144
- }
145
- else if (type === 'SWITCH' && data) {
146
- for (const branch of Object.keys(data))
147
- routes(step.key, branch, branch);
148
- }
149
- else {
150
- routes(step.key, step.next);
151
- }
152
- if (step.onError)
153
- routes(step.key, step.onError, 'onError');
154
- }
155
- return out;
156
- }
157
- /**
158
- * The report's chart, drawn by the SHARED flow models (Story 4.6, AC-1).
159
- *
160
- * ⛔ This file used to draw it — `buildPhase`, `buildCreationMermaid`, `mermaidId`, `escapeLabel`, the phase-chaining
161
- * loop, ~310 lines. That was the third of three implementations answering *"what is this component's flow?"*, and this
162
- * epic exists because the three disagreed. The editor swapped in Story 4.5; this is the report.
163
- *
164
- * The evidence that it mattered is this file's own history: `escapeLabel` had to be fixed for `<` and `&` in Story 4.4's
165
- * review **separately** from the identical fix in the flow packages, because the golden suite — the one named "holds the
166
- * consumers to one answer" — renders through those packages and could not see this emitter. One emitter cannot drift
167
- * from itself.
168
- *
169
- * Direction is preserved PER RUNTIME, exactly as shipped: `LR` for a puller/pusher, the shared default `TD` for a
170
- * creation workflow. The retired emitter drew them that way — its own docblock said *"a `flowchart TD`"* of
171
- * `creationSteps` — and the report's stylesheet gives the puller/pusher chart a horizontally scrolling box that a
172
- * creation workflow's tall branch tree does not want. Direction is a presentation choice the renderer already takes as
173
- * an argument, which is what separates a styling option from a second geometry; unifying the two would have been a
174
- * visible change to the shipped report that no AC asks for.
175
- *
176
- * A flow with no `source` renders the empty node rather than a legacy chart: there is no second emitter left to fall
177
- * back to, and drawing a diagram from the `phases` projection is exactly what this change removes.
178
- */
179
- export function buildMermaid(flow) {
180
- const source = flow.source;
181
- if (!source)
182
- return EMPTY_CHART;
183
- if (source.runtime === 'frontend') {
184
- /**
185
- * The FRONTEND model, because AD-21 keeps the two vocabularies apart for real reasons: `then`/`success` aliases,
186
- * `metadata` rather than `data`, `onCancelled` rather than `onError`. Handing a `creationSteps` document to the
187
- * worker model would silently drop half the edges of a real connector document.
188
- */
189
- const drawn = frontendFlow({
190
- document: source.component,
191
- documentId: source.componentId,
192
- collection: source.collection,
193
- }).workflows;
194
- /**
195
- * ONE chart: the workflow this row is about, not every workflow the document happens to declare.
196
- *
197
- * `source.component` is the composed OUTPUT ROOT — `creationSteps` sits there rather than inside a collection — and
198
- * `frontendFlow` scans all six frontend workflow keys off whatever document it is given. So a root that also
199
- * declared `setupSteps` would have had it charted into a row whose caption counts `creationSteps` alone.
200
- *
201
- * ⛔ The first version rendered every workflow and `join('\n')`ed them, with a comment claiming that a document
202
- * growing a second workflow *"must not silently lose it"*. Each element is a COMPLETE `flowchart TD …` document, so
203
- * two of them concatenated inside one ```mermaid fence is a parse error — the branch written to avoid losing a
204
- * chart lost both (Story 4.6 review, M3). A row shows its own workflow; a second row would show a second one.
205
- */
206
- const workflow = drawn.find((one) => one.workflow === CREATION_WORKFLOW && one.nodes.length > 0);
207
- return workflow === undefined
208
- ? EMPTY_CHART
209
- : renderFrontendMermaid(workflow);
210
- }
211
- // A worker flow always names its collection; `WORKER_STAGES` has no stage list for anything else, and guessing one
212
- // would draw a chart of a component the model cannot describe.
213
- if (source.collection !== 'pullers' && source.collection !== 'pushers')
214
- return EMPTY_CHART;
215
- const drawn = workerFlow({
216
- collection: source.collection,
217
- component: source.component,
218
- componentId: source.componentId,
219
- });
220
- /**
221
- * `multiStage: true` — EVERY stage is boxed and labelled, including a lone one.
222
- *
223
- * ⛔ Omitting it was a measured regression (Story 4.6 review, H1): the shared renderer defaults the option to
224
- * `groups.length > 1`, and **1,293 of the corpus's 2,065 composed pullers/pushers declare exactly one non-empty
225
- * stage**, so 63% of the report's charts lost their box AND the stage's name — under a caption that says
226
- * "1 phase(s)" without ever saying which. The retired emitter boxed unconditionally (`for (const b of builds) {
227
- * lines.push(' subgraph sg_…') }`, no length test), and the deleted assertion
228
- * `toContain('subgraph sg_pushSteps["pushSteps"]')` on a single-phase fixture proves it.
229
- *
230
- * The replacement assertion had justified the loss by quoting *"one stage is not worth a box around it"* as the
231
- * retired emitter's own rule. It is not: that is `frontend-flow`'s rule about a frontend WORKFLOW. Story 4.5 declined
232
- * `multiStage: true` for the EDITOR on the same evidence read correctly — the editor's retired renderer did not box a
233
- * lone stage. Two surfaces, two baselines, and the golden suite renders with `multiStage: true` because a report
234
- * groups a component's stages whether or not there are two.
235
- */
236
- return drawn.nodes.length === 0
237
- ? EMPTY_CHART
238
- : renderWorkerMermaid(drawn, { direction: 'LR', multiStage: true });
239
- }
240
- /** The workflow key this report charts. A `creationSteps` row is about that workflow and no other. */
241
- const CREATION_WORKFLOW = 'creationSteps';
242
- /**
243
- * What an empty flow says here — wording kept verbatim from the retired emitter.
244
- *
245
- * `LR` on both paths, deliberately: a placeholder is one node with no edges, so it has no geometry to preserve, and one
246
- * spelling of "there is nothing here" is easier to grep for than two. The retired code said `TD` on the creation path
247
- * (Story 4.6 review, L3) — a difference no reader can see.
248
- */
249
- const EMPTY_CHART = 'flowchart LR\n empty["No steps"]';
250
- //# sourceMappingURL=flowChart.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flowChart.js","sourceRoot":"","sources":["../src/flowChart.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,UAAU,EACV,aAAa,IAAI,mBAAmB,GAErC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,aAAa,IAAI,qBAAqB,GACvC,MAAM,0CAA0C,CAAC;AAElD;;;;;;;;;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AM,CAAC,UAAU;SAC9B,CAAC,CAAC,SAAS,CAAC;QACb;;;;;;;;;;;WAWG;QACH,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CACzB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,iBAAiB,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CACpE,CAAC;QACF,OAAO,QAAQ,KAAK,SAAS;YAC3B,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IACD,mHAAmH;IACnH,+DAA+D;IAC/D,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS;QACpE,OAAO,WAAW,CAAC;IACrB,MAAM,KAAK,GAAG,UAAU,CAAC;QACvB,UAAU,EAAE,MAAM,CAAC,UAAqC;QACxD,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC,CAAC;IACH;;;;;;;;;;;;;;;OAeG;IACH,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC7B,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,mBAAmB,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,sGAAsG;AACtG,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,WAAW,GAAG,qCAAqC,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * Report renderers (AD-4, ADAPTER).
3
- *
4
- * Turns the inert models from `@beehexa/hexasync-template-report-model` into Markdown and HTML. This is
5
- * an adapter rather than core for one reason that matters: it emits markup. Keeping it out of
6
- * core is what guarantees no core package can produce HTML (Story 1.2, AC 5).
7
- *
8
- * `renderMarkdown.ts` / `renderHtml.ts` were `mergeReport.ts` / `mergeReportHtml.ts` in the CLI.
9
- * Renamed on the way out because "merge report" described where they lived, not what they do.
10
- */
11
- export { renderReport, escHtml } from './renderMarkdown.js';
12
- export { renderReportHtml, esc } from './renderHtml.js';
13
- export { buildMermaid, flowEdges, looksLikeExpression, quotedKeys, type FlowEdge, } from './flowChart.js';
14
- export { collapseDiff } from './diffCollapse.js';
15
- export { renderValidationReport } from './renderValidation.js';
16
- export { renderValidationReportHtml } from './renderValidationHtml.js';
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,KAAK,QAAQ,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * Report renderers (AD-4, ADAPTER).
3
- *
4
- * Turns the inert models from `@beehexa/hexasync-template-report-model` into Markdown and HTML. This is
5
- * an adapter rather than core for one reason that matters: it emits markup. Keeping it out of
6
- * core is what guarantees no core package can produce HTML (Story 1.2, AC 5).
7
- *
8
- * `renderMarkdown.ts` / `renderHtml.ts` were `mergeReport.ts` / `mergeReportHtml.ts` in the CLI.
9
- * Renamed on the way out because "merge report" described where they lived, not what they do.
10
- */
11
- export { renderReport, escHtml } from './renderMarkdown.js';
12
- export { renderReportHtml, esc } from './renderHtml.js';
13
- export { buildMermaid, flowEdges, looksLikeExpression, quotedKeys, } from './flowChart.js';
14
- export { collapseDiff } from './diffCollapse.js';
15
- export { renderValidationReport } from './renderValidation.js';
16
- export { renderValidationReportHtml } from './renderValidationHtml.js';
17
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,UAAU,GAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,5 +0,0 @@
1
- import { ReportModel } from '@beehexa/hexasync-template-report-model';
2
- export declare function esc(text: unknown): string;
3
- /** Render the Merge Integrity Report as a self-contained, styled HTML document. */
4
- export declare function renderReportHtml(model: ReportModel): string;
5
- //# sourceMappingURL=renderHtml.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderHtml.d.ts","sourceRoot":"","sources":["../src/renderHtml.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEZ,MAAM,yCAAyC,CAAC;AAYjD,wBAAgB,GAAG,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAUzC;AAoLD,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAqV3D"}