@zenwave360/dsl 1.10.0-next.8.1 → 1.11.0-next.13.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.
- package/README.md +21 -8
- package/kotlin/antlr-kotlin-antlr-kotlin-runtime.mjs +1839 -1836
- package/kotlin/antlr-kotlin-antlr-kotlin-runtime.mjs.map +1 -1
- package/kotlin/dsl-kotlin.d.mts +1 -2
- package/kotlin/dsl-kotlin.mjs +5256 -5640
- package/kotlin/dsl-kotlin.mjs.map +1 -1
- package/kotlin/kotlin-kotlin-stdlib.mjs +146 -151
- package/kotlin/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -68,12 +68,20 @@ const zflModel = parseZfl(zflContent);
|
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
ZDL plugin option source spans are available in `model.locations` under
|
|
71
|
-
`
|
|
71
|
+
`pluginsList.<n>.config.<option>` and `pluginsList.<n>.cliOptions.<option>`.
|
|
72
72
|
Each declaration has a span; its `.value` span covers only the value, including
|
|
73
73
|
quote delimiters. A CLI flag without a value has no `.value` span. The first two
|
|
74
74
|
span entries are the start offset and exclusive end offset in the original
|
|
75
75
|
source, suitable for `source.slice(span[0], span[1])`. Model values are unchanged.
|
|
76
76
|
|
|
77
|
+
`model.pluginsList` is every plugin declaration in order. Each instance's
|
|
78
|
+
declaration span is `locations['pluginsList.N']`.
|
|
79
|
+
|
|
80
|
+
CLI options may also be declared directly inside `config`, before `plugins`,
|
|
81
|
+
for consumers that apply shared command-line defaults. They are reported in
|
|
82
|
+
`model.cliOptions`; their spans use `cliOptions.<option>` and
|
|
83
|
+
`cliOptions.<option>.value`, with no value span for a valueless flag.
|
|
84
|
+
|
|
77
85
|
These spans are implemented in shared Kotlin source. JS consumers must rebuild
|
|
78
86
|
the package with `./gradlew jsProductionExecutableCompileSync` and update their
|
|
79
87
|
bundled or installed artifact; an existing JS bundle does not gain them automatically.
|
|
@@ -86,20 +94,25 @@ Before 1.10.0 an integer was an opaque Kotlin `Long` object with compiler-genera
|
|
|
86
94
|
(`{"h2_1":3,"i2_1":0}`) and the sign of a negative literal was dropped; JS consumers that worked
|
|
87
95
|
around either should read the value directly. The JVM model is unchanged (`Long` and `String`).
|
|
88
96
|
|
|
89
|
-
|
|
97
|
+
The repository builds three modules:
|
|
90
98
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
| Module | Maven artifact | Content |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| `dsl-kotlin` | `io.zenwave360.dsl:dsl-kotlin` | ZDL and ZFL parsers, semantic models, event flow view models; npm `@zenwave360/dsl` |
|
|
102
|
+
| `dsl-views` | `io.zenwave360.dsl:dsl-views` | Mermaid diagrams from ZDL and ZFL models: class diagram, flows, and the architecture of several ZDL modules; see [dsl-views/README.md](dsl-views/README.md) |
|
|
103
|
+
| `dsl-docs` | `io.zenwave360.dsl:dsl-docs` | Markdown documentation with those diagrams, from ZDL, ZFL, OpenAPI and AsyncAPI files; see [dsl-docs/README.md](dsl-docs/README.md) |
|
|
104
|
+
|
|
105
|
+
ZDL class diagrams and ZFL flowcharts and sequence diagrams are Mermaid text from `dsl-views`:
|
|
95
106
|
|
|
96
107
|
```kotlin
|
|
97
|
-
val
|
|
108
|
+
val classDiagram = GenerateMermaidFromZdl().execute(zdlContent)
|
|
109
|
+
val flowDiagrams = GenerateMermaidFromZfl().execute(zflContent)
|
|
98
110
|
```
|
|
99
111
|
|
|
100
|
-
The diagram contains aggregates with their commands, entities with their fields, enums with their
|
|
112
|
+
The class diagram contains aggregates with their commands, entities with their fields, enums with their
|
|
101
113
|
values, inputs, outputs and events, services with their commands, and relationships with their
|
|
102
114
|
cardinality. It contains no `click`, `link` or `callback` directives and no remote references.
|
|
115
|
+
`dsl-views` and `dsl-docs` are not published to npm yet.
|
|
103
116
|
|
|
104
117
|
The JS package loads in browsers and Web Workers as well as in Node.js: `./gradlew check`
|
|
105
118
|
runs `jsBrowserTest` in a headless Chromium-based browser (Karma; set `CHROME_BIN`, or a local
|