@zenwave360/lsp-js 0.1.0-next.12.1 → 0.1.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 +24 -3
- package/dist/browser/zenwave-lsp-worker.js +29695 -24693
- package/dist/node/zenwave-lsp-server.js +29714 -24712
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,10 +74,31 @@ groups of the same document's `zenwave/eventFlowViews` that stand for the node's
|
|
|
74
74
|
`event:OrderCreated`, `event:OrderCreated@Orders>OrderService`, `group:Orders>OrderService`, `policy:…`); it
|
|
75
75
|
is empty when the diagram has no counterpart.
|
|
76
76
|
|
|
77
|
-
`zenwave/preview` answers for ZDL (one
|
|
78
|
-
`
|
|
77
|
+
`zenwave/preview` answers for ZDL (one `MARKDOWN` representation `domain`, "Domain model": the model's page with its
|
|
78
|
+
diagrams as `mermaid` fences), `.zw` (one `MARKDOWN` representation `configuration`, "Plugin configuration": the `config`
|
|
79
|
+
block and each plugin with what it is for and its resolved configuration; the document's language id is `zw`, or its
|
|
80
|
+
URI ends in `.zw`) and ZFL (a `flowchart`, then one `sequence:<outcome>:<index>` per end outcome; the first sequence is
|
|
81
|
+
the default). What a model wrote is escaped in the Markdown, so a `<script>` shows as text. `sequenceRenderMode`
|
|
79
82
|
defaults to `ALT_BLOCKS`. Null properties are omitted from every result.
|
|
80
83
|
|
|
84
|
+
### Plugin catalogue
|
|
85
|
+
|
|
86
|
+
The `.zw` page describes each plugin (what it is for, what its options mean) from a plugin catalogue, the JSON
|
|
87
|
+
the ZenWave SDK reports for `-h json`, in the shape of the VS Code extension's `sdk-plugin-catalogue.json`
|
|
88
|
+
(`{ source, version, plugins: [...] }`; fields the server does not know are ignored). The server ships its own copy,
|
|
89
|
+
embedded in the bundle, so it works with no file read (the Web Worker too), and uses the last valid catalogue a
|
|
90
|
+
client sent. The copy is generated by `scripts/generate-plugin-catalogue.mjs` from a named SDK build (its
|
|
91
|
+
`source`/`version`, today `ZenWave SDK 2.8.0-SNAPSHOT`) and parsed the first time a `.zw` is previewed.
|
|
92
|
+
|
|
93
|
+
- At initialisation: `initializationOptions.pluginCatalogue`, the catalogue as a JSON object.
|
|
94
|
+
- At any time: the notification `zenwave/pluginCatalogue` with params `{ catalogue: <JSON object> }`. It is advertised
|
|
95
|
+
in `capabilities.experimental.customNotifications` (`["zenwave/pluginCatalogue"]`), beside `customRequests`.
|
|
96
|
+
|
|
97
|
+
The next `zenwave/preview` uses it (previews are not cached). A plugin that is not in the catalogue still shows its
|
|
98
|
+
name and resolved configuration, without a description. A catalogue that is not an object, is not JSON or has no
|
|
99
|
+
`plugins` array is ignored, the previous one stays, and the server logs a warning with `window/logMessage`;
|
|
100
|
+
it never fails initialisation.
|
|
101
|
+
|
|
81
102
|
Both visualisation requests read open documents. When a document cannot answer they fail with JSON-RPC
|
|
82
103
|
`-32803` and `data.kind`: `documentUnreadable` (a syntax error; `data.diagnostics` holds LSP diagnostics),
|
|
83
104
|
`documentNotFound` (not open) or `unsupportedDocument` (a kind of document the request does not cover).
|
|
@@ -87,7 +108,7 @@ The worker bundle carries elkjs for the flow layout. elkjs' in-process layout wo
|
|
|
87
108
|
the Web Worker's `onmessage` when it detects a worker global; `build.mjs` disables that detection when bundling,
|
|
88
109
|
and the build fails if an elkjs upgrade changes it.
|
|
89
110
|
|
|
90
|
-
Initialization options take the form `{ zenwave: { configUri?, projectManifestUri? } }`.
|
|
111
|
+
Initialization options take the form `{ zenwave: { configUri?, projectManifestUri? }, pluginCatalogue? }`.
|
|
91
112
|
|
|
92
113
|
## Building
|
|
93
114
|
|