@visulima/vis 1.0.0-alpha.34 → 1.0.0-alpha.35

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/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## @visulima/vis [1.0.0-alpha.35](https://github.com/visulima/visulima/compare/@visulima/vis@1.0.0-alpha.34...@visulima/vis@1.0.0-alpha.35) (2026-06-09)
2
+
3
+ ### Features
4
+
5
+ * **vis:** add run --hash-mode override flag ([b9c5efa](https://github.com/visulima/visulima/commit/b9c5efa05b9e9f142e8d52fa9d88ddac10d2d4f0))
6
+
7
+
8
+ ### Dependencies
9
+
10
+ * **@visulima/task-runner:** upgraded to 1.0.0-alpha.22
11
+
1
12
  ## @visulima/vis [1.0.0-alpha.34](https://github.com/visulima/visulima/compare/@visulima/vis@1.0.0-alpha.33...@visulima/vis@1.0.0-alpha.34) (2026-06-08)
2
13
 
3
14
  ### Features
package/dist/bin.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import"./packem_shared/index-di3jpyZS.js";import"./packem_chunks/bin.js";import"./packem_chunks/config.js";import"./packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";
2
+ import"./packem_shared/index-Dc3ht2bL.js";import"./packem_chunks/bin.js";import"./packem_chunks/config.js";import"./packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";
package/dist/binx.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{$ as r,m as o,a as c,I as i,p as a,i as n}from"./packem_shared/index-di3jpyZS.js";r();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o.version}
2
+ import{$ as r,m as o,a as c,I as i,p as a,i as n}from"./packem_shared/index-Dc3ht2bL.js";r();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o.version}
3
3
  `),process.exit(0));process.argv.splice(2,0,"dlx");c();const e=i("visx",{packageName:"visx",packageVersion:o.version}),p=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(a({detailed:p,exitOnError:!1}));e.addCommand(n);(async()=>{try{await e.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}})();
@@ -1,4 +1,4 @@
1
- var s8=Object.defineProperty;var p=(e,t)=>s8(e,"name",{value:t,configurable:!0});import{createRequire as o8}from"node:module";import{d as c8,m as Kg,$ as l8,a as u8,I as A8,p as d8,i as f8}from"../packem_shared/index-di3jpyZS.js";import{$ as dv,g as g8,i as h8,z as m8,E as pr,s as nt,d as nf,b as un,k as Vg,j as Fc,p as fD,e as S1}from"./config.js";import{n as sf,C as vr,U as bn,M as j,L as TC,Q as pD,O as gD,b as hD,a as la,K as Ir,_ as MC,c as y8,s as mD,B as Le,z as Oc,l as K,y as E8}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{x as vD}from"tinyexec";import{a as BD,g as Sh}from"../packem_shared/_commonjsHelpers-CLblCigl.js";import{r as $8,c as Q8,s as Ec,A as N1}from"../packem_shared/pm-runner-DmKT2FqF.js";import{getMainWorktreeRoot as x8,Cache as zg,parseCacheSize as R8,readLastRunSummary as $D,getLastRunSummaryPath as _C,digestFile as QD,looksLikeInputUri as N8,parseInputUri as F8}from"@visulima/task-runner";import{g as fr,H as _8,R as G8,o as H8,r as U8,h as W8,a as J8,i as K8,d as V8,t as SD,w as z8,c as q8,E as lc,T as CE,j as ls,e as fd,q as zo,P as Y8,I as X8}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{resolveEditorconfigDefaults as e3}from"#native";const a8=o8(import.meta.url),Ul=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,An=p(e=>{if(typeof Ul<"u"&&Ul.versions&&Ul.versions.node){const[t,r]=Ul.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Ul.getBuiltinModule(e)}return a8(e)},"__cjs_getBuiltinModule"),p8=An("node:assert"),Dh=An("node:module"),{createRequire:ar}=Dh,Wn=Ul,{env:EE}=Wn,fv=An("node:fs/promises"),{readdir:of,stat:Fu,readFile:yD,realpath:x1,rm:pv,mkdtemp:C8,mkdir:I8}=fv,eo=An("node:path"),{resolve:yu,dirname:ED,delimiter:R1}=eo,Zl=An("node:fs"),{existsSync:Eu,rmSync:mi,writeFileSync:Tt,renameSync:CD,unlinkSync:ma,readdirSync:jr,statSync:Cs,readFileSync:ID,watch:v8,copyFileSync:B8,mkdirSync:b8,cpSync:w8}=Zl,bD=An("node:url"),{fileURLToPath:k8}=bD,D8=An("util"),{spawn:F1,execFileSync:wD,execFile:S8,spawnSync:au,execSync:kD}=An("node:child_process"),{createHash:O8,randomUUID:j8}=An("node:crypto"),{homedir:DD,platform:gv,tmpdir:L8}=An("node:os"),{createServer:P8,STATUS_CODES:T8}=An("node:http"),{Http2ServerRequest:$d,constants:M8}=An("node:http2"),{Readable:GC,PassThrough:O1}=An("node:stream"),{createInterface:hv}=An("node:readline"),Z8=An("node:tty");var t3=Object.defineProperty,r3=p((e,t)=>t3(e,"name",{value:t,configurable:!0}),"o$1i");let j1=class extends Error{static{p(this,"s")}static{r3(this,"e")}root;constructor(t,r){super(`${t instanceof Error?t.message:String(t)} for path "${r}"`),this.cause=t,this.root=r}get name(){return"WalkError"}set name(t){throw new Error("Cannot overwrite name of WalkError")}};var n3=Object.defineProperty,xh=p((e,t)=>n3(e,"name",{value:t,configurable:!0}),"a$1k");const L1=xh(e=>{const t=e.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${t}$`)}catch(r){throw new Error(`Invalid glob pattern: ${e}`,{cause:r})}},"i");let i3=class{static{p(this,"o")}static{xh(this,"c")}name;path;#e;constructor(t,r,n){this.#e=t,this.name=r,this.path=n}isDirectory(){return this.#e.isDirectory()}isFile(){return this.#e.isFile()}isSymbolicLink(){return this.#e.isSymbolicLink()}};const HC=xh((e,t,r)=>new i3(e,t,r),"l"),qp=xh((e,t,r,n)=>{if(Array.isArray(t)&&t.length>0&&!t.some(s=>e.endsWith(s)))return!1;const i=e.includes("\\")?e.replaceAll("\\","/"):e;return r&&!r.some(s=>s.test(i))?!1:!n?.some(s=>s.test(i))},"o");var s3=Object.defineProperty,mv=p((e,t)=>s3(e,"name",{value:t,configurable:!0}),"m$1e");const o3=ar(import.meta.url),WA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,a3=mv(e=>{if(typeof WA<"u"&&WA.versions&&WA.versions.node){const[t,r]=WA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return WA.getBuiltinModule(e)}return o3(e)},"k"),{readdirSync:c3,realpathSync:l3,statSync:u3}=a3("node:fs"),A3=mv(e=>{const t=TC(e),r=u3(t);return HC(r,pD(t),t)},"q");function*Ou(e,{extensions:t,followSymlinks:r=!1,includeDirs:n=!0,includeFiles:i=!0,includeSymlinks:s=!0,match:o,maxDepth:c=Number.POSITIVE_INFINITY,skip:u}={}){if(sf(e),c<0)return;const A=o?o.map(h=>typeof h=="string"?L1(h):h):void 0,f=u?u.map(h=>typeof h=="string"?L1(h):h):void 0;if(e=vr(bn(e)),n&&qp(e,t,A,f)&&(yield A3(e)),!(c<1||!qp(e,void 0,void 0,f)))try{const h=c3(e,{withFileTypes:!0});for(const m of h){let E=j(e,m.name);if(m.isSymbolicLink())if(r)E=l3(E);else if(s&&qp(E,t,A,f)){yield HC(m,m.name,TC(E));continue}else continue;m.isDirectory()?yield*Ou(E,{extensions:t,followSymlinks:r,includeDirs:n,includeFiles:i,includeSymlinks:s,match:A,maxDepth:c-1,skip:f}):m.isFile()&&i&&qp(E,t,A,f)&&(yield HC(m,m.name,TC(E)))}}catch(h){throw h instanceof j1?h:new j1(h,e)}}p(Ou,"g$V");mv(Ou,"P");var d3=Object.defineProperty,UC=p((e,t)=>d3(e,"name",{value:t,configurable:!0}),"n$1b");const f3=ar(import.meta.url),JA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p3=UC(e=>{if(typeof JA<"u"&&JA.versions&&JA.versions.node){const[t,r]=JA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return JA.getBuiltinModule(e)}return f3(e)},"h"),{stat:g3,lstat:h3}=p3("node:fs/promises"),af=UC(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?bn(t.cwd):process.cwd();let n=vr(r);const{root:i}=gD(n),s=bn(t.stopAt??i),o=vr(n,s),c=t.type??"file",u=UC(async function(f){return typeof e=="function"?[await e(f)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"d");t.allowSymlinks??=!0;const A=t.allowSymlinks?g3:h3;for(;n&&n!==o&&n!==i;){const f=await u(n);for(let h of f){if(h===hD)return;if(h===void 0)continue;Buffer.isBuffer(h)?h=h.toString():h instanceof URL&&(h=bn(h));const m=la(h)?h:vr(n,h);try{const E=await A(m);if(c==="file"&&E.isFile()||c==="directory"&&E.isDirectory())return m}catch{}}n=Ir(n)}},"k");var m3=Object.defineProperty,WC=p((e,t)=>m3(e,"name",{value:t,configurable:!0}),"n$1a");const y3=ar(import.meta.url),KA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,E3=WC(e=>{if(typeof KA<"u"&&KA.versions&&KA.versions.node){const[t,r]=KA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return KA.getBuiltinModule(e)}return y3(e)},"h"),{statSync:C3,lstatSync:I3}=E3("node:fs"),cf=WC((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?bn(t.cwd):process.cwd();let n=vr(r);const{root:i}=gD(n),s=bn(t.stopAt??i),o=vr(n,s),c=t.type??"file",u=WC(function(f){return typeof e=="function"?[e(f)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"m");t.allowSymlinks??=!0;const A=t.allowSymlinks?C3:I3;for(;n&&n!==o&&n!==i;){for(let f of u(n)){if(f===hD)return;if(f===void 0)continue;Buffer.isBuffer(f)?f=f.toString():f instanceof URL&&(f=bn(f));const h=la(f)?f:vr(n,f);try{const m=A(h);if(c==="file"&&m.isFile()||c==="directory"&&m.isDirectory())return h}catch{}}n=Ir(n)}},"F");var v3=Object.defineProperty,xD=p((e,t)=>v3(e,"name",{value:t,configurable:!0}),"t$_");const B3=ar(import.meta.url),VA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b3=xD(e=>{if(typeof VA<"u"&&VA.versions&&VA.versions.node){const[t,r]=VA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return VA.getBuiltinModule(e)}return B3(e)},"i"),{access:w3}=b3("node:fs/promises");async function uc(e,t=MC){sf(e),e=bn(e);try{return await w3(e,t),!0}catch{return!1}}p(uc,"l$_");xD(uc,"d");var k3=Object.defineProperty,yv=p((e,t)=>k3(e,"name",{value:t,configurable:!0}),"i$1i");const $3=ar(import.meta.url),zA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,RD=yv(e=>{if(typeof zA<"u"&&zA.versions&&zA.versions.node){const[t,r]=zA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return zA.getBuiltinModule(e)}return $3(e)},"f"),{readFile:Q3}=RD("node:fs/promises"),{unzip:D3,brotliDecompress:S3}=RD("node:zlib"),x3={brotli:S3,gzip:D3,none:yv((e,t)=>{t(null,e)},"none")},Ev=yv(async(e,t)=>{if(sf(e),e=bn(e),!await uc(e))throw new y8(`unable to read the non-accessible file: ${e}`);if(!await uc(e,mD))throw new Error(`Unable to read the non-readable file: ${e}`);const{buffer:r,compression:n,encoding:i,flag:s}=t??{};return await Q3(e,s?{flag:s}:{}).then(async o=>await new Promise((c,u)=>{x3[n??"none"](o,(A,f)=>{A?u(A):c(r?f:f.toString(i??"utf8"))})})).catch(o=>{throw o})},"x");var R3=Object.defineProperty,N3=p((e,t)=>R3(e,"name",{value:t,configurable:!0}),"f$15");async function Cv(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=await Ev(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:s,color:o}=r??{};return typeof s=="function"&&(i=s(i)),dv(i,t,bn(e),{color:o})}p(Cv,"s$1c");N3(Cv,"u");var F3=Object.defineProperty,O3=p((e,t)=>F3(e,"name",{value:t,configurable:!0}),"t$Z");const j3=O3(e=>{const t={force:!0,recursive:!0};return e?.maxRetries!==void 0&&(t.maxRetries=e.maxRetries),e?.retryDelay!==void 0&&(t.retryDelay=e.retryDelay),t},"t");var L3=Object.defineProperty,ND=p((e,t)=>L3(e,"name",{value:t,configurable:!0}),"s$1b");const P3=ar(import.meta.url),qA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T3=ND(e=>{if(typeof qA<"u"&&qA.versions&&qA.versions.node){const[t,r]=qA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return qA.getBuiltinModule(e)}return P3(e)},"i"),{unlinkSync:M3,rmSync:_3}=T3("node:fs"),G3=ND((e,t={})=>{sf(e);try{M3(e)}catch{}try{_3(e,j3(t))}catch{}},"_");var H3=Object.defineProperty,FD=p((e,t)=>H3(e,"name",{value:t,configurable:!0}),"m$1a");const U3=ar(import.meta.url),YA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,W3=FD(e=>{if(typeof YA<"u"&&YA.versions&&YA.versions.node){const[t,r]=YA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return YA.getBuiltinModule(e)}return U3(e)},"w"),{mkdir:J3,writeFile:K3,stat:V3,rename:P1,chown:z3,chmod:q3,unlink:Y3}=W3("node:fs/promises"),X3=FD(async(e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},sf(e),g8(t),e=bn(e);const n=`${e}.tmp`;try{const i=await uc(e,MC);if(!i&&r.recursive){const o=Ir(e);await uc(o,MC)||await J3(o,{recursive:!0})}let s;if(await K3(n,typeof t=="string"?Buffer.from(t,r.encoding??"utf8"):h8(t),{flag:r.flag}),i&&!r.overwrite&&(s=await V3(e),r.chown??={gid:s.gid,uid:s.uid},await P1(e,`${e}.bak`)),r.chown)try{await z3(n,r.chown.uid,r.chown.gid)}catch{}await q3(n,s&&!r.mode?s.mode:r.mode??438),await P1(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{await uc(n)&&await Y3(`${e}.tmp`)}},"E");var Z3=Object.defineProperty,OD=p((e,t)=>Z3(e,"name",{value:t,configurable:!0}),"s$19");const eT=ar(import.meta.url),XA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tT=OD(e=>{if(typeof XA<"u"&&XA.versions&&XA.versions.node){const[t,r]=XA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return XA.getBuiltinModule(e)}return eT(e)},"g"),{readFile:rT}=tT("node:fs/promises"),nT=OD(async(e,t,r={})=>{const{detectIndent:n,indent:i,replacer:s,stringify:o=JSON.stringify,...c}={indent:" ",...r};let u=i,A=`
1
+ var s8=Object.defineProperty;var p=(e,t)=>s8(e,"name",{value:t,configurable:!0});import{createRequire as o8}from"node:module";import{d as c8,m as Kg,$ as l8,a as u8,I as A8,p as d8,i as f8}from"../packem_shared/index-Dc3ht2bL.js";import{$ as dv,g as g8,i as h8,z as m8,E as pr,s as nt,d as nf,b as un,k as Vg,j as Fc,p as fD,e as S1}from"./config.js";import{n as sf,C as vr,U as bn,M as j,L as TC,Q as pD,O as gD,b as hD,a as la,K as Ir,_ as MC,c as y8,s as mD,B as Le,z as Oc,l as K,y as E8}from"../packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js";import{x as vD}from"tinyexec";import{a as BD,g as Sh}from"../packem_shared/_commonjsHelpers-CLblCigl.js";import{r as $8,c as Q8,s as Ec,A as N1}from"../packem_shared/pm-runner-DmKT2FqF.js";import{getMainWorktreeRoot as x8,Cache as zg,parseCacheSize as R8,readLastRunSummary as $D,getLastRunSummaryPath as _C,digestFile as QD,looksLikeInputUri as N8,parseInputUri as F8}from"@visulima/task-runner";import{g as fr,H as _8,R as G8,o as H8,r as U8,h as W8,a as J8,i as K8,d as V8,t as SD,w as z8,c as q8,E as lc,T as CE,j as ls,e as fd,q as zo,P as Y8,I as X8}from"../packem_shared/Table-3pFgIUZ2-DABgc6rj.js";import{resolveEditorconfigDefaults as e3}from"#native";const a8=o8(import.meta.url),Ul=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,An=p(e=>{if(typeof Ul<"u"&&Ul.versions&&Ul.versions.node){const[t,r]=Ul.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Ul.getBuiltinModule(e)}return a8(e)},"__cjs_getBuiltinModule"),p8=An("node:assert"),Dh=An("node:module"),{createRequire:ar}=Dh,Wn=Ul,{env:EE}=Wn,fv=An("node:fs/promises"),{readdir:of,stat:Fu,readFile:yD,realpath:x1,rm:pv,mkdtemp:C8,mkdir:I8}=fv,eo=An("node:path"),{resolve:yu,dirname:ED,delimiter:R1}=eo,Zl=An("node:fs"),{existsSync:Eu,rmSync:mi,writeFileSync:Tt,renameSync:CD,unlinkSync:ma,readdirSync:jr,statSync:Cs,readFileSync:ID,watch:v8,copyFileSync:B8,mkdirSync:b8,cpSync:w8}=Zl,bD=An("node:url"),{fileURLToPath:k8}=bD,D8=An("util"),{spawn:F1,execFileSync:wD,execFile:S8,spawnSync:au,execSync:kD}=An("node:child_process"),{createHash:O8,randomUUID:j8}=An("node:crypto"),{homedir:DD,platform:gv,tmpdir:L8}=An("node:os"),{createServer:P8,STATUS_CODES:T8}=An("node:http"),{Http2ServerRequest:$d,constants:M8}=An("node:http2"),{Readable:GC,PassThrough:O1}=An("node:stream"),{createInterface:hv}=An("node:readline"),Z8=An("node:tty");var t3=Object.defineProperty,r3=p((e,t)=>t3(e,"name",{value:t,configurable:!0}),"o$1i");let j1=class extends Error{static{p(this,"s")}static{r3(this,"e")}root;constructor(t,r){super(`${t instanceof Error?t.message:String(t)} for path "${r}"`),this.cause=t,this.root=r}get name(){return"WalkError"}set name(t){throw new Error("Cannot overwrite name of WalkError")}};var n3=Object.defineProperty,xh=p((e,t)=>n3(e,"name",{value:t,configurable:!0}),"a$1k");const L1=xh(e=>{const t=e.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${t}$`)}catch(r){throw new Error(`Invalid glob pattern: ${e}`,{cause:r})}},"i");let i3=class{static{p(this,"o")}static{xh(this,"c")}name;path;#e;constructor(t,r,n){this.#e=t,this.name=r,this.path=n}isDirectory(){return this.#e.isDirectory()}isFile(){return this.#e.isFile()}isSymbolicLink(){return this.#e.isSymbolicLink()}};const HC=xh((e,t,r)=>new i3(e,t,r),"l"),qp=xh((e,t,r,n)=>{if(Array.isArray(t)&&t.length>0&&!t.some(s=>e.endsWith(s)))return!1;const i=e.includes("\\")?e.replaceAll("\\","/"):e;return r&&!r.some(s=>s.test(i))?!1:!n?.some(s=>s.test(i))},"o");var s3=Object.defineProperty,mv=p((e,t)=>s3(e,"name",{value:t,configurable:!0}),"m$1e");const o3=ar(import.meta.url),WA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,a3=mv(e=>{if(typeof WA<"u"&&WA.versions&&WA.versions.node){const[t,r]=WA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return WA.getBuiltinModule(e)}return o3(e)},"k"),{readdirSync:c3,realpathSync:l3,statSync:u3}=a3("node:fs"),A3=mv(e=>{const t=TC(e),r=u3(t);return HC(r,pD(t),t)},"q");function*Ou(e,{extensions:t,followSymlinks:r=!1,includeDirs:n=!0,includeFiles:i=!0,includeSymlinks:s=!0,match:o,maxDepth:c=Number.POSITIVE_INFINITY,skip:u}={}){if(sf(e),c<0)return;const A=o?o.map(h=>typeof h=="string"?L1(h):h):void 0,f=u?u.map(h=>typeof h=="string"?L1(h):h):void 0;if(e=vr(bn(e)),n&&qp(e,t,A,f)&&(yield A3(e)),!(c<1||!qp(e,void 0,void 0,f)))try{const h=c3(e,{withFileTypes:!0});for(const m of h){let E=j(e,m.name);if(m.isSymbolicLink())if(r)E=l3(E);else if(s&&qp(E,t,A,f)){yield HC(m,m.name,TC(E));continue}else continue;m.isDirectory()?yield*Ou(E,{extensions:t,followSymlinks:r,includeDirs:n,includeFiles:i,includeSymlinks:s,match:A,maxDepth:c-1,skip:f}):m.isFile()&&i&&qp(E,t,A,f)&&(yield HC(m,m.name,TC(E)))}}catch(h){throw h instanceof j1?h:new j1(h,e)}}p(Ou,"g$V");mv(Ou,"P");var d3=Object.defineProperty,UC=p((e,t)=>d3(e,"name",{value:t,configurable:!0}),"n$1b");const f3=ar(import.meta.url),JA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p3=UC(e=>{if(typeof JA<"u"&&JA.versions&&JA.versions.node){const[t,r]=JA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return JA.getBuiltinModule(e)}return f3(e)},"h"),{stat:g3,lstat:h3}=p3("node:fs/promises"),af=UC(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?bn(t.cwd):process.cwd();let n=vr(r);const{root:i}=gD(n),s=bn(t.stopAt??i),o=vr(n,s),c=t.type??"file",u=UC(async function(f){return typeof e=="function"?[await e(f)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"d");t.allowSymlinks??=!0;const A=t.allowSymlinks?g3:h3;for(;n&&n!==o&&n!==i;){const f=await u(n);for(let h of f){if(h===hD)return;if(h===void 0)continue;Buffer.isBuffer(h)?h=h.toString():h instanceof URL&&(h=bn(h));const m=la(h)?h:vr(n,h);try{const E=await A(m);if(c==="file"&&E.isFile()||c==="directory"&&E.isDirectory())return m}catch{}}n=Ir(n)}},"k");var m3=Object.defineProperty,WC=p((e,t)=>m3(e,"name",{value:t,configurable:!0}),"n$1a");const y3=ar(import.meta.url),KA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,E3=WC(e=>{if(typeof KA<"u"&&KA.versions&&KA.versions.node){const[t,r]=KA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return KA.getBuiltinModule(e)}return y3(e)},"h"),{statSync:C3,lstatSync:I3}=E3("node:fs"),cf=WC((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?bn(t.cwd):process.cwd();let n=vr(r);const{root:i}=gD(n),s=bn(t.stopAt??i),o=vr(n,s),c=t.type??"file",u=WC(function(f){return typeof e=="function"?[e(f)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"m");t.allowSymlinks??=!0;const A=t.allowSymlinks?C3:I3;for(;n&&n!==o&&n!==i;){for(let f of u(n)){if(f===hD)return;if(f===void 0)continue;Buffer.isBuffer(f)?f=f.toString():f instanceof URL&&(f=bn(f));const h=la(f)?f:vr(n,f);try{const m=A(h);if(c==="file"&&m.isFile()||c==="directory"&&m.isDirectory())return h}catch{}}n=Ir(n)}},"F");var v3=Object.defineProperty,xD=p((e,t)=>v3(e,"name",{value:t,configurable:!0}),"t$_");const B3=ar(import.meta.url),VA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b3=xD(e=>{if(typeof VA<"u"&&VA.versions&&VA.versions.node){const[t,r]=VA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return VA.getBuiltinModule(e)}return B3(e)},"i"),{access:w3}=b3("node:fs/promises");async function uc(e,t=MC){sf(e),e=bn(e);try{return await w3(e,t),!0}catch{return!1}}p(uc,"l$_");xD(uc,"d");var k3=Object.defineProperty,yv=p((e,t)=>k3(e,"name",{value:t,configurable:!0}),"i$1i");const $3=ar(import.meta.url),zA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,RD=yv(e=>{if(typeof zA<"u"&&zA.versions&&zA.versions.node){const[t,r]=zA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return zA.getBuiltinModule(e)}return $3(e)},"f"),{readFile:Q3}=RD("node:fs/promises"),{unzip:D3,brotliDecompress:S3}=RD("node:zlib"),x3={brotli:S3,gzip:D3,none:yv((e,t)=>{t(null,e)},"none")},Ev=yv(async(e,t)=>{if(sf(e),e=bn(e),!await uc(e))throw new y8(`unable to read the non-accessible file: ${e}`);if(!await uc(e,mD))throw new Error(`Unable to read the non-readable file: ${e}`);const{buffer:r,compression:n,encoding:i,flag:s}=t??{};return await Q3(e,s?{flag:s}:{}).then(async o=>await new Promise((c,u)=>{x3[n??"none"](o,(A,f)=>{A?u(A):c(r?f:f.toString(i??"utf8"))})})).catch(o=>{throw o})},"x");var R3=Object.defineProperty,N3=p((e,t)=>R3(e,"name",{value:t,configurable:!0}),"f$15");async function Cv(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=await Ev(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:s,color:o}=r??{};return typeof s=="function"&&(i=s(i)),dv(i,t,bn(e),{color:o})}p(Cv,"s$1c");N3(Cv,"u");var F3=Object.defineProperty,O3=p((e,t)=>F3(e,"name",{value:t,configurable:!0}),"t$Z");const j3=O3(e=>{const t={force:!0,recursive:!0};return e?.maxRetries!==void 0&&(t.maxRetries=e.maxRetries),e?.retryDelay!==void 0&&(t.retryDelay=e.retryDelay),t},"t");var L3=Object.defineProperty,ND=p((e,t)=>L3(e,"name",{value:t,configurable:!0}),"s$1b");const P3=ar(import.meta.url),qA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T3=ND(e=>{if(typeof qA<"u"&&qA.versions&&qA.versions.node){const[t,r]=qA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return qA.getBuiltinModule(e)}return P3(e)},"i"),{unlinkSync:M3,rmSync:_3}=T3("node:fs"),G3=ND((e,t={})=>{sf(e);try{M3(e)}catch{}try{_3(e,j3(t))}catch{}},"_");var H3=Object.defineProperty,FD=p((e,t)=>H3(e,"name",{value:t,configurable:!0}),"m$1a");const U3=ar(import.meta.url),YA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,W3=FD(e=>{if(typeof YA<"u"&&YA.versions&&YA.versions.node){const[t,r]=YA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return YA.getBuiltinModule(e)}return U3(e)},"w"),{mkdir:J3,writeFile:K3,stat:V3,rename:P1,chown:z3,chmod:q3,unlink:Y3}=W3("node:fs/promises"),X3=FD(async(e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},sf(e),g8(t),e=bn(e);const n=`${e}.tmp`;try{const i=await uc(e,MC);if(!i&&r.recursive){const o=Ir(e);await uc(o,MC)||await J3(o,{recursive:!0})}let s;if(await K3(n,typeof t=="string"?Buffer.from(t,r.encoding??"utf8"):h8(t),{flag:r.flag}),i&&!r.overwrite&&(s=await V3(e),r.chown??={gid:s.gid,uid:s.uid},await P1(e,`${e}.bak`)),r.chown)try{await z3(n,r.chown.uid,r.chown.gid)}catch{}await q3(n,s&&!r.mode?s.mode:r.mode??438),await P1(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{await uc(n)&&await Y3(`${e}.tmp`)}},"E");var Z3=Object.defineProperty,OD=p((e,t)=>Z3(e,"name",{value:t,configurable:!0}),"s$19");const eT=ar(import.meta.url),XA=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tT=OD(e=>{if(typeof XA<"u"&&XA.versions&&XA.versions.node){const[t,r]=XA.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return XA.getBuiltinModule(e)}return eT(e)},"g"),{readFile:rT}=tT("node:fs/promises"),nT=OD(async(e,t,r={})=>{const{detectIndent:n,indent:i,replacer:s,stringify:o=JSON.stringify,...c}={indent:" ",...r};let u=i,A=`
2
2
  `;if(await uc(e,mD))try{const h=await rT(e,"utf8");if(n){const{indent:m}=m8(h);u=m}A=h.endsWith(`
3
3
  `)?`
4
4
  `:""}catch(h){if(h.code!=="ENOENT")throw h}const f=o(t,s,u);await X3(e,`${f}${A}`,c)},"R");var iT=Object.defineProperty,sT=p((e,t)=>iT(e,"name",{value:t,configurable:!0}),"t$X");const it=sT((e,t)=>async()=>({default:(await e())[t]}),"e");var oT=Object.defineProperty,Rh=p((e,t)=>oT(e,"name",{value:t,configurable:!0}),"r$1l");function jD(e,t){return`#compdef ${e}
@@ -1287,7 +1287,7 @@ ${sv(t,n)},
1287
1287
  `;return Tt(o,c,"utf8"),r.info(`Created ${o} with ${i}`),!0},"insertPolicyIntoVisConfig"),Hfe=Ut((e,t)=>{const r=j(e,"package.json"),n={catalogStripped:!1,configRemoved:!1,dependencyRemoved:!1,removedScripts:[],scriptCount:0};if(!K(r))return n;const i=Le(r),s=JSON.parse(i);let o=!1;s.syncpack&&(delete s.syncpack,o=!0,n.configRemoved=!0);for(const f of["dependencies","devDependencies"]){const h=s[f];h?.syncpack&&(delete h.syncpack,o=!0,n.dependencyRemoved=!0)}const c=s.workspaces;if(c&&typeof c=="object"&&!Array.isArray(c)){const f=c.catalog;f&&typeof f.syncpack=="string"&&(delete f.syncpack,o=!0,n.catalogStripped=!0);const h=c.catalogs;if(h&&typeof h=="object")for(const m of Object.values(h))m&&typeof m.syncpack=="string"&&(delete m.syncpack,o=!0,n.catalogStripped=!0)}const u=s.catalog;u&&typeof u.syncpack=="string"&&(delete u.syncpack,o=!0,n.catalogStripped=!0);const A=s.scripts;if(A){const f={};for(const[h,m]of Object.entries(A))typeof m=="string"&&mw.test(m)?(n.scriptCount+=1,n.removedScripts.push({name:h,value:m}),o=!0):f[h]=m;n.scriptCount>0&&(Object.keys(f).length===0?delete s.scripts:s.scripts=f)}if(o){const f=Mf(r,i,{useEditorconfig:t});Bt(r),Tt(r,`${JSON.stringify(s,void 0,f)}
1288
1288
  `,"utf8")}return n},"removeSyncpackFromPackageJson"),Ufe=[".husky/pre-commit",".vis/hooks/pre-commit",".git/hooks/pre-commit"],Wfe=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],Gj=Ut((e,t)=>{const r=[],n=Ut(i=>{const s=j(e,i);K(s)&&mw.test(Le(s))&&(r.push(i),yt(t,`Update ${i} — replace \`syncpack\` invocation(s) with \`vis lint\` / \`vis sort-package-json\` as appropriate.`))},"scanFile");for(const i of Wfe){const s=j(e,i);if(K(s)){if(i===".github/workflows"){try{for(const o of jr(s))(o.endsWith(".yml")||o.endsWith(".yaml"))&&n(`.github/workflows/${o}`)}catch{}continue}n(i)}}return r},"detectCiReferences"),Hj=Ut((e,t)=>{const r=[];for(const n of Ufe){const i=j(e,n);K(i)&&mw.test(Le(i))&&(r.push(n),yt(t,`Update ${n} — replace \`syncpack\` invocation with \`vis lint\` / \`vis sort-package-json\` as appropriate.`))}return r},"detectHookReferences"),Jfe=Ut(e=>{const t=j(e,"pnpm-workspace.yaml");if(!K(t))return!1;let r;try{r=Bs(t)}catch{return!1}if(!r||typeof r!="object")return!1;let n=!1;const i=r.catalog;i&&typeof i.syncpack=="string"&&(delete i.syncpack,n=!0);const s=r.catalogs;if(s&&typeof s=="object")for(const o of Object.values(s))o&&typeof o.syncpack=="string"&&(delete o.syncpack,n=!0);return n&&(Bt(t),yB(t,r)),n},"removeSyncpackFromPnpmCatalogs"),Kfe=Ut((e,t)=>{for(const r of[...Oj,...gw]){const n=j(e,r);K(n)&&(Bt(n,t),ma(n),Zr(t,iv,"removedConfigCount"))}},"removeSyncpackConfigFiles"),Vfe=Ut((e,t,r,n,i)=>{const s=Lj(t,i);Tj(t,i);const o=Hj(e,i);o.length>0&&!r.silent&&n.warn(`Found syncpack reference in ${String(o.length)} hook file(s) — see manualSteps for details.`);const c=Gj(e,i);c.length>0&&!r.silent&&n.warn(`Found syncpack reference in ${String(c.length)} CI file(s) — see manualSteps for details.`);const u=Mj(t,i);(s.length>0||Object.keys(u).length>0)&&Gfe(e,s,n,u);const{catalogStripped:A,configRemoved:f,dependencyRemoved:h,removedScripts:m,scriptCount:E}=Hfe(e,r.useEditorconfig);f&&!r.silent&&n.info("Removed `syncpack` block from package.json"),h&&Zr(i,iv,"removedPackageCount");const I=Jfe(e);if((A||I)&&!r.silent&&n.info("Stripped `syncpack` from catalog protocol entries."),E>0){Zr(i,iv,"rewrittenScriptCount",E);for(const{name:b,value:w}of m)yt(i,`Recreate script \`${b}\` (removed; was \`${w}\`). Replace \`syncpack\` with \`vis lint\` / \`vis sort-package-json\` as appropriate.`);r.silent||n.info(`Removed ${String(E)} script(s) referencing \`syncpack\`. Replace with \`vis lint\` / \`vis sort-package-json\` as appropriate.`)}Kfe(e,i)},"applyMigration"),iD=Ut((e,t,r,n)=>{const i=jj(e);if(!i)return t.silent||r.info("No syncpack configuration found — nothing to migrate."),!1;const s=Ofe(e);s&&(lt(n,`Syncpack config ${s} is a TS/JS format vis migrate cannot load — executable config support is tracked in https://github.com/visulima/visulima/issues/622. Convert to .syncpackrc.json and re-run.`),yt(n,`Convert ${s} to .syncpackrc.json (or translate it directly into policy.customTypes.extraTypes in vis.config.ts) — see https://github.com/visulima/visulima/issues/622`),t.silent||r.warn(`Cannot read ${s} — manual migration required (https://github.com/visulima/visulima/issues/622).`)),jfe(e)&&(lt(n,"vis.config.ts already declares `policy.customTypes.extraTypes` — skipping syncpack customTypes merge to avoid duplicates."),t.silent||r.warn("vis.config.ts already has policy.customTypes.extraTypes — skipping merge"));const o=Tfe(e,i,n);if(!o)return!1;if(t.dryRun){const c=Lj(o,n),u=Mj(o,n);Tj(o,n),Hj(e,n),Gj(e,n);const A=_j(c,u);return t.silent||(A===""?r.info("[dry-run] No policy entries to merge — manualSteps will surface the rest."):(r.info(`[dry-run] Would merge ${A} into vis.config.ts:`),r.info(sv(c,u)))),!0}return Vfe(e,o,t,r,n),!0},"migrateSyncpack");var zfe=Object.defineProperty,yw=p((e,t)=>zfe(e,"name",{value:t,configurable:!0}),"l$7");const qfe=yw(e=>e.map(t=>{if(t.startsWith("^"))return{dependencies:!0,target:t.slice(1)};if(t.includes("#")){const[r,n]=t.split("#");return{projects:r,target:n}}return t}),"convertDependsOn"),Yfe=yw((e,t,r)=>{const n=e.tasks??e.pipeline??{},i={};for(const[c,u]of Object.entries(n)){if(c.includes("#"))continue;const A={};u.persistent&&(A.persistent=!0),u.interactive&&(A.interactive=!0);const f={};u.cache===!1&&(f.cache=!1),u.dependsOn&&u.dependsOn.length>0&&(f.dependsOn=qfe(u.dependsOn)),u.inputs&&u.inputs.length>0&&(f.inputs=u.inputs),u.outputs&&u.outputs.length>0&&(f.outputs=u.outputs),u.env&&u.env.length>0&&(f.env=u.env),u.passThroughEnv&&u.passThroughEnv.length>0&&(f.passThroughEnv=u.passThroughEnv),Object.keys(A).length>0&&(f.options=A),i[c]=f}const s={};Object.keys(i).length>0&&(s.tasks=i);const o={};return e.globalDependencies&&e.globalDependencies.length>0&&(o.globalInputs=e.globalDependencies),e.globalEnv&&e.globalEnv.length>0&&(o.globalEnv=e.globalEnv),e.globalPassThroughEnv&&e.globalPassThroughEnv.length>0&&(o.globalPassThroughEnv=e.globalPassThroughEnv),Object.keys(o).length>0&&(s.taskRunner=o),["// Migrated from turbo.json by `vis migrate turborepo`.","// Review the generated `tasks` block and move project-specific tasks","// into each project's project.json.","",'import { defineConfig } from "@visulima/vis/config";',"",`export default defineConfig(${rw(s,j(t,"vis.config.ts"),r)});`,""].join(`
1289
1289
  `)},"renderVisConfig"),sD=yw((e,t,r,n)=>{const i=XO(e,"turbo.json");if(!i){r.warn("No turbo.json found in workspace root — nothing to migrate."),n.warnings.push("No turbo.json at workspace root.");return}const s=Yfe(i,e,t.useEditorconfig);if(!nw(e,s,t,r,n))return;n.manualSteps.push("Review the `tasks` block in vis.config.ts — project-specific tasks (turbo's project#task syntax) were skipped and should be moved into each project's project.json."),n.manualSteps.push("vis adds two task primitives turbo doesn't have: `when: { os, env, branch, ci, not.* }` for conditional execution and `always: true` for finally/teardown tasks that run even when upstream fails. See docs/guides/conditional-and-finally-tasks.mdx.");const o=i.tasks??i.pipeline??{};Object.values(o).some(c=>c.outputLogs!==void 0)&&n.warnings.push("`outputLogs` was found on one or more tasks but vis has no equivalent setting — review and remove."),i.remoteCache?.enabled&&n.manualSteps.push("turbo remote cache detected. vis speaks the same HTTP protocol — set taskRunner.remoteCache { url, token, teamId } in vis.config.ts, or keep your TURBO_API / TURBO_TOKEN / TURBO_TEAM env vars (vis honours them as fallbacks).")},"migrateTurborepo");var Xfe=Object.defineProperty,ze=p((e,t)=>Xfe(e,"name",{value:t,configurable:!0}),"n$e");const Zfe=/\b(?:husky|lint-staged|nano-staged)\b/,epe=ze(e=>{const t=j(e,"package.json");if(K(t))try{return JSON.parse(Le(t))}catch{return}},"readPackageJson"),tpe=ze((e,t)=>{const r=epe(e);if(!r)return!1;const n={...r.dependencies,...r.devDependencies};for(const s of MO)if(n[s])return!0;if(r.scripts){for(const s of Object.values(r.scripts))if(typeof s=="string"&&Zfe.test(s))return!0}const{overrides:i}=t;return i?Object.keys(i).length>0:!1},"detectDepsNeedsMigration"),rpe=ze(e=>K(j(e,"turbo.json")),"detectTurborepo"),npe=ze(e=>K(j(e,"nx.json")),"detectNx"),ipe=ze(e=>K(j(e,".moon")),"detectMoon"),Ni=ze(()=>{const e=[];return{lines:e,logger:{info:ze(t=>{e.push(t)},"info"),warn:ze(t=>{e.push(`⚠ ${t}`)},"warn")}}},"createCapturingLogger"),spe=[{apply:ze(({packageManager:e,root:t,visConfig:r},n,i)=>{NQ(t,e,r,{dryRun:!1},i,n)},"apply"),description:"Remove husky/lint-staged/nano-staged from package.json and rewrite scripts to `vis staged`.",detect:ze(({root:e,visConfig:t})=>tpe(e,t),"detect"),id:"deps",probe:ze(({packageManager:e,root:t,visConfig:r})=>{const{lines:n,logger:i}=Ni(),s=di();return NQ(t,e,r,{dryRun:!0},i,s),n},"probe"),title:"Dependencies & scripts"},{apply:ze(({root:e},t,r)=>{TQ(e,{dryRun:!1},r,t)},"apply"),description:"Inline lint-staged configuration into vis.config.ts.",detect:ze(({root:e})=>!!qO(e),"detect"),id:"lint-staged",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return TQ(e,{dryRun:!0},r,n),t},"probe"),title:"lint-staged"},{apply:ze(({root:e},t,r)=>{HQ(e,{dryRun:!1},r,t)},"apply"),description:"Inline nano-staged configuration into vis.config.ts.",detect:ze(({root:e})=>!!ZO(e),"detect"),id:"nano-staged",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return HQ(e,{dryRun:!0},r,n),t},"probe"),title:"nano-staged"},{apply:ze(({root:e},t,r)=>{sD(e,{dryRun:!1},r,t)},"apply"),description:"Translate turbo.json tasks into vis.config.ts.",detect:ze(({root:e})=>rpe(e),"detect"),id:"turborepo",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return sD(e,{dryRun:!0},r,n),t},"probe"),title:"Turborepo"},{apply:ze(({root:e},t,r)=>{UQ(e,{dryRun:!1},r,t)},"apply"),description:"Translate nx.json targets into vis.config.ts.",detect:ze(({root:e})=>npe(e),"detect"),id:"nx",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return UQ(e,{dryRun:!0},r,n),t},"probe"),title:"Nx"},{apply:ze(({root:e},t,r)=>{MQ(e,{copyTemplates:!1,dryRun:!1},r,t)},"apply"),description:"Translate .moon/tasks.yml into vis.config.ts.",detect:ze(({root:e})=>ipe(e),"detect"),id:"moon",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return MQ(e,{copyTemplates:!1,dryRun:!0},r,n),t},"probe"),title:"Moon"},{apply:ze(({root:e},t,r)=>{FQ(e,{dryRun:!1},r,t)},"apply"),description:"Convert gitleaks config/baseline/hooks to `vis secrets`.",detect:ze(({root:e})=>!!(Nm(e)??Xb(e)??Zb(e)),"detect"),id:"gitleaks",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return FQ(e,{dryRun:!0},r,n),t},"probe"),title:"Gitleaks"},{apply:ze(({root:e},t,r)=>{jQ(e,{dryRun:!1},r,t)},"apply"),description:"Convert Kingfisher baseline/rules/hooks to `vis secrets`.",detect:ze(({root:e})=>!!(ew(e)??Fm(e)),"detect"),id:"kingfisher",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return jQ(e,{dryRun:!0},r,n),t},"probe"),title:"Kingfisher"},{apply:ze(({root:e},t,r)=>{WQ(e,{dryRun:!1},r,t)},"apply"),description:"Replace secretlint config/hooks with `vis secrets`.",detect:ze(({root:e})=>!!(nj(e)??ij(e)),"detect"),id:"secretlint",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return WQ(e,{dryRun:!0},r,n),t},"probe"),title:"Secretlint"},{apply:ze(({root:e},t,r)=>{iD(e,{dryRun:!1},r,t)},"apply"),description:"Translate syncpack customTypes into policy.customTypes.extraTypes and strip the syncpack dep/scripts.",detect:ze(({root:e})=>!!jj(e),"detect"),id:"syncpack",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return iD(e,{dryRun:!0},r,n),t},"probe"),title:"Syncpack"},{apply:ze(({root:e},t,r)=>{JQ(e,{dryRun:!1},r,t)},"apply"),description:"Strip sherif config/dep/scripts and surface ignore-rules as a positive `vis lint --<rule>` command.",detect:ze(({root:e})=>!!sj(e)||oj(e),"detect"),id:"sherif",probe:ze(({root:e})=>{const{lines:t,logger:r}=Ni(),n=di();return JQ(e,{dryRun:!0},r,n),t},"probe"),title:"Sherif"}],ope=ze(e=>spe.filter(t=>t.detect(e)),"getApplicableMigrations"),ape=ze((e,t)=>({packageManager:GO(e),root:e,visConfig:t}),"buildProbeContext");var cpe=Object.defineProperty,lpe=p((e,t)=>cpe(e,"name",{value:t,configurable:!0}),"s$a");const upe=lpe((e,t)=>{t.info("── Migration Summary ──");const r=[["Staged configs merged into vis.config.ts",e.mergedStagedConfigCount],["Lint-staged configs inlined",e.inlinedLintStagedConfigCount],["Config files removed",e.removedConfigCount],["Packages removed",e.removedPackageCount],["Scripts rewritten",e.rewrittenScriptCount]];for(const[i,s]of r)s>0&&t.info(` ${i}: ${String(s)}`);e.gitHooksConfigured&&t.info(" Pre-commit hook updated to use vis staged");const n=Object.entries(e.perMigration);if(n.length>0){t.info(""),t.info("By migration:");for(const[i,s]of n){const o=[];s.removedConfigCount>0&&o.push(`${String(s.removedConfigCount)} config(s) removed`),s.removedPackageCount>0&&o.push(`${String(s.removedPackageCount)} package(s) removed`),s.rewrittenScriptCount>0&&o.push(`${String(s.rewrittenScriptCount)} script(s) rewritten`),t.info(` ${i}: ${o.join(", ")||"no changes"}`)}}if(e.backupsCreated.length>0&&(t.info(""),t.info(`Created ${String(e.backupsCreated.length)} .bak file(s) for rollback. Remove them once you're happy.`)),e.warnings.length>0){t.info(""),t.warn("Warnings:");for(const i of e.warnings)t.warn(` - ${i}`)}if(e.manualSteps.length>0){t.info(""),t.info("Manual steps required:");for(const i of e.manualSteps)t.info(` - ${i}`)}},"printSummary");var Ape=Object.defineProperty,Uj=p((e,t)=>Ape(e,"name",{value:t,configurable:!0}),"c$4");const dpe=Uj((e,t)=>{if(e.length===0){t.info("No applicable migrations detected in this workspace.");return}t.info(`Detected migrations (non-interactive preview):
1290
- `);for(const r of e){t.info(` • ${r.entry.title} — ${r.entry.description}`);for(const n of r.preview)t.info(` ${n}`);t.info("")}t.info("Run a specific migration with `vis migrate <name>` (e.g. `vis migrate deps`).")},"renderFallbackTable"),fpe=Uj(async e=>{const t=e.workspaceRoot??process.cwd(),r=e.visConfig??{},n=ape(t,r),i=ope(n).map(h=>({entry:h,preview:h.probe(n)}));if(!(process.stdout.isTTY&&!Ti)){dpe(i,e.logger);return}if(i.length===0){e.logger.info("No applicable migrations detected in this workspace.");return}const s=new ase(i),o=r.tui?.autoExit??!1,c=o===!0?3:typeof o=="number"?o:0,u=await $ie(su.createElement(Loe,{autoExitSeconds:c,isDryRun:!1,store:s}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit();if(!u||u.length===0){e.logger.info("No migrations selected — exiting.");return}const A=di(),f=[];for(const h of u)try{e.logger.info(`── Applying ${h.entry.title} ──`),h.entry.apply(n,A,e.logger),e.logger.info("")}catch(m){f.push({entry:h.entry,error:m}),e.logger.warn(`Failed to apply ${h.entry.title}: ${m.message}`)}upe(A,e.logger),f.length>0&&(e.logger.warn(""),e.logger.warn(`${String(f.length)} migration(s) failed — see messages above.`),process.exitCode=1)},"runMigrateInteractive");var ppe=Object.defineProperty,gpe=p((e,t)=>ppe(e,"name",{value:t,configurable:!0}),"e$h");const hpe={description:"Analyze and optimize dependencies using e18e replacements and @socketregistry overrides",examples:[["vis optimize","Interactive TUI to select and apply optimizations"],["vis optimize --dry-run","Preview available optimizations"],["vis optimize --pin","Pin Socket.dev overrides to exact versions"],["vis optimize --prod","Only optimize production dependencies"]],group:"Workspace",loader:gpe(()=>import("./handler41.js").then(e=>e.h),"loader"),name:"optimize",options:[{alias:"d",defaultValue:!1,description:"Preview available optimizations without applying",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Pin Socket.dev overrides to exact versions",name:"pin",type:Boolean},{defaultValue:!1,description:"Only optimize production dependencies",name:"prod",type:Boolean},{defaultValue:!1,description:"Skip running install after applying overrides",name:"no-install",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]};var mpe=Object.defineProperty,ype=p((e,t)=>mpe(e,"name",{value:t,configurable:!0}),"e$g");const Epe={argument:{description:"Subcommand and arguments (e.g., cache dir, publish --dry-run, list --depth 0)",name:"args",type:String},description:"Package manager utilities (cache, publish, audit, list, config, etc.)",examples:[["vis pm cache dir","Show cache directory"],["vis pm cache clean","Clean cache"],["vis pm publish --dry-run","Preview publishing"],["vis pm list --depth 0","List direct dependencies"],["vis pm audit","Run security audit"],["vis pm whoami","Show logged-in user"]],group:"System",loader:ype(()=>import("./handler18.js"),"loader"),name:"pm"};var Cpe=Object.defineProperty,Ipe=p((e,t)=>Cpe(e,"name",{value:t,configurable:!0}),"e$f");const vpe={alias:["rm","un","uninstall"],argument:{description:"Packages to remove",name:"packages",type:String},description:"Remove packages using the detected package manager",examples:[["vis remove lodash","Remove a package"],["vis rm old-package","Remove using alias"],["vis remove --filter app react","Remove from specific workspace"],["vis remove -g typescript","Remove global package"]],group:"Dependencies",loader:Ipe(()=>import("./handler19.js"),"loader"),name:"remove",options:[{alias:"D",defaultValue:!1,description:"Remove from devDependencies",name:"save-dev",type:Boolean},{alias:"g",defaultValue:!1,description:"Remove global package",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Remove from all workspace packages",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Remove from workspace root",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]},Bpe={description:"Replay a previous task run from .vis/runs/ — show task results without re-executing",examples:[["vis replay","Show the most recent run summary"],["vis replay --run 2026-04-28T12-34-56_ab12","Inspect a specific historical run"],["vis replay --list","List every recorded run, newest first"],["vis replay --task @myorg/app:build","Focus on one task within the loaded run"],["vis replay --failed","Filter to only failed tasks"],["vis replay --format=json","Machine-readable output for CI"]],group:"Workspace",loader:it(()=>import("./handler20.js"),"replayExecute"),name:"replay",options:[{description:"Run id to replay (defaults to the most recent run)",name:"run",type:String},{defaultValue:!1,description:"List every available run instead of replaying one",name:"list",type:Boolean},{description:"Filter the replay to a single task id (e.g. @my/app:build)",name:"task",type:String},{defaultValue:!1,description:"Filter the replay to failed tasks only",name:"failed",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]};var bpe=Object.defineProperty,wpe=p((e,t)=>bpe(e,"name",{value:t,configurable:!0}),"e$e");const kpe={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target across workspace projects",examples:[["vis run","List all available targets"],["vis run build","Run build on all projects"],["vis run :build","Run build on all projects (moon-style)"],["vis run ~:test","Run test on the project closest to the current directory"],['vis run "#frontend:build"',"Run build on projects tagged 'frontend'"],['vis run :build --query "language=typescript"',"Filter by project metadata"],["vis run test --affected","Run test only on git-changed projects"],["vis run build --fail-fast","Stop on first failure"],["vis run build --dry-run","Show execution plan without running"],["vis run destroy --reverse","Run leaves-first (teardown order, e.g. CDK/Pulumi destroy)"]],group:"Run & Execute",loader:wpe(()=>import("./handler51.js"),"loader"),name:"run",options:[{alias:"p",description:"Comma-separated list of projects to run",name:"projects",type:String},{defaultValue:!1,description:"Skip the toolchain pre-flight (no auto-install for any pinned tool: node / pnpm / yarn / npm / bun / deno / go / python / ruby / rust)",name:"skip-toolchain",type:Boolean},{description:"Detect lockfile/node_modules drift before running (warns in TTY, fails in CI). Use --no-preflight to disable.",name:"preflight",type:Boolean},{defaultValue:3,description:"Maximum number of parallel tasks (falls back to VIS_RUN_CONCURRENCY_LIMIT env var, then 3)",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{description:"Comma-separated selectors of tasks to bypass cache for (e.g. 'app:test', ':e2e', '#flaky:lint'). Other tasks in the run still cache normally. --no-cache wins when both are set.",name:"skip-cache",type:String},{description:"Custom cache directory",name:"cache-dir",type:String},{description:"Remote cache mode: read | write | readwrite (defaults to readwrite when remoteCache is configured)",name:"cache-mode",type:String},{description:"Remote cache wire backend: http (Turborepo-compatible) or reapi (Bazel Remote Execution API gRPC)",name:"cache-backend",type:String},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Generate a run summary after execution",name:"summarize",type:Boolean},{description:'Partition tasks for distributed CI (e.g., "1/4" for first of four runners). Falls back to VIS_PARTITION env var.',name:"partition",type:String},{defaultValue:!1,description:"Skip project constraint validation",name:"skip-constraints",type:Boolean},{description:"Filter matched projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{defaultValue:!1,description:"Only run on projects affected by git changes (shorthand for vis affected)",name:"affected",type:Boolean},{defaultValue:!1,description:"Rerun affected tasks on file change. Ctrl+C to exit.",name:"watch",type:Boolean},{defaultValue:!1,description:"Stop all tasks on first failure",name:"fail-fast",type:Boolean},{defaultValue:!1,description:"Run the dependency graph in reverse (leaves first, then their dependents). Useful for teardown targets like `destroy`/`undeploy` where dependents must run before the things they depend on.",name:"reverse",type:Boolean},{description:"Output mode: interleaved (pass-through), labeled (prefix each line with [pkg#task]), or grouped (vite-task-style block)",name:"log",type:String},{description:"Output style: normal (print every task) or quiet (skip output for successful/cached tasks; failed tasks still print in CI mode, and remain in TUI scrollback in interactive mode). Per-target options.outputStyle overrides this.",name:"output-style",type:String},{defaultValue:!1,description:"Run every task through a pseudo-terminal so color-aware tools render as if attached to a TTY (disables caching)",name:"pty",type:Boolean},{description:"Global retry budget: cap on total task retries across the run (per-target retryCount is still honored up to the budget)",name:"retry-budget",type:Number},{description:"Write a Chrome Tracing JSON profile of the run to this path (open in chrome://tracing or Perfetto)",name:"profile",type:String},{defaultValue:!1,description:"Render the most-recent run's saved summary (from .vis/last-summary.json) and exit without executing any tasks",name:"last-details",type:Boolean},{defaultValue:!0,description:"Show flaky task report on failure (use --no-flaky to suppress)",name:"flaky",type:Boolean},{defaultValue:!1,description:"Treat any task that needed at least one retry as a run failure (exit non-zero), even when retries eventually succeeded. Use in CI to surface flakes that retries would otherwise mask.",name:"fail-on-retry",type:Boolean},{description:"Fail a task if its command references an env var that is unset (no silent empty-string substitution). Use --no-strict-env to disable when set in config.",name:"strict-env",type:Boolean},{description:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Tasks declaring `options.runnerTags` only run when at least one tag overlaps. Untagged tasks always run. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String},{description:"Auto-start service deps. One of: auto | ephemeral | persistent | off. Defaults to `auto` in TTY, `off` in CI.",name:"services",type:String},{defaultValue:!1,description:"Stop services this run auto-started in registry mode when the run exits (clean, q, or Ctrl+C). Ephemeral services already die with the run.",name:"stop-services",type:Boolean}]};var $pe=Object.defineProperty,Qpe=p((e,t)=>$pe(e,"name",{value:t,configurable:!0}),"e$d");const Dpe={description:"Generate a CycloneDX 1.7 Software Bill of Materials for the workspace",examples:[["vis sbom","Write the full-workspace SBOM to sbom.cdx.json"],["vis sbom --focus=my-app","Scope the SBOM to my-app's transitive closure"],["vis sbom --focus=my-app,other","Focus multiple projects"],["vis sbom --format=xml --output=sbom.cdx.xml","Emit XML instead of JSON"],["vis sbom --include-dev","Include devDependencies (default: production only)"],["vis sbom --output=-","Write to stdout"]],group:"Security & Health",loader:Qpe(()=>import("./handler21.js"),"loader"),name:"sbom",options:[{description:"Project name(s) to focus on — comma-separated for multiple",name:"focus",type:String},{defaultValue:"json",description:"Output format: json (default) or xml",name:"format",type:String},{description:"Output path (use '-' for stdout; default: sbom.cdx.json)",name:"output",type:String},{defaultValue:!1,description:"Include devDependencies (default: production only)",name:"include-dev",type:Boolean}]};var Spe=Object.defineProperty,xpe=p((e,t)=>Spe(e,"name",{value:t,configurable:!0}),"e$c");const Rpe={argument:{description:"One or more paths to scan (defaults to workspace root)",name:"paths",type:String},description:"Scan a repository for hardcoded secrets and credentials",examples:[["vis secrets","Scan the workspace with grouped, colourised output"],["vis secrets --staged","Scan only files staged for the current commit (pre-commit hooks)"],["vis secrets --since main","Scan only files changed since the `main` branch"],["vis secrets --affected","Scan only projects affected by the current branch"],["vis secrets --init","Write an initial baseline from current findings"],["vis secrets --list-rules","Print all bundled detection rules"],["vis secrets --list-validators","Print non-HTTP validator types in the ruleset + install hints for each"],["vis secrets --exclude-rule generic-api-key --exclude-rule aws-access-token","Drop noisy rules"],["vis secrets --include-rule stripe-access-token","Check a single rule"],["vis secrets --enable-rule tag:preset:weak-passwords","Enable an opt-in rule group additively (defaults still fire)"],["vis secrets --include-rule tag:preset:password-manager","Restrict output to one opt-in group only"],["vis secrets --min-confidence high","Drop rules without a high confidence label (CI-friendly precision filter)"],["vis secrets --validate --only-verified","Live-verify each finding against its provider (one HTTP call per finding)"],["vis secrets --exclude 'dist/**' --exclude-from .secretsignore","Extra gitignore-syntax exclusions for the walker"],["vis secrets --config ./leaks.json --no-extend-bundled","Use only the supplied config, skip the bundled ruleset"],["vis secrets --concurrency 4","Cap the rayon thread pool (0 / omit = auto)"],["vis secrets --baseline .secrets-baseline.json","Suppress known findings; print diff vs. baseline"],["vis secrets --update-baseline","Merge current findings into the baseline (use --replace-baseline to overwrite)"],["vis secrets --format sarif > report.sarif","SARIF output for GitHub code-scanning"]],group:"Security",loader:xpe(()=>import("./handler52.js"),"loader"),name:"secrets",options:[{description:"Path to a JSON config (gitleaks-compatible shape). Defaults to the bundled ruleset.",name:"config",type:String},{description:"Drop rules below this author-declared confidence: low (default), medium, high. Rules without a declared confidence (every gitleaks rule) are treated as low, so --min-confidence medium or higher drops them along with explicit low-confidence rules.",name:"min-confidence",type:String},{defaultValue:!1,description:"Live-verify each finding against its provider (one HTTP call per finding, max 8 concurrent). Only supports Kingfisher-style HTTP validators with StatusMatch / WordMatch response matchers; other types (gRPC, multi-step, checksum) mark the finding as validation=skipped. WARNING: sends candidate secrets to the provider — some providers alert their security team on failed auth attempts.",name:"validate",type:Boolean},{defaultValue:!1,description:"With --validate, drop every finding whose validation is not 'verified'. Useful for CI gating.",name:"only-verified",type:Boolean},{defaultValue:!1,description:"With --config, do not merge on top of the bundled ruleset — replace it.",name:"no-extend-bundled",type:Boolean},{defaultValue:"text",description:"Output format: text (default), json, sarif",name:"format",type:String},{description:"Path to a baseline JSON of previously-triaged findings",name:"baseline",type:String},{defaultValue:!1,description:"Scan only files staged for commit",name:"staged",type:Boolean},{description:"Scan only files changed since <ref> (e.g. main, origin/HEAD)",name:"since",type:String},{defaultValue:!1,description:"Scan only projects affected by the current branch",name:"affected",type:Boolean},{description:"Enable an opt-in rule or tag without restricting output — additive (e.g. tag:preset:weak-passwords, tag:preset:password-manager). Repeatable.",multiple:!0,name:"enable-rule",type:String},{description:"Rule id or tag:<name> selector — whitelist, only matching findings are emitted. Implies enablement. Repeatable.",multiple:!0,name:"include-rule",type:String},{description:"Rule id or tag:<name> selector — drop matching findings. Repeatable.",multiple:!0,name:"exclude-rule",type:String},{description:"Gitignore-syntax pattern to exclude from the walk (repeatable)",multiple:!0,name:"exclude",type:String},{description:"Path to a gitignore-shaped file the walker should honor (repeatable)",multiple:!0,name:"exclude-from",type:String},{defaultValue:!1,description:"Mask secret values in output",name:"redact",type:Boolean},{defaultValue:!1,description:"Scan dotfiles",name:"include-hidden",type:Boolean},{defaultValue:!1,description:"Do not respect .gitignore",name:"no-gitignore",type:Boolean},{description:"Skip files larger than this (bytes). Default: 10 MiB",name:"max-size",type:Number},{description:"Rayon worker threads (0 / omit = auto)",name:"concurrency",type:Number},{defaultValue:!1,description:"Merge current findings into the baseline and exit 0",name:"update-baseline",type:Boolean},{defaultValue:!1,description:"With --update-baseline, replace rather than merge",name:"replace-baseline",type:Boolean},{defaultValue:!1,description:"Scaffold a baseline from current findings",name:"init",type:Boolean},{defaultValue:!1,description:"With --init, preview the baseline without writing files",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Print all bundled detection rules and exit",name:"list-rules",type:Boolean},{defaultValue:!1,description:"Print non-HTTP validator types referenced by the current ruleset, with install hints for their optional peer dependencies.",name:"list-validators",type:Boolean},{defaultValue:!1,description:"Suppress all progress output (only emit findings)",name:"quiet",type:Boolean},{defaultValue:!1,description:"Print diagnostic info (skipped rules, etc.)",name:"verbose",type:Boolean}]};var Npe=Object.defineProperty,cA=p((e,t)=>Npe(e,"name",{value:t,configurable:!0}),"e$b");const Fpe={commandPath:["security"],description:"List build-script status — allowed, unapproved, and stale allowlist entries",examples:[["vis security list","Show the full build-script triage report"],["vis security list --json","Emit the report as JSON for tooling"]],group:"Security & Health",loader:cA(()=>import("./list.js"),"loader"),name:"list",options:[{defaultValue:!1,description:"Emit the report as JSON instead of human-readable text",name:"json",type:Boolean}]},Ope={commandPath:["security"],description:"Push vis.config security settings to the package manager's native config",examples:[["vis security sync","Sync allowBuilds + minimumReleaseAge to the PM-native config files"],["vis security sync --skip-allow-builds","Sync only the minimumReleaseAge knobs"],["vis security sync --skip-min-release-age","Sync only allowBuilds (trustedDependencies / onlyBuiltDependencies)"]],group:"Security & Health",loader:cA(()=>import("./sync2.js"),"loader"),name:"sync",options:[{defaultValue:!1,description:"Skip syncing allowBuilds (trustedDependencies, onlyBuiltDependencies)",name:"skip-allow-builds",type:Boolean},{defaultValue:!1,description:"Skip syncing minimumReleaseAge and its excludes",name:"skip-min-release-age",type:Boolean}]},jpe={commandPath:["security"],description:"Run lifecycle scripts for packages in security.policies.installScripts.allow (LavaMoat 'run' parity)",examples:[["vis security run","Run preinstall/install/postinstall for every approved package"],["vis security run --with-root","Also run the workspace root's prepublish + prepare hooks"],["vis security run --root-only","Run only the workspace root's prepublish + prepare hooks"]],group:"Security & Health",loader:cA(()=>import("./run.js"),"loader"),name:"run",options:[{defaultValue:!1,description:"Also run the workspace root's prepublish + prepare hooks after dependencies",name:"with-root",type:Boolean},{defaultValue:!1,description:"Skip dependency scripts and only run the workspace root's prepublish + prepare hooks",name:"root-only",type:Boolean}]},Lpe={commandPath:["security"],description:"Install @lavamoat/preinstall-always-fail as a devDep so a missing ignore-scripts setting fails loudly",examples:[["vis security tripwire","Install the tripwire devDependency"],["vis security tripwire --status","Report whether the tripwire is installed"],["vis security tripwire --remove","Remove the tripwire from package.json"]],group:"Security & Health",loader:cA(()=>import("./tripwire.js"),"loader"),name:"tripwire",options:[{defaultValue:!1,description:"Report whether @lavamoat/preinstall-always-fail is installed",name:"status",type:Boolean},{defaultValue:!1,description:"Remove @lavamoat/preinstall-always-fail from package.json",name:"remove",type:Boolean}]},Ppe={commandPath:["security"],description:"Force-refresh the cached npm signing keys used by the signatures marshall",examples:[["vis security keys-refresh","Drop the disk cache and fetch a fresh key set from registry.npmjs.org"],["vis security keys-refresh --clear","Only drop the cache, do not refetch"],["vis security keys-refresh --json","Emit the refresh result as JSON for tooling"]],group:"Security & Health",loader:cA(()=>import("./keys-refresh.js"),"loader"),name:"keys-refresh",options:[{defaultValue:!1,description:"Only clear the cache, do not refetch",name:"clear",type:Boolean},{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean}]},Tpe={commandPath:["security"],description:"Verify the entire lockfile closure against supply-chain policies (firstSeen, publisherChange, blockExoticSubdeps)",examples:[["vis security verify-lockfile","Re-validate every locked entry; exit non-zero on a policy violation"],["vis security verify-lockfile --offline","Verify without network (skips firstSeen / publisherChange)"],["vis security verify-lockfile --json","Emit the verification result as JSON for CI"]],group:"Security & Health",loader:cA(()=>import("./verify-lockfile.js"),"loader"),name:"verify-lockfile",options:[{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean},{defaultValue:!1,description:"Skip network-bound policies (firstSeen, publisherChange)",name:"offline",type:Boolean}]},Mpe=[Fpe,Ope,jpe,Lpe,Ppe,Tpe],Mm={description:"Target id, e.g. @my/api:db",name:"targetId",type:String},_pe={description:"Output format: table or json (default: table)",name:"format",type:String},Gpe={argument:Mm,commandPath:["service"],description:"Start a service target detached so it survives across `vis run` invocations",examples:[["vis service start @my/api:db","Boot the db target as a long-lived service"],["vis service start @my/api:db --timeout=60000","Override readiness timeout"],["vis service start @my/api:db --no-readiness","Skip the readiness probe"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceStartExecute"),name:"start",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{defaultValue:!1,description:"Skip the readiness probe",name:"no-readiness",type:Boolean}]},Hpe={argument:{description:"Target id to stop, or omit when using --all",name:"targetId",required:!1,type:String},commandPath:["service"],description:"Stop a running service",examples:[["vis service stop @my/api:db","Stop the db service"],["vis service stop --all","Stop every running service in this workspace"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceStopExecute"),name:"stop",options:[{defaultValue:!1,description:"Stop every service registered for this workspace",name:"all",type:Boolean},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number}]},Upe={commandPath:["service"],description:"List services registered for this workspace",examples:[["vis service list","Print running services"],["vis service list --format=json","Machine-readable list"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceListExecute"),name:"list",options:[_pe]},Wpe={argument:Mm,commandPath:["service"],description:"Re-run the readiness probe and report a service's health",examples:[["vis service status @my/api:db","Check whether the db service is reachable"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceStatusExecute"),name:"status",options:[{description:"Probe timeout in milliseconds",name:"timeout",type:Number}]},Jpe={argument:Mm,commandPath:["service"],description:"Stop and re-start a running service",examples:[["vis service restart @my/api:db","Recycle the db service"],["vis service restart @my/api:db --no-readiness","Recycle and skip the readiness probe"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceRestartExecute"),name:"restart",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number},{defaultValue:!1,description:"Skip the readiness probe after restart",name:"no-readiness",type:Boolean}]},Kpe={argument:Mm,commandPath:["service"],description:"Print or tail a service's captured stdout/stderr",examples:[["vis service logs @my/api:db","Print the captured log"],["vis service logs @my/api:db -f","Tail the log (Ctrl-C to exit)"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceLogsExecute"),name:"logs",options:[{alias:"f",defaultValue:!1,description:"Follow the log file (like `tail -f`)",name:"follow",type:Boolean}]},Vpe=[Gpe,Hpe,Upe,Wpe,Jpe,Kpe];var zpe=Object.defineProperty,qpe=p((e,t)=>zpe(e,"name",{value:t,configurable:!0}),"e$a");const Ype={description:"Sort package.json files across the workspace using the sort-package-json Rust crate",examples:[["vis sort-package-json","Sort all package.json files in the workspace"],["vis sort-package-json --check","Check if files are already sorted (exit 1 if not)"],["vis sort-package-json --sort-scripts","Also sort the scripts field alphabetically"],["vis sort-package-json --indent 4","Force 4-space indentation (overrides per-file detection)"],["vis sort-package-json --indent tab","Force tab indentation"],["vis sort-package-json --ignore '**/fixtures/**'","Skip files matching one or more glob patterns"],["vis sort-package-json --sort-order name,version,license","Pin a custom prefix order before the default field order"],["vis sort-package-json --unsorted dependencies,devDependencies","Preserve original key order for the listed top-level sections"],["vis sort-package-json --no-final-newline","Do not append a trailing newline"],["vis sort-package-json --line-ending crlf","Force CRLF line endings (default: auto-detect per file)"]],group:"Workspace",loader:qpe(()=>import("./handler40.js"),"loader"),name:"sort-package-json",options:[{alias:"c",defaultValue:!1,description:"Check if package.json files are sorted without writing (exits 1 if unsorted)",name:"check",type:Boolean},{defaultValue:!1,description:"Also sort the scripts field alphabetically",name:"sort-scripts",type:Boolean},{description:"Indent override: a number of spaces, the literal `tab`, or a literal whitespace string. When unset, the original file's indent is preserved.",name:"indent",type:String},{description:"Glob pattern of files to skip (basename match, or path-relative when the pattern contains `/`). Repeatable.",multiple:!0,name:"ignore",type:String},{description:"Comma-separated list of top-level keys to place first, before the default field order. Repeatable.",multiple:!0,name:"sort-order",type:String},{description:"Comma-separated list of top-level sections whose key order should be preserved (e.g. dependencies,devDependencies). Repeatable.",multiple:!0,name:"unsorted",type:String},{defaultValue:!1,description:"Do not append a trailing newline to the output (default: append one).",name:"no-final-newline",type:Boolean},{defaultValue:"auto",description:"Line ending to write: auto (per-file detection, default), lf, or crlf.",name:"line-ending",type:String},{description:"Disable collapsing `bugs: { url }` to the bare string form (default: enabled).",name:"no-format-bugs",type:Boolean},{description:"Disable collapsing `repository: { type, url }` to the GitHub `owner/repo` shorthand (default: enabled).",name:"no-format-repository",type:Boolean},{description:"Disable canonical sorting of `exports` condition keys (default: enabled).",name:"no-sort-exports",type:Boolean},{description:"Disable .editorconfig discovery for indent / line-ending defaults (default: enabled).",name:"no-editorconfig",type:Boolean}]};var Xpe=Object.defineProperty,Zpe=p((e,t)=>Xpe(e,"name",{value:t,configurable:!0}),"e$9");const ege={description:"Run linters on staged files using config from vis.config.ts",examples:[["vis staged","Run staged linters"],["vis staged --verbose","Run with verbose output"],["vis staged --no-stash","Run without backup stash"],["vis staged --diff HEAD~1","Run against a specific diff"]],group:"Run & Execute",loader:Zpe(()=>import("./handler50.js"),"loader"),name:"staged",options:[{defaultValue:!1,description:"Allow empty commits when tasks revert all staged changes",name:"allow-empty",type:Boolean},{defaultValue:!1,description:"Automatically stage new files that tasks create during the run",name:"auto-stage",type:Boolean},{description:"Number of concurrent tasks or false for serial",name:"concurrent",type:String},{defaultValue:!1,description:"Run all tasks to completion even if one fails",name:"continue-on-error",type:Boolean},{description:"Working directory to run all tasks in",name:"cwd",type:String},{defaultValue:!1,description:"Enable debug output",name:"debug",type:Boolean},{description:"Override the default --staged flag of git diff",name:"diff",type:String},{description:"Override the default diff-filter",name:"diff-filter",type:String},{defaultValue:!1,description:"Fail with exit code 1 when tasks modify tracked files",name:"fail-on-changes",type:Boolean},{defaultValue:!1,description:"Kill in-flight tasks with SIGKILL on fast-fail instead of the default SIGTERM",name:"force-kill",type:Boolean},{defaultValue:!1,description:"Hide unstaged changes from partially staged files",name:"hide-partially-staged",type:Boolean},{defaultValue:!1,description:"Hide all unstaged changes before running tasks",name:"hide-unstaged",type:Boolean},{defaultValue:!1,description:"Suppress console output",name:"quiet",type:Boolean},{defaultValue:!1,description:"Pass filepaths relative to cwd to tasks",name:"relative",type:Boolean},{defaultValue:!1,description:"Revert to original state in case of errors",name:"revert",type:Boolean},{defaultValue:!0,description:"Enable backup stash",name:"stash",type:Boolean},{defaultValue:!1,description:"Show task output even when tasks succeed",name:"verbose",type:Boolean}]};var tge=Object.defineProperty,rge=p((e,t)=>tge(e,"name",{value:t,configurable:!0}),"t$8");const nge={description:"Show a workspace health dashboard at a glance",examples:[["vis status","Full status overview"],["vis status --json","Machine-readable output"]],group:"Workspace",loader:rge(()=>import("./handler23.js"),"loader"),name:"status",options:[{defaultValue:!1,description:"Emit JSON output",name:"json",type:Boolean}]};var ige=Object.defineProperty,sge=p((e,t)=>ige(e,"name",{value:t,configurable:!0}),"e$8");const oge={argument:{description:"What to sync: codeowners | package-json-fields",name:"kind",type:String},description:"Synchronise derived workspace artefacts (codeowners, package.json fields, tsconfig refs, …)",examples:[["vis sync codeowners","Generate CODEOWNERS at the repository root"],["vis sync codeowners --out=.github/CODEOWNERS","Write to .github/CODEOWNERS instead"],["vis sync codeowners --check","Fail if the existing file is stale"],["vis sync codeowners --from=project-json,nested-codeowners","Also aggregate nested CODEOWNERS files in the tree"],["vis sync codeowners --regeneration-command='pnpm codeowners'","Set a custom header instruction"],["vis sync codeowners --preserve-block","Splice the generated block between markers in an existing CODEOWNERS"],["vis sync codeowners --write-guard","Also emit GitHub + GitLab Write Guard CI for restricted projects"],["vis sync package-json-fields","Mirror license/author/repository/bugs/homepage/engines from root to every workspace package"],["vis sync package-json-fields --check","Fail if any workspace package.json is out of sync"],["vis sync package-json-fields --fields license,engines","Override the default field list for this run"]],group:"Workspace",loader:sge(()=>import("./handler38.js"),"loader"),name:"sync",options:[{description:"Output path for the generated file (default: <workspace>/CODEOWNERS) — codeowners kind only",name:"out",type:String},{defaultValue:!1,description:"Verify state without writing (exit non-zero if drift is found)",name:"check",type:Boolean},{description:"Input sources for codeowners. Comma-separated or repeated. Values: project-json | nested-codeowners | package-json-maintainers. Defaults to project-json.",multiple:!0,name:"from",type:String},{description:"Glob (repeatable) used to discover nested CODEOWNERS files. Defaults to `**/CODEOWNERS`.",multiple:!0,name:"nested-includes",type:String},{description:"Header instruction shown to reviewers (replaces the default 'update project.json' note). Codeowners kind only.",name:"regeneration-command",type:String},{defaultValue:!1,description:"Splice the generated block between markers in the existing file instead of overwriting it. Codeowners kind only.",name:"preserve-block",type:Boolean},{defaultValue:!1,description:"Also emit a .github/workflows/write-guard.yml scoped to projects with `restricted: true` in project.json. Codeowners kind only.",name:"write-guard",type:Boolean},{description:"Comma-separated list of fields to mirror from root → workspace packages (package-json-fields kind only). Repeatable.",multiple:!0,name:"fields",type:String},{description:"Glob pattern of package names to skip (package-json-fields kind only). Repeatable.",multiple:!0,name:"ignore-package-name",type:String},{defaultValue:"human",description:"Output format for package-json-fields: human | json",name:"format",type:String},{defaultValue:!1,description:"Suppress per-package log lines; print only the summary (package-json-fields kind only)",name:"quiet",type:Boolean}]};var age=Object.defineProperty,cge=p((e,t)=>age(e,"name",{value:t,configurable:!0}),"t$6");const lge={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},description:"Explain why a task is included in the graph by walking its dependency chain to a root",examples:[["vis task-why @myorg/app:build","Show what pulls build in"],["vis task-why lib-a:test","Check the test task's triggers"]],group:"Workspace",loader:cge(()=>import("./handler24.js"),"loader"),name:"task-why"},_f="Workspace",uge={commandPath:["toolchain"],description:"Show every detected manager + expected vs actual tool versions",examples:[["vis toolchain status","Show every detected manager + expected vs actual tool versions"],["vis toolchain status --json","Emit the status as JSON"],["vis toolchain status --exit-code","Exit 1 if any tool mismatches (for CI)"]],group:_f,loader:it(()=>import("./handler25.js"),"statusExecute"),name:"status",options:[{defaultValue:!1,description:"Exit 1 if any tool mismatches",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Emit JSON",name:"json",type:Boolean}]},Age={commandPath:["toolchain"],description:"Print the primary manager's name (for scripts)",examples:[["vis toolchain detect","Print the primary manager's name"]],group:_f,loader:it(()=>import("./handler25.js"),"detectExecute"),name:"detect"},dge={commandPath:["toolchain"],description:"Install pinned versions — per-tool delegation to the right manager",examples:[["vis toolchain install","Install pinned versions"],["vis toolchain install --dry-run","Print the commands that would run, but don't execute"]],group:_f,loader:it(()=>import("./handler25.js"),"installExecute"),name:"install",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean}]},fge={argument:{description:"Tool and version to pin, e.g. node@22.13.0 or pnpm@10.32.1",name:"spec",type:String},commandPath:["toolchain"],description:"Pin a version via the best manager for that tool",examples:[["vis toolchain use node@22.13.0","Pin node 22.13.0 via the best runtime manager"],["vis toolchain use pnpm@10.32.1","Update the packageManager field; pnpm self-activates"],["vis toolchain use node@22.13.0 --dry-run","Print the command without running it"]],group:_f,loader:it(()=>import("./handler25.js"),"useExecute"),name:"use",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean},{defaultValue:!0,description:"Also mirror the version into engines.<tool> when that field already exists. --no-engines to skip.",name:"engines",type:Boolean}]},pge={argument:{description:"Tool to resolve, e.g. node",name:"tool",type:String},commandPath:["toolchain"],description:"Print the resolved binary path a manager would launch for a tool",examples:[["vis toolchain which node","Resolve the node binary the manager would launch"]],group:_f,loader:it(()=>import("./handler25.js"),"whichExecute"),name:"which"},gge=[uge,Age,dge,fge,pge];var hge=Object.defineProperty,mge=p((e,t)=>hge(e,"name",{value:t,configurable:!0}),"e$7");const yge={argument:{description:"Packages to unlink (omit for current package)",name:"packages",type:String},description:"Unlink a previously linked package",examples:[["vis unlink","Unlink current package"],["vis unlink react","Unlink specific package"],["vis unlink -r","Unlink in all workspace packages"]],group:"Dependencies",loader:mge(()=>import("./handler26.js"),"loader"),name:"unlink",options:[{alias:"r",defaultValue:!1,description:"Unlink in all workspace packages",name:"recursive",type:Boolean}]};var Ege=Object.defineProperty,Cge=p((e,t)=>Ege(e,"name",{value:t,configurable:!0}),"e$6");const Ige={alias:"up",argument:{description:"Packages to update (updates all if omitted)",name:"packages",type:String},description:"Update packages to their latest versions",examples:[["vis update react","Update react within semver range"],["vis up react -L","Update react to latest"],["vis update -i","Interactive mode"],["vis update --filter app","Update in specific workspace"],["vis update -r","Update in all workspaces"],["vis update --target minor","Only apply minor/patch updates (catalog mode)"],["vis update --dry-run","Preview changes without applying"],["vis update --exclude '@types/*'","Exclude packages by pattern"],["vis update --changelog","Show changelog links after updating"],["vis update --rollback","Restore catalog from last backup"],["vis update --ai","Run AI analysis before applying updates"]],group:"Dependencies",loader:Cge(()=>import("./handler48.js"),"loader"),name:"update",options:[{alias:"L",conflicts:"target",description:"Update to latest version (ignore semver range; equivalent to --target latest)",name:"latest",type:Boolean},{alias:"t",conflicts:"latest",description:"Update target: latest, minor, or patch (default: latest, catalog mode)",name:"target",type:String},{alias:"d",defaultValue:!1,description:"Preview changes without applying",name:"dry-run",type:Boolean},{alias:"g",defaultValue:!1,description:"Update global packages",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Update recursively in all workspace packages",name:"recursive",type:Boolean},{description:"Filter packages in monorepo (pm-wrapper mode; catalog mode uses --include/--exclude)",name:"filter",type:String},{alias:"w",defaultValue:!1,description:"Include workspace root",name:"workspace-root",type:Boolean},{alias:"D",conflicts:"prod",description:"Update only devDependencies",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Update only dependencies",name:"prod",type:Boolean},{alias:"i",defaultValue:!1,description:"Interactive mode",name:"interactive",type:Boolean},{defaultValue:!1,description:"Don't update optionalDependencies",name:"no-optional",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in update checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry (catalog mode)",name:"include-internal",type:Boolean},{alias:"l",defaultValue:!1,description:"Include packages with pinned/exact versions (no ^ or ~ prefix; catalog mode)",name:"include-locked",type:Boolean},{defaultValue:!1,description:"Update lockfile only",name:"no-save",type:Boolean},{description:"Glob pattern to include packages (repeatable, catalog mode)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable, catalog mode)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions (catalog mode)",name:"prerelease",type:Boolean},{description:"Check for known security vulnerabilities via OSV.dev (default: true; --no-security to skip)",name:"security",type:Boolean},{defaultValue:!1,description:"Skip catalog mode, use package manager directly",name:"no-catalog",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Show changelog URLs for updated packages",name:"changelog",type:Boolean},{description:"Run install after catalog update, --no-install to skip (default: true)",name:"install",type:Boolean},{defaultValue:!1,description:"Restore catalog file from the last backup",name:"rollback",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages before updating (catalog mode)",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Skip typosquat name check for package arguments",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip the offline marshall pipeline (author, provenance, metadata, downloads, expired-domains, new-bin, signatures, archived-repo) when explicit package arguments are supplied",name:"no-marshall-check",type:Boolean},{description:"Cap concurrent registry requests during outdated checks (default: 8)",name:"max-concurrent-requests",type:Number},{description:"Release channel filter: stable (default), same (match current's prerelease channel), or any",name:"release-channel",type:String},{alias:"y",defaultValue:!1,description:"Skip the confirmation prompt for blanket --latest updates. Required in non-TTY contexts (CI) when running `vis update --latest` without explicit package arguments.",name:"yes",type:Boolean},{defaultValue:!1,description:"Skip the GitHub Actions ecosystem scan (workflows + composite action.yml files)",name:"no-actions",type:Boolean},{defaultValue:!1,description:"Skip the Docker ecosystem scan (Dockerfile + docker-compose images)",name:"no-docker",type:Boolean},{defaultValue:!1,description:"Skip the GitLab CI ecosystem scan (.gitlab-ci.yml + .gitlab/ci/**)",name:"no-gitlab",type:Boolean},{defaultValue:!1,description:"Include branch references (e.g. actions/checkout@main) when scanning workflows",name:"include-branches",type:Boolean},{description:"Reference style for GitHub Actions updates: sha (default, pin to commit SHA + version comment) or preserve",name:"style",type:String},{description:"GitHub token for actions resolution (overrides GITHUB_TOKEN / GH_TOKEN env)",name:"actions-token",type:String},{description:"GitLab token for include-ref resolution (overrides GITLAB_TOKEN / CI_JOB_TOKEN env)",name:"gitlab-token",type:String}]};var vge=Object.defineProperty,Bge=p((e,t)=>vge(e,"name",{value:t,configurable:!0}),"e$5");const bge={argument:{description:"Target version (defaults to latest)",name:"version",type:String},description:"Update vis itself to the latest version",examples:[["vis self-update","Update to latest"],["vis self-update 2.0.0","Install specific version"],["vis self-update --check","Check for updates without installing"]],group:"System",loader:Bge(()=>import("./handler27.js"),"loader"),name:"self-update",options:[{defaultValue:!1,description:"Check for updates without installing",name:"check",type:Boolean},{defaultValue:!1,description:"Reinstall even if already current",name:"force",type:Boolean},{defaultValue:!1,description:"Suppress output (CI mode)",name:"silent",type:Boolean}]};var wge=Object.defineProperty,kge=p((e,t)=>wge(e,"name",{value:t,configurable:!0}),"e$4");const $ge={alias:"explain",argument:{description:"Package(s) to explain",name:"packages",type:String},description:"Show why a package is installed (dependency chain)",examples:[["vis why react","Show why react is installed"],["vis why react --json","Output as JSON"],["vis why react -r","Check across all workspaces"],["vis explain react","Alias matching npm's command"]],group:"Dependencies",loader:kge(()=>import("./handler28.js"),"loader"),name:"why",options:[{defaultValue:!1,description:"Output as JSON",name:"json",type:Boolean},{defaultValue:!1,description:"Show extended information (pnpm)",name:"long",type:Boolean},{defaultValue:!1,description:"Machine-readable output (pnpm)",name:"parseable",type:Boolean},{alias:"r",defaultValue:!1,description:"Check across all workspaces",name:"recursive",type:Boolean},{alias:"D",conflicts:"prod",description:"Filter to dev dependencies (pnpm)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Filter to production dependencies (pnpm)",name:"prod",type:Boolean},{defaultValue:!1,description:"Exclude optional dependencies (pnpm)",name:"no-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Check globally installed packages (pnpm)",name:"global",type:Boolean},{description:"Limit dependency tree depth",name:"depth",type:Number},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]};var Qge=Object.defineProperty,_m=p((e,t)=>Qge(e,"name",{value:t,configurable:!0}),"e$3");_m((e,t)=>!process.stderr.isTTY||process.env.TERM==="dumb"?e===t?t:`${e} (${lc(t)})`:mee(e,t),"link");const Dge=_m(()=>{if(process.env.VIS_VERSION)return process.env.VIS_VERSION;try{const e=new URL("../../package.json",import.meta.url);return nt(e).version}catch{return"0.0.0"}},"getVersion"),Sge=_m(()=>{process.env.VIS_VERSION=Dge()},"injectVersion"),xge=_m(e=>{!process.stdout.isTTY||Ti||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${e}\x07`)},"setTerminalTitle");var Rge=Object.defineProperty,Nge=p((e,t)=>Rge(e,"name",{value:t,configurable:!0}),"v$2");const Fge={beforeCommand:Nge(async e=>{try{const t=e.options?.cwd,r=e.options?.config;let n;if(t)n=vr(process.cwd(),t);else{const c=process.env.VIS_MONOREPO_ROOT;n=c&&c.length>0?c:px(process.cwd()).path}e.workspaceRoot=n;const i=r?vr(process.cwd(),r):void 0;let s=i??Fc(n);try{e.visConfig=await S1(n,i?{explicitConfigPath:i}:void 0);const c=e.visConfig?.versionConstraint;if(c&&!Ec.validRange(c)){e.logger.error(""),e.logger.error(CE(ls("✖ Invalid versionConstraint"))),e.logger.error(` vis.config.ts has versionConstraint ${ls(JSON.stringify(c))}, which is not a valid semver range.`),e.logger.error(""),process.exitCode=1;return}if(c&&!Ec.satisfies(Kg.version,c)){e.logger.error(""),e.logger.error(CE(ls("✖ vis version too old"))),e.logger.error(` vis.config.ts requires vis ${ls(c)}, but the current version is ${ls(Kg.version)}.`),e.logger.error(` ${fd("→")} Upgrade: ${zo("pnpm add -D @visulima/vis@latest")}`),e.logger.error(""),process.exitCode=1;return}}catch(c){const u=s,A=c instanceof Error?c.message:String(c);e.visConfigError={file:u??void 0,message:A};const f=!!process.stdout.isTTY&&!Ti;if(u&&!f){if(e.logger.error(""),e.logger.error(CE(ls(`✖ Failed to load ${u}`))),e.logger.error(` ${A}`),e.logger.error(""),A.includes("Cannot find module")){const h=/Cannot find module '([^']+)'/.exec(A)?.[1]??"unknown";e.logger.error(`${fd("→ Hint:")} The module ${ls(h)} could not be resolved.`),h.includes("@visulima/vis")?(e.logger.error(" This usually means the package isn't installed or the export path changed."),e.logger.error(` Try: ${zo("pnpm add @visulima/vis")}`),e.logger.error(` Or regenerate: ${zo("vis init --force")}`)):e.logger.error(` Try: ${zo(`pnpm add ${h}`)}`)}else A.includes("SyntaxError")||A.includes("Unexpected token")?(e.logger.error(`${fd("→ Hint:")} The config file has a syntax error.`),e.logger.error(" Check your config for typos or invalid syntax."),e.logger.error(` Or regenerate: ${zo("vis init --force")}`)):(e.logger.error(`${fd("→ Hint:")} Delete the broken config and recreate it:`),e.logger.error(` ${zo(`rm ${u} && vis init`)}`));e.logger.error(""),e.logger.error(` Continuing with default settings.
1290
+ `);for(const r of e){t.info(` • ${r.entry.title} — ${r.entry.description}`);for(const n of r.preview)t.info(` ${n}`);t.info("")}t.info("Run a specific migration with `vis migrate <name>` (e.g. `vis migrate deps`).")},"renderFallbackTable"),fpe=Uj(async e=>{const t=e.workspaceRoot??process.cwd(),r=e.visConfig??{},n=ape(t,r),i=ope(n).map(h=>({entry:h,preview:h.probe(n)}));if(!(process.stdout.isTTY&&!Ti)){dpe(i,e.logger);return}if(i.length===0){e.logger.info("No applicable migrations detected in this workspace.");return}const s=new ase(i),o=r.tui?.autoExit??!1,c=o===!0?3:typeof o=="number"?o:0,u=await $ie(su.createElement(Loe,{autoExitSeconds:c,isDryRun:!1,store:s}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit();if(!u||u.length===0){e.logger.info("No migrations selected — exiting.");return}const A=di(),f=[];for(const h of u)try{e.logger.info(`── Applying ${h.entry.title} ──`),h.entry.apply(n,A,e.logger),e.logger.info("")}catch(m){f.push({entry:h.entry,error:m}),e.logger.warn(`Failed to apply ${h.entry.title}: ${m.message}`)}upe(A,e.logger),f.length>0&&(e.logger.warn(""),e.logger.warn(`${String(f.length)} migration(s) failed — see messages above.`),process.exitCode=1)},"runMigrateInteractive");var ppe=Object.defineProperty,gpe=p((e,t)=>ppe(e,"name",{value:t,configurable:!0}),"e$h");const hpe={description:"Analyze and optimize dependencies using e18e replacements and @socketregistry overrides",examples:[["vis optimize","Interactive TUI to select and apply optimizations"],["vis optimize --dry-run","Preview available optimizations"],["vis optimize --pin","Pin Socket.dev overrides to exact versions"],["vis optimize --prod","Only optimize production dependencies"]],group:"Workspace",loader:gpe(()=>import("./handler41.js").then(e=>e.h),"loader"),name:"optimize",options:[{alias:"d",defaultValue:!1,description:"Preview available optimizations without applying",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Pin Socket.dev overrides to exact versions",name:"pin",type:Boolean},{defaultValue:!1,description:"Only optimize production dependencies",name:"prod",type:Boolean},{defaultValue:!1,description:"Skip running install after applying overrides",name:"no-install",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]};var mpe=Object.defineProperty,ype=p((e,t)=>mpe(e,"name",{value:t,configurable:!0}),"e$g");const Epe={argument:{description:"Subcommand and arguments (e.g., cache dir, publish --dry-run, list --depth 0)",name:"args",type:String},description:"Package manager utilities (cache, publish, audit, list, config, etc.)",examples:[["vis pm cache dir","Show cache directory"],["vis pm cache clean","Clean cache"],["vis pm publish --dry-run","Preview publishing"],["vis pm list --depth 0","List direct dependencies"],["vis pm audit","Run security audit"],["vis pm whoami","Show logged-in user"]],group:"System",loader:ype(()=>import("./handler18.js"),"loader"),name:"pm"};var Cpe=Object.defineProperty,Ipe=p((e,t)=>Cpe(e,"name",{value:t,configurable:!0}),"e$f");const vpe={alias:["rm","un","uninstall"],argument:{description:"Packages to remove",name:"packages",type:String},description:"Remove packages using the detected package manager",examples:[["vis remove lodash","Remove a package"],["vis rm old-package","Remove using alias"],["vis remove --filter app react","Remove from specific workspace"],["vis remove -g typescript","Remove global package"]],group:"Dependencies",loader:Ipe(()=>import("./handler19.js"),"loader"),name:"remove",options:[{alias:"D",defaultValue:!1,description:"Remove from devDependencies",name:"save-dev",type:Boolean},{alias:"g",defaultValue:!1,description:"Remove global package",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Remove from all workspace packages",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Remove from workspace root",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]},Bpe={description:"Replay a previous task run from .vis/runs/ — show task results without re-executing",examples:[["vis replay","Show the most recent run summary"],["vis replay --run 2026-04-28T12-34-56_ab12","Inspect a specific historical run"],["vis replay --list","List every recorded run, newest first"],["vis replay --task @myorg/app:build","Focus on one task within the loaded run"],["vis replay --failed","Filter to only failed tasks"],["vis replay --format=json","Machine-readable output for CI"]],group:"Workspace",loader:it(()=>import("./handler20.js"),"replayExecute"),name:"replay",options:[{description:"Run id to replay (defaults to the most recent run)",name:"run",type:String},{defaultValue:!1,description:"List every available run instead of replaying one",name:"list",type:Boolean},{description:"Filter the replay to a single task id (e.g. @my/app:build)",name:"task",type:String},{defaultValue:!1,description:"Filter the replay to failed tasks only",name:"failed",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]};var bpe=Object.defineProperty,wpe=p((e,t)=>bpe(e,"name",{value:t,configurable:!0}),"e$e");const kpe={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target across workspace projects",examples:[["vis run","List all available targets"],["vis run build","Run build on all projects"],["vis run :build","Run build on all projects (moon-style)"],["vis run ~:test","Run test on the project closest to the current directory"],['vis run "#frontend:build"',"Run build on projects tagged 'frontend'"],['vis run :build --query "language=typescript"',"Filter by project metadata"],["vis run test --affected","Run test only on git-changed projects"],["vis run build --fail-fast","Stop on first failure"],["vis run build --dry-run","Show execution plan without running"],["vis run destroy --reverse","Run leaves-first (teardown order, e.g. CDK/Pulumi destroy)"]],group:"Run & Execute",loader:wpe(()=>import("./handler51.js"),"loader"),name:"run",options:[{alias:"p",description:"Comma-separated list of projects to run",name:"projects",type:String},{defaultValue:!1,description:"Skip the toolchain pre-flight (no auto-install for any pinned tool: node / pnpm / yarn / npm / bun / deno / go / python / ruby / rust)",name:"skip-toolchain",type:Boolean},{description:"Detect lockfile/node_modules drift before running (warns in TTY, fails in CI). Use --no-preflight to disable.",name:"preflight",type:Boolean},{defaultValue:3,description:"Maximum number of parallel tasks (falls back to VIS_RUN_CONCURRENCY_LIMIT env var, then 3)",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{description:"Comma-separated selectors of tasks to bypass cache for (e.g. 'app:test', ':e2e', '#flaky:lint'). Other tasks in the run still cache normally. --no-cache wins when both are set.",name:"skip-cache",type:String},{description:"Custom cache directory",name:"cache-dir",type:String},{description:"Remote cache mode: read | write | readwrite (defaults to readwrite when remoteCache is configured)",name:"cache-mode",type:String},{description:"Remote cache wire backend: http (Turborepo-compatible) or reapi (Bazel Remote Execution API gRPC)",name:"cache-backend",type:String},{description:"Override how the requested target is hashed for this run: declared (hash listed inputs) or trace (hash the files the task actually reads). Overrides per-target hashMode config for the directly-run target.",name:"hash-mode",type:String},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Generate a run summary after execution",name:"summarize",type:Boolean},{description:'Partition tasks for distributed CI (e.g., "1/4" for first of four runners). Falls back to VIS_PARTITION env var.',name:"partition",type:String},{defaultValue:!1,description:"Skip project constraint validation",name:"skip-constraints",type:Boolean},{description:"Filter matched projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{defaultValue:!1,description:"Only run on projects affected by git changes (shorthand for vis affected)",name:"affected",type:Boolean},{defaultValue:!1,description:"Rerun affected tasks on file change. Ctrl+C to exit.",name:"watch",type:Boolean},{defaultValue:!1,description:"Stop all tasks on first failure",name:"fail-fast",type:Boolean},{defaultValue:!1,description:"Run the dependency graph in reverse (leaves first, then their dependents). Useful for teardown targets like `destroy`/`undeploy` where dependents must run before the things they depend on.",name:"reverse",type:Boolean},{description:"Output mode: interleaved (pass-through), labeled (prefix each line with [pkg#task]), or grouped (vite-task-style block)",name:"log",type:String},{description:"Output style: normal (print every task) or quiet (skip output for successful/cached tasks; failed tasks still print in CI mode, and remain in TUI scrollback in interactive mode). Per-target options.outputStyle overrides this.",name:"output-style",type:String},{defaultValue:!1,description:"Run every task through a pseudo-terminal so color-aware tools render as if attached to a TTY (disables caching)",name:"pty",type:Boolean},{description:"Global retry budget: cap on total task retries across the run (per-target retryCount is still honored up to the budget)",name:"retry-budget",type:Number},{description:"Write a Chrome Tracing JSON profile of the run to this path (open in chrome://tracing or Perfetto)",name:"profile",type:String},{defaultValue:!1,description:"Render the most-recent run's saved summary (from .vis/last-summary.json) and exit without executing any tasks",name:"last-details",type:Boolean},{defaultValue:!0,description:"Show flaky task report on failure (use --no-flaky to suppress)",name:"flaky",type:Boolean},{defaultValue:!1,description:"Treat any task that needed at least one retry as a run failure (exit non-zero), even when retries eventually succeeded. Use in CI to surface flakes that retries would otherwise mask.",name:"fail-on-retry",type:Boolean},{description:"Fail a task if its command references an env var that is unset (no silent empty-string substitution). Use --no-strict-env to disable when set in config.",name:"strict-env",type:Boolean},{description:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Tasks declaring `options.runnerTags` only run when at least one tag overlaps. Untagged tasks always run. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String},{description:"Auto-start service deps. One of: auto | ephemeral | persistent | off. Defaults to `auto` in TTY, `off` in CI.",name:"services",type:String},{defaultValue:!1,description:"Stop services this run auto-started in registry mode when the run exits (clean, q, or Ctrl+C). Ephemeral services already die with the run.",name:"stop-services",type:Boolean}]};var $pe=Object.defineProperty,Qpe=p((e,t)=>$pe(e,"name",{value:t,configurable:!0}),"e$d");const Dpe={description:"Generate a CycloneDX 1.7 Software Bill of Materials for the workspace",examples:[["vis sbom","Write the full-workspace SBOM to sbom.cdx.json"],["vis sbom --focus=my-app","Scope the SBOM to my-app's transitive closure"],["vis sbom --focus=my-app,other","Focus multiple projects"],["vis sbom --format=xml --output=sbom.cdx.xml","Emit XML instead of JSON"],["vis sbom --include-dev","Include devDependencies (default: production only)"],["vis sbom --output=-","Write to stdout"]],group:"Security & Health",loader:Qpe(()=>import("./handler21.js"),"loader"),name:"sbom",options:[{description:"Project name(s) to focus on — comma-separated for multiple",name:"focus",type:String},{defaultValue:"json",description:"Output format: json (default) or xml",name:"format",type:String},{description:"Output path (use '-' for stdout; default: sbom.cdx.json)",name:"output",type:String},{defaultValue:!1,description:"Include devDependencies (default: production only)",name:"include-dev",type:Boolean}]};var Spe=Object.defineProperty,xpe=p((e,t)=>Spe(e,"name",{value:t,configurable:!0}),"e$c");const Rpe={argument:{description:"One or more paths to scan (defaults to workspace root)",name:"paths",type:String},description:"Scan a repository for hardcoded secrets and credentials",examples:[["vis secrets","Scan the workspace with grouped, colourised output"],["vis secrets --staged","Scan only files staged for the current commit (pre-commit hooks)"],["vis secrets --since main","Scan only files changed since the `main` branch"],["vis secrets --affected","Scan only projects affected by the current branch"],["vis secrets --init","Write an initial baseline from current findings"],["vis secrets --list-rules","Print all bundled detection rules"],["vis secrets --list-validators","Print non-HTTP validator types in the ruleset + install hints for each"],["vis secrets --exclude-rule generic-api-key --exclude-rule aws-access-token","Drop noisy rules"],["vis secrets --include-rule stripe-access-token","Check a single rule"],["vis secrets --enable-rule tag:preset:weak-passwords","Enable an opt-in rule group additively (defaults still fire)"],["vis secrets --include-rule tag:preset:password-manager","Restrict output to one opt-in group only"],["vis secrets --min-confidence high","Drop rules without a high confidence label (CI-friendly precision filter)"],["vis secrets --validate --only-verified","Live-verify each finding against its provider (one HTTP call per finding)"],["vis secrets --exclude 'dist/**' --exclude-from .secretsignore","Extra gitignore-syntax exclusions for the walker"],["vis secrets --config ./leaks.json --no-extend-bundled","Use only the supplied config, skip the bundled ruleset"],["vis secrets --concurrency 4","Cap the rayon thread pool (0 / omit = auto)"],["vis secrets --baseline .secrets-baseline.json","Suppress known findings; print diff vs. baseline"],["vis secrets --update-baseline","Merge current findings into the baseline (use --replace-baseline to overwrite)"],["vis secrets --format sarif > report.sarif","SARIF output for GitHub code-scanning"]],group:"Security",loader:xpe(()=>import("./handler52.js"),"loader"),name:"secrets",options:[{description:"Path to a JSON config (gitleaks-compatible shape). Defaults to the bundled ruleset.",name:"config",type:String},{description:"Drop rules below this author-declared confidence: low (default), medium, high. Rules without a declared confidence (every gitleaks rule) are treated as low, so --min-confidence medium or higher drops them along with explicit low-confidence rules.",name:"min-confidence",type:String},{defaultValue:!1,description:"Live-verify each finding against its provider (one HTTP call per finding, max 8 concurrent). Only supports Kingfisher-style HTTP validators with StatusMatch / WordMatch response matchers; other types (gRPC, multi-step, checksum) mark the finding as validation=skipped. WARNING: sends candidate secrets to the provider — some providers alert their security team on failed auth attempts.",name:"validate",type:Boolean},{defaultValue:!1,description:"With --validate, drop every finding whose validation is not 'verified'. Useful for CI gating.",name:"only-verified",type:Boolean},{defaultValue:!1,description:"With --config, do not merge on top of the bundled ruleset — replace it.",name:"no-extend-bundled",type:Boolean},{defaultValue:"text",description:"Output format: text (default), json, sarif",name:"format",type:String},{description:"Path to a baseline JSON of previously-triaged findings",name:"baseline",type:String},{defaultValue:!1,description:"Scan only files staged for commit",name:"staged",type:Boolean},{description:"Scan only files changed since <ref> (e.g. main, origin/HEAD)",name:"since",type:String},{defaultValue:!1,description:"Scan only projects affected by the current branch",name:"affected",type:Boolean},{description:"Enable an opt-in rule or tag without restricting output — additive (e.g. tag:preset:weak-passwords, tag:preset:password-manager). Repeatable.",multiple:!0,name:"enable-rule",type:String},{description:"Rule id or tag:<name> selector — whitelist, only matching findings are emitted. Implies enablement. Repeatable.",multiple:!0,name:"include-rule",type:String},{description:"Rule id or tag:<name> selector — drop matching findings. Repeatable.",multiple:!0,name:"exclude-rule",type:String},{description:"Gitignore-syntax pattern to exclude from the walk (repeatable)",multiple:!0,name:"exclude",type:String},{description:"Path to a gitignore-shaped file the walker should honor (repeatable)",multiple:!0,name:"exclude-from",type:String},{defaultValue:!1,description:"Mask secret values in output",name:"redact",type:Boolean},{defaultValue:!1,description:"Scan dotfiles",name:"include-hidden",type:Boolean},{defaultValue:!1,description:"Do not respect .gitignore",name:"no-gitignore",type:Boolean},{description:"Skip files larger than this (bytes). Default: 10 MiB",name:"max-size",type:Number},{description:"Rayon worker threads (0 / omit = auto)",name:"concurrency",type:Number},{defaultValue:!1,description:"Merge current findings into the baseline and exit 0",name:"update-baseline",type:Boolean},{defaultValue:!1,description:"With --update-baseline, replace rather than merge",name:"replace-baseline",type:Boolean},{defaultValue:!1,description:"Scaffold a baseline from current findings",name:"init",type:Boolean},{defaultValue:!1,description:"With --init, preview the baseline without writing files",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Print all bundled detection rules and exit",name:"list-rules",type:Boolean},{defaultValue:!1,description:"Print non-HTTP validator types referenced by the current ruleset, with install hints for their optional peer dependencies.",name:"list-validators",type:Boolean},{defaultValue:!1,description:"Suppress all progress output (only emit findings)",name:"quiet",type:Boolean},{defaultValue:!1,description:"Print diagnostic info (skipped rules, etc.)",name:"verbose",type:Boolean}]};var Npe=Object.defineProperty,cA=p((e,t)=>Npe(e,"name",{value:t,configurable:!0}),"e$b");const Fpe={commandPath:["security"],description:"List build-script status — allowed, unapproved, and stale allowlist entries",examples:[["vis security list","Show the full build-script triage report"],["vis security list --json","Emit the report as JSON for tooling"]],group:"Security & Health",loader:cA(()=>import("./list.js"),"loader"),name:"list",options:[{defaultValue:!1,description:"Emit the report as JSON instead of human-readable text",name:"json",type:Boolean}]},Ope={commandPath:["security"],description:"Push vis.config security settings to the package manager's native config",examples:[["vis security sync","Sync allowBuilds + minimumReleaseAge to the PM-native config files"],["vis security sync --skip-allow-builds","Sync only the minimumReleaseAge knobs"],["vis security sync --skip-min-release-age","Sync only allowBuilds (trustedDependencies / onlyBuiltDependencies)"]],group:"Security & Health",loader:cA(()=>import("./sync2.js"),"loader"),name:"sync",options:[{defaultValue:!1,description:"Skip syncing allowBuilds (trustedDependencies, onlyBuiltDependencies)",name:"skip-allow-builds",type:Boolean},{defaultValue:!1,description:"Skip syncing minimumReleaseAge and its excludes",name:"skip-min-release-age",type:Boolean}]},jpe={commandPath:["security"],description:"Run lifecycle scripts for packages in security.policies.installScripts.allow (LavaMoat 'run' parity)",examples:[["vis security run","Run preinstall/install/postinstall for every approved package"],["vis security run --with-root","Also run the workspace root's prepublish + prepare hooks"],["vis security run --root-only","Run only the workspace root's prepublish + prepare hooks"]],group:"Security & Health",loader:cA(()=>import("./run.js"),"loader"),name:"run",options:[{defaultValue:!1,description:"Also run the workspace root's prepublish + prepare hooks after dependencies",name:"with-root",type:Boolean},{defaultValue:!1,description:"Skip dependency scripts and only run the workspace root's prepublish + prepare hooks",name:"root-only",type:Boolean}]},Lpe={commandPath:["security"],description:"Install @lavamoat/preinstall-always-fail as a devDep so a missing ignore-scripts setting fails loudly",examples:[["vis security tripwire","Install the tripwire devDependency"],["vis security tripwire --status","Report whether the tripwire is installed"],["vis security tripwire --remove","Remove the tripwire from package.json"]],group:"Security & Health",loader:cA(()=>import("./tripwire.js"),"loader"),name:"tripwire",options:[{defaultValue:!1,description:"Report whether @lavamoat/preinstall-always-fail is installed",name:"status",type:Boolean},{defaultValue:!1,description:"Remove @lavamoat/preinstall-always-fail from package.json",name:"remove",type:Boolean}]},Ppe={commandPath:["security"],description:"Force-refresh the cached npm signing keys used by the signatures marshall",examples:[["vis security keys-refresh","Drop the disk cache and fetch a fresh key set from registry.npmjs.org"],["vis security keys-refresh --clear","Only drop the cache, do not refetch"],["vis security keys-refresh --json","Emit the refresh result as JSON for tooling"]],group:"Security & Health",loader:cA(()=>import("./keys-refresh.js"),"loader"),name:"keys-refresh",options:[{defaultValue:!1,description:"Only clear the cache, do not refetch",name:"clear",type:Boolean},{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean}]},Tpe={commandPath:["security"],description:"Verify the entire lockfile closure against supply-chain policies (firstSeen, publisherChange, blockExoticSubdeps)",examples:[["vis security verify-lockfile","Re-validate every locked entry; exit non-zero on a policy violation"],["vis security verify-lockfile --offline","Verify without network (skips firstSeen / publisherChange)"],["vis security verify-lockfile --json","Emit the verification result as JSON for CI"]],group:"Security & Health",loader:cA(()=>import("./verify-lockfile.js"),"loader"),name:"verify-lockfile",options:[{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean},{defaultValue:!1,description:"Skip network-bound policies (firstSeen, publisherChange)",name:"offline",type:Boolean}]},Mpe=[Fpe,Ope,jpe,Lpe,Ppe,Tpe],Mm={description:"Target id, e.g. @my/api:db",name:"targetId",type:String},_pe={description:"Output format: table or json (default: table)",name:"format",type:String},Gpe={argument:Mm,commandPath:["service"],description:"Start a service target detached so it survives across `vis run` invocations",examples:[["vis service start @my/api:db","Boot the db target as a long-lived service"],["vis service start @my/api:db --timeout=60000","Override readiness timeout"],["vis service start @my/api:db --no-readiness","Skip the readiness probe"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceStartExecute"),name:"start",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{defaultValue:!1,description:"Skip the readiness probe",name:"no-readiness",type:Boolean}]},Hpe={argument:{description:"Target id to stop, or omit when using --all",name:"targetId",required:!1,type:String},commandPath:["service"],description:"Stop a running service",examples:[["vis service stop @my/api:db","Stop the db service"],["vis service stop --all","Stop every running service in this workspace"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceStopExecute"),name:"stop",options:[{defaultValue:!1,description:"Stop every service registered for this workspace",name:"all",type:Boolean},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number}]},Upe={commandPath:["service"],description:"List services registered for this workspace",examples:[["vis service list","Print running services"],["vis service list --format=json","Machine-readable list"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceListExecute"),name:"list",options:[_pe]},Wpe={argument:Mm,commandPath:["service"],description:"Re-run the readiness probe and report a service's health",examples:[["vis service status @my/api:db","Check whether the db service is reachable"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceStatusExecute"),name:"status",options:[{description:"Probe timeout in milliseconds",name:"timeout",type:Number}]},Jpe={argument:Mm,commandPath:["service"],description:"Stop and re-start a running service",examples:[["vis service restart @my/api:db","Recycle the db service"],["vis service restart @my/api:db --no-readiness","Recycle and skip the readiness probe"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceRestartExecute"),name:"restart",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number},{defaultValue:!1,description:"Skip the readiness probe after restart",name:"no-readiness",type:Boolean}]},Kpe={argument:Mm,commandPath:["service"],description:"Print or tail a service's captured stdout/stderr",examples:[["vis service logs @my/api:db","Print the captured log"],["vis service logs @my/api:db -f","Tail the log (Ctrl-C to exit)"]],group:"Workspace",loader:it(()=>import("./handler22.js"),"serviceLogsExecute"),name:"logs",options:[{alias:"f",defaultValue:!1,description:"Follow the log file (like `tail -f`)",name:"follow",type:Boolean}]},Vpe=[Gpe,Hpe,Upe,Wpe,Jpe,Kpe];var zpe=Object.defineProperty,qpe=p((e,t)=>zpe(e,"name",{value:t,configurable:!0}),"e$a");const Ype={description:"Sort package.json files across the workspace using the sort-package-json Rust crate",examples:[["vis sort-package-json","Sort all package.json files in the workspace"],["vis sort-package-json --check","Check if files are already sorted (exit 1 if not)"],["vis sort-package-json --sort-scripts","Also sort the scripts field alphabetically"],["vis sort-package-json --indent 4","Force 4-space indentation (overrides per-file detection)"],["vis sort-package-json --indent tab","Force tab indentation"],["vis sort-package-json --ignore '**/fixtures/**'","Skip files matching one or more glob patterns"],["vis sort-package-json --sort-order name,version,license","Pin a custom prefix order before the default field order"],["vis sort-package-json --unsorted dependencies,devDependencies","Preserve original key order for the listed top-level sections"],["vis sort-package-json --no-final-newline","Do not append a trailing newline"],["vis sort-package-json --line-ending crlf","Force CRLF line endings (default: auto-detect per file)"]],group:"Workspace",loader:qpe(()=>import("./handler40.js"),"loader"),name:"sort-package-json",options:[{alias:"c",defaultValue:!1,description:"Check if package.json files are sorted without writing (exits 1 if unsorted)",name:"check",type:Boolean},{defaultValue:!1,description:"Also sort the scripts field alphabetically",name:"sort-scripts",type:Boolean},{description:"Indent override: a number of spaces, the literal `tab`, or a literal whitespace string. When unset, the original file's indent is preserved.",name:"indent",type:String},{description:"Glob pattern of files to skip (basename match, or path-relative when the pattern contains `/`). Repeatable.",multiple:!0,name:"ignore",type:String},{description:"Comma-separated list of top-level keys to place first, before the default field order. Repeatable.",multiple:!0,name:"sort-order",type:String},{description:"Comma-separated list of top-level sections whose key order should be preserved (e.g. dependencies,devDependencies). Repeatable.",multiple:!0,name:"unsorted",type:String},{defaultValue:!1,description:"Do not append a trailing newline to the output (default: append one).",name:"no-final-newline",type:Boolean},{defaultValue:"auto",description:"Line ending to write: auto (per-file detection, default), lf, or crlf.",name:"line-ending",type:String},{description:"Disable collapsing `bugs: { url }` to the bare string form (default: enabled).",name:"no-format-bugs",type:Boolean},{description:"Disable collapsing `repository: { type, url }` to the GitHub `owner/repo` shorthand (default: enabled).",name:"no-format-repository",type:Boolean},{description:"Disable canonical sorting of `exports` condition keys (default: enabled).",name:"no-sort-exports",type:Boolean},{description:"Disable .editorconfig discovery for indent / line-ending defaults (default: enabled).",name:"no-editorconfig",type:Boolean}]};var Xpe=Object.defineProperty,Zpe=p((e,t)=>Xpe(e,"name",{value:t,configurable:!0}),"e$9");const ege={description:"Run linters on staged files using config from vis.config.ts",examples:[["vis staged","Run staged linters"],["vis staged --verbose","Run with verbose output"],["vis staged --no-stash","Run without backup stash"],["vis staged --diff HEAD~1","Run against a specific diff"]],group:"Run & Execute",loader:Zpe(()=>import("./handler50.js"),"loader"),name:"staged",options:[{defaultValue:!1,description:"Allow empty commits when tasks revert all staged changes",name:"allow-empty",type:Boolean},{defaultValue:!1,description:"Automatically stage new files that tasks create during the run",name:"auto-stage",type:Boolean},{description:"Number of concurrent tasks or false for serial",name:"concurrent",type:String},{defaultValue:!1,description:"Run all tasks to completion even if one fails",name:"continue-on-error",type:Boolean},{description:"Working directory to run all tasks in",name:"cwd",type:String},{defaultValue:!1,description:"Enable debug output",name:"debug",type:Boolean},{description:"Override the default --staged flag of git diff",name:"diff",type:String},{description:"Override the default diff-filter",name:"diff-filter",type:String},{defaultValue:!1,description:"Fail with exit code 1 when tasks modify tracked files",name:"fail-on-changes",type:Boolean},{defaultValue:!1,description:"Kill in-flight tasks with SIGKILL on fast-fail instead of the default SIGTERM",name:"force-kill",type:Boolean},{defaultValue:!1,description:"Hide unstaged changes from partially staged files",name:"hide-partially-staged",type:Boolean},{defaultValue:!1,description:"Hide all unstaged changes before running tasks",name:"hide-unstaged",type:Boolean},{defaultValue:!1,description:"Suppress console output",name:"quiet",type:Boolean},{defaultValue:!1,description:"Pass filepaths relative to cwd to tasks",name:"relative",type:Boolean},{defaultValue:!1,description:"Revert to original state in case of errors",name:"revert",type:Boolean},{defaultValue:!0,description:"Enable backup stash",name:"stash",type:Boolean},{defaultValue:!1,description:"Show task output even when tasks succeed",name:"verbose",type:Boolean}]};var tge=Object.defineProperty,rge=p((e,t)=>tge(e,"name",{value:t,configurable:!0}),"t$8");const nge={description:"Show a workspace health dashboard at a glance",examples:[["vis status","Full status overview"],["vis status --json","Machine-readable output"]],group:"Workspace",loader:rge(()=>import("./handler23.js"),"loader"),name:"status",options:[{defaultValue:!1,description:"Emit JSON output",name:"json",type:Boolean}]};var ige=Object.defineProperty,sge=p((e,t)=>ige(e,"name",{value:t,configurable:!0}),"e$8");const oge={argument:{description:"What to sync: codeowners | package-json-fields",name:"kind",type:String},description:"Synchronise derived workspace artefacts (codeowners, package.json fields, tsconfig refs, …)",examples:[["vis sync codeowners","Generate CODEOWNERS at the repository root"],["vis sync codeowners --out=.github/CODEOWNERS","Write to .github/CODEOWNERS instead"],["vis sync codeowners --check","Fail if the existing file is stale"],["vis sync codeowners --from=project-json,nested-codeowners","Also aggregate nested CODEOWNERS files in the tree"],["vis sync codeowners --regeneration-command='pnpm codeowners'","Set a custom header instruction"],["vis sync codeowners --preserve-block","Splice the generated block between markers in an existing CODEOWNERS"],["vis sync codeowners --write-guard","Also emit GitHub + GitLab Write Guard CI for restricted projects"],["vis sync package-json-fields","Mirror license/author/repository/bugs/homepage/engines from root to every workspace package"],["vis sync package-json-fields --check","Fail if any workspace package.json is out of sync"],["vis sync package-json-fields --fields license,engines","Override the default field list for this run"]],group:"Workspace",loader:sge(()=>import("./handler38.js"),"loader"),name:"sync",options:[{description:"Output path for the generated file (default: <workspace>/CODEOWNERS) — codeowners kind only",name:"out",type:String},{defaultValue:!1,description:"Verify state without writing (exit non-zero if drift is found)",name:"check",type:Boolean},{description:"Input sources for codeowners. Comma-separated or repeated. Values: project-json | nested-codeowners | package-json-maintainers. Defaults to project-json.",multiple:!0,name:"from",type:String},{description:"Glob (repeatable) used to discover nested CODEOWNERS files. Defaults to `**/CODEOWNERS`.",multiple:!0,name:"nested-includes",type:String},{description:"Header instruction shown to reviewers (replaces the default 'update project.json' note). Codeowners kind only.",name:"regeneration-command",type:String},{defaultValue:!1,description:"Splice the generated block between markers in the existing file instead of overwriting it. Codeowners kind only.",name:"preserve-block",type:Boolean},{defaultValue:!1,description:"Also emit a .github/workflows/write-guard.yml scoped to projects with `restricted: true` in project.json. Codeowners kind only.",name:"write-guard",type:Boolean},{description:"Comma-separated list of fields to mirror from root → workspace packages (package-json-fields kind only). Repeatable.",multiple:!0,name:"fields",type:String},{description:"Glob pattern of package names to skip (package-json-fields kind only). Repeatable.",multiple:!0,name:"ignore-package-name",type:String},{defaultValue:"human",description:"Output format for package-json-fields: human | json",name:"format",type:String},{defaultValue:!1,description:"Suppress per-package log lines; print only the summary (package-json-fields kind only)",name:"quiet",type:Boolean}]};var age=Object.defineProperty,cge=p((e,t)=>age(e,"name",{value:t,configurable:!0}),"t$6");const lge={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},description:"Explain why a task is included in the graph by walking its dependency chain to a root",examples:[["vis task-why @myorg/app:build","Show what pulls build in"],["vis task-why lib-a:test","Check the test task's triggers"]],group:"Workspace",loader:cge(()=>import("./handler24.js"),"loader"),name:"task-why"},_f="Workspace",uge={commandPath:["toolchain"],description:"Show every detected manager + expected vs actual tool versions",examples:[["vis toolchain status","Show every detected manager + expected vs actual tool versions"],["vis toolchain status --json","Emit the status as JSON"],["vis toolchain status --exit-code","Exit 1 if any tool mismatches (for CI)"]],group:_f,loader:it(()=>import("./handler25.js"),"statusExecute"),name:"status",options:[{defaultValue:!1,description:"Exit 1 if any tool mismatches",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Emit JSON",name:"json",type:Boolean}]},Age={commandPath:["toolchain"],description:"Print the primary manager's name (for scripts)",examples:[["vis toolchain detect","Print the primary manager's name"]],group:_f,loader:it(()=>import("./handler25.js"),"detectExecute"),name:"detect"},dge={commandPath:["toolchain"],description:"Install pinned versions — per-tool delegation to the right manager",examples:[["vis toolchain install","Install pinned versions"],["vis toolchain install --dry-run","Print the commands that would run, but don't execute"]],group:_f,loader:it(()=>import("./handler25.js"),"installExecute"),name:"install",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean}]},fge={argument:{description:"Tool and version to pin, e.g. node@22.13.0 or pnpm@10.32.1",name:"spec",type:String},commandPath:["toolchain"],description:"Pin a version via the best manager for that tool",examples:[["vis toolchain use node@22.13.0","Pin node 22.13.0 via the best runtime manager"],["vis toolchain use pnpm@10.32.1","Update the packageManager field; pnpm self-activates"],["vis toolchain use node@22.13.0 --dry-run","Print the command without running it"]],group:_f,loader:it(()=>import("./handler25.js"),"useExecute"),name:"use",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean},{defaultValue:!0,description:"Also mirror the version into engines.<tool> when that field already exists. --no-engines to skip.",name:"engines",type:Boolean}]},pge={argument:{description:"Tool to resolve, e.g. node",name:"tool",type:String},commandPath:["toolchain"],description:"Print the resolved binary path a manager would launch for a tool",examples:[["vis toolchain which node","Resolve the node binary the manager would launch"]],group:_f,loader:it(()=>import("./handler25.js"),"whichExecute"),name:"which"},gge=[uge,Age,dge,fge,pge];var hge=Object.defineProperty,mge=p((e,t)=>hge(e,"name",{value:t,configurable:!0}),"e$7");const yge={argument:{description:"Packages to unlink (omit for current package)",name:"packages",type:String},description:"Unlink a previously linked package",examples:[["vis unlink","Unlink current package"],["vis unlink react","Unlink specific package"],["vis unlink -r","Unlink in all workspace packages"]],group:"Dependencies",loader:mge(()=>import("./handler26.js"),"loader"),name:"unlink",options:[{alias:"r",defaultValue:!1,description:"Unlink in all workspace packages",name:"recursive",type:Boolean}]};var Ege=Object.defineProperty,Cge=p((e,t)=>Ege(e,"name",{value:t,configurable:!0}),"e$6");const Ige={alias:"up",argument:{description:"Packages to update (updates all if omitted)",name:"packages",type:String},description:"Update packages to their latest versions",examples:[["vis update react","Update react within semver range"],["vis up react -L","Update react to latest"],["vis update -i","Interactive mode"],["vis update --filter app","Update in specific workspace"],["vis update -r","Update in all workspaces"],["vis update --target minor","Only apply minor/patch updates (catalog mode)"],["vis update --dry-run","Preview changes without applying"],["vis update --exclude '@types/*'","Exclude packages by pattern"],["vis update --changelog","Show changelog links after updating"],["vis update --rollback","Restore catalog from last backup"],["vis update --ai","Run AI analysis before applying updates"]],group:"Dependencies",loader:Cge(()=>import("./handler48.js"),"loader"),name:"update",options:[{alias:"L",conflicts:"target",description:"Update to latest version (ignore semver range; equivalent to --target latest)",name:"latest",type:Boolean},{alias:"t",conflicts:"latest",description:"Update target: latest, minor, or patch (default: latest, catalog mode)",name:"target",type:String},{alias:"d",defaultValue:!1,description:"Preview changes without applying",name:"dry-run",type:Boolean},{alias:"g",defaultValue:!1,description:"Update global packages",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Update recursively in all workspace packages",name:"recursive",type:Boolean},{description:"Filter packages in monorepo (pm-wrapper mode; catalog mode uses --include/--exclude)",name:"filter",type:String},{alias:"w",defaultValue:!1,description:"Include workspace root",name:"workspace-root",type:Boolean},{alias:"D",conflicts:"prod",description:"Update only devDependencies",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Update only dependencies",name:"prod",type:Boolean},{alias:"i",defaultValue:!1,description:"Interactive mode",name:"interactive",type:Boolean},{defaultValue:!1,description:"Don't update optionalDependencies",name:"no-optional",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in update checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry (catalog mode)",name:"include-internal",type:Boolean},{alias:"l",defaultValue:!1,description:"Include packages with pinned/exact versions (no ^ or ~ prefix; catalog mode)",name:"include-locked",type:Boolean},{defaultValue:!1,description:"Update lockfile only",name:"no-save",type:Boolean},{description:"Glob pattern to include packages (repeatable, catalog mode)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable, catalog mode)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions (catalog mode)",name:"prerelease",type:Boolean},{description:"Check for known security vulnerabilities via OSV.dev (default: true; --no-security to skip)",name:"security",type:Boolean},{defaultValue:!1,description:"Skip catalog mode, use package manager directly",name:"no-catalog",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Show changelog URLs for updated packages",name:"changelog",type:Boolean},{description:"Run install after catalog update, --no-install to skip (default: true)",name:"install",type:Boolean},{defaultValue:!1,description:"Restore catalog file from the last backup",name:"rollback",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages before updating (catalog mode)",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Skip typosquat name check for package arguments",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip the offline marshall pipeline (author, provenance, metadata, downloads, expired-domains, new-bin, signatures, archived-repo) when explicit package arguments are supplied",name:"no-marshall-check",type:Boolean},{description:"Cap concurrent registry requests during outdated checks (default: 8)",name:"max-concurrent-requests",type:Number},{description:"Release channel filter: stable (default), same (match current's prerelease channel), or any",name:"release-channel",type:String},{alias:"y",defaultValue:!1,description:"Skip the confirmation prompt for blanket --latest updates. Required in non-TTY contexts (CI) when running `vis update --latest` without explicit package arguments.",name:"yes",type:Boolean},{defaultValue:!1,description:"Skip the GitHub Actions ecosystem scan (workflows + composite action.yml files)",name:"no-actions",type:Boolean},{defaultValue:!1,description:"Skip the Docker ecosystem scan (Dockerfile + docker-compose images)",name:"no-docker",type:Boolean},{defaultValue:!1,description:"Skip the GitLab CI ecosystem scan (.gitlab-ci.yml + .gitlab/ci/**)",name:"no-gitlab",type:Boolean},{defaultValue:!1,description:"Include branch references (e.g. actions/checkout@main) when scanning workflows",name:"include-branches",type:Boolean},{description:"Reference style for GitHub Actions updates: sha (default, pin to commit SHA + version comment) or preserve",name:"style",type:String},{description:"GitHub token for actions resolution (overrides GITHUB_TOKEN / GH_TOKEN env)",name:"actions-token",type:String},{description:"GitLab token for include-ref resolution (overrides GITLAB_TOKEN / CI_JOB_TOKEN env)",name:"gitlab-token",type:String}]};var vge=Object.defineProperty,Bge=p((e,t)=>vge(e,"name",{value:t,configurable:!0}),"e$5");const bge={argument:{description:"Target version (defaults to latest)",name:"version",type:String},description:"Update vis itself to the latest version",examples:[["vis self-update","Update to latest"],["vis self-update 2.0.0","Install specific version"],["vis self-update --check","Check for updates without installing"]],group:"System",loader:Bge(()=>import("./handler27.js"),"loader"),name:"self-update",options:[{defaultValue:!1,description:"Check for updates without installing",name:"check",type:Boolean},{defaultValue:!1,description:"Reinstall even if already current",name:"force",type:Boolean},{defaultValue:!1,description:"Suppress output (CI mode)",name:"silent",type:Boolean}]};var wge=Object.defineProperty,kge=p((e,t)=>wge(e,"name",{value:t,configurable:!0}),"e$4");const $ge={alias:"explain",argument:{description:"Package(s) to explain",name:"packages",type:String},description:"Show why a package is installed (dependency chain)",examples:[["vis why react","Show why react is installed"],["vis why react --json","Output as JSON"],["vis why react -r","Check across all workspaces"],["vis explain react","Alias matching npm's command"]],group:"Dependencies",loader:kge(()=>import("./handler28.js"),"loader"),name:"why",options:[{defaultValue:!1,description:"Output as JSON",name:"json",type:Boolean},{defaultValue:!1,description:"Show extended information (pnpm)",name:"long",type:Boolean},{defaultValue:!1,description:"Machine-readable output (pnpm)",name:"parseable",type:Boolean},{alias:"r",defaultValue:!1,description:"Check across all workspaces",name:"recursive",type:Boolean},{alias:"D",conflicts:"prod",description:"Filter to dev dependencies (pnpm)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Filter to production dependencies (pnpm)",name:"prod",type:Boolean},{defaultValue:!1,description:"Exclude optional dependencies (pnpm)",name:"no-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Check globally installed packages (pnpm)",name:"global",type:Boolean},{description:"Limit dependency tree depth",name:"depth",type:Number},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]};var Qge=Object.defineProperty,_m=p((e,t)=>Qge(e,"name",{value:t,configurable:!0}),"e$3");_m((e,t)=>!process.stderr.isTTY||process.env.TERM==="dumb"?e===t?t:`${e} (${lc(t)})`:mee(e,t),"link");const Dge=_m(()=>{if(process.env.VIS_VERSION)return process.env.VIS_VERSION;try{const e=new URL("../../package.json",import.meta.url);return nt(e).version}catch{return"0.0.0"}},"getVersion"),Sge=_m(()=>{process.env.VIS_VERSION=Dge()},"injectVersion"),xge=_m(e=>{!process.stdout.isTTY||Ti||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${e}\x07`)},"setTerminalTitle");var Rge=Object.defineProperty,Nge=p((e,t)=>Rge(e,"name",{value:t,configurable:!0}),"v$2");const Fge={beforeCommand:Nge(async e=>{try{const t=e.options?.cwd,r=e.options?.config;let n;if(t)n=vr(process.cwd(),t);else{const c=process.env.VIS_MONOREPO_ROOT;n=c&&c.length>0?c:px(process.cwd()).path}e.workspaceRoot=n;const i=r?vr(process.cwd(),r):void 0;let s=i??Fc(n);try{e.visConfig=await S1(n,i?{explicitConfigPath:i}:void 0);const c=e.visConfig?.versionConstraint;if(c&&!Ec.validRange(c)){e.logger.error(""),e.logger.error(CE(ls("✖ Invalid versionConstraint"))),e.logger.error(` vis.config.ts has versionConstraint ${ls(JSON.stringify(c))}, which is not a valid semver range.`),e.logger.error(""),process.exitCode=1;return}if(c&&!Ec.satisfies(Kg.version,c)){e.logger.error(""),e.logger.error(CE(ls("✖ vis version too old"))),e.logger.error(` vis.config.ts requires vis ${ls(c)}, but the current version is ${ls(Kg.version)}.`),e.logger.error(` ${fd("→")} Upgrade: ${zo("pnpm add -D @visulima/vis@latest")}`),e.logger.error(""),process.exitCode=1;return}}catch(c){const u=s,A=c instanceof Error?c.message:String(c);e.visConfigError={file:u??void 0,message:A};const f=!!process.stdout.isTTY&&!Ti;if(u&&!f){if(e.logger.error(""),e.logger.error(CE(ls(`✖ Failed to load ${u}`))),e.logger.error(` ${A}`),e.logger.error(""),A.includes("Cannot find module")){const h=/Cannot find module '([^']+)'/.exec(A)?.[1]??"unknown";e.logger.error(`${fd("→ Hint:")} The module ${ls(h)} could not be resolved.`),h.includes("@visulima/vis")?(e.logger.error(" This usually means the package isn't installed or the export path changed."),e.logger.error(` Try: ${zo("pnpm add @visulima/vis")}`),e.logger.error(` Or regenerate: ${zo("vis init --force")}`)):e.logger.error(` Try: ${zo(`pnpm add ${h}`)}`)}else A.includes("SyntaxError")||A.includes("Unexpected token")?(e.logger.error(`${fd("→ Hint:")} The config file has a syntax error.`),e.logger.error(" Check your config for typos or invalid syntax."),e.logger.error(` Or regenerate: ${zo("vis init --force")}`)):(e.logger.error(`${fd("→ Hint:")} Delete the broken config and recreate it:`),e.logger.error(` ${zo(`rm ${u} && vis init`)}`));e.logger.error(""),e.logger.error(` Continuing with default settings.
1291
1291
  `)}e.visConfig={}}const o=process.argv[2]??"";if(!new Set(["--help","--version","-h","-V","create","help","implode","init"]).has(o)&&!s&&!Ti)if(process.stdin.isTTY){const c=hv({input:process.stdin,output:process.stderr}),u=await new Promise(A=>{c.question("\x1B[36;1m?\x1B[0m \x1B[1mNo vis.config.ts found. Create one with best-practice security defaults?\x1B[0m \x1B[90m(\x1B[92mY\x1B[90m/n)\x1B[0m ",A),c.on("SIGINT",()=>{c.close(),A("n")})});if(c.close(),!u.trim()||u.trim().toLowerCase()==="y"||u.trim().toLowerCase()==="yes"){const A=j(n,"vis.config.ts"),f=['import { defineConfig } from "@visulima/vis/config";',"","// Secure defaults are applied automatically by defineConfig().","// You only need to add allowBuilds for packages with build scripts.","// Run 'vis check --security-config' to see all active settings.","export default defineConfig({"," security: {"," allowBuilds: {",' // "esbuild": true,'," },"," },","});",""].join(`
1292
1292
  `);Tt(A,f),e.logger.info(`✓ Created ${A}
1293
1293
  `),e.visConfig=await S1(n),s=A}}else e.logger.warn("No vis.config.ts found. Run 'vis init' to create one with best-practice security defaults.")}catch(t){t instanceof Error&&!t.message.includes("monorepo root")&&e.logger.warn(`Failed to detect workspace: ${t.message}`),e.visConfig={}}},"beforeCommand"),name:"config-loader"};var Oge=Object.defineProperty,Sn=p((e,t)=>Oge(e,"name",{value:t,configurable:!0}),"r$5");const jge=336*60*60*1e3,ov=j(Ca(),"mcp-promote.json"),Qa="@visulima/vis-mcp",Lge=new Set(["--help","--version","-h","-V","ai","help","implode","mcp"]),Pge=Sn(()=>{try{if(K(ov))return nt(ov)}catch{}return{lastShown:0}},"readState"),Tge=Sn(e=>{try{un(Ca()),pr(ov,JSON.stringify(e))}catch{}},"writeState"),lA=Sn(e=>{try{return K(e)?nt(e):void 0}catch{return}},"readJsonSafe"),uA=Sn(e=>{if(typeof e!="object"||e===null)return!1;for(const t of Object.values(e)){if(typeof t!="object"||t===null)continue;const r=t,n=Array.isArray(r.args)?r.args.join(" "):"",i=`${typeof r.command=="string"?r.command:""} ${n}`;if(i.includes(Qa)||i.includes("vis-mcp"))return!0}return!1},"mapHasVisMcp"),Mge=Sn(e=>{if(!Array.isArray(e))return!1;for(const t of e){if(typeof t!="object"||t===null)continue;const r=t,n=Array.isArray(r.args)?r.args.join(" "):"",i=`${typeof r.command=="string"?r.command:""} ${n} ${typeof r.name=="string"?r.name:""}`;if(i.includes(Qa)||i.includes("vis-mcp"))return!0}return!1},"arrayHasVisMcp"),_ge=Sn(e=>{const t=j(e,".claude"),r=j(e,".claude.json"),n=K(t)||K(r);let i=!1;if(n){const s=lA(r);i=uA(s?.mcpServers)}return{displayName:"Claude Code",id:"claude-code",installCommand:`claude mcp add vis -- npx -y ${Qa}@latest`,isConfigured:i,isInstalled:n}},"detectClaudeCode"),Gge=Sn(e=>{const t=j(e,".cursor","mcp.json"),r=K(j(e,".cursor"));let n=!1;if(r){const i=lA(t);n=uA(i?.mcpServers)}return{displayName:"Cursor",id:"cursor",installCommand:`Add to ~/.cursor/mcp.json: "vis": { "command": "npx", "args": ["-y", "${Qa}@latest"] }`,isConfigured:n,isInstalled:r}},"detectCursor"),Hge=Sn(e=>{const t=j(e,".codeium","windsurf"),r=j(t,"mcp_config.json"),n=K(t);let i=!1;if(n){const s=lA(r);i=uA(s?.mcpServers)}return{displayName:"Windsurf",id:"windsurf",installCommand:`Add to ~/.codeium/windsurf/mcp_config.json: "vis": { "command": "npx", "args": ["-y", "${Qa}@latest"] }`,isConfigured:i,isInstalled:n}},"detectWindsurf"),Uge=Sn(e=>{const t=j(e,".continue"),r=j(t,"config.json"),n=K(t);let i=!1;if(n){const s=lA(r);i=uA(s?.mcpServers)||Mge(s?.mcpServers)}return{displayName:"Continue",id:"continue",installCommand:`Add to ~/.continue/config.json mcpServers: { "name": "vis", "command": "npx", "args": ["-y", "${Qa}@latest"] }`,isConfigured:i,isInstalled:n}},"detectContinue"),Wge=Sn(e=>{const t=j(e,"Library","Application Support","Zed","settings.json"),r=j(e,".config","zed","settings.json"),n=gv()==="darwin"?t:r,i=K(n);let s=!1;if(i){const o=lA(n);s=uA(o?.context_servers)}return{displayName:"Zed",id:"zed",installCommand:`Add to Zed settings.json under context_servers: "vis": { "command": "npx", "args": ["-y", "${Qa}@latest"] }`,isConfigured:s,isInstalled:i}},"detectZed"),Jge=Sn(e=>{const t=[j(e,".config","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),j(e,"Library","Application Support","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json")];let r;for(const s of t)if(K(s)){r=s;break}const n=r!==void 0;let i=!1;if(r!==void 0){const s=lA(r);i=uA(s?.mcpServers)}return{displayName:"Cline",id:"cline",installCommand:`In VS Code: open Cline > MCP Servers, add "vis" with command "npx" and args ["-y", "${Qa}@latest"]`,isConfigured:i,isInstalled:n}},"detectCline"),Kge=Sn(()=>{const e=DD();return[_ge(e),Gge(e),Hge(e),Uge(e),Wge(e),Jge(e)]},"detectAiClis"),Vge=Sn(e=>{if(!e.success||process.env.VIS_CLI_TEST||Ti||process.env.VIS_NO_MCP_PROMOTE==="1"||e.visConfig?.mcpPromote?.enabled===!1||!process.stderr.isTTY||e.command!==void 0&&Lge.has(e.command))return!1;const t=new Set(process.argv.slice(2));return!(t.has("--silent")||t.has("-s")||t.has("--json"))},"shouldRun"),zge=Sn(e=>{if(!Vge(e))return;const t=Date.now(),r=Pge();if(t-r.lastShown<jge)return;const n=Kge().find(i=>i.isInstalled&&!i.isConfigured);n!==void 0&&(process.stderr.write(`
@@ -1,3 +1,3 @@
1
- var a=Object.defineProperty;var s=(n,e)=>a(n,"name",{value:e,configurable:!0});import{createRequire as f}from"node:module";import{m as v}from"../packem_shared/index-di3jpyZS.js";const d=f(import.meta.url),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=s(n=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,r]=t.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return t.getBuiltinModule(n)}return d(n)},"__cjs_getBuiltinModule"),{execSync:p,spawnSync:m}=l("node:child_process");var g=Object.defineProperty,y=s((n,e)=>g(n,"name",{value:e,configurable:!0}),"r");const w=y(async({argument:n,logger:e,options:r})=>{const c=n?.[0];e.info("info: checking for updates...");const o=v.version;let i;try{const u=p("npm view @visulima/vis version",{encoding:"utf8"}).trim();i=c??u}catch{throw new Error("Failed to query npm registry. Check your network connection.")}if(o===i&&!r.force){e.info(`
1
+ var a=Object.defineProperty;var s=(n,e)=>a(n,"name",{value:e,configurable:!0});import{createRequire as f}from"node:module";import{m as v}from"../packem_shared/index-Dc3ht2bL.js";const d=f(import.meta.url),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=s(n=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,r]=t.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return t.getBuiltinModule(n)}return d(n)},"__cjs_getBuiltinModule"),{execSync:p,spawnSync:m}=l("node:child_process");var g=Object.defineProperty,y=s((n,e)=>g(n,"name",{value:e,configurable:!0}),"r");const w=y(async({argument:n,logger:e,options:r})=>{const c=n?.[0];e.info("info: checking for updates...");const o=v.version;let i;try{const u=p("npm view @visulima/vis version",{encoding:"utf8"}).trim();i=c??u}catch{throw new Error("Failed to query npm registry. Check your network connection.")}if(o===i&&!r.force){e.info(`
2
2
  ✓ Already up to date (${o})`);return}if(r.check){o===i?e.info(`✓ Already up to date (${o})`):e.info(`info: found @visulima/vis@${i} (current: ${o})`);return}if(e.info(`info: found @visulima/vis@${i} (current: ${o})`),e.info("info: installing..."),m("npm",["install","-g",`@visulima/vis@${i}`],{encoding:"utf8",stdio:"inherit"}).status!==0)throw new Error("Failed to update. Try running with sudo or fix npm permissions.");e.info(`
3
3
  ✓ Updated @visulima/vis from ${o} → ${i}`)},"execute");export{w as default};