likec4 1.34.0 → 1.34.1
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/cli/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{k as He,o as Dh,q as At,r as Ur,t as ur,s as ua,C as kh,e as xh,d as Bt,u as K,w as la,v as Mh,x as qh,y as at,z as fa,A as Hr,B as Uh,D as Ot,E as Hh,h as da,F as ha,c as Fh,L as rt,j as pa,G as Vh,H as nt,I as zh,J as Gh,n as Bh,K as Wt,M as lr,O as Ps,P as ma,Q as Wh,R as Kh}from"../shared/likec4.
|
|
2
|
+
import{k as He,o as Dh,q as At,r as Ur,t as ur,s as ua,C as kh,e as xh,d as Bt,u as K,w as la,v as Mh,x as qh,y as at,z as fa,A as Hr,B as Uh,D as Ot,E as Hh,h as da,F as ha,c as Fh,L as rt,j as pa,G as Vh,H as nt,I as zh,J as Gh,n as Bh,K as Wt,M as lr,O as Ps,P as ma,Q as Wh,R as Kh}from"../shared/likec4.CENaSwdv.mjs";import he,{existsSync as Ct,copyFileSync as ga,readdirSync as Yh,rmSync as Is}from"node:fs";import Se,{hrtime as Xh,cwd as Ns,exit as ya,stdout as Jh,argv as Qh}from"node:process";
|
|
3
3
|
import{strictEqual as Zh,notStrictEqual as ep}from"assert";import Ts,{resolve as Fe,dirname as js,normalize as tp,relative as rp,extname as np,basename as sp}from"path";import{statSync as $a,readdirSync as ip,readFileSync as Ls,writeFile as op}from"fs";import _a,{format as va,inspect as ap}from"util";import{fileURLToPath as cp}from"url";import me,{resolve as ge,dirname as Pt,join as fr,relative as gt,extname as dr,isAbsolute as Ds,basename as Fr}from"node:path";import ba,{mkdtemp as Vr,writeFile as It,
|
|
4
|
-
mkdir as ct,stat as ks,copyFile as up,rm as lp}from"node:fs/promises";import hr,{tmpdir as zr}from"node:os";import{fileURLToPath as wa}from"node:url";import xs from"@vitejs/plugin-react";import{j as Ea,e as Sa,C as fp,t as Ra,N as Kt,L as Ms,g as dp,a as hp,b as pp}from"../shared/likec4.
|
|
4
|
+
mkdir as ct,stat as ks,copyFile as up,rm as lp}from"node:fs/promises";import hr,{tmpdir as zr}from"node:os";import{fileURLToPath as wa}from"node:url";import xs from"@vitejs/plugin-react";import{j as Ea,e as Sa,C as fp,t as Ra,N as Kt,L as Ms,g as dp,a as hp,b as pp}from"../shared/likec4.CR8hztrt.mjs";import{build as pr,createServer as mp,preview as gp}from"vite";import yp from"node:module";import{compareNatural as $p,sortNaturalByFqn as _p,invariant as Gr,hasAtLeast as qs,nonexhaustive as Aa,delay as Oa}from"@likec4/core";
|
|
5
5
|
import{chromium as Ca}from"playwright";import vp from"node:net";import{setTimeout as bp}from"node:timers/promises";import{promisify as Ie,isDeepStrictEqual as wp}from"node:util";import mr from"node:crypto";import Ep from"node:assert";import{u as Sp}from"../shared/likec4.BeWJWU7_.mjs";import"tty";import"os";import"crypto";import"net";import"child_process";import"@likec4/core/types";import"events";import"@hpcc-js/wasm-graphviz";import"@likec4/core/model";import"buffer";import"@likec4/core/compute-view";
|
|
6
6
|
import"@likec4/core/utils";import"boxen";import"node:child_process";import"node:events";import"node:stream/promises";import"node:readline/promises";import"fs/promises";function Rp(...t){return Sp(Ap,t)}var Ap=t=>`${t[0]?.toUpperCase()??""}${t.slice(1)}`,Us,Pa;function Ia(){return Pa||(Pa=1,Us=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,s,i;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(s=n;s--!==0;)
|
|
7
7
|
if(!t(e[s],r[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}),Us}let Hs;function Op(){
|
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.
|
|
1
|
+
import{LikeC4Model as o}from"@likec4/core/model";export{L as LikeC4}from"./shared/likec4.CENaSwdv.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
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};
|
|
@@ -2222,7 +2222,7 @@ ir.warn(`Command ${r.command} has stderr:
|
|
|
2222
2222
|
`+e),r instanceof Io&&!Gt(r.stdout))ir.warn(`Command: '${r.command}' returned result but also failed (exitcode ${r.exitCode}): "${r.stderr}"`),n=r.stdout;else throw r}return n}async acyclic(e){return Promise.reject(new Error("Method not implemented."))}async svg(e){let n;try{const r=await Gd(this.dotpath,["-Tsvg","-y"],{timeout:1e4,stdin:{string:e}});n=r.stdout,Gt(r.stderr)||ir.warn(`Command ${r.command} has stderr:
|
|
2223
2223
|
`+r.stderr)}catch(r){if(ir.error("FAILED GraphvizBinaryAdapter.svg",{error:r}),ir.warn(`FAILED DOT:
|
|
2224
2224
|
`+e),r instanceof Io&&!Gt(r.stdout))ir.warn(`Command: '${r.command}' returned result but also failed (exitcode ${r.exitCode}):
|
|
2225
|
-
`+r.stderr),n=r.stdout;else throw r}return n}}const nV="likec4",C_="1.34.
|
|
2225
|
+
`+r.stderr),n=r.stdout;else throw r}return n}}const nV="likec4",C_="1.34.1",jw=Hn.getChild("cli");function A_(t){const e=Hn.getChild(t);return{info(n){e.info(n)},warn(n){if(n instanceof Error){e.warn(`${Bn.red(n.name+" "+n.message)}`,{msg:n});return}if(typeof n=="string"){e.warn(n);return}e.warn`${n}`},warnOnce(n){e.warn(n)},error(n,r){let i=r?.error??n;if(i instanceof Error){if(n===i){e.error(`${Bn.red(i.name+" "+i.message)}`,{error:i});return}e.error(Bn.red(n),{error:i});return}if(typeof n=="s\
|
|
2226
2226
|
tring"){e.error(Bn.red(n));return}e.error`${n}`},clearScreen:function(n){},hasErrorLogged:function(n){throw new Error("Function not implemented.")},hasWarned:!1}}const Gw=()=>{},rV={info:Gw,warn:Gw,error:Gw},iV=1e6;function S_(t){const[e,n]=sb(t),r=e*1e3+n/iV;return{ms:r,pretty:mA(r)}}function sV(t){const e=sb();return{stopAndLog(n="done in "){n=Bn.green(`${n}${S_(e).pretty}`),(t||jw).info(n)}}}function oV(t,e){console.log(CP(t,{padding:1,margin:1,dimBorder:!0,...e}))}class aV{constructor(e){this.
|
|
2227
2227
|
services=e}isInitialized=!1;async initWorkspace(e){if(this.isInitialized)throw new Error("Workspace already initialized");const n=this.services.logger,r=this.services.shared.workspace.WorkspaceManager;n.info(`${Bn.dim("workspace:")} ${e.uri}`),r.initialize({capabilities:{},processId:null,rootUri:null,workspaceFolders:[e]}),await r.initializeWorkspace([e])}async init(){if(this.isInitialized)throw new Error("Workspace already initialized");this.isInitialized=!0;const e=this.services.logger;this.services.
|
|
2228
2228
|
likec4.ModelBuilder;const n=this.services.shared.workspace.LangiumDocuments,r=this.services.shared.workspace.DocumentBuilder,i=n.all.toArray(),s=i.filter(o=>!bd(o.uri));if(s.length===0)throw e.error("no LikeC4 sources found"),new Error("no LikeC4 sources found");e.info(`${Bn.dim("workspace:")} found ${s.length} source files`),s.length>1?await r.update(s.map(o=>o.uri),[],void 0):await r.build(i,{validation:!0})}}function uV(t){return e=>new t(e)}const cV={logger:()=>{throw new Error("Logger must \
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{relative as de}from"node:path";import{f as ce,g as J,T as le,N as V,i as pe,n as x,j as U,u as N,l as ue,C as fe,m as ge,a as he,b as me,c as we,d as W,e as Ie,p as Ne,h as G,L as ye}from"./likec4.
|
|
1
|
+
import{relative as de}from"node:path";import{f as ce,g as J,T as le,N as V,i as pe,n as x,j as U,u as N,l as ue,C as fe,m as ge,a as he,b as me,c as we,d as W,e as Ie,p as Ne,h as G,L as ye}from"./likec4.CENaSwdv.mjs";import{compareNatural as ve}from"@likec4/core/utils";import{RichText as ke}from"@likec4/core/types";function Le(n){var e,i;if(n){if("astNode"in n)return Se(n);if(Array.isArray(n))return n.reduce(z,void 0);{const t=n,r=$e(t)?je((i=(e=t?.root)===null||e===void 0?void 0:e.astNode)!==null&&
|
|
2
2
|
i!==void 0?i:t?.astNode):void 0;return C(t,r)}}else return}function $e(n){return typeof n<"u"&&"element"in n&&"text"in n}function je(n){try{return J(n).uri.toString()}catch{return}}function Se(n){var e,i;const{astNode:t,property:r,index:a}=n??{},s=(e=t?.$cstNode)!==null&&e!==void 0?e:t?.$textRegion;if(!(t===void 0||s===void 0)){if(r===void 0)return C(s,O(t));{const o=c=>a!==void 0&&a>-1&&Array.isArray(t[r])?a<c.length?c[a]:void 0:c.reduce(z,void 0);if(!((i=s.assignments)===null||i===void 0)&&i[r]){
|
|
3
3
|
const c=o(s.assignments[r]);return c&&C(c,O(t))}else if(t.$cstNode){const c=o(ce(t.$cstNode,r));return c&&C(c,O(t))}else return}}}function O(n){var e,i,t,r;return n.$cstNode?(i=(e=J(n))===null||e===void 0?void 0:e.uri)===null||i===void 0?void 0:i.toString():n.$textRegion?n.$textRegion.documentURI||((r=(t=new le(n,a=>a.$container?[a.$container]:[]).find(a=>{var s;return(s=a.$textRegion)===null||s===void 0?void 0:s.documentURI}))===null||t===void 0?void 0:t.$textRegion)===null||r===void 0?void 0:r.
|
|
4
4
|
documentURI):void 0}function C(n,e){var i,t;const r={offset:n.offset,end:(i=n.end)!==null&&i!==void 0?i:n.offset+n.length,length:(t=n.length)!==null&&t!==void 0?t:n.end-n.offset};return n.range&&(r.range=n.range),e??(e=n.fileURI),e&&(r.fileURI=e),r}function z(n,e){var i,t;if(n){if(!e)return n&&C(n)}else return e&&C(e);const r=(i=n.end)!==null&&i!==void 0?i:n.offset+n.length,a=(t=e.end)!==null&&t!==void 0?t:e.offset+e.length,s=Math.min(n.offset,e.offset),o=Math.max(r,a),c=o-s,p={offset:s,end:o,length:c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{L as LikeC4VitePlugin}from"../shared/likec4.
|
|
1
|
+
export{L as LikeC4VitePlugin}from"../shared/likec4.CR8hztrt.mjs";import"node:path";import"../shared/likec4.CENaSwdv.mjs";import"node:fs";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"@likec4/core/model";import"buffer";import"@likec4/core/compute-view";
|
|
2
2
|
import"@likec4/core/utils";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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "likec4",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -89,14 +89,14 @@
|
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@hpcc-js/wasm-graphviz": "1.
|
|
92
|
+
"@hpcc-js/wasm-graphviz": "1.7.0",
|
|
93
93
|
"@vitejs/plugin-react": "^4.6.0",
|
|
94
94
|
"boxen": "^8.0.1",
|
|
95
95
|
"playwright": "^1.53.1",
|
|
96
96
|
"rollup": "^4.44.0",
|
|
97
97
|
"type-fest": "^4.41.0",
|
|
98
98
|
"vite": "^6.3.5",
|
|
99
|
-
"@likec4/core": "1.34.
|
|
99
|
+
"@likec4/core": "1.34.1"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"react": "^18.x || ^19.x",
|
|
@@ -178,15 +178,15 @@
|
|
|
178
178
|
"which": "^5.0.0",
|
|
179
179
|
"wireit": "0.14.12",
|
|
180
180
|
"yargs": "17.7.2",
|
|
181
|
-
"@likec4/
|
|
182
|
-
"@likec4/icons": "1.34.
|
|
183
|
-
"@likec4/
|
|
184
|
-
"@likec4/
|
|
185
|
-
"@likec4/
|
|
186
|
-
"@likec4/
|
|
187
|
-
"@likec4/
|
|
188
|
-
"@likec4/styles": "1.34.
|
|
189
|
-
"@likec4/tsconfig": "1.34.
|
|
181
|
+
"@likec4/diagram": "1.34.1",
|
|
182
|
+
"@likec4/icons": "1.34.1",
|
|
183
|
+
"@likec4/language-server": "1.34.1",
|
|
184
|
+
"@likec4/generators": "1.34.1",
|
|
185
|
+
"@likec4/layouts": "1.34.1",
|
|
186
|
+
"@likec4/log": "1.34.1",
|
|
187
|
+
"@likec4/style-preset": "1.34.1",
|
|
188
|
+
"@likec4/styles": "1.34.1",
|
|
189
|
+
"@likec4/tsconfig": "1.34.1"
|
|
190
190
|
},
|
|
191
191
|
"scripts": {
|
|
192
192
|
"typecheck": "tsc --build --verbose",
|