@likec4/language-server 1.40.0 → 1.41.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/dist/ast.d.ts +3 -2
- package/dist/bundled.mjs +3383 -3377
- package/dist/formatting/LikeC4Formatter.mjs +1 -0
- package/dist/generated/ast.d.ts +5 -3
- package/dist/generated/ast.mjs +2 -0
- package/dist/generated/grammar.mjs +1 -1
- package/dist/logger.d.ts +1 -1
- package/dist/logger.mjs +3 -0
- package/dist/lsp/HoverProvider.mjs +14 -2
- package/dist/model/builder/MergedSpecification.d.ts +1 -1
- package/dist/model/builder/MergedSpecification.mjs +39 -35
- package/dist/model/model-parser.d.ts +72 -45
- package/dist/model/parser/Base.d.ts +13 -7
- package/dist/model/parser/Base.mjs +27 -16
- package/dist/model/parser/DeploymentModelParser.d.ts +8 -5
- package/dist/model/parser/DeploymentModelParser.mjs +47 -45
- package/dist/model/parser/DeploymentViewParser.d.ts +8 -5
- package/dist/model/parser/DeploymentViewParser.mjs +1 -2
- package/dist/model/parser/FqnRefParser.d.ts +10 -6
- package/dist/model/parser/FqnRefParser.mjs +12 -4
- package/dist/model/parser/GlobalsParser.d.ts +8 -5
- package/dist/model/parser/GlobalsParser.mjs +5 -3
- package/dist/model/parser/ImportsParser.d.ts +8 -5
- package/dist/model/parser/ImportsParser.mjs +4 -2
- package/dist/model/parser/ModelParser.d.ts +8 -5
- package/dist/model/parser/ModelParser.mjs +31 -36
- package/dist/model/parser/PredicatesParser.d.ts +8 -5
- package/dist/model/parser/SpecificationParser.d.ts +8 -5
- package/dist/model/parser/SpecificationParser.mjs +15 -21
- package/dist/model/parser/ValueConverter.mjs +1 -1
- package/dist/model/parser/ViewsParser.d.ts +8 -5
- package/dist/model/parser/ViewsParser.mjs +2 -4
- package/dist/test/testServices.mjs +22 -24
- package/package.json +7 -7
|
@@ -3,7 +3,7 @@ export class LikeC4ValueConverter extends DefaultValueConverter {
|
|
|
3
3
|
runConverter(rule, input, cstNode) {
|
|
4
4
|
if (rule.name === "MarkdownString") {
|
|
5
5
|
if (input.startsWith('"""') && input.endsWith('"""') || input.startsWith(`'''`) && input.endsWith(`'''`)) {
|
|
6
|
-
input = input.slice(
|
|
6
|
+
input = input.slice(2, -2);
|
|
7
7
|
}
|
|
8
8
|
return ValueConverter.convertString(input);
|
|
9
9
|
}
|
|
@@ -70,16 +70,19 @@ export declare function ViewsParser<TBase extends WithPredicates & WithDeploymen
|
|
|
70
70
|
parseColorLiteral(astNode: ast.ColorLiteral): c4.ColorLiteral | undefined;
|
|
71
71
|
parseElementStyle(elementProps: Array<ast.ElementProperty> | ast.ElementStyleProperty | undefined): import("../../ast").ParsedElementStyle;
|
|
72
72
|
parseStyleProps(styleProps: Array<ast.StyleProperty> | undefined): import("../../ast").ParsedElementStyle;
|
|
73
|
-
|
|
74
|
-
title?: string | undefined;
|
|
75
|
-
description?: string | undefined;
|
|
76
|
-
technology?: string | undefined;
|
|
77
|
-
}, bodyProps: {
|
|
73
|
+
parseBaseProps(props: {
|
|
78
74
|
title?: ast.MarkdownOrString | undefined;
|
|
75
|
+
summary?: ast.MarkdownOrString | undefined;
|
|
79
76
|
description?: ast.MarkdownOrString | undefined;
|
|
80
77
|
technology?: ast.MarkdownOrString | undefined;
|
|
78
|
+
}, override?: {
|
|
79
|
+
title?: string | undefined;
|
|
80
|
+
summary?: string | undefined;
|
|
81
|
+
description?: string | undefined;
|
|
82
|
+
technology?: string | undefined;
|
|
81
83
|
}): {
|
|
82
84
|
title?: string;
|
|
85
|
+
summary?: c4.MarkdownOrString;
|
|
83
86
|
description?: c4.MarkdownOrString;
|
|
84
87
|
technology?: string;
|
|
85
88
|
};
|
|
@@ -77,8 +77,7 @@ export function ViewsParser(B) {
|
|
|
77
77
|
viewOf ?? ""
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
|
-
const { title = null, description = null } = this.
|
|
81
|
-
{},
|
|
80
|
+
const { title = null, description = null } = this.parseBaseProps(
|
|
82
81
|
pipe(
|
|
83
82
|
body.props,
|
|
84
83
|
filter((p) => this.isValid(p)),
|
|
@@ -229,8 +228,7 @@ export function ViewsParser(B) {
|
|
|
229
228
|
astPath
|
|
230
229
|
);
|
|
231
230
|
}
|
|
232
|
-
const { title = null, description = null } = this.
|
|
233
|
-
{},
|
|
231
|
+
const { title = null, description = null } = this.parseBaseProps(
|
|
234
232
|
pipe(
|
|
235
233
|
props,
|
|
236
234
|
filter(ast.isViewStringProperty),
|
|
@@ -25,31 +25,29 @@ export function createTestServices(options) {
|
|
|
25
25
|
async function initialize() {
|
|
26
26
|
if (isInitialized) return;
|
|
27
27
|
isInitialized = true;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
settings: { likec4: { formatting: { quoteStyle: "single" } } }
|
|
31
|
-
});
|
|
32
|
-
services.shared.workspace.WorkspaceManager.initialize({
|
|
33
|
-
capabilities: {},
|
|
34
|
-
processId: null,
|
|
35
|
-
rootUri: workspaceFolder.uri,
|
|
36
|
-
workspaceFolders: [workspaceFolder]
|
|
37
|
-
});
|
|
38
|
-
await services.shared.workspace.WorkspaceManager.initializeWorkspace([workspaceFolder]);
|
|
39
|
-
if (projectConfig) {
|
|
40
|
-
const projectFolderUri = Utils.resolvePath(workspaceUri, "src");
|
|
41
|
-
services.shared.workspace.ProjectsManager.registerProject({
|
|
42
|
-
config: {
|
|
43
|
-
name: projectConfig?.name || "test-project",
|
|
44
|
-
title: projectConfig?.title || "Test Project",
|
|
45
|
-
contactPerson: projectConfig?.contactPerson || "Unknown",
|
|
46
|
-
imageAliases: projectConfig?.imageAliases || {},
|
|
47
|
-
exclude: projectConfig?.exclude || ["node_modules"]
|
|
48
|
-
},
|
|
49
|
-
folderUri: projectFolderUri
|
|
50
|
-
});
|
|
51
|
-
}
|
|
28
|
+
services.shared.workspace.ConfigurationProvider.updateConfiguration({
|
|
29
|
+
settings: { likec4: { formatting: { quoteStyle: "single" } } }
|
|
52
30
|
});
|
|
31
|
+
services.shared.workspace.WorkspaceManager.initialize({
|
|
32
|
+
capabilities: {},
|
|
33
|
+
processId: null,
|
|
34
|
+
rootUri: workspaceFolder.uri,
|
|
35
|
+
workspaceFolders: [workspaceFolder]
|
|
36
|
+
});
|
|
37
|
+
await services.shared.workspace.WorkspaceManager.initializeWorkspace([workspaceFolder]);
|
|
38
|
+
if (projectConfig) {
|
|
39
|
+
const projectFolderUri = Utils.resolvePath(workspaceUri, "src");
|
|
40
|
+
await services.shared.workspace.ProjectsManager.registerProject({
|
|
41
|
+
config: {
|
|
42
|
+
name: projectConfig?.name || "test-project",
|
|
43
|
+
title: projectConfig?.title || "Test Project",
|
|
44
|
+
contactPerson: projectConfig?.contactPerson || "Unknown",
|
|
45
|
+
imageAliases: projectConfig?.imageAliases || {},
|
|
46
|
+
exclude: projectConfig?.exclude || ["node_modules"]
|
|
47
|
+
},
|
|
48
|
+
folderUri: projectFolderUri
|
|
49
|
+
});
|
|
50
|
+
}
|
|
53
51
|
}
|
|
54
52
|
const addDocument = async (input, uri) => {
|
|
55
53
|
await initialize();
|
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.41.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
@@ -132,12 +132,12 @@
|
|
|
132
132
|
"vscode-uri": "3.1.0",
|
|
133
133
|
"which": "^5.0.0",
|
|
134
134
|
"zod": "3.25.76",
|
|
135
|
-
"@likec4/core": "1.
|
|
136
|
-
"@likec4/config": "1.
|
|
137
|
-
"@likec4/
|
|
138
|
-
"@likec4/
|
|
139
|
-
"@likec4/
|
|
140
|
-
"@likec4/tsconfig": "1.
|
|
135
|
+
"@likec4/core": "1.41.0",
|
|
136
|
+
"@likec4/config": "1.41.0",
|
|
137
|
+
"@likec4/layouts": "1.41.0",
|
|
138
|
+
"@likec4/log": "1.41.0",
|
|
139
|
+
"@likec4/icons": "1.41.0",
|
|
140
|
+
"@likec4/tsconfig": "1.41.0"
|
|
141
141
|
},
|
|
142
142
|
"scripts": {
|
|
143
143
|
"typecheck": "tsc -b --verbose",
|