@likec4/language-server 1.30.0 → 1.31.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/bundled.mjs +2167 -2160
- package/dist/formatting/LikeC4Formatter.d.ts +26 -2
- package/dist/formatting/LikeC4Formatter.js +99 -2
- package/dist/generated/ast.d.ts +147 -148
- package/dist/generated/ast.js +2 -2
- package/dist/generated/grammar.d.ts +1 -1
- package/dist/generated/module.d.ts +1 -1
- package/dist/test/testServices.js +3 -0
- package/dist/workspace/WorkspaceManager.d.ts +2 -2
- package/dist/workspace/WorkspaceManager.js +2 -2
- package/package.json +16 -16
package/dist/generated/ast.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as langium from "langium";
|
|
2
2
|
export const LikeC4Terminals = {
|
|
3
3
|
BLOCK_COMMENT: /\/\*[\s\S]*?\*\//,
|
|
4
4
|
LINE_COMMENT: /\/\/[^\n\r]*/,
|
|
@@ -660,7 +660,7 @@ export const WildcardExpression = "WildcardExpression";
|
|
|
660
660
|
export function isWildcardExpression(item) {
|
|
661
661
|
return reflection.isInstance(item, WildcardExpression);
|
|
662
662
|
}
|
|
663
|
-
export class LikeC4AstReflection extends AbstractAstReflection {
|
|
663
|
+
export class LikeC4AstReflection extends langium.AbstractAstReflection {
|
|
664
664
|
getAllTypes() {
|
|
665
665
|
return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRuleStyle, DirectedRelationExpr, DynamicView, DynamicViewBody, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementKind, ElementKindExpression, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExpressionV2, Expressions, ExtendDeployment, ExtendDeploymentBody, ExtendElement, ExtendElementBody, ExtendElementProperty, FqnExpr, FqnExprOrWhere, FqnExprOrWith, FqnExprWhere, FqnExprWith, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, IconProperty, Imported, ImportsFromPoject, InOutRelationExpr, IncomingRelationExpr, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelDeployments, ModelReferenceable, ModelViews, MultipleProperty, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, PaddingSizeProperty, Referenceable, Relation, RelationBody, RelationExpr, RelationExprOrWhere, RelationExprOrWith, RelationExprWhere, RelationExprWith, RelationNavigateToProperty, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, ShapeSizeProperty, SizeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StrictFqnElementRef, StrictFqnRef, StringProperty, StyleProperty, Tag, Tags, TextSizeProperty, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationParticipantKind, WhereRelationParticipantTag, WhereRelationTag, WhereTagEqual, WildcardExpression];
|
|
666
666
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/******************************************************************************
|
|
2
|
-
* This file was generated by langium-cli 3.
|
|
2
|
+
* This file was generated by langium-cli 3.5.0.
|
|
3
3
|
* DO NOT EDIT MANUALLY!
|
|
4
4
|
******************************************************************************/
|
|
5
5
|
import type { Grammar } from 'langium';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/******************************************************************************
|
|
2
|
-
* This file was generated by langium-cli 3.
|
|
2
|
+
* This file was generated by langium-cli 3.5.0.
|
|
3
3
|
* DO NOT EDIT MANUALLY!
|
|
4
4
|
******************************************************************************/
|
|
5
5
|
import type { LangiumSharedCoreServices, LangiumCoreServices, LangiumGeneratedCoreServices, LangiumGeneratedSharedCoreServices, Module, IParserConfig } from 'langium';
|
|
@@ -23,6 +23,9 @@ export function createTestServices(workspace = "file:///test/workspace") {
|
|
|
23
23
|
if (isInitialized) return;
|
|
24
24
|
isInitialized = true;
|
|
25
25
|
await services.shared.workspace.WorkspaceLock.write(async (_cancelToken) => {
|
|
26
|
+
services.shared.workspace.ConfigurationProvider.updateConfiguration({
|
|
27
|
+
settings: { likec4: { formatting: { quoteStyle: "single" } } }
|
|
28
|
+
});
|
|
26
29
|
services.shared.workspace.WorkspaceManager.initialize({
|
|
27
30
|
capabilities: {},
|
|
28
31
|
processId: null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileSystemNode, LangiumDocument } from 'langium';
|
|
1
|
+
import type { FileSelector, FileSystemNode, LangiumDocument } from 'langium';
|
|
2
2
|
import { DefaultWorkspaceManager } from 'langium';
|
|
3
3
|
import type { WorkspaceFolder } from 'vscode-languageserver';
|
|
4
4
|
import { URI } from 'vscode-uri';
|
|
@@ -16,7 +16,7 @@ export declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
|
|
|
16
16
|
/**
|
|
17
17
|
* Determine whether the given folder entry shall be included while indexing the workspace.
|
|
18
18
|
*/
|
|
19
|
-
protected includeEntry(_workspaceFolder: WorkspaceFolder, entry: FileSystemNode,
|
|
19
|
+
protected includeEntry(_workspaceFolder: WorkspaceFolder, entry: FileSystemNode, selector: FileSelector): boolean;
|
|
20
20
|
workspace(): any;
|
|
21
21
|
get workspaceUri(): URI;
|
|
22
22
|
get workspaceURL(): URL;
|
|
@@ -63,14 +63,14 @@ export class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
|
|
|
63
63
|
/**
|
|
64
64
|
* Determine whether the given folder entry shall be included while indexing the workspace.
|
|
65
65
|
*/
|
|
66
|
-
includeEntry(_workspaceFolder, entry,
|
|
66
|
+
includeEntry(_workspaceFolder, entry, selector) {
|
|
67
67
|
if (this.services.workspace.ProjectsManager.isConfigFile(entry)) {
|
|
68
68
|
return false;
|
|
69
69
|
}
|
|
70
70
|
if (entry.isFile) {
|
|
71
71
|
return !this.services.workspace.ProjectsManager.checkIfExcluded(entry.uri);
|
|
72
72
|
}
|
|
73
|
-
return super.includeEntry(_workspaceFolder, entry,
|
|
73
|
+
return super.includeEntry(_workspaceFolder, entry, selector);
|
|
74
74
|
}
|
|
75
75
|
workspace() {
|
|
76
76
|
if (this.folders && hasAtLeast(this.folders, 1)) {
|
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.31.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"directory": "packages/language-server"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=20.19.
|
|
23
|
+
"node": ">=20.19.1"
|
|
24
24
|
},
|
|
25
25
|
"engineStrict": true,
|
|
26
26
|
"type": "module",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"vscode-uri": "3.1.0"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@modelcontextprotocol/sdk": "^1.10.
|
|
97
|
+
"@modelcontextprotocol/sdk": "^1.10.2",
|
|
98
98
|
"express": "^5.1.0",
|
|
99
99
|
"@msgpack/msgpack": "^3.1.1",
|
|
100
100
|
"@smithy/util-base64": "^4.0.0",
|
|
@@ -105,39 +105,39 @@
|
|
|
105
105
|
"@types/which": "^3.0.4",
|
|
106
106
|
"esm-env": "^1.2.2",
|
|
107
107
|
"fast-equals": "^5.2.2",
|
|
108
|
-
"fdir": "^6.4.
|
|
108
|
+
"fdir": "^6.4.4",
|
|
109
109
|
"indent-string": "^5.0.0",
|
|
110
110
|
"json5": "^2.2.3",
|
|
111
|
-
"langium": "3.
|
|
112
|
-
"langium-cli": "3.
|
|
111
|
+
"langium": "3.5.0",
|
|
112
|
+
"langium-cli": "3.5.0",
|
|
113
113
|
"natural-compare-lite": "^1.4.0",
|
|
114
114
|
"p-debounce": "^4.0.0",
|
|
115
115
|
"p-queue": "^8.1.0",
|
|
116
116
|
"p-timeout": "^6.1.4",
|
|
117
117
|
"pretty-ms": "^9.2.0",
|
|
118
|
-
"remeda": "^2.21.
|
|
118
|
+
"remeda": "^2.21.3",
|
|
119
119
|
"strip-indent": "^4.0.0",
|
|
120
120
|
"tsx": "~4.19.3",
|
|
121
|
-
"turbo": "^2.5.
|
|
122
|
-
"type-fest": "^4.
|
|
121
|
+
"turbo": "^2.5.2",
|
|
122
|
+
"type-fest": "^4.40.0",
|
|
123
123
|
"typescript": "^5.8.3",
|
|
124
124
|
"ufo": "^1.6.1",
|
|
125
125
|
"unbuild": "^3.5.0",
|
|
126
126
|
"valibot": "^1.0.0",
|
|
127
127
|
"zod": "^3.24.3",
|
|
128
|
-
"vitest": "^3.1.
|
|
128
|
+
"vitest": "^3.1.2",
|
|
129
129
|
"vscode-languageserver": "9.0.1",
|
|
130
130
|
"vscode-languageserver-protocol": "3.17.5",
|
|
131
131
|
"vscode-languageserver-types": "3.17.5",
|
|
132
132
|
"which": "^5.0.0",
|
|
133
|
-
"@likec4/core": "1.
|
|
134
|
-
"@likec4/icons": "1.
|
|
135
|
-
"@likec4/layouts": "1.
|
|
136
|
-
"@likec4/log": "1.
|
|
137
|
-
"@likec4/tsconfig": "1.
|
|
133
|
+
"@likec4/core": "1.31.0",
|
|
134
|
+
"@likec4/icons": "1.31.0",
|
|
135
|
+
"@likec4/layouts": "1.31.0",
|
|
136
|
+
"@likec4/log": "1.31.0",
|
|
137
|
+
"@likec4/tsconfig": "1.31.0"
|
|
138
138
|
},
|
|
139
139
|
"scripts": {
|
|
140
|
-
"typecheck": "tsc --
|
|
140
|
+
"typecheck": "tsc -b --verbose",
|
|
141
141
|
"build": "unbuild",
|
|
142
142
|
"pack": "pnpm pack",
|
|
143
143
|
"pregenerate": "rm -f src/generated/*",
|