@delurio/cli 0.5.2 → 0.5.3
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/CHANGELOG.md +4 -0
- package/dist/mermaid.js +7 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
While the version is 0.x, a release that can judge the same graphs differently (a new check, a stricter schema) bumps the minor; a fix that judges nothing differently bumps the patch.
|
|
4
4
|
|
|
5
|
+
## 0.5.3 (2026-11-06)
|
|
6
|
+
|
|
7
|
+
- `page`: the `flow.mmd` it writes now reads whole in Mermaid. Mermaid ends a statement at a `;`, even inside a transition's label, so a label with one lost its rest: those words were drawn as stray states, or, when a `-` or `{` came after the `;`, the diagram did not render at all ("Parse error on line …", QAuth's sign-in in an editor's preview). A `;` in a label is now written as a comma. A transition never taken and with no label of its own now carries "(never taken)" as its label: before, those two words were drawn as two more states. Of the 106 flow diagrams of QAuth, Medaris and delurio, 86 were drawn wrong (36 did not render, 50 had stray states) and none is now, in Mermaid 10.9 and 12.3; their 5 navigation diagrams were right before and are unchanged. `index.html` draws its own diagram and was not affected. Nothing is judged differently.
|
|
8
|
+
|
|
5
9
|
## 0.5.2 (2026-11-03)
|
|
6
10
|
|
|
7
11
|
- `page`: the flow's diagram opens fitted to a box as wide as the window, and moves like a design tool's canvas: drag it to move (the hand), Ctrl or ⌘ with the wheel, or a pinch, to zoom at the pointer, and the wheel alone to move it until its edge, after which the page scrolls on. Buttons and keys: − and + (zoom), the zoom level (click: 100%, Shift+0), Fit (Shift+1), Full window (F; Esc leaves it); arrows move it. A click that does not drag still opens a step's screen. Before, a large flow was shrunk into the page's column (QAuth's consent flow to 7%) or scrolled sideways at full size. Without scripts the page keeps the old diagram. Nothing is judged differently.
|
package/dist/mermaid.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { collectEdges, exitLine, kindOf } from './edges.js';
|
|
2
2
|
import { titleOf } from './graph.js';
|
|
3
|
-
|
|
3
|
+
// Mermaid ends a statement at `;` even inside a transition's label: the rest of the label became stray states,
|
|
4
|
+
// or, with a `-` or `{` after it, a parse error. A label keeps its words with a comma in its place.
|
|
5
|
+
const clean = (s) => s.replace(/"/g, "'").replace(/:/g, ' -').replace(/;/g, ',');
|
|
4
6
|
// Mermaid's ids, which take no dot: an exit named `<error>.<cause>` is written `<error>__<cause>`
|
|
5
7
|
function mermaidIds(names) {
|
|
6
8
|
const ids = new Map();
|
|
@@ -30,8 +32,10 @@ export function renderMermaid(g, ex) {
|
|
|
30
32
|
}
|
|
31
33
|
lines.push(` [*] --> ${id(g.flow.initial)}`);
|
|
32
34
|
for (const e of collectEdges(g, ex)) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
// "never taken" belongs in the label: after an arrow with no `:` Mermaid read its words as two more states
|
|
36
|
+
const said = e.labels.map(clean).join(', ');
|
|
37
|
+
const label = e.unused ? `${said} (never taken)`.trim() : said;
|
|
38
|
+
lines.push(` ${id(e.from)} --> ${id(e.to)}${label === '' ? '' : `: ${label}`}`);
|
|
35
39
|
}
|
|
36
40
|
lines.push(' classDef server fill:#eeeeec,stroke:#6b6560,stroke-dasharray:4 3');
|
|
37
41
|
lines.push(' classDef screen fill:#ffffff,stroke:#1c1917,stroke-width:2px');
|
package/package.json
CHANGED