@visulima/vis 1.0.0-alpha.16 → 1.0.0-alpha.17
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 +15 -0
- package/dist/config/index.d.ts +80 -1
- package/dist/packem_chunks/bin.js +2 -2
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -2
- package/dist/packem_chunks/handler38.js +3 -3
- package/dist/packem_chunks/handler39.js +6 -6
- package/dist/packem_chunks/handler40.js +1 -1
- package/dist/packem_chunks/handler42.js +6 -6
- package/dist/packem_chunks/handler44.js +1 -1
- package/dist/packem_chunks/handler47.js +48 -48
- package/dist/packem_chunks/index.js +1 -1
- package/dist/packem_shared/{docker-Dl0AoVTZ.js → docker-B4i5yxtP.js} +1 -1
- package/dist/packem_shared/lifecycle-C7vfQmA3.js +2 -0
- package/package.json +11 -11
- package/dist/packem_shared/lifecycle-BC6Nst6i.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## @visulima/vis [1.0.0-alpha.17](https://github.com/visulima/visulima/compare/@visulima/vis@1.0.0-alpha.16...@visulima/vis@1.0.0-alpha.17) (2026-05-10)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **vis:** expand typed plugin hook surface ([d0784df](https://github.com/visulima/visulima/commit/d0784df2b0c422002ec21c3c8da0002e0ff70dee))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Dependencies
|
|
9
|
+
|
|
10
|
+
* **@visulima/task-runner:** upgraded to 1.0.0-alpha.12
|
|
11
|
+
* **@visulima/tui:** upgraded to 1.0.0-alpha.12
|
|
12
|
+
* **@visulima/cerebro:** upgraded to 3.0.0-alpha.20
|
|
13
|
+
* **@visulima/fs:** upgraded to 5.0.0-alpha.19
|
|
14
|
+
* **@visulima/package:** upgraded to 5.0.0-alpha.18
|
|
15
|
+
|
|
1
16
|
## @visulima/vis [1.0.0-alpha.16](https://github.com/visulima/visulima/compare/@visulima/vis@1.0.0-alpha.15...@visulima/vis@1.0.0-alpha.16) (2026-05-10)
|
|
2
17
|
|
|
3
18
|
### Features
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { TargetConfiguration, TaskResult, Task, ConstraintsConfig, NamedInputs, TaskRunnerOptions } from '@visulima/task-runner';
|
|
1
|
+
import { TargetConfiguration, TaskResult, Task, FingerprintContributor, ConstraintsConfig, NamedInputs, TaskRunnerOptions } from '@visulima/task-runner';
|
|
2
|
+
export { type FingerprintContributor } from '@visulima/task-runner';
|
|
2
3
|
import { Hookable } from 'hookable';
|
|
3
4
|
/**
|
|
4
5
|
* One family of upstream-coupled packages.
|
|
@@ -109,6 +110,40 @@ interface ServiceConfig {
|
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
112
|
/**
|
|
113
|
+
* Persisted registry entry. One JSON file per running service in
|
|
114
|
+
* `~/.vis-services/<workspaceHash>/<slug>.json`.
|
|
115
|
+
*/
|
|
116
|
+
interface ServiceEntry {
|
|
117
|
+
/** Resolved command actually spawned. Used for stale-PID detection. */
|
|
118
|
+
command: string;
|
|
119
|
+
/** Service config captured at start time. */
|
|
120
|
+
config: ServiceConfig;
|
|
121
|
+
cwd: string;
|
|
122
|
+
/**
|
|
123
|
+
* Env vars to forward to dependents. Resolved at start time —
|
|
124
|
+
* defaults to `config.env`, but a future `--env-from` flag could
|
|
125
|
+
* extend this without touching the registry consumer.
|
|
126
|
+
*/
|
|
127
|
+
env: Record<string, string>;
|
|
128
|
+
/** Target id, e.g. `apps/api:db`. */
|
|
129
|
+
id: string;
|
|
130
|
+
/** Absolute path to the captured stdout/stderr log file. */
|
|
131
|
+
logFile: string;
|
|
132
|
+
pid: number;
|
|
133
|
+
/**
|
|
134
|
+
* Filesystem-safe slug of `id`. `apps/api:db` → `apps_api__db`.
|
|
135
|
+
* Used as the entry's filename so registry reads can map slug → entry.
|
|
136
|
+
*/
|
|
137
|
+
slug: string;
|
|
138
|
+
/** ISO 8601 timestamp of when the service was started. */
|
|
139
|
+
startedAt: string;
|
|
140
|
+
/**
|
|
141
|
+
* vis version that started this service. Auto-attach refuses entries
|
|
142
|
+
* from a mismatched version — protects against schema drift.
|
|
143
|
+
*/
|
|
144
|
+
visVersion: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
112
147
|
* Semantic classification for a target.
|
|
113
148
|
* - `build`: Generates one or more artifacts; cached by default.
|
|
114
149
|
* - `test`: Validation task (lint, typecheck, unit test). Default type.
|
|
@@ -410,6 +445,50 @@ interface VisHooks {
|
|
|
410
445
|
* `task:stderr` for semantics.
|
|
411
446
|
*/
|
|
412
447
|
"task:stdout": (task: Task, chunk: string) => Promise<void> | void;
|
|
448
|
+
/**
|
|
449
|
+
* Fired during fingerprint construction, after built-in inputs are
|
|
450
|
+
* gathered and before the hash is sealed. Plugins call
|
|
451
|
+
* `contributor.contribute(key, value)` to mix arbitrary strings
|
|
452
|
+
* into the task hash — the hasher namespaces and sorts contributions
|
|
453
|
+
* deterministically so call order doesn't change the result.
|
|
454
|
+
*
|
|
455
|
+
* Throwing aborts hashing for the offending task and surfaces as a
|
|
456
|
+
* task failure before any cache lookup runs. Use this to guarantee
|
|
457
|
+
* a buggy plugin can't quietly poison cache state.
|
|
458
|
+
*/
|
|
459
|
+
"task:fingerprint": (task: Task, contributor: FingerprintContributor) => Promise<void> | void;
|
|
460
|
+
/**
|
|
461
|
+
* Fired right before a failed task is re-spawned by the retry
|
|
462
|
+
* controller. `attempt` is 1-indexed and counts the retry that's
|
|
463
|
+
* about to start (so the original failed run was attempt 0).
|
|
464
|
+
* `prevExitCode` is the failing exit status that triggered the
|
|
465
|
+
* retry (the full TaskResult isn't materialized at the retry
|
|
466
|
+
* boundary — only the per-attempt close event is available).
|
|
467
|
+
*
|
|
468
|
+
* Throwing aborts the retry; the previous failure becomes the final
|
|
469
|
+
* result.
|
|
470
|
+
*/
|
|
471
|
+
"task:retry": (task: Task, attempt: number, prevExitCode: number) => Promise<void> | void;
|
|
472
|
+
/**
|
|
473
|
+
* Fired after `vis run` auto-attaches to one or more registered
|
|
474
|
+
* services. `taskIds` lists the in-graph dependents that consumed
|
|
475
|
+
* the service's `env` block; an empty array means the service was
|
|
476
|
+
* registered but no kept task depended on it.
|
|
477
|
+
*/
|
|
478
|
+
"service:attach": (entry: ServiceEntry, taskIds: ReadonlyArray<string>) => Promise<void> | void;
|
|
479
|
+
/**
|
|
480
|
+
* Fired after a service is registered and its readiness probe
|
|
481
|
+
* succeeds. Sourced from both `vis service start` (and `restart`'s
|
|
482
|
+
* post-start phase) and any future programmatic call sites.
|
|
483
|
+
*/
|
|
484
|
+
"service:start": (entry: ServiceEntry) => Promise<void> | void;
|
|
485
|
+
/**
|
|
486
|
+
* Fired after a registered service is stopped (SIGTERM/SIGKILL
|
|
487
|
+
* acknowledged, registry entry deleted). Not fired when stop is
|
|
488
|
+
* called against an unknown id — only when there was an alive
|
|
489
|
+
* entry to terminate.
|
|
490
|
+
*/
|
|
491
|
+
"service:stop": (entry: ServiceEntry) => Promise<void> | void;
|
|
413
492
|
}
|
|
414
493
|
/**
|
|
415
494
|
* Public plugin contract. Implementations register handlers by
|
|
@@ -1001,7 +1001,7 @@ To install the missing package${n}, please run the following command:
|
|
|
1001
1001
|
|
|
1002
1002
|
or
|
|
1003
1003
|
|
|
1004
|
-
`),r.postMessage&&(i+=r.postMessage),i},"generateMissingPackagesInstallMessage");var FL=Object.defineProperty,RL=f((e,t)=>FL(e,"name",{value:t,configurable:!0}),"c$v"),LL=Object.defineProperty,D1=RL((e,t)=>LL(e,"name",{value:t,configurable:!0}),"p");const BL=Qe(import.meta.url),bs=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,TL=D1(e=>{if(typeof bs<"u"&&bs.versions&&bs.versions.node){const[t,r]=bs.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return bs.getBuiltinModule(e)}return BL(e)},"__cjs_getBuiltinModule"),{existsSync:ja,readFileSync:C1}=TL("node:fs");var IL=Object.defineProperty,E1=D1((e,t)=>IL(e,"name",{value:t,configurable:!0}),"i");E1(async e=>{const t=await ao(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const n=await lo(t);if(n&&typeof n=="object"&&!Array.isArray(n)){const i=n;if(i.useWorkspaces||i.packages)return{path:Ge(t),strategy:"lerna"}}}const r=t?.endsWith("turbo.json");try{const{packageManager:n,path:i}=await PL(e);if(["npm","yarn"].includes(n)){const s=E(i,"package.json");if(ja(s)&&C1(E(i,"package.json"),"utf8").includes("workspaces"))return{path:i,strategy:r?"turbo":n}}else if(n==="pnpm"){const s=E(i,"pnpm-workspace.yaml");if(ja(s))return{path:i,strategy:r?"turbo":"pnpm"}}}catch(n){if(!(n instanceof Di))throw n}throw new Error(`No monorepo root could be found upwards from the directory ${e} using lerna, yarn, pnpm, or npm as indicators.`)},"findMonorepoRoot");const A1=E1(e=>{const t=co(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const n=Se(t);if(n.useWorkspaces||n.packages)return{path:Ge(t),strategy:"lerna"}}const r=t?.endsWith("turbo.json");try{const{packageManager:n,path:i}=NL(e);if(["npm","yarn"].includes(n)){const s=E(i,"package.json");if(ja(s)&&C1(E(i,"package.json"),"utf8").includes("workspaces"))return{path:i,strategy:r?"turbo":n}}else if(n==="pnpm"){const s=E(i,"pnpm-workspace.yaml");if(ja(s))return{path:i,strategy:r?"turbo":"pnpm"}}}catch(n){if(!(n instanceof Di))throw n}throw new Error(`No monorepo root could be found upwards from the directory ${e} using lerna, yarn, pnpm, or npm as indicators.`)},"findMonorepoRootSync");var _L="1.0.0-alpha.15";const Oa={version:_L};var ML=Object.defineProperty,VL=f((e,t)=>ML(e,"name",{value:t,configurable:!0}),"e$W");const WL={argument:{description:"Target selector (same syntax as `vis run`): `build`, `:build`, `~:test`, `#tag:lint`, …",name:"selector",type:String},description:"Show the execution plan for a target without running it",examples:[["vis action-graph build","Print the task plan for `build` on every project"],["vis action-graph :test","Moon-style selector"],["vis action-graph build --json","Emit a JSON description of the plan"],['vis action-graph lint --query "tag=frontend"',"Filter projects by query"]],group:"Workspace",loader:VL(()=>import("./handler.js"),"loader"),name:"action-graph",options:[{defaultValue:!1,description:"Emit JSON instead of ASCII",name:"json",type:Boolean},{description:"Filter matched projects by a query",name:"query",type:String}]};var UL=Object.defineProperty,GL=f((e,t)=>UL(e,"name",{value:t,configurable:!0}),"e$V");const qL={argument:{description:"Packages to add (e.g., react react-dom)",name:"packages",type:String},description:"Add packages using the detected package manager",examples:[["vis add react react-dom","Add packages"],["vis add -D typescript @types/react","Add as dev dependencies"],["vis add react --filter app","Add to specific workspace package"],["vis add react --to web","Add to one package, auto-conforming the version to existing catalogs / sibling deps"],["vis add -g typescript","Add globally (uses npm)"],["vis add lodash -w","Add to workspace root"],["vis add lodash --no-socket-check","Add without Socket.dev check"],["vis add lodash --no-typosquat-check","Skip typosquat name check"],["vis add lodash --run-scripts","Run lifecycle scripts (opts out of vis's default block-by-default policy)"]],group:"Dependencies",loader:GL(()=>import("./handler28.js"),"loader"),name:"add",options:[{alias:"D",defaultValue:!1,description:"Add as dev dependency",name:"save-dev",type:Boolean},{alias:"E",defaultValue:!1,description:"Save exact version",name:"exact",type:Boolean},{alias:"P",defaultValue:!1,description:"Add as peer dependency",name:"save-peer",type:Boolean},{alias:"O",defaultValue:!1,description:"Add as optional dependency",name:"save-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Install globally (uses npm)",name:"global",type:Boolean},{alias:"w",defaultValue:!1,description:"Add to workspace root",name:"workspace-root",type:Boolean},{defaultValue:!1,description:"Use workspace protocol (pnpm)",name:"workspace",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String},{description:"Target a single workspace package and auto-conform the version to existing catalogs / sibling deps (syncpack#285)",name:"to",type:String},{defaultValue:!1,description:"Skip typosquat name check before adding",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip Socket.dev security check before adding",name:"no-socket-check",type:Boolean},{defaultValue:!1,description:"Run lifecycle scripts during add (opts out of vis's default block-by-default policy; allowlisted packages run via security.allowBuilds)",name:"run-scripts",type:Boolean},{defaultValue:!1,description:"After adding, recursively install non-optional peer dependencies that aren't already in the workspace (matches nypm's installPeerDependencies)",name:"auto-install-peers",type:Boolean}]};var zL=Object.defineProperty,HL=f((e,t)=>zL(e,"name",{value:t,configurable:!0}),"e$U");const JL={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target only on projects affected by recent changes",examples:[["vis affected build","Run build on affected projects"],["vis affected test --base=main","Run tests on projects changed since main"],["vis affected destroy --reverse","Tear down affected projects leaves-first"]],group:"Run & Execute",loader:HL(()=>import("./handler2.js"),"loader"),name:"affected",options:[{defaultValue:"HEAD~1",description:"Git base ref for comparison",name:"base",type:String},{defaultValue:"HEAD",description:"Git head ref for comparison",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep" — controls how far to include dependents of changed projects',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep" — controls how far to include dependencies of changed projects',name:"upstream",type:String},{defaultValue:3,description:"Maximum number of parallel tasks",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{description:'Partition tasks for distributed CI (e.g., "1/4" for first of four runners). Falls back to VIS_PARTITION env var.',name:"partition",type:String},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{defaultValue:!1,description:"Run the dependency graph in reverse (leaves first, then their dependents). Useful for teardown targets like `destroy`/`undeploy` where dependents must run before the things they depend on.",name:"reverse",type:Boolean},{description:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Forwarded verbatim to the downstream `vis run` so capability-gated tasks resolve identically. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String}]},j1={description:"Output format: table or json (default: table)",name:"format",type:String},KL={commandPath:["ai"],description:"List detected AI providers and show which one is selected",examples:[["vis ai providers","List all AI providers and their status"],["vis ai providers --format json","Output as JSON"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiProvidersExecute"),name:"providers",options:[j1]},YL={commandPath:["ai"],description:"Test the best available AI provider with a quick prompt",examples:[["vis ai test","Test the selected provider"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiTestExecute"),name:"test",options:[]},XL={argument:{description:"Task ID to propose a fix for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["ai"],description:"Read a failed task's logs and propose a structured patch (Phase 1: local-only, no git)",examples:[["vis ai fix @myorg/app:build","Print proposed patch for the failed task"],["vis ai fix @myorg/app:build --apply","Apply the patch to disk after confirming"],["vis ai fix @myorg/app:build --format json","Machine-readable patch output"],["vis ai fix @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiFixExecute"),name:"fix",options:[j1,{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{defaultValue:!1,description:"Apply the proposed patch to disk after printing it",name:"apply",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt before applying",name:"yes",type:Boolean}]},QL={description:"AI-assisted commands: provider detection and failure-fix proposals (cache management lives under `vis cache`)",examples:[["vis ai","List all AI subcommands"],["vis ai discover-help","Machine-readable subcommand catalogue (for AI agents)"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiRootExecute"),name:"ai",options:[]},ZL={commandPath:["ai"],description:"Print the machine-readable AI subcommand catalogue (JSON to stdout, designed for AI agents)",examples:[["vis ai discover-help","Emit the discovery payload as JSON"],["vis ai discover-help | jq '.subcommands[].path'","List all available paths"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiDiscoverHelpExecute"),name:"discover-help",options:[]},eB={commandPath:["ai"],description:"Diagnose the most recent failed task and post a structured patch as a PR/MR comment (or Buildkite annotation)",examples:[["vis ai heal","Heal the most recent failure"],["vis ai heal --dry-run","Propose a patch but skip apply / validate / post"],["vis ai heal --run 2026-04-28T...","Heal a specific historical run"]],group:"System",loader:Ve(()=>import("./heal.js").then(e=>e.h),"aiHeal"),name:"heal",options:[{defaultValue:!1,description:"Show the proposal and exit without applying or posting it",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},tB={commandPath:["ai","heal"],description:"Re-run the proposed fix and commit it to the PR/MR branch when validation passes",examples:[["vis ai heal accept","Triggered automatically by a `/vis heal accept` PR comment (GitHub/GitLab) or a Buildkite block-step unblock"]],group:"System",loader:Ve(()=>import("./heal-accept.js"),"aiHealAccept"),name:"accept",options:[{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},O1=[QL,ZL,KL,YL,XL,eB,tB],dY=Object.defineProperty({__proto__:null,default:O1},Symbol.toStringTag,{value:"Module"});var rB=Object.defineProperty,nB=f((e,t)=>rB(e,"name",{value:t,configurable:!0}),"e$T");const iB={argument:{description:"Package name to analyze (e.g., react)",name:"package",required:!0,type:String},description:"Analyze a single package update with AI",examples:[["vis analyze react","Analyze updating react to latest"],["vis analyze react 19.0.0","Analyze updating react to specific version"],["vis analyze react --ai-type security","Run security-focused analysis"],["vis analyze react --format json","Output as JSON"]],group:"System",loader:nB(()=>import("./handler3.js"),"loader"),name:"analyze",options:[{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Check for known security vulnerabilities",name:"security",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]};var sB=Object.defineProperty,oB=f((e,t)=>sB(e,"name",{value:t,configurable:!0}),"e$S");const aB={description:"Review and approve dependencies with build scripts",examples:[["vis approve-builds","Scan and list unapproved build scripts"],["vis approve-builds --all","Approve all pending builds (pnpm)"],["vis approve-builds --sync-native","Sync allowBuilds to native PM config"]],group:"Security & Health",loader:oB(()=>import("./handler4.js"),"loader"),name:"approve-builds",options:[{defaultValue:!1,description:"Approve all pending builds without prompting (pnpm only)",name:"all",type:Boolean},{defaultValue:!1,description:"Force vis scanning even for pnpm (instead of delegating)",name:"scan",type:Boolean},{defaultValue:!1,description:"Sync allowBuilds to native PM config (bun: trustedDependencies, npm: .npmrc, yarn: .yarnrc.yml)",name:"sync-native",type:Boolean}]};var cB=Object.defineProperty,lB=f((e,t)=>cB(e,"name",{value:t,configurable:!0}),"e$R");const uB={description:"Audit installed packages for vulnerabilities and supply chain risks",examples:[["vis audit","Full audit of all installed packages"],["vis audit --severity high","Show only high/critical issues"],["vis audit --format json","Output as JSON for CI integration"],["vis audit --fix","Show fix suggestions for vulnerabilities"],["vis audit --exit-code","Exit with code 1 if issues found (for CI)"],["vis audit --show-accepted","Include acknowledged risks in output"],["vis audit --sync","Sync accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)"]],group:"Security & Health",loader:lB(()=>import("./handler30.js"),"loader"),name:"audit",options:[{description:"Minimum severity to report: low, medium, high, critical (default: low)",name:"severity",type:String},{description:"Output format: table or json (default: table)",name:"format",type:String},{defaultValue:!1,description:"Show fix suggestions for vulnerabilities",name:"fix",type:Boolean},{defaultValue:!1,description:"Exit with code 1 if any issues found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Include acknowledged (accepted risk) issues in output",name:"show-accepted",type:Boolean},{defaultValue:!1,description:"Sync vis accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)",name:"sync",type:Boolean}]},Do={description:"Cache directory (overrides config and default). Relative paths are resolved against the workspace root.",name:"cache-dir",type:String},Dc={description:"Cache scope: 'shared' (default — main worktree's cache), 'worktree' (this checkout's local cache), or 'all' (both)",name:"scope",type:String},x1={description:"Cache type: 'task' (workspace task cache), 'ai' (AI response cache), 'socket' (Socket.dev report cache), or 'all' (default)",name:"type",type:String},pB={commandPath:["cache"],description:"List all cache entries",examples:[["vis cache list","List all cache entries"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheListExecute"),name:"list",options:[Do,Dc,{description:"Output format: table or json (default: table)",name:"format",type:String}]},dB={commandPath:["cache"],description:"Remove cache entries (defaults to all stores: workspace task cache, AI responses, Socket.dev reports)",examples:[["vis cache clean","Remove all cache entries from every store"],["vis cache clean --type=ai","Clear only the AI response cache"],["vis cache clean --type=task","Clear only the workspace task cache"],["vis cache clean --dry-run","Preview what clean would remove"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheCleanExecute"),name:"clean",options:[Do,x1,{defaultValue:!1,description:"Preview without deleting",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt for out-of-workspace cache directories",name:"force",type:Boolean}]},fB={commandPath:["cache"],description:"Remove old and oversized cache entries",examples:[["vis cache prune","Remove old and oversized entries"],["vis cache prune --max-age-days=3 --max-size=500MB","Prune with custom limits"],["vis cache prune --keep-last=30","Keep only the 30 most recent entries"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cachePruneExecute"),name:"prune",options:[Do,Dc,{description:"Remove entries older than N days",name:"max-age-days",type:Number},{description:"Evict oldest entries until cache is under this size (e.g. 500MB)",name:"max-size",type:String},{description:"Keep only the N most recent entries (sorted newest-first by mtime)",name:"keep-last",type:Number}]},hB={commandPath:["cache"],description:"Print on-disk footprint and stats for one or more cache stores (task / ai / socket)",examples:[["vis cache size","Show stats for every cache store"],["vis cache size --type=ai","Show only the AI response cache (entries, size, oldest, newest)"],["vis cache size --type=task --format=json","Machine-readable task cache size"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheSizeExecute"),name:"size",options:[Do,Dc,x1,{description:"Output format: table or json (default: table)",name:"format",type:String}]},cf={description:"Output format: table or json (default: table)",name:"format",type:String},P1={description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},mB={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Explain why a task missed the cache by diffing hash inputs against the previous run",examples:[["vis cache why @myorg/app:build","Show which inputs changed since the last run"],["vis cache why @myorg/app:build --json","Machine-readable output for CI"],["vis cache why @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheWhyExecute"),name:"why",options:[cf,P1]},gB={argument:{description:"Task ID to print the hash for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Print the recorded hash and per-input hash details for a task",examples:[["vis cache hash @myorg/app:build","Show the resolved hash + contributing inputs"],["vis cache hash @myorg/app:build --json","Machine-readable output"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheHashExecute"),name:"hash",options:[cf,P1]},yB={argument:{description:"Task ID to verify (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Verify cache restore fidelity: extract the cached entry into a tmp directory and diff each file's content, mode, and mtime against the live workspace. Exits 1 on any drift (changed content, mode, mtime) or if a cached output is missing from the workspace. With --scope=all, the first cache directory containing the task is used.",examples:[["vis cache verify @myorg/app:build","Diff cached outputs vs live workspace files"],["vis cache verify @myorg/app:build --format=json","Machine-readable diff (status: ok | drift)"],["vis cache verify @myorg/app:build --cache-dir=.alt-cache","Verify against a non-default cache directory"],["vis cache verify @myorg/app:build --scope=all","Search shared and worktree caches for the task"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheVerifyExecute"),name:"verify",options:[Do,Dc,cf]},vB={commandPath:["cache"],description:"Probe the configured remote cache (HTTP HEAD or REAPI Capabilities) and report reachability, latency, and negotiated capabilities",examples:[["vis cache doctor","Probe the remoteCache configured in vis.config.ts"],["vis cache doctor --url=grpcs://cache.example.com:443 --backend=reapi","Override URL/backend ad-hoc"],["vis cache doctor --json","Machine-readable output"]],group:"Workspace",loader:Ve(()=>import("./doctor-probe.js"),"cacheDoctorExecute"),name:"doctor",options:[{description:"Override remote cache URL (otherwise read from vis.config.ts remoteCache.url)",name:"url",type:String},{description:"Override backend selector: 'http' or 'reapi'",name:"backend",type:String},{description:"Output format: table or json (default: table)",name:"format",type:String},{defaultValue:5e3,description:"Probe timeout in milliseconds (default: 5000)",name:"timeout",type:Number}]},bB=[pB,dB,fB,hB,mB,gB,yB,vB];var $B=Object.defineProperty,wB=f((e,t)=>$B(e,"name",{value:t,configurable:!0}),"e$Q");const kB={alias:["c","outdated"],argument:{description:"Specific packages to check (checks all if omitted)",name:"packages",type:String},description:"Check for outdated dependencies, security vulnerabilities, and supply chain settings",examples:[["vis check","Check all catalog dependencies"],["vis check react","Check specific packages"],["vis check --target minor","Only show minor/patch updates"],["vis check --exclude '@types/*'","Exclude packages by pattern"],["vis check --no-security","Skip vulnerability scanning"],["vis check --security-config","Audit supply chain security settings"],["vis check --security-config --sync","Sync security config to pnpm-workspace.yaml"]],group:"Security & Health",loader:wB(()=>import("./handler5.js"),"loader"),name:"check",options:[{alias:"t",description:"Update target: latest, minor, or patch (default: latest)",name:"target",type:String},{description:"Glob pattern to include packages (repeatable)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions",name:"prerelease",type:Boolean},{defaultValue:!1,description:"Skip security vulnerability scanning",name:"no-security",type:Boolean},{defaultValue:!1,description:"Audit supply chain security settings",name:"security-config",type:Boolean},{defaultValue:!1,description:"Sync security settings to pnpm-workspace.yaml (pnpm only, requires --security-config)",name:"sync",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Exit with code 1 if outdated dependencies found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend",name:"ai-type",type:String},{alias:"D",conflicts:"prod",description:"Check only devDependencies (npm/yarn mode)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Check only dependencies (npm/yarn mode)",name:"prod",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in outdated checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry",name:"include-internal",type:Boolean}]};var SB=Object.defineProperty,DB=f((e,t)=>SB(e,"name",{value:t,configurable:!0}),"e$P");const CB={argument:{description:"Comma-separated list of targets to run (e.g., lint,test,build)",name:"targets",type:String},description:"Run affected targets in a CI-optimized pipeline",examples:[["vis ci lint,test,build","Run lint, test, and build on affected projects"],["vis ci test --base=origin/main","Override the base ref"],["vis ci build --no-install","Skip the install step (assume deps already present)"],["vis ci build --parallel=6","Increase concurrency"]],group:"Run & Execute",loader:DB(()=>import("./handler6.js"),"loader"),name:"ci",options:[{defaultValue:!0,description:"Install dependencies before running targets (use --no-install to skip)",name:"install",type:Boolean},{defaultValue:!1,description:"Skip the toolchain pre-flight (no auto-install for any pinned tool: node / pnpm / yarn / npm / bun / deno / go / python / ruby / rust)",name:"skip-toolchain",type:Boolean},{description:"Git base ref for affected detection (default: auto-detected from CI env)",name:"base",type:String},{description:"Git head ref for affected detection (default: HEAD)",name:"head",type:String},{defaultValue:"none",description:"Upstream scope: none | direct | deep",name:"upstream",type:String},{defaultValue:"deep",description:"Downstream scope: none | direct | deep",name:"downstream",type:String},{defaultValue:4,description:"Maximum number of parallel tasks per target",name:"parallel",type:Number},{description:'Partition tasks for distributed CI (e.g., "1/4")',name:"partition",type:String},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String}]};var EB=Object.defineProperty,AB=f((e,t)=>EB(e,"name",{value:t,configurable:!0}),"e$O");const jB={description:"Remove node_modules from all workspace projects",examples:[["vis clean","Remove all node_modules directories"],["vis clean --lockfile","Also remove lockfiles"],["vis clean --dry-run","Preview what would be removed"]],group:"Workspace",loader:AB(()=>import("./handler7.js"),"loader"),name:"clean",options:[{alias:"l",defaultValue:!1,description:"Also remove lockfiles (pnpm-lock.yaml, package-lock.json, etc.)",name:"lockfile",type:Boolean},{defaultValue:!1,description:"Preview what would be removed without deleting",name:"dry-run",type:Boolean}]};var OB=Object.defineProperty,xB=f((e,t)=>OB(e,"name",{value:t,configurable:!0}),"e$N");const PB={argument:{description:"Template to use (e.g., vis:app, create-vite, user/repo) — omit for interactive mode",name:"template",type:String},description:"Create a new project from a template",examples:[["vis create","Interactive project scaffolding"],["vis create vis:monorepo my-workspace","Create a monorepo workspace"],["vis create vis:app my-app","Scaffold a Vite application"],["vis create vis:library my-lib","Create a TypeScript library"],["vis create vite my-app -- --template react-ts","Use create-vite with React TypeScript"],["vis create user/repo my-project","Clone a GitHub template"],["vis create --list","Show available templates"]],group:"Scaffold & Config",loader:xB(()=>import("./handler43.js"),"loader"),name:"create",options:[{defaultValue:!1,description:"Show available templates",name:"list",type:Boolean},{description:"Generate editor configs (vscode)",name:"editor",type:String},{defaultValue:!1,description:"Initialize a git repository",name:"git-init",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts",name:"no-interactive",type:Boolean}]};var NB=Object.defineProperty,FB=f((e,t)=>NB(e,"name",{value:t,configurable:!0}),"e$M");const RB={description:"Deduplicate dependencies using the detected package manager",examples:[["vis dedupe","Run deduplication"],["vis dedupe --check","Preview changes without modifying (CI-friendly)"]],group:"Dependencies",loader:FB(()=>import("./handler8.js"),"loader"),name:"dedupe",options:[{defaultValue:!1,description:"Preview changes without modifying files (dry-run)",name:"check",type:Boolean}]};var LB=Object.defineProperty,BB=f((e,t)=>LB(e,"name",{value:t,configurable:!0}),"e$L");const TB={alias:"dc",description:"Create or update .devcontainer/devcontainer.json interactively",examples:[["vis devcontainer","Launch interactive devcontainer config editor"],["vis dc","Alias for devcontainer"],["vis devcontainer --template node-pnpm","Start from Node.js + pnpm template"]],group:"Scaffold & Config",loader:BB(()=>import("./handler45.js"),"loader"),name:"devcontainer",options:[{alias:"t",description:"Start from a template: node, node-pnpm, node-postgres, node-dind, fullstack, python, go, rust, java, devops, minimal, custom",name:"template",type:String},{alias:"o",description:"Output path (default: .devcontainer/devcontainer.json)",name:"output",type:String}]};var IB=Object.defineProperty,_B=f((e,t)=>IB(e,"name",{value:t,configurable:!0}),"e$K");const MB={argument:{description:"Package to execute (optionally with @version)",name:"package",type:String},description:"Execute a remote package without permanent installation",examples:[["vis dlx create-vite my-app","Scaffold a new project"],["vis dlx typescript@5.5.4 tsc --version","Run specific version"],["vis dlx -p cowsay -p lolcatjs -c 'echo hi | cowsay | lolcatjs'","Multiple packages with shell"]],group:"Run & Execute",loader:_B(()=>import("./handler9.js"),"loader"),name:"dlx",options:[{alias:"p",description:"Additional packages to install (repeatable)",multiple:!0,name:"package",type:String},{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output except command results",name:"silent",type:Boolean}]};var VB=Object.defineProperty,WB=f((e,t)=>VB(e,"name",{value:t,configurable:!0}),"e$J");const UB={argument:{description:"Docker subcommand: scaffold | prune",name:"subcommand",type:String},description:"Docker integration — scaffold a minimal context or prune unfocused deps",examples:[["vis docker scaffold --focus=my-app","Generate .vis/docker/workspace for my-app + its deps"],["vis docker scaffold --focus=my-app --include-sources","Also copy focus source trees"],["vis docker scaffold --focus=my-app,other --out=.vis/docker","Focus multiple projects"],["vis docker prune --context=.vis/docker","Strip unfocused projects inside a build stage"]],group:"Workspace",loader:WB(()=>import("./handler10.js"),"loader"),name:"docker",options:[{description:"Project name(s) to focus on — comma-separated for multiple",name:"focus",type:String},{description:"Output directory for the scaffold (default: .vis/docker)",name:"out",type:String},{defaultValue:!1,description:"Also copy focus project source trees to <out>/sources",name:"include-sources",type:Boolean},{description:"Scaffold root for `vis docker prune` (default: .vis/docker)",name:"context",type:String},{defaultValue:!0,description:"Rewrite the workspace lockfile to drop unfocused projects (use --no-prune-lockfile to copy verbatim)",name:"prune-lockfile",type:Boolean}]};var GB=Object.defineProperty,qB=f((e,t)=>GB(e,"name",{value:t,configurable:!0}),"e$I");const zB={description:"Run a full project health check (outdated, security, duplicates, optimizations)",examples:[["vis doctor","Full project health check"],["vis doctor --fix","Check and auto-apply safe fixes"],["vis doctor --format json","Machine-readable output for CI"],["vis doctor --only security","Only run the security scans"],["vis doctor --skip optimization,runtime","Skip the listed sections"],["vis doctor --quiet","Summary only, no per-section breakdown"],["vis doctor --no-progress","Disable live progress UI (sequential logs)"],["vis doctor --exit-code","Exit with code 1 if security issues found"],["vis doctor --exit-code --strict","Fail on any issue (outdated, duplicates, security)"]],group:"Security & Health",loader:qB(()=>import("./handler41.js"),"loader"),name:"doctor",options:[{description:"Output format: table or json (default: table). Alias: --json",name:"format",type:String},{defaultValue:!1,description:"Shorthand for --format json",name:"json",type:Boolean},{defaultValue:!1,description:"Exit with code 1 if issues found",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Auto-apply safe fixes (security overrides + codemods, SIGTERM orphans)",name:"fix",type:Boolean},{defaultValue:!1,description:"With --fix: escalate orphan cleanup to SIGKILL / taskkill /F (use when SIGTERM is ignored)",name:"fix-force",type:Boolean},{defaultValue:!1,description:"With --exit-code: also fail on outdated and duplicate deps",name:"strict",type:Boolean},{description:"Comma-separated sections to run: dependencies,security,optimization,runtime",name:"only",type:String},{description:"Comma-separated sections to skip",name:"skip",type:String},{defaultValue:!1,description:"Suppress per-section detail; print summary only",name:"quiet",type:Boolean},{defaultValue:!1,description:"Disable live progress UI (forces sequential logs)",name:"no-progress",type:Boolean},{defaultValue:!1,description:"Bypass the doctor result cache (~/.vis/cache/doctor)",name:"no-cache",type:Boolean},{description:"Comma-separated package name patterns to scope findings (supports * globs, e.g. '@types/*,react')",name:"filter",type:String}]};var HB=Object.defineProperty,JB=f((e,t)=>HB(e,"name",{value:t,configurable:!0}),"e$H");const KB={argument:{description:"Command to execute followed by arguments",name:"command",type:String},description:"Execute a local node_modules/.bin command (no remote fallback)",examples:[["vis exec eslint .","Run local eslint"],["vis exec tsc --noEmit","Run local TypeScript check"],["vis exec -r -- eslint .","Run in all workspace packages"],["vis exec -c 'echo $PATH'","Shell mode"]],group:"Run & Execute",loader:JB(()=>import("./handler11.js"),"loader"),name:"exec",options:[{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"r",defaultValue:!1,description:"Run in every workspace package",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Run on workspace root only",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter packages by name pattern",multiple:!0,name:"filter",type:String},{defaultValue:!1,description:"Run concurrently without topological ordering",name:"parallel",type:Boolean},{defaultValue:!1,description:"Reverse topological execution order",name:"reverse",type:Boolean}]};var YB=Object.defineProperty,XB=f((e,t)=>YB(e,"name",{value:t,configurable:!0}),"e$G");const QB={argument:{description:"Template name (or remote source like git://… or npm://…) — omit for interactive picker",name:"template",type:String},description:"Scaffold files from an in-repo template",examples:[["vis generate","Pick a template interactively"],["vis generate package","Run the 'package' template"],["vis generate component -- --name=Button --style=primary","Pre-fill option values"],["vis generate package --to=./packages/new --force","Custom destination + overwrite"],["vis generate package --dry-run","Print planned writes without touching disk"],["vis generate git://github.com/org/template#main","Fetch and run a remote template"],["vis generate --list","Show discovered templates"],["vis generate --list --json","Machine-readable template list"],["vis generate package --describe --json","Print template metadata (variables, destination) as JSON"]],group:"Scaffold & Config",loader:XB(()=>import("./handler36.js"),"loader"),name:"generate",options:[{defaultValue:!1,description:"List discovered templates",name:"list",type:Boolean},{defaultValue:!1,description:"Print template metadata (about, destination, variables) without running produce",name:"describe",type:Boolean},{defaultValue:!1,description:"Emit JSON output (with --list or --describe)",name:"json",type:Boolean},{description:"Destination directory",name:"to",type:String},{defaultValue:!1,description:"Print planned writes without touching disk",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Overwrite existing files without prompting",name:"force",type:Boolean},{defaultValue:!1,description:"Skip prompts; use template defaults",name:"defaults",type:Boolean},{defaultValue:!1,description:"Skip running post-generation scripts",name:"skip-scripts",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts (errors on missing required values)",name:"no-interactive",type:Boolean},{defaultValue:!1,description:"Prefer locally cached remote templates over re-downloading",name:"prefer-offline",type:Boolean}]};var ZB=Object.defineProperty,eT=f((e,t)=>ZB(e,"name",{value:t,configurable:!0}),"t$t");const tT={description:"Visualize the project dependency graph",examples:[["vis graph","Show colored dependency graph (TUI in TTY, ASCII otherwise)"],["vis graph --format=ascii","Force ASCII tree output"],["vis graph --format=dot","Output in Graphviz DOT format"],["vis graph --format=html --output=graph.html","Generate interactive HTML graph"],["vis graph --format=json --output=graph.json","Save JSON graph to file"]],group:"Workspace",loader:eT(()=>import("./handler37.js"),"loader"),name:"graph",options:[{alias:"f",defaultValue:void 0,description:"Output format: tui, ascii, dot, json, html (default: tui in TTY, ascii otherwise)",name:"format",type:String},{alias:"o",description:"Write output to file instead of stdout",name:"output",type:String},{alias:"d",description:"Maximum dependency tree depth for ASCII output (default: unlimited)",name:"depth",type:Number}]},N1=["pre-commit","pre-merge-commit","prepare-commit-msg","commit-msg","post-commit","applypatch-msg","pre-applypatch","post-applypatch","pre-rebase","post-rewrite","post-checkout","post-merge","pre-push","pre-auto-gc"],F1=".vis-hooks",fY=[".pre-commit-config.yaml",".pre-commit-config.yml","prek.toml"],hY={commit:"pre-commit","merge-commit":"pre-merge-commit",push:"pre-push"},mY=new Set(["commit-msg","post-checkout","post-commit","post-merge","post-rewrite","pre-commit","pre-merge-commit","pre-push","pre-rebase","prepare-commit-msg"]),gY=new Set(["commit-msg","post-checkout","post-merge","post-rewrite","pre-rebase","prepare-commit-msg"]),yY=new Set(["fail","script","system"]);var rT=Object.defineProperty,Yn=f((e,t)=>rT(e,"name",{value:t,configurable:!0}),"e$E");const Xn={defaultValue:F1,description:"Custom hooks directory",name:"hooks-dir",type:String},Qn=[{defaultValue:void 0,description:"Set to 0 to disable git hooks, set to 2 for debug output",name:"VIS_GIT_HOOKS",type:String}],nT={commandPath:["hook"],description:"Install git hooks for the workspace (migrates husky / prek on prompt)",env:[...Qn],examples:[["vis hook install","Install git hooks in .vis-hooks/"],["vis hook install --hooks-dir=.githooks","Install hooks in a custom directory"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookInstallExecute})),"loader"),name:"install",options:[Xn]},iT={commandPath:["hook"],description:"Remove git hooks and reset core.hooksPath",env:[...Qn],examples:[["vis hook uninstall","Remove git hooks and reset core.hooksPath"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookUninstallExecute})),"loader"),name:"uninstall",options:[Xn]},sT={commandPath:["hook"],description:"Migrate from husky or prek to vis hooks (auto-detected)",env:[...Qn],examples:[["vis hook migrate","Migrate from husky or prek to vis hooks (auto-detected)"],["vis hook migrate --dry-run","Preview what a migration would write without touching disk"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookMigrateExecute})),"loader"),name:"migrate",options:[Xn,{defaultValue:!1,description:"Preview migrate without writing files",name:"dry-run",type:Boolean}]},oT={commandPath:["hook"],description:"Show configured hooks grouped by stage",env:[...Qn],examples:[["vis hook list","Show configured hooks grouped by stage"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookListExecute})),"loader"),name:"list",options:[Xn]},aT={commandPath:["hook"],description:"Sanity-check installed hooks and the bundled runner",env:[...Qn],examples:[["vis hook validate","Sanity-check installed hooks and the bundled runner"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookValidateExecute})),"loader"),name:"validate",options:[Xn]},cT={argument:{description:"Hook stage to run (e.g. pre-commit, commit-msg). Defaults to pre-commit.",name:"stage",type:String},commandPath:["hook"],description:"Run a specific hook stage against tracked files",env:[...Qn],examples:[["vis hook run pre-commit --all-files","Run the pre-commit hooks against every tracked file"],["vis hook run pre-commit --from-ref=main --to-ref=HEAD","Run pre-commit hooks on files changed between two refs"],["vis hook run pre-commit --last-commit","Shortcut for --from-ref HEAD~1 --to-ref HEAD"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookRunExecute})),"loader"),name:"run",options:[Xn,{defaultValue:!1,description:"Run against every tracked file",name:"all-files",type:Boolean},{defaultValue:void 0,description:"Include files changed since this ref",name:"from-ref",type:String},{defaultValue:void 0,description:"Include files changed up to this ref",name:"to-ref",type:String},{defaultValue:!1,description:"Shortcut for --from-ref HEAD~1 --to-ref HEAD",name:"last-commit",type:Boolean}]},lT={argument:{description:"Target to add (currently: `secrets`)",name:"target",type:String},commandPath:["hook"],description:"Add a managed hook snippet (e.g. `vis secrets --staged`)",env:[...Qn],examples:[["vis hook add secrets","Add a pre-commit hook that runs `vis secrets --staged`"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookAddExecute})),"loader"),name:"add",options:[Xn]},uT=[nT,iT,sT,oT,aT,cT,lT];var pT=Object.defineProperty,dT=f((e,t)=>pT(e,"name",{value:t,configurable:!0}),"e$D");const fT={argument:{description:"Project name to check (required)",name:"project",type:String},description:'Exit with inverted codes for CI "Ignored Build Step" gating (Vercel/Netlify)',examples:[["vis ignore my-app","Check if my-app is affected and decide whether to build"],["vis ignore my-app --base $VERCEL_GIT_PREVIOUS_SHA","Explicit base ref"],["vis ignore my-app --json","Emit the decision as JSON instead of text"],["vis ignore my-app --verbose","Print debug info about the decision path"],["vis ignore my-app --exit-zero-on-build","Normal exit semantics (0=build, 0=skip)"]],group:"Run & Execute",loader:dT(()=>import("./handler31.js"),"loader"),name:"ignore",options:[{description:"Git base ref for comparison. Defaults to CI provider env vars, then HEAD~1.",name:"base",type:String},{defaultValue:"HEAD",description:"Git head ref for comparison",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep"',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep"',name:"upstream",type:String},{defaultValue:!1,description:"Emit the decision as JSON on stdout instead of human text",name:"json",type:Boolean},{defaultValue:!1,description:"Exit 0 on build (normal semantics) instead of 1 (inverted Vercel/Netlify semantics)",name:"exit-zero-on-build",type:Boolean},{defaultValue:!1,description:"Enable verbose debug output",name:"verbose",type:Boolean}]};var hT=Object.defineProperty,mT=f((e,t)=>hT(e,"name",{value:t,configurable:!0}),"e$C");const gT={description:"Remove vis from the system (self-uninstall)",examples:[["vis implode","Interactive uninstall"],["vis implode --yes","Non-interactive uninstall (CI)"]],group:"System",loader:mT(()=>import("./handler12.js"),"loader"),name:"implode",options:[{alias:"y",defaultValue:!1,description:"Skip confirmation prompt",name:"yes",type:Boolean}]};var yT=Object.defineProperty,vT=f((e,t)=>yT(e,"name",{value:t,configurable:!0}),"e$B");const bT={alias:"view",argument:{description:"Package name followed by optional metadata fields (e.g. 'react version dependencies')",name:"args",type:String},description:"Show npm registry metadata for a package (alias of `npm view` / `pnpm view` / `yarn info` / `bun pm view`)",examples:[["vis info react","Full registry metadata for react"],["vis info react version","Latest version only"],["vis info react versions","All published versions"],["vis info react@18 dependencies","Dependencies of react@18"],["vis info react --json","Emit JSON"],["vis view react","Alias matching npm/pnpm"]],group:"Dependencies",loader:vT(()=>import("./handler13.js"),"loader"),name:"info",options:[{defaultValue:!1,description:"Output as JSON",name:"json",type:Boolean}]};var $T=Object.defineProperty,wT=f((e,t)=>$T(e,"name",{value:t,configurable:!0}),"e$A");const kT={description:"Initialize vis.config.ts with best-practice security defaults",examples:[["vis init","Interactive setup wizard"],["vis init --no-interactive","Create minimal config without prompts"],["vis init --force","Overwrite existing config"],["vis init --sync-native","Also sync to native PM config files"]],group:"Scaffold & Config",loader:wT(()=>import("./handler14.js"),"loader"),name:"init",options:[{defaultValue:!1,description:"Overwrite existing config file",name:"force",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts",name:"no-interactive",type:Boolean},{defaultValue:!1,description:"Sync settings to native PM config files",name:"sync-native",type:Boolean}]};var ST=Object.defineProperty,DT=f((e,t)=>ST(e,"name",{value:t,configurable:!0}),"e$z");const CT={alias:"i",description:"Install dependencies using the detected package manager",examples:[["vis install","Install all dependencies (frozen-lockfile by default when a lockfile is present)"],["vis i --no-frozen-lockfile","Allow lockfile updates (escape hatch for the default)"],["vis install --ci","Clean install: wipe node_modules + frozen lockfile (mirrors npm ci / pnpm ci)"],["vis install --prefer-offline","Use cached packages when available, fall back to network"],["vis install --prod","Install production dependencies only"],["vis install --filter app","Install for specific workspace package"],["vis install --run-scripts","Run lifecycle scripts (opts out of vis's default block-by-default policy; allowlisted packages run via security.allowBuilds)"],["vis install --no-typosquat-check","Skip typosquat name check"],["vis install --installer aube","Force aube as the installer (errors if not on PATH)"],["vis install --no-aube","Bypass aube; use the lockfile-detected PM"]],group:"Dependencies",loader:DT(()=>import("./handler15.js"),"loader"),name:"install",options:[{alias:"P",conflicts:"dev",description:"Skip devDependencies",name:"prod",type:Boolean},{alias:"D",conflicts:"prod",description:"Install devDependencies only",name:"dev",type:Boolean},{defaultValue:!1,description:"Use frozen lockfile (CI mode, maps to npm ci)",name:"frozen-lockfile",type:Boolean},{defaultValue:!1,description:"Opt out of vis's default frozen-lockfile behavior and allow lockfile updates",name:"no-frozen-lockfile",type:Boolean},{defaultValue:!1,description:"Clean install: wipe node_modules then install with frozen lockfile",name:"ci",type:Boolean},{alias:"f",defaultValue:!1,description:"Force reinstall all dependencies",name:"force",type:Boolean},{defaultValue:!1,description:"Run lifecycle scripts (opts out of vis's default block-by-default policy; allowlisted packages run via security.allowBuilds)",name:"run-scripts",type:Boolean},{defaultValue:!1,description:"Update lockfile without installing",name:"lockfile-only",type:Boolean},{defaultValue:!1,description:"Skip optional dependencies",name:"no-optional",type:Boolean},{defaultValue:!1,description:"Use only cached packages",name:"offline",type:Boolean},{defaultValue:!1,description:"Prefer cached packages, fall back to network when missing",name:"prefer-offline",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output",name:"silent",type:Boolean},{alias:"r",defaultValue:!1,description:"Install in all workspace packages",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Target workspace root",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String},{defaultValue:!1,description:"Skip typosquat name check",name:"no-typosquat-check",type:Boolean},{description:"Pick the installer explicitly. One of: auto, aube, pnpm, npm, yarn, bun. Overrides VIS_INSTALLER and install.backend in vis.config.",name:"installer",type:String},{defaultValue:!1,description:"Skip aube and use the lockfile-detected PM. Wins over --installer / VIS_INSTALLER / install.backend.",name:"no-aube",type:Boolean}]};var ET=Object.defineProperty,AT=f((e,t)=>ET(e,"name",{value:t,configurable:!0}),"e$y");const jT={alias:"ln",argument:{description:"Package name or directory path to link (omit to register current package)",name:"target",type:String},description:"Link a local package for development",examples:[["vis link ./packages/utils","Link local directory package (works on all PMs)"],["vis link","Register current package globally (pnpm <=10, yarn, npm, bun)"],["vis link react","Link global package into current project (pnpm <=10, yarn, npm, bun)"]],group:"Dependencies",loader:AT(()=>import("./handler16.js"),"loader"),name:"link"};var OT=Object.defineProperty,xT=f((e,t)=>OT(e,"name",{value:t,configurable:!0}),"e$x");const PT={description:"Lint workspace dependency policies (workspace-protocol, banned-deps, redefine-root, workspace-versions, custom-types, empty-deps, root-private, root-package-manager, root-deps, missing-package-json, dead-workspace-patterns, types-in-deps, similar-deps)",examples:[["vis lint","Run every enabled lint and exit non-zero on failures"],["vis lint --workspace-protocol","Only check that internal deps use workspace:*"],["vis lint --workspace-protocol --fix","Auto-rewrite internal deps to use workspace:*"],["vis lint --redefine-root","Flag deps duplicated between root and child packages"],["vis lint --banned-deps","Flag deps matching policy.bannedDeps in vis config"],["vis lint --workspace-versions","Flag external deps declared at different versions across packages"],["vis lint --workspace-versions --fix","Rewrite drifting deps to the highest sibling version"],["vis lint --workspace-versions --dep react","Limit version-drift check to a single dep"],["vis lint --workspace-versions --resolve catalog --fix","Rewrite drifting deps to catalog: when a catalog already pins them"],["vis lint --workspace-versions --resolve catalog --propose-min 3","Suggest new catalog entries for deps ≥3 packages already agree on"],["vis lint --custom-types","Flag drift in engines.{node,pnpm}, packageManager, volta.{node,pnpm,yarn}, devEngines"],["vis lint --custom-types --fix","Align all engines/packageManager/volta versions to the highest sibling"],["vis lint --empty-deps --fix","Drop empty `dependencies` / `devDependencies` / etc. blocks across the workspace"],["vis lint --root-private --fix",'Ensure the workspace root package.json has "private": true'],["vis lint --root-package-manager","Ensure the root package.json declares a `packageManager` field"],["vis lint --root-deps --fix","Move runtime deps off the private workspace root into devDependencies"],["vis lint --missing-package-json","Flag workspace dirs that don't contain a package.json"],["vis lint --dead-workspace-patterns --fix","Drop workspace patterns that match zero packages"],["vis lint --types-in-deps --fix","Move @types/* out of dependencies on private packages"],["vis lint --similar-deps","Flag drift across related dep families (react+react-dom, @babel/*, …)"],["vis lint --ban left-pad --ban request","One-off ban: flag any package declaring left-pad or request"],["vis lint --pin react@18.2.0","One-off pin: flag any package declaring react at a different version"],["vis lint --format json","Emit findings as JSON for CI / editor integrations"]],group:"Security & Health",loader:xT(()=>import("./handler44.js"),"loader"),name:"lint",options:[{defaultValue:!1,description:"Lint that internal deps use the workspace: protocol",name:"workspace-protocol",type:Boolean},{defaultValue:!1,description:"Lint that no child re-declares a dep already pinned in the workspace root",name:"redefine-root",type:Boolean},{defaultValue:!1,description:"Lint deps against policy.bannedDeps in vis config",name:"banned-deps",type:Boolean},{defaultValue:!1,description:"Lint that all packages declare external deps at the same version",name:"workspace-versions",type:Boolean},{defaultValue:!1,description:"Lint engines.{node,pnpm}, packageManager, volta.*, devEngines.* for drift across packages",name:"custom-types",type:Boolean},{defaultValue:!1,description:"Flag empty dependency blocks (`dependencies: {}`, `devDependencies: {}`, …) across the workspace",name:"empty-deps",type:Boolean},{defaultValue:!1,description:'Ensure the workspace root package.json sets `"private": true`',name:"root-private",type:Boolean},{defaultValue:!1,description:"Ensure the workspace root package.json declares a `packageManager` field",name:"root-package-manager",type:Boolean},{defaultValue:!1,description:"Flag runtime dependencies on the private workspace root (move them to devDependencies)",name:"root-deps",type:Boolean},{defaultValue:!1,description:"Flag workspace directories that lack a package.json",name:"missing-package-json",type:Boolean},{defaultValue:!1,description:"Flag workspace patterns (in `pnpm-workspace.yaml` / `package.json#workspaces`) that match zero packages",name:"dead-workspace-patterns",type:Boolean},{defaultValue:!1,description:"Flag `@types/*` declared in `dependencies` on a private package (should be in devDependencies)",name:"types-in-deps",type:Boolean},{defaultValue:!1,description:"Flag version drift across related dep families (react+react-dom, @babel/*, @storybook/*, …)",name:"similar-deps",type:Boolean},{description:"Restrict --workspace-versions to a single dep",name:"dep",type:String},{description:"Ban a dep name or glob for this run (repeatable). Auto-enables --banned-deps.",multiple:!0,name:"ban",type:String},{description:"Pin a dep to an exact specifier for this run, e.g. react@^18.2.0 (repeatable). Auto-enables --workspace-versions.",multiple:!0,name:"pin",type:String},{description:"Conflict resolution for --workspace-versions: highest, lowest, or catalog (default: highest)",name:"resolve",type:String},{description:"Propose catalog entries for deps ≥N packages already agree on. Activates with --resolve catalog.",name:"propose-min",type:Number},{defaultValue:!1,description:"Auto-fix violations in place (writes package.json files)",name:"fix",type:Boolean},{description:"Specifier used by --fix for workspace-protocol (default: workspace:*)",name:"fix-specifier",type:String},{description:"Output format: human, json, or minimal (default: human)",name:"format",type:String},{defaultValue:!1,description:"Suppress all output except errors",name:"quiet",type:Boolean}]};var NT=Object.defineProperty,FT=f((e,t)=>NT(e,"name",{value:t,configurable:!0}),"e$w");const RT={description:"List all workspace projects with metadata",examples:[["vis list","Show all projects"],["vis list --targets","Per-target rows with type, cache status and description"],["vis list --targets --inferred","Only show targets synthesized by Project Crystal-style inference"],["vis list --deps","Human-readable table of every dep-instance across the workspace"],["vis list --deps --internal-only","Only workspace deps in human form"],["vis list --deps --format=ndjson","Stream every dep-instance as NDJSON for jq pipelines"],["vis list --deps --format=json --pretty","Single pretty-printed JSON array of dep-instances"],["vis list --format=json","Machine-readable project listing"],['vis list --query "tag=frontend"',"Filter by query"]],group:"Workspace",loader:FT(()=>import("./handler32.js"),"loader"),name:"list",options:[{defaultValue:!1,description:"Filter target rows to only inferred targets (implies --targets)",name:"inferred",type:Boolean},{description:"Output format: table (default), json (single document), or ndjson (one record per line; --deps only)",name:"format",type:String},{defaultValue:!1,description:"Pretty-print with 2-space indent (only meaningful with --format=json)",name:"pretty",type:Boolean},{description:"Filter projects by query",name:"query",type:String},{defaultValue:!1,description:"Show per-target rows (type, cache, description)",name:"targets",type:Boolean},{defaultValue:!1,description:"Render a dep-instance view (table by default; use --format=ndjson|json for jq-friendly streams)",name:"deps",type:Boolean},{description:"Restrict --deps to specific dep blocks (repeatable)",multiple:!0,name:"dep-type",type:String},{defaultValue:!1,description:"With --deps: only show internal/workspace deps",name:"internal-only",type:Boolean},{defaultValue:!1,description:"With --deps: only show external/registry deps",name:"external-only",type:Boolean},{description:"With --deps: glob of declaring package names to keep (repeatable)",multiple:!0,name:"include",type:String},{description:"With --deps: glob of declaring package names to drop (repeatable)",multiple:!0,name:"exclude",type:String}]};var LT=Object.defineProperty,Mt=f((e,t)=>LT(e,"name",{value:t,configurable:!0}),"t$n");const Qt=[{defaultValue:!1,description:"Preview changes without applying",name:"dry-run",type:Boolean},{alias:"y",defaultValue:!1,description:"Skip the confirmation prompt",name:"yes",type:Boolean}],BT={commandPath:["migrate"],description:"Migrate dependencies and scripts to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateDepsExecute})),"loader"),name:"deps",options:[...Qt]},TT={commandPath:["migrate"],description:"Inline lint-staged configuration into vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateLintStagedExecute})),"loader"),name:"lint-staged",options:[...Qt]},IT={commandPath:["migrate"],description:"Inline nano-staged configuration into vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateNanoStagedExecute})),"loader"),name:"nano-staged",options:[...Qt]},_T={commandPath:["migrate"],description:"Migrate turborepo tasks/config to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateTurborepoExecute})),"loader"),name:"turborepo",options:[...Qt]},MT={commandPath:["migrate"],description:"Migrate nx targets/config to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateNxExecute})),"loader"),name:"nx",options:[...Qt,{defaultValue:!1,description:"Overwrite an existing vis.config.ts (a .bak is taken first)",name:"force",type:Boolean}]},VT={commandPath:["migrate"],description:"Migrate moon tasks/templates to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateMoonExecute})),"loader"),name:"moon",options:[...Qt,{defaultValue:!1,description:"Copy .moon/templates/* into .vis/templates/* so `vis generate` works without .moon/",name:"copy-templates",type:Boolean}]},WT={commandPath:["migrate"],description:"Migrate gitleaks config/baseline/hooks to `vis secrets`",examples:[["vis migrate gitleaks","Migrate gitleaks config/baseline/hooks to `vis secrets`"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateGitleaksExecute})),"loader"),name:"gitleaks",options:[...Qt]},UT={commandPath:["migrate"],description:"Migrate Kingfisher baseline/hooks/scripts to `vis secrets`",examples:[["vis migrate kingfisher","Migrate Kingfisher baseline/hooks/scripts to `vis secrets`"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateKingfisherExecute})),"loader"),name:"kingfisher",options:[...Qt]},GT={commandPath:["migrate"],description:"Replace secretlint with `vis secrets`",examples:[["vis migrate secretlint","Replace secretlint with `vis secrets`"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateSecretlintExecute})),"loader"),name:"secretlint",options:[...Qt]},qT={commandPath:["migrate"],description:"Translate syncpack customTypes into vis policy and strip the syncpack dep/scripts",examples:[["vis migrate syncpack","Translate syncpack customTypes into vis policy and strip the syncpack dep/scripts"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateSyncpackExecute})),"loader"),name:"syncpack",options:[...Qt]},zT={commandPath:["migrate"],description:"Strip sherif config/dep/scripts and surface ignore-rules as a positive `vis lint --<rule>` command",examples:[["vis migrate sherif","Strip sherif config/dep/scripts and surface ignore-rules as a positive `vis lint --<rule>` command"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateSherifExecute})),"loader"),name:"sherif",options:[...Qt]},HT={commandPath:["migrate"],description:"Audit the workspace for stray gitleaks/secretlint/sherif/syncpack references (exit 1 on issues)",examples:[["vis migrate verify","Audit the workspace for stray gitleaks/secretlint/sherif/syncpack references (exit 1 on issues)"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateVerifyExecute})),"loader"),name:"verify",options:[]},JT=[BT,TT,IT,_T,MT,VT,WT,UT,GT,qT,zT,HT];var KT=Object.defineProperty,YT=f((e,t)=>KT(e,"name",{value:t,configurable:!0}),"r$t");const XT=new Set(["--cwd"]),QT=new Set(["--help","--version","-h","-V"]),ZT=YT(e=>{const t=[];for(let r=0;r<e.length;r+=1){const n=e[r];if(n!==void 0){if(QT.has(n))return!1;if(n.startsWith("-")){const i=n.indexOf("="),s=i===-1?n:n.slice(0,i);if(XT.has(s)&&i===-1){const o=e[r+1];o!==void 0&&!o.startsWith("-")&&(r+=1)}continue}t.push(n)}}return t.length===1&&t[0]==="migrate"},"isBareMigrateInvocation");var e3=Object.defineProperty,t3=f((e,t)=>e3(e,"name",{value:t,configurable:!0}),"t$m");const Um=t3(e=>e in al&&al[e]!=="0"&&al[e]!=="false","check"),Zr=Um("CI")||Um("CONTINUOUS_INTEGRATION");var r3=Object.defineProperty,zl=f((e,t)=>r3(e,"name",{value:t,configurable:!0}),"i$h");class n3{static{f(this,"MigrateStore")}static{zl(this,"MigrateStore")}#e;#r=new Set;constructor(t){this.#e={applyProgress:null,checkedItems:new Set(t.map(r=>r.entry.id)),error:null,focusedPanel:"list",items:t,phase:"browsing",selectedIndex:0}}getSnapshot=zl(()=>this.#e,"getSnapshot");subscribe=zl(t=>(this.#r.add(t),()=>{this.#r.delete(t)}),"subscribe");getCheckedItems(){return this.#e.items.filter(t=>this.#e.checkedItems.has(t.entry.id))}getSelectedItem(){return this.#e.items[this.#e.selectedIndex]??null}setSelectedIndex(t){const r=Math.max(0,Math.min(t,this.#e.items.length-1));r!==this.#e.selectedIndex&&this.#t({...this.#e,selectedIndex:r})}setFocusedPanel(t){t!==this.#e.focusedPanel&&this.#t({...this.#e,focusedPanel:t})}toggleCheck(t){const r=new Set(this.#e.checkedItems);r.has(t)?r.delete(t):r.add(t),this.#t({...this.#e,checkedItems:r})}checkAll(){this.#t({...this.#e,checkedItems:new Set(this.#e.items.map(t=>t.entry.id))})}uncheckAll(){this.#t({...this.#e,checkedItems:new Set})}toggleAll(){this.#e.checkedItems.size===this.#e.items.length?this.uncheckAll():this.checkAll()}startApply(){const t=this.getCheckedItems().length;this.#t({...this.#e,applyProgress:{current:0,total:t},phase:"applying"})}updateApplyProgress(t){this.#e.applyProgress&&this.#t({...this.#e,applyProgress:{...this.#e.applyProgress,current:t}})}markDone(){this.#t({...this.#e,phase:"done"})}setError(t){this.#t({...this.#e,error:t,phase:"error"})}#t(t){this.#e=t;for(const r of this.#r)try{r()}catch{}}}var i3=Object.defineProperty,s3=f((e,t)=>i3(e,"name",{value:t,configurable:!0}),"f$b");const Gm=s3(({autoExitSeconds:e,onCancel:t,visible:r})=>{const{exit:n}=pv(),[i,s]=Es(e||3),o=Is(null),a=Is(0);lv(()=>{if(!r)return;const l=e||3;s(l),a.current=Date.now();let u=l;return o.current=setInterval(()=>{u-=1,u<=0?(o.current&&(clearInterval(o.current),o.current=null),s(0),n()):s(u)},1e3),()=>{o.current&&(clearInterval(o.current),o.current=null)}},[r,e,n]);const c=uv(()=>{o.current&&(clearInterval(o.current),o.current=null),t()},[t]);return dv((l,u)=>{Date.now()-a.current<200||(l==="q"?n():c())},{isActive:r}),z(Ku,{backgroundColor:"#1e1e1e",footer:pe(H,{dimColor:!0,children:["Press"," ",z(H,{bold:!0,color:"white",children:"q"})," ","to exit,"," ",z(H,{bold:!0,color:"white",children:"any key"})," ","to stay"]}),title:`Exiting in ${i}…`,visible:r,width:50,children:z(H,{dimColor:!0,children:"Stay to explore the results interactively."})})},"QuitDialog");var o3=Object.defineProperty,R1=f((e,t)=>o3(e,"name",{value:t,configurable:!0}),"n$j");const a3=R1(e=>{if(e.startsWith("⚠"))return"yellow";e.startsWith("── ")||e.startsWith("[dry-run]")},"colorForPreviewLine"),c3=R1(({focused:e,item:t,scrollRef:r})=>t?pe(he,{borderColor:e?"white":"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,children:[z(he,{flexShrink:0,paddingTop:1,paddingX:2,children:z(H,{bold:!0,color:"white",children:t.entry.title})}),z(he,{flexShrink:0,paddingBottom:1,paddingX:2,children:z(H,{dimColor:!0,children:t.entry.description})}),z(OS,{flexGrow:1,flexShrink:1,paddingX:2,ref:r,scrollbar:!0,scrollbarColor:"gray",scrollbarStyle:"block",children:pe(he,{flexDirection:"column",children:[z(H,{dimColor:!0,children:"── What will change ──"}),z(H,{}),t.preview.length===0&&z(H,{dimColor:!0,children:"(no preview available)"}),t.preview.map((i,s)=>{const o=a3(i);return i===""?z(H,{},`blank-${String(s)}`):z(H,{color:o,children:i},`${String(s)}-${i.slice(0,20)}`)})]})})]}):z(he,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:z(H,{dimColor:!0,children:"No migration selected"})}),"MigrateDetailPanel");var l3=Object.defineProperty,L1=f((e,t)=>l3(e,"name",{value:t,configurable:!0}),"g$9");const u3=L1(({checked:e,isSelected:t,item:r})=>{const n=e?"☑":"☐",i=r.preview.length;return pe(he,{flexShrink:0,height:1,children:[z(H,{children:t?">":" "}),pe(H,{color:e?"white":"gray",children:[" ",n," "]}),z(he,{flexGrow:1,children:z(H,{bold:t,inverse:t,wrap:"truncate",children:r.entry.title})}),pe(H,{dimColor:!0,children:[" ",i," ","change",i===1?"":"s"," "]})]})},"MigrationRow"),p3=L1(({checkedItems:e,focused:t,isDryRun:r,items:n,scrollOffset:i,selectedIndex:s,viewportHeight:o})=>{const a=t?"white":"gray",c=n.filter(p=>e.has(p.entry.id)).length,l=n.map((p,h)=>z(u3,{checked:e.has(p.entry.id),isSelected:h===s,item:p},p.entry.id)),u=n.length,d=u>o&&o>0;return pe(he,{borderColor:a,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[pe(he,{flexShrink:0,gap:1,paddingX:1,children:[z(H,{bold:!0,inverse:!0,children:" MIGRATE "}),pe(H,{wrap:"truncate",children:[n.length," ","applicable"]}),c>0&&pe(H,{dimColor:!0,children:[" — ",c," selected"]}),r&&z(H,{color:"yellow",children:" (dry-run)"})]}),pe(he,{flexDirection:"row",flexGrow:1,overflow:"hidden",children:[z(he,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:z(he,{flexDirection:"column",marginTop:-i,children:l})}),d&&z(he,{flexShrink:0,marginLeft:1,marginRight:1,children:z(xS,{contentHeight:u,placement:"inset",scrollOffset:i,style:"block",viewportHeight:o})})]})]})},"MigrateListPanel");var d3=Object.defineProperty,f3=f((e,t)=>d3(e,"name",{value:t,configurable:!0}),"N$e");const h3=100,m3=40,g3=10,y3=f3(({autoExitSeconds:e=0,isDryRun:t,store:r})=>{const{exit:n}=pv(),{columns:i,rows:s}=jS(),o=AS(r.subscribe,r.getSnapshot),[a,c]=Es(!1),[l,u]=Es(!1),[d,p]=Es(!1),[h,y]=Es(0),$=Is(null),S=Is(null),k=Is(null),b=o.items[o.selectedIndex]??null,m=Math.max(1,s-6),v=uv(Y=>{y(P=>Y>=P+m?Math.max(0,Y-m+1):Y<P?Math.max(0,Y):P)},[m]);if(lv(()=>{S.current?.scrollToTop()},[b?.entry.id]),dv((Y,P)=>{if(Y==="c"&&P.ctrl){n();return}if(!d){if(l){Y==="u"||P.return?(u(!1),r.startApply(),n(r.getCheckedItems())):P.escape||Y==="q"?u(!1):P.downArrow||Y==="j"?k.current?.scrollBy(1):(P.upArrow||Y==="k")&&k.current?.scrollBy(-1);return}if(a){P.escape||Y==="?"?c(!1):Y==="q"?(c(!1),p(!0)):P.downArrow||Y==="j"?$.current?.scrollBy(1):(P.upArrow||Y==="k")&&$.current?.scrollBy(-1);return}if(Y==="?"){c(!0);return}if(Y==="q"){p(!0);return}if(P.tab){r.setFocusedPanel(o.focusedPanel==="list"?"detail":"list");return}if(o.focusedPanel==="list"){if(P.downArrow||Y==="j"){const N=Math.min(o.selectedIndex+1,o.items.length-1);r.setSelectedIndex(N),v(N);return}if(P.upArrow||Y==="k"){const N=Math.max(o.selectedIndex-1,0);r.setSelectedIndex(N),v(N);return}if(P.pageDown){const N=Math.min(o.selectedIndex+10,o.items.length-1);r.setSelectedIndex(N),v(N);return}if(P.pageUp){const N=Math.max(o.selectedIndex-10,0);r.setSelectedIndex(N),v(N);return}if(P.home){r.setSelectedIndex(0),y(0);return}if(P.end){const N=o.items.length-1;r.setSelectedIndex(N),v(N);return}if(Y===" "||P.return){b&&r.toggleCheck(b.entry.id);return}if(Y==="a"){r.toggleAll();return}if(Y==="u"&&!t&&o.checkedItems.size>0){u(!0);return}P.rightArrow&&r.setFocusedPanel("detail");return}if(o.focusedPanel==="detail"){if(P.escape||P.leftArrow){r.setFocusedPanel("list");return}if(P.downArrow||Y==="j"){S.current?.scrollBy(1);return}if(P.upArrow||Y==="k"){S.current?.scrollBy(-1);return}if(P.pageDown){S.current?.scrollBy(10);return}if(P.pageUp){S.current?.scrollBy(-10);return}if(P.home){S.current?.scrollToTop();return}P.end&&S.current?.scrollToBottom()}}},{isActive:!0}),i<m3||s<g3)return z(he,{alignItems:"center",height:s,justifyContent:"center",width:i,children:pe(H,{color:"yellow",children:["Terminal too small (",i,"x",s,")"]})});const w=i>=h3,g=[pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"q"}),z(H,{dimColor:!0,children:"QUIT"})]},"q"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"?"}),z(H,{dimColor:!0,children:"HELP"})]},"?"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"↑↓"}),z(H,{dimColor:!0,children:"NAV"})]},"nav"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"Space"}),z(H,{dimColor:!0,children:"CHECK"})]},"sp"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"a"}),z(H,{dimColor:!0,children:"ALL"})]},"a")];!t&&o.checkedItems.size>0&&g.push(pe(he,{gap:1,children:[z(H,{bold:!0,color:"green",children:"u"}),z(H,{dimColor:!0,children:"APPLY"})]},"u")),g.push(pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"Tab"}),z(H,{dimColor:!0,children:"PANEL"})]},"tab"));const C=z(he,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:z(he,{flexWrap:"wrap",gap:2,paddingX:1,children:g})}),D=pe(Ku,{footer:pe(H,{dimColor:!0,children:[z(H,{bold:!0,color:"white",children:"↑↓"})," scroll ",z(H,{bold:!0,color:"white",children:"?"}),"/",z(H,{bold:!0,color:"white",children:"Esc"})," close"]}),scrollRef:$,title:"KEYBOARD SHORTCUTS",visible:a,width:52,children:[pe(he,{flexDirection:"column",marginBottom:1,children:[z(H,{bold:!0,color:"white",children:"NAVIGATION"}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" ↑/k"}),z(H,{dimColor:!0,children:" Move up"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" ↓/j"}),z(H,{dimColor:!0,children:" Move down"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" Tab"}),z(H,{dimColor:!0,children:" Switch panel"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" →/←"}),z(H,{dimColor:!0,children:" Focus detail/list"})]})]}),pe(he,{flexDirection:"column",marginBottom:1,children:[z(H,{bold:!0,color:"white",children:"SELECTION"}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" Space"}),z(H,{dimColor:!0,children:" Toggle migration"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" a"}),z(H,{dimColor:!0,children:" Toggle all"})]})]}),pe(he,{flexDirection:"column",children:[z(H,{bold:!0,color:"white",children:"ACTIONS"}),!t&&pe(H,{children:[z(H,{bold:!0,color:"white",children:" u"}),z(H,{dimColor:!0,children:" Apply selected migrations"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" q"}),z(H,{dimColor:!0,children:" Quit"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" ?"}),z(H,{dimColor:!0,children:" Toggle help"})]})]})]}),A=r.getCheckedItems(),O=z(he,{alignItems:"center",flexDirection:"column",children:pe(H,{dimColor:!0,children:["Press ",z(H,{bold:!0,color:"white",children:"u"})," or ",z(H,{bold:!0,color:"white",children:"Enter"})," to confirm, ",z(H,{bold:!0,color:"white",children:"Esc"})," to cancel"]})}),G=z(Ku,{footer:O,scrollRef:k,title:`Apply ${String(A.length)} migration${A.length===1?"":"s"}?`,visible:l,width:70,children:A.map(Y=>pe(he,{gap:1,children:[pe(H,{children:[" ",Y.entry.title]}),pe(H,{dimColor:!0,children:["(",Y.preview.length," ","change",Y.preview.length===1?"":"s",")"]})]},Y.entry.id))}),W=z(p3,{checkedItems:o.checkedItems,focused:o.focusedPanel==="list",isDryRun:t,items:o.items,scrollOffset:h,selectedIndex:o.selectedIndex,viewportHeight:m}),ce=z(c3,{focused:o.focusedPanel==="detail",item:b,scrollRef:S});if(w){const Y=Math.floor(i*.55);return pe(he,{flexDirection:"column",height:s,width:i,children:[pe(he,{flexDirection:"row",flexGrow:1,children:[z(he,{flexGrow:1,children:W}),z(he,{width:Y,children:ce})]}),C,G,z(Gm,{autoExitSeconds:e||3,onCancel:f(()=>{p(!1)},"onCancel"),visible:d}),D]})}const te=Math.floor(s*.45);return pe(he,{flexDirection:"column",height:s,width:i,children:[z(he,{height:te,children:W}),z(he,{flexGrow:1,children:ce}),C,G,z(Gm,{autoExitSeconds:e||3,onCancel:f(()=>{p(!1)},"onCancel"),visible:d}),D]})},"VisMigrateApp");var v3=Object.defineProperty,lf=f((e,t)=>v3(e,"name",{value:t,configurable:!0}),"r$r");const b3=/\n([ \t]+)/,$3=lf(e=>{const{indent:t,lineEnding:r}=NS(e),n={};return t!==void 0&&(n.indent=t),(r==="lf"||r==="crlf")&&(n.lineEnding=r),n},"resolveEditorConfigDefaults"),gr=lf((e,t,r={})=>{const{defaultIndent:n=" ",useEditorconfig:i=!0}=r;if(i){const{indent:s}=$3(e);if(s!==void 0)return s}if(t!==void 0){const s=b3.exec(t);if(s?.[1]!==void 0)return s[1]}return n},"resolveIndentForFile"),uf=lf((e,t={})=>{const r=x(e)?J(e):void 0;return gr(e,r,t)},"resolveIndentForExistingFile");var w3=Object.defineProperty,k3=f((e,t)=>w3(e,"name",{value:t,configurable:!0}),"t$l");const B1=[".lintstagedrc.json",".lintstagedrc"],T1=[".lintstagedrc.yaml",".lintstagedrc.yml",".lintstagedrc.mjs","lint-staged.config.mjs",".lintstagedrc.cjs","lint-staged.config.cjs",".lintstagedrc.js","lint-staged.config.js",".lintstagedrc.ts","lint-staged.config.ts",".lintstagedrc.mts","lint-staged.config.mts",".lintstagedrc.cts","lint-staged.config.cts"],pf=[...B1,...T1],S3=[/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)(pnpm|pnpm exec|npx|yarn|yarn run|npm exec|npm run|bunx|bun run|bun x)\s+lint-staged\b/,/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)lint-staged\b/],I1=[".nano-staged.json",".nanostagedrc"],_1=[".nano-staged.mjs",".nano-staged.cjs",".nano-staged.js","nano-staged.config.mjs","nano-staged.config.cjs","nano-staged.config.js","nano-staged.config.mts","nano-staged.config.cts","nano-staged.config.ts"],df=[...I1,..._1],D3=[/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)(pnpm|pnpm exec|npx|yarn|yarn run|npm exec|npm run|bunx|bun run|bun x)\s+nano-staged\b/,/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)nano-staged\b/],M1=["husky","lint-staged","nano-staged"],C3=/\(is-ci \|\| husky \|\| exit 0\)\s*&&\s*/g,E3=/\bhusky(?:\s+install)?\s*&&\s*/g,A3=/\s*&&\s*husky(?:\s+install)?/g,j3=/\s*\|\|\s*husky(?:\s+install)?/g,O3=[C3,E3,A3,j3],V1=k3(e=>{if(e==="husky"||e==="husky install")return;let t=e;for(const r of O3)t=t.replace(r,"");return t=t.trim(),t===e?e:t||void 0},"cleanHuskyFromScript");var x3=Object.defineProperty,xa=f((e,t)=>x3(e,"name",{value:t,configurable:!0}),"o$p");const P3=/\/$/,N3=xa(e=>{let t='"$0"';for(let r=0;r<e;r+=1)t=`"$(dirname ${t})"`;return t},"nestedDirname"),F3=xa(e=>{const t=e.split("/").filter(r=>r!==""&&r!==".").length+2;return`#!/usr/bin/env sh
|
|
1004
|
+
`),r.postMessage&&(i+=r.postMessage),i},"generateMissingPackagesInstallMessage");var FL=Object.defineProperty,RL=f((e,t)=>FL(e,"name",{value:t,configurable:!0}),"c$v"),LL=Object.defineProperty,D1=RL((e,t)=>LL(e,"name",{value:t,configurable:!0}),"p");const BL=Qe(import.meta.url),bs=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,TL=D1(e=>{if(typeof bs<"u"&&bs.versions&&bs.versions.node){const[t,r]=bs.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return bs.getBuiltinModule(e)}return BL(e)},"__cjs_getBuiltinModule"),{existsSync:ja,readFileSync:C1}=TL("node:fs");var IL=Object.defineProperty,E1=D1((e,t)=>IL(e,"name",{value:t,configurable:!0}),"i");E1(async e=>{const t=await ao(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const n=await lo(t);if(n&&typeof n=="object"&&!Array.isArray(n)){const i=n;if(i.useWorkspaces||i.packages)return{path:Ge(t),strategy:"lerna"}}}const r=t?.endsWith("turbo.json");try{const{packageManager:n,path:i}=await PL(e);if(["npm","yarn"].includes(n)){const s=E(i,"package.json");if(ja(s)&&C1(E(i,"package.json"),"utf8").includes("workspaces"))return{path:i,strategy:r?"turbo":n}}else if(n==="pnpm"){const s=E(i,"pnpm-workspace.yaml");if(ja(s))return{path:i,strategy:r?"turbo":"pnpm"}}}catch(n){if(!(n instanceof Di))throw n}throw new Error(`No monorepo root could be found upwards from the directory ${e} using lerna, yarn, pnpm, or npm as indicators.`)},"findMonorepoRoot");const A1=E1(e=>{const t=co(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const n=Se(t);if(n.useWorkspaces||n.packages)return{path:Ge(t),strategy:"lerna"}}const r=t?.endsWith("turbo.json");try{const{packageManager:n,path:i}=NL(e);if(["npm","yarn"].includes(n)){const s=E(i,"package.json");if(ja(s)&&C1(E(i,"package.json"),"utf8").includes("workspaces"))return{path:i,strategy:r?"turbo":n}}else if(n==="pnpm"){const s=E(i,"pnpm-workspace.yaml");if(ja(s))return{path:i,strategy:r?"turbo":"pnpm"}}}catch(n){if(!(n instanceof Di))throw n}throw new Error(`No monorepo root could be found upwards from the directory ${e} using lerna, yarn, pnpm, or npm as indicators.`)},"findMonorepoRootSync");var _L="1.0.0-alpha.16";const Oa={version:_L};var ML=Object.defineProperty,VL=f((e,t)=>ML(e,"name",{value:t,configurable:!0}),"e$W");const WL={argument:{description:"Target selector (same syntax as `vis run`): `build`, `:build`, `~:test`, `#tag:lint`, …",name:"selector",type:String},description:"Show the execution plan for a target without running it",examples:[["vis action-graph build","Print the task plan for `build` on every project"],["vis action-graph :test","Moon-style selector"],["vis action-graph build --json","Emit a JSON description of the plan"],['vis action-graph lint --query "tag=frontend"',"Filter projects by query"]],group:"Workspace",loader:VL(()=>import("./handler.js"),"loader"),name:"action-graph",options:[{defaultValue:!1,description:"Emit JSON instead of ASCII",name:"json",type:Boolean},{description:"Filter matched projects by a query",name:"query",type:String}]};var UL=Object.defineProperty,GL=f((e,t)=>UL(e,"name",{value:t,configurable:!0}),"e$V");const qL={argument:{description:"Packages to add (e.g., react react-dom)",name:"packages",type:String},description:"Add packages using the detected package manager",examples:[["vis add react react-dom","Add packages"],["vis add -D typescript @types/react","Add as dev dependencies"],["vis add react --filter app","Add to specific workspace package"],["vis add react --to web","Add to one package, auto-conforming the version to existing catalogs / sibling deps"],["vis add -g typescript","Add globally (uses npm)"],["vis add lodash -w","Add to workspace root"],["vis add lodash --no-socket-check","Add without Socket.dev check"],["vis add lodash --no-typosquat-check","Skip typosquat name check"],["vis add lodash --run-scripts","Run lifecycle scripts (opts out of vis's default block-by-default policy)"]],group:"Dependencies",loader:GL(()=>import("./handler28.js"),"loader"),name:"add",options:[{alias:"D",defaultValue:!1,description:"Add as dev dependency",name:"save-dev",type:Boolean},{alias:"E",defaultValue:!1,description:"Save exact version",name:"exact",type:Boolean},{alias:"P",defaultValue:!1,description:"Add as peer dependency",name:"save-peer",type:Boolean},{alias:"O",defaultValue:!1,description:"Add as optional dependency",name:"save-optional",type:Boolean},{alias:"g",defaultValue:!1,description:"Install globally (uses npm)",name:"global",type:Boolean},{alias:"w",defaultValue:!1,description:"Add to workspace root",name:"workspace-root",type:Boolean},{defaultValue:!1,description:"Use workspace protocol (pnpm)",name:"workspace",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String},{description:"Target a single workspace package and auto-conform the version to existing catalogs / sibling deps (syncpack#285)",name:"to",type:String},{defaultValue:!1,description:"Skip typosquat name check before adding",name:"no-typosquat-check",type:Boolean},{defaultValue:!1,description:"Skip Socket.dev security check before adding",name:"no-socket-check",type:Boolean},{defaultValue:!1,description:"Run lifecycle scripts during add (opts out of vis's default block-by-default policy; allowlisted packages run via security.allowBuilds)",name:"run-scripts",type:Boolean},{defaultValue:!1,description:"After adding, recursively install non-optional peer dependencies that aren't already in the workspace (matches nypm's installPeerDependencies)",name:"auto-install-peers",type:Boolean}]};var zL=Object.defineProperty,HL=f((e,t)=>zL(e,"name",{value:t,configurable:!0}),"e$U");const JL={argument:{description:"The target to run (e.g., build, test, lint)",name:"target",type:String},description:"Run a target only on projects affected by recent changes",examples:[["vis affected build","Run build on affected projects"],["vis affected test --base=main","Run tests on projects changed since main"],["vis affected destroy --reverse","Tear down affected projects leaves-first"]],group:"Run & Execute",loader:HL(()=>import("./handler2.js"),"loader"),name:"affected",options:[{defaultValue:"HEAD~1",description:"Git base ref for comparison",name:"base",type:String},{defaultValue:"HEAD",description:"Git head ref for comparison",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep" — controls how far to include dependents of changed projects',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep" — controls how far to include dependencies of changed projects',name:"upstream",type:String},{defaultValue:3,description:"Maximum number of parallel tasks",name:"parallel",type:Number},{defaultValue:!0,description:"Enable caching (use --no-cache to disable)",name:"cache",type:Boolean},{defaultValue:!1,description:"Show what would run without executing",name:"dry-run",type:Boolean},{description:'Partition tasks for distributed CI (e.g., "1/4" for first of four runners). Falls back to VIS_PARTITION env var.',name:"partition",type:String},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String},{defaultValue:!1,description:"Run the dependency graph in reverse (leaves first, then their dependents). Useful for teardown targets like `destroy`/`undeploy` where dependents must run before the things they depend on.",name:"reverse",type:Boolean},{description:"Comma-separated tags this runner advertises (e.g. 'gpu,slow'). Forwarded verbatim to the downstream `vis run` so capability-gated tasks resolve identically. Falls back to VIS_RUNNER_TAGS env var.",name:"runner-tags",type:String}]},j1={description:"Output format: table or json (default: table)",name:"format",type:String},KL={commandPath:["ai"],description:"List detected AI providers and show which one is selected",examples:[["vis ai providers","List all AI providers and their status"],["vis ai providers --format json","Output as JSON"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiProvidersExecute"),name:"providers",options:[j1]},YL={commandPath:["ai"],description:"Test the best available AI provider with a quick prompt",examples:[["vis ai test","Test the selected provider"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiTestExecute"),name:"test",options:[]},XL={argument:{description:"Task ID to propose a fix for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["ai"],description:"Read a failed task's logs and propose a structured patch (Phase 1: local-only, no git)",examples:[["vis ai fix @myorg/app:build","Print proposed patch for the failed task"],["vis ai fix @myorg/app:build --apply","Apply the patch to disk after confirming"],["vis ai fix @myorg/app:build --format json","Machine-readable patch output"],["vis ai fix @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiFixExecute"),name:"fix",options:[j1,{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{defaultValue:!1,description:"Apply the proposed patch to disk after printing it",name:"apply",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt before applying",name:"yes",type:Boolean}]},QL={description:"AI-assisted commands: provider detection and failure-fix proposals (cache management lives under `vis cache`)",examples:[["vis ai","List all AI subcommands"],["vis ai discover-help","Machine-readable subcommand catalogue (for AI agents)"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiRootExecute"),name:"ai",options:[]},ZL={commandPath:["ai"],description:"Print the machine-readable AI subcommand catalogue (JSON to stdout, designed for AI agents)",examples:[["vis ai discover-help","Emit the discovery payload as JSON"],["vis ai discover-help | jq '.subcommands[].path'","List all available paths"]],group:"System",loader:Ve(()=>import("./handler29.js"),"aiDiscoverHelpExecute"),name:"discover-help",options:[]},eB={commandPath:["ai"],description:"Diagnose the most recent failed task and post a structured patch as a PR/MR comment (or Buildkite annotation)",examples:[["vis ai heal","Heal the most recent failure"],["vis ai heal --dry-run","Propose a patch but skip apply / validate / post"],["vis ai heal --run 2026-04-28T...","Heal a specific historical run"]],group:"System",loader:Ve(()=>import("./heal.js").then(e=>e.h),"aiHeal"),name:"heal",options:[{defaultValue:!1,description:"Show the proposal and exit without applying or posting it",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Bypass the AI response cache",name:"no-cache",type:Boolean},{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},tB={commandPath:["ai","heal"],description:"Re-run the proposed fix and commit it to the PR/MR branch when validation passes",examples:[["vis ai heal accept","Triggered automatically by a `/vis heal accept` PR comment (GitHub/GitLab) or a Buildkite block-step unblock"]],group:"System",loader:Ve(()=>import("./heal-accept.js"),"aiHealAccept"),name:"accept",options:[{description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},{description:"Per-task validation timeout in seconds (default: 1800)",name:"validation-timeout",type:Number}]},O1=[QL,ZL,KL,YL,XL,eB,tB],dY=Object.defineProperty({__proto__:null,default:O1},Symbol.toStringTag,{value:"Module"});var rB=Object.defineProperty,nB=f((e,t)=>rB(e,"name",{value:t,configurable:!0}),"e$T");const iB={argument:{description:"Package name to analyze (e.g., react)",name:"package",required:!0,type:String},description:"Analyze a single package update with AI",examples:[["vis analyze react","Analyze updating react to latest"],["vis analyze react 19.0.0","Analyze updating react to specific version"],["vis analyze react --ai-type security","Run security-focused analysis"],["vis analyze react --format json","Output as JSON"]],group:"System",loader:nB(()=>import("./handler3.js"),"loader"),name:"analyze",options:[{description:"AI analysis type: impact, security, compatibility, or recommend (default: impact)",name:"ai-type",type:String},{defaultValue:!1,description:"Check for known security vulnerabilities",name:"security",type:Boolean},{description:"Output format: table or json (default: table)",name:"format",type:String}]};var sB=Object.defineProperty,oB=f((e,t)=>sB(e,"name",{value:t,configurable:!0}),"e$S");const aB={description:"Review and approve dependencies with build scripts",examples:[["vis approve-builds","Scan and list unapproved build scripts"],["vis approve-builds --all","Approve all pending builds (pnpm)"],["vis approve-builds --sync-native","Sync allowBuilds to native PM config"]],group:"Security & Health",loader:oB(()=>import("./handler4.js"),"loader"),name:"approve-builds",options:[{defaultValue:!1,description:"Approve all pending builds without prompting (pnpm only)",name:"all",type:Boolean},{defaultValue:!1,description:"Force vis scanning even for pnpm (instead of delegating)",name:"scan",type:Boolean},{defaultValue:!1,description:"Sync allowBuilds to native PM config (bun: trustedDependencies, npm: .npmrc, yarn: .yarnrc.yml)",name:"sync-native",type:Boolean}]};var cB=Object.defineProperty,lB=f((e,t)=>cB(e,"name",{value:t,configurable:!0}),"e$R");const uB={description:"Audit installed packages for vulnerabilities and supply chain risks",examples:[["vis audit","Full audit of all installed packages"],["vis audit --severity high","Show only high/critical issues"],["vis audit --format json","Output as JSON for CI integration"],["vis audit --fix","Show fix suggestions for vulnerabilities"],["vis audit --exit-code","Exit with code 1 if issues found (for CI)"],["vis audit --show-accepted","Include acknowledged risks in output"],["vis audit --sync","Sync accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)"]],group:"Security & Health",loader:lB(()=>import("./handler30.js"),"loader"),name:"audit",options:[{description:"Minimum severity to report: low, medium, high, critical (default: low)",name:"severity",type:String},{description:"Output format: table or json (default: table)",name:"format",type:String},{defaultValue:!1,description:"Show fix suggestions for vulnerabilities",name:"fix",type:Boolean},{defaultValue:!1,description:"Exit with code 1 if any issues found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Include acknowledged (accepted risk) issues in output",name:"show-accepted",type:Boolean},{defaultValue:!1,description:"Sync vis accepted risks to native PM config (pnpm-workspace.yaml / .yarnrc.yml)",name:"sync",type:Boolean}]},Do={description:"Cache directory (overrides config and default). Relative paths are resolved against the workspace root.",name:"cache-dir",type:String},Dc={description:"Cache scope: 'shared' (default — main worktree's cache), 'worktree' (this checkout's local cache), or 'all' (both)",name:"scope",type:String},x1={description:"Cache type: 'task' (workspace task cache), 'ai' (AI response cache), 'socket' (Socket.dev report cache), or 'all' (default)",name:"type",type:String},pB={commandPath:["cache"],description:"List all cache entries",examples:[["vis cache list","List all cache entries"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheListExecute"),name:"list",options:[Do,Dc,{description:"Output format: table or json (default: table)",name:"format",type:String}]},dB={commandPath:["cache"],description:"Remove cache entries (defaults to all stores: workspace task cache, AI responses, Socket.dev reports)",examples:[["vis cache clean","Remove all cache entries from every store"],["vis cache clean --type=ai","Clear only the AI response cache"],["vis cache clean --type=task","Clear only the workspace task cache"],["vis cache clean --dry-run","Preview what clean would remove"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheCleanExecute"),name:"clean",options:[Do,x1,{defaultValue:!1,description:"Preview without deleting",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Skip the confirmation prompt for out-of-workspace cache directories",name:"force",type:Boolean}]},fB={commandPath:["cache"],description:"Remove old and oversized cache entries",examples:[["vis cache prune","Remove old and oversized entries"],["vis cache prune --max-age-days=3 --max-size=500MB","Prune with custom limits"],["vis cache prune --keep-last=30","Keep only the 30 most recent entries"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cachePruneExecute"),name:"prune",options:[Do,Dc,{description:"Remove entries older than N days",name:"max-age-days",type:Number},{description:"Evict oldest entries until cache is under this size (e.g. 500MB)",name:"max-size",type:String},{description:"Keep only the N most recent entries (sorted newest-first by mtime)",name:"keep-last",type:Number}]},hB={commandPath:["cache"],description:"Print on-disk footprint and stats for one or more cache stores (task / ai / socket)",examples:[["vis cache size","Show stats for every cache store"],["vis cache size --type=ai","Show only the AI response cache (entries, size, oldest, newest)"],["vis cache size --type=task --format=json","Machine-readable task cache size"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheSizeExecute"),name:"size",options:[Do,Dc,x1,{description:"Output format: table or json (default: table)",name:"format",type:String}]},cf={description:"Output format: table or json (default: table)",name:"format",type:String},P1={description:"Use a specific run ID from .vis/runs/ instead of the latest run",name:"run",type:String},mB={argument:{description:"Task ID to explain (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Explain why a task missed the cache by diffing hash inputs against the previous run",examples:[["vis cache why @myorg/app:build","Show which inputs changed since the last run"],["vis cache why @myorg/app:build --json","Machine-readable output for CI"],["vis cache why @myorg/app:build --run 2026-04-28T...","Inspect a specific historical run"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheWhyExecute"),name:"why",options:[cf,P1]},gB={argument:{description:"Task ID to print the hash for (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Print the recorded hash and per-input hash details for a task",examples:[["vis cache hash @myorg/app:build","Show the resolved hash + contributing inputs"],["vis cache hash @myorg/app:build --json","Machine-readable output"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheHashExecute"),name:"hash",options:[cf,P1]},yB={argument:{description:"Task ID to verify (e.g. @my/app:build)",name:"taskId",type:String},commandPath:["cache"],description:"Verify cache restore fidelity: extract the cached entry into a tmp directory and diff each file's content, mode, and mtime against the live workspace. Exits 1 on any drift (changed content, mode, mtime) or if a cached output is missing from the workspace. With --scope=all, the first cache directory containing the task is used.",examples:[["vis cache verify @myorg/app:build","Diff cached outputs vs live workspace files"],["vis cache verify @myorg/app:build --format=json","Machine-readable diff (status: ok | drift)"],["vis cache verify @myorg/app:build --cache-dir=.alt-cache","Verify against a non-default cache directory"],["vis cache verify @myorg/app:build --scope=all","Search shared and worktree caches for the task"]],group:"Workspace",loader:Ve(()=>import("./handler21.js"),"cacheVerifyExecute"),name:"verify",options:[Do,Dc,cf]},vB={commandPath:["cache"],description:"Probe the configured remote cache (HTTP HEAD or REAPI Capabilities) and report reachability, latency, and negotiated capabilities",examples:[["vis cache doctor","Probe the remoteCache configured in vis.config.ts"],["vis cache doctor --url=grpcs://cache.example.com:443 --backend=reapi","Override URL/backend ad-hoc"],["vis cache doctor --json","Machine-readable output"]],group:"Workspace",loader:Ve(()=>import("./doctor-probe.js"),"cacheDoctorExecute"),name:"doctor",options:[{description:"Override remote cache URL (otherwise read from vis.config.ts remoteCache.url)",name:"url",type:String},{description:"Override backend selector: 'http' or 'reapi'",name:"backend",type:String},{description:"Output format: table or json (default: table)",name:"format",type:String},{defaultValue:5e3,description:"Probe timeout in milliseconds (default: 5000)",name:"timeout",type:Number}]},bB=[pB,dB,fB,hB,mB,gB,yB,vB];var $B=Object.defineProperty,wB=f((e,t)=>$B(e,"name",{value:t,configurable:!0}),"e$Q");const kB={alias:["c","outdated"],argument:{description:"Specific packages to check (checks all if omitted)",name:"packages",type:String},description:"Check for outdated dependencies, security vulnerabilities, and supply chain settings",examples:[["vis check","Check all catalog dependencies"],["vis check react","Check specific packages"],["vis check --target minor","Only show minor/patch updates"],["vis check --exclude '@types/*'","Exclude packages by pattern"],["vis check --no-security","Skip vulnerability scanning"],["vis check --security-config","Audit supply chain security settings"],["vis check --security-config --sync","Sync security config to pnpm-workspace.yaml"]],group:"Security & Health",loader:wB(()=>import("./handler5.js"),"loader"),name:"check",options:[{alias:"t",description:"Update target: latest, minor, or patch (default: latest)",name:"target",type:String},{description:"Glob pattern to include packages (repeatable)",lazyMultiple:!0,name:"include",type:String},{description:"Glob pattern to exclude packages (repeatable)",lazyMultiple:!0,name:"exclude",type:String},{defaultValue:!1,description:"Include prerelease versions",name:"prerelease",type:Boolean},{defaultValue:!1,description:"Skip security vulnerability scanning",name:"no-security",type:Boolean},{defaultValue:!1,description:"Audit supply chain security settings",name:"security-config",type:Boolean},{defaultValue:!1,description:"Sync security settings to pnpm-workspace.yaml (pnpm only, requires --security-config)",name:"sync",type:Boolean},{description:"Output format: table, json, or minimal (default: table)",name:"format",type:String},{defaultValue:!1,description:"Exit with code 1 if outdated dependencies found (for CI)",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Run AI analysis on outdated packages",name:"ai",type:Boolean},{description:"AI analysis type: impact, security, compatibility, or recommend",name:"ai-type",type:String},{alias:"D",conflicts:"prod",description:"Check only devDependencies (npm/yarn mode)",name:"dev",type:Boolean},{alias:"P",conflicts:"dev",description:"Check only dependencies (npm/yarn mode)",name:"prod",type:Boolean},{defaultValue:!1,description:"Include peerDependencies in outdated checks",name:"peer",type:Boolean},{defaultValue:!1,description:"Also check workspace-owned package names against the registry",name:"include-internal",type:Boolean}]};var SB=Object.defineProperty,DB=f((e,t)=>SB(e,"name",{value:t,configurable:!0}),"e$P");const CB={argument:{description:"Comma-separated list of targets to run (e.g., lint,test,build)",name:"targets",type:String},description:"Run affected targets in a CI-optimized pipeline",examples:[["vis ci lint,test,build","Run lint, test, and build on affected projects"],["vis ci test --base=origin/main","Override the base ref"],["vis ci build --no-install","Skip the install step (assume deps already present)"],["vis ci build --parallel=6","Increase concurrency"]],group:"Run & Execute",loader:DB(()=>import("./handler6.js"),"loader"),name:"ci",options:[{defaultValue:!0,description:"Install dependencies before running targets (use --no-install to skip)",name:"install",type:Boolean},{defaultValue:!1,description:"Skip the toolchain pre-flight (no auto-install for any pinned tool: node / pnpm / yarn / npm / bun / deno / go / python / ruby / rust)",name:"skip-toolchain",type:Boolean},{description:"Git base ref for affected detection (default: auto-detected from CI env)",name:"base",type:String},{description:"Git head ref for affected detection (default: HEAD)",name:"head",type:String},{defaultValue:"none",description:"Upstream scope: none | direct | deep",name:"upstream",type:String},{defaultValue:"deep",description:"Downstream scope: none | direct | deep",name:"downstream",type:String},{defaultValue:4,description:"Maximum number of parallel tasks per target",name:"parallel",type:Number},{description:'Partition tasks for distributed CI (e.g., "1/4")',name:"partition",type:String},{description:"Filter affected projects by a query (e.g. 'language=typescript && tag=lib')",name:"query",type:String}]};var EB=Object.defineProperty,AB=f((e,t)=>EB(e,"name",{value:t,configurable:!0}),"e$O");const jB={description:"Remove node_modules from all workspace projects",examples:[["vis clean","Remove all node_modules directories"],["vis clean --lockfile","Also remove lockfiles"],["vis clean --dry-run","Preview what would be removed"]],group:"Workspace",loader:AB(()=>import("./handler7.js"),"loader"),name:"clean",options:[{alias:"l",defaultValue:!1,description:"Also remove lockfiles (pnpm-lock.yaml, package-lock.json, etc.)",name:"lockfile",type:Boolean},{defaultValue:!1,description:"Preview what would be removed without deleting",name:"dry-run",type:Boolean}]};var OB=Object.defineProperty,xB=f((e,t)=>OB(e,"name",{value:t,configurable:!0}),"e$N");const PB={argument:{description:"Template to use (e.g., vis:app, create-vite, user/repo) — omit for interactive mode",name:"template",type:String},description:"Create a new project from a template",examples:[["vis create","Interactive project scaffolding"],["vis create vis:monorepo my-workspace","Create a monorepo workspace"],["vis create vis:app my-app","Scaffold a Vite application"],["vis create vis:library my-lib","Create a TypeScript library"],["vis create vite my-app -- --template react-ts","Use create-vite with React TypeScript"],["vis create user/repo my-project","Clone a GitHub template"],["vis create --list","Show available templates"]],group:"Scaffold & Config",loader:xB(()=>import("./handler43.js"),"loader"),name:"create",options:[{defaultValue:!1,description:"Show available templates",name:"list",type:Boolean},{description:"Generate editor configs (vscode)",name:"editor",type:String},{defaultValue:!1,description:"Initialize a git repository",name:"git-init",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts",name:"no-interactive",type:Boolean}]};var NB=Object.defineProperty,FB=f((e,t)=>NB(e,"name",{value:t,configurable:!0}),"e$M");const RB={description:"Deduplicate dependencies using the detected package manager",examples:[["vis dedupe","Run deduplication"],["vis dedupe --check","Preview changes without modifying (CI-friendly)"]],group:"Dependencies",loader:FB(()=>import("./handler8.js"),"loader"),name:"dedupe",options:[{defaultValue:!1,description:"Preview changes without modifying files (dry-run)",name:"check",type:Boolean}]};var LB=Object.defineProperty,BB=f((e,t)=>LB(e,"name",{value:t,configurable:!0}),"e$L");const TB={alias:"dc",description:"Create or update .devcontainer/devcontainer.json interactively",examples:[["vis devcontainer","Launch interactive devcontainer config editor"],["vis dc","Alias for devcontainer"],["vis devcontainer --template node-pnpm","Start from Node.js + pnpm template"]],group:"Scaffold & Config",loader:BB(()=>import("./handler45.js"),"loader"),name:"devcontainer",options:[{alias:"t",description:"Start from a template: node, node-pnpm, node-postgres, node-dind, fullstack, python, go, rust, java, devops, minimal, custom",name:"template",type:String},{alias:"o",description:"Output path (default: .devcontainer/devcontainer.json)",name:"output",type:String}]};var IB=Object.defineProperty,_B=f((e,t)=>IB(e,"name",{value:t,configurable:!0}),"e$K");const MB={argument:{description:"Package to execute (optionally with @version)",name:"package",type:String},description:"Execute a remote package without permanent installation",examples:[["vis dlx create-vite my-app","Scaffold a new project"],["vis dlx typescript@5.5.4 tsc --version","Run specific version"],["vis dlx -p cowsay -p lolcatjs -c 'echo hi | cowsay | lolcatjs'","Multiple packages with shell"]],group:"Run & Execute",loader:_B(()=>import("./handler9.js"),"loader"),name:"dlx",options:[{alias:"p",description:"Additional packages to install (repeatable)",multiple:!0,name:"package",type:String},{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output except command results",name:"silent",type:Boolean}]};var VB=Object.defineProperty,WB=f((e,t)=>VB(e,"name",{value:t,configurable:!0}),"e$J");const UB={argument:{description:"Docker subcommand: scaffold | prune",name:"subcommand",type:String},description:"Docker integration — scaffold a minimal context or prune unfocused deps",examples:[["vis docker scaffold --focus=my-app","Generate .vis/docker/workspace for my-app + its deps"],["vis docker scaffold --focus=my-app --include-sources","Also copy focus source trees"],["vis docker scaffold --focus=my-app,other --out=.vis/docker","Focus multiple projects"],["vis docker prune --context=.vis/docker","Strip unfocused projects inside a build stage"]],group:"Workspace",loader:WB(()=>import("./handler10.js"),"loader"),name:"docker",options:[{description:"Project name(s) to focus on — comma-separated for multiple",name:"focus",type:String},{description:"Output directory for the scaffold (default: .vis/docker)",name:"out",type:String},{defaultValue:!1,description:"Also copy focus project source trees to <out>/sources",name:"include-sources",type:Boolean},{description:"Scaffold root for `vis docker prune` (default: .vis/docker)",name:"context",type:String},{defaultValue:!0,description:"Rewrite the workspace lockfile to drop unfocused projects (use --no-prune-lockfile to copy verbatim)",name:"prune-lockfile",type:Boolean}]};var GB=Object.defineProperty,qB=f((e,t)=>GB(e,"name",{value:t,configurable:!0}),"e$I");const zB={description:"Run a full project health check (outdated, security, duplicates, optimizations)",examples:[["vis doctor","Full project health check"],["vis doctor --fix","Check and auto-apply safe fixes"],["vis doctor --format json","Machine-readable output for CI"],["vis doctor --only security","Only run the security scans"],["vis doctor --skip optimization,runtime","Skip the listed sections"],["vis doctor --quiet","Summary only, no per-section breakdown"],["vis doctor --no-progress","Disable live progress UI (sequential logs)"],["vis doctor --exit-code","Exit with code 1 if security issues found"],["vis doctor --exit-code --strict","Fail on any issue (outdated, duplicates, security)"]],group:"Security & Health",loader:qB(()=>import("./handler41.js"),"loader"),name:"doctor",options:[{description:"Output format: table or json (default: table). Alias: --json",name:"format",type:String},{defaultValue:!1,description:"Shorthand for --format json",name:"json",type:Boolean},{defaultValue:!1,description:"Exit with code 1 if issues found",name:"exit-code",type:Boolean},{defaultValue:!1,description:"Auto-apply safe fixes (security overrides + codemods, SIGTERM orphans)",name:"fix",type:Boolean},{defaultValue:!1,description:"With --fix: escalate orphan cleanup to SIGKILL / taskkill /F (use when SIGTERM is ignored)",name:"fix-force",type:Boolean},{defaultValue:!1,description:"With --exit-code: also fail on outdated and duplicate deps",name:"strict",type:Boolean},{description:"Comma-separated sections to run: dependencies,security,optimization,runtime",name:"only",type:String},{description:"Comma-separated sections to skip",name:"skip",type:String},{defaultValue:!1,description:"Suppress per-section detail; print summary only",name:"quiet",type:Boolean},{defaultValue:!1,description:"Disable live progress UI (forces sequential logs)",name:"no-progress",type:Boolean},{defaultValue:!1,description:"Bypass the doctor result cache (~/.vis/cache/doctor)",name:"no-cache",type:Boolean},{description:"Comma-separated package name patterns to scope findings (supports * globs, e.g. '@types/*,react')",name:"filter",type:String}]};var HB=Object.defineProperty,JB=f((e,t)=>HB(e,"name",{value:t,configurable:!0}),"e$H");const KB={argument:{description:"Command to execute followed by arguments",name:"command",type:String},description:"Execute a local node_modules/.bin command (no remote fallback)",examples:[["vis exec eslint .","Run local eslint"],["vis exec tsc --noEmit","Run local TypeScript check"],["vis exec -r -- eslint .","Run in all workspace packages"],["vis exec -c 'echo $PATH'","Shell mode"]],group:"Run & Execute",loader:JB(()=>import("./handler11.js"),"loader"),name:"exec",options:[{alias:"c",defaultValue:!1,description:"Execute within shell environment",name:"shell-mode",type:Boolean},{alias:"r",defaultValue:!1,description:"Run in every workspace package",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Run on workspace root only",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter packages by name pattern",multiple:!0,name:"filter",type:String},{defaultValue:!1,description:"Run concurrently without topological ordering",name:"parallel",type:Boolean},{defaultValue:!1,description:"Reverse topological execution order",name:"reverse",type:Boolean}]};var YB=Object.defineProperty,XB=f((e,t)=>YB(e,"name",{value:t,configurable:!0}),"e$G");const QB={argument:{description:"Template name (or remote source like git://… or npm://…) — omit for interactive picker",name:"template",type:String},description:"Scaffold files from an in-repo template",examples:[["vis generate","Pick a template interactively"],["vis generate package","Run the 'package' template"],["vis generate component -- --name=Button --style=primary","Pre-fill option values"],["vis generate package --to=./packages/new --force","Custom destination + overwrite"],["vis generate package --dry-run","Print planned writes without touching disk"],["vis generate git://github.com/org/template#main","Fetch and run a remote template"],["vis generate --list","Show discovered templates"],["vis generate --list --json","Machine-readable template list"],["vis generate package --describe --json","Print template metadata (variables, destination) as JSON"]],group:"Scaffold & Config",loader:XB(()=>import("./handler36.js"),"loader"),name:"generate",options:[{defaultValue:!1,description:"List discovered templates",name:"list",type:Boolean},{defaultValue:!1,description:"Print template metadata (about, destination, variables) without running produce",name:"describe",type:Boolean},{defaultValue:!1,description:"Emit JSON output (with --list or --describe)",name:"json",type:Boolean},{description:"Destination directory",name:"to",type:String},{defaultValue:!1,description:"Print planned writes without touching disk",name:"dry-run",type:Boolean},{defaultValue:!1,description:"Overwrite existing files without prompting",name:"force",type:Boolean},{defaultValue:!1,description:"Skip prompts; use template defaults",name:"defaults",type:Boolean},{defaultValue:!1,description:"Skip running post-generation scripts",name:"skip-scripts",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts (errors on missing required values)",name:"no-interactive",type:Boolean},{defaultValue:!1,description:"Prefer locally cached remote templates over re-downloading",name:"prefer-offline",type:Boolean}]};var ZB=Object.defineProperty,eT=f((e,t)=>ZB(e,"name",{value:t,configurable:!0}),"t$t");const tT={description:"Visualize the project dependency graph",examples:[["vis graph","Show colored dependency graph (TUI in TTY, ASCII otherwise)"],["vis graph --format=ascii","Force ASCII tree output"],["vis graph --format=dot","Output in Graphviz DOT format"],["vis graph --format=html --output=graph.html","Generate interactive HTML graph"],["vis graph --format=json --output=graph.json","Save JSON graph to file"]],group:"Workspace",loader:eT(()=>import("./handler37.js"),"loader"),name:"graph",options:[{alias:"f",defaultValue:void 0,description:"Output format: tui, ascii, dot, json, html (default: tui in TTY, ascii otherwise)",name:"format",type:String},{alias:"o",description:"Write output to file instead of stdout",name:"output",type:String},{alias:"d",description:"Maximum dependency tree depth for ASCII output (default: unlimited)",name:"depth",type:Number}]},N1=["pre-commit","pre-merge-commit","prepare-commit-msg","commit-msg","post-commit","applypatch-msg","pre-applypatch","post-applypatch","pre-rebase","post-rewrite","post-checkout","post-merge","pre-push","pre-auto-gc"],F1=".vis-hooks",fY=[".pre-commit-config.yaml",".pre-commit-config.yml","prek.toml"],hY={commit:"pre-commit","merge-commit":"pre-merge-commit",push:"pre-push"},mY=new Set(["commit-msg","post-checkout","post-commit","post-merge","post-rewrite","pre-commit","pre-merge-commit","pre-push","pre-rebase","prepare-commit-msg"]),gY=new Set(["commit-msg","post-checkout","post-merge","post-rewrite","pre-rebase","prepare-commit-msg"]),yY=new Set(["fail","script","system"]);var rT=Object.defineProperty,Yn=f((e,t)=>rT(e,"name",{value:t,configurable:!0}),"e$E");const Xn={defaultValue:F1,description:"Custom hooks directory",name:"hooks-dir",type:String},Qn=[{defaultValue:void 0,description:"Set to 0 to disable git hooks, set to 2 for debug output",name:"VIS_GIT_HOOKS",type:String}],nT={commandPath:["hook"],description:"Install git hooks for the workspace (migrates husky / prek on prompt)",env:[...Qn],examples:[["vis hook install","Install git hooks in .vis-hooks/"],["vis hook install --hooks-dir=.githooks","Install hooks in a custom directory"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookInstallExecute})),"loader"),name:"install",options:[Xn]},iT={commandPath:["hook"],description:"Remove git hooks and reset core.hooksPath",env:[...Qn],examples:[["vis hook uninstall","Remove git hooks and reset core.hooksPath"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookUninstallExecute})),"loader"),name:"uninstall",options:[Xn]},sT={commandPath:["hook"],description:"Migrate from husky or prek to vis hooks (auto-detected)",env:[...Qn],examples:[["vis hook migrate","Migrate from husky or prek to vis hooks (auto-detected)"],["vis hook migrate --dry-run","Preview what a migration would write without touching disk"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookMigrateExecute})),"loader"),name:"migrate",options:[Xn,{defaultValue:!1,description:"Preview migrate without writing files",name:"dry-run",type:Boolean}]},oT={commandPath:["hook"],description:"Show configured hooks grouped by stage",env:[...Qn],examples:[["vis hook list","Show configured hooks grouped by stage"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookListExecute})),"loader"),name:"list",options:[Xn]},aT={commandPath:["hook"],description:"Sanity-check installed hooks and the bundled runner",env:[...Qn],examples:[["vis hook validate","Sanity-check installed hooks and the bundled runner"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookValidateExecute})),"loader"),name:"validate",options:[Xn]},cT={argument:{description:"Hook stage to run (e.g. pre-commit, commit-msg). Defaults to pre-commit.",name:"stage",type:String},commandPath:["hook"],description:"Run a specific hook stage against tracked files",env:[...Qn],examples:[["vis hook run pre-commit --all-files","Run the pre-commit hooks against every tracked file"],["vis hook run pre-commit --from-ref=main --to-ref=HEAD","Run pre-commit hooks on files changed between two refs"],["vis hook run pre-commit --last-commit","Shortcut for --from-ref HEAD~1 --to-ref HEAD"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookRunExecute})),"loader"),name:"run",options:[Xn,{defaultValue:!1,description:"Run against every tracked file",name:"all-files",type:Boolean},{defaultValue:void 0,description:"Include files changed since this ref",name:"from-ref",type:String},{defaultValue:void 0,description:"Include files changed up to this ref",name:"to-ref",type:String},{defaultValue:!1,description:"Shortcut for --from-ref HEAD~1 --to-ref HEAD",name:"last-commit",type:Boolean}]},lT={argument:{description:"Target to add (currently: `secrets`)",name:"target",type:String},commandPath:["hook"],description:"Add a managed hook snippet (e.g. `vis secrets --staged`)",env:[...Qn],examples:[["vis hook add secrets","Add a pre-commit hook that runs `vis secrets --staged`"]],group:"Scaffold & Config",loader:Yn(()=>import("./handler39.js").then(e=>({default:e.hookAddExecute})),"loader"),name:"add",options:[Xn]},uT=[nT,iT,sT,oT,aT,cT,lT];var pT=Object.defineProperty,dT=f((e,t)=>pT(e,"name",{value:t,configurable:!0}),"e$D");const fT={argument:{description:"Project name to check (required)",name:"project",type:String},description:'Exit with inverted codes for CI "Ignored Build Step" gating (Vercel/Netlify)',examples:[["vis ignore my-app","Check if my-app is affected and decide whether to build"],["vis ignore my-app --base $VERCEL_GIT_PREVIOUS_SHA","Explicit base ref"],["vis ignore my-app --json","Emit the decision as JSON instead of text"],["vis ignore my-app --verbose","Print debug info about the decision path"],["vis ignore my-app --exit-zero-on-build","Normal exit semantics (0=build, 0=skip)"]],group:"Run & Execute",loader:dT(()=>import("./handler31.js"),"loader"),name:"ignore",options:[{description:"Git base ref for comparison. Defaults to CI provider env vars, then HEAD~1.",name:"base",type:String},{defaultValue:"HEAD",description:"Git head ref for comparison",name:"head",type:String},{defaultValue:"deep",description:'Downstream scope: "none", "direct", or "deep"',name:"downstream",type:String},{defaultValue:"none",description:'Upstream scope: "none", "direct", or "deep"',name:"upstream",type:String},{defaultValue:!1,description:"Emit the decision as JSON on stdout instead of human text",name:"json",type:Boolean},{defaultValue:!1,description:"Exit 0 on build (normal semantics) instead of 1 (inverted Vercel/Netlify semantics)",name:"exit-zero-on-build",type:Boolean},{defaultValue:!1,description:"Enable verbose debug output",name:"verbose",type:Boolean}]};var hT=Object.defineProperty,mT=f((e,t)=>hT(e,"name",{value:t,configurable:!0}),"e$C");const gT={description:"Remove vis from the system (self-uninstall)",examples:[["vis implode","Interactive uninstall"],["vis implode --yes","Non-interactive uninstall (CI)"]],group:"System",loader:mT(()=>import("./handler12.js"),"loader"),name:"implode",options:[{alias:"y",defaultValue:!1,description:"Skip confirmation prompt",name:"yes",type:Boolean}]};var yT=Object.defineProperty,vT=f((e,t)=>yT(e,"name",{value:t,configurable:!0}),"e$B");const bT={alias:"view",argument:{description:"Package name followed by optional metadata fields (e.g. 'react version dependencies')",name:"args",type:String},description:"Show npm registry metadata for a package (alias of `npm view` / `pnpm view` / `yarn info` / `bun pm view`)",examples:[["vis info react","Full registry metadata for react"],["vis info react version","Latest version only"],["vis info react versions","All published versions"],["vis info react@18 dependencies","Dependencies of react@18"],["vis info react --json","Emit JSON"],["vis view react","Alias matching npm/pnpm"]],group:"Dependencies",loader:vT(()=>import("./handler13.js"),"loader"),name:"info",options:[{defaultValue:!1,description:"Output as JSON",name:"json",type:Boolean}]};var $T=Object.defineProperty,wT=f((e,t)=>$T(e,"name",{value:t,configurable:!0}),"e$A");const kT={description:"Initialize vis.config.ts with best-practice security defaults",examples:[["vis init","Interactive setup wizard"],["vis init --no-interactive","Create minimal config without prompts"],["vis init --force","Overwrite existing config"],["vis init --sync-native","Also sync to native PM config files"]],group:"Scaffold & Config",loader:wT(()=>import("./handler14.js"),"loader"),name:"init",options:[{defaultValue:!1,description:"Overwrite existing config file",name:"force",type:Boolean},{defaultValue:!1,description:"Skip interactive prompts",name:"no-interactive",type:Boolean},{defaultValue:!1,description:"Sync settings to native PM config files",name:"sync-native",type:Boolean}]};var ST=Object.defineProperty,DT=f((e,t)=>ST(e,"name",{value:t,configurable:!0}),"e$z");const CT={alias:"i",description:"Install dependencies using the detected package manager",examples:[["vis install","Install all dependencies (frozen-lockfile by default when a lockfile is present)"],["vis i --no-frozen-lockfile","Allow lockfile updates (escape hatch for the default)"],["vis install --ci","Clean install: wipe node_modules + frozen lockfile (mirrors npm ci / pnpm ci)"],["vis install --prefer-offline","Use cached packages when available, fall back to network"],["vis install --prod","Install production dependencies only"],["vis install --filter app","Install for specific workspace package"],["vis install --run-scripts","Run lifecycle scripts (opts out of vis's default block-by-default policy; allowlisted packages run via security.allowBuilds)"],["vis install --no-typosquat-check","Skip typosquat name check"],["vis install --installer aube","Force aube as the installer (errors if not on PATH)"],["vis install --no-aube","Bypass aube; use the lockfile-detected PM"]],group:"Dependencies",loader:DT(()=>import("./handler15.js"),"loader"),name:"install",options:[{alias:"P",conflicts:"dev",description:"Skip devDependencies",name:"prod",type:Boolean},{alias:"D",conflicts:"prod",description:"Install devDependencies only",name:"dev",type:Boolean},{defaultValue:!1,description:"Use frozen lockfile (CI mode, maps to npm ci)",name:"frozen-lockfile",type:Boolean},{defaultValue:!1,description:"Opt out of vis's default frozen-lockfile behavior and allow lockfile updates",name:"no-frozen-lockfile",type:Boolean},{defaultValue:!1,description:"Clean install: wipe node_modules then install with frozen lockfile",name:"ci",type:Boolean},{alias:"f",defaultValue:!1,description:"Force reinstall all dependencies",name:"force",type:Boolean},{defaultValue:!1,description:"Run lifecycle scripts (opts out of vis's default block-by-default policy; allowlisted packages run via security.allowBuilds)",name:"run-scripts",type:Boolean},{defaultValue:!1,description:"Update lockfile without installing",name:"lockfile-only",type:Boolean},{defaultValue:!1,description:"Skip optional dependencies",name:"no-optional",type:Boolean},{defaultValue:!1,description:"Use only cached packages",name:"offline",type:Boolean},{defaultValue:!1,description:"Prefer cached packages, fall back to network when missing",name:"prefer-offline",type:Boolean},{alias:"s",defaultValue:!1,description:"Suppress output",name:"silent",type:Boolean},{alias:"r",defaultValue:!1,description:"Install in all workspace packages",name:"recursive",type:Boolean},{alias:"w",defaultValue:!1,description:"Target workspace root",name:"workspace-root",type:Boolean},{alias:"F",description:"Filter by workspace package name",multiple:!0,name:"filter",type:String},{defaultValue:!1,description:"Skip typosquat name check",name:"no-typosquat-check",type:Boolean},{description:"Pick the installer explicitly. One of: auto, aube, pnpm, npm, yarn, bun. Overrides VIS_INSTALLER and install.backend in vis.config.",name:"installer",type:String},{defaultValue:!1,description:"Skip aube and use the lockfile-detected PM. Wins over --installer / VIS_INSTALLER / install.backend.",name:"no-aube",type:Boolean}]};var ET=Object.defineProperty,AT=f((e,t)=>ET(e,"name",{value:t,configurable:!0}),"e$y");const jT={alias:"ln",argument:{description:"Package name or directory path to link (omit to register current package)",name:"target",type:String},description:"Link a local package for development",examples:[["vis link ./packages/utils","Link local directory package (works on all PMs)"],["vis link","Register current package globally (pnpm <=10, yarn, npm, bun)"],["vis link react","Link global package into current project (pnpm <=10, yarn, npm, bun)"]],group:"Dependencies",loader:AT(()=>import("./handler16.js"),"loader"),name:"link"};var OT=Object.defineProperty,xT=f((e,t)=>OT(e,"name",{value:t,configurable:!0}),"e$x");const PT={description:"Lint workspace dependency policies (workspace-protocol, banned-deps, redefine-root, workspace-versions, custom-types, empty-deps, root-private, root-package-manager, root-deps, missing-package-json, dead-workspace-patterns, types-in-deps, similar-deps)",examples:[["vis lint","Run every enabled lint and exit non-zero on failures"],["vis lint --workspace-protocol","Only check that internal deps use workspace:*"],["vis lint --workspace-protocol --fix","Auto-rewrite internal deps to use workspace:*"],["vis lint --redefine-root","Flag deps duplicated between root and child packages"],["vis lint --banned-deps","Flag deps matching policy.bannedDeps in vis config"],["vis lint --workspace-versions","Flag external deps declared at different versions across packages"],["vis lint --workspace-versions --fix","Rewrite drifting deps to the highest sibling version"],["vis lint --workspace-versions --dep react","Limit version-drift check to a single dep"],["vis lint --workspace-versions --resolve catalog --fix","Rewrite drifting deps to catalog: when a catalog already pins them"],["vis lint --workspace-versions --resolve catalog --propose-min 3","Suggest new catalog entries for deps ≥3 packages already agree on"],["vis lint --custom-types","Flag drift in engines.{node,pnpm}, packageManager, volta.{node,pnpm,yarn}, devEngines"],["vis lint --custom-types --fix","Align all engines/packageManager/volta versions to the highest sibling"],["vis lint --empty-deps --fix","Drop empty `dependencies` / `devDependencies` / etc. blocks across the workspace"],["vis lint --root-private --fix",'Ensure the workspace root package.json has "private": true'],["vis lint --root-package-manager","Ensure the root package.json declares a `packageManager` field"],["vis lint --root-deps --fix","Move runtime deps off the private workspace root into devDependencies"],["vis lint --missing-package-json","Flag workspace dirs that don't contain a package.json"],["vis lint --dead-workspace-patterns --fix","Drop workspace patterns that match zero packages"],["vis lint --types-in-deps --fix","Move @types/* out of dependencies on private packages"],["vis lint --similar-deps","Flag drift across related dep families (react+react-dom, @babel/*, …)"],["vis lint --ban left-pad --ban request","One-off ban: flag any package declaring left-pad or request"],["vis lint --pin react@18.2.0","One-off pin: flag any package declaring react at a different version"],["vis lint --format json","Emit findings as JSON for CI / editor integrations"]],group:"Security & Health",loader:xT(()=>import("./handler44.js"),"loader"),name:"lint",options:[{defaultValue:!1,description:"Lint that internal deps use the workspace: protocol",name:"workspace-protocol",type:Boolean},{defaultValue:!1,description:"Lint that no child re-declares a dep already pinned in the workspace root",name:"redefine-root",type:Boolean},{defaultValue:!1,description:"Lint deps against policy.bannedDeps in vis config",name:"banned-deps",type:Boolean},{defaultValue:!1,description:"Lint that all packages declare external deps at the same version",name:"workspace-versions",type:Boolean},{defaultValue:!1,description:"Lint engines.{node,pnpm}, packageManager, volta.*, devEngines.* for drift across packages",name:"custom-types",type:Boolean},{defaultValue:!1,description:"Flag empty dependency blocks (`dependencies: {}`, `devDependencies: {}`, …) across the workspace",name:"empty-deps",type:Boolean},{defaultValue:!1,description:'Ensure the workspace root package.json sets `"private": true`',name:"root-private",type:Boolean},{defaultValue:!1,description:"Ensure the workspace root package.json declares a `packageManager` field",name:"root-package-manager",type:Boolean},{defaultValue:!1,description:"Flag runtime dependencies on the private workspace root (move them to devDependencies)",name:"root-deps",type:Boolean},{defaultValue:!1,description:"Flag workspace directories that lack a package.json",name:"missing-package-json",type:Boolean},{defaultValue:!1,description:"Flag workspace patterns (in `pnpm-workspace.yaml` / `package.json#workspaces`) that match zero packages",name:"dead-workspace-patterns",type:Boolean},{defaultValue:!1,description:"Flag `@types/*` declared in `dependencies` on a private package (should be in devDependencies)",name:"types-in-deps",type:Boolean},{defaultValue:!1,description:"Flag version drift across related dep families (react+react-dom, @babel/*, @storybook/*, …)",name:"similar-deps",type:Boolean},{description:"Restrict --workspace-versions to a single dep",name:"dep",type:String},{description:"Ban a dep name or glob for this run (repeatable). Auto-enables --banned-deps.",multiple:!0,name:"ban",type:String},{description:"Pin a dep to an exact specifier for this run, e.g. react@^18.2.0 (repeatable). Auto-enables --workspace-versions.",multiple:!0,name:"pin",type:String},{description:"Conflict resolution for --workspace-versions: highest, lowest, or catalog (default: highest)",name:"resolve",type:String},{description:"Propose catalog entries for deps ≥N packages already agree on. Activates with --resolve catalog.",name:"propose-min",type:Number},{defaultValue:!1,description:"Auto-fix violations in place (writes package.json files)",name:"fix",type:Boolean},{description:"Specifier used by --fix for workspace-protocol (default: workspace:*)",name:"fix-specifier",type:String},{description:"Output format: human, json, or minimal (default: human)",name:"format",type:String},{defaultValue:!1,description:"Suppress all output except errors",name:"quiet",type:Boolean}]};var NT=Object.defineProperty,FT=f((e,t)=>NT(e,"name",{value:t,configurable:!0}),"e$w");const RT={description:"List all workspace projects with metadata",examples:[["vis list","Show all projects"],["vis list --targets","Per-target rows with type, cache status and description"],["vis list --targets --inferred","Only show targets synthesized by Project Crystal-style inference"],["vis list --deps","Human-readable table of every dep-instance across the workspace"],["vis list --deps --internal-only","Only workspace deps in human form"],["vis list --deps --format=ndjson","Stream every dep-instance as NDJSON for jq pipelines"],["vis list --deps --format=json --pretty","Single pretty-printed JSON array of dep-instances"],["vis list --format=json","Machine-readable project listing"],['vis list --query "tag=frontend"',"Filter by query"]],group:"Workspace",loader:FT(()=>import("./handler32.js"),"loader"),name:"list",options:[{defaultValue:!1,description:"Filter target rows to only inferred targets (implies --targets)",name:"inferred",type:Boolean},{description:"Output format: table (default), json (single document), or ndjson (one record per line; --deps only)",name:"format",type:String},{defaultValue:!1,description:"Pretty-print with 2-space indent (only meaningful with --format=json)",name:"pretty",type:Boolean},{description:"Filter projects by query",name:"query",type:String},{defaultValue:!1,description:"Show per-target rows (type, cache, description)",name:"targets",type:Boolean},{defaultValue:!1,description:"Render a dep-instance view (table by default; use --format=ndjson|json for jq-friendly streams)",name:"deps",type:Boolean},{description:"Restrict --deps to specific dep blocks (repeatable)",multiple:!0,name:"dep-type",type:String},{defaultValue:!1,description:"With --deps: only show internal/workspace deps",name:"internal-only",type:Boolean},{defaultValue:!1,description:"With --deps: only show external/registry deps",name:"external-only",type:Boolean},{description:"With --deps: glob of declaring package names to keep (repeatable)",multiple:!0,name:"include",type:String},{description:"With --deps: glob of declaring package names to drop (repeatable)",multiple:!0,name:"exclude",type:String}]};var LT=Object.defineProperty,Mt=f((e,t)=>LT(e,"name",{value:t,configurable:!0}),"t$n");const Qt=[{defaultValue:!1,description:"Preview changes without applying",name:"dry-run",type:Boolean},{alias:"y",defaultValue:!1,description:"Skip the confirmation prompt",name:"yes",type:Boolean}],BT={commandPath:["migrate"],description:"Migrate dependencies and scripts to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateDepsExecute})),"loader"),name:"deps",options:[...Qt]},TT={commandPath:["migrate"],description:"Inline lint-staged configuration into vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateLintStagedExecute})),"loader"),name:"lint-staged",options:[...Qt]},IT={commandPath:["migrate"],description:"Inline nano-staged configuration into vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateNanoStagedExecute})),"loader"),name:"nano-staged",options:[...Qt]},_T={commandPath:["migrate"],description:"Migrate turborepo tasks/config to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateTurborepoExecute})),"loader"),name:"turborepo",options:[...Qt]},MT={commandPath:["migrate"],description:"Migrate nx targets/config to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateNxExecute})),"loader"),name:"nx",options:[...Qt,{defaultValue:!1,description:"Overwrite an existing vis.config.ts (a .bak is taken first)",name:"force",type:Boolean}]},VT={commandPath:["migrate"],description:"Migrate moon tasks/templates to vis",group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateMoonExecute})),"loader"),name:"moon",options:[...Qt,{defaultValue:!1,description:"Copy .moon/templates/* into .vis/templates/* so `vis generate` works without .moon/",name:"copy-templates",type:Boolean}]},WT={commandPath:["migrate"],description:"Migrate gitleaks config/baseline/hooks to `vis secrets`",examples:[["vis migrate gitleaks","Migrate gitleaks config/baseline/hooks to `vis secrets`"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateGitleaksExecute})),"loader"),name:"gitleaks",options:[...Qt]},UT={commandPath:["migrate"],description:"Migrate Kingfisher baseline/hooks/scripts to `vis secrets`",examples:[["vis migrate kingfisher","Migrate Kingfisher baseline/hooks/scripts to `vis secrets`"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateKingfisherExecute})),"loader"),name:"kingfisher",options:[...Qt]},GT={commandPath:["migrate"],description:"Replace secretlint with `vis secrets`",examples:[["vis migrate secretlint","Replace secretlint with `vis secrets`"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateSecretlintExecute})),"loader"),name:"secretlint",options:[...Qt]},qT={commandPath:["migrate"],description:"Translate syncpack customTypes into vis policy and strip the syncpack dep/scripts",examples:[["vis migrate syncpack","Translate syncpack customTypes into vis policy and strip the syncpack dep/scripts"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateSyncpackExecute})),"loader"),name:"syncpack",options:[...Qt]},zT={commandPath:["migrate"],description:"Strip sherif config/dep/scripts and surface ignore-rules as a positive `vis lint --<rule>` command",examples:[["vis migrate sherif","Strip sherif config/dep/scripts and surface ignore-rules as a positive `vis lint --<rule>` command"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateSherifExecute})),"loader"),name:"sherif",options:[...Qt]},HT={commandPath:["migrate"],description:"Audit the workspace for stray gitleaks/secretlint/sherif/syncpack references (exit 1 on issues)",examples:[["vis migrate verify","Audit the workspace for stray gitleaks/secretlint/sherif/syncpack references (exit 1 on issues)"]],group:"Scaffold & Config",loader:Mt(()=>import("./handler33.js").then(e=>({default:e.migrateVerifyExecute})),"loader"),name:"verify",options:[]},JT=[BT,TT,IT,_T,MT,VT,WT,UT,GT,qT,zT,HT];var KT=Object.defineProperty,YT=f((e,t)=>KT(e,"name",{value:t,configurable:!0}),"r$t");const XT=new Set(["--cwd"]),QT=new Set(["--help","--version","-h","-V"]),ZT=YT(e=>{const t=[];for(let r=0;r<e.length;r+=1){const n=e[r];if(n!==void 0){if(QT.has(n))return!1;if(n.startsWith("-")){const i=n.indexOf("="),s=i===-1?n:n.slice(0,i);if(XT.has(s)&&i===-1){const o=e[r+1];o!==void 0&&!o.startsWith("-")&&(r+=1)}continue}t.push(n)}}return t.length===1&&t[0]==="migrate"},"isBareMigrateInvocation");var e3=Object.defineProperty,t3=f((e,t)=>e3(e,"name",{value:t,configurable:!0}),"t$m");const Um=t3(e=>e in al&&al[e]!=="0"&&al[e]!=="false","check"),Zr=Um("CI")||Um("CONTINUOUS_INTEGRATION");var r3=Object.defineProperty,zl=f((e,t)=>r3(e,"name",{value:t,configurable:!0}),"i$h");class n3{static{f(this,"MigrateStore")}static{zl(this,"MigrateStore")}#e;#r=new Set;constructor(t){this.#e={applyProgress:null,checkedItems:new Set(t.map(r=>r.entry.id)),error:null,focusedPanel:"list",items:t,phase:"browsing",selectedIndex:0}}getSnapshot=zl(()=>this.#e,"getSnapshot");subscribe=zl(t=>(this.#r.add(t),()=>{this.#r.delete(t)}),"subscribe");getCheckedItems(){return this.#e.items.filter(t=>this.#e.checkedItems.has(t.entry.id))}getSelectedItem(){return this.#e.items[this.#e.selectedIndex]??null}setSelectedIndex(t){const r=Math.max(0,Math.min(t,this.#e.items.length-1));r!==this.#e.selectedIndex&&this.#t({...this.#e,selectedIndex:r})}setFocusedPanel(t){t!==this.#e.focusedPanel&&this.#t({...this.#e,focusedPanel:t})}toggleCheck(t){const r=new Set(this.#e.checkedItems);r.has(t)?r.delete(t):r.add(t),this.#t({...this.#e,checkedItems:r})}checkAll(){this.#t({...this.#e,checkedItems:new Set(this.#e.items.map(t=>t.entry.id))})}uncheckAll(){this.#t({...this.#e,checkedItems:new Set})}toggleAll(){this.#e.checkedItems.size===this.#e.items.length?this.uncheckAll():this.checkAll()}startApply(){const t=this.getCheckedItems().length;this.#t({...this.#e,applyProgress:{current:0,total:t},phase:"applying"})}updateApplyProgress(t){this.#e.applyProgress&&this.#t({...this.#e,applyProgress:{...this.#e.applyProgress,current:t}})}markDone(){this.#t({...this.#e,phase:"done"})}setError(t){this.#t({...this.#e,error:t,phase:"error"})}#t(t){this.#e=t;for(const r of this.#r)try{r()}catch{}}}var i3=Object.defineProperty,s3=f((e,t)=>i3(e,"name",{value:t,configurable:!0}),"f$b");const Gm=s3(({autoExitSeconds:e,onCancel:t,visible:r})=>{const{exit:n}=pv(),[i,s]=Es(e||3),o=Is(null),a=Is(0);lv(()=>{if(!r)return;const l=e||3;s(l),a.current=Date.now();let u=l;return o.current=setInterval(()=>{u-=1,u<=0?(o.current&&(clearInterval(o.current),o.current=null),s(0),n()):s(u)},1e3),()=>{o.current&&(clearInterval(o.current),o.current=null)}},[r,e,n]);const c=uv(()=>{o.current&&(clearInterval(o.current),o.current=null),t()},[t]);return dv((l,u)=>{Date.now()-a.current<200||(l==="q"?n():c())},{isActive:r}),z(Ku,{backgroundColor:"#1e1e1e",footer:pe(H,{dimColor:!0,children:["Press"," ",z(H,{bold:!0,color:"white",children:"q"})," ","to exit,"," ",z(H,{bold:!0,color:"white",children:"any key"})," ","to stay"]}),title:`Exiting in ${i}…`,visible:r,width:50,children:z(H,{dimColor:!0,children:"Stay to explore the results interactively."})})},"QuitDialog");var o3=Object.defineProperty,R1=f((e,t)=>o3(e,"name",{value:t,configurable:!0}),"n$j");const a3=R1(e=>{if(e.startsWith("⚠"))return"yellow";e.startsWith("── ")||e.startsWith("[dry-run]")},"colorForPreviewLine"),c3=R1(({focused:e,item:t,scrollRef:r})=>t?pe(he,{borderColor:e?"white":"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,children:[z(he,{flexShrink:0,paddingTop:1,paddingX:2,children:z(H,{bold:!0,color:"white",children:t.entry.title})}),z(he,{flexShrink:0,paddingBottom:1,paddingX:2,children:z(H,{dimColor:!0,children:t.entry.description})}),z(OS,{flexGrow:1,flexShrink:1,paddingX:2,ref:r,scrollbar:!0,scrollbarColor:"gray",scrollbarStyle:"block",children:pe(he,{flexDirection:"column",children:[z(H,{dimColor:!0,children:"── What will change ──"}),z(H,{}),t.preview.length===0&&z(H,{dimColor:!0,children:"(no preview available)"}),t.preview.map((i,s)=>{const o=a3(i);return i===""?z(H,{},`blank-${String(s)}`):z(H,{color:o,children:i},`${String(s)}-${i.slice(0,20)}`)})]})})]}):z(he,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:z(H,{dimColor:!0,children:"No migration selected"})}),"MigrateDetailPanel");var l3=Object.defineProperty,L1=f((e,t)=>l3(e,"name",{value:t,configurable:!0}),"g$9");const u3=L1(({checked:e,isSelected:t,item:r})=>{const n=e?"☑":"☐",i=r.preview.length;return pe(he,{flexShrink:0,height:1,children:[z(H,{children:t?">":" "}),pe(H,{color:e?"white":"gray",children:[" ",n," "]}),z(he,{flexGrow:1,children:z(H,{bold:t,inverse:t,wrap:"truncate",children:r.entry.title})}),pe(H,{dimColor:!0,children:[" ",i," ","change",i===1?"":"s"," "]})]})},"MigrationRow"),p3=L1(({checkedItems:e,focused:t,isDryRun:r,items:n,scrollOffset:i,selectedIndex:s,viewportHeight:o})=>{const a=t?"white":"gray",c=n.filter(p=>e.has(p.entry.id)).length,l=n.map((p,h)=>z(u3,{checked:e.has(p.entry.id),isSelected:h===s,item:p},p.entry.id)),u=n.length,d=u>o&&o>0;return pe(he,{borderColor:a,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[pe(he,{flexShrink:0,gap:1,paddingX:1,children:[z(H,{bold:!0,inverse:!0,children:" MIGRATE "}),pe(H,{wrap:"truncate",children:[n.length," ","applicable"]}),c>0&&pe(H,{dimColor:!0,children:[" — ",c," selected"]}),r&&z(H,{color:"yellow",children:" (dry-run)"})]}),pe(he,{flexDirection:"row",flexGrow:1,overflow:"hidden",children:[z(he,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:z(he,{flexDirection:"column",marginTop:-i,children:l})}),d&&z(he,{flexShrink:0,marginLeft:1,marginRight:1,children:z(xS,{contentHeight:u,placement:"inset",scrollOffset:i,style:"block",viewportHeight:o})})]})]})},"MigrateListPanel");var d3=Object.defineProperty,f3=f((e,t)=>d3(e,"name",{value:t,configurable:!0}),"N$e");const h3=100,m3=40,g3=10,y3=f3(({autoExitSeconds:e=0,isDryRun:t,store:r})=>{const{exit:n}=pv(),{columns:i,rows:s}=jS(),o=AS(r.subscribe,r.getSnapshot),[a,c]=Es(!1),[l,u]=Es(!1),[d,p]=Es(!1),[h,y]=Es(0),$=Is(null),S=Is(null),k=Is(null),b=o.items[o.selectedIndex]??null,m=Math.max(1,s-6),v=uv(Y=>{y(P=>Y>=P+m?Math.max(0,Y-m+1):Y<P?Math.max(0,Y):P)},[m]);if(lv(()=>{S.current?.scrollToTop()},[b?.entry.id]),dv((Y,P)=>{if(Y==="c"&&P.ctrl){n();return}if(!d){if(l){Y==="u"||P.return?(u(!1),r.startApply(),n(r.getCheckedItems())):P.escape||Y==="q"?u(!1):P.downArrow||Y==="j"?k.current?.scrollBy(1):(P.upArrow||Y==="k")&&k.current?.scrollBy(-1);return}if(a){P.escape||Y==="?"?c(!1):Y==="q"?(c(!1),p(!0)):P.downArrow||Y==="j"?$.current?.scrollBy(1):(P.upArrow||Y==="k")&&$.current?.scrollBy(-1);return}if(Y==="?"){c(!0);return}if(Y==="q"){p(!0);return}if(P.tab){r.setFocusedPanel(o.focusedPanel==="list"?"detail":"list");return}if(o.focusedPanel==="list"){if(P.downArrow||Y==="j"){const N=Math.min(o.selectedIndex+1,o.items.length-1);r.setSelectedIndex(N),v(N);return}if(P.upArrow||Y==="k"){const N=Math.max(o.selectedIndex-1,0);r.setSelectedIndex(N),v(N);return}if(P.pageDown){const N=Math.min(o.selectedIndex+10,o.items.length-1);r.setSelectedIndex(N),v(N);return}if(P.pageUp){const N=Math.max(o.selectedIndex-10,0);r.setSelectedIndex(N),v(N);return}if(P.home){r.setSelectedIndex(0),y(0);return}if(P.end){const N=o.items.length-1;r.setSelectedIndex(N),v(N);return}if(Y===" "||P.return){b&&r.toggleCheck(b.entry.id);return}if(Y==="a"){r.toggleAll();return}if(Y==="u"&&!t&&o.checkedItems.size>0){u(!0);return}P.rightArrow&&r.setFocusedPanel("detail");return}if(o.focusedPanel==="detail"){if(P.escape||P.leftArrow){r.setFocusedPanel("list");return}if(P.downArrow||Y==="j"){S.current?.scrollBy(1);return}if(P.upArrow||Y==="k"){S.current?.scrollBy(-1);return}if(P.pageDown){S.current?.scrollBy(10);return}if(P.pageUp){S.current?.scrollBy(-10);return}if(P.home){S.current?.scrollToTop();return}P.end&&S.current?.scrollToBottom()}}},{isActive:!0}),i<m3||s<g3)return z(he,{alignItems:"center",height:s,justifyContent:"center",width:i,children:pe(H,{color:"yellow",children:["Terminal too small (",i,"x",s,")"]})});const w=i>=h3,g=[pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"q"}),z(H,{dimColor:!0,children:"QUIT"})]},"q"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"?"}),z(H,{dimColor:!0,children:"HELP"})]},"?"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"↑↓"}),z(H,{dimColor:!0,children:"NAV"})]},"nav"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"Space"}),z(H,{dimColor:!0,children:"CHECK"})]},"sp"),pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"a"}),z(H,{dimColor:!0,children:"ALL"})]},"a")];!t&&o.checkedItems.size>0&&g.push(pe(he,{gap:1,children:[z(H,{bold:!0,color:"green",children:"u"}),z(H,{dimColor:!0,children:"APPLY"})]},"u")),g.push(pe(he,{gap:1,children:[z(H,{bold:!0,color:"white",children:"Tab"}),z(H,{dimColor:!0,children:"PANEL"})]},"tab"));const C=z(he,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:z(he,{flexWrap:"wrap",gap:2,paddingX:1,children:g})}),D=pe(Ku,{footer:pe(H,{dimColor:!0,children:[z(H,{bold:!0,color:"white",children:"↑↓"})," scroll ",z(H,{bold:!0,color:"white",children:"?"}),"/",z(H,{bold:!0,color:"white",children:"Esc"})," close"]}),scrollRef:$,title:"KEYBOARD SHORTCUTS",visible:a,width:52,children:[pe(he,{flexDirection:"column",marginBottom:1,children:[z(H,{bold:!0,color:"white",children:"NAVIGATION"}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" ↑/k"}),z(H,{dimColor:!0,children:" Move up"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" ↓/j"}),z(H,{dimColor:!0,children:" Move down"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" Tab"}),z(H,{dimColor:!0,children:" Switch panel"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" →/←"}),z(H,{dimColor:!0,children:" Focus detail/list"})]})]}),pe(he,{flexDirection:"column",marginBottom:1,children:[z(H,{bold:!0,color:"white",children:"SELECTION"}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" Space"}),z(H,{dimColor:!0,children:" Toggle migration"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" a"}),z(H,{dimColor:!0,children:" Toggle all"})]})]}),pe(he,{flexDirection:"column",children:[z(H,{bold:!0,color:"white",children:"ACTIONS"}),!t&&pe(H,{children:[z(H,{bold:!0,color:"white",children:" u"}),z(H,{dimColor:!0,children:" Apply selected migrations"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" q"}),z(H,{dimColor:!0,children:" Quit"})]}),pe(H,{children:[z(H,{bold:!0,color:"white",children:" ?"}),z(H,{dimColor:!0,children:" Toggle help"})]})]})]}),A=r.getCheckedItems(),O=z(he,{alignItems:"center",flexDirection:"column",children:pe(H,{dimColor:!0,children:["Press ",z(H,{bold:!0,color:"white",children:"u"})," or ",z(H,{bold:!0,color:"white",children:"Enter"})," to confirm, ",z(H,{bold:!0,color:"white",children:"Esc"})," to cancel"]})}),G=z(Ku,{footer:O,scrollRef:k,title:`Apply ${String(A.length)} migration${A.length===1?"":"s"}?`,visible:l,width:70,children:A.map(Y=>pe(he,{gap:1,children:[pe(H,{children:[" ",Y.entry.title]}),pe(H,{dimColor:!0,children:["(",Y.preview.length," ","change",Y.preview.length===1?"":"s",")"]})]},Y.entry.id))}),W=z(p3,{checkedItems:o.checkedItems,focused:o.focusedPanel==="list",isDryRun:t,items:o.items,scrollOffset:h,selectedIndex:o.selectedIndex,viewportHeight:m}),ce=z(c3,{focused:o.focusedPanel==="detail",item:b,scrollRef:S});if(w){const Y=Math.floor(i*.55);return pe(he,{flexDirection:"column",height:s,width:i,children:[pe(he,{flexDirection:"row",flexGrow:1,children:[z(he,{flexGrow:1,children:W}),z(he,{width:Y,children:ce})]}),C,G,z(Gm,{autoExitSeconds:e||3,onCancel:f(()=>{p(!1)},"onCancel"),visible:d}),D]})}const te=Math.floor(s*.45);return pe(he,{flexDirection:"column",height:s,width:i,children:[z(he,{height:te,children:W}),z(he,{flexGrow:1,children:ce}),C,G,z(Gm,{autoExitSeconds:e||3,onCancel:f(()=>{p(!1)},"onCancel"),visible:d}),D]})},"VisMigrateApp");var v3=Object.defineProperty,lf=f((e,t)=>v3(e,"name",{value:t,configurable:!0}),"r$r");const b3=/\n([ \t]+)/,$3=lf(e=>{const{indent:t,lineEnding:r}=NS(e),n={};return t!==void 0&&(n.indent=t),(r==="lf"||r==="crlf")&&(n.lineEnding=r),n},"resolveEditorConfigDefaults"),gr=lf((e,t,r={})=>{const{defaultIndent:n=" ",useEditorconfig:i=!0}=r;if(i){const{indent:s}=$3(e);if(s!==void 0)return s}if(t!==void 0){const s=b3.exec(t);if(s?.[1]!==void 0)return s[1]}return n},"resolveIndentForFile"),uf=lf((e,t={})=>{const r=x(e)?J(e):void 0;return gr(e,r,t)},"resolveIndentForExistingFile");var w3=Object.defineProperty,k3=f((e,t)=>w3(e,"name",{value:t,configurable:!0}),"t$l");const B1=[".lintstagedrc.json",".lintstagedrc"],T1=[".lintstagedrc.yaml",".lintstagedrc.yml",".lintstagedrc.mjs","lint-staged.config.mjs",".lintstagedrc.cjs","lint-staged.config.cjs",".lintstagedrc.js","lint-staged.config.js",".lintstagedrc.ts","lint-staged.config.ts",".lintstagedrc.mts","lint-staged.config.mts",".lintstagedrc.cts","lint-staged.config.cts"],pf=[...B1,...T1],S3=[/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)(pnpm|pnpm exec|npx|yarn|yarn run|npm exec|npm run|bunx|bun run|bun x)\s+lint-staged\b/,/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)lint-staged\b/],I1=[".nano-staged.json",".nanostagedrc"],_1=[".nano-staged.mjs",".nano-staged.cjs",".nano-staged.js","nano-staged.config.mjs","nano-staged.config.cjs","nano-staged.config.js","nano-staged.config.mts","nano-staged.config.cts","nano-staged.config.ts"],df=[...I1,..._1],D3=[/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)(pnpm|pnpm exec|npx|yarn|yarn run|npm exec|npm run|bunx|bun run|bun x)\s+nano-staged\b/,/^((?:[A-Z_][A-Z0-9_]*(?:=\S*)?\s+)*)nano-staged\b/],M1=["husky","lint-staged","nano-staged"],C3=/\(is-ci \|\| husky \|\| exit 0\)\s*&&\s*/g,E3=/\bhusky(?:\s+install)?\s*&&\s*/g,A3=/\s*&&\s*husky(?:\s+install)?/g,j3=/\s*\|\|\s*husky(?:\s+install)?/g,O3=[C3,E3,A3,j3],V1=k3(e=>{if(e==="husky"||e==="husky install")return;let t=e;for(const r of O3)t=t.replace(r,"");return t=t.trim(),t===e?e:t||void 0},"cleanHuskyFromScript");var x3=Object.defineProperty,xa=f((e,t)=>x3(e,"name",{value:t,configurable:!0}),"o$p");const P3=/\/$/,N3=xa(e=>{let t='"$0"';for(let r=0;r<e;r+=1)t=`"$(dirname ${t})"`;return t},"nestedDirname"),F3=xa(e=>{const t=e.split("/").filter(r=>r!==""&&r!==".").length+2;return`#!/usr/bin/env sh
|
|
1005
1005
|
{ [ "$VIS_GIT_HOOKS" = "2" ]; } && set -x
|
|
1006
1006
|
n=$(basename "$0")
|
|
1007
1007
|
s=$(dirname "$(dirname "$0")")/$n
|
|
@@ -1194,4 +1194,4 @@ ${wi("vis update available:")} ${Fs(e)} ${wi(tK.arrow)} ${V8(Er(t.latestVersion)
|
|
|
1194
1194
|
`),t.lastNoticeAt=n,lS(t))},"showUpgradeNotice"),lK=ts(e=>{if(Zr||process.env.VIS_CLI_TEST||process.env.VIS_NO_UPDATE_CHECK==="1"||!process.stderr.isTTY||oK.has(e))return!1;const t=new Set(process.argv.slice(2));return!(t.has("--silent")||t.has("-s")||t.has("--json"))},"shouldCheck"),uK=ts((e,t)=>{if(!lK(t))return;const r=aK(),n=Date.now();if(r&&n-r.lastQueryAt<nK)return()=>{Qy(e,r)};let i=r;return cK("@visulima/vis").then(s=>{s&&(i={lastNoticeAt:r?.lastNoticeAt??0,lastQueryAt:n,latestVersion:s},lS(i))}).catch(()=>{}),()=>{i&&Qy(e,i)}},"startUpgradeCheck");var pK=Object.defineProperty,Zy=f((e,t)=>pK(e,"name",{value:t,configurable:!0}),"n");Nx();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");J5();try{const e=A1(process.cwd()).path;process.env.VIS_MONOREPO_ROOT=e;const t=Se(E(e,"package.json"));t.name&&K5(t.name)}catch{}const dK=uK(Oa.version,process.argv[2]??"");$x();const X=qO("vis",{packageName:"vis",packageVersion:Oa.version}),fK=process.argv.includes("--debug")||!!process.env.DEBUG;X.addPlugin(GP({detailed:fK,exitOnError:!1}));X.addGlobalOption({description:"Override workspace root directory",name:"cwd",type:String});X.addGlobalOption({description:"Path to a vis config file (overrides discovery)",name:"config",type:String});X.addPlugin(Q5);X.addPlugin(XJ);X.addCommand(J6);X.addCommand(CB);X.addCommand(tT);X.addCommand(WL);X.addCommand(JL);X.addCommand(S5);X.addCommand(q6);X.addCommand(fT);X.addCommand(N5);X.addCommand(kB);X.addCommand(PT);X.addCommand(iB);X.addCommand(p5);X.addCommand(h5);X.addCommand(y5);X.addCommand($5);X.addCommand(UB);X.addCommand(RT);X.addCommand(E5);X.addCommand(ux);X.addCommand(CT);X.addCommand(qL);X.addCommand(G6);X.addCommand(RB);X.addCommand(I5);X.addCommand(bT);X.addCommand(jT);X.addCommand(O5);X.addCommand(MB);X.addCommand(KB);X.addCommand(V6);X.addCommand(kT);X.addCommand(jB);X.addCommand(PB);X.addCommand(QB);X.addCommand(TB);X.addCommand(L5);X.addCommand(gT);X.addCommand(aB);X.addCommand(uB);X.addCommand(zB);X.addCommand(I6);X.addCommand(X6);X.addCommand(e5);for(const e of uT)X.addCommand(e);for(const e of JT)X.addCommand(e);for(const e of bB)X.addCommand(e);for(const e of O1)X.addCommand(e);for(const e of c5)X.addCommand(e);X.addPlugin(pV(dK));if(ZT(process.argv.slice(2))){const{loadVisConfig:e}=await import("../packem_shared/applyDefaults-DLY94gWA.js"),t=process.env.VIS_MONOREPO_ROOT||process.cwd();let r;try{r=await e(t)}catch{r=void 0}try{await L6({logger:{info:Zy(n=>{process.stdout.write(`${n}
|
|
1195
1195
|
`)},"info"),warn:Zy(n=>{process.stderr.write(`${n}
|
|
1196
1196
|
`)},"warn")},visConfig:r,workspaceRoot:t})}catch(n){process.stderr.write(`${n.message}
|
|
1197
|
-
`),process.exitCode=1}}else(async()=>{try{await X.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}})();export{Pr as $,sS as A,LY as B,hX as C,PY as D,wi as E,KY as F,YY as G,XY as H,DX as I,L7 as J,wX as K,fX as L,yX as M,yM as N,kX as O,$X as P,Bc as Q,VY as R,Tt as S,dM as T,NL as U,GY as V,SX as W,jY as X,wY as Y,kY as Z,Nf as _,yw as a,
|
|
1197
|
+
`),process.exitCode=1}}else(async()=>{try{await X.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}})();export{Pr as $,sS as A,LY as B,hX as C,PY as D,wi as E,KY as F,YY as G,XY as H,DX as I,L7 as J,wX as K,fX as L,yX as M,yM as N,kX as O,$X as P,Bc as Q,VY as R,Tt as S,dM as T,NL as U,GY as V,SX as W,jY as X,wY as Y,kY as Z,Nf as _,yw as a,vY as a$,vX as a0,Oa as a1,mX as a2,vw as a3,B7 as a4,BY as a5,F7 as a6,_Y as a7,Jt as a8,uf as a9,zY as aA,qY as aB,MY as aC,pY as aD,tK as aE,Ic as aF,Bf as aG,Xa as aH,rn as aI,Gm as aJ,qi as aK,en as aL,EY as aM,c8 as aN,DY as aO,$3 as aP,N1 as aQ,fY as aR,hY as aS,gY as aT,yY as aU,mY as aV,ji as aW,gr as aX,R3 as aY,F1 as aZ,I3 as a_,Ep as aa,BJ as ab,W8 as ac,TY as ad,IY as ae,tX as af,Pt as ag,W1 as ah,ng as ai,N6 as aj,lg as ak,fg as al,hy as am,mg as an,ug as ao,ig as ap,og as aq,gg as ar,fy as as,yg as at,lX as au,HY as av,QY as aw,eX as ax,WY as ay,ZY as az,CX as b,xY as b0,lo as b1,OY as b2,k8 as b3,gn as b4,CY as b5,eo as b6,rX as b7,nX as b8,iX as b9,sX as ba,gC as bb,SY as bc,RY as bd,X_ as be,$Y as bf,bY as bg,d$ as bh,nW as bi,Cy as bj,dY as bk,V8 as c,Jl as d,Fs as e,UY as f,JY as g,pX as h,bX as i,Er as j,xf as k,k7 as l,AY as m,NY as n,FY as o,se as p,mn as q,ao as r,Zr as s,co as t,Xt as u,uX as v,gX as w,dX as x,a9 as y,ww as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"./config.js";import{y as v,m as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-
|
|
1
|
+
var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"./config.js";import{y as v,m as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-B4i5yxtP.js";var E=Object.defineProperty,m=d((t,o)=>E(t,"name",{value:o,configurable:!0}),"f");const C=m(async({argument:t,logger:o,options:s,visConfig:w,workspaceRoot:e})=>{const n=t[0];if(!n)throw new Error("Missing subcommand. Usage: vis docker <scaffold|prune>");if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:k,workspace:c}=v(e,w);if(n==="scaffold"){const a=h(e,c,k),r=s.focus;if(!r)throw new Error("Missing --focus. Pass one or more project names, comma-separated.");const f=r.split(",").map(i=>i.trim()).filter(Boolean);if(f.length===0)throw new Error("--focus resolved to an empty list. Provide at least one project name.");const u=l(e,s.out??".vis/docker"),{projects:p}=j({focus:f,includeSources:!!s.includeSources,log:m(i=>o.info(i),"log"),outDir:u,projectGraph:a,pruneLockfile:s.pruneLockfile!==!1,workspace:c,workspaceRoot:e});o.info(`Scaffolded ${p.length} project(s) into ${u}`),o.info(`Focus closure: ${p.toSorted().join(", ")}`);return}if(n==="prune"){const a=l(e,s.context??".vis/docker"),{removed:r}=x({contextRoot:a,workspace:c,workspaceRoot:e});o.info(`Pruned ${r.length} unfocused project(s)`),r.length>0&&o.debug?.(r.join(`
|
|
2
2
|
`));return}throw new Error(`Unknown subcommand: "${n}". Expected scaffold or prune.`)},"execute");export{C as default};
|