@likec4/language-server 1.32.1 → 1.32.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/bundled.mjs +2282 -2286
- package/dist/config/schema.d.ts +2 -2
- package/dist/config/schema.js +8 -11
- package/dist/formatting/LikeC4Formatter.js +2 -2
- package/dist/generated/ast.d.ts +2 -0
- package/dist/generated/ast.js +2 -0
- package/dist/generated/grammar.js +1 -1
- package/dist/mcp/LikeC4MCPServerFactory.d.ts +4 -0
- package/dist/mcp/LikeC4MCPServerFactory.js +6 -0
- package/dist/mcp/sseserver/MCPServer.d.ts +4 -2
- package/dist/mcp/sseserver/MCPServer.js +12 -6
- package/dist/mcp/sseserver/with-mcp-server.js +22 -6
- package/dist/model/model-builder.js +20 -19
- package/dist/model/parser/DeploymentModelParser.js +7 -5
- package/dist/model/parser/ModelParser.js +7 -5
- package/dist/module.d.ts +2 -2
- package/dist/module.js +4 -4
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +19 -0
- package/dist/views/configurable-layouter.d.ts +2 -2
- package/dist/views/configurable-layouter.js +4 -2
- package/dist/views/likec4-views.d.ts +2 -3
- package/dist/views/likec4-views.js +29 -50
- package/dist/workspace/ProjectsManager.d.ts +0 -1
- package/dist/workspace/ProjectsManager.js +15 -4
- package/package.json +12 -12
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
export declare const ProjectConfig: v.ObjectSchema<{
|
|
3
|
-
readonly name: v.SchemaWithPipe<readonly [v.
|
|
4
|
-
readonly contactPerson: v.OptionalSchema<v.SchemaWithPipe<readonly [v.
|
|
3
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, "Project name cannot be empty">, v.ExcludesAction<string, "default", "Project name cannot be \"default\"">, v.ExcludesAction<string, ".", "Project name cannot contain \".\", try to use A-z, 0-9, _ and -">, v.ExcludesAction<string, "@", "Project name cannot contain \"@\", try to use A-z, 0-9, _ and -">, v.ExcludesAction<string, "#", "Project name cannot contain \"#\", try to use A-z, 0-9, _ and -">, v.DescriptionAction<string, "Project name, must be unique in the workspace">]>;
|
|
4
|
+
readonly contactPerson: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, "Contact person cannot be empty if specified">, v.DescriptionAction<string, "A person who has been involved in creating or maintaining this project">]>, undefined>;
|
|
5
5
|
readonly exclude: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "List of file patterns to exclude from the project, default is [\"**/node_modules/**/*\"]">]>, undefined>;
|
|
6
6
|
}, undefined>;
|
|
7
7
|
export type ProjectConfig = v.InferOutput<typeof ProjectConfig>;
|
package/dist/config/schema.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import JSON5 from "json5";
|
|
2
2
|
import * as v from "valibot";
|
|
3
|
-
const nonEmptyString = v.pipe(v.string(), v.nonEmpty());
|
|
4
3
|
export const ProjectConfig = v.object({
|
|
5
4
|
name: v.pipe(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
v.string(),
|
|
6
|
+
v.nonEmpty("Project name cannot be empty"),
|
|
7
|
+
v.excludes("default", 'Project name cannot be "default"'),
|
|
8
|
+
v.excludes(".", 'Project name cannot contain ".", try to use A-z, 0-9, _ and -'),
|
|
9
|
+
v.excludes("@", 'Project name cannot contain "@", try to use A-z, 0-9, _ and -'),
|
|
10
|
+
v.excludes("#", 'Project name cannot contain "#", try to use A-z, 0-9, _ and -'),
|
|
9
11
|
v.description("Project name, must be unique in the workspace")
|
|
10
12
|
),
|
|
11
13
|
contactPerson: v.optional(
|
|
12
14
|
v.pipe(
|
|
13
|
-
|
|
15
|
+
v.string(),
|
|
16
|
+
v.nonEmpty("Contact person cannot be empty if specified"),
|
|
14
17
|
v.description("A person who has been involved in creating or maintaining this project")
|
|
15
18
|
)
|
|
16
19
|
),
|
|
17
|
-
// imports: v.optional(
|
|
18
|
-
// v.pipe(
|
|
19
|
-
// v.record(v.string(), nonEmptyString),
|
|
20
|
-
// v.description('Imported projects'),
|
|
21
|
-
// ),
|
|
22
|
-
// ),
|
|
23
20
|
exclude: v.optional(
|
|
24
21
|
v.pipe(
|
|
25
22
|
v.array(v.string()),
|
|
@@ -79,7 +79,7 @@ export class LikeC4Formatter extends AbstractFormatter {
|
|
|
79
79
|
n.target,
|
|
80
80
|
n.tags
|
|
81
81
|
], isTruthy)).prepend(FormattingOptions.oneSpace);
|
|
82
|
-
f.properties("title", "technology").prepend(FormattingOptions.oneSpace);
|
|
82
|
+
f.properties("title", "description", "technology").prepend(FormattingOptions.oneSpace);
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
formatExtendDeployment(node) {
|
|
@@ -100,7 +100,7 @@ export class LikeC4Formatter extends AbstractFormatter {
|
|
|
100
100
|
n.target,
|
|
101
101
|
n.tags
|
|
102
102
|
], isTruthy)).prepend(FormattingOptions.oneSpace);
|
|
103
|
-
f.properties("title", "technology").prepend(FormattingOptions.oneSpace);
|
|
103
|
+
f.properties("title", "description", "technology").prepend(FormattingOptions.oneSpace);
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
106
|
this.on(node, ast.isDynamicViewStep, (n, f) => {
|
package/dist/generated/ast.d.ts
CHANGED
|
@@ -251,6 +251,7 @@ export interface DeploymentRelation extends langium.AstNode {
|
|
|
251
251
|
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ExtendDeploymentBody | ModelDeployments;
|
|
252
252
|
readonly $type: 'DeploymentRelation';
|
|
253
253
|
body?: DeploymentRelationBody;
|
|
254
|
+
description?: string;
|
|
254
255
|
dotKind?: RelationKindDotRef;
|
|
255
256
|
kind?: langium.Reference<RelationshipKind>;
|
|
256
257
|
source?: FqnRef;
|
|
@@ -782,6 +783,7 @@ export interface Relation extends langium.AstNode {
|
|
|
782
783
|
readonly $container: ElementBody | ExtendElementBody | Model;
|
|
783
784
|
readonly $type: 'Relation';
|
|
784
785
|
body?: RelationBody;
|
|
786
|
+
description?: string;
|
|
785
787
|
dotKind?: RelationKindDotRef;
|
|
786
788
|
kind?: langium.Reference<RelationshipKind>;
|
|
787
789
|
source?: FqnRef;
|
package/dist/generated/ast.js
CHANGED
|
@@ -1019,6 +1019,7 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
|
|
|
1019
1019
|
name: DeploymentRelation,
|
|
1020
1020
|
properties: [
|
|
1021
1021
|
{ name: "body" },
|
|
1022
|
+
{ name: "description" },
|
|
1022
1023
|
{ name: "dotKind" },
|
|
1023
1024
|
{ name: "kind" },
|
|
1024
1025
|
{ name: "source" },
|
|
@@ -1615,6 +1616,7 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
|
|
|
1615
1616
|
name: Relation,
|
|
1616
1617
|
properties: [
|
|
1617
1618
|
{ name: "body" },
|
|
1619
|
+
{ name: "description" },
|
|
1618
1620
|
{ name: "dotKind" },
|
|
1619
1621
|
{ name: "kind" },
|
|
1620
1622
|
{ name: "source" },
|