umlimator 0.23.0 → 0.24.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/README.md CHANGED
@@ -109,6 +109,22 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
109
109
  lifeline into a value lifeline; deleting a lifeline deletes its changes and their constraints. The MCP server's read
110
110
  tools and the diff Action are tested on both, and the Bookshop atlas, now with a view of each of UML's 14 diagram
111
111
  kinds, opens them from the package view's profile and from the activity's "Record the payment on the order".
112
+ - **ER, flowchart, data flow, information flow and C4** (0.24.0): tables with their key columns first, related in crow's
113
+ foot or IDEF1X, one geometry for both, each column a row `name type [PK] [FK table.column] [UK] [NULL]`
114
+ ([`examples/bookshop-schema.json`](examples/bookshop-schema.json), [what it covers](docs/conformance/er.md)); ten
115
+ flowchart symbols, laid out down, decisions with labelled exits
116
+ ([`examples/returns-flowchart.json`](examples/returns-flowchart.json), [what it covers](docs/conformance/flowchart.md));
117
+ data flow levels in Yourdon or Gane and Sarson, made by `D` and checked for balance
118
+ ([`examples/bookshop-data-flow.json`](examples/bookshop-data-flow.json), [what it covers](docs/conformance/dfd.md));
119
+ UML information flows, dashed «flow» lines saying what they convey
120
+ ([`examples/order-information-flow.json`](examples/order-information-flow.json),
121
+ [what it covers](docs/conformance/uml-information-flow.md)); and typed C4 in six views (landscape, context, container,
122
+ component, dynamic, deployment) on the map's card shapes, each view checking what it may show, its subject a dashed
123
+ boundary, relationships whose ends a view hides drawn as implied lines, `D` making the next level
124
+ ([`examples/bookshop-c4.json`](examples/bookshop-c4.json), [what it covers](docs/conformance/c4.md)). `import` reads a
125
+ Mermaid `erDiagram`, a Mermaid flowchart with `--typed`, a Structurizr JSON workspace and a `.dbml` file (with
126
+ `@dbml/core` installed by you) into them. The Bookshop atlas starts at the C4 context, whose elements open the schema,
127
+ the data flow, the information flow, the returns flowchart and the UML views.
112
128
  - **Export**: any view as a stand-alone SVG or PNG, in the browser or from the CLI; the whole map as one PDF to hand in
113
129
  for a review: a cover with the contents, each view with its legend and tables of its cards, lines and boxes, then the
114
130
  rules (`umlimator.py pdf`).
@@ -131,7 +147,7 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
131
147
  npm install umlimator
132
148
  ```
133
149
 
134
- Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.23.0"`. npm 12 refuses git
150
+ Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.24.0"`. npm 12 refuses git
135
151
  dependencies unless the project opts in, so that also needs `allow-git=root` in the `.npmrc` next to `package.json`.
136
152
 
137
153
  ## Embed
@@ -177,7 +193,7 @@ function MapView({ model, onSelect }) {
177
193
  or costliest path, `whatIf(model, view, { remove })` what loses its way when cards go down, and
178
194
  `sequenceFromTrace(model, spans, { view, match })` keeps a trace as a numbered view; all three in Node too.
179
195
  - `editable: true` turns on editing gestures ([docs/editing.md](docs/editing.md); `examples/edit.html` is a working host).
180
- - `import { render, apply, history } from 'umlimator/all'` draws diagram types too: a class, object, package, sequence, communication, use case, activity, state machine, interaction overview, component, deployment, composite structure, profile or timing diagram, whose gestures emit
196
+ - `import { render, apply, history } from 'umlimator/all'` draws diagram types too: a class, object, package, sequence, communication, use case, activity, state machine, interaction overview, component, deployment, composite structure, profile, timing, information flow, entity-relationship, flowchart, data flow or C4 diagram, whose gestures emit
181
197
  `edit` transactions that `apply(model, e.commands)` turns into the next model (`examples/class-editor.html` is a
182
198
  working host). `umlimator` alone draws maps, and a typed view as plain cards with a warning.
183
199
  - `diff(before, after)` returns `after` with each card and line marked added, changed or removed, what changed in words,
@@ -258,9 +274,11 @@ gets completion and checks in editors, and `validate(model)` lists its errors an
258
274
  `"schemaVersion": 2` marks a model that may hold typed elements and typed views (`docs/diagrams/model.md`). A view whose
259
275
  `diagram` is `"uml.class"`, `"uml.object"`, `"uml.package"`, `"uml.sequence"`, `"uml.communication"`, `"uml.use-case"`,
260
276
  `"uml.activity"`, `"uml.state-machine"`, `"uml.interaction-overview"`, `"uml.component"`, `"uml.deployment"`,
261
- `"uml.composite-structure"`, `"uml.profile"` or `"uml.timing"` is a UML class, object, package, sequence, communication,
262
- use case, activity, state machine, interaction overview, component, deployment, composite structure, profile or timing
263
- diagram, drawn by `umlimator/all` and the CLI; a type not drawn yet shows its
277
+ `"uml.composite-structure"`, `"uml.profile"`, `"uml.timing"` or `"uml.information-flow"` is a UML class, object, package,
278
+ sequence, communication, use case, activity, state machine, interaction overview, component, deployment, composite
279
+ structure, profile, timing or information flow diagram; `"er"`, `"flowchart"` and `"dfd"` an entity-relationship
280
+ diagram, a flowchart and a data flow diagram; `"c4.landscape"`, `"c4.context"`, `"c4.container"`, `"c4.component"`,
281
+ `"c4.dynamic"` and `"c4.deployment"` C4's six views; each drawn by `umlimator/all` and the CLI; a type not drawn yet shows its
264
282
  nodes as plain cards, with a warning. A model with no `schemaVersion` is a map, as always, and a version newer than the
265
283
  module reads is an error.
266
284
 
@@ -372,6 +390,22 @@ A profile diagram and a timing diagram (`examples/bookshop-profile.json` and `bo
372
390
  | view | `present` | a lifeline drawn as a value lifeline (`{ "as": "values" }`) |
373
391
  | view | `diagram` | `"uml.profile"` or `"uml.timing"` |
374
392
 
393
+ Milestone 2's five types (`examples/bookshop-schema.json`, `returns-flowchart.json`, `bookshop-data-flow.json`,
394
+ `order-information-flow.json` and `bookshop-c4.json`; each type's note in [`docs/conformance/`](docs/conformance/)), from
395
+ 0.24.0:
396
+
397
+ | On | Field | What it does |
398
+ |---|---|---|
399
+ | node, member, edge | `type` | ER: `er.Entity` (members `er.Column`), lines `er.Relationship` from the referenced entity to the referring one. Flowchart: `flow.Terminator`, `flow.Process`, `flow.Decision`, `flow.InputOutput`, `flow.PredefinedProcess`, `flow.Document`, `flow.Database`, `flow.ManualInput`, `flow.Delay`, `flow.Connector`; lines `flow.Flow`. Data flow: `dfd.Process`, `dfd.DataStore`, `dfd.ExternalEntity`; lines `dfd.DataFlow`. Information flow: `uml.InformationItem` and the classes, interfaces, components and actors it travels between; lines `uml.InformationFlow`. C4: `c4.Person`, `c4.SoftwareSystem`, `c4.Container`, `c4.Component`, `c4.DeploymentNode`, `c4.ContainerInstance`; lines `c4.Relationship` (its `label` the description) |
400
+ | member | `props` | a column's `dataType`, `primaryKey`, `foreignKey`, `references` (a column id), `nullable`, `unique` |
401
+ | node, edge | `props` | a relationship's `identifying` and `ends.from` and `ends.to`'s `multiplicity`; a process's or store's `number`; a flow's `conveyed` (ids); a C4 element's `description`, `technology`, `external`, `shape` (a map card shape), an instance's `container`; a C4 relationship's `technology` |
402
+ | node | `parent` | a container's software system, a component's container, a deployment node's node, an instance's node |
403
+ | node | `opensView` | a process's level: a `dfd` view whose `parent` is the view the process is on |
404
+ | view | `notation` | `"crowsfoot"` (default) or `"idef1x"` for `er`, `"yourdon"` (default) or `"gane-sarson"` for `dfd`: a repaint |
405
+ | view | `subject` | a C4 view's system or container, drawn as a boundary when `nodeIds` lists it |
406
+ | view | `edges` | a C4 dynamic view's steps: relationship ids, each once, in time order |
407
+ | view | `diagram` | `"er"`, `"flowchart"`, `"dfd"`, `"uml.information-flow"`, `"c4.landscape"`, `"c4.context"`, `"c4.container"`, `"c4.component"`, `"c4.dynamic"`, `"c4.deployment"` |
408
+
375
409
  ## Command line
376
410
 
377
411
  ```bash
@@ -389,6 +423,10 @@ python3 umlimator.py import workspace.dsl --out model.json # a diagra
389
423
  python3 umlimator.py import classes.mmd --out classes.json # a Mermaid classDiagram, as a UML class diagram (needs Node)
390
424
  python3 umlimator.py import checkout.mmd --out checkout.json # a Mermaid sequenceDiagram, as a UML sequence diagram (needs Node)
391
425
  python3 umlimator.py import order.mmd --out order.json # a Mermaid stateDiagram, as a UML state machine diagram (needs Node)
426
+ python3 umlimator.py import schema.mmd --out schema.json # a Mermaid erDiagram, as an ER diagram (needs Node)
427
+ python3 umlimator.py import returns.mmd --typed --out returns.json # a Mermaid flowchart as a flowchart (without --typed, a map)
428
+ python3 umlimator.py import workspace.json --out c4.json # a Structurizr JSON workspace, as typed C4 views (needs Node)
429
+ python3 umlimator.py import schema.dbml --out schema.json # DBML, as an ER diagram (needs Node and @dbml/core, installed by you)
392
430
  python3 umlimator.py render examples/sales-classes.json --out classes.html # a class diagram's page; stills, check and pdf take it too
393
431
  docker compose config --format json > compose.json && python3 umlimator.py import compose.json --out model.json
394
432
  kubectl get deploy,sts,svc,ing -A -o json > cluster.json && python3 umlimator.py import cluster.json --out model.json
@@ -454,7 +492,7 @@ jobs:
454
492
  runs-on: ubuntu-latest
455
493
  steps:
456
494
  - uses: actions/checkout@v4
457
- - uses: zintaen/umlimator@v0.23.0
495
+ - uses: zintaen/umlimator@v0.24.0
458
496
  with:
459
497
  models: "docs/*.json" # optional: where the models are (default: every .json that is a map model)
460
498
  ```