likec4 1.28.0 → 1.29.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/dist/index.d.mts CHANGED
@@ -2,9 +2,11 @@ import { DiagramView, ProjectId, NonEmptyArray } from '@likec4/core';
2
2
  export { AbstractRelation, AutoLayoutDirection, BBox, Color, ComputedDeploymentView, ComputedDynamicView, ComputedEdge, ComputedElementView, ComputedLikeC4ModelData, ComputedNode, ComputedView, DeployedInstance, DeploymentElement, DeploymentNode, DeploymentNodeKind, DeploymentRelation, DeploymentView, DiagramEdge, DiagramNode, DiagramView, DynamicView, EdgeId, Element, ElementKind, ElementView, Fqn, HexColorLiteral, LayoutedLikeC4ModelData, LikeC4View, NodeId, ParsedLikeC4ModelData, Point, RelationExpr, RelationId, StepEdgeId, Tag, ThemeColor, ViewId, XYPoint } from '@likec4/core';
3
3
  import { LikeC4Model } from '@likec4/core/model';
4
4
  export { AnyAux, Aux, LikeC4DeploymentModel, LikeC4Model, LikeC4ViewModel } from '@likec4/core/model';
5
- import { L as LikeC4LanguageServices, a as LikeC4Views, R as Range } from './shared/likec4.DwrogUe0.mjs';
5
+ import { W as WorkspaceFolder, a as LikeC4Services, G as GraphvizLayouter, L as LikeC4LanguageServices, b as LikeC4Views, R as Range } from './shared/likec4.DallBlZf.mjs';
6
6
  import 'type-fest';
7
+ import '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+picomatch@4.0.0/node_modules/@types/picomatch/posix.d.ts';
7
8
  import '@likec4/core/types';
9
+ import '@likec4/core/utils';
8
10
 
9
11
  type Logger = {
10
12
  info(msg: string): void;
@@ -12,6 +14,44 @@ type Logger = {
12
14
  error(err: unknown): void;
13
15
  };
14
16
 
17
+ declare class CliWorkspace {
18
+ private services;
19
+ private isInitialized;
20
+ constructor(services: CliServices);
21
+ initWorkspace(workspace: WorkspaceFolder): Promise<void>;
22
+ init(): Promise<void>;
23
+ }
24
+
25
+ type CliAddedServices = {
26
+ logger: Logger;
27
+ likec4: {
28
+ Layouter: GraphvizLayouter;
29
+ };
30
+ cli: {
31
+ Workspace: CliWorkspace;
32
+ };
33
+ };
34
+ type CliServices = LikeC4Services & CliAddedServices;
35
+ type CreateLanguageServiceOptions = {
36
+ /**
37
+ * Whether to use the file system for the language service.
38
+ * @default true
39
+ */
40
+ useFileSystem?: boolean;
41
+ /**
42
+ * Logger to use for the language service.
43
+ * @default 'default'
44
+ */
45
+ logger?: Logger | 'vite' | 'default' | false;
46
+ /**
47
+ * Whether to use the `dot` binary for layouting or the WebAssembly version.
48
+ * @default 'wasm'
49
+ */
50
+ graphviz?: 'wasm' | 'binary';
51
+ };
52
+ declare function createLanguageServices(opts?: CreateLanguageServiceOptions): CliServices;
53
+
54
+ type LikeC4Langium = ReturnType<typeof createLanguageServices>;
15
55
  type LikeC4Options = {
16
56
  /**
17
57
  * By default, if LikeC4 model is invalid, errors are printed to the console.
@@ -40,7 +80,7 @@ type LikeC4Options = {
40
80
  };
41
81
  declare class LikeC4 {
42
82
  readonly workspace: string;
43
- private langium;
83
+ readonly langium: LikeC4Langium;
44
84
  private isPrintErrorEnabled;
45
85
  static fromSource(likec4SourceCode: string, opts?: LikeC4Options): Promise<LikeC4>;
46
86
  /**
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import"@likec4/core";export{LikeC4DeploymentModel,LikeC4Model,LikeC4ViewModel}from"@likec4/core/model";export{L as LikeC4}from"./shared/likec4.10Nsb-Q7.mjs";import"node:fs";import"node:path";import"node:url";import"tty";import"node:util";import"util";import"path";import"os";import"crypto";import"net";import"url";import"fs";import"child_process";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"node:process";
1
+ import"@likec4/core";export{LikeC4DeploymentModel,LikeC4Model,LikeC4ViewModel}from"@likec4/core/model";export{L as LikeC4}from"./shared/likec4.BHE-zBYQ.mjs";import"node:fs";import"node:path";import"node:url";import"tty";import"node:util";import"util";import"path";import"os";import"crypto";import"net";import"url";import"fs";import"child_process";import"@likec4/core/types";import"events";import"buffer";import"@hpcc-js/wasm-graphviz";import"@likec4/core/compute-view";import"@likec4/core/utils";import"node:process";
2
2
  import"boxen";import"node:child_process";import"node:events";import"node:fs/promises";import"node:stream/promises";import"node:os";import"fs/promises";