@likec4/language-server 1.39.0 → 1.39.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/{LikeC4LanguageServices.js → LikeC4LanguageServices.mjs} +3 -3
  2. package/dist/{Rpc.js → Rpc.mjs} +3 -3
  3. package/dist/{ast.js → ast.mjs} +2 -2
  4. package/dist/browser-worker.mjs +2 -0
  5. package/dist/{browser.js → browser.mjs} +3 -3
  6. package/dist/bundled.mjs +2165 -2165
  7. package/dist/documentation/{documentation-provider.js → documentation-provider.mjs} +2 -2
  8. package/dist/documentation/{index.js → index.mjs} +1 -1
  9. package/dist/filesystem/{ChokidarWatcher.js → ChokidarWatcher.mjs} +8 -7
  10. package/dist/filesystem/LikeC4FileSystem.d.ts +1 -0
  11. package/dist/filesystem/{LikeC4FileSystem.js → LikeC4FileSystem.mjs} +6 -6
  12. package/dist/filesystem/{index.js → index.mjs} +1 -1
  13. package/dist/formatting/{LikeC4Formatter.js → LikeC4Formatter.mjs} +2 -2
  14. package/dist/generated/{module.js → module.mjs} +2 -2
  15. package/dist/{index.js → index.mjs} +9 -9
  16. package/dist/{likec4lib.js → likec4lib.mjs} +1 -1
  17. package/dist/lsp/{CodeLensProvider.js → CodeLensProvider.mjs} +3 -3
  18. package/dist/lsp/{CompletionProvider.js → CompletionProvider.mjs} +1 -1
  19. package/dist/lsp/{DocumentLinkProvider.js → DocumentLinkProvider.mjs} +2 -2
  20. package/dist/lsp/{DocumentSymbolProvider.js → DocumentSymbolProvider.mjs} +3 -3
  21. package/dist/lsp/{HoverProvider.js → HoverProvider.mjs} +1 -1
  22. package/dist/lsp/{SemanticTokenProvider.js → SemanticTokenProvider.mjs} +1 -1
  23. package/dist/lsp/index.mjs +7 -0
  24. package/dist/mcp/{MCPServerFactory.js → MCPServerFactory.mjs} +9 -9
  25. package/dist/mcp/{interfaces.js → interfaces.mjs} +1 -1
  26. package/dist/mcp/server/{StdioLikeC4MCPServer.js → StdioLikeC4MCPServer.mjs} +1 -1
  27. package/dist/mcp/server/{StreamableLikeC4MCPServer.js → StreamableLikeC4MCPServer.mjs} +1 -1
  28. package/dist/mcp/server/{WithMCPServer.js → WithMCPServer.mjs} +3 -3
  29. package/dist/mcp/tools/{_common.js → _common.mjs} +2 -2
  30. package/dist/mcp/tools/{find-relationships.js → find-relationships.mjs} +2 -2
  31. package/dist/mcp/tools/{list-projects.js → list-projects.mjs} +1 -1
  32. package/dist/mcp/tools/{open-view.js → open-view.mjs} +2 -2
  33. package/dist/mcp/tools/{read-deployment.js → read-deployment.mjs} +2 -2
  34. package/dist/mcp/tools/{read-element.js → read-element.mjs} +2 -2
  35. package/dist/mcp/tools/{read-project-summary.js → read-project-summary.mjs} +2 -2
  36. package/dist/mcp/tools/{read-view.js → read-view.mjs} +2 -2
  37. package/dist/mcp/tools/{search-element.js → search-element.mjs} +2 -2
  38. package/dist/mcp/{utils.js → utils.mjs} +1 -1
  39. package/dist/model/builder/{MergedSpecification.js → MergedSpecification.mjs} +2 -2
  40. package/dist/model/builder/{buildModel.js → buildModel.mjs} +4 -4
  41. package/dist/model/{deployments-index.js → deployments-index.mjs} +4 -4
  42. package/dist/model/{fqn-index.js → fqn-index.mjs} +5 -5
  43. package/dist/model/index.mjs +6 -0
  44. package/dist/model/{model-builder.js → model-builder.mjs} +5 -5
  45. package/dist/model/{model-locator.js → model-locator.mjs} +4 -4
  46. package/dist/model/{model-parser-where.js → model-parser-where.mjs} +1 -1
  47. package/dist/model/{model-parser.js → model-parser.mjs} +13 -13
  48. package/dist/model/parser/{Base.js → Base.mjs} +5 -5
  49. package/dist/model/parser/{DeploymentModelParser.js → DeploymentModelParser.mjs} +3 -3
  50. package/dist/model/parser/{DeploymentViewParser.js → DeploymentViewParser.mjs} +5 -5
  51. package/dist/model/parser/{FqnRefParser.js → FqnRefParser.mjs} +6 -6
  52. package/dist/model/parser/{GlobalsParser.js → GlobalsParser.mjs} +2 -2
  53. package/dist/model/parser/{ImportsParser.js → ImportsParser.mjs} +1 -1
  54. package/dist/model/parser/{ModelParser.js → ModelParser.mjs} +3 -3
  55. package/dist/model/parser/{PredicatesParser.js → PredicatesParser.mjs} +1 -1
  56. package/dist/model/parser/{SpecificationParser.js → SpecificationParser.mjs} +3 -3
  57. package/dist/model/parser/{ViewsParser.js → ViewsParser.mjs} +6 -6
  58. package/dist/model-change/{ModelChanges.js → ModelChanges.mjs} +3 -3
  59. package/dist/model-change/{changeElementStyle.js → changeElementStyle.mjs} +1 -1
  60. package/dist/model-change/{changeViewLayout.js → changeViewLayout.mjs} +1 -1
  61. package/dist/model-change/{saveManualLayout.js → saveManualLayout.mjs} +1 -1
  62. package/dist/{module.js → module.mjs} +16 -16
  63. package/dist/references/index.mjs +3 -0
  64. package/dist/references/{name-provider.js → name-provider.mjs} +1 -1
  65. package/dist/references/{scope-computation.js → scope-computation.mjs} +2 -2
  66. package/dist/references/{scope-provider.js → scope-provider.mjs} +4 -4
  67. package/dist/shared/{NodeKindProvider.js → NodeKindProvider.mjs} +1 -1
  68. package/dist/shared/index.mjs +2 -0
  69. package/dist/test/index.mjs +1 -0
  70. package/dist/test/{testServices.js → testServices.mjs} +2 -2
  71. package/dist/utils/{disposable.js → disposable.mjs} +1 -1
  72. package/dist/utils/{elementRef.js → elementRef.mjs} +1 -1
  73. package/dist/utils/{fqnRef.js → fqnRef.mjs} +1 -1
  74. package/dist/utils/{index.js → index.mjs} +6 -6
  75. package/dist/utils/{projectId.js → projectId.mjs} +1 -1
  76. package/dist/validation/{_shared.js → _shared.mjs} +1 -1
  77. package/dist/validation/{deployment-checks.js → deployment-checks.mjs} +3 -3
  78. package/dist/validation/{dynamic-view-step.js → dynamic-view-step.mjs} +2 -2
  79. package/dist/validation/{element-ref.js → element-ref.mjs} +2 -2
  80. package/dist/validation/{element.js → element.mjs} +2 -2
  81. package/dist/validation/{imports.js → imports.mjs} +2 -2
  82. package/dist/validation/{index.js → index.mjs} +13 -13
  83. package/dist/validation/{property-checks.js → property-checks.mjs} +2 -2
  84. package/dist/validation/{relation.js → relation.mjs} +2 -2
  85. package/dist/validation/{specification.js → specification.mjs} +3 -3
  86. package/dist/validation/view-predicates/{fqn-expr-with.js → fqn-expr-with.mjs} +4 -3
  87. package/dist/validation/view-predicates/{fqn-ref-expr.js → fqn-ref-expr.mjs} +3 -3
  88. package/dist/validation/view-predicates/{incoming.js → incoming.mjs} +2 -2
  89. package/dist/validation/view-predicates/index.mjs +6 -0
  90. package/dist/validation/view-predicates/{outgoing.js → outgoing.mjs} +2 -2
  91. package/dist/validation/view-predicates/{relation-expr.js → relation-expr.mjs} +2 -2
  92. package/dist/validation/view-predicates/{relation-with.js → relation-with.mjs} +2 -2
  93. package/dist/validation/{view.js → view.mjs} +3 -3
  94. package/dist/view-utils/index.mjs +2 -0
  95. package/dist/view-utils/{manual-layout.js → manual-layout.mjs} +1 -1
  96. package/dist/views/{configurable-layouter.js → configurable-layouter.mjs} +1 -1
  97. package/dist/views/index.mjs +1 -0
  98. package/dist/views/{likec4-views.js → likec4-views.mjs} +2 -2
  99. package/dist/workspace/{LangiumDocuments.js → LangiumDocuments.mjs} +2 -2
  100. package/dist/workspace/{ProjectsManager.js → ProjectsManager.mjs} +1 -1
  101. package/dist/workspace/{WorkspaceManager.js → WorkspaceManager.mjs} +2 -2
  102. package/dist/workspace/index.mjs +5 -0
  103. package/package.json +21 -19
  104. package/dist/browser-worker.js +0 -2
  105. package/dist/bundled.js +0 -40
  106. package/dist/lsp/index.js +0 -7
  107. package/dist/model/index.js +0 -6
  108. package/dist/references/index.js +0 -3
  109. package/dist/shared/index.js +0 -2
  110. package/dist/test/index.js +0 -1
  111. package/dist/validation/view-predicates/index.js +0 -6
  112. package/dist/view-utils/index.js +0 -2
  113. package/dist/views/index.js +0 -1
  114. package/dist/workspace/index.js +0 -5
  115. /package/dist/{empty.js → empty.mjs} +0 -0
  116. /package/dist/filesystem/{FileSystemWatcher.js → FileSystemWatcher.mjs} +0 -0
  117. /package/dist/formatting/{utils.js → utils.mjs} +0 -0
  118. /package/dist/generated/{ast.js → ast.mjs} +0 -0
  119. /package/dist/generated/{grammar.js → grammar.mjs} +0 -0
  120. /package/dist/generated-lib/{icons.js → icons.mjs} +0 -0
  121. /package/dist/{logger.js → logger.mjs} +0 -0
  122. /package/dist/lsp/{DocumentHighlightProvider.js → DocumentHighlightProvider.mjs} +0 -0
  123. /package/dist/lsp/{RenameProvider.js → RenameProvider.mjs} +0 -0
  124. /package/dist/mcp/{NoopLikeC4MCPServer.js → NoopLikeC4MCPServer.mjs} +0 -0
  125. /package/dist/model/builder/{MergedExtends.js → MergedExtends.mjs} +0 -0
  126. /package/dist/model/builder/{assignTagColors.js → assignTagColors.mjs} +0 -0
  127. /package/dist/model/parser/{ValueConverter.js → ValueConverter.mjs} +0 -0
  128. /package/dist/{protocol.js → protocol.mjs} +0 -0
  129. /package/dist/shared/{WorkspaceSymbolProvider.js → WorkspaceSymbolProvider.mjs} +0 -0
  130. /package/dist/utils/{printDocs.js → printDocs.mjs} +0 -0
  131. /package/dist/utils/{stringHash.js → stringHash.mjs} +0 -0
  132. /package/dist/validation/{DocumentValidator.js → DocumentValidator.mjs} +0 -0
  133. /package/dist/view-utils/{assignNavigateTo.js → assignNavigateTo.mjs} +0 -0
  134. /package/dist/view-utils/{resolve-relative-paths.js → resolve-relative-paths.mjs} +0 -0
  135. /package/dist/workspace/{AstNodeDescriptionProvider.js → AstNodeDescriptionProvider.mjs} +0 -0
  136. /package/dist/workspace/{IndexManager.js → IndexManager.mjs} +0 -0
@@ -1,11 +1,11 @@
1
1
  import { invariant, nonexhaustive, nonNullable } from "@likec4/core";
2
2
  import { isBoolean, isDefined, isNonNullish, isTruthy } from "remeda";
3
- import { ast, parseAstOpacityProperty, parseAstSizeValue, parseMarkdownAsString, toColor } from "../../ast.js";
4
- import { logWarnError } from "../../logger.js";
5
- import { projectIdFrom } from "../../utils/index.js";
6
- import { importsRef, instanceRef } from "../../utils/fqnRef.js";
7
- import { createBinaryOperator, parseWhereClause } from "../model-parser-where.js";
8
- import { removeIndent } from "./Base.js";
3
+ import { ast, parseAstOpacityProperty, parseAstSizeValue, parseMarkdownAsString, toColor } from "../../ast.mjs";
4
+ import { logWarnError } from "../../logger.mjs";
5
+ import { projectIdFrom } from "../../utils/index.mjs";
6
+ import { importsRef, instanceRef } from "../../utils/fqnRef.mjs";
7
+ import { createBinaryOperator, parseWhereClause } from "../model-parser-where.mjs";
8
+ import { removeIndent } from "./Base.mjs";
9
9
  export function ExpressionV2Parser(B) {
10
10
  return class ExpressionV2Parser extends B {
11
11
  parseFqnRef(astNode) {
@@ -1,7 +1,7 @@
1
1
  import { nonexhaustive } from "@likec4/core";
2
2
  import { hasAtLeast, isTruthy } from "remeda";
3
- import { ast } from "../../ast.js";
4
- import { logger, logWarnError } from "../../logger.js";
3
+ import { ast } from "../../ast.mjs";
4
+ import { logger, logWarnError } from "../../logger.mjs";
5
5
  export function GlobalsParser(B) {
6
6
  return class GlobalsParser extends B {
7
7
  parseGlobals() {
@@ -1,5 +1,5 @@
1
1
  import { nonNullable } from "@likec4/core";
2
- import { logWarnError } from "../../logger.js";
2
+ import { logWarnError } from "../../logger.mjs";
3
3
  export function ImportsParser(B) {
4
4
  return class ImportsParser extends B {
5
5
  parseImports() {
@@ -5,9 +5,9 @@ import { filter, first, isDefined, isEmpty, isTruthy, map, mapToObj, pipe } from
5
5
  import {
6
6
  ast,
7
7
  toRelationshipStyleExcludeDefaults
8
- } from "../../ast.js";
9
- import { logger as mainLogger } from "../../logger.js";
10
- import { stringHash } from "../../utils/stringHash.js";
8
+ } from "../../ast.mjs";
9
+ import { logger as mainLogger } from "../../logger.mjs";
10
+ import { stringHash } from "../../utils/stringHash.mjs";
11
11
  const logger = mainLogger.getChild("ModelParser");
12
12
  function* streamModel(doc) {
13
13
  const traverseStack = LinkedList.from(doc.parseResult.value.models.flatMap((m) => m.elements));
@@ -1,5 +1,5 @@
1
1
  import { nonexhaustive } from "@likec4/core";
2
- import { ast } from "../../ast.js";
2
+ import { ast } from "../../ast.mjs";
3
3
  export function PredicatesParser(B) {
4
4
  return class PredicatesParser extends B {
5
5
  parsePredicate(astNode) {
@@ -1,9 +1,9 @@
1
1
  import * as c4 from "@likec4/core";
2
2
  import { nonNullable } from "@likec4/core/utils";
3
3
  import { filter, isNonNullish, isNullish, isTruthy, mapToObj, omitBy, pipe } from "remeda";
4
- import { ast, parseMarkdownAsString, toRelationshipStyleExcludeDefaults } from "../../ast.js";
5
- import { logger, logWarnError } from "../../logger.js";
6
- import { removeIndent } from "./Base.js";
4
+ import { ast, parseMarkdownAsString, toRelationshipStyleExcludeDefaults } from "../../ast.mjs";
5
+ import { logger, logWarnError } from "../../logger.mjs";
6
+ import { removeIndent } from "./Base.mjs";
7
7
  export function SpecificationParser(B) {
8
8
  return class SpecificationParser extends B {
9
9
  parseSpecification() {
@@ -7,12 +7,12 @@ import {
7
7
  toAutoLayout,
8
8
  toColor,
9
9
  ViewOps
10
- } from "../../ast.js";
11
- import { logger, logWarnError } from "../../logger.js";
12
- import { stringHash } from "../../utils/index.js";
13
- import { elementRef } from "../../utils/elementRef.js";
14
- import { parseViewManualLayout } from "../../view-utils/manual-layout.js";
15
- import { removeIndent, toSingleLine } from "./Base.js";
10
+ } from "../../ast.mjs";
11
+ import { logger, logWarnError } from "../../logger.mjs";
12
+ import { stringHash } from "../../utils/index.mjs";
13
+ import { elementRef } from "../../utils/elementRef.mjs";
14
+ import { parseViewManualLayout } from "../../view-utils/manual-layout.mjs";
15
+ import { removeIndent, toSingleLine } from "./Base.mjs";
16
16
  export function ViewsParser(B) {
17
17
  return class ViewsParser extends B {
18
18
  parseViews() {
@@ -1,8 +1,8 @@
1
1
  import { invariant, nonexhaustive } from "@likec4/core";
2
2
  import { logger } from "@likec4/log";
3
- import { changeElementStyle } from "./changeElementStyle.js";
4
- import { changeViewLayout } from "./changeViewLayout.js";
5
- import { saveManualLayout } from "./saveManualLayout.js";
3
+ import { changeElementStyle } from "./changeElementStyle.mjs";
4
+ import { changeViewLayout } from "./changeViewLayout.mjs";
5
+ import { saveManualLayout } from "./saveManualLayout.mjs";
6
6
  export class LikeC4ModelChanges {
7
7
  constructor(services) {
8
8
  this.services = services;
@@ -6,7 +6,7 @@ import {
6
6
  import { GrammarUtils } from "langium";
7
7
  import { entries, filter, findLast, isTruthy, last } from "remeda";
8
8
  import { TextEdit } from "vscode-languageserver-types";
9
- import { ast } from "../ast.js";
9
+ import { ast } from "../ast.mjs";
10
10
  const { findNodeForKeyword, findNodeForProperty } = GrammarUtils;
11
11
  const asViewStyleRule = (target, style, indent = 0) => {
12
12
  const indentStr = indent > 0 ? " ".repeat(indent) : "";
@@ -2,7 +2,7 @@ import { invariant } from "@likec4/core";
2
2
  import { GrammarUtils } from "langium";
3
3
  import { findLast, isNumber } from "remeda";
4
4
  import { TextEdit } from "vscode-languageserver-types";
5
- import { ast, toAstViewLayoutDirection } from "../ast.js";
5
+ import { ast, toAstViewLayoutDirection } from "../ast.mjs";
6
6
  const { findNodeForProperty, findNodeForKeyword } = GrammarUtils;
7
7
  export function changeViewLayout(_services, {
8
8
  view,
@@ -2,7 +2,7 @@ import { invariant } from "@likec4/core";
2
2
  import indentString from "indent-string";
3
3
  import { CstUtils, GrammarUtils } from "langium";
4
4
  import { TextEdit } from "vscode-languageserver-types";
5
- import { serializeToComment } from "../view-utils/manual-layout.js";
5
+ import { serializeToComment } from "../view-utils/manual-layout.mjs";
6
6
  const { findNodeForProperty } = GrammarUtils;
7
7
  export function saveManualLayout(_services, {
8
8
  viewAst,
@@ -8,16 +8,16 @@ import {
8
8
  createDefaultModule,
9
9
  createDefaultSharedModule
10
10
  } from "langium/lsp";
11
- import { LikeC4DocumentationProvider } from "./documentation/index.js";
11
+ import { LikeC4DocumentationProvider } from "./documentation/index.mjs";
12
12
  import {
13
13
  NoopFileSystem
14
- } from "./filesystem/index.js";
15
- import { LikeC4Formatter } from "./formatting/LikeC4Formatter.js";
14
+ } from "./filesystem/index.mjs";
15
+ import { LikeC4Formatter } from "./formatting/LikeC4Formatter.mjs";
16
16
  import {
17
17
  LikeC4GeneratedModule,
18
18
  LikeC4GeneratedSharedModule
19
- } from "./generated/module.js";
20
- import { DefaultLikeC4LanguageServices } from "./LikeC4LanguageServices.js";
19
+ } from "./generated/module.mjs";
20
+ import { DefaultLikeC4LanguageServices } from "./LikeC4LanguageServices.mjs";
21
21
  import {
22
22
  LikeC4CodeLensProvider,
23
23
  LikeC4CompletionProvider,
@@ -26,11 +26,11 @@ import {
26
26
  LikeC4DocumentSymbolProvider,
27
27
  LikeC4HoverProvider,
28
28
  LikeC4SemanticTokenProvider
29
- } from "./lsp/index.js";
29
+ } from "./lsp/index.mjs";
30
30
  import {
31
31
  NoMCPServer
32
- } from "./mcp/interfaces.js";
33
- import { LikeC4MCPServerFactory } from "./mcp/MCPServerFactory.js";
32
+ } from "./mcp/interfaces.mjs";
33
+ import { LikeC4MCPServerFactory } from "./mcp/MCPServerFactory.mjs";
34
34
  import {
35
35
  DefaultLikeC4ModelBuilder,
36
36
  DeploymentsIndex,
@@ -38,27 +38,27 @@ import {
38
38
  LikeC4ModelLocator,
39
39
  LikeC4ModelParser,
40
40
  LikeC4ValueConverter
41
- } from "./model/index.js";
42
- import { LikeC4ModelChanges } from "./model-change/ModelChanges.js";
41
+ } from "./model/index.mjs";
42
+ import { LikeC4ModelChanges } from "./model-change/ModelChanges.mjs";
43
43
  import {
44
44
  LikeC4NameProvider,
45
45
  LikeC4ScopeComputation,
46
46
  LikeC4ScopeProvider
47
- } from "./references/index.js";
48
- import { Rpc } from "./Rpc.js";
47
+ } from "./references/index.mjs";
48
+ import { Rpc } from "./Rpc.mjs";
49
49
  import {
50
50
  NodeKindProvider,
51
51
  WorkspaceSymbolProvider
52
- } from "./shared/index.js";
53
- import { LikeC4DocumentValidator, registerValidationChecks } from "./validation/index.js";
54
- import { DefaultLikeC4Views } from "./views/index.js";
52
+ } from "./shared/index.mjs";
53
+ import { LikeC4DocumentValidator, registerValidationChecks } from "./validation/index.mjs";
54
+ import { DefaultLikeC4Views } from "./views/index.mjs";
55
55
  import {
56
56
  AstNodeDescriptionProvider,
57
57
  IndexManager,
58
58
  LangiumDocuments,
59
59
  LikeC4WorkspaceManager,
60
60
  ProjectsManager
61
- } from "./workspace/index.js";
61
+ } from "./workspace/index.mjs";
62
62
  const createLikeC4SharedModule = (context) => ({
63
63
  lsp: {
64
64
  NodeKindProvider: (services) => new NodeKindProvider(services),
@@ -0,0 +1,3 @@
1
+ export * from "./name-provider.mjs";
2
+ export * from "./scope-computation.mjs";
3
+ export * from "./scope-provider.mjs";
@@ -1,6 +1,6 @@
1
1
  import { nonNullable } from "@likec4/core";
2
2
  import { DefaultNameProvider, isNamed } from "langium";
3
- import { ast } from "../ast.js";
3
+ import { ast } from "../ast.mjs";
4
4
  export class LikeC4NameProvider extends DefaultNameProvider {
5
5
  constructor(services) {
6
6
  super();
@@ -4,8 +4,8 @@ import {
4
4
  MultiMap
5
5
  } from "langium";
6
6
  import { entries, filter, flatMap, forEachObj, groupBy, isNullish, isTruthy, pipe } from "remeda";
7
- import { ast } from "../ast.js";
8
- import { logWarnError } from "../logger.js";
7
+ import { ast } from "../ast.mjs";
8
+ import { logWarnError } from "../logger.mjs";
9
9
  function uniqueDescriptions(descs) {
10
10
  return pipe(
11
11
  descs,
@@ -10,10 +10,10 @@ import {
10
10
  StreamImpl,
11
11
  StreamScope
12
12
  } from "langium";
13
- import { ast, isFqnRefInsideGlobals, isFqnRefInsideModel } from "../ast.js";
14
- import { logWarnError } from "../logger.js";
15
- import { projectIdFrom } from "../utils/index.js";
16
- import { elementRef, readStrictFqn } from "../utils/elementRef.js";
13
+ import { ast, isFqnRefInsideGlobals, isFqnRefInsideModel } from "../ast.mjs";
14
+ import { logWarnError } from "../logger.mjs";
15
+ import { projectIdFrom } from "../utils/index.mjs";
16
+ import { elementRef, readStrictFqn } from "../utils/elementRef.mjs";
17
17
  const { getDocument } = AstUtils;
18
18
  export class LikeC4ScopeProvider extends DefaultScopeProvider {
19
19
  deploymentsIndex;
@@ -1,6 +1,6 @@
1
1
  import { isAstNode } from "langium";
2
2
  import { CompletionItemKind, SymbolKind } from "vscode-languageserver-types";
3
- import { ast } from "../ast.js";
3
+ import { ast } from "../ast.mjs";
4
4
  export class NodeKindProvider {
5
5
  constructor(services) {
6
6
  this.services = services;
@@ -0,0 +1,2 @@
1
+ export * from "./NodeKindProvider.mjs";
2
+ export * from "./WorkspaceSymbolProvider.mjs";
@@ -0,0 +1 @@
1
+ export * from "./testServices.mjs";
@@ -4,8 +4,8 @@ import { entries } from "remeda";
4
4
  import stripIndent from "strip-indent";
5
5
  import { DiagnosticSeverity } from "vscode-languageserver-types";
6
6
  import { URI, Utils } from "vscode-uri";
7
- import { NoopFileSystem } from "../filesystem/index.js";
8
- import { createLanguageServices } from "../module.js";
7
+ import { NoopFileSystem } from "../filesystem/index.mjs";
8
+ import { createLanguageServices } from "../module.mjs";
9
9
  export function createTestServices(options) {
10
10
  const workspace = options?.workspace ?? "file:///test/workspace";
11
11
  const projectConfig = options?.projectConfig;
@@ -1,4 +1,4 @@
1
- import { logError } from "../logger.js";
1
+ import { logError } from "../logger.mjs";
2
2
  export class ADisposable {
3
3
  toDispose = [];
4
4
  isDisposed = false;
@@ -1,4 +1,4 @@
1
- import { ast } from "../ast.js";
1
+ import { ast } from "../ast.mjs";
2
2
  export function elementRef(node) {
3
3
  let el = ast.isStrictFqnElementRef(node) ? node.el.ref : node.modelElement.value.ref;
4
4
  if (el?.$type === "Imported") {
@@ -1,6 +1,6 @@
1
1
  import { AstUtils } from "langium";
2
2
  import { isNullish } from "remeda";
3
- import { ast } from "../ast.js";
3
+ import { ast } from "../ast.mjs";
4
4
  export function referenceableParent(node) {
5
5
  while (node.parent) {
6
6
  node = node.parent;
@@ -1,10 +1,10 @@
1
1
  import prettyMs from "pretty-ms";
2
- import { logger } from "../logger.js";
3
- export * from "./disposable.js";
4
- export * from "./elementRef.js";
5
- export * from "./fqnRef.js";
6
- export * from "./projectId.js";
7
- export * from "./stringHash.js";
2
+ import { logger } from "../logger.mjs";
3
+ export * from "./disposable.mjs";
4
+ export * from "./elementRef.mjs";
5
+ export * from "./fqnRef.mjs";
6
+ export * from "./projectId.mjs";
7
+ export * from "./stringHash.mjs";
8
8
  export function safeCall(fn) {
9
9
  try {
10
10
  return fn();
@@ -1,6 +1,6 @@
1
1
  import { invariant, nonNullable } from "@likec4/core";
2
2
  import { AstUtils, isAstNode } from "langium";
3
- import { ast } from "../ast.js";
3
+ import { ast } from "../ast.mjs";
4
4
  export function projectIdFrom(value) {
5
5
  if (ast.isImported(value)) {
6
6
  while (value.$type === "Imported" && value.$container) {
@@ -1,5 +1,5 @@
1
1
  import { isPromise } from "remeda";
2
- import { logger } from "../logger.js";
2
+ import { logger } from "../logger.mjs";
3
3
  export const RESERVED_WORDS = [
4
4
  "this",
5
5
  "it",
@@ -1,8 +1,8 @@
1
1
  import { FqnRef, isSameHierarchy, nonNullable } from "@likec4/core";
2
2
  import { AstUtils } from "langium";
3
- import { ast } from "../ast.js";
4
- import { projectIdFrom } from "../utils/index.js";
5
- import { RESERVED_WORDS, tryOrLog } from "./_shared.js";
3
+ import { ast } from "../ast.mjs";
4
+ import { projectIdFrom } from "../utils/index.mjs";
5
+ import { RESERVED_WORDS, tryOrLog } from "./_shared.mjs";
6
6
  const { getDocument } = AstUtils;
7
7
  export const deploymentNodeChecks = (services) => {
8
8
  const DeploymentsIndex = services.likec4.DeploymentsIndex;
@@ -1,6 +1,6 @@
1
1
  import { isAncestor } from "@likec4/core";
2
- import { elementRef } from "../utils/elementRef.js";
3
- import { tryOrLog } from "./_shared.js";
2
+ import { elementRef } from "../utils/elementRef.mjs";
3
+ import { tryOrLog } from "./_shared.mjs";
4
4
  export const dynamicViewStep = (services) => {
5
5
  const fqnIndex = services.likec4.FqnIndex;
6
6
  return tryOrLog((el, accept) => {
@@ -1,5 +1,5 @@
1
- import { isReferenceToDeploymentModel } from "../utils/index.js";
2
- import { tryOrLog } from "./_shared.js";
1
+ import { isReferenceToDeploymentModel } from "../utils/index.mjs";
2
+ import { tryOrLog } from "./_shared.mjs";
3
3
  export const checkElementRef = (services) => {
4
4
  return tryOrLog((el, accept) => {
5
5
  if (isReferenceToDeploymentModel(el.modelElement)) {
@@ -1,6 +1,6 @@
1
1
  import { AstUtils } from "langium";
2
- import { projectIdFrom } from "../utils/index.js";
3
- import { RESERVED_WORDS, tryOrLog } from "./_shared.js";
2
+ import { projectIdFrom } from "../utils/index.mjs";
3
+ import { RESERVED_WORDS, tryOrLog } from "./_shared.mjs";
4
4
  const { getDocument } = AstUtils;
5
5
  export const checkElement = (services) => {
6
6
  const fqnIndex = services.likec4.FqnIndex;
@@ -1,6 +1,6 @@
1
1
  import { AstUtils } from "langium";
2
- import { projectIdFrom } from "../utils/index.js";
3
- import { tryOrLog } from "./_shared.js";
2
+ import { projectIdFrom } from "../utils/index.mjs";
3
+ import { tryOrLog } from "./_shared.mjs";
4
4
  const { getDocument } = AstUtils;
5
5
  export const checkImportsFromPoject = (services) => {
6
6
  const projects = services.shared.workspace.ProjectsManager;
@@ -1,25 +1,25 @@
1
1
  import { DocumentState } from "langium";
2
2
  import { isNullish } from "remeda";
3
3
  import { DiagnosticSeverity } from "vscode-languageserver-types";
4
- import { ast } from "../ast.js";
5
- import { logger } from "../logger.js";
4
+ import { ast } from "../ast.mjs";
5
+ import { logger } from "../logger.mjs";
6
6
  import {
7
7
  deployedInstanceChecks,
8
8
  deploymentNodeChecks,
9
9
  deploymentRelationChecks,
10
10
  extendDeploymentChecks
11
- } from "./deployment-checks.js";
12
- import { dynamicViewStep } from "./dynamic-view-step.js";
13
- import { checkElement } from "./element.js";
14
- import { checkElementRef } from "./element-ref.js";
15
- import { checkImported, checkImportsFromPoject } from "./imports.js";
11
+ } from "./deployment-checks.mjs";
12
+ import { dynamicViewStep } from "./dynamic-view-step.mjs";
13
+ import { checkElement } from "./element.mjs";
14
+ import { checkElementRef } from "./element-ref.mjs";
15
+ import { checkImported, checkImportsFromPoject } from "./imports.mjs";
16
16
  import {
17
17
  colorLiteralRuleChecks,
18
18
  iconPropertyRuleChecks,
19
19
  notesPropertyRuleChecks,
20
20
  opacityPropertyRuleChecks
21
- } from "./property-checks.js";
22
- import { checkRelationBody, relationChecks } from "./relation.js";
21
+ } from "./property-checks.mjs";
22
+ import { checkRelationBody, relationChecks } from "./relation.mjs";
23
23
  import {
24
24
  checkDeploymentNodeKind,
25
25
  checkElementKind,
@@ -30,8 +30,8 @@ import {
30
30
  checkRelationshipKind,
31
31
  checkSpecificationRule,
32
32
  checkTag
33
- } from "./specification.js";
34
- import { viewChecks } from "./view.js";
33
+ } from "./specification.mjs";
34
+ import { viewChecks } from "./view.mjs";
35
35
  import {
36
36
  checkFqnExprWith,
37
37
  checkFqnRefExpr,
@@ -39,8 +39,8 @@ import {
39
39
  checkOutgoingRelationExpr,
40
40
  checkRelationExpr,
41
41
  checkRelationExprWith
42
- } from "./view-predicates/index.js";
43
- export { LikeC4DocumentValidator } from "./DocumentValidator.js";
42
+ } from "./view-predicates/index.mjs";
43
+ export { LikeC4DocumentValidator } from "./DocumentValidator.mjs";
44
44
  function validatableAstNodeGuards(predicates) {
45
45
  return (n) => predicates.some((p) => p(n));
46
46
  }
@@ -1,8 +1,8 @@
1
1
  import { nonexhaustive } from "@likec4/core";
2
2
  import { AstUtils } from "langium";
3
3
  import { isNumber, isString } from "remeda";
4
- import { ast } from "../ast.js";
5
- import { tryOrLog } from "./_shared.js";
4
+ import { ast } from "../ast.mjs";
5
+ import { tryOrLog } from "./_shared.mjs";
6
6
  export const opacityPropertyRuleChecks = (_) => {
7
7
  return tryOrLog((node, accept) => {
8
8
  const opacity = parseFloat(node.value);
@@ -1,7 +1,7 @@
1
1
  import { FqnRef, isSameHierarchy } from "@likec4/core";
2
2
  import { AstUtils } from "langium";
3
- import { safeCall } from "../utils/index.js";
4
- import { tryOrLog } from "./_shared.js";
3
+ import { safeCall } from "../utils/index.mjs";
4
+ import { tryOrLog } from "./_shared.mjs";
5
5
  export const relationChecks = (services) => {
6
6
  const modelParser = services.likec4.ModelParser;
7
7
  return tryOrLog((el, accept) => {
@@ -1,7 +1,7 @@
1
1
  import { AstUtils } from "langium";
2
- import { ast } from "../ast.js";
3
- import { projectIdFrom } from "../utils/index.js";
4
- import { RESERVED_WORDS, tryOrLog } from "./_shared.js";
2
+ import { ast } from "../ast.mjs";
3
+ import { projectIdFrom } from "../utils/index.mjs";
4
+ import { RESERVED_WORDS, tryOrLog } from "./_shared.mjs";
5
5
  export const checkSpecificationRule = (_) => {
6
6
  return tryOrLog((node, accept) => {
7
7
  if (node.$containerIndex && node.$containerIndex > 0) {
@@ -1,7 +1,8 @@
1
- import { FqnExpr, nonexhaustive } from "@likec4/core";
1
+ import { FqnExpr } from "@likec4/core/types";
2
+ import { nonexhaustive } from "@likec4/core/utils";
2
3
  import { AstUtils } from "langium";
3
- import { getViewRulePredicateContainer } from "../../ast.js";
4
- import { tryOrLog } from "../_shared.js";
4
+ import { getViewRulePredicateContainer } from "../../ast.mjs";
5
+ import { tryOrLog } from "../_shared.mjs";
5
6
  export const checkFqnExprWith = (services) => {
6
7
  const modelParser = services.likec4.ModelParser;
7
8
  return tryOrLog((el, accept) => {
@@ -1,8 +1,8 @@
1
- import { FqnExpr, FqnRef } from "@likec4/core";
1
+ import { FqnExpr, FqnRef } from "@likec4/core/types";
2
2
  import { AstUtils } from "langium";
3
3
  import { isTruthy } from "remeda";
4
- import { ast, getViewRulePredicateContainer, isFqnRefInsideDeployment } from "../../ast.js";
5
- import { tryOrLog } from "../_shared.js";
4
+ import { ast, getViewRulePredicateContainer, isFqnRefInsideDeployment } from "../../ast.mjs";
5
+ import { tryOrLog } from "../_shared.mjs";
6
6
  export const checkFqnRefExpr = (services) => {
7
7
  const modelParser = services.likec4.ModelParser;
8
8
  return tryOrLog((node, accept) => {
@@ -1,7 +1,7 @@
1
1
  import { AstUtils } from "langium";
2
2
  import { isNullish } from "remeda";
3
- import { ast } from "../../ast.js";
4
- import { tryOrLog } from "../_shared.js";
3
+ import { ast } from "../../ast.mjs";
4
+ import { tryOrLog } from "../_shared.mjs";
5
5
  export const checkIncomingRelationExpr = (_services) => {
6
6
  return tryOrLog((el, accept) => {
7
7
  if (el.to.$type === "WildcardExpression" && !ast.isInOutRelationExpr(el.$container)) {
@@ -0,0 +1,6 @@
1
+ export { checkFqnExprWith } from "./fqn-expr-with.mjs";
2
+ export { checkFqnRefExpr } from "./fqn-ref-expr.mjs";
3
+ export { checkIncomingRelationExpr } from "./incoming.mjs";
4
+ export { checkOutgoingRelationExpr } from "./outgoing.mjs";
5
+ export { checkRelationExpr } from "./relation-expr.mjs";
6
+ export { checkRelationExprWith } from "./relation-with.mjs";
@@ -1,7 +1,7 @@
1
1
  import { AstUtils } from "langium";
2
2
  import { isNullish } from "remeda";
3
- import { ast, getViewRulePredicateContainer } from "../../ast.js";
4
- import { tryOrLog } from "../_shared.js";
3
+ import { ast, getViewRulePredicateContainer } from "../../ast.mjs";
4
+ import { tryOrLog } from "../_shared.mjs";
5
5
  export const checkOutgoingRelationExpr = (_services) => {
6
6
  return tryOrLog((el, accept) => {
7
7
  const viewRulePredicate = getViewRulePredicateContainer(el);
@@ -1,7 +1,7 @@
1
1
  import { FqnExpr, RelationExpr } from "@likec4/core";
2
2
  import { AstUtils } from "langium";
3
- import { ast } from "../../ast.js";
4
- import { tryOrLog } from "../_shared.js";
3
+ import { ast } from "../../ast.mjs";
4
+ import { tryOrLog } from "../_shared.mjs";
5
5
  export const checkRelationExpr = (services) => {
6
6
  const ModelParser = services.likec4.ModelParser;
7
7
  return tryOrLog((node, accept) => {
@@ -1,5 +1,5 @@
1
- import { getViewRulePredicateContainer } from "../../ast.js";
2
- import { tryOrLog } from "../_shared.js";
1
+ import { getViewRulePredicateContainer } from "../../ast.mjs";
2
+ import { tryOrLog } from "../_shared.mjs";
3
3
  export const checkRelationExprWith = (_services) => {
4
4
  return tryOrLog((el, accept) => {
5
5
  const container = getViewRulePredicateContainer(el);
@@ -1,6 +1,6 @@
1
- import { ast } from "../ast.js";
2
- import { projectIdFrom } from "../utils/index.js";
3
- import { RESERVED_WORDS, tryOrLog } from "./_shared.js";
1
+ import { ast } from "../ast.mjs";
2
+ import { projectIdFrom } from "../utils/index.mjs";
3
+ import { RESERVED_WORDS, tryOrLog } from "./_shared.mjs";
4
4
  export const viewChecks = (services) => {
5
5
  const index = services.shared.workspace.IndexManager;
6
6
  return tryOrLog((node, accept) => {
@@ -0,0 +1,2 @@
1
+ export * from "./assignNavigateTo.mjs";
2
+ export * from "./resolve-relative-paths.mjs";
@@ -3,7 +3,7 @@ import { decode, encode } from "@msgpack/msgpack";
3
3
  import { fromBase64, toBase64 } from "@smithy/util-base64";
4
4
  import { AstUtils, CstUtils } from "langium";
5
5
  import { mapValues } from "remeda";
6
- import { logger, logWarnError } from "../logger.js";
6
+ import { logger, logWarnError } from "../logger.mjs";
7
7
  const { getDocument } = AstUtils;
8
8
  function pack({
9
9
  nodes,
@@ -2,7 +2,7 @@ import { GraphvizWasmAdapter, QueueGraphvizLayoter } from "@likec4/layouts";
2
2
  import { GraphvizBinaryAdapter } from "@likec4/layouts/graphviz/binary";
3
3
  import { isEmpty } from "remeda";
4
4
  import which from "which";
5
- import { logger } from "../logger.js";
5
+ import { logger } from "../logger.mjs";
6
6
  function graphvizBinPath() {
7
7
  try {
8
8
  return which.sync("dot");
@@ -0,0 +1 @@
1
+ export { DefaultLikeC4Views } from "./likec4-views.mjs";
@@ -1,7 +1,7 @@
1
1
  import { loggable } from "@likec4/log";
2
2
  import { values } from "remeda";
3
- import { logError, logger as rootLogger, logWarnError } from "../logger.js";
4
- import { performanceMark } from "../utils/index.js";
3
+ import { logError, logger as rootLogger, logWarnError } from "../logger.mjs";
4
+ import { performanceMark } from "../utils/index.mjs";
5
5
  const viewsLogger = rootLogger.getChild("views");
6
6
  export class DefaultLikeC4Views {
7
7
  constructor(services) {