@zenwave360/dsl 1.9.0-next.0 → 1.10.0-next.8.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/LICENSE +21 -21
- package/README.md +27 -0
- package/kotlin/antlr-kotlin-antlr-kotlin-runtime.mjs.map +1 -1
- package/kotlin/dsl-kotlin.d.mts +2 -1
- package/kotlin/dsl-kotlin.mjs +1137 -391
- package/kotlin/dsl-kotlin.mjs.map +1 -1
- package/kotlin/kotlin-kotlin-stdlib.mjs +91 -11
- package/kotlin/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/package.json +10 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022-2026 ZenWave's Authors and Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022-2026 ZenWave's Authors and Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -78,6 +78,33 @@ These spans are implemented in shared Kotlin source. JS consumers must rebuild
|
|
|
78
78
|
the package with `./gradlew jsProductionExecutableCompileSync` and update their
|
|
79
79
|
bundled or installed artifact; an existing JS bundle does not gain them automatically.
|
|
80
80
|
|
|
81
|
+
Numbers in `parseZdl` and `parseZfl` output are plain JavaScript values: an integer is a JS
|
|
82
|
+
`number` (for example `maxDepth 3` gives `3`), or its exact decimal string when it lies beyond
|
|
83
|
+
`Number.MAX_SAFE_INTEGER` (±(2^53 - 1)). Decimals stay strings (`ratio 1.25` gives `"1.25"`),
|
|
84
|
+
as in the JVM model. Negative literals keep their sign (`neg -2` gives `-2`).
|
|
85
|
+
Before 1.10.0 an integer was an opaque Kotlin `Long` object with compiler-generated field names
|
|
86
|
+
(`{"h2_1":3,"i2_1":0}`) and the sign of a negative literal was dropped; JS consumers that worked
|
|
87
|
+
around either should read the value directly. The JVM model is unchanged (`Long` and `String`).
|
|
88
|
+
|
|
89
|
+
ZDL class diagrams are available as Mermaid text, on the JVM and in JavaScript:
|
|
90
|
+
|
|
91
|
+
```js
|
|
92
|
+
import { generateMermaidFromZdl } from '@zenwave360/dsl';
|
|
93
|
+
const mermaid = generateMermaidFromZdl(zdlContent); // starts with "classDiagram"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```kotlin
|
|
97
|
+
val mermaid = GenerateMermaidFromZdl().execute(zdlContent)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The diagram contains aggregates with their commands, entities with their fields, enums with their
|
|
101
|
+
values, inputs, outputs and events, services with their commands, and relationships with their
|
|
102
|
+
cardinality. It contains no `click`, `link` or `callback` directives and no remote references.
|
|
103
|
+
|
|
104
|
+
The JS package loads in browsers and Web Workers as well as in Node.js: `./gradlew check`
|
|
105
|
+
runs `jsBrowserTest` in a headless Chromium-based browser (Karma; set `CHROME_BIN`, or a local
|
|
106
|
+
Chrome, Chromium or Edge is used).
|
|
107
|
+
|
|
81
108
|
* Further reading:
|
|
82
109
|
- [ZDL Domain Language Reference](https://www.zenwave360.io/docs/event-driven-design/zenwave-domain-language/)
|
|
83
110
|
- [ZFL Flow Language Reference](https://www.zenwave360.io/docs/event-driven-design/zenwave-flow-language/)
|