@likec4/language-server 1.17.0 → 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.DZRuJVSg.cjs → language-server.CO_nmHiL.cjs} +5605 -4215
- package/dist/shared/{language-server.DJo88TnT.d.cts → language-server.Da6ey08o.d.cts} +391 -110
- package/dist/shared/{language-server.PEjk7U9s.d.ts → language-server.De7S3e5Z.d.ts} +391 -110
- package/dist/shared/{language-server.BgDKnNok.d.mts → language-server.Dj4iDjtB.d.mts} +391 -110
- package/dist/shared/{language-server.B8qSDsWW.mjs → language-server.oO_9JoAG.mjs} +5594 -4215
- package/package.json +17 -31
- package/src/Rpc.ts +6 -3
- package/src/ast.ts +124 -71
- package/src/formatting/LikeC4Formatter.ts +9 -4
- package/src/generated/ast.ts +656 -40
- package/src/generated/grammar.ts +2 -2
- package/src/generated/module.ts +3 -2
- 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.BGGRJRnr.d.mts +0 -1338
- package/dist/shared/language-server.BXFhlTPo.mjs +0 -1953
- package/dist/shared/language-server.Bmpq16Gw.d.ts +0 -1338
- package/dist/shared/language-server.C1ZfM22X.d.cts +0 -1338
- package/dist/shared/language-server.N8HLDQqz.cjs +0 -1967
- 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 -281
- 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.mjs';
|
|
9
9
|
import { URI as URI$1 } from 'vscode-uri';
|
|
@@ -39,7 +39,7 @@ declare class LikeC4DocumentLinkProvider implements DocumentLinkProvider {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/******************************************************************************
|
|
42
|
-
* This file was generated by langium-cli 3.
|
|
42
|
+
* This file was generated by langium-cli 3.3.0.
|
|
43
43
|
* DO NOT EDIT MANUALLY!
|
|
44
44
|
******************************************************************************/
|
|
45
45
|
|
|
@@ -47,25 +47,35 @@ 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
|
-
declare function isDynamicViewRule(item: unknown): item is DynamicViewRule;
|
|
53
64
|
type ElementExpression = ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression;
|
|
54
65
|
declare const ElementExpression = "ElementExpression";
|
|
55
|
-
declare function isElementExpression(item: unknown): item is ElementExpression;
|
|
56
66
|
type ElementPredicate = ElementPredicateOrWhere | ElementPredicateWith;
|
|
57
67
|
declare const ElementPredicate = "ElementPredicate";
|
|
58
68
|
type ElementPredicateOrWhere = ElementExpression | ElementPredicateWhere;
|
|
59
69
|
declare const ElementPredicateOrWhere = "ElementPredicateOrWhere";
|
|
60
70
|
type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
|
|
61
71
|
declare const ElementProperty = "ElementProperty";
|
|
62
|
-
declare function isElementProperty(item: unknown): item is ElementProperty;
|
|
63
72
|
type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
|
|
73
|
+
type FqnReferenceable = DeploymentReferenceable | Element | ExtendElement;
|
|
74
|
+
declare const FqnReferenceable = "FqnReferenceable";
|
|
64
75
|
type IconId = string;
|
|
65
|
-
type Id = 'element' | 'group' | 'model' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
66
|
-
type LikeC4View = DynamicView | ElementView;
|
|
76
|
+
type Id = 'deployment' | 'element' | 'group' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
77
|
+
type LikeC4View = DeploymentView | DynamicView | ElementView;
|
|
67
78
|
declare const LikeC4View = "LikeC4View";
|
|
68
|
-
declare function isLikeC4View(item: unknown): item is LikeC4View;
|
|
69
79
|
type LineOptions = 'dashed' | 'dotted' | 'solid';
|
|
70
80
|
type MetadataProperty = MetadataBody;
|
|
71
81
|
declare const MetadataProperty = "MetadataProperty";
|
|
@@ -73,30 +83,25 @@ type Predicate = ElementPredicate | RelationPredicate;
|
|
|
73
83
|
declare const Predicate = "Predicate";
|
|
74
84
|
type RelationExpression = DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression;
|
|
75
85
|
declare const RelationExpression = "RelationExpression";
|
|
76
|
-
declare function isRelationExpression(item: unknown): item is RelationExpression;
|
|
77
86
|
type RelationPredicate = RelationPredicateOrWhere | RelationPredicateWith;
|
|
78
87
|
declare const RelationPredicate = "RelationPredicate";
|
|
79
88
|
type RelationPredicateOrWhere = RelationExpression | RelationPredicateWhere;
|
|
80
89
|
declare const RelationPredicateOrWhere = "RelationPredicateOrWhere";
|
|
81
90
|
type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
|
|
82
91
|
declare const RelationProperty = "RelationProperty";
|
|
83
|
-
declare function isRelationProperty(item: unknown): item is RelationProperty;
|
|
84
92
|
type RelationshipStyleProperty = ArrowProperty | ColorProperty | LineProperty;
|
|
85
93
|
declare const RelationshipStyleProperty = "RelationshipStyleProperty";
|
|
86
94
|
type StringProperty = ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
|
|
87
95
|
declare const StringProperty = "StringProperty";
|
|
88
96
|
type StyleProperty = BorderProperty | ColorProperty | IconProperty | OpacityProperty | ShapeProperty;
|
|
89
97
|
declare const StyleProperty = "StyleProperty";
|
|
90
|
-
declare function isStyleProperty(item: unknown): item is StyleProperty;
|
|
91
98
|
type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
|
|
92
99
|
type Uri = string;
|
|
93
100
|
type ViewLayoutDirection = 'BottomTop' | 'LeftRight' | 'RightLeft' | 'TopBottom';
|
|
94
101
|
type ViewProperty = LinkProperty | ViewStringProperty;
|
|
95
102
|
declare const ViewProperty = "ViewProperty";
|
|
96
|
-
declare function isViewProperty(item: unknown): item is ViewProperty;
|
|
97
103
|
type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleStyleOrGlobalRef;
|
|
98
104
|
declare const ViewRule = "ViewRule";
|
|
99
|
-
declare function isViewRule(item: unknown): item is ViewRule;
|
|
100
105
|
type ViewRulePredicate = ExcludePredicate | IncludePredicate;
|
|
101
106
|
declare const ViewRulePredicate = "ViewRulePredicate";
|
|
102
107
|
type ViewRuleStyleOrGlobalRef = ViewRuleGlobalStyle | ViewRuleStyle;
|
|
@@ -123,14 +128,14 @@ interface ArrowProperty extends AstNode {
|
|
|
123
128
|
}
|
|
124
129
|
declare const ArrowProperty = "ArrowProperty";
|
|
125
130
|
interface BorderProperty extends AstNode {
|
|
126
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
131
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
127
132
|
readonly $type: 'BorderProperty';
|
|
128
133
|
key: 'border';
|
|
129
134
|
value: BorderStyleValue;
|
|
130
135
|
}
|
|
131
136
|
declare const BorderProperty = "BorderProperty";
|
|
132
137
|
interface ColorProperty extends AstNode {
|
|
133
|
-
readonly $container: CustomElementProperties | CustomRelationProperties | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
|
|
138
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
|
|
134
139
|
readonly $type: 'ColorProperty';
|
|
135
140
|
customColor?: Reference<CustomColor>;
|
|
136
141
|
key: 'color';
|
|
@@ -155,6 +160,128 @@ interface CustomRelationProperties extends AstNode {
|
|
|
155
160
|
props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
|
|
156
161
|
}
|
|
157
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";
|
|
158
285
|
interface DirectedRelationExpression extends AstNode {
|
|
159
286
|
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
160
287
|
readonly $type: 'DirectedRelationExpression';
|
|
@@ -178,7 +305,6 @@ interface DynamicViewBody extends AstNode {
|
|
|
178
305
|
tags?: Tags;
|
|
179
306
|
}
|
|
180
307
|
declare const DynamicViewBody = "DynamicViewBody";
|
|
181
|
-
declare function isDynamicViewBody(item: unknown): item is DynamicViewBody;
|
|
182
308
|
interface DynamicViewGlobalPredicateRef extends AstNode {
|
|
183
309
|
readonly $container: DynamicViewBody;
|
|
184
310
|
readonly $type: 'DynamicViewGlobalPredicateRef';
|
|
@@ -197,7 +323,6 @@ interface DynamicViewParallelSteps extends AstNode {
|
|
|
197
323
|
steps: Array<DynamicViewStep>;
|
|
198
324
|
}
|
|
199
325
|
declare const DynamicViewParallelSteps = "DynamicViewParallelSteps";
|
|
200
|
-
declare function isDynamicViewParallelSteps(item: unknown): item is DynamicViewParallelSteps;
|
|
201
326
|
interface DynamicViewPredicateIterator extends AstNode {
|
|
202
327
|
readonly $container: DynamicViewIncludePredicate | DynamicViewPredicateIterator;
|
|
203
328
|
readonly $type: 'DynamicViewPredicateIterator';
|
|
@@ -205,7 +330,6 @@ interface DynamicViewPredicateIterator extends AstNode {
|
|
|
205
330
|
value: ElementPredicate;
|
|
206
331
|
}
|
|
207
332
|
declare const DynamicViewPredicateIterator = "DynamicViewPredicateIterator";
|
|
208
|
-
declare function isDynamicViewPredicateIterator(item: unknown): item is DynamicViewPredicateIterator;
|
|
209
333
|
interface DynamicViewRef extends AstNode {
|
|
210
334
|
readonly $container: RelationNavigateToProperty;
|
|
211
335
|
readonly $type: 'DynamicViewRef';
|
|
@@ -223,7 +347,6 @@ interface DynamicViewStep extends AstNode {
|
|
|
223
347
|
title?: string;
|
|
224
348
|
}
|
|
225
349
|
declare const DynamicViewStep = "DynamicViewStep";
|
|
226
|
-
declare function isDynamicViewStep(item: unknown): item is DynamicViewStep;
|
|
227
350
|
interface Element extends AstNode {
|
|
228
351
|
readonly $container: ElementBody | ExtendElementBody | Model;
|
|
229
352
|
readonly $type: 'Element';
|
|
@@ -233,7 +356,6 @@ interface Element extends AstNode {
|
|
|
233
356
|
props: Array<string>;
|
|
234
357
|
}
|
|
235
358
|
declare const Element = "Element";
|
|
236
|
-
declare function isElement(item: unknown): item is Element;
|
|
237
359
|
interface ElementBody extends AstNode {
|
|
238
360
|
readonly $container: Element;
|
|
239
361
|
readonly $type: 'ElementBody';
|
|
@@ -242,11 +364,11 @@ interface ElementBody extends AstNode {
|
|
|
242
364
|
tags?: Tags;
|
|
243
365
|
}
|
|
244
366
|
declare const ElementBody = "ElementBody";
|
|
245
|
-
declare function isElementBody(item: unknown): item is ElementBody;
|
|
246
367
|
interface ElementDescedantsExpression extends AstNode {
|
|
247
368
|
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
248
369
|
readonly $type: 'ElementDescedantsExpression';
|
|
249
370
|
parent: ElementRef;
|
|
371
|
+
suffix: string;
|
|
250
372
|
}
|
|
251
373
|
declare const ElementDescedantsExpression = "ElementDescedantsExpression";
|
|
252
374
|
interface ElementExpressionsIterator extends AstNode {
|
|
@@ -283,23 +405,22 @@ interface ElementPredicateWith extends AstNode {
|
|
|
283
405
|
subject: ElementPredicateOrWhere;
|
|
284
406
|
}
|
|
285
407
|
declare const ElementPredicateWith = "ElementPredicateWith";
|
|
286
|
-
declare function isElementPredicateWith(item: unknown): item is ElementPredicateWith;
|
|
287
408
|
interface ElementRef extends AstNode {
|
|
288
|
-
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;
|
|
289
410
|
readonly $type: 'ElementRef';
|
|
290
411
|
el: Reference<Element>;
|
|
291
412
|
parent?: ElementRef;
|
|
292
413
|
}
|
|
293
414
|
declare const ElementRef = "ElementRef";
|
|
294
415
|
interface ElementStringProperty extends AstNode {
|
|
295
|
-
readonly $container: CustomElementProperties | ElementBody;
|
|
416
|
+
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
|
|
296
417
|
readonly $type: 'ElementStringProperty';
|
|
297
418
|
key: 'description' | 'technology' | 'title';
|
|
298
419
|
value: string;
|
|
299
420
|
}
|
|
300
421
|
declare const ElementStringProperty = "ElementStringProperty";
|
|
301
422
|
interface ElementStyleProperty extends AstNode {
|
|
302
|
-
readonly $container: ElementBody | SpecificationElementKind;
|
|
423
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ElementBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
303
424
|
readonly $type: 'ElementStyleProperty';
|
|
304
425
|
key: 'style';
|
|
305
426
|
props: Array<StyleProperty>;
|
|
@@ -329,7 +450,6 @@ interface ElementViewBody extends AstNode {
|
|
|
329
450
|
tags?: Tags;
|
|
330
451
|
}
|
|
331
452
|
declare const ElementViewBody = "ElementViewBody";
|
|
332
|
-
declare function isElementViewBody(item: unknown): item is ElementViewBody;
|
|
333
453
|
interface ElementViewRef extends AstNode {
|
|
334
454
|
readonly $container: ElementView;
|
|
335
455
|
readonly $type: 'ElementViewRef';
|
|
@@ -355,14 +475,12 @@ interface ExtendElement extends AstNode {
|
|
|
355
475
|
element: FqnElementRef;
|
|
356
476
|
}
|
|
357
477
|
declare const ExtendElement = "ExtendElement";
|
|
358
|
-
declare function isExtendElement(item: unknown): item is ExtendElement;
|
|
359
478
|
interface ExtendElementBody extends AstNode {
|
|
360
479
|
readonly $container: ExtendElement;
|
|
361
480
|
readonly $type: 'ExtendElementBody';
|
|
362
481
|
elements: Array<Element | Relation>;
|
|
363
482
|
}
|
|
364
483
|
declare const ExtendElementBody = "ExtendElementBody";
|
|
365
|
-
declare function isExtendElementBody(item: unknown): item is ExtendElementBody;
|
|
366
484
|
interface FqnElementRef extends AstNode {
|
|
367
485
|
readonly $container: ExtendElement | FqnElementRef;
|
|
368
486
|
readonly $type: 'FqnElementRef';
|
|
@@ -377,7 +495,6 @@ interface GlobalDynamicPredicateGroup extends AstNode {
|
|
|
377
495
|
predicates: Array<DynamicViewIncludePredicate>;
|
|
378
496
|
}
|
|
379
497
|
declare const GlobalDynamicPredicateGroup = "GlobalDynamicPredicateGroup";
|
|
380
|
-
declare function isGlobalDynamicPredicateGroup(item: unknown): item is GlobalDynamicPredicateGroup;
|
|
381
498
|
interface GlobalPredicateGroup extends AstNode {
|
|
382
499
|
readonly $container: Globals;
|
|
383
500
|
readonly $type: 'GlobalPredicateGroup';
|
|
@@ -385,7 +502,6 @@ interface GlobalPredicateGroup extends AstNode {
|
|
|
385
502
|
predicates: Array<ViewRulePredicate>;
|
|
386
503
|
}
|
|
387
504
|
declare const GlobalPredicateGroup = "GlobalPredicateGroup";
|
|
388
|
-
declare function isGlobalPredicateGroup(item: unknown): item is GlobalPredicateGroup;
|
|
389
505
|
interface Globals extends AstNode {
|
|
390
506
|
readonly $container: LikeC4Grammar;
|
|
391
507
|
readonly $type: 'Globals';
|
|
@@ -394,7 +510,6 @@ interface Globals extends AstNode {
|
|
|
394
510
|
styles: Array<GlobalStyle | GlobalStyleGroup>;
|
|
395
511
|
}
|
|
396
512
|
declare const Globals = "Globals";
|
|
397
|
-
declare function isGlobals(item: unknown): item is Globals;
|
|
398
513
|
interface GlobalStyle extends AstNode {
|
|
399
514
|
readonly $container: Globals;
|
|
400
515
|
readonly $type: 'GlobalStyle';
|
|
@@ -403,7 +518,6 @@ interface GlobalStyle extends AstNode {
|
|
|
403
518
|
target: ElementExpressionsIterator;
|
|
404
519
|
}
|
|
405
520
|
declare const GlobalStyle = "GlobalStyle";
|
|
406
|
-
declare function isGlobalStyle(item: unknown): item is GlobalStyle;
|
|
407
521
|
interface GlobalStyleGroup extends AstNode {
|
|
408
522
|
readonly $container: Globals;
|
|
409
523
|
readonly $type: 'GlobalStyleGroup';
|
|
@@ -411,7 +525,6 @@ interface GlobalStyleGroup extends AstNode {
|
|
|
411
525
|
styles: Array<ViewRuleStyle>;
|
|
412
526
|
}
|
|
413
527
|
declare const GlobalStyleGroup = "GlobalStyleGroup";
|
|
414
|
-
declare function isGlobalStyleGroup(item: unknown): item is GlobalStyleGroup;
|
|
415
528
|
interface GlobalStyleId extends AstNode {
|
|
416
529
|
readonly $container: GlobalStyle | GlobalStyleGroup;
|
|
417
530
|
readonly $type: 'GlobalStyleId';
|
|
@@ -419,7 +532,7 @@ interface GlobalStyleId extends AstNode {
|
|
|
419
532
|
}
|
|
420
533
|
declare const GlobalStyleId = "GlobalStyleId";
|
|
421
534
|
interface IconProperty extends AstNode {
|
|
422
|
-
readonly $container: CustomElementProperties | ElementBody | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
535
|
+
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | DeploymentViewRuleStyle | ElementBody | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
423
536
|
readonly $type: 'IconProperty';
|
|
424
537
|
key: 'icon';
|
|
425
538
|
libicon?: Reference<LibIcon>;
|
|
@@ -432,12 +545,24 @@ interface IncludePredicate extends AstNode {
|
|
|
432
545
|
predicates: Predicates;
|
|
433
546
|
}
|
|
434
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";
|
|
435
554
|
interface IncomingRelationExpression extends AstNode {
|
|
436
555
|
readonly $container: InOutRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
437
556
|
readonly $type: 'IncomingRelationExpression';
|
|
438
557
|
to: ElementExpression;
|
|
439
558
|
}
|
|
440
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";
|
|
441
566
|
interface InOutRelationExpression extends AstNode {
|
|
442
567
|
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
443
568
|
readonly $type: 'InOutRelationExpression';
|
|
@@ -452,6 +577,7 @@ interface LibIcon extends AstNode {
|
|
|
452
577
|
declare const LibIcon = "LibIcon";
|
|
453
578
|
interface LikeC4Grammar extends AstNode {
|
|
454
579
|
readonly $type: 'LikeC4Grammar';
|
|
580
|
+
deployments: Array<ModelDeployments>;
|
|
455
581
|
globals: Array<Globals>;
|
|
456
582
|
likec4lib: Array<LikeC4Lib>;
|
|
457
583
|
models: Array<Model>;
|
|
@@ -473,7 +599,7 @@ interface LineProperty extends AstNode {
|
|
|
473
599
|
}
|
|
474
600
|
declare const LineProperty = "LineProperty";
|
|
475
601
|
interface LinkProperty extends AstNode {
|
|
476
|
-
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | RelationBody;
|
|
602
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | RelationBody;
|
|
477
603
|
readonly $type: 'LinkProperty';
|
|
478
604
|
key: 'link';
|
|
479
605
|
title?: string;
|
|
@@ -488,7 +614,7 @@ interface MetadataAttribute extends AstNode {
|
|
|
488
614
|
}
|
|
489
615
|
declare const MetadataAttribute = "MetadataAttribute";
|
|
490
616
|
interface MetadataBody extends AstNode {
|
|
491
|
-
readonly $container: ElementBody | RelationBody;
|
|
617
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | RelationBody;
|
|
492
618
|
readonly $type: 'MetadataBody';
|
|
493
619
|
props: Array<MetadataAttribute>;
|
|
494
620
|
}
|
|
@@ -500,7 +626,13 @@ interface Model extends AstNode {
|
|
|
500
626
|
name: 'model';
|
|
501
627
|
}
|
|
502
628
|
declare const Model = "Model";
|
|
503
|
-
|
|
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";
|
|
504
636
|
interface ModelViews extends AstNode {
|
|
505
637
|
readonly $container: LikeC4Grammar;
|
|
506
638
|
readonly $type: 'ModelViews';
|
|
@@ -509,7 +641,6 @@ interface ModelViews extends AstNode {
|
|
|
509
641
|
views: Array<LikeC4View>;
|
|
510
642
|
}
|
|
511
643
|
declare const ModelViews = "ModelViews";
|
|
512
|
-
declare function isModelViews(item: unknown): item is ModelViews;
|
|
513
644
|
interface NavigateToProperty extends AstNode {
|
|
514
645
|
readonly $container: CustomElementProperties;
|
|
515
646
|
readonly $type: 'NavigateToProperty';
|
|
@@ -518,7 +649,7 @@ interface NavigateToProperty extends AstNode {
|
|
|
518
649
|
}
|
|
519
650
|
declare const NavigateToProperty = "NavigateToProperty";
|
|
520
651
|
interface NotationProperty extends AstNode {
|
|
521
|
-
readonly $container: CustomElementProperties | CustomRelationProperties | GlobalStyle | ViewRuleStyle;
|
|
652
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | GlobalStyle | ViewRuleStyle;
|
|
522
653
|
readonly $type: 'NotationProperty';
|
|
523
654
|
key: 'notation';
|
|
524
655
|
value: string;
|
|
@@ -532,12 +663,20 @@ interface NotesProperty extends AstNode {
|
|
|
532
663
|
}
|
|
533
664
|
declare const NotesProperty = "NotesProperty";
|
|
534
665
|
interface OpacityProperty extends AstNode {
|
|
535
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
666
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
536
667
|
readonly $type: 'OpacityProperty';
|
|
537
668
|
key: 'opacity';
|
|
538
669
|
value: string;
|
|
539
670
|
}
|
|
540
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";
|
|
541
680
|
interface OutgoingRelationExpression extends AstNode {
|
|
542
681
|
readonly $container: DirectedRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
543
682
|
readonly $type: 'OutgoingRelationExpression';
|
|
@@ -565,7 +704,6 @@ interface Relation extends AstNode {
|
|
|
565
704
|
title?: string;
|
|
566
705
|
}
|
|
567
706
|
declare const Relation = "Relation";
|
|
568
|
-
declare function isRelation(item: unknown): item is Relation;
|
|
569
707
|
interface RelationBody extends AstNode {
|
|
570
708
|
readonly $container: Relation;
|
|
571
709
|
readonly $type: 'RelationBody';
|
|
@@ -573,9 +711,8 @@ interface RelationBody extends AstNode {
|
|
|
573
711
|
tags?: Tags;
|
|
574
712
|
}
|
|
575
713
|
declare const RelationBody = "RelationBody";
|
|
576
|
-
declare function isRelationBody(item: unknown): item is RelationBody;
|
|
577
714
|
interface RelationNavigateToProperty extends AstNode {
|
|
578
|
-
readonly $container: CustomRelationProperties | RelationBody;
|
|
715
|
+
readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
|
|
579
716
|
readonly $type: 'RelationNavigateToProperty';
|
|
580
717
|
key: 'navigateTo';
|
|
581
718
|
value: DynamicViewRef;
|
|
@@ -595,7 +732,6 @@ interface RelationPredicateWith extends AstNode {
|
|
|
595
732
|
subject: RelationPredicateOrWhere;
|
|
596
733
|
}
|
|
597
734
|
declare const RelationPredicateWith = "RelationPredicateWith";
|
|
598
|
-
declare function isRelationPredicateWith(item: unknown): item is RelationPredicateWith;
|
|
599
735
|
interface RelationshipKind extends AstNode {
|
|
600
736
|
readonly $container: SpecificationRelationshipKind;
|
|
601
737
|
readonly $type: 'RelationshipKind';
|
|
@@ -603,21 +739,21 @@ interface RelationshipKind extends AstNode {
|
|
|
603
739
|
}
|
|
604
740
|
declare const RelationshipKind = "RelationshipKind";
|
|
605
741
|
interface RelationStringProperty extends AstNode {
|
|
606
|
-
readonly $container: CustomRelationProperties | RelationBody;
|
|
742
|
+
readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
|
|
607
743
|
readonly $type: 'RelationStringProperty';
|
|
608
744
|
key: 'description' | 'technology' | 'title';
|
|
609
745
|
value: string;
|
|
610
746
|
}
|
|
611
747
|
declare const RelationStringProperty = "RelationStringProperty";
|
|
612
748
|
interface RelationStyleProperty extends AstNode {
|
|
613
|
-
readonly $container: RelationBody;
|
|
749
|
+
readonly $container: DeploymentRelationBody | RelationBody;
|
|
614
750
|
readonly $type: 'RelationStyleProperty';
|
|
615
751
|
key: 'style';
|
|
616
752
|
props: Array<RelationshipStyleProperty>;
|
|
617
753
|
}
|
|
618
754
|
declare const RelationStyleProperty = "RelationStyleProperty";
|
|
619
755
|
interface ShapeProperty extends AstNode {
|
|
620
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
756
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
621
757
|
readonly $type: 'ShapeProperty';
|
|
622
758
|
key: 'shape';
|
|
623
759
|
value: ElementShape;
|
|
@@ -630,7 +766,13 @@ interface SpecificationColor extends AstNode {
|
|
|
630
766
|
name: CustomColor;
|
|
631
767
|
}
|
|
632
768
|
declare const SpecificationColor = "SpecificationColor";
|
|
633
|
-
|
|
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";
|
|
634
776
|
interface SpecificationElementKind extends AstNode {
|
|
635
777
|
readonly $container: SpecificationRule;
|
|
636
778
|
readonly $type: 'SpecificationElementKind';
|
|
@@ -638,9 +780,8 @@ interface SpecificationElementKind extends AstNode {
|
|
|
638
780
|
props: Array<ElementStyleProperty | SpecificationElementStringProperty>;
|
|
639
781
|
}
|
|
640
782
|
declare const SpecificationElementKind = "SpecificationElementKind";
|
|
641
|
-
declare function isSpecificationElementKind(item: unknown): item is SpecificationElementKind;
|
|
642
783
|
interface SpecificationElementStringProperty extends AstNode {
|
|
643
|
-
readonly $container: SpecificationElementKind;
|
|
784
|
+
readonly $container: SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
644
785
|
readonly $type: 'SpecificationElementStringProperty';
|
|
645
786
|
key: 'notation' | 'technology';
|
|
646
787
|
value: string;
|
|
@@ -653,7 +794,6 @@ interface SpecificationRelationshipKind extends AstNode {
|
|
|
653
794
|
props: Array<RelationshipStyleProperty | SpecificationRelationshipStringProperty>;
|
|
654
795
|
}
|
|
655
796
|
declare const SpecificationRelationshipKind = "SpecificationRelationshipKind";
|
|
656
|
-
declare function isSpecificationRelationshipKind(item: unknown): item is SpecificationRelationshipKind;
|
|
657
797
|
interface SpecificationRelationshipStringProperty extends AstNode {
|
|
658
798
|
readonly $container: SpecificationRelationshipKind;
|
|
659
799
|
readonly $type: 'SpecificationRelationshipStringProperty';
|
|
@@ -665,20 +805,19 @@ interface SpecificationRule extends AstNode {
|
|
|
665
805
|
readonly $container: LikeC4Grammar;
|
|
666
806
|
readonly $type: 'SpecificationRule';
|
|
667
807
|
colors: Array<SpecificationColor>;
|
|
808
|
+
deploymentNodes: Array<SpecificationDeploymentNodeKind>;
|
|
668
809
|
elements: Array<SpecificationElementKind>;
|
|
669
810
|
name: 'specification';
|
|
670
811
|
relationships: Array<SpecificationRelationshipKind>;
|
|
671
812
|
tags: Array<SpecificationTag>;
|
|
672
813
|
}
|
|
673
814
|
declare const SpecificationRule = "SpecificationRule";
|
|
674
|
-
declare function isSpecificationRule(item: unknown): item is SpecificationRule;
|
|
675
815
|
interface SpecificationTag extends AstNode {
|
|
676
816
|
readonly $container: SpecificationRule;
|
|
677
817
|
readonly $type: 'SpecificationTag';
|
|
678
818
|
tag: Tag;
|
|
679
819
|
}
|
|
680
820
|
declare const SpecificationTag = "SpecificationTag";
|
|
681
|
-
declare function isSpecificationTag(item: unknown): item is SpecificationTag;
|
|
682
821
|
interface Tag extends AstNode {
|
|
683
822
|
readonly $container: SpecificationTag;
|
|
684
823
|
readonly $type: 'Tag';
|
|
@@ -686,13 +825,12 @@ interface Tag extends AstNode {
|
|
|
686
825
|
}
|
|
687
826
|
declare const Tag = "Tag";
|
|
688
827
|
interface Tags extends AstNode {
|
|
689
|
-
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | Relation | RelationBody | Tags;
|
|
828
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | Relation | RelationBody | Tags;
|
|
690
829
|
readonly $type: 'Tags';
|
|
691
830
|
prev?: Tags;
|
|
692
831
|
values: Array<Reference<Tag>>;
|
|
693
832
|
}
|
|
694
833
|
declare const Tags = "Tags";
|
|
695
|
-
declare function isTags(item: unknown): item is Tags;
|
|
696
834
|
interface ViewRef extends AstNode {
|
|
697
835
|
readonly $container: NavigateToProperty;
|
|
698
836
|
readonly $type: 'ViewRef';
|
|
@@ -700,7 +838,7 @@ interface ViewRef extends AstNode {
|
|
|
700
838
|
}
|
|
701
839
|
declare const ViewRef = "ViewRef";
|
|
702
840
|
interface ViewRuleAutoLayout extends AstNode {
|
|
703
|
-
readonly $container: DynamicViewBody | ElementViewBody;
|
|
841
|
+
readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
|
|
704
842
|
readonly $type: 'ViewRuleAutoLayout';
|
|
705
843
|
direction: ViewLayoutDirection;
|
|
706
844
|
nodeSep?: number;
|
|
@@ -735,7 +873,7 @@ interface ViewRuleStyle extends AstNode {
|
|
|
735
873
|
}
|
|
736
874
|
declare const ViewRuleStyle = "ViewRuleStyle";
|
|
737
875
|
interface ViewStringProperty extends AstNode {
|
|
738
|
-
readonly $container: DynamicViewBody | ElementViewBody;
|
|
876
|
+
readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
|
|
739
877
|
readonly $type: 'ViewStringProperty';
|
|
740
878
|
key: 'description' | 'title';
|
|
741
879
|
value: string;
|
|
@@ -794,7 +932,7 @@ interface WhereRelationTag extends AstNode {
|
|
|
794
932
|
}
|
|
795
933
|
declare const WhereRelationTag = "WhereRelationTag";
|
|
796
934
|
interface WildcardExpression extends AstNode {
|
|
797
|
-
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;
|
|
798
936
|
readonly $type: 'WildcardExpression';
|
|
799
937
|
isWildcard: boolean;
|
|
800
938
|
}
|
|
@@ -806,6 +944,28 @@ type LikeC4AstType = {
|
|
|
806
944
|
CustomColor: CustomColor;
|
|
807
945
|
CustomElementProperties: CustomElementProperties;
|
|
808
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;
|
|
809
969
|
DirectedRelationExpression: DirectedRelationExpression;
|
|
810
970
|
DynamicView: DynamicView;
|
|
811
971
|
DynamicViewBody: DynamicViewBody;
|
|
@@ -840,6 +1000,7 @@ type LikeC4AstType = {
|
|
|
840
1000
|
ExtendElement: ExtendElement;
|
|
841
1001
|
ExtendElementBody: ExtendElementBody;
|
|
842
1002
|
FqnElementRef: FqnElementRef;
|
|
1003
|
+
FqnReferenceable: FqnReferenceable;
|
|
843
1004
|
GlobalDynamicPredicateGroup: GlobalDynamicPredicateGroup;
|
|
844
1005
|
GlobalPredicateGroup: GlobalPredicateGroup;
|
|
845
1006
|
GlobalStyle: GlobalStyle;
|
|
@@ -847,8 +1008,10 @@ type LikeC4AstType = {
|
|
|
847
1008
|
GlobalStyleId: GlobalStyleId;
|
|
848
1009
|
Globals: Globals;
|
|
849
1010
|
IconProperty: IconProperty;
|
|
1011
|
+
InOutDeploymentRelationExpression: InOutDeploymentRelationExpression;
|
|
850
1012
|
InOutRelationExpression: InOutRelationExpression;
|
|
851
1013
|
IncludePredicate: IncludePredicate;
|
|
1014
|
+
IncomingDeploymentRelationExpression: IncomingDeploymentRelationExpression;
|
|
852
1015
|
IncomingRelationExpression: IncomingRelationExpression;
|
|
853
1016
|
LibIcon: LibIcon;
|
|
854
1017
|
LikeC4Grammar: LikeC4Grammar;
|
|
@@ -860,11 +1023,13 @@ type LikeC4AstType = {
|
|
|
860
1023
|
MetadataBody: MetadataBody;
|
|
861
1024
|
MetadataProperty: MetadataProperty;
|
|
862
1025
|
Model: Model;
|
|
1026
|
+
ModelDeployments: ModelDeployments;
|
|
863
1027
|
ModelViews: ModelViews;
|
|
864
1028
|
NavigateToProperty: NavigateToProperty;
|
|
865
1029
|
NotationProperty: NotationProperty;
|
|
866
1030
|
NotesProperty: NotesProperty;
|
|
867
1031
|
OpacityProperty: OpacityProperty;
|
|
1032
|
+
OutgoingDeploymentRelationExpression: OutgoingDeploymentRelationExpression;
|
|
868
1033
|
OutgoingRelationExpression: OutgoingRelationExpression;
|
|
869
1034
|
Predicate: Predicate;
|
|
870
1035
|
Predicates: Predicates;
|
|
@@ -883,6 +1048,7 @@ type LikeC4AstType = {
|
|
|
883
1048
|
RelationshipStyleProperty: RelationshipStyleProperty;
|
|
884
1049
|
ShapeProperty: ShapeProperty;
|
|
885
1050
|
SpecificationColor: SpecificationColor;
|
|
1051
|
+
SpecificationDeploymentNodeKind: SpecificationDeploymentNodeKind;
|
|
886
1052
|
SpecificationElementKind: SpecificationElementKind;
|
|
887
1053
|
SpecificationElementStringProperty: SpecificationElementStringProperty;
|
|
888
1054
|
SpecificationRelationshipKind: SpecificationRelationshipKind;
|
|
@@ -927,10 +1093,19 @@ declare module './generated/ast' {
|
|
|
927
1093
|
[idattr]?: c4.Fqn | undefined;
|
|
928
1094
|
}
|
|
929
1095
|
interface ElementView {
|
|
930
|
-
[idattr]?: c4.
|
|
1096
|
+
[idattr]?: c4.ViewId | undefined;
|
|
931
1097
|
}
|
|
932
1098
|
interface DynamicView {
|
|
933
|
-
[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;
|
|
934
1109
|
}
|
|
935
1110
|
}
|
|
936
1111
|
type ParsedElementStyle = {
|
|
@@ -958,6 +1133,7 @@ interface ParsedAstSpecification {
|
|
|
958
1133
|
colors: Record<c4.CustomColor, {
|
|
959
1134
|
color: c4.HexColorLiteral;
|
|
960
1135
|
}>;
|
|
1136
|
+
deployments: Record<c4.DeploymentNodeKind, c4.DeploymentNodeKindSpecification>;
|
|
961
1137
|
}
|
|
962
1138
|
interface ParsedAstElement {
|
|
963
1139
|
id: c4.Fqn;
|
|
@@ -974,7 +1150,7 @@ interface ParsedAstElement {
|
|
|
974
1150
|
};
|
|
975
1151
|
}
|
|
976
1152
|
interface ParsedAstRelation {
|
|
977
|
-
id: c4.
|
|
1153
|
+
id: c4.RelationId;
|
|
978
1154
|
astPath: string;
|
|
979
1155
|
source: c4.Fqn;
|
|
980
1156
|
target: c4.Fqn;
|
|
@@ -988,17 +1164,25 @@ interface ParsedAstRelation {
|
|
|
988
1164
|
head?: c4.RelationshipArrowType;
|
|
989
1165
|
tail?: c4.RelationshipArrowType;
|
|
990
1166
|
links?: c4.NonEmptyArray<ParsedLink>;
|
|
991
|
-
navigateTo?: c4.
|
|
1167
|
+
navigateTo?: c4.ViewId;
|
|
992
1168
|
metadata?: {
|
|
993
1169
|
[key: string]: string;
|
|
994
1170
|
};
|
|
995
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
|
+
};
|
|
996
1180
|
type ParsedAstGlobals = c4.ModelGlobals;
|
|
997
1181
|
interface ParsedAstElementView {
|
|
998
1182
|
__: 'element';
|
|
999
|
-
id: c4.
|
|
1183
|
+
id: c4.ViewId;
|
|
1000
1184
|
viewOf?: c4.Fqn;
|
|
1001
|
-
extends?: c4.
|
|
1185
|
+
extends?: c4.ViewId;
|
|
1002
1186
|
astPath: string;
|
|
1003
1187
|
title: string | null;
|
|
1004
1188
|
description: string | null;
|
|
@@ -1009,7 +1193,7 @@ interface ParsedAstElementView {
|
|
|
1009
1193
|
}
|
|
1010
1194
|
interface ParsedAstDynamicView {
|
|
1011
1195
|
__: 'dynamic';
|
|
1012
|
-
id: c4.
|
|
1196
|
+
id: c4.ViewId;
|
|
1013
1197
|
astPath: string;
|
|
1014
1198
|
title: string | null;
|
|
1015
1199
|
description: string | null;
|
|
@@ -1019,7 +1203,17 @@ interface ParsedAstDynamicView {
|
|
|
1019
1203
|
rules: Array<c4.DynamicViewRule>;
|
|
1020
1204
|
manualLayout?: c4.ViewManualLayout;
|
|
1021
1205
|
}
|
|
1022
|
-
|
|
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;
|
|
1023
1217
|
interface ParsedLink {
|
|
1024
1218
|
title?: string;
|
|
1025
1219
|
url: string;
|
|
@@ -1027,6 +1221,9 @@ interface ParsedLink {
|
|
|
1027
1221
|
interface DocFqnIndexAstNodeDescription extends AstNodeDescription {
|
|
1028
1222
|
fqn: c4.Fqn;
|
|
1029
1223
|
}
|
|
1224
|
+
interface DeploymentAstNodeDescription extends AstNodeDescription {
|
|
1225
|
+
fqn: string;
|
|
1226
|
+
}
|
|
1030
1227
|
type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
|
|
1031
1228
|
type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
|
|
1032
1229
|
interface LikeC4DocumentProps {
|
|
@@ -1036,21 +1233,24 @@ interface LikeC4DocumentProps {
|
|
|
1036
1233
|
c4Relations?: ParsedAstRelation[];
|
|
1037
1234
|
c4Globals?: ParsedAstGlobals;
|
|
1038
1235
|
c4Views?: ParsedAstView[];
|
|
1236
|
+
c4Deployments?: ParsedAstDeployment[];
|
|
1237
|
+
c4DeploymentRelations?: ParsedAstDeploymentRelation[];
|
|
1039
1238
|
c4fqnIndex?: MultiMap<c4.Fqn, DocFqnIndexAstNodeDescription>;
|
|
1040
1239
|
}
|
|
1041
|
-
|
|
1240
|
+
type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
|
|
1241
|
+
interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
|
|
1042
1242
|
}
|
|
1043
|
-
interface FqnIndexedDocument extends
|
|
1243
|
+
interface FqnIndexedDocument extends SetRequired<LikeC4LangiumDocument, 'c4fqnIndex'> {
|
|
1044
1244
|
}
|
|
1045
|
-
interface ParsedLikeC4LangiumDocument extends
|
|
1245
|
+
interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
|
|
1046
1246
|
}
|
|
1047
1247
|
type Guard<N extends AstNode> = (n: AstNode) => n is N;
|
|
1048
1248
|
type Guarded<G> = G extends Guard<infer N> ? N : never;
|
|
1049
|
-
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;
|
|
1050
1250
|
type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
|
|
1051
1251
|
declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
|
|
1052
1252
|
isValid: (n: ValidatableAstNode) => boolean;
|
|
1053
|
-
invalidNodes: WeakSet<
|
|
1253
|
+
invalidNodes: WeakSet<object>;
|
|
1054
1254
|
};
|
|
1055
1255
|
type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
|
|
1056
1256
|
|
|
@@ -1074,6 +1274,7 @@ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
|
1074
1274
|
}
|
|
1075
1275
|
|
|
1076
1276
|
declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
1277
|
+
private parser;
|
|
1077
1278
|
private locator;
|
|
1078
1279
|
constructor(services: LikeC4Services);
|
|
1079
1280
|
protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
|
|
@@ -1081,10 +1282,100 @@ declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
|
1081
1282
|
|
|
1082
1283
|
declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
|
|
1083
1284
|
protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
|
|
1084
|
-
private
|
|
1285
|
+
private highlightNameAndKind;
|
|
1085
1286
|
private highlightView;
|
|
1086
1287
|
}
|
|
1087
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
|
+
|
|
1088
1379
|
declare function computeDocumentFqn(document: LikeC4LangiumDocument, services: LikeC4Services): void;
|
|
1089
1380
|
|
|
1090
1381
|
interface FqnIndexEntry {
|
|
@@ -1130,7 +1421,7 @@ declare class LikeC4ModelBuilder {
|
|
|
1130
1421
|
*/
|
|
1131
1422
|
unsafeSyncBuildComputedModel(model: c4.ParsedLikeC4Model): c4.ComputedLikeC4Model;
|
|
1132
1423
|
buildComputedModel(cancelToken?: Cancellation.CancellationToken): Promise<c4.ComputedLikeC4Model | null>;
|
|
1133
|
-
computeView(viewId:
|
|
1424
|
+
computeView(viewId: ViewId, cancelToken?: Cancellation.CancellationToken): Promise<c4.ComputedView | null>;
|
|
1134
1425
|
onModelParsed(callback: ModelParsedListener$1): Disposable;
|
|
1135
1426
|
private documents;
|
|
1136
1427
|
private notifyListeners;
|
|
@@ -1139,18 +1430,20 @@ declare class LikeC4ModelBuilder {
|
|
|
1139
1430
|
declare class LikeC4ModelLocator {
|
|
1140
1431
|
private services;
|
|
1141
1432
|
private fqnIndex;
|
|
1433
|
+
private deploymentsIndex;
|
|
1142
1434
|
private langiumDocuments;
|
|
1143
1435
|
constructor(services: LikeC4Services);
|
|
1144
1436
|
private documents;
|
|
1145
|
-
getParsedElement(
|
|
1437
|
+
getParsedElement(astNodeOrFqn: Element | c4.Fqn): ParsedAstElement | null;
|
|
1146
1438
|
locateElement(fqn: c4.Fqn, _prop?: string): Location | null;
|
|
1147
|
-
|
|
1148
|
-
|
|
1439
|
+
locateDeploymentElement(fqn: c4.Fqn, _prop?: string): Location | null;
|
|
1440
|
+
locateRelation(relationId: c4.RelationId): Location | null;
|
|
1441
|
+
locateViewAst(viewId: c4.ViewId): {
|
|
1149
1442
|
doc: ParsedLikeC4LangiumDocument;
|
|
1150
1443
|
view: ParsedAstView;
|
|
1151
1444
|
viewAst: LikeC4View;
|
|
1152
1445
|
};
|
|
1153
|
-
locateView(viewId: c4.
|
|
1446
|
+
locateView(viewId: c4.ViewId): Location | null;
|
|
1154
1447
|
}
|
|
1155
1448
|
|
|
1156
1449
|
type ModelParsedListener = () => void;
|
|
@@ -1159,9 +1452,10 @@ declare class LikeC4ModelParser {
|
|
|
1159
1452
|
private services;
|
|
1160
1453
|
private fqnIndex;
|
|
1161
1454
|
constructor(services: LikeC4Services);
|
|
1162
|
-
parse(doc: LangiumDocument
|
|
1455
|
+
parse(doc: LangiumDocument): ParsedLikeC4LangiumDocument;
|
|
1163
1456
|
protected parseLikeC4Document(_doc: FqnIndexedDocument): ParsedLikeC4LangiumDocument;
|
|
1164
1457
|
private parseSpecification;
|
|
1458
|
+
private parseSpecificationDeploymentNodeKind;
|
|
1165
1459
|
private parseModel;
|
|
1166
1460
|
private parseElement;
|
|
1167
1461
|
private parseRelation;
|
|
@@ -1189,14 +1483,26 @@ declare class LikeC4ModelParser {
|
|
|
1189
1483
|
private parseViewRuleGroup;
|
|
1190
1484
|
private parseRuleStyle;
|
|
1191
1485
|
private parseViewRuleGlobalStyle;
|
|
1192
|
-
private
|
|
1486
|
+
private parseViewManualLayout;
|
|
1193
1487
|
private parseDynamicParallelSteps;
|
|
1194
1488
|
private parseDynamicStep;
|
|
1195
1489
|
private parseElementView;
|
|
1196
1490
|
private parseDynamicElementView;
|
|
1197
1491
|
private parseDynamicViewRule;
|
|
1198
1492
|
private parseDynamicViewIncludePredicate;
|
|
1199
|
-
|
|
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;
|
|
1200
1506
|
private getAstNodePath;
|
|
1201
1507
|
private getMetadata;
|
|
1202
1508
|
private convertTags;
|
|
@@ -1215,34 +1521,6 @@ declare class LikeC4ModelChanges {
|
|
|
1215
1521
|
};
|
|
1216
1522
|
}
|
|
1217
1523
|
|
|
1218
|
-
type ElementsContainer = Model | ElementBody | ExtendElementBody;
|
|
1219
|
-
declare class LikeC4ScopeComputation extends DefaultScopeComputation {
|
|
1220
|
-
computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
1221
|
-
private exportViews;
|
|
1222
|
-
private exportGlobals;
|
|
1223
|
-
private exportModel;
|
|
1224
|
-
private exportLibrary;
|
|
1225
|
-
private exportSpecification;
|
|
1226
|
-
computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
|
|
1227
|
-
protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): MultiMap<string, AstNodeDescription>;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
1231
|
-
private fqnIndex;
|
|
1232
|
-
constructor(services: LikeC4Services);
|
|
1233
|
-
private directChildrenOf;
|
|
1234
|
-
private uniqueDescedants;
|
|
1235
|
-
private scopeElementRef;
|
|
1236
|
-
private scopeExtendElement;
|
|
1237
|
-
private scopeElementView;
|
|
1238
|
-
getScope(context: ReferenceInfo): Scope;
|
|
1239
|
-
protected computeScope(context: ReferenceInfo): Scope;
|
|
1240
|
-
/**
|
|
1241
|
-
* Create a global scope filtered for the given reference type.
|
|
1242
|
-
*/
|
|
1243
|
-
protected getGlobalScope(referenceType: string): Scope;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
1524
|
declare class Rpc implements Disposable {
|
|
1247
1525
|
private services;
|
|
1248
1526
|
private disposables;
|
|
@@ -1296,8 +1574,10 @@ type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
|
|
|
1296
1574
|
*/
|
|
1297
1575
|
interface LikeC4AddedServices {
|
|
1298
1576
|
WorkspaceCache: WorkspaceCache<string, any>;
|
|
1577
|
+
DocumentCache: DocumentCache<string, any>;
|
|
1299
1578
|
Rpc: Rpc;
|
|
1300
1579
|
likec4: {
|
|
1580
|
+
DeploymentsIndex: DeploymentsIndex;
|
|
1301
1581
|
FqnIndex: FqnIndex;
|
|
1302
1582
|
ModelParser: LikeC4ModelParser;
|
|
1303
1583
|
ModelBuilder: LikeC4ModelBuilder;
|
|
@@ -1314,6 +1594,7 @@ interface LikeC4AddedServices {
|
|
|
1314
1594
|
DocumentLinkProvider: LikeC4DocumentLinkProvider;
|
|
1315
1595
|
};
|
|
1316
1596
|
references: {
|
|
1597
|
+
NameProvider: LikeC4NameProvider;
|
|
1317
1598
|
ScopeComputation: LikeC4ScopeComputation;
|
|
1318
1599
|
ScopeProvider: LikeC4ScopeProvider;
|
|
1319
1600
|
};
|
|
@@ -1335,4 +1616,4 @@ declare function createLanguageServices(context?: LanguageServicesContext): {
|
|
|
1335
1616
|
declare const logger: _likec4_log.ConsolaInstance;
|
|
1336
1617
|
declare function setLogLevel(level: keyof typeof LogLevels): void;
|
|
1337
1618
|
|
|
1338
|
-
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 };
|