likec4 1.56.0 → 1.58.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/__app__/codegen/react.mjs +7 -8
- package/__app__/codegen/webcomponent.mjs +77 -736
- package/__app__/src/aichat/index.mjs +8 -0
- package/__app__/src/chunks/AIChat.mjs +959 -0
- package/__app__/src/chunks/DiagramActorProvider.mjs +7638 -0
- package/__app__/src/chunks/LikeC4Styles.mjs +1866 -0
- package/__app__/src/chunks/Markdown.mjs +146 -0
- package/__app__/src/chunks/NavigationPanel.mjs +61 -0
- package/__app__/src/chunks/ProjectsOverview.mjs +540 -0
- package/__app__/src/chunks/adhoc-editor.mjs +3386 -0
- package/__app__/src/chunks/es.mjs +439 -0
- package/__app__/src/chunks/hooks.mjs +145 -0
- package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +1894 -0
- package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
- package/__app__/src/chunks/libs/@mantine.mjs +12070 -0
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +252 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
- package/__app__/src/chunks/libs/@tanstack.mjs +2718 -0
- package/__app__/src/chunks/libs/@xstate/react.mjs +1982 -0
- package/__app__/src/chunks/libs/@xyflow/react.mjs +5256 -0
- package/__app__/src/chunks/libs/bezier-js.mjs +1003 -0
- package/__app__/src/chunks/libs/d3.mjs +2842 -0
- package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
- package/__app__/src/chunks/libs/framer.mjs +5872 -0
- package/__app__/src/chunks/libs/remeda.mjs +642 -0
- package/__app__/src/chunks/libs/zod.mjs +3170 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +23 -0
- package/__app__/src/chunks/styled-system.mjs +1040 -0
- package/__app__/src/fonts.css +1 -1
- package/__app__/src/main.mjs +14847 -1
- package/__app__/src/style.css +1 -1
- package/config/schema.json +14 -41
- package/dist/chunks/enableServer.mjs +1 -0
- package/dist/chunks/filenames.mjs +2 -2
- package/dist/chunks/index2.d.mts +2057 -722
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
- package/dist/chunks/libs/@ts-graphviz/ast.mjs +3 -0
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +9 -0
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -0
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +26 -26
- package/dist/chunks/libs/langium.d.mts +5 -5
- package/dist/chunks/libs/langium.mjs +10 -10
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +3 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/libs/zod.d.mts +60 -25
- package/dist/chunks/libs/zod.mjs +65 -0
- package/dist/chunks/node.mjs +84 -56
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +593 -0
- package/dist/cli/index.mjs +184 -141
- package/dist/index.d.mts +2 -131
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +2 -2
- package/dist/vite-plugin/index.d.mts +53 -2
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/index.d.mts +327 -4
- package/dist/vite-plugin/internal/index.mjs +946 -1
- package/package.json +85 -72
- package/react/index.d.mts +174 -73
- package/react/index.mjs +42468 -38926
- package/vite-plugin-modules.d.ts +4 -0
- package/__app__/chunks/ColorSchemeToggle.mjs +0 -1
- package/__app__/chunks/DiagramActorProvider.mjs +0 -10
- package/__app__/chunks/Fallback.mjs +0 -1
- package/__app__/chunks/Header.mjs +0 -13
- package/__app__/chunks/IconRenderer.mjs +0 -1
- package/__app__/chunks/LikeC4Diagram.mjs +0 -19
- package/__app__/chunks/LikeC4ModelContext.mjs +0 -1
- package/__app__/chunks/LikeC4ModelContext2.mjs +0 -1
- package/__app__/chunks/LikeC4Styles.mjs +0 -48
- package/__app__/chunks/NavigationPanel.mjs +0 -1
- package/__app__/chunks/StaticLikeC4Diagram.mjs +0 -1
- package/__app__/chunks/ViewReact.mjs +0 -1
- package/__app__/chunks/__root.mjs +0 -1
- package/__app__/chunks/adhoc-editor.mjs +0 -1
- package/__app__/chunks/hooks.mjs +0 -1
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
- package/__app__/chunks/libs/@mantine/core.mjs +0 -41
- package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
- package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
- package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
- package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -15
- package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
- package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
- package/__app__/chunks/libs/@xstate/react.mjs +0 -1
- package/__app__/chunks/libs/@xstate/store.mjs +0 -1
- package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
- package/__app__/chunks/libs/bezier-js.mjs +0 -1
- package/__app__/chunks/libs/d3-path.mjs +0 -1
- package/__app__/chunks/libs/d3-shape.mjs +0 -1
- package/__app__/chunks/libs/fast-equals.mjs +0 -1
- package/__app__/chunks/libs/framer-motion.mjs +0 -9
- package/__app__/chunks/libs/html-to-image.mjs +0 -2
- package/__app__/chunks/libs/motion-dom.mjs +0 -1
- package/__app__/chunks/libs/motion.mjs +0 -1
- package/__app__/chunks/libs/nanostores.mjs +0 -1
- package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
- package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
- package/__app__/chunks/libs/remeda.mjs +0 -1
- package/__app__/chunks/libs/xstate.mjs +0 -1
- package/__app__/chunks/libs/zod.mjs +0 -39
- package/__app__/chunks/rolldown-runtime.mjs +0 -1
- package/__app__/chunks/safeCtx.mjs +0 -1
- package/__app__/chunks/searchParams.mjs +0 -1
- package/__app__/chunks/single-index.mjs +0 -1
- package/__app__/chunks/styled-system.mjs +0 -1
- package/__app__/chunks/styles.css.mjs +0 -1
- package/__app__/chunks/useLikeC4Project.mjs +0 -1
- package/__app__/chunks/useUpdateEffect.mjs +0 -1
- package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
- package/__app__/src/pages/EmbedPage.mjs +0 -1
- package/__app__/src/pages/ExportPage.mjs +0 -1
- package/__app__/src/pages/ProjectsOverview.mjs +0 -1
- package/__app__/src/pages/ViewAsD2.mjs +0 -1
- package/__app__/src/pages/ViewAsDot.mjs +0 -1
- package/__app__/src/pages/ViewAsMmd.mjs +0 -1
- package/__app__/src/pages/ViewAsPuml.mjs +0 -1
- package/__app__/src/pages/ViewEditor.mjs +0 -1
- package/__app__/src/pages/ViewReact.mjs +0 -1
- package/__app__/src/routeTree.gen.mjs +0 -1
- package/__app__/src/routes/__root.mjs +0 -1
- package/__app__/src/routes/_single/adhoc.mjs +0 -1
- package/__app__/src/routes/_single/embed._viewId.mjs +0 -1
- package/__app__/src/routes/_single/export._viewId.mjs +0 -1
- package/__app__/src/routes/_single/route.mjs +0 -1
- package/__app__/src/routes/_single/single-index.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.d2.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.dot.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.index.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.mmd.mjs +0 -1
- package/__app__/src/routes/_single/view._viewId.puml.mjs +0 -1
- package/__app__/src/routes/_single/webcomponent._.mjs +0 -33
- package/__app__/src/routes/index.mjs +0 -1
- package/__app__/src/routes/project._projectId/-components.mjs +0 -1
- package/__app__/src/routes/project._projectId/adhoc.mjs +0 -1
- package/__app__/src/routes/project._projectId/embed._viewId.mjs +0 -1
- package/__app__/src/routes/project._projectId/export._viewId.mjs +0 -1
- package/__app__/src/routes/project._projectId/index.mjs +0 -1
- package/__app__/src/routes/project._projectId/route.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.index.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +0 -1
- package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +0 -1
- package/__app__/src/routes/projects.mjs +0 -1
- package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/chunks/libs/@hono/mcp.mjs +0 -45
- package/dist/chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/chunks/libs/ajv.mjs +0 -1
- package/dist/chunks/libs/ansi-align.mjs +0 -2
- package/dist/chunks/libs/ansi-regex.mjs +0 -1
- package/dist/chunks/libs/ansi-styles.mjs +0 -1
- package/dist/chunks/libs/atomically.mjs +0 -1
- package/dist/chunks/libs/boxen.mjs +0 -22
- package/dist/chunks/libs/conf.mjs +0 -1
- package/dist/chunks/libs/defu.mjs +0 -1
- package/dist/chunks/libs/destr.mjs +0 -1
- package/dist/chunks/libs/find-up-simple.mjs +0 -1
- package/dist/chunks/libs/get-port.mjs +0 -1
- package/dist/chunks/libs/hono.mjs +0 -1
- package/dist/chunks/libs/is-docker.mjs +0 -1
- package/dist/chunks/libs/is-error-instance.mjs +0 -1
- package/dist/chunks/libs/is-inside-container.mjs +0 -1
- package/dist/chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/chunks/libs/isexe.mjs +0 -1
- package/dist/chunks/libs/ky.mjs +0 -3
- package/dist/chunks/libs/p-debounce.mjs +0 -1
- package/dist/chunks/libs/p-limit.mjs +0 -1
- package/dist/chunks/libs/p-timeout.mjs +0 -1
- package/dist/chunks/libs/package-up.mjs +0 -1
- package/dist/chunks/libs/parse-ms.mjs +0 -1
- package/dist/chunks/libs/safe-stringify.mjs +0 -1
- package/dist/chunks/libs/strip-indent.mjs +0 -1
- package/dist/chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/chunks/libs/ts-graphviz.d.mts +0 -12
- package/dist/chunks/libs/ts-graphviz.mjs +0 -4
- package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
- package/dist/chunks/libs/word-wrap.mjs +0 -12
- package/dist/chunks/plugin.mjs +0 -400
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.d.mts +0 -269
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/nanostores.d.mts +0 -59
- package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
package/dist/chunks/index2.d.mts
CHANGED
|
@@ -1,17 +1,1209 @@
|
|
|
1
1
|
import { i as __name } from "./rolldown-runtime.mjs";
|
|
2
2
|
import { a as LikeC4ProjectConfig, i as IncludeConfig, o as LikeC4ProjectConfigInput } from "./index.mjs";
|
|
3
3
|
import { $ as FileSystemProvider, A as DefaultValueConverter, B as AsyncDisposable, C as CodeLensParams, D as ValidationOptions, E as DefaultDocumentValidator, F as JSDocDocumentationProvider, G as Reference, H as AstNode, I as DefaultIndexManager, J as LangiumDocument, K as ReferenceInfo, L as ReferenceDescription, M as MaybePromise, N as DefaultScopeProvider, O as DiagnosticInfo, P as Scope, Q as FileSystemNode, R as DefaultNameProvider, S as CodeActionParams, T as DocumentSymbolParams, U as AstNodeDescription, V as Disposable$1, W as CstNode, X as PrecomputedScopes, Y as LangiumDocumentFactory, Z as Stream, _ as CodeLensProvider, _t as SymbolKind, a as LangiumServices, at as CodeAction, b as FileSelector, c as AbstractSemanticTokenProvider, ct as CompletionItemKind, d as AbstractFormatter, dt as DocumentLink, et as Keyword, f as FormattingRegion, ft as DocumentSymbol, g as DefaultDocumentHighlightProvider, gt as Range, h as DocumentLinkProvider, ht as Location, i as NextFeature, it as RequestType, j as ValueType, k as DefaultScopeComputation, l as SemanticTokenAcceptor, lt as Diagnostic, m as NodeKindProvider, mt as Hover, n as CompletionContext, nt as CancellationToken$1, o as LangiumSharedServices, ot as CodeLens, p as DocumentSymbolProvider, pt as FormattingOptions, q as DefaultLangiumDocuments, r as DefaultCompletionProvider, rt as NotificationType, s as DefaultWorkspaceSymbolProvider, st as Command, t as CompletionAcceptor, tt as URI, u as AstNodeHoverProvider, ut as DocumentHighlight, v as CodeActionProvider, vt as TextEdit, w as DocumentLinkParams, x as BuildOptions, y as DefaultWorkspaceManager, yt as WorkspaceFolder, z as WorkspaceCache } from "./libs/langium.mjs";
|
|
4
|
-
import { t as $keywords } from "./libs
|
|
4
|
+
import { t as $keywords } from "./libs/@ts-graphviz/common.mjs";
|
|
5
|
+
import { LikeC4Styles } from "@likec4/core/styles";
|
|
6
|
+
import { EdgeId, Fqn, GuardedBy, LayoutedView, NodeId, NonEmptyArray, NonEmptyReadonlyArray, ProjectId, ViewId } from "@likec4/core/types";
|
|
5
7
|
import * as c4 from "@likec4/core";
|
|
6
|
-
import { AnyAux, ComputedView, DeploymentFqn, DiagramView, EdgeId, Fqn, LayoutType, LayoutedView, LikeC4Styles, NonEmptyArray, NonEmptyReadonlyArray, ProjectId, RelationId, Tag, UnknownComputed, UnknownLayouted, UnknownParsed, ViewChange, ViewId, aux } from "@likec4/core";
|
|
7
|
-
import { LikeC4Styles as LikeC4Styles$1 } from "@likec4/core/styles";
|
|
8
|
-
import { Fqn as Fqn$1, GuardedBy, LayoutedView as LayoutedView$1, ProjectId as ProjectId$1, ViewId as ViewId$1 } from "@likec4/core/types";
|
|
8
|
+
import { AnyAux, ComputedView, DeploymentFqn, DiagramView, EdgeId as EdgeId$1, Fqn as Fqn$1, LayoutType, LayoutedView as LayoutedView$1, LikeC4Styles as LikeC4Styles$1, NonEmptyArray as NonEmptyArray$1, NonEmptyReadonlyArray as NonEmptyReadonlyArray$1, ProjectId as ProjectId$1, RelationId, Tag, UnknownComputed, UnknownLayouted, UnknownParsed, ViewChange, ViewId as ViewId$1, aux as aux$1 } from "@likec4/core";
|
|
9
9
|
import { DefaultWeakMap, MultiMap } from "@likec4/core/utils";
|
|
10
10
|
import { ElementModel, LikeC4Model } from "@likec4/core/model";
|
|
11
11
|
import { AdhocViewPredicate, ComputedProjectsView, LayoutedProjectsView } from "@likec4/core/compute-view";
|
|
12
12
|
import * as type_fest0 from "type-fest";
|
|
13
13
|
import { ConditionalPick, MergeExclusive, Simplify, Tagged, ValueOf, Writable } from "type-fest";
|
|
14
14
|
|
|
15
|
+
//#region ../../node_modules/.pnpm/@logtape+logtape@2.1.1/node_modules/@logtape/logtape/dist/level.d.ts
|
|
16
|
+
//#region src/level.d.ts
|
|
17
|
+
declare const logLevels: readonly ["trace", "debug", "info", "warning", "error", "fatal"];
|
|
18
|
+
/**
|
|
19
|
+
* The severity level of a {@link LogRecord}.
|
|
20
|
+
*/
|
|
21
|
+
type LogLevel = typeof logLevels[number];
|
|
22
|
+
/**
|
|
23
|
+
* Lists all available log levels with the order of their severity.
|
|
24
|
+
* The `"trace"` level goes first, and the `"fatal"` level goes last.
|
|
25
|
+
* @returns A new copy of the array of log levels.
|
|
26
|
+
* @since 1.0.0
|
|
27
|
+
*/
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region ../../node_modules/.pnpm/@logtape+logtape@2.1.1/node_modules/@logtape/logtape/dist/record.d.ts
|
|
30
|
+
//#region src/record.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* A log record.
|
|
33
|
+
*/
|
|
34
|
+
interface LogRecord {
|
|
35
|
+
/**
|
|
36
|
+
* The category of the logger that produced the log record.
|
|
37
|
+
*/
|
|
38
|
+
readonly category: readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* The log level.
|
|
41
|
+
*/
|
|
42
|
+
readonly level: LogLevel;
|
|
43
|
+
/**
|
|
44
|
+
* The log message. This is the result of substituting the message template
|
|
45
|
+
* with the values. The number of elements in this array is always odd,
|
|
46
|
+
* with the message template values interleaved between the substitution
|
|
47
|
+
* values.
|
|
48
|
+
*/
|
|
49
|
+
readonly message: readonly unknown[];
|
|
50
|
+
/**
|
|
51
|
+
* The raw log message. This is the original message template without any
|
|
52
|
+
* further processing. It can be either:
|
|
53
|
+
*
|
|
54
|
+
* - A string without any substitutions if the log record was created with
|
|
55
|
+
* a method call syntax, e.g., "Hello, {name}!" for
|
|
56
|
+
* `logger.info("Hello, {name}!", { name })`.
|
|
57
|
+
* - A template string array if the log record was created with a tagged
|
|
58
|
+
* template literal syntax, e.g., `["Hello, ", "!"]` for
|
|
59
|
+
* ``logger.info`Hello, ${name}!```.
|
|
60
|
+
*
|
|
61
|
+
* @since 0.6.0
|
|
62
|
+
*/
|
|
63
|
+
readonly rawMessage: string | TemplateStringsArray;
|
|
64
|
+
/**
|
|
65
|
+
* The timestamp of the log record in milliseconds since the Unix epoch.
|
|
66
|
+
*/
|
|
67
|
+
readonly timestamp: number;
|
|
68
|
+
/**
|
|
69
|
+
* The extra properties of the log record.
|
|
70
|
+
*/
|
|
71
|
+
readonly properties: Record<string, unknown>;
|
|
72
|
+
} //# sourceMappingURL=record.d.ts.map
|
|
73
|
+
//#endregion
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region ../../node_modules/.pnpm/@logtape+logtape@2.1.1/node_modules/@logtape/logtape/dist/logger.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* A logger interface. It provides methods to log messages at different
|
|
78
|
+
* severity levels.
|
|
79
|
+
*
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const logger = getLogger("category");
|
|
82
|
+
* logger.trace `A trace message with ${value}`
|
|
83
|
+
* logger.debug `A debug message with ${value}.`;
|
|
84
|
+
* logger.info `An info message with ${value}.`;
|
|
85
|
+
* logger.warn `A warning message with ${value}.`;
|
|
86
|
+
* logger.error `An error message with ${value}.`;
|
|
87
|
+
* logger.fatal `A fatal error message with ${value}.`;
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* Callback-based string-message overloads should be treated as
|
|
91
|
+
* fire-and-forget. Async callbacks return `Promise<void>`, and when a
|
|
92
|
+
* callback is filtered out because the level is disabled an implementation may
|
|
93
|
+
* still return an already-resolved promise so the async path remains awaitable
|
|
94
|
+
* without invoking the callback. Call sites should not branch on these
|
|
95
|
+
* return values.
|
|
96
|
+
*/
|
|
97
|
+
interface Logger {
|
|
98
|
+
/**
|
|
99
|
+
* The category of the logger. It is an array of strings.
|
|
100
|
+
*/
|
|
101
|
+
readonly category: readonly string[];
|
|
102
|
+
/**
|
|
103
|
+
* The logger with the supercategory of the current logger. If the current
|
|
104
|
+
* logger is the root logger, this is `null`.
|
|
105
|
+
*/
|
|
106
|
+
readonly parent: Logger | null;
|
|
107
|
+
/**
|
|
108
|
+
* Get a child logger with the given subcategory.
|
|
109
|
+
*
|
|
110
|
+
* ```typescript
|
|
111
|
+
* const logger = getLogger("category");
|
|
112
|
+
* const subLogger = logger.getChild("sub-category");
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* The above code is equivalent to:
|
|
116
|
+
*
|
|
117
|
+
* ```typescript
|
|
118
|
+
* const logger = getLogger("category");
|
|
119
|
+
* const subLogger = getLogger(["category", "sub-category"]);
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @param subcategory The subcategory.
|
|
123
|
+
* @returns The child logger.
|
|
124
|
+
*/
|
|
125
|
+
getChild(subcategory: string | readonly [string] | readonly [string, ...string[]]): Logger;
|
|
126
|
+
/**
|
|
127
|
+
* Get a logger with contextual properties. This is useful for
|
|
128
|
+
* log multiple messages with the shared set of properties.
|
|
129
|
+
*
|
|
130
|
+
* ```typescript
|
|
131
|
+
* const logger = getLogger("category");
|
|
132
|
+
* const ctx = logger.with({ foo: 123, bar: "abc" });
|
|
133
|
+
* ctx.info("A message with {foo} and {bar}.");
|
|
134
|
+
* ctx.warn("Another message with {foo}, {bar}, and {baz}.", { baz: true });
|
|
135
|
+
* ```
|
|
136
|
+
*
|
|
137
|
+
* The above code is equivalent to:
|
|
138
|
+
*
|
|
139
|
+
* ```typescript
|
|
140
|
+
* const logger = getLogger("category");
|
|
141
|
+
* logger.info("A message with {foo} and {bar}.", { foo: 123, bar: "abc" });
|
|
142
|
+
* logger.warn(
|
|
143
|
+
* "Another message with {foo}, {bar}, and {baz}.",
|
|
144
|
+
* { foo: 123, bar: "abc", baz: true },
|
|
145
|
+
* );
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @param properties
|
|
149
|
+
* @returns
|
|
150
|
+
* @since 0.5.0
|
|
151
|
+
*/
|
|
152
|
+
with(properties: Record<string, unknown>): Logger;
|
|
153
|
+
/**
|
|
154
|
+
* Log a trace message. Use this as a template string prefix.
|
|
155
|
+
*
|
|
156
|
+
* ```typescript
|
|
157
|
+
* logger.trace `A trace message with ${value}.`;
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
160
|
+
* @param message The message template strings array.
|
|
161
|
+
* @param values The message template values.
|
|
162
|
+
* @since 0.12.0
|
|
163
|
+
*/
|
|
164
|
+
trace(message: TemplateStringsArray, ...values: readonly unknown[]): void;
|
|
165
|
+
/**
|
|
166
|
+
* Log a trace message with properties.
|
|
167
|
+
*
|
|
168
|
+
* ```typescript
|
|
169
|
+
* logger.trace('A trace message with {value}.', { value });
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
173
|
+
* returns the properties:
|
|
174
|
+
*
|
|
175
|
+
* ```typescript
|
|
176
|
+
* logger.trace(
|
|
177
|
+
* 'A trace message with {value}.',
|
|
178
|
+
* () => ({ value: expensiveComputation() })
|
|
179
|
+
* );
|
|
180
|
+
* ```
|
|
181
|
+
*
|
|
182
|
+
* @param message The message template. Placeholders to be replaced with
|
|
183
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
184
|
+
* `{value}`).
|
|
185
|
+
* @param properties The values to replace placeholders with. For lazy
|
|
186
|
+
* evaluation, this can be a callback that returns the
|
|
187
|
+
* properties.
|
|
188
|
+
* @since 0.12.0
|
|
189
|
+
*/
|
|
190
|
+
trace(message: string, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
191
|
+
/**
|
|
192
|
+
* Log a trace message with properties computed asynchronously.
|
|
193
|
+
*
|
|
194
|
+
* Use this when the properties require async operations to compute:
|
|
195
|
+
*
|
|
196
|
+
* ```typescript
|
|
197
|
+
* await logger.trace(
|
|
198
|
+
* 'A trace message with {value}.',
|
|
199
|
+
* async () => ({ value: await fetchValue() })
|
|
200
|
+
* );
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* @param message The message template. Placeholders to be replaced with
|
|
204
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
205
|
+
* `{value}`).
|
|
206
|
+
* @param properties An async callback that returns the properties.
|
|
207
|
+
* @returns A promise that resolves when the log is written.
|
|
208
|
+
* @since 2.0.0
|
|
209
|
+
*/
|
|
210
|
+
trace(message: string, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
211
|
+
/**
|
|
212
|
+
* Log a trace values with no message. This is useful when you
|
|
213
|
+
* want to log properties without a message, e.g., when you want to log
|
|
214
|
+
* the context of a request or an operation.
|
|
215
|
+
*
|
|
216
|
+
* ```typescript
|
|
217
|
+
* logger.trace({ method: 'GET', url: '/api/v1/resource' });
|
|
218
|
+
* ```
|
|
219
|
+
*
|
|
220
|
+
* Note that this is a shorthand for:
|
|
221
|
+
*
|
|
222
|
+
* ```typescript
|
|
223
|
+
* logger.trace('{*}', { method: 'GET', url: '/api/v1/resource' });
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* If the properties are expensive to compute, you cannot use this shorthand
|
|
227
|
+
* and should use the following syntax instead:
|
|
228
|
+
*
|
|
229
|
+
* ```typescript
|
|
230
|
+
* logger.trace('{*}', () => ({
|
|
231
|
+
* method: expensiveMethod(),
|
|
232
|
+
* url: expensiveUrl(),
|
|
233
|
+
* }));
|
|
234
|
+
* ```
|
|
235
|
+
*
|
|
236
|
+
* @param properties The values to log. Note that this does not take
|
|
237
|
+
* a callback.
|
|
238
|
+
* @since 0.12.0
|
|
239
|
+
*/
|
|
240
|
+
trace(properties: Record<string, unknown>): void;
|
|
241
|
+
/**
|
|
242
|
+
* Lazily log a trace message. Use this when the message values are expensive
|
|
243
|
+
* to compute and should only be computed if the message is actually logged.
|
|
244
|
+
*
|
|
245
|
+
* ```typescript
|
|
246
|
+
* logger.trace(l => l`A trace message with ${expensiveValue()}.`);
|
|
247
|
+
* ```
|
|
248
|
+
*
|
|
249
|
+
* @param callback A callback that returns the message template prefix.
|
|
250
|
+
* @throws {TypeError} If no log record was made inside the callback.
|
|
251
|
+
* @since 0.12.0
|
|
252
|
+
*/
|
|
253
|
+
trace(callback: LogCallback): void;
|
|
254
|
+
/**
|
|
255
|
+
* Log a debug message. Use this as a template string prefix.
|
|
256
|
+
*
|
|
257
|
+
* ```typescript
|
|
258
|
+
* logger.debug `A debug message with ${value}.`;
|
|
259
|
+
* ```
|
|
260
|
+
*
|
|
261
|
+
* @param message The message template strings array.
|
|
262
|
+
* @param values The message template values.
|
|
263
|
+
*/
|
|
264
|
+
debug(message: TemplateStringsArray, ...values: readonly unknown[]): void;
|
|
265
|
+
/**
|
|
266
|
+
* Log a debug message with properties.
|
|
267
|
+
*
|
|
268
|
+
* ```typescript
|
|
269
|
+
* logger.debug('A debug message with {value}.', { value });
|
|
270
|
+
* ```
|
|
271
|
+
*
|
|
272
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
273
|
+
* returns the properties:
|
|
274
|
+
*
|
|
275
|
+
* ```typescript
|
|
276
|
+
* logger.debug(
|
|
277
|
+
* 'A debug message with {value}.',
|
|
278
|
+
* () => ({ value: expensiveComputation() })
|
|
279
|
+
* );
|
|
280
|
+
* ```
|
|
281
|
+
*
|
|
282
|
+
* @param message The message template. Placeholders to be replaced with
|
|
283
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
284
|
+
* `{value}`).
|
|
285
|
+
* @param properties The values to replace placeholders with. For lazy
|
|
286
|
+
* evaluation, this can be a callback that returns the
|
|
287
|
+
* properties.
|
|
288
|
+
*/
|
|
289
|
+
debug(message: string, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
290
|
+
/**
|
|
291
|
+
* Log a debug message with properties computed asynchronously.
|
|
292
|
+
*
|
|
293
|
+
* Use this when the properties require async operations to compute:
|
|
294
|
+
*
|
|
295
|
+
* ```typescript
|
|
296
|
+
* await logger.debug(
|
|
297
|
+
* 'A debug message with {value}.',
|
|
298
|
+
* async () => ({ value: await fetchValue() })
|
|
299
|
+
* );
|
|
300
|
+
* ```
|
|
301
|
+
*
|
|
302
|
+
* @param message The message template. Placeholders to be replaced with
|
|
303
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
304
|
+
* `{value}`).
|
|
305
|
+
* @param properties An async callback that returns the properties.
|
|
306
|
+
* @returns A promise that resolves when the log is written.
|
|
307
|
+
* @since 2.0.0
|
|
308
|
+
*/
|
|
309
|
+
debug(message: string, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
310
|
+
/**
|
|
311
|
+
* Log a debug values with no message. This is useful when you
|
|
312
|
+
* want to log properties without a message, e.g., when you want to log
|
|
313
|
+
* the context of a request or an operation.
|
|
314
|
+
*
|
|
315
|
+
* ```typescript
|
|
316
|
+
* logger.debug({ method: 'GET', url: '/api/v1/resource' });
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
319
|
+
* Note that this is a shorthand for:
|
|
320
|
+
*
|
|
321
|
+
* ```typescript
|
|
322
|
+
* logger.debug('{*}', { method: 'GET', url: '/api/v1/resource' });
|
|
323
|
+
* ```
|
|
324
|
+
*
|
|
325
|
+
* If the properties are expensive to compute, you cannot use this shorthand
|
|
326
|
+
* and should use the following syntax instead:
|
|
327
|
+
*
|
|
328
|
+
* ```typescript
|
|
329
|
+
* logger.debug('{*}', () => ({
|
|
330
|
+
* method: expensiveMethod(),
|
|
331
|
+
* url: expensiveUrl(),
|
|
332
|
+
* }));
|
|
333
|
+
* ```
|
|
334
|
+
*
|
|
335
|
+
* @param properties The values to log. Note that this does not take
|
|
336
|
+
* a callback.
|
|
337
|
+
* @since 0.11.0
|
|
338
|
+
*/
|
|
339
|
+
debug(properties: Record<string, unknown>): void;
|
|
340
|
+
/**
|
|
341
|
+
* Lazily log a debug message. Use this when the message values are expensive
|
|
342
|
+
* to compute and should only be computed if the message is actually logged.
|
|
343
|
+
*
|
|
344
|
+
* ```typescript
|
|
345
|
+
* logger.debug(l => l`A debug message with ${expensiveValue()}.`);
|
|
346
|
+
* ```
|
|
347
|
+
*
|
|
348
|
+
* @param callback A callback that returns the message template prefix.
|
|
349
|
+
* @throws {TypeError} If no log record was made inside the callback.
|
|
350
|
+
*/
|
|
351
|
+
debug(callback: LogCallback): void;
|
|
352
|
+
/**
|
|
353
|
+
* Log an informational message. Use this as a template string prefix.
|
|
354
|
+
*
|
|
355
|
+
* ```typescript
|
|
356
|
+
* logger.info `An info message with ${value}.`;
|
|
357
|
+
* ```
|
|
358
|
+
*
|
|
359
|
+
* @param message The message template strings array.
|
|
360
|
+
* @param values The message template values.
|
|
361
|
+
*/
|
|
362
|
+
info(message: TemplateStringsArray, ...values: readonly unknown[]): void;
|
|
363
|
+
/**
|
|
364
|
+
* Log an informational message with properties.
|
|
365
|
+
*
|
|
366
|
+
* ```typescript
|
|
367
|
+
* logger.info('An info message with {value}.', { value });
|
|
368
|
+
* ```
|
|
369
|
+
*
|
|
370
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
371
|
+
* returns the properties:
|
|
372
|
+
*
|
|
373
|
+
* ```typescript
|
|
374
|
+
* logger.info(
|
|
375
|
+
* 'An info message with {value}.',
|
|
376
|
+
* () => ({ value: expensiveComputation() })
|
|
377
|
+
* );
|
|
378
|
+
* ```
|
|
379
|
+
*
|
|
380
|
+
* @param message The message template. Placeholders to be replaced with
|
|
381
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
382
|
+
* `{value}`).
|
|
383
|
+
* @param properties The values to replace placeholders with. For lazy
|
|
384
|
+
* evaluation, this can be a callback that returns the
|
|
385
|
+
* properties.
|
|
386
|
+
*/
|
|
387
|
+
info(message: string, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
388
|
+
/**
|
|
389
|
+
* Log an informational message with properties computed asynchronously.
|
|
390
|
+
*
|
|
391
|
+
* Use this when the properties require async operations to compute:
|
|
392
|
+
*
|
|
393
|
+
* ```typescript
|
|
394
|
+
* await logger.info(
|
|
395
|
+
* 'An info message with {value}.',
|
|
396
|
+
* async () => ({ value: await fetchValue() })
|
|
397
|
+
* );
|
|
398
|
+
* ```
|
|
399
|
+
*
|
|
400
|
+
* @param message The message template. Placeholders to be replaced with
|
|
401
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
402
|
+
* `{value}`).
|
|
403
|
+
* @param properties An async callback that returns the properties.
|
|
404
|
+
* @returns A promise that resolves when the log is written.
|
|
405
|
+
* @since 2.0.0
|
|
406
|
+
*/
|
|
407
|
+
info(message: string, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
408
|
+
/**
|
|
409
|
+
* Log an informational values with no message. This is useful when you
|
|
410
|
+
* want to log properties without a message, e.g., when you want to log
|
|
411
|
+
* the context of a request or an operation.
|
|
412
|
+
*
|
|
413
|
+
* ```typescript
|
|
414
|
+
* logger.info({ method: 'GET', url: '/api/v1/resource' });
|
|
415
|
+
* ```
|
|
416
|
+
*
|
|
417
|
+
* Note that this is a shorthand for:
|
|
418
|
+
*
|
|
419
|
+
* ```typescript
|
|
420
|
+
* logger.info('{*}', { method: 'GET', url: '/api/v1/resource' });
|
|
421
|
+
* ```
|
|
422
|
+
*
|
|
423
|
+
* If the properties are expensive to compute, you cannot use this shorthand
|
|
424
|
+
* and should use the following syntax instead:
|
|
425
|
+
*
|
|
426
|
+
* ```typescript
|
|
427
|
+
* logger.info('{*}', () => ({
|
|
428
|
+
* method: expensiveMethod(),
|
|
429
|
+
* url: expensiveUrl(),
|
|
430
|
+
* }));
|
|
431
|
+
* ```
|
|
432
|
+
*
|
|
433
|
+
* @param properties The values to log. Note that this does not take
|
|
434
|
+
* a callback.
|
|
435
|
+
* @since 0.11.0
|
|
436
|
+
*/
|
|
437
|
+
info(properties: Record<string, unknown>): void;
|
|
438
|
+
/**
|
|
439
|
+
* Lazily log an informational message. Use this when the message values are
|
|
440
|
+
* expensive to compute and should only be computed if the message is actually
|
|
441
|
+
* logged.
|
|
442
|
+
*
|
|
443
|
+
* ```typescript
|
|
444
|
+
* logger.info(l => l`An info message with ${expensiveValue()}.`);
|
|
445
|
+
* ```
|
|
446
|
+
*
|
|
447
|
+
* @param callback A callback that returns the message template prefix.
|
|
448
|
+
* @throws {TypeError} If no log record was made inside the callback.
|
|
449
|
+
*/
|
|
450
|
+
info(callback: LogCallback): void;
|
|
451
|
+
/**
|
|
452
|
+
* Log a warning.
|
|
453
|
+
*
|
|
454
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
455
|
+
* structured property.
|
|
456
|
+
*
|
|
457
|
+
* ```typescript
|
|
458
|
+
* logger.warn(new Error("Oops"));
|
|
459
|
+
* ```
|
|
460
|
+
*
|
|
461
|
+
* Note that this uses `{error.message}` as the default message template.
|
|
462
|
+
* If you want to include the stack trace in text output, include `{error}`
|
|
463
|
+
* in the message template instead.
|
|
464
|
+
*
|
|
465
|
+
* @param error The error to log.
|
|
466
|
+
* @since 2.0.0
|
|
467
|
+
*/
|
|
468
|
+
warn(error: Error): void;
|
|
469
|
+
/**
|
|
470
|
+
* Log a warning with additional properties.
|
|
471
|
+
*
|
|
472
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
473
|
+
* structured property while also adding extra properties.
|
|
474
|
+
*
|
|
475
|
+
* ```typescript
|
|
476
|
+
* logger.warn(new Error("Oops"), { requestId });
|
|
477
|
+
* ```
|
|
478
|
+
*
|
|
479
|
+
* @param error The error to log.
|
|
480
|
+
* @param properties Additional properties to log alongside the error.
|
|
481
|
+
* @since 2.1.0
|
|
482
|
+
*/
|
|
483
|
+
warn(error: Error, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
484
|
+
/**
|
|
485
|
+
* Log a warning with additional properties computed asynchronously.
|
|
486
|
+
*
|
|
487
|
+
* @param error The error to log.
|
|
488
|
+
* @param properties An async callback that returns the properties.
|
|
489
|
+
* @returns A promise that resolves when the log is written.
|
|
490
|
+
* @since 2.1.0
|
|
491
|
+
*/
|
|
492
|
+
warn(error: Error, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
493
|
+
/**
|
|
494
|
+
* Log a warning message with an {@link Error}.
|
|
495
|
+
*
|
|
496
|
+
* ```typescript
|
|
497
|
+
* logger.warn("Failed to do something", new Error("Oops"));
|
|
498
|
+
* ```
|
|
499
|
+
*
|
|
500
|
+
* @param message The message.
|
|
501
|
+
* @param error The error to log.
|
|
502
|
+
* @since 2.0.0
|
|
503
|
+
*/
|
|
504
|
+
warn(message: string, error: Error): void;
|
|
505
|
+
/**
|
|
506
|
+
* Log a warning message. Use this as a template string prefix.
|
|
507
|
+
*
|
|
508
|
+
* ```typescript
|
|
509
|
+
* logger.warn `A warning message with ${value}.`;
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
* @param message The message template strings array.
|
|
513
|
+
* @param values The message template values.
|
|
514
|
+
*/
|
|
515
|
+
warn(message: TemplateStringsArray, ...values: readonly unknown[]): void;
|
|
516
|
+
/**
|
|
517
|
+
* Log a warning message with properties.
|
|
518
|
+
*
|
|
519
|
+
* ```typescript
|
|
520
|
+
* logger.warn('A warning message with {value}.', { value });
|
|
521
|
+
* ```
|
|
522
|
+
*
|
|
523
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
524
|
+
* returns the properties:
|
|
525
|
+
*
|
|
526
|
+
* ```typescript
|
|
527
|
+
* logger.warn(
|
|
528
|
+
* 'A warning message with {value}.',
|
|
529
|
+
* () => ({ value: expensiveComputation() })
|
|
530
|
+
* );
|
|
531
|
+
* ```
|
|
532
|
+
*
|
|
533
|
+
* @param message The message template. Placeholders to be replaced with
|
|
534
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
535
|
+
* `{value}`).
|
|
536
|
+
* @param properties The values to replace placeholders with. For lazy
|
|
537
|
+
* evaluation, this can be a callback that returns the
|
|
538
|
+
* properties.
|
|
539
|
+
*/
|
|
540
|
+
warn(message: string, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
541
|
+
/**
|
|
542
|
+
* Log a warning message with properties computed asynchronously.
|
|
543
|
+
*
|
|
544
|
+
* Use this when the properties require async operations to compute:
|
|
545
|
+
*
|
|
546
|
+
* ```typescript
|
|
547
|
+
* await logger.warn(
|
|
548
|
+
* 'A warning message with {value}.',
|
|
549
|
+
* async () => ({ value: await fetchValue() })
|
|
550
|
+
* );
|
|
551
|
+
* ```
|
|
552
|
+
*
|
|
553
|
+
* @param message The message template. Placeholders to be replaced with
|
|
554
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
555
|
+
* `{value}`).
|
|
556
|
+
* @param properties An async callback that returns the properties.
|
|
557
|
+
* @returns A promise that resolves when the log is written.
|
|
558
|
+
* @since 2.0.0
|
|
559
|
+
*/
|
|
560
|
+
warn(message: string, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
561
|
+
/**
|
|
562
|
+
* Log a warning values with no message. This is useful when you
|
|
563
|
+
* want to log properties without a message, e.g., when you want to log
|
|
564
|
+
* the context of a request or an operation.
|
|
565
|
+
*
|
|
566
|
+
* ```typescript
|
|
567
|
+
* logger.warn({ method: 'GET', url: '/api/v1/resource' });
|
|
568
|
+
* ```
|
|
569
|
+
*
|
|
570
|
+
* Note that this is a shorthand for:
|
|
571
|
+
*
|
|
572
|
+
* ```typescript
|
|
573
|
+
* logger.warn('{*}', { method: 'GET', url: '/api/v1/resource' });
|
|
574
|
+
* ```
|
|
575
|
+
*
|
|
576
|
+
* If the properties are expensive to compute, you cannot use this shorthand
|
|
577
|
+
* and should use the following syntax instead:
|
|
578
|
+
*
|
|
579
|
+
* ```typescript
|
|
580
|
+
* logger.warn('{*}', () => ({
|
|
581
|
+
* method: expensiveMethod(),
|
|
582
|
+
* url: expensiveUrl(),
|
|
583
|
+
* }));
|
|
584
|
+
* ```
|
|
585
|
+
*
|
|
586
|
+
* @param properties The values to log. Note that this does not take
|
|
587
|
+
* a callback.
|
|
588
|
+
* @since 0.11.0
|
|
589
|
+
*/
|
|
590
|
+
warn(properties: Record<string, unknown>): void;
|
|
591
|
+
/**
|
|
592
|
+
* Lazily log a warning message. Use this when the message values are
|
|
593
|
+
* expensive to compute and should only be computed if the message is actually
|
|
594
|
+
* logged.
|
|
595
|
+
*
|
|
596
|
+
* ```typescript
|
|
597
|
+
* logger.warn(l => l`A warning message with ${expensiveValue()}.`);
|
|
598
|
+
* ```
|
|
599
|
+
*
|
|
600
|
+
* @param callback A callback that returns the message template prefix.
|
|
601
|
+
* @throws {TypeError} If no log record was made inside the callback.
|
|
602
|
+
*/
|
|
603
|
+
warn(callback: LogCallback): void;
|
|
604
|
+
/**
|
|
605
|
+
* Log a warning.
|
|
606
|
+
*
|
|
607
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
608
|
+
* structured property.
|
|
609
|
+
*
|
|
610
|
+
* ```typescript
|
|
611
|
+
* logger.warning(new Error("Oops"));
|
|
612
|
+
* ```
|
|
613
|
+
*
|
|
614
|
+
* Note that this uses `{error.message}` as the default message template.
|
|
615
|
+
* If you want to include the stack trace in text output, include `{error}`
|
|
616
|
+
* in the message template instead.
|
|
617
|
+
*
|
|
618
|
+
* @param error The error to log.
|
|
619
|
+
* @since 2.0.0
|
|
620
|
+
*/
|
|
621
|
+
warning(error: Error): void;
|
|
622
|
+
/**
|
|
623
|
+
* Log a warning with additional properties.
|
|
624
|
+
*
|
|
625
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
626
|
+
* structured property while also adding extra properties.
|
|
627
|
+
*
|
|
628
|
+
* ```typescript
|
|
629
|
+
* logger.warning(new Error("Oops"), { requestId });
|
|
630
|
+
* ```
|
|
631
|
+
*
|
|
632
|
+
* @param error The error to log.
|
|
633
|
+
* @param properties Additional properties to log alongside the error.
|
|
634
|
+
* @since 2.1.0
|
|
635
|
+
*/
|
|
636
|
+
warning(error: Error, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
637
|
+
/**
|
|
638
|
+
* Log a warning with additional properties computed asynchronously.
|
|
639
|
+
*
|
|
640
|
+
* @param error The error to log.
|
|
641
|
+
* @param properties An async callback that returns the properties.
|
|
642
|
+
* @returns A promise that resolves when the log is written.
|
|
643
|
+
* @since 2.1.0
|
|
644
|
+
*/
|
|
645
|
+
warning(error: Error, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
646
|
+
/**
|
|
647
|
+
* Log a warning message with an {@link Error}.
|
|
648
|
+
*
|
|
649
|
+
* ```typescript
|
|
650
|
+
* logger.warning("Failed to do something", new Error("Oops"));
|
|
651
|
+
* ```
|
|
652
|
+
*
|
|
653
|
+
* @param message The message.
|
|
654
|
+
* @param error The error to log.
|
|
655
|
+
* @since 2.0.0
|
|
656
|
+
*/
|
|
657
|
+
warning(message: string, error: Error): void;
|
|
658
|
+
/**
|
|
659
|
+
* Log a warning message. Use this as a template string prefix.
|
|
660
|
+
*
|
|
661
|
+
* ```typescript
|
|
662
|
+
* logger.warning `A warning message with ${value}.`;
|
|
663
|
+
* ```
|
|
664
|
+
*
|
|
665
|
+
* @param message The message template strings array.
|
|
666
|
+
* @param values The message template values.
|
|
667
|
+
* @since 0.12.0
|
|
668
|
+
*/
|
|
669
|
+
warning(message: TemplateStringsArray, ...values: readonly unknown[]): void;
|
|
670
|
+
/**
|
|
671
|
+
* Log a warning message with properties.
|
|
672
|
+
*
|
|
673
|
+
* ```typescript
|
|
674
|
+
* logger.warning('A warning message with {value}.', { value });
|
|
675
|
+
* ```
|
|
676
|
+
*
|
|
677
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
678
|
+
* returns the properties:
|
|
679
|
+
*
|
|
680
|
+
* ```typescript
|
|
681
|
+
* logger.warning(
|
|
682
|
+
* 'A warning message with {value}.',
|
|
683
|
+
* () => ({ value: expensiveComputation() })
|
|
684
|
+
* );
|
|
685
|
+
* ```
|
|
686
|
+
*
|
|
687
|
+
* @param message The message template. Placeholders to be replaced with
|
|
688
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
689
|
+
* `{value}`).
|
|
690
|
+
* @param properties The values to replace placeholders with. For lazy
|
|
691
|
+
* evaluation, this can be a callback that returns the
|
|
692
|
+
* properties.
|
|
693
|
+
* @since 0.12.0
|
|
694
|
+
*/
|
|
695
|
+
warning(message: string, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
696
|
+
/**
|
|
697
|
+
* Log a warning message with properties computed asynchronously.
|
|
698
|
+
*
|
|
699
|
+
* Use this when the properties require async operations to compute:
|
|
700
|
+
*
|
|
701
|
+
* ```typescript
|
|
702
|
+
* await logger.warning(
|
|
703
|
+
* 'A warning message with {value}.',
|
|
704
|
+
* async () => ({ value: await fetchValue() })
|
|
705
|
+
* );
|
|
706
|
+
* ```
|
|
707
|
+
*
|
|
708
|
+
* @param message The message template. Placeholders to be replaced with
|
|
709
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
710
|
+
* `{value}`).
|
|
711
|
+
* @param properties An async callback that returns the properties.
|
|
712
|
+
* @returns A promise that resolves when the log is written.
|
|
713
|
+
* @since 2.0.0
|
|
714
|
+
*/
|
|
715
|
+
warning(message: string, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
716
|
+
/**
|
|
717
|
+
* Log a warning values with no message. This is useful when you
|
|
718
|
+
* want to log properties without a message, e.g., when you want to log
|
|
719
|
+
* the context of a request or an operation.
|
|
720
|
+
*
|
|
721
|
+
* ```typescript
|
|
722
|
+
* logger.warning({ method: 'GET', url: '/api/v1/resource' });
|
|
723
|
+
* ```
|
|
724
|
+
*
|
|
725
|
+
* Note that this is a shorthand for:
|
|
726
|
+
*
|
|
727
|
+
* ```typescript
|
|
728
|
+
* logger.warning('{*}', { method: 'GET', url: '/api/v1/resource' });
|
|
729
|
+
* ```
|
|
730
|
+
*
|
|
731
|
+
* If the properties are expensive to compute, you cannot use this shorthand
|
|
732
|
+
* and should use the following syntax instead:
|
|
733
|
+
*
|
|
734
|
+
* ```typescript
|
|
735
|
+
* logger.warning('{*}', () => ({
|
|
736
|
+
* method: expensiveMethod(),
|
|
737
|
+
* url: expensiveUrl(),
|
|
738
|
+
* }));
|
|
739
|
+
* ```
|
|
740
|
+
*
|
|
741
|
+
* @param properties The values to log. Note that this does not take
|
|
742
|
+
* a callback.
|
|
743
|
+
* @since 0.12.0
|
|
744
|
+
*/
|
|
745
|
+
warning(properties: Record<string, unknown>): void;
|
|
746
|
+
/**
|
|
747
|
+
* Lazily log a warning message. Use this when the message values are
|
|
748
|
+
* expensive to compute and should only be computed if the message is actually
|
|
749
|
+
* logged.
|
|
750
|
+
*
|
|
751
|
+
* ```typescript
|
|
752
|
+
* logger.warning(l => l`A warning message with ${expensiveValue()}.`);
|
|
753
|
+
* ```
|
|
754
|
+
*
|
|
755
|
+
* @param callback A callback that returns the message template prefix.
|
|
756
|
+
* @throws {TypeError} If no log record was made inside the callback.
|
|
757
|
+
* @since 0.12.0
|
|
758
|
+
*/
|
|
759
|
+
warning(callback: LogCallback): void;
|
|
760
|
+
/**
|
|
761
|
+
* Log an error.
|
|
762
|
+
*
|
|
763
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
764
|
+
* structured property.
|
|
765
|
+
*
|
|
766
|
+
* ```typescript
|
|
767
|
+
* logger.error(new Error("Oops"));
|
|
768
|
+
* ```
|
|
769
|
+
*
|
|
770
|
+
* Note that this uses `{error.message}` as the default message template.
|
|
771
|
+
* If you want to include the stack trace in text output, include `{error}`
|
|
772
|
+
* in the message template instead.
|
|
773
|
+
*
|
|
774
|
+
* @param error The error to log.
|
|
775
|
+
* @since 2.0.0
|
|
776
|
+
*/
|
|
777
|
+
error(error: Error): void;
|
|
778
|
+
/**
|
|
779
|
+
* Log an error with additional properties.
|
|
780
|
+
*
|
|
781
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
782
|
+
* structured property while also adding extra properties.
|
|
783
|
+
*
|
|
784
|
+
* ```typescript
|
|
785
|
+
* logger.error(new Error("Oops"), { requestId });
|
|
786
|
+
* ```
|
|
787
|
+
*
|
|
788
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
789
|
+
* returns the properties:
|
|
790
|
+
*
|
|
791
|
+
* ```typescript
|
|
792
|
+
* logger.error(
|
|
793
|
+
* new Error("Oops"),
|
|
794
|
+
* () => ({ requestId: expensiveLookup() })
|
|
795
|
+
* );
|
|
796
|
+
* ```
|
|
797
|
+
*
|
|
798
|
+
* @param error The error to log.
|
|
799
|
+
* @param properties Additional properties to log alongside the error.
|
|
800
|
+
* @since 2.1.0
|
|
801
|
+
*/
|
|
802
|
+
error(error: Error, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
803
|
+
/**
|
|
804
|
+
* Log an error with additional properties computed asynchronously.
|
|
805
|
+
*
|
|
806
|
+
* Use this when the properties require async operations to compute:
|
|
807
|
+
*
|
|
808
|
+
* ```typescript
|
|
809
|
+
* await logger.error(
|
|
810
|
+
* new Error("Oops"),
|
|
811
|
+
* async () => ({ requestId: await fetchRequestId() })
|
|
812
|
+
* );
|
|
813
|
+
* ```
|
|
814
|
+
*
|
|
815
|
+
* @param error The error to log.
|
|
816
|
+
* @param properties An async callback that returns the properties.
|
|
817
|
+
* @returns A promise that resolves when the log is written.
|
|
818
|
+
* @since 2.1.0
|
|
819
|
+
*/
|
|
820
|
+
error(error: Error, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
821
|
+
/**
|
|
822
|
+
* Log an error message with an {@link Error}.
|
|
823
|
+
*
|
|
824
|
+
* ```typescript
|
|
825
|
+
* logger.error("Failed to do something", new Error("Oops"));
|
|
826
|
+
* ```
|
|
827
|
+
*
|
|
828
|
+
* @param message The message.
|
|
829
|
+
* @param error The error to log.
|
|
830
|
+
* @since 2.0.0
|
|
831
|
+
*/
|
|
832
|
+
error(message: string, error: Error): void;
|
|
833
|
+
/**
|
|
834
|
+
* Log an error message. Use this as a template string prefix.
|
|
835
|
+
*
|
|
836
|
+
* ```typescript
|
|
837
|
+
* logger.error `An error message with ${value}.`;
|
|
838
|
+
* ```
|
|
839
|
+
*
|
|
840
|
+
* @param message The message template strings array.
|
|
841
|
+
* @param values The message template values.
|
|
842
|
+
*/
|
|
843
|
+
error(message: TemplateStringsArray, ...values: readonly unknown[]): void;
|
|
844
|
+
/**
|
|
845
|
+
* Log an error message with properties.
|
|
846
|
+
*
|
|
847
|
+
* ```typescript
|
|
848
|
+
* logger.warn('An error message with {value}.', { value });
|
|
849
|
+
* ```
|
|
850
|
+
*
|
|
851
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
852
|
+
* returns the properties:
|
|
853
|
+
*
|
|
854
|
+
* ```typescript
|
|
855
|
+
* logger.error(
|
|
856
|
+
* 'An error message with {value}.',
|
|
857
|
+
* () => ({ value: expensiveComputation() })
|
|
858
|
+
* );
|
|
859
|
+
* ```
|
|
860
|
+
*
|
|
861
|
+
* @param message The message template. Placeholders to be replaced with
|
|
862
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
863
|
+
* `{value}`).
|
|
864
|
+
* @param properties The values to replace placeholders with. For lazy
|
|
865
|
+
* evaluation, this can be a callback that returns the
|
|
866
|
+
* properties.
|
|
867
|
+
*/
|
|
868
|
+
error(message: string, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
869
|
+
/**
|
|
870
|
+
* Log an error message with properties computed asynchronously.
|
|
871
|
+
*
|
|
872
|
+
* Use this when the properties require async operations to compute:
|
|
873
|
+
*
|
|
874
|
+
* ```typescript
|
|
875
|
+
* await logger.error(
|
|
876
|
+
* 'An error message with {value}.',
|
|
877
|
+
* async () => ({ value: await fetchValue() })
|
|
878
|
+
* );
|
|
879
|
+
* ```
|
|
880
|
+
*
|
|
881
|
+
* @param message The message template. Placeholders to be replaced with
|
|
882
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
883
|
+
* `{value}`).
|
|
884
|
+
* @param properties An async callback that returns the properties.
|
|
885
|
+
* @returns A promise that resolves when the log is written.
|
|
886
|
+
* @since 2.0.0
|
|
887
|
+
*/
|
|
888
|
+
error(message: string, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
889
|
+
/**
|
|
890
|
+
* Log an error values with no message. This is useful when you
|
|
891
|
+
* want to log properties without a message, e.g., when you want to log
|
|
892
|
+
* the context of a request or an operation.
|
|
893
|
+
*
|
|
894
|
+
* ```typescript
|
|
895
|
+
* logger.error({ method: 'GET', url: '/api/v1/resource' });
|
|
896
|
+
* ```
|
|
897
|
+
*
|
|
898
|
+
* Note that this is a shorthand for:
|
|
899
|
+
*
|
|
900
|
+
* ```typescript
|
|
901
|
+
* logger.error('{*}', { method: 'GET', url: '/api/v1/resource' });
|
|
902
|
+
* ```
|
|
903
|
+
*
|
|
904
|
+
* If the properties are expensive to compute, you cannot use this shorthand
|
|
905
|
+
* and should use the following syntax instead:
|
|
906
|
+
*
|
|
907
|
+
* ```typescript
|
|
908
|
+
* logger.error('{*}', () => ({
|
|
909
|
+
* method: expensiveMethod(),
|
|
910
|
+
* url: expensiveUrl(),
|
|
911
|
+
* }));
|
|
912
|
+
* ```
|
|
913
|
+
*
|
|
914
|
+
* @param properties The values to log. Note that this does not take
|
|
915
|
+
* a callback.
|
|
916
|
+
* @since 0.11.0
|
|
917
|
+
*/
|
|
918
|
+
error(properties: Record<string, unknown>): void;
|
|
919
|
+
/**
|
|
920
|
+
* Lazily log an error message. Use this when the message values are
|
|
921
|
+
* expensive to compute and should only be computed if the message is actually
|
|
922
|
+
* logged.
|
|
923
|
+
*
|
|
924
|
+
* ```typescript
|
|
925
|
+
* logger.error(l => l`An error message with ${expensiveValue()}.`);
|
|
926
|
+
* ```
|
|
927
|
+
*
|
|
928
|
+
* @param callback A callback that returns the message template prefix.
|
|
929
|
+
* @throws {TypeError} If no log record was made inside the callback.
|
|
930
|
+
*/
|
|
931
|
+
error(callback: LogCallback): void;
|
|
932
|
+
/**
|
|
933
|
+
* Log a fatal error.
|
|
934
|
+
*
|
|
935
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
936
|
+
* structured property.
|
|
937
|
+
*
|
|
938
|
+
* ```typescript
|
|
939
|
+
* logger.fatal(new Error("Oops"));
|
|
940
|
+
* ```
|
|
941
|
+
*
|
|
942
|
+
* Note that this uses `{error.message}` as the default message template.
|
|
943
|
+
* If you want to include the stack trace in text output, include `{error}`
|
|
944
|
+
* in the message template instead.
|
|
945
|
+
*
|
|
946
|
+
* @param error The error to log.
|
|
947
|
+
* @since 2.0.0
|
|
948
|
+
*/
|
|
949
|
+
fatal(error: Error): void;
|
|
950
|
+
/**
|
|
951
|
+
* Log a fatal error with additional properties.
|
|
952
|
+
*
|
|
953
|
+
* This overload is a shorthand for logging an {@link Error} instance as a
|
|
954
|
+
* structured property while also adding extra properties.
|
|
955
|
+
*
|
|
956
|
+
* ```typescript
|
|
957
|
+
* logger.fatal(new Error("Oops"), { requestId });
|
|
958
|
+
* ```
|
|
959
|
+
*
|
|
960
|
+
* @param error The error to log.
|
|
961
|
+
* @param properties Additional properties to log alongside the error.
|
|
962
|
+
* @since 2.1.0
|
|
963
|
+
*/
|
|
964
|
+
fatal(error: Error, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
965
|
+
/**
|
|
966
|
+
* Log a fatal error with additional properties computed asynchronously.
|
|
967
|
+
*
|
|
968
|
+
* @param error The error to log.
|
|
969
|
+
* @param properties An async callback that returns the properties.
|
|
970
|
+
* @returns A promise that resolves when the log is written.
|
|
971
|
+
* @since 2.1.0
|
|
972
|
+
*/
|
|
973
|
+
fatal(error: Error, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
974
|
+
/**
|
|
975
|
+
* Log a fatal error message with an {@link Error}.
|
|
976
|
+
*
|
|
977
|
+
* ```typescript
|
|
978
|
+
* logger.fatal("Failed to do something", new Error("Oops"));
|
|
979
|
+
* ```
|
|
980
|
+
*
|
|
981
|
+
* @param message The message.
|
|
982
|
+
* @param error The error to log.
|
|
983
|
+
* @since 2.0.0
|
|
984
|
+
*/
|
|
985
|
+
fatal(message: string, error: Error): void;
|
|
986
|
+
/**
|
|
987
|
+
* Log a fatal error message. Use this as a template string prefix.
|
|
988
|
+
*
|
|
989
|
+
* ```typescript
|
|
990
|
+
* logger.fatal `A fatal error message with ${value}.`;
|
|
991
|
+
* ```
|
|
992
|
+
*
|
|
993
|
+
* @param message The message template strings array.
|
|
994
|
+
* @param values The message template values.
|
|
995
|
+
*/
|
|
996
|
+
fatal(message: TemplateStringsArray, ...values: readonly unknown[]): void;
|
|
997
|
+
/**
|
|
998
|
+
* Log a fatal error message with properties.
|
|
999
|
+
*
|
|
1000
|
+
* ```typescript
|
|
1001
|
+
* logger.warn('A fatal error message with {value}.', { value });
|
|
1002
|
+
* ```
|
|
1003
|
+
*
|
|
1004
|
+
* If the properties are expensive to compute, you can pass a callback that
|
|
1005
|
+
* returns the properties:
|
|
1006
|
+
*
|
|
1007
|
+
* ```typescript
|
|
1008
|
+
* logger.fatal(
|
|
1009
|
+
* 'A fatal error message with {value}.',
|
|
1010
|
+
* () => ({ value: expensiveComputation() })
|
|
1011
|
+
* );
|
|
1012
|
+
* ```
|
|
1013
|
+
*
|
|
1014
|
+
* @param message The message template. Placeholders to be replaced with
|
|
1015
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
1016
|
+
* `{value}`).
|
|
1017
|
+
* @param properties The values to replace placeholders with. For lazy
|
|
1018
|
+
* evaluation, this can be a callback that returns the
|
|
1019
|
+
* properties.
|
|
1020
|
+
*/
|
|
1021
|
+
fatal(message: string, properties?: Record<string, unknown> | (() => Record<string, unknown>)): void;
|
|
1022
|
+
/**
|
|
1023
|
+
* Log a fatal error message with properties computed asynchronously.
|
|
1024
|
+
*
|
|
1025
|
+
* Use this when the properties require async operations to compute:
|
|
1026
|
+
*
|
|
1027
|
+
* ```typescript
|
|
1028
|
+
* await logger.fatal(
|
|
1029
|
+
* 'A fatal error message with {value}.',
|
|
1030
|
+
* async () => ({ value: await fetchValue() })
|
|
1031
|
+
* );
|
|
1032
|
+
* ```
|
|
1033
|
+
*
|
|
1034
|
+
* @param message The message template. Placeholders to be replaced with
|
|
1035
|
+
* `values` are indicated by keys in curly braces (e.g.,
|
|
1036
|
+
* `{value}`).
|
|
1037
|
+
* @param properties An async callback that returns the properties.
|
|
1038
|
+
* @returns A promise that resolves when the log is written.
|
|
1039
|
+
* @since 2.0.0
|
|
1040
|
+
*/
|
|
1041
|
+
fatal(message: string, properties: () => Promise<Record<string, unknown>>): Promise<void>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Log a fatal error values with no message. This is useful when you
|
|
1044
|
+
* want to log properties without a message, e.g., when you want to log
|
|
1045
|
+
* the context of a request or an operation.
|
|
1046
|
+
*
|
|
1047
|
+
* ```typescript
|
|
1048
|
+
* logger.fatal({ method: 'GET', url: '/api/v1/resource' });
|
|
1049
|
+
* ```
|
|
1050
|
+
*
|
|
1051
|
+
* Note that this is a shorthand for:
|
|
1052
|
+
*
|
|
1053
|
+
* ```typescript
|
|
1054
|
+
* logger.fatal('{*}', { method: 'GET', url: '/api/v1/resource' });
|
|
1055
|
+
* ```
|
|
1056
|
+
*
|
|
1057
|
+
* If the properties are expensive to compute, you cannot use this shorthand
|
|
1058
|
+
* and should use the following syntax instead:
|
|
1059
|
+
*
|
|
1060
|
+
* ```typescript
|
|
1061
|
+
* logger.fatal('{*}', () => ({
|
|
1062
|
+
* method: expensiveMethod(),
|
|
1063
|
+
* url: expensiveUrl(),
|
|
1064
|
+
* }));
|
|
1065
|
+
* ```
|
|
1066
|
+
*
|
|
1067
|
+
* @param properties The values to log. Note that this does not take
|
|
1068
|
+
* a callback.
|
|
1069
|
+
* @since 0.11.0
|
|
1070
|
+
*/
|
|
1071
|
+
fatal(properties: Record<string, unknown>): void;
|
|
1072
|
+
/**
|
|
1073
|
+
* Lazily log a fatal error message. Use this when the message values are
|
|
1074
|
+
* expensive to compute and should only be computed if the message is actually
|
|
1075
|
+
* logged.
|
|
1076
|
+
*
|
|
1077
|
+
* ```typescript
|
|
1078
|
+
* logger.fatal(l => l`A fatal error message with ${expensiveValue()}.`);
|
|
1079
|
+
* ```
|
|
1080
|
+
*
|
|
1081
|
+
* @param callback A callback that returns the message template prefix.
|
|
1082
|
+
* @throws {TypeError} If no log record was made inside the callback.
|
|
1083
|
+
*/
|
|
1084
|
+
fatal(callback: LogCallback): void;
|
|
1085
|
+
/**
|
|
1086
|
+
* Emits a log record with custom fields while using this logger's
|
|
1087
|
+
* category.
|
|
1088
|
+
*
|
|
1089
|
+
* This is a low-level API for integration scenarios where you need full
|
|
1090
|
+
* control over the log record, particularly for preserving timestamps
|
|
1091
|
+
* from external systems.
|
|
1092
|
+
*
|
|
1093
|
+
* ```typescript
|
|
1094
|
+
* const logger = getLogger(["my-app", "integration"]);
|
|
1095
|
+
*
|
|
1096
|
+
* // Emit a log with a custom timestamp
|
|
1097
|
+
* logger.emit({
|
|
1098
|
+
* timestamp: kafkaLog.originalTimestamp,
|
|
1099
|
+
* level: "info",
|
|
1100
|
+
* message: [kafkaLog.message],
|
|
1101
|
+
* rawMessage: kafkaLog.message,
|
|
1102
|
+
* properties: {
|
|
1103
|
+
* source: "kafka",
|
|
1104
|
+
* partition: kafkaLog.partition,
|
|
1105
|
+
* offset: kafkaLog.offset,
|
|
1106
|
+
* },
|
|
1107
|
+
* });
|
|
1108
|
+
* ```
|
|
1109
|
+
*
|
|
1110
|
+
* @param record Log record without category field (category comes from
|
|
1111
|
+
* the logger instance)
|
|
1112
|
+
* @since 1.1.0
|
|
1113
|
+
*/
|
|
1114
|
+
emit(record: Omit<LogRecord, "category">): void;
|
|
1115
|
+
/**
|
|
1116
|
+
* Check if a message of the given severity level would be processed by
|
|
1117
|
+
* this logger.
|
|
1118
|
+
*
|
|
1119
|
+
* This is useful for conditionally executing expensive computations
|
|
1120
|
+
* before logging, particularly for async operations where lazy
|
|
1121
|
+
* evaluation callbacks cannot be used:
|
|
1122
|
+
*
|
|
1123
|
+
* ```typescript
|
|
1124
|
+
* if (logger.isEnabledFor("debug")) {
|
|
1125
|
+
* const result = await expensiveAsync();
|
|
1126
|
+
* logger.debug("Result: {result}", { result });
|
|
1127
|
+
* }
|
|
1128
|
+
* ```
|
|
1129
|
+
*
|
|
1130
|
+
* @param level The log level to check.
|
|
1131
|
+
* @returns `true` if a message of the given level would be logged,
|
|
1132
|
+
* `false` otherwise.
|
|
1133
|
+
* @since 2.0.0
|
|
1134
|
+
*/
|
|
1135
|
+
isEnabledFor(level: LogLevel): boolean;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* A logging callback function. It is used to defer the computation of a
|
|
1139
|
+
* message template until it is actually logged.
|
|
1140
|
+
* @param prefix The message template prefix.
|
|
1141
|
+
* @returns The rendered message array.
|
|
1142
|
+
*/
|
|
1143
|
+
type LogCallback = (prefix: LogTemplatePrefix) => unknown[];
|
|
1144
|
+
/**
|
|
1145
|
+
* A logging template prefix function. It is used to log a message in
|
|
1146
|
+
* a {@link LogCallback} function.
|
|
1147
|
+
* @param message The message template strings array.
|
|
1148
|
+
* @param values The message template values.
|
|
1149
|
+
* @returns The rendered message array.
|
|
1150
|
+
*/
|
|
1151
|
+
type LogTemplatePrefix = (message: TemplateStringsArray, ...values: unknown[]) => unknown[];
|
|
1152
|
+
/**
|
|
1153
|
+
* A function type for logging methods in the {@link Logger} interface.
|
|
1154
|
+
* @since 1.0.0
|
|
1155
|
+
*/
|
|
1156
|
+
//#endregion
|
|
1157
|
+
//#region ../layouts/dist/_chunks/types.d.mts
|
|
1158
|
+
/**
|
|
1159
|
+
* invisible edge added by AI to enforce better layout
|
|
1160
|
+
*/
|
|
1161
|
+
interface AIEnforcementEdge {
|
|
1162
|
+
source: NodeId;
|
|
1163
|
+
target: NodeId;
|
|
1164
|
+
weight?: number;
|
|
1165
|
+
minlen?: number;
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* Complete set of AI-generated layout hints.
|
|
1169
|
+
* This is the JSON schema the LLM must produce.
|
|
1170
|
+
*/
|
|
1171
|
+
interface AILayoutHints {
|
|
1172
|
+
direction?: 'TB' | 'BT' | 'LR' | 'RL';
|
|
1173
|
+
ranks: ReadonlyArray<{
|
|
1174
|
+
rank: 'same' | 'source' | 'sink' | 'min' | 'max';
|
|
1175
|
+
nodes: NonEmptyArray<NodeId>;
|
|
1176
|
+
}>;
|
|
1177
|
+
edgeWeight: Record<EdgeId, number>;
|
|
1178
|
+
edgeMinlen: Record<EdgeId, number>;
|
|
1179
|
+
/**
|
|
1180
|
+
* These edges should be reversed in DOT
|
|
1181
|
+
* Unique array of EdgeIds.
|
|
1182
|
+
*/
|
|
1183
|
+
reverseRank?: NonEmptyReadonlyArray<EdgeId>;
|
|
1184
|
+
/**
|
|
1185
|
+
* These edges should be excluded, i.e. `constraint=false` in Graphviz, to allow more flexible layouts.
|
|
1186
|
+
* Unique array of EdgeIds.
|
|
1187
|
+
*/
|
|
1188
|
+
excludeFromRanking?: NonEmptyReadonlyArray<EdgeId>;
|
|
1189
|
+
/**
|
|
1190
|
+
* Suggested order of edges for DOT output, to influence edge routing.
|
|
1191
|
+
*/
|
|
1192
|
+
edgeOrder?: NonEmptyReadonlyArray<EdgeId>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Suggested order of nodes for DOT output, to influence node placement.
|
|
1195
|
+
*/
|
|
1196
|
+
nodeOrder?: NonEmptyReadonlyArray<NodeId>;
|
|
1197
|
+
/**
|
|
1198
|
+
* Invisible edges added by AI to enforce better layout
|
|
1199
|
+
*/
|
|
1200
|
+
invisibleEdges?: NonEmptyReadonlyArray<AIEnforcementEdge>;
|
|
1201
|
+
/**
|
|
1202
|
+
* LLM reasoning for debugging/display
|
|
1203
|
+
*/
|
|
1204
|
+
reasoning: string;
|
|
1205
|
+
} //#endregion
|
|
1206
|
+
//#endregion
|
|
15
1207
|
//#region ../language-server/dist/_chunks/protocol.d.mts
|
|
16
1208
|
/**
|
|
17
1209
|
* When server requests to open a likec4 preview panel
|
|
@@ -20,8 +1212,8 @@ import { ConditionalPick, MergeExclusive, Simplify, Tagged, ValueOf, Writable }
|
|
|
20
1212
|
*/
|
|
21
1213
|
declare namespace DidRequestOpenViewNotification {
|
|
22
1214
|
type Params = {
|
|
23
|
-
viewId: ViewId;
|
|
24
|
-
projectId: ProjectId;
|
|
1215
|
+
viewId: ViewId$1;
|
|
1216
|
+
projectId: ProjectId$1;
|
|
25
1217
|
};
|
|
26
1218
|
const type: NotificationType<Params>;
|
|
27
1219
|
type Type = typeof type;
|
|
@@ -41,7 +1233,7 @@ declare namespace Locate {
|
|
|
41
1233
|
* Locate an element by its fqn
|
|
42
1234
|
*/
|
|
43
1235
|
{
|
|
44
|
-
element: Fqn;
|
|
1236
|
+
element: Fqn$1;
|
|
45
1237
|
projectId?: string | undefined;
|
|
46
1238
|
property?: string;
|
|
47
1239
|
}
|
|
@@ -64,7 +1256,7 @@ declare namespace Locate {
|
|
|
64
1256
|
* Locate a step in a dynamic view by its astPath
|
|
65
1257
|
*/
|
|
66
1258
|
| {
|
|
67
|
-
view: ViewId;
|
|
1259
|
+
view: ViewId$1;
|
|
68
1260
|
astPath: string;
|
|
69
1261
|
projectId?: string | undefined;
|
|
70
1262
|
}
|
|
@@ -72,7 +1264,7 @@ declare namespace Locate {
|
|
|
72
1264
|
* Locate a view by its id
|
|
73
1265
|
*/
|
|
74
1266
|
| {
|
|
75
|
-
view: ViewId;
|
|
1267
|
+
view: ViewId$1;
|
|
76
1268
|
projectId?: string | undefined;
|
|
77
1269
|
};
|
|
78
1270
|
type Res = Location | null;
|
|
@@ -85,7 +1277,7 @@ declare namespace Locate {
|
|
|
85
1277
|
*/
|
|
86
1278
|
declare namespace ChangeView {
|
|
87
1279
|
type Params = {
|
|
88
|
-
viewId: ViewId;
|
|
1280
|
+
viewId: ViewId$1;
|
|
89
1281
|
change: ViewChange;
|
|
90
1282
|
projectId?: string | undefined;
|
|
91
1283
|
};
|
|
@@ -224,7 +1416,7 @@ declare namespace GraphvizJson {
|
|
|
224
1416
|
_ldraw_?: LabelDrawOps[];
|
|
225
1417
|
likec4_type?: 'folder' | 'file';
|
|
226
1418
|
likec4_path?: string;
|
|
227
|
-
likec4_id?: Fqn;
|
|
1419
|
+
likec4_id?: Fqn$1;
|
|
228
1420
|
likec4_level?: number;
|
|
229
1421
|
likec4_depth?: number;
|
|
230
1422
|
_gvid: GvId;
|
|
@@ -237,7 +1429,7 @@ declare namespace GraphvizJson {
|
|
|
237
1429
|
_ldraw_?: LabelDrawOps[];
|
|
238
1430
|
likec4_type?: 'folder' | 'file' | 'view';
|
|
239
1431
|
likec4_path?: string;
|
|
240
|
-
likec4_id?: Fqn;
|
|
1432
|
+
likec4_id?: Fqn$1;
|
|
241
1433
|
likec4_level?: number;
|
|
242
1434
|
_gvid: GvId;
|
|
243
1435
|
height: string;
|
|
@@ -272,7 +1464,7 @@ declare namespace GraphvizJson {
|
|
|
272
1464
|
_hldraw_?: LabelDrawOps[];
|
|
273
1465
|
fontname: string;
|
|
274
1466
|
fontsize: string;
|
|
275
|
-
likec4_id?: EdgeId;
|
|
1467
|
+
likec4_id?: EdgeId$1;
|
|
276
1468
|
label: string;
|
|
277
1469
|
lp: string;
|
|
278
1470
|
nojustify?: 'true' | 'false';
|
|
@@ -289,11 +1481,11 @@ interface GraphvizPort extends Disposable {
|
|
|
289
1481
|
svg(dot: DotSource): Promise<string>;
|
|
290
1482
|
dispose(): void;
|
|
291
1483
|
}
|
|
292
|
-
type LayoutTaskParams<A extends aux.Any = aux.Any> = {
|
|
1484
|
+
type LayoutTaskParams<A extends aux$1.Any = aux$1.Any> = {
|
|
293
1485
|
view: ComputedView<A>;
|
|
294
|
-
styles: LikeC4Styles;
|
|
1486
|
+
styles: LikeC4Styles$1;
|
|
295
1487
|
};
|
|
296
|
-
type LayoutResult<A extends aux.Any = aux.Any> = {
|
|
1488
|
+
type LayoutResult<A extends aux$1.Any = aux$1.Any> = {
|
|
297
1489
|
dot: DotSource;
|
|
298
1490
|
diagram: DiagramView<A>;
|
|
299
1491
|
};
|
|
@@ -304,9 +1496,19 @@ declare class GraphvizLayouter implements Disposable {
|
|
|
304
1496
|
[Symbol.dispose](): void;
|
|
305
1497
|
get graphvizPort(): GraphvizPort;
|
|
306
1498
|
changePort(graphviz: GraphvizPort): void;
|
|
307
|
-
|
|
1499
|
+
/**
|
|
1500
|
+
* Generates DOT source for the given view and styles.
|
|
1501
|
+
* If `hints` are provided, they will be used to influence the layout (e.g. by specifying node/edge order).
|
|
1502
|
+
* This method does not perform unflattening or any other post-processing on the DOT output, so it may be used for debugging or to generate DOT for external processing.
|
|
1503
|
+
*/
|
|
1504
|
+
printToDot(params: LayoutTaskParams, hints?: AILayoutHints): DotSource;
|
|
1505
|
+
protected newScopedLogger(operation: string): any;
|
|
308
1506
|
dotToJson(dot: DotSource): Promise<GraphvizJson>;
|
|
309
1507
|
layout<A extends AnyAux>(params: LayoutTaskParams<A>): Promise<LayoutResult<A>>;
|
|
1508
|
+
aiLayout<A extends AnyAux>({
|
|
1509
|
+
view,
|
|
1510
|
+
styles
|
|
1511
|
+
}: LayoutTaskParams<A>, hints: AILayoutHints): Promise<LayoutResult<A>>;
|
|
310
1512
|
svg<A extends AnyAux>(params: LayoutTaskParams<A>): Promise<{
|
|
311
1513
|
svg: string;
|
|
312
1514
|
dot: DotSource;
|
|
@@ -356,335 +1558,36 @@ declare class QueueGraphvizLayoter extends GraphvizLayouter {
|
|
|
356
1558
|
private waitForQueueToShrink;
|
|
357
1559
|
dispose(): void;
|
|
358
1560
|
} //#endregion
|
|
359
|
-
//#region src/graphviz/wasm/GraphvizWasmAdapter.d.ts
|
|
360
|
-
//#endregion
|
|
361
|
-
//#region ../language-server/dist/_chunks/module.d.mts
|
|
362
|
-
//#region src/documentation/documentation-provider.d.ts
|
|
363
|
-
/**
|
|
364
|
-
* Provides documentation for LikeC4 AST nodes, extending JSDoc parsing
|
|
365
|
-
* with specialized formatting for deployment nodes, deployed instances, and elements.
|
|
366
|
-
*/
|
|
367
|
-
declare class LikeC4DocumentationProvider extends JSDocDocumentationProvider {
|
|
368
|
-
private parser;
|
|
369
|
-
private locator;
|
|
370
|
-
/**
|
|
371
|
-
* Creates a new documentation provider.
|
|
372
|
-
* @param services - The LikeC4 language services.
|
|
373
|
-
*/
|
|
374
|
-
constructor(services: LikeC4Services);
|
|
375
|
-
/**
|
|
376
|
-
* Returns documentation for the given AST node (deployment nodes, deployed instances, elements, or JSDoc fallback).
|
|
377
|
-
* @param node - The AST node to document.
|
|
378
|
-
* @returns Formatted documentation string, or undefined if none.
|
|
379
|
-
*/
|
|
380
|
-
getDocumentation(node: AstNode): string | undefined;
|
|
381
|
-
} //#endregion
|
|
382
|
-
//#region src/workspace/ProjectsManager.d.ts
|
|
383
|
-
type NormalizedUri = Tagged<string, 'NormalizedUri'>;
|
|
384
|
-
type DocOrUri = LangiumDocument | string | URI;
|
|
385
|
-
/**
|
|
386
|
-
* A tagged string that represents a project folder URI (with trailing slash).
|
|
387
|
-
* Used in `startsWith` checks to determine if a document belongs to a project.
|
|
388
|
-
*/
|
|
389
|
-
type ProjectFolder = Tagged<string, 'ProjectFolder'>;
|
|
390
|
-
declare function ProjectFolder(folder: URI | string): ProjectFolder;
|
|
391
|
-
interface Project {
|
|
392
|
-
id: ProjectId$1;
|
|
393
|
-
folderUri: URI;
|
|
394
|
-
config: LikeC4ProjectConfig;
|
|
395
|
-
}
|
|
396
|
-
interface ProjectData extends Project {
|
|
397
|
-
id: ProjectId$1;
|
|
398
|
-
folder: ProjectFolder;
|
|
399
|
-
config: LikeC4ProjectConfig;
|
|
400
|
-
configUri: URI;
|
|
401
|
-
folderUri: URI;
|
|
402
|
-
exclude?: {
|
|
403
|
-
(test: string): boolean;
|
|
404
|
-
};
|
|
405
|
-
/**
|
|
406
|
-
* Resolved include paths with both URI and folder string representations.
|
|
407
|
-
* These are additional directories that are part of this project.
|
|
408
|
-
*/
|
|
409
|
-
includePaths?: NonEmptyArray<{
|
|
410
|
-
uri: URI;
|
|
411
|
-
folder: ProjectFolder;
|
|
412
|
-
}>;
|
|
413
|
-
/**
|
|
414
|
-
* Normalized include configuration (paths, maxDepth, fileThreshold).
|
|
415
|
-
*/
|
|
416
|
-
includeConfig: IncludeConfig;
|
|
417
|
-
}
|
|
418
|
-
type RegisterProjectOptions = {
|
|
419
|
-
config: LikeC4ProjectConfig | LikeC4ProjectConfigInput;
|
|
420
|
-
} & ({
|
|
421
|
-
configUri: URI | string;
|
|
422
|
-
} | {
|
|
423
|
-
folderUri: URI | string;
|
|
424
|
-
});
|
|
425
|
-
declare class ProjectsManager {
|
|
426
|
-
#private;
|
|
427
|
-
protected services: LikeC4SharedServices;
|
|
428
|
-
/**
|
|
429
|
-
* The global project ID used for all documents
|
|
430
|
-
* that are not part of a specific project.
|
|
431
|
-
*/
|
|
432
|
-
static readonly DefaultProjectId: ProjectId$1;
|
|
433
|
-
constructor(services: LikeC4SharedServices);
|
|
434
|
-
/**
|
|
435
|
-
* Checks if a document is excluded by workspace-level patterns.
|
|
436
|
-
* These patterns come from VS Code settings and take precedence over project-level excludes.
|
|
437
|
-
*/
|
|
438
|
-
isExcludedByWorkspace(uri: NormalizedUri | URI): boolean;
|
|
439
|
-
/**
|
|
440
|
-
* Updates the workspace-level exclude patterns from VS Code settings.
|
|
441
|
-
* Called during initial server startup; dynamic changes restart the server.
|
|
442
|
-
*/
|
|
443
|
-
setWorkspaceExcludePatterns(patterns: string[] | undefined): void;
|
|
444
|
-
/**
|
|
445
|
-
* Returns:
|
|
446
|
-
* - configured default project ID if set
|
|
447
|
-
* - the default project ID if there are no projects.
|
|
448
|
-
* - the ID of the only project
|
|
449
|
-
* - undefined if there are multiple projects.
|
|
450
|
-
*/
|
|
451
|
-
get defaultProjectId(): ProjectId$1 | undefined;
|
|
452
|
-
set defaultProjectId(id: string | ProjectId$1 | undefined);
|
|
453
|
-
get default(): ProjectData;
|
|
454
|
-
get all(): NonEmptyReadonlyArray<ProjectId$1>;
|
|
455
|
-
getProject(arg: ProjectId$1 | LangiumDocument): ProjectData;
|
|
456
|
-
/**
|
|
457
|
-
* Returns all projects that overlap with the specified folder (is parent or child)
|
|
458
|
-
*/
|
|
459
|
-
findOverlaped(folder: URI | string): ReadonlyArray<ProjectData>;
|
|
460
|
-
/**
|
|
461
|
-
* Validates and ensures the project ID.
|
|
462
|
-
* If no project ID is specified, returns default project ID
|
|
463
|
-
* If there are multiple projects and default project is not set, throws an error
|
|
464
|
-
*/
|
|
465
|
-
ensureProjectId(projectId?: ProjectId$1 | undefined): ProjectId$1;
|
|
466
|
-
/**
|
|
467
|
-
* Validates and ensures the project data.
|
|
468
|
-
* If projectId is not specified, returns default project
|
|
469
|
-
*
|
|
470
|
-
* If there are multiple projects and default project is not set, throws an error
|
|
471
|
-
*
|
|
472
|
-
* @see ensureProjectId - to validate project ID only
|
|
473
|
-
*/
|
|
474
|
-
ensureProject(projectId?: ProjectId$1 | undefined): ProjectData;
|
|
475
|
-
hasMultipleProjects(): boolean;
|
|
476
|
-
/**
|
|
477
|
-
* Checks if given document (or URI) must be excluded from processing.
|
|
478
|
-
*/
|
|
479
|
-
isExcluded(document: DocOrUri): boolean;
|
|
480
|
-
/**
|
|
481
|
-
* Checks if given document (or URI) must be excluded in the context of the project.
|
|
482
|
-
*/
|
|
483
|
-
isExcluded(projectId: ProjectId$1, document: DocOrUri): boolean;
|
|
484
|
-
/**
|
|
485
|
-
* Checks if the specified document is included by the project:
|
|
486
|
-
* - if the document belongs to the project and is not excluded
|
|
487
|
-
* - if the document is included by the project
|
|
488
|
-
*/
|
|
489
|
-
isIncluded(projectId: ProjectId$1, document: LangiumDocument | URI | string): boolean;
|
|
490
|
-
/**
|
|
491
|
-
* Registers likec4 project by config file.
|
|
492
|
-
*/
|
|
493
|
-
registerConfigFile(configUri: URI, cancelToken?: CancellationToken$1): Promise<ProjectData>;
|
|
494
|
-
/**
|
|
495
|
-
* Registers (or reloads) likec4 project by config file or config object.
|
|
496
|
-
* If there is some project registered at same folder, it will be reloaded.
|
|
497
|
-
*/
|
|
498
|
-
registerProject(opts: RegisterProjectOptions, cancelToken?: CancellationToken$1): Promise<ProjectData>;
|
|
499
|
-
/**
|
|
500
|
-
* Determines which project the given document belongs to.
|
|
501
|
-
* If the document does not belong to any project, returns the default project ID.
|
|
502
|
-
*/
|
|
503
|
-
ownerProjectId(document: LangiumDocument | URI | string): ProjectId$1;
|
|
504
|
-
/**
|
|
505
|
-
* Returns path to the document relative to the project folder.
|
|
506
|
-
* If the document does not belong to any project, returns the document URI as string.
|
|
507
|
-
*/
|
|
508
|
-
relativePath(document: LangiumDocument | URI | string): string;
|
|
509
|
-
/**
|
|
510
|
-
* Returns true if the manager is currently initializing or reloading projects.
|
|
511
|
-
* This is used to prevent duplicate reload operations.
|
|
512
|
-
*/
|
|
513
|
-
protected get isInitiatingOrReloading(): boolean;
|
|
514
|
-
reloadProjects(cancelToken?: CancellationToken$1): Promise<void>;
|
|
515
|
-
protected _reloadProjects(cancelToken?: CancellationToken$1): Promise<void>;
|
|
516
|
-
protected uniqueProjectId(name: string): ProjectId$1;
|
|
517
|
-
protected resetCaches(): void;
|
|
518
|
-
rebuildProject(projectId: ProjectId$1, cancelToken?: CancellationToken$1): Promise<void>;
|
|
519
|
-
/**
|
|
520
|
-
* Returns all include paths from all projects.
|
|
521
|
-
* Used by WorkspaceManager to scan additional directories for C4 files.
|
|
522
|
-
*/
|
|
523
|
-
getAllIncludePaths(): Array<{
|
|
524
|
-
projectId: ProjectId$1;
|
|
525
|
-
includePath: URI;
|
|
526
|
-
includeConfig: IncludeConfig;
|
|
527
|
-
}>;
|
|
528
|
-
/**
|
|
529
|
-
* Register a listener to be called when the projects configuration has changed.
|
|
530
|
-
* @returns A disposable that can be used to unregister the callback.
|
|
531
|
-
*/
|
|
532
|
-
onProjectsUpdate(callback: () => void): Disposable$1;
|
|
533
|
-
private getWorkspaceFolder;
|
|
534
|
-
private notifyListeners;
|
|
535
|
-
private updateIncludesExcludes;
|
|
536
|
-
private warnIfConfigOverride;
|
|
537
|
-
} //#endregion
|
|
538
|
-
//#region src/filesystem/types.d.ts
|
|
539
|
-
interface FileNode extends FileSystemNode {
|
|
540
|
-
readonly isFile: true;
|
|
541
|
-
readonly isDirectory: false;
|
|
542
|
-
}
|
|
543
|
-
interface FileSystemProvider$1 extends FileSystemProvider {
|
|
544
|
-
/**
|
|
545
|
-
* Scans the project files for the given URI.
|
|
546
|
-
* @returns The list of file system entries that are contained within the specified directory.
|
|
547
|
-
*/
|
|
548
|
-
scanProjectFiles(folderUri: URI): Promise<FileNode[]>;
|
|
549
|
-
/**
|
|
550
|
-
* Loads the project config from the given file.
|
|
551
|
-
* @returns The project config.
|
|
552
|
-
* @throws Error if the file does not exist or is not a valid project config.
|
|
553
|
-
*/
|
|
554
|
-
loadProjectConfig(filepath: URI): Promise<LikeC4ProjectConfig>;
|
|
555
|
-
/**
|
|
556
|
-
* Reads the directory and returns LikeC4 files.
|
|
557
|
-
*
|
|
558
|
-
* @param options.recursive If true, recursively reads the directory,
|
|
559
|
-
* @param options.maxDepth Maximum depth to traverse when recursive is true (default: Infinity)
|
|
560
|
-
*/
|
|
561
|
-
readDirectory(uri: URI, options?: {
|
|
562
|
-
recursive?: boolean;
|
|
563
|
-
maxDepth?: number;
|
|
564
|
-
}): Promise<FileNode[]>;
|
|
565
|
-
/**
|
|
566
|
-
* Finds all files in the given directory, matching the given filter.
|
|
567
|
-
*/
|
|
568
|
-
scanDirectory(directory: URI, filter: (filepath: string, isDirectory: boolean) => boolean): Promise<FileNode[]>;
|
|
569
|
-
/**
|
|
570
|
-
* Writes the content to the file system.
|
|
571
|
-
* Used by manual layouts.
|
|
572
|
-
*/
|
|
573
|
-
writeFile(uri: URI, content: string): Promise<void>;
|
|
574
|
-
/**
|
|
575
|
-
* Deletes the file from the file system.
|
|
576
|
-
* Used by manual layouts.
|
|
577
|
-
* @return true if the file was deleted, false if the file did not exist.
|
|
578
|
-
*/
|
|
579
|
-
deleteFile(uri: URI): Promise<boolean>;
|
|
580
|
-
}
|
|
581
|
-
interface FileSystemWatcher extends AsyncDisposable {
|
|
582
|
-
/**
|
|
583
|
-
* Watches a folder for changes and triggers a reload of the documents and projects.
|
|
584
|
-
*/
|
|
585
|
-
watch(folder: string): void;
|
|
586
|
-
}
|
|
587
|
-
type ManualLayoutsSnapshot = {
|
|
588
|
-
hash: string;
|
|
589
|
-
views: Record<ViewId$1, LayoutedView$1>;
|
|
590
|
-
};
|
|
591
|
-
type ManualLayoutUpdateEvent = {
|
|
592
|
-
updated: URI;
|
|
593
|
-
projectId: ProjectId$1;
|
|
594
|
-
viewId: ViewId$1;
|
|
595
|
-
} | {
|
|
596
|
-
removed: URI;
|
|
597
|
-
projectId: ProjectId$1;
|
|
598
|
-
/**
|
|
599
|
-
* Missing if triggered by FS event (file was deleted)
|
|
600
|
-
*/
|
|
601
|
-
viewId?: ViewId$1;
|
|
602
|
-
};
|
|
603
|
-
type ManualLayoutUpdateListener = (event: ManualLayoutUpdateEvent) => void;
|
|
604
|
-
interface LikeC4ManualLayouts {
|
|
605
|
-
/**
|
|
606
|
-
* Reads a single layouted view from the file system by its URI.
|
|
607
|
-
* Used by the language server to get the current layout state.
|
|
608
|
-
*/
|
|
609
|
-
readSnapshot(uri: URI): Promise<LayoutedView$1 | null>;
|
|
610
|
-
read(project: Project): Promise<ManualLayoutsSnapshot | null>;
|
|
611
|
-
write(project: Project, layouted: LayoutedView$1): Promise<Location>;
|
|
612
|
-
remove(project: Project, view: ViewId$1): Promise<Location | null>;
|
|
613
|
-
clearCaches(): void;
|
|
1561
|
+
//#region src/graphviz/wasm/GraphvizWasmAdapter.d.ts
|
|
1562
|
+
//#endregion
|
|
1563
|
+
//#region ../language-server/dist/_chunks/module.d.mts
|
|
1564
|
+
//#region src/documentation/documentation-provider.d.ts
|
|
1565
|
+
/**
|
|
1566
|
+
* Provides documentation for LikeC4 AST nodes, extending JSDoc parsing
|
|
1567
|
+
* with specialized formatting for deployment nodes, deployed instances, and elements.
|
|
1568
|
+
*/
|
|
1569
|
+
declare class LikeC4DocumentationProvider extends JSDocDocumentationProvider {
|
|
1570
|
+
private parser;
|
|
1571
|
+
private locator;
|
|
614
1572
|
/**
|
|
615
|
-
*
|
|
616
|
-
*
|
|
1573
|
+
* Creates a new documentation provider.
|
|
1574
|
+
* @param services - The LikeC4 language services.
|
|
617
1575
|
*/
|
|
618
|
-
|
|
1576
|
+
constructor(services: LikeC4Services);
|
|
619
1577
|
/**
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
* @
|
|
1578
|
+
* Returns documentation for the given AST node (deployment nodes, deployed instances, elements, or JSDoc fallback).
|
|
1579
|
+
* @param node - The AST node to document.
|
|
1580
|
+
* @returns Formatted documentation string, or undefined if none.
|
|
623
1581
|
*/
|
|
624
|
-
|
|
625
|
-
update: URI;
|
|
626
|
-
delete?: never;
|
|
627
|
-
} | {
|
|
628
|
-
delete: URI;
|
|
629
|
-
update?: never;
|
|
630
|
-
}): Promise<void>;
|
|
1582
|
+
getDocumentation(node: AstNode): string | undefined;
|
|
631
1583
|
} //#endregion
|
|
632
|
-
//#region src/
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
type ExtendedFormattingCommandType = 'normalizeQuotes';
|
|
640
|
-
interface ExtendedFormattingCommand {
|
|
641
|
-
type: ExtendedFormattingCommandType;
|
|
642
|
-
region: FormattingRegion;
|
|
643
|
-
}
|
|
644
|
-
declare class LikeC4Formatter extends AbstractFormatter {
|
|
645
|
-
protected options: LikeC4FormatterOptions;
|
|
646
|
-
extendedFormattingCommands: ExtendedFormattingCommand[];
|
|
647
|
-
constructor(services: LikeC4Services);
|
|
648
|
-
protected doDocumentFormat(document: LangiumDocument, options: FormattingOptions, range?: Range): TextEdit[];
|
|
649
|
-
protected format(node: AstNode): void;
|
|
650
|
-
protected formatTags(node: AstNode): void;
|
|
651
|
-
protected formatDeploymentRelation(node: AstNode): void;
|
|
652
|
-
protected formatExtendDeployment(node: AstNode): void;
|
|
653
|
-
protected formatRelation(node: AstNode): void;
|
|
654
|
-
protected removeIndentFromTopLevelStatements(node: AstNode): void;
|
|
655
|
-
protected indentContentInBraces(node: AstNode): void;
|
|
656
|
-
protected appendKeywordsWithSpace(node: AstNode): void;
|
|
657
|
-
protected formatView(node: AstNode): void;
|
|
658
|
-
protected formatLeafProperty(node: AstNode): void;
|
|
659
|
-
protected formatLinkProperty(node: AstNode): void;
|
|
660
|
-
protected formatNavigateToProperty(node: AstNode): void;
|
|
661
|
-
protected formatAutolayoutProperty(node: AstNode): void;
|
|
662
|
-
protected formatMetadataProperty(node: AstNode): void;
|
|
663
|
-
protected formatElementDeclaration(node: AstNode): void;
|
|
664
|
-
protected formatExtendElement(node: AstNode): void;
|
|
665
|
-
protected formatGlobals(node: AstNode): void;
|
|
666
|
-
protected formatImports(node: AstNode): void;
|
|
667
|
-
protected formatSpecificationRule(node: AstNode): void;
|
|
668
|
-
protected formatWithPredicate(node: AstNode): void;
|
|
669
|
-
protected formatDeploymentNodeDeclaration(node: AstNode): void;
|
|
670
|
-
protected formatDeployedInstance(node: AstNode): void;
|
|
671
|
-
protected formatViewRuleGlobalStyle(node: AstNode): void;
|
|
672
|
-
protected formatViewRuleGlobalPredicate(node: AstNode): void;
|
|
673
|
-
protected formatViewRuleGroup(node: AstNode): void;
|
|
674
|
-
protected formatViewRuleStyle(node: AstNode): void;
|
|
675
|
-
protected formatWhereExpression(node: AstNode): void;
|
|
676
|
-
protected formatWhereRelationExpression(node: AstNode): void;
|
|
677
|
-
protected formatWhereElementExpression(node: AstNode): void;
|
|
678
|
-
protected formatIncludeExcludeExpressions(node: AstNode): void;
|
|
679
|
-
protected formatRelationExpression(node: AstNode): void;
|
|
680
|
-
private findPredicateExpressionRoot;
|
|
681
|
-
private on;
|
|
682
|
-
private doExtendedFormatting;
|
|
683
|
-
protected normalizeQuotes(node: AstNode): void;
|
|
684
|
-
private quotesNormalizerFactory;
|
|
685
|
-
private escapeQuotesInternalQuotes;
|
|
686
|
-
private getAutoQuoteStyle;
|
|
687
|
-
private onConfigurationUpdate;
|
|
1584
|
+
//#region src/utils/disposable.d.ts
|
|
1585
|
+
declare abstract class ADisposable implements Disposable$1 {
|
|
1586
|
+
protected toDispose: Disposable$1[];
|
|
1587
|
+
protected isDisposed: boolean;
|
|
1588
|
+
onDispose(...disposable: Disposable$1[]): void;
|
|
1589
|
+
dispose(): void;
|
|
1590
|
+
protected throwIfDisposed(): void;
|
|
688
1591
|
} //#endregion
|
|
689
1592
|
//#region src/generated/ast.d.ts
|
|
690
1593
|
type AnyProperty = DynamicViewProperty | ElementProperty | NavigateToProperty | NotationProperty | NotesProperty | RelationProperty | RelationshipStyleProperty | StringProperty | StyleProperty | ViewProperty;
|
|
@@ -698,7 +1601,7 @@ type DeploymentElement = DeployedInstance | DeploymentNode;
|
|
|
698
1601
|
declare const DeploymentElement = "DeploymentElement";
|
|
699
1602
|
type DeploymentNodeOrElementKind = DeploymentNodeKind | ElementKind;
|
|
700
1603
|
declare const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
|
|
701
|
-
type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
|
|
1604
|
+
type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAncestors | ViewRuleAutoLayout;
|
|
702
1605
|
declare const DeploymentViewRule = "DeploymentViewRule";
|
|
703
1606
|
type DynamicViewDisplayVariantValue = 'diagram' | 'sequence';
|
|
704
1607
|
type DynamicViewProperty = DynamicViewDisplayVariantProperty | ViewProperty;
|
|
@@ -830,7 +1733,7 @@ declare const CustomElementProperties = "CustomElementProperties";
|
|
|
830
1733
|
interface CustomRelationProperties extends AstNode {
|
|
831
1734
|
readonly $container: AbstractDynamicStep | RelationExprWith;
|
|
832
1735
|
readonly $type: 'CustomRelationProperties';
|
|
833
|
-
props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
|
|
1736
|
+
props: Array<MultipleProperty | NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
|
|
834
1737
|
}
|
|
835
1738
|
declare const CustomRelationProperties = "CustomRelationProperties";
|
|
836
1739
|
interface DeployedInstance extends AstNode {
|
|
@@ -968,9 +1871,9 @@ interface DynamicViewIncludePredicate extends AstNode {
|
|
|
968
1871
|
}
|
|
969
1872
|
declare const DynamicViewIncludePredicate = "DynamicViewIncludePredicate";
|
|
970
1873
|
interface DynamicViewParallelSteps extends AstNode {
|
|
971
|
-
readonly $container: DynamicViewBody;
|
|
1874
|
+
readonly $container: DynamicViewBody | DynamicViewParallelSteps;
|
|
972
1875
|
readonly $type: 'DynamicViewParallelSteps';
|
|
973
|
-
steps: Array<DynamicViewStep>;
|
|
1876
|
+
steps: Array<DynamicViewParallelSteps | DynamicViewStep>;
|
|
974
1877
|
}
|
|
975
1878
|
declare const DynamicViewParallelSteps = "DynamicViewParallelSteps";
|
|
976
1879
|
interface DynamicViewRef extends AstNode {
|
|
@@ -1309,7 +2212,7 @@ interface MetadataAttribute extends AstNode {
|
|
|
1309
2212
|
readonly $container: MetadataBody;
|
|
1310
2213
|
readonly $type: 'MetadataAttribute';
|
|
1311
2214
|
boolValue: boolean;
|
|
1312
|
-
key:
|
|
2215
|
+
key: Id;
|
|
1313
2216
|
value?: MetadataValue;
|
|
1314
2217
|
}
|
|
1315
2218
|
declare const MetadataAttribute = "MetadataAttribute";
|
|
@@ -1343,7 +2246,7 @@ interface ModelViews extends AstNode {
|
|
|
1343
2246
|
}
|
|
1344
2247
|
declare const ModelViews = "ModelViews";
|
|
1345
2248
|
interface MultipleProperty extends AstNode {
|
|
1346
|
-
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
2249
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | SpecificationRelationshipKind | ViewRuleStyle;
|
|
1347
2250
|
readonly $type: 'MultipleProperty';
|
|
1348
2251
|
key: 'multiple';
|
|
1349
2252
|
value: boolean;
|
|
@@ -1518,7 +2421,7 @@ interface SpecificationRelationshipKind extends AstNode {
|
|
|
1518
2421
|
readonly $container: SpecificationRule;
|
|
1519
2422
|
readonly $type: 'SpecificationRelationshipKind';
|
|
1520
2423
|
kind: RelationshipKind;
|
|
1521
|
-
props: Array<RelationshipStyleProperty | SpecificationRelationshipStringProperty>;
|
|
2424
|
+
props: Array<MultipleProperty | RelationshipStyleProperty | SpecificationRelationshipStringProperty>;
|
|
1522
2425
|
}
|
|
1523
2426
|
declare const SpecificationRelationshipKind = "SpecificationRelationshipKind";
|
|
1524
2427
|
interface SpecificationRelationshipStringProperty extends AstNode {
|
|
@@ -1592,6 +2495,13 @@ interface ViewRef extends AstNode {
|
|
|
1592
2495
|
view: Reference<LikeC4View>;
|
|
1593
2496
|
}
|
|
1594
2497
|
declare const ViewRef = "ViewRef";
|
|
2498
|
+
interface ViewRuleAncestors extends AstNode {
|
|
2499
|
+
readonly $container: DeploymentViewBody;
|
|
2500
|
+
readonly $type: 'ViewRuleAncestors';
|
|
2501
|
+
key: 'includeAncestors';
|
|
2502
|
+
value: boolean;
|
|
2503
|
+
}
|
|
2504
|
+
declare const ViewRuleAncestors = "ViewRuleAncestors";
|
|
1595
2505
|
interface ViewRuleAutoLayout extends AstNode {
|
|
1596
2506
|
readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
|
|
1597
2507
|
readonly $type: 'ViewRuleAutoLayout';
|
|
@@ -1909,6 +2819,7 @@ type LikeC4AstType = {
|
|
|
1909
2819
|
ViewProperty: ViewProperty;
|
|
1910
2820
|
ViewRef: ViewRef;
|
|
1911
2821
|
ViewRule: ViewRule;
|
|
2822
|
+
ViewRuleAncestors: ViewRuleAncestors;
|
|
1912
2823
|
ViewRuleAutoLayout: ViewRuleAutoLayout;
|
|
1913
2824
|
ViewRuleGlobalPredicateRef: ViewRuleGlobalPredicateRef;
|
|
1914
2825
|
ViewRuleGlobalStyle: ViewRuleGlobalStyle;
|
|
@@ -2015,6 +2926,7 @@ interface ParsedAstSpecification {
|
|
|
2015
2926
|
line?: c4.RelationshipLineType;
|
|
2016
2927
|
head?: c4.RelationshipArrowType;
|
|
2017
2928
|
tail?: c4.RelationshipArrowType;
|
|
2929
|
+
multiple?: boolean;
|
|
2018
2930
|
}>;
|
|
2019
2931
|
colors: Record<c4.CustomColor, {
|
|
2020
2932
|
color: c4.ColorLiteral;
|
|
@@ -2107,42 +3019,349 @@ interface ParsedAstDynamicView {
|
|
|
2107
3019
|
rules: Array<c4.DynamicViewRule>;
|
|
2108
3020
|
variant: c4.DynamicViewDisplayVariant | undefined;
|
|
2109
3021
|
}
|
|
2110
|
-
interface ParsedAstDeploymentView {
|
|
2111
|
-
id: c4.ViewId;
|
|
2112
|
-
astPath: string;
|
|
2113
|
-
title: string | null;
|
|
2114
|
-
description: c4.MarkdownOrString | null;
|
|
2115
|
-
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
2116
|
-
links: c4.NonEmptyArray<c4.Link> | null;
|
|
2117
|
-
rules: Array<c4.DeploymentViewRule>;
|
|
3022
|
+
interface ParsedAstDeploymentView {
|
|
3023
|
+
id: c4.ViewId;
|
|
3024
|
+
astPath: string;
|
|
3025
|
+
title: string | null;
|
|
3026
|
+
description: c4.MarkdownOrString | null;
|
|
3027
|
+
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
3028
|
+
links: c4.NonEmptyArray<c4.Link> | null;
|
|
3029
|
+
rules: Array<c4.DeploymentViewRule>;
|
|
3030
|
+
}
|
|
3031
|
+
type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
|
|
3032
|
+
interface AstNodeDescriptionWithFqn extends AstNodeDescription {
|
|
3033
|
+
likec4ProjectId: c4.ProjectId;
|
|
3034
|
+
id: c4.Fqn;
|
|
3035
|
+
}
|
|
3036
|
+
type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
|
|
3037
|
+
type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
|
|
3038
|
+
interface LikeC4DocumentProps {
|
|
3039
|
+
diagnostics?: Array<LikeC4DocumentDiagnostic>;
|
|
3040
|
+
c4Specification?: ParsedAstSpecification;
|
|
3041
|
+
c4Elements?: ParsedAstElement[];
|
|
3042
|
+
c4ExtendElements?: ParsedAstExtend[];
|
|
3043
|
+
c4ExtendDeployments?: ParsedAstExtend[];
|
|
3044
|
+
c4ExtendRelations?: ParsedAstExtendRelation[];
|
|
3045
|
+
c4Relations?: ParsedAstRelation[];
|
|
3046
|
+
c4Globals?: ParsedAstGlobals;
|
|
3047
|
+
c4Views?: ParsedAstView[];
|
|
3048
|
+
c4Deployments?: ParsedAstDeployment[];
|
|
3049
|
+
c4DeploymentRelations?: ParsedAstDeploymentRelation[];
|
|
3050
|
+
c4Imports?: MultiMap<c4.ProjectId, c4.Fqn, Set<c4.Fqn>>;
|
|
3051
|
+
}
|
|
3052
|
+
type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
|
|
3053
|
+
interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
|
|
3054
|
+
likec4ProjectId: c4.ProjectId;
|
|
3055
|
+
}
|
|
3056
|
+
interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
|
|
3057
|
+
likec4ProjectId: c4.ProjectId;
|
|
3058
|
+
} //#endregion
|
|
3059
|
+
//#region src/workspace/ProjectsManager.d.ts
|
|
3060
|
+
type NormalizedUri = Tagged<string, 'NormalizedUri'>;
|
|
3061
|
+
type DocOrUri = LangiumDocument | string | URI;
|
|
3062
|
+
/**
|
|
3063
|
+
* A tagged string that represents a project folder URI (with trailing slash).
|
|
3064
|
+
* Used in `startsWith` checks to determine if a document belongs to a project.
|
|
3065
|
+
*/
|
|
3066
|
+
type ProjectFolder = Tagged<string, 'ProjectFolder'>;
|
|
3067
|
+
declare function ProjectFolder(folder: URI | string): ProjectFolder;
|
|
3068
|
+
interface Project {
|
|
3069
|
+
id: ProjectId;
|
|
3070
|
+
folderUri: URI;
|
|
3071
|
+
config: LikeC4ProjectConfig;
|
|
3072
|
+
}
|
|
3073
|
+
interface ProjectData extends Project {
|
|
3074
|
+
id: ProjectId;
|
|
3075
|
+
folder: ProjectFolder;
|
|
3076
|
+
config: LikeC4ProjectConfig;
|
|
3077
|
+
configUri: URI;
|
|
3078
|
+
folderUri: URI;
|
|
3079
|
+
exclude?: {
|
|
3080
|
+
(test: string): boolean;
|
|
3081
|
+
};
|
|
3082
|
+
/**
|
|
3083
|
+
* Resolved include paths with both URI and folder string representations.
|
|
3084
|
+
* These are additional directories that are part of this project.
|
|
3085
|
+
*/
|
|
3086
|
+
includePaths?: NonEmptyArray$1<{
|
|
3087
|
+
uri: URI;
|
|
3088
|
+
folder: ProjectFolder;
|
|
3089
|
+
}>;
|
|
3090
|
+
/**
|
|
3091
|
+
* Normalized include configuration (paths, maxDepth, fileThreshold).
|
|
3092
|
+
*/
|
|
3093
|
+
includeConfig: IncludeConfig;
|
|
3094
|
+
}
|
|
3095
|
+
type RegisterProjectOptions = {
|
|
3096
|
+
config: LikeC4ProjectConfig | LikeC4ProjectConfigInput;
|
|
3097
|
+
} & ({
|
|
3098
|
+
configUri: URI | string;
|
|
3099
|
+
} | {
|
|
3100
|
+
folderUri: URI | string;
|
|
3101
|
+
});
|
|
3102
|
+
declare class ProjectsManager extends ADisposable {
|
|
3103
|
+
#private;
|
|
3104
|
+
protected services: LikeC4SharedServices;
|
|
3105
|
+
/**
|
|
3106
|
+
* The global project ID used for all documents
|
|
3107
|
+
* that are not part of a specific project.
|
|
3108
|
+
*/
|
|
3109
|
+
static readonly DefaultProjectId: ProjectId;
|
|
3110
|
+
constructor(services: LikeC4SharedServices);
|
|
3111
|
+
/**
|
|
3112
|
+
* Checks if a document is excluded by workspace-level patterns.
|
|
3113
|
+
* These patterns come from VS Code settings and take precedence over project-level excludes.
|
|
3114
|
+
*/
|
|
3115
|
+
isExcludedByWorkspace(uri: NormalizedUri | URI): boolean;
|
|
3116
|
+
/**
|
|
3117
|
+
* Updates the workspace-level exclude patterns from VS Code settings.
|
|
3118
|
+
* Called during initial server startup; dynamic changes restart the server.
|
|
3119
|
+
*/
|
|
3120
|
+
setWorkspaceExcludePatterns(patterns: string[] | undefined): void;
|
|
3121
|
+
/**
|
|
3122
|
+
* Returns:
|
|
3123
|
+
* - configured default project ID if set
|
|
3124
|
+
* - the default project ID if there are no projects.
|
|
3125
|
+
* - the ID of the only project
|
|
3126
|
+
* - undefined if there are multiple projects.
|
|
3127
|
+
*/
|
|
3128
|
+
get defaultProjectId(): ProjectId | undefined;
|
|
3129
|
+
set defaultProjectId(id: string | ProjectId | undefined);
|
|
3130
|
+
get default(): ProjectData;
|
|
3131
|
+
get all(): NonEmptyReadonlyArray$1<ProjectId>;
|
|
3132
|
+
getProject(arg: ProjectId | LangiumDocument): ProjectData;
|
|
3133
|
+
/**
|
|
3134
|
+
* Returns all projects that overlap with the specified folder (is parent or child)
|
|
3135
|
+
*/
|
|
3136
|
+
findOverlaped(folder: URI | string): ReadonlyArray<ProjectData>;
|
|
3137
|
+
/**
|
|
3138
|
+
* Validates and ensures the project ID.
|
|
3139
|
+
* If no project ID is specified, returns default project ID
|
|
3140
|
+
* If there are multiple projects and default project is not set, throws an error
|
|
3141
|
+
*/
|
|
3142
|
+
ensureProjectId(projectId?: ProjectId | undefined): ProjectId;
|
|
3143
|
+
/**
|
|
3144
|
+
* Validates and ensures the project data.
|
|
3145
|
+
* If projectId is not specified, returns default project
|
|
3146
|
+
*
|
|
3147
|
+
* If there are multiple projects and default project is not set, throws an error
|
|
3148
|
+
*
|
|
3149
|
+
* @see ensureProjectId - to validate project ID only
|
|
3150
|
+
*/
|
|
3151
|
+
ensureProject(projectId?: ProjectId | undefined): ProjectData;
|
|
3152
|
+
hasMultipleProjects(): boolean;
|
|
3153
|
+
/**
|
|
3154
|
+
* Checks if given document (or URI) must be excluded from processing.
|
|
3155
|
+
*/
|
|
3156
|
+
isExcluded(document: DocOrUri): boolean;
|
|
3157
|
+
/**
|
|
3158
|
+
* Checks if given document (or URI) must be excluded in the context of the project.
|
|
3159
|
+
*/
|
|
3160
|
+
isExcluded(projectId: ProjectId, document: DocOrUri): boolean;
|
|
3161
|
+
/**
|
|
3162
|
+
* Checks if the specified document is included by the project:
|
|
3163
|
+
* - if the document belongs to the project and is not excluded
|
|
3164
|
+
* - if the document is included by the project
|
|
3165
|
+
*/
|
|
3166
|
+
isIncluded(projectId: ProjectId, document: LangiumDocument | URI | string): boolean;
|
|
3167
|
+
/**
|
|
3168
|
+
* Registers likec4 project by config file.
|
|
3169
|
+
*/
|
|
3170
|
+
registerConfigFile(configUri: URI, cancelToken?: CancellationToken$1): Promise<ProjectData>;
|
|
3171
|
+
/**
|
|
3172
|
+
* Registers (or reloads) likec4 project by config file or config object.
|
|
3173
|
+
* If there is some project registered at same folder, it will be reloaded.
|
|
3174
|
+
*/
|
|
3175
|
+
registerProject(opts: RegisterProjectOptions, cancelToken?: CancellationToken$1): Promise<ProjectData>;
|
|
3176
|
+
/**
|
|
3177
|
+
* Determines which project the given document belongs to.
|
|
3178
|
+
* If the document does not belong to any project, returns the default project ID.
|
|
3179
|
+
*/
|
|
3180
|
+
ownerProjectId(document: LangiumDocument | URI | string): ProjectId;
|
|
3181
|
+
/**
|
|
3182
|
+
* Returns path to the document relative to the project folder.
|
|
3183
|
+
* If the document does not belong to any project, returns the document URI as string.
|
|
3184
|
+
*/
|
|
3185
|
+
relativePath(document: LangiumDocument | URI | string): string;
|
|
3186
|
+
/**
|
|
3187
|
+
* Returns true if the manager is currently initializing or reloading projects.
|
|
3188
|
+
* This is used to prevent duplicate reload operations.
|
|
3189
|
+
*/
|
|
3190
|
+
protected get isInitiatingOrReloading(): boolean;
|
|
3191
|
+
reloadProjects(cancelToken?: CancellationToken$1): Promise<void>;
|
|
3192
|
+
protected _reloadProjects(cancelToken?: CancellationToken$1): Promise<void>;
|
|
3193
|
+
protected uniqueProjectId(name: string): ProjectId;
|
|
3194
|
+
protected resetCaches(): void;
|
|
3195
|
+
rebuildProject(projectId: ProjectId, cancelToken?: CancellationToken$1): Promise<void>;
|
|
3196
|
+
/**
|
|
3197
|
+
* Returns all include paths from all projects.
|
|
3198
|
+
* Used by WorkspaceManager to scan additional directories for C4 files.
|
|
3199
|
+
*/
|
|
3200
|
+
getAllIncludePaths(): Array<{
|
|
3201
|
+
projectId: ProjectId;
|
|
3202
|
+
includePath: URI;
|
|
3203
|
+
includeConfig: IncludeConfig;
|
|
3204
|
+
}>;
|
|
3205
|
+
/**
|
|
3206
|
+
* Register a listener to be called when the projects configuration has changed.
|
|
3207
|
+
* @returns A disposable that can be used to unregister the callback.
|
|
3208
|
+
*/
|
|
3209
|
+
onProjectsUpdate(callback: () => void): Disposable$1;
|
|
3210
|
+
private getWorkspaceFolder;
|
|
3211
|
+
private notifyListeners;
|
|
3212
|
+
private updateIncludesExcludes;
|
|
3213
|
+
private warnIfConfigOverride;
|
|
3214
|
+
} //#endregion
|
|
3215
|
+
//#region src/filesystem/types.d.ts
|
|
3216
|
+
interface FileNode extends FileSystemNode {
|
|
3217
|
+
readonly isFile: true;
|
|
3218
|
+
readonly isDirectory: false;
|
|
3219
|
+
}
|
|
3220
|
+
interface FileSystemProvider$1 extends FileSystemProvider {
|
|
3221
|
+
/**
|
|
3222
|
+
* Scans the project files for the given URI.
|
|
3223
|
+
* @returns The list of file system entries that are contained within the specified directory.
|
|
3224
|
+
*/
|
|
3225
|
+
scanProjectFiles(folderUri: URI): Promise<FileNode[]>;
|
|
3226
|
+
/**
|
|
3227
|
+
* Loads the project config from the given file.
|
|
3228
|
+
* @returns The project config.
|
|
3229
|
+
* @throws Error if the file does not exist or is not a valid project config.
|
|
3230
|
+
*/
|
|
3231
|
+
loadProjectConfig(filepath: URI): Promise<LikeC4ProjectConfig>;
|
|
3232
|
+
/**
|
|
3233
|
+
* Reads the directory and returns LikeC4 files.
|
|
3234
|
+
*
|
|
3235
|
+
* @param options.recursive If true, recursively reads the directory,
|
|
3236
|
+
* @param options.maxDepth Maximum depth to traverse when recursive is true (default: Infinity)
|
|
3237
|
+
*/
|
|
3238
|
+
readDirectory(uri: URI, options?: {
|
|
3239
|
+
recursive?: boolean;
|
|
3240
|
+
maxDepth?: number;
|
|
3241
|
+
}): Promise<FileNode[]>;
|
|
3242
|
+
/**
|
|
3243
|
+
* Finds all files in the given directory, matching the given filter.
|
|
3244
|
+
*/
|
|
3245
|
+
scanDirectory(directory: URI, filter: (filepath: string, isDirectory: boolean) => boolean): Promise<FileNode[]>;
|
|
3246
|
+
/**
|
|
3247
|
+
* Writes the content to the file system.
|
|
3248
|
+
* Used by manual layouts.
|
|
3249
|
+
*/
|
|
3250
|
+
writeFile(uri: URI, content: string): Promise<void>;
|
|
3251
|
+
/**
|
|
3252
|
+
* Deletes the file from the file system.
|
|
3253
|
+
* Used by manual layouts.
|
|
3254
|
+
* @return true if the file was deleted, false if the file did not exist.
|
|
3255
|
+
*/
|
|
3256
|
+
deleteFile(uri: URI): Promise<boolean>;
|
|
2118
3257
|
}
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
3258
|
+
interface FileSystemWatcher extends AsyncDisposable {
|
|
3259
|
+
/**
|
|
3260
|
+
* Watches a folder for changes and triggers a reload of the documents and projects.
|
|
3261
|
+
*/
|
|
3262
|
+
watch(folder: string): void;
|
|
2123
3263
|
}
|
|
2124
|
-
type
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
3264
|
+
type ManualLayoutsSnapshot = {
|
|
3265
|
+
hash: string;
|
|
3266
|
+
views: Record<ViewId, LayoutedView>;
|
|
3267
|
+
};
|
|
3268
|
+
type ManualLayoutUpdateEvent = {
|
|
3269
|
+
updated: URI;
|
|
3270
|
+
projectId: ProjectId;
|
|
3271
|
+
viewId: ViewId;
|
|
3272
|
+
} | {
|
|
3273
|
+
removed: URI;
|
|
3274
|
+
projectId: ProjectId;
|
|
3275
|
+
/**
|
|
3276
|
+
* Missing if triggered by FS event (file was deleted)
|
|
3277
|
+
*/
|
|
3278
|
+
viewId?: ViewId;
|
|
3279
|
+
};
|
|
3280
|
+
type ManualLayoutUpdateListener = (event: ManualLayoutUpdateEvent) => void;
|
|
3281
|
+
interface LikeC4ManualLayouts extends Disposable$1 {
|
|
3282
|
+
/**
|
|
3283
|
+
* Reads a single layouted view from the file system by its URI.
|
|
3284
|
+
* Used by the language server to get the current layout state.
|
|
3285
|
+
*/
|
|
3286
|
+
readSnapshot(uri: URI): Promise<LayoutedView | null>;
|
|
3287
|
+
read(project: Project): Promise<ManualLayoutsSnapshot | null>;
|
|
3288
|
+
write(project: Project, layouted: LayoutedView): Promise<Location>;
|
|
3289
|
+
remove(project: Project, view: ViewId): Promise<Location | null>;
|
|
3290
|
+
clearCaches(): void;
|
|
3291
|
+
/**
|
|
3292
|
+
* Registers a listener for manual layout updates.
|
|
3293
|
+
* The listener will be called when a manual layout is created, updated, or deleted.
|
|
3294
|
+
*/
|
|
3295
|
+
onManualLayoutUpdate(listener: ManualLayoutUpdateListener): Disposable$1;
|
|
3296
|
+
/**
|
|
3297
|
+
* Handles file system updates for manual layouts.
|
|
3298
|
+
* Used by the file system watcher to notify the manual layouts module of changes.
|
|
3299
|
+
* @param event The file system event
|
|
3300
|
+
*/
|
|
3301
|
+
handleFileSystemUpdate(event: {
|
|
3302
|
+
update: URI;
|
|
3303
|
+
delete?: never;
|
|
3304
|
+
} | {
|
|
3305
|
+
delete: URI;
|
|
3306
|
+
update?: never;
|
|
3307
|
+
}): Promise<void>;
|
|
3308
|
+
} //#endregion
|
|
3309
|
+
//#region src/filesystem/noop.d.ts
|
|
3310
|
+
//#endregion
|
|
3311
|
+
//#region src/formatting/LikeC4Formatter.d.ts
|
|
3312
|
+
type QuoteStyle = 'single' | 'double' | 'ignore' | 'auto';
|
|
3313
|
+
interface LikeC4FormatterOptions {
|
|
3314
|
+
quoteStyle: QuoteStyle;
|
|
2139
3315
|
}
|
|
2140
|
-
type
|
|
2141
|
-
interface
|
|
2142
|
-
|
|
3316
|
+
type ExtendedFormattingCommandType = 'normalizeQuotes';
|
|
3317
|
+
interface ExtendedFormattingCommand {
|
|
3318
|
+
type: ExtendedFormattingCommandType;
|
|
3319
|
+
region: FormattingRegion;
|
|
2143
3320
|
}
|
|
2144
|
-
|
|
2145
|
-
|
|
3321
|
+
declare class LikeC4Formatter extends AbstractFormatter {
|
|
3322
|
+
protected options: LikeC4FormatterOptions;
|
|
3323
|
+
extendedFormattingCommands: ExtendedFormattingCommand[];
|
|
3324
|
+
constructor(services: LikeC4Services);
|
|
3325
|
+
protected doDocumentFormat(document: LangiumDocument, options: FormattingOptions, range?: Range): TextEdit[];
|
|
3326
|
+
protected format(node: AstNode): void;
|
|
3327
|
+
protected formatTags(node: AstNode): void;
|
|
3328
|
+
protected formatDeploymentRelation(node: AstNode): void;
|
|
3329
|
+
protected formatExtendDeployment(node: AstNode): void;
|
|
3330
|
+
protected formatRelation(node: AstNode): void;
|
|
3331
|
+
protected removeIndentFromTopLevelStatements(node: AstNode): void;
|
|
3332
|
+
protected indentContentInBraces(node: AstNode): void;
|
|
3333
|
+
protected appendKeywordsWithSpace(node: AstNode): void;
|
|
3334
|
+
protected formatView(node: AstNode): void;
|
|
3335
|
+
protected formatLeafProperty(node: AstNode): void;
|
|
3336
|
+
protected formatLinkProperty(node: AstNode): void;
|
|
3337
|
+
protected formatNavigateToProperty(node: AstNode): void;
|
|
3338
|
+
protected formatAutolayoutProperty(node: AstNode): void;
|
|
3339
|
+
protected formatMetadataProperty(node: AstNode): void;
|
|
3340
|
+
protected formatElementDeclaration(node: AstNode): void;
|
|
3341
|
+
protected formatExtendElement(node: AstNode): void;
|
|
3342
|
+
protected formatGlobals(node: AstNode): void;
|
|
3343
|
+
protected formatImports(node: AstNode): void;
|
|
3344
|
+
protected formatSpecificationRule(node: AstNode): void;
|
|
3345
|
+
protected formatWithPredicate(node: AstNode): void;
|
|
3346
|
+
protected formatDeploymentNodeDeclaration(node: AstNode): void;
|
|
3347
|
+
protected formatDeployedInstance(node: AstNode): void;
|
|
3348
|
+
protected formatViewRuleGlobalStyle(node: AstNode): void;
|
|
3349
|
+
protected formatViewRuleGlobalPredicate(node: AstNode): void;
|
|
3350
|
+
protected formatViewRuleGroup(node: AstNode): void;
|
|
3351
|
+
protected formatViewRuleStyle(node: AstNode): void;
|
|
3352
|
+
protected formatWhereExpression(node: AstNode): void;
|
|
3353
|
+
protected formatWhereRelationExpression(node: AstNode): void;
|
|
3354
|
+
protected formatWhereElementExpression(node: AstNode): void;
|
|
3355
|
+
protected formatIncludeExcludeExpressions(node: AstNode): void;
|
|
3356
|
+
protected formatRelationExpression(node: AstNode): void;
|
|
3357
|
+
private findPredicateExpressionRoot;
|
|
3358
|
+
private on;
|
|
3359
|
+
private doExtendedFormatting;
|
|
3360
|
+
protected normalizeQuotes(node: AstNode): void;
|
|
3361
|
+
private quotesNormalizerFactory;
|
|
3362
|
+
private escapeQuotesInternalQuotes;
|
|
3363
|
+
private getAutoQuoteStyle;
|
|
3364
|
+
private onConfigurationUpdate;
|
|
2146
3365
|
} //#endregion
|
|
2147
3366
|
//#region src/references/name-provider.d.ts
|
|
2148
3367
|
declare class LikeC4NameProvider extends DefaultNameProvider {
|
|
@@ -2173,7 +3392,7 @@ declare class IndexManager extends DefaultIndexManager {
|
|
|
2173
3392
|
protected services: LikeC4SharedServices;
|
|
2174
3393
|
constructor(services: LikeC4SharedServices);
|
|
2175
3394
|
updateContent(document: LangiumDocument, cancelToken?: CancellationToken$1): Promise<void>;
|
|
2176
|
-
projectElements(projectId: ProjectId, nodeType?: string, uris?: Set<string>): Stream<AstNodeDescription>;
|
|
3395
|
+
projectElements(projectId: ProjectId$1, nodeType?: string, uris?: Set<string>): Stream<AstNodeDescription>;
|
|
2177
3396
|
} //#endregion
|
|
2178
3397
|
//#region src/workspace/LangiumDocuments.d.ts
|
|
2179
3398
|
declare class LangiumDocuments extends DefaultLangiumDocuments {
|
|
@@ -2193,8 +3412,8 @@ declare class LangiumDocuments extends DefaultLangiumDocuments {
|
|
|
2193
3412
|
/**
|
|
2194
3413
|
* Returns all documents for a project, including both project documents and documents included by the project.
|
|
2195
3414
|
*/
|
|
2196
|
-
projectDocuments(projectId: ProjectId): Stream<LikeC4LangiumDocument>;
|
|
2197
|
-
groupedByProject(): Record<ProjectId, NonEmptyArray<LikeC4LangiumDocument>>;
|
|
3415
|
+
projectDocuments(projectId: ProjectId$1): Stream<LikeC4LangiumDocument>;
|
|
3416
|
+
groupedByProject(): Record<ProjectId$1, NonEmptyArray$1<LikeC4LangiumDocument>>;
|
|
2198
3417
|
/**
|
|
2199
3418
|
* Reset the project IDs of all documents.
|
|
2200
3419
|
* Returns the URIs
|
|
@@ -2265,12 +3484,12 @@ declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
|
2265
3484
|
viewOf,
|
|
2266
3485
|
extends: ext
|
|
2267
3486
|
}: ElementView): Generator<AstNodeDescription>;
|
|
2268
|
-
protected getScopeForStrictFqnRef(projectId: ProjectId, container: StrictFqnRef, context: ReferenceInfo): Scope;
|
|
3487
|
+
protected getScopeForStrictFqnRef(projectId: ProjectId$1, container: StrictFqnRef, context: ReferenceInfo): Scope;
|
|
2269
3488
|
protected genScopeExtendDeployment({
|
|
2270
3489
|
deploymentNode
|
|
2271
3490
|
}: ExtendDeployment): Generator<AstNodeDescription>;
|
|
2272
|
-
protected streamForFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Stream<AstNodeDescription>;
|
|
2273
|
-
protected genScopeForParentlessFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Generator<AstNodeDescription>;
|
|
3491
|
+
protected streamForFqnRef(projectId: ProjectId$1, container: FqnRef$2, context: ReferenceInfo): Stream<AstNodeDescription>;
|
|
3492
|
+
protected genScopeForParentlessFqnRef(projectId: ProjectId$1, container: FqnRef$2, context: ReferenceInfo): Generator<AstNodeDescription>;
|
|
2274
3493
|
/**
|
|
2275
3494
|
* Computes the scope for a given reference context.
|
|
2276
3495
|
*
|
|
@@ -2282,24 +3501,16 @@ declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
|
2282
3501
|
* It then iterates through the container hierarchy, collecting relevant scopes based on the reference type and container type.
|
|
2283
3502
|
* Finally, it combines the collected scopes with the global scope to produce the final scope.
|
|
2284
3503
|
*/
|
|
2285
|
-
protected computeScope(projectId: ProjectId, context: ReferenceInfo, referenceType?: string): Generator<AstNodeDescription>;
|
|
3504
|
+
protected computeScope(projectId: ProjectId$1, context: ReferenceInfo, referenceType?: string): Generator<AstNodeDescription>;
|
|
2286
3505
|
/**
|
|
2287
3506
|
* Create a global scope filtered for the given reference type.
|
|
2288
3507
|
*/
|
|
2289
|
-
protected getProjectScope(projectId: ProjectId, referenceType: string, context: ReferenceInfo): Scope;
|
|
3508
|
+
protected getProjectScope(projectId: ProjectId$1, referenceType: string, context: ReferenceInfo): Scope;
|
|
2290
3509
|
/**
|
|
2291
3510
|
* Create a global scope filtered for the given reference type.
|
|
2292
3511
|
*/
|
|
2293
3512
|
protected getGlobalScope(referenceType: string, context: ReferenceInfo): Scope;
|
|
2294
3513
|
} //#endregion
|
|
2295
|
-
//#region src/utils/disposable.d.ts
|
|
2296
|
-
declare abstract class ADisposable implements Disposable$1 {
|
|
2297
|
-
protected toDispose: Disposable$1[];
|
|
2298
|
-
protected isDisposed: boolean;
|
|
2299
|
-
onDispose(...disposable: Disposable$1[]): void;
|
|
2300
|
-
dispose(): void;
|
|
2301
|
-
protected throwIfDisposed(): void;
|
|
2302
|
-
} //#endregion
|
|
2303
3514
|
//#region src/model/fqn-index.d.ts
|
|
2304
3515
|
declare class FqnIndex<AstNd = Element> extends ADisposable {
|
|
2305
3516
|
protected services: LikeC4Services;
|
|
@@ -2311,15 +3522,15 @@ declare class FqnIndex<AstNd = Element> extends ADisposable {
|
|
|
2311
3522
|
constructor(services: LikeC4Services);
|
|
2312
3523
|
private documents;
|
|
2313
3524
|
get(document: LikeC4LangiumDocument): DocumentFqnIndex;
|
|
2314
|
-
resolve(reference: Referenceable): Fqn
|
|
2315
|
-
getFqn(el: AstNd): Fqn
|
|
2316
|
-
byFqn(projectId: ProjectId
|
|
2317
|
-
rootElements(projectId: ProjectId
|
|
2318
|
-
directChildrenOf(projectId: ProjectId
|
|
3525
|
+
resolve(reference: Referenceable): Fqn;
|
|
3526
|
+
getFqn(el: AstNd): Fqn;
|
|
3527
|
+
byFqn(projectId: ProjectId, fqn: Fqn): Stream<AstNodeDescriptionWithFqn>;
|
|
3528
|
+
rootElements(projectId: ProjectId): Stream<AstNodeDescriptionWithFqn>;
|
|
3529
|
+
directChildrenOf(projectId: ProjectId, parent: Fqn): Stream<AstNodeDescriptionWithFqn>;
|
|
2319
3530
|
/**
|
|
2320
3531
|
* Returns descedant elements with unique names in the scope
|
|
2321
3532
|
*/
|
|
2322
|
-
uniqueDescedants(projectId: ProjectId
|
|
3533
|
+
uniqueDescedants(projectId: ProjectId, parent: Fqn): Stream<AstNodeDescriptionWithFqn>;
|
|
2323
3534
|
protected createDocumentIndex(document: LikeC4LangiumDocument): DocumentFqnIndex;
|
|
2324
3535
|
}
|
|
2325
3536
|
declare class DocumentFqnIndex {
|
|
@@ -2336,28 +3547,28 @@ declare class DocumentFqnIndex {
|
|
|
2336
3547
|
* All elements by FQN
|
|
2337
3548
|
*/
|
|
2338
3549
|
private _byfqn;
|
|
2339
|
-
readonly projectId: ProjectId
|
|
3550
|
+
readonly projectId: ProjectId;
|
|
2340
3551
|
static readonly EMPTY: DocumentFqnIndex;
|
|
2341
3552
|
constructor(_rootElements: Array<AstNodeDescriptionWithFqn>,
|
|
2342
3553
|
/**
|
|
2343
3554
|
* direct children of elements
|
|
2344
3555
|
*/
|
|
2345
3556
|
|
|
2346
|
-
_children: MultiMap<Fqn
|
|
3557
|
+
_children: MultiMap<Fqn, AstNodeDescriptionWithFqn>,
|
|
2347
3558
|
/**
|
|
2348
3559
|
* All descendants of an element (unique by name)
|
|
2349
3560
|
*/
|
|
2350
3561
|
|
|
2351
|
-
_descendants: MultiMap<Fqn
|
|
3562
|
+
_descendants: MultiMap<Fqn, AstNodeDescriptionWithFqn>,
|
|
2352
3563
|
/**
|
|
2353
3564
|
* All elements by FQN
|
|
2354
3565
|
*/
|
|
2355
3566
|
|
|
2356
|
-
_byfqn: MultiMap<Fqn
|
|
3567
|
+
_byfqn: MultiMap<Fqn, AstNodeDescriptionWithFqn>, projectId: ProjectId);
|
|
2357
3568
|
rootElements(): readonly AstNodeDescriptionWithFqn[];
|
|
2358
|
-
byFqn(fqn: Fqn
|
|
2359
|
-
children(parent: Fqn
|
|
2360
|
-
descendants(nodeName: Fqn
|
|
3569
|
+
byFqn(fqn: Fqn): readonly AstNodeDescriptionWithFqn[];
|
|
3570
|
+
children(parent: Fqn): readonly AstNodeDescriptionWithFqn[];
|
|
3571
|
+
descendants(nodeName: Fqn): readonly AstNodeDescriptionWithFqn[];
|
|
2361
3572
|
} //#endregion
|
|
2362
3573
|
//#region src/model/deployments-index.d.ts
|
|
2363
3574
|
declare class DeploymentsIndex extends FqnIndex<DeploymentElement> {
|
|
@@ -2433,7 +3644,7 @@ declare class MergedSpecification {
|
|
|
2433
3644
|
* Provides access to "last seen artifacts" for a given project,
|
|
2434
3645
|
* (Results of the last successful parsing)
|
|
2435
3646
|
*/
|
|
2436
|
-
declare class LastSeenArtifacts {
|
|
3647
|
+
declare class LastSeenArtifacts extends ADisposable {
|
|
2437
3648
|
#private;
|
|
2438
3649
|
constructor(services: LikeC4Services);
|
|
2439
3650
|
/**
|
|
@@ -2459,7 +3670,7 @@ declare class LastSeenArtifacts {
|
|
|
2459
3670
|
* @param projectId - Project id to look up.
|
|
2460
3671
|
* @returns LikeC4Styles or undefined.
|
|
2461
3672
|
*/
|
|
2462
|
-
styles(projectId: c4.ProjectId): LikeC4Styles
|
|
3673
|
+
styles(projectId: c4.ProjectId): LikeC4Styles | undefined;
|
|
2463
3674
|
/**
|
|
2464
3675
|
* Returns the last seen computed model for the given project, if available.
|
|
2465
3676
|
* @param projectId - Project id to look up.
|
|
@@ -2468,11 +3679,11 @@ declare class LastSeenArtifacts {
|
|
|
2468
3679
|
model(projectId: c4.ProjectId): LikeC4Model.Computed | undefined;
|
|
2469
3680
|
} //#endregion
|
|
2470
3681
|
//#region src/model/model-builder.d.ts
|
|
2471
|
-
type ModelParsedListener = (projectId: ProjectId, docs: URI[]) => void;
|
|
3682
|
+
type ModelParsedListener = (projectId: ProjectId$1, docs: URI[]) => void;
|
|
2472
3683
|
interface LikeC4ModelBuilder extends Disposable$1 {
|
|
2473
|
-
parseModel(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownParsed> | null>;
|
|
2474
|
-
unsafeSyncComputeModel(projectId: ProjectId): LikeC4Model<UnknownComputed>;
|
|
2475
|
-
computeModel(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownComputed>>;
|
|
3684
|
+
parseModel(projectId?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownParsed> | null>;
|
|
3685
|
+
unsafeSyncComputeModel(projectId: ProjectId$1): LikeC4Model<UnknownComputed>;
|
|
3686
|
+
computeModel(projectId?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownComputed>>;
|
|
2476
3687
|
onModelParsed(callback: ModelParsedListener): Disposable$1;
|
|
2477
3688
|
clearCache(): void;
|
|
2478
3689
|
} //#endregion
|
|
@@ -2548,15 +3759,15 @@ declare class LikeC4ModelLocator {
|
|
|
2548
3759
|
//#region src/views/LikeC4Views.d.ts
|
|
2549
3760
|
type GraphvizOut = {
|
|
2550
3761
|
readonly dot: string;
|
|
2551
|
-
readonly diagram: LayoutedView;
|
|
3762
|
+
readonly diagram: LayoutedView$1;
|
|
2552
3763
|
};
|
|
2553
3764
|
type GraphvizSvgOut = {
|
|
2554
|
-
readonly id: ViewId;
|
|
3765
|
+
readonly id: ViewId$1;
|
|
2555
3766
|
readonly dot: string;
|
|
2556
3767
|
readonly svg: string;
|
|
2557
3768
|
};
|
|
2558
3769
|
type LayoutViewParams = {
|
|
2559
|
-
viewId: ViewId;
|
|
3770
|
+
viewId: ViewId$1;
|
|
2560
3771
|
/**
|
|
2561
3772
|
* Type of layout to apply
|
|
2562
3773
|
* - 'manual' - applies manual layout if any
|
|
@@ -2564,29 +3775,32 @@ type LayoutViewParams = {
|
|
|
2564
3775
|
* - undefined - returns latest layout as is
|
|
2565
3776
|
*/
|
|
2566
3777
|
layoutType?: LayoutType | undefined;
|
|
2567
|
-
projectId?: ProjectId | undefined;
|
|
2568
|
-
cancelToken?: CancellationToken$1 | undefined;
|
|
3778
|
+
projectId?: ProjectId$1 | undefined;
|
|
3779
|
+
cancelToken?: CancellationToken$1 | undefined; /** Optional AI-generated layout hints */
|
|
3780
|
+
layoutHints?: AILayoutHints | undefined;
|
|
2569
3781
|
};
|
|
2570
|
-
interface LikeC4Views {
|
|
3782
|
+
interface LikeC4Views extends Disposable$1 {
|
|
2571
3783
|
readonly layouter: GraphvizLayouter;
|
|
2572
3784
|
/**
|
|
2573
3785
|
* Returns computed views (i.e. views with predicates computed)
|
|
2574
3786
|
*
|
|
2575
3787
|
* @param projectId - project id, if not specified - uses the default project
|
|
2576
3788
|
*/
|
|
2577
|
-
computedViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<ComputedView[]>;
|
|
3789
|
+
computedViews(projectId?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<ComputedView[]>;
|
|
2578
3790
|
/**
|
|
2579
3791
|
* Layouts all views (ignoring any manual snapshots)
|
|
2580
3792
|
*
|
|
2581
3793
|
* @param projectId - project id, if not specified - uses the default project
|
|
2582
3794
|
*/
|
|
2583
|
-
layoutAllViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<GraphvizOut[]>;
|
|
3795
|
+
layoutAllViews(projectId?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<GraphvizOut[]>;
|
|
2584
3796
|
/**
|
|
2585
3797
|
* Layouts a view.
|
|
2586
|
-
* If layoutType is 'manual' - applies manual layout if any.
|
|
2587
|
-
* If layoutType is 'auto' - returns latest version with drifts from manual layout if any
|
|
3798
|
+
* If `layoutType` is 'manual' - applies manual layout if any.
|
|
3799
|
+
* If `layoutType` is 'auto' - returns latest version with drifts from manual layout if any
|
|
2588
3800
|
* If not specified - returns latest layout as is
|
|
2589
3801
|
*
|
|
3802
|
+
* If `layoutHints` are provided, they will be used, ignoring any manual snapshots, and the resulting layout will not be cached (i.e. it will be computed on every call)
|
|
3803
|
+
*
|
|
2590
3804
|
* If view not found in model, but there is a snapshot - it will be returned (with empty DOT)
|
|
2591
3805
|
*/
|
|
2592
3806
|
layoutView(params: LayoutViewParams): Promise<GraphvizOut | null>;
|
|
@@ -2595,25 +3809,25 @@ interface LikeC4Views {
|
|
|
2595
3809
|
* If diagram has manual layout, it will be used.
|
|
2596
3810
|
* @param projectId - project id, if not specified - uses the default project
|
|
2597
3811
|
*/
|
|
2598
|
-
diagrams(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<Array<DiagramView>>;
|
|
3812
|
+
diagrams(projectId?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<Array<DiagramView>>;
|
|
2599
3813
|
/**
|
|
2600
3814
|
* Returns all layouted views as Graphviz output (i.e. views with layout computed)
|
|
2601
3815
|
* @param projectId - project id, if not specified - uses the default project
|
|
2602
3816
|
*/
|
|
2603
|
-
viewsAsGraphvizOut(projectId?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<Array<GraphvizSvgOut>>;
|
|
3817
|
+
viewsAsGraphvizOut(projectId?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<Array<GraphvizSvgOut>>;
|
|
2604
3818
|
/**
|
|
2605
3819
|
* Open view in the preview panel.
|
|
2606
3820
|
* (works only if running as a vscode extension)
|
|
2607
3821
|
*
|
|
2608
3822
|
* @param projectId - project id, if not specified - uses the default project
|
|
2609
3823
|
*/
|
|
2610
|
-
openView(viewId: ViewId, projectId?: ProjectId | undefined): Promise<void>;
|
|
3824
|
+
openView(viewId: ViewId$1, projectId?: ProjectId$1 | undefined): Promise<void>;
|
|
2611
3825
|
/**
|
|
2612
3826
|
* Computes and layouts an adhoc view (not defined in the model)
|
|
2613
3827
|
*
|
|
2614
3828
|
* @param projectId - project id, if not specified - uses the default project
|
|
2615
3829
|
*/
|
|
2616
|
-
adhocView(predicates: AdhocViewPredicate[], projectId?: ProjectId | undefined): Promise<LayoutedView>;
|
|
3830
|
+
adhocView(predicates: AdhocViewPredicate[], projectId?: ProjectId$1 | undefined): Promise<LayoutedView$1>;
|
|
2617
3831
|
} //#endregion
|
|
2618
3832
|
//#region src/views/index.d.ts
|
|
2619
3833
|
//#endregion
|
|
@@ -2679,58 +3893,58 @@ declare class BaseParser {
|
|
|
2679
3893
|
declare const DocumentParserFromMixins: {
|
|
2680
3894
|
new (...args: any[]): {
|
|
2681
3895
|
parseGlobals(): void;
|
|
2682
|
-
parseAndStoreGlobalPredicateGroupOrDynamic(astRule: GlobalPredicateGroup | GlobalDynamicPredicateGroup, id: ProjectId, c4Globals: ParsedAstGlobals): void;
|
|
2683
|
-
parseGlobalPredicateGroup(astRule: GlobalPredicateGroup): ProjectId[];
|
|
2684
|
-
parseGlobalDynamicPredicateGroup(astRule: GlobalDynamicPredicateGroup): ProjectId[];
|
|
2685
|
-
parseGlobalStyleOrGroup(astRule: GlobalStyle | GlobalStyleGroup): ProjectId[];
|
|
3896
|
+
parseAndStoreGlobalPredicateGroupOrDynamic(astRule: GlobalPredicateGroup | GlobalDynamicPredicateGroup, id: ProjectId$1, c4Globals: ParsedAstGlobals): void;
|
|
3897
|
+
parseGlobalPredicateGroup(astRule: GlobalPredicateGroup): ProjectId$1[];
|
|
3898
|
+
parseGlobalDynamicPredicateGroup(astRule: GlobalDynamicPredicateGroup): ProjectId$1[];
|
|
3899
|
+
parseGlobalStyleOrGroup(astRule: GlobalStyle | GlobalStyleGroup): ProjectId$1[];
|
|
2686
3900
|
parseViews(): void;
|
|
2687
3901
|
parseElementView(astNode: ElementView, additionalStyles: any[]): ParsedAstElementView;
|
|
2688
|
-
parseElementViewRule(astRule: ViewRule): ProjectId;
|
|
2689
|
-
parseViewRulePredicate(astNode: ViewRulePredicate): ProjectId;
|
|
2690
|
-
parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): ProjectId;
|
|
3902
|
+
parseElementViewRule(astRule: ViewRule): ProjectId$1;
|
|
3903
|
+
parseViewRulePredicate(astNode: ViewRulePredicate): ProjectId$1;
|
|
3904
|
+
parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): ProjectId$1;
|
|
2691
3905
|
parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): any;
|
|
2692
|
-
parseViewRuleGroup(astNode: ViewRuleGroup): ProjectId;
|
|
2693
|
-
parseViewRuleRank(astRule: ViewRuleRank): ProjectId;
|
|
2694
|
-
parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): ProjectId;
|
|
2695
|
-
parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): ProjectId;
|
|
3906
|
+
parseViewRuleGroup(astNode: ViewRuleGroup): ProjectId$1;
|
|
3907
|
+
parseViewRuleRank(astRule: ViewRuleRank): ProjectId$1;
|
|
3908
|
+
parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): ProjectId$1;
|
|
3909
|
+
parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): ProjectId$1;
|
|
2696
3910
|
parseDynamicElementView(astNode: DynamicView, additionalStyles: any[]): ParsedAstDynamicView;
|
|
2697
|
-
parseDynamicViewRule(astRule: DynamicViewRule): ProjectId;
|
|
2698
|
-
parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId;
|
|
2699
|
-
parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId;
|
|
2700
|
-
parseDynamicStep(node: DynamicViewStep): ProjectId | ProjectId;
|
|
2701
|
-
recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
|
|
2702
|
-
parseDynamicStepSingle(node: DynamicStepSingle): ProjectId;
|
|
2703
|
-
parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId, "source", {
|
|
3911
|
+
parseDynamicViewRule(astRule: DynamicViewRule): ProjectId$1;
|
|
3912
|
+
parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId$1;
|
|
3913
|
+
parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId$1;
|
|
3914
|
+
parseDynamicStep(node: DynamicViewStep): ProjectId$1 | ProjectId$1;
|
|
3915
|
+
recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId$1, target: ProjectId$1]>): ProjectId$1[];
|
|
3916
|
+
parseDynamicStepSingle(node: DynamicStepSingle): ProjectId$1;
|
|
3917
|
+
parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId$1, "source", {
|
|
2704
3918
|
requireExactProps: true;
|
|
2705
3919
|
}>>;
|
|
2706
|
-
parsePredicate(astNode: ExpressionV2): ProjectId;
|
|
2707
|
-
parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
|
|
2708
|
-
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
2709
|
-
parseElementExpression(astNode: FqnExpr$2): ProjectId;
|
|
2710
|
-
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId;
|
|
2711
|
-
parseElementPredicateWith(astNode: FqnExprWith): ProjectId;
|
|
2712
|
-
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId;
|
|
2713
|
-
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
2714
|
-
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId;
|
|
2715
|
-
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId;
|
|
2716
|
-
parseRelationExpression(astNode: RelationExpr$1): ProjectId;
|
|
2717
|
-
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
2718
|
-
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
2719
|
-
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
2720
|
-
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
2721
|
-
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
2722
|
-
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
2723
|
-
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
2724
|
-
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
2725
|
-
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
2726
|
-
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
2727
|
-
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
2728
|
-
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
2729
|
-
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
2730
|
-
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
2731
|
-
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
2732
|
-
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
2733
|
-
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
3920
|
+
parsePredicate(astNode: ExpressionV2): ProjectId$1;
|
|
3921
|
+
parseElementPredicate(astNode: FqnExprOrWith): ProjectId$1;
|
|
3922
|
+
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
3923
|
+
parseElementExpression(astNode: FqnExpr$2): ProjectId$1;
|
|
3924
|
+
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
3925
|
+
parseElementPredicateWith(astNode: FqnExprWith): ProjectId$1;
|
|
3926
|
+
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId$1;
|
|
3927
|
+
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
3928
|
+
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
3929
|
+
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId$1;
|
|
3930
|
+
parseRelationExpression(astNode: RelationExpr$1): ProjectId$1;
|
|
3931
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId$1;
|
|
3932
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId$1;
|
|
3933
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId$1;
|
|
3934
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId$1;
|
|
3935
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
3936
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
3937
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId$1;
|
|
3938
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId$1;
|
|
3939
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId$1[];
|
|
3940
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId$1;
|
|
3941
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId$1;
|
|
3942
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId$1["customRelation"], "expr">;
|
|
3943
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
3944
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
3945
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId$1;
|
|
3946
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId$1 | null;
|
|
3947
|
+
wrapInWhere(expr: ProjectId$1, condition: ProjectId$1 | null): ProjectId$1;
|
|
2734
3948
|
isValid: IsValidFn;
|
|
2735
3949
|
docUri: string;
|
|
2736
3950
|
docPathInProject: string;
|
|
@@ -2740,23 +3954,23 @@ declare const DocumentParserFromMixins: {
|
|
|
2740
3954
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
2741
3955
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
2742
3956
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
2743
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
3957
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
2744
3958
|
getAstNodePath(node: AstNode): string;
|
|
2745
3959
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
2746
3960
|
[key: string]: string | string[];
|
|
2747
3961
|
} | undefined;
|
|
2748
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
3962
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
2749
3963
|
convertTags<E extends {
|
|
2750
3964
|
tags?: Tags;
|
|
2751
3965
|
}>(withTags?: E | undefined): any;
|
|
2752
3966
|
parseTags<E extends {
|
|
2753
3967
|
tags?: Tags;
|
|
2754
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
2755
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2756
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2757
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
3968
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
3969
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
3970
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
3971
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
2758
3972
|
parseImageAlias(value: string): string | undefined;
|
|
2759
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
3973
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
2760
3974
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
2761
3975
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
2762
3976
|
parseBaseProps(props: {
|
|
@@ -2771,71 +3985,71 @@ declare const DocumentParserFromMixins: {
|
|
|
2771
3985
|
technology?: string | undefined;
|
|
2772
3986
|
}): {
|
|
2773
3987
|
title?: string;
|
|
2774
|
-
summary?: ProjectId;
|
|
2775
|
-
description?: ProjectId;
|
|
3988
|
+
summary?: ProjectId$1;
|
|
3989
|
+
description?: ProjectId$1;
|
|
2776
3990
|
technology?: string;
|
|
2777
3991
|
};
|
|
2778
3992
|
parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
|
|
2779
|
-
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId;
|
|
2780
|
-
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId;
|
|
2781
|
-
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId;
|
|
3993
|
+
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId$1;
|
|
3994
|
+
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId$1;
|
|
3995
|
+
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId$1;
|
|
2782
3996
|
parseDeployment(): void;
|
|
2783
3997
|
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
2784
3998
|
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
2785
3999
|
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
2786
|
-
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
4000
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId$1;
|
|
2787
4001
|
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
2788
4002
|
};
|
|
2789
4003
|
} & {
|
|
2790
4004
|
new (...args: any[]): {
|
|
2791
4005
|
parseViews(): void;
|
|
2792
4006
|
parseElementView(astNode: ElementView, additionalStyles: any[]): ParsedAstElementView;
|
|
2793
|
-
parseElementViewRule(astRule: ViewRule): ProjectId;
|
|
2794
|
-
parseViewRulePredicate(astNode: ViewRulePredicate): ProjectId;
|
|
2795
|
-
parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): ProjectId;
|
|
4007
|
+
parseElementViewRule(astRule: ViewRule): ProjectId$1;
|
|
4008
|
+
parseViewRulePredicate(astNode: ViewRulePredicate): ProjectId$1;
|
|
4009
|
+
parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): ProjectId$1;
|
|
2796
4010
|
parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): any;
|
|
2797
|
-
parseViewRuleGroup(astNode: ViewRuleGroup): ProjectId;
|
|
2798
|
-
parseViewRuleRank(astRule: ViewRuleRank): ProjectId;
|
|
2799
|
-
parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): ProjectId;
|
|
2800
|
-
parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): ProjectId;
|
|
4011
|
+
parseViewRuleGroup(astNode: ViewRuleGroup): ProjectId$1;
|
|
4012
|
+
parseViewRuleRank(astRule: ViewRuleRank): ProjectId$1;
|
|
4013
|
+
parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): ProjectId$1;
|
|
4014
|
+
parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): ProjectId$1;
|
|
2801
4015
|
parseDynamicElementView(astNode: DynamicView, additionalStyles: any[]): ParsedAstDynamicView;
|
|
2802
|
-
parseDynamicViewRule(astRule: DynamicViewRule): ProjectId;
|
|
2803
|
-
parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId;
|
|
2804
|
-
parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId;
|
|
2805
|
-
parseDynamicStep(node: DynamicViewStep): ProjectId | ProjectId;
|
|
2806
|
-
recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
|
|
2807
|
-
parseDynamicStepSingle(node: DynamicStepSingle): ProjectId;
|
|
2808
|
-
parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId, "source", {
|
|
4016
|
+
parseDynamicViewRule(astRule: DynamicViewRule): ProjectId$1;
|
|
4017
|
+
parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId$1;
|
|
4018
|
+
parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId$1;
|
|
4019
|
+
parseDynamicStep(node: DynamicViewStep): ProjectId$1 | ProjectId$1;
|
|
4020
|
+
recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId$1, target: ProjectId$1]>): ProjectId$1[];
|
|
4021
|
+
parseDynamicStepSingle(node: DynamicStepSingle): ProjectId$1;
|
|
4022
|
+
parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId$1, "source", {
|
|
2809
4023
|
requireExactProps: true;
|
|
2810
4024
|
}>>;
|
|
2811
|
-
parsePredicate(astNode: ExpressionV2): ProjectId;
|
|
2812
|
-
parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
|
|
2813
|
-
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
2814
|
-
parseElementExpression(astNode: FqnExpr$2): ProjectId;
|
|
2815
|
-
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId;
|
|
2816
|
-
parseElementPredicateWith(astNode: FqnExprWith): ProjectId;
|
|
2817
|
-
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId;
|
|
2818
|
-
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
2819
|
-
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId;
|
|
2820
|
-
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId;
|
|
2821
|
-
parseRelationExpression(astNode: RelationExpr$1): ProjectId;
|
|
2822
|
-
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
2823
|
-
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
2824
|
-
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
2825
|
-
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
2826
|
-
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
2827
|
-
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
2828
|
-
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
2829
|
-
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
2830
|
-
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
2831
|
-
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
2832
|
-
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
2833
|
-
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
2834
|
-
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
2835
|
-
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
2836
|
-
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
2837
|
-
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
2838
|
-
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
4025
|
+
parsePredicate(astNode: ExpressionV2): ProjectId$1;
|
|
4026
|
+
parseElementPredicate(astNode: FqnExprOrWith): ProjectId$1;
|
|
4027
|
+
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4028
|
+
parseElementExpression(astNode: FqnExpr$2): ProjectId$1;
|
|
4029
|
+
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4030
|
+
parseElementPredicateWith(astNode: FqnExprWith): ProjectId$1;
|
|
4031
|
+
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId$1;
|
|
4032
|
+
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4033
|
+
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4034
|
+
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId$1;
|
|
4035
|
+
parseRelationExpression(astNode: RelationExpr$1): ProjectId$1;
|
|
4036
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId$1;
|
|
4037
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId$1;
|
|
4038
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId$1;
|
|
4039
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId$1;
|
|
4040
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4041
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4042
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId$1;
|
|
4043
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId$1;
|
|
4044
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId$1[];
|
|
4045
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId$1;
|
|
4046
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId$1;
|
|
4047
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId$1["customRelation"], "expr">;
|
|
4048
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4049
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4050
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId$1;
|
|
4051
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId$1 | null;
|
|
4052
|
+
wrapInWhere(expr: ProjectId$1, condition: ProjectId$1 | null): ProjectId$1;
|
|
2839
4053
|
isValid: IsValidFn;
|
|
2840
4054
|
docUri: string;
|
|
2841
4055
|
docPathInProject: string;
|
|
@@ -2845,23 +4059,23 @@ declare const DocumentParserFromMixins: {
|
|
|
2845
4059
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
2846
4060
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
2847
4061
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
2848
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4062
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
2849
4063
|
getAstNodePath(node: AstNode): string;
|
|
2850
4064
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
2851
4065
|
[key: string]: string | string[];
|
|
2852
4066
|
} | undefined;
|
|
2853
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4067
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
2854
4068
|
convertTags<E extends {
|
|
2855
4069
|
tags?: Tags;
|
|
2856
4070
|
}>(withTags?: E | undefined): any;
|
|
2857
4071
|
parseTags<E extends {
|
|
2858
4072
|
tags?: Tags;
|
|
2859
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
2860
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2861
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2862
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4073
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4074
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4075
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4076
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
2863
4077
|
parseImageAlias(value: string): string | undefined;
|
|
2864
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4078
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
2865
4079
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
2866
4080
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
2867
4081
|
parseBaseProps(props: {
|
|
@@ -2876,19 +4090,19 @@ declare const DocumentParserFromMixins: {
|
|
|
2876
4090
|
technology?: string | undefined;
|
|
2877
4091
|
}): {
|
|
2878
4092
|
title?: string;
|
|
2879
|
-
summary?: ProjectId;
|
|
2880
|
-
description?: ProjectId;
|
|
4093
|
+
summary?: ProjectId$1;
|
|
4094
|
+
description?: ProjectId$1;
|
|
2881
4095
|
technology?: string;
|
|
2882
4096
|
};
|
|
2883
4097
|
parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
|
|
2884
|
-
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId;
|
|
2885
|
-
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId;
|
|
2886
|
-
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId;
|
|
4098
|
+
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId$1;
|
|
4099
|
+
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId$1;
|
|
4100
|
+
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId$1;
|
|
2887
4101
|
parseDeployment(): void;
|
|
2888
4102
|
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
2889
4103
|
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
2890
4104
|
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
2891
|
-
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
4105
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId$1;
|
|
2892
4106
|
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
2893
4107
|
};
|
|
2894
4108
|
} & {
|
|
@@ -2905,23 +4119,23 @@ declare const DocumentParserFromMixins: {
|
|
|
2905
4119
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
2906
4120
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
2907
4121
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
2908
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4122
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
2909
4123
|
getAstNodePath(node: AstNode): string;
|
|
2910
4124
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
2911
4125
|
[key: string]: string | string[];
|
|
2912
4126
|
} | undefined;
|
|
2913
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4127
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
2914
4128
|
convertTags<E extends {
|
|
2915
4129
|
tags?: Tags;
|
|
2916
4130
|
}>(withTags?: E | undefined): any;
|
|
2917
4131
|
parseTags<E extends {
|
|
2918
4132
|
tags?: Tags;
|
|
2919
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
2920
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2921
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2922
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4133
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4134
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4135
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4136
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
2923
4137
|
parseImageAlias(value: string): string | undefined;
|
|
2924
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4138
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
2925
4139
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
2926
4140
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
2927
4141
|
parseBaseProps(props: {
|
|
@@ -2936,41 +4150,41 @@ declare const DocumentParserFromMixins: {
|
|
|
2936
4150
|
technology?: string | undefined;
|
|
2937
4151
|
}): {
|
|
2938
4152
|
title?: string;
|
|
2939
|
-
summary?: ProjectId;
|
|
2940
|
-
description?: ProjectId;
|
|
4153
|
+
summary?: ProjectId$1;
|
|
4154
|
+
description?: ProjectId$1;
|
|
2941
4155
|
technology?: string;
|
|
2942
4156
|
};
|
|
2943
4157
|
};
|
|
2944
4158
|
} & {
|
|
2945
4159
|
new (...args: any[]): {
|
|
2946
|
-
parsePredicate(astNode: ExpressionV2): ProjectId;
|
|
2947
|
-
parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
|
|
2948
|
-
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
2949
|
-
parseElementExpression(astNode: FqnExpr$2): ProjectId;
|
|
2950
|
-
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId;
|
|
2951
|
-
parseElementPredicateWith(astNode: FqnExprWith): ProjectId;
|
|
2952
|
-
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId;
|
|
2953
|
-
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
2954
|
-
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId;
|
|
2955
|
-
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId;
|
|
2956
|
-
parseRelationExpression(astNode: RelationExpr$1): ProjectId;
|
|
2957
|
-
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
2958
|
-
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
2959
|
-
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
2960
|
-
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
2961
|
-
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
2962
|
-
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
2963
|
-
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
2964
|
-
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
2965
|
-
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
2966
|
-
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
2967
|
-
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
2968
|
-
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
2969
|
-
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
2970
|
-
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
2971
|
-
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
2972
|
-
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
2973
|
-
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
4160
|
+
parsePredicate(astNode: ExpressionV2): ProjectId$1;
|
|
4161
|
+
parseElementPredicate(astNode: FqnExprOrWith): ProjectId$1;
|
|
4162
|
+
parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4163
|
+
parseElementExpression(astNode: FqnExpr$2): ProjectId$1;
|
|
4164
|
+
parseElementPredicateWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4165
|
+
parseElementPredicateWith(astNode: FqnExprWith): ProjectId$1;
|
|
4166
|
+
parseRelationPredicate(astNode: RelationExprOrWith): ProjectId$1;
|
|
4167
|
+
parseRelationPredicateOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4168
|
+
parseRelationPredicateWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4169
|
+
parseRelationPredicateWith(astNode: RelationExprWith): ProjectId$1;
|
|
4170
|
+
parseRelationExpression(astNode: RelationExpr$1): ProjectId$1;
|
|
4171
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId$1;
|
|
4172
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId$1;
|
|
4173
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId$1;
|
|
4174
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId$1;
|
|
4175
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4176
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4177
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId$1;
|
|
4178
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId$1;
|
|
4179
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId$1[];
|
|
4180
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId$1;
|
|
4181
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId$1;
|
|
4182
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId$1["customRelation"], "expr">;
|
|
4183
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4184
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4185
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId$1;
|
|
4186
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId$1 | null;
|
|
4187
|
+
wrapInWhere(expr: ProjectId$1, condition: ProjectId$1 | null): ProjectId$1;
|
|
2974
4188
|
isValid: IsValidFn;
|
|
2975
4189
|
docUri: string;
|
|
2976
4190
|
docPathInProject: string;
|
|
@@ -2980,23 +4194,23 @@ declare const DocumentParserFromMixins: {
|
|
|
2980
4194
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
2981
4195
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
2982
4196
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
2983
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4197
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
2984
4198
|
getAstNodePath(node: AstNode): string;
|
|
2985
4199
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
2986
4200
|
[key: string]: string | string[];
|
|
2987
4201
|
} | undefined;
|
|
2988
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4202
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
2989
4203
|
convertTags<E extends {
|
|
2990
4204
|
tags?: Tags;
|
|
2991
4205
|
}>(withTags?: E | undefined): any;
|
|
2992
4206
|
parseTags<E extends {
|
|
2993
4207
|
tags?: Tags;
|
|
2994
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
2995
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2996
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
2997
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4208
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4209
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4210
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4211
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
2998
4212
|
parseImageAlias(value: string): string | undefined;
|
|
2999
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4213
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
3000
4214
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
3001
4215
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
3002
4216
|
parseBaseProps(props: {
|
|
@@ -3011,34 +4225,34 @@ declare const DocumentParserFromMixins: {
|
|
|
3011
4225
|
technology?: string | undefined;
|
|
3012
4226
|
}): {
|
|
3013
4227
|
title?: string;
|
|
3014
|
-
summary?: ProjectId;
|
|
3015
|
-
description?: ProjectId;
|
|
4228
|
+
summary?: ProjectId$1;
|
|
4229
|
+
description?: ProjectId$1;
|
|
3016
4230
|
technology?: string;
|
|
3017
4231
|
};
|
|
3018
4232
|
};
|
|
3019
4233
|
} & {
|
|
3020
4234
|
new (...args: any[]): {
|
|
3021
4235
|
parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
|
|
3022
|
-
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId;
|
|
3023
|
-
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId;
|
|
3024
|
-
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId;
|
|
3025
|
-
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
3026
|
-
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
3027
|
-
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
3028
|
-
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
3029
|
-
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
3030
|
-
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
3031
|
-
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
3032
|
-
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
3033
|
-
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
3034
|
-
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
3035
|
-
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
3036
|
-
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
3037
|
-
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
3038
|
-
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
3039
|
-
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
3040
|
-
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
3041
|
-
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
4236
|
+
parseDeploymentViewRule(astRule: DeploymentViewRule): ProjectId$1;
|
|
4237
|
+
parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): ProjectId$1;
|
|
4238
|
+
parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): ProjectId$1;
|
|
4239
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId$1;
|
|
4240
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId$1;
|
|
4241
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId$1;
|
|
4242
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId$1;
|
|
4243
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4244
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4245
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId$1;
|
|
4246
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId$1;
|
|
4247
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId$1[];
|
|
4248
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId$1;
|
|
4249
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId$1;
|
|
4250
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId$1["customRelation"], "expr">;
|
|
4251
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4252
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4253
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId$1;
|
|
4254
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId$1 | null;
|
|
4255
|
+
wrapInWhere(expr: ProjectId$1, condition: ProjectId$1 | null): ProjectId$1;
|
|
3042
4256
|
isValid: IsValidFn;
|
|
3043
4257
|
docUri: string;
|
|
3044
4258
|
docPathInProject: string;
|
|
@@ -3048,23 +4262,23 @@ declare const DocumentParserFromMixins: {
|
|
|
3048
4262
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
3049
4263
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
3050
4264
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
3051
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4265
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
3052
4266
|
getAstNodePath(node: AstNode): string;
|
|
3053
4267
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
3054
4268
|
[key: string]: string | string[];
|
|
3055
4269
|
} | undefined;
|
|
3056
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4270
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
3057
4271
|
convertTags<E extends {
|
|
3058
4272
|
tags?: Tags;
|
|
3059
4273
|
}>(withTags?: E | undefined): any;
|
|
3060
4274
|
parseTags<E extends {
|
|
3061
4275
|
tags?: Tags;
|
|
3062
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
3063
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3064
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3065
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4276
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4277
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4278
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4279
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
3066
4280
|
parseImageAlias(value: string): string | undefined;
|
|
3067
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4281
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
3068
4282
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
3069
4283
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
3070
4284
|
parseBaseProps(props: {
|
|
@@ -3079,15 +4293,15 @@ declare const DocumentParserFromMixins: {
|
|
|
3079
4293
|
technology?: string | undefined;
|
|
3080
4294
|
}): {
|
|
3081
4295
|
title?: string;
|
|
3082
|
-
summary?: ProjectId;
|
|
3083
|
-
description?: ProjectId;
|
|
4296
|
+
summary?: ProjectId$1;
|
|
4297
|
+
description?: ProjectId$1;
|
|
3084
4298
|
technology?: string;
|
|
3085
4299
|
};
|
|
3086
4300
|
parseDeployment(): void;
|
|
3087
4301
|
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
3088
4302
|
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
3089
4303
|
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
3090
|
-
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
4304
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId$1;
|
|
3091
4305
|
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
3092
4306
|
};
|
|
3093
4307
|
} & {
|
|
@@ -3096,25 +4310,25 @@ declare const DocumentParserFromMixins: {
|
|
|
3096
4310
|
parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
|
|
3097
4311
|
parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
|
|
3098
4312
|
parseExtendDeployment(astNode: ExtendDeployment): ParsedAstExtend | null;
|
|
3099
|
-
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId;
|
|
4313
|
+
_resolveDeploymentRelationSource(node: DeploymentRelation): ProjectId$1;
|
|
3100
4314
|
parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
|
|
3101
|
-
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
3102
|
-
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
3103
|
-
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
3104
|
-
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
3105
|
-
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
3106
|
-
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
3107
|
-
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
3108
|
-
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
3109
|
-
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
3110
|
-
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
3111
|
-
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
3112
|
-
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
3113
|
-
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
3114
|
-
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
3115
|
-
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
3116
|
-
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
3117
|
-
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
4315
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId$1;
|
|
4316
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId$1;
|
|
4317
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId$1;
|
|
4318
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId$1;
|
|
4319
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4320
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4321
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId$1;
|
|
4322
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId$1;
|
|
4323
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId$1[];
|
|
4324
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId$1;
|
|
4325
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId$1;
|
|
4326
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId$1["customRelation"], "expr">;
|
|
4327
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4328
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4329
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId$1;
|
|
4330
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId$1 | null;
|
|
4331
|
+
wrapInWhere(expr: ProjectId$1, condition: ProjectId$1 | null): ProjectId$1;
|
|
3118
4332
|
isValid: IsValidFn;
|
|
3119
4333
|
docUri: string;
|
|
3120
4334
|
docPathInProject: string;
|
|
@@ -3124,23 +4338,23 @@ declare const DocumentParserFromMixins: {
|
|
|
3124
4338
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
3125
4339
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
3126
4340
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
3127
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4341
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
3128
4342
|
getAstNodePath(node: AstNode): string;
|
|
3129
4343
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
3130
4344
|
[key: string]: string | string[];
|
|
3131
4345
|
} | undefined;
|
|
3132
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4346
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
3133
4347
|
convertTags<E extends {
|
|
3134
4348
|
tags?: Tags;
|
|
3135
4349
|
}>(withTags?: E | undefined): any;
|
|
3136
4350
|
parseTags<E extends {
|
|
3137
4351
|
tags?: Tags;
|
|
3138
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
3139
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3140
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3141
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4352
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4353
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4354
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4355
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
3142
4356
|
parseImageAlias(value: string): string | undefined;
|
|
3143
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4357
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
3144
4358
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
3145
4359
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
3146
4360
|
parseBaseProps(props: {
|
|
@@ -3155,8 +4369,8 @@ declare const DocumentParserFromMixins: {
|
|
|
3155
4369
|
technology?: string | undefined;
|
|
3156
4370
|
}): {
|
|
3157
4371
|
title?: string;
|
|
3158
|
-
summary?: ProjectId;
|
|
3159
|
-
description?: ProjectId;
|
|
4372
|
+
summary?: ProjectId$1;
|
|
4373
|
+
description?: ProjectId$1;
|
|
3160
4374
|
technology?: string;
|
|
3161
4375
|
};
|
|
3162
4376
|
};
|
|
@@ -3166,25 +4380,25 @@ declare const DocumentParserFromMixins: {
|
|
|
3166
4380
|
parseElement(astNode: Element): ParsedAstElement;
|
|
3167
4381
|
parseExtendElement(astNode: ExtendElement): ParsedAstExtend | null;
|
|
3168
4382
|
parseExtendRelation(astNode: ExtendRelation): ParsedAstExtendRelation | null;
|
|
3169
|
-
_resolveRelationSource(node: Relation): ProjectId | ProjectId;
|
|
4383
|
+
_resolveRelationSource(node: Relation): ProjectId$1 | ProjectId$1;
|
|
3170
4384
|
parseRelation(astNode: Relation): ParsedAstRelation;
|
|
3171
|
-
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
3172
|
-
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
3173
|
-
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
3174
|
-
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
3175
|
-
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
3176
|
-
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
3177
|
-
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
3178
|
-
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
3179
|
-
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
3180
|
-
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
3181
|
-
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
3182
|
-
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
3183
|
-
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
3184
|
-
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
3185
|
-
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
3186
|
-
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
3187
|
-
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
4385
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId$1;
|
|
4386
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId$1;
|
|
4387
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId$1;
|
|
4388
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId$1;
|
|
4389
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4390
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4391
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId$1;
|
|
4392
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId$1;
|
|
4393
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId$1[];
|
|
4394
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId$1;
|
|
4395
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId$1;
|
|
4396
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId$1["customRelation"], "expr">;
|
|
4397
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4398
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4399
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId$1;
|
|
4400
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId$1 | null;
|
|
4401
|
+
wrapInWhere(expr: ProjectId$1, condition: ProjectId$1 | null): ProjectId$1;
|
|
3188
4402
|
isValid: IsValidFn;
|
|
3189
4403
|
docUri: string;
|
|
3190
4404
|
docPathInProject: string;
|
|
@@ -3194,23 +4408,23 @@ declare const DocumentParserFromMixins: {
|
|
|
3194
4408
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
3195
4409
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
3196
4410
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
3197
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4411
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
3198
4412
|
getAstNodePath(node: AstNode): string;
|
|
3199
4413
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
3200
4414
|
[key: string]: string | string[];
|
|
3201
4415
|
} | undefined;
|
|
3202
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4416
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
3203
4417
|
convertTags<E extends {
|
|
3204
4418
|
tags?: Tags;
|
|
3205
4419
|
}>(withTags?: E | undefined): any;
|
|
3206
4420
|
parseTags<E extends {
|
|
3207
4421
|
tags?: Tags;
|
|
3208
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
3209
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3210
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3211
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4422
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4423
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4424
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4425
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
3212
4426
|
parseImageAlias(value: string): string | undefined;
|
|
3213
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4427
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
3214
4428
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
3215
4429
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
3216
4430
|
parseBaseProps(props: {
|
|
@@ -3225,8 +4439,8 @@ declare const DocumentParserFromMixins: {
|
|
|
3225
4439
|
technology?: string | undefined;
|
|
3226
4440
|
}): {
|
|
3227
4441
|
title?: string;
|
|
3228
|
-
summary?: ProjectId;
|
|
3229
|
-
description?: ProjectId;
|
|
4442
|
+
summary?: ProjectId$1;
|
|
4443
|
+
description?: ProjectId$1;
|
|
3230
4444
|
technology?: string;
|
|
3231
4445
|
};
|
|
3232
4446
|
};
|
|
@@ -3242,23 +4456,23 @@ declare const DocumentParserFromMixins: {
|
|
|
3242
4456
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
3243
4457
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
3244
4458
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
3245
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4459
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
3246
4460
|
getAstNodePath(node: AstNode): string;
|
|
3247
4461
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
3248
4462
|
[key: string]: string | string[];
|
|
3249
4463
|
} | undefined;
|
|
3250
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4464
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
3251
4465
|
convertTags<E extends {
|
|
3252
4466
|
tags?: Tags;
|
|
3253
4467
|
}>(withTags?: E | undefined): any;
|
|
3254
4468
|
parseTags<E extends {
|
|
3255
4469
|
tags?: Tags;
|
|
3256
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
3257
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3258
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3259
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4470
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4471
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4472
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4473
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
3260
4474
|
parseImageAlias(value: string): string | undefined;
|
|
3261
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4475
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
3262
4476
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
3263
4477
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
3264
4478
|
parseBaseProps(props: {
|
|
@@ -3273,30 +4487,30 @@ declare const DocumentParserFromMixins: {
|
|
|
3273
4487
|
technology?: string | undefined;
|
|
3274
4488
|
}): {
|
|
3275
4489
|
title?: string;
|
|
3276
|
-
summary?: ProjectId;
|
|
3277
|
-
description?: ProjectId;
|
|
4490
|
+
summary?: ProjectId$1;
|
|
4491
|
+
description?: ProjectId$1;
|
|
3278
4492
|
technology?: string;
|
|
3279
4493
|
};
|
|
3280
4494
|
};
|
|
3281
4495
|
} & {
|
|
3282
4496
|
new (...args: any[]): {
|
|
3283
|
-
parseFqnRef(astNode: FqnRef$2): ProjectId;
|
|
3284
|
-
parseExpressionV2(astNode: ExpressionV2): ProjectId;
|
|
3285
|
-
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId;
|
|
3286
|
-
parseFqnExprWith(astNode: FqnExprWith): ProjectId;
|
|
3287
|
-
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId;
|
|
3288
|
-
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId;
|
|
3289
|
-
parseFqnExpr(astNode: FqnExpr$2): ProjectId;
|
|
3290
|
-
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId;
|
|
3291
|
-
parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
|
|
3292
|
-
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
|
|
3293
|
-
parseRelationExprWith(astNode: RelationExprWith): ProjectId;
|
|
3294
|
-
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
|
|
3295
|
-
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
|
|
3296
|
-
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
|
|
3297
|
-
parseRelationExpr(astNode: RelationExpr$1): ProjectId;
|
|
3298
|
-
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId | null;
|
|
3299
|
-
wrapInWhere(expr: ProjectId, condition: ProjectId | null): ProjectId;
|
|
4497
|
+
parseFqnRef(astNode: FqnRef$2): ProjectId$1;
|
|
4498
|
+
parseExpressionV2(astNode: ExpressionV2): ProjectId$1;
|
|
4499
|
+
parseFqnExprOrWith(astNode: FqnExprOrWith): ProjectId$1;
|
|
4500
|
+
parseFqnExprWith(astNode: FqnExprWith): ProjectId$1;
|
|
4501
|
+
parseFqnExprOrWhere(astNode: FqnExprOrWhere): ProjectId$1;
|
|
4502
|
+
parseFqnExprWhere(astNode: FqnExprWhere): ProjectId$1;
|
|
4503
|
+
parseFqnExpr(astNode: FqnExpr$2): ProjectId$1;
|
|
4504
|
+
parseFqnRefExpr(astNode: FqnRefExpr): ProjectId$1;
|
|
4505
|
+
parseFqnExpressions(astNode: FqnExpressions): ProjectId$1[];
|
|
4506
|
+
parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId$1;
|
|
4507
|
+
parseRelationExprWith(astNode: RelationExprWith): ProjectId$1;
|
|
4508
|
+
parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId$1["customRelation"], "expr">;
|
|
4509
|
+
parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId$1;
|
|
4510
|
+
parseRelationExprWhere(astNode: RelationExprWhere): ProjectId$1;
|
|
4511
|
+
parseRelationExpr(astNode: RelationExpr$1): ProjectId$1;
|
|
4512
|
+
parseInlineKindCondition(astNode: OutgoingRelationExpr): ProjectId$1 | null;
|
|
4513
|
+
wrapInWhere(expr: ProjectId$1, condition: ProjectId$1 | null): ProjectId$1;
|
|
3300
4514
|
isValid: IsValidFn;
|
|
3301
4515
|
docUri: string;
|
|
3302
4516
|
docPathInProject: string;
|
|
@@ -3306,23 +4520,23 @@ declare const DocumentParserFromMixins: {
|
|
|
3306
4520
|
logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
|
|
3307
4521
|
tryParse<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
|
|
3308
4522
|
tryMap<N extends AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
|
|
3309
|
-
resolveFqn(node: FqnReferenceable): ProjectId;
|
|
4523
|
+
resolveFqn(node: FqnReferenceable): ProjectId$1;
|
|
3310
4524
|
getAstNodePath(node: AstNode): string;
|
|
3311
4525
|
getMetadata(metadataAstNode: MetadataProperty | undefined): {
|
|
3312
4526
|
[key: string]: string | string[];
|
|
3313
4527
|
} | undefined;
|
|
3314
|
-
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId | undefined;
|
|
4528
|
+
parseMarkdownOrString(markdownOrString: MarkdownOrString | undefined): ProjectId$1 | undefined;
|
|
3315
4529
|
convertTags<E extends {
|
|
3316
4530
|
tags?: Tags;
|
|
3317
4531
|
}>(withTags?: E | undefined): any;
|
|
3318
4532
|
parseTags<E extends {
|
|
3319
4533
|
tags?: Tags;
|
|
3320
|
-
}>(withTags?: E): ProjectId<ProjectId> | null;
|
|
3321
|
-
convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3322
|
-
parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
|
|
3323
|
-
parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
|
|
4534
|
+
}>(withTags?: E): ProjectId$1<ProjectId$1> | null;
|
|
4535
|
+
convertLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4536
|
+
parseLinks(source?: LinkProperty["$container"]): ProjectId$1<ProjectId$1> | undefined;
|
|
4537
|
+
parseIconProperty(prop: IconProperty | undefined): ProjectId$1 | undefined;
|
|
3324
4538
|
parseImageAlias(value: string): string | undefined;
|
|
3325
|
-
parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
|
|
4539
|
+
parseColorLiteral(astNode: ColorLiteral$1): ProjectId$1 | undefined;
|
|
3326
4540
|
parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
|
|
3327
4541
|
parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
|
|
3328
4542
|
parseBaseProps(props: {
|
|
@@ -3337,18 +4551,18 @@ declare const DocumentParserFromMixins: {
|
|
|
3337
4551
|
technology?: string | undefined;
|
|
3338
4552
|
}): {
|
|
3339
4553
|
title?: string;
|
|
3340
|
-
summary?: ProjectId;
|
|
3341
|
-
description?: ProjectId;
|
|
4554
|
+
summary?: ProjectId$1;
|
|
4555
|
+
description?: ProjectId$1;
|
|
3342
4556
|
technology?: string;
|
|
3343
4557
|
};
|
|
3344
4558
|
};
|
|
3345
4559
|
} & typeof BaseParser;
|
|
3346
4560
|
declare class DocumentParser extends DocumentParserFromMixins {}
|
|
3347
|
-
declare class LikeC4ModelParser {
|
|
4561
|
+
declare class LikeC4ModelParser extends ADisposable {
|
|
3348
4562
|
private services;
|
|
3349
4563
|
protected cachedParsers: any;
|
|
3350
4564
|
constructor(services: LikeC4Services);
|
|
3351
|
-
documents(projectId: ProjectId): Stream<ParsedLikeC4LangiumDocument>;
|
|
4565
|
+
documents(projectId: ProjectId$1): Stream<ParsedLikeC4LangiumDocument>;
|
|
3352
4566
|
parse(doc: LangiumDocument): ParsedLikeC4LangiumDocument;
|
|
3353
4567
|
forDocument(doc: LangiumDocument): DocumentParser;
|
|
3354
4568
|
private createParser;
|
|
@@ -3368,7 +4582,7 @@ declare class LikeC4ModelChanges {
|
|
|
3368
4582
|
change
|
|
3369
4583
|
}: {
|
|
3370
4584
|
lookup: ViewLocateResult;
|
|
3371
|
-
change: Exclude<ViewChange, ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout>;
|
|
4585
|
+
change: Exclude<ViewChange, ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout | ViewChange.ChangeProperty>;
|
|
3372
4586
|
}): {
|
|
3373
4587
|
modifiedRange: Range;
|
|
3374
4588
|
edits: TextEdit[];
|
|
@@ -3386,8 +4600,8 @@ interface LikeC4LanguageServices {
|
|
|
3386
4600
|
/**
|
|
3387
4601
|
* Returns all projects with relevant documents
|
|
3388
4602
|
*/
|
|
3389
|
-
projects(): NonEmptyArray<{
|
|
3390
|
-
id: ProjectId;
|
|
4603
|
+
projects(): NonEmptyArray$1<{
|
|
4604
|
+
id: ProjectId$1;
|
|
3391
4605
|
folder: URI;
|
|
3392
4606
|
title: string;
|
|
3393
4607
|
documents: ReadonlyArray<URI>;
|
|
@@ -3396,8 +4610,8 @@ interface LikeC4LanguageServices {
|
|
|
3396
4610
|
/**
|
|
3397
4611
|
* Returns project by ID, returns default project if no ID is specified
|
|
3398
4612
|
*/
|
|
3399
|
-
project(projectId?: ProjectId): {
|
|
3400
|
-
id: ProjectId;
|
|
4613
|
+
project(projectId?: ProjectId$1): {
|
|
4614
|
+
id: ProjectId$1;
|
|
3401
4615
|
folder: URI;
|
|
3402
4616
|
title: string;
|
|
3403
4617
|
documents: ReadonlyArray<URI>;
|
|
@@ -3414,21 +4628,21 @@ interface LikeC4LanguageServices {
|
|
|
3414
4628
|
*
|
|
3415
4629
|
* If no {@link project} is specified, returns for default project
|
|
3416
4630
|
*/
|
|
3417
|
-
computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownComputed>>;
|
|
4631
|
+
computedModel(project?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownComputed>>;
|
|
3418
4632
|
/**
|
|
3419
4633
|
* Returns {@link LikeC4Model} of the specified project, with layouted views {@link LayoutedView}
|
|
3420
4634
|
* Ready for rendering. Applies manual layouts if available.
|
|
3421
4635
|
*
|
|
3422
4636
|
* If no {@link project} is specified, returns for default project
|
|
3423
4637
|
*/
|
|
3424
|
-
layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownLayouted>>;
|
|
4638
|
+
layoutedModel(project?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<LikeC4Model<UnknownLayouted>>;
|
|
3425
4639
|
/**
|
|
3426
4640
|
* Returns diagrams (i.e. layouted views {@link LayoutedView}) for the specified project
|
|
3427
4641
|
* Applies manual layouts if available.
|
|
3428
4642
|
*
|
|
3429
4643
|
* If no {@link project} is specified, returns diagrams for default project
|
|
3430
4644
|
*/
|
|
3431
|
-
diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken$1): Promise<LayoutedView[]>;
|
|
4645
|
+
diagrams(project?: ProjectId$1 | undefined, cancelToken?: CancellationToken$1): Promise<LayoutedView$1[]>;
|
|
3432
4646
|
getErrors(): Array<{
|
|
3433
4647
|
message: string;
|
|
3434
4648
|
line: number;
|
|
@@ -3462,7 +4676,7 @@ interface LikeC4LanguageServices {
|
|
|
3462
4676
|
*/
|
|
3463
4677
|
interface FormatOptions {
|
|
3464
4678
|
/** Include all documents from these projects. */
|
|
3465
|
-
projectIds?: ReadonlyArray<ProjectId>;
|
|
4679
|
+
projectIds?: ReadonlyArray<ProjectId$1>;
|
|
3466
4680
|
/** Include these specific documents (by URI string). */
|
|
3467
4681
|
documentUris?: ReadonlyArray<string>;
|
|
3468
4682
|
/** Size of a tab in spaces (default: 2). */
|
|
@@ -3521,7 +4735,7 @@ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
|
3521
4735
|
protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
|
|
3522
4736
|
protected getModelSymbol(astModel: Model): DocumentSymbol[];
|
|
3523
4737
|
protected getDeploymentModelSymbol(astModel: ModelDeployments): DocumentSymbol[];
|
|
3524
|
-
protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
|
|
4738
|
+
protected getElementsSymbol(el: Element | Relation | ExtendElement, parentFqn?: string): DocumentSymbol[];
|
|
3525
4739
|
protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
|
|
3526
4740
|
protected getElementSymbol(astElement: Element): DocumentSymbol[];
|
|
3527
4741
|
protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
|
|
@@ -3558,7 +4772,7 @@ declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
|
3558
4772
|
* @param projectId - The project identifier for constructing view links.
|
|
3559
4773
|
* @returns Markdown string with model details, or undefined if no details available.
|
|
3560
4774
|
*/
|
|
3561
|
-
protected getElementModelHover(model: ElementModel, projectId: ProjectId): string | undefined;
|
|
4775
|
+
protected getElementModelHover(model: ElementModel, projectId: ProjectId$1): string | undefined;
|
|
3562
4776
|
/**
|
|
3563
4777
|
* Builds hover content for a deployment node (id, title, kind, summary).
|
|
3564
4778
|
* @param node - The deployment node AST node to generate hover content for.
|
|
@@ -3681,4 +4895,125 @@ interface LikeC4AddedServices {
|
|
|
3681
4895
|
}
|
|
3682
4896
|
type LikeC4Services = LangiumServices & LikeC4AddedServices;
|
|
3683
4897
|
//#endregion
|
|
3684
|
-
|
|
4898
|
+
//#region ../language-services/dist/_chunks/options.d.mts
|
|
4899
|
+
//#region src/common/LikeC4.d.ts
|
|
4900
|
+
interface LikeC4Langium {
|
|
4901
|
+
shared: LikeC4SharedServices;
|
|
4902
|
+
likec4: LikeC4Services;
|
|
4903
|
+
}
|
|
4904
|
+
declare class LikeC4 {
|
|
4905
|
+
protected readonly langium: LikeC4Langium;
|
|
4906
|
+
protected readonly logger: Logger;
|
|
4907
|
+
constructor(langium: LikeC4Langium, logger?: Logger);
|
|
4908
|
+
/**
|
|
4909
|
+
* File system path to the workspace root
|
|
4910
|
+
*/
|
|
4911
|
+
get workspace(): string;
|
|
4912
|
+
/**
|
|
4913
|
+
* URI of the workspace root
|
|
4914
|
+
*/
|
|
4915
|
+
get workspaceURI(): URI;
|
|
4916
|
+
/**
|
|
4917
|
+
* URL of the workspace root
|
|
4918
|
+
*/
|
|
4919
|
+
get workspaceURL(): URL;
|
|
4920
|
+
get languageServices(): LikeC4LanguageServices;
|
|
4921
|
+
get projectsManager(): ProjectsManager;
|
|
4922
|
+
get viewsService(): LikeC4Views;
|
|
4923
|
+
get modelBuilder(): LikeC4ModelBuilder;
|
|
4924
|
+
private get LangiumDocuments();
|
|
4925
|
+
ensureSingleProject(): void;
|
|
4926
|
+
/**
|
|
4927
|
+
* Diagram is a computed view, layouted using Graphviz
|
|
4928
|
+
* If diagram has manual layout, it will be used.
|
|
4929
|
+
* Used in React components
|
|
4930
|
+
*/
|
|
4931
|
+
diagrams(project?: string | undefined): Promise<LayoutedView[]>;
|
|
4932
|
+
/**
|
|
4933
|
+
* Builds LikeC4Model from all documents
|
|
4934
|
+
* Only computes view predicates {@link ComputedView} - i.e. no layout
|
|
4935
|
+
* Not ready for rendering, but enough to traverse
|
|
4936
|
+
*
|
|
4937
|
+
* Sync version does not read manual layouts
|
|
4938
|
+
* Use {@link computedModel} for a version that includes manual layouts
|
|
4939
|
+
*/
|
|
4940
|
+
syncComputedModel(project?: string | undefined): LikeC4Model.Computed;
|
|
4941
|
+
/**
|
|
4942
|
+
* Builds LikeC4Model from all documents
|
|
4943
|
+
* Only computes view predicates {@link ComputedView} - i.e. no layout
|
|
4944
|
+
* Not ready for rendering, but enough to traverse
|
|
4945
|
+
*/
|
|
4946
|
+
computedModel(project?: string | undefined): Promise<LikeC4Model.Computed>;
|
|
4947
|
+
projects(): NonEmptyArray<ProjectId>;
|
|
4948
|
+
/**
|
|
4949
|
+
* Same as {@link computedModel()}, but also applies layout
|
|
4950
|
+
* Ready for rendering
|
|
4951
|
+
*/
|
|
4952
|
+
layoutedModel(project?: string | undefined): Promise<LikeC4Model.Layouted>;
|
|
4953
|
+
getErrors(): Array<{
|
|
4954
|
+
message: string;
|
|
4955
|
+
line: number;
|
|
4956
|
+
range: {
|
|
4957
|
+
start: {
|
|
4958
|
+
line: number;
|
|
4959
|
+
character: number;
|
|
4960
|
+
};
|
|
4961
|
+
end: {
|
|
4962
|
+
line: number;
|
|
4963
|
+
character: number;
|
|
4964
|
+
};
|
|
4965
|
+
};
|
|
4966
|
+
sourceFsPath: string;
|
|
4967
|
+
}>;
|
|
4968
|
+
hasErrors(): boolean;
|
|
4969
|
+
/**
|
|
4970
|
+
* @returns true if there are errors
|
|
4971
|
+
*/
|
|
4972
|
+
printErrors(): boolean;
|
|
4973
|
+
/**
|
|
4974
|
+
* Returns the number of parsed documents in the workspace
|
|
4975
|
+
*/
|
|
4976
|
+
documentCount(): number;
|
|
4977
|
+
/**
|
|
4978
|
+
* Subscribe to model updates
|
|
4979
|
+
* @param listener Function called when the model is updated - receives the project ID that was updated
|
|
4980
|
+
* @returns A function to dispose the listener
|
|
4981
|
+
*/
|
|
4982
|
+
onModelUpdate(listener: (projectId: ProjectId) => void): () => void;
|
|
4983
|
+
/**
|
|
4984
|
+
* Formats documents and returns a map of document URI → formatted source text.
|
|
4985
|
+
*
|
|
4986
|
+
* Target selection uses union semantics:
|
|
4987
|
+
* - Omit both `projects` and `documentUris` to format **all** documents.
|
|
4988
|
+
* - Provide `projects` to include all documents from those projects.
|
|
4989
|
+
* - Provide `documentUris` to include specific documents.
|
|
4990
|
+
* - Provide both to format the **union** (deduplicated).
|
|
4991
|
+
*/
|
|
4992
|
+
format(options?: LikeC4FormatOptions): Promise<Map<string, string>>;
|
|
4993
|
+
dispose(): Promise<void>;
|
|
4994
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
4995
|
+
}
|
|
4996
|
+
/**
|
|
4997
|
+
* Options for {@link LikeC4.format}.
|
|
4998
|
+
*
|
|
4999
|
+
* Same as {@link FormatOptions} but uses project name strings instead of {@link ProjectId}.
|
|
5000
|
+
*/
|
|
5001
|
+
interface LikeC4FormatOptions {
|
|
5002
|
+
/** Include all documents from these projects (by name). */
|
|
5003
|
+
projects?: ReadonlyArray<string>;
|
|
5004
|
+
/** Include these specific documents (by URI string). */
|
|
5005
|
+
documentUris?: ReadonlyArray<string>;
|
|
5006
|
+
/** Size of a tab in spaces (default: 2). */
|
|
5007
|
+
tabSize?: number;
|
|
5008
|
+
/** Prefer spaces over tabs (default: true). */
|
|
5009
|
+
insertSpaces?: boolean;
|
|
5010
|
+
/** Trim trailing whitespace on a line. */
|
|
5011
|
+
trimTrailingWhitespace?: boolean;
|
|
5012
|
+
/** Insert a newline character at the end of the file if one does not exist. */
|
|
5013
|
+
insertFinalNewline?: boolean;
|
|
5014
|
+
/** Trim all newlines after the final newline at the end of the file. */
|
|
5015
|
+
trimFinalNewlines?: boolean;
|
|
5016
|
+
} //#endregion
|
|
5017
|
+
//#region src/common/options.d.ts
|
|
5018
|
+
//#endregion
|
|
5019
|
+
export { LikeC4LanguageServices as n, LikeC4 as t };
|