@likec4/language-server 1.23.0 → 1.23.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.
@@ -11,7 +11,7 @@ class SymLinkTraversingFileSystemProvider extends NodeFileSystemProvider {
11
11
  async readDirectory(folderPath) {
12
12
  const entries = [];
13
13
  try {
14
- const crawled = await new fdir().withSymlinks().withFullPaths().filter(hasExtension).crawl(folderPath.fsPath).withPromise();
14
+ const crawled = await new fdir().withSymlinks({ resolvePaths: false }).withFullPaths().filter(hasExtension).crawl(folderPath.fsPath).withPromise();
15
15
  for (const path of crawled) {
16
16
  entries.push({
17
17
  isFile: true,
package/dist/bundled.mjs CHANGED
@@ -1509,13 +1509,13 @@ ype":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/ru
1509
1509
  eType","typeRef":{"$ref":"#/rules@76/definition/elements@1/elements@0/inferredType"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@76/definition/elements@3/elements@0/inferredType"}}]}},{"$type":"Type","name":"WhereExpression","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@59"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@71"}}]}},{"$type":"Type","name":"DeploymentElement","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref"\
1510
1510
  :"#/rules@97"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@99"}}]}},{"$type":"Type","name":"Referenceable","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@97"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@99"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@17"}}]}},{"$type":"Type","name":"FqnReferenceable","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/types@7"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@\
1511
1511
  17"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@21"}}]}},{"$type":"Type","name":"SizeProperty","type":{"$type":"UnionType","types":[{"$type":"SimpleType","typeRef":{"$ref":"#/rules@136"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@137"}},{"$type":"SimpleType","typeRef":{"$ref":"#/rules@138"}}]}}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"interfaces":[],"usedGrammars":[]}`)),u0={languageId:"likec4",fileExtensions:[".c4",".likec4",".like-c4"],caseInsensitive:!1,mode:"\
1512
- production"},WH={skipValidations:!0,recoveryEnabled:!0,nodeLocationTracking:"full"},HH={AstReflection:()=>new PC},VH={Grammar:()=>BH(),LanguageMetaData:()=>u0,parser:{ParserConfig:()=>WH}},nt=Br.getChild("server");function c0(t){nt.error(qh(t))}function Be(t){nt.warn(qh(t))}const KH={fileSystemProvider:()=>new XH},YH=t=>u0.fileExtensions.some(e=>t.endsWith(e));let XH=class extends eH{async readDirectory(e){const n=[];try{const r=await new ZW.fdir().withSymlinks().withFullPaths().filter(YH).crawl(
1513
- e.fsPath).withPromise();for(const i of r)n.push({isFile:!0,isDirectory:!1,uri:_n.file(i)})}catch(r){c0(r)}return n}};function dt(t,e){if(typeof t>"u"||t==null)throw new Error(e??`Expected defined value, but received ${t}`);return t}function _e(t,e){if(!t)throw new Error(e??"Invariant failed")}function We(t){throw new Error(`NonExhaustive value: ${t}`)}function JH(t,e,n){let r=i=>t(i,...e);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:e})}function kt(t,e,n){let r=t.length-e.length;if(r===0)
1514
- return t(...e);if(r===1)return JH(t,e,n);throw new Error("Wrong number of arguments")}function l0(t){return e=>!t(e)}function Bi(t){return t==null}function d0(t){return Array.isArray(t)}function QH(...t){return kt(ZH,t)}var ZH=(t,e)=>e.every(n=>n(t));function $i(...t){return kt(e7,t)}var e7=(t,e)=>e.some(n=>n(t)),Tm;(t=>{t.isDeploymentNode=e=>"kind"in e&&!("element"in e),t.isInstance=e=>"element"in e&&!("kind"in e)})(Tm||(Tm={}));function t7(t,e){return e?e+"."+t:t}var Iu;(t=>{t.Group="@group"})(
1515
- Iu||(Iu={}));const Wi="primary",Am="rectangle",_m="md",n7="md",r7="md";function Zr(t){return"element"in t}function vo(t){return"expanded"in t}function xm(t){return"custom"in t&&(f0(t.custom.expr)||Cm(t.custom.expr))}function Dn(t){return"wildcard"in t}function Nu(t){return"elementKind"in t&&"isEqual"in t}function Ou(t){return"elementTag"in t&&"isEqual"in t}function f0(t){return Zr(t)||Dn(t)||Nu(t)||Ou(t)||vo(t)}function Cm(t){return"where"in t&&f0(t.where.expr)}function i7(t){return f0(t)||Cm(t)||
1516
- xm(t)}function h0(t){return"source"in t&&"target"in t}function p0(t){return"inout"in t}function g0(t){return"incoming"in t}function m0(t){return"outgoing"in t}function IC(t){return h0(t)||p0(t)||g0(t)||m0(t)}function y0(t){return"where"in t&&IC(t.where.expr)}function v0(t){return"customRelation"in t}function NC(t){return IC(t)||y0(t)||v0(t)}var Ls;(t=>{t.isInsideInstanceRef=e=>"deployment"in e&&"element"in e,t.isDeploymentElementRef=e=>"deployment"in e&&!("element"in e),t.isDeploymentRef=e=>!(0,t.
1517
- isModelRef)(e),t.isModelRef=e=>"model"in e,t.toDeploymentRef=e=>(_e((0,t.isDeploymentRef)(e),"Expected DeploymentRef"),(0,t.isInsideInstanceRef)(e)?{id:e.deployment,element:e.element}:{id:e.deployment})})(Ls||(Ls={}));var rt;(t=>{t.isWildcard=e=>"wildcard"in e&&e.wildcard===!0,t.isModelRef=e=>"ref"in e&&Ls.isModelRef(e.ref),t.isDeploymentRef=e=>"ref"in e&&Ls.isDeploymentRef(e.ref)})(rt||(rt={}));var ki;(t=>{t.isDirect=e=>"source"in e&&"target"in e,t.isIncoming=e=>"incoming"in e,t.isOutgoing=e=>"\
1518
- outgoing"in e,t.isInOut=e=>"inout"in e,t.isWhere=e=>"where"in e})(ki||(ki={}));var OC;(t=>{t.isFqnExpr=e=>rt.isWildcard(e)||rt.isModelRef(e)||rt.isDeploymentRef(e),t.isRelation=e=>ki.isDirect(e)||ki.isIncoming(e)||ki.isOutgoing(e)||ki.isInOut(e)})(OC||(OC={}));const s7=t=>"tag"in t,o7=t=>"kind"in t,a7=t=>"participant"in t,u7=t=>"not"in t,w0=t=>"and"in t,b0=t=>"or"in t;function Hi(t){switch(!0){case a7(t):{const e=t.participant,n=Hi(t.operator);return c7(e,n)}case s7(t):{if("eq"in t.tag){const n=t.
1512
+ production"},WH={skipValidations:!0,recoveryEnabled:!0,nodeLocationTracking:"full"},HH={AstReflection:()=>new PC},VH={Grammar:()=>BH(),LanguageMetaData:()=>u0,parser:{ParserConfig:()=>WH}},nt=Br.getChild("server");function c0(t){nt.error(qh(t))}function Be(t){nt.warn(qh(t))}const KH={fileSystemProvider:()=>new XH},YH=t=>u0.fileExtensions.some(e=>t.endsWith(e));let XH=class extends eH{async readDirectory(e){const n=[];try{const r=await new ZW.fdir().withSymlinks({resolvePaths:!1}).withFullPaths().
1513
+ filter(YH).crawl(e.fsPath).withPromise();for(const i of r)n.push({isFile:!0,isDirectory:!1,uri:_n.file(i)})}catch(r){c0(r)}return n}};function dt(t,e){if(typeof t>"u"||t==null)throw new Error(e??`Expected defined value, but received ${t}`);return t}function _e(t,e){if(!t)throw new Error(e??"Invariant failed")}function We(t){throw new Error(`NonExhaustive value: ${t}`)}function JH(t,e,n){let r=i=>t(i,...e);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:e})}function kt(t,e,n){let r=t.length-
1514
+ e.length;if(r===0)return t(...e);if(r===1)return JH(t,e,n);throw new Error("Wrong number of arguments")}function l0(t){return e=>!t(e)}function Bi(t){return t==null}function d0(t){return Array.isArray(t)}function QH(...t){return kt(ZH,t)}var ZH=(t,e)=>e.every(n=>n(t));function $i(...t){return kt(e7,t)}var e7=(t,e)=>e.some(n=>n(t)),Tm;(t=>{t.isDeploymentNode=e=>"kind"in e&&!("element"in e),t.isInstance=e=>"element"in e&&!("kind"in e)})(Tm||(Tm={}));function t7(t,e){return e?e+"."+t:t}var Iu;(t=>{
1515
+ t.Group="@group"})(Iu||(Iu={}));const Wi="primary",Am="rectangle",_m="md",n7="md",r7="md";function Zr(t){return"element"in t}function vo(t){return"expanded"in t}function xm(t){return"custom"in t&&(f0(t.custom.expr)||Cm(t.custom.expr))}function Dn(t){return"wildcard"in t}function Nu(t){return"elementKind"in t&&"isEqual"in t}function Ou(t){return"elementTag"in t&&"isEqual"in t}function f0(t){return Zr(t)||Dn(t)||Nu(t)||Ou(t)||vo(t)}function Cm(t){return"where"in t&&f0(t.where.expr)}function i7(t){
1516
+ return f0(t)||Cm(t)||xm(t)}function h0(t){return"source"in t&&"target"in t}function p0(t){return"inout"in t}function g0(t){return"incoming"in t}function m0(t){return"outgoing"in t}function IC(t){return h0(t)||p0(t)||g0(t)||m0(t)}function y0(t){return"where"in t&&IC(t.where.expr)}function v0(t){return"customRelation"in t}function NC(t){return IC(t)||y0(t)||v0(t)}var Ls;(t=>{t.isInsideInstanceRef=e=>"deployment"in e&&"element"in e,t.isDeploymentElementRef=e=>"deployment"in e&&!("element"in e),t.isDeploymentRef=
1517
+ e=>!(0,t.isModelRef)(e),t.isModelRef=e=>"model"in e,t.toDeploymentRef=e=>(_e((0,t.isDeploymentRef)(e),"Expected DeploymentRef"),(0,t.isInsideInstanceRef)(e)?{id:e.deployment,element:e.element}:{id:e.deployment})})(Ls||(Ls={}));var rt;(t=>{t.isWildcard=e=>"wildcard"in e&&e.wildcard===!0,t.isModelRef=e=>"ref"in e&&Ls.isModelRef(e.ref),t.isDeploymentRef=e=>"ref"in e&&Ls.isDeploymentRef(e.ref)})(rt||(rt={}));var ki;(t=>{t.isDirect=e=>"source"in e&&"target"in e,t.isIncoming=e=>"incoming"in e,t.isOutgoing=
1518
+ e=>"outgoing"in e,t.isInOut=e=>"inout"in e,t.isWhere=e=>"where"in e})(ki||(ki={}));var OC;(t=>{t.isFqnExpr=e=>rt.isWildcard(e)||rt.isModelRef(e)||rt.isDeploymentRef(e),t.isRelation=e=>ki.isDirect(e)||ki.isIncoming(e)||ki.isOutgoing(e)||ki.isInOut(e)})(OC||(OC={}));const s7=t=>"tag"in t,o7=t=>"kind"in t,a7=t=>"participant"in t,u7=t=>"not"in t,w0=t=>"and"in t,b0=t=>"or"in t;function Hi(t){switch(!0){case a7(t):{const e=t.participant,n=Hi(t.operator);return c7(e,n)}case s7(t):{if("eq"in t.tag){const n=t.
1519
1519
  tag.eq;return r=>Array.isArray(r.tags)&&r.tags.includes(n)}const e=t.tag.neq;return n=>!Array.isArray(n.tags)||!n.tags.includes(e)}case o7(t):{if("eq"in t.kind){const n=t.kind.eq;return r=>r.kind===n}const e=t.kind.neq;return n=>Bi(n.kind)||n.kind!==e}case u7(t):{const e=Hi(t.not);return l0(e)}case w0(t):{const e=t.and.map(Hi);return QH(e)}case b0(t):{const e=t.or.map(Hi);return $i(e)}default:We(t)}}function c7(t,e){return n=>{if(!n.source||!n.target)return!1;switch(t){case"source":return e(n.source);case"\
1520
1520
  target":return e(n.target)}}}const LC="dashed",Ms="normal",Lu="gray";function Pm(t){return"include"in t&&Array.isArray(t.include)||"exclude"in t&&Array.isArray(t.exclude)}function MC(t){return"predicateId"in t}function zC(t){return"style"in t&&"targets"in t&&Array.isArray(t.targets)}function FC(t){return"styleId"in t}function l7(t){return t==="TB"||t==="BT"||t==="LR"||t==="RL"}function $0(t){return"direction"in t}function GC(t){return"title"in t&&"groupRules"in t&&Array.isArray(t.groupRules)}function d7(t){
1521
1521
  return"__parallel"in t&&d0(t.__parallel)}function qC(t){return t.__==="deployment"}function jC(t){return t.__==="dynamic"}function Wf(t){return Bi(t.__)||t.__==="element"}function UC(t){return Wf(t)&&"extends"in t}function BC(t){return Wf(t)&&"viewOf"in t}function WC(t,e){const n=`step-${String(t).padStart(2,"0")}`;return e?`${n}.${e}`:n}function HC(t){return t.startsWith("step-")}function VC(t){if(!HC(t))throw new Error(`Invalid step edge id: ${t}`);return parseFloat(t.slice(5))}var sr;(t=>{function e(i){
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@likec4/language-server",
3
3
  "description": "LikeC4 Language Server",
4
- "version": "1.23.0",
4
+ "version": "1.23.1",
5
5
  "license": "MIT",
6
6
  "bugs": "https://github.com/likec4/likec4/issues",
7
7
  "homepage": "https://likec4.dev",
@@ -113,11 +113,11 @@
113
113
  "vscode-languageserver-types": "3.17.5",
114
114
  "vscode-uri": "3.1.0",
115
115
  "which": "^5.0.0",
116
- "@likec4/core": "1.23.0",
117
- "@likec4/layouts": "1.23.0",
118
- "@likec4/icons": "1.23.0",
119
- "@likec4/log": "1.23.0",
120
- "@likec4/tsconfig": "1.23.0"
116
+ "@likec4/icons": "1.23.1",
117
+ "@likec4/layouts": "1.23.1",
118
+ "@likec4/tsconfig": "1.23.1",
119
+ "@likec4/log": "1.23.1",
120
+ "@likec4/core": "1.23.1"
121
121
  },
122
122
  "scripts": {
123
123
  "typecheck": "tsc --noEmit",