likec4 1.37.0 → 1.38.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
@@ -1,6 +1,6 @@
1
1
  import { LikeC4Model } from '@likec4/core/model';
2
2
  import { UnknownLayouted } from './model/index.mjs';
3
- import { W as WorkspaceFolder, a as LikeC4Services, L as LikeC4LanguageServices, b as LikeC4Views, R as Range } from './shared/likec4.cqC6tNHO.mjs';
3
+ import { W as WorkspaceFolder, a as LikeC4Services, L as LikeC4LanguageServices, b as LikeC4Views, R as Range } from './shared/likec4.CRYZWScz.mjs';
4
4
  import { ProjectId, NonEmptyArray } from '@likec4/core';
5
5
  import { DiagramView } from '@likec4/core/types';
6
6
  export * from '@likec4/core/types';
@@ -19,7 +19,6 @@ declare class CliWorkspace {
19
19
  private isInitialized;
20
20
  constructor(services: CliServices);
21
21
  initWorkspace(workspace: WorkspaceFolder): Promise<void>;
22
- init(): Promise<void>;
23
22
  }
24
23
 
25
24
  type CliAddedServices = {
@@ -35,6 +34,11 @@ type CreateLanguageServiceOptions = {
35
34
  * @default true
36
35
  */
37
36
  useFileSystem?: boolean;
37
+ /**
38
+ * Whether to watch for changes in the workspace.
39
+ * @default true if useFileSystem is true, false otherwise
40
+ */
41
+ watch?: boolean;
38
42
  /**
39
43
  * Logger to use for the language service.
40
44
  * @default 'default'
@@ -45,6 +49,13 @@ type CreateLanguageServiceOptions = {
45
49
  * @default 'wasm'
46
50
  */
47
51
  graphviz?: 'wasm' | 'binary';
52
+ /**
53
+ * Whether to start MCP server
54
+ * @default false
55
+ */
56
+ mcp?: false | 'stdio' | {
57
+ port: number;
58
+ };
48
59
  };
49
60
  declare function createLanguageServices(opts?: CreateLanguageServiceOptions): CliServices;
50
61
 
@@ -74,6 +85,18 @@ type LikeC4Options = {
74
85
  * @default 'wasm'
75
86
  */
76
87
  graphviz?: 'wasm' | 'binary';
88
+ /**
89
+ * Whether to start MCP server
90
+ * @default false
91
+ */
92
+ mcp?: false | 'stdio' | {
93
+ port: number;
94
+ };
95
+ /**
96
+ * Whether to watch for changes in the workspace.
97
+ * @default false
98
+ */
99
+ watch?: boolean;
77
100
  };
78
101
  declare class LikeC4 {
79
102
  readonly workspace: string;
@@ -123,18 +146,11 @@ declare class LikeC4 {
123
146
  * @returns true if there are errors
124
147
  */
125
148
  printErrors(): boolean;
126
- /**
127
- * TODO Replace with watcher
128
- */
129
- notifyUpdate({ changed, removed }: {
130
- changed?: string;
131
- removed?: string;
132
- }): Promise<boolean>;
133
149
  /**
134
150
  * @returns a function to dispose the listener
135
151
  */
136
152
  onModelUpdate(listener: () => void): () => void;
137
- dispose(): void;
153
+ dispose(): Promise<void>;
138
154
  }
139
155
 
140
156
  /**
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{LikeC4Model as o}from"@likec4/core/model";export{L as LikeC4}from"./shared/likec4.BKp9_9LQ.mjs";import"node:fs";import"node:path";import"node:url";import"./shared/likec4.BeWJWU7_.mjs";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";import"@likec4/core/types";import"events";import"@hpcc-js/wasm-graphviz";import"buffer";import"@likec4/core/compute-view";import"@likec4/core/utils";
2
- import"node:process";import"boxen";import"node:child_process";import"node:events";import"node:fs/promises";import"node:stream/promises";import"node:readline/promises";import"node:os";import"fs/promises";function t(r){return o.create(r)}export{t as createLikeC4Model};
1
+ import{LikeC4Model as o}from"@likec4/core/model";export{L as LikeC4}from"./shared/likec4.enfOs0BB.mjs";import"node:fs";import"node:path";import"node:url";import"./shared/likec4.BeWJWU7_.mjs";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";import"fs/promises";import"events";import"node:fs/promises";import"node:stream";import"node:process";import"http";import"http2";import"stream";import"buffer";
2
+ import"string_decoder";import"node:crypto";import"node:buffer";import"node:http";import"@likec4/core/types";import"@hpcc-js/wasm-graphviz";import"@likec4/core/utils";import"@likec4/core/compute-view";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"node:readline/promises";import"node:os";function t(r){return o.create(r)}export{t as createLikeC4Model};