@likec4/language-server 1.17.1 → 1.18.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/contrib/likec4.tmLanguage.json +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.mts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/protocol.d.cts +8 -5
- package/dist/protocol.d.mts +8 -5
- package/dist/protocol.d.ts +8 -5
- package/dist/shared/{language-server.DKV_FdPN.cjs → language-server.CO_nmHiL.cjs} +5598 -4213
- package/dist/shared/{language-server.BQRvVmE0.d.cts → language-server.Da6ey08o.d.cts} +390 -74
- package/dist/shared/{language-server.BysPcTxr.d.ts → language-server.De7S3e5Z.d.ts} +390 -74
- package/dist/shared/{language-server._wkyPgso.d.mts → language-server.Dj4iDjtB.d.mts} +390 -74
- package/dist/shared/{language-server.BIbAD1T-.mjs → language-server.oO_9JoAG.mjs} +5604 -4230
- package/package.json +11 -25
- package/src/Rpc.ts +6 -3
- package/src/ast.ts +124 -71
- package/src/generated/ast.ts +655 -39
- package/src/generated/grammar.ts +1 -1
- package/src/index.ts +1 -0
- package/src/like-c4.langium +170 -22
- package/src/logger.ts +7 -2
- package/src/lsp/CodeLensProvider.ts +0 -1
- package/src/lsp/CompletionProvider.ts +17 -2
- package/src/lsp/DocumentSymbolProvider.ts +5 -2
- package/src/lsp/HoverProvider.ts +34 -2
- package/src/lsp/SemanticTokenProvider.ts +58 -32
- package/src/model/deployments-index.ts +218 -0
- package/src/model/fqn-computation.ts +1 -1
- package/src/model/fqn-index.ts +0 -1
- package/src/model/index.ts +1 -0
- package/src/model/model-builder.ts +172 -37
- package/src/model/model-locator.ts +36 -7
- package/src/model/model-parser.ts +554 -92
- package/src/model-change/changeViewLayout.ts +2 -2
- package/src/module.ts +10 -4
- package/src/protocol.ts +10 -6
- package/src/references/index.ts +1 -0
- package/src/references/name-provider.ts +37 -0
- package/src/references/scope-computation.ts +130 -21
- package/src/references/scope-provider.ts +63 -36
- package/src/shared/NodeKindProvider.ts +15 -3
- package/src/utils/deploymentRef.ts +31 -0
- package/src/{elementRef.ts → utils/elementRef.ts} +1 -1
- package/src/utils/stringHash.ts +2 -2
- package/src/validation/_shared.ts +7 -5
- package/src/validation/deployment-checks.ts +144 -0
- package/src/validation/dynamic-view-step.ts +1 -1
- package/src/validation/index.ts +7 -0
- package/src/validation/relation.ts +1 -1
- package/src/validation/view-predicates/deployments.ts +56 -0
- package/src/validation/view-predicates/index.ts +1 -0
- package/src/view-utils/assignNavigateTo.ts +6 -5
- package/src/view-utils/index.ts +0 -1
- package/dist/model-graph/index.cjs +0 -10
- package/dist/model-graph/index.d.cts +0 -81
- package/dist/model-graph/index.d.mts +0 -81
- package/dist/model-graph/index.d.ts +0 -81
- package/dist/model-graph/index.mjs +0 -1
- package/dist/shared/language-server.D2QdbOJO.cjs +0 -1995
- package/dist/shared/language-server.DGrBGmsd.mjs +0 -1981
- package/src/model-graph/LikeC4ModelGraph.ts +0 -338
- package/src/model-graph/compute-view/__test__/fixture.ts +0 -630
- package/src/model-graph/compute-view/compute.ts +0 -788
- package/src/model-graph/compute-view/index.ts +0 -33
- package/src/model-graph/compute-view/predicates.ts +0 -509
- package/src/model-graph/dynamic-view/__test__/fixture.ts +0 -61
- package/src/model-graph/dynamic-view/compute.ts +0 -313
- package/src/model-graph/dynamic-view/index.ts +0 -29
- package/src/model-graph/index.ts +0 -3
- package/src/model-graph/utils/applyCustomElementProperties.ts +0 -65
- package/src/model-graph/utils/applyCustomRelationProperties.ts +0 -41
- package/src/model-graph/utils/applyViewRuleStyles.ts +0 -49
- package/src/model-graph/utils/buildComputeNodes.ts +0 -113
- package/src/model-graph/utils/buildElementNotations.ts +0 -63
- package/src/model-graph/utils/elementExpressionToPredicate.ts +0 -39
- package/src/model-graph/utils/relationExpressionToPredicates.ts +0 -43
- package/src/model-graph/utils/sortNodes.ts +0 -105
- package/src/model-graph/utils/uniqueTags.test.ts +0 -42
- package/src/model-graph/utils/uniqueTags.ts +0 -19
- package/src/utils/graphlib.ts +0 -9
- package/src/view-utils/resolve-extended-views.ts +0 -66
- package/src/view-utils/resolve-global-rules.ts +0 -88
- package/src/view-utils/view-hash.ts +0 -27
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LangiumDocument, GrammarAST, MaybePromise, ReferenceDescription, AstNode, Reference,
|
|
1
|
+
import { LangiumDocument, GrammarAST, MaybePromise, ReferenceDescription, AstNode, Reference, AstNodeDescription, MultiMap, DiagnosticInfo, DefaultNameProvider, CstNode, DefaultScopeComputation, PrecomputedScopes, DefaultScopeProvider, ReferenceInfo, Scope, LangiumDocuments, Stream, Cancellation, Disposable, URI, DefaultWorkspaceManager, WorkspaceCache, DocumentCache, Module } from 'langium';
|
|
2
2
|
import { CodeLensProvider, DefaultCompletionProvider, CompletionContext, CompletionAcceptor, DefaultDocumentHighlightProvider, DocumentLinkProvider, DocumentSymbolProvider, NodeKindProvider as NodeKindProvider$1, AstNodeHoverProvider, AbstractSemanticTokenProvider, SemanticTokenAcceptor, LangiumSharedServices, DefaultWorkspaceSymbolProvider, LangiumServices, PartialLangiumServices, DefaultSharedModuleContext } from 'langium/lsp';
|
|
3
3
|
import { CodeLensParams, CancellationToken, CodeLens, DocumentHighlight, DocumentLinkParams, DocumentLink, WorkspaceFolder } from 'vscode-languageserver';
|
|
4
4
|
import { Diagnostic, DocumentSymbol, SymbolKind, Hover, Location, Range, TextEdit, CompletionItemKind } from 'vscode-languageserver-types';
|
|
5
5
|
import * as c4 from '@likec4/core';
|
|
6
|
-
import { Fqn,
|
|
6
|
+
import { Fqn, ViewId } from '@likec4/core';
|
|
7
7
|
import { SetRequired, ValueOf, ConditionalPick } from 'type-fest';
|
|
8
8
|
import { ChangeViewRequestParams } from '../protocol.js';
|
|
9
9
|
import { URI as URI$1 } from 'vscode-uri';
|
|
@@ -47,6 +47,18 @@ type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | '
|
|
|
47
47
|
type BorderStyleValue = 'none' | LineOptions;
|
|
48
48
|
type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOptions | string;
|
|
49
49
|
type CustomColorValue = string;
|
|
50
|
+
type DeploymentElement = DeployedInstance | DeploymentNode;
|
|
51
|
+
declare const DeploymentElement = "DeploymentElement";
|
|
52
|
+
type DeploymentElementExpression = DeploymentRefExpression | WildcardExpression;
|
|
53
|
+
declare const DeploymentElementExpression = "DeploymentElementExpression";
|
|
54
|
+
type DeploymentExpression = DeploymentElementExpression | DeploymentRelationExpression;
|
|
55
|
+
declare const DeploymentExpression = "DeploymentExpression";
|
|
56
|
+
type DeploymentReferenceable = DeployedInstance | DeploymentNode | Element;
|
|
57
|
+
declare const DeploymentReferenceable = "DeploymentReferenceable";
|
|
58
|
+
type DeploymentRelationExpression = DirectedDeploymentRelationExpression | InOutDeploymentRelationExpression | IncomingDeploymentRelationExpression | OutgoingDeploymentRelationExpression;
|
|
59
|
+
declare const DeploymentRelationExpression = "DeploymentRelationExpression";
|
|
60
|
+
type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
|
|
61
|
+
declare const DeploymentViewRule = "DeploymentViewRule";
|
|
50
62
|
type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
|
|
51
63
|
declare const DynamicViewRule = "DynamicViewRule";
|
|
52
64
|
type ElementExpression = ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression;
|
|
@@ -58,9 +70,11 @@ declare const ElementPredicateOrWhere = "ElementPredicateOrWhere";
|
|
|
58
70
|
type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
|
|
59
71
|
declare const ElementProperty = "ElementProperty";
|
|
60
72
|
type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
|
|
73
|
+
type FqnReferenceable = DeploymentReferenceable | Element | ExtendElement;
|
|
74
|
+
declare const FqnReferenceable = "FqnReferenceable";
|
|
61
75
|
type IconId = string;
|
|
62
|
-
type Id = 'element' | 'group' | 'model' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
63
|
-
type LikeC4View = DynamicView | ElementView;
|
|
76
|
+
type Id = 'deployment' | 'element' | 'group' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
77
|
+
type LikeC4View = DeploymentView | DynamicView | ElementView;
|
|
64
78
|
declare const LikeC4View = "LikeC4View";
|
|
65
79
|
type LineOptions = 'dashed' | 'dotted' | 'solid';
|
|
66
80
|
type MetadataProperty = MetadataBody;
|
|
@@ -114,14 +128,14 @@ interface ArrowProperty extends AstNode {
|
|
|
114
128
|
}
|
|
115
129
|
declare const ArrowProperty = "ArrowProperty";
|
|
116
130
|
interface BorderProperty extends AstNode {
|
|
117
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
131
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
118
132
|
readonly $type: 'BorderProperty';
|
|
119
133
|
key: 'border';
|
|
120
134
|
value: BorderStyleValue;
|
|
121
135
|
}
|
|
122
136
|
declare const BorderProperty = "BorderProperty";
|
|
123
137
|
interface ColorProperty extends AstNode {
|
|
124
|
-
readonly $container: CustomElementProperties | CustomRelationProperties | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
|
|
138
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
|
|
125
139
|
readonly $type: 'ColorProperty';
|
|
126
140
|
customColor?: Reference<CustomColor>;
|
|
127
141
|
key: 'color';
|
|
@@ -146,6 +160,128 @@ interface CustomRelationProperties extends AstNode {
|
|
|
146
160
|
props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
|
|
147
161
|
}
|
|
148
162
|
declare const CustomRelationProperties = "CustomRelationProperties";
|
|
163
|
+
interface DeployedInstance extends AstNode {
|
|
164
|
+
readonly $container: DeploymentNodeBody;
|
|
165
|
+
readonly $type: 'DeployedInstance';
|
|
166
|
+
body?: DeployedInstanceBody;
|
|
167
|
+
element: ElementRef;
|
|
168
|
+
name?: Id;
|
|
169
|
+
title?: string;
|
|
170
|
+
}
|
|
171
|
+
declare const DeployedInstance = "DeployedInstance";
|
|
172
|
+
interface DeployedInstanceBody extends AstNode {
|
|
173
|
+
readonly $container: DeployedInstance;
|
|
174
|
+
readonly $type: 'DeployedInstanceBody';
|
|
175
|
+
props: Array<ElementProperty>;
|
|
176
|
+
tags?: Tags;
|
|
177
|
+
}
|
|
178
|
+
declare const DeployedInstanceBody = "DeployedInstanceBody";
|
|
179
|
+
interface DeploymentExpressionIterator extends AstNode {
|
|
180
|
+
readonly $container: DeploymentExpressionIterator | DeploymentViewRuleStyle;
|
|
181
|
+
readonly $type: 'DeploymentExpressionIterator';
|
|
182
|
+
prev?: DeploymentExpressionIterator;
|
|
183
|
+
value: DeploymentElementExpression;
|
|
184
|
+
}
|
|
185
|
+
declare const DeploymentExpressionIterator = "DeploymentExpressionIterator";
|
|
186
|
+
interface DeploymentNode extends AstNode {
|
|
187
|
+
readonly $container: DeploymentNodeBody | ModelDeployments;
|
|
188
|
+
readonly $type: 'DeploymentNode';
|
|
189
|
+
body?: DeploymentNodeBody;
|
|
190
|
+
kind: Reference<DeploymentNodeKind>;
|
|
191
|
+
name: Id;
|
|
192
|
+
title?: string;
|
|
193
|
+
}
|
|
194
|
+
declare const DeploymentNode = "DeploymentNode";
|
|
195
|
+
interface DeploymentNodeBody extends AstNode {
|
|
196
|
+
readonly $container: DeploymentNode;
|
|
197
|
+
readonly $type: 'DeploymentNodeBody';
|
|
198
|
+
elements: Array<DeployedInstance | DeploymentNode | DeploymentRelation>;
|
|
199
|
+
props: Array<ElementProperty>;
|
|
200
|
+
tags?: Tags;
|
|
201
|
+
}
|
|
202
|
+
declare const DeploymentNodeBody = "DeploymentNodeBody";
|
|
203
|
+
interface DeploymentNodeKind extends AstNode {
|
|
204
|
+
readonly $container: SpecificationDeploymentNodeKind;
|
|
205
|
+
readonly $type: 'DeploymentNodeKind';
|
|
206
|
+
name: Id;
|
|
207
|
+
}
|
|
208
|
+
declare const DeploymentNodeKind = "DeploymentNodeKind";
|
|
209
|
+
interface DeploymentRef extends AstNode {
|
|
210
|
+
readonly $container: DeploymentRef | DeploymentRefExpression | DeploymentRelation;
|
|
211
|
+
readonly $type: 'DeploymentRef';
|
|
212
|
+
parent?: DeploymentRef;
|
|
213
|
+
value: Reference<DeploymentReferenceable>;
|
|
214
|
+
}
|
|
215
|
+
declare const DeploymentRef = "DeploymentRef";
|
|
216
|
+
interface DeploymentRefExpression extends AstNode {
|
|
217
|
+
readonly $container: DeploymentExpressionIterator | DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression | IncomingDeploymentRelationExpression | OutgoingDeploymentRelationExpression;
|
|
218
|
+
readonly $type: 'DeploymentRefExpression';
|
|
219
|
+
ref: DeploymentRef;
|
|
220
|
+
selector?: string;
|
|
221
|
+
}
|
|
222
|
+
declare const DeploymentRefExpression = "DeploymentRefExpression";
|
|
223
|
+
interface DeploymentRelation extends AstNode {
|
|
224
|
+
readonly $container: DeploymentNodeBody | ModelDeployments;
|
|
225
|
+
readonly $type: 'DeploymentRelation';
|
|
226
|
+
body?: DeploymentRelationBody;
|
|
227
|
+
kind?: Reference<RelationshipKind>;
|
|
228
|
+
source: DeploymentRef;
|
|
229
|
+
tags?: Tags;
|
|
230
|
+
target: DeploymentRef;
|
|
231
|
+
technology?: string;
|
|
232
|
+
title?: string;
|
|
233
|
+
}
|
|
234
|
+
declare const DeploymentRelation = "DeploymentRelation";
|
|
235
|
+
interface DeploymentRelationBody extends AstNode {
|
|
236
|
+
readonly $container: DeploymentRelation;
|
|
237
|
+
readonly $type: 'DeploymentRelationBody';
|
|
238
|
+
props: Array<RelationProperty>;
|
|
239
|
+
tags?: Tags;
|
|
240
|
+
}
|
|
241
|
+
declare const DeploymentRelationBody = "DeploymentRelationBody";
|
|
242
|
+
interface DeploymentView extends AstNode {
|
|
243
|
+
readonly $container: ModelViews;
|
|
244
|
+
readonly $type: 'DeploymentView';
|
|
245
|
+
body?: DeploymentViewBody;
|
|
246
|
+
name: Id;
|
|
247
|
+
}
|
|
248
|
+
declare const DeploymentView = "DeploymentView";
|
|
249
|
+
interface DeploymentViewBody extends AstNode {
|
|
250
|
+
readonly $container: DeploymentView;
|
|
251
|
+
readonly $type: 'DeploymentViewBody';
|
|
252
|
+
props: Array<ViewProperty>;
|
|
253
|
+
rules: Array<DeploymentViewRule>;
|
|
254
|
+
tags?: Tags;
|
|
255
|
+
}
|
|
256
|
+
declare const DeploymentViewBody = "DeploymentViewBody";
|
|
257
|
+
interface DeploymentViewRulePredicate extends AstNode {
|
|
258
|
+
readonly $container: DeploymentViewBody;
|
|
259
|
+
readonly $type: 'DeploymentViewRulePredicate';
|
|
260
|
+
expr: DeploymentViewRulePredicateExpression;
|
|
261
|
+
isInclude: boolean;
|
|
262
|
+
}
|
|
263
|
+
declare const DeploymentViewRulePredicate = "DeploymentViewRulePredicate";
|
|
264
|
+
interface DeploymentViewRulePredicateExpression extends AstNode {
|
|
265
|
+
readonly $container: DeploymentViewRulePredicate | DeploymentViewRulePredicateExpression;
|
|
266
|
+
readonly $type: 'DeploymentViewRulePredicateExpression';
|
|
267
|
+
prev?: DeploymentViewRulePredicateExpression;
|
|
268
|
+
value: DeploymentExpression;
|
|
269
|
+
}
|
|
270
|
+
declare const DeploymentViewRulePredicateExpression = "DeploymentViewRulePredicateExpression";
|
|
271
|
+
interface DeploymentViewRuleStyle extends AstNode {
|
|
272
|
+
readonly $container: DeploymentViewBody;
|
|
273
|
+
readonly $type: 'DeploymentViewRuleStyle';
|
|
274
|
+
props: Array<NotationProperty | StyleProperty>;
|
|
275
|
+
target: DeploymentExpressionIterator;
|
|
276
|
+
}
|
|
277
|
+
declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
|
|
278
|
+
interface DirectedDeploymentRelationExpression extends AstNode {
|
|
279
|
+
readonly $container: DeploymentViewRulePredicateExpression;
|
|
280
|
+
readonly $type: 'DirectedDeploymentRelationExpression';
|
|
281
|
+
source: OutgoingDeploymentRelationExpression;
|
|
282
|
+
target: DeploymentElementExpression;
|
|
283
|
+
}
|
|
284
|
+
declare const DirectedDeploymentRelationExpression = "DirectedDeploymentRelationExpression";
|
|
149
285
|
interface DirectedRelationExpression extends AstNode {
|
|
150
286
|
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
151
287
|
readonly $type: 'DirectedRelationExpression';
|
|
@@ -232,6 +368,7 @@ interface ElementDescedantsExpression extends AstNode {
|
|
|
232
368
|
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
233
369
|
readonly $type: 'ElementDescedantsExpression';
|
|
234
370
|
parent: ElementRef;
|
|
371
|
+
suffix: string;
|
|
235
372
|
}
|
|
236
373
|
declare const ElementDescedantsExpression = "ElementDescedantsExpression";
|
|
237
374
|
interface ElementExpressionsIterator extends AstNode {
|
|
@@ -269,21 +406,21 @@ interface ElementPredicateWith extends AstNode {
|
|
|
269
406
|
}
|
|
270
407
|
declare const ElementPredicateWith = "ElementPredicateWith";
|
|
271
408
|
interface ElementRef extends AstNode {
|
|
272
|
-
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | DynamicViewStep | ElementDescedantsExpression | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | ElementRef | ElementView | ExpandElementExpression | IncomingRelationExpression | OutgoingRelationExpression | Predicates | Relation;
|
|
409
|
+
readonly $container: DeployedInstance | DirectedRelationExpression | DynamicViewPredicateIterator | DynamicViewStep | ElementDescedantsExpression | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | ElementRef | ElementView | ExpandElementExpression | IncomingRelationExpression | OutgoingRelationExpression | Predicates | Relation;
|
|
273
410
|
readonly $type: 'ElementRef';
|
|
274
411
|
el: Reference<Element>;
|
|
275
412
|
parent?: ElementRef;
|
|
276
413
|
}
|
|
277
414
|
declare const ElementRef = "ElementRef";
|
|
278
415
|
interface ElementStringProperty extends AstNode {
|
|
279
|
-
readonly $container: CustomElementProperties | ElementBody;
|
|
416
|
+
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
|
|
280
417
|
readonly $type: 'ElementStringProperty';
|
|
281
418
|
key: 'description' | 'technology' | 'title';
|
|
282
419
|
value: string;
|
|
283
420
|
}
|
|
284
421
|
declare const ElementStringProperty = "ElementStringProperty";
|
|
285
422
|
interface ElementStyleProperty extends AstNode {
|
|
286
|
-
readonly $container: ElementBody | SpecificationElementKind;
|
|
423
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ElementBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
287
424
|
readonly $type: 'ElementStyleProperty';
|
|
288
425
|
key: 'style';
|
|
289
426
|
props: Array<StyleProperty>;
|
|
@@ -395,7 +532,7 @@ interface GlobalStyleId extends AstNode {
|
|
|
395
532
|
}
|
|
396
533
|
declare const GlobalStyleId = "GlobalStyleId";
|
|
397
534
|
interface IconProperty extends AstNode {
|
|
398
|
-
readonly $container: CustomElementProperties | ElementBody | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
535
|
+
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | DeploymentViewRuleStyle | ElementBody | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
399
536
|
readonly $type: 'IconProperty';
|
|
400
537
|
key: 'icon';
|
|
401
538
|
libicon?: Reference<LibIcon>;
|
|
@@ -408,12 +545,24 @@ interface IncludePredicate extends AstNode {
|
|
|
408
545
|
predicates: Predicates;
|
|
409
546
|
}
|
|
410
547
|
declare const IncludePredicate = "IncludePredicate";
|
|
548
|
+
interface IncomingDeploymentRelationExpression extends AstNode {
|
|
549
|
+
readonly $container: DeploymentViewRulePredicateExpression | InOutDeploymentRelationExpression;
|
|
550
|
+
readonly $type: 'IncomingDeploymentRelationExpression';
|
|
551
|
+
to: DeploymentElementExpression;
|
|
552
|
+
}
|
|
553
|
+
declare const IncomingDeploymentRelationExpression = "IncomingDeploymentRelationExpression";
|
|
411
554
|
interface IncomingRelationExpression extends AstNode {
|
|
412
555
|
readonly $container: InOutRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
413
556
|
readonly $type: 'IncomingRelationExpression';
|
|
414
557
|
to: ElementExpression;
|
|
415
558
|
}
|
|
416
559
|
declare const IncomingRelationExpression = "IncomingRelationExpression";
|
|
560
|
+
interface InOutDeploymentRelationExpression extends AstNode {
|
|
561
|
+
readonly $container: DeploymentViewRulePredicateExpression;
|
|
562
|
+
readonly $type: 'InOutDeploymentRelationExpression';
|
|
563
|
+
inout: IncomingDeploymentRelationExpression;
|
|
564
|
+
}
|
|
565
|
+
declare const InOutDeploymentRelationExpression = "InOutDeploymentRelationExpression";
|
|
417
566
|
interface InOutRelationExpression extends AstNode {
|
|
418
567
|
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
419
568
|
readonly $type: 'InOutRelationExpression';
|
|
@@ -428,6 +577,7 @@ interface LibIcon extends AstNode {
|
|
|
428
577
|
declare const LibIcon = "LibIcon";
|
|
429
578
|
interface LikeC4Grammar extends AstNode {
|
|
430
579
|
readonly $type: 'LikeC4Grammar';
|
|
580
|
+
deployments: Array<ModelDeployments>;
|
|
431
581
|
globals: Array<Globals>;
|
|
432
582
|
likec4lib: Array<LikeC4Lib>;
|
|
433
583
|
models: Array<Model>;
|
|
@@ -449,7 +599,7 @@ interface LineProperty extends AstNode {
|
|
|
449
599
|
}
|
|
450
600
|
declare const LineProperty = "LineProperty";
|
|
451
601
|
interface LinkProperty extends AstNode {
|
|
452
|
-
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | RelationBody;
|
|
602
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | RelationBody;
|
|
453
603
|
readonly $type: 'LinkProperty';
|
|
454
604
|
key: 'link';
|
|
455
605
|
title?: string;
|
|
@@ -464,7 +614,7 @@ interface MetadataAttribute extends AstNode {
|
|
|
464
614
|
}
|
|
465
615
|
declare const MetadataAttribute = "MetadataAttribute";
|
|
466
616
|
interface MetadataBody extends AstNode {
|
|
467
|
-
readonly $container: ElementBody | RelationBody;
|
|
617
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | RelationBody;
|
|
468
618
|
readonly $type: 'MetadataBody';
|
|
469
619
|
props: Array<MetadataAttribute>;
|
|
470
620
|
}
|
|
@@ -476,6 +626,13 @@ interface Model extends AstNode {
|
|
|
476
626
|
name: 'model';
|
|
477
627
|
}
|
|
478
628
|
declare const Model = "Model";
|
|
629
|
+
interface ModelDeployments extends AstNode {
|
|
630
|
+
readonly $container: LikeC4Grammar;
|
|
631
|
+
readonly $type: 'ModelDeployments';
|
|
632
|
+
elements: Array<DeploymentNode | DeploymentRelation>;
|
|
633
|
+
name: 'deployment';
|
|
634
|
+
}
|
|
635
|
+
declare const ModelDeployments = "ModelDeployments";
|
|
479
636
|
interface ModelViews extends AstNode {
|
|
480
637
|
readonly $container: LikeC4Grammar;
|
|
481
638
|
readonly $type: 'ModelViews';
|
|
@@ -492,7 +649,7 @@ interface NavigateToProperty extends AstNode {
|
|
|
492
649
|
}
|
|
493
650
|
declare const NavigateToProperty = "NavigateToProperty";
|
|
494
651
|
interface NotationProperty extends AstNode {
|
|
495
|
-
readonly $container: CustomElementProperties | CustomRelationProperties | GlobalStyle | ViewRuleStyle;
|
|
652
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | GlobalStyle | ViewRuleStyle;
|
|
496
653
|
readonly $type: 'NotationProperty';
|
|
497
654
|
key: 'notation';
|
|
498
655
|
value: string;
|
|
@@ -506,12 +663,20 @@ interface NotesProperty extends AstNode {
|
|
|
506
663
|
}
|
|
507
664
|
declare const NotesProperty = "NotesProperty";
|
|
508
665
|
interface OpacityProperty extends AstNode {
|
|
509
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
666
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
510
667
|
readonly $type: 'OpacityProperty';
|
|
511
668
|
key: 'opacity';
|
|
512
669
|
value: string;
|
|
513
670
|
}
|
|
514
671
|
declare const OpacityProperty = "OpacityProperty";
|
|
672
|
+
interface OutgoingDeploymentRelationExpression extends AstNode {
|
|
673
|
+
readonly $container: DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression;
|
|
674
|
+
readonly $type: 'OutgoingDeploymentRelationExpression';
|
|
675
|
+
from: DeploymentElementExpression;
|
|
676
|
+
isBidirectional: boolean;
|
|
677
|
+
kind?: Reference<RelationshipKind>;
|
|
678
|
+
}
|
|
679
|
+
declare const OutgoingDeploymentRelationExpression = "OutgoingDeploymentRelationExpression";
|
|
515
680
|
interface OutgoingRelationExpression extends AstNode {
|
|
516
681
|
readonly $container: DirectedRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
517
682
|
readonly $type: 'OutgoingRelationExpression';
|
|
@@ -547,7 +712,7 @@ interface RelationBody extends AstNode {
|
|
|
547
712
|
}
|
|
548
713
|
declare const RelationBody = "RelationBody";
|
|
549
714
|
interface RelationNavigateToProperty extends AstNode {
|
|
550
|
-
readonly $container: CustomRelationProperties | RelationBody;
|
|
715
|
+
readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
|
|
551
716
|
readonly $type: 'RelationNavigateToProperty';
|
|
552
717
|
key: 'navigateTo';
|
|
553
718
|
value: DynamicViewRef;
|
|
@@ -574,21 +739,21 @@ interface RelationshipKind extends AstNode {
|
|
|
574
739
|
}
|
|
575
740
|
declare const RelationshipKind = "RelationshipKind";
|
|
576
741
|
interface RelationStringProperty extends AstNode {
|
|
577
|
-
readonly $container: CustomRelationProperties | RelationBody;
|
|
742
|
+
readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
|
|
578
743
|
readonly $type: 'RelationStringProperty';
|
|
579
744
|
key: 'description' | 'technology' | 'title';
|
|
580
745
|
value: string;
|
|
581
746
|
}
|
|
582
747
|
declare const RelationStringProperty = "RelationStringProperty";
|
|
583
748
|
interface RelationStyleProperty extends AstNode {
|
|
584
|
-
readonly $container: RelationBody;
|
|
749
|
+
readonly $container: DeploymentRelationBody | RelationBody;
|
|
585
750
|
readonly $type: 'RelationStyleProperty';
|
|
586
751
|
key: 'style';
|
|
587
752
|
props: Array<RelationshipStyleProperty>;
|
|
588
753
|
}
|
|
589
754
|
declare const RelationStyleProperty = "RelationStyleProperty";
|
|
590
755
|
interface ShapeProperty extends AstNode {
|
|
591
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
756
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
592
757
|
readonly $type: 'ShapeProperty';
|
|
593
758
|
key: 'shape';
|
|
594
759
|
value: ElementShape;
|
|
@@ -601,6 +766,13 @@ interface SpecificationColor extends AstNode {
|
|
|
601
766
|
name: CustomColor;
|
|
602
767
|
}
|
|
603
768
|
declare const SpecificationColor = "SpecificationColor";
|
|
769
|
+
interface SpecificationDeploymentNodeKind extends AstNode {
|
|
770
|
+
readonly $container: SpecificationRule;
|
|
771
|
+
readonly $type: 'SpecificationDeploymentNodeKind';
|
|
772
|
+
kind: DeploymentNodeKind;
|
|
773
|
+
props: Array<ElementStyleProperty | SpecificationElementStringProperty>;
|
|
774
|
+
}
|
|
775
|
+
declare const SpecificationDeploymentNodeKind = "SpecificationDeploymentNodeKind";
|
|
604
776
|
interface SpecificationElementKind extends AstNode {
|
|
605
777
|
readonly $container: SpecificationRule;
|
|
606
778
|
readonly $type: 'SpecificationElementKind';
|
|
@@ -609,7 +781,7 @@ interface SpecificationElementKind extends AstNode {
|
|
|
609
781
|
}
|
|
610
782
|
declare const SpecificationElementKind = "SpecificationElementKind";
|
|
611
783
|
interface SpecificationElementStringProperty extends AstNode {
|
|
612
|
-
readonly $container: SpecificationElementKind;
|
|
784
|
+
readonly $container: SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
613
785
|
readonly $type: 'SpecificationElementStringProperty';
|
|
614
786
|
key: 'notation' | 'technology';
|
|
615
787
|
value: string;
|
|
@@ -633,6 +805,7 @@ interface SpecificationRule extends AstNode {
|
|
|
633
805
|
readonly $container: LikeC4Grammar;
|
|
634
806
|
readonly $type: 'SpecificationRule';
|
|
635
807
|
colors: Array<SpecificationColor>;
|
|
808
|
+
deploymentNodes: Array<SpecificationDeploymentNodeKind>;
|
|
636
809
|
elements: Array<SpecificationElementKind>;
|
|
637
810
|
name: 'specification';
|
|
638
811
|
relationships: Array<SpecificationRelationshipKind>;
|
|
@@ -652,7 +825,7 @@ interface Tag extends AstNode {
|
|
|
652
825
|
}
|
|
653
826
|
declare const Tag = "Tag";
|
|
654
827
|
interface Tags extends AstNode {
|
|
655
|
-
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | Relation | RelationBody | Tags;
|
|
828
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | Relation | RelationBody | Tags;
|
|
656
829
|
readonly $type: 'Tags';
|
|
657
830
|
prev?: Tags;
|
|
658
831
|
values: Array<Reference<Tag>>;
|
|
@@ -665,7 +838,7 @@ interface ViewRef extends AstNode {
|
|
|
665
838
|
}
|
|
666
839
|
declare const ViewRef = "ViewRef";
|
|
667
840
|
interface ViewRuleAutoLayout extends AstNode {
|
|
668
|
-
readonly $container: DynamicViewBody | ElementViewBody;
|
|
841
|
+
readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
|
|
669
842
|
readonly $type: 'ViewRuleAutoLayout';
|
|
670
843
|
direction: ViewLayoutDirection;
|
|
671
844
|
nodeSep?: number;
|
|
@@ -700,7 +873,7 @@ interface ViewRuleStyle extends AstNode {
|
|
|
700
873
|
}
|
|
701
874
|
declare const ViewRuleStyle = "ViewRuleStyle";
|
|
702
875
|
interface ViewStringProperty extends AstNode {
|
|
703
|
-
readonly $container: DynamicViewBody | ElementViewBody;
|
|
876
|
+
readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
|
|
704
877
|
readonly $type: 'ViewStringProperty';
|
|
705
878
|
key: 'description' | 'title';
|
|
706
879
|
value: string;
|
|
@@ -759,7 +932,7 @@ interface WhereRelationTag extends AstNode {
|
|
|
759
932
|
}
|
|
760
933
|
declare const WhereRelationTag = "WhereRelationTag";
|
|
761
934
|
interface WildcardExpression extends AstNode {
|
|
762
|
-
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
935
|
+
readonly $container: DeploymentExpressionIterator | DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingDeploymentRelationExpression | IncomingRelationExpression | OutgoingDeploymentRelationExpression | OutgoingRelationExpression | Predicates;
|
|
763
936
|
readonly $type: 'WildcardExpression';
|
|
764
937
|
isWildcard: boolean;
|
|
765
938
|
}
|
|
@@ -771,6 +944,28 @@ type LikeC4AstType = {
|
|
|
771
944
|
CustomColor: CustomColor;
|
|
772
945
|
CustomElementProperties: CustomElementProperties;
|
|
773
946
|
CustomRelationProperties: CustomRelationProperties;
|
|
947
|
+
DeployedInstance: DeployedInstance;
|
|
948
|
+
DeployedInstanceBody: DeployedInstanceBody;
|
|
949
|
+
DeploymentElement: DeploymentElement;
|
|
950
|
+
DeploymentElementExpression: DeploymentElementExpression;
|
|
951
|
+
DeploymentExpression: DeploymentExpression;
|
|
952
|
+
DeploymentExpressionIterator: DeploymentExpressionIterator;
|
|
953
|
+
DeploymentNode: DeploymentNode;
|
|
954
|
+
DeploymentNodeBody: DeploymentNodeBody;
|
|
955
|
+
DeploymentNodeKind: DeploymentNodeKind;
|
|
956
|
+
DeploymentRef: DeploymentRef;
|
|
957
|
+
DeploymentRefExpression: DeploymentRefExpression;
|
|
958
|
+
DeploymentReferenceable: DeploymentReferenceable;
|
|
959
|
+
DeploymentRelation: DeploymentRelation;
|
|
960
|
+
DeploymentRelationBody: DeploymentRelationBody;
|
|
961
|
+
DeploymentRelationExpression: DeploymentRelationExpression;
|
|
962
|
+
DeploymentView: DeploymentView;
|
|
963
|
+
DeploymentViewBody: DeploymentViewBody;
|
|
964
|
+
DeploymentViewRule: DeploymentViewRule;
|
|
965
|
+
DeploymentViewRulePredicate: DeploymentViewRulePredicate;
|
|
966
|
+
DeploymentViewRulePredicateExpression: DeploymentViewRulePredicateExpression;
|
|
967
|
+
DeploymentViewRuleStyle: DeploymentViewRuleStyle;
|
|
968
|
+
DirectedDeploymentRelationExpression: DirectedDeploymentRelationExpression;
|
|
774
969
|
DirectedRelationExpression: DirectedRelationExpression;
|
|
775
970
|
DynamicView: DynamicView;
|
|
776
971
|
DynamicViewBody: DynamicViewBody;
|
|
@@ -805,6 +1000,7 @@ type LikeC4AstType = {
|
|
|
805
1000
|
ExtendElement: ExtendElement;
|
|
806
1001
|
ExtendElementBody: ExtendElementBody;
|
|
807
1002
|
FqnElementRef: FqnElementRef;
|
|
1003
|
+
FqnReferenceable: FqnReferenceable;
|
|
808
1004
|
GlobalDynamicPredicateGroup: GlobalDynamicPredicateGroup;
|
|
809
1005
|
GlobalPredicateGroup: GlobalPredicateGroup;
|
|
810
1006
|
GlobalStyle: GlobalStyle;
|
|
@@ -812,8 +1008,10 @@ type LikeC4AstType = {
|
|
|
812
1008
|
GlobalStyleId: GlobalStyleId;
|
|
813
1009
|
Globals: Globals;
|
|
814
1010
|
IconProperty: IconProperty;
|
|
1011
|
+
InOutDeploymentRelationExpression: InOutDeploymentRelationExpression;
|
|
815
1012
|
InOutRelationExpression: InOutRelationExpression;
|
|
816
1013
|
IncludePredicate: IncludePredicate;
|
|
1014
|
+
IncomingDeploymentRelationExpression: IncomingDeploymentRelationExpression;
|
|
817
1015
|
IncomingRelationExpression: IncomingRelationExpression;
|
|
818
1016
|
LibIcon: LibIcon;
|
|
819
1017
|
LikeC4Grammar: LikeC4Grammar;
|
|
@@ -825,11 +1023,13 @@ type LikeC4AstType = {
|
|
|
825
1023
|
MetadataBody: MetadataBody;
|
|
826
1024
|
MetadataProperty: MetadataProperty;
|
|
827
1025
|
Model: Model;
|
|
1026
|
+
ModelDeployments: ModelDeployments;
|
|
828
1027
|
ModelViews: ModelViews;
|
|
829
1028
|
NavigateToProperty: NavigateToProperty;
|
|
830
1029
|
NotationProperty: NotationProperty;
|
|
831
1030
|
NotesProperty: NotesProperty;
|
|
832
1031
|
OpacityProperty: OpacityProperty;
|
|
1032
|
+
OutgoingDeploymentRelationExpression: OutgoingDeploymentRelationExpression;
|
|
833
1033
|
OutgoingRelationExpression: OutgoingRelationExpression;
|
|
834
1034
|
Predicate: Predicate;
|
|
835
1035
|
Predicates: Predicates;
|
|
@@ -848,6 +1048,7 @@ type LikeC4AstType = {
|
|
|
848
1048
|
RelationshipStyleProperty: RelationshipStyleProperty;
|
|
849
1049
|
ShapeProperty: ShapeProperty;
|
|
850
1050
|
SpecificationColor: SpecificationColor;
|
|
1051
|
+
SpecificationDeploymentNodeKind: SpecificationDeploymentNodeKind;
|
|
851
1052
|
SpecificationElementKind: SpecificationElementKind;
|
|
852
1053
|
SpecificationElementStringProperty: SpecificationElementStringProperty;
|
|
853
1054
|
SpecificationRelationshipKind: SpecificationRelationshipKind;
|
|
@@ -892,10 +1093,19 @@ declare module './generated/ast' {
|
|
|
892
1093
|
[idattr]?: c4.Fqn | undefined;
|
|
893
1094
|
}
|
|
894
1095
|
interface ElementView {
|
|
895
|
-
[idattr]?: c4.
|
|
1096
|
+
[idattr]?: c4.ViewId | undefined;
|
|
896
1097
|
}
|
|
897
1098
|
interface DynamicView {
|
|
898
|
-
[idattr]?: c4.
|
|
1099
|
+
[idattr]?: c4.ViewId | undefined;
|
|
1100
|
+
}
|
|
1101
|
+
interface DeploymentView {
|
|
1102
|
+
[idattr]?: c4.ViewId | undefined;
|
|
1103
|
+
}
|
|
1104
|
+
interface DeploymentNode {
|
|
1105
|
+
[idattr]?: c4.Fqn | undefined;
|
|
1106
|
+
}
|
|
1107
|
+
interface DeployedInstance {
|
|
1108
|
+
[idattr]?: c4.Fqn | undefined;
|
|
899
1109
|
}
|
|
900
1110
|
}
|
|
901
1111
|
type ParsedElementStyle = {
|
|
@@ -923,6 +1133,7 @@ interface ParsedAstSpecification {
|
|
|
923
1133
|
colors: Record<c4.CustomColor, {
|
|
924
1134
|
color: c4.HexColorLiteral;
|
|
925
1135
|
}>;
|
|
1136
|
+
deployments: Record<c4.DeploymentNodeKind, c4.DeploymentNodeKindSpecification>;
|
|
926
1137
|
}
|
|
927
1138
|
interface ParsedAstElement {
|
|
928
1139
|
id: c4.Fqn;
|
|
@@ -939,7 +1150,7 @@ interface ParsedAstElement {
|
|
|
939
1150
|
};
|
|
940
1151
|
}
|
|
941
1152
|
interface ParsedAstRelation {
|
|
942
|
-
id: c4.
|
|
1153
|
+
id: c4.RelationId;
|
|
943
1154
|
astPath: string;
|
|
944
1155
|
source: c4.Fqn;
|
|
945
1156
|
target: c4.Fqn;
|
|
@@ -953,17 +1164,25 @@ interface ParsedAstRelation {
|
|
|
953
1164
|
head?: c4.RelationshipArrowType;
|
|
954
1165
|
tail?: c4.RelationshipArrowType;
|
|
955
1166
|
links?: c4.NonEmptyArray<ParsedLink>;
|
|
956
|
-
navigateTo?: c4.
|
|
1167
|
+
navigateTo?: c4.ViewId;
|
|
957
1168
|
metadata?: {
|
|
958
1169
|
[key: string]: string;
|
|
959
1170
|
};
|
|
960
1171
|
}
|
|
1172
|
+
type ParsedAstDeployment = c4.DeploymentElement;
|
|
1173
|
+
declare namespace ParsedAstDeployment {
|
|
1174
|
+
type Node = c4.DeploymentNode;
|
|
1175
|
+
type Instance = c4.DeployedInstance;
|
|
1176
|
+
}
|
|
1177
|
+
type ParsedAstDeploymentRelation = c4.DeploymentRelation & {
|
|
1178
|
+
astPath: string;
|
|
1179
|
+
};
|
|
961
1180
|
type ParsedAstGlobals = c4.ModelGlobals;
|
|
962
1181
|
interface ParsedAstElementView {
|
|
963
1182
|
__: 'element';
|
|
964
|
-
id: c4.
|
|
1183
|
+
id: c4.ViewId;
|
|
965
1184
|
viewOf?: c4.Fqn;
|
|
966
|
-
extends?: c4.
|
|
1185
|
+
extends?: c4.ViewId;
|
|
967
1186
|
astPath: string;
|
|
968
1187
|
title: string | null;
|
|
969
1188
|
description: string | null;
|
|
@@ -974,7 +1193,7 @@ interface ParsedAstElementView {
|
|
|
974
1193
|
}
|
|
975
1194
|
interface ParsedAstDynamicView {
|
|
976
1195
|
__: 'dynamic';
|
|
977
|
-
id: c4.
|
|
1196
|
+
id: c4.ViewId;
|
|
978
1197
|
astPath: string;
|
|
979
1198
|
title: string | null;
|
|
980
1199
|
description: string | null;
|
|
@@ -984,7 +1203,17 @@ interface ParsedAstDynamicView {
|
|
|
984
1203
|
rules: Array<c4.DynamicViewRule>;
|
|
985
1204
|
manualLayout?: c4.ViewManualLayout;
|
|
986
1205
|
}
|
|
987
|
-
|
|
1206
|
+
interface ParsedAstDeploymentView {
|
|
1207
|
+
__: 'deployment';
|
|
1208
|
+
id: c4.ViewId;
|
|
1209
|
+
astPath: string;
|
|
1210
|
+
title: string | null;
|
|
1211
|
+
description: string | null;
|
|
1212
|
+
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
1213
|
+
links: c4.NonEmptyArray<ParsedLink> | null;
|
|
1214
|
+
rules: Array<c4.DeploymentViewRule>;
|
|
1215
|
+
}
|
|
1216
|
+
type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
|
|
988
1217
|
interface ParsedLink {
|
|
989
1218
|
title?: string;
|
|
990
1219
|
url: string;
|
|
@@ -992,6 +1221,9 @@ interface ParsedLink {
|
|
|
992
1221
|
interface DocFqnIndexAstNodeDescription extends AstNodeDescription {
|
|
993
1222
|
fqn: c4.Fqn;
|
|
994
1223
|
}
|
|
1224
|
+
interface DeploymentAstNodeDescription extends AstNodeDescription {
|
|
1225
|
+
fqn: string;
|
|
1226
|
+
}
|
|
995
1227
|
type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
|
|
996
1228
|
type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
|
|
997
1229
|
interface LikeC4DocumentProps {
|
|
@@ -1001,21 +1233,24 @@ interface LikeC4DocumentProps {
|
|
|
1001
1233
|
c4Relations?: ParsedAstRelation[];
|
|
1002
1234
|
c4Globals?: ParsedAstGlobals;
|
|
1003
1235
|
c4Views?: ParsedAstView[];
|
|
1236
|
+
c4Deployments?: ParsedAstDeployment[];
|
|
1237
|
+
c4DeploymentRelations?: ParsedAstDeploymentRelation[];
|
|
1004
1238
|
c4fqnIndex?: MultiMap<c4.Fqn, DocFqnIndexAstNodeDescription>;
|
|
1005
1239
|
}
|
|
1006
|
-
|
|
1240
|
+
type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
|
|
1241
|
+
interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
|
|
1007
1242
|
}
|
|
1008
|
-
interface FqnIndexedDocument extends
|
|
1243
|
+
interface FqnIndexedDocument extends SetRequired<LikeC4LangiumDocument, 'c4fqnIndex'> {
|
|
1009
1244
|
}
|
|
1010
|
-
interface ParsedLikeC4LangiumDocument extends
|
|
1245
|
+
interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
|
|
1011
1246
|
}
|
|
1012
1247
|
type Guard<N extends AstNode> = (n: AstNode) => n is N;
|
|
1013
1248
|
type Guarded<G> = G extends Guard<infer N> ? N : never;
|
|
1014
|
-
declare const isValidatableAstNode: (n: AstNode) => n is
|
|
1249
|
+
declare const isValidatableAstNode: (n: AstNode) => n is ArrowProperty | SpecificationRelationshipKind | DynamicViewStep | RelationPredicateWith | DynamicViewParallelSteps | DynamicView | ExcludePredicate | IncludePredicate | GlobalPredicateGroup | ViewRuleGroup | ElementView | Globals | DeploymentNode | Relation | Element | ExtendElement | SpecificationRule | BorderProperty | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle | ElementPredicateWith | DynamicViewPredicateIterator | DynamicViewIncludePredicate | GlobalDynamicPredicateGroup | DeploymentView | SpecificationDeploymentNodeKind | SpecificationElementKind | DeployedInstance | GlobalStyleGroup | ColorProperty | SpecificationColor | DeploymentRefExpression | WildcardExpression | DirectedDeploymentRelationExpression | IncomingDeploymentRelationExpression | OutgoingDeploymentRelationExpression | DeploymentViewRulePredicate | InOutDeploymentRelationExpression | DirectedRelationExpression | ElementPredicateWhere | IncomingRelationExpression | OutgoingRelationExpression | RelationPredicateWhere | InOutRelationExpression | ViewRuleAutoLayout | DynamicViewGlobalPredicateRef | ViewRuleGlobalStyle | ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | ElementStringProperty | IconProperty | LinkProperty | MetadataBody | LineProperty | MetadataAttribute | NavigateToProperty | NotationProperty | NotesProperty | OpacityProperty | RelationStringProperty | ShapeProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | SpecificationTag | ViewStringProperty | Tags | ViewRuleGlobalPredicateRef;
|
|
1015
1250
|
type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
|
|
1016
1251
|
declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
|
|
1017
1252
|
isValid: (n: ValidatableAstNode) => boolean;
|
|
1018
|
-
invalidNodes: WeakSet<
|
|
1253
|
+
invalidNodes: WeakSet<object>;
|
|
1019
1254
|
};
|
|
1020
1255
|
type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
|
|
1021
1256
|
|
|
@@ -1039,6 +1274,7 @@ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
|
1039
1274
|
}
|
|
1040
1275
|
|
|
1041
1276
|
declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
1277
|
+
private parser;
|
|
1042
1278
|
private locator;
|
|
1043
1279
|
constructor(services: LikeC4Services);
|
|
1044
1280
|
protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
|
|
@@ -1046,10 +1282,100 @@ declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
|
1046
1282
|
|
|
1047
1283
|
declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
|
|
1048
1284
|
protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
|
|
1049
|
-
private
|
|
1285
|
+
private highlightNameAndKind;
|
|
1050
1286
|
private highlightView;
|
|
1051
1287
|
}
|
|
1052
1288
|
|
|
1289
|
+
declare class LikeC4NameProvider extends DefaultNameProvider {
|
|
1290
|
+
protected services: LikeC4Services;
|
|
1291
|
+
constructor(services: LikeC4Services);
|
|
1292
|
+
getNameStrict(node: AstNode): string;
|
|
1293
|
+
getName(node: AstNode): string | undefined;
|
|
1294
|
+
getNameNode(node: AstNode): CstNode | undefined;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
type ElementsContainer = Model | ElementBody | ExtendElementBody;
|
|
1298
|
+
type DeploymentsContainer = ModelDeployments | DeploymentNodeBody;
|
|
1299
|
+
declare class LikeC4ScopeComputation extends DefaultScopeComputation {
|
|
1300
|
+
constructor(services: LikeC4Services);
|
|
1301
|
+
computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
1302
|
+
private exportViews;
|
|
1303
|
+
private exportGlobals;
|
|
1304
|
+
private exportModel;
|
|
1305
|
+
private exportLibrary;
|
|
1306
|
+
private exportSpecification;
|
|
1307
|
+
private exportDeployments;
|
|
1308
|
+
computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
|
|
1309
|
+
protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
1310
|
+
protected processDeployments(container: DeploymentsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
1314
|
+
private deploymentsIndex;
|
|
1315
|
+
private fqnIndex;
|
|
1316
|
+
constructor(services: LikeC4Services);
|
|
1317
|
+
private directChildrenOf;
|
|
1318
|
+
private uniqueDescedants;
|
|
1319
|
+
private scopeElementRef;
|
|
1320
|
+
private scopeExtendElement;
|
|
1321
|
+
private scopeElementView;
|
|
1322
|
+
getScope(context: ReferenceInfo): Scope;
|
|
1323
|
+
protected getScopeForDeploymentRef(container: DeploymentRef, context: ReferenceInfo): Scope;
|
|
1324
|
+
protected computeScope(context: ReferenceInfo, referenceType?: string): Scope;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
declare class DeploymentsIndex {
|
|
1328
|
+
private services;
|
|
1329
|
+
protected Names: LikeC4NameProvider;
|
|
1330
|
+
protected langiumDocuments: LangiumDocuments;
|
|
1331
|
+
constructor(services: LikeC4Services);
|
|
1332
|
+
private documents;
|
|
1333
|
+
get(document: LikeC4LangiumDocument): DocumentDeploymentsIndex;
|
|
1334
|
+
/**
|
|
1335
|
+
* Nested elements (nodes/artifacts) of the node
|
|
1336
|
+
* @param nodeName Name of the deployment node
|
|
1337
|
+
* @returns Stream of artifacts
|
|
1338
|
+
*/
|
|
1339
|
+
nested(node: DeploymentNode): Stream<DeploymentAstNodeDescription>;
|
|
1340
|
+
byFqn(fqnName: string): Stream<DeploymentAstNodeDescription>;
|
|
1341
|
+
getFqnName(node: DeploymentElement): Fqn;
|
|
1342
|
+
createDocumentIndex(document: LikeC4LangiumDocument): DocumentDeploymentsIndex;
|
|
1343
|
+
}
|
|
1344
|
+
declare class DocumentDeploymentsIndex {
|
|
1345
|
+
private _rootNodes;
|
|
1346
|
+
/**
|
|
1347
|
+
* Nested of a deployment node
|
|
1348
|
+
*/
|
|
1349
|
+
private _nested;
|
|
1350
|
+
/**
|
|
1351
|
+
* All elements by FQN
|
|
1352
|
+
*/
|
|
1353
|
+
private _byfqn;
|
|
1354
|
+
static readonly EMPTY: DocumentDeploymentsIndex;
|
|
1355
|
+
constructor(_rootNodes: Array<DeploymentAstNodeDescription>,
|
|
1356
|
+
/**
|
|
1357
|
+
* Nested of a deployment node
|
|
1358
|
+
*/
|
|
1359
|
+
_nested: MultiMap<string, DeploymentAstNodeDescription>,
|
|
1360
|
+
/**
|
|
1361
|
+
* All elements by FQN
|
|
1362
|
+
*/
|
|
1363
|
+
_byfqn: MultiMap<string, DeploymentAstNodeDescription>);
|
|
1364
|
+
rootNodes(): readonly DeploymentAstNodeDescription[];
|
|
1365
|
+
byFqn(fqnName: string): readonly DeploymentAstNodeDescription[];
|
|
1366
|
+
/**
|
|
1367
|
+
* Returns artifacts of a deployment node
|
|
1368
|
+
* @param nodeName Name of the deployment node
|
|
1369
|
+
* @returns Stream of artifacts
|
|
1370
|
+
*/
|
|
1371
|
+
nested(nodeName: string): readonly DeploymentAstNodeDescription[];
|
|
1372
|
+
/**
|
|
1373
|
+
* Returns all deployment elements in the document,
|
|
1374
|
+
* with unique combination "type and name"
|
|
1375
|
+
*/
|
|
1376
|
+
unique(): readonly DeploymentAstNodeDescription[];
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1053
1379
|
declare function computeDocumentFqn(document: LikeC4LangiumDocument, services: LikeC4Services): void;
|
|
1054
1380
|
|
|
1055
1381
|
interface FqnIndexEntry {
|
|
@@ -1095,7 +1421,7 @@ declare class LikeC4ModelBuilder {
|
|
|
1095
1421
|
*/
|
|
1096
1422
|
unsafeSyncBuildComputedModel(model: c4.ParsedLikeC4Model): c4.ComputedLikeC4Model;
|
|
1097
1423
|
buildComputedModel(cancelToken?: Cancellation.CancellationToken): Promise<c4.ComputedLikeC4Model | null>;
|
|
1098
|
-
computeView(viewId:
|
|
1424
|
+
computeView(viewId: ViewId, cancelToken?: Cancellation.CancellationToken): Promise<c4.ComputedView | null>;
|
|
1099
1425
|
onModelParsed(callback: ModelParsedListener$1): Disposable;
|
|
1100
1426
|
private documents;
|
|
1101
1427
|
private notifyListeners;
|
|
@@ -1104,18 +1430,20 @@ declare class LikeC4ModelBuilder {
|
|
|
1104
1430
|
declare class LikeC4ModelLocator {
|
|
1105
1431
|
private services;
|
|
1106
1432
|
private fqnIndex;
|
|
1433
|
+
private deploymentsIndex;
|
|
1107
1434
|
private langiumDocuments;
|
|
1108
1435
|
constructor(services: LikeC4Services);
|
|
1109
1436
|
private documents;
|
|
1110
|
-
getParsedElement(
|
|
1437
|
+
getParsedElement(astNodeOrFqn: Element | c4.Fqn): ParsedAstElement | null;
|
|
1111
1438
|
locateElement(fqn: c4.Fqn, _prop?: string): Location | null;
|
|
1112
|
-
|
|
1113
|
-
|
|
1439
|
+
locateDeploymentElement(fqn: c4.Fqn, _prop?: string): Location | null;
|
|
1440
|
+
locateRelation(relationId: c4.RelationId): Location | null;
|
|
1441
|
+
locateViewAst(viewId: c4.ViewId): {
|
|
1114
1442
|
doc: ParsedLikeC4LangiumDocument;
|
|
1115
1443
|
view: ParsedAstView;
|
|
1116
1444
|
viewAst: LikeC4View;
|
|
1117
1445
|
};
|
|
1118
|
-
locateView(viewId: c4.
|
|
1446
|
+
locateView(viewId: c4.ViewId): Location | null;
|
|
1119
1447
|
}
|
|
1120
1448
|
|
|
1121
1449
|
type ModelParsedListener = () => void;
|
|
@@ -1124,9 +1452,10 @@ declare class LikeC4ModelParser {
|
|
|
1124
1452
|
private services;
|
|
1125
1453
|
private fqnIndex;
|
|
1126
1454
|
constructor(services: LikeC4Services);
|
|
1127
|
-
parse(doc: LangiumDocument
|
|
1455
|
+
parse(doc: LangiumDocument): ParsedLikeC4LangiumDocument;
|
|
1128
1456
|
protected parseLikeC4Document(_doc: FqnIndexedDocument): ParsedLikeC4LangiumDocument;
|
|
1129
1457
|
private parseSpecification;
|
|
1458
|
+
private parseSpecificationDeploymentNodeKind;
|
|
1130
1459
|
private parseModel;
|
|
1131
1460
|
private parseElement;
|
|
1132
1461
|
private parseRelation;
|
|
@@ -1154,14 +1483,26 @@ declare class LikeC4ModelParser {
|
|
|
1154
1483
|
private parseViewRuleGroup;
|
|
1155
1484
|
private parseRuleStyle;
|
|
1156
1485
|
private parseViewRuleGlobalStyle;
|
|
1157
|
-
private
|
|
1486
|
+
private parseViewManualLayout;
|
|
1158
1487
|
private parseDynamicParallelSteps;
|
|
1159
1488
|
private parseDynamicStep;
|
|
1160
1489
|
private parseElementView;
|
|
1161
1490
|
private parseDynamicElementView;
|
|
1162
1491
|
private parseDynamicViewRule;
|
|
1163
1492
|
private parseDynamicViewIncludePredicate;
|
|
1164
|
-
|
|
1493
|
+
private parseDeployment;
|
|
1494
|
+
parseDeploymentNode(astNode: DeploymentNode, isValid: IsValidFn): ParsedAstDeployment.Node;
|
|
1495
|
+
parseDeployedInstance(astNode: DeployedInstance, isValid: IsValidFn): ParsedAstDeployment.Instance;
|
|
1496
|
+
parseDeploymentRelation(astNode: DeploymentRelation, isValid: IsValidFn): ParsedAstDeploymentRelation;
|
|
1497
|
+
private parseDeploymentView;
|
|
1498
|
+
private parseDeploymentViewRule;
|
|
1499
|
+
private parseDeploymentViewRulePredicate;
|
|
1500
|
+
private parseDeploymentElementExpression;
|
|
1501
|
+
private parseDeploymentRelationExpression;
|
|
1502
|
+
private parseDeploymentExpressionIterator;
|
|
1503
|
+
private parseDeploymentDef;
|
|
1504
|
+
protected parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle, isValid: IsValidFn): c4.DeploymentViewRuleStyle;
|
|
1505
|
+
protected resolveFqn(node: FqnReferenceable): c4.Fqn;
|
|
1165
1506
|
private getAstNodePath;
|
|
1166
1507
|
private getMetadata;
|
|
1167
1508
|
private convertTags;
|
|
@@ -1180,34 +1521,6 @@ declare class LikeC4ModelChanges {
|
|
|
1180
1521
|
};
|
|
1181
1522
|
}
|
|
1182
1523
|
|
|
1183
|
-
type ElementsContainer = Model | ElementBody | ExtendElementBody;
|
|
1184
|
-
declare class LikeC4ScopeComputation extends DefaultScopeComputation {
|
|
1185
|
-
computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
1186
|
-
private exportViews;
|
|
1187
|
-
private exportGlobals;
|
|
1188
|
-
private exportModel;
|
|
1189
|
-
private exportLibrary;
|
|
1190
|
-
private exportSpecification;
|
|
1191
|
-
computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
|
|
1192
|
-
protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): MultiMap<string, AstNodeDescription>;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
1196
|
-
private fqnIndex;
|
|
1197
|
-
constructor(services: LikeC4Services);
|
|
1198
|
-
private directChildrenOf;
|
|
1199
|
-
private uniqueDescedants;
|
|
1200
|
-
private scopeElementRef;
|
|
1201
|
-
private scopeExtendElement;
|
|
1202
|
-
private scopeElementView;
|
|
1203
|
-
getScope(context: ReferenceInfo): Scope;
|
|
1204
|
-
protected computeScope(context: ReferenceInfo): Scope;
|
|
1205
|
-
/**
|
|
1206
|
-
* Create a global scope filtered for the given reference type.
|
|
1207
|
-
*/
|
|
1208
|
-
protected getGlobalScope(referenceType: string): Scope;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
1524
|
declare class Rpc implements Disposable {
|
|
1212
1525
|
private services;
|
|
1213
1526
|
private disposables;
|
|
@@ -1261,8 +1574,10 @@ type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
|
|
|
1261
1574
|
*/
|
|
1262
1575
|
interface LikeC4AddedServices {
|
|
1263
1576
|
WorkspaceCache: WorkspaceCache<string, any>;
|
|
1577
|
+
DocumentCache: DocumentCache<string, any>;
|
|
1264
1578
|
Rpc: Rpc;
|
|
1265
1579
|
likec4: {
|
|
1580
|
+
DeploymentsIndex: DeploymentsIndex;
|
|
1266
1581
|
FqnIndex: FqnIndex;
|
|
1267
1582
|
ModelParser: LikeC4ModelParser;
|
|
1268
1583
|
ModelBuilder: LikeC4ModelBuilder;
|
|
@@ -1279,6 +1594,7 @@ interface LikeC4AddedServices {
|
|
|
1279
1594
|
DocumentLinkProvider: LikeC4DocumentLinkProvider;
|
|
1280
1595
|
};
|
|
1281
1596
|
references: {
|
|
1597
|
+
NameProvider: LikeC4NameProvider;
|
|
1282
1598
|
ScopeComputation: LikeC4ScopeComputation;
|
|
1283
1599
|
ScopeProvider: LikeC4ScopeProvider;
|
|
1284
1600
|
};
|
|
@@ -1300,4 +1616,4 @@ declare function createLanguageServices(context?: LanguageServicesContext): {
|
|
|
1300
1616
|
declare const logger: _likec4_log.ConsolaInstance;
|
|
1301
1617
|
declare function setLogLevel(level: keyof typeof LogLevels): void;
|
|
1302
1618
|
|
|
1303
|
-
export { type FqnIndexEntry as F, type IsValidFn as I, type LikeC4SharedServices as L, type ModelParsedListener as M, type LikeC4Services as a, createLanguageServices as b, createCustomLanguageServices as c, LikeC4Module as d,
|
|
1619
|
+
export { DeploymentsIndex as D, type FqnIndexEntry as F, type IsValidFn as I, type LikeC4SharedServices as L, type ModelParsedListener as M, type LikeC4Services as a, createLanguageServices as b, createCustomLanguageServices as c, LikeC4Module as d, DocumentDeploymentsIndex as e, computeDocumentFqn as f, FqnIndex as g, LikeC4ModelBuilder as h, LikeC4ModelLocator as i, LikeC4ModelParser as j, type LikeC4AddedServices as k, type LanguageServicesContext as l, createSharedServices as m, logger as n, setLogLevel as s };
|