@likec4/language-server 1.47.0 → 1.49.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/browser/package.json +2 -2
- package/browser-worker/package.json +2 -2
- package/bundled/package.json +4 -0
- package/dist/THIRD-PARTY-LICENSES.md +178 -0
- package/dist/_chunks/ConfigurableLayouter.mjs +1 -0
- package/dist/_chunks/LikeC4FileSystem.mjs +3 -0
- package/dist/_chunks/LikeC4Views.mjs +34 -0
- package/dist/_chunks/ProjectsManager.mjs +1 -0
- package/dist/_chunks/WithMCPServer.mjs +481 -0
- package/dist/_chunks/icons.mjs +2 -0
- package/dist/_chunks/index.d.mts +3107 -0
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -0
- package/dist/_chunks/libs/eventemitter3.mjs +1 -0
- package/dist/_chunks/libs/fast-equals.mjs +1 -0
- package/dist/_chunks/libs/p-queue.mjs +1 -0
- package/dist/_chunks/libs/parse-ms.mjs +1 -0
- package/dist/_chunks/libs/picomatch.mjs +1 -0
- package/dist/_chunks/libs/pretty-ms.mjs +1 -0
- package/dist/_chunks/libs/remeda.mjs +1 -0
- package/dist/_chunks/libs/strip-indent.mjs +1 -0
- package/dist/_chunks/libs/ufo.mjs +1 -0
- package/dist/_chunks/logger.mjs +1 -0
- package/dist/_chunks/rolldown-runtime.mjs +1 -0
- package/dist/_chunks/utils.mjs +1 -0
- package/dist/browser/index.d.mts +10 -0
- package/dist/browser/index.mjs +1 -0
- package/dist/browser/worker.d.mts +1 -0
- package/dist/browser/worker.mjs +1 -0
- package/dist/bundled.d.mts +27 -0
- package/dist/bundled.mjs +1 -4853
- package/dist/filesystem/index.d.mts +2 -0
- package/dist/filesystem/index.mjs +1 -0
- package/dist/index.d.mts +39 -0
- package/dist/index.mjs +1 -0
- package/dist/likec4lib.d.mts +16 -0
- package/dist/likec4lib.mjs +1 -0
- package/dist/mcp/index.d.mts +2 -0
- package/dist/mcp/index.mjs +1 -0
- package/dist/module.d.mts +126 -0
- package/dist/module.mjs +1 -0
- package/dist/protocol.d.mts +315 -0
- package/dist/protocol.mjs +1 -0
- package/filesystem/package.json +4 -0
- package/likec4lib/package.json +2 -2
- package/mcp/package.json +4 -0
- package/module/package.json +4 -0
- package/package.json +128 -62
- package/protocol/package.json +2 -2
- package/LICENSE +0 -21
- package/dist/LikeC4LanguageServices.d.ts +0 -115
- package/dist/LikeC4LanguageServices.js +0 -164
- package/dist/Rpc.d.ts +0 -9
- package/dist/Rpc.js +0 -276
- package/dist/ast.d.ts +0 -226
- package/dist/ast.js +0 -264
- package/dist/browser-worker.d.ts +0 -1
- package/dist/browser-worker.js +0 -4
- package/dist/browser.d.ts +0 -10
- package/dist/browser.js +0 -34
- package/dist/bundled.d.ts +0 -8
- package/dist/bundled.js +0 -44
- package/dist/documentation/documentation-provider.d.ts +0 -8
- package/dist/documentation/documentation-provider.js +0 -51
- package/dist/documentation/index.d.ts +0 -1
- package/dist/documentation/index.js +0 -1
- package/dist/empty.d.ts +0 -2
- package/dist/empty.js +0 -2
- package/dist/filesystem/ChokidarWatcher.d.ts +0 -19
- package/dist/filesystem/ChokidarWatcher.js +0 -133
- package/dist/filesystem/FileSystemWatcher.d.ts +0 -19
- package/dist/filesystem/FileSystemWatcher.js +0 -14
- package/dist/filesystem/LikeC4FileSystem.d.ts +0 -3
- package/dist/filesystem/LikeC4FileSystem.js +0 -140
- package/dist/filesystem/index.d.ts +0 -55
- package/dist/filesystem/index.js +0 -29
- package/dist/formatting/LikeC4Formatter.d.ts +0 -59
- package/dist/formatting/LikeC4Formatter.js +0 -637
- package/dist/formatting/utils.d.ts +0 -6
- package/dist/formatting/utils.js +0 -18
- package/dist/generated/ast.d.ts +0 -1411
- package/dist/generated/ast.js +0 -2207
- package/dist/generated/grammar.d.ts +0 -6
- package/dist/generated/grammar.js +0 -7
- package/dist/generated/module.d.ts +0 -14
- package/dist/generated/module.js +0 -27
- package/dist/generated-lib/icons.d.ts +0 -1
- package/dist/generated-lib/icons.js +0 -18
- package/dist/index.d.ts +0 -37
- package/dist/index.js +0 -54
- package/dist/likec4lib.d.ts +0 -6
- package/dist/likec4lib.js +0 -7
- package/dist/logger.d.ts +0 -17
- package/dist/logger.js +0 -81
- package/dist/lsp/CodeActionProvider.d.ts +0 -14
- package/dist/lsp/CodeActionProvider.js +0 -33
- package/dist/lsp/CodeLensProvider.d.ts +0 -9
- package/dist/lsp/CodeLensProvider.js +0 -44
- package/dist/lsp/CompletionProvider.d.ts +0 -13
- package/dist/lsp/CompletionProvider.js +0 -238
- package/dist/lsp/DocumentHighlightProvider.d.ts +0 -9
- package/dist/lsp/DocumentHighlightProvider.js +0 -10
- package/dist/lsp/DocumentLinkProvider.d.ts +0 -11
- package/dist/lsp/DocumentLinkProvider.js +0 -58
- package/dist/lsp/DocumentSymbolProvider.d.ts +0 -33
- package/dist/lsp/DocumentSymbolProvider.js +0 -317
- package/dist/lsp/HoverProvider.d.ts +0 -10
- package/dist/lsp/HoverProvider.js +0 -106
- package/dist/lsp/RenameProvider.d.ts +0 -5
- package/dist/lsp/RenameProvider.js +0 -6
- package/dist/lsp/SemanticTokenProvider.d.ts +0 -19
- package/dist/lsp/SemanticTokenProvider.js +0 -305
- package/dist/lsp/index.d.ts +0 -8
- package/dist/lsp/index.js +0 -9
- package/dist/mcp/MCPServerFactory.d.ts +0 -8
- package/dist/mcp/MCPServerFactory.js +0 -73
- package/dist/mcp/NoopLikeC4MCPServer.d.ts +0 -9
- package/dist/mcp/NoopLikeC4MCPServer.js +0 -17
- package/dist/mcp/interfaces.d.ts +0 -13
- package/dist/mcp/interfaces.js +0 -4
- package/dist/mcp/server/StdioLikeC4MCPServer.d.ts +0 -16
- package/dist/mcp/server/StdioLikeC4MCPServer.js +0 -51
- package/dist/mcp/server/StreamableLikeC4MCPServer.d.ts +0 -16
- package/dist/mcp/server/StreamableLikeC4MCPServer.js +0 -121
- package/dist/mcp/server/WithMCPServer.d.ts +0 -4
- package/dist/mcp/server/WithMCPServer.js +0 -54
- package/dist/mcp/tools/_common.d.ts +0 -88
- package/dist/mcp/tools/_common.js +0 -49
- package/dist/mcp/tools/find-relationships.d.ts +0 -202
- package/dist/mcp/tools/find-relationships.js +0 -150
- package/dist/mcp/tools/list-projects.d.ts +0 -194
- package/dist/mcp/tools/list-projects.js +0 -62
- package/dist/mcp/tools/open-view.d.ts +0 -200
- package/dist/mcp/tools/open-view.js +0 -52
- package/dist/mcp/tools/read-deployment.d.ts +0 -200
- package/dist/mcp/tools/read-deployment.js +0 -150
- package/dist/mcp/tools/read-element.d.ts +0 -200
- package/dist/mcp/tools/read-element.js +0 -218
- package/dist/mcp/tools/read-project-summary.d.ts +0 -198
- package/dist/mcp/tools/read-project-summary.js +0 -176
- package/dist/mcp/tools/read-view.d.ts +0 -200
- package/dist/mcp/tools/read-view.js +0 -203
- package/dist/mcp/tools/search-element.d.ts +0 -198
- package/dist/mcp/tools/search-element.js +0 -177
- package/dist/mcp/utils.d.ts +0 -18
- package/dist/mcp/utils.js +0 -48
- package/dist/model/builder/MergedExtends.d.ts +0 -13
- package/dist/model/builder/MergedExtends.js +0 -74
- package/dist/model/builder/MergedSpecification.d.ts +0 -32
- package/dist/model/builder/MergedSpecification.js +0 -175
- package/dist/model/builder/buildModel.d.ts +0 -16
- package/dist/model/builder/buildModel.js +0 -245
- package/dist/model/deployments-index.d.ts +0 -10
- package/dist/model/deployments-index.js +0 -102
- package/dist/model/fqn-index.d.ts +0 -61
- package/dist/model/fqn-index.js +0 -253
- package/dist/model/index.d.ts +0 -6
- package/dist/model/index.js +0 -6
- package/dist/model/model-builder.d.ts +0 -54
- package/dist/model/model-builder.js +0 -233
- package/dist/model/model-locator.d.ts +0 -39
- package/dist/model/model-locator.js +0 -240
- package/dist/model/model-parser-where.d.ts +0 -4
- package/dist/model/model-parser-where.js +0 -81
- package/dist/model/model-parser.d.ts +0 -645
- package/dist/model/model-parser.js +0 -133
- package/dist/model/parser/Base.d.ts +0 -69
- package/dist/model/parser/Base.js +0 -382
- package/dist/model/parser/DeploymentModelParser.d.ts +0 -71
- package/dist/model/parser/DeploymentModelParser.js +0 -176
- package/dist/model/parser/DeploymentViewParser.d.ts +0 -75
- package/dist/model/parser/DeploymentViewParser.js +0 -86
- package/dist/model/parser/FqnRefParser.d.ts +0 -66
- package/dist/model/parser/FqnRefParser.js +0 -382
- package/dist/model/parser/GlobalsParser.d.ts +0 -109
- package/dist/model/parser/GlobalsParser.js +0 -84
- package/dist/model/parser/ImportsParser.d.ts +0 -46
- package/dist/model/parser/ImportsParser.js +0 -24
- package/dist/model/parser/ModelParser.d.ts +0 -71
- package/dist/model/parser/ModelParser.js +0 -209
- package/dist/model/parser/PredicatesParser.d.ts +0 -75
- package/dist/model/parser/PredicatesParser.js +0 -45
- package/dist/model/parser/SpecificationParser.d.ts +0 -53
- package/dist/model/parser/SpecificationParser.js +0 -113
- package/dist/model/parser/ValueConverter.d.ts +0 -4
- package/dist/model/parser/ValueConverter.js +0 -12
- package/dist/model/parser/ViewsParser.d.ts +0 -112
- package/dist/model/parser/ViewsParser.js +0 -492
- package/dist/model-change/ModelChanges.d.ts +0 -18
- package/dist/model-change/ModelChanges.js +0 -129
- package/dist/model-change/changeElementStyle.d.ts +0 -16
- package/dist/model-change/changeElementStyle.js +0 -134
- package/dist/model-change/changeViewLayout.d.ts +0 -12
- package/dist/model-change/changeViewLayout.js +0 -28
- package/dist/model-change/removeManualLayoutV1.d.ts +0 -7
- package/dist/model-change/removeManualLayoutV1.js +0 -27
- package/dist/module.d.ts +0 -92
- package/dist/module.js +0 -143
- package/dist/protocol.d.ts +0 -289
- package/dist/protocol.js +0 -123
- package/dist/references/index.d.ts +0 -3
- package/dist/references/index.js +0 -3
- package/dist/references/name-provider.d.ts +0 -9
- package/dist/references/name-provider.js +0 -37
- package/dist/references/scope-computation.d.ts +0 -20
- package/dist/references/scope-computation.js +0 -288
- package/dist/references/scope-provider.d.ts +0 -40
- package/dist/references/scope-provider.js +0 -239
- package/dist/shared/NodeKindProvider.d.ts +0 -15
- package/dist/shared/NodeKindProvider.js +0 -57
- package/dist/shared/WorkspaceSymbolProvider.d.ts +0 -3
- package/dist/shared/WorkspaceSymbolProvider.js +0 -3
- package/dist/shared/index.d.ts +0 -2
- package/dist/shared/index.js +0 -2
- package/dist/test/index.d.ts +0 -1
- package/dist/test/index.js +0 -1
- package/dist/test/testServices.d.ts +0 -64
- package/dist/test/testServices.js +0 -210
- package/dist/utils/disposable.d.ts +0 -8
- package/dist/utils/disposable.js +0 -26
- package/dist/utils/elementRef.d.ts +0 -11
- package/dist/utils/elementRef.js +0 -33
- package/dist/utils/fqnRef.d.ts +0 -11
- package/dist/utils/fqnRef.js +0 -63
- package/dist/utils/index.d.ts +0 -11
- package/dist/utils/index.js +0 -35
- package/dist/utils/printDocs.d.ts +0 -2
- package/dist/utils/printDocs.js +0 -1
- package/dist/utils/projectId.d.ts +0 -4
- package/dist/utils/projectId.js +0 -16
- package/dist/utils/stringHash.d.ts +0 -1
- package/dist/utils/stringHash.js +0 -5
- package/dist/validation/DocumentValidator.d.ts +0 -11
- package/dist/validation/DocumentValidator.js +0 -17
- package/dist/validation/_shared.d.ts +0 -3
- package/dist/validation/_shared.js +0 -26
- package/dist/validation/deployment-checks.d.ts +0 -7
- package/dist/validation/deployment-checks.js +0 -140
- package/dist/validation/dynamic-view.d.ts +0 -6
- package/dist/validation/dynamic-view.js +0 -67
- package/dist/validation/element-ref.d.ts +0 -4
- package/dist/validation/element-ref.js +0 -12
- package/dist/validation/element.d.ts +0 -4
- package/dist/validation/element.js +0 -49
- package/dist/validation/imports.d.ts +0 -4
- package/dist/validation/imports.js +0 -46
- package/dist/validation/index.d.ts +0 -15
- package/dist/validation/index.js +0 -167
- package/dist/validation/property-checks.d.ts +0 -7
- package/dist/validation/property-checks.js +0 -108
- package/dist/validation/relation.d.ts +0 -6
- package/dist/validation/relation.js +0 -141
- package/dist/validation/specification.d.ts +0 -12
- package/dist/validation/specification.js +0 -190
- package/dist/validation/view-checks.d.ts +0 -4
- package/dist/validation/view-checks.js +0 -46
- package/dist/validation/view-predicates/fqn-expr-with.d.ts +0 -4
- package/dist/validation/view-predicates/fqn-expr-with.js +0 -43
- package/dist/validation/view-predicates/fqn-ref-expr.d.ts +0 -4
- package/dist/validation/view-predicates/fqn-ref-expr.js +0 -51
- package/dist/validation/view-predicates/incoming.d.ts +0 -4
- package/dist/validation/view-predicates/incoming.js +0 -16
- package/dist/validation/view-predicates/index.d.ts +0 -6
- package/dist/validation/view-predicates/index.js +0 -6
- package/dist/validation/view-predicates/outgoing.d.ts +0 -4
- package/dist/validation/view-predicates/outgoing.js +0 -20
- package/dist/validation/view-predicates/relation-expr.d.ts +0 -4
- package/dist/validation/view-predicates/relation-expr.js +0 -46
- package/dist/validation/view-predicates/relation-with.d.ts +0 -4
- package/dist/validation/view-predicates/relation-with.js +0 -16
- package/dist/validation/view.d.ts +0 -4
- package/dist/validation/view.js +0 -42
- package/dist/view-utils/assignNavigateTo.d.ts +0 -2
- package/dist/view-utils/assignNavigateTo.js +0 -27
- package/dist/view-utils/index.d.ts +0 -2
- package/dist/view-utils/index.js +0 -2
- package/dist/view-utils/manual-layout.d.ts +0 -13
- package/dist/view-utils/manual-layout.js +0 -149
- package/dist/views/ConfigurableLayouter.d.ts +0 -7
- package/dist/views/ConfigurableLayouter.js +0 -51
- package/dist/views/LikeC4ManualLayouts.d.ts +0 -42
- package/dist/views/LikeC4ManualLayouts.js +0 -209
- package/dist/views/LikeC4Views.d.ts +0 -89
- package/dist/views/LikeC4Views.js +0 -216
- package/dist/views/index.d.ts +0 -4
- package/dist/views/index.js +0 -11
- package/dist/workspace/AstNodeDescriptionProvider.d.ts +0 -7
- package/dist/workspace/AstNodeDescriptionProvider.js +0 -18
- package/dist/workspace/IndexManager.d.ts +0 -10
- package/dist/workspace/IndexManager.js +0 -26
- package/dist/workspace/LangiumDocuments.d.ts +0 -29
- package/dist/workspace/LangiumDocuments.js +0 -104
- package/dist/workspace/ProjectsManager.d.ts +0 -134
- package/dist/workspace/ProjectsManager.js +0 -610
- package/dist/workspace/WorkspaceManager.d.ts +0 -31
- package/dist/workspace/WorkspaceManager.js +0 -132
- package/dist/workspace/index.d.ts +0 -5
- package/dist/workspace/index.js +0 -5
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.49.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
"directory": "packages/language-server"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=22.
|
|
24
|
+
"node": ">=22.22.0"
|
|
25
25
|
},
|
|
26
|
-
"engineStrict": true,
|
|
27
26
|
"type": "module",
|
|
28
27
|
"sideEffects": false,
|
|
29
28
|
"bin": {
|
|
@@ -32,114 +31,178 @@
|
|
|
32
31
|
"exports": {
|
|
33
32
|
".": {
|
|
34
33
|
"sources": "./src/index.ts",
|
|
34
|
+
"browser": {
|
|
35
|
+
"sources": "./src/browser/index.ts",
|
|
36
|
+
"default": {
|
|
37
|
+
"types": "./dist/browser/index.d.mts",
|
|
38
|
+
"import": "./dist/browser/index.mjs",
|
|
39
|
+
"default": "./dist/browser/index.mjs"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"node": {
|
|
43
|
+
"sources": "./src/index.ts",
|
|
44
|
+
"default": {
|
|
45
|
+
"types": "./dist/index.d.mts",
|
|
46
|
+
"import": "./dist/index.mjs",
|
|
47
|
+
"default": "./dist/index.mjs"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
35
50
|
"default": {
|
|
36
|
-
"types": "./dist/index.d.
|
|
37
|
-
"import": "./dist/index.
|
|
38
|
-
"default": "./dist/index.
|
|
51
|
+
"types": "./dist/index.d.mts",
|
|
52
|
+
"import": "./dist/index.mjs",
|
|
53
|
+
"default": "./dist/index.mjs"
|
|
54
|
+
}
|
|
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"
|
|
39
62
|
}
|
|
40
63
|
},
|
|
41
64
|
"./likec4lib": {
|
|
42
65
|
"sources": "./src/likec4lib.ts",
|
|
43
66
|
"default": {
|
|
44
|
-
"types": "./dist/likec4lib.d.
|
|
45
|
-
"import": "./dist/likec4lib.
|
|
46
|
-
"default": "./dist/likec4lib.
|
|
67
|
+
"types": "./dist/likec4lib.d.mts",
|
|
68
|
+
"import": "./dist/likec4lib.mjs",
|
|
69
|
+
"default": "./dist/likec4lib.mjs"
|
|
47
70
|
}
|
|
48
71
|
},
|
|
49
72
|
"./browser-worker": {
|
|
50
|
-
"sources": "./src/browser
|
|
73
|
+
"sources": "./src/browser/worker.ts",
|
|
51
74
|
"default": {
|
|
52
|
-
"types": "./dist/browser
|
|
53
|
-
"import": "./dist/browser
|
|
54
|
-
"default": "./dist/browser
|
|
75
|
+
"types": "./dist/browser/worker.d.mts",
|
|
76
|
+
"import": "./dist/browser/worker.mjs",
|
|
77
|
+
"default": "./dist/browser/worker.mjs"
|
|
55
78
|
}
|
|
56
79
|
},
|
|
57
80
|
"./browser": {
|
|
58
|
-
"sources": "./src/browser.ts",
|
|
81
|
+
"sources": "./src/browser/index.ts",
|
|
59
82
|
"default": {
|
|
60
|
-
"types": "./dist/browser.d.
|
|
61
|
-
"import": "./dist/browser.
|
|
62
|
-
"default": "./dist/browser.
|
|
83
|
+
"types": "./dist/browser/index.d.mts",
|
|
84
|
+
"import": "./dist/browser/index.mjs",
|
|
85
|
+
"default": "./dist/browser/index.mjs"
|
|
63
86
|
}
|
|
64
87
|
},
|
|
65
88
|
"./protocol": {
|
|
66
89
|
"sources": "./src/protocol.ts",
|
|
67
90
|
"default": {
|
|
68
|
-
"types": "./dist/protocol.d.
|
|
69
|
-
"import": "./dist/protocol.
|
|
70
|
-
"default": "./dist/protocol.
|
|
91
|
+
"types": "./dist/protocol.d.mts",
|
|
92
|
+
"import": "./dist/protocol.mjs",
|
|
93
|
+
"default": "./dist/protocol.mjs"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"./mcp": {
|
|
97
|
+
"sources": "./src/mcp/index.ts",
|
|
98
|
+
"default": {
|
|
99
|
+
"types": "./dist/mcp/index.d.mts",
|
|
100
|
+
"import": "./dist/mcp/index.mjs",
|
|
101
|
+
"default": "./dist/mcp/index.mjs"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"./module": {
|
|
105
|
+
"sources": "./src/module.ts",
|
|
106
|
+
"default": {
|
|
107
|
+
"types": "./dist/module.d.mts",
|
|
108
|
+
"import": "./dist/module.mjs",
|
|
109
|
+
"default": "./dist/module.mjs"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"./filesystem": {
|
|
113
|
+
"sources": "./src/filesystem/index.ts",
|
|
114
|
+
"default": {
|
|
115
|
+
"types": "./dist/filesystem/index.d.mts",
|
|
116
|
+
"import": "./dist/filesystem/index.mjs",
|
|
117
|
+
"default": "./dist/filesystem/index.mjs"
|
|
71
118
|
}
|
|
72
119
|
},
|
|
73
|
-
"./
|
|
120
|
+
"./package.json": "./package.json"
|
|
74
121
|
},
|
|
75
122
|
"publishConfig": {
|
|
76
123
|
"registry": "https://registry.npmjs.org",
|
|
77
124
|
"access": "public"
|
|
78
125
|
},
|
|
79
126
|
"dependencies": {
|
|
80
|
-
"@
|
|
127
|
+
"@hono/mcp": "^0.2.3",
|
|
128
|
+
"@hono/node-server": "^1.19.9",
|
|
129
|
+
"hono": "^4.11.9",
|
|
130
|
+
"@hpcc-js/wasm-graphviz": "1.21.0",
|
|
131
|
+
"@smithy/util-base64": "^4.3.0",
|
|
132
|
+
"chokidar": "^5.0.0",
|
|
133
|
+
"defu": "^6.1.4",
|
|
134
|
+
"fdir": "6.4.0",
|
|
135
|
+
"immer": "^11.1.3",
|
|
136
|
+
"json5": "^2.2.3",
|
|
137
|
+
"langium": "3.5.0",
|
|
138
|
+
"nano-spawn": "^2.0.0",
|
|
139
|
+
"std-env": "^3.10.0",
|
|
140
|
+
"type-fest": "^4.41.0",
|
|
141
|
+
"vscode-jsonrpc": "8.2.1",
|
|
142
|
+
"vscode-languageserver": "9.0.1",
|
|
143
|
+
"vscode-languageserver-protocol": "3.17.5",
|
|
144
|
+
"vscode-languageserver-textdocument": "1.0.11",
|
|
145
|
+
"vscode-languageserver-types": "3.17.5",
|
|
146
|
+
"vscode-uri": "3.1.0",
|
|
147
|
+
"which": "^5.0.0",
|
|
148
|
+
"zod": "^3.25.76",
|
|
149
|
+
"@likec4/config": "1.49.0",
|
|
150
|
+
"@likec4/layouts": "1.49.0",
|
|
151
|
+
"@likec4/core": "1.49.0",
|
|
152
|
+
"@likec4/log": "1.49.0"
|
|
153
|
+
},
|
|
154
|
+
"peerDependencies": {
|
|
155
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
81
156
|
"bundle-require": "^5.1.0",
|
|
82
|
-
"esbuild": "0.27.
|
|
157
|
+
"esbuild": "0.27.3"
|
|
158
|
+
},
|
|
159
|
+
"peerDependenciesMeta": {
|
|
160
|
+
"esbuild": {
|
|
161
|
+
"optional": true
|
|
162
|
+
},
|
|
163
|
+
"bundle-require": {
|
|
164
|
+
"optional": true
|
|
165
|
+
},
|
|
166
|
+
"@modelcontextprotocol/sdk": {
|
|
167
|
+
"optional": true
|
|
168
|
+
}
|
|
83
169
|
},
|
|
84
170
|
"devDependencies": {
|
|
85
|
-
"@
|
|
86
|
-
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
171
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
87
172
|
"@msgpack/msgpack": "^3.1.2",
|
|
88
|
-
"@smithy/util-base64": "^4.3.0",
|
|
89
173
|
"@types/natural-compare-lite": "^1.4.2",
|
|
90
|
-
"@types/node": "~22.19.
|
|
174
|
+
"@types/node": "~22.19.10",
|
|
91
175
|
"@types/picomatch": "^4.0.2",
|
|
92
176
|
"@types/vscode": "^1.106.1",
|
|
93
177
|
"@types/which": "^3.0.4",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"esm-env": "^1.2.2",
|
|
178
|
+
"bundle-require": "^5.1.0",
|
|
179
|
+
"esbuild": "0.27.3",
|
|
97
180
|
"fast-equals": "^6.0.0",
|
|
98
|
-
"fdir": "6.4.0",
|
|
99
|
-
"hono": "^4.11.1",
|
|
100
|
-
"immer": "^11.1.0",
|
|
101
181
|
"indent-string": "^5.0.0",
|
|
102
|
-
"json5": "^2.2.3",
|
|
103
|
-
"langium": "3.5.0",
|
|
104
182
|
"langium-cli": "3.5.2",
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"natural-compare-lite": "^1.4.0",
|
|
108
|
-
"oxlint": "1.35.0",
|
|
183
|
+
"obuild": "^0.4.27",
|
|
184
|
+
"oxlint": "1.43.0",
|
|
109
185
|
"p-debounce": "5.1.0",
|
|
110
186
|
"p-queue": "8.1.1",
|
|
111
187
|
"p-timeout": "6.1.4",
|
|
112
188
|
"picomatch": "^4.0.3",
|
|
113
189
|
"pretty-ms": "^9.3.0",
|
|
114
|
-
"remeda": "^2.
|
|
190
|
+
"remeda": "^2.33.5",
|
|
115
191
|
"strip-indent": "^4.1.1",
|
|
116
192
|
"tsx": "4.21.0",
|
|
117
|
-
"turbo": "2.
|
|
118
|
-
"type-fest": "^4.41.0",
|
|
193
|
+
"turbo": "2.8.3",
|
|
119
194
|
"typescript": "5.9.3",
|
|
120
|
-
"ufo": "1.6.
|
|
121
|
-
"
|
|
122
|
-
"vitest": "4.0.16",
|
|
123
|
-
"vscode-jsonrpc": "8.2.1",
|
|
124
|
-
"vscode-languageserver": "9.0.1",
|
|
125
|
-
"vscode-languageserver-protocol": "3.17.5",
|
|
126
|
-
"vscode-languageserver-types": "3.17.5",
|
|
127
|
-
"vscode-uri": "3.1.0",
|
|
128
|
-
"which": "^5.0.0",
|
|
129
|
-
"zod": "^3.25.76",
|
|
130
|
-
"@likec4/config": "1.47.0",
|
|
131
|
-
"@likec4/core": "1.47.0",
|
|
132
|
-
"@likec4/icons": "1.46.4",
|
|
195
|
+
"ufo": "1.6.3",
|
|
196
|
+
"vitest": "4.0.18",
|
|
133
197
|
"@likec4/devops": "1.42.0",
|
|
134
|
-
"@likec4/
|
|
135
|
-
"@likec4/
|
|
136
|
-
"@likec4/log": "1.46.1"
|
|
198
|
+
"@likec4/tsconfig": "1.49.0",
|
|
199
|
+
"@likec4/icons": "1.46.4"
|
|
137
200
|
},
|
|
138
201
|
"scripts": {
|
|
139
202
|
"typecheck": "tsc -b --verbose",
|
|
140
|
-
"build": "
|
|
203
|
+
"build": "obuild",
|
|
141
204
|
"pack": "pnpm pack",
|
|
142
|
-
"pregenerate": "
|
|
205
|
+
"pregenerate": "node -e \"const fs=require('fs');const p=require('path');const d='src/generated';if(fs.existsSync(d)){fs.readdirSync(d).forEach(f=>{try{fs.unlinkSync(p.join(d,f))}catch(e){}})}\"",
|
|
143
206
|
"watch:langium": "langium generate --watch",
|
|
144
207
|
"watch:ts": "tsc --watch",
|
|
145
208
|
"generate": "langium generate && tsx scripts/generate-icons.ts",
|
|
@@ -153,6 +216,9 @@
|
|
|
153
216
|
"vitest:ui": "vitest --no-isolate --ui",
|
|
154
217
|
"test:watch": "vitest"
|
|
155
218
|
},
|
|
156
|
-
"types": "dist/index.d.
|
|
157
|
-
"module": "dist/index.
|
|
219
|
+
"types": "dist/index.d.mts",
|
|
220
|
+
"module": "dist/index.mjs",
|
|
221
|
+
"browser": {
|
|
222
|
+
"dist/index.mjs": "dist/browser/index.mjs"
|
|
223
|
+
}
|
|
158
224
|
}
|
package/protocol/package.json
CHANGED
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023-2025 Denis Davydkov
|
|
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,115 +0,0 @@
|
|
|
1
|
-
import type { LikeC4ProjectConfig } from '@likec4/config';
|
|
2
|
-
import { type LayoutedView, type NonEmptyArray, type ProjectId, type UnknownComputed, type UnknownLayouted } from '@likec4/core';
|
|
3
|
-
import { type LayoutedProjectsView } from '@likec4/core/compute-view';
|
|
4
|
-
import { LikeC4Model } from '@likec4/core/model';
|
|
5
|
-
import { URI } from 'langium';
|
|
6
|
-
import type { CancellationToken } from 'vscode-jsonrpc';
|
|
7
|
-
import type { Range } from 'vscode-languageserver-types';
|
|
8
|
-
import type { LikeC4ModelBuilder } from './model';
|
|
9
|
-
import type { LikeC4ModelChanges } from './model-change/ModelChanges';
|
|
10
|
-
import type { LikeC4Services } from './module';
|
|
11
|
-
import type { Locate } from './protocol';
|
|
12
|
-
import type { LikeC4Views } from './views/LikeC4Views';
|
|
13
|
-
import { ProjectsManager } from './workspace';
|
|
14
|
-
export interface LikeC4LanguageServices {
|
|
15
|
-
readonly views: LikeC4Views;
|
|
16
|
-
readonly builder: LikeC4ModelBuilder;
|
|
17
|
-
readonly workspaceUri: URI;
|
|
18
|
-
readonly projectsManager: ProjectsManager;
|
|
19
|
-
readonly editor: LikeC4ModelChanges;
|
|
20
|
-
/**
|
|
21
|
-
* Returns all projects with relevant documents
|
|
22
|
-
*/
|
|
23
|
-
projects(): NonEmptyArray<{
|
|
24
|
-
id: ProjectId;
|
|
25
|
-
folder: URI;
|
|
26
|
-
title: string;
|
|
27
|
-
documents: ReadonlyArray<URI>;
|
|
28
|
-
config: Readonly<LikeC4ProjectConfig>;
|
|
29
|
-
}>;
|
|
30
|
-
/**
|
|
31
|
-
* Returns project by ID, returns default project if no ID is specified
|
|
32
|
-
*/
|
|
33
|
-
project(projectId?: ProjectId): {
|
|
34
|
-
id: ProjectId;
|
|
35
|
-
folder: URI;
|
|
36
|
-
title: string;
|
|
37
|
-
documents: ReadonlyArray<URI>;
|
|
38
|
-
config: Readonly<LikeC4ProjectConfig>;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Computes and layouts projects overview - a special diagram
|
|
42
|
-
* that shows all projects and their relationships
|
|
43
|
-
*/
|
|
44
|
-
projectsOverview(cancelToken?: CancellationToken): Promise<LayoutedProjectsView>;
|
|
45
|
-
/**
|
|
46
|
-
* Returns {@link LikeC4Model} of the specified project, with computed views {@link ComputedView}
|
|
47
|
-
* Not ready for rendering, but enough to traverse model. Much faster than {@link layoutedModel}
|
|
48
|
-
*
|
|
49
|
-
* If no {@link project} is specified, returns for default project
|
|
50
|
-
*/
|
|
51
|
-
computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<LikeC4Model<UnknownComputed>>;
|
|
52
|
-
/**
|
|
53
|
-
* Returns {@link LikeC4Model} of the specified project, with layouted views {@link LayoutedView}
|
|
54
|
-
* Ready for rendering. Applies manual layouts if available.
|
|
55
|
-
*
|
|
56
|
-
* If no {@link project} is specified, returns for default project
|
|
57
|
-
*/
|
|
58
|
-
layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<LikeC4Model<UnknownLayouted>>;
|
|
59
|
-
/**
|
|
60
|
-
* Returns diagrams (i.e. layouted views {@link LayoutedView}) for the specified project
|
|
61
|
-
* Applies manual layouts if available.
|
|
62
|
-
*
|
|
63
|
-
* If no {@link project} is specified, returns diagrams for default project
|
|
64
|
-
*/
|
|
65
|
-
diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<LayoutedView[]>;
|
|
66
|
-
getErrors(): Array<{
|
|
67
|
-
message: string;
|
|
68
|
-
line: number;
|
|
69
|
-
range: Range;
|
|
70
|
-
sourceFsPath: string;
|
|
71
|
-
}>;
|
|
72
|
-
/**
|
|
73
|
-
* Returns the location of the specified element, relation, view or deployment element
|
|
74
|
-
*/
|
|
75
|
-
locate(params: Locate.Params): Locate.Res;
|
|
76
|
-
dispose(): Promise<void>;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Public Language Services
|
|
80
|
-
*/
|
|
81
|
-
export declare class DefaultLikeC4LanguageServices implements LikeC4LanguageServices {
|
|
82
|
-
private services;
|
|
83
|
-
readonly builder: LikeC4ModelBuilder;
|
|
84
|
-
readonly editor: LikeC4ModelChanges;
|
|
85
|
-
readonly projectsManager: ProjectsManager;
|
|
86
|
-
constructor(services: LikeC4Services);
|
|
87
|
-
get views(): LikeC4Views;
|
|
88
|
-
get workspaceUri(): URI;
|
|
89
|
-
projects(): NonEmptyArray<{
|
|
90
|
-
id: ProjectId;
|
|
91
|
-
folder: URI;
|
|
92
|
-
title: string;
|
|
93
|
-
documents: ReadonlyArray<URI>;
|
|
94
|
-
config: LikeC4ProjectConfig;
|
|
95
|
-
}>;
|
|
96
|
-
project(projectId?: ProjectId): {
|
|
97
|
-
id: ProjectId;
|
|
98
|
-
folder: URI;
|
|
99
|
-
title: string;
|
|
100
|
-
documents: ReadonlyArray<URI>;
|
|
101
|
-
config: LikeC4ProjectConfig;
|
|
102
|
-
};
|
|
103
|
-
diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<LayoutedView<UnknownLayouted>[]>;
|
|
104
|
-
computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<LikeC4Model<UnknownComputed>>;
|
|
105
|
-
layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<LikeC4Model<UnknownLayouted>>;
|
|
106
|
-
projectsOverview(cancelToken?: CancellationToken): Promise<LayoutedProjectsView>;
|
|
107
|
-
getErrors(): Array<{
|
|
108
|
-
message: string;
|
|
109
|
-
line: number;
|
|
110
|
-
range: Range;
|
|
111
|
-
sourceFsPath: string;
|
|
112
|
-
}>;
|
|
113
|
-
locate(params: Locate.Params): Locate.Res;
|
|
114
|
-
dispose(): Promise<void>;
|
|
115
|
-
}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { nonexhaustive, } from '@likec4/core';
|
|
2
|
-
import { computeProjectsView } from '@likec4/core/compute-view';
|
|
3
|
-
import { LikeC4Model } from '@likec4/core/model';
|
|
4
|
-
import { loggable } from '@likec4/log';
|
|
5
|
-
import { URI } from 'langium';
|
|
6
|
-
import { entries, hasAtLeast, indexBy, map, pipe, prop } from 'remeda';
|
|
7
|
-
import { DiagnosticSeverity } from 'vscode-languageserver-types';
|
|
8
|
-
import { logger as mainLogger } from './logger';
|
|
9
|
-
import { ProjectsManager } from './workspace';
|
|
10
|
-
const logger = mainLogger.getChild('LanguageServices');
|
|
11
|
-
/**
|
|
12
|
-
* Public Language Services
|
|
13
|
-
*/
|
|
14
|
-
export class DefaultLikeC4LanguageServices {
|
|
15
|
-
services;
|
|
16
|
-
builder;
|
|
17
|
-
editor;
|
|
18
|
-
projectsManager;
|
|
19
|
-
constructor(services) {
|
|
20
|
-
this.services = services;
|
|
21
|
-
this.builder = services.likec4.ModelBuilder;
|
|
22
|
-
this.projectsManager = services.shared.workspace.ProjectsManager;
|
|
23
|
-
this.editor = services.likec4.ModelChanges;
|
|
24
|
-
}
|
|
25
|
-
get views() {
|
|
26
|
-
return this.services.likec4.Views;
|
|
27
|
-
}
|
|
28
|
-
get workspaceUri() {
|
|
29
|
-
return this.services.shared.workspace.WorkspaceManager.workspaceUri;
|
|
30
|
-
}
|
|
31
|
-
projects() {
|
|
32
|
-
const projectsManager = this.services.shared.workspace.ProjectsManager;
|
|
33
|
-
const projectsWithDocs = pipe(this.services.shared.workspace.LangiumDocuments.groupedByProject(), entries(), map(([projectId, docs]) => {
|
|
34
|
-
const id = projectId;
|
|
35
|
-
const { folderUri, config } = projectsManager.getProject(id);
|
|
36
|
-
return {
|
|
37
|
-
id,
|
|
38
|
-
folder: folderUri,
|
|
39
|
-
title: config.title ?? config.name,
|
|
40
|
-
documents: map(docs, prop('uri')),
|
|
41
|
-
config,
|
|
42
|
-
};
|
|
43
|
-
}));
|
|
44
|
-
// if there are multiple projects and default project is set, ensure it is first
|
|
45
|
-
if (hasAtLeast(projectsWithDocs, 2) && projectsManager.defaultProjectId) {
|
|
46
|
-
const idx = projectsWithDocs.findIndex(p => p.id === projectsManager.defaultProjectId);
|
|
47
|
-
if (idx > 0) {
|
|
48
|
-
const [defaultProject] = projectsWithDocs.splice(idx, 1);
|
|
49
|
-
return [defaultProject, ...projectsWithDocs];
|
|
50
|
-
}
|
|
51
|
-
return projectsWithDocs;
|
|
52
|
-
}
|
|
53
|
-
if (hasAtLeast(projectsWithDocs, 1)) {
|
|
54
|
-
return projectsWithDocs;
|
|
55
|
-
}
|
|
56
|
-
const { folderUri, config } = projectsManager.getProject(ProjectsManager.DefaultProjectId);
|
|
57
|
-
const documents = map(this.services.shared.workspace.LangiumDocuments.projectDocuments(ProjectsManager.DefaultProjectId).toArray(), prop('uri'));
|
|
58
|
-
return [{
|
|
59
|
-
id: ProjectsManager.DefaultProjectId,
|
|
60
|
-
folder: folderUri,
|
|
61
|
-
title: config.title ?? config.name,
|
|
62
|
-
documents,
|
|
63
|
-
config,
|
|
64
|
-
}];
|
|
65
|
-
}
|
|
66
|
-
project(projectId) {
|
|
67
|
-
projectId = this.projectsManager.ensureProjectId(projectId);
|
|
68
|
-
const projectsManager = this.services.shared.workspace.ProjectsManager;
|
|
69
|
-
const { folderUri, config } = projectsManager.getProject(projectId);
|
|
70
|
-
const documents = map(this.services.shared.workspace.LangiumDocuments.projectDocuments(projectId).toArray(), prop('uri'));
|
|
71
|
-
return {
|
|
72
|
-
id: projectId,
|
|
73
|
-
folder: folderUri,
|
|
74
|
-
title: config.title ?? config.name,
|
|
75
|
-
documents,
|
|
76
|
-
config,
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
async diagrams(project, cancelToken) {
|
|
80
|
-
const projectId = this.projectsManager.ensureProjectId(project);
|
|
81
|
-
return await this.views.diagrams(projectId, cancelToken);
|
|
82
|
-
}
|
|
83
|
-
async computedModel(project, cancelToken) {
|
|
84
|
-
const projectId = this.projectsManager.ensureProjectId(project);
|
|
85
|
-
return await this.builder.computeModel(projectId, cancelToken);
|
|
86
|
-
}
|
|
87
|
-
async layoutedModel(project, cancelToken) {
|
|
88
|
-
const projectId = this.projectsManager.ensureProjectId(project);
|
|
89
|
-
const model = await this.builder.computeModel(projectId, cancelToken);
|
|
90
|
-
if (!model) {
|
|
91
|
-
throw new Error('Failed to compute model, empty project?');
|
|
92
|
-
}
|
|
93
|
-
const layouted = await this.views.layoutAllViews(projectId, cancelToken);
|
|
94
|
-
return LikeC4Model.create({
|
|
95
|
-
...model.$data,
|
|
96
|
-
_stage: 'layouted',
|
|
97
|
-
views: pipe(layouted, map(prop('diagram')), indexBy(prop('id'))),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
async projectsOverview(cancelToken) {
|
|
101
|
-
const allProjects = this.services.shared.workspace.ProjectsManager.all;
|
|
102
|
-
const models = [];
|
|
103
|
-
for (const project of allProjects) {
|
|
104
|
-
const model = await this.builder.computeModel(project, cancelToken);
|
|
105
|
-
if (cancelToken?.isCancellationRequested) {
|
|
106
|
-
throw new Error('Operation cancelled');
|
|
107
|
-
}
|
|
108
|
-
if (model === LikeC4Model.EMPTY) {
|
|
109
|
-
logger.debug(`Project ${project} is empty, skipping`);
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
models.push(model);
|
|
113
|
-
}
|
|
114
|
-
if (!hasAtLeast(models, 1)) {
|
|
115
|
-
throw new Error('No models found');
|
|
116
|
-
}
|
|
117
|
-
const projectsView = computeProjectsView(models);
|
|
118
|
-
return await this.views.layouter.layoutProjectsView(projectsView);
|
|
119
|
-
}
|
|
120
|
-
getErrors() {
|
|
121
|
-
const docs = this.services.shared.workspace.LangiumDocuments.allExcludingBuiltin.toArray();
|
|
122
|
-
return docs.flatMap(doc => {
|
|
123
|
-
return (doc.diagnostics ?? [])
|
|
124
|
-
.filter(d => d.severity === DiagnosticSeverity.Error)
|
|
125
|
-
.map(({ message, range }) => ({
|
|
126
|
-
message,
|
|
127
|
-
line: range.start.line,
|
|
128
|
-
range,
|
|
129
|
-
sourceFsPath: doc.uri.fsPath,
|
|
130
|
-
}));
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
locate(params) {
|
|
134
|
-
switch (true) {
|
|
135
|
-
case 'element' in params:
|
|
136
|
-
return this.services.likec4.ModelLocator.locateElement(params.element, params.projectId);
|
|
137
|
-
case 'relation' in params:
|
|
138
|
-
return this.services.likec4.ModelLocator.locateRelation(params.relation, params.projectId);
|
|
139
|
-
case 'view' in params:
|
|
140
|
-
return this.services.likec4.ModelLocator.locateView(params.view, params.projectId);
|
|
141
|
-
case 'deployment' in params:
|
|
142
|
-
return this.services.likec4.ModelLocator.locateDeploymentElement(params.deployment, params.projectId);
|
|
143
|
-
default:
|
|
144
|
-
nonexhaustive(params);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
async dispose() {
|
|
148
|
-
try {
|
|
149
|
-
logger.debug('disposing LikeC4LanguageServices');
|
|
150
|
-
await this.services.shared.workspace.FileSystemWatcher.dispose();
|
|
151
|
-
if (this.services.mcp.Server.isStarted) {
|
|
152
|
-
await this.services.mcp.Server.stop();
|
|
153
|
-
}
|
|
154
|
-
this.services.Rpc.dispose();
|
|
155
|
-
this.services.likec4.ModelBuilder.dispose();
|
|
156
|
-
}
|
|
157
|
-
catch (e) {
|
|
158
|
-
logger.error(loggable(e));
|
|
159
|
-
}
|
|
160
|
-
finally {
|
|
161
|
-
logger.debug('LikeC4LanguageServices disposed');
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
package/dist/Rpc.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { LikeC4Services } from './module';
|
|
2
|
-
import { DidRequestOpenViewNotification } from './protocol';
|
|
3
|
-
import { ADisposable } from './utils';
|
|
4
|
-
export declare class Rpc extends ADisposable {
|
|
5
|
-
private services;
|
|
6
|
-
constructor(services: LikeC4Services);
|
|
7
|
-
init(): void;
|
|
8
|
-
openView(params: DidRequestOpenViewNotification.Params): Promise<void>;
|
|
9
|
-
}
|