@likec4/language-server 1.47.0 → 1.48.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/LICENSE +1 -1
- package/browser/package.json +2 -2
- package/browser-worker/package.json +2 -2
- package/bundled/package.json +4 -0
- package/dist/LikeC4LanguageServices.d.mts +4 -0
- package/dist/LikeC4LanguageServices.mjs +3 -0
- package/dist/_chunks/ConfigurableLayouter.mjs +1956 -0
- package/dist/_chunks/LikeC4LanguageServices.d.mts +1978 -0
- package/dist/_chunks/LikeC4LanguageServices.mjs +725 -0
- package/dist/_chunks/ast.d.mts +1444 -0
- package/dist/_chunks/ast.mjs +2375 -0
- package/dist/_chunks/ast2.mjs +176 -0
- package/dist/_chunks/common-exports.mjs +0 -0
- package/dist/_chunks/filesystem.mjs +58 -0
- package/dist/_chunks/grammar.mjs +8 -0
- package/dist/_chunks/icons.mjs +5211 -0
- package/dist/_chunks/libs/@hono/node-server.mjs +436 -0
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +805 -0
- package/dist/_chunks/libs/eventemitter3.mjs +243 -0
- package/dist/_chunks/libs/fast-equals.mjs +446 -0
- package/dist/_chunks/libs/hono.mjs +1829 -0
- package/dist/_chunks/libs/p-queue.mjs +449 -0
- package/dist/_chunks/libs/parse-ms.mjs +36 -0
- package/dist/_chunks/libs/picomatch.mjs +1673 -0
- package/dist/_chunks/libs/pretty-ms.mjs +80 -0
- package/dist/_chunks/libs/remeda.mjs +482 -0
- package/dist/_chunks/libs/strip-indent.mjs +15 -0
- package/dist/_chunks/libs/ufo.mjs +166 -0
- package/dist/_chunks/likec4lib.mjs +9 -0
- package/dist/_chunks/mcp.mjs +33 -0
- package/dist/_chunks/module.mjs +28 -0
- package/dist/_chunks/module2.mjs +6576 -0
- package/dist/_chunks/protocol.d.mts +311 -0
- package/dist/_chunks/protocol.mjs +78 -0
- package/dist/_chunks/rolldown-runtime.mjs +42 -0
- package/dist/ast.d.mts +4 -0
- package/dist/ast.mjs +4 -0
- package/dist/browser-worker.d.mts +1 -0
- package/dist/browser-worker.mjs +6 -0
- package/dist/browser.d.mts +11 -0
- package/dist/browser.mjs +27 -0
- package/dist/bundled.d.mts +28 -0
- package/dist/bundled.mjs +51 -4853
- package/dist/common-exports.d.mts +4 -0
- package/dist/common-exports.mjs +5 -0
- package/dist/filesystem/index.d.mts +4 -0
- package/dist/filesystem/index.mjs +3 -0
- package/dist/generated/ast.d.mts +2 -0
- package/dist/generated/ast.mjs +3 -0
- package/dist/generated/grammar.d.mts +6 -0
- package/dist/generated/grammar.mjs +3 -0
- package/dist/generated/module.d.mts +14 -0
- package/dist/generated/module.mjs +3 -0
- package/dist/generated-lib/icons.d.mts +4 -0
- package/dist/generated-lib/icons.mjs +3 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +48 -0
- package/dist/likec4lib.d.mts +9 -0
- package/dist/likec4lib.mjs +4 -0
- package/dist/mcp/index.d.mts +4 -0
- package/dist/mcp/index.mjs +3 -0
- package/dist/module.d.mts +4 -0
- package/dist/module.mjs +3 -0
- package/dist/protocol.d.mts +2 -0
- package/dist/protocol.mjs +3 -0
- package/likec4lib/package.json +2 -2
- package/package.json +106 -63
- package/protocol/package.json +2 -2
- package/dist/LikeC4LanguageServices.d.ts +0 -115
- package/dist/LikeC4LanguageServices.js +0 -164
- package/dist/Rpc.d.ts +0 -9
- package/dist/Rpc.js +0 -276
- package/dist/ast.d.ts +0 -226
- package/dist/ast.js +0 -264
- package/dist/browser-worker.d.ts +0 -1
- package/dist/browser-worker.js +0 -4
- package/dist/browser.d.ts +0 -10
- package/dist/browser.js +0 -34
- package/dist/bundled.d.ts +0 -8
- package/dist/bundled.js +0 -44
- package/dist/documentation/documentation-provider.d.ts +0 -8
- package/dist/documentation/documentation-provider.js +0 -51
- package/dist/documentation/index.d.ts +0 -1
- package/dist/documentation/index.js +0 -1
- package/dist/empty.d.ts +0 -2
- package/dist/empty.js +0 -2
- package/dist/filesystem/ChokidarWatcher.d.ts +0 -19
- package/dist/filesystem/ChokidarWatcher.js +0 -133
- package/dist/filesystem/FileSystemWatcher.d.ts +0 -19
- package/dist/filesystem/FileSystemWatcher.js +0 -14
- package/dist/filesystem/LikeC4FileSystem.d.ts +0 -3
- package/dist/filesystem/LikeC4FileSystem.js +0 -140
- package/dist/filesystem/index.d.ts +0 -55
- package/dist/filesystem/index.js +0 -29
- package/dist/formatting/LikeC4Formatter.d.ts +0 -59
- package/dist/formatting/LikeC4Formatter.js +0 -637
- package/dist/formatting/utils.d.ts +0 -6
- package/dist/formatting/utils.js +0 -18
- package/dist/generated/ast.d.ts +0 -1411
- package/dist/generated/ast.js +0 -2207
- package/dist/generated/grammar.d.ts +0 -6
- package/dist/generated/grammar.js +0 -7
- package/dist/generated/module.d.ts +0 -14
- package/dist/generated/module.js +0 -27
- package/dist/generated-lib/icons.d.ts +0 -1
- package/dist/generated-lib/icons.js +0 -18
- package/dist/index.d.ts +0 -37
- package/dist/index.js +0 -54
- package/dist/likec4lib.d.ts +0 -6
- package/dist/likec4lib.js +0 -7
- package/dist/logger.d.ts +0 -17
- package/dist/logger.js +0 -81
- package/dist/lsp/CodeActionProvider.d.ts +0 -14
- package/dist/lsp/CodeActionProvider.js +0 -33
- package/dist/lsp/CodeLensProvider.d.ts +0 -9
- package/dist/lsp/CodeLensProvider.js +0 -44
- package/dist/lsp/CompletionProvider.d.ts +0 -13
- package/dist/lsp/CompletionProvider.js +0 -238
- package/dist/lsp/DocumentHighlightProvider.d.ts +0 -9
- package/dist/lsp/DocumentHighlightProvider.js +0 -10
- package/dist/lsp/DocumentLinkProvider.d.ts +0 -11
- package/dist/lsp/DocumentLinkProvider.js +0 -58
- package/dist/lsp/DocumentSymbolProvider.d.ts +0 -33
- package/dist/lsp/DocumentSymbolProvider.js +0 -317
- package/dist/lsp/HoverProvider.d.ts +0 -10
- package/dist/lsp/HoverProvider.js +0 -106
- package/dist/lsp/RenameProvider.d.ts +0 -5
- package/dist/lsp/RenameProvider.js +0 -6
- package/dist/lsp/SemanticTokenProvider.d.ts +0 -19
- package/dist/lsp/SemanticTokenProvider.js +0 -305
- package/dist/lsp/index.d.ts +0 -8
- package/dist/lsp/index.js +0 -9
- package/dist/mcp/MCPServerFactory.d.ts +0 -8
- package/dist/mcp/MCPServerFactory.js +0 -73
- package/dist/mcp/NoopLikeC4MCPServer.d.ts +0 -9
- package/dist/mcp/NoopLikeC4MCPServer.js +0 -17
- package/dist/mcp/interfaces.d.ts +0 -13
- package/dist/mcp/interfaces.js +0 -4
- package/dist/mcp/server/StdioLikeC4MCPServer.d.ts +0 -16
- package/dist/mcp/server/StdioLikeC4MCPServer.js +0 -51
- package/dist/mcp/server/StreamableLikeC4MCPServer.d.ts +0 -16
- package/dist/mcp/server/StreamableLikeC4MCPServer.js +0 -121
- package/dist/mcp/server/WithMCPServer.d.ts +0 -4
- package/dist/mcp/server/WithMCPServer.js +0 -54
- package/dist/mcp/tools/_common.d.ts +0 -88
- package/dist/mcp/tools/_common.js +0 -49
- package/dist/mcp/tools/find-relationships.d.ts +0 -202
- package/dist/mcp/tools/find-relationships.js +0 -150
- package/dist/mcp/tools/list-projects.d.ts +0 -194
- package/dist/mcp/tools/list-projects.js +0 -62
- package/dist/mcp/tools/open-view.d.ts +0 -200
- package/dist/mcp/tools/open-view.js +0 -52
- package/dist/mcp/tools/read-deployment.d.ts +0 -200
- package/dist/mcp/tools/read-deployment.js +0 -150
- package/dist/mcp/tools/read-element.d.ts +0 -200
- package/dist/mcp/tools/read-element.js +0 -218
- package/dist/mcp/tools/read-project-summary.d.ts +0 -198
- package/dist/mcp/tools/read-project-summary.js +0 -176
- package/dist/mcp/tools/read-view.d.ts +0 -200
- package/dist/mcp/tools/read-view.js +0 -203
- package/dist/mcp/tools/search-element.d.ts +0 -198
- package/dist/mcp/tools/search-element.js +0 -177
- package/dist/mcp/utils.d.ts +0 -18
- package/dist/mcp/utils.js +0 -48
- package/dist/model/builder/MergedExtends.d.ts +0 -13
- package/dist/model/builder/MergedExtends.js +0 -74
- package/dist/model/builder/MergedSpecification.d.ts +0 -32
- package/dist/model/builder/MergedSpecification.js +0 -175
- package/dist/model/builder/buildModel.d.ts +0 -16
- package/dist/model/builder/buildModel.js +0 -245
- package/dist/model/deployments-index.d.ts +0 -10
- package/dist/model/deployments-index.js +0 -102
- package/dist/model/fqn-index.d.ts +0 -61
- package/dist/model/fqn-index.js +0 -253
- package/dist/model/index.d.ts +0 -6
- package/dist/model/index.js +0 -6
- package/dist/model/model-builder.d.ts +0 -54
- package/dist/model/model-builder.js +0 -233
- package/dist/model/model-locator.d.ts +0 -39
- package/dist/model/model-locator.js +0 -240
- package/dist/model/model-parser-where.d.ts +0 -4
- package/dist/model/model-parser-where.js +0 -81
- package/dist/model/model-parser.d.ts +0 -645
- package/dist/model/model-parser.js +0 -133
- package/dist/model/parser/Base.d.ts +0 -69
- package/dist/model/parser/Base.js +0 -382
- package/dist/model/parser/DeploymentModelParser.d.ts +0 -71
- package/dist/model/parser/DeploymentModelParser.js +0 -176
- package/dist/model/parser/DeploymentViewParser.d.ts +0 -75
- package/dist/model/parser/DeploymentViewParser.js +0 -86
- package/dist/model/parser/FqnRefParser.d.ts +0 -66
- package/dist/model/parser/FqnRefParser.js +0 -382
- package/dist/model/parser/GlobalsParser.d.ts +0 -109
- package/dist/model/parser/GlobalsParser.js +0 -84
- package/dist/model/parser/ImportsParser.d.ts +0 -46
- package/dist/model/parser/ImportsParser.js +0 -24
- package/dist/model/parser/ModelParser.d.ts +0 -71
- package/dist/model/parser/ModelParser.js +0 -209
- package/dist/model/parser/PredicatesParser.d.ts +0 -75
- package/dist/model/parser/PredicatesParser.js +0 -45
- package/dist/model/parser/SpecificationParser.d.ts +0 -53
- package/dist/model/parser/SpecificationParser.js +0 -113
- package/dist/model/parser/ValueConverter.d.ts +0 -4
- package/dist/model/parser/ValueConverter.js +0 -12
- package/dist/model/parser/ViewsParser.d.ts +0 -112
- package/dist/model/parser/ViewsParser.js +0 -492
- package/dist/model-change/ModelChanges.d.ts +0 -18
- package/dist/model-change/ModelChanges.js +0 -129
- package/dist/model-change/changeElementStyle.d.ts +0 -16
- package/dist/model-change/changeElementStyle.js +0 -134
- package/dist/model-change/changeViewLayout.d.ts +0 -12
- package/dist/model-change/changeViewLayout.js +0 -28
- package/dist/model-change/removeManualLayoutV1.d.ts +0 -7
- package/dist/model-change/removeManualLayoutV1.js +0 -27
- package/dist/module.d.ts +0 -92
- package/dist/module.js +0 -143
- package/dist/protocol.d.ts +0 -289
- package/dist/protocol.js +0 -123
- package/dist/references/index.d.ts +0 -3
- package/dist/references/index.js +0 -3
- package/dist/references/name-provider.d.ts +0 -9
- package/dist/references/name-provider.js +0 -37
- package/dist/references/scope-computation.d.ts +0 -20
- package/dist/references/scope-computation.js +0 -288
- package/dist/references/scope-provider.d.ts +0 -40
- package/dist/references/scope-provider.js +0 -239
- package/dist/shared/NodeKindProvider.d.ts +0 -15
- package/dist/shared/NodeKindProvider.js +0 -57
- package/dist/shared/WorkspaceSymbolProvider.d.ts +0 -3
- package/dist/shared/WorkspaceSymbolProvider.js +0 -3
- package/dist/shared/index.d.ts +0 -2
- package/dist/shared/index.js +0 -2
- package/dist/test/index.d.ts +0 -1
- package/dist/test/index.js +0 -1
- package/dist/test/testServices.d.ts +0 -64
- package/dist/test/testServices.js +0 -210
- package/dist/utils/disposable.d.ts +0 -8
- package/dist/utils/disposable.js +0 -26
- package/dist/utils/elementRef.d.ts +0 -11
- package/dist/utils/elementRef.js +0 -33
- package/dist/utils/fqnRef.d.ts +0 -11
- package/dist/utils/fqnRef.js +0 -63
- package/dist/utils/index.d.ts +0 -11
- package/dist/utils/index.js +0 -35
- package/dist/utils/printDocs.d.ts +0 -2
- package/dist/utils/printDocs.js +0 -1
- package/dist/utils/projectId.d.ts +0 -4
- package/dist/utils/projectId.js +0 -16
- package/dist/utils/stringHash.d.ts +0 -1
- package/dist/utils/stringHash.js +0 -5
- package/dist/validation/DocumentValidator.d.ts +0 -11
- package/dist/validation/DocumentValidator.js +0 -17
- package/dist/validation/_shared.d.ts +0 -3
- package/dist/validation/_shared.js +0 -26
- package/dist/validation/deployment-checks.d.ts +0 -7
- package/dist/validation/deployment-checks.js +0 -140
- package/dist/validation/dynamic-view.d.ts +0 -6
- package/dist/validation/dynamic-view.js +0 -67
- package/dist/validation/element-ref.d.ts +0 -4
- package/dist/validation/element-ref.js +0 -12
- package/dist/validation/element.d.ts +0 -4
- package/dist/validation/element.js +0 -49
- package/dist/validation/imports.d.ts +0 -4
- package/dist/validation/imports.js +0 -46
- package/dist/validation/index.d.ts +0 -15
- package/dist/validation/index.js +0 -167
- package/dist/validation/property-checks.d.ts +0 -7
- package/dist/validation/property-checks.js +0 -108
- package/dist/validation/relation.d.ts +0 -6
- package/dist/validation/relation.js +0 -141
- package/dist/validation/specification.d.ts +0 -12
- package/dist/validation/specification.js +0 -190
- package/dist/validation/view-checks.d.ts +0 -4
- package/dist/validation/view-checks.js +0 -46
- package/dist/validation/view-predicates/fqn-expr-with.d.ts +0 -4
- package/dist/validation/view-predicates/fqn-expr-with.js +0 -43
- package/dist/validation/view-predicates/fqn-ref-expr.d.ts +0 -4
- package/dist/validation/view-predicates/fqn-ref-expr.js +0 -51
- package/dist/validation/view-predicates/incoming.d.ts +0 -4
- package/dist/validation/view-predicates/incoming.js +0 -16
- package/dist/validation/view-predicates/index.d.ts +0 -6
- package/dist/validation/view-predicates/index.js +0 -6
- package/dist/validation/view-predicates/outgoing.d.ts +0 -4
- package/dist/validation/view-predicates/outgoing.js +0 -20
- package/dist/validation/view-predicates/relation-expr.d.ts +0 -4
- package/dist/validation/view-predicates/relation-expr.js +0 -46
- package/dist/validation/view-predicates/relation-with.d.ts +0 -4
- package/dist/validation/view-predicates/relation-with.js +0 -16
- package/dist/validation/view.d.ts +0 -4
- package/dist/validation/view.js +0 -42
- package/dist/view-utils/assignNavigateTo.d.ts +0 -2
- package/dist/view-utils/assignNavigateTo.js +0 -27
- package/dist/view-utils/index.d.ts +0 -2
- package/dist/view-utils/index.js +0 -2
- package/dist/view-utils/manual-layout.d.ts +0 -13
- package/dist/view-utils/manual-layout.js +0 -149
- package/dist/views/ConfigurableLayouter.d.ts +0 -7
- package/dist/views/ConfigurableLayouter.js +0 -51
- package/dist/views/LikeC4ManualLayouts.d.ts +0 -42
- package/dist/views/LikeC4ManualLayouts.js +0 -209
- package/dist/views/LikeC4Views.d.ts +0 -89
- package/dist/views/LikeC4Views.js +0 -216
- package/dist/views/index.d.ts +0 -4
- package/dist/views/index.js +0 -11
- package/dist/workspace/AstNodeDescriptionProvider.d.ts +0 -7
- package/dist/workspace/AstNodeDescriptionProvider.js +0 -18
- package/dist/workspace/IndexManager.d.ts +0 -10
- package/dist/workspace/IndexManager.js +0 -26
- package/dist/workspace/LangiumDocuments.d.ts +0 -29
- package/dist/workspace/LangiumDocuments.js +0 -104
- package/dist/workspace/ProjectsManager.d.ts +0 -134
- package/dist/workspace/ProjectsManager.js +0 -610
- package/dist/workspace/WorkspaceManager.d.ts +0 -31
- package/dist/workspace/WorkspaceManager.js +0 -132
- package/dist/workspace/index.d.ts +0 -5
- package/dist/workspace/index.js +0 -5
|
@@ -0,0 +1,1978 @@
|
|
|
1
|
+
import { $n as ViewLayoutDirection, $t as MetadataBody, A as DynamicView, An as RelationshipStyleProperty, At as IconProperty, B as DynamicViewStep, Bn as SpecificationRelationshipStringProperty, Bt as LikeC4Grammar, Cn as RelationExprWith, D as DirectedRelationExpr, Dn as RelationStringProperty, E as DeploymentViewRuleStyle, Et as IconColorProperty, F as DynamicViewIncludePredicate, Fn as SpecificationColor, Ft as InOutRelationExpr, G as ElementProperty, H as ElementBody, Hn as SpecificationTag, Ht as LikeC4Lib, I as DynamicViewParallelSteps, In as SpecificationDeploymentNodeKind, It as IncomingRelationExpr, J as ElementStringProperty, Jt as LineProperty, K as ElementRef, Kn as StyleProperty, Kt as LikeC4View, Ln as SpecificationElementKind, Lt as LibIcon, M as DynamicViewDisplayVariantProperty, Mn as ShapeSizeProperty, Nt as Imported, O as DynamicStepChain, Or as WildcardExpression, Ot as IconPositionProperty, P as DynamicViewGlobalPredicateRef, Pn as SizeValue, Pt as ImportsFromPoject, Qt as MetadataAttribute, Rn as SpecificationElementStringProperty, S as DeploymentView, Sn as RelationExprWhere, St as GlobalStyleGroup, T as DeploymentViewRulePredicate, Tt as HexColor, V as Element, Vn as SpecificationRule, W as ElementKindExpression, Wn as StrictFqnRef, X as ElementTagExpression, Xn as TextSizeProperty, Xt as MarkdownOrString, Y as ElementStyleProperty, Yn as Tags, Yt as LinkProperty, Z as ElementView, _ as DeploymentNodeBody, _n as Relation, _t as FqnRefExpr, a as BorderProperty, an as ModelViews, ar as ViewRuleGlobalStyle, at as ExtendElementBody, b as DeploymentRelation, bn as RelationExprOrWhere, bt as GlobalPredicateGroup, c as ColorProperty, cn as NotationProperty, cr as ViewRuleRank, dn as OutgoingRelationExpr, dr as ViewStringProperty, dt as FqnExprOrWhere, en as MetadataProperty, et as ExpressionV2, f as CustomRelationProperties, fn as PaddingSizeProperty, ft as FqnExprOrWith, g as DeploymentNode, gn as Referenceable, gt as FqnRef$2, h as DeploymentElement, ht as FqnExpressions, ir as ViewRuleGlobalPredicateRef, it as ExtendElement, jn as ShapeProperty, jt as IconSizeProperty, k as DynamicStepSingle, kt as IconPositionValue, ln as NotesProperty, lr as ViewRuleStyle, m as DeployedInstanceBody, mn as RGBAColor, mt as FqnExprWith, nn as Model, nr as ViewRule, nt as ExtendDeployment, on as MultipleProperty, or as ViewRuleGroup, p as DeployedInstance, pt as FqnExprWhere, r as ArrowProperty, rn as ModelDeployments, rr as ViewRuleAutoLayout, rt as ExtendDeploymentBody, s as ColorLiteral, sn as NavigateToProperty, sr as ViewRulePredicate, st as ExtendRelation, t as AbstractDynamicStep, un as OpacityProperty, ur as ViewRuleStyleOrGlobalRef, ut as FqnExpr$2, vt as FqnReferenceable, w as DeploymentViewRule, wt as Globals, xn as RelationExprOrWith, xt as GlobalStyle, yn as RelationExpr$1, yt as GlobalDynamicPredicateGroup, z as DynamicViewRule, zn as SpecificationRelationshipKind, zt as LikeC4AstType } from "./ast.mjs";
|
|
2
|
+
import { h as Locate, n as ChangeView, o as DidRequestOpenViewNotification } from "./protocol.mjs";
|
|
3
|
+
import { AbstractFormatter, AbstractSemanticTokenProvider, AstNodeHoverProvider, CodeActionProvider, CodeLensProvider, CompletionAcceptor, CompletionContext, DefaultCompletionProvider, DefaultDocumentHighlightProvider, DefaultSharedModuleContext, DefaultWorkspaceSymbolProvider, DocumentLinkProvider, DocumentSymbolProvider, FormattingRegion, LangiumServices, LangiumSharedServices, NextFeature, NodeKindProvider, PartialLangiumServices, SemanticTokenAcceptor } from "langium/lsp";
|
|
4
|
+
import * as langium0 from "langium";
|
|
5
|
+
import { AstNode, AstNodeDescription, AsyncDisposable, BuildOptions, Cancellation, CstNode, DefaultAstNodeDescriptionProvider, DefaultDocumentValidator, DefaultIndexManager, DefaultLangiumDocuments, DefaultNameProvider, DefaultScopeComputation, DefaultScopeProvider, DefaultValueConverter, DefaultWorkspaceManager, DiagnosticInfo, Disposable, DocumentationProvider, FileSelector, FileSystemNode, FileSystemProvider, GrammarAST, LangiumDocument, LangiumDocumentFactory, MaybePromise, Module, PrecomputedScopes, ReferenceDescription, ReferenceInfo, Scope, Stream, URI, ValidationOptions, ValueType, WorkspaceCache } from "langium";
|
|
6
|
+
import { DefaultWeakMap, MultiMap as MultiMap$1 } from "@likec4/core/utils";
|
|
7
|
+
import { CompletionItemKind, Diagnostic, DocumentSymbol, FormattingOptions, Hover, Location, Range, SemanticTokens, SemanticTokensDelta, SymbolKind, TextEdit } from "vscode-languageserver-types";
|
|
8
|
+
import { IncludeConfig, LikeC4ProjectConfig, LikeC4ProjectConfigInput } from "@likec4/config";
|
|
9
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
|
+
import { LikeC4Model } from "@likec4/core/model";
|
|
11
|
+
import { URI as URI$2 } from "vscode-uri";
|
|
12
|
+
import * as c4 from "@likec4/core";
|
|
13
|
+
import { ComputedView, DiagramView, LayoutType, LayoutedView, NonEmptyArray, NonEmptyReadonlyArray, ProjectId, UnknownComputed, UnknownLayouted, UnknownParsed, ViewChange, ViewId } from "@likec4/core";
|
|
14
|
+
import { CancellationToken, CodeLens, CodeLensParams, Connection, DocumentHighlight, DocumentLink, DocumentLinkParams, DocumentSymbolParams, WorkspaceFolder } from "vscode-languageserver";
|
|
15
|
+
import { GraphvizLayouter, QueueGraphvizLayoter } from "@likec4/layouts";
|
|
16
|
+
import { AdhocViewPredicate, LayoutedProjectsView as LayoutedProjectsView$1 } from "@likec4/core/compute-view";
|
|
17
|
+
import { CancellationToken as CancellationToken$1, CodeAction, CodeActionParams, Command, SemanticTokensDeltaParams, SemanticTokensParams, SemanticTokensRangeParams } from "vscode-languageserver-protocol";
|
|
18
|
+
import { Fqn as Fqn$1, LayoutedView as LayoutedView$1, ProjectId as ProjectId$1, ViewId as ViewId$1 } from "@likec4/core/types";
|
|
19
|
+
import { CancellationToken as CancellationToken$2 } from "vscode-jsonrpc";
|
|
20
|
+
import * as type_fest0 from "type-fest";
|
|
21
|
+
import { ConditionalPick, MergeExclusive, Simplify, Tagged, ValueOf, Writable } from "type-fest";
|
|
22
|
+
import { ServerOptions } from "@modelcontextprotocol/sdk/server/index.js";
|
|
23
|
+
|
|
24
|
+
//#region src/documentation/documentation-provider.d.ts
|
|
25
|
+
declare class LikeC4DocumentationProvider implements DocumentationProvider {
|
|
26
|
+
private parser;
|
|
27
|
+
private locator;
|
|
28
|
+
constructor(services: LikeC4Services);
|
|
29
|
+
getDocumentation(node: AstNode): string | undefined;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/workspace/ProjectsManager.d.ts
|
|
33
|
+
/**
|
|
34
|
+
* A tagged string that represents a project folder URI
|
|
35
|
+
* Always has trailing slash.
|
|
36
|
+
*/
|
|
37
|
+
type ProjectFolder = Tagged<string, 'ProjectFolder'>;
|
|
38
|
+
declare function ProjectFolder(folder: URI | string): ProjectFolder;
|
|
39
|
+
interface ProjectData {
|
|
40
|
+
id: ProjectId$1;
|
|
41
|
+
config: LikeC4ProjectConfig;
|
|
42
|
+
folder: ProjectFolder;
|
|
43
|
+
folderUri: URI;
|
|
44
|
+
exclude?: {
|
|
45
|
+
(test: string): boolean;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Resolved include paths with both URI and folder string representations.
|
|
49
|
+
* These are additional directories that are part of this project.
|
|
50
|
+
*/
|
|
51
|
+
includePaths?: NonEmptyArray<{
|
|
52
|
+
uri: URI;
|
|
53
|
+
folder: ProjectFolder;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Normalized include configuration (paths, maxDepth, fileThreshold).
|
|
57
|
+
*/
|
|
58
|
+
includeConfig: IncludeConfig;
|
|
59
|
+
}
|
|
60
|
+
interface Project {
|
|
61
|
+
id: ProjectId$1;
|
|
62
|
+
folderUri: URI;
|
|
63
|
+
config: LikeC4ProjectConfig;
|
|
64
|
+
/**
|
|
65
|
+
* Resolved include paths as URIs (if configured).
|
|
66
|
+
*/
|
|
67
|
+
includePaths?: NonEmptyReadonlyArray<URI>;
|
|
68
|
+
}
|
|
69
|
+
declare class ProjectsManager {
|
|
70
|
+
#private;
|
|
71
|
+
protected services: LikeC4SharedServices;
|
|
72
|
+
/**
|
|
73
|
+
* The global project ID used for all documents
|
|
74
|
+
* that are not part of a specific project.
|
|
75
|
+
*/
|
|
76
|
+
static readonly DefaultProjectId: ProjectId$1;
|
|
77
|
+
constructor(services: LikeC4SharedServices);
|
|
78
|
+
/**
|
|
79
|
+
* Returns:
|
|
80
|
+
* - configured default project ID if set
|
|
81
|
+
* - the default project ID if there are no projects.
|
|
82
|
+
* - the ID of the only project
|
|
83
|
+
* - undefined if there are multiple projects.
|
|
84
|
+
*/
|
|
85
|
+
get defaultProjectId(): ProjectId$1 | undefined;
|
|
86
|
+
set defaultProjectId(id: string | ProjectId$1 | undefined);
|
|
87
|
+
get default(): ProjectData;
|
|
88
|
+
get all(): NonEmptyReadonlyArray<ProjectId$1>;
|
|
89
|
+
getProject(arg: ProjectId$1 | LangiumDocument): Project;
|
|
90
|
+
/**
|
|
91
|
+
* Returns all projects that include the specified folder, or inside the folder.
|
|
92
|
+
*/
|
|
93
|
+
findAllProjectsByFolder(folder: URI | string): ProjectData[];
|
|
94
|
+
/**
|
|
95
|
+
* Validates and ensures the project ID.
|
|
96
|
+
* If no project ID is specified, returns default project ID
|
|
97
|
+
* If there are multiple projects and default project is not set, throws an error
|
|
98
|
+
*/
|
|
99
|
+
ensureProjectId(projectId?: ProjectId$1 | undefined): ProjectId$1;
|
|
100
|
+
/**
|
|
101
|
+
* Validates and ensures the project.
|
|
102
|
+
*/
|
|
103
|
+
ensureProject(projectId?: ProjectId$1 | undefined): Project;
|
|
104
|
+
hasMultipleProjects(): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Checks if the specified document should be excluded from processing.
|
|
107
|
+
*/
|
|
108
|
+
isExcluded(document: LangiumDocument | URI | string): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Checks if the specified document is included by the project:
|
|
111
|
+
* - if the document belongs to the project and is not excluded
|
|
112
|
+
* - if the document is included by the project
|
|
113
|
+
*/
|
|
114
|
+
isIncluded(projectId: ProjectId$1, document: LangiumDocument | URI | string): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Checks if it is a config file and it is not excluded by default exclude pattern
|
|
117
|
+
*
|
|
118
|
+
* @param entry The file system entry to check
|
|
119
|
+
*/
|
|
120
|
+
isConfigFile(entry: URI): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Registers likec4 project by config file.
|
|
123
|
+
*/
|
|
124
|
+
registerConfigFile(configFile: URI, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
|
|
125
|
+
/**
|
|
126
|
+
* Registers (or reloads) likec4 project by config file or config object.
|
|
127
|
+
* If there is some project registered at same folder, it will be reloaded.
|
|
128
|
+
*/
|
|
129
|
+
registerProject(opts: {
|
|
130
|
+
config: LikeC4ProjectConfig | LikeC4ProjectConfigInput;
|
|
131
|
+
folderUri: URI | string;
|
|
132
|
+
}, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
|
|
133
|
+
/**
|
|
134
|
+
* Determines which project the given document belongs to.
|
|
135
|
+
* If the document does not belong to any project, returns the default project ID.
|
|
136
|
+
*/
|
|
137
|
+
belongsTo(document: LangiumDocument | URI | string): ProjectId$1;
|
|
138
|
+
reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
|
|
139
|
+
protected _reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
|
|
140
|
+
protected uniqueProjectId(name: string): ProjectId$1;
|
|
141
|
+
protected reset(): void;
|
|
142
|
+
rebuidProject(projectId: ProjectId$1, cancelToken?: Cancellation.CancellationToken): Promise<void>;
|
|
143
|
+
protected findProjectForDocument(documentUri: string): ProjectData;
|
|
144
|
+
protected get mappingsToProject(): WorkspaceCache<string, ProjectData>;
|
|
145
|
+
/**
|
|
146
|
+
* The mapping between documents and projects they belong to.
|
|
147
|
+
* Lazy-created due to initialization order of the LanguageServer
|
|
148
|
+
*/
|
|
149
|
+
protected get documentBelongsTo(): WorkspaceCache<LangiumDocument, ProjectData>;
|
|
150
|
+
/**
|
|
151
|
+
* Returns all include paths from all projects.
|
|
152
|
+
* Used by WorkspaceManager to scan additional directories for C4 files.
|
|
153
|
+
*/
|
|
154
|
+
getAllIncludePaths(): Array<{
|
|
155
|
+
projectId: ProjectId$1;
|
|
156
|
+
includePath: URI;
|
|
157
|
+
includeConfig: IncludeConfig;
|
|
158
|
+
}>;
|
|
159
|
+
/**
|
|
160
|
+
* Register a listener to be called when the projects configuration has changed.
|
|
161
|
+
* @returns A disposable that can be used to unregister the callback.
|
|
162
|
+
*/
|
|
163
|
+
onProjectsUpdate(callback: () => void): Disposable;
|
|
164
|
+
private getWorkspaceFolder;
|
|
165
|
+
private notifyListeners;
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/filesystem/types.d.ts
|
|
169
|
+
interface FileNode extends FileSystemNode {
|
|
170
|
+
readonly isFile: true;
|
|
171
|
+
readonly isDirectory: false;
|
|
172
|
+
}
|
|
173
|
+
interface FileSystemProvider$1 extends FileSystemProvider {
|
|
174
|
+
/**
|
|
175
|
+
* Scans the project files for the given URI.
|
|
176
|
+
* @returns The list of file system entries that are contained within the specified directory.
|
|
177
|
+
*/
|
|
178
|
+
scanProjectFiles(folderUri: URI): Promise<FileNode[]>;
|
|
179
|
+
/**
|
|
180
|
+
* Loads the project config from the given file.
|
|
181
|
+
* @returns The project config.
|
|
182
|
+
*/
|
|
183
|
+
loadProjectConfig(filepath: URI): Promise<LikeC4ProjectConfig>;
|
|
184
|
+
/**
|
|
185
|
+
* Reads the directory information for the given URI.
|
|
186
|
+
* @param options.recursive If true, recursively reads the directory,
|
|
187
|
+
* @param options.maxDepth Maximum depth to traverse when recursive is true (default: Infinity)
|
|
188
|
+
*/
|
|
189
|
+
readDirectory(uri: URI, options?: {
|
|
190
|
+
recursive?: boolean;
|
|
191
|
+
maxDepth?: number;
|
|
192
|
+
}): Promise<FileNode[]>;
|
|
193
|
+
/**
|
|
194
|
+
* Finds all files in the given directory, matching the given filter.
|
|
195
|
+
*/
|
|
196
|
+
scanDirectory(directory: URI, filter: (filepath: string) => boolean): Promise<FileNode[]>;
|
|
197
|
+
/**
|
|
198
|
+
* Writes the content to the file system.
|
|
199
|
+
* Used by manual layouts.
|
|
200
|
+
*/
|
|
201
|
+
writeFile(uri: URI, content: string): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* Deletes the file from the file system.
|
|
204
|
+
* Used by manual layouts.
|
|
205
|
+
* @return true if the file was deleted, false if the file did not exist.
|
|
206
|
+
*/
|
|
207
|
+
deleteFile(uri: URI): Promise<boolean>;
|
|
208
|
+
}
|
|
209
|
+
interface FileSystemModuleContext extends FileSystemWatcherModuleContext {
|
|
210
|
+
fileSystemProvider: () => FileSystemProvider$1;
|
|
211
|
+
}
|
|
212
|
+
interface FileSystemWatcherModuleContext {
|
|
213
|
+
fileSystemWatcher: (services: LikeC4SharedServices) => FileSystemWatcher;
|
|
214
|
+
}
|
|
215
|
+
interface FileSystemWatcher extends AsyncDisposable {
|
|
216
|
+
/**
|
|
217
|
+
* Watches a folder for changes and triggers a reload of the documents and projects.
|
|
218
|
+
*/
|
|
219
|
+
watch(folder: string): void;
|
|
220
|
+
}
|
|
221
|
+
interface LikeC4ManualLayoutsModuleContext {
|
|
222
|
+
manualLayouts: (services: LikeC4SharedServices) => LikeC4ManualLayouts;
|
|
223
|
+
}
|
|
224
|
+
interface LikeC4ManualLayouts {
|
|
225
|
+
read(project: Project): Promise<Record<ViewId$1, LayoutedView$1> | null>;
|
|
226
|
+
write(project: Project, layouted: LayoutedView$1): Promise<Location>;
|
|
227
|
+
remove(project: Project, view: ViewId$1): Promise<Location | null>;
|
|
228
|
+
clearCaches(): void;
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/filesystem/noop.d.ts
|
|
232
|
+
declare const NoFileSystemWatcher: FileSystemWatcherModuleContext;
|
|
233
|
+
declare const NoFileSystem: FileSystemModuleContext;
|
|
234
|
+
declare const NoLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/formatting/LikeC4Formatter.d.ts
|
|
237
|
+
type QuoteStyle = 'single' | 'double' | 'ignore' | 'auto';
|
|
238
|
+
interface LikeC4FormatterOptions {
|
|
239
|
+
quoteStyle: QuoteStyle;
|
|
240
|
+
}
|
|
241
|
+
type ExtendedFormattingCommandType = 'normalizeQuotes';
|
|
242
|
+
interface ExtendedFormattingCommand {
|
|
243
|
+
type: ExtendedFormattingCommandType;
|
|
244
|
+
region: FormattingRegion;
|
|
245
|
+
}
|
|
246
|
+
declare class LikeC4Formatter extends AbstractFormatter {
|
|
247
|
+
protected options: LikeC4FormatterOptions;
|
|
248
|
+
extendedFormattingCommands: ExtendedFormattingCommand[];
|
|
249
|
+
constructor(services: LikeC4Services);
|
|
250
|
+
protected doDocumentFormat(document: LangiumDocument, options: FormattingOptions, range?: Range): TextEdit[];
|
|
251
|
+
protected format(node: AstNode): void;
|
|
252
|
+
protected formatTags(node: AstNode): void;
|
|
253
|
+
protected formatDeploymentRelation(node: AstNode): void;
|
|
254
|
+
protected formatExtendDeployment(node: AstNode): void;
|
|
255
|
+
protected formatRelation(node: AstNode): void;
|
|
256
|
+
protected removeIndentFromTopLevelStatements(node: AstNode): void;
|
|
257
|
+
protected indentContentInBraces(node: AstNode): void;
|
|
258
|
+
protected appendKeywordsWithSpace(node: AstNode): void;
|
|
259
|
+
protected formatView(node: AstNode): void;
|
|
260
|
+
protected formatLeafProperty(node: AstNode): void;
|
|
261
|
+
protected formatLinkProperty(node: AstNode): void;
|
|
262
|
+
protected formatNavigateToProperty(node: AstNode): void;
|
|
263
|
+
protected formatAutolayoutProperty(node: AstNode): void;
|
|
264
|
+
protected formatMetadataProperty(node: AstNode): void;
|
|
265
|
+
protected formatElementDeclaration(node: AstNode): void;
|
|
266
|
+
protected formatExtendElement(node: AstNode): void;
|
|
267
|
+
protected formatGlobals(node: AstNode): void;
|
|
268
|
+
protected formatImports(node: AstNode): void;
|
|
269
|
+
protected formatSpecificationRule(node: AstNode): void;
|
|
270
|
+
protected formatWithPredicate(node: AstNode): void;
|
|
271
|
+
protected formatDeploymentNodeDeclaration(node: AstNode): void;
|
|
272
|
+
protected formatDeployedInstance(node: AstNode): void;
|
|
273
|
+
protected formatViewRuleGlobalStyle(node: AstNode): void;
|
|
274
|
+
protected formatViewRuleGlobalPredicate(node: AstNode): void;
|
|
275
|
+
protected formatViewRuleGroup(node: AstNode): void;
|
|
276
|
+
protected formatViewRuleStyle(node: AstNode): void;
|
|
277
|
+
protected formatWhereExpression(node: AstNode): void;
|
|
278
|
+
protected formatWhereRelationExpression(node: AstNode): void;
|
|
279
|
+
protected formatWhereElementExpression(node: AstNode): void;
|
|
280
|
+
protected formatIncludeExcludeExpressions(node: AstNode): void;
|
|
281
|
+
protected formatRelationExpression(node: AstNode): void;
|
|
282
|
+
private findPredicateExpressionRoot;
|
|
283
|
+
private on;
|
|
284
|
+
private doExtendedFormatting;
|
|
285
|
+
protected normalizeQuotes(node: AstNode): void;
|
|
286
|
+
private quotesNormalizerFactory;
|
|
287
|
+
private escapeQuotesInternalQuotes;
|
|
288
|
+
private getAutoQuoteStyle;
|
|
289
|
+
private onConfigurationUpdate;
|
|
290
|
+
}
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region src/lsp/CodeLensProvider.d.ts
|
|
293
|
+
declare class LikeC4CodeLensProvider implements CodeLensProvider {
|
|
294
|
+
private services;
|
|
295
|
+
constructor(services: LikeC4Services);
|
|
296
|
+
provideCodeLens(doc: LangiumDocument, _params: CodeLensParams, cancelToken?: CancellationToken): Promise<CodeLens[] | undefined>;
|
|
297
|
+
}
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/lsp/CompletionProvider.d.ts
|
|
300
|
+
declare class LikeC4CompletionProvider extends DefaultCompletionProvider {
|
|
301
|
+
protected services: LikeC4Services;
|
|
302
|
+
constructor(services: LikeC4Services);
|
|
303
|
+
readonly completionOptions: {
|
|
304
|
+
triggerCharacters: string[];
|
|
305
|
+
};
|
|
306
|
+
protected completionFor(context: CompletionContext, next: NextFeature, acceptor: CompletionAcceptor): MaybePromise<void>;
|
|
307
|
+
protected completionForKeyword(context: CompletionContext, keyword: GrammarAST.Keyword, acceptor: CompletionAcceptor): MaybePromise<void>;
|
|
308
|
+
protected completionForImportedProject(context: CompletionContext, acceptor: CompletionAcceptor): void;
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/lsp/DocumentHighlightProvider.d.ts
|
|
312
|
+
declare class LikeC4DocumentHighlightProvider extends DefaultDocumentHighlightProvider {
|
|
313
|
+
/**
|
|
314
|
+
* Override this method to determine the highlight kind of the given reference.
|
|
315
|
+
*/
|
|
316
|
+
protected createDocumentHighlight(reference: ReferenceDescription): DocumentHighlight;
|
|
317
|
+
}
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/lsp/DocumentLinkProvider.d.ts
|
|
320
|
+
declare class LikeC4DocumentLinkProvider implements DocumentLinkProvider {
|
|
321
|
+
private services;
|
|
322
|
+
constructor(services: LikeC4Services);
|
|
323
|
+
getDocumentLinks(doc: LangiumDocument, _params: DocumentLinkParams, _cancelToken?: CancellationToken): Promise<DocumentLink[]>;
|
|
324
|
+
resolveLink(doc: LangiumDocument, link: string): string;
|
|
325
|
+
relativeLink(doc: LangiumDocument, link: string): string | null;
|
|
326
|
+
}
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/references/name-provider.d.ts
|
|
329
|
+
declare class LikeC4NameProvider extends DefaultNameProvider {
|
|
330
|
+
protected services: LikeC4Services;
|
|
331
|
+
constructor(services: LikeC4Services);
|
|
332
|
+
getNameStrict(node: AstNode): string;
|
|
333
|
+
getName(node: AstNode): string | undefined;
|
|
334
|
+
getNameNode(node: AstNode): CstNode | undefined;
|
|
335
|
+
}
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region src/references/scope-computation.d.ts
|
|
338
|
+
type ElementsContainer = Model | ElementBody | ExtendElementBody;
|
|
339
|
+
type DeploymentsContainer = ModelDeployments | DeploymentNodeBody | ExtendDeploymentBody | DeployedInstanceBody;
|
|
340
|
+
declare class LikeC4ScopeComputation extends DefaultScopeComputation {
|
|
341
|
+
constructor(services: LikeC4Services);
|
|
342
|
+
computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
343
|
+
private exportViews;
|
|
344
|
+
private exportGlobals;
|
|
345
|
+
private exportModel;
|
|
346
|
+
private exportLibrary;
|
|
347
|
+
private exportSpecification;
|
|
348
|
+
private exportDeployments;
|
|
349
|
+
computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
|
|
350
|
+
protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
351
|
+
protected processDeployments(container: DeploymentsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
352
|
+
}
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region src/workspace/IndexManager.d.ts
|
|
355
|
+
declare class IndexManager extends DefaultIndexManager {
|
|
356
|
+
protected services: LikeC4SharedServices;
|
|
357
|
+
constructor(services: LikeC4SharedServices);
|
|
358
|
+
updateContent(document: LangiumDocument, cancelToken?: CancellationToken): Promise<void>;
|
|
359
|
+
projectElements(projectId: ProjectId, nodeType?: string, uris?: Set<string>): Stream<AstNodeDescription>;
|
|
360
|
+
}
|
|
361
|
+
//#endregion
|
|
362
|
+
//#region src/workspace/LangiumDocuments.d.ts
|
|
363
|
+
declare class LangiumDocuments extends DefaultLangiumDocuments {
|
|
364
|
+
protected services: LikeC4SharedServices;
|
|
365
|
+
constructor(services: LikeC4SharedServices);
|
|
366
|
+
addDocument(document: LangiumDocument): void;
|
|
367
|
+
getDocument(uri: URI): LikeC4LangiumDocument | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Returns all known documents, without any filtering.
|
|
370
|
+
*/
|
|
371
|
+
get allKnownDocuments(): Stream<LangiumDocument>;
|
|
372
|
+
get all(): Stream<LikeC4LangiumDocument>;
|
|
373
|
+
/**
|
|
374
|
+
* Returns all documents, excluding built-in documents and documents excluded by ProjectsManager.
|
|
375
|
+
*/
|
|
376
|
+
get allExcludingBuiltin(): Stream<LikeC4LangiumDocument>;
|
|
377
|
+
/**
|
|
378
|
+
* Returns all documents for a project, including both project documents and documents included by the project.
|
|
379
|
+
*/
|
|
380
|
+
projectDocuments(projectId: ProjectId): Stream<LikeC4LangiumDocument>;
|
|
381
|
+
groupedByProject(): Record<ProjectId, NonEmptyArray<LikeC4LangiumDocument>>;
|
|
382
|
+
/**
|
|
383
|
+
* Reset the project IDs of all documents.
|
|
384
|
+
*/
|
|
385
|
+
resetProjectIds(): void;
|
|
386
|
+
}
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/workspace/WorkspaceManager.d.ts
|
|
389
|
+
declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
|
|
390
|
+
private services;
|
|
391
|
+
protected readonly documentFactory: LangiumDocumentFactory;
|
|
392
|
+
protected readonly fileSystemProvider: FileSystemProvider$1;
|
|
393
|
+
initialBuildOptions: BuildOptions;
|
|
394
|
+
constructor(services: LikeC4SharedServices);
|
|
395
|
+
/**
|
|
396
|
+
* First load all project config files, then load all documents in the workspace.
|
|
397
|
+
*/
|
|
398
|
+
protected performStartup(folders: WorkspaceFolder[]): Promise<LangiumDocument[]>;
|
|
399
|
+
/**
|
|
400
|
+
* Load all additional documents that shall be visible in the context of the given workspace
|
|
401
|
+
* folders and add them to the collector. This can be used to include built-in libraries of
|
|
402
|
+
* your language, which can be either loaded from provided files or constructed in memory.
|
|
403
|
+
*/
|
|
404
|
+
protected loadAdditionalDocuments(folders: WorkspaceFolder[], collector: (document: LangiumDocument) => void): Promise<void>;
|
|
405
|
+
/**
|
|
406
|
+
* Determine whether the given folder entry shall be included while indexing the workspace.
|
|
407
|
+
*/
|
|
408
|
+
protected includeEntry(_workspaceFolder: WorkspaceFolder, entry: FileSystemNode, selector: FileSelector): boolean;
|
|
409
|
+
workspace(): WorkspaceFolder | null;
|
|
410
|
+
rebuildAll(cancelToken?: Cancellation.CancellationToken): Promise<void>;
|
|
411
|
+
get workspaceUri(): URI$2;
|
|
412
|
+
get workspaceURL(): URL;
|
|
413
|
+
}
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/references/scope-provider.d.ts
|
|
416
|
+
declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
417
|
+
protected deploymentsIndex: DeploymentsIndex;
|
|
418
|
+
protected fqnIndex: FqnIndex;
|
|
419
|
+
protected readonly indexManager: IndexManager;
|
|
420
|
+
constructor(services: LikeC4Services);
|
|
421
|
+
getScope(context: ReferenceInfo): Scope;
|
|
422
|
+
protected genUniqueDescedants(element: Element | DeploymentNode | undefined): Generator<AstNodeDescriptionWithFqn, void, any>;
|
|
423
|
+
protected genScopeExtendElement({
|
|
424
|
+
element
|
|
425
|
+
}: ExtendElement): Generator<AstNodeDescription>;
|
|
426
|
+
protected genScopeElementView({
|
|
427
|
+
viewOf,
|
|
428
|
+
extends: ext
|
|
429
|
+
}: ElementView): Generator<AstNodeDescription>;
|
|
430
|
+
protected getScopeForStrictFqnRef(projectId: ProjectId, container: StrictFqnRef, context: ReferenceInfo): Scope;
|
|
431
|
+
protected genScopeExtendDeployment({
|
|
432
|
+
deploymentNode
|
|
433
|
+
}: ExtendDeployment): Generator<AstNodeDescription>;
|
|
434
|
+
protected streamForFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Stream<AstNodeDescription>;
|
|
435
|
+
protected genScopeForParentlessFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Generator<AstNodeDescription>;
|
|
436
|
+
/**
|
|
437
|
+
* Computes the scope for a given reference context.
|
|
438
|
+
*
|
|
439
|
+
* @param context - The reference information containing the context for which the scope is being computed.
|
|
440
|
+
* @param referenceType - The type of reference being resolved. Defaults to the reference type derived from the context.
|
|
441
|
+
* @returns A scope containing the relevant AST node descriptions for the given reference context.
|
|
442
|
+
*
|
|
443
|
+
* This method first checks if there are precomputed scopes available in the document. If not, it falls back to the global scope.
|
|
444
|
+
* It then iterates through the container hierarchy, collecting relevant scopes based on the reference type and container type.
|
|
445
|
+
* Finally, it combines the collected scopes with the global scope to produce the final scope.
|
|
446
|
+
*/
|
|
447
|
+
protected computeScope(projectId: ProjectId, context: ReferenceInfo, referenceType?: string): Generator<AstNodeDescription>;
|
|
448
|
+
/**
|
|
449
|
+
* Create a global scope filtered for the given reference type.
|
|
450
|
+
*/
|
|
451
|
+
protected getProjectScope(projectId: ProjectId, referenceType: string, context: ReferenceInfo): Scope;
|
|
452
|
+
/**
|
|
453
|
+
* Create a global scope filtered for the given reference type.
|
|
454
|
+
*/
|
|
455
|
+
protected getGlobalScope(referenceType: string, context: ReferenceInfo): Scope;
|
|
456
|
+
}
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region src/lsp/DocumentSymbolProvider.d.ts
|
|
459
|
+
declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
460
|
+
private services;
|
|
461
|
+
protected readonly nodeKindProvider: NodeKindProvider;
|
|
462
|
+
protected readonly nameProvider: LikeC4NameProvider;
|
|
463
|
+
protected readonly parser: LikeC4ModelParser;
|
|
464
|
+
protected readonly locator: LikeC4ModelLocator;
|
|
465
|
+
constructor(services: LikeC4Services);
|
|
466
|
+
getSymbols(doc: LangiumDocument, _params: DocumentSymbolParams, cancelToken?: CancellationToken): Promise<DocumentSymbol[]>;
|
|
467
|
+
protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
|
|
468
|
+
protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
|
|
469
|
+
protected getModelSymbol(astModel: Model): DocumentSymbol[];
|
|
470
|
+
protected getDeploymentModelSymbol(astModel: ModelDeployments): DocumentSymbol[];
|
|
471
|
+
protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
|
|
472
|
+
protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
|
|
473
|
+
protected getElementSymbol(astElement: Element): DocumentSymbol[];
|
|
474
|
+
protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
|
|
475
|
+
protected getKindSymbol(astKind: SpecificationElementKind | SpecificationRelationshipKind): DocumentSymbol | null;
|
|
476
|
+
protected getTagSymbol(astTag: SpecificationTag): DocumentSymbol | null;
|
|
477
|
+
protected getLibIconSymbol(astTag: LibIcon): DocumentSymbol | null;
|
|
478
|
+
protected getViewSymbol(astView: LikeC4View): DocumentSymbol[];
|
|
479
|
+
protected getDeploymentElementSymbol(el: DeploymentElement | DeploymentRelation | ExtendDeployment): DocumentSymbol[];
|
|
480
|
+
protected getDeploymentNodeSymbol(astElement: DeploymentNode): DocumentSymbol[];
|
|
481
|
+
protected getDeployedInstanceSymbol(astElement: DeployedInstance): DocumentSymbol[];
|
|
482
|
+
protected symbolKind(node: AstNode): SymbolKind;
|
|
483
|
+
}
|
|
484
|
+
//#endregion
|
|
485
|
+
//#region src/lsp/HoverProvider.d.ts
|
|
486
|
+
declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
487
|
+
private parser;
|
|
488
|
+
private locator;
|
|
489
|
+
constructor(services: LikeC4Services);
|
|
490
|
+
protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
|
|
491
|
+
}
|
|
492
|
+
//#endregion
|
|
493
|
+
//#region src/lsp/CodeActionProvider.d.ts
|
|
494
|
+
type CommandOrCodeAction = Command | CodeAction;
|
|
495
|
+
declare class LikeC4CodeActionProvider implements CodeActionProvider {
|
|
496
|
+
/**
|
|
497
|
+
* Handle a code action request.
|
|
498
|
+
*
|
|
499
|
+
* @throws `OperationCancelled` if cancellation is detected during execution
|
|
500
|
+
* @throws `ResponseError` if an error is detected that should be sent as response to the client
|
|
501
|
+
*/
|
|
502
|
+
getCodeActions(document: LangiumDocument, params: CodeActionParams): CommandOrCodeAction[] | undefined;
|
|
503
|
+
}
|
|
504
|
+
//#endregion
|
|
505
|
+
//#region src/lsp/SemanticTokenProvider.d.ts
|
|
506
|
+
declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
|
|
507
|
+
protected services: LikeC4Services;
|
|
508
|
+
private rules;
|
|
509
|
+
constructor(services: LikeC4Services);
|
|
510
|
+
protected initRules(): void;
|
|
511
|
+
semanticHighlight(document: LangiumDocument, params: SemanticTokensParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens>;
|
|
512
|
+
semanticHighlightRange(document: LangiumDocument, params: SemanticTokensRangeParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens>;
|
|
513
|
+
semanticHighlightDelta(document: LangiumDocument, params: SemanticTokensDeltaParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens | SemanticTokensDelta>;
|
|
514
|
+
protected ensureState(document: LangiumDocument, cancelToken: CancellationToken$1): Promise<void>;
|
|
515
|
+
protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
|
|
516
|
+
private highlightNameAndKind;
|
|
517
|
+
private highlightView;
|
|
518
|
+
private mark;
|
|
519
|
+
}
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region src/mcp/types.d.ts
|
|
522
|
+
interface LikeC4MCPServer {
|
|
523
|
+
readonly mcp: McpServer;
|
|
524
|
+
readonly isStarted: boolean;
|
|
525
|
+
readonly port: number;
|
|
526
|
+
start(port?: number): Promise<void>;
|
|
527
|
+
stop(): Promise<void>;
|
|
528
|
+
}
|
|
529
|
+
interface LikeC4MCPServerFactory {
|
|
530
|
+
create(options?: ServerOptions): McpServer;
|
|
531
|
+
}
|
|
532
|
+
interface LikeC4MCPServerModuleContext {
|
|
533
|
+
mcpServer: (services: LikeC4Services) => LikeC4MCPServer;
|
|
534
|
+
mcpServerFactory: (services: LikeC4Services) => LikeC4MCPServerFactory;
|
|
535
|
+
}
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/mcp/index.d.ts
|
|
538
|
+
declare const NoMCPServer: LikeC4MCPServerModuleContext;
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region src/model-change/ModelChanges.d.ts
|
|
541
|
+
declare class LikeC4ModelChanges {
|
|
542
|
+
private services;
|
|
543
|
+
private locator;
|
|
544
|
+
constructor(services: LikeC4Services);
|
|
545
|
+
applyChange(changeView: ChangeView.Params): Promise<ChangeView.Res>;
|
|
546
|
+
protected convertToTextEdit({
|
|
547
|
+
lookup,
|
|
548
|
+
change
|
|
549
|
+
}: {
|
|
550
|
+
lookup: ViewLocateResult;
|
|
551
|
+
change: Exclude<ViewChange, ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout>;
|
|
552
|
+
}): {
|
|
553
|
+
modifiedRange: Range;
|
|
554
|
+
edits: TextEdit[];
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
//#endregion
|
|
558
|
+
//#region src/utils/disposable.d.ts
|
|
559
|
+
declare abstract class ADisposable implements Disposable {
|
|
560
|
+
protected toDispose: Disposable[];
|
|
561
|
+
protected isDisposed: boolean;
|
|
562
|
+
onDispose(...disposable: Disposable[]): void;
|
|
563
|
+
dispose(): void;
|
|
564
|
+
protected throwIfDisposed(): void;
|
|
565
|
+
}
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/Rpc.d.ts
|
|
568
|
+
declare class Rpc extends ADisposable {
|
|
569
|
+
private services;
|
|
570
|
+
constructor(services: LikeC4Services);
|
|
571
|
+
init(): void;
|
|
572
|
+
openView(params: DidRequestOpenViewNotification.Params): Promise<void>;
|
|
573
|
+
}
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region src/shared/NodeKindProvider.d.ts
|
|
576
|
+
declare class NodeKindProvider$1 implements NodeKindProvider {
|
|
577
|
+
private services;
|
|
578
|
+
constructor(services: LangiumSharedServices);
|
|
579
|
+
/**
|
|
580
|
+
* Returns a `SymbolKind` as used by `WorkspaceSymbolProvider` or `DocumentSymbolProvider`.
|
|
581
|
+
*/
|
|
582
|
+
getSymbolKind(node: AstNode | AstNodeDescription): SymbolKind;
|
|
583
|
+
/**
|
|
584
|
+
* Returns a `CompletionItemKind` as used by the `CompletionProvider`.
|
|
585
|
+
*/
|
|
586
|
+
getCompletionItemKind(node: AstNode | AstNodeDescription): CompletionItemKind;
|
|
587
|
+
}
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region src/shared/WorkspaceSymbolProvider.d.ts
|
|
590
|
+
declare class WorkspaceSymbolProvider extends DefaultWorkspaceSymbolProvider {}
|
|
591
|
+
//#endregion
|
|
592
|
+
//#region src/views/LikeC4Views.d.ts
|
|
593
|
+
type GraphvizOut = {
|
|
594
|
+
readonly dot: string;
|
|
595
|
+
readonly diagram: LayoutedView;
|
|
596
|
+
};
|
|
597
|
+
type GraphvizSvgOut = {
|
|
598
|
+
readonly id: ViewId;
|
|
599
|
+
readonly dot: string;
|
|
600
|
+
readonly svg: string;
|
|
601
|
+
};
|
|
602
|
+
type LayoutViewParams = {
|
|
603
|
+
viewId: ViewId;
|
|
604
|
+
/**
|
|
605
|
+
* Type of layout to apply
|
|
606
|
+
* - 'manual' - applies manual layout if any
|
|
607
|
+
* - 'auto' - returns latest version with drifts from manual layout if any
|
|
608
|
+
* - undefined - returns latest layout as is
|
|
609
|
+
*/
|
|
610
|
+
layoutType?: LayoutType | undefined;
|
|
611
|
+
projectId?: ProjectId | undefined;
|
|
612
|
+
cancelToken?: CancellationToken | undefined;
|
|
613
|
+
};
|
|
614
|
+
interface LikeC4Views {
|
|
615
|
+
readonly layouter: GraphvizLayouter;
|
|
616
|
+
/**
|
|
617
|
+
* Returns computed views (i.e. views with predicates computed)
|
|
618
|
+
*
|
|
619
|
+
* @param projectId - project id, if not specified - uses the default project
|
|
620
|
+
*/
|
|
621
|
+
computedViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<ComputedView[]>;
|
|
622
|
+
/**
|
|
623
|
+
* Layouts all views (ignoring any manual snapshots)
|
|
624
|
+
*
|
|
625
|
+
* @param projectId - project id, if not specified - uses the default project
|
|
626
|
+
*/
|
|
627
|
+
layoutAllViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<GraphvizOut[]>;
|
|
628
|
+
/**
|
|
629
|
+
* Layouts a view.
|
|
630
|
+
* If layoutType is 'manual' - applies manual layout if any.
|
|
631
|
+
* If layoutType is 'auto' - returns latest version with drifts from manual layout if any
|
|
632
|
+
* If not specified - returns latest layout as is
|
|
633
|
+
*
|
|
634
|
+
* If view not found in model, but there is a snapshot - it will be returned (with empty DOT)
|
|
635
|
+
*
|
|
636
|
+
* @param projectId - project id, if not specified - uses the default project
|
|
637
|
+
*/
|
|
638
|
+
layoutView(params: LayoutViewParams): Promise<GraphvizOut | null>;
|
|
639
|
+
/**
|
|
640
|
+
* Returns diagrams.
|
|
641
|
+
* If diagram has manual layout, it will be used.
|
|
642
|
+
* @param projectId - project id, if not specified - uses the default project
|
|
643
|
+
*/
|
|
644
|
+
diagrams(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<Array<DiagramView>>;
|
|
645
|
+
/**
|
|
646
|
+
* Returns all layouted views as Graphviz output (i.e. views with layout computed)
|
|
647
|
+
* @param projectId - project id, if not specified - uses the default project
|
|
648
|
+
*/
|
|
649
|
+
viewsAsGraphvizOut(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<Array<GraphvizSvgOut>>;
|
|
650
|
+
/**
|
|
651
|
+
* Open view in the preview panel.
|
|
652
|
+
* (works only if running as a vscode extension)
|
|
653
|
+
*
|
|
654
|
+
* @param projectId - project id, if not specified - uses the default project
|
|
655
|
+
*/
|
|
656
|
+
openView(viewId: ViewId, projectId?: ProjectId | undefined): Promise<void>;
|
|
657
|
+
/**
|
|
658
|
+
* Computes and layouts an adhoc view (not defined in the model)
|
|
659
|
+
*
|
|
660
|
+
* @param projectId - project id, if not specified - uses the default project
|
|
661
|
+
*/
|
|
662
|
+
adhocView(predicates: AdhocViewPredicate[], projectId?: ProjectId | undefined): Promise<LayoutedView>;
|
|
663
|
+
}
|
|
664
|
+
//#endregion
|
|
665
|
+
//#region src/module.d.ts
|
|
666
|
+
type LanguageServicesContext = Omit<DefaultSharedModuleContext, 'fileSystemProvider'> & FileSystemModuleContext & LikeC4MCPServerModuleContext & LikeC4ManualLayoutsModuleContext;
|
|
667
|
+
interface LikeC4AddedSharedServices {
|
|
668
|
+
lsp: {
|
|
669
|
+
NodeKindProvider: NodeKindProvider$1;
|
|
670
|
+
WorkspaceSymbolProvider: WorkspaceSymbolProvider;
|
|
671
|
+
};
|
|
672
|
+
workspace: {
|
|
673
|
+
Cache: WorkspaceCache<string, any>;
|
|
674
|
+
ProjectsManager: ProjectsManager;
|
|
675
|
+
IndexManager: IndexManager;
|
|
676
|
+
LangiumDocuments: LangiumDocuments;
|
|
677
|
+
WorkspaceManager: LikeC4WorkspaceManager;
|
|
678
|
+
FileSystemProvider: FileSystemProvider$1;
|
|
679
|
+
FileSystemWatcher: FileSystemWatcher;
|
|
680
|
+
ManualLayouts: LikeC4ManualLayouts;
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
|
|
684
|
+
/**
|
|
685
|
+
* Declaration of custom services - add your own service classes here.
|
|
686
|
+
*/
|
|
687
|
+
interface LikeC4AddedServices {
|
|
688
|
+
documentation: {
|
|
689
|
+
DocumentationProvider: LikeC4DocumentationProvider;
|
|
690
|
+
};
|
|
691
|
+
validation: {
|
|
692
|
+
DocumentValidator: LikeC4DocumentValidator;
|
|
693
|
+
};
|
|
694
|
+
Rpc: Rpc;
|
|
695
|
+
mcp: {
|
|
696
|
+
Server: LikeC4MCPServer;
|
|
697
|
+
ServerFactory: LikeC4MCPServerFactory;
|
|
698
|
+
};
|
|
699
|
+
likec4: {
|
|
700
|
+
LanguageServices: LikeC4LanguageServices;
|
|
701
|
+
Views: LikeC4Views;
|
|
702
|
+
Layouter: QueueGraphvizLayoter;
|
|
703
|
+
DeploymentsIndex: DeploymentsIndex;
|
|
704
|
+
FqnIndex: FqnIndex;
|
|
705
|
+
ModelParser: LikeC4ModelParser;
|
|
706
|
+
ModelBuilder: LikeC4ModelBuilder;
|
|
707
|
+
ModelLocator: LikeC4ModelLocator;
|
|
708
|
+
ModelChanges: LikeC4ModelChanges;
|
|
709
|
+
};
|
|
710
|
+
lsp: {
|
|
711
|
+
CompletionProvider: LikeC4CompletionProvider;
|
|
712
|
+
DocumentHighlightProvider: LikeC4DocumentHighlightProvider;
|
|
713
|
+
DocumentSymbolProvider: LikeC4DocumentSymbolProvider;
|
|
714
|
+
SemanticTokenProvider: LikeC4SemanticTokenProvider;
|
|
715
|
+
HoverProvider: LikeC4HoverProvider;
|
|
716
|
+
CodeLensProvider: LikeC4CodeLensProvider;
|
|
717
|
+
DocumentLinkProvider: LikeC4DocumentLinkProvider;
|
|
718
|
+
Formatter: LikeC4Formatter;
|
|
719
|
+
CodeActionProvider: LikeC4CodeActionProvider;
|
|
720
|
+
};
|
|
721
|
+
references: {
|
|
722
|
+
NameProvider: LikeC4NameProvider;
|
|
723
|
+
ScopeComputation: LikeC4ScopeComputation;
|
|
724
|
+
ScopeProvider: LikeC4ScopeProvider;
|
|
725
|
+
};
|
|
726
|
+
shared?: LikeC4SharedServices;
|
|
727
|
+
parser: {
|
|
728
|
+
ValueConverter: LikeC4ValueConverter;
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
type LikeC4Services = LangiumServices & LikeC4AddedServices;
|
|
732
|
+
/**
|
|
733
|
+
* Most probably you don't need to use this function directly.
|
|
734
|
+
* Use {@link createLanguageServices} instead.
|
|
735
|
+
* @internal
|
|
736
|
+
*/
|
|
737
|
+
declare function createLikeC4Module(context: LikeC4MCPServerModuleContext): Module<LikeC4Services, PartialLangiumServices & LikeC4AddedServices>;
|
|
738
|
+
/**
|
|
739
|
+
* Create and initialize likec4 language services with the given context
|
|
740
|
+
* @example
|
|
741
|
+
* ```ts
|
|
742
|
+
* const { shared, likec4 } = createLanguageServices({
|
|
743
|
+
* ...WithFileSystem(enableWatcher = true),
|
|
744
|
+
* ...WithLikeC4ManualLayouts(),
|
|
745
|
+
* ...NoMcpServer(),
|
|
746
|
+
* });
|
|
747
|
+
* ```
|
|
748
|
+
*
|
|
749
|
+
* It is possible to extend/override the context with additional modules
|
|
750
|
+
* See Langium documentation for more details (or at the CliContext in packages/likec4/src/language/module.ts).
|
|
751
|
+
*/
|
|
752
|
+
declare function createLanguageServices(context: Partial<LanguageServicesContext>): {
|
|
753
|
+
shared: LikeC4SharedServices;
|
|
754
|
+
likec4: LikeC4Services;
|
|
755
|
+
};
|
|
756
|
+
declare function createLanguageServices(context: Partial<LanguageServicesContext>): {
|
|
757
|
+
shared: LikeC4SharedServices;
|
|
758
|
+
likec4: LikeC4Services;
|
|
759
|
+
};
|
|
760
|
+
declare function createLanguageServices<I1, I extends I1 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1> | undefined): {
|
|
761
|
+
shared: LikeC4SharedServices;
|
|
762
|
+
likec4: I;
|
|
763
|
+
};
|
|
764
|
+
declare function createLanguageServices<I1, I2, I extends I1 & I2 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1>, module2: Module<I, I2>): {
|
|
765
|
+
shared: LikeC4SharedServices;
|
|
766
|
+
likec4: I;
|
|
767
|
+
};
|
|
768
|
+
declare function createLanguageServices<I1, I2, I3, I extends I1 & I2 & I3 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1>, module2: Module<I, I2>, module3: Module<I, I3>): {
|
|
769
|
+
shared: LikeC4SharedServices;
|
|
770
|
+
likec4: I;
|
|
771
|
+
};
|
|
772
|
+
/**
|
|
773
|
+
* Most probably you don't need to use this function directly.
|
|
774
|
+
* Use {@link createLanguageServices} instead.
|
|
775
|
+
* @internal
|
|
776
|
+
*/
|
|
777
|
+
declare function createSharedServices(context?: Partial<LanguageServicesContext>): LikeC4SharedServices;
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region src/validation/DocumentValidator.d.ts
|
|
780
|
+
declare class LikeC4DocumentValidator extends DefaultDocumentValidator {
|
|
781
|
+
protected services: LikeC4Services;
|
|
782
|
+
constructor(services: LikeC4Services);
|
|
783
|
+
/**
|
|
784
|
+
* If the document is excluded, then we skip validation and return an empty array of diagnostics.
|
|
785
|
+
*/
|
|
786
|
+
validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: Cancellation.CancellationToken): Promise<Diagnostic[]>;
|
|
787
|
+
}
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region src/validation/index.d.ts
|
|
790
|
+
type Guard<N extends AstNode> = (n: AstNode) => n is N;
|
|
791
|
+
type Guarded<G> = G extends Guard<infer N> ? N : never;
|
|
792
|
+
declare const isValidatableAstNode: (n: AstNode) => n is DeploymentView | DynamicView | ElementView | Element | DeployedInstance | DeploymentNode | ImportsFromPoject | Imported | Globals | GlobalPredicateGroup | GlobalDynamicPredicateGroup | GlobalStyle | GlobalStyleGroup | FqnExprWith | DeploymentViewRulePredicate | DynamicViewIncludePredicate | ViewRulePredicate | ViewRuleGroup | RelationExprWith | ElementKindExpression | ElementTagExpression | FqnRefExpr | WildcardExpression | DirectedRelationExpr | FqnExprWhere | IncomingRelationExpr | OutgoingRelationExpr | RelationExprWhere | DeploymentViewRuleStyle | ViewRuleRank | ViewRuleStyle | InOutRelationExpr | DynamicViewParallelSteps | DynamicStepChain | DynamicStepSingle | ViewRuleAutoLayout | LinkProperty | ViewStringProperty | SpecificationDeploymentNodeKind | SpecificationElementKind | ExtendDeployment | DeploymentRelation | ExtendElement | ExtendRelation | Relation | SpecificationRule | BorderProperty | ColorProperty | IconColorProperty | IconPositionProperty | IconProperty | IconSizeProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty | ElementStyleProperty | SpecificationRelationshipKind | Tags | ViewRuleGlobalPredicateRef | ViewRuleGlobalStyle | DynamicViewGlobalPredicateRef | ArrowProperty | LineProperty | DynamicViewDisplayVariantProperty | MetadataBody | ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | NavigateToProperty | ElementRef | SpecificationTag | SpecificationColor | HexColor | RGBAColor;
|
|
793
|
+
type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
|
|
794
|
+
declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
|
|
795
|
+
isValid: (n: ValidatableAstNode) => boolean;
|
|
796
|
+
invalidNodes: WeakSet<WeakKey>;
|
|
797
|
+
};
|
|
798
|
+
type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
|
|
799
|
+
type IsValidFn = ChecksFromDiagnostics['isValid'];
|
|
800
|
+
//#endregion
|
|
801
|
+
//#region src/ast.d.ts
|
|
802
|
+
declare module 'langium' {
|
|
803
|
+
interface LangiumDocument {
|
|
804
|
+
likec4ProjectId?: c4.ProjectId;
|
|
805
|
+
}
|
|
806
|
+
interface AstNodeDescription {
|
|
807
|
+
likec4ProjectId?: c4.ProjectId;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
declare const idattr: unique symbol;
|
|
811
|
+
declare module './generated/ast' {
|
|
812
|
+
interface Element {
|
|
813
|
+
[idattr]?: c4.Fqn | undefined;
|
|
814
|
+
}
|
|
815
|
+
interface ElementView {
|
|
816
|
+
[idattr]?: c4.ViewId | undefined;
|
|
817
|
+
}
|
|
818
|
+
interface DynamicView {
|
|
819
|
+
[idattr]?: c4.ViewId | undefined;
|
|
820
|
+
}
|
|
821
|
+
interface DeploymentView {
|
|
822
|
+
[idattr]?: c4.ViewId | undefined;
|
|
823
|
+
}
|
|
824
|
+
interface DeploymentNode {
|
|
825
|
+
[idattr]?: c4.Fqn | undefined;
|
|
826
|
+
}
|
|
827
|
+
interface DeployedInstance {
|
|
828
|
+
[idattr]?: c4.Fqn | undefined;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
type ParsedElementStyle = {
|
|
832
|
+
shape?: c4.ElementShape;
|
|
833
|
+
icon?: c4.IconUrl;
|
|
834
|
+
iconColor?: c4.Color;
|
|
835
|
+
iconSize?: c4.ShapeSize;
|
|
836
|
+
iconPosition?: c4.IconPosition;
|
|
837
|
+
color?: c4.Color;
|
|
838
|
+
border?: c4.BorderStyle;
|
|
839
|
+
opacity?: number;
|
|
840
|
+
multiple?: boolean;
|
|
841
|
+
size?: c4.ShapeSize;
|
|
842
|
+
padding?: c4.SpacingSize;
|
|
843
|
+
textSize?: c4.TextSize;
|
|
844
|
+
};
|
|
845
|
+
interface ParsedAstSpecification {
|
|
846
|
+
tags: Record<c4.Tag, {
|
|
847
|
+
astPath: string;
|
|
848
|
+
color?: c4.ColorLiteral;
|
|
849
|
+
}>;
|
|
850
|
+
elements: Record<c4.ElementKind, c4.ElementSpecification>;
|
|
851
|
+
relationships: Record<c4.RelationshipKind, {
|
|
852
|
+
technology?: string;
|
|
853
|
+
notation?: string;
|
|
854
|
+
color?: c4.Color;
|
|
855
|
+
line?: c4.RelationshipLineType;
|
|
856
|
+
head?: c4.RelationshipArrowType;
|
|
857
|
+
tail?: c4.RelationshipArrowType;
|
|
858
|
+
}>;
|
|
859
|
+
colors: Record<c4.CustomColor, {
|
|
860
|
+
color: c4.ColorLiteral;
|
|
861
|
+
}>;
|
|
862
|
+
deployments: Record<c4.DeploymentKind, c4.ElementSpecification>;
|
|
863
|
+
}
|
|
864
|
+
interface ParsedAstElement {
|
|
865
|
+
id: c4.Fqn;
|
|
866
|
+
astPath: string;
|
|
867
|
+
kind: c4.ElementKind;
|
|
868
|
+
title: string;
|
|
869
|
+
summary?: c4.MarkdownOrString;
|
|
870
|
+
description?: c4.MarkdownOrString;
|
|
871
|
+
technology?: string;
|
|
872
|
+
tags?: c4.NonEmptyArray<c4.Tag>;
|
|
873
|
+
links?: c4.NonEmptyArray<c4.Link>;
|
|
874
|
+
style: ParsedElementStyle;
|
|
875
|
+
metadata?: {
|
|
876
|
+
[key: string]: string | string[];
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
interface ParsedAstExtend {
|
|
880
|
+
id: c4.Fqn;
|
|
881
|
+
astPath: string;
|
|
882
|
+
tags?: c4.NonEmptyArray<c4.Tag> | null;
|
|
883
|
+
links?: c4.NonEmptyArray<c4.Link> | null;
|
|
884
|
+
metadata?: {
|
|
885
|
+
[key: string]: string | string[];
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
interface ParsedAstExtendRelation {
|
|
889
|
+
id: c4.RelationId;
|
|
890
|
+
astPath: string;
|
|
891
|
+
tags?: c4.NonEmptyArray<c4.Tag> | null;
|
|
892
|
+
links?: c4.NonEmptyArray<c4.Link> | null;
|
|
893
|
+
metadata?: {
|
|
894
|
+
[key: string]: string | string[];
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
interface ParsedAstRelation {
|
|
898
|
+
id: c4.RelationId;
|
|
899
|
+
astPath: string;
|
|
900
|
+
source: c4.FqnRef.ModelRef;
|
|
901
|
+
target: c4.FqnRef.ModelRef;
|
|
902
|
+
kind?: c4.RelationshipKind;
|
|
903
|
+
tags?: c4.NonEmptyArray<c4.Tag>;
|
|
904
|
+
title: string;
|
|
905
|
+
description?: c4.MarkdownOrString;
|
|
906
|
+
technology?: string;
|
|
907
|
+
color?: c4.Color;
|
|
908
|
+
line?: c4.RelationshipLineType;
|
|
909
|
+
head?: c4.RelationshipArrowType;
|
|
910
|
+
tail?: c4.RelationshipArrowType;
|
|
911
|
+
links?: c4.NonEmptyArray<c4.Link>;
|
|
912
|
+
navigateTo?: c4.ViewId;
|
|
913
|
+
metadata?: {
|
|
914
|
+
[key: string]: string | string[];
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
type ParsedAstDeployment = Simplify<MergeExclusive<ParsedAstDeployment.Node, ParsedAstDeployment.Instance>>;
|
|
918
|
+
declare namespace ParsedAstDeployment {
|
|
919
|
+
type Node = c4.DeploymentNode;
|
|
920
|
+
type Instance = Omit<c4.DeployedInstance, 'element'> & {
|
|
921
|
+
readonly element: c4.FqnRef.ModelRef;
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
type ParsedAstDeploymentRelation = c4.DeploymentRelationship & {
|
|
925
|
+
astPath: string;
|
|
926
|
+
};
|
|
927
|
+
type ParsedAstGlobals = Writable<c4.ModelGlobals>;
|
|
928
|
+
interface ParsedAstElementView {
|
|
929
|
+
id: c4.ViewId;
|
|
930
|
+
viewOf?: c4.Fqn;
|
|
931
|
+
extends?: c4.ViewId;
|
|
932
|
+
astPath: string;
|
|
933
|
+
title: string | null;
|
|
934
|
+
description: c4.MarkdownOrString | null;
|
|
935
|
+
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
936
|
+
links: c4.NonEmptyArray<c4.Link> | null;
|
|
937
|
+
rules: c4.ElementViewRule[];
|
|
938
|
+
manualLayout?: c4.ViewManualLayout;
|
|
939
|
+
}
|
|
940
|
+
interface ParsedAstDynamicView {
|
|
941
|
+
id: c4.ViewId;
|
|
942
|
+
astPath: string;
|
|
943
|
+
title: string | null;
|
|
944
|
+
description: c4.MarkdownOrString | null;
|
|
945
|
+
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
946
|
+
links: c4.NonEmptyArray<c4.Link> | null;
|
|
947
|
+
steps: c4.DynamicViewStep[];
|
|
948
|
+
rules: Array<c4.DynamicViewRule>;
|
|
949
|
+
variant: c4.DynamicViewDisplayVariant | undefined;
|
|
950
|
+
manualLayout?: c4.ViewManualLayout;
|
|
951
|
+
}
|
|
952
|
+
interface ParsedAstDeploymentView {
|
|
953
|
+
id: c4.ViewId;
|
|
954
|
+
astPath: string;
|
|
955
|
+
title: string | null;
|
|
956
|
+
description: c4.MarkdownOrString | null;
|
|
957
|
+
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
958
|
+
links: c4.NonEmptyArray<c4.Link> | null;
|
|
959
|
+
rules: Array<c4.DeploymentViewRule>;
|
|
960
|
+
manualLayout?: c4.ViewManualLayout;
|
|
961
|
+
}
|
|
962
|
+
type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
|
|
963
|
+
declare const ViewOps: {
|
|
964
|
+
writeId<T extends LikeC4View>(node: T, id: c4.ViewId): T;
|
|
965
|
+
readId(node: LikeC4View): c4.ViewId | undefined;
|
|
966
|
+
};
|
|
967
|
+
declare const ElementOps: {
|
|
968
|
+
writeId(node: Element | DeploymentElement, id: c4.Fqn | null): Element | DeploymentElement;
|
|
969
|
+
readId(node: Element | DeploymentElement): any;
|
|
970
|
+
};
|
|
971
|
+
interface AstNodeDescriptionWithFqn extends AstNodeDescription {
|
|
972
|
+
likec4ProjectId: c4.ProjectId;
|
|
973
|
+
id: c4.Fqn;
|
|
974
|
+
}
|
|
975
|
+
type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
|
|
976
|
+
type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
|
|
977
|
+
interface LikeC4DocumentProps {
|
|
978
|
+
diagnostics?: Array<LikeC4DocumentDiagnostic>;
|
|
979
|
+
c4Specification?: ParsedAstSpecification;
|
|
980
|
+
c4Elements?: ParsedAstElement[];
|
|
981
|
+
c4ExtendElements?: ParsedAstExtend[];
|
|
982
|
+
c4ExtendDeployments?: ParsedAstExtend[];
|
|
983
|
+
c4ExtendRelations?: ParsedAstExtendRelation[];
|
|
984
|
+
c4Relations?: ParsedAstRelation[];
|
|
985
|
+
c4Globals?: ParsedAstGlobals;
|
|
986
|
+
c4Views?: ParsedAstView[];
|
|
987
|
+
c4Deployments?: ParsedAstDeployment[];
|
|
988
|
+
c4DeploymentRelations?: ParsedAstDeploymentRelation[];
|
|
989
|
+
c4Imports?: MultiMap$1<c4.ProjectId, c4.Fqn, Set<c4.Fqn>>;
|
|
990
|
+
}
|
|
991
|
+
type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
|
|
992
|
+
interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
|
|
993
|
+
likec4ProjectId: c4.ProjectId;
|
|
994
|
+
}
|
|
995
|
+
interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
|
|
996
|
+
likec4ProjectId: c4.ProjectId;
|
|
997
|
+
}
|
|
998
|
+
declare function isLikeC4LangiumDocument(doc: LangiumDocument): doc is LikeC4LangiumDocument;
|
|
999
|
+
declare function isParsedLikeC4LangiumDocument(doc: LangiumDocument): doc is ParsedLikeC4LangiumDocument;
|
|
1000
|
+
declare function parseMarkdownAsString(node?: MarkdownOrString): string | undefined;
|
|
1001
|
+
declare function parseAstPercent(value: string): number;
|
|
1002
|
+
declare function parseAstOpacityProperty({
|
|
1003
|
+
value
|
|
1004
|
+
}: OpacityProperty): number;
|
|
1005
|
+
declare function parseAstSizeValue({
|
|
1006
|
+
value
|
|
1007
|
+
}: {
|
|
1008
|
+
value: SizeValue;
|
|
1009
|
+
}): 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1010
|
+
declare function parseAstIconPositionValue({
|
|
1011
|
+
value
|
|
1012
|
+
}: {
|
|
1013
|
+
value: IconPositionValue;
|
|
1014
|
+
}): c4.IconPosition;
|
|
1015
|
+
declare function toRelationshipStyle(props: RelationshipStyleProperty[] | undefined, isValid: IsValidFn): {
|
|
1016
|
+
color?: c4.Color;
|
|
1017
|
+
line?: c4.RelationshipLineType;
|
|
1018
|
+
head?: c4.RelationshipArrowType;
|
|
1019
|
+
tail?: c4.RelationshipArrowType;
|
|
1020
|
+
};
|
|
1021
|
+
declare function toColor(astNode: ColorProperty | IconColorProperty): c4.Color | undefined;
|
|
1022
|
+
declare function toAutoLayout(rule: ViewRuleAutoLayout): c4.ViewRuleAutoLayout;
|
|
1023
|
+
declare function toAstViewLayoutDirection(c4: c4.ViewRuleAutoLayout['direction']): ViewLayoutDirection;
|
|
1024
|
+
declare function getViewRulePredicateContainer<T extends AstNode>(el: T): ViewRulePredicate | DeploymentViewRulePredicate | DynamicViewIncludePredicate | undefined;
|
|
1025
|
+
declare function isFqnRefInsideGlobals(astNode: AstNode): boolean;
|
|
1026
|
+
declare function isFqnRefInsideModel(astNode: AstNode): boolean;
|
|
1027
|
+
declare function isFqnRefInsideDeployment(astNode: AstNode): boolean;
|
|
1028
|
+
//#endregion
|
|
1029
|
+
//#region src/model/fqn-index.d.ts
|
|
1030
|
+
declare class FqnIndex<AstNd = Element> extends ADisposable {
|
|
1031
|
+
protected services: LikeC4Services;
|
|
1032
|
+
protected projects: ProjectsManager;
|
|
1033
|
+
protected langiumDocuments: LangiumDocuments;
|
|
1034
|
+
protected documentCache: DefaultWeakMap<LikeC4LangiumDocument, DocumentFqnIndex>;
|
|
1035
|
+
protected workspaceCache: WorkspaceCache<string, AstNodeDescriptionWithFqn[]>;
|
|
1036
|
+
constructor(services: LikeC4Services);
|
|
1037
|
+
private documents;
|
|
1038
|
+
get(document: LikeC4LangiumDocument): DocumentFqnIndex;
|
|
1039
|
+
resolve(reference: Referenceable): Fqn$1;
|
|
1040
|
+
getFqn(el: AstNd): Fqn$1;
|
|
1041
|
+
byFqn(projectId: ProjectId$1, fqn: Fqn$1): Stream<AstNodeDescriptionWithFqn>;
|
|
1042
|
+
rootElements(projectId: ProjectId$1): Stream<AstNodeDescriptionWithFqn>;
|
|
1043
|
+
directChildrenOf(projectId: ProjectId$1, parent: Fqn$1): Stream<AstNodeDescriptionWithFqn>;
|
|
1044
|
+
/**
|
|
1045
|
+
* Returns descedant elements with unique names in the scope
|
|
1046
|
+
*/
|
|
1047
|
+
uniqueDescedants(projectId: ProjectId$1, parent: Fqn$1): Stream<AstNodeDescriptionWithFqn>;
|
|
1048
|
+
protected createDocumentIndex(document: LikeC4LangiumDocument): DocumentFqnIndex;
|
|
1049
|
+
}
|
|
1050
|
+
declare class DocumentFqnIndex {
|
|
1051
|
+
private _rootElements;
|
|
1052
|
+
/**
|
|
1053
|
+
* direct children of elements
|
|
1054
|
+
*/
|
|
1055
|
+
private _children;
|
|
1056
|
+
/**
|
|
1057
|
+
* All descendants of an element (unique by name)
|
|
1058
|
+
*/
|
|
1059
|
+
private _descendants;
|
|
1060
|
+
/**
|
|
1061
|
+
* All elements by FQN
|
|
1062
|
+
*/
|
|
1063
|
+
private _byfqn;
|
|
1064
|
+
readonly projectId: ProjectId$1;
|
|
1065
|
+
static readonly EMPTY: DocumentFqnIndex;
|
|
1066
|
+
constructor(_rootElements: Array<AstNodeDescriptionWithFqn>,
|
|
1067
|
+
/**
|
|
1068
|
+
* direct children of elements
|
|
1069
|
+
*/
|
|
1070
|
+
|
|
1071
|
+
_children: MultiMap$1<Fqn$1, AstNodeDescriptionWithFqn>,
|
|
1072
|
+
/**
|
|
1073
|
+
* All descendants of an element (unique by name)
|
|
1074
|
+
*/
|
|
1075
|
+
|
|
1076
|
+
_descendants: MultiMap$1<Fqn$1, AstNodeDescriptionWithFqn>,
|
|
1077
|
+
/**
|
|
1078
|
+
* All elements by FQN
|
|
1079
|
+
*/
|
|
1080
|
+
|
|
1081
|
+
_byfqn: MultiMap$1<Fqn$1, AstNodeDescriptionWithFqn>, projectId: ProjectId$1);
|
|
1082
|
+
rootElements(): readonly AstNodeDescriptionWithFqn[];
|
|
1083
|
+
byFqn(fqn: Fqn$1): readonly AstNodeDescriptionWithFqn[];
|
|
1084
|
+
children(parent: Fqn$1): readonly AstNodeDescriptionWithFqn[];
|
|
1085
|
+
descendants(nodeName: Fqn$1): readonly AstNodeDescriptionWithFqn[];
|
|
1086
|
+
}
|
|
1087
|
+
//#endregion
|
|
1088
|
+
//#region src/model/deployments-index.d.ts
|
|
1089
|
+
declare class DeploymentsIndex extends FqnIndex<DeploymentElement> {
|
|
1090
|
+
protected services: LikeC4Services;
|
|
1091
|
+
protected Names: LikeC4NameProvider;
|
|
1092
|
+
constructor(services: LikeC4Services);
|
|
1093
|
+
protected createDocumentIndex(document: LikeC4LangiumDocument): DocumentFqnIndex;
|
|
1094
|
+
}
|
|
1095
|
+
//#endregion
|
|
1096
|
+
//#region src/model/model-builder.d.ts
|
|
1097
|
+
type ModelParsedListener = (docs: URI[]) => void;
|
|
1098
|
+
interface LikeC4ModelBuilder extends Disposable {
|
|
1099
|
+
parseModel(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownParsed> | null>;
|
|
1100
|
+
unsafeSyncComputeModel(projectId: ProjectId): LikeC4Model<UnknownComputed>;
|
|
1101
|
+
computeModel(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownComputed>>;
|
|
1102
|
+
onModelParsed(callback: ModelParsedListener): Disposable;
|
|
1103
|
+
clearCache(): void;
|
|
1104
|
+
}
|
|
1105
|
+
//#endregion
|
|
1106
|
+
//#region src/model/model-locator.d.ts
|
|
1107
|
+
type ViewLocateResult = {
|
|
1108
|
+
doc: ParsedLikeC4LangiumDocument;
|
|
1109
|
+
view: ParsedAstView;
|
|
1110
|
+
viewAst: LikeC4View;
|
|
1111
|
+
};
|
|
1112
|
+
declare class LikeC4ModelLocator {
|
|
1113
|
+
private services;
|
|
1114
|
+
private fqnIndex;
|
|
1115
|
+
private deploymentsIndex;
|
|
1116
|
+
private langiumDocuments;
|
|
1117
|
+
private parser;
|
|
1118
|
+
private projects;
|
|
1119
|
+
constructor(services: LikeC4Services);
|
|
1120
|
+
private documents;
|
|
1121
|
+
getParsedElement(...args: [Element] | [c4.Fqn] | [c4.Fqn, c4.ProjectId]): ParsedAstElement | null;
|
|
1122
|
+
locateElement(fqn: c4.Fqn, projectId?: c4.ProjectId | undefined): Location | null;
|
|
1123
|
+
locateDeploymentElement(deploymentFqn: c4.DeploymentFqn, projectId?: c4.ProjectId | undefined): Location | null;
|
|
1124
|
+
locateRelation(relationId: c4.RelationId, projectId?: c4.ProjectId): Location | null;
|
|
1125
|
+
locateViewAst(viewId: c4.ViewId, projectId?: c4.ProjectId | undefined): null | ViewLocateResult;
|
|
1126
|
+
locateView(viewId: c4.ViewId, projectId?: c4.ProjectId): Location | null;
|
|
1127
|
+
locateDocumentTags(documentUri: URI$2, cancelToken?: Cancellation.CancellationToken): Promise<Array<{
|
|
1128
|
+
name: string;
|
|
1129
|
+
color: string;
|
|
1130
|
+
range: Range;
|
|
1131
|
+
isSpecification: boolean;
|
|
1132
|
+
}>>;
|
|
1133
|
+
locateDynamicViewStep(params: {
|
|
1134
|
+
view: c4.ViewId;
|
|
1135
|
+
astPath: string;
|
|
1136
|
+
projectId?: c4.ProjectId | undefined;
|
|
1137
|
+
}): Location | null;
|
|
1138
|
+
}
|
|
1139
|
+
//#endregion
|
|
1140
|
+
//#region src/filesystem/LikeC4FileSystem.d.ts
|
|
1141
|
+
declare const WithFileSystem: (ehableWatcher?: boolean) => FileSystemModuleContext;
|
|
1142
|
+
//#endregion
|
|
1143
|
+
//#region src/filesystem/LikeC4ManualLayouts.d.ts
|
|
1144
|
+
declare const WithLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
|
|
1145
|
+
//#endregion
|
|
1146
|
+
//#region src/mcp/server/WithMCPServer.d.ts
|
|
1147
|
+
declare function WithMCPServer(type?: 'stdio' | 'sse' | {
|
|
1148
|
+
port: number;
|
|
1149
|
+
}): LikeC4MCPServerModuleContext;
|
|
1150
|
+
//#endregion
|
|
1151
|
+
//#region src/index.d.ts
|
|
1152
|
+
type StartLanguageServerOptions = {
|
|
1153
|
+
/**
|
|
1154
|
+
* The Language Server Protocol connection to use.
|
|
1155
|
+
*/
|
|
1156
|
+
connection?: Connection;
|
|
1157
|
+
/**
|
|
1158
|
+
* Whether to enable the file system watcher.
|
|
1159
|
+
* @default true
|
|
1160
|
+
*/
|
|
1161
|
+
enableWatcher?: boolean;
|
|
1162
|
+
/**
|
|
1163
|
+
* @default true
|
|
1164
|
+
*/
|
|
1165
|
+
enableTelemetry?: boolean;
|
|
1166
|
+
/**
|
|
1167
|
+
* Whether to enable the MCP server.
|
|
1168
|
+
* @default 'sse'
|
|
1169
|
+
*/
|
|
1170
|
+
enableMCP?: false | 'stdio' | 'sse' | {
|
|
1171
|
+
port: number;
|
|
1172
|
+
};
|
|
1173
|
+
/**
|
|
1174
|
+
* Whether to enable manual layouts, stored in json5 files.
|
|
1175
|
+
* @default true
|
|
1176
|
+
*/
|
|
1177
|
+
enableManualLayouts?: boolean;
|
|
1178
|
+
};
|
|
1179
|
+
declare function startLanguageServer$1(options?: StartLanguageServerOptions): {
|
|
1180
|
+
shared: LikeC4SharedServices;
|
|
1181
|
+
likec4: LikeC4Services;
|
|
1182
|
+
};
|
|
1183
|
+
//#endregion
|
|
1184
|
+
//#region src/model/parser/Base.d.ts
|
|
1185
|
+
declare class BaseParser {
|
|
1186
|
+
readonly services: LikeC4Services;
|
|
1187
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1188
|
+
isValid: IsValidFn;
|
|
1189
|
+
constructor(services: LikeC4Services, doc: ParsedLikeC4LangiumDocument);
|
|
1190
|
+
get project(): Project;
|
|
1191
|
+
resolveFqn(node: FqnReferenceable): c4.Fqn;
|
|
1192
|
+
getAstNodePath(node: AstNode): string;
|
|
1193
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1194
|
+
[key: string]: string | string[];
|
|
1195
|
+
} | undefined;
|
|
1196
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): c4.MarkdownOrString | undefined;
|
|
1197
|
+
convertTags<E extends {
|
|
1198
|
+
tags?: Tags;
|
|
1199
|
+
}>(withTags?: E): any;
|
|
1200
|
+
parseTags<E extends {
|
|
1201
|
+
tags?: Tags;
|
|
1202
|
+
}>(withTags?: E): c4.NonEmptyArray<c4.Tag> | null;
|
|
1203
|
+
convertLinks(source?: LinkProperty['$container']): c4.Link[] | undefined;
|
|
1204
|
+
parseLinks(source?: LinkProperty['$container']): c4.Link[] | undefined;
|
|
1205
|
+
parseIconProperty(prop: IconProperty | undefined): c4.IconUrl | undefined;
|
|
1206
|
+
parseImageAlias(value: string): string | undefined;
|
|
1207
|
+
parseColorLiteral(astNode: ColorLiteral): c4.ColorLiteral | undefined;
|
|
1208
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1209
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1210
|
+
/**
|
|
1211
|
+
* Parse base properties: title, description and technology
|
|
1212
|
+
*
|
|
1213
|
+
* @param props - body properties (inside '{...}')
|
|
1214
|
+
* @param override - optional, inline properties (right on the node)
|
|
1215
|
+
* have higher priority and override body properties
|
|
1216
|
+
*/
|
|
1217
|
+
parseBaseProps(props: {
|
|
1218
|
+
title?: MarkdownOrString | undefined;
|
|
1219
|
+
summary?: MarkdownOrString | undefined;
|
|
1220
|
+
description?: MarkdownOrString | undefined;
|
|
1221
|
+
technology?: MarkdownOrString | undefined;
|
|
1222
|
+
}, override?: {
|
|
1223
|
+
title?: string | undefined;
|
|
1224
|
+
summary?: string | undefined;
|
|
1225
|
+
description?: string | undefined;
|
|
1226
|
+
technology?: string | undefined;
|
|
1227
|
+
}): {
|
|
1228
|
+
title?: string;
|
|
1229
|
+
summary?: c4.MarkdownOrString;
|
|
1230
|
+
description?: c4.MarkdownOrString;
|
|
1231
|
+
technology?: string;
|
|
1232
|
+
};
|
|
1233
|
+
}
|
|
1234
|
+
//#endregion
|
|
1235
|
+
//#region src/model/model-parser.d.ts
|
|
1236
|
+
declare const DocumentParserFromMixins: {
|
|
1237
|
+
new (...args: any[]): {
|
|
1238
|
+
parseGlobals(): void;
|
|
1239
|
+
parseAndStoreGlobalPredicateGroupOrDynamic(astRule: GlobalPredicateGroup | GlobalDynamicPredicateGroup, id: ProjectId, c4Globals: ParsedAstGlobals): void;
|
|
1240
|
+
parseGlobalPredicateGroup(astRule: GlobalPredicateGroup): ProjectId[];
|
|
1241
|
+
parseGlobalDynamicPredicateGroup(astRule: GlobalDynamicPredicateGroup): ProjectId[];
|
|
1242
|
+
parseGlobalStyleOrGroup(astRule: GlobalStyle | GlobalStyleGroup): ProjectId[];
|
|
1243
|
+
parseViews(): void;
|
|
1244
|
+
parseElementView(astNode: ElementView, additionalStyles: any[]): ParsedAstElementView;
|
|
1245
|
+
parseElementViewRule(astRule: ViewRule): ProjectId;
|
|
1246
|
+
parseViewRulePredicate(astNode: ViewRulePredicate): ProjectId;
|
|
1247
|
+
parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): ProjectId;
|
|
1248
|
+
parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): any;
|
|
1249
|
+
parseViewRuleGroup(astNode: ViewRuleGroup): ProjectId;
|
|
1250
|
+
parseViewRuleRank(astRule: ViewRuleRank): ProjectId;
|
|
1251
|
+
parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): ProjectId;
|
|
1252
|
+
parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): ProjectId;
|
|
1253
|
+
parseDynamicElementView(astNode: DynamicView, additionalStyles: any[]): ParsedAstDynamicView;
|
|
1254
|
+
parseDynamicViewRule(astRule: DynamicViewRule): ProjectId;
|
|
1255
|
+
parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId;
|
|
1256
|
+
parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId;
|
|
1257
|
+
parseDynamicStep(node: DynamicViewStep): ProjectId | ProjectId;
|
|
1258
|
+
recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
|
|
1259
|
+
parseDynamicStepSingle(node: DynamicStepSingle): ProjectId;
|
|
1260
|
+
parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId, "source", {
|
|
1261
|
+
requireExactProps: true;
|
|
1262
|
+
}>>;
|
|
1263
|
+
parsePredicate(astNode: ExpressionV2): ProjectId;
|
|
1264
|
+
parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
|
|
1265
|
+
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1266
|
+
parseElementExpression(astNode: FqnExpr$2): ProjectId;
|
|
1267
|
+
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId;
|
|
1268
|
+
parseElementPredicateWith(astNode: FqnExprWith): ProjectId;
|
|
1269
|
+
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId;
|
|
1270
|
+
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1271
|
+
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId;
|
|
1272
|
+
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId;
|
|
1273
|
+
parseRelationExpression(astNode: RelationExpr$1): ProjectId;
|
|
1274
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
1275
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
1276
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
1277
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
1278
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1279
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
1280
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
1281
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
1282
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
1283
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
1284
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
1285
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
1286
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1287
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
1288
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
1289
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
1290
|
+
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
1291
|
+
isValid: IsValidFn;
|
|
1292
|
+
readonly services: LikeC4Services;
|
|
1293
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1294
|
+
get project(): Project;
|
|
1295
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1296
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1297
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1298
|
+
[key: string]: string | string[];
|
|
1299
|
+
} | undefined;
|
|
1300
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1301
|
+
convertTags<E extends {
|
|
1302
|
+
tags?: Tags;
|
|
1303
|
+
}>(withTags?: E | undefined): any;
|
|
1304
|
+
parseTags<E extends {
|
|
1305
|
+
tags?: Tags;
|
|
1306
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1307
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1308
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1309
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1310
|
+
parseImageAlias(value: string): string | undefined;
|
|
1311
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1312
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1313
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1314
|
+
parseBaseProps(props: {
|
|
1315
|
+
title?: MarkdownOrString | undefined;
|
|
1316
|
+
summary?: MarkdownOrString | undefined;
|
|
1317
|
+
description?: MarkdownOrString | undefined;
|
|
1318
|
+
technology?: MarkdownOrString | undefined;
|
|
1319
|
+
}, override?: {
|
|
1320
|
+
title?: string | undefined;
|
|
1321
|
+
summary?: string | undefined;
|
|
1322
|
+
description?: string | undefined;
|
|
1323
|
+
technology?: string | undefined;
|
|
1324
|
+
}): {
|
|
1325
|
+
title?: string;
|
|
1326
|
+
summary?: ProjectId;
|
|
1327
|
+
description?: ProjectId;
|
|
1328
|
+
technology?: string;
|
|
1329
|
+
};
|
|
1330
|
+
parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
|
|
1331
|
+
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId;
|
|
1332
|
+
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId;
|
|
1333
|
+
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId;
|
|
1334
|
+
parseDeployment(): void;
|
|
1335
|
+
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
1336
|
+
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
1337
|
+
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
1338
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
1339
|
+
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
1340
|
+
};
|
|
1341
|
+
} & {
|
|
1342
|
+
new (...args: any[]): {
|
|
1343
|
+
parseViews(): void;
|
|
1344
|
+
parseElementView(astNode: ElementView, additionalStyles: any[]): ParsedAstElementView;
|
|
1345
|
+
parseElementViewRule(astRule: ViewRule): ProjectId;
|
|
1346
|
+
parseViewRulePredicate(astNode: ViewRulePredicate): ProjectId;
|
|
1347
|
+
parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): ProjectId;
|
|
1348
|
+
parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): any;
|
|
1349
|
+
parseViewRuleGroup(astNode: ViewRuleGroup): ProjectId;
|
|
1350
|
+
parseViewRuleRank(astRule: ViewRuleRank): ProjectId;
|
|
1351
|
+
parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): ProjectId;
|
|
1352
|
+
parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): ProjectId;
|
|
1353
|
+
parseDynamicElementView(astNode: DynamicView, additionalStyles: any[]): ParsedAstDynamicView;
|
|
1354
|
+
parseDynamicViewRule(astRule: DynamicViewRule): ProjectId;
|
|
1355
|
+
parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId;
|
|
1356
|
+
parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId;
|
|
1357
|
+
parseDynamicStep(node: DynamicViewStep): ProjectId | ProjectId;
|
|
1358
|
+
recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
|
|
1359
|
+
parseDynamicStepSingle(node: DynamicStepSingle): ProjectId;
|
|
1360
|
+
parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId, "source", {
|
|
1361
|
+
requireExactProps: true;
|
|
1362
|
+
}>>;
|
|
1363
|
+
parsePredicate(astNode: ExpressionV2): ProjectId;
|
|
1364
|
+
parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
|
|
1365
|
+
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1366
|
+
parseElementExpression(astNode: FqnExpr$2): ProjectId;
|
|
1367
|
+
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId;
|
|
1368
|
+
parseElementPredicateWith(astNode: FqnExprWith): ProjectId;
|
|
1369
|
+
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId;
|
|
1370
|
+
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1371
|
+
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId;
|
|
1372
|
+
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId;
|
|
1373
|
+
parseRelationExpression(astNode: RelationExpr$1): ProjectId;
|
|
1374
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
1375
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
1376
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
1377
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
1378
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1379
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
1380
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
1381
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
1382
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
1383
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
1384
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
1385
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
1386
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1387
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
1388
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
1389
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
1390
|
+
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
1391
|
+
isValid: IsValidFn;
|
|
1392
|
+
readonly services: LikeC4Services;
|
|
1393
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1394
|
+
get project(): Project;
|
|
1395
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1396
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1397
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1398
|
+
[key: string]: string | string[];
|
|
1399
|
+
} | undefined;
|
|
1400
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1401
|
+
convertTags<E extends {
|
|
1402
|
+
tags?: Tags;
|
|
1403
|
+
}>(withTags?: E | undefined): any;
|
|
1404
|
+
parseTags<E extends {
|
|
1405
|
+
tags?: Tags;
|
|
1406
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1407
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1408
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1409
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1410
|
+
parseImageAlias(value: string): string | undefined;
|
|
1411
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1412
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1413
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1414
|
+
parseBaseProps(props: {
|
|
1415
|
+
title?: MarkdownOrString | undefined;
|
|
1416
|
+
summary?: MarkdownOrString | undefined;
|
|
1417
|
+
description?: MarkdownOrString | undefined;
|
|
1418
|
+
technology?: MarkdownOrString | undefined;
|
|
1419
|
+
}, override?: {
|
|
1420
|
+
title?: string | undefined;
|
|
1421
|
+
summary?: string | undefined;
|
|
1422
|
+
description?: string | undefined;
|
|
1423
|
+
technology?: string | undefined;
|
|
1424
|
+
}): {
|
|
1425
|
+
title?: string;
|
|
1426
|
+
summary?: ProjectId;
|
|
1427
|
+
description?: ProjectId;
|
|
1428
|
+
technology?: string;
|
|
1429
|
+
};
|
|
1430
|
+
parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
|
|
1431
|
+
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId;
|
|
1432
|
+
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId;
|
|
1433
|
+
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId;
|
|
1434
|
+
parseDeployment(): void;
|
|
1435
|
+
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
1436
|
+
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
1437
|
+
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
1438
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
1439
|
+
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
1440
|
+
};
|
|
1441
|
+
} & {
|
|
1442
|
+
new (...args: any[]): {
|
|
1443
|
+
parseSpecification(): void;
|
|
1444
|
+
parseElementSpecificationNode(specAst: SpecificationElementKind): {};
|
|
1445
|
+
parseElementSpecificationNode(specAst: SpecificationDeploymentNodeKind): {};
|
|
1446
|
+
isValid: IsValidFn;
|
|
1447
|
+
readonly services: LikeC4Services;
|
|
1448
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1449
|
+
get project(): Project;
|
|
1450
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1451
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1452
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1453
|
+
[key: string]: string | string[];
|
|
1454
|
+
} | undefined;
|
|
1455
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1456
|
+
convertTags<E extends {
|
|
1457
|
+
tags?: Tags;
|
|
1458
|
+
}>(withTags?: E | undefined): any;
|
|
1459
|
+
parseTags<E extends {
|
|
1460
|
+
tags?: Tags;
|
|
1461
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1462
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1463
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1464
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1465
|
+
parseImageAlias(value: string): string | undefined;
|
|
1466
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1467
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1468
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1469
|
+
parseBaseProps(props: {
|
|
1470
|
+
title?: MarkdownOrString | undefined;
|
|
1471
|
+
summary?: MarkdownOrString | undefined;
|
|
1472
|
+
description?: MarkdownOrString | undefined;
|
|
1473
|
+
technology?: MarkdownOrString | undefined;
|
|
1474
|
+
}, override?: {
|
|
1475
|
+
title?: string | undefined;
|
|
1476
|
+
summary?: string | undefined;
|
|
1477
|
+
description?: string | undefined;
|
|
1478
|
+
technology?: string | undefined;
|
|
1479
|
+
}): {
|
|
1480
|
+
title?: string;
|
|
1481
|
+
summary?: ProjectId;
|
|
1482
|
+
description?: ProjectId;
|
|
1483
|
+
technology?: string;
|
|
1484
|
+
};
|
|
1485
|
+
};
|
|
1486
|
+
} & {
|
|
1487
|
+
new (...args: any[]): {
|
|
1488
|
+
parsePredicate(astNode: ExpressionV2): ProjectId;
|
|
1489
|
+
parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
|
|
1490
|
+
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1491
|
+
parseElementExpression(astNode: FqnExpr$2): ProjectId;
|
|
1492
|
+
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId;
|
|
1493
|
+
parseElementPredicateWith(astNode: FqnExprWith): ProjectId;
|
|
1494
|
+
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId;
|
|
1495
|
+
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1496
|
+
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId;
|
|
1497
|
+
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId;
|
|
1498
|
+
parseRelationExpression(astNode: RelationExpr$1): ProjectId;
|
|
1499
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
1500
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
1501
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
1502
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
1503
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1504
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
1505
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
1506
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
1507
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
1508
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
1509
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
1510
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
1511
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1512
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
1513
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
1514
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
1515
|
+
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
1516
|
+
isValid: IsValidFn;
|
|
1517
|
+
readonly services: LikeC4Services;
|
|
1518
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1519
|
+
get project(): Project;
|
|
1520
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1521
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1522
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1523
|
+
[key: string]: string | string[];
|
|
1524
|
+
} | undefined;
|
|
1525
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1526
|
+
convertTags<E extends {
|
|
1527
|
+
tags?: Tags;
|
|
1528
|
+
}>(withTags?: E | undefined): any;
|
|
1529
|
+
parseTags<E extends {
|
|
1530
|
+
tags?: Tags;
|
|
1531
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1532
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1533
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1534
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1535
|
+
parseImageAlias(value: string): string | undefined;
|
|
1536
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1537
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1538
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1539
|
+
parseBaseProps(props: {
|
|
1540
|
+
title?: MarkdownOrString | undefined;
|
|
1541
|
+
summary?: MarkdownOrString | undefined;
|
|
1542
|
+
description?: MarkdownOrString | undefined;
|
|
1543
|
+
technology?: MarkdownOrString | undefined;
|
|
1544
|
+
}, override?: {
|
|
1545
|
+
title?: string | undefined;
|
|
1546
|
+
summary?: string | undefined;
|
|
1547
|
+
description?: string | undefined;
|
|
1548
|
+
technology?: string | undefined;
|
|
1549
|
+
}): {
|
|
1550
|
+
title?: string;
|
|
1551
|
+
summary?: ProjectId;
|
|
1552
|
+
description?: ProjectId;
|
|
1553
|
+
technology?: string;
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
} & {
|
|
1557
|
+
new (...args: any[]): {
|
|
1558
|
+
parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
|
|
1559
|
+
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId;
|
|
1560
|
+
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId;
|
|
1561
|
+
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId;
|
|
1562
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
1563
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
1564
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
1565
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
1566
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1567
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
1568
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
1569
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
1570
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
1571
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
1572
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
1573
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
1574
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1575
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
1576
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
1577
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
1578
|
+
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
1579
|
+
isValid: IsValidFn;
|
|
1580
|
+
readonly services: LikeC4Services;
|
|
1581
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1582
|
+
get project(): Project;
|
|
1583
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1584
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1585
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1586
|
+
[key: string]: string | string[];
|
|
1587
|
+
} | undefined;
|
|
1588
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1589
|
+
convertTags<E extends {
|
|
1590
|
+
tags?: Tags;
|
|
1591
|
+
}>(withTags?: E | undefined): any;
|
|
1592
|
+
parseTags<E extends {
|
|
1593
|
+
tags?: Tags;
|
|
1594
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1595
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1596
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1597
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1598
|
+
parseImageAlias(value: string): string | undefined;
|
|
1599
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1600
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1601
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1602
|
+
parseBaseProps(props: {
|
|
1603
|
+
title?: MarkdownOrString | undefined;
|
|
1604
|
+
summary?: MarkdownOrString | undefined;
|
|
1605
|
+
description?: MarkdownOrString | undefined;
|
|
1606
|
+
technology?: MarkdownOrString | undefined;
|
|
1607
|
+
}, override?: {
|
|
1608
|
+
title?: string | undefined;
|
|
1609
|
+
summary?: string | undefined;
|
|
1610
|
+
description?: string | undefined;
|
|
1611
|
+
technology?: string | undefined;
|
|
1612
|
+
}): {
|
|
1613
|
+
title?: string;
|
|
1614
|
+
summary?: ProjectId;
|
|
1615
|
+
description?: ProjectId;
|
|
1616
|
+
technology?: string;
|
|
1617
|
+
};
|
|
1618
|
+
parseDeployment(): void;
|
|
1619
|
+
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
1620
|
+
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
1621
|
+
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
1622
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
1623
|
+
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
1624
|
+
};
|
|
1625
|
+
} & {
|
|
1626
|
+
new (...args: any[]): {
|
|
1627
|
+
parseDeployment(): void;
|
|
1628
|
+
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
1629
|
+
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
1630
|
+
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
1631
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
1632
|
+
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
1633
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
1634
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
1635
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
1636
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
1637
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1638
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
1639
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
1640
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
1641
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
1642
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
1643
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
1644
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
1645
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1646
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
1647
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
1648
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
1649
|
+
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
1650
|
+
isValid: IsValidFn;
|
|
1651
|
+
readonly services: LikeC4Services;
|
|
1652
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1653
|
+
get project(): Project;
|
|
1654
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1655
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1656
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1657
|
+
[key: string]: string | string[];
|
|
1658
|
+
} | undefined;
|
|
1659
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1660
|
+
convertTags<E extends {
|
|
1661
|
+
tags?: Tags;
|
|
1662
|
+
}>(withTags?: E | undefined): any;
|
|
1663
|
+
parseTags<E extends {
|
|
1664
|
+
tags?: Tags;
|
|
1665
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1666
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1667
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1668
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1669
|
+
parseImageAlias(value: string): string | undefined;
|
|
1670
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1671
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1672
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1673
|
+
parseBaseProps(props: {
|
|
1674
|
+
title?: MarkdownOrString | undefined;
|
|
1675
|
+
summary?: MarkdownOrString | undefined;
|
|
1676
|
+
description?: MarkdownOrString | undefined;
|
|
1677
|
+
technology?: MarkdownOrString | undefined;
|
|
1678
|
+
}, override?: {
|
|
1679
|
+
title?: string | undefined;
|
|
1680
|
+
summary?: string | undefined;
|
|
1681
|
+
description?: string | undefined;
|
|
1682
|
+
technology?: string | undefined;
|
|
1683
|
+
}): {
|
|
1684
|
+
title?: string;
|
|
1685
|
+
summary?: ProjectId;
|
|
1686
|
+
description?: ProjectId;
|
|
1687
|
+
technology?: string;
|
|
1688
|
+
};
|
|
1689
|
+
};
|
|
1690
|
+
} & {
|
|
1691
|
+
new (...args: any[]): {
|
|
1692
|
+
parseModel(): void;
|
|
1693
|
+
parseElement(astNode: Element): ParsedAstElement;
|
|
1694
|
+
parseExtendElement(astNode: ExtendElement): ParsedAstExtend | null;
|
|
1695
|
+
parseExtendRelation(astNode: ExtendRelation): ParsedAstExtendRelation | null;
|
|
1696
|
+
_resolveRelationSource(node: Relation): ProjectId | ProjectId;
|
|
1697
|
+
parseRelation(astNode: Relation): ParsedAstRelation;
|
|
1698
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
1699
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
1700
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
1701
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
1702
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1703
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
1704
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
1705
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
1706
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
1707
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
1708
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
1709
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
1710
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1711
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
1712
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
1713
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
1714
|
+
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
1715
|
+
isValid: IsValidFn;
|
|
1716
|
+
readonly services: LikeC4Services;
|
|
1717
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1718
|
+
get project(): Project;
|
|
1719
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1720
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1721
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1722
|
+
[key: string]: string | string[];
|
|
1723
|
+
} | undefined;
|
|
1724
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1725
|
+
convertTags<E extends {
|
|
1726
|
+
tags?: Tags;
|
|
1727
|
+
}>(withTags?: E | undefined): any;
|
|
1728
|
+
parseTags<E extends {
|
|
1729
|
+
tags?: Tags;
|
|
1730
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1731
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1732
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1733
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1734
|
+
parseImageAlias(value: string): string | undefined;
|
|
1735
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1736
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1737
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1738
|
+
parseBaseProps(props: {
|
|
1739
|
+
title?: MarkdownOrString | undefined;
|
|
1740
|
+
summary?: MarkdownOrString | undefined;
|
|
1741
|
+
description?: MarkdownOrString | undefined;
|
|
1742
|
+
technology?: MarkdownOrString | undefined;
|
|
1743
|
+
}, override?: {
|
|
1744
|
+
title?: string | undefined;
|
|
1745
|
+
summary?: string | undefined;
|
|
1746
|
+
description?: string | undefined;
|
|
1747
|
+
technology?: string | undefined;
|
|
1748
|
+
}): {
|
|
1749
|
+
title?: string;
|
|
1750
|
+
summary?: ProjectId;
|
|
1751
|
+
description?: ProjectId;
|
|
1752
|
+
technology?: string;
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1755
|
+
} & {
|
|
1756
|
+
new (...args: any[]): {
|
|
1757
|
+
parseImports(): void;
|
|
1758
|
+
isValid: IsValidFn;
|
|
1759
|
+
readonly services: LikeC4Services;
|
|
1760
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1761
|
+
get project(): Project;
|
|
1762
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1763
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1764
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1765
|
+
[key: string]: string | string[];
|
|
1766
|
+
} | undefined;
|
|
1767
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1768
|
+
convertTags<E extends {
|
|
1769
|
+
tags?: Tags;
|
|
1770
|
+
}>(withTags?: E | undefined): any;
|
|
1771
|
+
parseTags<E extends {
|
|
1772
|
+
tags?: Tags;
|
|
1773
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1774
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1775
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1776
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1777
|
+
parseImageAlias(value: string): string | undefined;
|
|
1778
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1779
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1780
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1781
|
+
parseBaseProps(props: {
|
|
1782
|
+
title?: MarkdownOrString | undefined;
|
|
1783
|
+
summary?: MarkdownOrString | undefined;
|
|
1784
|
+
description?: MarkdownOrString | undefined;
|
|
1785
|
+
technology?: MarkdownOrString | undefined;
|
|
1786
|
+
}, override?: {
|
|
1787
|
+
title?: string | undefined;
|
|
1788
|
+
summary?: string | undefined;
|
|
1789
|
+
description?: string | undefined;
|
|
1790
|
+
technology?: string | undefined;
|
|
1791
|
+
}): {
|
|
1792
|
+
title?: string;
|
|
1793
|
+
summary?: ProjectId;
|
|
1794
|
+
description?: ProjectId;
|
|
1795
|
+
technology?: string;
|
|
1796
|
+
};
|
|
1797
|
+
};
|
|
1798
|
+
} & {
|
|
1799
|
+
new (...args: any[]): {
|
|
1800
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
1801
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
1802
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
1803
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
1804
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
1805
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
1806
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
1807
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
1808
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
1809
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
1810
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
1811
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
1812
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
1813
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
1814
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
1815
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
1816
|
+
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
1817
|
+
isValid: IsValidFn;
|
|
1818
|
+
readonly services: LikeC4Services;
|
|
1819
|
+
readonly doc: ParsedLikeC4LangiumDocument;
|
|
1820
|
+
get project(): Project;
|
|
1821
|
+
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
1822
|
+
getAstNodePath(node: langium0.AstNode): string;
|
|
1823
|
+
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
1824
|
+
[key: string]: string | string[];
|
|
1825
|
+
} | undefined;
|
|
1826
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
1827
|
+
convertTags<E extends {
|
|
1828
|
+
tags?: Tags;
|
|
1829
|
+
}>(withTags?: E | undefined): any;
|
|
1830
|
+
parseTags<E extends {
|
|
1831
|
+
tags?: Tags;
|
|
1832
|
+
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
1833
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1834
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
|
|
1835
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
1836
|
+
parseImageAlias(value: string): string | undefined;
|
|
1837
|
+
parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
|
|
1838
|
+
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
1839
|
+
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
1840
|
+
parseBaseProps(props: {
|
|
1841
|
+
title?: MarkdownOrString | undefined;
|
|
1842
|
+
summary?: MarkdownOrString | undefined;
|
|
1843
|
+
description?: MarkdownOrString | undefined;
|
|
1844
|
+
technology?: MarkdownOrString | undefined;
|
|
1845
|
+
}, override?: {
|
|
1846
|
+
title?: string | undefined;
|
|
1847
|
+
summary?: string | undefined;
|
|
1848
|
+
description?: string | undefined;
|
|
1849
|
+
technology?: string | undefined;
|
|
1850
|
+
}): {
|
|
1851
|
+
title?: string;
|
|
1852
|
+
summary?: ProjectId;
|
|
1853
|
+
description?: ProjectId;
|
|
1854
|
+
technology?: string;
|
|
1855
|
+
};
|
|
1856
|
+
};
|
|
1857
|
+
} & typeof BaseParser;
|
|
1858
|
+
declare class DocumentParser extends DocumentParserFromMixins {}
|
|
1859
|
+
declare class LikeC4ModelParser {
|
|
1860
|
+
private services;
|
|
1861
|
+
protected cachedParsers: any;
|
|
1862
|
+
constructor(services: LikeC4Services);
|
|
1863
|
+
documents(projectId: ProjectId): Stream<ParsedLikeC4LangiumDocument>;
|
|
1864
|
+
parse(doc: LangiumDocument): ParsedLikeC4LangiumDocument;
|
|
1865
|
+
forDocument(doc: LangiumDocument): DocumentParser;
|
|
1866
|
+
private createParser;
|
|
1867
|
+
}
|
|
1868
|
+
//#endregion
|
|
1869
|
+
//#region src/model/parser/ValueConverter.d.ts
|
|
1870
|
+
declare class LikeC4ValueConverter extends DefaultValueConverter {
|
|
1871
|
+
protected runConverter(rule: any, input: string, cstNode: CstNode): ValueType;
|
|
1872
|
+
}
|
|
1873
|
+
//#endregion
|
|
1874
|
+
//#region src/LikeC4LanguageServices.d.ts
|
|
1875
|
+
interface LikeC4LanguageServices {
|
|
1876
|
+
readonly views: LikeC4Views;
|
|
1877
|
+
readonly builder: LikeC4ModelBuilder;
|
|
1878
|
+
readonly workspaceUri: URI;
|
|
1879
|
+
readonly projectsManager: ProjectsManager;
|
|
1880
|
+
readonly editor: LikeC4ModelChanges;
|
|
1881
|
+
/**
|
|
1882
|
+
* Returns all projects with relevant documents
|
|
1883
|
+
*/
|
|
1884
|
+
projects(): NonEmptyArray<{
|
|
1885
|
+
id: ProjectId;
|
|
1886
|
+
folder: URI;
|
|
1887
|
+
title: string;
|
|
1888
|
+
documents: ReadonlyArray<URI>;
|
|
1889
|
+
config: Readonly<LikeC4ProjectConfig>;
|
|
1890
|
+
}>;
|
|
1891
|
+
/**
|
|
1892
|
+
* Returns project by ID, returns default project if no ID is specified
|
|
1893
|
+
*/
|
|
1894
|
+
project(projectId?: ProjectId): {
|
|
1895
|
+
id: ProjectId;
|
|
1896
|
+
folder: URI;
|
|
1897
|
+
title: string;
|
|
1898
|
+
documents: ReadonlyArray<URI>;
|
|
1899
|
+
config: Readonly<LikeC4ProjectConfig>;
|
|
1900
|
+
};
|
|
1901
|
+
/**
|
|
1902
|
+
* Computes and layouts projects overview - a special diagram
|
|
1903
|
+
* that shows all projects and their relationships
|
|
1904
|
+
*/
|
|
1905
|
+
projectsOverview(cancelToken?: CancellationToken$2): Promise<LayoutedProjectsView$1>;
|
|
1906
|
+
/**
|
|
1907
|
+
* Returns {@link LikeC4Model} of the specified project, with computed views {@link ComputedView}
|
|
1908
|
+
* Not ready for rendering, but enough to traverse model. Much faster than {@link layoutedModel}
|
|
1909
|
+
*
|
|
1910
|
+
* If no {@link project} is specified, returns for default project
|
|
1911
|
+
*/
|
|
1912
|
+
computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownComputed>>;
|
|
1913
|
+
/**
|
|
1914
|
+
* Returns {@link LikeC4Model} of the specified project, with layouted views {@link LayoutedView}
|
|
1915
|
+
* Ready for rendering. Applies manual layouts if available.
|
|
1916
|
+
*
|
|
1917
|
+
* If no {@link project} is specified, returns for default project
|
|
1918
|
+
*/
|
|
1919
|
+
layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownLayouted>>;
|
|
1920
|
+
/**
|
|
1921
|
+
* Returns diagrams (i.e. layouted views {@link LayoutedView}) for the specified project
|
|
1922
|
+
* Applies manual layouts if available.
|
|
1923
|
+
*
|
|
1924
|
+
* If no {@link project} is specified, returns diagrams for default project
|
|
1925
|
+
*/
|
|
1926
|
+
diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LayoutedView[]>;
|
|
1927
|
+
getErrors(): Array<{
|
|
1928
|
+
message: string;
|
|
1929
|
+
line: number;
|
|
1930
|
+
range: Range;
|
|
1931
|
+
sourceFsPath: string;
|
|
1932
|
+
}>;
|
|
1933
|
+
/**
|
|
1934
|
+
* Returns the location of the specified element, relation, view or deployment element
|
|
1935
|
+
*/
|
|
1936
|
+
locate(params: Locate.Params): Locate.Res;
|
|
1937
|
+
dispose(): Promise<void>;
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* Public Language Services
|
|
1941
|
+
*/
|
|
1942
|
+
declare class DefaultLikeC4LanguageServices implements LikeC4LanguageServices {
|
|
1943
|
+
private services;
|
|
1944
|
+
readonly builder: LikeC4ModelBuilder;
|
|
1945
|
+
readonly editor: LikeC4ModelChanges;
|
|
1946
|
+
readonly projectsManager: ProjectsManager;
|
|
1947
|
+
constructor(services: LikeC4Services);
|
|
1948
|
+
get views(): LikeC4Views;
|
|
1949
|
+
get workspaceUri(): URI;
|
|
1950
|
+
projects(): NonEmptyArray<{
|
|
1951
|
+
id: ProjectId;
|
|
1952
|
+
folder: URI;
|
|
1953
|
+
title: string;
|
|
1954
|
+
documents: ReadonlyArray<URI>;
|
|
1955
|
+
config: LikeC4ProjectConfig;
|
|
1956
|
+
}>;
|
|
1957
|
+
project(projectId?: ProjectId): {
|
|
1958
|
+
id: ProjectId;
|
|
1959
|
+
folder: URI;
|
|
1960
|
+
title: string;
|
|
1961
|
+
documents: ReadonlyArray<URI>;
|
|
1962
|
+
config: LikeC4ProjectConfig;
|
|
1963
|
+
};
|
|
1964
|
+
diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LayoutedView<UnknownLayouted>[]>;
|
|
1965
|
+
computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownComputed>>;
|
|
1966
|
+
layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownLayouted>>;
|
|
1967
|
+
projectsOverview(cancelToken?: CancellationToken$2): Promise<LayoutedProjectsView$1>;
|
|
1968
|
+
getErrors(): Array<{
|
|
1969
|
+
message: string;
|
|
1970
|
+
line: number;
|
|
1971
|
+
range: Range;
|
|
1972
|
+
sourceFsPath: string;
|
|
1973
|
+
}>;
|
|
1974
|
+
locate(params: Locate.Params): Locate.Res;
|
|
1975
|
+
dispose(): Promise<void>;
|
|
1976
|
+
}
|
|
1977
|
+
//#endregion
|
|
1978
|
+
export { createLikeC4Module as $, ParsedElementStyle as A, parseAstOpacityProperty as B, ParsedAstElementView as C, ParsedAstRelation as D, ParsedAstGlobals as E, isFqnRefInsideGlobals as F, toAutoLayout as G, parseAstSizeValue as H, isFqnRefInsideModel as I, LanguageServicesContext as J, toColor as K, isLikeC4LangiumDocument as L, ViewOps as M, getViewRulePredicateContainer as N, ParsedAstSpecification as O, isFqnRefInsideDeployment as P, createLanguageServices as Q, isParsedLikeC4LangiumDocument as R, ParsedAstElement as S, ParsedAstExtendRelation as T, parseMarkdownAsString as U, parseAstPercent as V, toAstViewLayoutDirection as W, LikeC4Services as X, LikeC4AddedServices as Y, LikeC4SharedServices as Z, LikeC4LangiumDocument as _, LikeC4ManualLayoutsModuleContext as _t, startLanguageServer$1 as a, LikeC4MCPServerModuleContext as at, ParsedAstDeploymentView as b, ProjectsManager as bt, WithFileSystem as c, NoFileSystem as ct, LikeC4ModelBuilder as d, FileNode as dt, createSharedServices as et, FqnIndex as f, FileSystemModuleContext as ft, LikeC4DocumentProps as g, LikeC4ManualLayouts as gt, LikeC4AstNode as h, FileSystemWatcherModuleContext as ht, LikeC4ModelParser as i, LikeC4MCPServerFactory as it, ParsedLikeC4LangiumDocument as j, ParsedAstView as k, LikeC4ModelLocator as l, NoFileSystemWatcher as lt, ElementOps as m, FileSystemWatcher as mt, LikeC4LanguageServices as n, NoMCPServer as nt, WithMCPServer as o, LikeC4WorkspaceManager as ot, AstNodeDescriptionWithFqn as p, FileSystemProvider$1 as pt, toRelationshipStyle as q, DocumentParser as r, LikeC4MCPServer as rt, WithLikeC4ManualLayouts as s, LangiumDocuments as st, DefaultLikeC4LanguageServices as t, LikeC4Views as tt, ViewLocateResult as u, NoLikeC4ManualLayouts as ut, ParsedAstDeployment as v, Project as vt, ParsedAstExtend as w, ParsedAstDynamicView as x, ParsedAstDeploymentRelation as y, ProjectData as yt, parseAstIconPositionValue as z };
|