@zenwave360/dsl 1.10.0-next.6.2 → 1.10.0-next.9.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 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/)
@@ -53,8 +53,8 @@ import {
53
53
  toString1pkumu07cwy4m as toString_0,
54
54
  hashCodeq5arwsb9dgti as hashCode,
55
55
  UnsupportedOperationException_init_$Create$2mt8zfs17dxxt as UnsupportedOperationException_init_$Create$_0,
56
- MutableCollection3jqcg879qsnhr as MutableCollection,
57
56
  KtSetjrjc7fhfd6b9 as KtSet,
57
+ MutableCollection3jqcg879qsnhr as MutableCollection,
58
58
  IllegalStateException_init_$Create$2dr6rbnhpv20m as IllegalStateException_init_$Create$_0,
59
59
  noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
60
60
  copyOfRange1v9olvyjr7c0r as copyOfRange,
@@ -142,12 +142,12 @@ initMetadataForCompanion(Companion_6);
142
142
  initMetadataForClass(ATN, 'ATN');
143
143
  initMetadataForCompanion(Companion_7);
144
144
  initMetadataForClass(ATNConfig, 'ATNConfig');
145
- initMetadataForClass(Array2DHashSet, 'Array2DHashSet', Array2DHashSet, VOID, [MutableCollection, KtSet]);
145
+ initMetadataForClass(Array2DHashSet, 'Array2DHashSet', Array2DHashSet, VOID, [KtSet, MutableCollection]);
146
146
  initMetadataForClass(AbstractConfigHashSet, 'AbstractConfigHashSet', VOID, Array2DHashSet);
147
147
  initMetadataForClass(ConfigHashSet, 'ConfigHashSet', ConfigHashSet, AbstractConfigHashSet);
148
148
  initMetadataForClass(AbstractEqualityComparator, 'AbstractEqualityComparator');
149
149
  initMetadataForObject(ConfigEqualityComparator, 'ConfigEqualityComparator', VOID, AbstractEqualityComparator);
150
- initMetadataForClass(ATNConfigSet, 'ATNConfigSet', ATNConfigSet, VOID, [MutableCollection, KtSet]);
150
+ initMetadataForClass(ATNConfigSet, 'ATNConfigSet', ATNConfigSet, VOID, [KtSet, MutableCollection]);
151
151
  initMetadataForCompanion(Companion_8);
152
152
  initMetadataForClass(ATNDeserializationOptions, 'ATNDeserializationOptions', ATNDeserializationOptions_init_$Create$);
153
153
  initMetadataForCompanion(Companion_9);
@@ -1,4 +1,5 @@
1
1
  type Nullable<T> = T | null | undefined
2
2
  declare function KtSingleton<T>(): T & (abstract new() => any);
3
3
  export declare function parseZdl(input: string): Nullable<any>;
4
- export declare function parseZfl(input: string): Nullable<any>;
4
+ export declare function parseZfl(input: string): Nullable<any>;
5
+ export declare function generateMermaidFromZdl(input: string): string;