@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.
@@ -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.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>]>, v.DescriptionAction<string, "Project name, must be unique in the workspace">]>;
4
- readonly contactPerson: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>]>, v.DescriptionAction<string, "A person who has been involved in creating or maintaining this project">]>, undefined>;
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>;
@@ -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
- nonEmptyString,
7
- // TODO: check if this is needed
8
- // v.excludes('.', 'Project name cannot contain "."'),
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
- nonEmptyString,
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) => {
@@ -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;
@@ -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" },