@likec4/language-server 1.39.1 → 1.39.2
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/dist/{LikeC4LanguageServices.js → LikeC4LanguageServices.mjs} +3 -3
- package/dist/{Rpc.js → Rpc.mjs} +3 -3
- package/dist/{ast.js → ast.mjs} +2 -2
- package/dist/browser-worker.mjs +2 -0
- package/dist/{browser.js → browser.mjs} +3 -3
- package/dist/bundled.mjs +2165 -2165
- package/dist/documentation/{documentation-provider.js → documentation-provider.mjs} +2 -2
- package/dist/documentation/{index.js → index.mjs} +1 -1
- package/dist/filesystem/{ChokidarWatcher.js → ChokidarWatcher.mjs} +8 -7
- package/dist/filesystem/LikeC4FileSystem.d.ts +1 -0
- package/dist/filesystem/{LikeC4FileSystem.js → LikeC4FileSystem.mjs} +6 -6
- package/dist/filesystem/{index.js → index.mjs} +1 -1
- package/dist/formatting/{LikeC4Formatter.js → LikeC4Formatter.mjs} +2 -2
- package/dist/generated/{module.js → module.mjs} +2 -2
- package/dist/{index.js → index.mjs} +9 -9
- package/dist/{likec4lib.js → likec4lib.mjs} +1 -1
- package/dist/lsp/{CodeLensProvider.js → CodeLensProvider.mjs} +3 -3
- package/dist/lsp/{CompletionProvider.js → CompletionProvider.mjs} +1 -1
- package/dist/lsp/{DocumentLinkProvider.js → DocumentLinkProvider.mjs} +2 -2
- package/dist/lsp/{DocumentSymbolProvider.js → DocumentSymbolProvider.mjs} +3 -3
- package/dist/lsp/{HoverProvider.js → HoverProvider.mjs} +1 -1
- package/dist/lsp/{SemanticTokenProvider.js → SemanticTokenProvider.mjs} +1 -1
- package/dist/lsp/index.mjs +7 -0
- package/dist/mcp/{MCPServerFactory.js → MCPServerFactory.mjs} +9 -9
- package/dist/mcp/{interfaces.js → interfaces.mjs} +1 -1
- package/dist/mcp/server/{StdioLikeC4MCPServer.js → StdioLikeC4MCPServer.mjs} +1 -1
- package/dist/mcp/server/{StreamableLikeC4MCPServer.js → StreamableLikeC4MCPServer.mjs} +1 -1
- package/dist/mcp/server/{WithMCPServer.js → WithMCPServer.mjs} +3 -3
- package/dist/mcp/tools/{_common.js → _common.mjs} +2 -2
- package/dist/mcp/tools/{find-relationships.js → find-relationships.mjs} +2 -2
- package/dist/mcp/tools/{list-projects.js → list-projects.mjs} +1 -1
- package/dist/mcp/tools/{open-view.js → open-view.mjs} +2 -2
- package/dist/mcp/tools/{read-deployment.js → read-deployment.mjs} +2 -2
- package/dist/mcp/tools/{read-element.js → read-element.mjs} +2 -2
- package/dist/mcp/tools/{read-project-summary.js → read-project-summary.mjs} +2 -2
- package/dist/mcp/tools/{read-view.js → read-view.mjs} +2 -2
- package/dist/mcp/tools/{search-element.js → search-element.mjs} +2 -2
- package/dist/mcp/{utils.js → utils.mjs} +1 -1
- package/dist/model/builder/{MergedSpecification.js → MergedSpecification.mjs} +2 -2
- package/dist/model/builder/{buildModel.js → buildModel.mjs} +4 -4
- package/dist/model/{deployments-index.js → deployments-index.mjs} +4 -4
- package/dist/model/{fqn-index.js → fqn-index.mjs} +5 -5
- package/dist/model/index.mjs +6 -0
- package/dist/model/{model-builder.js → model-builder.mjs} +5 -5
- package/dist/model/{model-locator.js → model-locator.mjs} +4 -4
- package/dist/model/{model-parser-where.js → model-parser-where.mjs} +1 -1
- package/dist/model/{model-parser.js → model-parser.mjs} +13 -13
- package/dist/model/parser/{Base.js → Base.mjs} +5 -5
- package/dist/model/parser/{DeploymentModelParser.js → DeploymentModelParser.mjs} +3 -3
- package/dist/model/parser/{DeploymentViewParser.js → DeploymentViewParser.mjs} +5 -5
- package/dist/model/parser/{FqnRefParser.js → FqnRefParser.mjs} +6 -6
- package/dist/model/parser/{GlobalsParser.js → GlobalsParser.mjs} +2 -2
- package/dist/model/parser/{ImportsParser.js → ImportsParser.mjs} +1 -1
- package/dist/model/parser/{ModelParser.js → ModelParser.mjs} +3 -3
- package/dist/model/parser/{PredicatesParser.js → PredicatesParser.mjs} +1 -1
- package/dist/model/parser/{SpecificationParser.js → SpecificationParser.mjs} +3 -3
- package/dist/model/parser/{ViewsParser.js → ViewsParser.mjs} +6 -6
- package/dist/model-change/{ModelChanges.js → ModelChanges.mjs} +3 -3
- package/dist/model-change/{changeElementStyle.js → changeElementStyle.mjs} +1 -1
- package/dist/model-change/{changeViewLayout.js → changeViewLayout.mjs} +1 -1
- package/dist/model-change/{saveManualLayout.js → saveManualLayout.mjs} +1 -1
- package/dist/{module.js → module.mjs} +16 -16
- package/dist/references/index.mjs +3 -0
- package/dist/references/{name-provider.js → name-provider.mjs} +1 -1
- package/dist/references/{scope-computation.js → scope-computation.mjs} +2 -2
- package/dist/references/{scope-provider.js → scope-provider.mjs} +4 -4
- package/dist/shared/{NodeKindProvider.js → NodeKindProvider.mjs} +1 -1
- package/dist/shared/index.mjs +2 -0
- package/dist/test/index.mjs +1 -0
- package/dist/test/{testServices.js → testServices.mjs} +2 -2
- package/dist/utils/{disposable.js → disposable.mjs} +1 -1
- package/dist/utils/{elementRef.js → elementRef.mjs} +1 -1
- package/dist/utils/{fqnRef.js → fqnRef.mjs} +1 -1
- package/dist/utils/{index.js → index.mjs} +6 -6
- package/dist/utils/{projectId.js → projectId.mjs} +1 -1
- package/dist/validation/{_shared.js → _shared.mjs} +1 -1
- package/dist/validation/{deployment-checks.js → deployment-checks.mjs} +3 -3
- package/dist/validation/{dynamic-view-step.js → dynamic-view-step.mjs} +2 -2
- package/dist/validation/{element-ref.js → element-ref.mjs} +2 -2
- package/dist/validation/{element.js → element.mjs} +2 -2
- package/dist/validation/{imports.js → imports.mjs} +2 -2
- package/dist/validation/{index.js → index.mjs} +13 -13
- package/dist/validation/{property-checks.js → property-checks.mjs} +2 -2
- package/dist/validation/{relation.js → relation.mjs} +2 -2
- package/dist/validation/{specification.js → specification.mjs} +3 -3
- package/dist/validation/view-predicates/{fqn-expr-with.js → fqn-expr-with.mjs} +4 -3
- package/dist/validation/view-predicates/{fqn-ref-expr.js → fqn-ref-expr.mjs} +3 -3
- package/dist/validation/view-predicates/{incoming.js → incoming.mjs} +2 -2
- package/dist/validation/view-predicates/index.mjs +6 -0
- package/dist/validation/view-predicates/{outgoing.js → outgoing.mjs} +2 -2
- package/dist/validation/view-predicates/{relation-expr.js → relation-expr.mjs} +2 -2
- package/dist/validation/view-predicates/{relation-with.js → relation-with.mjs} +2 -2
- package/dist/validation/{view.js → view.mjs} +3 -3
- package/dist/view-utils/index.mjs +2 -0
- package/dist/view-utils/{manual-layout.js → manual-layout.mjs} +1 -1
- package/dist/views/{configurable-layouter.js → configurable-layouter.mjs} +1 -1
- package/dist/views/index.mjs +1 -0
- package/dist/views/{likec4-views.js → likec4-views.mjs} +2 -2
- package/dist/workspace/{LangiumDocuments.js → LangiumDocuments.mjs} +2 -2
- package/dist/workspace/{ProjectsManager.js → ProjectsManager.mjs} +1 -1
- package/dist/workspace/{WorkspaceManager.js → WorkspaceManager.mjs} +2 -2
- package/dist/workspace/index.mjs +5 -0
- package/package.json +21 -19
- package/dist/browser-worker.js +0 -2
- package/dist/bundled.js +0 -40
- package/dist/lsp/index.js +0 -7
- package/dist/model/index.js +0 -6
- package/dist/references/index.js +0 -3
- package/dist/shared/index.js +0 -2
- package/dist/test/index.js +0 -1
- package/dist/validation/view-predicates/index.js +0 -6
- package/dist/view-utils/index.js +0 -2
- package/dist/views/index.js +0 -1
- package/dist/workspace/index.js +0 -5
- /package/dist/{empty.js → empty.mjs} +0 -0
- /package/dist/filesystem/{FileSystemWatcher.js → FileSystemWatcher.mjs} +0 -0
- /package/dist/formatting/{utils.js → utils.mjs} +0 -0
- /package/dist/generated/{ast.js → ast.mjs} +0 -0
- /package/dist/generated/{grammar.js → grammar.mjs} +0 -0
- /package/dist/generated-lib/{icons.js → icons.mjs} +0 -0
- /package/dist/{logger.js → logger.mjs} +0 -0
- /package/dist/lsp/{DocumentHighlightProvider.js → DocumentHighlightProvider.mjs} +0 -0
- /package/dist/lsp/{RenameProvider.js → RenameProvider.mjs} +0 -0
- /package/dist/mcp/{NoopLikeC4MCPServer.js → NoopLikeC4MCPServer.mjs} +0 -0
- /package/dist/model/builder/{MergedExtends.js → MergedExtends.mjs} +0 -0
- /package/dist/model/builder/{assignTagColors.js → assignTagColors.mjs} +0 -0
- /package/dist/model/parser/{ValueConverter.js → ValueConverter.mjs} +0 -0
- /package/dist/{protocol.js → protocol.mjs} +0 -0
- /package/dist/shared/{WorkspaceSymbolProvider.js → WorkspaceSymbolProvider.mjs} +0 -0
- /package/dist/utils/{printDocs.js → printDocs.mjs} +0 -0
- /package/dist/utils/{stringHash.js → stringHash.mjs} +0 -0
- /package/dist/validation/{DocumentValidator.js → DocumentValidator.mjs} +0 -0
- /package/dist/view-utils/{assignNavigateTo.js → assignNavigateTo.mjs} +0 -0
- /package/dist/view-utils/{resolve-relative-paths.js → resolve-relative-paths.mjs} +0 -0
- /package/dist/workspace/{AstNodeDescriptionProvider.js → AstNodeDescriptionProvider.mjs} +0 -0
- /package/dist/workspace/{IndexManager.js → IndexManager.mjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { compareNaturalHierarchically } from "@likec4/core/utils";
|
|
2
2
|
import { DefaultLangiumDocuments } from "langium";
|
|
3
3
|
import { groupBy, prop } from "remeda";
|
|
4
|
-
import { isLikeC4LangiumDocument } from "../ast.
|
|
5
|
-
import { isLikeC4Builtin } from "../likec4lib.
|
|
4
|
+
import { isLikeC4LangiumDocument } from "../ast.mjs";
|
|
5
|
+
import { isLikeC4Builtin } from "../likec4lib.mjs";
|
|
6
6
|
const compare = compareNaturalHierarchically("/", true);
|
|
7
7
|
const ensureOrder = (a, b) => compare(a.uri.path, b.uri.path);
|
|
8
8
|
export class LangiumDocuments extends DefaultLangiumDocuments {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
withoutProtocol,
|
|
17
17
|
withTrailingSlash
|
|
18
18
|
} from "ufo";
|
|
19
|
-
import { logger as mainLogger } from "../logger.
|
|
19
|
+
import { logger as mainLogger } from "../logger.mjs";
|
|
20
20
|
const logger = mainLogger.getChild("ProjectsManager");
|
|
21
21
|
function normalizeUri(uri) {
|
|
22
22
|
if (URI.isUri(uri)) {
|
|
@@ -2,8 +2,8 @@ import { invariant } from "@likec4/core";
|
|
|
2
2
|
import { DefaultWorkspaceManager } from "langium";
|
|
3
3
|
import { hasAtLeast } from "remeda";
|
|
4
4
|
import { URI } from "vscode-uri";
|
|
5
|
-
import * as BuiltIn from "../likec4lib.
|
|
6
|
-
import { logWarnError } from "../logger.
|
|
5
|
+
import * as BuiltIn from "../likec4lib.mjs";
|
|
6
|
+
import { logWarnError } from "../logger.mjs";
|
|
7
7
|
export class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
|
|
8
8
|
constructor(services) {
|
|
9
9
|
super(services);
|
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.39.
|
|
4
|
+
"version": "1.39.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
@@ -32,46 +32,48 @@
|
|
|
32
32
|
".": {
|
|
33
33
|
"sources": "./src/index.ts",
|
|
34
34
|
"node": {
|
|
35
|
+
"sources": "./src/index.ts",
|
|
35
36
|
"types": "./dist/index.d.ts",
|
|
36
|
-
"import": "./dist/index.
|
|
37
|
-
"default": "./dist/index.
|
|
37
|
+
"import": "./dist/index.mjs",
|
|
38
|
+
"default": "./dist/index.mjs"
|
|
38
39
|
},
|
|
39
40
|
"default": {
|
|
41
|
+
"sources": "./src/browser.ts",
|
|
40
42
|
"types": "./dist/browser.d.ts",
|
|
41
|
-
"import": "./dist/browser.
|
|
42
|
-
"default": "./dist/browser.
|
|
43
|
+
"import": "./dist/browser.mjs",
|
|
44
|
+
"default": "./dist/browser.mjs"
|
|
43
45
|
}
|
|
44
46
|
},
|
|
45
47
|
"./likec4lib": {
|
|
46
48
|
"sources": "./src/likec4lib.ts",
|
|
47
49
|
"default": {
|
|
48
50
|
"types": "./dist/likec4lib.d.ts",
|
|
49
|
-
"import": "./dist/likec4lib.
|
|
50
|
-
"default": "./dist/likec4lib.
|
|
51
|
+
"import": "./dist/likec4lib.mjs",
|
|
52
|
+
"default": "./dist/likec4lib.mjs"
|
|
51
53
|
}
|
|
52
54
|
},
|
|
53
55
|
"./browser-worker": {
|
|
54
56
|
"sources": "./src/browser-worker.ts",
|
|
55
57
|
"default": {
|
|
56
58
|
"types": "./dist/browser-worker.d.ts",
|
|
57
|
-
"import": "./dist/browser-worker.
|
|
58
|
-
"default": "./dist/browser-worker.
|
|
59
|
+
"import": "./dist/browser-worker.mjs",
|
|
60
|
+
"default": "./dist/browser-worker.mjs"
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
"./browser": {
|
|
62
64
|
"sources": "./src/browser.ts",
|
|
63
65
|
"default": {
|
|
64
66
|
"types": "./dist/browser.d.ts",
|
|
65
|
-
"import": "./dist/browser.
|
|
66
|
-
"default": "./dist/browser.
|
|
67
|
+
"import": "./dist/browser.mjs",
|
|
68
|
+
"default": "./dist/browser.mjs"
|
|
67
69
|
}
|
|
68
70
|
},
|
|
69
71
|
"./protocol": {
|
|
70
72
|
"sources": "./src/protocol.ts",
|
|
71
73
|
"default": {
|
|
72
74
|
"types": "./dist/protocol.d.ts",
|
|
73
|
-
"import": "./dist/protocol.
|
|
74
|
-
"default": "./dist/protocol.
|
|
75
|
+
"import": "./dist/protocol.mjs",
|
|
76
|
+
"default": "./dist/protocol.mjs"
|
|
75
77
|
}
|
|
76
78
|
},
|
|
77
79
|
"./bundled": "./dist/bundled.mjs"
|
|
@@ -130,12 +132,12 @@
|
|
|
130
132
|
"vscode-uri": "3.1.0",
|
|
131
133
|
"which": "^5.0.0",
|
|
132
134
|
"zod": "3.25.76",
|
|
133
|
-
"@likec4/core": "1.39.
|
|
134
|
-
"@likec4/config": "1.39.
|
|
135
|
-
"@likec4/icons": "1.39.
|
|
136
|
-
"@likec4/
|
|
137
|
-
"@likec4/
|
|
138
|
-
"@likec4/tsconfig": "1.39.
|
|
135
|
+
"@likec4/core": "1.39.2",
|
|
136
|
+
"@likec4/config": "1.39.2",
|
|
137
|
+
"@likec4/icons": "1.39.2",
|
|
138
|
+
"@likec4/layouts": "1.39.2",
|
|
139
|
+
"@likec4/log": "1.39.2",
|
|
140
|
+
"@likec4/tsconfig": "1.39.2"
|
|
139
141
|
},
|
|
140
142
|
"scripts": {
|
|
141
143
|
"typecheck": "tsc -b --verbose",
|
package/dist/browser-worker.js
DELETED
package/dist/bundled.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { configureLogger, getConsoleStderrSink } from "@likec4/log";
|
|
2
|
-
import { startLanguageServer as startLanguim } from "langium/lsp";
|
|
3
|
-
import { createConnection, ProposedFeatures } from "vscode-languageserver/node";
|
|
4
|
-
import { LikeC4FileSystem } from "./filesystem/LikeC4FileSystem.js";
|
|
5
|
-
import { getLspConnectionSink, logger } from "./logger.js";
|
|
6
|
-
import { WithMCPServer } from "./mcp/server/WithMCPServer.js";
|
|
7
|
-
import { createLanguageServices } from "./module.js";
|
|
8
|
-
import { ConfigurableLayouter } from "./views/configurable-layouter.js";
|
|
9
|
-
export function startLanguageServer() {
|
|
10
|
-
const connection = createConnection(ProposedFeatures.all);
|
|
11
|
-
configureLogger({
|
|
12
|
-
sinks: {
|
|
13
|
-
// Name it as console to override internal logger
|
|
14
|
-
lsp: getLspConnectionSink(connection),
|
|
15
|
-
console: getConsoleStderrSink()
|
|
16
|
-
},
|
|
17
|
-
loggers: [
|
|
18
|
-
{
|
|
19
|
-
category: ["likec4"],
|
|
20
|
-
sinks: ["console", "lsp"]
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
});
|
|
24
|
-
process.on("uncaughtException", (err) => {
|
|
25
|
-
logger.error("uncaughtException", { err });
|
|
26
|
-
});
|
|
27
|
-
process.on("unhandledRejection", (err) => {
|
|
28
|
-
logger.error("unhandledRejection", { err });
|
|
29
|
-
});
|
|
30
|
-
const services = createLanguageServices(
|
|
31
|
-
{
|
|
32
|
-
connection,
|
|
33
|
-
...LikeC4FileSystem(false),
|
|
34
|
-
...WithMCPServer("sse")
|
|
35
|
-
},
|
|
36
|
-
ConfigurableLayouter
|
|
37
|
-
);
|
|
38
|
-
startLanguim(services.shared);
|
|
39
|
-
return services;
|
|
40
|
-
}
|
package/dist/lsp/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "./CodeLensProvider.js";
|
|
2
|
-
export * from "./CompletionProvider.js";
|
|
3
|
-
export * from "./DocumentHighlightProvider.js";
|
|
4
|
-
export * from "./DocumentLinkProvider.js";
|
|
5
|
-
export * from "./DocumentSymbolProvider.js";
|
|
6
|
-
export * from "./HoverProvider.js";
|
|
7
|
-
export * from "./SemanticTokenProvider.js";
|
package/dist/model/index.js
DELETED
package/dist/references/index.js
DELETED
package/dist/shared/index.js
DELETED
package/dist/test/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./testServices.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { checkFqnExprWith } from "./fqn-expr-with.js";
|
|
2
|
-
export { checkFqnRefExpr } from "./fqn-ref-expr.js";
|
|
3
|
-
export { checkIncomingRelationExpr } from "./incoming.js";
|
|
4
|
-
export { checkOutgoingRelationExpr } from "./outgoing.js";
|
|
5
|
-
export { checkRelationExpr } from "./relation-expr.js";
|
|
6
|
-
export { checkRelationExprWith } from "./relation-with.js";
|
package/dist/view-utils/index.js
DELETED
package/dist/views/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DefaultLikeC4Views } from "./likec4-views.js";
|
package/dist/workspace/index.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|