@visulima/vis 1.0.0-alpha.14 → 1.0.0-alpha.16
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 +66 -0
- package/LICENSE.md +1023 -277
- package/dist/bin.js +1 -1
- package/dist/config/index.d.ts +121 -94
- package/dist/config/index.js +1 -1
- package/dist/packem_chunks/bin.js +305 -302
- package/dist/packem_chunks/config.js +18 -0
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +5 -5
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +4 -4
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +5 -5
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -1
- package/dist/packem_chunks/handler21.js +18 -1
- package/dist/packem_chunks/handler22.js +1 -5
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +5 -3
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +3 -1
- package/dist/packem_chunks/handler27.js +1 -7
- package/dist/packem_chunks/handler28.js +1 -23
- package/dist/packem_chunks/handler29.js +7 -3
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +23 -18
- package/dist/packem_chunks/handler31.js +3 -1
- package/dist/packem_chunks/handler32.js +1 -2
- package/dist/packem_chunks/handler33.js +2 -25
- package/dist/packem_chunks/handler34.js +25 -2
- package/dist/packem_chunks/handler35.js +3 -3
- package/dist/packem_chunks/handler36.js +20 -20
- package/dist/packem_chunks/handler37.js +3 -3
- package/dist/packem_chunks/handler38.js +4 -4
- package/dist/packem_chunks/handler39.js +11 -11
- package/dist/packem_chunks/handler40.js +5 -5
- package/dist/packem_chunks/handler41.js +10 -24
- package/dist/packem_chunks/handler42.js +24 -10
- package/dist/packem_chunks/handler43.js +5 -5
- package/dist/packem_chunks/handler44.js +6 -6
- package/dist/packem_chunks/handler45.js +3 -3
- package/dist/packem_chunks/handler46.js +11 -11
- package/dist/packem_chunks/handler47.js +161 -36
- package/dist/packem_chunks/handler48.js +6 -6
- package/dist/packem_chunks/handler5.js +5 -5
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +2 -2
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +16 -16
- package/dist/packem_chunks/index.js +2 -2
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/tar.js +1 -1
- package/dist/packem_shared/{ai-analysis-Dzs_nUwM.js → ai-analysis-C_GpXikx.js} +3 -3
- package/dist/packem_shared/ai-cache-DrCLD4gc.js +1 -0
- package/dist/packem_shared/ai-fix-CWOz12Om.js +43 -0
- package/dist/packem_shared/applyDefaults-DLY94gWA.js +1 -0
- package/dist/packem_shared/cache-directory-C_U1qsIw.js +1 -0
- package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
- package/dist/packem_shared/dependency-scan-YdgNVvoz.js +2 -0
- package/dist/packem_shared/docker-Dl0AoVTZ.js +60 -0
- package/dist/packem_shared/failure-log-CSC6KfcO.js +2 -0
- package/dist/packem_shared/flakiness-Dzz-I3dB.js +1 -0
- package/dist/packem_shared/{giget-BX2ixMoa.js → giget-CcEy_Elm.js} +2 -2
- package/dist/packem_shared/lifecycle-BC6Nst6i.js +2 -0
- package/dist/packem_shared/lockfile-i-qvq_k8.js +1 -0
- package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
- package/dist/packem_shared/readTomlSync-1fKo0R52-DtxWULlF.js +109 -0
- package/dist/packem_shared/run-summary-utils-CJv75pla.js +1 -0
- package/dist/packem_shared/runtime-check-CBU6W8qG.js +1 -0
- package/dist/packem_shared/{selectors-BvtUXWGY.js → selectors-B2ISH581.js} +1 -1
- package/dist/packem_shared/toolchain-B7dckBQ1.js +5 -0
- package/dist/packem_shared/typosquats-B3A38-qx.js +1 -0
- package/dist/packem_shared/verify-WDStBFvK.js +1 -0
- package/dist/packem_shared/vis-update-app-D0uL3eO5.js +1 -0
- package/package.json +13 -15
- package/schemas/project.schema.json +12 -2
- package/schemas/vis-config.schema.json +248 -3
- package/dist/packem_chunks/applyDefaults.js +0 -2
- package/dist/packem_shared/ai-cache-Dtvmbsru.js +0 -1
- package/dist/packem_shared/ai-fix-BmLM72GS.js +0 -43
- package/dist/packem_shared/cache-directory-xASJia6M.js +0 -1
- package/dist/packem_shared/dependency-scan-DmwPKwLy.js +0 -2
- package/dist/packem_shared/docker-CA-scYu0.js +0 -2
- package/dist/packem_shared/failure-log-fD4DiFb1.js +0 -2
- package/dist/packem_shared/flakiness-BIg1rwvp.js +0 -1
- package/dist/packem_shared/index-OlP7U_t5.js +0 -6
- package/dist/packem_shared/lockfile-BXylopgH.js +0 -1
- package/dist/packem_shared/otelPlugin-y5hoCw4b.js +0 -1
- package/dist/packem_shared/registry-BHqKXiLb.js +0 -2
- package/dist/packem_shared/run-summary-utils-D39XBHWW.js +0 -1
- package/dist/packem_shared/runtime-check-BaKni2y1.js +0 -1
- package/dist/packem_shared/toolchain-B7sIiJxK.js +0 -5
- package/dist/packem_shared/typosquats-XkC1CnOa.js +0 -1
- package/dist/packem_shared/verify-BVTcVfoW.js +0 -1
- package/dist/packem_shared/vis-update-app-DR8c4OfG.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var fe=Object.defineProperty;var T=(s,l)=>fe(s,"name",{value:l,configurable:!0});import{jsxs as t,jsx as r,Fragment as Z}from"react/jsx-runtime";import{Box as i}from"@visulima/tui/components/box";import{Spinner as we}from"@visulima/tui/components/spinner";import{Text as e}from"@visulima/tui/components/text";import{useWindowSize as se}from"@visulima/tui/hooks/use-window-size";import{useSyncExternalStore as ye,useState as L,useRef as z,useMemo as be,useCallback as he,useEffect as Ce}from"react";import{Dialog as ee}from"@visulima/tui/components/dialog";import{useApp as ke}from"@visulima/tui/hooks/use-app";import{useInput as xe}from"@visulima/tui/hooks/use-input";import{B as ue,aJ as ae}from"../packem_chunks/bin.js";import{ScrollView as Te}from"@visulima/tui/components/scroll-view";import{ScrollBar as Se}from"@visulima/tui/components/scroll-bar";import{Tab as ve}from"@visulima/tui/components/tab";import{Tabs as Ae}from"@visulima/tui/components/tabs";import{u as Re}from"./use-measured-height-DjYgUOKk.js";var Ee=Object.defineProperty,Ie=T((s,l)=>Ee(s,"name",{value:l,configurable:!0}),"a$1");const pr=Ie(({current:s,total:l})=>{const{columns:h}=se(),c=h||80,p=l>0?Math.min(1,s/l):0,a=`${String(Math.round(p*100)).padStart(3)}%`,y=`${String(s)}/${String(l)}`,b=Math.max(10,c-2-a.length-1),m=Math.round(b*p),f=b-m;return t(i,{flexDirection:"column",paddingX:1,children:[t(i,{children:[r(we,{type:"dots"}),r(e,{children:" Checking catalog dependencies "}),r(e,{dimColor:!0,children:y})]}),t(i,{children:[r(e,{color:"cyan",children:"━".repeat(m)}),r(e,{dimColor:!0,children:"─".repeat(f)}),t(e,{dimColor:!0,children:[" ",a]})]})]})},"CheckProgressApp");var De=Object.defineProperty,H=T((s,l)=>De(s,"name",{value:l,configurable:!0}),"r");const W=H(s=>{const l=new Map;for(const h of s){const c=l.get(h.catalogName);c?c.push(h):l.set(h.catalogName,[h])}return l},"groupByCatalog"),Q=H((s,l,h)=>{let c=s;if(l!=="all"&&(c=l==="security"?c.filter(p=>p.vulnerabilities&&p.vulnerabilities.length>0||p.socketReport&&p.socketReport.alerts.length>0):c.filter(p=>p.updateType===l)),h){const p=h.toLowerCase();c=c.filter(a=>a.packageName.toLowerCase().includes(p))}return c},"filterEntries");class gr{static{T(this,"UpdateStore")}static{H(this,"UpdateStore")}#e;#l=new Set;#t;#i=null;constructor(l,h=null){this.#t=l,h&&(this.#i=new Map(h.recommendations.map(c=>[c.package,c]))),this.#e={aiResult:h,allChecked:!0,applyProgress:null,checkedEntries:new Set(l.map(c=>c.packageName)),entries:l,error:null,filterActive:!1,filterText:"",filterType:"all",focusedPanel:"list",groupedByCatalog:W(l),phase:"browsing",selectedIndex:0}}getSnapshot=H(()=>this.#e,"getSnapshot");subscribe=H(l=>(this.#l.add(l),()=>{this.#l.delete(l)}),"subscribe");getFilteredEntries(){return Q(this.#t,this.#e.filterType,this.#e.filterText)}getRecommendation(l){return this.#i?.get(l)}getCheckedEntries(){return this.#t.filter(l=>this.#e.checkedEntries.has(l.packageName))}setSelectedIndex(l){const h=this.getFilteredEntries(),c=Math.max(0,Math.min(l,h.length-1));c!==this.#e.selectedIndex&&this.#r({...this.#e,selectedIndex:c})}setFocusedPanel(l){l!==this.#e.focusedPanel&&this.#r({...this.#e,focusedPanel:l})}setFilterType(l){if(l!==this.#e.filterType){const h=Q(this.#t,l,this.#e.filterText);this.#r({...this.#e,entries:h,filterType:l,groupedByCatalog:W(h),selectedIndex:0})}}setFilter(l){const h=Q(this.#t,this.#e.filterType,l);this.#r({...this.#e,entries:h,filterText:l,groupedByCatalog:W(h),selectedIndex:0})}setFilterActive(l){if(l!==this.#e.filterActive)if(l)this.#r({...this.#e,filterActive:!0});else{const h=Q(this.#t,this.#e.filterType,"");this.#r({...this.#e,entries:h,filterActive:!1,filterText:"",groupedByCatalog:W(h),selectedIndex:0})}}toggleCheck(l){const h=new Set(this.#e.checkedEntries);h.has(l)?h.delete(l):h.add(l),this.#r({...this.#e,allChecked:h.size===this.#t.length,checkedEntries:h})}checkAll(){this.#r({...this.#e,allChecked:!0,checkedEntries:new Set(this.#t.map(l=>l.packageName))})}uncheckAll(){this.#r({...this.#e,allChecked:!1,checkedEntries:new Set})}toggleAll(){this.#e.allChecked?this.uncheckAll():this.checkAll()}startApply(){const l=this.getCheckedEntries();this.#r({...this.#e,applyProgress:{current:0,total:l.length},phase:"applying"})}updateApplyProgress(l){this.#e.applyProgress&&this.#r({...this.#e,applyProgress:{...this.#e.applyProgress,current:l}})}markDone(){this.#r({...this.#e,phase:"done"})}setError(l){this.#r({...this.#e,error:l,phase:"error"})}#r(l){this.#e=l;for(const h of this.#l)try{h()}catch{}}}var Be=Object.defineProperty,Ne=T((s,l)=>Be(s,"name",{value:l,configurable:!0}),"d");const Pe={major:"red",minor:"yellow",patch:"green"},Le={CRITICAL:"red",HIGH:"red",LOW:"gray",MODERATE:"yellow",UNKNOWN:"gray"},Me={critical:"red",high:"red",low:"gray",medium:"yellow"},je={critical:"red",high:"red",low:"green",medium:"yellow"},$e={defer:"gray",review:"yellow",skip:"red",update:"green"},Fe=Ne(({changelogUrl:s,entry:l,focused:h,recommendation:c,scrollRef:p})=>{const a=h?"white":"gray";if(!l)return r(i,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:r(e,{dimColor:!0,children:"No package selected"})});const y=Pe[l.updateType]??"white",b=l.vulnerabilities&&l.vulnerabilities.length>0,m=l.socketReport?.score.overall??0,f=l.socketReport?ue(m):"gray";return t(i,{borderColor:a,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[r(i,{flexShrink:0,paddingTop:1,paddingX:2,children:r(e,{bold:!0,color:"white",children:l.packageName})}),t(Te,{flexGrow:1,flexShrink:1,paddingX:2,ref:p,scrollbar:!0,scrollbarColor:"gray",scrollbarStyle:"block",children:[r(e,{}),t(i,{children:[r(i,{width:12,children:r(e,{dimColor:!0,children:"Current:"})}),r(e,{children:l.currentRange})]}),t(i,{children:[r(i,{width:12,children:r(e,{dimColor:!0,children:"Target:"})}),r(e,{children:l.newRange}),t(e,{bold:!0,color:y,children:[" ","(",l.updateType,")"]})]}),t(i,{children:[r(i,{width:12,children:r(e,{dimColor:!0,children:"Version:"})}),r(e,{children:l.targetVersion})]}),t(i,{children:[r(i,{width:12,children:r(e,{dimColor:!0,children:"Catalog:"})}),r(e,{children:l.catalogName})]}),l.acceptedRisk&&t(i,{flexDirection:"column",marginTop:1,children:[r(e,{color:"gray",children:"── "}),r(e,{bold:!0,color:"gray",children:"ACKNOWLEDGED RISK"}),t(i,{flexDirection:"column",paddingLeft:2,children:[t(i,{children:[r(e,{dimColor:!0,children:"Reason: "}),r(e,{children:l.acceptedRisk.reason})]}),t(i,{children:[r(e,{dimColor:!0,children:"Accepted: "}),r(e,{children:l.acceptedRisk.acceptedAt.slice(0,10)})]})]})]}),b&&t(i,{flexDirection:"column",marginTop:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"red",children:"SECURITY"}),r(e,{}),l.vulnerabilities.map(o=>t(i,{flexDirection:"column",marginBottom:1,children:[t(i,{gap:1,children:[t(e,{bold:!0,color:Le[o.severity]??"gray",children:["⚠"," ",o.severity]}),r(e,{bold:!0,children:o.id})]}),r(i,{paddingLeft:2,children:r(e,{children:o.summary})}),t(i,{gap:2,paddingLeft:2,children:[o.cvssScore!==void 0&&t(e,{dimColor:!0,children:["CVSS:",String(o.cvssScore)]}),o.fixedVersions.length>0&&t(e,{dimColor:!0,children:["Fixed in:",o.fixedVersions.join(", ")]})]})]},o.id))]}),l.socketReport&&t(i,{flexDirection:"column",marginTop:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"cyan",children:"SOCKET.DEV"}),r(e,{}),t(i,{gap:2,children:[t(i,{children:[r(e,{dimColor:!0,children:"Overall: "}),t(e,{bold:!0,color:f,children:[String(Math.round(m*100)),"%"]})]}),t(i,{children:[r(e,{dimColor:!0,children:"Supply Chain: "}),t(e,{children:[String(Math.round(l.socketReport.score.supplyChain*100)),"%"]})]}),t(i,{children:[r(e,{dimColor:!0,children:"Quality: "}),t(e,{children:[String(Math.round(l.socketReport.score.quality*100)),"%"]})]})]}),t(i,{gap:2,children:[t(i,{children:[r(e,{dimColor:!0,children:"Maintenance: "}),t(e,{children:[String(Math.round(l.socketReport.score.maintenance*100)),"%"]})]}),t(i,{children:[r(e,{dimColor:!0,children:"Vulnerability: "}),t(e,{children:[String(Math.round(l.socketReport.score.vulnerability*100)),"%"]})]}),t(i,{children:[r(e,{dimColor:!0,children:"License: "}),t(e,{children:[l.socketReport.license||"unknown"," ","(",String(Math.round(l.socketReport.score.license*100)),"%)"]})]})]}),l.socketReport.alerts.length>0&&t(i,{flexDirection:"column",marginTop:1,children:[t(e,{bold:!0,color:"yellow",children:["⚠"," ",String(l.socketReport.alerts.length)," ","alert",l.socketReport.alerts.length===1?"":"s",":"]}),l.socketReport.alerts.map(o=>t(i,{gap:1,paddingLeft:2,children:[t(e,{bold:!0,color:Me[o.severity]??"gray",children:["[",o.severity.toUpperCase(),"]"]}),r(e,{children:o.type}),t(e,{dimColor:!0,children:["(",o.category,")"]})]},o.key))]})]}),c&&t(i,{flexDirection:"column",marginTop:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"AI ANALYSIS"}),r(e,{}),t(i,{gap:2,children:[t(i,{children:[r(e,{dimColor:!0,children:"Action: "}),r(e,{bold:!0,color:$e[c.action]??"white",children:c.action})]}),t(i,{children:[r(e,{dimColor:!0,children:"Risk: "}),r(e,{bold:!0,color:je[c.riskLevel]??"white",children:c.riskLevel})]}),t(i,{children:[r(e,{dimColor:!0,children:"Effort: "}),r(e,{bold:!0,children:c.effort})]})]}),c.reason&&r(i,{marginTop:1,paddingLeft:2,children:r(e,{children:c.reason})}),c.breakingChanges.length>0&&t(i,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[r(e,{bold:!0,color:"yellow",children:"Breaking changes:"}),c.breakingChanges.map((o,I)=>t(e,{children:[" ","•"," ",o]},String(I)))]})]}),s&&t(i,{flexDirection:"column",marginTop:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"CHANGELOG"}),r(i,{marginTop:1,paddingLeft:2,children:r(e,{color:"cyan",underline:!0,children:s})})]}),t(i,{flexDirection:"column",marginTop:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"LINKS"}),r(i,{flexDirection:"column",marginTop:1,paddingLeft:2,children:t(e,{color:"cyan",underline:!0,children:["https://npmx.dev/",l.packageName]})})]}),!c&&t(i,{flexDirection:"column",marginTop:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"GUIDANCE"}),t(i,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[l.updateType==="major"&&t(Z,{children:[t(e,{color:"red",children:["⚠"," ","Major update — likely contains breaking changes."]}),r(e,{dimColor:!0,children:" Review the changelog before updating."}),r(e,{dimColor:!0,children:" Use --changelog to fetch release URLs."})]}),l.updateType==="minor"&&t(Z,{children:[t(e,{color:"yellow",children:["ℹ"," ","Minor update — new features, backward compatible."]}),r(e,{dimColor:!0,children:" Generally safe to update."})]}),l.updateType==="patch"&&t(Z,{children:[t(e,{color:"green",children:["✓"," ","Patch update — bug fixes only."]}),r(e,{dimColor:!0,children:" Safe to update."})]}),!c&&r(e,{dimColor:!0,children:" Use --ai to get AI-powered analysis."})]})]})]})]})},"PackageDetailPanel");var Oe=Object.defineProperty,re=T((s,l)=>Oe(s,"name",{value:l,configurable:!0}),"x");const Ue={major:"red",minor:"yellow",patch:"green"},Ge=[{id:"all",label:"All"},{id:"major",label:"Major"},{id:"minor",label:"Minor"},{id:"patch",label:"Patch"},{id:"security",label:"Security"}],He=re(({checked:s,entry:l,isSelected:h})=>{const c=Ue[l.updateType]??"white",p=l.vulnerabilities&&l.vulnerabilities.length>0,a=l.socketReport&&l.socketReport.alerts.length>0,y=!!l.acceptedRisk,b=s?"☑":"☐",m=l.socketReport?`${String(Math.round(l.socketReport.score.overall*100))}%`:"",f=l.socketReport?ue(l.socketReport.score.overall):"gray";return t(i,{flexShrink:0,height:1,children:[r(e,{children:h?">":" "}),t(e,{color:s?"white":"gray",children:[" ",b," "]}),p||a?r(e,{color:y?"gray":"red",children:y?"✓ ":"⚠ "}):r(e,{children:" "}),r(i,{flexGrow:1,children:t(e,{bold:h,inverse:h,wrap:"truncate",children:[l.packageName,y?" [ack]":""]})}),m&&t(e,{color:f,children:[" ",m]}),t(e,{dimColor:!0,children:[" ",l.currentRange]}),t(e,{dimColor:!0,children:[" ","→"," "]}),t(e,{children:[l.newRange," "]}),r(e,{bold:!0,color:c,children:l.updateType})]})},"PackageRow"),Ve=re(({count:s,name:l})=>t(i,{flexShrink:0,height:1,marginTop:1,children:[t(e,{dimColor:!0,children:["▼"," "]}),r(e,{bold:!0,color:"white",children:l.toUpperCase()}),t(e,{dimColor:!0,children:[" ","(",s,")"]})]}),"CatalogHeader"),qe=re(({checkedEntries:s,entries:l,filterActive:h,filteredOutCount:c,filterText:p,filterType:a,focused:y,groupedByCatalog:b,isDryRun:m,onViewportHeightChange:f,scrollOffset:o,selectedIndex:I,totalCatalogEntries:D,totalChecked:v,totalEntries:V,viewportHeight:M})=>{const j=y?"white":"gray",{measuredHeight:w,ref:A}=Re(M,f);let $=0,S=0,B=0,R=0;for(const g of l)g.updateType==="major"?$++:g.updateType==="minor"?S++:B++,(g.vulnerabilities&&g.vulnerabilities.length>0||g.socketReport&&g.socketReport.alerts.length>0)&&R++;const k=[];$>0&&k.push(`${$} major`),S>0&&k.push(`${S} minor`),B>0&&k.push(`${B} patch`),R>0&&k.push(`${R} vulnerable`);const N=k.length>0?` (${k.join(", ")})`:"";let x=0;for(const g of l)s.has(g.packageName)&&x++;const C=[];let q=0;for(const[g,E]of b){C.push(r(Ve,{count:E.length,name:g},`hdr-${g}`));for(const O of E){const P=q;C.push(r(He,{checked:s.has(O.packageName),entry:O,isSelected:P===I},O.packageName)),q++}}let F=0;for(const[,g]of b)F+=2+g.length;const K=F>w&&w>0;return t(i,{borderColor:j,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[t(i,{flexShrink:0,gap:1,paddingX:1,children:[r(e,{bold:!0,inverse:!0,children:" VIS "}),t(e,{wrap:"truncate",children:[V,v>0?`/${v}`:""," ","outdated",N,D>v?` · ${D-v} dupes`:""]}),!m&&x>0&&t(e,{dimColor:!0,children:[" ","—",x," ","selected"]})]}),r(i,{flexShrink:0,paddingX:1,paddingY:1,children:r(Ae,{isFocused:y,keyMap:{next:[],previous:[],useNumbers:!1,useTab:!1},onChange:T(()=>{},"onChange"),showIndex:!1,value:a,children:Ge.map(({id:g,label:E})=>r(ve,{name:g,children:E},g))})}),h&&t(i,{flexShrink:0,paddingX:1,children:[r(e,{bold:!0,color:"white",children:"/ "}),r(e,{children:p}),r(e,{inverse:!0,children:" "})]}),c>0&&r(i,{flexShrink:0,paddingX:1,children:t(e,{color:"yellow",children:["⚠"," ",c," ","package",c===1?"":"s"," ","filtered out by target constraint — press"," ",r(e,{bold:!0,color:"white",children:"f"})," ","to view"]})}),t(i,{flexDirection:"row",flexGrow:1,overflow:"hidden",ref:A,children:[r(i,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:r(i,{flexDirection:"column",marginTop:-o,children:C})}),K&&r(i,{flexShrink:0,marginLeft:1,marginRight:1,children:r(Se,{contentHeight:F,placement:"inset",scrollOffset:o,style:"block",viewportHeight:w})})]},`list-${a}-${p}`)]})},"PackageListPanel");var Ke=Object.defineProperty,Xe=T((s,l)=>Ke(s,"name",{value:l,configurable:!0}),"X");const Ye=100,ze=40,We=10,Qe=[],G=["all","major","minor","patch","security"],mr=Xe(({autoExitSeconds:s=0,changelogUrls:l,checkedCount:h=0,filteredOutEntries:c=Qe,isDryRun:p,store:a,totalCatalogEntries:y=0})=>{const{exit:b}=ke(),{columns:m,rows:f}=se(),o=ye(a.subscribe,a.getSnapshot),[I,D]=L(!1),[v,V]=L(!1),M=z(null),j=z(null),w=z(null),A=z(null),[$,S]=L(0),[B,R]=L(!1),[k,N]=L(!1),x=be(()=>a.getFilteredEntries(),[o.entries,o.filterType,o.filterText]),C=x[o.selectedIndex]??null,q=C?a.getRecommendation(C.packageName):void 0,F=C&&l?l.get(C.packageName):void 0,K=he(n=>{let d=0,u=0;for(const[,J]of o.groupedByCatalog){d+=2;for(let de=0;de<J.length;de++){if(u===n)return d;d+=1,u++}}return d},[o.groupedByCatalog]),g=Math.max(1,f-8-(o.filterActive?1:0)),[E,O]=L(g),P=E>0?E:g,U=he(n=>{const d=K(n);S(u=>d>u+P-2?Math.max(0,d-P+2):d<u+1?Math.max(0,d-1):u)},[K,P]);if(Ce(()=>{w.current?.scrollToTop()},[C?.packageName]),xe((n,d)=>{if(n==="c"&&d.ctrl){b();return}if(!k){if(v){d.escape||n==="f"||n==="q"?V(!1):d.downArrow||n==="j"?j.current?.scrollBy(1):(d.upArrow||n==="k")&&j.current?.scrollBy(-1);return}if(B){n==="u"||d.return?(R(!1),a.startApply(),b(a.getCheckedEntries())):d.escape||n==="q"?R(!1):d.downArrow||n==="j"?A.current?.scrollBy(1):d.upArrow||n==="k"?A.current?.scrollBy(-1):d.pageDown?A.current?.scrollBy(5):d.pageUp&&A.current?.scrollBy(-5);return}if(I){d.escape||n==="?"?D(!1):n==="q"?(D(!1),N(!0)):d.downArrow||n==="j"?M.current?.scrollBy(1):(d.upArrow||n==="k")&&M.current?.scrollBy(-1);return}if(n==="?"){D(!0);return}if(n==="q"){N(!0);return}if(d.tab){a.setFocusedPanel(o.focusedPanel==="list"?"detail":"list");return}if(o.focusedPanel==="list"&&(d.leftArrow||d.rightArrow)){const u=G.indexOf(o.filterType),J=d.rightArrow?(u+1)%G.length:(u-1+G.length)%G.length;S(0),w.current?.scrollToTop(),a.setFilterType(G[J]);return}if(n==="f"&&c.length>0){V(u=>!u);return}if(o.filterActive){if(d.escape){a.setFilterActive(!1);return}if(d.return){a.setFilterActive(!1);return}if(d.backspace){S(0),a.setFilter(o.filterText.slice(0,-1));return}if(n&&!d.ctrl&&!d.meta){S(0),a.setFilter(o.filterText+n);return}return}if(o.focusedPanel==="list"){if(d.downArrow||n==="j"){const u=Math.min(o.selectedIndex+1,x.length-1);a.setSelectedIndex(u),U(u);return}if(d.upArrow||n==="k"){const u=Math.max(o.selectedIndex-1,0);a.setSelectedIndex(u),U(u);return}if(d.pageDown){const u=Math.min(o.selectedIndex+10,x.length-1);a.setSelectedIndex(u),U(u);return}if(d.pageUp){const u=Math.max(o.selectedIndex-10,0);a.setSelectedIndex(u),U(u);return}if(d.home){a.setSelectedIndex(0),S(0);return}if(d.end){const u=x.length-1;a.setSelectedIndex(u),U(u);return}if(n===" "||d.return){C&&a.toggleCheck(C.packageName);return}if(n==="a"){a.toggleAll();return}if(n==="/"){a.setFilterActive(!0);return}if(n==="u"&&!p&&o.checkedEntries.size>0){R(!0);return}if(d.rightArrow){a.setFocusedPanel("detail");return}return}if(o.focusedPanel==="detail"){if(d.escape||d.leftArrow){a.setFocusedPanel("list");return}if(d.downArrow||n==="j"){w.current?.scrollBy(1);return}if(d.upArrow||n==="k"){w.current?.scrollBy(-1);return}if(d.pageDown){w.current?.scrollBy(10);return}if(d.pageUp){w.current?.scrollBy(-10);return}if(d.home){w.current?.scrollToTop();return}d.end&&w.current?.scrollToBottom()}}},{isActive:!0}),m<ze||f<We)return r(i,{alignItems:"center",height:f,justifyContent:"center",width:m,children:t(e,{color:"yellow",children:["Terminal too small (",m,"x",f,")"]})});const pe=m>=Ye,X=[t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"q"}),r(e,{dimColor:!0,children:"QUIT"})]},"q"),t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"?"}),r(e,{dimColor:!0,children:"HELP"})]},"?"),t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"↑↓"}),r(e,{dimColor:!0,children:"NAV"})]},"nav"),t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"Space"}),r(e,{dimColor:!0,children:"CHECK"})]},"sp"),t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"a"}),r(e,{dimColor:!0,children:"ALL"})]},"a")];!p&&o.checkedEntries.size>0&&X.push(t(i,{gap:1,children:[r(e,{bold:!0,color:"green",children:"u"}),r(e,{dimColor:!0,children:"APPLY"})]},"u")),c.length>0&&X.push(t(i,{gap:1,children:[r(e,{bold:!0,color:"yellow",children:"f"}),t(e,{dimColor:!0,children:["FILTERED (",c.length,")"]})]},"fo")),X.push(t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"←→"}),r(e,{dimColor:!0,children:"FILTER"})]},"lr"),t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"/"}),r(e,{dimColor:!0,children:"SEARCH"})]},"f"),t(i,{gap:1,children:[r(e,{bold:!0,color:"white",children:"Tab"}),r(e,{dimColor:!0,children:"PANEL"})]},"t"));const te=r(i,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:r(i,{flexWrap:"wrap",gap:2,paddingX:1,children:X})}),le=t(ee,{footer:t(e,{dimColor:!0,children:[r(e,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",r(e,{bold:!0,color:"white",children:"?"}),"/",r(e,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:M,title:"KEYBOARD SHORTCUTS",visible:I,width:52,children:[t(i,{flexDirection:"column",marginBottom:1,children:[t(i,{marginBottom:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"NAVIGATION"})]}),t(i,{children:[r(i,{width:24,children:t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","↑","/k"]}),r(e,{dimColor:!0,children:" Move up"})]})}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","↓","/j"]}),r(e,{dimColor:!0,children:" Move down"})]})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","Tab"]}),r(e,{dimColor:!0,children:" Switch panel"})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","→","/","←"]}),r(e,{dimColor:!0,children:" Focus detail/list"})]})]}),t(i,{flexDirection:"column",marginBottom:1,children:[t(i,{marginBottom:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"SELECTION"})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","Space"]}),r(e,{dimColor:!0,children:" Toggle check on package"})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","a"]}),r(e,{dimColor:!0,children:" Toggle check all"})]})]}),t(i,{flexDirection:"column",marginBottom:1,children:[t(i,{marginBottom:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"FILTERS"})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","←→"]}),r(e,{dimColor:!0,children:" Switch filter tab"})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","/"]}),r(e,{dimColor:!0,children:" Text filter"})]}),c.length>0&&t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","f"]}),r(e,{dimColor:!0,children:" View filtered-out packages"})]})]}),t(i,{flexDirection:"column",children:[t(i,{marginBottom:1,children:[r(e,{dimColor:!0,children:"── "}),r(e,{bold:!0,color:"white",children:"ACTIONS"})]}),!p&&t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","u"]}),r(e,{dimColor:!0,children:" Apply selected updates"})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","q"]}),r(e,{dimColor:!0,children:" Quit"})]}),t(e,{children:[t(e,{bold:!0,color:"white",children:[" ","?"]}),r(e,{dimColor:!0,children:" Toggle help"})]})]})]}),Y=a.getCheckedEntries(),_=Y.filter(n=>n.updateType==="major").length,ge=t(i,{alignItems:"center",flexDirection:"column",children:[_>0&&r(i,{marginBottom:1,marginTop:1,children:t(e,{color:"yellow",children:["⚠"," ",_," ","major update",_===1?"":"s"," ","— review breaking changes"]})}),t(e,{dimColor:!0,children:["Press"," ",r(e,{bold:!0,color:"white",children:"u"})," ","or"," ",r(e,{bold:!0,color:"white",children:"Enter"})," ","to confirm,"," ",r(e,{bold:!0,color:"white",children:"Esc"})," ","to cancel"]})]}),ie=r(ee,{footer:ge,scrollRef:A,title:`Apply ${Y.length} update${Y.length===1?"":"s"}?`,visible:B,width:70,children:Y.map(n=>t(i,{gap:1,children:[t(e,{children:[" ",n.packageName]}),t(e,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),r(e,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))}),oe=c.length>0?r(ee,{footer:t(e,{dimColor:!0,children:[r(e,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",r(e,{bold:!0,color:"white",children:"f"}),"/",r(e,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:j,title:`${c.length} PACKAGE${c.length===1?"":"S"} FILTERED BY TARGET`,visible:v,width:70,children:t(i,{flexDirection:"column",children:[r(i,{marginBottom:1,children:t(e,{dimColor:!0,children:["These packages have newer versions available but are excluded by the current target constraint. Use"," ",r(e,{bold:!0,color:"white",children:"--target latest"})," ","to include them."]})}),c.map(n=>t(i,{gap:1,children:[t(e,{children:[" ",n.packageName]}),t(e,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),r(e,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))]})}):null,ne=r(qe,{checkedEntries:o.checkedEntries,entries:x,filterActive:o.filterActive,filteredOutCount:c.length,filterText:o.filterText,filterType:o.filterType,focused:o.focusedPanel==="list",groupedByCatalog:o.groupedByCatalog,isDryRun:p,onViewportHeightChange:O,scrollOffset:$,selectedIndex:o.selectedIndex,totalCatalogEntries:y,totalChecked:h,totalEntries:x.length,viewportHeight:P}),ce=r(Fe,{changelogUrl:F,entry:C,focused:o.focusedPanel==="detail",recommendation:q,scrollRef:w});if(pe){const n=Math.floor(m*.35);return t(i,{flexDirection:"column",height:f,width:m,children:[t(i,{flexDirection:"row",flexGrow:1,children:[r(i,{flexGrow:1,children:ne}),r(i,{width:n,children:ce})]}),te,ie,oe,r(ae,{autoExitSeconds:s||3,onCancel:T(()=>{N(!1)},"onCancel"),visible:k}),le]})}const me=Math.floor(f*.55);return t(i,{flexDirection:"column",height:f,width:m,children:[r(i,{height:me,children:ne}),r(i,{flexGrow:1,children:ce}),te,ie,oe,r(ae,{autoExitSeconds:s||3,onCancel:T(()=>{N(!1)},"onCancel"),visible:k}),le]})},"VisUpdateApp");export{mr as C,gr as U,pr as a};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/vis",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.16",
|
|
4
4
|
"description": "A CLI task runner for monorepo workspaces, powered by @visulima/task-runner",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -76,17 +76,15 @@
|
|
|
76
76
|
"LICENSE.md"
|
|
77
77
|
],
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@visulima/find-cache-dir": "3.0.0-alpha.9",
|
|
80
|
-
"@visulima/fs": "5.0.0-alpha.16",
|
|
81
79
|
"@visulima/secret-scanner": "1.0.0-alpha.1",
|
|
82
|
-
"@visulima/task-runner": "1.0.0-alpha.
|
|
83
|
-
"@visulima/tui": "1.0.0-alpha.
|
|
84
|
-
"execa": "^9.6.1",
|
|
80
|
+
"@visulima/task-runner": "1.0.0-alpha.11",
|
|
81
|
+
"@visulima/tui": "1.0.0-alpha.11",
|
|
85
82
|
"jiti": "^2.7.0",
|
|
86
83
|
"module-replacements": "^2.11.0",
|
|
87
84
|
"module-replacements-codemods": "^1.2.1",
|
|
88
85
|
"react": "19.2.6",
|
|
89
|
-
"react-reconciler": ">=0.33.0"
|
|
86
|
+
"react-reconciler": ">=0.33.0",
|
|
87
|
+
"tinyexec": "^1.1.2"
|
|
90
88
|
},
|
|
91
89
|
"peerDependencies": {
|
|
92
90
|
"@gitbeaker/rest": ">=43.8.0",
|
|
@@ -101,14 +99,14 @@
|
|
|
101
99
|
}
|
|
102
100
|
},
|
|
103
101
|
"optionalDependencies": {
|
|
104
|
-
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.
|
|
105
|
-
"@visulima/vis-binding-linux-arm64-gnu": "1.0.0-alpha.
|
|
106
|
-
"@visulima/vis-binding-
|
|
107
|
-
"@visulima/vis-binding-
|
|
108
|
-
"@visulima/vis-binding-linux-x64-gnu": "1.0.0-alpha.
|
|
109
|
-
"@visulima/vis-binding-
|
|
110
|
-
"@visulima/vis-binding-
|
|
111
|
-
"@visulima/vis-binding-win32-
|
|
102
|
+
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.16",
|
|
103
|
+
"@visulima/vis-binding-linux-arm64-gnu": "1.0.0-alpha.16",
|
|
104
|
+
"@visulima/vis-binding-linux-arm64-musl": "1.0.0-alpha.16",
|
|
105
|
+
"@visulima/vis-binding-darwin-x64": "1.0.0-alpha.16",
|
|
106
|
+
"@visulima/vis-binding-linux-x64-gnu": "1.0.0-alpha.16",
|
|
107
|
+
"@visulima/vis-binding-win32-arm64-msvc": "1.0.0-alpha.16",
|
|
108
|
+
"@visulima/vis-binding-linux-x64-musl": "1.0.0-alpha.16",
|
|
109
|
+
"@visulima/vis-binding-win32-x64-msvc": "1.0.0-alpha.16"
|
|
112
110
|
},
|
|
113
111
|
"engines": {
|
|
114
112
|
"node": "^22.14.0 || >=24.10.0"
|
|
@@ -64,9 +64,11 @@
|
|
|
64
64
|
"type": "string",
|
|
65
65
|
"enum": [
|
|
66
66
|
"application",
|
|
67
|
-
"library"
|
|
67
|
+
"library",
|
|
68
|
+
"service",
|
|
69
|
+
"tool"
|
|
68
70
|
],
|
|
69
|
-
"description": "Project type — library or application."
|
|
71
|
+
"description": "Project type — `library`, `application`, `service`, or `tool`.\n\n- `library` — reusable code consumed by other workspace projects.\n- `application` — end-user-facing build target (web app, mobile app).\n- `service` — long-running HTTP / worker process deployed independently.\n- `tool` — CLI or developer tooling shipped as an executable."
|
|
70
72
|
},
|
|
71
73
|
"sourceRoot": {
|
|
72
74
|
"type": "string",
|
|
@@ -172,6 +174,10 @@
|
|
|
172
174
|
},
|
|
173
175
|
"description": "Named configurations (e.g., \"production\", \"development\")"
|
|
174
176
|
},
|
|
177
|
+
"concurrencyGroup": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"description": "Workspace-level concurrency group this target opts into. The scheduler caps the *combined* in-flight count of every task whose target carries the same group name to the value declared in {@link TaskRunnerOptions.concurrencyGroups } . Use this when several targets share an external resource (a single Postgres, a developer's Docker daemon, an account-wide deploy lock) so the cap follows the resource, not any single target name.\n\nTargets that name a group not declared in `concurrencyGroups` run uncapped — a typo shouldn't deadlock the graph. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
180
|
+
},
|
|
175
181
|
"dependsOn": {
|
|
176
182
|
"type": "array",
|
|
177
183
|
"items": {
|
|
@@ -325,6 +331,10 @@
|
|
|
325
331
|
},
|
|
326
332
|
"description": "Input patterns for cache invalidation"
|
|
327
333
|
},
|
|
334
|
+
"maxConcurrent": {
|
|
335
|
+
"type": "number",
|
|
336
|
+
"description": "Maximum number of in-flight instances of this target across the whole graph. When set, the scheduler refuses to start an additional task whose `target.target` equals this target's name once the running count reaches `maxConcurrent`. Independent of `--parallel`: the global cap still bounds total in-flight tasks, and `maxConcurrent` further bounds the per-target subset.\n\nUse for tests/deploys that share an external resource (DB, port, mock server). Set to `1` to serialize. Values `<= 0` are ignored.\n\nIf multiple projects declare different values for the same target name, the runner uses the smallest declared cap. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
337
|
+
},
|
|
328
338
|
"outputs": {
|
|
329
339
|
"type": "array",
|
|
330
340
|
"items": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"noProductionDependencyOnApplication": {
|
|
51
51
|
"type": "boolean",
|
|
52
|
-
"description": "When true, production `dependencies` must not point to
|
|
52
|
+
"description": "When true, production `dependencies` must not point to deployment-target projects — `application`, `service`, or `tool`. devDependencies on those are allowed (e.g., for testing).",
|
|
53
53
|
"default": false
|
|
54
54
|
}
|
|
55
55
|
},
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"enforceApplicationBoundary": {
|
|
88
88
|
"type": "boolean",
|
|
89
|
-
"description": "When true, no project may depend on
|
|
89
|
+
"description": "When true, no project may depend on a deployment target — projects of type `application`, `service`, or `tool`. Deployment targets are standalone artefacts, not reusable libraries.",
|
|
90
90
|
"default": true
|
|
91
91
|
}
|
|
92
92
|
},
|
|
@@ -470,6 +470,59 @@
|
|
|
470
470
|
"additionalProperties": false,
|
|
471
471
|
"description": "Tweak the custom-types lint that flags drift in `engines.{node,pnpm,...}`, `packageManager`, `volta.{node,pnpm,yarn}`, and the proposed `devEngines.{runtime,packageManager}` array form.\n\nEach (customType × name) cluster is tracked independently — `engines.node` and `volta.node` don't cross-couple here. Use a versionGroup once that lands if you need to enforce they agree."
|
|
472
472
|
},
|
|
473
|
+
"deadWorkspacePatterns": {
|
|
474
|
+
"type": "object",
|
|
475
|
+
"properties": {
|
|
476
|
+
"autofix": {
|
|
477
|
+
"anyOf": [
|
|
478
|
+
{
|
|
479
|
+
"type": "string",
|
|
480
|
+
"const": "prompt"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"type": "boolean"
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
"description": "Three-state autofix opt-out. See `workspaceProtocol.autofix` for the contract — applied here to dropping unmatched patterns from the workspace config file.",
|
|
487
|
+
"default": true
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
"additionalProperties": false,
|
|
491
|
+
"description": "Tweak the dead-workspace-patterns lint that flags entries in `pnpm-workspace.yaml#packages` / `package.json#workspaces` which resolve to zero on-disk directories."
|
|
492
|
+
},
|
|
493
|
+
"emptyDeps": {
|
|
494
|
+
"type": "object",
|
|
495
|
+
"properties": {
|
|
496
|
+
"autofix": {
|
|
497
|
+
"anyOf": [
|
|
498
|
+
{
|
|
499
|
+
"type": "string",
|
|
500
|
+
"const": "prompt"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"type": "boolean"
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"description": "Three-state autofix opt-out. See `workspaceProtocol.autofix` for the contract — applied here to removing the empty key.",
|
|
507
|
+
"default": true
|
|
508
|
+
},
|
|
509
|
+
"ignoreBlocks": {
|
|
510
|
+
"type": "array",
|
|
511
|
+
"items": {
|
|
512
|
+
"type": "string",
|
|
513
|
+
"enum": [
|
|
514
|
+
"dependencies",
|
|
515
|
+
"devDependencies",
|
|
516
|
+
"optionalDependencies",
|
|
517
|
+
"peerDependencies"
|
|
518
|
+
]
|
|
519
|
+
},
|
|
520
|
+
"description": "Block names exempt from the rule (e.g. `[\"peerDependencies\"]` to keep the key around as a marker even when empty)."
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
"additionalProperties": false,
|
|
524
|
+
"description": "Tweak the empty-deps lint that flags empty `dependencies` / `devDependencies` / `peerDependencies` / `optionalDependencies` blocks across the workspace."
|
|
525
|
+
},
|
|
473
526
|
"redefineRoot": {
|
|
474
527
|
"type": "object",
|
|
475
528
|
"properties": {
|
|
@@ -484,6 +537,121 @@
|
|
|
484
537
|
"additionalProperties": false,
|
|
485
538
|
"description": "Tweak the redefine-root lint that flags non-root packages duplicating deps already pinned at the workspace root."
|
|
486
539
|
},
|
|
540
|
+
"rootDeps": {
|
|
541
|
+
"type": "object",
|
|
542
|
+
"properties": {
|
|
543
|
+
"autofix": {
|
|
544
|
+
"anyOf": [
|
|
545
|
+
{
|
|
546
|
+
"type": "string",
|
|
547
|
+
"const": "prompt"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"type": "boolean"
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
"description": "Three-state autofix opt-out. See `workspaceProtocol.autofix` for the contract — applied here to moving entries from `dependencies` to `devDependencies` on the root package.json.",
|
|
554
|
+
"default": true
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"additionalProperties": false,
|
|
558
|
+
"description": "Tweak the root-deps lint that flags runtime `dependencies` declared on the private workspace root (they should live in `devDependencies`)."
|
|
559
|
+
},
|
|
560
|
+
"rootPackageManager": {
|
|
561
|
+
"type": "object",
|
|
562
|
+
"properties": {
|
|
563
|
+
"autofix": {
|
|
564
|
+
"anyOf": [
|
|
565
|
+
{
|
|
566
|
+
"type": "string",
|
|
567
|
+
"const": "prompt"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
"type": "boolean"
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"description": "Three-state autofix opt-out. See `workspaceProtocol.autofix` for the contract. `--fix` only writes when `suggested` is set — a missing `packageManager` field has no canonical default.",
|
|
574
|
+
"default": true
|
|
575
|
+
},
|
|
576
|
+
"suggested": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"description": "Canonical specifier (`name@version`) to write when `--fix` runs and the field is absent. Required to enable autofix — vis won't guess the workspace's preferred manager.",
|
|
579
|
+
"examples": [
|
|
580
|
+
"pnpm@10.32.1"
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"additionalProperties": false,
|
|
585
|
+
"description": "Tweak the root-package-manager lint that flags a missing or malformed `packageManager` field on the workspace root."
|
|
586
|
+
},
|
|
587
|
+
"rootPrivate": {
|
|
588
|
+
"type": "object",
|
|
589
|
+
"properties": {
|
|
590
|
+
"autofix": {
|
|
591
|
+
"anyOf": [
|
|
592
|
+
{
|
|
593
|
+
"type": "string",
|
|
594
|
+
"const": "prompt"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"type": "boolean"
|
|
598
|
+
}
|
|
599
|
+
],
|
|
600
|
+
"description": "Three-state autofix opt-out. See `workspaceProtocol.autofix` for the contract — applied here to inserting `\"private\": true`.",
|
|
601
|
+
"default": true
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"additionalProperties": false,
|
|
605
|
+
"description": "Tweak the root-private lint that flags a workspace root package.json missing `\"private\": true`. Only fires when the root looks like a workspace (npm/yarn/bun `workspaces` field or `pnpm-workspace.yaml`)."
|
|
606
|
+
},
|
|
607
|
+
"similarDeps": {
|
|
608
|
+
"type": "object",
|
|
609
|
+
"properties": {
|
|
610
|
+
"extraFamilies": {
|
|
611
|
+
"type": "array",
|
|
612
|
+
"items": {
|
|
613
|
+
"$ref": "#/$defs/SimilarDepFamily"
|
|
614
|
+
},
|
|
615
|
+
"description": "Additional families merged with the built-ins. Same `id` wins → user override fully replaces the built-in entry."
|
|
616
|
+
},
|
|
617
|
+
"ignoreFamilies": {
|
|
618
|
+
"type": "array",
|
|
619
|
+
"items": {
|
|
620
|
+
"type": "string"
|
|
621
|
+
},
|
|
622
|
+
"description": "Family ids to skip entirely (matches `SimilarDepFamily.id`)."
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"additionalProperties": false,
|
|
626
|
+
"description": "Tweak the similar-deps lint that flags drift across related dep families (e.g. `react` and `react-dom`, all of `@babel/*`).\n\nThe lint is report-only — aligning a family requires picking a single canonical specifier across heterogeneous range syntaxes (`^`, `~`, exact), which is too lossy without user input."
|
|
627
|
+
},
|
|
628
|
+
"typesInDeps": {
|
|
629
|
+
"type": "object",
|
|
630
|
+
"properties": {
|
|
631
|
+
"autofix": {
|
|
632
|
+
"anyOf": [
|
|
633
|
+
{
|
|
634
|
+
"type": "string",
|
|
635
|
+
"const": "prompt"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"type": "boolean"
|
|
639
|
+
}
|
|
640
|
+
],
|
|
641
|
+
"description": "Three-state autofix opt-out. See `workspaceProtocol.autofix` for the contract — applied here to moving the entry to `devDependencies`. Existing dev pins are preserved on conflict.",
|
|
642
|
+
"default": true
|
|
643
|
+
},
|
|
644
|
+
"ignore": {
|
|
645
|
+
"type": "array",
|
|
646
|
+
"items": {
|
|
647
|
+
"type": "string"
|
|
648
|
+
},
|
|
649
|
+
"description": "Dep names exempt from the rule (exact match, e.g. `@types/node`)."
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
"additionalProperties": false,
|
|
653
|
+
"description": "Tweak the types-in-deps lint that flags `@types/*` declared in `dependencies` on a private package (they belong in `devDependencies` since the package never ships)."
|
|
654
|
+
},
|
|
487
655
|
"workspaceProtocol": {
|
|
488
656
|
"type": "object",
|
|
489
657
|
"properties": {
|
|
@@ -848,6 +1016,18 @@
|
|
|
848
1016
|
"additionalProperties": false,
|
|
849
1017
|
"description": "sort-package-json command defaults"
|
|
850
1018
|
},
|
|
1019
|
+
"sponsor": {
|
|
1020
|
+
"type": "object",
|
|
1021
|
+
"properties": {
|
|
1022
|
+
"enabled": {
|
|
1023
|
+
"type": "boolean",
|
|
1024
|
+
"description": "Show the sponsor notice on successful command completion.",
|
|
1025
|
+
"default": true
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
"additionalProperties": false,
|
|
1029
|
+
"description": "Sponsorship notice shown after successful commands.\n\nvis prints a one-line \"consider sponsoring visulima\" notice at most once every 14 days (skipped in CI, non-TTY, and when `VIS_NO_SPONSOR=1` is set). Set `enabled: false` to silence it permanently for this workspace."
|
|
1030
|
+
},
|
|
851
1031
|
"staged": {
|
|
852
1032
|
"$ref": "#/$defs/StagedConfig",
|
|
853
1033
|
"description": "Staged file patterns and commands (replaces lint-staged).\n\nAccepts all lint-staged config forms:\n- `string` or `string[]` commands\n- Sync/async functions returning `string | string[]`\n- `{ title, task }` objects for named side-effect tasks\n- Mixed arrays of strings and functions\n- A top-level generate-task function"
|
|
@@ -929,6 +1109,10 @@
|
|
|
929
1109
|
},
|
|
930
1110
|
"description": "Named configurations (e.g., \"production\", \"development\")"
|
|
931
1111
|
},
|
|
1112
|
+
"concurrencyGroup": {
|
|
1113
|
+
"type": "string",
|
|
1114
|
+
"description": "Workspace-level concurrency group this target opts into. The scheduler caps the *combined* in-flight count of every task whose target carries the same group name to the value declared in {@link TaskRunnerOptions.concurrencyGroups } . Use this when several targets share an external resource (a single Postgres, a developer's Docker daemon, an account-wide deploy lock) so the cap follows the resource, not any single target name.\n\nTargets that name a group not declared in `concurrencyGroups` run uncapped — a typo shouldn't deadlock the graph. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
1115
|
+
},
|
|
932
1116
|
"dependsOn": {
|
|
933
1117
|
"type": "array",
|
|
934
1118
|
"items": {
|
|
@@ -1082,6 +1266,10 @@
|
|
|
1082
1266
|
},
|
|
1083
1267
|
"description": "Input patterns for cache invalidation"
|
|
1084
1268
|
},
|
|
1269
|
+
"maxConcurrent": {
|
|
1270
|
+
"type": "number",
|
|
1271
|
+
"description": "Maximum number of in-flight instances of this target across the whole graph. When set, the scheduler refuses to start an additional task whose `target.target` equals this target's name once the running count reaches `maxConcurrent`. Independent of `--parallel`: the global cap still bounds total in-flight tasks, and `maxConcurrent` further bounds the per-target subset.\n\nUse for tests/deploys that share an external resource (DB, port, mock server). Set to `1` to serialize. Values `<= 0` are ignored.\n\nIf multiple projects declare different values for the same target name, the runner uses the smallest declared cap. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
1272
|
+
},
|
|
1085
1273
|
"outputs": {
|
|
1086
1274
|
"type": "array",
|
|
1087
1275
|
"items": {
|
|
@@ -1488,6 +1676,13 @@
|
|
|
1488
1676
|
"description": "When `true`, file hashes are cached in a persistent mtime+size indexed snapshot under `node_modules/.cache/task-runner/`. On subsequent runs, unchanged files skip content re-reads — cuts cold-cache fingerprint time dramatically on large workspaces.\n\nChanged or new files still get full content hashing. Safe to leave on by default; overhead when nothing matches is a single `stat` call per file.",
|
|
1489
1677
|
"default": false
|
|
1490
1678
|
},
|
|
1679
|
+
"concurrencyGroups": {
|
|
1680
|
+
"type": "object",
|
|
1681
|
+
"additionalProperties": {
|
|
1682
|
+
"type": "number"
|
|
1683
|
+
},
|
|
1684
|
+
"description": "Workspace-level concurrency group caps. Maps a group name to the maximum number of in-flight tasks across every target whose `concurrencyGroup` field equals the same name. Independent of `parallel`: the global cap still bounds total tasks, and group caps further bound the named subset.\n\nCommon shape — one cap per shared resource:\n\n ```ts concurrencyGroups: { \"db-bound\": 2, // any target hitting the local Postgres \"deploy-lock\": 1, // any deploy target } ```\n\nTargets opt in via {@link TargetConfiguration.concurrencyGroup } . Values `<= 0` are ignored."
|
|
1685
|
+
},
|
|
1491
1686
|
"maxCacheAge": {
|
|
1492
1687
|
"type": "number",
|
|
1493
1688
|
"description": "Maximum age of cache entries in milliseconds"
|
|
@@ -1757,6 +1952,10 @@
|
|
|
1757
1952
|
},
|
|
1758
1953
|
"description": "Named configurations (e.g., \"production\", \"development\")"
|
|
1759
1954
|
},
|
|
1955
|
+
"concurrencyGroup": {
|
|
1956
|
+
"type": "string",
|
|
1957
|
+
"description": "Workspace-level concurrency group this target opts into. The scheduler caps the *combined* in-flight count of every task whose target carries the same group name to the value declared in {@link TaskRunnerOptions.concurrencyGroups } . Use this when several targets share an external resource (a single Postgres, a developer's Docker daemon, an account-wide deploy lock) so the cap follows the resource, not any single target name.\n\nTargets that name a group not declared in `concurrencyGroups` run uncapped — a typo shouldn't deadlock the graph. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
1958
|
+
},
|
|
1760
1959
|
"dependsOn": {
|
|
1761
1960
|
"type": "array",
|
|
1762
1961
|
"items": {
|
|
@@ -1915,6 +2114,10 @@
|
|
|
1915
2114
|
"additionalProperties": {},
|
|
1916
2115
|
"description": "Options passed to the executor"
|
|
1917
2116
|
},
|
|
2117
|
+
"maxConcurrent": {
|
|
2118
|
+
"type": "number",
|
|
2119
|
+
"description": "Maximum number of in-flight instances of this target across the whole graph. When set, the scheduler refuses to start an additional task whose `target.target` equals this target's name once the running count reaches `maxConcurrent`. Independent of `--parallel`: the global cap still bounds total in-flight tasks, and `maxConcurrent` further bounds the per-target subset.\n\nUse for tests/deploys that share an external resource (DB, port, mock server). Set to `1` to serialize. Values `<= 0` are ignored.\n\nIf multiple projects declare different values for the same target name, the runner uses the smallest declared cap. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
2120
|
+
},
|
|
1918
2121
|
"outputs": {
|
|
1919
2122
|
"type": "array",
|
|
1920
2123
|
"items": {
|
|
@@ -2571,6 +2774,38 @@
|
|
|
2571
2774
|
"additionalProperties": false,
|
|
2572
2775
|
"description": "One user-declared customTypes entry. See `policy.customTypes.extraTypes` for the full contract — this is just the row shape."
|
|
2573
2776
|
},
|
|
2777
|
+
"SimilarDepFamily": {
|
|
2778
|
+
"type": "object",
|
|
2779
|
+
"properties": {
|
|
2780
|
+
"id": {
|
|
2781
|
+
"type": "string",
|
|
2782
|
+
"description": "Stable id; used in report output and config overrides."
|
|
2783
|
+
},
|
|
2784
|
+
"label": {
|
|
2785
|
+
"type": "string",
|
|
2786
|
+
"description": "Pretty label for the report. Defaults to `id` when omitted."
|
|
2787
|
+
},
|
|
2788
|
+
"members": {
|
|
2789
|
+
"type": "array",
|
|
2790
|
+
"items": {
|
|
2791
|
+
"type": "string"
|
|
2792
|
+
},
|
|
2793
|
+
"description": "Dep names that belong to this family verbatim."
|
|
2794
|
+
},
|
|
2795
|
+
"prefixes": {
|
|
2796
|
+
"type": "array",
|
|
2797
|
+
"items": {
|
|
2798
|
+
"type": "string"
|
|
2799
|
+
},
|
|
2800
|
+
"description": "Dep-name prefixes (literal, no glob). Match if `depName.startsWith(prefix)`."
|
|
2801
|
+
}
|
|
2802
|
+
},
|
|
2803
|
+
"required": [
|
|
2804
|
+
"id"
|
|
2805
|
+
],
|
|
2806
|
+
"additionalProperties": false,
|
|
2807
|
+
"description": "One family of upstream-coupled packages.\n\n`members` is an exact-match list. `prefixes` accept any dep whose name starts with the prefix — useful for monorepos that ship many subpackages under one scope (e.g. `@babel/`, `@storybook/`, `@nx/`). A family can use either or both; a dep matching either list belongs to the family."
|
|
2808
|
+
},
|
|
2574
2809
|
"StagedConfig": {
|
|
2575
2810
|
"type": "object",
|
|
2576
2811
|
"additionalProperties": {
|
|
@@ -2903,6 +3138,10 @@
|
|
|
2903
3138
|
},
|
|
2904
3139
|
"description": "Named configurations (e.g., \"production\", \"development\")"
|
|
2905
3140
|
},
|
|
3141
|
+
"concurrencyGroup": {
|
|
3142
|
+
"type": "string",
|
|
3143
|
+
"description": "Workspace-level concurrency group this target opts into. The scheduler caps the *combined* in-flight count of every task whose target carries the same group name to the value declared in {@link TaskRunnerOptions.concurrencyGroups } . Use this when several targets share an external resource (a single Postgres, a developer's Docker daemon, an account-wide deploy lock) so the cap follows the resource, not any single target name.\n\nTargets that name a group not declared in `concurrencyGroups` run uncapped — a typo shouldn't deadlock the graph. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
3144
|
+
},
|
|
2906
3145
|
"dependsOn": {
|
|
2907
3146
|
"type": "array",
|
|
2908
3147
|
"items": {
|
|
@@ -3056,6 +3295,10 @@
|
|
|
3056
3295
|
},
|
|
3057
3296
|
"description": "Input patterns for cache invalidation"
|
|
3058
3297
|
},
|
|
3298
|
+
"maxConcurrent": {
|
|
3299
|
+
"type": "number",
|
|
3300
|
+
"description": "Maximum number of in-flight instances of this target across the whole graph. When set, the scheduler refuses to start an additional task whose `target.target` equals this target's name once the running count reaches `maxConcurrent`. Independent of `--parallel`: the global cap still bounds total in-flight tasks, and `maxConcurrent` further bounds the per-target subset.\n\nUse for tests/deploys that share an external resource (DB, port, mock server). Set to `1` to serialize. Values `<= 0` are ignored.\n\nIf multiple projects declare different values for the same target name, the runner uses the smallest declared cap. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
|
|
3301
|
+
},
|
|
3059
3302
|
"outputs": {
|
|
3060
3303
|
"type": "array",
|
|
3061
3304
|
"items": {
|
|
@@ -3416,7 +3659,9 @@
|
|
|
3416
3659
|
"type": "string",
|
|
3417
3660
|
"enum": [
|
|
3418
3661
|
"application",
|
|
3419
|
-
"library"
|
|
3662
|
+
"library",
|
|
3663
|
+
"service",
|
|
3664
|
+
"tool"
|
|
3420
3665
|
],
|
|
3421
3666
|
"description": "Match on project type."
|
|
3422
3667
|
},
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var R=Object.defineProperty;var C=(e,t)=>R(e,"name",{value:t,configurable:!0});import{createRequire as I}from"node:module";import{findCacheDirSync as V}from"@visulima/find-cache-dir";import{isAccessibleSync as d,ensureDirSync as y,readJsonSync as T,writeJsonSync as x}from"@visulima/fs";import{M as c,O as P,V as K,m as L,K as w,a as j,b as k}from"../packem_shared/index-OlP7U_t5.js";import{o as Se}from"../packem_shared/index-OlP7U_t5.js";import{createJiti as b}from"jiti";const $=I(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=C(e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[t,s]=h.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return h.getBuiltinModule(e)}return $(e)},"__cjs_getBuiltinModule"),{createHash:_}=p("node:crypto"),{readdirSync:D,readFileSync:A,copyFileSync:M,unlinkSync:q}=p("node:fs"),{createRequire:N}=p("node:module"),{tmpdir:B}=p("node:os");var U=Object.defineProperty,a=C((e,t)=>U(e,"name",{value:t,configurable:!0}),"r");const O=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],W=new Set(O),F=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],z=new Set(F),J={blockExoticSubdeps:!0,strictDepBuilds:!0,trustPolicy:"no-downgrade",trustPolicyIgnoreAfter:43200},H=a(e=>({...J,...e}),"mergeSecurityDefaults"),m=a(e=>({...e,security:H(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),Y=a(e=>{let t;try{t=D(e)}catch{return}const s=new Set(t.filter(i=>W.has(i)));for(const i of O)if(s.has(i))return c(e,i)},"findVisConfigFile"),Q=a(e=>{let t;try{t=D(e)}catch{return}const s=new Set(t.filter(i=>z.has(i)));for(const i of F)if(s.has(i))return c(e,i)},"findVisTaskConfigFile"),v=a(e=>_("sha256").update(A(e)).digest("hex"),"hashFileContents"),X=a(e=>{const t=_("sha256"),s=[...e].sort();for(const i of s)t.update(i),t.update(":"),t.update(v(i)),t.update(`
|
|
2
|
-
`);return t.digest("hex")},"hashConfigChain"),Z=a(e=>{const t=c(e,"node_modules");if(d(t)){const i=c(t,".cache","vis");return y(i),c(i,"vis-config-cache.json")}const s=V("vis",{create:!0,cwd:e});return s?c(s,"vis-config-cache.json"):void 0},"getConfigCachePath"),ee=a((e,t)=>{if(d(e))try{const s=T(e);if(s.hash===t)return s.config}catch{}},"readConfigCache"),te=a((e,t,s)=>{try{y(w(e)),x(e,{config:s,hash:t})}catch{}},"writeConfigCache"),se=a(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),ie=a((e,t,s)=>{if(P(e))throw new k(e,[...s,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const i=[];if(e.startsWith("./")||e.startsWith("../")){const o=w(t),n=c(o,e);if(i.push(n),d(n))return n;throw new k(e,[...s,t],i)}try{return N(t).resolve(e)}catch{throw i.push(`require.resolve("${e}") from ${t}`),new k(e,[...s,t],i)}},"resolveExtendsSpecifier"),G=a(async(e,t,s)=>{const i=v(t),o=t.slice(t.lastIndexOf(".")),n=c(B(),`vis-config-${i}${o}`);M(t,n);let r;try{r=await e.import(n,{default:!0,try:!0})??{}}catch(f){throw new j(t,s,f)}finally{try{q(n)}catch{}}try{return(typeof r=="function"?await r()??{}:r)??{}}catch(f){throw new j(t,s,f)}},"loadRawConfig"),ne=a((e,t)=>{const s={...e,...t};if(e.targetDefaults||t.targetDefaults){const i=new Set([...Object.keys(e.targetDefaults??{}),...Object.keys(t.targetDefaults??{})]),o={};for(const n of i)o[n]=L(e.targetDefaults?.[n],t.targetDefaults?.[n]);s.targetDefaults=o}return(e.taskDefaults||t.taskDefaults)&&(s.taskDefaults=[...e.taskDefaults??[],...t.taskDefaults??[]]),(e.fileGroups||t.fileGroups)&&(s.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(s.taskGroups={...e.taskGroups,...t.taskGroups}),(e.security||t.security)&&(s.security={...e.security,...t.security}),(e.update||t.update)&&(s.update={...e.update,...t.update}),(e.taskRunnerOptions||t.taskRunnerOptions)&&(s.taskRunnerOptions={...e.taskRunnerOptions,...t.taskRunnerOptions}),delete s.extends,s},"mergeVisConfigs"),E=a(async(e,t,s,i,o,n)=>{if(i.has(t))throw new K(t,s);if(!o.has(t)){i.add(t);try{const r=await G(e,t,s),f=se(r.extends);for(const u of f){const g=ie(u,t,s);await E(e,g,[...s,t],i,o,n)}o.set(t,r),n.push(t)}finally{i.delete(t)}}},"resolveConfigChain"),pe=a(async(e,t)=>{let s;if(t?.explicitConfigPath){const l=P(t.explicitConfigPath)?t.explicitConfigPath:c(e,t.explicitConfigPath);if(!d(l))throw new Error(`Cannot find config file at ${l}`);s=l}else s=Y(e);if(!s)return m({});const i=b(e,{fsCache:!1,moduleCache:!1}),o=new Set,n=new Map,r=[];await E(i,s,[],o,n,r);const f=X(r),u=Z(e);if(u){const l=ee(u,f);if(l)return l}let g={};for(const l of r)g=ne(g,n.get(l));const S=m(g);return u&&te(u,f,S),S},"loadVisConfig"),ae=a(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),oe=a((e,t)=>{const s=c(e,"node_modules"),i=ae(t);if(d(s)){const n=c(s,".cache","vis","task-configs");return y(n),c(n,`${i}.json`)}const o=V("vis",{create:!0,cwd:e});return o?c(o,"task-configs",`${i}.json`):void 0},"getVisTaskCachePath"),re=a((e,t)=>{if(d(e))try{const s=T(e);if(s.hash===t)return s.config}catch{}},"readVisTaskCache"),ce=a((e,t,s)=>{try{y(w(e)),x(e,{config:s,hash:t})}catch{}},"writeVisTaskCache"),ye=a(async(e,t,s)=>{const i=Q(t);if(!i)return;const o=v(i),n=oe(e,s);if(n){const u=re(n,o);if(u)return u}const r=b(t,{fsCache:!1,moduleCache:!1}),f=await G(r,i,[]);return n&&ce(n,o,f),f},"loadVisTaskConfig"),Ce=a(e=>e,"defineTaskConfig"),ke=a(e=>m(e),"defineConfig"),me=a(e=>e,"definePlugin");export{O as CONFIG_FILES,J as SECURITY_DEFAULTS,F as TASK_CONFIG_FILES,m as applyDefaults,ke as defineConfig,me as definePlugin,Ce as defineTaskConfig,Y as findVisConfigFile,Q as findVisTaskConfigFile,pe as loadVisConfig,ye as loadVisTaskConfig,Se as otelPlugin};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var C=Object.defineProperty;var m=(t,e)=>C(t,"name",{value:e,configurable:!0});import{createRequire as _}from"node:module";import{X as S}from"./xxh3-DrAUNq4n.js";import{ensureDirSync as A,isAccessibleSync as d,readJsonSync as v}from"@visulima/fs";import{M as c}from"./index-OlP7U_t5.js";import{n as J}from"../packem_chunks/bin.js";const M=_(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=m(t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,r]=u.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return u.getBuiltinModule(t)}return M(t)},"__cjs_getBuiltinModule"),{rmSync:f,writeFileSync:p,readdirSync:h,statSync:D}=b("node:fs");var w=Object.defineProperty,n=m((t,e)=>w(t,"name",{value:e,configurable:!0}),"r");const a=n(()=>c(J(),"ai"),"getCacheDirectory"),B=3600*1e3,N=1800*1e3,j=n(()=>{A(a())},"ensureCacheDirectory"),q=n((t,e,r)=>{const s=r.map(i=>({currentRange:i.currentRange,name:i.packageName,targetVersion:i.targetVersion})).toSorted((i,y)=>i.name.localeCompare(y.name)),o=JSON.stringify({analysisType:e,packages:s,provider:t});return S(Buffer.from(o))},"buildCacheKey"),z=n(t=>{const e=c(a(),`${t}.json`);if(d(e))try{const r=v(e);if(Date.now()-r.createdAt>r.ttlMs){f(e,{force:!0});return}return r.result}catch{f(e,{force:!0});return}},"getCachedAnalysis"),V=n((t,e,r)=>{j();const s=a(),o={createdAt:Date.now(),result:e,ttlMs:r};p(c(s,`${t}.json`),JSON.stringify(o,void 0,2),"utf8")},"setCachedAnalysis"),F=n((t,e)=>e!==void 0&&e>0?e:t==="security"?N:B,"getTtlForAnalysisType"),K=n(()=>{const t=a();if(!d(t))return{entries:0,newestEntry:void 0,oldestEntry:void 0,totalSizeBytes:0};const e=h(t).filter(i=>i.endsWith(".json"));let r=0,s,o;for(const i of e){const y=c(t,i),g=D(y);r+=g.size;const{mtimeMs:l}=g;(s===void 0||l<s)&&(s=l),(o===void 0||l>o)&&(o=l)}return{entries:e.length,newestEntry:o,oldestEntry:s,totalSizeBytes:r}},"getCacheStats"),P=n(t=>S(Buffer.from(JSON.stringify(t))),"buildHashCacheKey"),W=n(t=>{const e=c(a(),`${t}.json`);if(d(e))try{const r=v(e);if(Date.now()-r.createdAt>r.ttlMs){f(e,{force:!0});return}return r.result}catch{f(e,{force:!0});return}},"getCachedJson"),x=n((t,e,r)=>{j();const s=a(),o={createdAt:Date.now(),result:e,ttlMs:r};p(c(s,`${t}.json`),JSON.stringify(o,void 0,2),"utf8")},"setCachedJson"),H=n(()=>{const t=a();if(!d(t))return 0;const e=h(t).filter(r=>r.endsWith(".json"));for(const r of e)f(c(t,r),{force:!0});return e.length},"clearCache");export{H as B,K as J,P as M,W as N,x as O,V as R,z as T,F as j,q as k};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var O=Object.defineProperty;var f=(e,t)=>O(e,"name",{value:t,configurable:!0});import{createRequire as F}from"node:module";import{readLastRunSummary as T}from"@visulima/task-runner";import{a as j}from"./failure-log-fD4DiFb1.js";import{r as k,f as y,a as D,d as _}from"./run-summary-utils-D39XBHWW.js";import{O as $,C as b,M as R,z as A}from"./index-OlP7U_t5.js";import{w as E,b as B,r as H}from"./ai-analysis-Dzs_nUwM.js";import{M as q,N as W,O as L}from"./ai-cache-Dtvmbsru.js";const C=F(import.meta.url),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,I=f(e=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[t,a]=d.versions.node.split(".").map(Number);if(t>22||t===22&&a>=3||t===20&&a>=16)return d.getBuiltinModule(e)}return C(e)},"__cjs_getBuiltinModule"),{readFile:N,writeFile:M}=I("node:fs/promises");var Y=Object.defineProperty,m=f((e,t)=>Y(e,"name",{value:t,configurable:!0}),"u");const z=32*1024,J=m((e,t)=>{if(e.length<=t)return e;const a=e.slice(-t),o=e.length-a.length;return`[…${String(o)} bytes truncated from head…]
|
|
2
|
-
${a}`},"truncateHead"),K=m(async(e,t)=>t===void 0?T(e):k(e,t),"loadSummary"),ge=m(async(e,t,a={})=>{const o=a.terminalOutputLimit??z,[r,n]=await Promise.all([j(e,t),K(e,a.runId)]),i=n?y(n,t):void 0;if(!r&&!i)return;let s,c;if(n&&i){const l=await D(e,n.id),g=l?y(l,t):void 0;s=_(i.hashDetails,g?.hashDetails),c=l?.id}const h=r?.terminalOutput??"";return{command:r?.command??void 0,cwd:r?.cwd??void 0,dependencies:i?.dependencies??[],duration:i?.duration,exitCode:r?.exitCode??i?.exitCode,hash:i?.hash??r?.hash,hashDetails:i?.hashDetails,hashDiff:s,previousRunId:c,project:i?.target.project,runId:n?.id??r?.runId,status:r?.status??(i?U(i):void 0),target:i?.target.target,taskId:t,terminalOutput:J(h,o),terminalOutputCaptured:!!r,timestamp:r?.timestamp??i?.endTime??i?.startTime}},"aggregateFailureContext"),U=m(e=>{if(e.exitCode!==void 0&&e.exitCode!==0)return"failure";switch(e.cacheStatus){case"HIT":return"local-cache";case"REMOTE_HIT":return"remote-cache";case"SKIPPED":return"skipped";default:return e.exitCode===0?"success":void 0}},"mapCacheStatusToTaskStatus");var G=Object.defineProperty,u=f((e,t)=>G(e,"name",{value:t,configurable:!0}),"a");const Q=3600*1e3,S=80,V=new Set(["high","low","medium"]),X=u(()=>`You are an expert software engineer helping fix a failing build/test/lint task.
|
|
3
|
-
|
|
4
|
-
You will be given:
|
|
5
|
-
- The terminal output (stdout/stderr) from the failed task.
|
|
6
|
-
- Optional metadata: command, working directory, project, task hash, and a diff describing what changed in the task's hash inputs since the previous run that did not fail.
|
|
7
|
-
|
|
8
|
-
Your job:
|
|
9
|
-
1. Identify the root cause from the terminal output.
|
|
10
|
-
2. Propose a minimal set of source-file patches that fix the cause.
|
|
11
|
-
3. If you cannot determine a safe fix, set "cannotFix" with a clear, actionable explanation.
|
|
12
|
-
|
|
13
|
-
Constraints:
|
|
14
|
-
- Patches MUST be exact string replacements. The "oldString" must appear verbatim in the named file. Paths are relative to the working directory.
|
|
15
|
-
- Each "oldString" must be unique within its file. Include surrounding context so the match is unambiguous.
|
|
16
|
-
- Do NOT include unrelated cleanup, formatting changes, or speculative refactors.
|
|
17
|
-
- If the failure is environmental (missing tool, network) or requires running commands, prefer "cannotFix" over a guess.
|
|
18
|
-
- Keep "explanation" short (1-3 sentences). Reserve "reason" on each patch for why that specific edit fixes the cause.
|
|
19
|
-
|
|
20
|
-
Respond ONLY with valid JSON in this exact structure:
|
|
21
|
-
{
|
|
22
|
-
"explanation": "Brief root-cause analysis and what the fix does.",
|
|
23
|
-
"confidence": "low|medium|high",
|
|
24
|
-
"patches": [
|
|
25
|
-
{
|
|
26
|
-
"file": "path/relative/to/cwd.ts",
|
|
27
|
-
"oldString": "exact text to find",
|
|
28
|
-
"newString": "exact replacement text",
|
|
29
|
-
"reason": "why this change fixes it"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"cannotFix": "optional — set when no safe patch can be proposed"
|
|
33
|
-
}`,"buildSystemPrompt"),v=u((e,t)=>{const a=[];if(t.added.length>0&&a.push(` added: ${t.added.join(", ")}`),t.changed.length>0&&a.push(` changed: ${t.changed.join(", ")}`),t.removed.length>0&&a.push(` removed: ${t.removed.join(", ")}`),a.length!==0)return`- ${e}:
|
|
34
|
-
${a.join(`
|
|
35
|
-
`)}`},"formatBucket"),Z=u(e=>{if(!e.hashDiff)return"No hash-diff available — there is no previous run to compare against.";const t=[];e.hashDiff.commandChanged&&t.push("- command line changed since previous run");const a=v("file inputs",e.hashDiff.nodes),o=v("implicit deps",e.hashDiff.implicitDeps),r=v("runtime/env",e.hashDiff.runtime);return a&&t.push(a),o&&t.push(o),r&&t.push(r),t.length===0?"No detectable changes between this run and the previous run.":t.join(`
|
|
36
|
-
`)},"buildHashDiffSummary"),ee=u(e=>{const t=[`Task: ${e.taskId}`];return e.project&&t.push(`Project: ${e.project}`),e.target&&t.push(`Target: ${e.target}`),e.command&&t.push(`Command: ${e.command}`),e.cwd&&t.push(`CWD: ${e.cwd}`),e.exitCode!==void 0&&t.push(`Exit code: ${String(e.exitCode)}`),e.hash&&t.push(`Task hash: ${e.hash}`),t.push("","Hash-diff since previous run:",Z(e),""),e.terminalOutputCaptured?t.push("Terminal output:","```",e.terminalOutput,"```"):t.push("Terminal output: <no failure log was captured for this task>",'Set "cannotFix" and tell the user to re-run with `vis run` so logs can be captured.'),t.join(`
|
|
37
|
-
`)},"buildUserPrompt"),te=u(e=>`${X()}
|
|
38
|
-
|
|
39
|
-
${ee(e)}`,"buildFixPrompt"),ae=u((e,t)=>{const a=Array.isArray(e.patches)?e.patches:[],o=[];for(const n of a)typeof n.file!="string"||n.file.length===0||typeof n.oldString!="string"||n.oldString.length===0||typeof n.newString=="string"&&o.push({file:n.file,newString:n.newString,oldString:n.oldString,reason:typeof n.reason=="string"&&n.reason.length>0?n.reason:void 0});const r=typeof e.cannotFix=="string"&&e.cannotFix.length>0?e.cannotFix:void 0;return{cannotFix:r,confidence:V.has(e.confidence)?e.confidence:"low",explanation:typeof e.explanation=="string"?e.explanation:"",patches:r?[]:o,provider:t}},"normalizeFixProposal"),ie=u((e,t)=>{const a=E(e);return!a||typeof a!="object"?{cannotFix:"AI response was not valid JSON.",confidence:"low",explanation:"Failed to parse AI response.",patches:[],provider:t}:ae(a,t)},"parseFixResponse"),ne=u((e,t)=>q({cwd:t.cwd??null,flow:"ai-fix",hash:t.hash??null,provider:e,taskId:t.taskId,terminalOutput:t.terminalOutput,terminalOutputCaptured:t.terminalOutputCaptured}),"buildFixCacheKey"),ve=u(async(e,t,a={})=>{const o=B(a.config);if(!o){t.warn(`No AI provider available — install one of: claude, gemini, copilot, codex.
|
|
40
|
-
`);return}const r=a.cache!==!1,n=ne(o.name,e);if(r){const i=W(n);if(i)return t.info(`Using cached fix proposal from ${i.provider}.
|
|
41
|
-
`),i}t.info(`Generating fix proposal with ${o.name}...
|
|
42
|
-
`);try{const i=await H(o,te(e)),s=ie(i,o.name);return r&&s.patches.length>0&&!s.cannotFix&&L(n,s,Q),s}catch(i){const s=i instanceof Error?i.message:String(i);t.warn(`AI fix proposal failed (${s}).
|
|
43
|
-
`);return}},"runFixAnalysis"),re=u((e,t,a)=>$(a)?b(a):b(R(t??e,a)),"resolvePatchPath"),se=u((e,t)=>{const a=A(e,t);return a===""?!0:!a.startsWith("..")&&!$(a)},"isInsideWorkspace"),oe=u((e,t,a)=>{const o=e.indexOf(t),r=Math.max(0,o-S),n=Math.min(e.length,o+t.length+S),i=e.slice(r,n);return{previewAfter:`${e.slice(r,o)}${a}${e.slice(o+t.length,n)}`,previewBefore:i}},"buildPreview"),xe=u(async(e,t,a,o={})=>{const r=o.dryRun===!0,n=new Map,i=[];for(const s of a.patches){const c=re(e,t,s.file);if(!se(e,c)){i.push({absolutePath:c,patch:s,status:"outside-workspace"});continue}let h=n.get(c);if(h===void 0){try{h=await N(c,"utf8")}catch(p){const w=p.code;i.push({absolutePath:c,error:w==="ENOENT"?void 0:p.message,patch:s,status:w==="ENOENT"?"missing-file":"error"});continue}n.set(c,h)}const l=h.indexOf(s.oldString);if(l===-1){i.push({absolutePath:c,patch:s,status:"no-match"});continue}if(h.indexOf(s.oldString,l+s.oldString.length)!==-1){i.push({absolutePath:c,patch:s,status:"ambiguous-match"});continue}const{previewAfter:g,previewBefore:P}=oe(h,s.oldString,s.newString),x=`${h.slice(0,l)}${s.newString}${h.slice(l+s.oldString.length)}`;if(!r)try{await M(c,x,"utf8")}catch(p){n.delete(c),i.push({absolutePath:c,error:p.message,patch:s,status:"error"});continue}n.set(c,x),i.push({absolutePath:c,patch:s,previewAfter:g,previewBefore:P,status:"applied"})}return i},"applyFixProposal");export{ge as a,ve as b,xe as c,re as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var l=(e,r)=>h(e,"name",{value:r,configurable:!0});import{createRequire as d}from"node:module";import{O as p,C as a,z as m}from"./index-OlP7U_t5.js";import{DEFAULT_CACHE_DIRECTORY_NAME as u,getMainWorktreeRoot as v}from"@visulima/task-runner";const f=d(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=l(e=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[r,t]=i.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return i.getBuiltinModule(e)}return f(e)},"__cjs_getBuiltinModule"),{execFileSync:_}=g("node:child_process");var C=Object.defineProperty,s=l((e,r)=>C(e,"name",{value:r,configurable:!0}),"s");const y=s((e,r,t)=>{const n=s(c=>p(c)?c:a(e,c),"normalize");if(r&&r.length>0)return n(r);if(t&&t.length>0)return n(t);const o=process.env.VIS_CACHE_DIRECTORY;return o&&o.length>0?n(o):a(e,u)},"resolveCacheDirectory"),E=s((e,r)=>r===!1?e:v(e)??e,"resolveSharedCacheRoot"),I=s((e,r,t,n)=>{const o=r??t??process.env.VIS_CACHE_DIRECTORY;if(o&&o.length>0)return y(e,r,t);const c=E(e,n);return a(c,u)},"resolveSharedCacheDirectory"),R=/[^\w.-]+/g,S=/^-+|-+$/g,b=s(e=>e.trim().replaceAll(R,"-").replaceAll(S,"").slice(0,64),"sanitizeBranchSegment"),A=s(e=>{try{const r=_("git",["rev-parse","--abbrev-ref","HEAD"],{cwd:e,encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim();return!r||r==="HEAD"?void 0:r}catch{return}},"detectGitBranch"),z=s((e,r,t)=>{if(t!==!0)return e;const n=A(r);if(!n)return e;const o=b(n);return o.length===0?e:a(e,"branches",o)},"applyBranchScope"),H=s((e,r)=>{const t=m(r,e);return t.length===0?!1:t!==".."&&!t.startsWith("../")&&!p(t)},"isCacheDirectoryInsideWorkspace");export{I as E,z as a,H as m};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var j=Object.defineProperty;var b=(t,e)=>j(t,"name",{value:e,configurable:!0});import{e as E,au as h,E as w,c as M,d as O,s as R}from"../packem_chunks/bin.js";import{Box as g,Text as d,Spinner as A,render as I}from"@visulima/tui";import k from"react";import{jsx as i,jsxs as v}from"react/jsx-runtime";import{D as S,W as Y,T as B,C as F}from"./symbols-CQmER5MT.js";import{readFileSync as $}from"@visulima/fs";import{F as D}from"./lockfile-BXylopgH.js";import{M as P}from"./index-OlP7U_t5.js";var G=Object.defineProperty,N=b((t,e)=>G(t,"name",{value:e,configurable:!0}),"l$1");const T=N(({rows:t})=>i(g,{flexDirection:"column",children:t.map(e=>{let r;switch(e.status){case"error":{r=i(d,{color:"red",children:F});break}case"ok":{r=i(d,{color:"green",children:B});break}case"running":{r=i(d,{color:"white",children:i(A,{type:"dots"})});break}case"warn":{r=i(d,{color:"yellow",children:Y});break}default:{r=i(d,{dimColor:!0,children:S});break}}return v(g,{children:[i(g,{width:3,children:r}),i(g,{flexGrow:1,children:i(d,{children:e.label})}),e.summary?i(g,{children:v(d,{dimColor:!0,children:[S," ",e.summary]})}):null]},e.id)})}),"ScanProgressApp");var W=Object.defineProperty,l=b((t,e)=>W(t,"name",{value:e,configurable:!0}),"e");const z={error:O(h.failure),ok:M(h.success),pending:w(h.dash),skip:w(h.dash),warn:E(h.warning)},H=l((t,e,r)=>{const m=r?`${t} ${w(`— ${r}`)}`:t;return` ${z[e]} ${m}
|
|
2
|
-
`},"formatStaticRow"),ee=l((t,e={})=>{const r=e.stream??process.stderr,m=typeof r.isTTY=="boolean"&&r.isTTY&&!R,p=e.live??m,n=new Map;for(const a of t)n.set(a.id,{id:a.id,label:a.label,status:"pending"});if(!p||t.length===0)return{finish:l((a,c,y)=>{const f=n.get(a);f&&(n.set(a,{...f,status:c,summary:y}),r.write(H(f.label,c,y)))},"finish"),start:l(a=>{const c=n.get(a);c&&n.set(a,{...c,status:"running"})},"start"),stop:l(()=>{},"stop")};const u=l(()=>t.map(a=>n.get(a.id)),"buildRows");let s=I(k.createElement(T,{rows:u()}),{interactive:!0,patchConsole:!1});const o=l(()=>{s?.rerender(k.createElement(T,{rows:u()}))},"rerender");return{finish:l((a,c,y)=>{const f=n.get(a);f&&(n.set(a,{...f,status:c,summary:y}),o())},"finish"),start:l(a=>{const c=n.get(a);c&&(n.set(a,{...c,status:"running"}),o())},"start"),stop:l(()=>{s&&(o(),s.unmount(),s=void 0)},"stop")}},"startScanProgress");var K=Object.defineProperty,x=b((t,e)=>K(t,"name",{value:e,configurable:!0}),"l");const C={bun:{file:"bun.lock",type:"bun"},npm:{file:"package-lock.json",type:"npm"},pnpm:{file:"pnpm-lock.yaml",type:"pnpm"},yarn:{file:"yarn.lock",type:"yarn"}},re=x((t,e)=>{const r=C[e];if(!r)return[];let m;try{m=$(P(t,r.file))}catch{return[]}const p=D(m,r.type);if(p.length===0)return[];const n=new Set,u=[];for(const s of p){const o=`${s.name}@${s.version}`;n.has(o)||(n.add(o),u.push({isDev:!1,name:s.name,version:s.version}))}return u},"lockedPackages"),te=x((t,e)=>{const r=C[e];if(!r)return[];let m;try{m=$(P(t,r.file))}catch{return[]}const p=D(m,r.type);if(p.length===0)return[];const n=new Map;for(const s of p)n.has(s.name)||n.set(s.name,new Set),n.get(s.name).add(s.version);const u=[];for(const[s,o]of n)o.size<=1||u.push({name:s,versions:[...o]});return u.sort((s,o)=>s.name.localeCompare(o.name))},"findDuplicateDependencies");export{te as f,re as l,ee as s};
|