@likec4/language-server 1.49.0 → 1.51.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/LICENSE +21 -0
- package/README.md +5 -25
- package/bin/likec4-language-server.mjs +2 -3
- package/dist/_chunks/LikeC4FileSystem.mjs +3 -3
- package/dist/_chunks/common-exports.mjs +0 -0
- package/dist/_chunks/likec4lib.mjs +2 -0
- package/dist/_chunks/mcp.mjs +1154 -0
- package/dist/_chunks/{index.d.mts → module.d.mts} +326 -24
- package/dist/_chunks/module.mjs +35 -0
- package/dist/_chunks/noop.mjs +1 -0
- package/dist/_chunks/protocol.d.mts +315 -0
- package/dist/_chunks/utils.mjs +1 -1
- package/dist/_chunks/workspace.mjs +1 -0
- package/dist/browser/index.d.mts +8 -3
- package/dist/browser/index.mjs +1 -1
- package/dist/browser/worker.mjs +1 -1
- package/dist/filesystem/index.d.mts +3 -2
- package/dist/filesystem/index.mjs +1 -1
- package/dist/index.d.mts +3 -39
- package/dist/index.mjs +1 -1
- package/dist/likec4lib.mjs +1 -1
- package/dist/mcp/index.d.mts +3 -2
- package/dist/mcp/index.mjs +1 -1
- package/dist/module.d.mts +3 -126
- package/dist/module.mjs +1 -1
- package/dist/protocol.d.mts +1 -314
- package/dist/protocol.mjs +1 -1
- package/package.json +23 -33
- package/bundled/package.json +0 -4
- package/dist/THIRD-PARTY-LICENSES.md +0 -178
- package/dist/_chunks/ConfigurableLayouter.mjs +0 -1
- package/dist/_chunks/LikeC4Views.mjs +0 -34
- package/dist/_chunks/ProjectsManager.mjs +0 -1
- package/dist/_chunks/WithMCPServer.mjs +0 -481
- package/dist/_chunks/icons.mjs +0 -2
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +0 -1
- package/dist/_chunks/libs/eventemitter3.mjs +0 -1
- package/dist/_chunks/libs/fast-equals.mjs +0 -1
- package/dist/_chunks/libs/p-queue.mjs +0 -1
- package/dist/_chunks/libs/parse-ms.mjs +0 -1
- package/dist/_chunks/libs/picomatch.mjs +0 -1
- package/dist/_chunks/libs/pretty-ms.mjs +0 -1
- package/dist/_chunks/libs/remeda.mjs +0 -1
- package/dist/_chunks/libs/strip-indent.mjs +0 -1
- package/dist/_chunks/libs/ufo.mjs +0 -1
- package/dist/_chunks/logger.mjs +0 -1
- package/dist/_chunks/rolldown-runtime.mjs +0 -1
- package/dist/bundled.d.mts +0 -27
- package/dist/bundled.mjs +0 -1
package/dist/protocol.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{NotificationType,NotificationType0,RequestType,RequestType0}from"vscode-jsonrpc";let
|
|
1
|
+
import{NotificationType as e,NotificationType0 as t,RequestType as n,RequestType0 as r}from"vscode-jsonrpc";let i;(function(t){t.type=new e(`likec4/onDidChangeModel`)})(i||={});let a;(function(e){e.type=new t(`likec4/onDidChangeProjects`)})(a||={});let o;(function(t){t.type=new e(t.Method=`likec4/onDidChangeSnapshot`)})(o||={});let s;(function(t){t.type=new e(`likec4/onRequestOpenView`)})(s||={});let c;(function(e){e.req=new n(`likec4/fetchComputedModel`)})(c||={});let l;(function(e){e.req=new r(`likec4/fetchViewsFromAllProjects`)})(l||={});let u;(function(e){e.req=new n(`likec4/fetchLayoutedModel`)})(u||={});let d;(function(e){e.req=new n(`likec4/layout-view`)})(d||={});let f;(function(e){e.req=new n(`likec4/validate-layout`)})(f||={});let p;(function(e){e.req=new r(`likec4/reload-projects`)})(p||={});let m;(function(e){e.req=new r(`likec4/fetch-projects`)})(m||={});let h;(function(e){e.req=new n(`likec4/register-project`)})(h||={});let g;(function(e){e.req=new n(`likec4/build`)})(g||={});let _;(function(e){e.req=new n(`likec4/locate`)})(_||={});let v;(function(e){e.req=new n(`likec4/change-view`)})(v||={});let y;(function(e){e.req=new r(`likec4/metrics`)})(y||={});let b;(function(e){e.req=new n(`likec4/document-tags`)})(b||={});let x;(function(e){e.req=new r(`likec4/fetch-projects-overview`)})(x||={});export{g as BuildDocuments,v as ChangeView,i as DidChangeModelNotification,a as DidChangeProjectsNotification,o as DidChangeSnapshotNotification,s as DidRequestOpenViewNotification,c as FetchComputedModel,u as FetchLayoutedModel,m as FetchProjects,x as FetchProjectsOverview,y as FetchTelemetryMetrics,l as FetchViewsFromAllProjects,b as GetDocumentTags,d as LayoutView,_ as Locate,h as RegisterProject,p as ReloadProjects,f as ValidateLayout};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/language-server",
|
|
3
3
|
"description": "LikeC4 Language Server",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.51.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
@@ -53,14 +53,6 @@
|
|
|
53
53
|
"default": "./dist/index.mjs"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"./bundled": {
|
|
57
|
-
"sources": "./src/bundled.ts",
|
|
58
|
-
"default": {
|
|
59
|
-
"types": "./dist/bundled.d.mts",
|
|
60
|
-
"import": "./dist/bundled.mjs",
|
|
61
|
-
"default": "./dist/bundled.mjs"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
56
|
"./likec4lib": {
|
|
65
57
|
"sources": "./src/likec4lib.ts",
|
|
66
58
|
"default": {
|
|
@@ -126,33 +118,42 @@
|
|
|
126
118
|
"dependencies": {
|
|
127
119
|
"@hono/mcp": "^0.2.3",
|
|
128
120
|
"@hono/node-server": "^1.19.9",
|
|
129
|
-
"hono": "^4.11.9",
|
|
130
121
|
"@hpcc-js/wasm-graphviz": "1.21.0",
|
|
122
|
+
"@msgpack/msgpack": "^3.1.2",
|
|
131
123
|
"@smithy/util-base64": "^4.3.0",
|
|
132
124
|
"chokidar": "^5.0.0",
|
|
133
125
|
"defu": "^6.1.4",
|
|
126
|
+
"fast-equals": "^6.0.0",
|
|
134
127
|
"fdir": "6.4.0",
|
|
135
|
-
"
|
|
128
|
+
"hono": "^4.11.10",
|
|
129
|
+
"immer": "^11.1.4",
|
|
130
|
+
"indent-string": "^5.0.0",
|
|
136
131
|
"json5": "^2.2.3",
|
|
137
132
|
"langium": "3.5.0",
|
|
138
133
|
"nano-spawn": "^2.0.0",
|
|
134
|
+
"p-queue": "8.1.1",
|
|
135
|
+
"picomatch": "^4.0.3",
|
|
136
|
+
"pretty-ms": "^9.3.0",
|
|
137
|
+
"remeda": "^2.33.6",
|
|
139
138
|
"std-env": "^3.10.0",
|
|
139
|
+
"strip-indent": "^4.1.1",
|
|
140
140
|
"type-fest": "^4.41.0",
|
|
141
|
+
"ufo": "1.6.3",
|
|
141
142
|
"vscode-jsonrpc": "8.2.1",
|
|
142
|
-
"vscode-languageserver": "9.0.1",
|
|
143
143
|
"vscode-languageserver-protocol": "3.17.5",
|
|
144
144
|
"vscode-languageserver-textdocument": "1.0.11",
|
|
145
145
|
"vscode-languageserver-types": "3.17.5",
|
|
146
|
+
"vscode-languageserver": "9.0.1",
|
|
146
147
|
"vscode-uri": "3.1.0",
|
|
147
148
|
"which": "^5.0.0",
|
|
148
149
|
"zod": "^3.25.76",
|
|
149
|
-
"@likec4/
|
|
150
|
-
"@likec4/
|
|
151
|
-
"@likec4/
|
|
152
|
-
"@likec4/log": "1.
|
|
150
|
+
"@likec4/core": "1.51.0",
|
|
151
|
+
"@likec4/config": "1.51.0",
|
|
152
|
+
"@likec4/layouts": "1.51.0",
|
|
153
|
+
"@likec4/log": "1.51.0"
|
|
153
154
|
},
|
|
154
155
|
"peerDependencies": {
|
|
155
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
156
|
+
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
156
157
|
"bundle-require": "^5.1.0",
|
|
157
158
|
"esbuild": "0.27.3"
|
|
158
159
|
},
|
|
@@ -168,34 +169,23 @@
|
|
|
168
169
|
}
|
|
169
170
|
},
|
|
170
171
|
"devDependencies": {
|
|
171
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
172
|
-
"@msgpack/msgpack": "^3.1.2",
|
|
172
|
+
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
173
173
|
"@types/natural-compare-lite": "^1.4.2",
|
|
174
|
-
"@types/node": "~22.19.
|
|
174
|
+
"@types/node": "~22.19.11",
|
|
175
175
|
"@types/picomatch": "^4.0.2",
|
|
176
176
|
"@types/vscode": "^1.106.1",
|
|
177
177
|
"@types/which": "^3.0.4",
|
|
178
178
|
"bundle-require": "^5.1.0",
|
|
179
179
|
"esbuild": "0.27.3",
|
|
180
|
-
"fast-equals": "^6.0.0",
|
|
181
|
-
"indent-string": "^5.0.0",
|
|
182
180
|
"langium-cli": "3.5.2",
|
|
183
|
-
"obuild": "^0.4.
|
|
181
|
+
"obuild": "^0.4.31",
|
|
184
182
|
"oxlint": "1.43.0",
|
|
185
|
-
"p-debounce": "5.1.0",
|
|
186
|
-
"p-queue": "8.1.1",
|
|
187
|
-
"p-timeout": "6.1.4",
|
|
188
|
-
"picomatch": "^4.0.3",
|
|
189
|
-
"pretty-ms": "^9.3.0",
|
|
190
|
-
"remeda": "^2.33.5",
|
|
191
|
-
"strip-indent": "^4.1.1",
|
|
192
183
|
"tsx": "4.21.0",
|
|
193
|
-
"turbo": "2.8.
|
|
184
|
+
"turbo": "2.8.12",
|
|
194
185
|
"typescript": "5.9.3",
|
|
195
|
-
"ufo": "1.6.3",
|
|
196
186
|
"vitest": "4.0.18",
|
|
187
|
+
"@likec4/tsconfig": "1.51.0",
|
|
197
188
|
"@likec4/devops": "1.42.0",
|
|
198
|
-
"@likec4/tsconfig": "1.49.0",
|
|
199
189
|
"@likec4/icons": "1.46.4"
|
|
200
190
|
},
|
|
201
191
|
"scripts": {
|
package/bundled/package.json
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
# Licenses of Bundled Dependencies
|
|
2
|
-
|
|
3
|
-
The published artifact additionally contains code with the following licenses:
|
|
4
|
-
ISC, MIT
|
|
5
|
-
|
|
6
|
-
# Bundled Dependencies
|
|
7
|
-
|
|
8
|
-
## @msgpack/msgpack
|
|
9
|
-
|
|
10
|
-
License: ISC
|
|
11
|
-
By: The MessagePack community
|
|
12
|
-
Repository: https://github.com/msgpack/msgpack-javascript
|
|
13
|
-
|
|
14
|
-
> Copyright 2019 The MessagePack Community.
|
|
15
|
-
>
|
|
16
|
-
> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
17
|
-
>
|
|
18
|
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
-
|
|
20
|
-
---------------------------------------
|
|
21
|
-
|
|
22
|
-
## eventemitter3
|
|
23
|
-
|
|
24
|
-
License: MIT
|
|
25
|
-
By: Arnout Kazemier
|
|
26
|
-
Repository: https://github.com/primus/eventemitter3
|
|
27
|
-
|
|
28
|
-
> The MIT License (MIT)
|
|
29
|
-
>
|
|
30
|
-
> Copyright (c) 2014 Arnout Kazemier
|
|
31
|
-
>
|
|
32
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
33
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
34
|
-
> in the Software without restriction, including without limitation the rights
|
|
35
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
36
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
37
|
-
> furnished to do so, subject to the following conditions:
|
|
38
|
-
>
|
|
39
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
40
|
-
> copies or substantial portions of the Software.
|
|
41
|
-
>
|
|
42
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
43
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
44
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
45
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
46
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
47
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
48
|
-
> SOFTWARE.
|
|
49
|
-
|
|
50
|
-
---------------------------------------
|
|
51
|
-
|
|
52
|
-
## fast-equals
|
|
53
|
-
|
|
54
|
-
License: MIT
|
|
55
|
-
By: Tony Quetano
|
|
56
|
-
Repository: https://github.com/planttheidea/fast-equals
|
|
57
|
-
|
|
58
|
-
> MIT License
|
|
59
|
-
>
|
|
60
|
-
> Copyright (c) 2025 Tony Quetano
|
|
61
|
-
>
|
|
62
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
63
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
64
|
-
> in the Software without restriction, including without limitation the rights
|
|
65
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
66
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
67
|
-
> furnished to do so, subject to the following conditions:
|
|
68
|
-
>
|
|
69
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
70
|
-
> copies or substantial portions of the Software.
|
|
71
|
-
>
|
|
72
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
73
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
74
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
75
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
76
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
77
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
78
|
-
> SOFTWARE.
|
|
79
|
-
|
|
80
|
-
---------------------------------------
|
|
81
|
-
|
|
82
|
-
## p-queue, p-timeout, parse-ms, pretty-ms, strip-indent
|
|
83
|
-
|
|
84
|
-
License: MIT
|
|
85
|
-
Repository: https://github.com/sindresorhus/p-queue
|
|
86
|
-
|
|
87
|
-
License: MIT
|
|
88
|
-
By: Sindre Sorhus
|
|
89
|
-
Repository: https://github.com/sindresorhus/p-timeout
|
|
90
|
-
|
|
91
|
-
License: MIT
|
|
92
|
-
By: Sindre Sorhus
|
|
93
|
-
Repository: https://github.com/sindresorhus/parse-ms
|
|
94
|
-
|
|
95
|
-
License: MIT
|
|
96
|
-
By: Sindre Sorhus
|
|
97
|
-
Repository: https://github.com/sindresorhus/pretty-ms
|
|
98
|
-
|
|
99
|
-
License: MIT
|
|
100
|
-
By: Sindre Sorhus
|
|
101
|
-
Repository: https://github.com/sindresorhus/strip-indent
|
|
102
|
-
|
|
103
|
-
> MIT License
|
|
104
|
-
>
|
|
105
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
106
|
-
>
|
|
107
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
108
|
-
>
|
|
109
|
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
110
|
-
>
|
|
111
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
112
|
-
|
|
113
|
-
---------------------------------------
|
|
114
|
-
|
|
115
|
-
## picomatch
|
|
116
|
-
|
|
117
|
-
License: MIT
|
|
118
|
-
By: Jon Schlinkert
|
|
119
|
-
Repository: https://github.com/micromatch/picomatch
|
|
120
|
-
|
|
121
|
-
> The MIT License (MIT)
|
|
122
|
-
>
|
|
123
|
-
> Copyright (c) 2017-present, Jon Schlinkert.
|
|
124
|
-
>
|
|
125
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
126
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
127
|
-
> in the Software without restriction, including without limitation the rights
|
|
128
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
129
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
130
|
-
> furnished to do so, subject to the following conditions:
|
|
131
|
-
>
|
|
132
|
-
> The above copyright notice and this permission notice shall be included in
|
|
133
|
-
> all copies or substantial portions of the Software.
|
|
134
|
-
>
|
|
135
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
136
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
137
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
138
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
139
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
140
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
141
|
-
> THE SOFTWARE.
|
|
142
|
-
|
|
143
|
-
---------------------------------------
|
|
144
|
-
|
|
145
|
-
## remeda
|
|
146
|
-
|
|
147
|
-
License: MIT
|
|
148
|
-
By: Łukasz Sentkiewicz
|
|
149
|
-
Repository: https://github.com/remeda/remeda
|
|
150
|
-
|
|
151
|
-
---------------------------------------
|
|
152
|
-
|
|
153
|
-
## ufo
|
|
154
|
-
|
|
155
|
-
License: MIT
|
|
156
|
-
Repository: https://github.com/unjs/ufo
|
|
157
|
-
|
|
158
|
-
> MIT License
|
|
159
|
-
>
|
|
160
|
-
> Copyright (c) Pooya Parsa <pooya@pi0.io>
|
|
161
|
-
>
|
|
162
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
163
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
164
|
-
> in the Software without restriction, including without limitation the rights
|
|
165
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
166
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
167
|
-
> furnished to do so, subject to the following conditions:
|
|
168
|
-
>
|
|
169
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
170
|
-
> copies or substantial portions of the Software.
|
|
171
|
-
>
|
|
172
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
173
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
174
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
175
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
176
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
177
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
178
|
-
> SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as logger}from"./logger.mjs";import{C as e}from"./libs/remeda.mjs";import{GraphvizWasmAdapter,QueueGraphvizLayoter}from"@likec4/layouts";import{GraphvizBinaryAdapter}from"@likec4/layouts/graphviz/binary";import which from"which";function graphvizBinPath(){try{return which.sync(`dot`)}catch(t){return logger.error(`Error checking for native Graphviz:`,{error:t}),null}}const ConfigurableLayouter={likec4:{Layouter(i){logger.debug(`Creating ConfigurableLayouter`);let a=new QueueGraphvizLayoter;return i.shared.workspace.ConfigurationProvider.onConfigurationSectionUpdate(r=>{if(logger.debug(`Configuration update: {update}`,{update:r}),r.section!==i.LanguageMetaData.languageId){logger.debug(`Ignoring configuration update as it is not for ${i.LanguageMetaData.languageId}`);return}try{let{mode:o,path:s}=r.configuration.graphviz??{mode:`wasm`,path:``};if(o!==`wasm`){let n=e(s)?graphvizBinPath():s;if(!e(n)){a.changePort(new GraphvizBinaryAdapter(n)),logger.info`use graphviz binary: ${n}`;return}logger.warn(`No Graphviz binaries found on PATH, use graphviz wasm`),i.shared.lsp.Connection?.window.showWarningMessage(`No Graphviz binaries found on PATH, set path to binaries in settings.`)}a.changePort(new GraphvizWasmAdapter),logger.info(`use graphviz wasm`)}catch(t){logger.error(`Failed to update configuration`,{error:t})}}),a}}};export{ConfigurableLayouter as t};
|