@visulima/vis 1.0.0 → 1.0.2
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 +20 -0
- package/LICENSE.md +1 -1
- package/dashboard/dist/index.html +10 -10
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/CONFIG_FILES.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +1 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +2 -2
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/group-tags.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler53.js +1 -1
- package/dist/packem_chunks/handler54.js +1 -1
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler60.js +1 -1
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +6 -6
- package/dist/packem_chunks/handler66.js +1 -1
- package/dist/packem_chunks/handler67.js +1 -1
- package/dist/packem_chunks/handler68.js +1 -1
- package/dist/packem_chunks/handler69.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +1 -1
- package/dist/packem_chunks/handler71.js +1 -1
- package/dist/packem_chunks/handler72.js +41 -41
- package/dist/packem_chunks/handler73.js +2 -2
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +1 -1
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler78.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index3.js +1 -1
- package/dist/packem_chunks/index4.js +46 -46
- package/dist/packem_chunks/index5.js +22 -23
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/orchestrator.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/ts-loader.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_chunks/version-resolver.js +1 -1
- package/dist/packem_shared/{Table-CcVkyULl-DLWu6XHL.js → Table-BGIHvenQ-D2oJtNQj.js} +1 -1
- package/dist/packem_shared/{affected-shas-CCxG4tvm.js → affected-shas-BfO3PDJq.js} +1 -1
- package/dist/packem_shared/ai-analysis-CO7No4rt.js +68 -0
- package/dist/packem_shared/{ai-fix-CeGzAT9m.js → ai-fix-B4u2zlVG.js} +1 -1
- package/dist/packem_shared/{augment-DaSS2Lgs.js → augment-8z86AwtF.js} +1 -1
- package/dist/packem_shared/{bin-BlGVEhl8.js → bin-Cv8vsMEo.js} +1 -1
- package/dist/packem_shared/{build-scripts-q__dKE2y.js → build-scripts-D477Ou-x.js} +1 -1
- package/dist/packem_shared/{command-runtime-3FTGuUsK.js → command-runtime-EWjmSxPj.js} +1 -1
- package/dist/packem_shared/{cyclonedx-CmrYQ0vx.js → cyclonedx-CDWHbD9s.js} +1 -1
- package/dist/packem_shared/{dependency-scan-DpOFiZuI.js → dependency-scan-P52jY0pU.js} +1 -1
- package/dist/packem_shared/{docker-BYqiD711.js → docker-CD7o1D1o.js} +1 -1
- package/dist/packem_shared/{env-DdQRnEIy.js → env-Cpxa_7UE.js} +1 -1
- package/dist/packem_shared/{failure-log-CKMhqLWr.js → failure-log-MOhz-TBv.js} +1 -1
- package/dist/packem_shared/glob-DMbPwGSj-uzODoE-1.js +1 -0
- package/dist/packem_shared/index-BAUIIRZJ.js +1 -0
- package/dist/packem_shared/index-BVuCxe14.js +22 -0
- package/dist/packem_shared/{index-jJNulo5i.js → index-CTRMi3jL.js} +1 -1
- package/dist/packem_shared/{index-Cg71MisW.js → index-CdTXvj-V.js} +1 -1
- package/dist/packem_shared/{lifecycle-aDTZ8dW1.js → lifecycle-hzwghh5a.js} +1 -1
- package/dist/packem_shared/{lockfile-C1qCKGH6.js → lockfile-CWcVTdRc.js} +1 -1
- package/dist/packem_shared/{manifests-DSBr3-dw.js → manifests-CaPqgQxW.js} +1 -1
- package/dist/packem_shared/{min-release-age-C71MO72F.js → min-release-age-skpcnlpk.js} +1 -1
- package/dist/packem_shared/{missing-package-json-CTF71tE5.js → missing-package-json-_hOp4AW5.js} +1 -1
- package/dist/packem_shared/{native-config-sync-D-z2Uwqu.js → native-config-sync-CFi1iQNG.js} +1 -1
- package/dist/packem_shared/{packument-aGzYwXKn.js → packument-CYxvm590.js} +1 -1
- package/dist/packem_shared/{pm-runner-CQcraCcu.js → pm-runner-mVFjedM6.js} +1 -1
- package/dist/packem_shared/{provenance-S7y0BRAt.js → provenance-CI_WQx7G.js} +1 -1
- package/dist/packem_shared/{readJsonSync-DuMMeB3s-ihoybKvs.js → readJsonSync-DuMMeB3s-Cx08VBQg.js} +1 -1
- package/dist/packem_shared/{registry-keys-CRnXATt2.js → registry-keys-AGlSEY6R.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-CJGazevw.js → resolve-explicit-DVE9cfkm.js} +1 -1
- package/dist/packem_shared/{resolve-runtime-QRaQucfL.js → resolve-runtime-CGHf-wHz.js} +1 -1
- package/dist/packem_shared/{run-file-DD7Ne23Z.js → run-file-Bs_E9O6O.js} +1 -1
- package/dist/packem_shared/{runtime-check-qnrPTlma.js → runtime-check-pS2XH4BO.js} +1 -1
- package/dist/packem_shared/{s1ngularity-BLj4Jy8z.js → s1ngularity-xmrq5T5r.js} +1 -1
- package/dist/packem_shared/{scan-progress-BDcl7Kty.js → scan-progress-DQ4TMXcb.js} +1 -1
- package/dist/packem_shared/{selectors-D4iCvITE.js → selectors-CRgS4bU9.js} +1 -1
- package/dist/packem_shared/{signatures-DoNG2hEr.js → signatures-Dp3th1DB.js} +1 -1
- package/dist/packem_shared/{target-options-CR0OuYJr.js → target-options-TM6ETDAS.js} +1 -1
- package/dist/packem_shared/{toolchain-Zb3VzZb4.js → toolchain-B5KwUZfq.js} +1 -1
- package/dist/packem_shared/{typosquats-C12CP_2G.js → typosquats-C0layQsP.js} +1 -1
- package/dist/packem_shared/{use-measured-height-CjS7Tks7.js → use-measured-height-Drobr4fe.js} +1 -1
- package/dist/packem_shared/{verify-DStfg3nb.js → verify-Cjo4EBFZ.js} +1 -1
- package/dist/packem_shared/{vis-update-app-BlocL713.js → vis-update-app-qIkyvrd1.js} +1 -1
- package/dist/packem_shared/{watch-BXNI7dC6.js → watch-BnE1TzYn.js} +1 -1
- package/dist/packem_shared/{watch-loop-BZudYfcl.js → watch-loop-Irf3Pm-1.js} +1 -1
- package/dist/runtime/preload.js +1 -1
- package/index.js +654 -570
- package/package.json +37 -37
- package/dist/packem_shared/ai-analysis-BpVdn20h.js +0 -68
- package/dist/packem_shared/glob-fqg4KepW-1S3z30c8.js +0 -1
- package/dist/packem_shared/index-CE6MsgcV.js +0 -22
- package/dist/packem_shared/index-Cg0IHaFI.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as r,c as n,h as o,e as i,r as d}from"../packem_shared/index-
|
|
1
|
+
import{V as r,c as n,h as o,e as i,r as d}from"../packem_shared/index-CTRMi3jL.js";import{e as t}from"../packem_shared/index-DjTWo3sH.js";const l=async()=>{const e=r("vis",{packageName:"vis",packageVersion:n.version}),a=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(o({detailed:a,exitOnError:!1})),e.addGlobalOption({description:"Target JS runtime: node (default) or bun. Overrides VIS_RUNTIME; falls back to lockfile detection.",name:"runtime",type:String}),e.addCommand(t),e.addCommand(i),await d(e)};export{l as runExecCli};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{createRequire as FC}from"node:module";import{d as WC,c as Lr,V as IC,h as _C,e as zC,r as KC}from"../packem_shared/index-
|
|
1
|
+
import{createRequire as FC}from"node:module";import{d as WC,c as Lr,V as IC,h as _C,e as zC,r as KC}from"../packem_shared/index-CTRMi3jL.js";import{T as ui,F as Gf,m as L,e as Jl,H as no,B as Ha,A as Ff,y as ws,f as Z,a as vo,v as z,o as qC,O as UC}from"../packem_shared/index-BVuCxe14.js";import{N as VC,a as Qe}from"../packem_shared/readJsonSync-DuMMeB3s-Cx08VBQg.js";import{L as dY}from"../packem_shared/public-api-WqUCiyIe.js";import{r as gY,a as hY,s as Tl}from"../packem_shared/index-BAUIIRZJ.js";import{a as _g}from"../packem_shared/_commonjsHelpers-B5Y90VFO.js";import{getMainWorktreeRoot as pY,Cache as Yr,readLastRunSummary as Uf,getLastRunSummaryPath as Dl,parseCacheSize as vY,digestFile as Vf}from"@visulima/task-runner";import{L as em,g as yY,d as fo,M as Bl,N as fY,_ as Pa,c as _t,O as im,f as mo,i as wp,V as mY}from"../packem_shared/env-Cpxa_7UE.js";import{e as Wr,V as sd,j as pn,s as Rt,q as eo,E as Ca,Q as YY,I as $Y}from"../packem_shared/index.server-J83sowC4.js";import{B as Xl,D as Hl,J as ZY,K as JY,r as D,M as xY,P as jp,Q as nm,S as TY,X as kp,a0 as Un,Y as om,m as Y,n as _,i as B,a1 as DY,v as En,b as BY,a2 as XY,W as Sp,e as HY,l as MY,a as Ml,U as Lp,$ as PY,d as NY,c as EY,f as RY}from"./catalog.js";import{e as OY}from"../packem_shared/index-DjTWo3sH.js";import{I as ao}from"../packem_shared/index-B0EsgdzO.js";import{findVisConfigFile as Uo,loadVisConfig as Cp}from"./CONFIG_FILES.js";import{u as Ro,m as AY}from"./ts-loader.js";import{s as GY}from"../packem_shared/bin-Cv8vsMEo.js";import{A as Yp}from"../packem_shared/pm-runner-mVFjedM6.js";const QC=FC(import.meta.url),yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Di=e=>{if(typeof yt<"u"&&yt.versions&&yt.versions.node){const[i,n]=yt.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return yt.getBuiltinModule(e)}return QC(e)},Qf=Di("node:module"),{createRequire:wn}=Qf,{readFile:Wf,readdir:js,stat:Qa,realpath:fp,rm:Ig,mkdtemp:eY,mkdir:iY}=Di("node:fs/promises"),{resolve:Cr,dirname:If,delimiter:mp}=Di("node:path"),{rmSync:Ma,writeFileSync:He,renameSync:_f,unlinkSync:yo,readdirSync:Fi,statSync:Eo,readFileSync:nY,watch:oY,existsSync:bp,copyFileSync:aY,mkdirSync:tY,cpSync:sY}=Di("node:fs"),{execFileSync:rY,execFile:uY,spawnSync:La,execSync:zf}=Di("node:child_process"),{Readable:xl}=Di("node:stream"),{createInterface:Kf}=Di("node:readline"),qf=Di("node:url"),{fileURLToPath:lY}=qf,cY=Di("util"),{createServer:bY,STATUS_CODES:wY}=Di("node:http"),{Http2ServerRequest:zt,constants:jY}=Di("node:http2"),{tmpdir:kY,homedir:SY,platform:LY}=Di("node:os"),{randomUUID:CY}=Di("node:crypto"),le=(e,i)=>async()=>({default:(await e())[i]});function am(e,i,n,o){let a,t,s;t=n,s=o;const r=dY(i,t,s??a);ui(e,r,a)}let zg=class extends WC{troubleshooting;constructor(i,n,o=[]){super(i,n,{troubleshooting:o}),this.name="CompletionError",this.troubleshooting=o,o.length>0&&(this.hint=o.join(`
|
|
2
2
|
`))}};const Pl=["bash","zsh","fish","powershell"],Nl=["node","bun","deno"],FY=e=>"Deno"in e,QY=e=>"Bun"in e,$p=()=>FY(globalThis)?"deno":QY(globalThis)?"bun":"node",Zp=e=>{const i=e?.starshipShell??e?.shell;if(i){const a=i.toLowerCase();if(a.includes("zsh"))return"zsh";if(a.includes("bash"))return"bash";if(a.includes("fish"))return"fish"}const n=e?.psModulePath,o=e?.prompt;if(n||o?.includes("PS"))return"powershell";if(e?.comSpec?.toLowerCase().includes("cmd.exe"))return"bash"},WY=async()=>(await import("./index2.js")).default,IY=(e,i)=>{for(const n of i)n.hidden||(n.name&&e.option(n.name,n.description??""),n.alias&&e.option(n.alias,n.description??""))},_Y=(e,i)=>{for(const[n,o]of i){if(o.name!==n||o.hidden)continue;const a=e.command(o.name,o.description??"");o.options&&IY(a,o.options)}},zY=e=>{if(!Pl.includes(e))throw new zg(`Invalid shell type: ${e}`,"INVALID_SHELL",[`Valid shells are: ${Pl.join(", ")}`,"Shell will be auto-detected if not specified"])},KY=e=>{if(e&&!Nl.includes(e))throw new zg(`Invalid runtime: ${e}`,"INVALID_RUNTIME",[`Valid runtimes are: ${Nl.join(", ")}`,"Runtime will be auto-detected if not specified"])},qY=(e,i)=>{e.error("Could not detect current shell");const n=[`Usage: ${i} completion --shell=<bash|zsh|fish|powershell> [--runtime=<node|bun|deno>]`,"","Examples:"," # Install completions for zsh:",` ${i} completion --shell=zsh > ~/.${i}-completion.zsh`,` echo 'source ~/.${i}-completion.zsh' >> ~/.zshrc`,""," # Install completions for bash with custom runtime:",` ${i} completion --shell=bash --runtime=bun > ~/.${i}-completion.bash`,` echo 'source ~/.${i}-completion.bash' >> ~/.bashrc`,""," # Install completions for fish:",` ${i} completion --shell=fish > ~/.config/fish/completions/${i}.fish`].join(`
|
|
3
3
|
`);e.info(n)},UY={description:"Generate shell completion scripts",env:[{description:"Shell path (Unix-like systems). Used for shell detection.",name:"SHELL",type:String},{description:"Starship shell configuration. Takes precedence over SHELL for detection.",name:"STARSHIP_SHELL",type:String},{description:"PowerShell module path (Windows). Used for PowerShell detection.",name:"PSModulePath",type:String},{description:"Command prompt variable (Windows). Used for PowerShell detection.",name:"PROMPT",type:String},{description:"Command processor (Windows). Used for Windows Command Prompt detection.",name:"ComSpec",type:String}],execute:async({env:e,logger:i,options:n,runtime:o})=>{const a=o.getCliName(),t=n.shell??Zp(e);if(!t){qY(i,a);return}try{zY(t),KY(n.runtime);const s=await WY();_Y(s,o.getCommands());const r=`${n.runtime??$p()} ${a}`;s.setup(a,r,t)}catch(s){if(s instanceof zg){const r=[`Failed to generate completion script: ${s.message}`,`Error code: ${s.code}`];throw s.troubleshooting.length>0&&r.push("","Troubleshooting:",...s.troubleshooting.map(u=>` • ${u}`)),i.error(r.join(`
|
|
4
4
|
`)),s}else{const r=["Failed to generate completion script",`Error: ${s instanceof Error?s.message:String(s)}`,"","Troubleshooting:"," • Ensure @bomb.sh/tab is installed: pnpm add @bomb.sh/tab",` • Verify shell is supported: ${Pl.join(", ")}`,` • Verify runtime is supported: ${Nl.join(", ")}`," • Check that your CLI name is correct"];i.error(r.join(`
|
|
5
5
|
`))}}},name:"completion",options:[{defaultOption:!0,defaultValue:Zp(),description:"Shell type (bash, zsh, fish, powershell). Defaults to current shell if detected.",name:"shell",type:String,typeLabel:"{underline shell}"},{defaultValue:$p(),description:"JavaScript runtime (node, bun, deno). Defaults to current runtime if detected.",name:"runtime",type:String,typeLabel:"{underline runtime}"}]},VY={alias:["v","V"],description:"Output the version number",execute:({logger:e,runtime:i})=>{const n=i.getPackageVersion();n===void 0?(e.warn("Unknown version"),e.debug("The version number was not provided by the cli constructor.")):e.info(n)},name:"version",options:[],usage:[]},e$=wn(import.meta.url),ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tm=e=>{if(typeof ft<"u"&&ft.versions&&ft.versions.node){const[i,n]=ft.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return ft.getBuiltinModule(e)}return e$(e)},{execFileSync:i$}=tm("node:child_process"),{existsSync:Jp,readFileSync:n$}=tm("node:fs"),o$=["yarn.lock","package-lock.json","pnpm-lock.yaml","npm-shrinkwrap.json","bun.lock","bun.lockb"],xp=new Set(["bun","npm","pnpm","yarn"]),sm=e=>{const i=VC(n$(e,"utf8"));return typeof i?.packageManager=="string"?i.packageManager:void 0},a$=e=>{let i;if(o$.forEach(o=>{!i&&Jp(L(e,o))&&(i=L(e,o))}),i)return i;const n=L(e,"package.json");if(Jp(n)&&sm(n)!==void 0)return n},t$=e=>{if(!e)throw new Jl("Could not find a package manager");if(e.endsWith("package.json")){const i=sm(e);if(i){const n=["npm","yarn","pnpm","bun"].find(o=>i.startsWith(o));if(n)return{packageManager:n,path:no(e)}}}if(e.endsWith("yarn.lock"))return{packageManager:"yarn",path:no(e)};if(e.endsWith("package-lock.json")||e.endsWith("npm-shrinkwrap.json"))return{packageManager:"npm",path:no(e)};if(e.endsWith("pnpm-lock.yaml"))return{packageManager:"pnpm",path:no(e)};if(e.endsWith("bun.lock")||e.endsWith("bun.lockb"))return{packageManager:"bun",path:no(e)};throw new Jl("Could not find a package manager")},s$=e=>{const i=Gf(a$,{...e&&{cwd:e}});return t$(i)},ZSe=e=>{if(!xp.has(e))throw new Error(`Unsupported package manager "${e}". Expected one of: ${[...xp].join(", ")}.`);return i$(e,["--version"]).toString("utf8").trim()},r$=wn(import.meta.url),mt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rm=e=>{if(typeof mt<"u"&&mt.versions&&mt.versions.node){const[i,n]=mt.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return mt.getBuiltinModule(e)}return r$(e)};rm("node:fs");rm("node:fs/promises");const u$={sha256:"sha256",sha384:"sha384",sha512:"sha512"},d$=1024,l$=/^[A-Z0-9+/]+={0,2}$/i,Tp="node_modules/",as=/^['"]/,ts=/['"]$/,g$=/^[a-z][a-zA-Z0-9]*:\s*$/m,h$=/resolution:\s*\{[^}]*integrity:\s*([^,}\s]+)/,c$=/^["']?((?:@[^/@"']+\/)?[^@"'\n]+)@[^\n]+\n((?:[\t ][^\n]*(?:\n|$))+)/gm,p$=/^\s+version:?\s+"?([^"\n]+)"?/m,v$=/^\s+integrity[\s:]+"?([^"\s]+)"?/m,Ir=e=>{if(e.length>d$)return;const i=e.indexOf("-");if(i<=0)return;const n=u$[e.slice(0,i).toLowerCase()];if(!n)return;const o=e.slice(i+1);if(l$.test(o))try{const a=Buffer.from(o,"base64");return a.length===0?void 0:{algorithm:n,hex:a.toString("hex")}}catch{return}},_r=(e,i,n)=>{const o=`${n.name}@${n.version}`;i.has(o)||(i.add(o),e.push(n))},Ei=(e,i,n)=>{n&&Object.keys(n).length>0&&(e[i]={...n})},Ya=e=>{if(!e)return;const i={};for(const[n,o]of Object.entries(e))i[n]=[o];return Object.keys(i).length>0?i:void 0},y$=e=>{const i=[],n=new Set;let o;try{o=JSON.parse(e)}catch{return i}if(!o.packages)return i;for(const[a,t]of Object.entries(o.packages)){if(!a||!t.version)continue;const s=a.lastIndexOf(Tp);if(s===-1)continue;const r=a.slice(s+Tp.length);if(r.length===0)continue;const u=r.split("/"),d=r.startsWith("@")?2:1;if(u.length!==d||u.some(h=>h.length===0))continue;const l=t.name??r;if(l.startsWith("."))continue;const g={name:l,version:t.version};if(t.integrity){const h=Ir(t.integrity);h&&(g.integrity=h)}Ei(g,"dependencies",Ya(t.dependencies)),Ei(g,"peerDependencies",Ya(t.peerDependencies)),Ei(g,"optionalDependencies",Ya(t.optionalDependencies)),_r(i,n,g)}return i},um=e=>{let i=e.trim();i.startsWith("/")&&(i=i.slice(1)),i=i.replace(as,"").replace(ts,"");const n=i.indexOf("(");n>0&&(i=i.slice(0,n));const o=i.lastIndexOf("@");if(o<=0)return;const a=i.slice(0,o),t=i.slice(o+1);if(!(!a||!t||t.startsWith("link:")||t.startsWith("workspace:")||t.startsWith("file:")))return{name:a,version:t}},dm=(e,i)=>{const n=new RegExp(String.raw`^${i}:\s*$`,"m").exec(e);if(!n)return;const o=n.index+n[0].length,a=g$.exec(e.slice(o));return e.slice(o,a?o+a.index:e.length)},f$=e=>{const i=new Map,n=dm(e,"snapshots");if(!n)return i;const o=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let a;for(;(a=o.exec(n)??void 0)!==void 0;){const t=um(a[1]);if(!t)continue;const s=`${t.name}@${t.version}`,r=a[2],u=i.get(s)??{};for(const d of["dependencies","peerDependencies","optionalDependencies"]){const l=rr(r,d);if(!l)continue;const g=u[d]??{};for(const[h,c]of Object.entries(l)){const p=g[h]??[];for(const f of c)p.includes(f)||p.push(f);g[h]=p}u[d]=g}i.set(s,u)}return i},m$=e=>{const i=[],n=new Set,o=dm(e,"packages");if(!o)return i;const a=f$(e),t=/^ {2}(['"]?[^\s:][^:\n]*?['"]?):\s*\n((?: {4}[^\n]*\n?)+)/gm;let s;for(;(s=t.exec(o)??void 0)!==void 0;){const r=um(s[1]);if(!r)continue;const u=s[2],d=h$.exec(u),l={name:r.name,version:r.version};if(d?.[1]){const h=Ir(d[1]);h&&(l.integrity=h)}const g=a.get(`${r.name}@${r.version}`);Ei(l,"dependencies",g?.dependencies??rr(u,"dependencies")),Ei(l,"peerDependencies",g?.peerDependencies??rr(u,"peerDependencies")),Ei(l,"optionalDependencies",g?.optionalDependencies??rr(u,"optionalDependencies")),_r(i,n,l)}return i},rr=(e,i)=>{const n=new RegExp(String.raw`^ {4}${i}:\s*\n((?: {6,}[^\n]*\n?)+)`,"m").exec(e);if(!n?.[1])return;const o={},a=/^ {6}([^\s:]+):\s*([^\n]+)/gm;let t;for(;(t=a.exec(n[1])??void 0)!==void 0;){const s=t[1].replace(as,"").replace(ts,"");let r=t[2].trim();r=r.replace(as,"").replace(ts,"");const u=r.indexOf("(");if(u>0&&(r=r.slice(0,u).trim()),!s||!r)continue;const d=o[s]??[];d.includes(r)||d.push(r),o[s]=d}return Object.keys(o).length>0?o:void 0},b$=e=>{const i=[],n=new Set,o=c$;o.lastIndex=0;let a;for(;(a=o.exec(e)??void 0)!==void 0;){const t=a[1].replace(as,"").replace(ts,"");if(!t)continue;const s=a[2],r=p$.exec(s);if(!r?.[1])continue;const u={name:t,version:r[1].trim()},d=v$.exec(s);if(d?.[1]){const l=Ir(d[1]);l&&(u.integrity=l)}Ei(u,"dependencies",rd(s,"dependencies")),Ei(u,"peerDependencies",rd(s,"peerDependencies")),Ei(u,"optionalDependencies",rd(s,"optionalDependencies")),_r(i,n,u)}return i},rd=(e,i)=>{const n=new RegExp(String.raw`^ {2}${i}:\s*\n((?: {4,}[^\n]*\n?)+)`,"m").exec(e);if(!n?.[1])return;const o={},a=/^ {4}(['"]?[^\s:'"]+['"]?)\s*(?::\s*)?['"]([^'"\n]+)['"]/gm;let t;for(;(t=a.exec(n[1])??void 0)!==void 0;){const s=t[1].replace(as,"").replace(ts,""),r=t[2];if(s&&r){const u=o[s]??[];u.includes(r)||u.push(r),o[s]=u}}return Object.keys(o).length>0?o:void 0},w$=/,(?=\s*[}\]])/g,j$=e=>{const i=[],n=new Set;let o;try{o=JSON.parse(e.replaceAll(w$,""))}catch{return i}if(!o.packages)return i;for(const a of Object.values(o.packages)){const t=a[0];if(typeof t!="string")continue;const s=t.indexOf("@",1);if(s<=0)continue;const r=t.slice(0,s),u=t.slice(s+1);if(!r||!u||u.startsWith("workspace:")||u.startsWith("link:")||u.startsWith("file:"))continue;const d={name:r,version:u},l=a[3];if(typeof l=="string"&&l.length>0){const h=Ir(l);h&&(d.integrity=h)}const g=a[2];if(g&&typeof g=="object"&&!Array.isArray(g)){const h=g;Ei(d,"dependencies",Ya(h.dependencies)),Ei(d,"peerDependencies",Ya(h.peerDependencies)),Ei(d,"optionalDependencies",Ya(h.optionalDependencies))}_r(i,n,d)}return i},JSe=(e,i)=>{switch(i){case"bun":return j$(e);case"npm":return y$(e);case"pnpm":return m$(e);case"yarn":return b$(e);default:return[]}},k$=wn(import.meta.url),bt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,S$=e=>{if(typeof bt<"u"&&bt.versions&&bt.versions.node){const[i,n]=bt.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return bt.getBuiltinModule(e)}return k$(e)},{existsSync:Dp,readFileSync:L$}=S$("node:fs"),lm=e=>{const i=Gf(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(i?.endsWith("lerna.json")){const o=Qe(i);if(o.useWorkspaces||o.packages)return{path:no(i),strategy:"lerna"}}const n=i?.endsWith("turbo.json");try{const{packageManager:o,path:a}=s$(e);if(["npm","yarn"].includes(o)){const t=L(a,"package.json");if(Dp(t)&&L$(L(a,"package.json"),"utf8").includes("workspaces"))return{path:a,strategy:n?"turbo":o}}else if(o==="pnpm"){const t=L(a,"pnpm-workspace.yaml");if(Dp(t))return{path:a,strategy:n?"turbo":"pnpm"}}}catch(o){if(!(o instanceof Jl))throw o}throw new Error(`No monorepo root could be found upwards from the directory ${String(e??process.cwd())} using lerna, yarn, pnpm, or npm as indicators.`)},C$=wn(import.meta.url),wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Y$=e=>{if(typeof wt<"u"&&wt.versions&&wt.versions.node){const[i,n]=wt.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return wt.getBuiltinModule(e)}return C$(e)};Y$("node:fs");var ud,Bp;function gm(){return Bp||(Bp=1,ud=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","ALGLIB-Documentation","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Advanced-Cryptics-Dictionary","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BOLA-1.1","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-Tso","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Mark-Modifications","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","Buddy","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CAPEC-tou","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","ESA-PL-permissive-2.4","ESA-PL-strong-copyleft-2.4","ESA-PL-weak-copyleft-2.4","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-SMC","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HPND-sell-variant-critical-systems","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ISO-permission","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-STK","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MMPL-1.0.1","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-TNT","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSC-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OSSP","OpenMDW-1.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","ParaType-Free-Font-1.3","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGMLUG-PM","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TekHVC","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","UnRAR","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","Vixie-Cron","W3C","W3C-19980720","W3C-20150513","WTFNMFPL","WTFPL","Watcom-1.0","Widget-Workshop","WordNet","Wsuipa","X11","X11-distribute-modifications-variant","X11-no-permit-persons","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","hyphen-bulgarian","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]),ud}var dd,Xp;function $$(){return Xp||(Xp=1,dd=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]),dd}var ld,Hp;function Z$(){return Hp||(Hp=1,ld=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]),ld}var gd,Mp;function J$(){if(Mp)return gd;Mp=1;var e=[].concat(gm()).concat($$()),i=Z$();return gd=function(n){var o=0;function a(){return o<n.length}function t(w){if(w instanceof RegExp){var v=n.slice(o),j=v.match(w);if(j)return o+=j[0].length,j[0]}else if(n.indexOf(w,o)===o)return o+=w.length,w}function s(){t(/[ ]*/)}function r(){for(var w,v=["WITH","AND","OR","(",")",":","+"],j=0;j<v.length&&(w=t(v[j]),!w);j++);if(w==="+"&&o>1&&n[o-2]===" ")throw new Error("Space before `+`");return w&&{type:"OPERATOR",string:w}}function u(){return t(/[A-Za-z0-9-.]+/)}function d(){var w=u();if(!w)throw new Error("Expected idstring at offset "+o);return w}function l(){if(t("DocumentRef-")){var w=d();return{type:"DOCUMENTREF",string:w}}}function g(){if(t("LicenseRef-")){var w=d();return{type:"LICENSEREF",string:w}}}function h(){var w=o,v=u();if(e.indexOf(v)!==-1)return{type:"LICENSE",string:v};if(i.indexOf(v)!==-1)return{type:"EXCEPTION",string:v};o=w}function c(){return r()||l()||g()||h()}for(var p=[];a()&&(s(),!!a());){var f=c();if(!f)throw new Error("Unexpected `"+n[o]+"` at offset "+o);p.push(f)}return p},gd}var hd,Pp;function x$(){return Pp||(Pp=1,hd=function(e){var i=0;function n(){return i<e.length}function o(){return n()?e[i]:null}function a(){if(!n())throw new Error;i++}function t(f){var w=o();if(w&&w.type==="OPERATOR"&&f===w.string)return a(),w.string}function s(){if(t("WITH")){var f=o();if(f&&f.type==="EXCEPTION")return a(),f.string;throw new Error("Expected exception after `WITH`")}}function r(){var f=i,w="",v=o();if(v.type==="DOCUMENTREF"&&(a(),w+="DocumentRef-"+v.string+":",!t(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(v=o(),v.type==="LICENSEREF")return a(),w+="LicenseRef-"+v.string,{license:w};i=f}function u(){var f=o();if(f&&f.type==="LICENSE"){a();var w={license:f.string};t("+")&&(w.plus=!0);var v=s();return v&&(w.exception=v),w}}function d(){var f=t("(");if(f){var w=c();if(!t(")"))throw new Error("Expected `)`");return w}}function l(){return d()||r()||u()}function g(f,w){return function v(){var j=w();if(j){if(!t(f))return j;var C=v();if(!C)throw new Error("Expected expression");return{left:j,conjunction:f.toLowerCase(),right:C}}}}var h=g("AND",l),c=g("OR",h),p=c();if(!p||n())throw new Error("Syntax error");return p}),hd}var cd,Np;function hm(){if(Np)return cd;Np=1;var e=J$(),i=x$();return cd=function(n){return i(e(n))},cd}var pd,Ep;function T$(){if(Ep)return pd;Ep=1;var e=hm(),i=gm();function n(v){try{return e(v),!0}catch{return!1}}function o(v,j){var C=j[0].length-v[0].length;return C!==0?C:v[0].toUpperCase().localeCompare(j[0].toUpperCase())}var a=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(o),t=0,s=1,r=[function(v){return v.toUpperCase()},function(v){return v.trim()},function(v){return v.replace(/\./g,"")},function(v){return v.replace(/\s+/g,"")},function(v){return v.replace(/\s+/g,"-")},function(v){return v.replace("v","-")},function(v){return v.replace(/,?\s*(\d)/,"-$1")},function(v){return v.replace(/,?\s*(\d)/,"-$1.0")},function(v){return v.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(v){return v.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(v){return v[0].toUpperCase()+v.slice(1)},function(v){return v.replace("/","-")},function(v){return v.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(v){return v.indexOf("3.0")!==-1?v+"-or-later":v+"-only"},function(v){return v+"only"},function(v){return v.replace(/(\d)$/,"-$1.0")},function(v){return v.replace(/(-| )?(\d)$/,"-$2-Clause")},function(v){return v.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(v){return v.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(v){return v.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(v){return v.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(v){return v.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(v){return v.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(v){return"CC-"+v},function(v){return"CC-"+v+"-4.0"},function(v){return v.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(v){return"CC-"+v.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],u=i.map(function(v){var j=/^(.*)-\d+\.\d+$/.exec(v);return j?[j[0],j[1]]:[v,null]}).reduce(function(v,j){var C=j[1];return v[C]=v[C]||[],v[C].push(j[0]),v},{}),d=Object.keys(u).map(function(v){return[v,u[v]]}).filter(function(v){return v[1].length===1&&v[0]!==null&&v[0]!=="APL"}).map(function(v){return[v[0],v[1][0]]});u=void 0;var l=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(d).sort(o),g=0,h=1,c=function(v){for(var j=0;j<r.length;j++){var C=r[j](v).trim();if(C!==v&&n(C))return C}return null},p=function(v){for(var j=v.toUpperCase(),C=0;C<l.length;C++){var y=l[C];if(j.indexOf(y[g])>-1)return y[h]}return null},f=function(v,j){for(var C=0;C<a.length;C++){var y=a[C],k=y[t];if(v.indexOf(k)>-1){var S=v.replace(k,y[s]),J=j(S);if(J!==null)return J}}return null};pd=function(v,j){j=j||{};var C=j.upgrade===void 0?!0:!!j.upgrade;function y(T){return C?w(T):T}var k=typeof v=="string"&&v.trim().length!==0;if(!k)throw Error("Invalid argument. Expected non-empty string.");if(v=v.trim(),n(v))return y(v);var S=v.replace(/\+$/,"").trim();if(n(S))return y(S);var J=c(v);return J!==null||(J=f(v,function(T){return n(T)?T:c(T)}),J!==null)||(J=p(v),J!==null)||(J=f(v,p),J!==null)?y(J):null};function w(v){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(v)!==-1?v+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(v)!==-1?v.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(v)!==-1?v+"-or-later":v}return pd}var vd,Rp;function D$(){if(Rp)return vd;Rp=1;var e=hm(),i=T$(),n='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',o=/^SEE LICEN[CS]E IN (.+)$/;function a(s,r){return r.slice(0,s.length)===s}function t(s){if(s.hasOwnProperty("license")){var r=s.license;return a("LicenseRef",r)||a("DocumentRef",r)}else return t(s.left)||t(s.right)}return vd=function(s){var r;try{r=e(s)}catch{var u;if(s==="UNLICENSED"||s==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(u=o.exec(s))return{validForOldPackages:!0,validForNewPackages:!0,inFile:u[1]};var d={validForOldPackages:!1,validForNewPackages:!1,warnings:[n]};if(s.trim().length!==0){var l=i(s);l&&d.warnings.push('license is similar to the valid expression "'+l+'"')}return d}return t(r)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[n]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},vd}var cm={hasSubscribers:!1},Ie=cm,ba=cm;import("node:diagnostics_channel").then(e=>{Ie=e.channel("lru-cache:metrics"),ba=e.tracingChannel("lru-cache")}).catch(()=>{});var B$=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,yd=()=>Ie.hasSubscribers||ba.hasSubscribers,pm=new Set,Op=process||{},X$=(e,i,n,o)=>{typeof Op.emitWarning=="function"?Op.emitWarning(e,i,n,o):console.error(`[${n}] ${i}: ${e}`)},H$=e=>!pm.has(e),Vn=e=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),vm=e=>Vn(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ur:null:null,ur=class extends Array{constructor(i){super(i),this.fill(0)}},M$=class Ot{heap;length;static#n=!1;static create(i){let n=vm(i);if(!n)return[];Ot.#n=!0;let o=new Ot(i,n);return Ot.#n=!1,o}constructor(i,n){if(!Ot.#n)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(i),this.length=0}push(i){this.heap[this.length++]=i}pop(){return this.heap[--this.length]}},P$=class ym{#n;#i;#e;#t;#o;#a;#r;#g;get perf(){return this.#g}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#u;#c;#h;#d;#s;#f;#b;#y;#p;#S;#v;#L;#C;#w;#j;#Y;#P;#m;#D;static unsafeExposeInternals(i){return{starts:i.#C,ttls:i.#w,autopurgeTimers:i.#j,sizes:i.#L,keyMap:i.#h,keyList:i.#d,valList:i.#s,next:i.#f,prev:i.#b,get head(){return i.#y},get tail(){return i.#p},free:i.#S,isBackgroundFetch:n=>i.#l(n),backgroundFetch:(n,o,a,t)=>i.#R(n,o,a,t),moveToTail:n=>i.#M(n),indexes:n=>i.#$(n),rindexes:n=>i.#Z(n),isStale:n=>i.#k(n)}}get max(){return this.#n}get maxSize(){return this.#i}get calculatedSize(){return this.#c}get size(){return this.#u}get fetchMethod(){return this.#a}get memoMethod(){return this.#r}get dispose(){return this.#e}get onInsert(){return this.#t}get disposeAfter(){return this.#o}constructor(i){let{max:n=0,ttl:o,ttlResolution:a=1,ttlAutopurge:t,updateAgeOnGet:s,updateAgeOnHas:r,allowStale:u,dispose:d,onInsert:l,disposeAfter:g,noDisposeOnSet:h,noUpdateTTL:c,maxSize:p=0,maxEntrySize:f=0,sizeCalculation:w,fetchMethod:v,memoMethod:j,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:S,ignoreFetchAbort:J,backgroundFetchSize:T=1,perf:M}=i;if(this.backgroundFetchSize=T,M!==void 0&&typeof M?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#g=M??B$,n!==0&&!Vn(n))throw new TypeError("max option must be a nonnegative integer");let he=n?vm(n):Array;if(!he)throw new Error("invalid max value: "+n);if(this.#n=n,this.#i=p,this.maxEntrySize=f||this.#i,this.sizeCalculation=w,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(j!==void 0&&typeof j!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#r=j,v!==void 0&&typeof v!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=v,this.#P=!!v,this.#h=new Map,this.#d=Array.from({length:n}).fill(void 0),this.#s=Array.from({length:n}).fill(void 0),this.#f=new he(n),this.#b=new he(n),this.#y=0,this.#p=0,this.#S=M$.create(n),this.#u=0,this.#c=0,typeof d=="function"&&(this.#e=d),typeof l=="function"&&(this.#t=l),typeof g=="function"?(this.#o=g,this.#v=[]):(this.#o=void 0,this.#v=void 0),this.#Y=!!this.#e,this.#D=!!this.#t,this.#m=!!this.#o,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!J,this.maxEntrySize!==0){if(this.#i!==0&&!Vn(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!Vn(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#_()}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!r,this.ttlResolution=Vn(a)||a===0?a:1,this.ttlAutopurge=!!t,this.ttl=o||0,this.ttl){if(!Vn(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#O()}if(this.#n===0&&this.ttl===0&&this.#i===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#n&&!this.#i){let Je="LRU_CACHE_UNBOUNDED";H$(Je)&&(pm.add(Je),X$("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Je,ym))}}getRemainingTTL(i){return this.#h.has(i)?1/0:0}#O(){let i=new ur(this.#n),n=new ur(this.#n);this.#w=i,this.#C=n;let o=this.ttlAutopurge?Array.from({length:this.#n}):void 0;this.#j=o,this.#A=(r,u,d=this.#g.now())=>{n[r]=u!==0?d:0,i[r]=u,a(r,u)},this.#B=r=>{n[r]=i[r]!==0?this.#g.now():0,a(r,i[r])};let a=this.ttlAutopurge?(r,u)=>{if(o?.[r]&&(clearTimeout(o[r]),o[r]=void 0),u&&u!==0&&o){let d=setTimeout(()=>{this.#k(r)&&this.#J(this.#d[r],"expire")},u+1);d.unref&&d.unref(),o[r]=d}}:()=>{};this.#x=(r,u)=>{if(i[u]){let d=i[u],l=n[u];if(!d||!l)return;r.ttl=d,r.start=l,r.now=t||s();let g=r.now-l;r.remainingTTL=d-g}};let t=0,s=()=>{let r=this.#g.now();if(this.ttlResolution>0){t=r;let u=setTimeout(()=>t=0,this.ttlResolution);u.unref&&u.unref()}return r};this.getRemainingTTL=r=>{let u=this.#h.get(r);if(u===void 0)return 0;let d=i[u],l=n[u];if(!d||!l)return 1/0;let g=(t||s())-l;return d-g},this.#k=r=>{let u=n[r],d=i[r];return!!d&&!!u&&(t||s())-u>d}}#B=()=>{};#x=()=>{};#A=()=>{};#k=()=>!1;#_(){let i=new ur(this.#n);this.#c=0,this.#L=i,this.#X=n=>{this.#c-=i[n],i[n]=0},this.#G=(n,o,a,t)=>{if(!Vn(a)){if(this.#l(o))return this.backgroundFetchSize;if(t){if(typeof t!="function")throw new TypeError("sizeCalculation must be a function");if(a=t(o,n),!Vn(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return a},this.#N=(n,o,a)=>{if(i[n]=o,this.#i){let t=this.#i-i[n];for(;this.#c>t;)this.#E(!0)}this.#c+=i[n],a&&(a.entrySize=o,a.totalCalculatedSize=this.#c)}}#X=i=>{};#N=(i,n,o)=>{};#G=(i,n,o,a)=>{if(o||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#$({allowStale:i=this.allowStale}={}){if(this.#u)for(let n=this.#p;this.#F(n)&&((i||!this.#k(n))&&(yield n),n!==this.#y);)n=this.#b[n]}*#Z({allowStale:i=this.allowStale}={}){if(this.#u)for(let n=this.#y;this.#F(n)&&((i||!this.#k(n))&&(yield n),n!==this.#p);)n=this.#f[n]}#F(i){return i!==void 0&&this.#h.get(this.#d[i])===i}*entries(){for(let i of this.#$())this.#s[i]!==void 0&&this.#d[i]!==void 0&&!this.#l(this.#s[i])&&(yield[this.#d[i],this.#s[i]])}*rentries(){for(let i of this.#Z())this.#s[i]!==void 0&&this.#d[i]!==void 0&&!this.#l(this.#s[i])&&(yield[this.#d[i],this.#s[i]])}*keys(){for(let i of this.#$()){let n=this.#d[i];n!==void 0&&!this.#l(this.#s[i])&&(yield n)}}*rkeys(){for(let i of this.#Z()){let n=this.#d[i];n!==void 0&&!this.#l(this.#s[i])&&(yield n)}}*values(){for(let i of this.#$())this.#s[i]!==void 0&&!this.#l(this.#s[i])&&(yield this.#s[i])}*rvalues(){for(let i of this.#Z())this.#s[i]!==void 0&&!this.#l(this.#s[i])&&(yield this.#s[i])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(i,n={}){for(let o of this.#$()){let a=this.#s[o],t=this.#l(a)?a.__staleWhileFetching:a;if(t!==void 0&&i(t,this.#d[o],this))return this.#H(this.#d[o],n)}}forEach(i,n=this){for(let o of this.#$()){let a=this.#s[o],t=this.#l(a)?a.__staleWhileFetching:a;t!==void 0&&i.call(n,t,this.#d[o],this)}}rforEach(i,n=this){for(let o of this.#Z()){let a=this.#s[o],t=this.#l(a)?a.__staleWhileFetching:a;t!==void 0&&i.call(n,t,this.#d[o],this)}}purgeStale(){let i=!1;for(let n of this.#Z({allowStale:!0}))this.#k(n)&&(this.#J(this.#d[n],"expire"),i=!0);return i}info(i){let n=this.#h.get(i);if(n===void 0)return;let o=this.#s[n],a=this.#l(o)?o.__staleWhileFetching:o;if(a===void 0)return;let t={value:a};if(this.#w&&this.#C){let s=this.#w[n],r=this.#C[n];if(s&&r){let u=s-(this.#g.now()-r);t.ttl=u,t.start=Date.now()}}return this.#L&&(t.size=this.#L[n]),t}dump(){let i=[];for(let n of this.#$({allowStale:!0})){let o=this.#d[n],a=this.#s[n],t=this.#l(a)?a.__staleWhileFetching:a;if(t===void 0||o===void 0)continue;let s={value:t};if(this.#w&&this.#C){s.ttl=this.#w[n];let r=this.#g.now()-this.#C[n];s.start=Math.floor(Date.now()-r)}this.#L&&(s.size=this.#L[n]),i.unshift([o,s])}return i}load(i){this.clear();for(let[n,o]of i){if(o.start){let a=Date.now()-o.start;o.start=this.#g.now()-a}this.#T(n,o.value,o)}}set(i,n,o={}){let{status:a=Ie.hasSubscribers?{}:void 0}=o;o.status=a,a&&(a.op="set",a.key=i,n!==void 0&&(a.value=n),a.cache=this);let t=this.#T(i,n,o);return a&&Ie.hasSubscribers&&Ie.publish(a),t}#T(i,n,o,a){let{ttl:t=this.ttl,start:s,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:d}=o,l=this.#l(n);if(n===void 0)return d&&(d.set="deleted"),this.delete(i),this;let{noUpdateTTL:g=this.noUpdateTTL}=o;d&&!l&&(d.value=n);let h=this.#G(i,n,o.size||0,u,d);if(this.maxEntrySize&&h>this.maxEntrySize)return this.#J(i,"set"),d&&(d.set="miss",d.maxEntrySizeExceeded=!0),this;let c=this.#u===0?void 0:this.#h.get(i);if(c===void 0)c=this.#u===0?this.#p:this.#S.length!==0?this.#S.pop():this.#u===this.#n?this.#E(!1):this.#u,this.#d[c]=i,this.#s[c]=n,this.#h.set(i,c),this.#f[this.#p]=c,this.#b[c]=this.#p,this.#p=c,this.#u++,this.#N(c,h,d),d&&(d.set="add"),g=!1,this.#D&&!l&&this.#t?.(n,i,"add");else{this.#M(c);let p=this.#s[c];if(n!==p){if(!r)if(this.#l(p)){p!==a&&p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=p;f!==void 0&&f!==n&&(this.#Y&&this.#e?.(f,i,"set"),this.#m&&this.#v?.push([f,i,"set"]))}else this.#Y&&this.#e?.(p,i,"set"),this.#m&&this.#v?.push([p,i,"set"]);if(this.#X(c),this.#N(c,h,d),this.#s[c]=n,!l){let f=p&&this.#l(p)?p.__staleWhileFetching:p,w=f===void 0?"add":n!==f?"replace":"update";d&&(d.set=w,f!==void 0&&(d.oldValue=f)),this.#D&&this.onInsert?.(n,i,w)}}else l||(d&&(d.set="update"),this.#D&&this.onInsert?.(n,i,"update"))}if(t!==0&&!this.#w&&this.#O(),this.#w&&(g||this.#A(c,t,s),d&&this.#x(d,c)),!r&&this.#m&&this.#v){let p=this.#v,f;for(;f=p?.shift();)this.#o?.(...f)}return this}pop(){try{for(;this.#u;){let i=this.#s[this.#y];if(this.#E(!0),this.#l(i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(this.#m&&this.#v){let i=this.#v,n;for(;n=i?.shift();)this.#o?.(...n)}}}#E(i){let n=this.#y,o=this.#d[n],a=this.#s[n],t=this.#l(a);t&&a.__abortController.abort(new Error("evicted"));let s=t?a.__staleWhileFetching:a;return(this.#Y||this.#m)&&s!==void 0&&(this.#Y&&this.#e?.(s,o,"evict"),this.#m&&this.#v?.push([s,o,"evict"])),this.#X(n),this.#j?.[n]&&(clearTimeout(this.#j[n]),this.#j[n]=void 0),i&&(this.#d[n]=void 0,this.#s[n]=void 0,this.#S.push(n)),this.#u===1?(this.#y=this.#p=0,this.#S.length=0):this.#y=this.#f[n],this.#h.delete(o),this.#u--,n}has(i,n={}){let{status:o=Ie.hasSubscribers?{}:void 0}=n;n.status=o,o&&(o.op="has",o.key=i,o.cache=this);let a=this.#z(i,n);return Ie.hasSubscribers&&Ie.publish(o),a}#z(i,n={}){let{updateAgeOnHas:o=this.updateAgeOnHas,status:a}=n,t=this.#h.get(i);if(t!==void 0){let s=this.#s[t];if(this.#l(s)&&s.__staleWhileFetching===void 0)return!1;if(this.#k(t))a&&(a.has="stale",this.#x(a,t));else return o&&this.#B(t),a&&(a.has="hit",this.#x(a,t)),!0}else a&&(a.has="miss");return!1}peek(i,n={}){let{status:o=yd()?{}:void 0}=n;o&&(o.op="peek",o.key=i,o.cache=this),n.status=o;let a=this.#K(i,n);return Ie.hasSubscribers&&Ie.publish(o),a}#K(i,n){let{status:o,allowStale:a=this.allowStale}=n,t=this.#h.get(i);if(t===void 0||!a&&this.#k(t)){o&&(o.peek=t===void 0?"miss":"stale");return}let s=this.#s[t],r=this.#l(s)?s.__staleWhileFetching:s;return o&&(r!==void 0?(o.peek="hit",o.value=r):o.peek="miss"),r}#R(i,n,o,a){let t=n===void 0?void 0:this.#s[n];if(this.#l(t))return t;let s=new AbortController,{signal:r}=o;r?.addEventListener("abort",()=>s.abort(r.reason),{signal:s.signal});let u={signal:s.signal,options:o,context:a},d=(f,w=!1)=>{let{aborted:v}=s.signal,j=o.ignoreFetchAbort&&f!==void 0,C=o.ignoreFetchAbort||!!(o.allowStaleOnFetchAbort&&f!==void 0);if(o.status&&(v&&!w?(o.status.fetchAborted=!0,o.status.fetchError=s.signal.reason,j&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),v&&!j&&!w)return g(s.signal.reason,C);let y=c,k=this.#s[n];return(k===c||k===void 0&&j&&w)&&(f===void 0?y.__staleWhileFetching!==void 0?this.#s[n]=y.__staleWhileFetching:this.#J(i,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.#T(i,f,u.options,y))),f},l=f=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=f),g(f,!1)),g=(f,w)=>{let{aborted:v}=s.signal,j=v&&o.allowStaleOnFetchAbort,C=j||o.allowStaleOnFetchRejection,y=C||o.noDeleteOnFetchRejection,k=c;if(this.#s[n]===c&&(!y||!w&&k.__staleWhileFetching===void 0?this.#J(i,"fetch"):j||(this.#s[n]=k.__staleWhileFetching)),C)return o.status&&k.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw f},h=(f,w)=>{let v=this.#a?.(i,t,u);s.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(f(void 0),o.allowStaleOnFetchAbort&&(f=j=>d(j,!0)))}),v&&v instanceof Promise?v.then(j=>f(j===void 0?void 0:j),w):v!==void 0&&f(v)};o.status&&(o.status.fetchDispatched=!0);let c=new Promise(h).then(d,l),p=Object.assign(c,{__abortController:s,__staleWhileFetching:t,__returned:void 0});return n===void 0?(this.#T(i,p,{...u.options,status:void 0}),n=this.#h.get(i)):this.#s[n]=p,p}#l(i){if(!this.#P)return!1;let n=i;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof AbortController}fetch(i,n={}){let o=ba.hasSubscribers,{status:a=yd()?{}:void 0}=n;n.status=a,a&&n.context&&(a.context=n.context);let t=this.#Q(i,n);return a&&o&&(a.trace=!0,ba.tracePromise(()=>t,a).catch(()=>{})),t}async#Q(i,n={}){let{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:t=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:r=this.noDisposeOnSet,size:u=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:w=!1,status:v,signal:j}=n;if(v&&(v.op="fetch",v.key=i,w&&(v.forceRefresh=!0),v.cache=this),!this.#P)return v&&(v.fetch="get"),this.#H(i,{allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:t,status:v});let C={allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:t,ttl:s,noDisposeOnSet:r,size:u,sizeCalculation:d,noUpdateTTL:l,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:p,ignoreFetchAbort:c,status:v,signal:j},y=this.#h.get(i);if(y===void 0){v&&(v.fetch="miss");let k=this.#R(i,y,C,f);return k.__returned=k}else{let k=this.#s[y];if(this.#l(k)){let M=o&&k.__staleWhileFetching!==void 0;return v&&(v.fetch="inflight",M&&(v.returnedStale=!0)),M?k.__staleWhileFetching:k.__returned=k}let S=this.#k(y);if(!w&&!S)return v&&(v.fetch="hit"),this.#M(y),a&&this.#B(y),v&&this.#x(v,y),k;let J=this.#R(i,y,C,f),T=J.__staleWhileFetching!==void 0&&o;return v&&(v.fetch=S?"stale":"refresh",T&&S&&(v.returnedStale=!0)),T?J.__staleWhileFetching:J.__returned=J}}forceFetch(i,n={}){let o=ba.hasSubscribers,{status:a=yd()?{}:void 0}=n;n.status=a,a&&n.context&&(a.context=n.context);let t=this.#q(i,n);return a&&o&&(a.trace=!0,ba.tracePromise(()=>t,a).catch(()=>{})),t}async#q(i,n={}){let o=await this.#Q(i,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(i,n={}){let{status:o=Ie.hasSubscribers?{}:void 0}=n;n.status=o,o&&(o.op="memo",o.key=i,n.context&&(o.context=n.context),o.cache=this);let a=this.#U(i,n);return o&&(o.value=a),Ie.hasSubscribers&&Ie.publish(o),a}#U(i,n={}){let o=this.#r;if(!o)throw new Error("no memoMethod provided to constructor");let{context:a,status:t,forceRefresh:s,...r}=n;t&&s&&(t.forceRefresh=!0);let u=this.#H(i,r),d=s||u===void 0;if(t&&(t.memo=d?"miss":"hit",d||(t.value=u)),!d)return u;let l=o(i,u,{options:r,context:a});return t&&(t.value=l),this.#T(i,l,r),l}get(i,n={}){let{status:o=Ie.hasSubscribers?{}:void 0}=n;n.status=o,o&&(o.op="get",o.key=i,o.cache=this);let a=this.#H(i,n);return o&&(a!==void 0&&(o.value=a),Ie.hasSubscribers&&Ie.publish(o)),a}#H(i,n={}){let{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:t=this.noDeleteOnStaleGet,status:s}=n,r=this.#h.get(i);if(r===void 0){s&&(s.get="miss");return}let u=this.#s[r],d=this.#l(u);return s&&this.#x(s,r),this.#k(r)?d?(s&&(s.get="stale-fetching"),o&&u.__staleWhileFetching!==void 0?(s&&(s.returnedStale=!0),u.__staleWhileFetching):void 0):(t||this.#J(i,"expire"),s&&(s.get="stale"),o?(s&&(s.returnedStale=!0),u):void 0):(s&&(s.get=d?"fetching":"hit"),this.#M(r),a&&this.#B(r),d?u.__staleWhileFetching:u)}#W(i,n){this.#b[n]=i,this.#f[i]=n}#M(i){i!==this.#p&&(i===this.#y?this.#y=this.#f[i]:this.#W(this.#b[i],this.#f[i]),this.#W(this.#p,i),this.#p=i)}delete(i){return this.#J(i,"delete")}#J(i,n){Ie.hasSubscribers&&Ie.publish({op:"delete",delete:n,key:i,cache:this});let o=!1;if(this.#u!==0){let a=this.#h.get(i);if(a!==void 0)if(this.#j?.[a]&&(clearTimeout(this.#j?.[a]),this.#j[a]=void 0),o=!0,this.#u===1)this.#I(n);else{this.#X(a);let t=this.#s[a];if(this.#l(t)?t.__abortController.abort(new Error("deleted")):(this.#Y||this.#m)&&(this.#Y&&this.#e?.(t,i,n),this.#m&&this.#v?.push([t,i,n])),this.#h.delete(i),this.#d[a]=void 0,this.#s[a]=void 0,a===this.#p)this.#p=this.#b[a];else if(a===this.#y)this.#y=this.#f[a];else{let s=this.#b[a];this.#f[s]=this.#f[a];let r=this.#f[a];this.#b[r]=this.#b[a]}this.#u--,this.#S.push(a)}}if(this.#m&&this.#v?.length){let a=this.#v,t;for(;t=a?.shift();)this.#o?.(...t)}return o}clear(){return this.#I("delete")}#I(i){for(let n of this.#Z({allowStale:!0})){let o=this.#s[n];if(this.#l(o))o.__abortController.abort(new Error("deleted"));else{let a=this.#d[n];this.#Y&&this.#e?.(o,a,i),this.#m&&this.#v?.push([o,a,i])}}if(this.#h.clear(),this.#s.fill(void 0),this.#d.fill(void 0),this.#w&&this.#C){this.#w.fill(0),this.#C.fill(0);for(let n of this.#j??[])n!==void 0&&clearTimeout(n);this.#j?.fill(void 0)}if(this.#L&&this.#L.fill(0),this.#y=0,this.#p=0,this.#S.length=0,this.#c=0,this.#u=0,this.#m&&this.#v){let n=this.#v,o;for(;o=n?.shift();)this.#o?.(...o)}}};const N$=Object.defineProperty({__proto__:null,LRUCache:P$},Symbol.toStringTag,{value:"Module"}),E$=_g(N$);var fd,Ap;function R$(){if(Ap)return fd;Ap=1;const e=(...t)=>t.every(s=>s)?t.join(""):"",i=t=>t?encodeURIComponent(t):"",n=t=>t.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),o={sshtemplate:({domain:t,user:s,project:r,committish:u})=>`git@${t}:${s}/${r}.git${e("#",u)}`,sshurltemplate:({domain:t,user:s,project:r,committish:u})=>`git+ssh://git@${t}/${s}/${r}.git${e("#",u)}`,edittemplate:({domain:t,user:s,project:r,committish:u,editpath:d,path:l})=>`https://${t}/${s}/${r}${e("/",d,"/",i(u||"HEAD"),"/",l)}`,browsetemplate:({domain:t,user:s,project:r,committish:u,treepath:d})=>`https://${t}/${s}/${r}${e("/",d,"/",i(u))}`,browsetreetemplate:({domain:t,user:s,project:r,committish:u,treepath:d,path:l,fragment:g,hashformat:h})=>`https://${t}/${s}/${r}/${d}/${i(u||"HEAD")}/${l}${e("#",h(g||""))}`,browseblobtemplate:({domain:t,user:s,project:r,committish:u,blobpath:d,path:l,fragment:g,hashformat:h})=>`https://${t}/${s}/${r}/${d}/${i(u||"HEAD")}/${l}${e("#",h(g||""))}`,docstemplate:({domain:t,user:s,project:r,treepath:u,committish:d})=>`https://${t}/${s}/${r}${e("/",u,"/",i(d))}#readme`,httpstemplate:({auth:t,domain:s,user:r,project:u,committish:d})=>`git+https://${e(t,"@")}${s}/${r}/${u}.git${e("#",d)}`,filetemplate:({domain:t,user:s,project:r,committish:u,path:d})=>`https://${t}/${s}/${r}/raw/${i(u||"HEAD")}/${d}`,shortcuttemplate:({type:t,user:s,project:r,committish:u})=>`${t}:${s}/${r}${e("#",u)}`,pathtemplate:({user:t,project:s,committish:r})=>`${t}/${s}${e("#",r)}`,bugstemplate:({domain:t,user:s,project:r})=>`https://${t}/${s}/${r}/issues`,hashformat:n},a={};a.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:s,project:r,committish:u,path:d})=>`https://${e(t,"@")}raw.githubusercontent.com/${s}/${r}/${i(u||"HEAD")}/${d}`,gittemplate:({auth:t,domain:s,user:r,project:u,committish:d})=>`git://${e(t,"@")}${s}/${r}/${u}.git${e("#",d)}`,tarballtemplate:({domain:t,user:s,project:r,committish:u})=>`https://codeload.${t}/${s}/${r}/tar.gz/${i(u||"HEAD")}`,extract:t=>{let[,s,r,u,d]=t.pathname.split("/",5);if(!(u&&u!=="tree")&&(u||(d=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!s||!r)))return{user:s,project:r,committish:d}}},a.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:s,project:r,committish:u,treepath:d,path:l,editpath:g})=>`https://${t}/${s}/${r}${e("/",d,"/",i(u||"HEAD"),"/",l,g)}`,tarballtemplate:({domain:t,user:s,project:r,committish:u})=>`https://${t}/${s}/${r}/get/${i(u||"HEAD")}.tar.gz`,extract:t=>{let[,s,r,u]=t.pathname.split("/",4);if(!["get"].includes(u)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!s||!r)))return{user:s,project:r,committish:t.hash.slice(1)}}},a.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:t,user:s,project:r,committish:u})=>`https://${t}/api/v4/projects/${i(s+"/"+r)}/repository/archive.tar.gz?sha=${i(u||"HEAD")}`,extract:t=>{const s=t.pathname.slice(1);if(s.includes("/-/")||s.includes("/archive.tar.gz"))return;const r=s.split("/");let u=r.pop();u.endsWith(".git")&&(u=u.slice(0,-4));const d=r.join("/");if(!(!d||!u))return{user:d,project:u,committish:t.hash.slice(1)}}},a.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:s,committish:r})=>`git@${t}:${s}.git${e("#",r)}`,sshurltemplate:({domain:t,project:s,committish:r})=>`git+ssh://git@${t}/${s}.git${e("#",r)}`,edittemplate:({domain:t,user:s,project:r,committish:u,editpath:d})=>`https://${t}/${s}/${r}${e("/",i(u))}/${d}`,browsetemplate:({domain:t,project:s,committish:r})=>`https://${t}/${s}${e("/",i(r))}`,browsetreetemplate:({domain:t,project:s,committish:r,path:u,hashformat:d})=>`https://${t}/${s}${e("/",i(r))}${e("#",d(u))}`,browseblobtemplate:({domain:t,project:s,committish:r,path:u,hashformat:d})=>`https://${t}/${s}${e("/",i(r))}${e("#",d(u))}`,docstemplate:({domain:t,project:s,committish:r})=>`https://${t}/${s}${e("/",i(r))}`,httpstemplate:({domain:t,project:s,committish:r})=>`git+https://${t}/${s}.git${e("#",r)}`,filetemplate:({user:t,project:s,committish:r,path:u})=>`https://gist.githubusercontent.com/${t}/${s}/raw${e("/",i(r))}/${u}`,shortcuttemplate:({type:t,project:s,committish:r})=>`${t}:${s}${e("#",r)}`,pathtemplate:({project:t,committish:s})=>`${t}${e("#",s)}`,bugstemplate:({domain:t,project:s})=>`https://${t}/${s}`,gittemplate:({domain:t,project:s,committish:r})=>`git://${t}/${s}.git${e("#",r)}`,tarballtemplate:({project:t,committish:s})=>`https://codeload.github.com/gist/${t}/tar.gz/${i(s||"HEAD")}`,extract:t=>{let[,s,r,u]=t.pathname.split("/",4);if(u!=="raw"){if(!r){if(!s)return;r=s,s=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:s,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+n(t)}},a.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:s,project:r,committish:u,path:d})=>`https://${t}/${s}/${r}/blob/${i(u)||"HEAD"}/${d}`,httpstemplate:({domain:t,user:s,project:r,committish:u})=>`https://${t}/${s}/${r}${e("#",u)}`,tarballtemplate:({domain:t,user:s,project:r,committish:u})=>`https://${t}/${s}/${r}/archive/${i(u)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:t=>{let[,s,r,u]=t.pathname.split("/",4);if(!["archive"].includes(u)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!s||!r)))return{user:s,project:r,committish:t.hash.slice(1)}}};for(const[t,s]of Object.entries(a))a[t]=Object.assign({},o,s);return fd=a,fd}var md,Gp;function fm(){if(Gp)return md;Gp=1;const e=(a,t,s)=>{const r=a.indexOf(s);return a.lastIndexOf(t,r>-1?r:1/0)},i=a=>{try{return new URL(a)}catch{}},n=(a,t)=>{const s=a.indexOf(":"),r=a.slice(0,s+1);if(Object.prototype.hasOwnProperty.call(t,r)||a.substr(s,3)==="://")return a;const u=a.indexOf("@");return u>-1?u>s?`git+ssh://${a}`:a:`${a.slice(0,s+1)}//${a.slice(s+1)}`},o=a=>{const t=e(a,"@","#"),s=e(a,":","#");return s>t&&(a=a.slice(0,s)+"/"+a.slice(s+1)),e(a,":","#")===-1&&a.indexOf("//")===-1&&(a=`git+ssh://${a}`),a};return md=(a,t)=>{const s=t?n(a,t):a;return i(s)||i(o(s))},md}var bd,Fp;function O$(){if(Fp)return bd;Fp=1;const e=fm(),i=n=>{const o=n.indexOf("#"),a=n.indexOf("/"),t=n.indexOf("/",a+1),s=n.indexOf(":"),r=/\s/.exec(n),u=n.indexOf("@"),d=!r||o>-1&&r.index>o,l=u===-1||o>-1&&u>o,g=s===-1||o>-1&&s>o,h=t===-1||o>-1&&t>o,c=a>0,p=o>-1?n[o-1]!=="/":!n.endsWith("/"),f=!n.startsWith(".");return d&&c&&p&&f&&l&&g&&h};return bd=(n,o,{gitHosts:a,protocols:t})=>{if(!n)return;const s=i(n)?`github:${n}`:n,r=e(s,t);if(!r)return;const u=a.byShortcut[r.protocol],d=a.byDomain[r.hostname.startsWith("www.")?r.hostname.slice(4):r.hostname],l=u||d;if(!l)return;const g=a[u||d];let h=null;t[r.protocol]?.auth&&(r.username||r.password)&&(h=`${r.username}${r.password?":"+r.password:""}`);let c=null,p=null,f=null,w=null;try{if(u){let v=r.pathname.startsWith("/")?r.pathname.slice(1):r.pathname;const j=v.indexOf("@");j>-1&&(v=v.slice(j+1));const C=v.lastIndexOf("/");C>-1?(p=decodeURIComponent(v.slice(0,C)),p||(p=null),f=decodeURIComponent(v.slice(C+1))):f=decodeURIComponent(v),f.endsWith(".git")&&(f=f.slice(0,-4)),r.hash&&(c=decodeURIComponent(r.hash.slice(1))),w="shortcut"}else{if(!g.protocols.includes(r.protocol))return;const v=g.extract(r);if(!v)return;p=v.user&&decodeURIComponent(v.user),f=decodeURIComponent(v.project),c=decodeURIComponent(v.committish),w=t[r.protocol]?.name||r.protocol.slice(0,-1)}}catch(v){if(v instanceof URIError)return;throw v}return[l,p,h,f,c,w,o]},bd}var wd,Qp;function A$(){if(Qp)return wd;Qp=1;const{LRUCache:e}=E$,i=R$(),n=O$(),o=fm(),a=new e({max:1e3});function t(r){try{const{protocol:u,hostname:d,pathname:l}=new URL(r);if(!d)return null;const g=/(?:git\+)http:$/.test(u)?"http:":"https:",h=l.replace(/\.git$/,"");return`${g}//${d}${h}`}catch{return null}}class s{constructor(u,d,l,g,h,c,p={}){Object.assign(this,s.#n[u],{type:u,user:d,auth:l,project:g,committish:h,default:c,opts:p})}static#n={byShortcut:{},byDomain:{}};static#i={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(u,d){s.#n[u]=d,s.#n.byDomain[d.domain]=u,s.#n.byShortcut[`${u}:`]=u,s.#i[`${u}:`]={name:u}}static fromUrl(u,d){if(typeof u!="string")return;const l=u+JSON.stringify(d||{});if(!a.has(l)){const g=n(u,d,{gitHosts:s.#n,protocols:s.#i});a.set(l,g?new s(...g):void 0)}return a.get(l)}static fromManifest(u,d={}){if(!u||typeof u!="object")return;const l=u.repository,g=l&&(typeof l=="string"?l:typeof l=="object"&&typeof l.url=="string"?l.url:null);if(!g)throw new Error("no repository");const h=g&&s.fromUrl(g.replace(/^git\+/,""),d)||null;if(h)return h;const c=t(g);return s.fromUrl(c,d)||c}static parseUrl(u){return o(u)}#e(u,d){if(typeof u!="function")return null;const l={...this,...this.opts,...d};l.path||(l.path=""),l.path.startsWith("/")&&(l.path=l.path.slice(1)),l.noCommittish&&(l.committish=null);const g=u(l);return l.noGitPlus&&g.startsWith("git+")?g.slice(4):g}hash(){return this.committish?`#${this.committish}`:""}ssh(u){return this.#e(this.sshtemplate,u)}sshurl(u){return this.#e(this.sshurltemplate,u)}browse(u,...d){return typeof u!="string"?this.#e(this.browsetemplate,u):typeof d[0]!="string"?this.#e(this.browsetreetemplate,{...d[0],path:u}):this.#e(this.browsetreetemplate,{...d[1],fragment:d[0],path:u})}browseFile(u,...d){return typeof d[0]!="string"?this.#e(this.browseblobtemplate,{...d[0],path:u}):this.#e(this.browseblobtemplate,{...d[1],fragment:d[0],path:u})}docs(u){return this.#e(this.docstemplate,u)}bugs(u){return this.#e(this.bugstemplate,u)}https(u){return this.#e(this.httpstemplate,u)}git(u){return this.#e(this.gittemplate,u)}shortcut(u){return this.#e(this.shortcuttemplate,u)}path(u){return this.#e(this.pathtemplate,u)}tarball(u){return this.#e(this.tarballtemplate,{...u,noCommittish:!1})}file(u,d){return this.#e(this.filetemplate,{...d,path:u})}edit(u,d){return this.#e(this.edittemplate,{...d,path:u})}getDefaultRepresentation(){return this.default}toString(u){return this.default&&typeof this[this.default]=="function"?this[this.default](u):this.sshurl(u)}}for(const[r,u]of Object.entries(i))s.addHost(r,u);return wd=s,wd}var jd,Wp;function G$(){if(Wp)return jd;Wp=1,jd=e;function e(i){if(!i||i==="ERROR: No README data found!")return;i=i.trim().split(`
|
|
6
|
-
`);let n=0;for(;i[n]&&i[n].trim().match(/^(#|$)/);)n++;const o=i.length;let a=n+1;for(;a<o&&i[a].trim();)a++;return i.slice(n,a).join(" ").trim()}return jd}var mm={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},bm={web:"url",name:"url"},wm={server:"start",tests:"test"};const F$={topLevel:mm,bugs:bm,script:wm},Q$=Object.defineProperty({__proto__:null,bugs:bm,default:F$,script:wm,topLevel:mm},Symbol.toStringTag,{value:"Module"}),W$=_g(Q$);var kd,Ip;function I$(){if(Ip)return kd;Ip=1;var{URL:e}=qf,i=gY(),n=hY(),o=D$(),a=A$(),{isBuiltin:t}=Qf,s=["dependencies","devDependencies","optionalDependencies"],r=G$(),u=W$,d=y=>y.includes("@")&&y.indexOf("@")<y.lastIndexOf(".");kd={warn:function(){},fixRepositoryField:function(y){if(y.repositories&&(this.warn("repositories"),y.repository=y.repositories[0]),!y.repository)return this.warn("missingRepository");typeof y.repository=="string"&&(y.repository={type:"git",url:y.repository});var k=y.repository.url||"";if(k){var S=a.fromUrl(k);S&&(k=y.repository.url=S.getDefaultRepresentation()==="shortcut"?S.https():S.toString())}k.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",k)},fixTypos:function(y){Object.keys(u.topLevel).forEach(function(k){Object.prototype.hasOwnProperty.call(y,k)&&this.warn("typo",k,u.topLevel[k])},this)},fixScriptsField:function(y){if(y.scripts){if(typeof y.scripts!="object"){this.warn("nonObjectScripts"),delete y.scripts;return}Object.keys(y.scripts).forEach(function(k){typeof y.scripts[k]!="string"?(this.warn("nonStringScript"),delete y.scripts[k]):u.script[k]&&!y.scripts[u.script[k]]&&this.warn("typo",k,u.script[k],"scripts")},this)}},fixFilesField:function(y){var k=y.files;k&&!Array.isArray(k)?(this.warn("nonArrayFiles"),delete y.files):y.files&&(y.files=y.files.filter(function(S){return!S||typeof S!="string"?(this.warn("invalidFilename",S),!1):!0},this))},fixBinField:function(y){if(y.bin&&typeof y.bin=="string"){var k={},S;(S=y.name.match(/^@[^/]+[/](.*)$/))?k[S[1]]=y.bin:k[y.name]=y.bin,y.bin=k}},fixManField:function(y){y.man&&typeof y.man=="string"&&(y.man=[y.man])},fixBundleDependenciesField:function(y){var k="bundledDependencies",S="bundleDependencies";y[k]&&!y[S]&&(y[S]=y[k],delete y[k]),y[S]&&!Array.isArray(y[S])?(this.warn("nonArrayBundleDependencies"),delete y[S]):y[S]&&(y[S]=y[S].filter(function(J){return!J||typeof J!="string"?(this.warn("nonStringBundleDependency",J),!1):(y.dependencies||(y.dependencies={}),Object.prototype.hasOwnProperty.call(y.dependencies,J)||(this.warn("nonDependencyBundleDependency",J),y.dependencies[J]="*"),!0)},this))},fixDependencies:function(y){j(y,this.warn),w(y),this.fixBundleDependenciesField(y),["dependencies","devDependencies"].forEach(function(k){if(k in y){if(!y[k]||typeof y[k]!="object"){this.warn("nonObjectDependencies",k),delete y[k];return}Object.keys(y[k]).forEach(function(S){var J=y[k][S];typeof J!="string"&&(this.warn("nonStringDependency",S,JSON.stringify(J)),delete y[k][S]);var T=a.fromUrl(y[k][S]);T&&(y[k][S]=T.toString())},this)}},this)},fixModulesField:function(y){y.modules&&(this.warn("deprecatedModules"),delete y.modules)},fixKeywordsField:function(y){typeof y.keywords=="string"&&(y.keywords=y.keywords.split(/,\s+/)),y.keywords&&!Array.isArray(y.keywords)?(delete y.keywords,this.warn("nonArrayKeywords")):y.keywords&&(y.keywords=y.keywords.filter(function(k){return typeof k!="string"||!k?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(y,k){var S=!k;if(!y.version)return y.version="",!0;if(!i(y.version,S))throw new Error('Invalid version: "'+y.version+'"');return y.version=n(y.version,S),!0},fixPeople:function(y){c(y,p),c(y,f)},fixNameField:function(y,k){typeof k=="boolean"?k={strict:k}:typeof k>"u"&&(k={});var S=k.strict;if(!y.name&&!S){y.name="";return}if(typeof y.name!="string")throw new Error("name field must be a string.");S||(y.name=y.name.trim()),h(y.name,S,k.allowLegacyCase),t(y.name)&&this.warn("conflictingName",y.name)},fixDescriptionField:function(y){y.description&&typeof y.description!="string"&&(this.warn("nonStringDescription"),delete y.description),y.readme&&!y.description&&(y.description=r(y.readme)),y.description===void 0&&delete y.description,y.description||this.warn("missingDescription")},fixReadmeField:function(y){y.readme||(this.warn("missingReadme"),y.readme="ERROR: No README data found!")},fixBugsField:function(y){if(!y.bugs&&y.repository&&y.repository.url){var k=a.fromUrl(y.repository.url);k&&k.bugs()&&(y.bugs={url:k.bugs()})}else if(y.bugs){if(typeof y.bugs=="string")d(y.bugs)?y.bugs={email:y.bugs}:e.canParse(y.bugs)?y.bugs={url:y.bugs}:this.warn("nonEmailUrlBugsString");else{C(y.bugs,this.warn);var S=y.bugs;y.bugs={},S.url&&(e.canParse(S.url)?y.bugs.url=S.url:this.warn("nonUrlBugsUrlField")),S.email&&(typeof S.email=="string"&&d(S.email)?y.bugs.email=S.email:this.warn("nonEmailBugsEmailField"))}!y.bugs.email&&!y.bugs.url&&(delete y.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(y){if(!y.homepage&&y.repository&&y.repository.url){var k=a.fromUrl(y.repository.url);k&&k.docs()&&(y.homepage=k.docs())}if(y.homepage){if(typeof y.homepage!="string")return this.warn("nonUrlHomepage"),delete y.homepage;e.canParse(y.homepage)||(y.homepage="http://"+y.homepage)}},fixLicenseField:function(y){const k=y.license||y.licence;if(!k)return this.warn("missingLicense");if(typeof k!="string"||k.length<1||k.trim()==="")return this.warn("invalidLicense");if(!o(k).validForNewPackages)return this.warn("invalidLicense")}};function l(y){if(y.charAt(0)!=="@")return!1;var k=y.slice(1).split("/");return k.length!==2?!1:k[0]&&k[1]&&k[0]===encodeURIComponent(k[0])&&k[1]===encodeURIComponent(k[1])}function g(y){return!y.match(/[/@\s+%:]/)&&y===encodeURIComponent(y)}function h(y,k,S){if(y.charAt(0)==="."||!(l(y)||g(y))||k&&!S&&y!==y.toLowerCase()||y.toLowerCase()==="node_modules"||y.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(y))}function c(y,k){return y.author&&(y.author=k(y.author)),["maintainers","contributors"].forEach(function(S){Array.isArray(y[S])&&(y[S]=y[S].map(k))}),y}function p(y){if(typeof y=="string")return y;var k=y.name||"",S=y.url||y.web,J=S?" ("+S+")":"",T=y.email||y.mail,M=T?" <"+T+">":"";return k+M+J}function f(y){if(typeof y!="string")return y;var k=y.match(/^([^(<]+)/),S=y.match(/\(([^()]+)\)/),J=y.match(/<([^<>]+)>/),T={};return k&&k[0].trim()&&(T.name=k[0].trim()),J&&(T.email=J[1]),S&&(T.url=S[1]),T}function w(y){var k=y.optionalDependencies;if(k){var S=y.dependencies||{};Object.keys(k).forEach(function(J){S[J]=k[J]}),y.dependencies=S}}function v(y,k,S){if(!y)return{};if(typeof y=="string"&&(y=y.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(y))return y;S("deprecatedArrayDependencies",k);var J={};return y.filter(function(T){return typeof T=="string"}).forEach(function(T){T=T.trim().split(/(:?[@\s><=])/);var M=T.shift(),he=T.join("");he=he.trim(),he=he.replace(/^@/,""),J[M]=he}),J}function j(y,k){s.forEach(function(S){y[S]&&(y[S]=v(y[S],S,k))})}function C(y,k){y&&Object.keys(y).forEach(function(S){u.bugs[S]&&(k("typo",S,u.bugs[S],"bugs"),y[u.bugs[S]]=y[S],delete y[S])})}return kd}var jm="'repositories' (plural) Not supported. Please pick one as the 'repository' field",km="No repository field.",Sm="Probably broken git url: %s",Lm="scripts must be an object",Cm="script values must be string commands",Ym="Invalid 'files' member",$m="Invalid filename in 'files' list: %s",Zm="Invalid 'bundleDependencies' list. Must be array of package names",Jm="Invalid bundleDependencies member: %s",xm="Non-dependency in bundleDependencies: %s",Tm="%s field must be an object",Dm="Invalid dependency: %s %s",Bm="specifying %s as array is deprecated",Xm="modules field is deprecated",Hm="keywords should be an array of strings",Mm="keywords should be an array of strings",Pm="%s is also the name of a node core module.",Nm="'description' field should be a string",Em="No description",Rm="No README data",Om="No license field.",Am="Bug string field must be url, email, or {email,url}",Gm="bugs.url field must be a string url. Deleted.",Fm="bugs.email field must be a string email. Deleted.",Qm="Normalized value of bugs field is an empty object. Deleted.",Wm="homepage field must be a string url. Deleted.",Im="license should be a valid SPDX license expression",_m="%s should probably be %s.";const _$={repositories:jm,missingRepository:km,brokenGitUrl:Sm,nonObjectScripts:Lm,nonStringScript:Cm,nonArrayFiles:Ym,invalidFilename:$m,nonArrayBundleDependencies:Zm,nonStringBundleDependency:Jm,nonDependencyBundleDependency:xm,nonObjectDependencies:Tm,nonStringDependency:Dm,deprecatedArrayDependencies:Bm,deprecatedModules:Xm,nonArrayKeywords:Hm,nonStringKeyword:Mm,conflictingName:Pm,nonStringDescription:Nm,missingDescription:Em,missingReadme:Rm,missingLicense:Om,nonEmailUrlBugsString:Am,nonUrlBugsUrlField:Gm,nonEmailBugsEmailField:Fm,emptyNormalizedBugs:Qm,nonUrlHomepage:Wm,invalidLicense:Im,typo:_m},z$=Object.defineProperty({__proto__:null,brokenGitUrl:Sm,conflictingName:Pm,default:_$,deprecatedArrayDependencies:Bm,deprecatedModules:Xm,emptyNormalizedBugs:Qm,invalidFilename:$m,invalidLicense:Im,missingDescription:Em,missingLicense:Om,missingReadme:Rm,missingRepository:km,nonArrayBundleDependencies:Zm,nonArrayFiles:Ym,nonArrayKeywords:Hm,nonDependencyBundleDependency:xm,nonEmailBugsEmailField:Fm,nonEmailUrlBugsString:Am,nonObjectDependencies:Tm,nonObjectScripts:Lm,nonStringBundleDependency:Jm,nonStringDependency:Dm,nonStringDescription:Nm,nonStringKeyword:Mm,nonStringScript:Cm,nonUrlBugsUrlField:Gm,nonUrlHomepage:Wm,repositories:jm,typo:_m},Symbol.toStringTag,{value:"Module"}),K$=_g(z$);var Sd,_p;function q$(){if(_p)return Sd;_p=1;var e=cY,i=K$;Sd=function(){var o=Array.prototype.slice.call(arguments,0),a=o.shift();if(a==="typo")return n.apply(null,o);var t=i[a]?i[a]:a+": '%s'";return o.unshift(t),e.format.apply(null,o)};function n(o,a,t){return t&&(o=t+"['"+o+"']",a=t+"['"+a+"']"),e.format(i.typo,o,a)}return Sd}var Ld,zp;function U$(){if(zp)return Ld;zp=1,Ld=t;var e=I$();t.fixer=e;var i=q$(),n=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],o=["dependencies","people","typos"],a=n.map(function(r){return s(r)+"Field"});a=a.concat(o);function t(r,u,d){u===!0&&(u=null,d=!0),d||(d=!1),(!u||r.private)&&(u=function(){}),r.scripts&&r.scripts.install==="node-gyp rebuild"&&!r.scripts.preinstall&&(r.gypfile=!0),e.warn=function(){u(i.apply(null,arguments))},a.forEach(function(l){e["fix"+s(l)](r,d)}),r._id=r.name+"@"+r.version}function s(r){return r.charAt(0).toUpperCase()+r.slice(1)}return Ld}U$();const V$=wn(import.meta.url),jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Kg=e=>{if(typeof jt<"u"&&jt.versions&&jt.versions.node){const[i,n]=jt.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return jt.getBuiltinModule(e)}return V$(e)};Kg("node:fs");Kg("node:readline");Kg("node:util");const eZ={argument:{description:"Target selector (same syntax as `vis run`): `build`, `:build`, `~:test`, `#tag:lint`, …",name:"selector",type:String},description:"Show the execution plan for a target without running it",examples:[["vis action-graph build","Print the task plan for `build` on every project"],["vis action-graph :test","Moon-style selector"],["vis action-graph build --json","Emit a JSON description of the plan"],['vis action-graph lint --query "tag=frontend"',"Filter projects by query"]],group:"Workspace",loader:()=>import("./handler2.js"),name:"action-graph",options:[{defaultValue:!1,description:"Emit JSON instead of ASCII",name:"json",type:Boolean},{description:"Filter matched projects by a query",name:"query",type:String}]},iZ={argument:{description:"Packages to add (e.g., react react-dom)",name:"packages",type:String},description:"Add packages using the detected package manager",examples:[["vis add react react-dom","Add packages"],["vis add -D typescript @types/react","Add as dev dependencies"],["vis add react --filter app","Add to specific workspace package"],["vis add react --to web","Add to one package, auto-conforming the version to existing catalogs / sibling deps"],["vis add -g typescript","Add globally (uses npm)"],["vis add lodash -w","Add to workspace root"],["vis add lodash --no-socket-check","Add without Socket.dev check"],["vis add lodash --no-typosquat-check","Skip typosquat name check"],["vis add lodash --no-marshall-check","Skip the offline marshall pipeline (author, downloads, etc.)"],["vis add lodash --run-scripts","Run lifecycle scripts (opts out of vis's default block-by-default policy)"]],group:"Dependencies",loader:()=>import("./handler15.js"),name:"add",options:[{alias:"D",defaultValue:!1,description:"Add as dev dependency",name:"save-dev",type:Boolean},{alias:"E",defaultValue:!1,description:"Save exact version",name:"exact",type:Boolean},{alias:"P",defaultValue:!1,description:"Add as peer dependency",name:"save-peer",type:Boolean},{alias:"O",defaultValue:!1,description:"Add as optional dependency",name:"save-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Install globally (uses npm)",name:"global",type:Boolean},{alias:"w",defaultValue:!1,description:"Add to workspace root",name:"workspace-root",type:Boolean},{defaultValue:!1,description:"Use workspace protocol (pnpm)",name:"workspace",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String},{description:"Target a single workspace package and auto-conform the version to existing catalogs / sibling deps (syncpack#285)",name:"to",type:String},{defaultValue:!1,description:"Skip typosquat name check before adding",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip Socket.dev security check before adding",name:"no-socket-check",type:Boolean},{defaultValue:!1,description:"Skip the offline marshall pipeline (author, provenance, metadata, downloads, expired-domains, new-bin, signatures, archived-repo)",name:"no-marshall-check",type:Boolean},{defaultValue:!1,description:"Run lifecycle scripts during add (opts out of vis's default block-by-default policy; allowlisted packages run via security.policies.installScripts.allow)",name:"run-scripts",type:Boolean},{defaultValue:!1,description:"After adding, recursively install non-optional peer dependencies that aren't already in the workspace (matches nypm's installPeerDependencies)",name:"auto-install-peers",type:Boolean}]},qg={description:"Override the cache DB path (defaults to <cache>/vis/advisories/db.sqlite via @visulima/find-cache-dir).",name:"db",type:String},ks={description:"Output format: table (default) or json.",name:"format",type:String},nZ={commandPath:["advisories"],description:"Download and ingest one or more OSV ecosystem dumps into the local cache",examples:[["vis advisories sync","Sync the npm ecosystem (default)"],["vis advisories sync --ecosystem npm","Sync a single explicit ecosystem"],["vis advisories sync --ecosystem npm,PyPI","Sync several ecosystems in one pass"],["vis advisories sync --force","Re-download even when the ETag matches"],["vis advisories sync --source https://mirror.example.com","Use a corporate OSV mirror (must be in allowedHosts)"]],group:"Security & Health",loader:le(()=>import("./sync.js"),"advisoriesSyncExecute"),name:"sync",options:[{description:"Comma-separated list of ecosystems to sync (default: npm).",name:"ecosystem",type:String},{defaultValue:!1,description:"Re-download and re-ingest even if the upstream ETag is unchanged.",name:"force",type:Boolean},{description:"Override the advisory source URL. Must be https and resolve to an allowed host.",name:"source",type:String},qg,ks]},oZ={commandPath:["advisories"],description:"Print the local advisory DB summary: path, schema version, ecosystems, row counts, last sync, ETag",examples:[["vis advisories status","Human-readable summary"],["vis advisories status --format json","Machine-readable for CI freshness checks"]],group:"Security & Health",loader:le(()=>import("./status.js"),"advisoriesStatusExecute"),name:"status",options:[qg,ks]},aZ={commandPath:["advisories"],description:"Delete the local advisory DB. The next `vis audit --offline` will fail until you re-sync",examples:[["vis advisories prune","Confirm and delete the local DB"],["vis advisories prune --force","Delete without confirmation"]],group:"Security & Health",loader:le(()=>import("./prune.js"),"advisoriesPruneExecute"),name:"prune",options:[qg,{defaultValue:!1,description:"Skip the confirmation prompt.",name:"force",type:Boolean},ks]},zm={description:"Override the bloom cache directory (defaults to <cache>/vis/osv-bloom/).",name:"cache-dir",type:String},tZ={commandPath:["advisories","bloom"],description:"Fetch and verify the endevco/osv-bloom MAL-* prefilter into the local cache",examples:[["vis advisories bloom sync","Fetch the bloom filter from the default upstream"],["vis advisories bloom sync --force","Re-download even when the set digest matches"],["vis advisories bloom sync --source https://bloom.example.com","Use an internal mirror (must be in allowedHosts)"]],group:"Security & Health",loader:le(()=>import("./bloom-sync.js"),"advisoriesBloomSyncExecute"),name:"sync",options:[{defaultValue:!1,description:"Re-download and re-verify even when the upstream set digest is unchanged.",name:"force",type:Boolean},{description:"Override the bloom source URL. Must be https and resolve to an allowed host.",name:"source",type:String},zm,ks]},sZ={commandPath:["advisories","bloom"],description:"Print the local osv-bloom cache freshness: built-at, filter size, m/k parameters, set digest",examples:[["vis advisories bloom status","Human-readable summary"],["vis advisories bloom status --format json","Machine-readable for CI freshness checks"]],group:"Security & Health",loader:le(()=>import("./bloom-status.js"),"advisoriesBloomStatusExecute"),name:"status",options:[zm,ks]},rZ=[nZ,oZ,aZ,tZ,sZ],uZ={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target only on projects affected by recent changes",examples:[["vis affected build","Run build on affected projects"],["vis affected test --base=main","Run tests on projects changed since main"],["vis affected destroy --reverse","Tear down affected projects leaves-first"],["vis affected build --sparse-checkout","Print a git sparse-checkout cone set for the affected projects and exit"]],group:"Run & Execute",loader:()=>import("./handler3.js"),name:"affected",options:[{description:"Git base ref for comparison. When omitted, vis auto-resolves it from the active CI provider (GitHub/GitLab/Buildkite/CircleCI) or falls back to `git merge-base HEAD origin/<defaultBase>` locally. Default base branch comes from `vis.config.ts#defaultBase` (or `main`).",name:"base",type:String},{description:"Git head ref for comparison. When omitted, auto-resolves from CI env (e.g. `$GITHUB_SHA`) or defaults to `HEAD`.",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep" — controls how far to include dependents of changed projects',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep" — controls how far to include dependencies of changed projects',name:"upstream",type:String},{defaultValue:3,description:"Maximum number of parallel tasks",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Instead of running, print the affected project roots as a git sparse-checkout cone set (one path per line) and exit. Pipe into `git sparse-checkout set --stdin` to shrink huge-monorepo CI checkouts.",name:"sparse-checkout",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},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{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:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Forwarded verbatim to the downstream `vis run` so capability-gated tasks resolve identically. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String}]},Km={description:"Output format: table or json (default: table)",name:"format",type:String},dZ={commandPath:["ai"],description:"List detected AI providers and show which one is selected",examples:[["vis ai providers","List all AI providers and their status"],["vis ai providers --format json","Output as JSON"]],group:"System",loader:le(()=>import("./handler50.js"),"aiProvidersExecute"),name:"providers",options:[Km]},lZ={commandPath:["ai"],description:"Test the best available AI provider with a quick prompt",examples:[["vis ai test","Test the selected provider"]],group:"System",loader:le(()=>import("./handler50.js"),"aiTestExecute"),name:"test",options:[]},gZ={argument:{description:"Task ID to propose a fix for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["ai"],description:"Read a failed task's logs and propose a structured patch (Phase 1: local-only, no git)",examples:[["vis ai fix @myorg/app:build","Print proposed patch for the failed task"],["vis ai fix @myorg/app:build --apply","Apply the patch to disk after confirming"],["vis ai fix @myorg/app:build --format json","Machine-readable patch output"],["vis ai fix @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"System",loader:le(()=>import("./handler50.js"),"aiFixExecute"),name:"fix",options:[Km,{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{defaultValue:!1,description:"Apply the proposed patch to disk after printing it",name:"apply",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt before applying",name:"yes",type:Boolean}]},hZ={description:"AI-assisted commands: provider detection and failure-fix proposals (cache management lives under `vis cache`)",examples:[["vis ai","List all AI subcommands"],["vis ai discover-help","Machine-readable subcommand catalogue (for AI agents)"]],group:"System",loader:le(()=>import("./handler50.js"),"aiRootExecute"),name:"ai",options:[]},cZ={commandPath:["ai"],description:"Print the machine-readable AI subcommand catalogue (JSON to stdout, designed for AI agents)",examples:[["vis ai discover-help","Emit the discovery payload as JSON"],["vis ai discover-help | jq '.subcommands[].path'","List all available paths"]],group:"System",loader:le(()=>import("./handler50.js"),"aiDiscoverHelpExecute"),name:"discover-help",options:[]},pZ={commandPath:["ai"],description:"Diagnose the most recent failed task and post a structured patch as a PR/MR comment (or Buildkite annotation)",examples:[["vis ai heal","Heal the most recent failure"],["vis ai heal --dry-run","Propose a patch but skip apply / validate / post"],["vis ai heal --run 2026-04-28T...","Heal a specific historical run"]],group:"System",loader:le(()=>import("./heal.js").then(e=>e.h),"aiHeal"),name:"heal",options:[{defaultValue:!1,description:"Show the proposal and exit without applying or posting it",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},vZ={commandPath:["ai","heal"],description:"Re-run the proposed fix and commit it to the PR/MR branch when validation passes",examples:[["vis ai heal accept","Triggered automatically by a `/vis heal accept` PR comment (GitHub/GitLab) or a Buildkite block-step unblock"]],group:"System",loader:le(()=>import("./heal-accept.js"),"aiHealAccept"),name:"accept",options:[{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},qm=[hZ,cZ,dZ,lZ,gZ,pZ,vZ],TSe=Object.defineProperty({__proto__:null,default:qm},Symbol.toStringTag,{value:"Module"}),yZ={argument:{description:"Package name to analyze (e.g., react)",name:"package",required:!0,type:String},description:"Analyze a single package update with AI",examples:[["vis analyze react","Analyze updating react to latest"],["vis analyze react 19.0.0","Analyze updating react to specific version"],["vis analyze react --ai-type security","Run security-focused analysis"],["vis analyze react --format json","Output as JSON"]],group:"System",loader:()=>import("./handler4.js"),name:"analyze",options:[{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Check for known security vulnerabilities",name:"security",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]},fZ={description:"Review and approve dependencies with build scripts",examples:[["vis approve-builds","Scan and list unapproved build scripts"],["vis approve-builds --all","Approve all pending builds (pnpm)"],["vis approve-builds --write","Write unapproved entries into vis.config.ts security.policies.installScripts.allow"],["vis approve-builds --sync-native","Sync allowBuilds to native PM config"]],group:"Security & Health",loader:()=>import("./handler51.js"),name:"approve-builds",options:[{defaultValue:!1,description:"Approve all pending builds without prompting (pnpm only)",name:"all",type:Boolean},{defaultValue:!1,description:"Force vis scanning even for pnpm (instead of delegating)",name:"scan",type:Boolean},{defaultValue:!1,description:"Sync allowBuilds to native PM config (bun: trustedDependencies, npm: .npmrc, yarn: .yarnrc.yml)",name:"sync-native",type:Boolean},{defaultValue:!1,description:"Write unapproved entries directly into vis.config.ts security.policies.installScripts.allow (LavaMoat 'auto' parity)",name:"write",type:Boolean}]},Um={description:"Output format: table, json, or ndjson (default: table). json/ndjson go to stdout, logs to stderr.",name:"format",type:String},mZ={commandPath:["attest"],description:"Verify inbound provenance + registry signatures across the locked dependency graph and gate on regressions",examples:[["vis attest verify","Check every locked dep for provenance regressions and signature problems"],["vis attest verify --prod-only","Skip devDependencies"],["vis attest verify --format json","Machine-readable findings for CI (Axis A)"],["vis attest verify --fail-on error","Exit non-zero only on error-severity findings (default: any finding)"]],group:"Security & Health",loader:le(()=>import("./handler5.js"),"attestVerifyExecute"),name:"verify",options:[Um,{defaultValue:!1,description:"Skip devDependencies — verify the production graph only.",name:"prod-only",type:Boolean},{description:"Severity that triggers a non-zero exit: 'warning' (any finding, default) or 'error'.",name:"fail-on",type:String},{description:"Comma-separated package names to exclude from both marshalls.",name:"allowlist",type:String}]},bZ={argument:{description:"Path to the built artifact to attest (e.g. dist/app.tgz). Its sha256 becomes the in-toto subject digest.",name:"subject",type:String},description:"Build an in-toto SLSA v1 provenance statement for an artifact and keyless-sign it via Sigstore",examples:[["vis attest dist/app.tgz","Emit dist/app.tgz.sigstore (keyless-signed in CI)"],["vis attest dist/app.tgz --output attest.sigstore","Write the bundle to a specific path"],["vis attest dist/app.tgz --predicate slsaProvenance","Predicate type (default: slsaProvenance)"],["vis attest dist/app.tgz --require-signing","Fail instead of skip-with-warn when no ambient OIDC (outside CI)"],["vis attest dist/app.tgz --format json","Print the signed bundle summary as JSON (Axis A)"]],group:"Security & Health",loader:le(()=>import("./handler5.js"),"attestEmitExecute"),name:"attest",options:[Um,{description:"Write the serialized Sigstore bundle here (default: <subject>.sigstore).",name:"output",type:String},{description:"Predicate type: 'slsaProvenance' (default, https://slsa.dev/provenance/v1).",name:"predicate",type:String},{defaultValue:!1,description:"Error instead of skip-with-warn when no ambient OIDC token is available (i.e. outside CI).",name:"require-signing",type:Boolean}]},wZ=[bZ,mZ],jZ={description:"Audit installed packages for vulnerabilities and supply chain risks",examples:[["vis audit","Full audit of all installed packages"],["vis audit --severity high","Show only high/critical issues"],["vis audit --format json","Output as JSON for CI integration"],["vis audit --format sarif","Output SARIF 2.1.0 for code-scanning uploads"],["vis audit --format csaf","Output CSAF 2.0 csaf_vex for enterprise vuln pipelines"],["vis audit --format cyclonedx-vex","Output a CycloneDX 1.7 BOM with vulnerabilities[] (SBOM + VEX)"],["vis audit --format gitlab","Output a GitLab dependency-scanning report (gl-dependency-scanning.json)"],["vis audit --format junit","Output a Surefire-compatible JUnit XML report"],["vis audit --report report.html","Write a self-contained HTML report to ./report.html"],["vis audit --usage","Only report vulnerabilities in statically-imported packages"],["vis audit --offline","Query the local OSV cache only (no network)"],["vis audit --offline --db ./vendor.sqlite","Use a specific advisory DB"],["vis audit --ecosystem npm,pypi","Scan multiple OSV ecosystems (npm, pypi, crates.io, maven, go, rubygems)"],["vis audit --prod-only","Skip devDependencies"],["vis audit --fail-on high","Exit non-zero on any high or critical finding"],["vis audit --show-fixes","Print fix-suggestion lines (no apply, no rescan)"],["vis audit --fix","Apply direct-dep upgrades for vulnerable packages, then rescan (dry-run preview by default)"],["vis audit --fix --yes","Skip the confirmation prompt and run the upgrades immediately"],["vis audit --fix --allow-major","Permit major-version bumps when the lowest fix is outside the existing range"],["vis audit --fix-transitive","Write PM-specific overrides for vulnerable transitives (dry-run preview by default)"],["vis audit --exit-code","Exit with code 1 if issues found (for CI)"],["vis audit --show-accepted","Include acknowledged risks in output"],["vis audit --sync","Sync accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)"],["vis audit --policies license,vulnerability","Run only the named policies (default: every configured policy)"],["vis audit --policies none","Skip the policy engine entirely"],["vis audit --explain","Add a plain-English AI explanation under every finding (auto-detects an installed AI CLI)"],["vis audit --explain CVE-2021-23337","Explain only the finding with this CVE/GHSA id"],["vis audit --explain 2","Explain only the 2nd finding"]],group:"Security & Health",loader:()=>import("./handler72.js"),name:"audit",options:[{description:"Minimum severity to report: low, medium, high, critical (default: low)",name:"severity",type:String},{description:"Output format: table, json, sarif, csaf, cyclonedx-vex, gitlab, or junit (default: table)",name:"format",type:String},{description:"Write a self-contained HTML report to this path. Auto-opens in a TTY when not in CI.",name:"report",type:String},{defaultValue:!1,description:"Only report vulnerabilities in statically-imported packages (reachability filter).",name:"usage",type:Boolean},{defaultValue:!1,description:"Disable the reachability filter even if enabled in config.",name:"no-usage",type:Boolean},{defaultValue:!1,description:"Query the local OSV advisory cache only — no network calls. Errors if the cache is missing.",name:"offline",type:Boolean},{description:"Override the offline advisory DB path (default: <cache>/vis/advisories/db.sqlite).",name:"db",type:String},{description:"Comma-separated list of OSV ecosystems to scan (default: npm). Supported: npm, pypi, crates.io (or 'cargo'), maven, go, rubygems. Non-npm ecosystems require --offline (online OSV path is npm-only).",name:"ecosystem",type:String},{defaultValue:!1,description:"Skip devDependencies — scan production graph only.",name:"prod-only",type:Boolean},{description:"Exit non-zero when any finding is at this severity or higher. One of: low, medium, high, critical.",name:"fail-on",type:String},{defaultValue:!1,description:"Print fix-suggestion lines for each finding (no apply, no rescan)",name:"show-fixes",type:Boolean},{defaultValue:!1,description:"Apply direct-dep fixes for vulnerable packages by running the active PM update command, then rescan",name:"fix",type:Boolean},{defaultValue:!1,description:"Apply transitive fixes by writing PM-specific overrides (pnpm-workspace.yaml / package.json overrides / resolutions)",name:"fix-transitive",type:Boolean},{defaultValue:!1,description:"Skip confirmation prompt for --fix / --fix-transitive (required in CI)",name:"yes",type:Boolean},{defaultValue:!1,description:"Allow --fix to bump a direct dep across a major version when the lowest fix is outside the existing range",name:"allow-major",type:Boolean},{defaultValue:!1,description:"Exit with code 1 if any issues found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Include acknowledged (accepted risk) issues in output",name:"show-accepted",type:Boolean},{defaultValue:!1,description:"Sync vis accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)",name:"sync",type:Boolean},{description:"Comma-separated list of supply-chain policies to evaluate (default: every configured policy). Use 'none' to skip the engine entirely, 'all' to force the full set. Known: malware, firstSeen, unexpectedDeps, publisherChange, installScripts, score, vulnerability, license.",name:"policies",type:String},{description:"Audit backend: 'auto' (default, delegates to 'aube audit' when aube is the installer), 'aube' (force delegate), or 'vis' (always use vis's OSV/Socket scanner).",name:"backend",type:String},{description:"Add a plain-English AI explanation to findings. Bare flag explains all findings at/above --severity; pass a finding index (e.g. 2) or a CVE/GHSA id to explain just one. Auto-detects an installed AI CLI; mutually exclusive with --offline.",name:"explain",type:String}]},Ss={description:"Cache directory (overrides config and default). Relative paths are resolved against the workspace root.",name:"cache-dir",type:String},zr={description:"Cache scope: 'shared' (default — main worktree's cache), 'worktree' (this checkout's local cache), or 'all' (both)",name:"scope",type:String},Vm={description:"Cache type: 'task' (workspace task cache), 'ai' (AI response cache), 'socket' (Socket.dev reports), 'deps-dev' (Google deps.dev reports), or 'all' (default)",name:"type",type:String},kZ={commandPath:["cache"],description:"List all cache entries",examples:[["vis cache list","List all cache entries"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheListExecute"),name:"list",options:[Ss,zr,{description:"Output format: table or json (default: table)",name:"format",type:String}]},SZ={commandPath:["cache"],description:"Remove cache entries (defaults to all stores: workspace task cache, AI responses, Socket.dev reports)",examples:[["vis cache clean","Remove all cache entries from every store"],["vis cache clean --type=ai","Clear only the AI response cache"],["vis cache clean --type=task","Clear only the workspace task cache"],["vis cache clean --dry-run","Preview what clean would remove"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheCleanExecute"),name:"clean",options:[Ss,Vm,{defaultValue:!1,description:"Preview without deleting",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt for out-of-workspace cache directories",name:"force",type:Boolean}]},LZ={commandPath:["cache"],description:"Remove old and oversized cache entries",examples:[["vis cache prune","Remove old and oversized entries"],["vis cache prune --max-age-days=3 --max-size=500MB","Prune with custom limits"],["vis cache prune --keep-last=30","Keep only the 30 most recent entries"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cachePruneExecute"),name:"prune",options:[Ss,zr,{description:"Remove entries older than N days",name:"max-age-days",type:Number},{description:"Evict oldest entries until cache is under this size (e.g. 500MB)",name:"max-size",type:String},{description:"Keep only the N most recent entries (sorted newest-first by mtime)",name:"keep-last",type:Number}]},CZ={commandPath:["cache"],description:"Print on-disk footprint and stats for one or more cache stores (task / ai / socket)",examples:[["vis cache size","Show stats for every cache store"],["vis cache size --type=ai","Show only the AI response cache (entries, size, oldest, newest)"],["vis cache size --type=task --format=json","Machine-readable task cache size"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheSizeExecute"),name:"size",options:[Ss,zr,Vm,{description:"Output format: table or json (default: table)",name:"format",type:String}]},Ug={description:"Output format: table or json (default: table)",name:"format",type:String},eb={description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},YZ={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Explain why a task missed the cache by diffing hash inputs against the previous run",examples:[["vis cache why @myorg/app:build","Show which inputs changed since the last run"],["vis cache why @myorg/app:build --json","Machine-readable output for CI"],["vis cache why @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheWhyExecute"),name:"why",options:[Ug,eb]},$Z={argument:{description:"Task ID to print the hash for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Print the recorded hash and per-input hash details for a task",examples:[["vis cache hash @myorg/app:build","Show the resolved hash + contributing inputs"],["vis cache hash @myorg/app:build --json","Machine-readable output"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheHashExecute"),name:"hash",options:[Ug,eb]},ZZ={argument:{description:"Task ID to verify (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Verify cache restore fidelity: extract the cached entry into a tmp directory and diff each file's content, mode, and mtime against the live workspace. Exits 1 on any drift (changed content, mode, mtime) or if a cached output is missing from the workspace. With --scope=all, the first cache directory containing the task is used.",examples:[["vis cache verify @myorg/app:build","Diff cached outputs vs live workspace files"],["vis cache verify @myorg/app:build --format=json","Machine-readable diff (status: ok | drift)"],["vis cache verify @myorg/app:build --cache-dir=.alt-cache","Verify against a non-default cache directory"],["vis cache verify @myorg/app:build --scope=all","Search shared and worktree caches for the task"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheVerifyExecute"),name:"verify",options:[Ss,zr,Ug]},JZ={commandPath:["cache"],description:"Probe the configured remote cache (HTTP HEAD or REAPI Capabilities) and report reachability, latency, and negotiated capabilities",examples:[["vis cache doctor","Probe the remoteCache configured in vis.config.ts"],["vis cache doctor --url=grpcs://cache.example.com:443 --backend=reapi","Override URL/backend ad-hoc"],["vis cache doctor --json","Machine-readable output"]],group:"Workspace",loader:le(()=>import("./doctor-probe.js"),"cacheDoctorExecute"),name:"doctor",options:[{description:"Override remote cache URL (otherwise read from vis.config.ts remoteCache.url, or TURBO_API env var)",name:"url",type:String},{description:"Override backend selector: 'http' or 'reapi'",name:"backend",type:String},{description:"Output format: table or json (default: table)",name:"format",type:String},{defaultValue:5e3,description:"Probe timeout in milliseconds (default: 5000)",name:"timeout",type:Number}]},xZ=[kZ,SZ,LZ,CZ,YZ,$Z,ZZ,JZ],TZ={alias:["c","outdated"],argument:{description:"Specific packages to check (checks all if omitted)",name:"packages",type:String},description:"Check for outdated dependencies, security vulnerabilities, and supply chain settings",examples:[["vis check","Check all catalog dependencies"],["vis check react","Check specific packages"],["vis check --target minor","Only show minor/patch updates"],["vis check --exclude '@types/*'","Exclude packages by pattern"],["vis check --no-security","Skip vulnerability scanning"],["vis check --security-config","Audit supply chain security settings"],["vis check --security-config --sync","Sync security config to pnpm-workspace.yaml"]],group:"Security & Health",loader:()=>import("./handler6.js"),name:"check",options:[{alias:"t",description:"Update target: latest, minor, or patch (default: latest)",name:"target",type:String},{description:"Glob pattern to include packages (repeatable)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions",name:"prerelease",type:Boolean},{defaultValue:!1,description:"Skip security vulnerability scanning",name:"no-security",type:Boolean},{defaultValue:!1,description:"Audit supply chain security settings",name:"security-config",type:Boolean},{defaultValue:!1,description:"Sync security settings to pnpm-workspace.yaml (pnpm only, requires --security-config)",name:"sync",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Exit with code 1 if outdated dependencies found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend",name:"ai-type",type:String},{alias:"D",conflicts:"prod",description:"Check only devDependencies (npm/yarn mode)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Check only dependencies (npm/yarn mode)",name:"prod",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in outdated checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry",name:"include-internal",type:Boolean}]},DZ={argument:{description:"Comma-separated list of targets to run (e.g., lint,test,build)",name:"targets",type:String},description:"Run affected targets in a CI-optimized pipeline",examples:[["vis ci lint,test,build","Run lint, test, and build on affected projects"],["vis ci test --base=origin/main","Override the base ref"],["vis ci build --no-install","Skip the install step (assume deps already present)"],["vis ci build --parallel=6","Increase concurrency"]],group:"Run & Execute",loader:()=>import("./handler7.js"),name:"ci",options:[{defaultValue:!0,description:"Install dependencies before running targets (use --no-install to skip)",name:"install",type:Boolean},{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:"Git base ref for affected detection (default: auto-detected from CI env)",name:"base",type:String},{description:"Git head ref for affected detection (default: HEAD)",name:"head",type:String},{defaultValue:"none",description:"Upstream scope: none | direct | deep",name:"upstream",type:String},{defaultValue:"deep",description:"Downstream scope: none | direct | deep",name:"downstream",type:String},{defaultValue:4,description:"Maximum number of parallel tasks per target",name:"parallel",type:Number},{description:'Partition tasks for distributed CI (e.g., "1/4")',name:"partition",type:String},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String}]},BZ={argument:{description:"Project name to check (required)",name:"project",type:String},commandPath:["ci"],description:'Exit with inverted codes for CI "Ignored Build Step" gating (Vercel/Netlify)',examples:[["vis ci ignore my-app","Check if my-app is affected and decide whether to build"],["vis ci ignore my-app --base $VERCEL_GIT_PREVIOUS_SHA","Explicit base ref"],["vis ci ignore my-app --json","Emit the decision as JSON instead of text"],["vis ci ignore my-app --verbose","Print debug info about the decision path"],["vis ci ignore my-app --exit-zero-on-build","Normal exit semantics (0=build, 0=skip)"]],group:"Run & Execute",loader:()=>import("./handler52.js"),name:"ignore",options:[{description:"Git base ref for comparison. Defaults to CI provider env vars, then HEAD~1.",name:"base",type:String},{defaultValue:"HEAD",description:"Git head ref for comparison",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep"',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep"',name:"upstream",type:String},{defaultValue:!1,description:"Emit the decision as JSON on stdout instead of human text",name:"json",type:Boolean},{defaultValue:!1,description:"Exit 0 on build (normal semantics) instead of 1 (inverted Vercel/Netlify semantics)",name:"exit-zero-on-build",type:Boolean},{defaultValue:!1,description:"Enable verbose debug output",name:"verbose",type:Boolean}]},XZ={description:"Remove node_modules from all workspace projects",examples:[["vis clean","Remove all node_modules directories"],["vis clean --lockfile","Also remove lockfiles"],["vis clean --empty-packages","Also remove workspace directories that have no package.json"],["vis clean --dry-run","Preview what would be removed"]],group:"Workspace",loader:()=>import("./handler8.js"),name:"clean",options:[{alias:"l",defaultValue:!1,description:"Also remove lockfiles (pnpm-lock.yaml, package-lock.json, etc.)",name:"lockfile",type:Boolean},{alias:"e",defaultValue:!1,description:"Also remove stale workspace directories that match a workspace pattern but have no package.json",name:"empty-packages",type:Boolean},{defaultValue:!1,description:"Preview what would be removed without deleting",name:"dry-run",type:Boolean}]},HZ={argument:{description:"Template to use (e.g., vis:app, create-vite, user/repo) — omit for interactive mode",name:"template",type:String},description:"Create a new project from a template",examples:[["vis create","Interactive project scaffolding"],["vis create vis:monorepo my-workspace","Create a monorepo workspace"],["vis create vis:app my-app","Scaffold a Vite application"],["vis create vis:library my-lib","Create a TypeScript library"],["vis create vite my-app -- --template react-ts","Use create-vite with React TypeScript"],["vis create user/repo my-project","Clone a GitHub template"],["vis create --list","Show available templates"]],group:"Scaffold & Config",loader:()=>import("./handler69.js"),name:"create",options:[{defaultValue:!1,description:"Show available templates",name:"list",type:Boolean},{description:"Generate editor configs (vscode)",name:"editor",type:String},{defaultValue:!1,description:"Initialize a git repository",name:"git-init",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts",name:"no-interactive",type:Boolean}]},ib=(e,i,n)=>{const o=t=>Ff(t)?t:Ha(e,t);if(i&&i.length>0)return o(i);if(n&&n.length>0)return o(n);const a=process.env.VIS_CACHE_DIRECTORY;return a&&a.length>0?o(a):Ha(e,em)},MZ=(e,i)=>i===!1?e:pY(e)??e,Kp=(e,i,n,o)=>{const a=i??n??process.env.VIS_CACHE_DIRECTORY;if(a&&a.length>0)return ib(e,i,n);const t=MZ(e,o);return Ha(t,em)},PZ=/[^\w.-]+/g,NZ=/^-+|-+$/g,EZ=e=>e.trim().replaceAll(PZ,"-").replaceAll(NZ,"").slice(0,64),RZ=e=>{try{const i=rY("git",["rev-parse","--abbrev-ref","HEAD"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return!i||i==="HEAD"?void 0:i}catch{return}},DSe=(e,i,n)=>{if(n!==!0)return e;const o=RZ(i);if(!o)return e;const a=EZ(o);return a.length===0?e:Ha(e,"branches",a)},OZ=(e,i)=>{const n=ws(i,e);return n.length===0?!1:n!==".."&&!n.startsWith("../")&&!Ff(n)},AZ="x-hono-already-sent";var vn=class extends Error{constructor(i,n){super(i,n),this.name="RequestError"}};const GZ=/^\/[!#$&-;=?-\[\]_a-z~]*$/,FZ=/\/\.\.?(?:[/?#]|$)/,QZ=/^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/,WZ=(e,i,n)=>{const o=`${e}://${i}${n}`;if(QZ.test(i)){if(n.length===0)return o+"/";if(n.charCodeAt(0)!==47)throw new vn("Invalid URL");return!GZ.test(n)||FZ.test(n)?new URL(o).href:o}else{const a=new URL(o);if(a.hostname.length!==i.length&&a.hostname!==(i.includes(":")?i.replace(/:\d+$/,""):i).toLowerCase())throw new vn("Invalid host header");return a.href}},IZ=e=>e instanceof vn?e:new vn(e.message,{cause:e}),_Z=global.Request;var Na=class extends _Z{constructor(i,n){if(typeof i=="object"&&oo in i){const o=n!==void 0&&"body"in n&&n.body!=null;if(i[Mn]&&!o)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");i=i[oo]()}typeof n?.body?.getReader<"u"&&(n.duplex??="half"),super(i,n)}};const nb=e=>{const i=[],n=e.rawHeaders;for(let o=0,a=n.length;o<a;o+=2){const t=n[o];t.charCodeAt(0)!==58&&i.push([t,n[o+1]])}return new Headers(i)},ob=Symbol("wrapBodyStream"),zZ=(e,i,n,o,a)=>{const t={method:e,headers:n,signal:a.signal};if(e==="TRACE"){t.method="GET";const s=new Na(i,t);return Object.defineProperty(s,"method",{get(){return"TRACE"}}),s}if(!(e==="GET"||e==="HEAD"))if("rawBody"in o&&o.rawBody instanceof Buffer)t.body=new ReadableStream({start(s){s.enqueue(o.rawBody),s.close()}});else if(o[ob]){let s;t.body=new ReadableStream({async pull(r){try{s||=xl.toWeb(o).getReader();const{done:u,value:d}=await s.read();u?r.close():r.enqueue(d)}catch(u){r.error(u)}}})}else t.body=xl.toWeb(o);return new Na(i,t)},oo=Symbol("getRequestCache"),Bn=Symbol("requestCache"),Ea=Symbol("incomingKey"),Kt=Symbol("urlKey"),ab=Symbol("methodKey"),tb=Symbol("headersKey"),kt=Symbol("abortControllerKey"),El=Symbol("getAbortController"),Rl=Symbol("abortRequest"),$a=Symbol("bodyBuffer"),Fs=Symbol("bodyReadPromise"),Mn=Symbol("bodyConsumedDirectly"),qp=Symbol("bodyLockReader"),At=Symbol("abortReason"),sb=()=>new TypeError("Body is unusable"),Ls=()=>Promise.reject(sb()),KZ=new TextDecoder,qZ=e=>{if(e[Mn])return Ls();e[Mn]=!0},UZ=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),VZ=e=>(e[tb]||=nb(e[Ea])).get("content-type")||"",eJ=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,iJ=e=>{if(typeof e!="string"||e.length===0)return"GET";switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return e}const i=e.toUpperCase();switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return i;default:return e}},nJ=e=>{if(!eJ.test(e))return new TypeError(`'${e}' is not a valid HTTP method.`);const i=e.toUpperCase();if(i==="CONNECT"||i==="TRACK"||i==="TRACE"&&e!=="TRACE")return new TypeError(`'${e}' HTTP method is unsupported.`)},Vg=(e,i,n)=>{if(e[Mn])return Ls();const o=e.method;if(o==="GET"||o==="HEAD")return e[oo]()[i]();const a=nJ(o);if(a)return Promise.reject(a);if(e[Bn]&&o!=="TRACE")return e[Bn][i]();const t=qZ(e);if(t)return t;const s=oJ(e);if(s){const r=Promise.resolve(n(s,e));return e[$a]=void 0,r}return aJ(e).then(r=>{const u=n(r,e);return e[$a]=void 0,u})},oJ=e=>{const i=e[Ea];if("rawBody"in i&&i.rawBody instanceof Buffer)return i.rawBody},aJ=e=>{if(e[$a])return Promise.resolve(e[$a]);if(e[Fs])return e[Fs];const i=e[Ea];if(xl.isDisturbed(i))return Ls();const n=new Promise((o,a)=>{const t=[];let s=!1;const r=c=>{s||(s=!0,h(),c())},u=c=>{t.push(Buffer.isBuffer(c)?c:Buffer.from(c))},d=()=>{r(()=>{const c=t.length===1?t[0]:Buffer.concat(t);e[$a]=c,o(c)})},l=c=>{r(()=>{a(c)})},g=()=>{if(i.readableEnded){d();return}r(()=>{if(i.errored){a(i.errored);return}const c=e[At];if(c!==void 0){a(c instanceof Error?c:new Error(String(c)));return}a(new Error("Client connection prematurely closed."))})},h=()=>{i.off("data",u),i.off("end",d),i.off("error",l),i.off("close",g),e[Fs]=void 0};i.on("data",u),i.on("end",d),i.on("error",l),i.on("close",g),queueMicrotask(()=>{s||(i.readableEnded?d():i.errored?l(i.errored):i.destroyed&&g())})});return e[Fs]=n,n},jn={get method(){return this[ab]},get url(){return this[Kt]},get headers(){return this[tb]||=nb(this[Ea])},[Rl](e){this[At]===void 0&&(this[At]=e);const i=this[kt];i&&!i.signal.aborted&&i.abort(e)},[El](){return this[kt]||=new AbortController,this[At]!==void 0&&!this[kt].signal.aborted&&this[kt].abort(this[At]),this[kt]},[oo](){const e=this[El]();if(this[Bn])return this[Bn];const i=this.method;if(this[Mn]&&!(i==="GET"||i==="HEAD")){this[$a]=void 0;const n={method:i==="TRACE"?"GET":i,headers:this.headers,signal:e.signal};i!=="TRACE"&&(n.body=new ReadableStream({start(a){a.close()}}),n.duplex="half");const o=new Na(this[Kt],n);return i==="TRACE"&&Object.defineProperty(o,"method",{get(){return"TRACE"}}),this[Bn]=o}return this[Bn]=zZ(this.method,this[Kt],this.headers,this[Ea],e)},get body(){if(!this[Mn])return this[oo]().body;const e=this[oo]();return!this[qp]&&e.body&&(this[qp]=e.body.getReader()),e.body},get bodyUsed(){return this[Mn]?!0:this[Bn]?this[Bn].bodyUsed:!1}};Object.defineProperty(jn,"signal",{get(){return this[El]().signal}});["cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","keepalive"].forEach(e=>{Object.defineProperty(jn,e,{get(){return this[oo]()[e]}})});["clone","formData"].forEach(e=>{Object.defineProperty(jn,e,{value:function(){if(this[Mn]){if(e==="clone")throw sb();return Ls()}return this[oo]()[e]()}})});Object.defineProperty(jn,"text",{value:function(){return Vg(this,"text",e=>KZ.decode(e))}});Object.defineProperty(jn,"arrayBuffer",{value:function(){return Vg(this,"arrayBuffer",e=>UZ(e))}});Object.defineProperty(jn,"blob",{value:function(){return Vg(this,"blob",(e,i)=>{const n=VZ(i),o=n?{headers:{"content-type":n}}:void 0;return new Response(e,o).blob()})}});Object.defineProperty(jn,"json",{value:function(){return this[Mn]?Ls():this.text().then(JSON.parse)}});Object.defineProperty(jn,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,i,n){return`Request (lightweight) ${n({method:this.method,url:this.url,headers:this.headers,nativeRequest:this[Bn]},{...i,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(jn,Na.prototype);const tJ=(e,i)=>{const n=Object.create(jn);n[Ea]=e,n[ab]=iJ(e.method);const o=e.url||"";if(o[0]!=="/"&&(o.startsWith("http://")||o.startsWith("https://"))){if(e instanceof zt)throw new vn("Absolute URL for :path is not allowed in HTTP/2");try{n[Kt]=new URL(o).href}catch(s){throw new vn("Invalid absolute URL",{cause:s})}return n}const a=(e instanceof zt?e.authority:e.headers.host)||i;if(!a)throw new vn("Missing host header");let t;if(e instanceof zt){if(t=e.scheme,!(t==="http"||t==="https"))throw new vn("Unsupported scheme")}else t=e.socket&&e.socket.encrypted?"https":"http";try{n[Kt]=WZ(t,a,o)}catch(s){throw s instanceof vn?s:new vn("Invalid URL",{cause:s})}return n},io="text/plain; charset=UTF-8",Ol=Symbol("responseCache"),wa=Symbol("getResponseCache"),Hn=Symbol("cache"),eh=global.Response;var fn=class rb{#n;#i;[wa](){const i=this[Hn],n=i&&i[2]instanceof Headers?i[2]:void 0;return delete this[Hn],this[Ol]||=new eh(this.#n,n?{...this.#i,headers:n}:this.#i)}constructor(i,n){let o;if(this.#n=i,n instanceof rb){const a=n[Ol];if(a){this.#i=a,this[wa]();return}else this.#i=n.#i,o=new Headers(n.headers)}else this.#i=n;(i==null||typeof i=="string"||typeof i?.getReader<"u"||i instanceof Blob||i instanceof Uint8Array)&&(this[Hn]=[n?.status||200,i??null,o||n?.headers])}get headers(){const i=this[Hn];return i?(i[2]instanceof Headers||(i[2]=new Headers(i[2]||(i[1]===null?void 0:{"content-type":io}))),i[2]):this[wa]().headers}get status(){return this[Hn]?.[0]??this[wa]().status}get ok(){const i=this.status;return i>=200&&i<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(fn.prototype,e,{get(){return this[wa]()[e]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(fn.prototype,e,{value:function(){return this[wa]()[e]()}})});Object.defineProperty(fn.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,i,n){return`Response (lightweight) ${n({status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[Ol]},{...i,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(fn,eh);Object.setPrototypeOf(fn.prototype,eh.prototype);const sJ=/^https?:\/\/[!#-;=?-[\]_a-z~A-Z]+$/,rJ=e=>e instanceof URL?e.href:sJ.test(e)?e:new URL(e).href,uJ=new Set([301,302,303,307,308]);Object.defineProperty(fn,"redirect",{value:function(e,i=302){if(!uJ.has(i))throw new RangeError("Invalid status code");return new fn(null,{status:i,headers:{location:rJ(e)}})},writable:!0,configurable:!0});Object.defineProperty(fn,"json",{value:function(e,i){const n=JSON.stringify(e);if(n===void 0)throw new TypeError("The data is not JSON serializable");const o=i?.headers;let a;return o?(a=new Headers(o),a.has("content-type")||a.set("content-type","application/json")):a={"content-type":"application/json"},new fn(n,{status:i?.status??200,statusText:i?.statusText,headers:a})},writable:!0,configurable:!0});async function dJ(e){return Promise.race([e,Promise.resolve().then(()=>Promise.resolve(void 0))])}function ub(e,i,n){const o=r=>{e.cancel(r).catch(()=>{})};return i.on("close",o),i.on("error",o),(n??e.read()).then(s,a),e.closed.finally(()=>{i.off("close",o),i.off("error",o)});function a(r){r&&i.destroy(r)}function t(){e.read().then(s,a)}function s({done:r,value:u}){try{if(r)i.end();else if(!i.write(u))i.once("drain",t);else return e.read().then(s,a)}catch(d){a(d)}}}function Up(e,i){if(e.locked)throw new TypeError("ReadableStream is locked.");return i.destroyed?void 0:ub(e.getReader(),i)}const Al=(e,i)=>{const n={};if(e instanceof Headers||(e=new Headers(e??void 0)),e.has("set-cookie")){const o=[];for(const[a,t]of e)a==="set-cookie"?o.push(t):n[a]=t;o.length>0&&(n["set-cookie"]=o)}else for(const[o,a]of e)n[o]=a;return i&&(n["content-type"]??=i),n},$r=Symbol("outgoingEnded"),Vp=Symbol("incomingDraining"),lJ=500,gJ=64*1024*1024,db=e=>{const i=e;if(e.destroyed||i[Vp])return;if(i[Vp]=!0,e instanceof zt){try{e.stream?.close?.(jY.NGHTTP2_NO_ERROR)}catch{}return}let n=0;const o=()=>{clearTimeout(t),e.off("data",s),e.off("end",o),e.off("error",o)},a=()=>{o();const r=e.socket;r&&!r.destroyed&&r.destroySoon()},t=setTimeout(a,lJ);t.unref?.();const s=r=>{n+=r.length,n>gJ&&a()};e.on("data",s),e.on("end",o),e.on("error",o),e.resume()},hJ=(e,i,n,o)=>()=>{i.errored?e[Rl](i.errored.toString()):n.writableFinished||e[Rl]("Client connection prematurely closed."),o&&!i.readableEnded&&setTimeout(()=>{i.readableEnded||setTimeout(()=>{db(i)})})},cJ=e=>{if(!(Hn in e))return!1;const i=e[Hn][1];return i===null||typeof i=="string"||i instanceof Uint8Array},pJ=()=>new Response(null,{status:400}),lb=e=>new Response(null,{status:e instanceof Error&&(e.name==="TimeoutError"||e.constructor.name==="TimeoutError")?504:500}),Zr=(e,i)=>{const n=e instanceof Error?e:new Error("unknown error",{cause:e});n.code==="ERR_STREAM_PREMATURE_CLOSE"?console.info("The user aborted a request."):(console.error(e),i.headersSent||i.writeHead(500,{"Content-Type":"text/plain"}),i.end(`Error: ${n.message}`),i.destroy(n))},Gl=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},gb=async(e,i)=>{let[n,o,a]=e[Hn];if(!a){o===null?(i.writeHead(n),i.end()):typeof o=="string"?(i.writeHead(n,{"Content-Type":io,"Content-Length":Buffer.byteLength(o)}),i.end(o)):o instanceof Uint8Array?(i.writeHead(n,{"Content-Type":io,"Content-Length":o.byteLength}),i.end(o)):o instanceof Blob?(i.writeHead(n,{"Content-Type":io,"Content-Length":o.size}),i.end(new Uint8Array(await o.arrayBuffer()))):(i.writeHead(n,{"Content-Type":io}),Gl(i),await Up(o,i)?.catch(s=>Zr(s,i))),i[$r]?.();return}let t=!1;if(a instanceof Headers)t=a.has("content-length"),a=Al(a,o===null?void 0:io);else if(Array.isArray(a)){const s=new Headers(a);t=s.has("content-length"),a=Al(s,o===null?void 0:io)}else for(const s in a)if(s.length===14&&s.toLowerCase()==="content-length"){t=!0;break}t||(typeof o=="string"?a["Content-Length"]=Buffer.byteLength(o):o instanceof Uint8Array?a["Content-Length"]=o.byteLength:o instanceof Blob&&(a["Content-Length"]=o.size)),i.writeHead(n,a),o==null?i.end():typeof o=="string"||o instanceof Uint8Array?i.end(o):o instanceof Blob?i.end(new Uint8Array(await o.arrayBuffer())):(Gl(i),await Up(o,i)?.catch(s=>Zr(s,i))),i[$r]?.()},hb=e=>typeof e.then=="function",vJ=async(e,i,n={})=>{if(hb(e))if(n.errorHandler)try{e=await e}catch(a){const t=await n.errorHandler(a);if(!t)return;e=t}else e=await e.catch(lb);if(Hn in e)return gb(e,i);const o=Al(e.headers,e.body===null?void 0:io);if(e.body){const a=e.body.getReader(),t=[];let s=!1,r;if(o["transfer-encoding"]!=="chunked"){let u=2;for(let d=0;d<u;d++){r||=a.read();const l=await dJ(r).catch(g=>{console.error(g),s=!0});if(!l){if(d===1){await new Promise(g=>setTimeout(g)),u=3;continue}break}if(r=void 0,l.value&&t.push(l.value),l.done){s=!0;break}}s&&!("content-length"in o)&&(o["content-length"]=t.reduce((d,l)=>d+l.length,0))}i.writeHead(e.status,o),t.forEach(u=>{i.write(u)}),s?i.end():(t.length===0&&Gl(i),await ub(a,i,r))}else o[AZ]||(i.writeHead(e.status,o),i.end());i[$r]?.()},yJ=(e,i={})=>{const n=i.autoCleanupIncoming??!0;return i.overrideGlobalObjects!==!1&&global.Request!==Na&&(Object.defineProperty(global,"Request",{value:Na}),Object.defineProperty(global,"Response",{value:fn})),async(o,a)=>{let t,s,r=!1,u=!1;const d=()=>{!s||u||(u=!0,a.on("close",hJ(s,o,a,r)))};try{if(s=tJ(o,i.hostname),r=n&&!(o.method==="GET"||o.method==="HEAD"),r&&(o[ob]=!0,o instanceof zt&&(a[$r]=()=>{o.readableEnded||setTimeout(()=>{o.readableEnded||setTimeout(()=>{o.destroy(),a.destroy()})})})),t=e(s,{incoming:o,outgoing:a}),!hb(t)&&cJ(t))return r&&!o.readableEnded&&a.once("finish",()=>{o.readableEnded||db(o)}),gb(t,a);d()}catch(l){if(t)return Zr(l,a);if(i.errorHandler){if(d(),t=await i.errorHandler(s?l:IZ(l)),!t)return}else s?t=lb(l):t=pJ()}try{return await vJ(t,a,i)}catch(l){return Zr(l,a)}}},fJ=Symbol("CONNECTION_SYMBOL_KEY"),mJ=Symbol("WAIT_FOR_WEBSOCKET_SYMBOL"),bJ=new Set(["connection","content-length","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","sec-websocket-accept","sec-websocket-extensions","sec-websocket-protocol"]),cb=(e,i)=>{i&&i.forEach((n,o)=>{bJ.has(o.toLowerCase())||e.push(`${o}: ${n}`)})},ev=(e,i,n)=>{const o=["Connection: close","Content-Length: 0"];cb(o,n),e.end(`HTTP/1.1 ${i.toString()} ${wY[i]??""}\r
|
|
6
|
+
`);let n=0;for(;i[n]&&i[n].trim().match(/^(#|$)/);)n++;const o=i.length;let a=n+1;for(;a<o&&i[a].trim();)a++;return i.slice(n,a).join(" ").trim()}return jd}var mm={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},bm={web:"url",name:"url"},wm={server:"start",tests:"test"};const F$={topLevel:mm,bugs:bm,script:wm},Q$=Object.defineProperty({__proto__:null,bugs:bm,default:F$,script:wm,topLevel:mm},Symbol.toStringTag,{value:"Module"}),W$=_g(Q$);var kd,Ip;function I$(){if(Ip)return kd;Ip=1;var{URL:e}=qf,i=gY(),n=hY(),o=D$(),a=A$(),{isBuiltin:t}=Qf,s=["dependencies","devDependencies","optionalDependencies"],r=G$(),u=W$,d=y=>y.includes("@")&&y.indexOf("@")<y.lastIndexOf(".");kd={warn:function(){},fixRepositoryField:function(y){if(y.repositories&&(this.warn("repositories"),y.repository=y.repositories[0]),!y.repository)return this.warn("missingRepository");typeof y.repository=="string"&&(y.repository={type:"git",url:y.repository});var k=y.repository.url||"";if(k){var S=a.fromUrl(k);S&&(k=y.repository.url=S.getDefaultRepresentation()==="shortcut"?S.https():S.toString())}k.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",k)},fixTypos:function(y){Object.keys(u.topLevel).forEach(function(k){Object.prototype.hasOwnProperty.call(y,k)&&this.warn("typo",k,u.topLevel[k])},this)},fixScriptsField:function(y){if(y.scripts){if(typeof y.scripts!="object"){this.warn("nonObjectScripts"),delete y.scripts;return}Object.keys(y.scripts).forEach(function(k){typeof y.scripts[k]!="string"?(this.warn("nonStringScript"),delete y.scripts[k]):u.script[k]&&!y.scripts[u.script[k]]&&this.warn("typo",k,u.script[k],"scripts")},this)}},fixFilesField:function(y){var k=y.files;k&&!Array.isArray(k)?(this.warn("nonArrayFiles"),delete y.files):y.files&&(y.files=y.files.filter(function(S){return!S||typeof S!="string"?(this.warn("invalidFilename",S),!1):!0},this))},fixBinField:function(y){if(y.bin&&typeof y.bin=="string"){var k={},S;(S=y.name.match(/^@[^/]+[/](.*)$/))?k[S[1]]=y.bin:k[y.name]=y.bin,y.bin=k}},fixManField:function(y){y.man&&typeof y.man=="string"&&(y.man=[y.man])},fixBundleDependenciesField:function(y){var k="bundledDependencies",S="bundleDependencies";y[k]&&!y[S]&&(y[S]=y[k],delete y[k]),y[S]&&!Array.isArray(y[S])?(this.warn("nonArrayBundleDependencies"),delete y[S]):y[S]&&(y[S]=y[S].filter(function(J){return!J||typeof J!="string"?(this.warn("nonStringBundleDependency",J),!1):(y.dependencies||(y.dependencies={}),Object.prototype.hasOwnProperty.call(y.dependencies,J)||(this.warn("nonDependencyBundleDependency",J),y.dependencies[J]="*"),!0)},this))},fixDependencies:function(y){j(y,this.warn),w(y),this.fixBundleDependenciesField(y),["dependencies","devDependencies"].forEach(function(k){if(k in y){if(!y[k]||typeof y[k]!="object"){this.warn("nonObjectDependencies",k),delete y[k];return}Object.keys(y[k]).forEach(function(S){var J=y[k][S];typeof J!="string"&&(this.warn("nonStringDependency",S,JSON.stringify(J)),delete y[k][S]);var T=a.fromUrl(y[k][S]);T&&(y[k][S]=T.toString())},this)}},this)},fixModulesField:function(y){y.modules&&(this.warn("deprecatedModules"),delete y.modules)},fixKeywordsField:function(y){typeof y.keywords=="string"&&(y.keywords=y.keywords.split(/,\s+/)),y.keywords&&!Array.isArray(y.keywords)?(delete y.keywords,this.warn("nonArrayKeywords")):y.keywords&&(y.keywords=y.keywords.filter(function(k){return typeof k!="string"||!k?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(y,k){var S=!k;if(!y.version)return y.version="",!0;if(!i(y.version,S))throw new Error('Invalid version: "'+y.version+'"');return y.version=n(y.version,S),!0},fixPeople:function(y){c(y,p),c(y,f)},fixNameField:function(y,k){typeof k=="boolean"?k={strict:k}:typeof k>"u"&&(k={});var S=k.strict;if(!y.name&&!S){y.name="";return}if(typeof y.name!="string")throw new Error("name field must be a string.");S||(y.name=y.name.trim()),h(y.name,S,k.allowLegacyCase),t(y.name)&&this.warn("conflictingName",y.name)},fixDescriptionField:function(y){y.description&&typeof y.description!="string"&&(this.warn("nonStringDescription"),delete y.description),y.readme&&!y.description&&(y.description=r(y.readme)),y.description===void 0&&delete y.description,y.description||this.warn("missingDescription")},fixReadmeField:function(y){y.readme||(this.warn("missingReadme"),y.readme="ERROR: No README data found!")},fixBugsField:function(y){if(!y.bugs&&y.repository&&y.repository.url){var k=a.fromUrl(y.repository.url);k&&k.bugs()&&(y.bugs={url:k.bugs()})}else if(y.bugs){if(typeof y.bugs=="string")d(y.bugs)?y.bugs={email:y.bugs}:e.canParse(y.bugs)?y.bugs={url:y.bugs}:this.warn("nonEmailUrlBugsString");else{C(y.bugs,this.warn);var S=y.bugs;y.bugs={},S.url&&(e.canParse(S.url)?y.bugs.url=S.url:this.warn("nonUrlBugsUrlField")),S.email&&(typeof S.email=="string"&&d(S.email)?y.bugs.email=S.email:this.warn("nonEmailBugsEmailField"))}!y.bugs.email&&!y.bugs.url&&(delete y.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(y){if(!y.homepage&&y.repository&&y.repository.url){var k=a.fromUrl(y.repository.url);k&&k.docs()&&(y.homepage=k.docs())}if(y.homepage){if(typeof y.homepage!="string")return this.warn("nonUrlHomepage"),delete y.homepage;e.canParse(y.homepage)||(y.homepage="http://"+y.homepage)}},fixLicenseField:function(y){const k=y.license||y.licence;if(!k)return this.warn("missingLicense");if(typeof k!="string"||k.length<1||k.trim()==="")return this.warn("invalidLicense");if(!o(k).validForNewPackages)return this.warn("invalidLicense")}};function l(y){if(y.charAt(0)!=="@")return!1;var k=y.slice(1).split("/");return k.length!==2?!1:k[0]&&k[1]&&k[0]===encodeURIComponent(k[0])&&k[1]===encodeURIComponent(k[1])}function g(y){return!y.match(/[/@\s+%:]/)&&y===encodeURIComponent(y)}function h(y,k,S){if(y.charAt(0)==="."||!(l(y)||g(y))||k&&!S&&y!==y.toLowerCase()||y.toLowerCase()==="node_modules"||y.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(y))}function c(y,k){return y.author&&(y.author=k(y.author)),["maintainers","contributors"].forEach(function(S){Array.isArray(y[S])&&(y[S]=y[S].map(k))}),y}function p(y){if(typeof y=="string")return y;var k=y.name||"",S=y.url||y.web,J=S?" ("+S+")":"",T=y.email||y.mail,M=T?" <"+T+">":"";return k+M+J}function f(y){if(typeof y!="string")return y;var k=y.match(/^([^(<]+)/),S=y.match(/\(([^()]+)\)/),J=y.match(/<([^<>]+)>/),T={};return k&&k[0].trim()&&(T.name=k[0].trim()),J&&(T.email=J[1]),S&&(T.url=S[1]),T}function w(y){var k=y.optionalDependencies;if(k){var S=y.dependencies||{};Object.keys(k).forEach(function(J){S[J]=k[J]}),y.dependencies=S}}function v(y,k,S){if(!y)return{};if(typeof y=="string"&&(y=y.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(y))return y;S("deprecatedArrayDependencies",k);var J={};return y.filter(function(T){return typeof T=="string"}).forEach(function(T){T=T.trim().split(/(:?[@\s><=])/);var M=T.shift(),he=T.join("");he=he.trim(),he=he.replace(/^@/,""),J[M]=he}),J}function j(y,k){s.forEach(function(S){y[S]&&(y[S]=v(y[S],S,k))})}function C(y,k){y&&Object.keys(y).forEach(function(S){u.bugs[S]&&(k("typo",S,u.bugs[S],"bugs"),y[u.bugs[S]]=y[S],delete y[S])})}return kd}var jm="'repositories' (plural) Not supported. Please pick one as the 'repository' field",km="No repository field.",Sm="Probably broken git url: %s",Lm="scripts must be an object",Cm="script values must be string commands",Ym="Invalid 'files' member",$m="Invalid filename in 'files' list: %s",Zm="Invalid 'bundleDependencies' list. Must be array of package names",Jm="Invalid bundleDependencies member: %s",xm="Non-dependency in bundleDependencies: %s",Tm="%s field must be an object",Dm="Invalid dependency: %s %s",Bm="specifying %s as array is deprecated",Xm="modules field is deprecated",Hm="keywords should be an array of strings",Mm="keywords should be an array of strings",Pm="%s is also the name of a node core module.",Nm="'description' field should be a string",Em="No description",Rm="No README data",Om="No license field.",Am="Bug string field must be url, email, or {email,url}",Gm="bugs.url field must be a string url. Deleted.",Fm="bugs.email field must be a string email. Deleted.",Qm="Normalized value of bugs field is an empty object. Deleted.",Wm="homepage field must be a string url. Deleted.",Im="license should be a valid SPDX license expression",_m="%s should probably be %s.";const _$={repositories:jm,missingRepository:km,brokenGitUrl:Sm,nonObjectScripts:Lm,nonStringScript:Cm,nonArrayFiles:Ym,invalidFilename:$m,nonArrayBundleDependencies:Zm,nonStringBundleDependency:Jm,nonDependencyBundleDependency:xm,nonObjectDependencies:Tm,nonStringDependency:Dm,deprecatedArrayDependencies:Bm,deprecatedModules:Xm,nonArrayKeywords:Hm,nonStringKeyword:Mm,conflictingName:Pm,nonStringDescription:Nm,missingDescription:Em,missingReadme:Rm,missingLicense:Om,nonEmailUrlBugsString:Am,nonUrlBugsUrlField:Gm,nonEmailBugsEmailField:Fm,emptyNormalizedBugs:Qm,nonUrlHomepage:Wm,invalidLicense:Im,typo:_m},z$=Object.defineProperty({__proto__:null,brokenGitUrl:Sm,conflictingName:Pm,default:_$,deprecatedArrayDependencies:Bm,deprecatedModules:Xm,emptyNormalizedBugs:Qm,invalidFilename:$m,invalidLicense:Im,missingDescription:Em,missingLicense:Om,missingReadme:Rm,missingRepository:km,nonArrayBundleDependencies:Zm,nonArrayFiles:Ym,nonArrayKeywords:Hm,nonDependencyBundleDependency:xm,nonEmailBugsEmailField:Fm,nonEmailUrlBugsString:Am,nonObjectDependencies:Tm,nonObjectScripts:Lm,nonStringBundleDependency:Jm,nonStringDependency:Dm,nonStringDescription:Nm,nonStringKeyword:Mm,nonStringScript:Cm,nonUrlBugsUrlField:Gm,nonUrlHomepage:Wm,repositories:jm,typo:_m},Symbol.toStringTag,{value:"Module"}),K$=_g(z$);var Sd,_p;function q$(){if(_p)return Sd;_p=1;var e=cY,i=K$;Sd=function(){var o=Array.prototype.slice.call(arguments,0),a=o.shift();if(a==="typo")return n.apply(null,o);var t=i[a]?i[a]:a+": '%s'";return o.unshift(t),e.format.apply(null,o)};function n(o,a,t){return t&&(o=t+"['"+o+"']",a=t+"['"+a+"']"),e.format(i.typo,o,a)}return Sd}var Ld,zp;function U$(){if(zp)return Ld;zp=1,Ld=t;var e=I$();t.fixer=e;var i=q$(),n=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],o=["dependencies","people","typos"],a=n.map(function(r){return s(r)+"Field"});a=a.concat(o);function t(r,u,d){u===!0&&(u=null,d=!0),d||(d=!1),(!u||r.private)&&(u=function(){}),r.scripts&&r.scripts.install==="node-gyp rebuild"&&!r.scripts.preinstall&&(r.gypfile=!0),e.warn=function(){u(i.apply(null,arguments))},a.forEach(function(l){e["fix"+s(l)](r,d)}),r._id=r.name+"@"+r.version}function s(r){return r.charAt(0).toUpperCase()+r.slice(1)}return Ld}U$();const V$=wn(import.meta.url),jt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Kg=e=>{if(typeof jt<"u"&&jt.versions&&jt.versions.node){const[i,n]=jt.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return jt.getBuiltinModule(e)}return V$(e)};Kg("node:fs");Kg("node:readline");Kg("node:util");const eZ={argument:{description:"Target selector (same syntax as `vis run`): `build`, `:build`, `~:test`, `#tag:lint`, …",name:"selector",type:String},description:"Show the execution plan for a target without running it",examples:[["vis action-graph build","Print the task plan for `build` on every project"],["vis action-graph :test","Moon-style selector"],["vis action-graph build --json","Emit a JSON description of the plan"],['vis action-graph lint --query "tag=frontend"',"Filter projects by query"]],group:"Workspace",loader:()=>import("./handler2.js"),name:"action-graph",options:[{defaultValue:!1,description:"Emit JSON instead of ASCII",name:"json",type:Boolean},{description:"Filter matched projects by a query",name:"query",type:String}]},iZ={argument:{description:"Packages to add (e.g., react react-dom)",name:"packages",type:String},description:"Add packages using the detected package manager",examples:[["vis add react react-dom","Add packages"],["vis add -D typescript @types/react","Add as dev dependencies"],["vis add react --filter app","Add to specific workspace package"],["vis add react --to web","Add to one package, auto-conforming the version to existing catalogs / sibling deps"],["vis add -g typescript","Add globally (uses npm)"],["vis add lodash -w","Add to workspace root"],["vis add lodash --no-socket-check","Add without Socket.dev check"],["vis add lodash --no-typosquat-check","Skip typosquat name check"],["vis add lodash --no-marshall-check","Skip the offline marshall pipeline (author, downloads, etc.)"],["vis add lodash --run-scripts","Run lifecycle scripts (opts out of vis's default block-by-default policy)"]],group:"Dependencies",loader:()=>import("./handler15.js"),name:"add",options:[{alias:"D",defaultValue:!1,description:"Add as dev dependency",name:"save-dev",type:Boolean},{alias:"E",defaultValue:!1,description:"Save exact version",name:"exact",type:Boolean},{alias:"P",defaultValue:!1,description:"Add as peer dependency",name:"save-peer",type:Boolean},{alias:"O",defaultValue:!1,description:"Add as optional dependency",name:"save-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Install globally (uses npm)",name:"global",type:Boolean},{alias:"w",defaultValue:!1,description:"Add to workspace root",name:"workspace-root",type:Boolean},{defaultValue:!1,description:"Use workspace protocol (pnpm)",name:"workspace",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String},{description:"Target a single workspace package and auto-conform the version to existing catalogs / sibling deps (syncpack#285)",name:"to",type:String},{defaultValue:!1,description:"Skip typosquat name check before adding",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip Socket.dev security check before adding",name:"no-socket-check",type:Boolean},{defaultValue:!1,description:"Skip the offline marshall pipeline (author, provenance, metadata, downloads, expired-domains, new-bin, signatures, archived-repo)",name:"no-marshall-check",type:Boolean},{defaultValue:!1,description:"Run lifecycle scripts during add (opts out of vis's default block-by-default policy; allowlisted packages run via security.policies.installScripts.allow)",name:"run-scripts",type:Boolean},{defaultValue:!1,description:"After adding, recursively install non-optional peer dependencies that aren't already in the workspace (matches nypm's installPeerDependencies)",name:"auto-install-peers",type:Boolean}]},qg={description:"Override the cache DB path (defaults to <cache>/vis/advisories/db.sqlite via @visulima/find-cache-dir).",name:"db",type:String},ks={description:"Output format: table (default) or json.",name:"format",type:String},nZ={commandPath:["advisories"],description:"Download and ingest one or more OSV ecosystem dumps into the local cache",examples:[["vis advisories sync","Sync the npm ecosystem (default)"],["vis advisories sync --ecosystem npm","Sync a single explicit ecosystem"],["vis advisories sync --ecosystem npm,PyPI","Sync several ecosystems in one pass"],["vis advisories sync --force","Re-download even when the ETag matches"],["vis advisories sync --source https://mirror.example.com","Use a corporate OSV mirror (must be in allowedHosts)"]],group:"Security & Health",loader:le(()=>import("./sync.js"),"advisoriesSyncExecute"),name:"sync",options:[{description:"Comma-separated list of ecosystems to sync (default: npm).",name:"ecosystem",type:String},{defaultValue:!1,description:"Re-download and re-ingest even if the upstream ETag is unchanged.",name:"force",type:Boolean},{description:"Override the advisory source URL. Must be https and resolve to an allowed host.",name:"source",type:String},qg,ks]},oZ={commandPath:["advisories"],description:"Print the local advisory DB summary: path, schema version, ecosystems, row counts, last sync, ETag",examples:[["vis advisories status","Human-readable summary"],["vis advisories status --format json","Machine-readable for CI freshness checks"]],group:"Security & Health",loader:le(()=>import("./status.js"),"advisoriesStatusExecute"),name:"status",options:[qg,ks]},aZ={commandPath:["advisories"],description:"Delete the local advisory DB. The next `vis audit --offline` will fail until you re-sync",examples:[["vis advisories prune","Confirm and delete the local DB"],["vis advisories prune --force","Delete without confirmation"]],group:"Security & Health",loader:le(()=>import("./prune.js"),"advisoriesPruneExecute"),name:"prune",options:[qg,{defaultValue:!1,description:"Skip the confirmation prompt.",name:"force",type:Boolean},ks]},zm={description:"Override the bloom cache directory (defaults to <cache>/vis/osv-bloom/).",name:"cache-dir",type:String},tZ={commandPath:["advisories","bloom"],description:"Fetch and verify the endevco/osv-bloom MAL-* prefilter into the local cache",examples:[["vis advisories bloom sync","Fetch the bloom filter from the default upstream"],["vis advisories bloom sync --force","Re-download even when the set digest matches"],["vis advisories bloom sync --source https://bloom.example.com","Use an internal mirror (must be in allowedHosts)"]],group:"Security & Health",loader:le(()=>import("./bloom-sync.js"),"advisoriesBloomSyncExecute"),name:"sync",options:[{defaultValue:!1,description:"Re-download and re-verify even when the upstream set digest is unchanged.",name:"force",type:Boolean},{description:"Override the bloom source URL. Must be https and resolve to an allowed host.",name:"source",type:String},zm,ks]},sZ={commandPath:["advisories","bloom"],description:"Print the local osv-bloom cache freshness: built-at, filter size, m/k parameters, set digest",examples:[["vis advisories bloom status","Human-readable summary"],["vis advisories bloom status --format json","Machine-readable for CI freshness checks"]],group:"Security & Health",loader:le(()=>import("./bloom-status.js"),"advisoriesBloomStatusExecute"),name:"status",options:[zm,ks]},rZ=[nZ,oZ,aZ,tZ,sZ],uZ={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target only on projects affected by recent changes",examples:[["vis affected build","Run build on affected projects"],["vis affected test --base=main","Run tests on projects changed since main"],["vis affected destroy --reverse","Tear down affected projects leaves-first"],["vis affected build --sparse-checkout","Print a git sparse-checkout cone set for the affected projects and exit"]],group:"Run & Execute",loader:()=>import("./handler3.js"),name:"affected",options:[{description:"Git base ref for comparison. When omitted, vis auto-resolves it from the active CI provider (GitHub/GitLab/Buildkite/CircleCI) or falls back to `git merge-base HEAD origin/<defaultBase>` locally. Default base branch comes from `vis.config.ts#defaultBase` (or `main`).",name:"base",type:String},{description:"Git head ref for comparison. When omitted, auto-resolves from CI env (e.g. `$GITHUB_SHA`) or defaults to `HEAD`.",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep" — controls how far to include dependents of changed projects',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep" — controls how far to include dependencies of changed projects',name:"upstream",type:String},{defaultValue:3,description:"Maximum number of parallel tasks",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Instead of running, print the affected project roots as a git sparse-checkout cone set (one path per line) and exit. Pipe into `git sparse-checkout set --stdin` to shrink huge-monorepo CI checkouts.",name:"sparse-checkout",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},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{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:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Forwarded verbatim to the downstream `vis run` so capability-gated tasks resolve identically. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String}]},Km={description:"Output format: table or json (default: table)",name:"format",type:String},dZ={commandPath:["ai"],description:"List detected AI providers and show which one is selected",examples:[["vis ai providers","List all AI providers and their status"],["vis ai providers --format json","Output as JSON"]],group:"System",loader:le(()=>import("./handler50.js"),"aiProvidersExecute"),name:"providers",options:[Km]},lZ={commandPath:["ai"],description:"Test the best available AI provider with a quick prompt",examples:[["vis ai test","Test the selected provider"]],group:"System",loader:le(()=>import("./handler50.js"),"aiTestExecute"),name:"test",options:[]},gZ={argument:{description:"Task ID to propose a fix for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["ai"],description:"Read a failed task's logs and propose a structured patch (Phase 1: local-only, no git)",examples:[["vis ai fix @myorg/app:build","Print proposed patch for the failed task"],["vis ai fix @myorg/app:build --apply","Apply the patch to disk after confirming"],["vis ai fix @myorg/app:build --format json","Machine-readable patch output"],["vis ai fix @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"System",loader:le(()=>import("./handler50.js"),"aiFixExecute"),name:"fix",options:[Km,{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{defaultValue:!1,description:"Apply the proposed patch to disk after printing it",name:"apply",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt before applying",name:"yes",type:Boolean}]},hZ={description:"AI-assisted commands: provider detection and failure-fix proposals (cache management lives under `vis cache`)",examples:[["vis ai","List all AI subcommands"],["vis ai discover-help","Machine-readable subcommand catalogue (for AI agents)"]],group:"System",loader:le(()=>import("./handler50.js"),"aiRootExecute"),name:"ai",options:[]},cZ={commandPath:["ai"],description:"Print the machine-readable AI subcommand catalogue (JSON to stdout, designed for AI agents)",examples:[["vis ai discover-help","Emit the discovery payload as JSON"],["vis ai discover-help | jq '.subcommands[].path'","List all available paths"]],group:"System",loader:le(()=>import("./handler50.js"),"aiDiscoverHelpExecute"),name:"discover-help",options:[]},pZ={commandPath:["ai"],description:"Diagnose the most recent failed task and post a structured patch as a PR/MR comment (or Buildkite annotation)",examples:[["vis ai heal","Heal the most recent failure"],["vis ai heal --dry-run","Propose a patch but skip apply / validate / post"],["vis ai heal --run 2026-04-28T...","Heal a specific historical run"]],group:"System",loader:le(()=>import("./heal.js").then(e=>e.h),"aiHeal"),name:"heal",options:[{defaultValue:!1,description:"Show the proposal and exit without applying or posting it",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},vZ={commandPath:["ai","heal"],description:"Re-run the proposed fix and commit it to the PR/MR branch when validation passes",examples:[["vis ai heal accept","Triggered automatically by a `/vis heal accept` PR comment (GitHub/GitLab) or a Buildkite block-step unblock"]],group:"System",loader:le(()=>import("./heal-accept.js"),"aiHealAccept"),name:"accept",options:[{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},qm=[hZ,cZ,dZ,lZ,gZ,pZ,vZ],TSe=Object.defineProperty({__proto__:null,default:qm},Symbol.toStringTag,{value:"Module"}),yZ={argument:{description:"Package name to analyze (e.g., react)",name:"package",required:!0,type:String},description:"Analyze a single package update with AI",examples:[["vis analyze react","Analyze updating react to latest"],["vis analyze react 19.0.0","Analyze updating react to specific version"],["vis analyze react --ai-type security","Run security-focused analysis"],["vis analyze react --format json","Output as JSON"]],group:"System",loader:()=>import("./handler4.js"),name:"analyze",options:[{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Check for known security vulnerabilities",name:"security",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]},fZ={description:"Review and approve dependencies with build scripts",examples:[["vis approve-builds","Scan and list unapproved build scripts"],["vis approve-builds --all","Approve all pending builds (pnpm)"],["vis approve-builds --write","Write unapproved entries into vis.config.ts security.policies.installScripts.allow"],["vis approve-builds --sync-native","Sync allowBuilds to native PM config"]],group:"Security & Health",loader:()=>import("./handler51.js"),name:"approve-builds",options:[{defaultValue:!1,description:"Approve all pending builds without prompting (pnpm only)",name:"all",type:Boolean},{defaultValue:!1,description:"Force vis scanning even for pnpm (instead of delegating)",name:"scan",type:Boolean},{defaultValue:!1,description:"Sync allowBuilds to native PM config (bun: trustedDependencies, npm: .npmrc, yarn: .yarnrc.yml)",name:"sync-native",type:Boolean},{defaultValue:!1,description:"Write unapproved entries directly into vis.config.ts security.policies.installScripts.allow (LavaMoat 'auto' parity)",name:"write",type:Boolean}]},Um={description:"Output format: table, json, or ndjson (default: table). json/ndjson go to stdout, logs to stderr.",name:"format",type:String},mZ={commandPath:["attest"],description:"Verify inbound provenance + registry signatures across the locked dependency graph and gate on regressions",examples:[["vis attest verify","Check every locked dep for provenance regressions and signature problems"],["vis attest verify --prod-only","Skip devDependencies"],["vis attest verify --format json","Machine-readable findings for CI (Axis A)"],["vis attest verify --fail-on error","Exit non-zero only on error-severity findings (default: any finding)"]],group:"Security & Health",loader:le(()=>import("./handler5.js"),"attestVerifyExecute"),name:"verify",options:[Um,{defaultValue:!1,description:"Skip devDependencies — verify the production graph only.",name:"prod-only",type:Boolean},{description:"Severity that triggers a non-zero exit: 'warning' (any finding, default) or 'error'.",name:"fail-on",type:String},{description:"Comma-separated package names to exclude from both marshalls.",name:"allowlist",type:String}]},bZ={argument:{description:"Path to the built artifact to attest (e.g. dist/app.tgz). Its sha256 becomes the in-toto subject digest.",name:"subject",type:String},description:"Build an in-toto SLSA v1 provenance statement for an artifact and keyless-sign it via Sigstore",examples:[["vis attest dist/app.tgz","Emit dist/app.tgz.sigstore (keyless-signed in CI)"],["vis attest dist/app.tgz --output attest.sigstore","Write the bundle to a specific path"],["vis attest dist/app.tgz --predicate slsaProvenance","Predicate type (default: slsaProvenance)"],["vis attest dist/app.tgz --require-signing","Fail instead of skip-with-warn when no ambient OIDC (outside CI)"],["vis attest dist/app.tgz --format json","Print the signed bundle summary as JSON (Axis A)"]],group:"Security & Health",loader:le(()=>import("./handler5.js"),"attestEmitExecute"),name:"attest",options:[Um,{description:"Write the serialized Sigstore bundle here (default: <subject>.sigstore).",name:"output",type:String},{description:"Predicate type: 'slsaProvenance' (default, https://slsa.dev/provenance/v1).",name:"predicate",type:String},{defaultValue:!1,description:"Error instead of skip-with-warn when no ambient OIDC token is available (i.e. outside CI).",name:"require-signing",type:Boolean}]},wZ=[bZ,mZ],jZ={description:"Audit installed packages for vulnerabilities and supply chain risks",examples:[["vis audit","Full audit of all installed packages"],["vis audit --severity high","Show only high/critical issues"],["vis audit --format json","Output as JSON for CI integration"],["vis audit --format sarif","Output SARIF 2.1.0 for code-scanning uploads"],["vis audit --format csaf","Output CSAF 2.0 csaf_vex for enterprise vuln pipelines"],["vis audit --format cyclonedx-vex","Output a CycloneDX 1.7 BOM with vulnerabilities[] (SBOM + VEX)"],["vis audit --format gitlab","Output a GitLab dependency-scanning report (gl-dependency-scanning.json)"],["vis audit --format junit","Output a Surefire-compatible JUnit XML report"],["vis audit --report report.html","Write a self-contained HTML report to ./report.html"],["vis audit --usage","Only report vulnerabilities in statically-imported packages"],["vis audit --offline","Query the local OSV cache only (no network)"],["vis audit --offline --db ./vendor.sqlite","Use a specific advisory DB"],["vis audit --ecosystem npm,pypi","Scan multiple OSV ecosystems (npm, pypi, crates.io, maven, go, rubygems)"],["vis audit --prod-only","Skip devDependencies"],["vis audit --fail-on high","Exit non-zero on any high or critical finding"],["vis audit --show-fixes","Print fix-suggestion lines (no apply, no rescan)"],["vis audit --fix","Apply direct-dep upgrades for vulnerable packages, then rescan (dry-run preview by default)"],["vis audit --fix --yes","Skip the confirmation prompt and run the upgrades immediately"],["vis audit --fix --allow-major","Permit major-version bumps when the lowest fix is outside the existing range"],["vis audit --fix-transitive","Write PM-specific overrides for vulnerable transitives (dry-run preview by default)"],["vis audit --exit-code","Exit with code 1 if issues found (for CI)"],["vis audit --show-accepted","Include acknowledged risks in output"],["vis audit --sync","Sync accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)"],["vis audit --policies license,vulnerability","Run only the named policies (default: every configured policy)"],["vis audit --policies none","Skip the policy engine entirely"],["vis audit --explain","Add a plain-English AI explanation under every finding (auto-detects an installed AI CLI)"],["vis audit --explain CVE-2021-23337","Explain only the finding with this CVE/GHSA id"],["vis audit --explain 2","Explain only the 2nd finding"]],group:"Security & Health",loader:()=>import("./handler72.js"),name:"audit",options:[{description:"Minimum severity to report: low, medium, high, critical (default: low)",name:"severity",type:String},{description:"Output format: table, json, sarif, csaf, cyclonedx-vex, gitlab, or junit (default: table)",name:"format",type:String},{description:"Write a self-contained HTML report to this path. Auto-opens in a TTY when not in CI.",name:"report",type:String},{defaultValue:!1,description:"Only report vulnerabilities in statically-imported packages (reachability filter).",name:"usage",type:Boolean},{defaultValue:!1,description:"Disable the reachability filter even if enabled in config.",name:"no-usage",type:Boolean},{defaultValue:!1,description:"Query the local OSV advisory cache only — no network calls. Errors if the cache is missing.",name:"offline",type:Boolean},{description:"Override the offline advisory DB path (default: <cache>/vis/advisories/db.sqlite).",name:"db",type:String},{description:"Comma-separated list of OSV ecosystems to scan (default: npm). Supported: npm, pypi, crates.io (or 'cargo'), maven, go, rubygems. Non-npm ecosystems require --offline (online OSV path is npm-only).",name:"ecosystem",type:String},{defaultValue:!1,description:"Skip devDependencies — scan production graph only.",name:"prod-only",type:Boolean},{description:"Exit non-zero when any finding is at this severity or higher. One of: low, medium, high, critical.",name:"fail-on",type:String},{defaultValue:!1,description:"Print fix-suggestion lines for each finding (no apply, no rescan)",name:"show-fixes",type:Boolean},{defaultValue:!1,description:"Apply direct-dep fixes for vulnerable packages by running the active PM update command, then rescan",name:"fix",type:Boolean},{defaultValue:!1,description:"Apply transitive fixes by writing PM-specific overrides (pnpm-workspace.yaml / package.json overrides / resolutions)",name:"fix-transitive",type:Boolean},{defaultValue:!1,description:"Skip confirmation prompt for --fix / --fix-transitive (required in CI)",name:"yes",type:Boolean},{defaultValue:!1,description:"Allow --fix to bump a direct dep across a major version when the lowest fix is outside the existing range",name:"allow-major",type:Boolean},{defaultValue:!1,description:"Exit with code 1 if any issues found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Include acknowledged (accepted risk) issues in output",name:"show-accepted",type:Boolean},{defaultValue:!1,description:"Sync vis accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)",name:"sync",type:Boolean},{description:"Comma-separated list of supply-chain policies to evaluate (default: every configured policy). Use 'none' to skip the engine entirely, 'all' to force the full set. Known: malware, firstSeen, unexpectedDeps, publisherChange, installScripts, score, vulnerability, license.",name:"policies",type:String},{description:"Audit backend: 'auto' (default, delegates to 'aube audit' when aube is the installer), 'aube' (force delegate), or 'vis' (always use vis's OSV/Socket scanner).",name:"backend",type:String},{description:"Add a plain-English AI explanation to findings. Bare flag explains all findings at/above --severity; pass a finding index (e.g. 2) or a CVE/GHSA id to explain just one. Auto-detects an installed AI CLI; mutually exclusive with --offline.",name:"explain",type:String}]},Ss={description:"Cache directory (overrides config and default). Relative paths are resolved against the workspace root.",name:"cache-dir",type:String},zr={description:"Cache scope: 'shared' (default — main worktree's cache), 'worktree' (this checkout's local cache), or 'all' (both)",name:"scope",type:String},Vm={description:"Cache type: 'task' (workspace task cache), 'ai' (AI response cache), 'socket' (Socket.dev reports), 'deps-dev' (Google deps.dev reports), or 'all' (default)",name:"type",type:String},kZ={commandPath:["cache"],description:"List all cache entries",examples:[["vis cache list","List all cache entries"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheListExecute"),name:"list",options:[Ss,zr,{description:"Output format: table or json (default: table)",name:"format",type:String}]},SZ={commandPath:["cache"],description:"Remove cache entries (defaults to all stores: workspace task cache, AI responses, Socket.dev reports)",examples:[["vis cache clean","Remove all cache entries from every store"],["vis cache clean --type=ai","Clear only the AI response cache"],["vis cache clean --type=task","Clear only the workspace task cache"],["vis cache clean --dry-run","Preview what clean would remove"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheCleanExecute"),name:"clean",options:[Ss,Vm,{defaultValue:!1,description:"Preview without deleting",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt for out-of-workspace cache directories",name:"force",type:Boolean}]},LZ={commandPath:["cache"],description:"Remove old and oversized cache entries",examples:[["vis cache prune","Remove old and oversized entries"],["vis cache prune --max-age-days=3 --max-size=500MB","Prune with custom limits"],["vis cache prune --keep-last=30","Keep only the 30 most recent entries"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cachePruneExecute"),name:"prune",options:[Ss,zr,{description:"Remove entries older than N days",name:"max-age-days",type:Number},{description:"Evict oldest entries until cache is under this size (e.g. 500MB)",name:"max-size",type:String},{description:"Keep only the N most recent entries (sorted newest-first by mtime)",name:"keep-last",type:Number}]},CZ={commandPath:["cache"],description:"Print on-disk footprint and stats for one or more cache stores (task / ai / socket)",examples:[["vis cache size","Show stats for every cache store"],["vis cache size --type=ai","Show only the AI response cache (entries, size, oldest, newest)"],["vis cache size --type=task --format=json","Machine-readable task cache size"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheSizeExecute"),name:"size",options:[Ss,zr,Vm,{description:"Output format: table or json (default: table)",name:"format",type:String}]},Ug={description:"Output format: table or json (default: table)",name:"format",type:String},eb={description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},YZ={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Explain why a task missed the cache by diffing hash inputs against the previous run",examples:[["vis cache why @myorg/app:build","Show which inputs changed since the last run"],["vis cache why @myorg/app:build --json","Machine-readable output for CI"],["vis cache why @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheWhyExecute"),name:"why",options:[Ug,eb]},$Z={argument:{description:"Task ID to print the hash for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Print the recorded hash and per-input hash details for a task",examples:[["vis cache hash @myorg/app:build","Show the resolved hash + contributing inputs"],["vis cache hash @myorg/app:build --json","Machine-readable output"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheHashExecute"),name:"hash",options:[Ug,eb]},ZZ={argument:{description:"Task ID to verify (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Verify cache restore fidelity: extract the cached entry into a tmp directory and diff each file's content, mode, and mtime against the live workspace. Exits 1 on any drift (changed content, mode, mtime) or if a cached output is missing from the workspace. With --scope=all, the first cache directory containing the task is used.",examples:[["vis cache verify @myorg/app:build","Diff cached outputs vs live workspace files"],["vis cache verify @myorg/app:build --format=json","Machine-readable diff (status: ok | drift)"],["vis cache verify @myorg/app:build --cache-dir=.alt-cache","Verify against a non-default cache directory"],["vis cache verify @myorg/app:build --scope=all","Search shared and worktree caches for the task"]],group:"Workspace",loader:le(()=>Promise.resolve().then(()=>ua),"cacheVerifyExecute"),name:"verify",options:[Ss,zr,Ug]},JZ={commandPath:["cache"],description:"Probe the configured remote cache (HTTP HEAD or REAPI Capabilities) and report reachability, latency, and negotiated capabilities",examples:[["vis cache doctor","Probe the remoteCache configured in vis.config.ts"],["vis cache doctor --url=grpcs://cache.example.com:443 --backend=reapi","Override URL/backend ad-hoc"],["vis cache doctor --json","Machine-readable output"]],group:"Workspace",loader:le(()=>import("./doctor-probe.js"),"cacheDoctorExecute"),name:"doctor",options:[{description:"Override remote cache URL (otherwise read from vis.config.ts remoteCache.url, or TURBO_API env var)",name:"url",type:String},{description:"Override backend selector: 'http' or 'reapi'",name:"backend",type:String},{description:"Output format: table or json (default: table)",name:"format",type:String},{defaultValue:5e3,description:"Probe timeout in milliseconds (default: 5000)",name:"timeout",type:Number}]},xZ=[kZ,SZ,LZ,CZ,YZ,$Z,ZZ,JZ],TZ={alias:["c","outdated"],argument:{description:"Specific packages to check (checks all if omitted)",name:"packages",type:String},description:"Check for outdated dependencies, security vulnerabilities, and supply chain settings",examples:[["vis check","Check all catalog dependencies"],["vis check react","Check specific packages"],["vis check --target minor","Only show minor/patch updates"],["vis check --exclude '@types/*'","Exclude packages by pattern"],["vis check --no-security","Skip vulnerability scanning"],["vis check --security-config","Audit supply chain security settings"],["vis check --security-config --sync","Sync security config to pnpm-workspace.yaml"]],group:"Security & Health",loader:()=>import("./handler6.js"),name:"check",options:[{alias:"t",description:"Update target: latest, minor, or patch (default: latest)",name:"target",type:String},{description:"Glob pattern to include packages (repeatable)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions",name:"prerelease",type:Boolean},{defaultValue:!1,description:"Skip security vulnerability scanning",name:"no-security",type:Boolean},{defaultValue:!1,description:"Audit supply chain security settings",name:"security-config",type:Boolean},{defaultValue:!1,description:"Sync security settings to pnpm-workspace.yaml (pnpm only, requires --security-config)",name:"sync",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Exit with code 1 if outdated dependencies found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend",name:"ai-type",type:String},{alias:"D",conflicts:"prod",description:"Check only devDependencies (npm/yarn mode)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Check only dependencies (npm/yarn mode)",name:"prod",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in outdated checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry",name:"include-internal",type:Boolean}]},DZ={argument:{description:"Comma-separated list of targets to run (e.g., lint,test,build)",name:"targets",type:String},description:"Run affected targets in a CI-optimized pipeline",examples:[["vis ci lint,test,build","Run lint, test, and build on affected projects"],["vis ci test --base=origin/main","Override the base ref"],["vis ci build --no-install","Skip the install step (assume deps already present)"],["vis ci build --parallel=6","Increase concurrency"]],group:"Run & Execute",loader:()=>import("./handler7.js"),name:"ci",options:[{defaultValue:!0,description:"Install dependencies before running targets (use --no-install to skip)",name:"install",type:Boolean},{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:"Git base ref for affected detection (default: auto-detected from CI env)",name:"base",type:String},{description:"Git head ref for affected detection (default: HEAD)",name:"head",type:String},{defaultValue:"none",description:"Upstream scope: none | direct | deep",name:"upstream",type:String},{defaultValue:"deep",description:"Downstream scope: none | direct | deep",name:"downstream",type:String},{defaultValue:4,description:"Maximum number of parallel tasks per target",name:"parallel",type:Number},{description:'Partition tasks for distributed CI (e.g., "1/4")',name:"partition",type:String},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String}]},BZ={argument:{description:"Project name to check (required)",name:"project",type:String},commandPath:["ci"],description:'Exit with inverted codes for CI "Ignored Build Step" gating (Vercel/Netlify)',examples:[["vis ci ignore my-app","Check if my-app is affected and decide whether to build"],["vis ci ignore my-app --base $VERCEL_GIT_PREVIOUS_SHA","Explicit base ref"],["vis ci ignore my-app --json","Emit the decision as JSON instead of text"],["vis ci ignore my-app --verbose","Print debug info about the decision path"],["vis ci ignore my-app --exit-zero-on-build","Normal exit semantics (0=build, 0=skip)"]],group:"Run & Execute",loader:()=>import("./handler52.js"),name:"ignore",options:[{description:"Git base ref for comparison. Defaults to CI provider env vars, then HEAD~1.",name:"base",type:String},{defaultValue:"HEAD",description:"Git head ref for comparison",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep"',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep"',name:"upstream",type:String},{defaultValue:!1,description:"Emit the decision as JSON on stdout instead of human text",name:"json",type:Boolean},{defaultValue:!1,description:"Exit 0 on build (normal semantics) instead of 1 (inverted Vercel/Netlify semantics)",name:"exit-zero-on-build",type:Boolean},{defaultValue:!1,description:"Enable verbose debug output",name:"verbose",type:Boolean}]},XZ={description:"Remove node_modules from all workspace projects",examples:[["vis clean","Remove all node_modules directories"],["vis clean --lockfile","Also remove lockfiles"],["vis clean --empty-packages","Also remove workspace directories that have no package.json"],["vis clean --dry-run","Preview what would be removed"]],group:"Workspace",loader:()=>import("./handler8.js"),name:"clean",options:[{alias:"l",defaultValue:!1,description:"Also remove lockfiles (pnpm-lock.yaml, package-lock.json, etc.)",name:"lockfile",type:Boolean},{alias:"e",defaultValue:!1,description:"Also remove stale workspace directories that match a workspace pattern but have no package.json",name:"empty-packages",type:Boolean},{defaultValue:!1,description:"Preview what would be removed without deleting",name:"dry-run",type:Boolean}]},HZ={argument:{description:"Template to use (e.g., vis:app, create-vite, user/repo) — omit for interactive mode",name:"template",type:String},description:"Create a new project from a template",examples:[["vis create","Interactive project scaffolding"],["vis create vis:monorepo my-workspace","Create a monorepo workspace"],["vis create vis:app my-app","Scaffold a Vite application"],["vis create vis:library my-lib","Create a TypeScript library"],["vis create vite my-app -- --template react-ts","Use create-vite with React TypeScript"],["vis create user/repo my-project","Clone a GitHub template"],["vis create --list","Show available templates"]],group:"Scaffold & Config",loader:()=>import("./handler69.js"),name:"create",options:[{defaultValue:!1,description:"Show available templates",name:"list",type:Boolean},{description:"Generate editor configs (vscode)",name:"editor",type:String},{defaultValue:!1,description:"Initialize a git repository",name:"git-init",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts",name:"no-interactive",type:Boolean}]},ib=(e,i,n)=>{const o=t=>Ff(t)?t:Ha(e,t);if(i&&i.length>0)return o(i);if(n&&n.length>0)return o(n);const a=process.env.VIS_CACHE_DIRECTORY;return a&&a.length>0?o(a):Ha(e,em)},MZ=(e,i)=>i===!1?e:pY(e)??e,Kp=(e,i,n,o)=>{const a=i??n??process.env.VIS_CACHE_DIRECTORY;if(a&&a.length>0)return ib(e,i,n);const t=MZ(e,o);return Ha(t,em)},PZ=/[^\w.-]+/g,NZ=/^-+|-+$/g,EZ=e=>e.trim().replaceAll(PZ,"-").replaceAll(NZ,"").slice(0,64),RZ=e=>{try{const i=rY("git",["rev-parse","--abbrev-ref","HEAD"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return!i||i==="HEAD"?void 0:i}catch{return}},DSe=(e,i,n)=>{if(n!==!0)return e;const o=RZ(i);if(!o)return e;const a=EZ(o);return a.length===0?e:Ha(e,"branches",a)},OZ=(e,i)=>{const n=ws(i,e);return n.length===0?!1:n!==".."&&!n.startsWith("../")&&!Ff(n)},AZ="x-hono-already-sent";var vn=class extends Error{constructor(i,n){super(i,n),this.name="RequestError"}};const GZ=/^\/[!#$&-;=?-\[\]_a-z~]*$/,FZ=/\/\.\.?(?:[/?#]|$)/,QZ=/^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/,WZ=(e,i,n)=>{const o=`${e}://${i}${n}`;if(QZ.test(i)){if(n.length===0)return o+"/";if(n.charCodeAt(0)!==47)throw new vn("Invalid URL");return!GZ.test(n)||FZ.test(n)?new URL(o).href:o}else{const a=new URL(o);if(a.hostname.length!==i.length&&a.hostname!==(i.includes(":")?i.replace(/:\d+$/,""):i).toLowerCase())throw new vn("Invalid host header");return a.href}},IZ=e=>e instanceof vn?e:new vn(e.message,{cause:e}),_Z=global.Request;var Na=class extends _Z{constructor(i,n){if(typeof i=="object"&&oo in i){const o=n!==void 0&&"body"in n&&n.body!=null;if(i[Mn]&&!o)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");i=i[oo]()}typeof n?.body?.getReader<"u"&&(n.duplex??="half"),super(i,n)}};const nb=e=>{const i=[],n=e.rawHeaders;for(let o=0,a=n.length;o<a;o+=2){const t=n[o];t.charCodeAt(0)!==58&&i.push([t,n[o+1]])}return new Headers(i)},ob=Symbol("wrapBodyStream"),zZ=(e,i,n,o,a)=>{const t={method:e,headers:n,signal:a.signal};if(e==="TRACE"){t.method="GET";const s=new Na(i,t);return Object.defineProperty(s,"method",{get(){return"TRACE"}}),s}if(!(e==="GET"||e==="HEAD"))if("rawBody"in o&&o.rawBody instanceof Buffer)t.body=new ReadableStream({start(s){s.enqueue(o.rawBody),s.close()}});else if(o[ob]){let s;t.body=new ReadableStream({async pull(r){try{s||=xl.toWeb(o).getReader();const{done:u,value:d}=await s.read();u?r.close():r.enqueue(d)}catch(u){r.error(u)}}})}else t.body=xl.toWeb(o);return new Na(i,t)},oo=Symbol("getRequestCache"),Bn=Symbol("requestCache"),Ea=Symbol("incomingKey"),Kt=Symbol("urlKey"),ab=Symbol("methodKey"),tb=Symbol("headersKey"),kt=Symbol("abortControllerKey"),El=Symbol("getAbortController"),Rl=Symbol("abortRequest"),$a=Symbol("bodyBuffer"),Fs=Symbol("bodyReadPromise"),Mn=Symbol("bodyConsumedDirectly"),qp=Symbol("bodyLockReader"),At=Symbol("abortReason"),sb=()=>new TypeError("Body is unusable"),Ls=()=>Promise.reject(sb()),KZ=new TextDecoder,qZ=e=>{if(e[Mn])return Ls();e[Mn]=!0},UZ=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),VZ=e=>(e[tb]||=nb(e[Ea])).get("content-type")||"",eJ=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,iJ=e=>{if(typeof e!="string"||e.length===0)return"GET";switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return e}const i=e.toUpperCase();switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return i;default:return e}},nJ=e=>{if(!eJ.test(e))return new TypeError(`'${e}' is not a valid HTTP method.`);const i=e.toUpperCase();if(i==="CONNECT"||i==="TRACK"||i==="TRACE"&&e!=="TRACE")return new TypeError(`'${e}' HTTP method is unsupported.`)},Vg=(e,i,n)=>{if(e[Mn])return Ls();const o=e.method;if(o==="GET"||o==="HEAD")return e[oo]()[i]();const a=nJ(o);if(a)return Promise.reject(a);if(e[Bn]&&o!=="TRACE")return e[Bn][i]();const t=qZ(e);if(t)return t;const s=oJ(e);if(s){const r=Promise.resolve(n(s,e));return e[$a]=void 0,r}return aJ(e).then(r=>{const u=n(r,e);return e[$a]=void 0,u})},oJ=e=>{const i=e[Ea];if("rawBody"in i&&i.rawBody instanceof Buffer)return i.rawBody},aJ=e=>{if(e[$a])return Promise.resolve(e[$a]);if(e[Fs])return e[Fs];const i=e[Ea];if(xl.isDisturbed(i))return Ls();const n=new Promise((o,a)=>{const t=[];let s=!1;const r=c=>{s||(s=!0,h(),c())},u=c=>{t.push(Buffer.isBuffer(c)?c:Buffer.from(c))},d=()=>{r(()=>{const c=t.length===1?t[0]:Buffer.concat(t);e[$a]=c,o(c)})},l=c=>{r(()=>{a(c)})},g=()=>{if(i.readableEnded){d();return}r(()=>{if(i.errored){a(i.errored);return}const c=e[At];if(c!==void 0){a(c instanceof Error?c:new Error(String(c)));return}a(new Error("Client connection prematurely closed."))})},h=()=>{i.off("data",u),i.off("end",d),i.off("error",l),i.off("close",g),e[Fs]=void 0};i.on("data",u),i.on("end",d),i.on("error",l),i.on("close",g),queueMicrotask(()=>{s||(i.readableEnded?d():i.errored?l(i.errored):i.destroyed&&g())})});return e[Fs]=n,n},jn={get method(){return this[ab]},get url(){return this[Kt]},get headers(){return this[tb]||=nb(this[Ea])},[Rl](e){this[At]===void 0&&(this[At]=e);const i=this[kt];i&&!i.signal.aborted&&i.abort(e)},[El](){return this[kt]||=new AbortController,this[At]!==void 0&&!this[kt].signal.aborted&&this[kt].abort(this[At]),this[kt]},[oo](){const e=this[El]();if(this[Bn])return this[Bn];const i=this.method;if(this[Mn]&&!(i==="GET"||i==="HEAD")){this[$a]=void 0;const n={method:i==="TRACE"?"GET":i,headers:this.headers,signal:e.signal};i!=="TRACE"&&(n.body=new ReadableStream({start(a){a.close()}}),n.duplex="half");const o=new Na(this[Kt],n);return i==="TRACE"&&Object.defineProperty(o,"method",{get(){return"TRACE"}}),this[Bn]=o}return this[Bn]=zZ(this.method,this[Kt],this.headers,this[Ea],e)},get body(){if(!this[Mn])return this[oo]().body;const e=this[oo]();return!this[qp]&&e.body&&(this[qp]=e.body.getReader()),e.body},get bodyUsed(){return this[Mn]?!0:this[Bn]?this[Bn].bodyUsed:!1}};Object.defineProperty(jn,"signal",{get(){return this[El]().signal}});["cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","keepalive"].forEach(e=>{Object.defineProperty(jn,e,{get(){return this[oo]()[e]}})});["clone","formData"].forEach(e=>{Object.defineProperty(jn,e,{value:function(){if(this[Mn]){if(e==="clone")throw sb();return Ls()}return this[oo]()[e]()}})});Object.defineProperty(jn,"text",{value:function(){return Vg(this,"text",e=>KZ.decode(e))}});Object.defineProperty(jn,"arrayBuffer",{value:function(){return Vg(this,"arrayBuffer",e=>UZ(e))}});Object.defineProperty(jn,"blob",{value:function(){return Vg(this,"blob",(e,i)=>{const n=VZ(i),o=n?{headers:{"content-type":n}}:void 0;return new Response(e,o).blob()})}});Object.defineProperty(jn,"json",{value:function(){return this[Mn]?Ls():this.text().then(JSON.parse)}});Object.defineProperty(jn,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,i,n){return`Request (lightweight) ${n({method:this.method,url:this.url,headers:this.headers,nativeRequest:this[Bn]},{...i,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(jn,Na.prototype);const tJ=(e,i)=>{const n=Object.create(jn);n[Ea]=e,n[ab]=iJ(e.method);const o=e.url||"";if(o[0]!=="/"&&(o.startsWith("http://")||o.startsWith("https://"))){if(e instanceof zt)throw new vn("Absolute URL for :path is not allowed in HTTP/2");try{n[Kt]=new URL(o).href}catch(s){throw new vn("Invalid absolute URL",{cause:s})}return n}const a=(e instanceof zt?e.authority:e.headers.host)||i;if(!a)throw new vn("Missing host header");let t;if(e instanceof zt){if(t=e.scheme,!(t==="http"||t==="https"))throw new vn("Unsupported scheme")}else t=e.socket&&e.socket.encrypted?"https":"http";try{n[Kt]=WZ(t,a,o)}catch(s){throw s instanceof vn?s:new vn("Invalid URL",{cause:s})}return n},io="text/plain; charset=UTF-8",Ol=Symbol("responseCache"),wa=Symbol("getResponseCache"),Hn=Symbol("cache"),eh=global.Response;var fn=class rb{#n;#i;[wa](){const i=this[Hn],n=i&&i[2]instanceof Headers?i[2]:void 0;return delete this[Hn],this[Ol]||=new eh(this.#n,n?{status:this.#i?.status,statusText:this.#i?.statusText,headers:n}:this.#i)}constructor(i,n){let o;if(this.#n=i,n instanceof rb){const a=n[Ol];if(a){this.#i=a,this[wa]();return}else this.#i=n.#i,o=new Headers(n.headers)}else this.#i=n;(i==null||typeof i=="string"||typeof i?.getReader<"u"||i instanceof Blob||i instanceof Uint8Array)&&(this[Hn]=[n?.status||200,i??null,o||n?.headers])}get headers(){const i=this[Hn];return i?(i[2]instanceof Headers||(i[2]=new Headers(i[2]||(i[1]===null?void 0:{"content-type":io}))),i[2]):this[wa]().headers}get status(){return this[Hn]?.[0]??this[wa]().status}get ok(){const i=this.status;return i>=200&&i<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(fn.prototype,e,{get(){return this[wa]()[e]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(fn.prototype,e,{value:function(){return this[wa]()[e]()}})});Object.defineProperty(fn.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,i,n){return`Response (lightweight) ${n({status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[Ol]},{...i,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(fn,eh);Object.setPrototypeOf(fn.prototype,eh.prototype);const sJ=/^https?:\/\/[!#-;=?-[\]_a-z~A-Z]+$/,rJ=e=>e instanceof URL?e.href:sJ.test(e)?e:new URL(e).href,uJ=new Set([301,302,303,307,308]);Object.defineProperty(fn,"redirect",{value:function(e,i=302){if(!uJ.has(i))throw new RangeError("Invalid status code");return new fn(null,{status:i,headers:{location:rJ(e)}})},writable:!0,configurable:!0});Object.defineProperty(fn,"json",{value:function(e,i){const n=JSON.stringify(e);if(n===void 0)throw new TypeError("The data is not JSON serializable");const o=i?.headers;let a;return o?(a=new Headers(o),a.has("content-type")||a.set("content-type","application/json")):a={"content-type":"application/json"},new fn(n,{status:i?.status??200,statusText:i?.statusText,headers:a})},writable:!0,configurable:!0});async function dJ(e){return Promise.race([e,Promise.resolve().then(()=>Promise.resolve(void 0))])}function ub(e,i,n){const o=r=>{e.cancel(r).catch(()=>{})};return i.on("close",o),i.on("error",o),(n??e.read()).then(s,a),e.closed.finally(()=>{i.off("close",o),i.off("error",o)});function a(r){r&&i.destroy(r)}function t(){e.read().then(s,a)}function s({done:r,value:u}){try{if(r)i.end();else if(!i.write(u))i.once("drain",t);else return e.read().then(s,a)}catch(d){a(d)}}}function Up(e,i){if(e.locked)throw new TypeError("ReadableStream is locked.");return i.destroyed?void 0:ub(e.getReader(),i)}const Al=(e,i)=>{const n={};if(e instanceof Headers||(e=new Headers(e??void 0)),e.has("set-cookie")){const o=[];for(const[a,t]of e)a==="set-cookie"?o.push(t):n[a]=t;o.length>0&&(n["set-cookie"]=o)}else for(const[o,a]of e)n[o]=a;return i&&(n["content-type"]??=i),n},$r=Symbol("outgoingEnded"),Vp=Symbol("incomingDraining"),lJ=500,gJ=64*1024*1024,db=e=>{const i=e;if(e.destroyed||i[Vp])return;if(i[Vp]=!0,e instanceof zt){try{e.stream?.close?.(jY.NGHTTP2_NO_ERROR)}catch{}return}let n=0;const o=()=>{clearTimeout(t),e.off("data",s),e.off("end",o),e.off("error",o)},a=()=>{o();const r=e.socket;r&&!r.destroyed&&r.destroySoon()},t=setTimeout(a,lJ);t.unref?.();const s=r=>{n+=r.length,n>gJ&&a()};e.on("data",s),e.on("end",o),e.on("error",o),e.resume()},hJ=(e,i,n,o)=>()=>{i.errored?e[Rl](i.errored.toString()):n.writableFinished||e[Rl]("Client connection prematurely closed."),o&&!i.readableEnded&&setTimeout(()=>{i.readableEnded||setTimeout(()=>{db(i)})})},cJ=e=>{if(!(Hn in e))return!1;const i=e[Hn][1];return i===null||typeof i=="string"||i instanceof Uint8Array},pJ=()=>new Response(null,{status:400}),lb=e=>new Response(null,{status:e instanceof Error&&(e.name==="TimeoutError"||e.constructor.name==="TimeoutError")?504:500}),Zr=(e,i)=>{const n=e instanceof Error?e:new Error("unknown error",{cause:e});n.code==="ERR_STREAM_PREMATURE_CLOSE"?console.info("The user aborted a request."):(console.error(e),i.headersSent||i.writeHead(500,{"Content-Type":"text/plain"}),i.end(`Error: ${n.message}`),i.destroy(n))},Gl=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},gb=async(e,i)=>{let[n,o,a]=e[Hn];if(!a){o===null?(i.writeHead(n),i.end()):typeof o=="string"?(i.writeHead(n,{"Content-Type":io,"Content-Length":Buffer.byteLength(o)}),i.end(o)):o instanceof Uint8Array?(i.writeHead(n,{"Content-Type":io,"Content-Length":o.byteLength}),i.end(o)):o instanceof Blob?(i.writeHead(n,{"Content-Type":io,"Content-Length":o.size}),i.end(new Uint8Array(await o.arrayBuffer()))):(i.writeHead(n,{"Content-Type":io}),Gl(i),await Up(o,i)?.catch(s=>Zr(s,i))),i[$r]?.();return}let t=!1;if(a instanceof Headers)t=a.has("content-length"),a=Al(a,o===null?void 0:io);else if(Array.isArray(a)){const s=new Headers(a);t=s.has("content-length"),a=Al(s,o===null?void 0:io)}else for(const s in a)if(s.length===14&&s.toLowerCase()==="content-length"){t=!0;break}t||(typeof o=="string"?a["Content-Length"]=Buffer.byteLength(o):o instanceof Uint8Array?a["Content-Length"]=o.byteLength:o instanceof Blob&&(a["Content-Length"]=o.size)),i.writeHead(n,a),o==null?i.end():typeof o=="string"||o instanceof Uint8Array?i.end(o):o instanceof Blob?i.end(new Uint8Array(await o.arrayBuffer())):(Gl(i),await Up(o,i)?.catch(s=>Zr(s,i))),i[$r]?.()},hb=e=>typeof e.then=="function",vJ=async(e,i,n={})=>{if(hb(e))if(n.errorHandler)try{e=await e}catch(a){const t=await n.errorHandler(a);if(!t)return;e=t}else e=await e.catch(lb);if(Hn in e)return gb(e,i);const o=Al(e.headers,e.body===null?void 0:io);if(e.body){const a=e.body.getReader(),t=[];let s=!1,r;if(o["transfer-encoding"]!=="chunked"){let u=2;for(let d=0;d<u;d++){r||=a.read();const l=await dJ(r).catch(g=>{console.error(g),s=!0});if(!l){if(d===1){await new Promise(g=>setTimeout(g)),u=3;continue}break}if(r=void 0,l.value&&t.push(l.value),l.done){s=!0;break}}s&&!("content-length"in o)&&(o["content-length"]=t.reduce((d,l)=>d+l.length,0))}i.writeHead(e.status,o),t.forEach(u=>{i.write(u)}),s?i.end():(t.length===0&&Gl(i),await ub(a,i,r))}else o[AZ]||(i.writeHead(e.status,o),i.end());i[$r]?.()},yJ=(e,i={})=>{const n=i.autoCleanupIncoming??!0;return i.overrideGlobalObjects!==!1&&global.Request!==Na&&(Object.defineProperty(global,"Request",{value:Na}),Object.defineProperty(global,"Response",{value:fn})),async(o,a)=>{let t,s,r=!1,u=!1;const d=()=>{!s||u||(u=!0,a.on("close",hJ(s,o,a,r)))};try{if(s=tJ(o,i.hostname),r=n&&!(o.method==="GET"||o.method==="HEAD"),r&&(o[ob]=!0,o instanceof zt&&(a[$r]=()=>{o.readableEnded||setTimeout(()=>{o.readableEnded||setTimeout(()=>{o.destroy(),a.destroy()})})})),t=e(s,{incoming:o,outgoing:a}),!hb(t)&&cJ(t))return r&&!o.readableEnded&&a.once("finish",()=>{o.readableEnded||db(o)}),gb(t,a);d()}catch(l){if(t)return Zr(l,a);if(i.errorHandler){if(d(),t=await i.errorHandler(s?l:IZ(l)),!t)return}else s?t=lb(l):t=pJ()}try{return await vJ(t,a,i)}catch(l){return Zr(l,a)}}},fJ=Symbol("CONNECTION_SYMBOL_KEY"),mJ=Symbol("WAIT_FOR_WEBSOCKET_SYMBOL"),bJ=new Set(["connection","content-length","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","sec-websocket-accept","sec-websocket-extensions","sec-websocket-protocol"]),cb=(e,i)=>{i&&i.forEach((n,o)=>{bJ.has(o.toLowerCase())||e.push(`${o}: ${n}`)})},ev=(e,i,n)=>{const o=["Connection: close","Content-Length: 0"];cb(o,n),e.end(`HTTP/1.1 ${i.toString()} ${wY[i]??""}\r
|
|
7
7
|
${o.join(`\r
|
|
8
8
|
`)}\r
|
|
9
9
|
\r
|