@visulima/vis 1.0.0-alpha.39 → 1.0.0-alpha.40
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 +6 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bin.js +3 -3
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler4.js +3 -3
- package/dist/packem_chunks/handler49.js +3 -3
- package/dist/packem_chunks/handler5.js +6 -6
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +4 -4
- package/dist/packem_chunks/handler66.js +1 -1
- package/dist/packem_chunks/handler68.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 +44 -44
- package/dist/packem_chunks/handler73.js +1 -1
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/{ai-analysis-K-DKU3ZA.js → ai-analysis-BUeX2J2H.js} +1 -1
- package/dist/packem_shared/{ai-fix-BPrYoCk8.js → ai-fix-9Vzlp6XU.js} +1 -1
- package/dist/packem_shared/{dependency-scan-anTuZB1t.js → dependency-scan-DnTgYleU.js} +1 -1
- package/dist/packem_shared/{index-BJbpNthk.js → index-Du8RWawQ.js} +1 -1
- package/dist/packem_shared/{index-B4RYu87L.js → index-yBikBkHT.js} +1 -1
- package/dist/packem_shared/{missing-package-json-BfWUxTGv.js → missing-package-json-8vNHwbqw.js} +1 -1
- package/dist/packem_shared/scan-progress-CFhc0CMj.js +2 -0
- package/index.d.ts +201 -201
- package/index.js +52 -52
- package/package.json +9 -9
- package/dist/packem_shared/scan-progress-DG7_JmTV.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## @visulima/vis [1.0.0-alpha.40](https://github.com/visulima/visulima/compare/@visulima/vis@1.0.0-alpha.39...@visulima/vis@1.0.0-alpha.40) (2026-06-17)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **vis:** added --ignore-release-age ([1767805](https://github.com/visulima/visulima/commit/1767805cb2a46c135a33429edf764f6760737ffc))
|
|
6
|
+
|
|
1
7
|
## @visulima/vis [1.0.0-alpha.39](https://github.com/visulima/visulima/compare/@visulima/vis@1.0.0-alpha.38...@visulima/vis@1.0.0-alpha.39) (2026-06-16)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./packem_shared/index-
|
|
2
|
+
import"./packem_shared/index-yBikBkHT.js";import"./packem_chunks/bin.js";import"./packem_shared/index-BDmTbWX1.js";import"./packem_shared/public-api-WqUCiyIe.js";import"./packem_chunks/config.js";
|
package/dist/binx.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{P as r,c as o,a as c,V as i,h as a,e as n}from"./packem_shared/index-
|
|
2
|
+
import{P as r,c as o,a as c,V as i,h as a,e as n}from"./packem_shared/index-yBikBkHT.js";r();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o.version}
|
|
3
3
|
`),process.exit(0));process.argv.splice(2,0,"dlx");c();const e=i("visx",{packageName:"visx",packageVersion:o.version}),p=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(a({detailed:p,exitOnError:!1}));e.addCommand(n);(async()=>{try{await e.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as r8}from"node:module";import{f as u8,c as j0,P as g8,a as d8,V as l8,h as c8,e as h8}from"../packem_shared/index-
|
|
1
|
+
import{createRequire as r8}from"node:module";import{f as u8,c as j0,P as g8,a as d8,V as l8,h as c8,e as h8}from"../packem_shared/index-yBikBkHT.js";import{F as qx,m as Z,g as xw,H as kt,v as Ze,T as Tn,B as Xa,A as ul,y as wl,f as O,a as Bo,I as nA,o as v8,J as A8,l as y8,O as oA}from"../packem_shared/index-BDmTbWX1.js";import{N as f8,a as mi,c as C0,b as Eg,E as Vx,Z as J1}from"./config.js";import"tinyexec";import{E as Zw,L as B8}from"../packem_shared/public-api-WqUCiyIe.js";import{a as mC,g as bC}from"../packem_shared/_commonjsHelpers-B5Y90VFO.js";import{getMainWorktreeRoot as Q8,Cache as S0,readLastRunSummary as s2,getLastRunSummaryPath as Tw,parseCacheSize as L8,digestFile as u2,looksLikeInputUri as $8,parseInputUri as D8}from"@visulima/task-runner";import{serve as Z8}from"@hono/node-server";import{Hono as T8}from"hono";import{streamSSE as N8}from"hono/streaming";import{e as Zn,C as R8,R as M8,o as H8,r as G8,h as X8,a as F8,i as P8,d as O8,t as d2,w as _8,c as W8,V as ym,j as Ut,s as gh,q as Ts,E as _d,Q as K8,I as z8}from"../packem_shared/Table-CcVkyULl-B_ef6zfS.js";import{parseStacktrace as U8}from"@visulima/error/stacktrace";import{resolveEditorconfigDefaults as V8}from"#native";import{s as ug}from"../packem_shared/index-CgcF6_wo.js";import{w as R1}from"../packem_shared/pm-runner-OGResYrA.js";import{parse as e4}from"smol-toml";const s8=r8(import.meta.url),Id=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ea=e=>{if(typeof Id<"u"&&Id.versions&&Id.versions.node){const[i,n]=Id.versions.node.split(".").map(Number);if(i>22||i===22&&n>=3||i===20&&n>=16)return Id.getBuiltinModule(e)}return s8(e)},p8=Ea("node:assert"),yC=Ea("node:module"),{createRequire:$n}=yC,Rs=Id,{env:Am}=Rs,{readFile:e2,readdir:Oh,stat:jl,realpath:x1,rm:fC,mkdtemp:m8,mkdir:b8}=Ea("node:fs/promises"),{resolve:k0,dirname:i2,delimiter:Z1}=Ea("node:path"),Nd=Ea("node:fs"),{existsSync:B0,rmSync:Ua,writeFileSync:rn,renameSync:n2,unlinkSync:iu,readdirSync:Wn,statSync:er,readFileSync:o2,watch:w8,copyFileSync:j8,mkdirSync:C8,cpSync:k8}=Nd,a2=Ea("node:url"),{fileURLToPath:S8}=a2,E8=Ea("util"),{spawn:T1,execFileSync:t2,execFile:I8,spawnSync:Od,execSync:r2}=Ea("node:child_process"),{createHash:Y8,randomUUID:J8}=Ea("node:crypto"),{platform:wC,homedir:g2,tmpdir:x8}=Ea("node:os"),{createInterface:jC}=Ea("node:readline"),{PassThrough:N1}=Ea("node:stream"),q8=Ea("node:tty"),pi=(e,i)=>async()=>({default:(await e())[i]});function i4(e,i){return`#compdef ${e}
|
|
2
2
|
compdef _${e} ${e}
|
|
3
3
|
|
|
4
4
|
# zsh completion for ${e} -*- shell-script -*-
|
|
@@ -1178,7 +1178,7 @@ ${cC(i,o)},
|
|
|
1178
1178
|
`;return rn(r,s,"utf8"),n.info(`Created ${r} with ${a}`),!0},dci=(e,i)=>{const n=Z(e,"package.json"),o={catalogStripped:!1,configRemoved:!1,dependencyRemoved:!1,removedScripts:[],scriptCount:0};if(!O(n))return o;const a=Ze(n),t=JSON.parse(a);let r=!1;t.syncpack&&(delete t.syncpack,r=!0,o.configRemoved=!0);for(const c of["dependencies","devDependencies"]){const p=t[c];p?.syncpack&&(delete p.syncpack,r=!0,o.dependencyRemoved=!0)}const s=t.workspaces;if(s&&typeof s=="object"&&!Array.isArray(s)){const c=s.catalog;c&&typeof c.syncpack=="string"&&(delete c.syncpack,r=!0,o.catalogStripped=!0);const p=s.catalogs;if(p&&typeof p=="object")for(const v of Object.values(p))v&&typeof v.syncpack=="string"&&(delete v.syncpack,r=!0,o.catalogStripped=!0)}const d=t.catalog;d&&typeof d.syncpack=="string"&&(delete d.syncpack,r=!0,o.catalogStripped=!0);const l=t.scripts;if(l){const c={};for(const[p,v]of Object.entries(l))typeof v=="string"&&gE.test(v)?(o.scriptCount+=1,o.removedScripts.push({name:p,value:v}),r=!0):c[p]=v;o.scriptCount>0&&(Object.keys(c).length===0?delete t.scripts:t.scripts=c)}if(r){const c=jp(n,a,{useEditorconfig:i});Ni(n),rn(n,`${JSON.stringify(t,void 0,c)}
|
|
1179
1179
|
`,"utf8")}return o},lci=[".husky/pre-commit",".vis/hooks/pre-commit",".git/hooks/pre-commit"],cci=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],R_=(e,i)=>{const n=[],o=a=>{const t=Z(e,a);O(t)&&gE.test(Ze(t))&&(n.push(a),Ei(i,`Update ${a} — replace \`syncpack\` invocation(s) with \`vis lint\` / \`vis sort-package-json\` as appropriate.`))};for(const a of cci){const t=Z(e,a);if(O(t)){if(a===".github/workflows"){try{for(const r of Wn(t))(r.endsWith(".yml")||r.endsWith(".yaml"))&&o(`.github/workflows/${r}`)}catch{}continue}o(a)}}return n},M_=(e,i)=>{const n=[];for(const o of lci){const a=Z(e,o);O(a)&&gE.test(Ze(a))&&(n.push(o),Ei(i,`Update ${o} — replace \`syncpack\` invocation with \`vis lint\` / \`vis sort-package-json\` as appropriate.`))}return n},hci=e=>{const i=Z(e,"pnpm-workspace.yaml");if(!O(i))return!1;let n;try{n=gg(i)}catch{return!1}if(!n||typeof n!="object")return!1;let o=!1;const a=n.catalog;a&&typeof a.syncpack=="string"&&(delete a.syncpack,o=!0);const t=n.catalogs;if(t&&typeof t=="object")for(const r of Object.values(t))r&&typeof r.syncpack=="string"&&(delete r.syncpack,o=!0);return o&&(Ni(i),y2(i,n)),o},pci=(e,i)=>{for(const n of[...D_,...sE]){const o=Z(e,n);O(o)&&(Ni(o,i),iu(o),mo(i,lC,"removedConfigCount"))}},vci=(e,i,n,o,a)=>{const t=J_(i,a);Z_(i,a);const r=M_(e,a);r.length>0&&!n.silent&&o.warn(`Found syncpack reference in ${String(r.length)} hook file(s) — see manualSteps for details.`);const s=R_(e,a);s.length>0&&!n.silent&&o.warn(`Found syncpack reference in ${String(s.length)} CI file(s) — see manualSteps for details.`);const d=T_(i,a);(t.length>0||Object.keys(d).length>0)&&gci(e,t,o,d);const{catalogStripped:l,configRemoved:c,dependencyRemoved:p,removedScripts:v,scriptCount:y}=dci(e,n.useEditorconfig);c&&!n.silent&&o.info("Removed `syncpack` block from package.json"),p&&mo(a,lC,"removedPackageCount");const f=hci(e);if((l||f)&&!n.silent&&o.info("Stripped `syncpack` from catalog protocol entries."),y>0){mo(a,lC,"rewrittenScriptCount",y);for(const{name:m,value:C}of v)Ei(a,`Recreate script \`${m}\` (removed; was \`${C}\`). Replace \`syncpack\` with \`vis lint\` / \`vis sort-package-json\` as appropriate.`);n.silent||o.info(`Removed ${String(y)} script(s) referencing \`syncpack\`. Replace with \`vis lint\` / \`vis sort-package-json\` as appropriate.`)}pci(e,a)},Ox=(e,i,n,o)=>{const a=Y_(e);if(!a)return i.silent||n.info("No syncpack configuration found — nothing to migrate."),!1;const t=nci(e);t&&(fi(o,`Syncpack config ${t} is a TS/JS format vis migrate cannot load — executable config support is tracked in https://github.com/visulima/visulima/issues/622. Convert to .syncpackrc.json and re-run.`),Ei(o,`Convert ${t} to .syncpackrc.json (or translate it directly into policy.customTypes.extraTypes in vis.config.ts) — see https://github.com/visulima/visulima/issues/622`),i.silent||n.warn(`Cannot read ${t} — manual migration required (https://github.com/visulima/visulima/issues/622).`)),oci(e)&&(fi(o,"vis.config.ts already declares `policy.customTypes.extraTypes` — skipping syncpack customTypes merge to avoid duplicates."),i.silent||n.warn("vis.config.ts already has policy.customTypes.extraTypes — skipping merge"));const r=rci(e,a,o);if(!r)return!1;if(i.dryRun){const s=J_(r,o),d=T_(r,o);Z_(r,o),M_(e,o),R_(e,o);const l=N_(s,d);return i.silent||(l===""?n.info("[dry-run] No policy entries to merge — manualSteps will surface the rest."):(n.info(`[dry-run] Would merge ${l} into vis.config.ts:`),n.info(cC(s,d)))),!0}return vci(e,r,i,n,o),!0},Aci=e=>e.map(i=>{if(i.startsWith("^"))return{dependencies:!0,target:i.slice(1)};if(i.includes("#")){const[n,o]=i.split("#");return{projects:n,target:o}}return i}),yci=(e,i,n)=>{const o=e.tasks??e.pipeline??{},a={};for(const[s,d]of Object.entries(o)){if(s.includes("#"))continue;const l={};d.persistent&&(l.persistent=!0),d.interactive&&(l.interactive=!0);const c={};d.cache===!1&&(c.cache=!1),d.dependsOn&&d.dependsOn.length>0&&(c.dependsOn=Aci(d.dependsOn)),d.inputs&&d.inputs.length>0&&(c.inputs=d.inputs),d.outputs&&d.outputs.length>0&&(c.outputs=d.outputs),d.env&&d.env.length>0&&(c.env=d.env),d.passThroughEnv&&d.passThroughEnv.length>0&&(c.passThroughEnv=d.passThroughEnv),Object.keys(l).length>0&&(c.options=l),a[s]=c}const t={};Object.keys(a).length>0&&(t.tasks=a);const r={};return e.globalDependencies&&e.globalDependencies.length>0&&(r.globalInputs=e.globalDependencies),e.globalEnv&&e.globalEnv.length>0&&(r.globalEnv=e.globalEnv),e.globalPassThroughEnv&&e.globalPassThroughEnv.length>0&&(r.globalPassThroughEnv=e.globalPassThroughEnv),Object.keys(r).length>0&&(t.taskRunner=r),["// Migrated from turbo.json by `vis migrate turborepo`.","// Review the generated `tasks` block and move project-specific tasks","// into each project's project.json.","",'import { defineConfig } from "@visulima/vis/config";',"",`export default defineConfig(${WS(t,Z(i,"vis.config.ts"),n)});`,""].join(`
|
|
1180
1180
|
`)},_x=(e,i,n,o)=>{const a=UO(e,"turbo.json");if(!a){n.warn("No turbo.json found in workspace root — nothing to migrate."),o.warnings.push("No turbo.json at workspace root.");return}const t=yci(a,e,i.useEditorconfig);if(!KS(e,t,i,n,o))return;o.manualSteps.push("Review the `tasks` block in vis.config.ts — project-specific tasks (turbo's project#task syntax) were skipped and should be moved into each project's project.json."),o.manualSteps.push("vis adds two task primitives turbo doesn't have: `when: { os, env, branch, ci, not.* }` for conditional execution and `always: true` for finally/teardown tasks that run even when upstream fails. See docs/guides/conditional-and-finally-tasks.mdx.");const r=a.tasks??a.pipeline??{};Object.values(r).some(s=>s.outputLogs!==void 0)&&o.warnings.push("`outputLogs` was found on one or more tasks but vis has no equivalent setting — review and remove."),a.remoteCache?.enabled&&o.manualSteps.push("turbo remote cache detected. vis speaks the same HTTP protocol — set taskRunner.remoteCache { url, token, teamId } in vis.config.ts, or keep your TURBO_API / TURBO_TOKEN / TURBO_TEAM env vars (vis honours them as fallbacks).")},fci=/\b(?:husky|lint-staged|nano-staged)\b/,mci=e=>{const i=Z(e,"package.json");if(O(i))try{return JSON.parse(Ze(i))}catch{return}},bci=(e,i)=>{const n=mci(e);if(!n)return!1;const o={...n.dependencies,...n.devDependencies};for(const t of RO)if(o[t])return!0;if(n.scripts){for(const t of Object.values(n.scripts))if(typeof t=="string"&&fci.test(t))return!0}const{overrides:a}=i;return a?Object.keys(a).length>0:!1},wci=e=>O(Z(e,"turbo.json")),jci=e=>O(Z(e,"nx.json")),Cci=e=>O(Z(e,".moon")),Ct=()=>{const e=[];return{lines:e,logger:{info:i=>{e.push(i)},warn:i=>{e.push(`⚠ ${i}`)}}}},kci=[{apply:({packageManager:e,root:i,visConfig:n},o,a)=>{wx(i,e,n,{dryRun:!1},a,o)},description:"Remove husky/lint-staged/nano-staged from package.json and rewrite scripts to `vis staged`.",detect:({root:e,visConfig:i})=>bci(e,i),id:"deps",probe:({packageManager:e,root:i,visConfig:n})=>{const{lines:o,logger:a}=Ct(),t=Na();return wx(i,e,n,{dryRun:!0},a,t),o},title:"Dependencies & scripts"},{apply:({root:e},i,n)=>{Ex(e,{dryRun:!1},n,i)},description:"Inline lint-staged configuration into vis.config.ts.",detect:({root:e})=>!!KO(e),id:"lint-staged",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return Ex(e,{dryRun:!0},n,o),i},title:"lint-staged"},{apply:({root:e},i,n)=>{$x(e,{dryRun:!1},n,i)},description:"Inline nano-staged configuration into vis.config.ts.",detect:({root:e})=>!!qO(e),id:"nano-staged",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return $x(e,{dryRun:!0},n,o),i},title:"nano-staged"},{apply:({root:e},i,n)=>{_x(e,{dryRun:!1},n,i)},description:"Translate turbo.json tasks into vis.config.ts.",detect:({root:e})=>wci(e),id:"turborepo",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return _x(e,{dryRun:!0},n,o),i},title:"Turborepo"},{apply:({root:e},i,n)=>{Dx(e,{dryRun:!1},n,i)},description:"Translate nx.json targets into vis.config.ts.",detect:({root:e})=>jci(e),id:"nx",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return Dx(e,{dryRun:!0},n,o),i},title:"Nx"},{apply:({root:e},i,n)=>{Ix(e,{copyTemplates:!1,dryRun:!1},n,i)},description:"Translate .moon/tasks.yml into vis.config.ts.",detect:({root:e})=>Cci(e),id:"moon",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return Ix(e,{copyTemplates:!1,dryRun:!0},n,o),i},title:"Moon"},{apply:({root:e},i,n)=>{jx(e,{dryRun:!1},n,i)},description:"Convert gitleaks config/baseline/hooks to `vis secrets`.",detect:({root:e})=>!!(Fy(e)??PS(e)??OS(e)),id:"gitleaks",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return jx(e,{dryRun:!0},n,o),i},title:"Gitleaks"},{apply:({root:e},i,n)=>{kx(e,{dryRun:!1},n,i)},description:"Convert Kingfisher baseline/rules/hooks to `vis secrets`.",detect:({root:e})=>!!(_S(e)??Py(e)),id:"kingfisher",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return kx(e,{dryRun:!0},n,o),i},title:"Kingfisher"},{apply:({root:e},i,n)=>{Yx(e,{dryRun:!1},n,i)},description:"Replace secretlint config/hooks with `vis secrets`.",detect:({root:e})=>!!(n_(e)??o_(e)),id:"secretlint",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return Yx(e,{dryRun:!0},n,o),i},title:"Secretlint"},{apply:({root:e},i,n)=>{Ox(e,{dryRun:!1},n,i)},description:"Translate syncpack customTypes into policy.customTypes.extraTypes and strip the syncpack dep/scripts.",detect:({root:e})=>!!Y_(e),id:"syncpack",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return Ox(e,{dryRun:!0},n,o),i},title:"Syncpack"},{apply:({root:e},i,n)=>{Jx(e,{dryRun:!1},n,i)},description:"Strip sherif config/dep/scripts and surface ignore-rules as a positive `vis lint --<rule>` command.",detect:({root:e})=>!!a_(e)||t_(e),id:"sherif",probe:({root:e})=>{const{lines:i,logger:n}=Ct(),o=Na();return Jx(e,{dryRun:!0},n,o),i},title:"Sherif"}],Bci=e=>kci.filter(i=>i.detect(e)),Sci=(e,i)=>({packageManager:HO(e),root:e,visConfig:i}),Eci=(e,i)=>{i.info("── Migration Summary ──");const n=[["Staged configs merged into vis.config.ts",e.mergedStagedConfigCount],["Lint-staged configs inlined",e.inlinedLintStagedConfigCount],["Config files removed",e.removedConfigCount],["Packages removed",e.removedPackageCount],["Scripts rewritten",e.rewrittenScriptCount]];for(const[a,t]of n)t>0&&i.info(` ${a}: ${String(t)}`);e.gitHooksConfigured&&i.info(" Pre-commit hook updated to use vis staged");const o=Object.entries(e.perMigration);if(o.length>0){i.info(""),i.info("By migration:");for(const[a,t]of o){const r=[];t.removedConfigCount>0&&r.push(`${String(t.removedConfigCount)} config(s) removed`),t.removedPackageCount>0&&r.push(`${String(t.removedPackageCount)} package(s) removed`),t.rewrittenScriptCount>0&&r.push(`${String(t.rewrittenScriptCount)} script(s) rewritten`),i.info(` ${a}: ${r.join(", ")||"no changes"}`)}}if(e.backupsCreated.length>0&&(i.info(""),i.info(`Created ${String(e.backupsCreated.length)} .bak file(s) for rollback. Remove them once you're happy.`)),e.warnings.length>0){i.info(""),i.warn("Warnings:");for(const a of e.warnings)i.warn(` - ${a}`)}if(e.manualSteps.length>0){i.info(""),i.info("Manual steps required:");for(const a of e.manualSteps)i.info(` - ${a}`)}},Ici=(e,i)=>{if(e.length===0){i.info("No applicable migrations detected in this workspace.");return}i.info(`Detected migrations (non-interactive preview):
|
|
1181
|
-
`);for(const n of e){i.info(` • ${n.entry.title} — ${n.entry.description}`);for(const o of n.preview)i.info(` ${o}`);i.info("")}i.info("Run a specific migration with `vis migrate <name>` (e.g. `vis migrate deps`).")},Qci=async e=>{const i=e.workspaceRoot??process.cwd(),n=e.visConfig??{},o=Sci(i,n),a=Bci(o).map(p=>({entry:p,preview:p.probe(o)}));if(!(process.stdout.isTTY&&!Zt)){Ici(a,e.logger);return}if(a.length===0){e.logger.info("No applicable migrations detected in this workspace.");return}const t=new Dri(a),r=n.tui?.autoExit??!1,s=r===!0?3:typeof r=="number"?r:0,d=await Cri(Pd.createElement(rsi,{autoExitSeconds:s,isDryRun:!1,store:t}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit();if(!d||d.length===0){e.logger.info("No migrations selected — exiting.");return}const l=Na(),c=[];for(const p of d)try{e.logger.info(`── Applying ${p.entry.title} ──`),p.entry.apply(o,l,e.logger),e.logger.info("")}catch(v){c.push({entry:p.entry,error:v}),e.logger.warn(`Failed to apply ${p.entry.title}: ${v.message}`)}Eci(l,e.logger),c.length>0&&(e.logger.warn(""),e.logger.warn(`${String(c.length)} migration(s) failed — see messages above.`),process.exitCode=1)},Lci={description:"Analyze and optimize dependencies using e18e replacements and @socketregistry overrides",examples:[["vis optimize","Interactive TUI to select and apply optimizations"],["vis optimize --dry-run","Preview available optimizations"],["vis optimize --pin","Pin Socket.dev overrides to exact versions"],["vis optimize --prod","Only optimize production dependencies"]],group:"Workspace",loader:()=>import("./handler65.js").then(e=>e.h),name:"optimize",options:[{alias:"d",defaultValue:!1,description:"Preview available optimizations without applying",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Pin Socket.dev overrides to exact versions",name:"pin",type:Boolean},{defaultValue:!1,description:"Only optimize production dependencies",name:"prod",type:Boolean},{defaultValue:!1,description:"Skip running install after applying overrides",name:"no-install",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]},$ci={argument:{description:"Subcommand and arguments (e.g., cache dir, publish --dry-run, list --depth 0)",name:"args",type:String},description:"Package manager utilities (cache, publish, audit, list, config, etc.)",examples:[["vis pm cache dir","Show cache directory"],["vis pm cache clean","Clean cache"],["vis pm publish --dry-run","Preview publishing"],["vis pm list --depth 0","List direct dependencies"],["vis pm audit","Run security audit"],["vis pm whoami","Show logged-in user"]],group:"System",loader:()=>import("./handler18.js"),name:"pm"},Dci={commandPath:["release"],description:"Author a new change file (interactive, or non-interactive via --packages)",examples:[["vis release add","Interactive prompt"],["vis release add --packages '@scope/cerebro:minor,@scope/string:patch' --message 'Add tab completion'","Non-interactive"],["vis release add --empty","Author an empty change file (acknowledges PR but releases nothing)"],["vis release add --name fix-tab-completion","Use a fixed slug instead of a random animal name"],["vis release add --from-bot-pr","Generate a change file from the current Dependabot / Renovate PR (changesets #647)"]],group:"Release",loader:()=>import("./handler30.js"),name:"add",options:[{description:"Comma-separated package:level pairs (e.g. '@scope/a:minor,@scope/b:patch')",name:"packages",type:String},{description:"Changelog body for the change file",name:"message",type:String},{description:"Slug for the filename (default: random animal name)",name:"name",type:String},{description:"Author an empty change file (no bumps; satisfies non-strict `check`)",name:"empty",type:Boolean},{description:"Author a `none` change file (acknowledged but no direct bump)",name:"none",type:Boolean},{description:"Inspect the current PR (via `gh pr view`) and author a change file from its Dependabot / Renovate title (changesets #647)",name:"from-bot-pr",type:Boolean}]},Yci={commandPath:["release"],description:"Render the would-be changelog entries without writing to disk",examples:[["vis release changelog","Print rendered entries for the pending plan"],["vis release changelog --json","Emit ChangelogResult (with projectChangelogs[]) as JSON"]],group:"Release",loader:()=>import("./handler31.js"),name:"changelog",options:[{description:"Emit machine-readable JSON",name:"json",type:Boolean},{description:"Limit to packages matching this glob (CSV)",name:"filter",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Jci={commandPath:["release"],description:"Verify pending change files cover changed packages — CI / husky gate",examples:[["vis release check","Pass if at least one change file exists"],["vis release check --strict","Fail if any changed package isn't covered by a change file"],["vis release check --hook pre-commit","Run as a husky pre-commit hook"],["vis release check --no-fail","Print warnings but always exit 0"]],group:"Release",loader:()=>import("./handler32.js"),name:"check",options:[{description:"Require every changed package to have its own non-empty change file",name:"strict",type:Boolean},{description:"Hook context (pre-commit, pre-push) — affects which file states are counted",name:"hook",type:String},{description:"Always exit 0; warnings still print to stderr",name:"no-fail",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},xci={commandPath:["release","ci"],description:"CI: post or update a sticky PR comment with the pending release plan",examples:[["vis release ci check","Resolve PR from GITHUB_REF, post/update the release plan comment"],["vis release ci check --strict","Fail if any changed package isn't covered"]],group:"Release",loader:()=>import("./handler33.js"),name:"check",options:[{description:"Require every changed package to be covered by a change file",name:"strict",type:Boolean},{description:"Always exit 0 (warnings still print)",name:"no-fail",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Zci={commandPath:["release","ci"],description:"CI: emit JSON plan + write to $GITHUB_OUTPUT for workflow gating",examples:[["vis release ci plan","Emit { mode, packages, json } and set $GITHUB_OUTPUT"]],group:"Release",loader:()=>import("./handler34.js"),name:"plan",options:[{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Tci={commandPath:["release","ci"],description:"CI: rebase the open version-PR onto the base branch and force-push",examples:[["vis release ci rebase-pr","Rebase the version-PR branch onto base + force-push"],["vis release ci rebase-pr --branch=release/version","Override the version-PR branch"]],group:"Release",loader:()=>import("./handler35.js"),name:"rebase-pr",options:[{description:"Override the version-PR branch (default: vis-release/version-packages)",name:"branch",type:String},{description:"Override the base branch (default: release.baseBranch)",name:"base",type:String}]},Nci={commandPath:["release","ci"],description:"CI: maintain a rolling version-PR (default) or version+publish inline (--auto-publish)",examples:[["vis release ci release","On push to main: open/update Versioned release PR; on PR merge: publish"],["vis release ci release --auto-publish","Skip version-PR; version + publish inline (alpha/beta workflow)"]],group:"Release",loader:()=>import("./handler55.js"),name:"release",options:[{description:"Skip version-PR; version + publish inline",name:"auto-publish",type:Boolean},{description:"Override version-PR branch (default: vis-release/version-packages)",name:"branch",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: force currentVersionResolver=disk and skip remote tag-collision checks. Use on the very first release before any git tags exist.",name:"first-release",type:Boolean}]},Rci={commandPath:["release","ci"],description:"CI: print setup checklist for tokens (VIS_GH_TOKEN, NPM_TOKEN, OIDC) and workflow permissions",examples:[["vis release ci setup","Walk through the recommended secrets + workflow setup"]],group:"Release",loader:()=>import("./handler36.js"),name:"setup",options:[]},Mci={commandPath:["release","ci"],description:"CI: publish snapshot of affected packages + post sticky PR comment with install instructions",examples:[["vis release ci snapshot --tag pr-1234","Publish PR snapshot + post install snippet"]],group:"Release",loader:()=>import("./handler37.js"),name:"snapshot",options:[{description:"Override dist-tag (default: pr-<PR_NUMBER>)",name:"tag",type:String},{description:"PR-close cleanup mode — enumerate the closed PR's commit SHAs and remove their snapshot tags from the registry (when supported by the backend)",name:"on-close",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Hci={commandPath:["release"],description:"Preflight diagnostics for the release subsystem (workspace, PM, OIDC, NAPI, guards)",examples:[["vis release doctor","Run all checks; exit non-zero if any error"],["vis release doctor --json","Emit machine-readable report"]],group:"Release",loader:()=>import("./handler38.js"),name:"doctor",options:[{description:"Emit machine-readable JSON instead of a table",name:"json",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: doctor asserts the workspace has no release tags and no package has been published yet. Pair with `vis release version --first-release`.",name:"first-release",type:Boolean}]},Gci={commandPath:["release"],description:"Auto-derive a change file from branch commits (conventional-commits + path heuristics)",examples:[["vis release generate","Walk commits since the merge-base with baseBranch"],["vis release generate --from origin/main","Walk commits since the given ref"],["vis release generate --dry-run","Print the would-be content without writing"]],group:"Release",loader:()=>import("./handler56.js"),name:"generate",options:[{description:"Git ref to compare against (default: merge-base with baseBranch)",name:"from",type:String},{description:"Slug for the generated filename (default: random animal name)",name:"name",type:String},{description:"Print would-be content without writing",name:"dry-run",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Xci={commandPath:["release"],description:"Scaffold .vis/release; migrate from changesets / bumpy / semantic-release",examples:[["vis release init","Auto-detect source tool and scaffold"],["vis release init --from-semantic-release","Force semantic-release migration"],["vis release init --from-changesets","Force changesets migration"],["vis release init --fresh","Skip migration; start clean"],["vis release init --dry-run","Print what would happen without writing files"],["vis release init --from-semantic-release --apply","Actually perform the semantic-release migration writes"]],group:"Release",loader:()=>import("./handler39.js"),name:"init",options:[{description:"Force migration from semantic-release / multi-semantic-release",name:"from-semantic-release",type:Boolean},{description:"Force migration from changesets",name:"from-changesets",type:Boolean},{description:"Force migration from bumpy",name:"from-bumpy",type:Boolean},{description:"Skip migration; start clean",name:"fresh",type:Boolean},{description:"Print what would happen without writing files",name:"dry-run",type:Boolean},{alias:"y",description:"Auto-confirm prompts (CI-safe)",name:"yes",type:Boolean},{description:"Generate CI workflow files. GitHub → `.github/workflows/vis-release{,-check,-snapshot}.yml`. GitLab → `.gitlab-ci.yml`.",name:"workflows",type:Boolean},{description:"Override package manager when generating workflows (npm | pnpm | yarn | bun). Default: auto-detect",name:"package-manager",type:String},{description:"Actually perform the migration writes (not dry-run)",name:"apply",type:Boolean}]},Fci={commandPath:["release"],description:"Print the next computed version for each package in the release plan. Read-only; no mutations.",examples:[["vis release next-version","Print `<pkg> <old> -> <new>` for every package in the plan"],["vis release next-version --package=@scope/a","Single-package mode"],["vis release next-version --json","Emit a `{ name: { from, to } }` JSON map"]],group:"Release",loader:()=>import("./handler40.js"),name:"next-version",options:[{description:"Limit output to a single package",name:"package",type:String},{description:"Emit a JSON `{ name: { from, to } }` map instead of pretty lines",name:"json",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Bootstrap mode for greenfield monorepos: preview the plan without registry / tag lookups (matches `vis release version --first-release`).",name:"first-release",type:Boolean}]},Pci={commandPath:["release"],description:"Dry-run the configured notification channels (slack / discord / webhook / plugins) with a synthetic release",examples:[["vis release notifications test","Dispatch a fake release to every configured channel"],["vis release notifications test --channel=slack","Dispatch to every Slack channel only"],["vis release notifications test --channel=slack:eng","Dispatch to the slack channel with id=eng only"],["vis release notifications test --custom-context=./fake.json","Use operator-supplied JSON instead of the built-in synthetic release"],["vis release notifications test --json","Emit machine-readable results"]],group:"Release",loader:()=>import("./handler41.js"),name:"notifications",options:[{defaultOption:!0,defaultValue:"test",description:"Subcommand: test",name:"action",type:String},{description:"Restrict dispatch to a single channel kind (`slack`, `discord`, `webhook`) or an id'd channel (`slack:eng`)",name:"channel",type:String},{description:"Path to a JSON file containing a NotificationContext to use instead of the synthetic default",name:"custom-context",type:String},{description:"Emit machine-readable JSON instead of a per-channel report",name:"json",type:Boolean}]},Oci={commandPath:["release"],description:"Inspect the release plan; with --interactive, walk through and override bump levels",examples:[["vis release plan","Emit pending plan as JSON"],["vis release plan --interactive","Walk through pending releases, accept or override each bump"],["vis release plan -i --write","Walk through interactively and write the chosen overrides to a change file"]],group:"Release",loader:()=>import("./handler42.js"),name:"plan",options:[{description:"Filter packages by name glob",name:"filter",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{alias:"i",description:"Walk through pending releases interactively and accept / override each bump level",name:"interactive",type:Boolean},{description:"When used with --interactive, write the chosen overrides to a new change file (.vis/release/<id>.md)",name:"write",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},_ci={commandPath:["release"],description:"Enter / exit pre-release mode (changesets-compatible — every `version` produces a prerelease until exit)",examples:[["vis release pre enter alpha","Enter pre-mode with the `alpha` tag"],["vis release pre enter rc --no-commit","Enter pre-mode locally without committing pre.json"],["vis release pre exit","Flag the next `version` to consolidate + exit pre-mode"],["vis release pre status","Print whether pre-mode is active, exit-pending, or off"]],group:"Release",loader:()=>import("./handler44.js"),name:"pre",options:[{defaultOption:!0,defaultValue:"status",description:"Subcommand: enter | exit | status",name:"action",type:String},{description:"Prerelease tag (e.g. alpha, beta, rc). Required for `enter`",multiple:!0,name:"tag",type:String},{defaultValue:!0,description:"Commit pre.json after writing. Default: commit",name:"commit",type:Boolean},{defaultValue:!0,description:"Push the commit. Default: push",name:"push",type:Boolean}]},Wci={commandPath:["release"],description:"Pack-then-publish unpublished packages, push tags, create GH releases",examples:[["vis release publish","Publish all pending packages"],["vis release publish --dry-run","Print what would publish without uploading"],["vis release publish --tag alpha","Override dist-tag"],["vis release publish --filter '@scope/*'","Limit to packages matching the glob"]],group:"Release",loader:()=>import("./handler45.js"),name:"publish",options:[{description:"Skip uploads — print what would happen",name:"dry-run",type:Boolean},{description:"Override npm dist-tag",name:"tag",type:String},{description:"Limit to packages matching this glob (CSV)",name:"filter",type:String},{description:"Skip `git push --tags` after publish (lands in M5)",name:"no-push",type:Boolean},{description:"2FA OTP token",name:"otp",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Resume from a previous run's state file (skips already-published packages)",name:"resume",type:Boolean},{description:"Run preflight checks (config + workspace + plan + auth) and exit. No mutations.",name:"check-only",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: force currentVersionResolver=disk and skip remote tag-collision checks. Use on the very first release before any git tags exist.",name:"first-release",type:Boolean}]},Kci={commandPath:["release"],description:"Publish 0.0.0-<tag>-<sha> snapshot versions of affected packages",examples:[["vis release snapshot --tag pr-1234","Publish snapshots tagged with the PR number"],["vis release snapshot --tag canary --filter '@scope/*'","Limit to a glob"],["vis release snapshot --tag pr-1234 --dry-run","Preview without uploading"]],group:"Release",loader:()=>import("./handler46.js"),name:"snapshot",options:[{description:"Required: dist-tag for the snapshot release",name:"tag",type:String},{description:"Override registry URL (defaults to pkg-pr-new backend or `release.snapshot.registry`)",name:"registry",type:String},{description:"Glob filter (CSV) — limit snapshots to specific packages",name:"filter",type:String},{description:"Print what would publish without uploading",name:"dry-run",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},zci={commandPath:["release"],description:"List, approve, or reject npm staged-publish records (RFC §13.6 — approve/reject need 2FA)",examples:[["vis release stage list","List every staged version (both npm + the local .vis/release/staged.json registry)"],["vis release stage list @scope/pkg","List staged versions for a single package"],["vis release stage list --json","Emit a machine-readable view of both sources"],["vis release stage approve <stage-id>","Promote a staged version, drain it from staged.json, commit + push the registry"],["vis release stage approve --all","Approve every pending stage tracked in .vis/release/staged.json"],["vis release stage reject <stage-id>","Reject a staged version (permanent — cannot be re-approved unless re-staged)"],["vis release stage approve <stage-id> --no-push","Approve, update the registry, commit locally (skip the push)"],["vis release stage approve <stage-id> --no-commit","Approve and update the registry only — no git commit"]],group:"Release",loader:()=>import("./handler47.js"),name:"stage",options:[{defaultOption:!0,defaultValue:"list",description:"Subcommand: list | approve | reject",name:"action",type:String},{description:"Stage IDs (positional args after the action)",multiple:!0,name:"stage-ids",type:String},{description:"Approve every pending stage tracked in .vis/release/staged.json",name:"all",type:Boolean},{description:"Package name filter for `list`",name:"filter",type:String},{description:"Emit machine-readable JSON",name:"json",type:Boolean},{defaultValue:!0,description:"Update .vis/release/staged.json but skip the auto-commit. Default: commit",name:"commit",type:Boolean},{defaultValue:!0,description:"Skip pushing the registry commit to the remote. Default: push",name:"push",type:Boolean}]},Uci={commandPath:["release"],description:"Print pending release plan (which packages will bump and to what version)",examples:[["vis release status","Print pending plan in human-readable format"],["vis release status --json","Emit the plan as JSON for scripting / CI"],["vis release status --bump major,minor","Filter to packages getting major or minor bumps"],["vis release status --filter '@scope/*'","Show only packages matching the glob"]],group:"Release",loader:()=>import("./handler43.js"),name:"status",options:[{description:"Emit machine-readable JSON instead of a table",name:"json",type:Boolean},{description:"Filter packages by name glob",name:"filter",type:String},{description:"Filter by bump level (CSV: major,minor,patch)",name:"bump",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},qci={commandPath:["release"],description:"Apply pending change files to disk: bump versions + write CHANGELOG entries",examples:[["vis release version","Apply the plan to disk"],["vis release version --dry-run","Print what would change without touching disk"],["vis release version --channel alpha","Force a specific channel (overrides branch detection)"]],group:"Release",loader:()=>import("./handler48.js"),name:"version",options:[{description:"Skip writes — print the diff and exit",name:"dry-run",type:Boolean},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Limit to packages matching this glob (CSV)",name:"filter",type:String},{description:"Auto-commit after applying",name:"commit",type:Boolean},{description:"Run preflight checks (config + workspace + plan) and exit. No mutations.",name:"check-only",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: force currentVersionResolver=disk and skip remote tag-collision checks. Use on the very first release before any git tags exist.",name:"first-release",type:Boolean}]},Vci=[Dci,Gci,Uci,Oci,Yci,Jci,Hci,Fci,qci,Wci,Kci,zci,_ci,Xci,Pci,xci,Zci,Nci,Tci,Mci,Rci],ehi={alias:["rm","un","uninstall"],argument:{description:"Packages to remove",name:"packages",type:String},description:"Remove packages using the detected package manager",examples:[["vis remove lodash","Remove a package"],["vis rm old-package","Remove using alias"],["vis remove --filter app react","Remove from specific workspace"],["vis remove -g typescript","Remove global package"]],group:"Dependencies",loader:()=>import("./handler19.js"),name:"remove",options:[{alias:"D",defaultValue:!1,description:"Remove from devDependencies",name:"save-dev",type:Boolean},{alias:"g",defaultValue:!1,description:"Remove global package",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Remove from all workspace packages",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Remove from workspace root",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]},ihi={description:"Replay a previous task run from .vis/runs/ — show task results without re-executing",examples:[["vis replay","Show the most recent run summary"],["vis replay --run 2026-04-28T12-34-56_ab12","Inspect a specific historical run"],["vis replay --list","List every recorded run, newest first"],["vis replay --task @myorg/app:build","Focus on one task within the loaded run"],["vis replay --failed","Filter to only failed tasks"],["vis replay --format=json","Machine-readable output for CI"]],group:"Workspace",loader:pi(()=>import("./handler20.js"),"replayExecute"),name:"replay",options:[{description:"Run id to replay (defaults to the most recent run)",name:"run",type:String},{defaultValue:!1,description:"List every available run instead of replaying one",name:"list",type:Boolean},{description:"Filter the replay to a single task id (e.g. @my/app:build)",name:"task",type:String},{defaultValue:!1,description:"Filter the replay to failed tasks only",name:"failed",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]},nhi={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target across workspace projects",examples:[["vis run","List all available targets"],["vis run build","Run build on all projects"],["vis run :build","Run build on all projects (moon-style)"],["vis run ~:test","Run test on the project closest to the current directory"],['vis run "#frontend:build"',"Run build on projects tagged 'frontend'"],['vis run :build --query "language=typescript"',"Filter by project metadata"],["vis run test --affected","Run test only on git-changed projects"],["vis run build --fail-fast","Stop on first failure"],["vis run build --dry-run","Show execution plan without running"],["vis run destroy --reverse","Run leaves-first (teardown order, e.g. CDK/Pulumi destroy)"]],group:"Run & Execute",loader:()=>import("./handler74.js"),name:"run",options:[{alias:"p",description:"Comma-separated list of projects to run",name:"projects",type:String},{defaultValue:!1,description:"Skip the toolchain pre-flight (no auto-install for any pinned tool: node / pnpm / yarn / npm / bun / deno / go / python / ruby / rust)",name:"skip-toolchain",type:Boolean},{description:"Detect lockfile/node_modules drift before running (warns in TTY, fails in CI). Use --no-preflight to disable.",name:"preflight",type:Boolean},{defaultValue:3,description:"Maximum number of parallel tasks (falls back to VIS_RUN_CONCURRENCY_LIMIT env var, then 3)",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{description:"Comma-separated selectors of tasks to bypass cache for (e.g. 'app:test', ':e2e', '#flaky:lint'). Other tasks in the run still cache normally. --no-cache wins when both are set.",name:"skip-cache",type:String},{description:"Custom cache directory",name:"cache-dir",type:String},{description:"Remote cache mode: read | write | readwrite (defaults to readwrite when remoteCache is configured)",name:"cache-mode",type:String},{description:"Remote cache wire backend: http (Turborepo-compatible) or reapi (Bazel Remote Execution API gRPC)",name:"cache-backend",type:String},{description:"Override how the requested target is hashed for this run: declared (hash listed inputs) or trace (hash the files the task actually reads). Overrides per-target hashMode config for the directly-run target.",name:"hash-mode",type:String},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Generate a run summary after execution",name:"summarize",type:Boolean},{description:'Partition tasks for distributed CI (e.g., "1/4" for first of four runners). Falls back to VIS_PARTITION env var.',name:"partition",type:String},{defaultValue:!1,description:"Skip project constraint validation",name:"skip-constraints",type:Boolean},{description:"Filter matched projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{defaultValue:!1,description:"Only run on projects affected by git changes (shorthand for vis affected)",name:"affected",type:Boolean},{defaultValue:!1,description:"Rerun affected tasks on file change. Ctrl+C to exit.",name:"watch",type:Boolean},{defaultValue:!1,description:"Stop all tasks on first failure",name:"fail-fast",type:Boolean},{defaultValue:!1,description:"Run the dependency graph in reverse (leaves first, then their dependents). Useful for teardown targets like `destroy`/`undeploy` where dependents must run before the things they depend on.",name:"reverse",type:Boolean},{description:"Output mode: interleaved (pass-through), labeled (prefix each line with [pkg#task]), or grouped (vite-task-style block)",name:"log",type:String},{description:"Output style: normal (print every task) or quiet (skip output for successful/cached tasks; failed tasks still print in CI mode, and remain in TUI scrollback in interactive mode). Defaults to normal; set run.quietOnSuccess in config to make quiet the default. Per-target options.outputStyle overrides this.",name:"output-style",type:String},{defaultValue:!1,description:"Run every task through a pseudo-terminal so color-aware tools render as if attached to a TTY (disables caching)",name:"pty",type:Boolean},{description:"Global retry budget: cap on total task retries across the run (per-target retryCount is still honored up to the budget)",name:"retry-budget",type:Number},{description:"Write a Chrome Tracing JSON profile of the run to this path (open in chrome://tracing or Perfetto)",name:"profile",type:String},{defaultValue:!1,description:"Render the most-recent run's saved summary (from .vis/last-summary.json) and exit without executing any tasks",name:"last-details",type:Boolean},{defaultValue:!0,description:"Show flaky task report on failure (use --no-flaky to suppress)",name:"flaky",type:Boolean},{defaultValue:!1,description:"Treat any task that needed at least one retry as a run failure (exit non-zero), even when retries eventually succeeded. Use in CI to surface flakes that retries would otherwise mask.",name:"fail-on-retry",type:Boolean},{description:"Fail a task if its command references an env var that is unset (no silent empty-string substitution). Use --no-strict-env to disable when set in config.",name:"strict-env",type:Boolean},{description:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Tasks declaring `options.runnerTags` only run when at least one tag overlaps. Untagged tasks always run. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String},{description:"Auto-start service deps. One of: auto | ephemeral | persistent | off. Defaults to `auto` in TTY, `off` in CI.",name:"services",type:String},{defaultValue:!1,description:"Stop services this run auto-started in registry mode when the run exits (clean, q, or Ctrl+C). Ephemeral services already die with the run.",name:"stop-services",type:Boolean}]},ohi={description:"Generate a CycloneDX 1.7 Software Bill of Materials for the workspace",examples:[["vis sbom","Write the full-workspace SBOM to sbom.cdx.json"],["vis sbom --focus=my-app","Scope the SBOM to my-app's transitive closure"],["vis sbom --focus=my-app,other","Focus multiple projects"],["vis sbom --format=xml --output=sbom.cdx.xml","Emit XML instead of JSON"],["vis sbom --include-dev","Include devDependencies (default: production only)"],["vis sbom --output=-","Write to stdout"]],group:"Security & Health",loader:()=>import("./handler21.js"),name:"sbom",options:[{description:"Project name(s) to focus on — comma-separated for multiple",name:"focus",type:String},{defaultValue:"json",description:"Output format: json (default) or xml",name:"format",type:String},{description:"Output path (use '-' for stdout; default: sbom.cdx.json)",name:"output",type:String},{defaultValue:!1,description:"Include devDependencies (default: production only)",name:"include-dev",type:Boolean}]},ahi={argument:{description:"One or more paths to scan (defaults to workspace root)",name:"paths",type:String},description:"Scan a repository for hardcoded secrets and credentials",examples:[["vis secrets","Scan the workspace with grouped, colourised output"],["vis secrets --staged","Scan only files staged for the current commit (pre-commit hooks)"],["vis secrets --since main","Scan only files changed since the `main` branch"],["vis secrets --affected","Scan only projects affected by the current branch"],["vis secrets --history","Scan the full git history for secrets that were committed then removed"],["vis secrets --history --history-range main..HEAD","Scan only commits on the current branch since main"],["vis secrets --history --max-commits 100 --redact","Scan the last 100 commits, masking any secret values"],["vis secrets --init","Write an initial baseline from current findings"],["vis secrets --list-rules","Print all bundled detection rules"],["vis secrets --list-validators","Print non-HTTP validator types in the ruleset + install hints for each"],["vis secrets --exclude-rule generic-api-key --exclude-rule aws-access-token","Drop noisy rules"],["vis secrets --include-rule stripe-access-token","Check a single rule"],["vis secrets --enable-rule tag:preset:weak-passwords","Enable an opt-in rule group additively (defaults still fire)"],["vis secrets --include-rule tag:preset:password-manager","Restrict output to one opt-in group only"],["vis secrets --min-confidence high","Drop rules without a high confidence label (CI-friendly precision filter)"],["vis secrets --validate --only-verified","Live-verify each finding against its provider (one HTTP call per finding)"],["vis secrets --exclude 'dist/**' --exclude-from .secretsignore","Extra gitignore-syntax exclusions for the walker"],["vis secrets --config ./leaks.json --no-extend-bundled","Use only the supplied config, skip the bundled ruleset"],["vis secrets --concurrency 4","Cap the rayon thread pool (0 / omit = auto)"],["vis secrets --baseline .secrets-baseline.json","Suppress known findings; print diff vs. baseline"],["vis secrets --update-baseline","Merge current findings into the baseline (use --replace-baseline to overwrite)"],["vis secrets --format sarif > report.sarif","SARIF output for GitHub code-scanning"]],group:"Security",loader:()=>import("./handler75.js"),name:"secrets",options:[{description:"Path to a JSON config (gitleaks-compatible shape). Defaults to the bundled ruleset.",name:"config",type:String},{description:"Drop rules below this author-declared confidence: low (default), medium, high. Rules without a declared confidence (every gitleaks rule) are treated as low, so --min-confidence medium or higher drops them along with explicit low-confidence rules.",name:"min-confidence",type:String},{defaultValue:!1,description:"Live-verify each finding against its provider (one HTTP call per finding, max 8 concurrent). Only supports Kingfisher-style HTTP validators with StatusMatch / WordMatch response matchers; other types (gRPC, multi-step, checksum) mark the finding as validation=skipped. WARNING: sends candidate secrets to the provider — some providers alert their security team on failed auth attempts.",name:"validate",type:Boolean},{defaultValue:!1,description:"With --validate, drop every finding whose validation is not 'verified'. Useful for CI gating.",name:"only-verified",type:Boolean},{defaultValue:!1,description:"With --config, do not merge on top of the bundled ruleset — replace it.",name:"no-extend-bundled",type:Boolean},{defaultValue:"text",description:"Output format: text (default), json, sarif",name:"format",type:String},{description:"Path to a baseline JSON of previously-triaged findings",name:"baseline",type:String},{defaultValue:!1,description:"Scan only files staged for commit",name:"staged",type:Boolean},{description:"Scan only files changed since <ref> (e.g. main, origin/HEAD)",name:"since",type:String},{defaultValue:!1,description:"Scan only projects affected by the current branch",name:"affected",type:Boolean},{defaultValue:!1,description:"Scan the entire git history (every added/modified blob across commits) instead of the working tree. Surfaces secrets that were committed and later removed. Cannot be combined with --staged/--since/--affected.",name:"history",type:Boolean},{description:"With --history, limit the walk to a rev-list range (e.g. main..HEAD, HEAD~50..HEAD, or a single ref). Defaults to all reachable history of HEAD.",name:"history-range",type:String},{description:"With --history, cap the number of commits walked (most-recent first)",name:"max-commits",type:Number},{description:"Enable an opt-in rule or tag without restricting output — additive (e.g. tag:preset:weak-passwords, tag:preset:password-manager). Repeatable.",multiple:!0,name:"enable-rule",type:String},{description:"Rule id or tag:<name> selector — whitelist, only matching findings are emitted. Implies enablement. Repeatable.",multiple:!0,name:"include-rule",type:String},{description:"Rule id or tag:<name> selector — drop matching findings. Repeatable.",multiple:!0,name:"exclude-rule",type:String},{description:"Gitignore-syntax pattern to exclude from the walk (repeatable)",multiple:!0,name:"exclude",type:String},{description:"Path to a gitignore-shaped file the walker should honor (repeatable)",multiple:!0,name:"exclude-from",type:String},{defaultValue:!1,description:"Mask secret values in output",name:"redact",type:Boolean},{defaultValue:!1,description:"Scan dotfiles",name:"include-hidden",type:Boolean},{defaultValue:!1,description:"Do not respect .gitignore",name:"no-gitignore",type:Boolean},{description:"Skip files larger than this (bytes). Default: 10 MiB",name:"max-size",type:Number},{description:"Rayon worker threads (0 / omit = auto)",name:"concurrency",type:Number},{defaultValue:!1,description:"Merge current findings into the baseline and exit 0",name:"update-baseline",type:Boolean},{defaultValue:!1,description:"With --update-baseline, replace rather than merge",name:"replace-baseline",type:Boolean},{defaultValue:!1,description:"Scaffold a baseline from current findings",name:"init",type:Boolean},{defaultValue:!1,description:"With --init, preview the baseline without writing files",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Print all bundled detection rules and exit",name:"list-rules",type:Boolean},{defaultValue:!1,description:"Print non-HTTP validator types referenced by the current ruleset, with install hints for their optional peer dependencies.",name:"list-validators",type:Boolean},{defaultValue:!1,description:"Suppress all progress output (only emit findings)",name:"quiet",type:Boolean},{defaultValue:!1,description:"Print diagnostic info (skipped rules, etc.)",name:"verbose",type:Boolean}]},thi={commandPath:["security"],description:"List build-script status — allowed, unapproved, and stale allowlist entries",examples:[["vis security list","Show the full build-script triage report"],["vis security list --json","Emit the report as JSON for tooling"]],group:"Security & Health",loader:()=>import("./list.js"),name:"list",options:[{defaultValue:!1,description:"Emit the report as JSON instead of human-readable text",name:"json",type:Boolean}]},rhi={commandPath:["security"],description:"Push vis.config security settings to the package manager's native config",examples:[["vis security sync","Sync allowBuilds + minimumReleaseAge to the PM-native config files"],["vis security sync --skip-allow-builds","Sync only the minimumReleaseAge knobs"],["vis security sync --skip-min-release-age","Sync only allowBuilds (trustedDependencies / onlyBuiltDependencies)"]],group:"Security & Health",loader:()=>import("./sync2.js"),name:"sync",options:[{defaultValue:!1,description:"Skip syncing allowBuilds (trustedDependencies, onlyBuiltDependencies)",name:"skip-allow-builds",type:Boolean},{defaultValue:!1,description:"Skip syncing minimumReleaseAge and its excludes",name:"skip-min-release-age",type:Boolean}]},shi={commandPath:["security"],description:"Run lifecycle scripts for packages in security.policies.installScripts.allow (LavaMoat 'run' parity)",examples:[["vis security run","Run preinstall/install/postinstall for every approved package"],["vis security run --with-root","Also run the workspace root's prepublish + prepare hooks"],["vis security run --root-only","Run only the workspace root's prepublish + prepare hooks"]],group:"Security & Health",loader:()=>import("./run.js"),name:"run",options:[{defaultValue:!1,description:"Also run the workspace root's prepublish + prepare hooks after dependencies",name:"with-root",type:Boolean},{defaultValue:!1,description:"Skip dependency scripts and only run the workspace root's prepublish + prepare hooks",name:"root-only",type:Boolean}]},uhi={commandPath:["security"],description:"Install @lavamoat/preinstall-always-fail as a devDep so a missing ignore-scripts setting fails loudly",examples:[["vis security tripwire","Install the tripwire devDependency"],["vis security tripwire --status","Report whether the tripwire is installed"],["vis security tripwire --remove","Remove the tripwire from package.json"]],group:"Security & Health",loader:()=>import("./tripwire.js"),name:"tripwire",options:[{defaultValue:!1,description:"Report whether @lavamoat/preinstall-always-fail is installed",name:"status",type:Boolean},{defaultValue:!1,description:"Remove @lavamoat/preinstall-always-fail from package.json",name:"remove",type:Boolean}]},ghi={commandPath:["security"],description:"Force-refresh the cached npm signing keys used by the signatures marshall",examples:[["vis security keys-refresh","Drop the disk cache and fetch a fresh key set from registry.npmjs.org"],["vis security keys-refresh --clear","Only drop the cache, do not refetch"],["vis security keys-refresh --json","Emit the refresh result as JSON for tooling"]],group:"Security & Health",loader:()=>import("./keys-refresh.js"),name:"keys-refresh",options:[{defaultValue:!1,description:"Only clear the cache, do not refetch",name:"clear",type:Boolean},{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean}]},dhi={commandPath:["security"],description:"Verify the entire lockfile closure against supply-chain policies (firstSeen, publisherChange, blockExoticSubdeps)",examples:[["vis security verify-lockfile","Re-validate every locked entry; exit non-zero on a policy violation"],["vis security verify-lockfile --offline","Verify without network (skips firstSeen / publisherChange)"],["vis security verify-lockfile --json","Emit the verification result as JSON for CI"]],group:"Security & Health",loader:()=>import("./verify-lockfile.js"),name:"verify-lockfile",options:[{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean},{defaultValue:!1,description:"Skip network-bound policies (firstSeen, publisherChange)",name:"offline",type:Boolean}]},lhi=[thi,rhi,shi,uhi,ghi,dhi],Uy={description:"Target id, e.g. @my/api:db",name:"targetId",type:String},chi={description:"Output format: table or json (default: table)",name:"format",type:String},hhi={argument:Uy,commandPath:["service"],description:"Start a service target detached so it survives across `vis run` invocations",examples:[["vis service start @my/api:db","Boot the db target as a long-lived service"],["vis service start @my/api:db --timeout=60000","Override readiness timeout"],["vis service start @my/api:db --no-readiness","Skip the readiness probe"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceStartExecute"),name:"start",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{defaultValue:!1,description:"Skip the readiness probe",name:"no-readiness",type:Boolean}]},phi={argument:{description:"Target id to stop, or omit when using --all",name:"targetId",required:!1,type:String},commandPath:["service"],description:"Stop a running service",examples:[["vis service stop @my/api:db","Stop the db service"],["vis service stop --all","Stop every running service in this workspace"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceStopExecute"),name:"stop",options:[{defaultValue:!1,description:"Stop every service registered for this workspace",name:"all",type:Boolean},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number}]},vhi={commandPath:["service"],description:"List services registered for this workspace",examples:[["vis service list","Print running services"],["vis service list --format=json","Machine-readable list"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceListExecute"),name:"list",options:[chi]},Ahi={argument:Uy,commandPath:["service"],description:"Re-run the readiness probe and report a service's health",examples:[["vis service status @my/api:db","Check whether the db service is reachable"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceStatusExecute"),name:"status",options:[{description:"Probe timeout in milliseconds",name:"timeout",type:Number}]},yhi={argument:Uy,commandPath:["service"],description:"Stop and re-start a running service",examples:[["vis service restart @my/api:db","Recycle the db service"],["vis service restart @my/api:db --no-readiness","Recycle and skip the readiness probe"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceRestartExecute"),name:"restart",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number},{defaultValue:!1,description:"Skip the readiness probe after restart",name:"no-readiness",type:Boolean}]},fhi={argument:Uy,commandPath:["service"],description:"Print or tail a service's captured stdout/stderr",examples:[["vis service logs @my/api:db","Print the captured log"],["vis service logs @my/api:db -f","Tail the log (Ctrl-C to exit)"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceLogsExecute"),name:"logs",options:[{alias:"f",defaultValue:!1,description:"Follow the log file (like `tail -f`)",name:"follow",type:Boolean}]},mhi=[hhi,phi,vhi,Ahi,yhi,fhi],bhi={description:"Sort package.json files across the workspace using the sort-package-json Rust crate",examples:[["vis sort-package-json","Sort all package.json files in the workspace"],["vis sort-package-json --check","Check if files are already sorted (exit 1 if not)"],["vis sort-package-json --sort-scripts","Also sort the scripts field alphabetically"],["vis sort-package-json --indent 4","Force 4-space indentation (overrides per-file detection)"],["vis sort-package-json --indent tab","Force tab indentation"],["vis sort-package-json --ignore '**/fixtures/**'","Skip files matching one or more glob patterns"],["vis sort-package-json --sort-order name,version,license","Pin a custom prefix order before the default field order"],["vis sort-package-json --unsorted dependencies,devDependencies","Preserve original key order for the listed top-level sections"],["vis sort-package-json --no-final-newline","Do not append a trailing newline"],["vis sort-package-json --line-ending crlf","Force CRLF line endings (default: auto-detect per file)"]],group:"Workspace",loader:()=>import("./handler63.js"),name:"sort-package-json",options:[{alias:"c",defaultValue:!1,description:"Check if package.json files are sorted without writing (exits 1 if unsorted)",name:"check",type:Boolean},{defaultValue:!1,description:"Also sort the scripts field alphabetically",name:"sort-scripts",type:Boolean},{description:"Indent override: a number of spaces, the literal `tab`, or a literal whitespace string. When unset, the original file's indent is preserved.",name:"indent",type:String},{description:"Glob pattern of files to skip (basename match, or path-relative when the pattern contains `/`). Repeatable.",multiple:!0,name:"ignore",type:String},{description:"Comma-separated list of top-level keys to place first, before the default field order. Repeatable.",multiple:!0,name:"sort-order",type:String},{description:"Comma-separated list of top-level sections whose key order should be preserved (e.g. dependencies,devDependencies). Repeatable.",multiple:!0,name:"unsorted",type:String},{defaultValue:!1,description:"Do not append a trailing newline to the output (default: append one).",name:"no-final-newline",type:Boolean},{defaultValue:"auto",description:"Line ending to write: auto (per-file detection, default), lf, or crlf.",name:"line-ending",type:String},{description:"Disable collapsing `bugs: { url }` to the bare string form (default: enabled).",name:"no-format-bugs",type:Boolean},{description:"Disable collapsing `repository: { type, url }` to the GitHub `owner/repo` shorthand (default: enabled).",name:"no-format-repository",type:Boolean},{description:"Disable canonical sorting of `exports` condition keys (default: enabled).",name:"no-sort-exports",type:Boolean},{description:"Disable .editorconfig discovery for indent / line-ending defaults (default: enabled).",name:"no-editorconfig",type:Boolean}]},whi={argument:{description:"Project name or workspace-relative path of the package to extract",name:"package",type:String},description:"Extract a package into a standalone git repo, preserving its history",examples:[["vis split @scope/pkg --output ../pkg-repo","Extract a package into a new repo at ../pkg-repo"],["vis split packages/tooling/foo -o ../foo --remote git@github.com:me/foo.git --push","Extract, set origin, and push"],["vis split @scope/pkg -o ../pkg --remove","Extract, then delete the package from the monorepo (committed)"],["vis split @scope/pkg --dry-run","Print the git plan without making changes"]],group:"Workspace",loader:()=>import("./handler23.js"),name:"split",options:[{alias:"o",description:"Destination directory for the new repo (required unless --dry-run)",name:"output",type:String},{alias:"b",description:'Default branch name in the new repo (default: vis.config defaultBase or "main")',name:"branch",type:String},{description:"Git remote URL to set as origin on the new repo",name:"remote",type:String},{defaultValue:!1,description:"Push the new repo to origin (requires --remote)",name:"push",type:Boolean},{defaultValue:!1,description:"Delete the package from the monorepo after extracting and commit the removal",name:"remove",type:Boolean},{defaultValue:!1,description:"Prefix the rewritten commit messages with the package name",name:"annotate",type:Boolean},{defaultValue:!1,description:"Use a non-empty --output directory anyway",name:"force",type:Boolean},{defaultValue:!1,description:"Print the git plan instead of executing it",name:"dry-run",type:Boolean}]},jhi={description:"Run linters on staged files using config from vis.config.ts",examples:[["vis staged","Run staged linters"],["vis staged --verbose","Run with verbose output"],["vis staged --no-stash","Run without backup stash"],["vis staged --diff HEAD~1","Run against a specific diff"]],group:"Run & Execute",loader:()=>import("./handler72.js"),name:"staged",options:[{defaultValue:!1,description:"Allow empty commits when tasks revert all staged changes",name:"allow-empty",type:Boolean},{defaultValue:!1,description:"Automatically stage new files that tasks create during the run",name:"auto-stage",type:Boolean},{description:"Number of concurrent tasks or false for serial",name:"concurrent",type:String},{defaultValue:!1,description:"Run all tasks to completion even if one fails",name:"continue-on-error",type:Boolean},{description:"Working directory to run all tasks in",name:"cwd",type:String},{defaultValue:!1,description:"Enable debug output",name:"debug",type:Boolean},{description:"Override the default --staged flag of git diff",name:"diff",type:String},{description:"Override the default diff-filter",name:"diff-filter",type:String},{defaultValue:!1,description:"Fail with exit code 1 when tasks modify tracked files",name:"fail-on-changes",type:Boolean},{defaultValue:!1,description:"Kill in-flight tasks with SIGKILL on fast-fail instead of the default SIGTERM",name:"force-kill",type:Boolean},{defaultValue:!1,description:"Hide unstaged changes from partially staged files",name:"hide-partially-staged",type:Boolean},{defaultValue:!1,description:"Hide all unstaged changes before running tasks",name:"hide-unstaged",type:Boolean},{defaultValue:!1,description:"Suppress console output",name:"quiet",type:Boolean},{defaultValue:!1,description:"Pass filepaths relative to cwd to tasks",name:"relative",type:Boolean},{defaultValue:!1,description:"Revert to original state in case of errors",name:"revert",type:Boolean},{defaultValue:!0,description:"Enable backup stash",name:"stash",type:Boolean},{defaultValue:!1,description:"Show task output even when tasks succeed",name:"verbose",type:Boolean}]},Chi={description:"Show a workspace health dashboard at a glance",examples:[["vis status","Full status overview"],["vis status --json","Machine-readable output"]],group:"Workspace",loader:()=>import("./handler24.js"),name:"status",options:[{defaultValue:!1,description:"Emit JSON output",name:"json",type:Boolean}]},khi={argument:{description:"What to sync: codeowners | package-json-fields",name:"kind",type:String},description:"Synchronise derived workspace artefacts (codeowners, package.json fields, tsconfig refs, …)",examples:[["vis sync codeowners","Generate CODEOWNERS at the repository root"],["vis sync codeowners --out=.github/CODEOWNERS","Write to .github/CODEOWNERS instead"],["vis sync codeowners --check","Fail if the existing file is stale"],["vis sync codeowners --from=project-json,nested-codeowners","Also aggregate nested CODEOWNERS files in the tree"],["vis sync codeowners --regeneration-command='pnpm codeowners'","Set a custom header instruction"],["vis sync codeowners --preserve-block","Splice the generated block between markers in an existing CODEOWNERS"],["vis sync codeowners --write-guard","Also emit GitHub + GitLab Write Guard CI for restricted projects"],["vis sync package-json-fields","Mirror license/author/repository/bugs/homepage/engines from root to every workspace package"],["vis sync package-json-fields --check","Fail if any workspace package.json is out of sync"],["vis sync package-json-fields --fields license,engines","Override the default field list for this run"]],group:"Workspace",loader:()=>import("./handler61.js"),name:"sync",options:[{description:"Output path for the generated file (default: <workspace>/CODEOWNERS) — codeowners kind only",name:"out",type:String},{defaultValue:!1,description:"Verify state without writing (exit non-zero if drift is found)",name:"check",type:Boolean},{description:"Input sources for codeowners. Comma-separated or repeated. Values: project-json | nested-codeowners | package-json-maintainers. Defaults to project-json.",multiple:!0,name:"from",type:String},{description:"Glob (repeatable) used to discover nested CODEOWNERS files. Defaults to `**/CODEOWNERS`.",multiple:!0,name:"nested-includes",type:String},{description:"Header instruction shown to reviewers (replaces the default 'update project.json' note). Codeowners kind only.",name:"regeneration-command",type:String},{defaultValue:!1,description:"Splice the generated block between markers in the existing file instead of overwriting it. Codeowners kind only.",name:"preserve-block",type:Boolean},{defaultValue:!1,description:"Also emit a .github/workflows/write-guard.yml scoped to projects with `restricted: true` in project.json. Codeowners kind only.",name:"write-guard",type:Boolean},{description:"Comma-separated list of fields to mirror from root → workspace packages (package-json-fields kind only). Repeatable.",multiple:!0,name:"fields",type:String},{description:"Glob pattern of package names to skip (package-json-fields kind only). Repeatable.",multiple:!0,name:"ignore-package-name",type:String},{defaultValue:"human",description:"Output format for package-json-fields: human | json",name:"format",type:String},{defaultValue:!1,description:"Suppress per-package log lines; print only the summary (package-json-fields kind only)",name:"quiet",type:Boolean}]},Bhi={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},description:"Explain why a task is included in the graph by walking its dependency chain to a root",examples:[["vis task-why @myorg/app:build","Show what pulls build in"],["vis task-why lib-a:test","Check the test task's triggers"]],group:"Workspace",loader:()=>import("./handler25.js"),name:"task-why"},Cp="Workspace",Shi={commandPath:["toolchain"],description:"Show every detected manager + expected vs actual tool versions",examples:[["vis toolchain status","Show every detected manager + expected vs actual tool versions"],["vis toolchain status --json","Emit the status as JSON"],["vis toolchain status --exit-code","Exit 1 if any tool mismatches (for CI)"]],group:Cp,loader:pi(()=>import("./handler26.js"),"statusExecute"),name:"status",options:[{defaultValue:!1,description:"Exit 1 if any tool mismatches",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Emit JSON",name:"json",type:Boolean}]},Ehi={commandPath:["toolchain"],description:"Print the primary manager's name (for scripts)",examples:[["vis toolchain detect","Print the primary manager's name"]],group:Cp,loader:pi(()=>import("./handler26.js"),"detectExecute"),name:"detect"},Ihi={commandPath:["toolchain"],description:"Install pinned versions — per-tool delegation to the right manager",examples:[["vis toolchain install","Install pinned versions"],["vis toolchain install --dry-run","Print the commands that would run, but don't execute"]],group:Cp,loader:pi(()=>import("./handler26.js"),"installExecute"),name:"install",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean}]},Qhi={argument:{description:"Tool and version to pin, e.g. node@22.13.0 or pnpm@10.32.1",name:"spec",type:String},commandPath:["toolchain"],description:"Pin a version via the best manager for that tool",examples:[["vis toolchain use node@22.13.0","Pin node 22.13.0 via the best runtime manager"],["vis toolchain use pnpm@10.32.1","Update the packageManager field; pnpm self-activates"],["vis toolchain use node@22.13.0 --dry-run","Print the command without running it"]],group:Cp,loader:pi(()=>import("./handler26.js"),"useExecute"),name:"use",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean},{defaultValue:!0,description:"Also mirror the version into engines.<tool> when that field already exists. --no-engines to skip.",name:"engines",type:Boolean}]},Lhi={argument:{description:"Tool to resolve, e.g. node",name:"tool",type:String},commandPath:["toolchain"],description:"Print the resolved binary path a manager would launch for a tool",examples:[["vis toolchain which node","Resolve the node binary the manager would launch"]],group:Cp,loader:pi(()=>import("./handler26.js"),"whichExecute"),name:"which"},$hi=[Shi,Ehi,Ihi,Qhi,Lhi],Dhi={argument:{description:"Packages to unlink (omit for current package)",name:"packages",type:String},description:"Unlink a previously linked package",examples:[["vis unlink","Unlink current package"],["vis unlink react","Unlink specific package"],["vis unlink -r","Unlink in all workspace packages"]],group:"Dependencies",loader:()=>import("./handler27.js"),name:"unlink",options:[{alias:"r",defaultValue:!1,description:"Unlink in all workspace packages",name:"recursive",type:Boolean}]},Yhi={alias:"up",argument:{description:"Packages to update (updates all if omitted)",name:"packages",type:String},description:"Update packages to their latest versions",examples:[["vis update react","Update react within semver range"],["vis up react -L","Update react to latest"],["vis update -i","Interactive mode"],["vis update --filter app","Update in specific workspace"],["vis update -r","Update in all workspaces"],["vis update --target minor","Only apply minor/patch updates (catalog mode)"],["vis update --dry-run","Preview changes without applying"],["vis update --exclude '@types/*'","Exclude packages by pattern"],["vis update --changelog","Show changelog links after updating"],["vis update --rollback","Restore catalog from last backup"],["vis update --ai","Run AI analysis before applying updates"]],group:"Dependencies",loader:()=>import("./handler71.js"),name:"update",options:[{alias:"L",conflicts:"target",description:"Update to latest version (ignore semver range; equivalent to --target latest)",name:"latest",type:Boolean},{alias:"t",conflicts:"latest",description:"Update target: latest, minor, or patch (default: latest, catalog mode)",name:"target",type:String},{alias:"d",defaultValue:!1,description:"Preview changes without applying",name:"dry-run",type:Boolean},{alias:"g",defaultValue:!1,description:"Update global packages",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Update recursively in all workspace packages",name:"recursive",type:Boolean},{description:"Filter packages in monorepo (pm-wrapper mode; catalog mode uses --include/--exclude)",name:"filter",type:String},{alias:"w",defaultValue:!1,description:"Include workspace root",name:"workspace-root",type:Boolean},{alias:"D",conflicts:"prod",description:"Update only devDependencies",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Update only dependencies",name:"prod",type:Boolean},{alias:"i",defaultValue:!1,description:"Interactive mode",name:"interactive",type:Boolean},{defaultValue:!1,description:"Don't update optionalDependencies",name:"no-optional",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in update checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry (catalog mode)",name:"include-internal",type:Boolean},{alias:"l",defaultValue:!1,description:"Include packages with pinned/exact versions (no ^ or ~ prefix; catalog mode)",name:"include-locked",type:Boolean},{defaultValue:!1,description:"Update lockfile only",name:"no-save",type:Boolean},{description:"Glob pattern to include packages (repeatable, catalog mode)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable, catalog mode)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions (catalog mode)",name:"prerelease",type:Boolean},{description:"Check for known security vulnerabilities via OSV.dev (default: true; --no-security to skip)",name:"security",type:Boolean},{defaultValue:!1,description:"Skip catalog mode, use package manager directly",name:"no-catalog",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Show changelog URLs for updated packages",name:"changelog",type:Boolean},{description:"Run install after catalog update, --no-install to skip (default: true)",name:"install",type:Boolean},{defaultValue:!1,description:"Restore catalog file from the last backup",name:"rollback",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages before updating (catalog mode)",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Skip typosquat name check for package arguments",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip the offline marshall pipeline (author, provenance, metadata, downloads, expired-domains, new-bin, signatures, archived-repo) when explicit package arguments are supplied",name:"no-marshall-check",type:Boolean},{description:"Cap concurrent registry requests during outdated checks (default: 8)",name:"max-concurrent-requests",type:Number},{description:"Release channel filter: stable (default), same (match current's prerelease channel), or any",name:"release-channel",type:String},{alias:"y",defaultValue:!1,description:"Skip the confirmation prompt for blanket --latest updates. Required in non-TTY contexts (CI) when running `vis update --latest` without explicit package arguments.",name:"yes",type:Boolean},{defaultValue:!1,description:"Skip the GitHub Actions ecosystem scan (workflows + composite action.yml files)",name:"no-actions",type:Boolean},{defaultValue:!1,description:"Skip the Docker ecosystem scan (Dockerfile + docker-compose images)",name:"no-docker",type:Boolean},{defaultValue:!1,description:"Skip the GitLab CI ecosystem scan (.gitlab-ci.yml + .gitlab/ci/**)",name:"no-gitlab",type:Boolean},{defaultValue:!1,description:"Include branch references (e.g. actions/checkout@main) when scanning workflows",name:"include-branches",type:Boolean},{description:"Reference style for GitHub Actions updates: sha (default, pin to commit SHA + version comment) or preserve",name:"style",type:String},{description:"GitHub token for actions resolution (overrides GITHUB_TOKEN / GH_TOKEN env)",name:"actions-token",type:String},{description:"GitLab token for include-ref resolution (overrides GITLAB_TOKEN / CI_JOB_TOKEN env)",name:"gitlab-token",type:String}]},Jhi={argument:{description:"Target version (defaults to latest)",name:"version",type:String},description:"Update vis itself to the latest version",examples:[["vis self-update","Update to latest"],["vis self-update 2.0.0","Install specific version"],["vis self-update --check","Check for updates without installing"]],group:"System",loader:()=>import("./handler28.js"),name:"self-update",options:[{defaultValue:!1,description:"Check for updates without installing",name:"check",type:Boolean},{defaultValue:!1,description:"Reinstall even if already current",name:"force",type:Boolean},{defaultValue:!1,description:"Suppress output (CI mode)",name:"silent",type:Boolean}]},xhi={alias:"explain",argument:{description:"Package(s) to explain",name:"packages",type:String},description:"Show why a package is installed (dependency chain)",examples:[["vis why react","Show why react is installed"],["vis why react --json","Output as JSON"],["vis why react -r","Check across all workspaces"],["vis explain react","Alias matching npm's command"]],group:"Dependencies",loader:()=>import("./handler29.js"),name:"why",options:[{defaultValue:!1,description:"Output as JSON",name:"json",type:Boolean},{defaultValue:!1,description:"Show extended information (pnpm)",name:"long",type:Boolean},{defaultValue:!1,description:"Machine-readable output (pnpm)",name:"parseable",type:Boolean},{alias:"r",defaultValue:!1,description:"Check across all workspaces",name:"recursive",type:Boolean},{alias:"D",conflicts:"prod",description:"Filter to dev dependencies (pnpm)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Filter to production dependencies (pnpm)",name:"prod",type:Boolean},{defaultValue:!1,description:"Exclude optional dependencies (pnpm)",name:"no-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Check globally installed packages (pnpm)",name:"global",type:Boolean},{description:"Limit dependency tree depth",name:"depth",type:Number},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]},Zhi=()=>{if(process.env.VIS_VERSION)return process.env.VIS_VERSION;try{const e=new URL("../../package.json",import.meta.url);return mi(e).version}catch{return"0.0.0"}},Thi=()=>{process.env.VIS_VERSION=Zhi()},Nhi=e=>{!process.stdout.isTTY||Zt||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${e}\x07`)},Rhi={beforeCommand:async e=>{try{const i=e.options?.cwd,n=e.options?.config;let o;if(i)o=Xa(process.cwd(),i);else{const s=process.env.VIS_MONOREPO_ROOT;o=s&&s.length>0?s:A2(process.cwd()).path}e.workspaceRoot=o;const a=n?Xa(process.cwd(),n):void 0;let t=a??Eg(o);try{e.visConfig=await J1(o,a?{explicitConfigPath:a}:void 0);const s=e.visConfig?.versionConstraint;if(s&&!ug.validRange(s)){e.logger.error(""),e.logger.error(ym(Ut("✖ Invalid versionConstraint"))),e.logger.error(` vis.config.ts has versionConstraint ${Ut(JSON.stringify(s))}, which is not a valid semver range.`),e.logger.error(""),process.exitCode=1;return}if(s&&!ug.satisfies(j0.version,s)){e.logger.error(""),e.logger.error(ym(Ut("✖ vis version too old"))),e.logger.error(` vis.config.ts requires vis ${Ut(s)}, but the current version is ${Ut(j0.version)}.`),e.logger.error(` ${gh("→")} Upgrade: ${Ts("pnpm add -D @visulima/vis@latest")}`),e.logger.error(""),process.exitCode=1;return}}catch(s){const d=t,l=s instanceof Error?s.message:String(s);e.visConfigError={file:d??void 0,message:l};const c=!!process.stdout.isTTY&&!Zt;if(d&&!c){if(e.logger.error(""),e.logger.error(ym(Ut(`✖ Failed to load ${d}`))),e.logger.error(` ${l}`),e.logger.error(""),l.includes("Cannot find module")){const p=/Cannot find module '([^']+)'/.exec(l)?.[1]??"unknown";e.logger.error(`${gh("→ Hint:")} The module ${Ut(p)} could not be resolved.`),p.includes("@visulima/vis")?(e.logger.error(" This usually means the package isn't installed or the export path changed."),e.logger.error(` Try: ${Ts("pnpm add @visulima/vis")}`),e.logger.error(` Or regenerate: ${Ts("vis init --force")}`)):e.logger.error(` Try: ${Ts(`pnpm add ${p}`)}`)}else l.includes("SyntaxError")||l.includes("Unexpected token")?(e.logger.error(`${gh("→ Hint:")} The config file has a syntax error.`),e.logger.error(" Check your config for typos or invalid syntax."),e.logger.error(` Or regenerate: ${Ts("vis init --force")}`)):(e.logger.error(`${gh("→ Hint:")} Delete the broken config and recreate it:`),e.logger.error(` ${Ts(`rm ${d} && vis init`)}`));e.logger.error(""),e.logger.error(` Continuing with default settings.
|
|
1181
|
+
`);for(const n of e){i.info(` • ${n.entry.title} — ${n.entry.description}`);for(const o of n.preview)i.info(` ${o}`);i.info("")}i.info("Run a specific migration with `vis migrate <name>` (e.g. `vis migrate deps`).")},Qci=async e=>{const i=e.workspaceRoot??process.cwd(),n=e.visConfig??{},o=Sci(i,n),a=Bci(o).map(p=>({entry:p,preview:p.probe(o)}));if(!(process.stdout.isTTY&&!Zt)){Ici(a,e.logger);return}if(a.length===0){e.logger.info("No applicable migrations detected in this workspace.");return}const t=new Dri(a),r=n.tui?.autoExit??!1,s=r===!0?3:typeof r=="number"?r:0,d=await Cri(Pd.createElement(rsi,{autoExitSeconds:s,isDryRun:!1,store:t}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit();if(!d||d.length===0){e.logger.info("No migrations selected — exiting.");return}const l=Na(),c=[];for(const p of d)try{e.logger.info(`── Applying ${p.entry.title} ──`),p.entry.apply(o,l,e.logger),e.logger.info("")}catch(v){c.push({entry:p.entry,error:v}),e.logger.warn(`Failed to apply ${p.entry.title}: ${v.message}`)}Eci(l,e.logger),c.length>0&&(e.logger.warn(""),e.logger.warn(`${String(c.length)} migration(s) failed — see messages above.`),process.exitCode=1)},Lci={description:"Analyze and optimize dependencies using e18e replacements and @socketregistry overrides",examples:[["vis optimize","Interactive TUI to select and apply optimizations"],["vis optimize --dry-run","Preview available optimizations"],["vis optimize --pin","Pin Socket.dev overrides to exact versions"],["vis optimize --prod","Only optimize production dependencies"]],group:"Workspace",loader:()=>import("./handler65.js").then(e=>e.h),name:"optimize",options:[{alias:"d",defaultValue:!1,description:"Preview available optimizations without applying",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Pin Socket.dev overrides to exact versions",name:"pin",type:Boolean},{defaultValue:!1,description:"Only optimize production dependencies",name:"prod",type:Boolean},{defaultValue:!1,description:"Skip running install after applying overrides",name:"no-install",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]},$ci={argument:{description:"Subcommand and arguments (e.g., cache dir, publish --dry-run, list --depth 0)",name:"args",type:String},description:"Package manager utilities (cache, publish, audit, list, config, etc.)",examples:[["vis pm cache dir","Show cache directory"],["vis pm cache clean","Clean cache"],["vis pm publish --dry-run","Preview publishing"],["vis pm list --depth 0","List direct dependencies"],["vis pm audit","Run security audit"],["vis pm whoami","Show logged-in user"]],group:"System",loader:()=>import("./handler18.js"),name:"pm"},Dci={commandPath:["release"],description:"Author a new change file (interactive, or non-interactive via --packages)",examples:[["vis release add","Interactive prompt"],["vis release add --packages '@scope/cerebro:minor,@scope/string:patch' --message 'Add tab completion'","Non-interactive"],["vis release add --empty","Author an empty change file (acknowledges PR but releases nothing)"],["vis release add --name fix-tab-completion","Use a fixed slug instead of a random animal name"],["vis release add --from-bot-pr","Generate a change file from the current Dependabot / Renovate PR (changesets #647)"]],group:"Release",loader:()=>import("./handler30.js"),name:"add",options:[{description:"Comma-separated package:level pairs (e.g. '@scope/a:minor,@scope/b:patch')",name:"packages",type:String},{description:"Changelog body for the change file",name:"message",type:String},{description:"Slug for the filename (default: random animal name)",name:"name",type:String},{description:"Author an empty change file (no bumps; satisfies non-strict `check`)",name:"empty",type:Boolean},{description:"Author a `none` change file (acknowledged but no direct bump)",name:"none",type:Boolean},{description:"Inspect the current PR (via `gh pr view`) and author a change file from its Dependabot / Renovate title (changesets #647)",name:"from-bot-pr",type:Boolean}]},Yci={commandPath:["release"],description:"Render the would-be changelog entries without writing to disk",examples:[["vis release changelog","Print rendered entries for the pending plan"],["vis release changelog --json","Emit ChangelogResult (with projectChangelogs[]) as JSON"]],group:"Release",loader:()=>import("./handler31.js"),name:"changelog",options:[{description:"Emit machine-readable JSON",name:"json",type:Boolean},{description:"Limit to packages matching this glob (CSV)",name:"filter",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Jci={commandPath:["release"],description:"Verify pending change files cover changed packages — CI / husky gate",examples:[["vis release check","Pass if at least one change file exists"],["vis release check --strict","Fail if any changed package isn't covered by a change file"],["vis release check --hook pre-commit","Run as a husky pre-commit hook"],["vis release check --no-fail","Print warnings but always exit 0"]],group:"Release",loader:()=>import("./handler32.js"),name:"check",options:[{description:"Require every changed package to have its own non-empty change file",name:"strict",type:Boolean},{description:"Hook context (pre-commit, pre-push) — affects which file states are counted",name:"hook",type:String},{description:"Always exit 0; warnings still print to stderr",name:"no-fail",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},xci={commandPath:["release","ci"],description:"CI: post or update a sticky PR comment with the pending release plan",examples:[["vis release ci check","Resolve PR from GITHUB_REF, post/update the release plan comment"],["vis release ci check --strict","Fail if any changed package isn't covered"]],group:"Release",loader:()=>import("./handler33.js"),name:"check",options:[{description:"Require every changed package to be covered by a change file",name:"strict",type:Boolean},{description:"Always exit 0 (warnings still print)",name:"no-fail",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Zci={commandPath:["release","ci"],description:"CI: emit JSON plan + write to $GITHUB_OUTPUT for workflow gating",examples:[["vis release ci plan","Emit { mode, packages, json } and set $GITHUB_OUTPUT"]],group:"Release",loader:()=>import("./handler34.js"),name:"plan",options:[{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Tci={commandPath:["release","ci"],description:"CI: rebase the open version-PR onto the base branch and force-push",examples:[["vis release ci rebase-pr","Rebase the version-PR branch onto base + force-push"],["vis release ci rebase-pr --branch=release/version","Override the version-PR branch"]],group:"Release",loader:()=>import("./handler35.js"),name:"rebase-pr",options:[{description:"Override the version-PR branch (default: vis-release/version-packages)",name:"branch",type:String},{description:"Override the base branch (default: release.baseBranch)",name:"base",type:String}]},Nci={commandPath:["release","ci"],description:"CI: maintain a rolling version-PR (default) or version+publish inline (--auto-publish)",examples:[["vis release ci release","On push to main: open/update Versioned release PR; on PR merge: publish"],["vis release ci release --auto-publish","Skip version-PR; version + publish inline (alpha/beta workflow)"]],group:"Release",loader:()=>import("./handler55.js"),name:"release",options:[{description:"Skip version-PR; version + publish inline",name:"auto-publish",type:Boolean},{description:"Override version-PR branch (default: vis-release/version-packages)",name:"branch",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: force currentVersionResolver=disk and skip remote tag-collision checks. Use on the very first release before any git tags exist.",name:"first-release",type:Boolean}]},Rci={commandPath:["release","ci"],description:"CI: print setup checklist for tokens (VIS_GH_TOKEN, NPM_TOKEN, OIDC) and workflow permissions",examples:[["vis release ci setup","Walk through the recommended secrets + workflow setup"]],group:"Release",loader:()=>import("./handler36.js"),name:"setup",options:[]},Mci={commandPath:["release","ci"],description:"CI: publish snapshot of affected packages + post sticky PR comment with install instructions",examples:[["vis release ci snapshot --tag pr-1234","Publish PR snapshot + post install snippet"]],group:"Release",loader:()=>import("./handler37.js"),name:"snapshot",options:[{description:"Override dist-tag (default: pr-<PR_NUMBER>)",name:"tag",type:String},{description:"PR-close cleanup mode — enumerate the closed PR's commit SHAs and remove their snapshot tags from the registry (when supported by the backend)",name:"on-close",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Hci={commandPath:["release"],description:"Preflight diagnostics for the release subsystem (workspace, PM, OIDC, NAPI, guards)",examples:[["vis release doctor","Run all checks; exit non-zero if any error"],["vis release doctor --json","Emit machine-readable report"]],group:"Release",loader:()=>import("./handler38.js"),name:"doctor",options:[{description:"Emit machine-readable JSON instead of a table",name:"json",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: doctor asserts the workspace has no release tags and no package has been published yet. Pair with `vis release version --first-release`.",name:"first-release",type:Boolean}]},Gci={commandPath:["release"],description:"Auto-derive a change file from branch commits (conventional-commits + path heuristics)",examples:[["vis release generate","Walk commits since the merge-base with baseBranch"],["vis release generate --from origin/main","Walk commits since the given ref"],["vis release generate --dry-run","Print the would-be content without writing"]],group:"Release",loader:()=>import("./handler56.js"),name:"generate",options:[{description:"Git ref to compare against (default: merge-base with baseBranch)",name:"from",type:String},{description:"Slug for the generated filename (default: random animal name)",name:"name",type:String},{description:"Print would-be content without writing",name:"dry-run",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},Xci={commandPath:["release"],description:"Scaffold .vis/release; migrate from changesets / bumpy / semantic-release",examples:[["vis release init","Auto-detect source tool and scaffold"],["vis release init --from-semantic-release","Force semantic-release migration"],["vis release init --from-changesets","Force changesets migration"],["vis release init --fresh","Skip migration; start clean"],["vis release init --dry-run","Print what would happen without writing files"],["vis release init --from-semantic-release --apply","Actually perform the semantic-release migration writes"]],group:"Release",loader:()=>import("./handler39.js"),name:"init",options:[{description:"Force migration from semantic-release / multi-semantic-release",name:"from-semantic-release",type:Boolean},{description:"Force migration from changesets",name:"from-changesets",type:Boolean},{description:"Force migration from bumpy",name:"from-bumpy",type:Boolean},{description:"Skip migration; start clean",name:"fresh",type:Boolean},{description:"Print what would happen without writing files",name:"dry-run",type:Boolean},{alias:"y",description:"Auto-confirm prompts (CI-safe)",name:"yes",type:Boolean},{description:"Generate CI workflow files. GitHub → `.github/workflows/vis-release{,-check,-snapshot}.yml`. GitLab → `.gitlab-ci.yml`.",name:"workflows",type:Boolean},{description:"Override package manager when generating workflows (npm | pnpm | yarn | bun). Default: auto-detect",name:"package-manager",type:String},{description:"Actually perform the migration writes (not dry-run)",name:"apply",type:Boolean}]},Fci={commandPath:["release"],description:"Print the next computed version for each package in the release plan. Read-only; no mutations.",examples:[["vis release next-version","Print `<pkg> <old> -> <new>` for every package in the plan"],["vis release next-version --package=@scope/a","Single-package mode"],["vis release next-version --json","Emit a `{ name: { from, to } }` JSON map"]],group:"Release",loader:()=>import("./handler40.js"),name:"next-version",options:[{description:"Limit output to a single package",name:"package",type:String},{description:"Emit a JSON `{ name: { from, to } }` map instead of pretty lines",name:"json",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Bootstrap mode for greenfield monorepos: preview the plan without registry / tag lookups (matches `vis release version --first-release`).",name:"first-release",type:Boolean}]},Pci={commandPath:["release"],description:"Dry-run the configured notification channels (slack / discord / webhook / plugins) with a synthetic release",examples:[["vis release notifications test","Dispatch a fake release to every configured channel"],["vis release notifications test --channel=slack","Dispatch to every Slack channel only"],["vis release notifications test --channel=slack:eng","Dispatch to the slack channel with id=eng only"],["vis release notifications test --custom-context=./fake.json","Use operator-supplied JSON instead of the built-in synthetic release"],["vis release notifications test --json","Emit machine-readable results"]],group:"Release",loader:()=>import("./handler41.js"),name:"notifications",options:[{defaultOption:!0,defaultValue:"test",description:"Subcommand: test",name:"action",type:String},{description:"Restrict dispatch to a single channel kind (`slack`, `discord`, `webhook`) or an id'd channel (`slack:eng`)",name:"channel",type:String},{description:"Path to a JSON file containing a NotificationContext to use instead of the synthetic default",name:"custom-context",type:String},{description:"Emit machine-readable JSON instead of a per-channel report",name:"json",type:Boolean}]},Oci={commandPath:["release"],description:"Inspect the release plan; with --interactive, walk through and override bump levels",examples:[["vis release plan","Emit pending plan as JSON"],["vis release plan --interactive","Walk through pending releases, accept or override each bump"],["vis release plan -i --write","Walk through interactively and write the chosen overrides to a change file"]],group:"Release",loader:()=>import("./handler42.js"),name:"plan",options:[{description:"Filter packages by name glob",name:"filter",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{alias:"i",description:"Walk through pending releases interactively and accept / override each bump level",name:"interactive",type:Boolean},{description:"When used with --interactive, write the chosen overrides to a new change file (.vis/release/<id>.md)",name:"write",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},_ci={commandPath:["release"],description:"Enter / exit pre-release mode (changesets-compatible — every `version` produces a prerelease until exit)",examples:[["vis release pre enter alpha","Enter pre-mode with the `alpha` tag"],["vis release pre enter rc --no-commit","Enter pre-mode locally without committing pre.json"],["vis release pre exit","Flag the next `version` to consolidate + exit pre-mode"],["vis release pre status","Print whether pre-mode is active, exit-pending, or off"]],group:"Release",loader:()=>import("./handler44.js"),name:"pre",options:[{defaultOption:!0,defaultValue:"status",description:"Subcommand: enter | exit | status",name:"action",type:String},{description:"Prerelease tag (e.g. alpha, beta, rc). Required for `enter`",multiple:!0,name:"tag",type:String},{defaultValue:!0,description:"Commit pre.json after writing. Default: commit",name:"commit",type:Boolean},{defaultValue:!0,description:"Push the commit. Default: push",name:"push",type:Boolean}]},Wci={commandPath:["release"],description:"Pack-then-publish unpublished packages, push tags, create GH releases",examples:[["vis release publish","Publish all pending packages"],["vis release publish --dry-run","Print what would publish without uploading"],["vis release publish --tag alpha","Override dist-tag"],["vis release publish --filter '@scope/*'","Limit to packages matching the glob"]],group:"Release",loader:()=>import("./handler45.js"),name:"publish",options:[{description:"Skip uploads — print what would happen",name:"dry-run",type:Boolean},{description:"Override npm dist-tag",name:"tag",type:String},{description:"Limit to packages matching this glob (CSV)",name:"filter",type:String},{description:"Skip `git push --tags` after publish (lands in M5)",name:"no-push",type:Boolean},{description:"2FA OTP token",name:"otp",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Resume from a previous run's state file (skips already-published packages)",name:"resume",type:Boolean},{description:"Run preflight checks (config + workspace + plan + auth) and exit. No mutations.",name:"check-only",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: force currentVersionResolver=disk and skip remote tag-collision checks. Use on the very first release before any git tags exist.",name:"first-release",type:Boolean}]},Kci={commandPath:["release"],description:"Publish 0.0.0-<tag>-<sha> snapshot versions of affected packages",examples:[["vis release snapshot --tag pr-1234","Publish snapshots tagged with the PR number"],["vis release snapshot --tag canary --filter '@scope/*'","Limit to a glob"],["vis release snapshot --tag pr-1234 --dry-run","Preview without uploading"]],group:"Release",loader:()=>import("./handler46.js"),name:"snapshot",options:[{description:"Required: dist-tag for the snapshot release",name:"tag",type:String},{description:"Override registry URL (defaults to pkg-pr-new backend or `release.snapshot.registry`)",name:"registry",type:String},{description:"Glob filter (CSV) — limit snapshots to specific packages",name:"filter",type:String},{description:"Print what would publish without uploading",name:"dry-run",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},zci={commandPath:["release"],description:"List, approve, or reject npm staged-publish records (RFC §13.6 — approve/reject need 2FA)",examples:[["vis release stage list","List every staged version (both npm + the local .vis/release/staged.json registry)"],["vis release stage list @scope/pkg","List staged versions for a single package"],["vis release stage list --json","Emit a machine-readable view of both sources"],["vis release stage approve <stage-id>","Promote a staged version, drain it from staged.json, commit + push the registry"],["vis release stage approve --all","Approve every pending stage tracked in .vis/release/staged.json"],["vis release stage reject <stage-id>","Reject a staged version (permanent — cannot be re-approved unless re-staged)"],["vis release stage approve <stage-id> --no-push","Approve, update the registry, commit locally (skip the push)"],["vis release stage approve <stage-id> --no-commit","Approve and update the registry only — no git commit"]],group:"Release",loader:()=>import("./handler47.js"),name:"stage",options:[{defaultOption:!0,defaultValue:"list",description:"Subcommand: list | approve | reject",name:"action",type:String},{description:"Stage IDs (positional args after the action)",multiple:!0,name:"stage-ids",type:String},{description:"Approve every pending stage tracked in .vis/release/staged.json",name:"all",type:Boolean},{description:"Package name filter for `list`",name:"filter",type:String},{description:"Emit machine-readable JSON",name:"json",type:Boolean},{defaultValue:!0,description:"Update .vis/release/staged.json but skip the auto-commit. Default: commit",name:"commit",type:Boolean},{defaultValue:!0,description:"Skip pushing the registry commit to the remote. Default: push",name:"push",type:Boolean}]},Uci={commandPath:["release"],description:"Print pending release plan (which packages will bump and to what version)",examples:[["vis release status","Print pending plan in human-readable format"],["vis release status --json","Emit the plan as JSON for scripting / CI"],["vis release status --bump major,minor","Filter to packages getting major or minor bumps"],["vis release status --filter '@scope/*'","Show only packages matching the glob"]],group:"Release",loader:()=>import("./handler43.js"),name:"status",options:[{description:"Emit machine-readable JSON instead of a table",name:"json",type:Boolean},{description:"Filter packages by name glob",name:"filter",type:String},{description:"Filter by bump level (CSV: major,minor,patch)",name:"bump",type:String},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String}]},qci={commandPath:["release"],description:"Apply pending change files to disk: bump versions + write CHANGELOG entries",examples:[["vis release version","Apply the plan to disk"],["vis release version --dry-run","Print what would change without touching disk"],["vis release version --channel alpha","Force a specific channel (overrides branch detection)"]],group:"Release",loader:()=>import("./handler48.js"),name:"version",options:[{description:"Skip writes — print the diff and exit",name:"dry-run",type:Boolean},{description:"Override channel (defaults to current branch lookup)",name:"channel",type:String},{description:"Limit to packages matching this glob (CSV)",name:"filter",type:String},{description:"Auto-commit after applying",name:"commit",type:Boolean},{description:"Run preflight checks (config + workspace + plan) and exit. No mutations.",name:"check-only",type:Boolean},{description:"Print the resolved release config and exit (--print-config=debug for runtime-resolved fields)",name:"print-config",type:String},{description:"Bootstrap mode for greenfield monorepos: force currentVersionResolver=disk and skip remote tag-collision checks. Use on the very first release before any git tags exist.",name:"first-release",type:Boolean}]},Vci=[Dci,Gci,Uci,Oci,Yci,Jci,Hci,Fci,qci,Wci,Kci,zci,_ci,Xci,Pci,xci,Zci,Nci,Tci,Mci,Rci],ehi={alias:["rm","un","uninstall"],argument:{description:"Packages to remove",name:"packages",type:String},description:"Remove packages using the detected package manager",examples:[["vis remove lodash","Remove a package"],["vis rm old-package","Remove using alias"],["vis remove --filter app react","Remove from specific workspace"],["vis remove -g typescript","Remove global package"]],group:"Dependencies",loader:()=>import("./handler19.js"),name:"remove",options:[{alias:"D",defaultValue:!1,description:"Remove from devDependencies",name:"save-dev",type:Boolean},{alias:"g",defaultValue:!1,description:"Remove global package",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Remove from all workspace packages",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Remove from workspace root",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]},ihi={description:"Replay a previous task run from .vis/runs/ — show task results without re-executing",examples:[["vis replay","Show the most recent run summary"],["vis replay --run 2026-04-28T12-34-56_ab12","Inspect a specific historical run"],["vis replay --list","List every recorded run, newest first"],["vis replay --task @myorg/app:build","Focus on one task within the loaded run"],["vis replay --failed","Filter to only failed tasks"],["vis replay --format=json","Machine-readable output for CI"]],group:"Workspace",loader:pi(()=>import("./handler20.js"),"replayExecute"),name:"replay",options:[{description:"Run id to replay (defaults to the most recent run)",name:"run",type:String},{defaultValue:!1,description:"List every available run instead of replaying one",name:"list",type:Boolean},{description:"Filter the replay to a single task id (e.g. @my/app:build)",name:"task",type:String},{defaultValue:!1,description:"Filter the replay to failed tasks only",name:"failed",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]},nhi={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target across workspace projects",examples:[["vis run","List all available targets"],["vis run build","Run build on all projects"],["vis run :build","Run build on all projects (moon-style)"],["vis run ~:test","Run test on the project closest to the current directory"],['vis run "#frontend:build"',"Run build on projects tagged 'frontend'"],['vis run :build --query "language=typescript"',"Filter by project metadata"],["vis run test --affected","Run test only on git-changed projects"],["vis run build --fail-fast","Stop on first failure"],["vis run build --dry-run","Show execution plan without running"],["vis run destroy --reverse","Run leaves-first (teardown order, e.g. CDK/Pulumi destroy)"]],group:"Run & Execute",loader:()=>import("./handler74.js"),name:"run",options:[{alias:"p",description:"Comma-separated list of projects to run",name:"projects",type:String},{defaultValue:!1,description:"Skip the toolchain pre-flight (no auto-install for any pinned tool: node / pnpm / yarn / npm / bun / deno / go / python / ruby / rust)",name:"skip-toolchain",type:Boolean},{description:"Detect lockfile/node_modules drift before running (warns in TTY, fails in CI). Use --no-preflight to disable.",name:"preflight",type:Boolean},{defaultValue:3,description:"Maximum number of parallel tasks (falls back to VIS_RUN_CONCURRENCY_LIMIT env var, then 3)",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{description:"Comma-separated selectors of tasks to bypass cache for (e.g. 'app:test', ':e2e', '#flaky:lint'). Other tasks in the run still cache normally. --no-cache wins when both are set.",name:"skip-cache",type:String},{description:"Custom cache directory",name:"cache-dir",type:String},{description:"Remote cache mode: read | write | readwrite (defaults to readwrite when remoteCache is configured)",name:"cache-mode",type:String},{description:"Remote cache wire backend: http (Turborepo-compatible) or reapi (Bazel Remote Execution API gRPC)",name:"cache-backend",type:String},{description:"Override how the requested target is hashed for this run: declared (hash listed inputs) or trace (hash the files the task actually reads). Overrides per-target hashMode config for the directly-run target.",name:"hash-mode",type:String},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Generate a run summary after execution",name:"summarize",type:Boolean},{description:'Partition tasks for distributed CI (e.g., "1/4" for first of four runners). Falls back to VIS_PARTITION env var.',name:"partition",type:String},{defaultValue:!1,description:"Skip project constraint validation",name:"skip-constraints",type:Boolean},{description:"Filter matched projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{defaultValue:!1,description:"Only run on projects affected by git changes (shorthand for vis affected)",name:"affected",type:Boolean},{defaultValue:!1,description:"Rerun affected tasks on file change. Ctrl+C to exit.",name:"watch",type:Boolean},{defaultValue:!1,description:"Stop all tasks on first failure",name:"fail-fast",type:Boolean},{defaultValue:!1,description:"Run the dependency graph in reverse (leaves first, then their dependents). Useful for teardown targets like `destroy`/`undeploy` where dependents must run before the things they depend on.",name:"reverse",type:Boolean},{description:"Output mode: interleaved (pass-through), labeled (prefix each line with [pkg#task]), or grouped (vite-task-style block)",name:"log",type:String},{description:"Output style: normal (print every task) or quiet (skip output for successful/cached tasks; failed tasks still print in CI mode, and remain in TUI scrollback in interactive mode). Defaults to normal; set run.quietOnSuccess in config to make quiet the default. Per-target options.outputStyle overrides this.",name:"output-style",type:String},{defaultValue:!1,description:"Run every task through a pseudo-terminal so color-aware tools render as if attached to a TTY (disables caching)",name:"pty",type:Boolean},{description:"Global retry budget: cap on total task retries across the run (per-target retryCount is still honored up to the budget)",name:"retry-budget",type:Number},{description:"Write a Chrome Tracing JSON profile of the run to this path (open in chrome://tracing or Perfetto)",name:"profile",type:String},{defaultValue:!1,description:"Render the most-recent run's saved summary (from .vis/last-summary.json) and exit without executing any tasks",name:"last-details",type:Boolean},{defaultValue:!0,description:"Show flaky task report on failure (use --no-flaky to suppress)",name:"flaky",type:Boolean},{defaultValue:!1,description:"Treat any task that needed at least one retry as a run failure (exit non-zero), even when retries eventually succeeded. Use in CI to surface flakes that retries would otherwise mask.",name:"fail-on-retry",type:Boolean},{description:"Fail a task if its command references an env var that is unset (no silent empty-string substitution). Use --no-strict-env to disable when set in config.",name:"strict-env",type:Boolean},{description:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Tasks declaring `options.runnerTags` only run when at least one tag overlaps. Untagged tasks always run. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String},{description:"Auto-start service deps. One of: auto | ephemeral | persistent | off. Defaults to `auto` in TTY, `off` in CI.",name:"services",type:String},{defaultValue:!1,description:"Stop services this run auto-started in registry mode when the run exits (clean, q, or Ctrl+C). Ephemeral services already die with the run.",name:"stop-services",type:Boolean}]},ohi={description:"Generate a CycloneDX 1.7 Software Bill of Materials for the workspace",examples:[["vis sbom","Write the full-workspace SBOM to sbom.cdx.json"],["vis sbom --focus=my-app","Scope the SBOM to my-app's transitive closure"],["vis sbom --focus=my-app,other","Focus multiple projects"],["vis sbom --format=xml --output=sbom.cdx.xml","Emit XML instead of JSON"],["vis sbom --include-dev","Include devDependencies (default: production only)"],["vis sbom --output=-","Write to stdout"]],group:"Security & Health",loader:()=>import("./handler21.js"),name:"sbom",options:[{description:"Project name(s) to focus on — comma-separated for multiple",name:"focus",type:String},{defaultValue:"json",description:"Output format: json (default) or xml",name:"format",type:String},{description:"Output path (use '-' for stdout; default: sbom.cdx.json)",name:"output",type:String},{defaultValue:!1,description:"Include devDependencies (default: production only)",name:"include-dev",type:Boolean}]},ahi={argument:{description:"One or more paths to scan (defaults to workspace root)",name:"paths",type:String},description:"Scan a repository for hardcoded secrets and credentials",examples:[["vis secrets","Scan the workspace with grouped, colourised output"],["vis secrets --staged","Scan only files staged for the current commit (pre-commit hooks)"],["vis secrets --since main","Scan only files changed since the `main` branch"],["vis secrets --affected","Scan only projects affected by the current branch"],["vis secrets --history","Scan the full git history for secrets that were committed then removed"],["vis secrets --history --history-range main..HEAD","Scan only commits on the current branch since main"],["vis secrets --history --max-commits 100 --redact","Scan the last 100 commits, masking any secret values"],["vis secrets --init","Write an initial baseline from current findings"],["vis secrets --list-rules","Print all bundled detection rules"],["vis secrets --list-validators","Print non-HTTP validator types in the ruleset + install hints for each"],["vis secrets --exclude-rule generic-api-key --exclude-rule aws-access-token","Drop noisy rules"],["vis secrets --include-rule stripe-access-token","Check a single rule"],["vis secrets --enable-rule tag:preset:weak-passwords","Enable an opt-in rule group additively (defaults still fire)"],["vis secrets --include-rule tag:preset:password-manager","Restrict output to one opt-in group only"],["vis secrets --min-confidence high","Drop rules without a high confidence label (CI-friendly precision filter)"],["vis secrets --validate --only-verified","Live-verify each finding against its provider (one HTTP call per finding)"],["vis secrets --exclude 'dist/**' --exclude-from .secretsignore","Extra gitignore-syntax exclusions for the walker"],["vis secrets --config ./leaks.json --no-extend-bundled","Use only the supplied config, skip the bundled ruleset"],["vis secrets --concurrency 4","Cap the rayon thread pool (0 / omit = auto)"],["vis secrets --baseline .secrets-baseline.json","Suppress known findings; print diff vs. baseline"],["vis secrets --update-baseline","Merge current findings into the baseline (use --replace-baseline to overwrite)"],["vis secrets --format sarif > report.sarif","SARIF output for GitHub code-scanning"]],group:"Security",loader:()=>import("./handler75.js"),name:"secrets",options:[{description:"Path to a JSON config (gitleaks-compatible shape). Defaults to the bundled ruleset.",name:"config",type:String},{description:"Drop rules below this author-declared confidence: low (default), medium, high. Rules without a declared confidence (every gitleaks rule) are treated as low, so --min-confidence medium or higher drops them along with explicit low-confidence rules.",name:"min-confidence",type:String},{defaultValue:!1,description:"Live-verify each finding against its provider (one HTTP call per finding, max 8 concurrent). Only supports Kingfisher-style HTTP validators with StatusMatch / WordMatch response matchers; other types (gRPC, multi-step, checksum) mark the finding as validation=skipped. WARNING: sends candidate secrets to the provider — some providers alert their security team on failed auth attempts.",name:"validate",type:Boolean},{defaultValue:!1,description:"With --validate, drop every finding whose validation is not 'verified'. Useful for CI gating.",name:"only-verified",type:Boolean},{defaultValue:!1,description:"With --config, do not merge on top of the bundled ruleset — replace it.",name:"no-extend-bundled",type:Boolean},{defaultValue:"text",description:"Output format: text (default), json, sarif",name:"format",type:String},{description:"Path to a baseline JSON of previously-triaged findings",name:"baseline",type:String},{defaultValue:!1,description:"Scan only files staged for commit",name:"staged",type:Boolean},{description:"Scan only files changed since <ref> (e.g. main, origin/HEAD)",name:"since",type:String},{defaultValue:!1,description:"Scan only projects affected by the current branch",name:"affected",type:Boolean},{defaultValue:!1,description:"Scan the entire git history (every added/modified blob across commits) instead of the working tree. Surfaces secrets that were committed and later removed. Cannot be combined with --staged/--since/--affected.",name:"history",type:Boolean},{description:"With --history, limit the walk to a rev-list range (e.g. main..HEAD, HEAD~50..HEAD, or a single ref). Defaults to all reachable history of HEAD.",name:"history-range",type:String},{description:"With --history, cap the number of commits walked (most-recent first)",name:"max-commits",type:Number},{description:"Enable an opt-in rule or tag without restricting output — additive (e.g. tag:preset:weak-passwords, tag:preset:password-manager). Repeatable.",multiple:!0,name:"enable-rule",type:String},{description:"Rule id or tag:<name> selector — whitelist, only matching findings are emitted. Implies enablement. Repeatable.",multiple:!0,name:"include-rule",type:String},{description:"Rule id or tag:<name> selector — drop matching findings. Repeatable.",multiple:!0,name:"exclude-rule",type:String},{description:"Gitignore-syntax pattern to exclude from the walk (repeatable)",multiple:!0,name:"exclude",type:String},{description:"Path to a gitignore-shaped file the walker should honor (repeatable)",multiple:!0,name:"exclude-from",type:String},{defaultValue:!1,description:"Mask secret values in output",name:"redact",type:Boolean},{defaultValue:!1,description:"Scan dotfiles",name:"include-hidden",type:Boolean},{defaultValue:!1,description:"Do not respect .gitignore",name:"no-gitignore",type:Boolean},{description:"Skip files larger than this (bytes). Default: 10 MiB",name:"max-size",type:Number},{description:"Rayon worker threads (0 / omit = auto)",name:"concurrency",type:Number},{defaultValue:!1,description:"Merge current findings into the baseline and exit 0",name:"update-baseline",type:Boolean},{defaultValue:!1,description:"With --update-baseline, replace rather than merge",name:"replace-baseline",type:Boolean},{defaultValue:!1,description:"Scaffold a baseline from current findings",name:"init",type:Boolean},{defaultValue:!1,description:"With --init, preview the baseline without writing files",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Print all bundled detection rules and exit",name:"list-rules",type:Boolean},{defaultValue:!1,description:"Print non-HTTP validator types referenced by the current ruleset, with install hints for their optional peer dependencies.",name:"list-validators",type:Boolean},{defaultValue:!1,description:"Suppress all progress output (only emit findings)",name:"quiet",type:Boolean},{defaultValue:!1,description:"Print diagnostic info (skipped rules, etc.)",name:"verbose",type:Boolean}]},thi={commandPath:["security"],description:"List build-script status — allowed, unapproved, and stale allowlist entries",examples:[["vis security list","Show the full build-script triage report"],["vis security list --json","Emit the report as JSON for tooling"]],group:"Security & Health",loader:()=>import("./list.js"),name:"list",options:[{defaultValue:!1,description:"Emit the report as JSON instead of human-readable text",name:"json",type:Boolean}]},rhi={commandPath:["security"],description:"Push vis.config security settings to the package manager's native config",examples:[["vis security sync","Sync allowBuilds + minimumReleaseAge to the PM-native config files"],["vis security sync --skip-allow-builds","Sync only the minimumReleaseAge knobs"],["vis security sync --skip-min-release-age","Sync only allowBuilds (trustedDependencies / onlyBuiltDependencies)"]],group:"Security & Health",loader:()=>import("./sync2.js"),name:"sync",options:[{defaultValue:!1,description:"Skip syncing allowBuilds (trustedDependencies, onlyBuiltDependencies)",name:"skip-allow-builds",type:Boolean},{defaultValue:!1,description:"Skip syncing minimumReleaseAge and its excludes",name:"skip-min-release-age",type:Boolean}]},shi={commandPath:["security"],description:"Run lifecycle scripts for packages in security.policies.installScripts.allow (LavaMoat 'run' parity)",examples:[["vis security run","Run preinstall/install/postinstall for every approved package"],["vis security run --with-root","Also run the workspace root's prepublish + prepare hooks"],["vis security run --root-only","Run only the workspace root's prepublish + prepare hooks"]],group:"Security & Health",loader:()=>import("./run.js"),name:"run",options:[{defaultValue:!1,description:"Also run the workspace root's prepublish + prepare hooks after dependencies",name:"with-root",type:Boolean},{defaultValue:!1,description:"Skip dependency scripts and only run the workspace root's prepublish + prepare hooks",name:"root-only",type:Boolean}]},uhi={commandPath:["security"],description:"Install @lavamoat/preinstall-always-fail as a devDep so a missing ignore-scripts setting fails loudly",examples:[["vis security tripwire","Install the tripwire devDependency"],["vis security tripwire --status","Report whether the tripwire is installed"],["vis security tripwire --remove","Remove the tripwire from package.json"]],group:"Security & Health",loader:()=>import("./tripwire.js"),name:"tripwire",options:[{defaultValue:!1,description:"Report whether @lavamoat/preinstall-always-fail is installed",name:"status",type:Boolean},{defaultValue:!1,description:"Remove @lavamoat/preinstall-always-fail from package.json",name:"remove",type:Boolean}]},ghi={commandPath:["security"],description:"Force-refresh the cached npm signing keys used by the signatures marshall",examples:[["vis security keys-refresh","Drop the disk cache and fetch a fresh key set from registry.npmjs.org"],["vis security keys-refresh --clear","Only drop the cache, do not refetch"],["vis security keys-refresh --json","Emit the refresh result as JSON for tooling"]],group:"Security & Health",loader:()=>import("./keys-refresh.js"),name:"keys-refresh",options:[{defaultValue:!1,description:"Only clear the cache, do not refetch",name:"clear",type:Boolean},{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean}]},dhi={commandPath:["security"],description:"Verify the entire lockfile closure against supply-chain policies (firstSeen, publisherChange, blockExoticSubdeps)",examples:[["vis security verify-lockfile","Re-validate every locked entry; exit non-zero on a policy violation"],["vis security verify-lockfile --offline","Verify without network (skips firstSeen / publisherChange)"],["vis security verify-lockfile --json","Emit the verification result as JSON for CI"]],group:"Security & Health",loader:()=>import("./verify-lockfile.js"),name:"verify-lockfile",options:[{defaultValue:!1,description:"Emit the result as JSON instead of human-readable text",name:"json",type:Boolean},{defaultValue:!1,description:"Skip network-bound policies (firstSeen, publisherChange)",name:"offline",type:Boolean}]},lhi=[thi,rhi,shi,uhi,ghi,dhi],Uy={description:"Target id, e.g. @my/api:db",name:"targetId",type:String},chi={description:"Output format: table or json (default: table)",name:"format",type:String},hhi={argument:Uy,commandPath:["service"],description:"Start a service target detached so it survives across `vis run` invocations",examples:[["vis service start @my/api:db","Boot the db target as a long-lived service"],["vis service start @my/api:db --timeout=60000","Override readiness timeout"],["vis service start @my/api:db --no-readiness","Skip the readiness probe"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceStartExecute"),name:"start",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{defaultValue:!1,description:"Skip the readiness probe",name:"no-readiness",type:Boolean}]},phi={argument:{description:"Target id to stop, or omit when using --all",name:"targetId",required:!1,type:String},commandPath:["service"],description:"Stop a running service",examples:[["vis service stop @my/api:db","Stop the db service"],["vis service stop --all","Stop every running service in this workspace"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceStopExecute"),name:"stop",options:[{defaultValue:!1,description:"Stop every service registered for this workspace",name:"all",type:Boolean},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number}]},vhi={commandPath:["service"],description:"List services registered for this workspace",examples:[["vis service list","Print running services"],["vis service list --format=json","Machine-readable list"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceListExecute"),name:"list",options:[chi]},Ahi={argument:Uy,commandPath:["service"],description:"Re-run the readiness probe and report a service's health",examples:[["vis service status @my/api:db","Check whether the db service is reachable"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceStatusExecute"),name:"status",options:[{description:"Probe timeout in milliseconds",name:"timeout",type:Number}]},yhi={argument:Uy,commandPath:["service"],description:"Stop and re-start a running service",examples:[["vis service restart @my/api:db","Recycle the db service"],["vis service restart @my/api:db --no-readiness","Recycle and skip the readiness probe"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceRestartExecute"),name:"restart",options:[{description:"Readiness probe timeout in milliseconds",name:"timeout",type:Number},{description:"Override the SIGTERM→SIGKILL grace period in milliseconds",name:"grace-ms",type:Number},{defaultValue:!1,description:"Skip the readiness probe after restart",name:"no-readiness",type:Boolean}]},fhi={argument:Uy,commandPath:["service"],description:"Print or tail a service's captured stdout/stderr",examples:[["vis service logs @my/api:db","Print the captured log"],["vis service logs @my/api:db -f","Tail the log (Ctrl-C to exit)"]],group:"Workspace",loader:pi(()=>import("./handler22.js"),"serviceLogsExecute"),name:"logs",options:[{alias:"f",defaultValue:!1,description:"Follow the log file (like `tail -f`)",name:"follow",type:Boolean}]},mhi=[hhi,phi,vhi,Ahi,yhi,fhi],bhi={description:"Sort package.json files across the workspace using the sort-package-json Rust crate",examples:[["vis sort-package-json","Sort all package.json files in the workspace"],["vis sort-package-json --check","Check if files are already sorted (exit 1 if not)"],["vis sort-package-json --sort-scripts","Also sort the scripts field alphabetically"],["vis sort-package-json --indent 4","Force 4-space indentation (overrides per-file detection)"],["vis sort-package-json --indent tab","Force tab indentation"],["vis sort-package-json --ignore '**/fixtures/**'","Skip files matching one or more glob patterns"],["vis sort-package-json --sort-order name,version,license","Pin a custom prefix order before the default field order"],["vis sort-package-json --unsorted dependencies,devDependencies","Preserve original key order for the listed top-level sections"],["vis sort-package-json --no-final-newline","Do not append a trailing newline"],["vis sort-package-json --line-ending crlf","Force CRLF line endings (default: auto-detect per file)"]],group:"Workspace",loader:()=>import("./handler63.js"),name:"sort-package-json",options:[{alias:"c",defaultValue:!1,description:"Check if package.json files are sorted without writing (exits 1 if unsorted)",name:"check",type:Boolean},{defaultValue:!1,description:"Also sort the scripts field alphabetically",name:"sort-scripts",type:Boolean},{description:"Indent override: a number of spaces, the literal `tab`, or a literal whitespace string. When unset, the original file's indent is preserved.",name:"indent",type:String},{description:"Glob pattern of files to skip (basename match, or path-relative when the pattern contains `/`). Repeatable.",multiple:!0,name:"ignore",type:String},{description:"Comma-separated list of top-level keys to place first, before the default field order. Repeatable.",multiple:!0,name:"sort-order",type:String},{description:"Comma-separated list of top-level sections whose key order should be preserved (e.g. dependencies,devDependencies). Repeatable.",multiple:!0,name:"unsorted",type:String},{defaultValue:!1,description:"Do not append a trailing newline to the output (default: append one).",name:"no-final-newline",type:Boolean},{defaultValue:"auto",description:"Line ending to write: auto (per-file detection, default), lf, or crlf.",name:"line-ending",type:String},{description:"Disable collapsing `bugs: { url }` to the bare string form (default: enabled).",name:"no-format-bugs",type:Boolean},{description:"Disable collapsing `repository: { type, url }` to the GitHub `owner/repo` shorthand (default: enabled).",name:"no-format-repository",type:Boolean},{description:"Disable canonical sorting of `exports` condition keys (default: enabled).",name:"no-sort-exports",type:Boolean},{description:"Disable .editorconfig discovery for indent / line-ending defaults (default: enabled).",name:"no-editorconfig",type:Boolean}]},whi={argument:{description:"Project name or workspace-relative path of the package to extract",name:"package",type:String},description:"Extract a package into a standalone git repo, preserving its history",examples:[["vis split @scope/pkg --output ../pkg-repo","Extract a package into a new repo at ../pkg-repo"],["vis split packages/tooling/foo -o ../foo --remote git@github.com:me/foo.git --push","Extract, set origin, and push"],["vis split @scope/pkg -o ../pkg --remove","Extract, then delete the package from the monorepo (committed)"],["vis split @scope/pkg --dry-run","Print the git plan without making changes"]],group:"Workspace",loader:()=>import("./handler23.js"),name:"split",options:[{alias:"o",description:"Destination directory for the new repo (required unless --dry-run)",name:"output",type:String},{alias:"b",description:'Default branch name in the new repo (default: vis.config defaultBase or "main")',name:"branch",type:String},{description:"Git remote URL to set as origin on the new repo",name:"remote",type:String},{defaultValue:!1,description:"Push the new repo to origin (requires --remote)",name:"push",type:Boolean},{defaultValue:!1,description:"Delete the package from the monorepo after extracting and commit the removal",name:"remove",type:Boolean},{defaultValue:!1,description:"Prefix the rewritten commit messages with the package name",name:"annotate",type:Boolean},{defaultValue:!1,description:"Use a non-empty --output directory anyway",name:"force",type:Boolean},{defaultValue:!1,description:"Print the git plan instead of executing it",name:"dry-run",type:Boolean}]},jhi={description:"Run linters on staged files using config from vis.config.ts",examples:[["vis staged","Run staged linters"],["vis staged --verbose","Run with verbose output"],["vis staged --no-stash","Run without backup stash"],["vis staged --diff HEAD~1","Run against a specific diff"]],group:"Run & Execute",loader:()=>import("./handler72.js"),name:"staged",options:[{defaultValue:!1,description:"Allow empty commits when tasks revert all staged changes",name:"allow-empty",type:Boolean},{defaultValue:!1,description:"Automatically stage new files that tasks create during the run",name:"auto-stage",type:Boolean},{description:"Number of concurrent tasks or false for serial",name:"concurrent",type:String},{defaultValue:!1,description:"Run all tasks to completion even if one fails",name:"continue-on-error",type:Boolean},{description:"Working directory to run all tasks in",name:"cwd",type:String},{defaultValue:!1,description:"Enable debug output",name:"debug",type:Boolean},{description:"Override the default --staged flag of git diff",name:"diff",type:String},{description:"Override the default diff-filter",name:"diff-filter",type:String},{defaultValue:!1,description:"Fail with exit code 1 when tasks modify tracked files",name:"fail-on-changes",type:Boolean},{defaultValue:!1,description:"Kill in-flight tasks with SIGKILL on fast-fail instead of the default SIGTERM",name:"force-kill",type:Boolean},{defaultValue:!1,description:"Hide unstaged changes from partially staged files",name:"hide-partially-staged",type:Boolean},{defaultValue:!1,description:"Hide all unstaged changes before running tasks",name:"hide-unstaged",type:Boolean},{defaultValue:!1,description:"Suppress console output",name:"quiet",type:Boolean},{defaultValue:!1,description:"Pass filepaths relative to cwd to tasks",name:"relative",type:Boolean},{defaultValue:!1,description:"Revert to original state in case of errors",name:"revert",type:Boolean},{defaultValue:!0,description:"Enable backup stash",name:"stash",type:Boolean},{defaultValue:!1,description:"Show task output even when tasks succeed",name:"verbose",type:Boolean}]},Chi={description:"Show a workspace health dashboard at a glance",examples:[["vis status","Full status overview"],["vis status --json","Machine-readable output"]],group:"Workspace",loader:()=>import("./handler24.js"),name:"status",options:[{defaultValue:!1,description:"Emit JSON output",name:"json",type:Boolean}]},khi={argument:{description:"What to sync: codeowners | package-json-fields",name:"kind",type:String},description:"Synchronise derived workspace artefacts (codeowners, package.json fields, tsconfig refs, …)",examples:[["vis sync codeowners","Generate CODEOWNERS at the repository root"],["vis sync codeowners --out=.github/CODEOWNERS","Write to .github/CODEOWNERS instead"],["vis sync codeowners --check","Fail if the existing file is stale"],["vis sync codeowners --from=project-json,nested-codeowners","Also aggregate nested CODEOWNERS files in the tree"],["vis sync codeowners --regeneration-command='pnpm codeowners'","Set a custom header instruction"],["vis sync codeowners --preserve-block","Splice the generated block between markers in an existing CODEOWNERS"],["vis sync codeowners --write-guard","Also emit GitHub + GitLab Write Guard CI for restricted projects"],["vis sync package-json-fields","Mirror license/author/repository/bugs/homepage/engines from root to every workspace package"],["vis sync package-json-fields --check","Fail if any workspace package.json is out of sync"],["vis sync package-json-fields --fields license,engines","Override the default field list for this run"]],group:"Workspace",loader:()=>import("./handler61.js"),name:"sync",options:[{description:"Output path for the generated file (default: <workspace>/CODEOWNERS) — codeowners kind only",name:"out",type:String},{defaultValue:!1,description:"Verify state without writing (exit non-zero if drift is found)",name:"check",type:Boolean},{description:"Input sources for codeowners. Comma-separated or repeated. Values: project-json | nested-codeowners | package-json-maintainers. Defaults to project-json.",multiple:!0,name:"from",type:String},{description:"Glob (repeatable) used to discover nested CODEOWNERS files. Defaults to `**/CODEOWNERS`.",multiple:!0,name:"nested-includes",type:String},{description:"Header instruction shown to reviewers (replaces the default 'update project.json' note). Codeowners kind only.",name:"regeneration-command",type:String},{defaultValue:!1,description:"Splice the generated block between markers in the existing file instead of overwriting it. Codeowners kind only.",name:"preserve-block",type:Boolean},{defaultValue:!1,description:"Also emit a .github/workflows/write-guard.yml scoped to projects with `restricted: true` in project.json. Codeowners kind only.",name:"write-guard",type:Boolean},{description:"Comma-separated list of fields to mirror from root → workspace packages (package-json-fields kind only). Repeatable.",multiple:!0,name:"fields",type:String},{description:"Glob pattern of package names to skip (package-json-fields kind only). Repeatable.",multiple:!0,name:"ignore-package-name",type:String},{defaultValue:"human",description:"Output format for package-json-fields: human | json",name:"format",type:String},{defaultValue:!1,description:"Suppress per-package log lines; print only the summary (package-json-fields kind only)",name:"quiet",type:Boolean}]},Bhi={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},description:"Explain why a task is included in the graph by walking its dependency chain to a root",examples:[["vis task-why @myorg/app:build","Show what pulls build in"],["vis task-why lib-a:test","Check the test task's triggers"]],group:"Workspace",loader:()=>import("./handler25.js"),name:"task-why"},Cp="Workspace",Shi={commandPath:["toolchain"],description:"Show every detected manager + expected vs actual tool versions",examples:[["vis toolchain status","Show every detected manager + expected vs actual tool versions"],["vis toolchain status --json","Emit the status as JSON"],["vis toolchain status --exit-code","Exit 1 if any tool mismatches (for CI)"]],group:Cp,loader:pi(()=>import("./handler26.js"),"statusExecute"),name:"status",options:[{defaultValue:!1,description:"Exit 1 if any tool mismatches",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Emit JSON",name:"json",type:Boolean}]},Ehi={commandPath:["toolchain"],description:"Print the primary manager's name (for scripts)",examples:[["vis toolchain detect","Print the primary manager's name"]],group:Cp,loader:pi(()=>import("./handler26.js"),"detectExecute"),name:"detect"},Ihi={commandPath:["toolchain"],description:"Install pinned versions — per-tool delegation to the right manager",examples:[["vis toolchain install","Install pinned versions"],["vis toolchain install --dry-run","Print the commands that would run, but don't execute"]],group:Cp,loader:pi(()=>import("./handler26.js"),"installExecute"),name:"install",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean}]},Qhi={argument:{description:"Tool and version to pin, e.g. node@22.13.0 or pnpm@10.32.1",name:"spec",type:String},commandPath:["toolchain"],description:"Pin a version via the best manager for that tool",examples:[["vis toolchain use node@22.13.0","Pin node 22.13.0 via the best runtime manager"],["vis toolchain use pnpm@10.32.1","Update the packageManager field; pnpm self-activates"],["vis toolchain use node@22.13.0 --dry-run","Print the command without running it"]],group:Cp,loader:pi(()=>import("./handler26.js"),"useExecute"),name:"use",options:[{defaultValue:!1,description:"Print the command that would run, but don't execute",name:"dry-run",type:Boolean},{defaultValue:!0,description:"Also mirror the version into engines.<tool> when that field already exists. --no-engines to skip.",name:"engines",type:Boolean}]},Lhi={argument:{description:"Tool to resolve, e.g. node",name:"tool",type:String},commandPath:["toolchain"],description:"Print the resolved binary path a manager would launch for a tool",examples:[["vis toolchain which node","Resolve the node binary the manager would launch"]],group:Cp,loader:pi(()=>import("./handler26.js"),"whichExecute"),name:"which"},$hi=[Shi,Ehi,Ihi,Qhi,Lhi],Dhi={argument:{description:"Packages to unlink (omit for current package)",name:"packages",type:String},description:"Unlink a previously linked package",examples:[["vis unlink","Unlink current package"],["vis unlink react","Unlink specific package"],["vis unlink -r","Unlink in all workspace packages"]],group:"Dependencies",loader:()=>import("./handler27.js"),name:"unlink",options:[{alias:"r",defaultValue:!1,description:"Unlink in all workspace packages",name:"recursive",type:Boolean}]},Yhi={alias:"up",argument:{description:"Packages to update (updates all if omitted)",name:"packages",type:String},description:"Update packages to their latest versions",examples:[["vis update react","Update react within semver range"],["vis up react -L","Update react to latest"],["vis update -i","Interactive mode"],["vis update --filter app","Update in specific workspace"],["vis update -r","Update in all workspaces"],["vis update --target minor","Only apply minor/patch updates (catalog mode)"],["vis update --dry-run","Preview changes without applying"],["vis update --exclude '@types/*'","Exclude packages by pattern"],["vis update --changelog","Show changelog links after updating"],["vis update --rollback","Restore catalog from last backup"],["vis update --ai","Run AI analysis before applying updates"]],group:"Dependencies",loader:()=>import("./handler71.js"),name:"update",options:[{alias:"L",conflicts:"target",description:"Update to latest version (ignore semver range; equivalent to --target latest)",name:"latest",type:Boolean},{defaultValue:!1,description:"Ignore the minimumReleaseAge gate and select the truly latest version even if freshly published. The selected packages are added to the package manager's native age-gate exclude list (pnpm minimumReleaseAgeExclude, bun minimumReleaseAgeExcludes, yarn npmPreapprovedPackages) so the follow-up install isn't blocked; npm has no per-package exclude. Combine with --latest to also cross the semver range.",name:"ignore-release-age",type:Boolean},{alias:"t",conflicts:"latest",description:"Update target: latest, minor, or patch (default: latest, catalog mode)",name:"target",type:String},{alias:"d",defaultValue:!1,description:"Preview changes without applying",name:"dry-run",type:Boolean},{alias:"g",defaultValue:!1,description:"Update global packages",name:"global",type:Boolean},{alias:"r",defaultValue:!1,description:"Update recursively in all workspace packages",name:"recursive",type:Boolean},{description:"Filter packages in monorepo (pm-wrapper mode; catalog mode uses --include/--exclude)",name:"filter",type:String},{alias:"w",defaultValue:!1,description:"Include workspace root",name:"workspace-root",type:Boolean},{alias:"D",conflicts:"prod",description:"Update only devDependencies",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Update only dependencies",name:"prod",type:Boolean},{alias:"i",defaultValue:!1,description:"Interactive mode",name:"interactive",type:Boolean},{defaultValue:!1,description:"Don't update optionalDependencies",name:"no-optional",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in update checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry (catalog mode)",name:"include-internal",type:Boolean},{alias:"l",defaultValue:!1,description:"Include packages with pinned/exact versions (no ^ or ~ prefix; catalog mode)",name:"include-locked",type:Boolean},{defaultValue:!1,description:"Update lockfile only",name:"no-save",type:Boolean},{description:"Glob pattern to include packages (repeatable, catalog mode)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable, catalog mode)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions (catalog mode)",name:"prerelease",type:Boolean},{description:"Check for known security vulnerabilities via OSV.dev (default: true; --no-security to skip)",name:"security",type:Boolean},{defaultValue:!1,description:"Skip catalog mode, use package manager directly",name:"no-catalog",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Show changelog URLs for updated packages",name:"changelog",type:Boolean},{description:"Run install after catalog update, --no-install to skip (default: true)",name:"install",type:Boolean},{defaultValue:!1,description:"Restore catalog file from the last backup",name:"rollback",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages before updating (catalog mode)",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Skip typosquat name check for package arguments",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip the offline marshall pipeline (author, provenance, metadata, downloads, expired-domains, new-bin, signatures, archived-repo) when explicit package arguments are supplied",name:"no-marshall-check",type:Boolean},{description:"Cap concurrent registry requests during outdated checks (default: 8)",name:"max-concurrent-requests",type:Number},{description:"Release channel filter: stable (default), same (match current's prerelease channel), or any",name:"release-channel",type:String},{alias:"y",defaultValue:!1,description:"Skip the confirmation prompt for blanket --latest updates. Required in non-TTY contexts (CI) when running `vis update --latest` without explicit package arguments.",name:"yes",type:Boolean},{defaultValue:!1,description:"Skip the GitHub Actions ecosystem scan (workflows + composite action.yml files)",name:"no-actions",type:Boolean},{defaultValue:!1,description:"Skip the Docker ecosystem scan (Dockerfile + docker-compose images)",name:"no-docker",type:Boolean},{defaultValue:!1,description:"Skip the GitLab CI ecosystem scan (.gitlab-ci.yml + .gitlab/ci/**)",name:"no-gitlab",type:Boolean},{defaultValue:!1,description:"Include branch references (e.g. actions/checkout@main) when scanning workflows",name:"include-branches",type:Boolean},{description:"Reference style for GitHub Actions updates: sha (default, pin to commit SHA + version comment) or preserve",name:"style",type:String},{description:"GitHub token for actions resolution (overrides GITHUB_TOKEN / GH_TOKEN env)",name:"actions-token",type:String},{description:"GitLab token for include-ref resolution (overrides GITLAB_TOKEN / CI_JOB_TOKEN env)",name:"gitlab-token",type:String}]},Jhi={argument:{description:"Target version (defaults to latest)",name:"version",type:String},description:"Update vis itself to the latest version",examples:[["vis self-update","Update to latest"],["vis self-update 2.0.0","Install specific version"],["vis self-update --check","Check for updates without installing"]],group:"System",loader:()=>import("./handler28.js"),name:"self-update",options:[{defaultValue:!1,description:"Check for updates without installing",name:"check",type:Boolean},{defaultValue:!1,description:"Reinstall even if already current",name:"force",type:Boolean},{defaultValue:!1,description:"Suppress output (CI mode)",name:"silent",type:Boolean}]},xhi={alias:"explain",argument:{description:"Package(s) to explain",name:"packages",type:String},description:"Show why a package is installed (dependency chain)",examples:[["vis why react","Show why react is installed"],["vis why react --json","Output as JSON"],["vis why react -r","Check across all workspaces"],["vis explain react","Alias matching npm's command"]],group:"Dependencies",loader:()=>import("./handler29.js"),name:"why",options:[{defaultValue:!1,description:"Output as JSON",name:"json",type:Boolean},{defaultValue:!1,description:"Show extended information (pnpm)",name:"long",type:Boolean},{defaultValue:!1,description:"Machine-readable output (pnpm)",name:"parseable",type:Boolean},{alias:"r",defaultValue:!1,description:"Check across all workspaces",name:"recursive",type:Boolean},{alias:"D",conflicts:"prod",description:"Filter to dev dependencies (pnpm)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Filter to production dependencies (pnpm)",name:"prod",type:Boolean},{defaultValue:!1,description:"Exclude optional dependencies (pnpm)",name:"no-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Check globally installed packages (pnpm)",name:"global",type:Boolean},{description:"Limit dependency tree depth",name:"depth",type:Number},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String}]},Zhi=()=>{if(process.env.VIS_VERSION)return process.env.VIS_VERSION;try{const e=new URL("../../package.json",import.meta.url);return mi(e).version}catch{return"0.0.0"}},Thi=()=>{process.env.VIS_VERSION=Zhi()},Nhi=e=>{!process.stdout.isTTY||Zt||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${e}\x07`)},Rhi={beforeCommand:async e=>{try{const i=e.options?.cwd,n=e.options?.config;let o;if(i)o=Xa(process.cwd(),i);else{const s=process.env.VIS_MONOREPO_ROOT;o=s&&s.length>0?s:A2(process.cwd()).path}e.workspaceRoot=o;const a=n?Xa(process.cwd(),n):void 0;let t=a??Eg(o);try{e.visConfig=await J1(o,a?{explicitConfigPath:a}:void 0);const s=e.visConfig?.versionConstraint;if(s&&!ug.validRange(s)){e.logger.error(""),e.logger.error(ym(Ut("✖ Invalid versionConstraint"))),e.logger.error(` vis.config.ts has versionConstraint ${Ut(JSON.stringify(s))}, which is not a valid semver range.`),e.logger.error(""),process.exitCode=1;return}if(s&&!ug.satisfies(j0.version,s)){e.logger.error(""),e.logger.error(ym(Ut("✖ vis version too old"))),e.logger.error(` vis.config.ts requires vis ${Ut(s)}, but the current version is ${Ut(j0.version)}.`),e.logger.error(` ${gh("→")} Upgrade: ${Ts("pnpm add -D @visulima/vis@latest")}`),e.logger.error(""),process.exitCode=1;return}}catch(s){const d=t,l=s instanceof Error?s.message:String(s);e.visConfigError={file:d??void 0,message:l};const c=!!process.stdout.isTTY&&!Zt;if(d&&!c){if(e.logger.error(""),e.logger.error(ym(Ut(`✖ Failed to load ${d}`))),e.logger.error(` ${l}`),e.logger.error(""),l.includes("Cannot find module")){const p=/Cannot find module '([^']+)'/.exec(l)?.[1]??"unknown";e.logger.error(`${gh("→ Hint:")} The module ${Ut(p)} could not be resolved.`),p.includes("@visulima/vis")?(e.logger.error(" This usually means the package isn't installed or the export path changed."),e.logger.error(` Try: ${Ts("pnpm add @visulima/vis")}`),e.logger.error(` Or regenerate: ${Ts("vis init --force")}`)):e.logger.error(` Try: ${Ts(`pnpm add ${p}`)}`)}else l.includes("SyntaxError")||l.includes("Unexpected token")?(e.logger.error(`${gh("→ Hint:")} The config file has a syntax error.`),e.logger.error(" Check your config for typos or invalid syntax."),e.logger.error(` Or regenerate: ${Ts("vis init --force")}`)):(e.logger.error(`${gh("→ Hint:")} Delete the broken config and recreate it:`),e.logger.error(` ${Ts(`rm ${d} && vis init`)}`));e.logger.error(""),e.logger.error(` Continuing with default settings.
|
|
1182
1182
|
`)}e.visConfig={}}const r=process.argv[2]??"";if(!new Set(["--help","--version","-h","-V","create","help","implode","init"]).has(r)&&!t&&!Zt)if(process.stdin.isTTY){const s=jC({input:process.stdin,output:process.stderr}),d=await new Promise(l=>{s.question("\x1B[36;1m?\x1B[0m \x1B[1mNo vis.config.ts found. Create one with best-practice security defaults?\x1B[0m \x1B[90m(\x1B[92mY\x1B[90m/n)\x1B[0m ",l),s.on("SIGINT",()=>{s.close(),l("n")})});if(s.close(),!d.trim()||d.trim().toLowerCase()==="y"||d.trim().toLowerCase()==="yes"){const l=Z(o,"vis.config.ts"),c=['import { defineConfig } from "@visulima/vis/config";',"","// Secure defaults are applied automatically by defineConfig().","// You only need to add allowBuilds for packages with build scripts.","// Run 'vis check --security-config' to see all active settings.","export default defineConfig({"," security: {"," allowBuilds: {",' // "esbuild": true,'," },"," },","});",""].join(`
|
|
1183
1183
|
`);rn(l,c),e.logger.info(`✓ Created ${l}
|
|
1184
1184
|
`),e.visConfig=await J1(o),t=l}}else e.logger.warn("No vis.config.ts found. Run 'vis init' to create one with best-practice security defaults.")}catch(i){i instanceof Error&&!i.message.includes("monorepo root")&&e.logger.warn(`Failed to detect workspace: ${i.message}`),e.visConfig={}}},name:"config-loader"},Mhi=336*60*60*1e3,hC=Z(nu(),"mcp-promote.json"),bu="@visulima/vis-mcp",Hhi=new Set(["--help","--version","-h","-V","ai","help","implode","mcp"]),Ghi=()=>{try{if(O(hC))return mi(hC)}catch{}return{lastShown:0}},Xhi=e=>{try{Bo(nu()),Tn(hC,JSON.stringify(e))}catch{}},oc=e=>{try{return O(e)?mi(e):void 0}catch{return}},ac=e=>{if(typeof e!="object"||e===null)return!1;for(const i of Object.values(e)){if(typeof i!="object"||i===null)continue;const n=i,o=Array.isArray(n.args)?n.args.join(" "):"",a=`${typeof n.command=="string"?n.command:""} ${o}`;if(a.includes(bu)||a.includes("vis-mcp"))return!0}return!1},Fhi=e=>{if(!Array.isArray(e))return!1;for(const i of e){if(typeof i!="object"||i===null)continue;const n=i,o=Array.isArray(n.args)?n.args.join(" "):"",a=`${typeof n.command=="string"?n.command:""} ${o} ${typeof n.name=="string"?n.name:""}`;if(a.includes(bu)||a.includes("vis-mcp"))return!0}return!1},Phi=e=>{const i=Z(e,".claude"),n=Z(e,".claude.json"),o=O(i)||O(n);let a=!1;if(o){const t=oc(n);a=ac(t?.mcpServers)}return{displayName:"Claude Code",id:"claude-code",installCommand:`claude mcp add vis -- npx -y ${bu}@latest`,isConfigured:a,isInstalled:o}},Ohi=e=>{const i=Z(e,".cursor","mcp.json"),n=O(Z(e,".cursor"));let o=!1;if(n){const a=oc(i);o=ac(a?.mcpServers)}return{displayName:"Cursor",id:"cursor",installCommand:`Add to ~/.cursor/mcp.json: "vis": { "command": "npx", "args": ["-y", "${bu}@latest"] }`,isConfigured:o,isInstalled:n}},_hi=e=>{const i=Z(e,".codeium","windsurf"),n=Z(i,"mcp_config.json"),o=O(i);let a=!1;if(o){const t=oc(n);a=ac(t?.mcpServers)}return{displayName:"Windsurf",id:"windsurf",installCommand:`Add to ~/.codeium/windsurf/mcp_config.json: "vis": { "command": "npx", "args": ["-y", "${bu}@latest"] }`,isConfigured:a,isInstalled:o}},Whi=e=>{const i=Z(e,".continue"),n=Z(i,"config.json"),o=O(i);let a=!1;if(o){const t=oc(n);a=ac(t?.mcpServers)||Fhi(t?.mcpServers)}return{displayName:"Continue",id:"continue",installCommand:`Add to ~/.continue/config.json mcpServers: { "name": "vis", "command": "npx", "args": ["-y", "${bu}@latest"] }`,isConfigured:a,isInstalled:o}},Khi=e=>{const i=Z(e,"Library","Application Support","Zed","settings.json"),n=Z(e,".config","zed","settings.json"),o=wC()==="darwin"?i:n,a=O(o);let t=!1;if(a){const r=oc(o);t=ac(r?.context_servers)}return{displayName:"Zed",id:"zed",installCommand:`Add to Zed settings.json under context_servers: "vis": { "command": "npx", "args": ["-y", "${bu}@latest"] }`,isConfigured:t,isInstalled:a}},zhi=e=>{const i=[Z(e,".config","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),Z(e,"Library","Application Support","Code","User","globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json")];let n;for(const t of i)if(O(t)){n=t;break}const o=n!==void 0;let a=!1;if(n!==void 0){const t=oc(n);a=ac(t?.mcpServers)}return{displayName:"Cline",id:"cline",installCommand:`In VS Code: open Cline > MCP Servers, add "vis" with command "npx" and args ["-y", "${bu}@latest"]`,isConfigured:a,isInstalled:o}},Uhi=()=>{const e=g2();return[Phi(e),Ohi(e),_hi(e),Whi(e),Khi(e),zhi(e)]},qhi=e=>{if(!e.success||process.env.VIS_CLI_TEST||Zt||process.env.VIS_NO_MCP_PROMOTE==="1"||e.visConfig?.mcpPromote?.enabled===!1||!process.stderr.isTTY||e.command!==void 0&&Hhi.has(e.command))return!1;const i=new Set(process.argv.slice(2));return!(i.has("--silent")||i.has("-s")||i.has("--json"))},Vhi=e=>{if(!qhi(e))return;const i=Date.now(),n=Ghi();if(i-n.lastShown<Mhi)return;const o=Uhi().find(a=>a.isInstalled&&!a.isConfigured);o!==void 0&&(process.stderr.write(`
|
|
@@ -1195,4 +1195,4 @@ ${_d("vis update available:")} ${gh(e)} ${_d(Qpi.arrow)} ${z8(Ut(i.latestVersion
|
|
|
1195
1195
|
`),i.lastNoticeAt=o,F_(i))},Zpi=e=>{if(Zt||process.env.VIS_CLI_TEST||process.env.VIS_NO_UPDATE_CHECK==="1"||!process.stderr.isTTY||Ypi.has(e))return!1;const i=new Set(process.argv.slice(2));return!(i.has("--silent")||i.has("-s")||i.has("--json"))},Tpi=(e,i)=>{if(!Zpi(i))return;const n=Jpi(),o=Date.now();if(n&&o-n.lastQueryAt<Lpi)return()=>{zx(e,n)};let a=n;return xpi("@visulima/vis").then(t=>{t&&(a={lastNoticeAt:n?.lastNoticeAt??0,lastQueryAt:o,latestVersion:t},F_(a))}).catch(()=>{}),()=>{a&&zx(e,a)}};g8();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");const Ux=Epi(process.argv);Ux!==void 0&&!process.env.NODE_EXTRA_CA_CERTS&&(process.env.NODE_EXTRA_CA_CERTS=Ux);Thi();try{const e=A2(process.cwd()).path;process.env.VIS_MONOREPO_ROOT=e;const i=mi(Z(e,"package.json"));i.name&&Nhi(i.name)}catch{}const Npi=Tpi(j0.version,process.argv[2]??"");d8();const Qe=l8("vis",{packageName:"vis",packageVersion:j0.version}),Rpi=process.argv.includes("--debug")||!!process.env.DEBUG;Qe.addPlugin(c8({detailed:Rpi,exitOnError:!1}));Qe.addGlobalOption({description:"Override workspace root directory",name:"cwd",type:String});Qe.addGlobalOption({description:"Path to a vis config file (overrides discovery)",name:"config",type:String});Qe.addGlobalOption({description:"Path to a CA bundle (PEM) to trust for HTTPS — for corporate proxies. Equivalent to NODE_EXTRA_CA_CERTS.",name:"ca-cert",type:String});Qe.addPlugin(Rhi);Qe.addPlugin(Spi);Qe.addCommand(nhi);Qe.addCommand(nz);Qe.addCommand(RRe);Qe.addCommand(kK);Qe.addCommand(DK);Qe.addCommand(Bhi);Qe.addCommand(ihi);Qe.addCommand(WRe);Qe.addCommand(Yhi);Qe.addCommand(iz);Qe.addCommand(IRe);Qe.addCommand(MK);Qe.addCommand(bhi);Qe.addCommand(jhi);Qe.addCommand(Chi);Qe.addCommand(SRe);Qe.addCommand(khi);Qe.addCommand(oMe);Qe.addCommand(A4);Qe.addCommand(y4);Qe.addCommand(nMe);Qe.addCommand(TRe);Qe.addCommand(eMe);Qe.addCommand(BK);Qe.addCommand(ehi);Qe.addCommand(ERe);Qe.addCommand(xhi);Qe.addCommand(URe);Qe.addCommand(iMe);Qe.addCommand(Dhi);Qe.addCommand(h8);Qe.addCommand(ZRe);Qe.addCommand($ci);Qe.addCommand(qRe);Qe.addCommand(az);Qe.addCommand(tz);Qe.addCommand(NRe);Qe.addCommand(QRe);Qe.addCommand(Jhi);Qe.addCommand(KRe);Qe.addCommand(whi);Qe.addCommand(zRe);Qe.addCommand(HK);Qe.addCommand(PK);Qe.addCommand(VRe);Qe.addCommand(xRe);Qe.addCommand(Lci);Qe.addCommand(ohi);Qe.addCommand(ahi);for(const e of _Re)Qe.addCommand(e);for(const e of mMe)Qe.addCommand(e);for(const e of ez)Qe.addCommand(e);for(const e of $K)Qe.addCommand(e);for(const e of sZ)Qe.addCommand(e);for(const e of mhi)Qe.addCommand(e);for(const e of lhi)Qe.addCommand(e);for(const e of FK)Qe.addCommand(e);for(const e of JRe)Qe.addCommand(e);for(const e of $hi)Qe.addCommand(e);Qe.addCommand(oz);for(const e of Vci)Qe.addCommand(e);Qe.addPlugin(gpi(Npi));if(jMe(process.argv.slice(2))){const{loadVisConfig:e}=await import("../packem_shared/CONFIG_FILES-BfaR0jKT.js"),i=process.env.VIS_MONOREPO_ROOT||process.cwd();let n;try{n=await e(i)}catch{n=void 0}try{await Qci({logger:{info:o=>{process.stdout.write(`${o}
|
|
1196
1196
|
`)},warn:o=>{process.stderr.write(`${o}
|
|
1197
1197
|
`)}},visConfig:n,workspaceRoot:i})}catch(o){process.stderr.write(`${o.message}
|
|
1198
|
-
`),process.exitCode=1}}else(async()=>{try{await Qe.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}})();export{Cri as $,pG as A,Pvi as B,ou as C,gvi as D,Sa as E,Sli as F,Ili as G,Qli as H,Wy as I,jpi as J,M0i as K,jG as L,L0i as M,C_ as N,Q0i as O,k4 as P,k0i as Q,oli as R,B0i as S,j_ as T,XP as U,bli as V,eu as W,cRe as X,HS as Y,qNe as Z,Ovi as _,hvi as a,bsi as a$,Fvi as a0,_vi as a1,KNe as a2,YB as a3,F as a4,xe as a5,Qpi as a6,nO as a7,Qj as a8,sNe as a9,fvi as aA,mvi as aB,bvi as aC,CO as aD,$O as aE,LO as aF,DO as aG,nC as aH,vx as aI,_o as aJ,bQ as aK,Ky as aL,tE as aM,Sui as aN,E0i as aO,usi as aP,cvi as aQ,mr as aR,bl as aS,Y0i as aT,J0i as aU,x0i as aV,Z0i as aW,wZ as aX,TG as aY,NG as aZ,Uvi as a_,rNe as aa,jvi as ab,Cvi as ac,wvi as ad,MS as ae,D0i as af,Api as ag,ypi as ah,Ni as ai,Sci as aj,Bci as ak,Eci as al,wx as am,Ex as an,$x as ao,_x as ap,Dx as aq,Ix as ar,jx as as,kx as at,Yx as au,Ox as av,Jx as aw,Na as ax,HO as ay,yvi as az,Oui as b,cpi as b0,i0i as b1,Vvi as b2,e0i as b3,qvi as b4,Csi as b5,w0i as b6,Ob as b7,o0i as b8,OG as b9,Cli as ba,jli as bb,nli as bc,uvi as bd,tli as be,Rli as bf,Tli as bg,Zli as bh,kli as bi,Avi as bj,pvi as bk,yui as bl,C0i as bm,j0i as bn,vvi as bo,zvi as bp,Wvi as bq,fh as br,Kvi as bs,S0i as bt,gve as bu,XL as bv,lvi as bw,$0i as bx,Jdi as c,
|
|
1198
|
+
`),process.exitCode=1}}else(async()=>{try{await Qe.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}})();export{Cri as $,pG as A,Pvi as B,ou as C,gvi as D,Sa as E,Sli as F,Ili as G,Qli as H,Wy as I,jpi as J,M0i as K,jG as L,L0i as M,C_ as N,Q0i as O,k4 as P,k0i as Q,oli as R,B0i as S,j_ as T,XP as U,bli as V,eu as W,cRe as X,HS as Y,qNe as Z,Ovi as _,hvi as a,bsi as a$,Fvi as a0,_vi as a1,KNe as a2,YB as a3,F as a4,xe as a5,Qpi as a6,nO as a7,Qj as a8,sNe as a9,fvi as aA,mvi as aB,bvi as aC,CO as aD,$O as aE,LO as aF,DO as aG,nC as aH,vx as aI,_o as aJ,bQ as aK,Ky as aL,tE as aM,Sui as aN,E0i as aO,usi as aP,cvi as aQ,mr as aR,bl as aS,Y0i as aT,J0i as aU,x0i as aV,Z0i as aW,wZ as aX,TG as aY,NG as aZ,Uvi as a_,rNe as aa,jvi as ab,Cvi as ac,wvi as ad,MS as ae,D0i as af,Api as ag,ypi as ah,Ni as ai,Sci as aj,Bci as ak,Eci as al,wx as am,Ex as an,$x as ao,_x as ap,Dx as aq,Ix as ar,jx as as,kx as at,Yx as au,Ox as av,Jx as aw,Na as ax,HO as ay,yvi as az,Oui as b,cpi as b0,i0i as b1,Vvi as b2,e0i as b3,qvi as b4,Csi as b5,w0i as b6,Ob as b7,o0i as b8,OG as b9,Cli as ba,jli as bb,nli as bc,uvi as bd,tli as be,Rli as bf,Tli as bg,Zli as bh,kli as bi,Avi as bj,pvi as bk,yui as bl,C0i as bm,j0i as bn,vvi as bo,zvi as bp,Wvi as bq,fh as br,Kvi as bs,S0i as bt,gve as bu,XL as bv,lvi as bw,$0i as bx,Jdi as c,Pd as d,Ddi as e,d_ as f,sA as g,wO as h,ec as i,sli as j,N0i as k,Yw as l,ve as m,fpi as n,Bli as o,re as p,qS as q,Zt as r,q as s,I0i as t,gg as u,EC as v,T0i as w,R0i as x,Xvi as y,Ms as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E as m}from"../packem_shared/Table-CcVkyULl-B_ef6zfS.js";import{p as i}from"./bin.js";import{s as p}from"../packem_shared/scan-progress-
|
|
1
|
+
import{E as m}from"../packem_shared/Table-CcVkyULl-B_ef6zfS.js";import{p as i}from"./bin.js";import{s as p}from"../packem_shared/scan-progress-CFhc0CMj.js";import{s as d,D}from"../packem_shared/osv-bloom-B03tUWf3.js";const b=o=>o?.security?.audit?.advisories?.bloom??{},u=o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,y=o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,h=async({options:o,visConfig:f,workspaceRoot:a})=>{if(!a)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const n=o.format==="json",c=b(f),l=o.source??c.source??D,s=p([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!n});let e,t;try{s.start("bloom");const r=Date.now();e=await d({allowedHosts:c.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:l,workspaceRoot:a}),e.upToDate?s.finish("bloom","ok",`up to date · ${u(Date.now()-r)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${y(e.bytesOnDisk)} · ${u(e.durationMs)}`)}catch(r){t=r instanceof Error?r.message:String(r),s.finish("bloom","error",t)}finally{s.stop()}n?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:t??null,manifest:e?.manifest??null,source:l,upToDate:e?.upToDate??!1},void 0,2)}
|
|
2
2
|
`):e&&(i.info(m(`Cache: ${e.cacheDir}`)),i.info(m(`Built: ${e.manifest.builtAtRfc3339}`)),t||i.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),t&&(process.exitCode=1)},O=h;export{O as advisoriesBloomSyncExecute};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as F}from"node:module";import{j as w,E as k,s as b,q as T,V as I,I as j}from"../packem_shared/Table-CcVkyULl-B_ef6zfS.js";import{y as R}from"../packem_shared/index-BDmTbWX1.js";import{a as J,r as D,b as m,c as E}from"../packem_shared/ai-fix-
|
|
1
|
+
import{createRequire as F}from"node:module";import{j as w,E as k,s as b,q as T,V as I,I as j}from"../packem_shared/Table-CcVkyULl-B_ef6zfS.js";import{y as R}from"../packem_shared/index-BDmTbWX1.js";import{a as J,r as D,b as m,c as E}from"../packem_shared/ai-fix-9Vzlp6XU.js";import{p}from"./bin.js";import{l as N}from"../packem_shared/failure-log-CEWP3bP0.js";const A=F(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,O=o=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[t,r]=h.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return h.getBuiltinModule(o)}return A(o)},{createInterface:q}=O("node:readline"),B={"ambiguous-match":"ambiguous match",applied:"applied",error:"error","missing-file":"missing file","no-match":"no match","outside-workspace":"outside workspace"},S=(o,t,r)=>{const e=E(o,t,r),s=R(o,e);return s===""||s.startsWith("..")?e:s},L=(o,t,r)=>{const e=[w(`Fix proposal (${o.provider}, confidence: ${o.confidence})`),"",o.explanation||k("<no explanation>")];if(o.cannotFix)return e.push(""),e.push(b(`Cannot fix automatically: ${o.cannotFix}`)),e.join(`
|
|
2
2
|
`);if(o.patches.length===0)return e.push(""),e.push(b("No patches were proposed.")),e.join(`
|
|
3
3
|
`);e.push(""),e.push(w(`Patches (${String(o.patches.length)}):`));for(const[s,i]of o.patches.entries()){const a=S(t,r,i.file);e.push(""),e.push(T(`[${String(s+1)}] ${a}`)),i.reason&&e.push(k(` reason: ${i.reason}`));for(const u of i.oldString.split(`
|
|
4
4
|
`))e.push(I(` - ${u}`));for(const u of i.newString.split(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";import{c as p}from"../packem_shared/index-
|
|
1
|
+
import{createRequire as u}from"node:module";import{c as p}from"../packem_shared/index-yBikBkHT.js";const f=u(import.meta.url),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,a=s=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,i]=r.versions.node.split(".").map(Number);if(e>22||e===22&&i>=3||e===20&&i>=16)return r.getBuiltinModule(s)}return f(s)},{execSync:d,spawnSync:l}=a("node:child_process"),v=async({argument:s,logger:e,options:i})=>{const t=s?.[0];e.info("info: checking for updates...");const n=p.version;let o;try{const c=d("npm view @visulima/vis version",{encoding:"utf8"}).trim();o=t??c}catch{throw new Error("Failed to query npm registry. Check your network connection.")}if(n===o&&!i.force){e.info(`
|
|
2
2
|
✓ Already up to date (${n})`);return}if(i.check){n===o?e.info(`✓ Already up to date (${n})`):e.info(`info: found @visulima/vis@${o} (current: ${n})`);return}if(e.info(`info: found @visulima/vis@${o} (current: ${n})`),e.info("info: installing..."),l("npm",["install","-g",`@visulima/vis@${o}`],{encoding:"utf8",stdio:"inherit"}).status!==0)throw new Error("Failed to update. Try running with sudo or fix npm permissions.");e.info(`
|
|
3
3
|
✓ Updated @visulima/vis from ${n} → ${o}`)};export{v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as N,R as C,T as P,E as h,N as T,c as I,f as j,q,I as x}from"./bin.js";import"../packem_shared/index-BDmTbWX1.js";import"../packem_shared/public-api-WqUCiyIe.js";import{K as z,Z as A,W as F}from"../packem_shared/ai-analysis-
|
|
1
|
+
import{P as N,R as C,T as P,E as h,N as T,c as I,f as j,q,I as x}from"./bin.js";import"../packem_shared/index-BDmTbWX1.js";import"../packem_shared/public-api-WqUCiyIe.js";import{K as z,Z as A,W as F}from"../packem_shared/ai-analysis-BUeX2J2H.js";const M=/^[\^~>=<]+/,U=async({argument:v,logger:n,options:c,visConfig:l,workspaceRoot:f})=>{if(!f)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const m=v,e=m[0];if(!e)throw new Error("Package name is required. Usage: vis analyze <package> [version]");const p=m[1],{packageManager:R}=N(f);let o,u="default";const b=C(f,R);for(const[t,i]of b){const a=i.get(e);if(a){o=a,u=t;break}}if(!o)throw new Error(`Package "${e}" not found in any catalog or package.json. Make sure it exists in your workspace dependencies.`);let r;if(p)r=p;else{n.info(`Fetching latest version for ${e}...
|
|
2
2
|
`);const t=await P(e);if(!t.latest)throw new Error(`Could not determine latest version for "${e}".`);r=t.latest}const d=h(o),w=h(r);if(!d||!w)throw new Error(`Could not parse versions: current="${o}", target="${r}".`);const k=q(d,w);if(k==="none"){n.info(`${e} is already at ${r}. Nothing to analyze.`);return}const E=x(o),g={catalogName:u,currentRange:o,newRange:`${E}${r}`,packageName:e,targetVersion:r,updateType:k},y=z(c.aiType??"impact");if(y==="security"||c.security){n.info(`Checking for known vulnerabilities...
|
|
3
3
|
`);const t=o.replace(M,""),i=(await T([{name:e,version:t}])).get(e);i&&i.length>0&&(g.vulnerabilities=i);const a=I(l?.security,{minimumScore:l?.security?.policies?.score?.minimum});if(a.length>0){const s=(await j(a,[{name:e,version:t}])).get(`${e}@${t}`);s&&(g.socketReport={alerts:s.alerts,license:s.license,score:s.score})}}const $=await A([g],n,l?.ai,y);(c.format??"table")==="json"?process.stdout.write(`${JSON.stringify($,void 0,2)}
|
|
4
4
|
`):n.info(F($))};export{U as default};
|