@visulima/vis 1.0.0-alpha.33 → 1.0.0-alpha.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +31 -6
- package/dist/packem_chunks/bin.js +274 -274
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +2 -2
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler33.js +1 -1
- package/dist/packem_chunks/handler34.js +4 -4
- package/dist/packem_chunks/handler35.js +1 -1
- package/dist/packem_chunks/handler36.js +3 -3
- package/dist/packem_chunks/handler37.js +1 -1
- package/dist/packem_chunks/handler38.js +4 -4
- package/dist/packem_chunks/handler39.js +2 -2
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler40.js +1 -1
- package/dist/packem_chunks/handler41.js +7 -7
- package/dist/packem_chunks/handler42.js +25 -153
- package/dist/packem_chunks/handler43.js +153 -25
- package/dist/packem_chunks/handler44.js +5 -5
- package/dist/packem_chunks/handler45.js +1 -1
- package/dist/packem_chunks/handler47.js +1 -1
- package/dist/packem_chunks/handler48.js +1 -1
- package/dist/packem_chunks/handler49.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +10 -10
- package/dist/packem_chunks/handler51.js +64 -64
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/run.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/{ai-analysis-KP8b5lc0.js → ai-analysis-3QD_RS6F.js} +1 -1
- package/dist/packem_shared/{ai-fix-BkPUHA0z.js → ai-fix-TsjDQz_0.js} +3 -3
- package/dist/packem_shared/{cyclonedx-BilSFCNY.js → cyclonedx-zf9R2jCs.js} +1 -1
- package/dist/packem_shared/{dependency-scan-BUbOcMwX.js → dependency-scan-B70azq4x.js} +1 -1
- package/dist/packem_shared/{failure-log-34Wl3npC.js → failure-log-Dxafk3t4.js} +2 -2
- package/dist/packem_shared/index-BpbjpCNL.js +1 -0
- package/dist/packem_shared/{index-ClJtJDdT.js → index-Dc3ht2bL.js} +1 -1
- package/dist/packem_shared/{lifecycle-Buigdp7P.js → lifecycle-DvVTL8nx.js} +2 -2
- package/dist/packem_shared/{lockfile-CrT86D6d.js → lockfile-CedmXr44.js} +1 -1
- package/dist/packem_shared/{min-release-age-BPVXwPUg.js → min-release-age-DKMW2N_v.js} +1 -1
- package/dist/packem_shared/missing-package-json-DKAwoiWK.js +1 -0
- package/dist/packem_shared/{native-config-sync-BRZZetn3.js → native-config-sync-DBkJ-hsF.js} +1 -1
- package/dist/packem_shared/{provenance-D8vU1u2L.js → provenance-Cu6VR1Hy.js} +1 -1
- package/dist/packem_shared/{registry-keys-E3cZn4FI.js → registry-keys-CuBAVdsk.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-cPzwdiEE.js → resolve-explicit-Xue0oq8V.js} +1 -1
- package/dist/packem_shared/{s1ngularity-DBcjspCC.js → s1ngularity-adnHbyTd.js} +1 -1
- package/dist/packem_shared/{scan-progress-CTVVf9WW.js → scan-progress-lZdk5KJ-.js} +1 -1
- package/dist/packem_shared/{signatures-ChTfrQvT.js → signatures-FGbYV5QE.js} +1 -1
- package/dist/packem_shared/{spinner-C8xs6QZv.js → spinner-0acw5pd_.js} +1 -1
- package/dist/packem_shared/{tabs-xZkm6Y_J.js → tabs-zUSdR1HI.js} +1 -1
- package/dist/packem_shared/{use-measured-height-Lea6TCVD.js → use-measured-height-DyCBfLtu.js} +1 -1
- package/dist/packem_shared/{verify-cLcZwKqe.js → verify-BYzxSKWD.js} +1 -1
- package/dist/packem_shared/{vis-update-app-BCKzlqj8.js → vis-update-app-D0QyGneK.js} +1 -1
- package/dist/packem_shared/{watch-loop-BpA_pxU9.js → watch-loop-jmQQl2Qe.js} +2 -2
- package/index.js +52 -52
- package/package.json +10 -10
- package/schemas/vis-config.schema.json +34 -7
- package/dist/packem_shared/index-BnANMQ7k.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var me=Object.defineProperty;var b=(d,t)=>me(d,"name",{value:t,configurable:!0});import{aF as ue,a5 as e,a6 as l,n as r,l as xe,aG as fe,aH as ye,aI as we,w as j,af as Ce,aJ as _,aK as ce}from"../packem_chunks/bin.js";import{n as ke}from"./spinner-C8xs6QZv.js";import{g as be,r as Te}from"./tabs-xZkm6Y_J.js";import{u as Se}from"./use-measured-height-Lea6TCVD.js";var ve=Object.defineProperty,Ee=b((d,t)=>ve(d,"name",{value:t,configurable:!0}),"a");const er=Ee(({current:d,total:t})=>{const{columns:s}=ue(),i=s||80,a=t>0?Math.min(1,d/t):0,h=`${String(Math.round(a*100)).padStart(3)}%`,f=`${String(d)}/${String(t)}`,y=Math.max(10,i-2-h.length-1),p=Math.round(y*a),g=y-p;return e.jsxs(l,{flexDirection:"column",paddingX:1,children:[e.jsxs(l,{children:[e.jsx(ke,{type:"dots"}),e.jsx(r,{children:" Checking catalog dependencies "}),e.jsx(r,{dimColor:!0,children:f})]}),e.jsxs(l,{children:[e.jsx(r,{color:"cyan",children:"━".repeat(p)}),e.jsx(r,{dimColor:!0,children:"─".repeat(g)}),e.jsxs(r,{dimColor:!0,children:[" ",h]})]})]})},"CheckProgressApp");var Re=Object.defineProperty,S=b((d,t)=>Re(d,"name",{value:t,configurable:!0}),"l");const J=["default","name","updateType","severity"],de=S(d=>{const t=d.vulnerabilities?.map(s=>s.severity)??[];return t.includes("CRITICAL")?4:t.includes("HIGH")?3:t.includes("MODERATE")?2:t.includes("LOW")?1:0},"severityRank"),ae={digest:0,major:3,minor:2,patch:1,pin:0,unknown:0},he=S((d,t)=>{if(t==="default")return d;const s=[...d];return t==="name"?s.sort((i,a)=>i.packageName.localeCompare(a.packageName)):t==="updateType"?s.sort((i,a)=>(ae[a.updateType]??0)-(ae[i.updateType]??0)||i.packageName.localeCompare(a.packageName)):s.sort((i,a)=>de(a)-de(i)||i.packageName.localeCompare(a.packageName)),s},"sortEntries"),Z=S(d=>`${d.ecosystem}|${d.file}:${String(d.line)}|${d.name}`,"ecosystemEntryKey"),W=S(d=>{const t=new Map;for(const s of d){const i=t.get(s.catalogName);i?i.push(s):t.set(s.catalogName,[s])}return t},"groupByCatalog"),G=S((d,t,s)=>{let i=d;if(t!=="all"&&(i=t==="security"?i.filter(a=>a.vulnerabilities&&a.vulnerabilities.length>0||a.socketReport&&a.socketReport.alerts.length>0):i.filter(a=>a.updateType===t)),s){const a=s.toLowerCase();i=i.filter(h=>h.packageName.toLowerCase().includes(a))}return i},"filterEntries");class rr{static{b(this,"UpdateStore")}static{S(this,"UpdateStore")}#e;#l=new Set;#t;#s;#i=null;constructor(t,s=null,i=[]){this.#t=t,this.#s=i,s&&(this.#i=new Map(s.recommendations.map(a=>[a.package,a]))),this.#e={aiResult:s,allChecked:!0,applyProgress:null,checkedEcosystemKeys:new Set(i.map(a=>Z(a))),checkedEntries:new Set(t.map(a=>a.packageName)),ecosystemEntries:i,entries:t,error:null,filterActive:!1,filterText:"",filterType:"all",focusedPanel:"list",groupedByCatalog:W(t),phase:"browsing",selectedIndex:0,sortMode:"default"}}getSnapshot=S(()=>this.#e,"getSnapshot");subscribe=S(t=>(this.#l.add(t),()=>{this.#l.delete(t)}),"subscribe");getFilteredEntries(){return he(G(this.#t,this.#e.filterType,this.#e.filterText),this.#e.sortMode)}setSortMode(t){if(t===this.#e.sortMode)return;const s=this.getFilteredEntries()[this.#e.selectedIndex]?.packageName,i=he(G(this.#t,this.#e.filterType,this.#e.filterText),t),a=s?Math.max(0,i.findIndex(h=>h.packageName===s)):0;this.#r({...this.#e,selectedIndex:a,sortMode:t})}cycleSortMode(){const t=J.indexOf(this.#e.sortMode),s=J[(t+1)%J.length]??"default";this.setSortMode(s)}getRecommendation(t){return this.#i?.get(t)}getCheckedEntries(){return this.#t.filter(t=>this.#e.checkedEntries.has(t.packageName))}getCheckedEcosystemEntries(){return this.#s.filter(t=>this.#e.checkedEcosystemKeys.has(Z(t)))}toggleEcosystemCheck(t){const s=new Set(this.#e.checkedEcosystemKeys);s.has(t)?s.delete(t):s.add(t),this.#r({...this.#e,checkedEcosystemKeys:s})}checkAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set(this.#s.map(t=>Z(t)))})}uncheckAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set})}setSelectedIndex(t){const s=this.getFilteredEntries(),i=Math.max(0,Math.min(t,s.length-1));i!==this.#e.selectedIndex&&this.#r({...this.#e,selectedIndex:i})}setFocusedPanel(t){t!==this.#e.focusedPanel&&this.#r({...this.#e,focusedPanel:t})}setFilterType(t){if(t!==this.#e.filterType){const s=G(this.#t,t,this.#e.filterText);this.#r({...this.#e,entries:s,filterType:t,groupedByCatalog:W(s),selectedIndex:0})}}setFilter(t){const s=G(this.#t,this.#e.filterType,t);this.#r({...this.#e,entries:s,filterText:t,groupedByCatalog:W(s),selectedIndex:0})}setFilterActive(t){if(t!==this.#e.filterActive)if(t)this.#r({...this.#e,filterActive:!0});else{const s=G(this.#t,this.#e.filterType,"");this.#r({...this.#e,entries:s,filterActive:!1,filterText:"",groupedByCatalog:W(s),selectedIndex:0})}}toggleCheck(t){const s=new Set(this.#e.checkedEntries);s.has(t)?s.delete(t):s.add(t),this.#r({...this.#e,allChecked:s.size===this.#t.length,checkedEntries:s})}checkAll(){this.#r({...this.#e,allChecked:!0,checkedEntries:new Set(this.#t.map(t=>t.packageName))})}uncheckAll(){this.#r({...this.#e,allChecked:!1,checkedEntries:new Set})}toggleAll(){this.#e.allChecked?this.uncheckAll():this.checkAll()}startApply(){const t=this.getCheckedEntries();this.#r({...this.#e,applyProgress:{current:0,total:t.length},phase:"applying"})}updateApplyProgress(t){this.#e.applyProgress&&this.#r({...this.#e,applyProgress:{...this.#e.applyProgress,current:t}})}markDone(){this.#r({...this.#e,phase:"done"})}setError(t){this.#r({...this.#e,error:t,phase:"error"})}#r(t){this.#e=t;for(const s of this.#l)try{s()}catch{}}}var Ae=Object.defineProperty,Ie=b((d,t)=>Ae(d,"name",{value:t,configurable:!0}),"d");const Me={major:"red",minor:"yellow",patch:"green"},De={CRITICAL:"red",HIGH:"red",LOW:"gray",MODERATE:"yellow",UNKNOWN:"gray"},Ne={critical:"red",high:"red",low:"gray",medium:"yellow"},Pe={critical:"red",high:"red",low:"green",medium:"yellow"},Le={defer:"gray",review:"yellow",skip:"red",update:"green"},Be=Ie(({changelogUrl:d,entry:t,focused:s,recommendation:i,scrollRef:a})=>{const h=s?"white":"gray";if(!t)return e.jsx(l,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:e.jsx(r,{dimColor:!0,children:"No package selected"})});const f=Me[t.updateType]??"white",y=t.vulnerabilities&&t.vulnerabilities.length>0,p=t.socketReport?.score.overall??0,g=t.socketReport?xe(p):"gray";return e.jsxs(l,{borderColor:h,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsx(l,{flexShrink:0,paddingTop:1,paddingX:2,children:e.jsx(r,{bold:!0,color:"white",children:t.packageName})}),e.jsxs(fe,{flexGrow:1,flexShrink:1,paddingX:2,ref:a,scrollbar:!0,scrollbarColor:"gray",scrollbarStyle:"block",children:[e.jsx(r,{}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Current:"})}),e.jsx(r,{children:t.currentRange})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Target:"})}),e.jsx(r,{children:t.newRange}),e.jsxs(r,{bold:!0,color:f,children:[" ","(",t.updateType,")"]})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Version:"})}),e.jsx(r,{children:t.targetVersion})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Catalog:"})}),e.jsx(r,{children:t.catalogName})]}),t.acceptedRisk&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{color:"gray",children:"── "}),e.jsx(r,{bold:!0,color:"gray",children:"ACKNOWLEDGED RISK"}),e.jsxs(l,{flexDirection:"column",paddingLeft:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Reason: "}),e.jsx(r,{children:t.acceptedRisk.reason})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Accepted: "}),e.jsx(r,{children:t.acceptedRisk.acceptedAt.slice(0,10)})]})]})]}),y&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"red",children:"SECURITY"}),e.jsx(r,{}),t.vulnerabilities.map(o=>e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{gap:1,children:[e.jsxs(r,{bold:!0,color:De[o.severity]??"gray",children:["⚠"," ",o.severity]}),e.jsx(r,{bold:!0,children:o.id})]}),e.jsx(l,{paddingLeft:2,children:e.jsx(r,{children:o.summary})}),e.jsxs(l,{gap:2,paddingLeft:2,children:[o.cvssScore!==void 0&&e.jsxs(r,{dimColor:!0,children:["CVSS:",String(o.cvssScore)]}),o.fixedVersions.length>0&&e.jsxs(r,{dimColor:!0,children:["Fixed in:",o.fixedVersions.join(", ")]})]})]},o.id))]}),t.socketReport&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"cyan",children:"SOCKET.DEV"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Overall: "}),e.jsxs(r,{bold:!0,color:g,children:[String(Math.round(p*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Supply Chain: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.supplyChain*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Quality: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.quality*100)),"%"]})]})]}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Maintenance: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.maintenance*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Vulnerability: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.vulnerability*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"License: "}),e.jsxs(r,{children:[t.socketReport.license||"unknown"," ","(",String(Math.round(t.socketReport.score.license*100)),"%)"]})]})]}),t.socketReport.alerts.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsxs(r,{bold:!0,color:"yellow",children:["⚠"," ",String(t.socketReport.alerts.length)," ","alert",t.socketReport.alerts.length===1?"":"s",":"]}),t.socketReport.alerts.map(o=>e.jsxs(l,{gap:1,paddingLeft:2,children:[e.jsxs(r,{bold:!0,color:Ne[o.severity]??"gray",children:["[",o.severity.toUpperCase(),"]"]}),e.jsx(r,{children:o.type}),e.jsxs(r,{dimColor:!0,children:["(",o.category,")"]})]},o.key))]})]}),i&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"AI ANALYSIS"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Action: "}),e.jsx(r,{bold:!0,color:Le[i.action]??"white",children:i.action})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Risk: "}),e.jsx(r,{bold:!0,color:Pe[i.riskLevel]??"white",children:i.riskLevel})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Effort: "}),e.jsx(r,{bold:!0,children:i.effort})]})]}),i.reason&&e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{children:i.reason})}),i.breakingChanges.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[e.jsx(r,{bold:!0,color:"yellow",children:"Breaking changes:"}),i.breakingChanges.map((o,I)=>e.jsxs(r,{children:[" ","•"," ",o]},String(I)))]})]}),d&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"CHANGELOG"}),e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{color:"cyan",underline:!0,children:d})})]}),e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"LINKS"}),e.jsx(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:e.jsxs(r,{color:"cyan",underline:!0,children:["https://npmx.dev/",t.packageName]})})]}),!i&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"GUIDANCE"}),e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[t.updateType==="major"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"red",children:["⚠"," ","Major update — likely contains breaking changes."]}),e.jsx(r,{dimColor:!0,children:" Review the changelog before updating."}),e.jsx(r,{dimColor:!0,children:" Use --changelog to fetch release URLs."})]}),t.updateType==="minor"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"yellow",children:["ℹ"," ","Minor update — new features, backward compatible."]}),e.jsx(r,{dimColor:!0,children:" Generally safe to update."})]}),t.updateType==="patch"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"green",children:["✓"," ","Patch update — bug fixes only."]}),e.jsx(r,{dimColor:!0,children:" Safe to update."})]}),!i&&e.jsx(r,{dimColor:!0,children:" Use --ai to get AI-powered analysis."})]})]})]})]})},"PackageDetailPanel");var $e=Object.defineProperty,ee=b((d,t)=>$e(d,"name",{value:t,configurable:!0}),"x");const Fe={major:"red",minor:"yellow",patch:"green"},Oe=[{id:"all",label:"All"},{id:"major",label:"Major"},{id:"minor",label:"Minor"},{id:"patch",label:"Patch"},{id:"security",label:"Security"}],Ue=ee(({checked:d,entry:t,isSelected:s})=>{const i=Fe[t.updateType]??"white",a=t.vulnerabilities&&t.vulnerabilities.length>0,h=t.socketReport&&t.socketReport.alerts.length>0,f=!!t.acceptedRisk,y=d?"☑":"☐",p=t.socketReport?`${String(Math.round(t.socketReport.score.overall*100))}%`:"",g=t.socketReport?xe(t.socketReport.score.overall):"gray";return e.jsxs(l,{flexShrink:0,height:1,children:[e.jsx(r,{children:s?">":" "}),e.jsxs(r,{color:d?"white":"gray",children:[" ",y," "]}),a||h?e.jsx(r,{color:f?"gray":"red",children:f?"✓ ":"⚠ "}):e.jsx(r,{children:" "}),e.jsx(l,{flexGrow:1,children:e.jsxs(r,{bold:s,inverse:s,wrap:"truncate",children:[t.packageName,f?" [ack]":""]})}),p&&e.jsxs(r,{color:g,children:[" ",p]}),e.jsxs(r,{dimColor:!0,children:[" ",t.currentRange]}),e.jsxs(r,{dimColor:!0,children:[" ","→"," "]}),e.jsxs(r,{children:[t.newRange," "]}),e.jsx(r,{bold:!0,color:i,children:t.updateType})]})},"PackageRow"),Ge=ee(({count:d,name:t})=>e.jsxs(l,{flexShrink:0,height:1,marginTop:1,children:[e.jsxs(r,{dimColor:!0,children:["▼"," "]}),e.jsx(r,{bold:!0,color:"white",children:t.toUpperCase()}),e.jsxs(r,{dimColor:!0,children:[" ","(",d,")"]})]}),"CatalogHeader"),He=ee(({checkedEntries:d,entries:t,filterActive:s,filteredOutCount:i,filterText:a,filterType:h,focused:f,groupedByCatalog:y,isDryRun:p,onViewportHeightChange:g,scrollOffset:o,selectedIndex:I,totalCatalogEntries:M,totalChecked:v,totalEntries:K,viewportHeight:B})=>{const $=f?"white":"gray",{measuredHeight:m,ref:E}=Se(B,g);let F=0,T=0,D=0,R=0;for(const x of t)x.updateType==="major"?F++:x.updateType==="minor"?T++:D++,(x.vulnerabilities&&x.vulnerabilities.length>0||x.socketReport&&x.socketReport.alerts.length>0)&&R++;const C=[];F>0&&C.push(`${F} major`),T>0&&C.push(`${T} minor`),D>0&&C.push(`${D} patch`),R>0&&C.push(`${R} vulnerable`);const N=C.length>0?` (${C.join(", ")})`:"";let k=0;for(const x of t)d.has(x.packageName)&&k++;const w=[];let V=0;for(const[x,A]of y){w.push(e.jsx(Ge,{count:A.length,name:x},`hdr-${x}`));for(const U of A){const P=V;w.push(e.jsx(Ue,{checked:d.has(U.packageName),entry:U,isSelected:P===I},U.packageName)),V++}}let O=0;for(const[,x]of y)O+=2+x.length;const q=O>m&&m>0;return e.jsxs(l,{borderColor:$,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsxs(l,{flexShrink:0,gap:1,paddingX:1,children:[e.jsx(r,{bold:!0,inverse:!0,children:" VIS "}),e.jsxs(r,{wrap:"truncate",children:[K,v>0?`/${v}`:""," ","outdated",N,M>v?` · ${M-v} dupes`:""]}),!p&&k>0&&e.jsxs(r,{dimColor:!0,children:[" ","—",k," ","selected"]})]}),e.jsx(l,{flexShrink:0,paddingX:1,paddingY:1,children:e.jsx(be,{isFocused:f,keyMap:{next:[],previous:[],useNumbers:!1,useTab:!1},onChange:b(()=>{},"onChange"),showIndex:!1,value:h,children:Oe.map(({id:x,label:A})=>e.jsx(Te,{name:x,children:A},x))})}),s&&e.jsxs(l,{flexShrink:0,paddingX:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/ "}),e.jsx(r,{children:a}),e.jsx(r,{inverse:!0,children:" "})]}),i>0&&e.jsx(l,{flexShrink:0,paddingX:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",i," ","package",i===1?"":"s"," ","filtered out by target constraint — press"," ",e.jsx(r,{bold:!0,color:"white",children:"f"})," ","to view"]})}),e.jsxs(l,{flexDirection:"row",flexGrow:1,overflow:"hidden",ref:E,children:[e.jsx(l,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:e.jsx(l,{flexDirection:"column",marginTop:-o,children:w})}),q&&e.jsx(l,{flexShrink:0,marginLeft:1,marginRight:1,children:e.jsx(ye,{contentHeight:O,placement:"inset",scrollOffset:o,style:"block",viewportHeight:m})})]},`list-${h}-${a}`)]})},"PackageListPanel");var Ke=Object.defineProperty,Ve=b((d,t)=>Ke(d,"name",{value:t,configurable:!0}),"X");const qe=100,Xe=40,Ye=10,We=[],H=["all","major","minor","patch","security"],tr=Ve(({autoExitSeconds:d=0,changelogUrls:t,checkedCount:s=0,filteredOutEntries:i=We,isDryRun:a,store:h,totalCatalogEntries:f=0})=>{const{exit:y}=we(),{columns:p,rows:g}=ue(),o=j.useSyncExternalStore(h.subscribe,h.getSnapshot),[I,M]=j.useState(!1),[v,K]=j.useState(!1),B=j.useRef(null),$=j.useRef(null),m=j.useRef(null),E=j.useRef(null),[F,T]=j.useState(0),[D,R]=j.useState(!1),[C,N]=j.useState(!1),k=j.useMemo(()=>h.getFilteredEntries(),[o.entries,o.filterType,o.filterText,o.sortMode]),w=k[o.selectedIndex]??null,V=w?h.getRecommendation(w.packageName):void 0,O=w&&t?t.get(w.packageName):void 0,q=j.useCallback(n=>{let c=0,u=0;for(const[,Q]of o.groupedByCatalog){c+=2;for(let ne=0;ne<Q.length;ne++){if(u===n)return c;c+=1,u++}}return c},[o.groupedByCatalog]),x=Math.max(1,g-8-(o.filterActive?1:0)),[A,U]=j.useState(x),P=A>0?A:x,L=j.useCallback(n=>{const c=q(n);T(u=>c>u+P-2?Math.max(0,c-P+2):c<u+1?Math.max(0,c-1):u)},[q,P]);if(j.useEffect(()=>{m.current?.scrollToTop()},[w?.packageName]),Ce((n,c)=>{if(n==="c"&&c.ctrl){y();return}if(!C){if(v){c.escape||n==="f"||n==="q"?K(!1):c.downArrow||n==="j"?$.current?.scrollBy(1):(c.upArrow||n==="k")&&$.current?.scrollBy(-1);return}if(D){n==="u"||c.return?(R(!1),h.startApply(),y(h.getCheckedEntries())):c.escape||n==="q"?R(!1):c.downArrow||n==="j"?E.current?.scrollBy(1):c.upArrow||n==="k"?E.current?.scrollBy(-1):c.pageDown?E.current?.scrollBy(5):c.pageUp&&E.current?.scrollBy(-5);return}if(I){c.escape||n==="?"?M(!1):n==="q"?(M(!1),N(!0)):c.downArrow||n==="j"?B.current?.scrollBy(1):(c.upArrow||n==="k")&&B.current?.scrollBy(-1);return}if(n==="?"){M(!0);return}if(n==="q"){N(!0);return}if(c.tab){h.setFocusedPanel(o.focusedPanel==="list"?"detail":"list");return}if(o.focusedPanel==="list"&&(c.leftArrow||c.rightArrow)){const u=H.indexOf(o.filterType),Q=c.rightArrow?(u+1)%H.length:(u-1+H.length)%H.length;T(0),m.current?.scrollToTop(),h.setFilterType(H[Q]);return}if(n==="f"&&i.length>0){K(u=>!u);return}if(o.filterActive){if(c.escape){h.setFilterActive(!1);return}if(c.return){h.setFilterActive(!1);return}if(c.backspace){T(0),h.setFilter(o.filterText.slice(0,-1));return}if(n&&!c.ctrl&&!c.meta){T(0),h.setFilter(o.filterText+n);return}return}if(o.focusedPanel==="list"){if(c.downArrow||n==="j"){const u=Math.min(o.selectedIndex+1,k.length-1);h.setSelectedIndex(u),L(u);return}if(c.upArrow||n==="k"){const u=Math.max(o.selectedIndex-1,0);h.setSelectedIndex(u),L(u);return}if(c.pageDown){const u=Math.min(o.selectedIndex+10,k.length-1);h.setSelectedIndex(u),L(u);return}if(c.pageUp){const u=Math.max(o.selectedIndex-10,0);h.setSelectedIndex(u),L(u);return}if(c.home){h.setSelectedIndex(0),T(0);return}if(c.end){const u=k.length-1;h.setSelectedIndex(u),L(u);return}if(n===" "||c.return){w&&h.toggleCheck(w.packageName);return}if(n==="a"){h.toggleAll();return}if(n==="s"){h.cycleSortMode(),L(h.getSnapshot().selectedIndex);return}if(n==="/"){h.setFilterActive(!0);return}if(n==="u"&&!a&&o.checkedEntries.size>0){R(!0);return}if(c.rightArrow){h.setFocusedPanel("detail");return}return}if(o.focusedPanel==="detail"){if(c.escape||c.leftArrow){h.setFocusedPanel("list");return}if(c.downArrow||n==="j"){m.current?.scrollBy(1);return}if(c.upArrow||n==="k"){m.current?.scrollBy(-1);return}if(c.pageDown){m.current?.scrollBy(10);return}if(c.pageUp){m.current?.scrollBy(-10);return}if(c.home){m.current?.scrollToTop();return}c.end&&m.current?.scrollToBottom()}}},{isActive:!0}),p<Xe||g<Ye)return e.jsx(l,{alignItems:"center",height:g,justifyContent:"center",width:p,children:e.jsxs(r,{color:"yellow",children:["Terminal too small (",p,"x",g,")"]})});const pe=p>=qe,X=[e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"q"}),e.jsx(r,{dimColor:!0,children:"QUIT"})]},"q"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"?"}),e.jsx(r,{dimColor:!0,children:"HELP"})]},"?"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"}),e.jsx(r,{dimColor:!0,children:"NAV"})]},"nav"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Space"}),e.jsx(r,{dimColor:!0,children:"CHECK"})]},"sp"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"a"}),e.jsx(r,{dimColor:!0,children:"ALL"})]},"a")];!a&&o.checkedEntries.size>0&&X.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"green",children:"u"}),e.jsx(r,{dimColor:!0,children:"APPLY"})]},"u")),i.length>0&&X.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"yellow",children:"f"}),e.jsxs(r,{dimColor:!0,children:["FILTERED (",i.length,")"]})]},"fo")),X.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"←→"}),e.jsx(r,{dimColor:!0,children:"FILTER"})]},"lr"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/"}),e.jsx(r,{dimColor:!0,children:"SEARCH"})]},"f"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Tab"}),e.jsx(r,{dimColor:!0,children:"PANEL"})]},"t"));const re=e.jsx(l,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:e.jsx(l,{flexWrap:"wrap",gap:2,paddingX:1,children:X})}),te=e.jsxs(_,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"?"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:B,title:"KEYBOARD SHORTCUTS",visible:I,width:52,children:[e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"NAVIGATION"})]}),e.jsxs(l,{children:[e.jsx(l,{width:24,children:e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↑","/k"]}),e.jsx(r,{dimColor:!0,children:" Move up"})]})}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↓","/j"]}),e.jsx(r,{dimColor:!0,children:" Move down"})]})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Tab"]}),e.jsx(r,{dimColor:!0,children:" Switch panel"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","→","/","←"]}),e.jsx(r,{dimColor:!0,children:" Focus detail/list"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"SELECTION"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Space"]}),e.jsx(r,{dimColor:!0,children:" Toggle check on package"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","a"]}),e.jsx(r,{dimColor:!0,children:" Toggle check all"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","s"]}),e.jsx(r,{dimColor:!0,children:" Cycle sort (default / name / type / severity)"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"FILTERS"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","←→"]}),e.jsx(r,{dimColor:!0,children:" Switch filter tab"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","/"]}),e.jsx(r,{dimColor:!0,children:" Text filter"})]}),i.length>0&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","f"]}),e.jsx(r,{dimColor:!0,children:" View filtered-out packages"})]})]}),e.jsxs(l,{flexDirection:"column",children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"ACTIONS"})]}),!a&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","u"]}),e.jsx(r,{dimColor:!0,children:" Apply selected updates"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","q"]}),e.jsx(r,{dimColor:!0,children:" Quit"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","?"]}),e.jsx(r,{dimColor:!0,children:" Toggle help"})]})]})]}),Y=h.getCheckedEntries(),z=Y.filter(n=>n.updateType==="major").length,ge=e.jsxs(l,{alignItems:"center",flexDirection:"column",children:[z>0&&e.jsx(l,{marginBottom:1,marginTop:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",z," ","major update",z===1?"":"s"," ","— review breaking changes"]})}),e.jsxs(r,{dimColor:!0,children:["Press"," ",e.jsx(r,{bold:!0,color:"white",children:"u"})," ","or"," ",e.jsx(r,{bold:!0,color:"white",children:"Enter"})," ","to confirm,"," ",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","to cancel"]})]}),le=e.jsx(_,{footer:ge,scrollRef:E,title:`Apply ${Y.length} update${Y.length===1?"":"s"}?`,visible:D,width:70,children:Y.map(n=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",n.packageName]}),e.jsxs(r,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),e.jsx(r,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))}),se=i.length>0?e.jsx(_,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"f"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:$,title:`${i.length} PACKAGE${i.length===1?"":"S"} FILTERED BY TARGET`,visible:v,width:70,children:e.jsxs(l,{flexDirection:"column",children:[e.jsx(l,{marginBottom:1,children:e.jsxs(r,{dimColor:!0,children:["These packages have newer versions available but are excluded by the current target constraint. Use"," ",e.jsx(r,{bold:!0,color:"white",children:"--target latest"})," ","to include them."]})}),i.map(n=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",n.packageName]}),e.jsxs(r,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),e.jsx(r,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))]})}):null,ie=e.jsx(He,{checkedEntries:o.checkedEntries,entries:k,filterActive:o.filterActive,filteredOutCount:i.length,filterText:o.filterText,filterType:o.filterType,focused:o.focusedPanel==="list",groupedByCatalog:o.groupedByCatalog,isDryRun:a,onViewportHeightChange:U,scrollOffset:F,selectedIndex:o.selectedIndex,totalCatalogEntries:f,totalChecked:s,totalEntries:k.length,viewportHeight:P}),oe=e.jsx(Be,{changelogUrl:O,entry:w,focused:o.focusedPanel==="detail",recommendation:V,scrollRef:m});if(pe){const n=Math.floor(p*.35);return e.jsxs(l,{flexDirection:"column",height:g,width:p,children:[e.jsxs(l,{flexDirection:"row",flexGrow:1,children:[e.jsx(l,{flexGrow:1,children:ie}),e.jsx(l,{width:n,children:oe})]}),re,le,se,e.jsx(ce,{autoExitSeconds:d||3,onCancel:b(()=>{N(!1)},"onCancel"),visible:C}),te]})}const je=Math.floor(g*.55);return e.jsxs(l,{flexDirection:"column",height:g,width:p,children:[e.jsx(l,{height:je,children:ie}),e.jsx(l,{flexGrow:1,children:oe}),re,le,se,e.jsx(ce,{autoExitSeconds:d||3,onCancel:b(()=>{N(!1)},"onCancel"),visible:C}),te]})},"VisUpdateApp");export{tr as C,rr as U,er as a};
|
|
1
|
+
var me=Object.defineProperty;var b=(d,t)=>me(d,"name",{value:t,configurable:!0});import{aG as ue,a7 as e,a8 as l,n as r,l as xe,aH as fe,aI as ye,aJ as we,x as j,ah as Ce,aK as _,aL as ce}from"../packem_chunks/bin.js";import{n as ke}from"./spinner-0acw5pd_.js";import{g as be,r as Te}from"./tabs-zUSdR1HI.js";import{u as Se}from"./use-measured-height-DyCBfLtu.js";var ve=Object.defineProperty,Ee=b((d,t)=>ve(d,"name",{value:t,configurable:!0}),"a");const er=Ee(({current:d,total:t})=>{const{columns:s}=ue(),i=s||80,a=t>0?Math.min(1,d/t):0,h=`${String(Math.round(a*100)).padStart(3)}%`,f=`${String(d)}/${String(t)}`,y=Math.max(10,i-2-h.length-1),p=Math.round(y*a),g=y-p;return e.jsxs(l,{flexDirection:"column",paddingX:1,children:[e.jsxs(l,{children:[e.jsx(ke,{type:"dots"}),e.jsx(r,{children:" Checking catalog dependencies "}),e.jsx(r,{dimColor:!0,children:f})]}),e.jsxs(l,{children:[e.jsx(r,{color:"cyan",children:"━".repeat(p)}),e.jsx(r,{dimColor:!0,children:"─".repeat(g)}),e.jsxs(r,{dimColor:!0,children:[" ",h]})]})]})},"CheckProgressApp");var Re=Object.defineProperty,S=b((d,t)=>Re(d,"name",{value:t,configurable:!0}),"l");const J=["default","name","updateType","severity"],de=S(d=>{const t=d.vulnerabilities?.map(s=>s.severity)??[];return t.includes("CRITICAL")?4:t.includes("HIGH")?3:t.includes("MODERATE")?2:t.includes("LOW")?1:0},"severityRank"),ae={digest:0,major:3,minor:2,patch:1,pin:0,unknown:0},he=S((d,t)=>{if(t==="default")return d;const s=[...d];return t==="name"?s.sort((i,a)=>i.packageName.localeCompare(a.packageName)):t==="updateType"?s.sort((i,a)=>(ae[a.updateType]??0)-(ae[i.updateType]??0)||i.packageName.localeCompare(a.packageName)):s.sort((i,a)=>de(a)-de(i)||i.packageName.localeCompare(a.packageName)),s},"sortEntries"),Z=S(d=>`${d.ecosystem}|${d.file}:${String(d.line)}|${d.name}`,"ecosystemEntryKey"),W=S(d=>{const t=new Map;for(const s of d){const i=t.get(s.catalogName);i?i.push(s):t.set(s.catalogName,[s])}return t},"groupByCatalog"),G=S((d,t,s)=>{let i=d;if(t!=="all"&&(i=t==="security"?i.filter(a=>a.vulnerabilities&&a.vulnerabilities.length>0||a.socketReport&&a.socketReport.alerts.length>0):i.filter(a=>a.updateType===t)),s){const a=s.toLowerCase();i=i.filter(h=>h.packageName.toLowerCase().includes(a))}return i},"filterEntries");class rr{static{b(this,"UpdateStore")}static{S(this,"UpdateStore")}#e;#l=new Set;#t;#s;#i=null;constructor(t,s=null,i=[]){this.#t=t,this.#s=i,s&&(this.#i=new Map(s.recommendations.map(a=>[a.package,a]))),this.#e={aiResult:s,allChecked:!0,applyProgress:null,checkedEcosystemKeys:new Set(i.map(a=>Z(a))),checkedEntries:new Set(t.map(a=>a.packageName)),ecosystemEntries:i,entries:t,error:null,filterActive:!1,filterText:"",filterType:"all",focusedPanel:"list",groupedByCatalog:W(t),phase:"browsing",selectedIndex:0,sortMode:"default"}}getSnapshot=S(()=>this.#e,"getSnapshot");subscribe=S(t=>(this.#l.add(t),()=>{this.#l.delete(t)}),"subscribe");getFilteredEntries(){return he(G(this.#t,this.#e.filterType,this.#e.filterText),this.#e.sortMode)}setSortMode(t){if(t===this.#e.sortMode)return;const s=this.getFilteredEntries()[this.#e.selectedIndex]?.packageName,i=he(G(this.#t,this.#e.filterType,this.#e.filterText),t),a=s?Math.max(0,i.findIndex(h=>h.packageName===s)):0;this.#r({...this.#e,selectedIndex:a,sortMode:t})}cycleSortMode(){const t=J.indexOf(this.#e.sortMode),s=J[(t+1)%J.length]??"default";this.setSortMode(s)}getRecommendation(t){return this.#i?.get(t)}getCheckedEntries(){return this.#t.filter(t=>this.#e.checkedEntries.has(t.packageName))}getCheckedEcosystemEntries(){return this.#s.filter(t=>this.#e.checkedEcosystemKeys.has(Z(t)))}toggleEcosystemCheck(t){const s=new Set(this.#e.checkedEcosystemKeys);s.has(t)?s.delete(t):s.add(t),this.#r({...this.#e,checkedEcosystemKeys:s})}checkAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set(this.#s.map(t=>Z(t)))})}uncheckAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set})}setSelectedIndex(t){const s=this.getFilteredEntries(),i=Math.max(0,Math.min(t,s.length-1));i!==this.#e.selectedIndex&&this.#r({...this.#e,selectedIndex:i})}setFocusedPanel(t){t!==this.#e.focusedPanel&&this.#r({...this.#e,focusedPanel:t})}setFilterType(t){if(t!==this.#e.filterType){const s=G(this.#t,t,this.#e.filterText);this.#r({...this.#e,entries:s,filterType:t,groupedByCatalog:W(s),selectedIndex:0})}}setFilter(t){const s=G(this.#t,this.#e.filterType,t);this.#r({...this.#e,entries:s,filterText:t,groupedByCatalog:W(s),selectedIndex:0})}setFilterActive(t){if(t!==this.#e.filterActive)if(t)this.#r({...this.#e,filterActive:!0});else{const s=G(this.#t,this.#e.filterType,"");this.#r({...this.#e,entries:s,filterActive:!1,filterText:"",groupedByCatalog:W(s),selectedIndex:0})}}toggleCheck(t){const s=new Set(this.#e.checkedEntries);s.has(t)?s.delete(t):s.add(t),this.#r({...this.#e,allChecked:s.size===this.#t.length,checkedEntries:s})}checkAll(){this.#r({...this.#e,allChecked:!0,checkedEntries:new Set(this.#t.map(t=>t.packageName))})}uncheckAll(){this.#r({...this.#e,allChecked:!1,checkedEntries:new Set})}toggleAll(){this.#e.allChecked?this.uncheckAll():this.checkAll()}startApply(){const t=this.getCheckedEntries();this.#r({...this.#e,applyProgress:{current:0,total:t.length},phase:"applying"})}updateApplyProgress(t){this.#e.applyProgress&&this.#r({...this.#e,applyProgress:{...this.#e.applyProgress,current:t}})}markDone(){this.#r({...this.#e,phase:"done"})}setError(t){this.#r({...this.#e,error:t,phase:"error"})}#r(t){this.#e=t;for(const s of this.#l)try{s()}catch{}}}var Ae=Object.defineProperty,Ie=b((d,t)=>Ae(d,"name",{value:t,configurable:!0}),"d");const Me={major:"red",minor:"yellow",patch:"green"},De={CRITICAL:"red",HIGH:"red",LOW:"gray",MODERATE:"yellow",UNKNOWN:"gray"},Ne={critical:"red",high:"red",low:"gray",medium:"yellow"},Pe={critical:"red",high:"red",low:"green",medium:"yellow"},Le={defer:"gray",review:"yellow",skip:"red",update:"green"},Be=Ie(({changelogUrl:d,entry:t,focused:s,recommendation:i,scrollRef:a})=>{const h=s?"white":"gray";if(!t)return e.jsx(l,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:e.jsx(r,{dimColor:!0,children:"No package selected"})});const f=Me[t.updateType]??"white",y=t.vulnerabilities&&t.vulnerabilities.length>0,p=t.socketReport?.score.overall??0,g=t.socketReport?xe(p):"gray";return e.jsxs(l,{borderColor:h,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsx(l,{flexShrink:0,paddingTop:1,paddingX:2,children:e.jsx(r,{bold:!0,color:"white",children:t.packageName})}),e.jsxs(fe,{flexGrow:1,flexShrink:1,paddingX:2,ref:a,scrollbar:!0,scrollbarColor:"gray",scrollbarStyle:"block",children:[e.jsx(r,{}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Current:"})}),e.jsx(r,{children:t.currentRange})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Target:"})}),e.jsx(r,{children:t.newRange}),e.jsxs(r,{bold:!0,color:f,children:[" ","(",t.updateType,")"]})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Version:"})}),e.jsx(r,{children:t.targetVersion})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Catalog:"})}),e.jsx(r,{children:t.catalogName})]}),t.acceptedRisk&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{color:"gray",children:"── "}),e.jsx(r,{bold:!0,color:"gray",children:"ACKNOWLEDGED RISK"}),e.jsxs(l,{flexDirection:"column",paddingLeft:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Reason: "}),e.jsx(r,{children:t.acceptedRisk.reason})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Accepted: "}),e.jsx(r,{children:t.acceptedRisk.acceptedAt.slice(0,10)})]})]})]}),y&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"red",children:"SECURITY"}),e.jsx(r,{}),t.vulnerabilities.map(o=>e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{gap:1,children:[e.jsxs(r,{bold:!0,color:De[o.severity]??"gray",children:["⚠"," ",o.severity]}),e.jsx(r,{bold:!0,children:o.id})]}),e.jsx(l,{paddingLeft:2,children:e.jsx(r,{children:o.summary})}),e.jsxs(l,{gap:2,paddingLeft:2,children:[o.cvssScore!==void 0&&e.jsxs(r,{dimColor:!0,children:["CVSS:",String(o.cvssScore)]}),o.fixedVersions.length>0&&e.jsxs(r,{dimColor:!0,children:["Fixed in:",o.fixedVersions.join(", ")]})]})]},o.id))]}),t.socketReport&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"cyan",children:"SOCKET.DEV"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Overall: "}),e.jsxs(r,{bold:!0,color:g,children:[String(Math.round(p*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Supply Chain: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.supplyChain*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Quality: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.quality*100)),"%"]})]})]}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Maintenance: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.maintenance*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Vulnerability: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.vulnerability*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"License: "}),e.jsxs(r,{children:[t.socketReport.license||"unknown"," ","(",String(Math.round(t.socketReport.score.license*100)),"%)"]})]})]}),t.socketReport.alerts.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsxs(r,{bold:!0,color:"yellow",children:["⚠"," ",String(t.socketReport.alerts.length)," ","alert",t.socketReport.alerts.length===1?"":"s",":"]}),t.socketReport.alerts.map(o=>e.jsxs(l,{gap:1,paddingLeft:2,children:[e.jsxs(r,{bold:!0,color:Ne[o.severity]??"gray",children:["[",o.severity.toUpperCase(),"]"]}),e.jsx(r,{children:o.type}),e.jsxs(r,{dimColor:!0,children:["(",o.category,")"]})]},o.key))]})]}),i&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"AI ANALYSIS"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Action: "}),e.jsx(r,{bold:!0,color:Le[i.action]??"white",children:i.action})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Risk: "}),e.jsx(r,{bold:!0,color:Pe[i.riskLevel]??"white",children:i.riskLevel})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Effort: "}),e.jsx(r,{bold:!0,children:i.effort})]})]}),i.reason&&e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{children:i.reason})}),i.breakingChanges.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[e.jsx(r,{bold:!0,color:"yellow",children:"Breaking changes:"}),i.breakingChanges.map((o,I)=>e.jsxs(r,{children:[" ","•"," ",o]},String(I)))]})]}),d&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"CHANGELOG"}),e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{color:"cyan",underline:!0,children:d})})]}),e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"LINKS"}),e.jsx(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:e.jsxs(r,{color:"cyan",underline:!0,children:["https://npmx.dev/",t.packageName]})})]}),!i&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"GUIDANCE"}),e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[t.updateType==="major"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"red",children:["⚠"," ","Major update — likely contains breaking changes."]}),e.jsx(r,{dimColor:!0,children:" Review the changelog before updating."}),e.jsx(r,{dimColor:!0,children:" Use --changelog to fetch release URLs."})]}),t.updateType==="minor"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"yellow",children:["ℹ"," ","Minor update — new features, backward compatible."]}),e.jsx(r,{dimColor:!0,children:" Generally safe to update."})]}),t.updateType==="patch"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"green",children:["✓"," ","Patch update — bug fixes only."]}),e.jsx(r,{dimColor:!0,children:" Safe to update."})]}),!i&&e.jsx(r,{dimColor:!0,children:" Use --ai to get AI-powered analysis."})]})]})]})]})},"PackageDetailPanel");var $e=Object.defineProperty,ee=b((d,t)=>$e(d,"name",{value:t,configurable:!0}),"x");const Fe={major:"red",minor:"yellow",patch:"green"},Oe=[{id:"all",label:"All"},{id:"major",label:"Major"},{id:"minor",label:"Minor"},{id:"patch",label:"Patch"},{id:"security",label:"Security"}],Ue=ee(({checked:d,entry:t,isSelected:s})=>{const i=Fe[t.updateType]??"white",a=t.vulnerabilities&&t.vulnerabilities.length>0,h=t.socketReport&&t.socketReport.alerts.length>0,f=!!t.acceptedRisk,y=d?"☑":"☐",p=t.socketReport?`${String(Math.round(t.socketReport.score.overall*100))}%`:"",g=t.socketReport?xe(t.socketReport.score.overall):"gray";return e.jsxs(l,{flexShrink:0,height:1,children:[e.jsx(r,{children:s?">":" "}),e.jsxs(r,{color:d?"white":"gray",children:[" ",y," "]}),a||h?e.jsx(r,{color:f?"gray":"red",children:f?"✓ ":"⚠ "}):e.jsx(r,{children:" "}),e.jsx(l,{flexGrow:1,children:e.jsxs(r,{bold:s,inverse:s,wrap:"truncate",children:[t.packageName,f?" [ack]":""]})}),p&&e.jsxs(r,{color:g,children:[" ",p]}),e.jsxs(r,{dimColor:!0,children:[" ",t.currentRange]}),e.jsxs(r,{dimColor:!0,children:[" ","→"," "]}),e.jsxs(r,{children:[t.newRange," "]}),e.jsx(r,{bold:!0,color:i,children:t.updateType})]})},"PackageRow"),Ge=ee(({count:d,name:t})=>e.jsxs(l,{flexShrink:0,height:1,marginTop:1,children:[e.jsxs(r,{dimColor:!0,children:["▼"," "]}),e.jsx(r,{bold:!0,color:"white",children:t.toUpperCase()}),e.jsxs(r,{dimColor:!0,children:[" ","(",d,")"]})]}),"CatalogHeader"),He=ee(({checkedEntries:d,entries:t,filterActive:s,filteredOutCount:i,filterText:a,filterType:h,focused:f,groupedByCatalog:y,isDryRun:p,onViewportHeightChange:g,scrollOffset:o,selectedIndex:I,totalCatalogEntries:M,totalChecked:v,totalEntries:K,viewportHeight:B})=>{const $=f?"white":"gray",{measuredHeight:m,ref:E}=Se(B,g);let F=0,T=0,D=0,R=0;for(const x of t)x.updateType==="major"?F++:x.updateType==="minor"?T++:D++,(x.vulnerabilities&&x.vulnerabilities.length>0||x.socketReport&&x.socketReport.alerts.length>0)&&R++;const C=[];F>0&&C.push(`${F} major`),T>0&&C.push(`${T} minor`),D>0&&C.push(`${D} patch`),R>0&&C.push(`${R} vulnerable`);const N=C.length>0?` (${C.join(", ")})`:"";let k=0;for(const x of t)d.has(x.packageName)&&k++;const w=[];let V=0;for(const[x,A]of y){w.push(e.jsx(Ge,{count:A.length,name:x},`hdr-${x}`));for(const U of A){const P=V;w.push(e.jsx(Ue,{checked:d.has(U.packageName),entry:U,isSelected:P===I},U.packageName)),V++}}let O=0;for(const[,x]of y)O+=2+x.length;const q=O>m&&m>0;return e.jsxs(l,{borderColor:$,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsxs(l,{flexShrink:0,gap:1,paddingX:1,children:[e.jsx(r,{bold:!0,inverse:!0,children:" VIS "}),e.jsxs(r,{wrap:"truncate",children:[K,v>0?`/${v}`:""," ","outdated",N,M>v?` · ${M-v} dupes`:""]}),!p&&k>0&&e.jsxs(r,{dimColor:!0,children:[" ","—",k," ","selected"]})]}),e.jsx(l,{flexShrink:0,paddingX:1,paddingY:1,children:e.jsx(be,{isFocused:f,keyMap:{next:[],previous:[],useNumbers:!1,useTab:!1},onChange:b(()=>{},"onChange"),showIndex:!1,value:h,children:Oe.map(({id:x,label:A})=>e.jsx(Te,{name:x,children:A},x))})}),s&&e.jsxs(l,{flexShrink:0,paddingX:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/ "}),e.jsx(r,{children:a}),e.jsx(r,{inverse:!0,children:" "})]}),i>0&&e.jsx(l,{flexShrink:0,paddingX:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",i," ","package",i===1?"":"s"," ","filtered out by target constraint — press"," ",e.jsx(r,{bold:!0,color:"white",children:"f"})," ","to view"]})}),e.jsxs(l,{flexDirection:"row",flexGrow:1,overflow:"hidden",ref:E,children:[e.jsx(l,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:e.jsx(l,{flexDirection:"column",marginTop:-o,children:w})}),q&&e.jsx(l,{flexShrink:0,marginLeft:1,marginRight:1,children:e.jsx(ye,{contentHeight:O,placement:"inset",scrollOffset:o,style:"block",viewportHeight:m})})]},`list-${h}-${a}`)]})},"PackageListPanel");var Ke=Object.defineProperty,Ve=b((d,t)=>Ke(d,"name",{value:t,configurable:!0}),"X");const qe=100,Xe=40,Ye=10,We=[],H=["all","major","minor","patch","security"],tr=Ve(({autoExitSeconds:d=0,changelogUrls:t,checkedCount:s=0,filteredOutEntries:i=We,isDryRun:a,store:h,totalCatalogEntries:f=0})=>{const{exit:y}=we(),{columns:p,rows:g}=ue(),o=j.useSyncExternalStore(h.subscribe,h.getSnapshot),[I,M]=j.useState(!1),[v,K]=j.useState(!1),B=j.useRef(null),$=j.useRef(null),m=j.useRef(null),E=j.useRef(null),[F,T]=j.useState(0),[D,R]=j.useState(!1),[C,N]=j.useState(!1),k=j.useMemo(()=>h.getFilteredEntries(),[o.entries,o.filterType,o.filterText,o.sortMode]),w=k[o.selectedIndex]??null,V=w?h.getRecommendation(w.packageName):void 0,O=w&&t?t.get(w.packageName):void 0,q=j.useCallback(n=>{let c=0,u=0;for(const[,Q]of o.groupedByCatalog){c+=2;for(let ne=0;ne<Q.length;ne++){if(u===n)return c;c+=1,u++}}return c},[o.groupedByCatalog]),x=Math.max(1,g-8-(o.filterActive?1:0)),[A,U]=j.useState(x),P=A>0?A:x,L=j.useCallback(n=>{const c=q(n);T(u=>c>u+P-2?Math.max(0,c-P+2):c<u+1?Math.max(0,c-1):u)},[q,P]);if(j.useEffect(()=>{m.current?.scrollToTop()},[w?.packageName]),Ce((n,c)=>{if(n==="c"&&c.ctrl){y();return}if(!C){if(v){c.escape||n==="f"||n==="q"?K(!1):c.downArrow||n==="j"?$.current?.scrollBy(1):(c.upArrow||n==="k")&&$.current?.scrollBy(-1);return}if(D){n==="u"||c.return?(R(!1),h.startApply(),y(h.getCheckedEntries())):c.escape||n==="q"?R(!1):c.downArrow||n==="j"?E.current?.scrollBy(1):c.upArrow||n==="k"?E.current?.scrollBy(-1):c.pageDown?E.current?.scrollBy(5):c.pageUp&&E.current?.scrollBy(-5);return}if(I){c.escape||n==="?"?M(!1):n==="q"?(M(!1),N(!0)):c.downArrow||n==="j"?B.current?.scrollBy(1):(c.upArrow||n==="k")&&B.current?.scrollBy(-1);return}if(n==="?"){M(!0);return}if(n==="q"){N(!0);return}if(c.tab){h.setFocusedPanel(o.focusedPanel==="list"?"detail":"list");return}if(o.focusedPanel==="list"&&(c.leftArrow||c.rightArrow)){const u=H.indexOf(o.filterType),Q=c.rightArrow?(u+1)%H.length:(u-1+H.length)%H.length;T(0),m.current?.scrollToTop(),h.setFilterType(H[Q]);return}if(n==="f"&&i.length>0){K(u=>!u);return}if(o.filterActive){if(c.escape){h.setFilterActive(!1);return}if(c.return){h.setFilterActive(!1);return}if(c.backspace){T(0),h.setFilter(o.filterText.slice(0,-1));return}if(n&&!c.ctrl&&!c.meta){T(0),h.setFilter(o.filterText+n);return}return}if(o.focusedPanel==="list"){if(c.downArrow||n==="j"){const u=Math.min(o.selectedIndex+1,k.length-1);h.setSelectedIndex(u),L(u);return}if(c.upArrow||n==="k"){const u=Math.max(o.selectedIndex-1,0);h.setSelectedIndex(u),L(u);return}if(c.pageDown){const u=Math.min(o.selectedIndex+10,k.length-1);h.setSelectedIndex(u),L(u);return}if(c.pageUp){const u=Math.max(o.selectedIndex-10,0);h.setSelectedIndex(u),L(u);return}if(c.home){h.setSelectedIndex(0),T(0);return}if(c.end){const u=k.length-1;h.setSelectedIndex(u),L(u);return}if(n===" "||c.return){w&&h.toggleCheck(w.packageName);return}if(n==="a"){h.toggleAll();return}if(n==="s"){h.cycleSortMode(),L(h.getSnapshot().selectedIndex);return}if(n==="/"){h.setFilterActive(!0);return}if(n==="u"&&!a&&o.checkedEntries.size>0){R(!0);return}if(c.rightArrow){h.setFocusedPanel("detail");return}return}if(o.focusedPanel==="detail"){if(c.escape||c.leftArrow){h.setFocusedPanel("list");return}if(c.downArrow||n==="j"){m.current?.scrollBy(1);return}if(c.upArrow||n==="k"){m.current?.scrollBy(-1);return}if(c.pageDown){m.current?.scrollBy(10);return}if(c.pageUp){m.current?.scrollBy(-10);return}if(c.home){m.current?.scrollToTop();return}c.end&&m.current?.scrollToBottom()}}},{isActive:!0}),p<Xe||g<Ye)return e.jsx(l,{alignItems:"center",height:g,justifyContent:"center",width:p,children:e.jsxs(r,{color:"yellow",children:["Terminal too small (",p,"x",g,")"]})});const pe=p>=qe,X=[e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"q"}),e.jsx(r,{dimColor:!0,children:"QUIT"})]},"q"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"?"}),e.jsx(r,{dimColor:!0,children:"HELP"})]},"?"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"}),e.jsx(r,{dimColor:!0,children:"NAV"})]},"nav"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Space"}),e.jsx(r,{dimColor:!0,children:"CHECK"})]},"sp"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"a"}),e.jsx(r,{dimColor:!0,children:"ALL"})]},"a")];!a&&o.checkedEntries.size>0&&X.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"green",children:"u"}),e.jsx(r,{dimColor:!0,children:"APPLY"})]},"u")),i.length>0&&X.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"yellow",children:"f"}),e.jsxs(r,{dimColor:!0,children:["FILTERED (",i.length,")"]})]},"fo")),X.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"←→"}),e.jsx(r,{dimColor:!0,children:"FILTER"})]},"lr"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/"}),e.jsx(r,{dimColor:!0,children:"SEARCH"})]},"f"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Tab"}),e.jsx(r,{dimColor:!0,children:"PANEL"})]},"t"));const re=e.jsx(l,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:e.jsx(l,{flexWrap:"wrap",gap:2,paddingX:1,children:X})}),te=e.jsxs(_,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"?"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:B,title:"KEYBOARD SHORTCUTS",visible:I,width:52,children:[e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"NAVIGATION"})]}),e.jsxs(l,{children:[e.jsx(l,{width:24,children:e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↑","/k"]}),e.jsx(r,{dimColor:!0,children:" Move up"})]})}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↓","/j"]}),e.jsx(r,{dimColor:!0,children:" Move down"})]})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Tab"]}),e.jsx(r,{dimColor:!0,children:" Switch panel"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","→","/","←"]}),e.jsx(r,{dimColor:!0,children:" Focus detail/list"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"SELECTION"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Space"]}),e.jsx(r,{dimColor:!0,children:" Toggle check on package"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","a"]}),e.jsx(r,{dimColor:!0,children:" Toggle check all"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","s"]}),e.jsx(r,{dimColor:!0,children:" Cycle sort (default / name / type / severity)"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"FILTERS"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","←→"]}),e.jsx(r,{dimColor:!0,children:" Switch filter tab"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","/"]}),e.jsx(r,{dimColor:!0,children:" Text filter"})]}),i.length>0&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","f"]}),e.jsx(r,{dimColor:!0,children:" View filtered-out packages"})]})]}),e.jsxs(l,{flexDirection:"column",children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"ACTIONS"})]}),!a&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","u"]}),e.jsx(r,{dimColor:!0,children:" Apply selected updates"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","q"]}),e.jsx(r,{dimColor:!0,children:" Quit"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","?"]}),e.jsx(r,{dimColor:!0,children:" Toggle help"})]})]})]}),Y=h.getCheckedEntries(),z=Y.filter(n=>n.updateType==="major").length,ge=e.jsxs(l,{alignItems:"center",flexDirection:"column",children:[z>0&&e.jsx(l,{marginBottom:1,marginTop:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",z," ","major update",z===1?"":"s"," ","— review breaking changes"]})}),e.jsxs(r,{dimColor:!0,children:["Press"," ",e.jsx(r,{bold:!0,color:"white",children:"u"})," ","or"," ",e.jsx(r,{bold:!0,color:"white",children:"Enter"})," ","to confirm,"," ",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","to cancel"]})]}),le=e.jsx(_,{footer:ge,scrollRef:E,title:`Apply ${Y.length} update${Y.length===1?"":"s"}?`,visible:D,width:70,children:Y.map(n=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",n.packageName]}),e.jsxs(r,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),e.jsx(r,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))}),se=i.length>0?e.jsx(_,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"f"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:$,title:`${i.length} PACKAGE${i.length===1?"":"S"} FILTERED BY TARGET`,visible:v,width:70,children:e.jsxs(l,{flexDirection:"column",children:[e.jsx(l,{marginBottom:1,children:e.jsxs(r,{dimColor:!0,children:["These packages have newer versions available but are excluded by the current target constraint. Use"," ",e.jsx(r,{bold:!0,color:"white",children:"--target latest"})," ","to include them."]})}),i.map(n=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",n.packageName]}),e.jsxs(r,{dimColor:!0,children:[n.currentRange," ","→"," ",n.newRange]}),e.jsx(r,{bold:!0,color:n.updateType==="major"?"red":n.updateType==="minor"?"yellow":"green",children:n.updateType})]},n.packageName))]})}):null,ie=e.jsx(He,{checkedEntries:o.checkedEntries,entries:k,filterActive:o.filterActive,filteredOutCount:i.length,filterText:o.filterText,filterType:o.filterType,focused:o.focusedPanel==="list",groupedByCatalog:o.groupedByCatalog,isDryRun:a,onViewportHeightChange:U,scrollOffset:F,selectedIndex:o.selectedIndex,totalCatalogEntries:f,totalChecked:s,totalEntries:k.length,viewportHeight:P}),oe=e.jsx(Be,{changelogUrl:O,entry:w,focused:o.focusedPanel==="detail",recommendation:V,scrollRef:m});if(pe){const n=Math.floor(p*.35);return e.jsxs(l,{flexDirection:"column",height:g,width:p,children:[e.jsxs(l,{flexDirection:"row",flexGrow:1,children:[e.jsx(l,{flexGrow:1,children:ie}),e.jsx(l,{width:n,children:oe})]}),re,le,se,e.jsx(ce,{autoExitSeconds:d||3,onCancel:b(()=>{N(!1)},"onCancel"),visible:C}),te]})}const je=Math.floor(g*.55);return e.jsxs(l,{flexDirection:"column",height:g,width:p,children:[e.jsx(l,{height:je,children:ie}),e.jsx(l,{flexGrow:1,children:oe}),re,le,se,e.jsx(ce,{autoExitSeconds:d||3,onCancel:b(()=>{N(!1)},"onCancel"),visible:C}),te]})},"VisUpdateApp");export{tr as C,rr as U,er as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var fe=Object.defineProperty;var g=(e,t)=>fe(e,"name",{value:t,configurable:!0});import{createRequire as pe}from"node:module";import{M as y,l as W,B as me,a as j,K as Y,C as Z}from"./readFileSync-DseCu8sg-DEq4Fn3a.js";import{aL as L}from"../packem_chunks/bin.js";import{s as ve,b as ee,E as $e}from"../packem_chunks/config.js";import{s as je}from"./watch-DEL0yol9.js";const ge=pe(import.meta.url),I=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,P=g(e=>{if(typeof I<"u"&&I.versions&&I.versions.node){const[t,r]=I.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return I.getBuiltinModule(e)}return ge(e)},"__cjs_getBuiltinModule"),{createHash:A}=P("node:crypto"),{fileURLToPath:he,pathToFileURL:ye}=P("node:url"),{spawnSync:te,spawn:xe}=P("node:child_process"),{openSync:we,writeSync:be,closeSync:Ce,readFileSync:re,statSync:Ae,mkdirSync:Se,writeFileSync:Fe}=P("node:fs"),{availableParallelism:N}=P("node:os");var ke=Object.defineProperty,q=g((e,t)=>ke(e,"name",{value:t,configurable:!0}),"o$4");const ne=q((e,t)=>{for(const r of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const n=e[r];if(n&&typeof n[t]=="string")return n[t]}},"declaredVersion"),K=q((e,t)=>{for(const r of t){const n=y(e,r);if(W(n))return n}},"findFirstConfig"),Oe=q(e=>{const t=y(e,"package.json");if(!W(t))return{};try{return ve(t)}catch{return{}}},"readRootPackageJson"),Pt=q((e,t)=>{const r=Oe(e),n=new Map;for(const o of t){const s=o.detect(e,r);s&&n.set(o.id,s)}return n},"detectAdapters");var Ie=Object.defineProperty,$=g((e,t)=>Ie(e,"name",{value:t,configurable:!0}),"o$3");const Re={error:"error",info:"info",information:"info",warning:"warning"},Tt={argsCheck:$((e,t)=>B(e,t,!1),"argsCheck"),argsFix:$((e,t)=>B(e,t,!0),"argsFix"),bin:$(()=>["pnpm","exec","biome"],"bin"),cacheKey:$((e,t)=>{const r=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:$((e,t)=>{const r=ne(t,L.biome.packageNames[0]),n=K(e,L.biome.configFiles);if(!(!r&&!n))return{adapter:"biome",configFile:n,declared:!!r,declaredVersion:r,root:e}},"detect"),extensions:["astro","cjs","css","cts","js","json","jsonc","jsx","mjs","mts","svelte","ts","tsx","vue"],id:"biome",kind:"both",parse:$((e,t)=>{if(!e.stdout.trim())return[];let r;try{r=JSON.parse(e.stdout)}catch{return[{adapter:"biome",file:t.root,fixable:!1,message:`biome output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of r.diagnostics??[]){const s=o.location?.start,i=o.location?.end,a=Me(t.root,o.location?.path),c=o.category??"",l=c==="format"||c.startsWith("format/");n.push({adapter:"biome",column:s?.column&&s.column>0?s.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:a,fixable:!0,line:s?.line&&s.line>0?s.line:void 0,message:l?"Code style issues would be auto-fixed":o.message??"",ruleId:c||void 0,severity:Re[o.severity??""]??"warning"})}return n},"parse")},B=$((e,t,r)=>{const n=["check","--reporter=json"];return r&&n.push("--write"),typeof t.maxWarnings=="number"&&n.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildArgs"),Me=$((e,t)=>{const r=typeof t=="string"?t:t?.file;return r?r.startsWith("/")||/^[a-z]:[\\/]/i.test(r)?r:y(e,r):e},"resolvePath");var Le=Object.defineProperty,h=g((e,t)=>Le(e,"name",{value:t,configurable:!0}),"s$4");const se=h(e=>t=>{const r=K(t,L.deno.configFiles);if(r)return{adapter:e,configFile:r,declared:!1,root:t}},"detectDeno"),oe=h(e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),"isAbsolutePath"),qt={argsCheck:h((e,t)=>J(e,t,!1),"argsCheck"),argsFix:h((e,t)=>J(e,t,!0),"argsFix"),bin:h(()=>["deno","lint"],"bin"),cacheKey:h((e,t)=>{const r=["deno-lint",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:se("deno-lint"),extensions:["js","jsx","mjs","mts","ts","tsx"],id:"deno-lint",kind:"lint",parse:h((e,t)=>{if(!e.stdout.trim())return[];let r;try{r=JSON.parse(e.stdout)}catch{return[{adapter:"deno-lint",file:t.root,fixable:!1,message:`deno lint output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of r.diagnostics??[]){const s=o.range?.start,i=o.range?.end;n.push({adapter:"deno-lint",column:s?.col===void 0?void 0:s.col+1,endColumn:i?.col===void 0?void 0:i.col+1,endLine:i?.line===void 0?void 0:i.line+1,file:Pe(o.filename??t.root,t.root),fixable:!1,line:s?.line===void 0?void 0:s.line+1,message:o.message??"",ruleId:o.code,severity:"warning"})}return n},"parse")},_t={argsCheck:h((e,t)=>V(e,t,!1),"argsCheck"),argsFix:h((e,t)=>V(e,t,!0),"argsFix"),bin:h(()=>["deno","fmt"],"bin"),cacheKey:h((e,t)=>{const r=["deno-fmt",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:se("deno-fmt"),extensions:["astro","cjs","css","cts","html","ipynb","js","json","jsonc","jsx","less","md","mjs","mts","sass","scss","sql","svelte","ts","tsx","vue","yaml","yml"],id:"deno-fmt",kind:"fmt",parse:h((e,t)=>{if(e.exitCode===0)return[];const r=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=/^from (.+):$/.exec(o);if(!s)continue;const i=s[1];n.has(i)||(n.add(i),r.push({adapter:"deno-fmt",file:oe(i)?i:`${t.root}/${i}`,fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return r},"parse")},J=h((e,t,r)=>{const n=["--json"];return r&&n.push("--fix"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildLintArgs"),V=h((e,t,r)=>{const n=[];return r||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildFmtArgs"),Pe=h((e,t)=>e.startsWith("file://")?he(e):oe(e)?e:`${t}/${e}`,"resolveFilename");var Te=Object.defineProperty,p=g((e,t)=>Te(e,"name",{value:t,configurable:!0}),"r$1");const ie="pyproject.toml",qe=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,_e=/^Would reformat:?\s+(.+)$/,De=p(e=>{const t=y(e,ie);if(!W(t))return!1;try{const r=me(t);return qe.test(r)}catch{return!1}},"pyprojectMentionsRuff"),ae=p(e=>(t,r)=>{const n=L.ruff.packageNames.map(a=>ne(r,a)).find(a=>a!==void 0),o=K(t,L.ruff.configFiles),s=o?void 0:De(t)?y(t,ie):void 0,i=o??s;if(!(!n&&!i))return{adapter:e,configFile:i,declared:!!n,declaredVersion:n,root:t}},"detectRuff"),Ee=p(e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),"isAbsolutePath"),ce=p((e,t)=>e?Ee(e)?e:y(t,e):t,"resolveFilename"),We=p(e=>_e.exec(e)?.[1]?.trim(),"matchReformatLine"),Dt={argsCheck:p((e,t)=>z(e,t,!1),"argsCheck"),argsFix:p((e,t)=>z(e,t,!0),"argsFix"),bin:p(()=>["ruff","check"],"bin"),cacheKey:p((e,t)=>{const r=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:ae("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:p((e,t)=>{if(!e.stdout.trim())return[];let r;try{r=JSON.parse(e.stdout)}catch{return[{adapter:"ruff-check",file:t.root,fixable:!1,message:`ruff check output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of r){const s=o.location,i=o.end_location;n.push({adapter:"ruff-check",column:s?.column,endColumn:i?.column,endLine:i?.row,file:ce(o.filename,t.root),fixable:!!o.fix,line:s?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return n},"parse")},Et={argsCheck:p((e,t)=>G(e,t,!1),"argsCheck"),argsFix:p((e,t)=>G(e,t,!0),"argsFix"),bin:p(()=>["ruff","format"],"bin"),cacheKey:p((e,t)=>{const r=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:ae("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:p((e,t)=>{if(e.exitCode===0)return[];const r=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=We(o);!s||n.has(s)||(n.add(s),r.push({adapter:"ruff-fmt",file:ce(s,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return r},"parse")},z=p((e,t,r)=>{const n=["--output-format=json"];return r&&n.push("--fix"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildCheckArgs"),G=p((e,t,r)=>{const n=[];return r||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildFmtArgs");var Ke=Object.defineProperty,_=g((e,t)=>Ke(e,"name",{value:t,configurable:!0}),"o$2");const Wt=_((e,t)=>{const r=R(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(r===void 0)return;const n=R(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=R(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),s=R(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const a of[r,n??"",o??"",s??""])for(const c of a.split("\0"))c.length!==0&&i.add(j(c)?c:y(e,c));return[...i].sort()},"changedFilesSince"),Kt=_(e=>{const t=R(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const r=new Set;for(const n of t.split("\0"))n.length!==0&&r.add(j(n)?n:y(e,n));return[...r].sort()},"stagedFiles"),R=_((e,t)=>{const r=te("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(r.status===0)return r.stdout},"runGit"),Nt=_((e,t)=>{const r=new Set(t.map(s=>s.toLowerCase())),n=[],o=new Set;for(const s of e){const i=s.lastIndexOf(".");if(i===-1||i===s.length-1)continue;const a=s.slice(i+1).toLowerCase();r.has(a)&&(o.has(s)||(o.add(s),n.push(s)))}return n},"filterByExtensions");var Ne=Object.defineProperty,x=g((e,t)=>Ne(e,"name",{value:t,configurable:!0}),"n");const le=new Set(["-","stdout"]),U=x(e=>({close:x(()=>{},"close"),write:x(t=>{e.write(t)},"write")}),"wrapStream"),Be=x(e=>{ee(Y(e));const t=we(e,"w");let r=[];return{close:x(()=>{r.length>0&&(be(t,r.join("")),r=[]),Ce(t)},"close"),write:x(n=>{r.push(n)},"write")}},"openFileSink"),Je=x(e=>{const{cwd:t,target:r}=e;if(r===void 0||le.has(r))return U(process.stdout);if(r==="stderr")return U(process.stderr);const n=j(r)?r:Z(t,r);return Be(n)},"resolveOutput");x(e=>{const{content:t,...r}=e;if(r.target!==void 0&&!le.has(r.target)&&r.target!=="stderr"){const o=j(r.target)?r.target:Z(r.cwd,r.target);ee(Y(o)),$e(o,t,{overwrite:!0});return}const n=Je(r);n.write(t),n.close()},"writeOutput");var Ve=Object.defineProperty,k=g((e,t)=>Ve(e,"name",{value:t,configurable:!0}),"s$3");const H=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","deno-lint","deno-fmt"],Bt=k((e,t)=>{const r=new Map(e.map(i=>[i.id,i])),n=[],o=new Set,s=t&&t.length>0?t:H;for(const i of s){const a=r.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}if(t&&t.length>0)for(const i of H){const a=r.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}for(const i of e)o.has(i.id)||(n.push(i),o.add(i.id));return n},"registerAdapters"),Jt=k((e,t,r)=>{const n=[];for(const o of t){const s=e.get(o.id);s&&ze(o.kind,r)&&n.push({adapter:o,presence:s})}return n},"adaptersByKind"),ze=k((e,t)=>e===t||e==="both","matchesKind"),Vt=k((e,t,r={})=>{const n=new Map;for(const o of e){const s=Ge(o),i=Ue(s,t,r);if(!i)continue;const a=n.get(i);a?a.push(o):n.set(i,[o])}return n},"routeFilesByExtension"),Ge=k(e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},"extensionOf"),Ue=k((e,t,r)=>{const n=r[e];if(n&&t.some(o=>o.adapter.id===n))return n;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},"resolveAdapterForExtension");var He=Object.defineProperty,S=g((e,t)=>He(e,"name",{value:t,configurable:!0}),"r");const Qe=S(e=>e==="error"?"error":e==="warning"?"warning":"notice","commandFor"),ue=S(e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
|
|
1
|
+
var fe=Object.defineProperty;var g=(e,t)=>fe(e,"name",{value:t,configurable:!0});import{createRequire as pe}from"node:module";import{M as y,l as W,B as me,a as j,K as Y,C as Z}from"./readFileSync-DseCu8sg-DEq4Fn3a.js";import{aM as P}from"../packem_chunks/bin.js";import{s as ve,b as ee,E as $e}from"../packem_chunks/config.js";import{s as je}from"./watch-DEL0yol9.js";const ge=pe(import.meta.url),I=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,L=g(e=>{if(typeof I<"u"&&I.versions&&I.versions.node){const[t,r]=I.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return I.getBuiltinModule(e)}return ge(e)},"__cjs_getBuiltinModule"),{createHash:A}=L("node:crypto"),{fileURLToPath:he,pathToFileURL:ye}=L("node:url"),{spawnSync:te,spawn:xe}=L("node:child_process"),{openSync:we,writeSync:be,closeSync:Ce,readFileSync:re,statSync:Ae,mkdirSync:Se,writeFileSync:Fe}=L("node:fs"),{availableParallelism:N}=L("node:os");var ke=Object.defineProperty,q=g((e,t)=>ke(e,"name",{value:t,configurable:!0}),"o$4");const ne=q((e,t)=>{for(const r of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const n=e[r];if(n&&typeof n[t]=="string")return n[t]}},"declaredVersion"),K=q((e,t)=>{for(const r of t){const n=y(e,r);if(W(n))return n}},"findFirstConfig"),Oe=q(e=>{const t=y(e,"package.json");if(!W(t))return{};try{return ve(t)}catch{return{}}},"readRootPackageJson"),Lt=q((e,t)=>{const r=Oe(e),n=new Map;for(const o of t){const s=o.detect(e,r);s&&n.set(o.id,s)}return n},"detectAdapters");var Ie=Object.defineProperty,$=g((e,t)=>Ie(e,"name",{value:t,configurable:!0}),"o$3");const Re={error:"error",info:"info",information:"info",warning:"warning"},Tt={argsCheck:$((e,t)=>B(e,t,!1),"argsCheck"),argsFix:$((e,t)=>B(e,t,!0),"argsFix"),bin:$(()=>["pnpm","exec","biome"],"bin"),cacheKey:$((e,t)=>{const r=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:$((e,t)=>{const r=ne(t,P.biome.packageNames[0]),n=K(e,P.biome.configFiles);if(!(!r&&!n))return{adapter:"biome",configFile:n,declared:!!r,declaredVersion:r,root:e}},"detect"),extensions:["astro","cjs","css","cts","js","json","jsonc","jsx","mjs","mts","svelte","ts","tsx","vue"],id:"biome",kind:"both",parse:$((e,t)=>{if(!e.stdout.trim())return[];let r;try{r=JSON.parse(e.stdout)}catch{return[{adapter:"biome",file:t.root,fixable:!1,message:`biome output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of r.diagnostics??[]){const s=o.location?.start,i=o.location?.end,a=Me(t.root,o.location?.path),c=o.category??"",l=c==="format"||c.startsWith("format/");n.push({adapter:"biome",column:s?.column&&s.column>0?s.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:a,fixable:!0,line:s?.line&&s.line>0?s.line:void 0,message:l?"Code style issues would be auto-fixed":o.message??"",ruleId:c||void 0,severity:Re[o.severity??""]??"warning"})}return n},"parse")},B=$((e,t,r)=>{const n=["check","--reporter=json"];return r&&n.push("--write"),typeof t.maxWarnings=="number"&&n.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildArgs"),Me=$((e,t)=>{const r=typeof t=="string"?t:t?.file;return r?r.startsWith("/")||/^[a-z]:[\\/]/i.test(r)?r:y(e,r):e},"resolvePath");var Pe=Object.defineProperty,h=g((e,t)=>Pe(e,"name",{value:t,configurable:!0}),"s$4");const se=h(e=>t=>{const r=K(t,P.deno.configFiles);if(r)return{adapter:e,configFile:r,declared:!1,root:t}},"detectDeno"),oe=h(e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),"isAbsolutePath"),qt={argsCheck:h((e,t)=>J(e,t,!1),"argsCheck"),argsFix:h((e,t)=>J(e,t,!0),"argsFix"),bin:h(()=>["deno","lint"],"bin"),cacheKey:h((e,t)=>{const r=["deno-lint",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:se("deno-lint"),extensions:["js","jsx","mjs","mts","ts","tsx"],id:"deno-lint",kind:"lint",parse:h((e,t)=>{if(!e.stdout.trim())return[];let r;try{r=JSON.parse(e.stdout)}catch{return[{adapter:"deno-lint",file:t.root,fixable:!1,message:`deno lint output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of r.diagnostics??[]){const s=o.range?.start,i=o.range?.end;n.push({adapter:"deno-lint",column:s?.col===void 0?void 0:s.col+1,endColumn:i?.col===void 0?void 0:i.col+1,endLine:i?.line===void 0?void 0:i.line+1,file:Le(o.filename??t.root,t.root),fixable:!1,line:s?.line===void 0?void 0:s.line+1,message:o.message??"",ruleId:o.code,severity:"warning"})}return n},"parse")},_t={argsCheck:h((e,t)=>V(e,t,!1),"argsCheck"),argsFix:h((e,t)=>V(e,t,!0),"argsFix"),bin:h(()=>["deno","fmt"],"bin"),cacheKey:h((e,t)=>{const r=["deno-fmt",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:se("deno-fmt"),extensions:["astro","cjs","css","cts","html","ipynb","js","json","jsonc","jsx","less","md","mjs","mts","sass","scss","sql","svelte","ts","tsx","vue","yaml","yml"],id:"deno-fmt",kind:"fmt",parse:h((e,t)=>{if(e.exitCode===0)return[];const r=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=/^from (.+):$/.exec(o);if(!s)continue;const i=s[1];n.has(i)||(n.add(i),r.push({adapter:"deno-fmt",file:oe(i)?i:`${t.root}/${i}`,fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return r},"parse")},J=h((e,t,r)=>{const n=["--json"];return r&&n.push("--fix"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildLintArgs"),V=h((e,t,r)=>{const n=[];return r||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildFmtArgs"),Le=h((e,t)=>e.startsWith("file://")?he(e):oe(e)?e:`${t}/${e}`,"resolveFilename");var Te=Object.defineProperty,p=g((e,t)=>Te(e,"name",{value:t,configurable:!0}),"r$1");const ie="pyproject.toml",qe=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,_e=/^Would reformat:?\s+(.+)$/,De=p(e=>{const t=y(e,ie);if(!W(t))return!1;try{const r=me(t);return qe.test(r)}catch{return!1}},"pyprojectMentionsRuff"),ae=p(e=>(t,r)=>{const n=P.ruff.packageNames.map(a=>ne(r,a)).find(a=>a!==void 0),o=K(t,P.ruff.configFiles),s=o?void 0:De(t)?y(t,ie):void 0,i=o??s;if(!(!n&&!i))return{adapter:e,configFile:i,declared:!!n,declaredVersion:n,root:t}},"detectRuff"),Ee=p(e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),"isAbsolutePath"),ce=p((e,t)=>e?Ee(e)?e:y(t,e):t,"resolveFilename"),We=p(e=>_e.exec(e)?.[1]?.trim(),"matchReformatLine"),Dt={argsCheck:p((e,t)=>z(e,t,!1),"argsCheck"),argsFix:p((e,t)=>z(e,t,!0),"argsFix"),bin:p(()=>["ruff","check"],"bin"),cacheKey:p((e,t)=>{const r=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:ae("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:p((e,t)=>{if(!e.stdout.trim())return[];let r;try{r=JSON.parse(e.stdout)}catch{return[{adapter:"ruff-check",file:t.root,fixable:!1,message:`ruff check output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const n=[];for(const o of r){const s=o.location,i=o.end_location;n.push({adapter:"ruff-check",column:s?.column,endColumn:i?.column,endLine:i?.row,file:ce(o.filename,t.root),fixable:!!o.fix,line:s?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return n},"parse")},Et={argsCheck:p((e,t)=>G(e,t,!1),"argsCheck"),argsFix:p((e,t)=>G(e,t,!0),"argsFix"),bin:p(()=>["ruff","format"],"bin"),cacheKey:p((e,t)=>{const r=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return A("sha256").update(r.join("|")).digest("hex").slice(0,16)},"cacheKey"),detect:ae("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:p((e,t)=>{if(e.exitCode===0)return[];const r=[],n=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=We(o);!s||n.has(s)||(n.add(s),r.push({adapter:"ruff-fmt",file:ce(s,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return r},"parse")},z=p((e,t,r)=>{const n=["--output-format=json"];return r&&n.push("--fix"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildCheckArgs"),G=p((e,t,r)=>{const n=[];return r||n.push("--check"),t.quiet&&n.push("--quiet"),t.extraArgs?.length&&n.push(...t.extraArgs),n.push(...e),n},"buildFmtArgs");var Ke=Object.defineProperty,_=g((e,t)=>Ke(e,"name",{value:t,configurable:!0}),"o$2");const Wt=_((e,t)=>{const r=R(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(r===void 0)return;const n=R(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=R(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),s=R(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const a of[r,n??"",o??"",s??""])for(const c of a.split("\0"))c.length!==0&&i.add(j(c)?c:y(e,c));return[...i].sort()},"changedFilesSince"),Kt=_(e=>{const t=R(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const r=new Set;for(const n of t.split("\0"))n.length!==0&&r.add(j(n)?n:y(e,n));return[...r].sort()},"stagedFiles"),R=_((e,t)=>{const r=te("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(r.status===0)return r.stdout},"runGit"),Nt=_((e,t)=>{const r=new Set(t.map(s=>s.toLowerCase())),n=[],o=new Set;for(const s of e){const i=s.lastIndexOf(".");if(i===-1||i===s.length-1)continue;const a=s.slice(i+1).toLowerCase();r.has(a)&&(o.has(s)||(o.add(s),n.push(s)))}return n},"filterByExtensions");var Ne=Object.defineProperty,x=g((e,t)=>Ne(e,"name",{value:t,configurable:!0}),"n");const le=new Set(["-","stdout"]),U=x(e=>({close:x(()=>{},"close"),write:x(t=>{e.write(t)},"write")}),"wrapStream"),Be=x(e=>{ee(Y(e));const t=we(e,"w");let r=[];return{close:x(()=>{r.length>0&&(be(t,r.join("")),r=[]),Ce(t)},"close"),write:x(n=>{r.push(n)},"write")}},"openFileSink"),Je=x(e=>{const{cwd:t,target:r}=e;if(r===void 0||le.has(r))return U(process.stdout);if(r==="stderr")return U(process.stderr);const n=j(r)?r:Z(t,r);return Be(n)},"resolveOutput");x(e=>{const{content:t,...r}=e;if(r.target!==void 0&&!le.has(r.target)&&r.target!=="stderr"){const o=j(r.target)?r.target:Z(r.cwd,r.target);ee(Y(o)),$e(o,t,{overwrite:!0});return}const n=Je(r);n.write(t),n.close()},"writeOutput");var Ve=Object.defineProperty,k=g((e,t)=>Ve(e,"name",{value:t,configurable:!0}),"s$3");const H=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","deno-lint","deno-fmt"],Bt=k((e,t)=>{const r=new Map(e.map(i=>[i.id,i])),n=[],o=new Set,s=t&&t.length>0?t:H;for(const i of s){const a=r.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}if(t&&t.length>0)for(const i of H){const a=r.get(i);a&&!o.has(i)&&(n.push(a),o.add(i))}for(const i of e)o.has(i.id)||(n.push(i),o.add(i.id));return n},"registerAdapters"),Jt=k((e,t,r)=>{const n=[];for(const o of t){const s=e.get(o.id);s&&ze(o.kind,r)&&n.push({adapter:o,presence:s})}return n},"adaptersByKind"),ze=k((e,t)=>e===t||e==="both","matchesKind"),Vt=k((e,t,r={})=>{const n=new Map;for(const o of e){const s=Ge(o),i=Ue(s,t,r);if(!i)continue;const a=n.get(i);a?a.push(o):n.set(i,[o])}return n},"routeFilesByExtension"),Ge=k(e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},"extensionOf"),Ue=k((e,t,r)=>{const n=r[e];if(n&&t.some(o=>o.adapter.id===n))return n;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},"resolveAdapterForExtension");var He=Object.defineProperty,S=g((e,t)=>He(e,"name",{value:t,configurable:!0}),"r");const Qe=S(e=>e==="error"?"error":e==="warning"?"warning":"notice","commandFor"),ue=S(e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
|
|
2
2
|
`,"%0A"),"encodeMessage"),Q=S(e=>ue(e).replaceAll(",","%2C").replaceAll(":","%3A").replaceAll("=","%3D"),"encodeProperty"),Xe=S((e,t)=>t&&e.startsWith(`${t}/`)?e.slice(t.length+1):e,"relativeFile"),Ye=S((e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),"compareFindings"),Ze=S((e,t)=>{const r=Qe(e.severity),n=Xe(e.file,t),o=e.ruleId?`${e.adapter}(${e.ruleId})`:e.adapter,s=[`file=${Q(n)}`];return e.line!==void 0&&s.push(`line=${String(e.line)}`),e.endLine!==void 0&&s.push(`endLine=${String(e.endLine)}`),e.column!==void 0&&s.push(`col=${String(e.column)}`),e.endColumn!==void 0&&s.push(`endColumn=${String(e.endColumn)}`),s.push(`title=${Q(o)}`),`::${r} ${s.join(",")}::${ue(e.message)}
|
|
3
3
|
`},"renderFinding"),zt=S(e=>e.runs.flatMap(t=>[...t.findings]).sort(Ye).map(t=>Ze(t,e.workspaceRoot)).join(""),"emitGitHub");var et=Object.defineProperty,w=g((e,t)=>et(e,"name",{value:t,configurable:!0}),"s$2");const F=w(e=>e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),"escapeAttribute"),tt=w(e=>`<![CDATA[${e.replaceAll("]]>","]]]]><![CDATA[>")}]]>`,"cdata"),rt=w((e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),"compareFindings"),nt=w(e=>e==="error"?"error":e==="warning"?"warning":"info","failureTypeFor"),st=w((e,t)=>{let{file:r}=e;return t&&e.file.startsWith(`${t}/`)&&(r=e.file.slice(t.length+1)),e.line===void 0?r:e.column===void 0?`${r}:${String(e.line)}`:`${r}:${String(e.line)}:${String(e.column)}`},"locationFor"),ot=w((e,t,r)=>{const n=st(e,r),o=nt(e.severity),s=e.ruleId?`[${e.ruleId}] ${e.message}`:e.message;return[` <testcase classname="${F(t)}" name="${F(n)}">`,` <failure type="${F(o)}" message="${F(s)}">${tt(e.message)}</failure>`," </testcase>",""].join(`
|
|
4
4
|
`)},"renderTestcase"),it=w((e,t,r)=>{const n=[...e.findings].sort(rt),o=n.filter(l=>l.severity==="error").length,s=n.filter(l=>l.severity==="warning").length,i=n.length,a=(e.durationMs/1e3).toFixed(3),c=n.map(l=>ot(l,e.adapter,r)).join("");return` <testsuite ${[`name="${F(e.adapter)}"`,`tests="${String(i)}"`,`failures="${String(o)}"`,'errors="0"',`skipped="${String(s)}"`,`time="${a}"`,`timestamp="${t}"`].join(" ")}>
|
|
@@ -8,4 +8,4 @@ ${c} </testsuite>
|
|
|
8
8
|
${n}</testsuites>
|
|
9
9
|
`},"emitJUnit");var at=Object.defineProperty,b=g((e,t)=>at(e,"name",{value:t,configurable:!0}),"i");const ct="2.1.0",lt="https://json.schemastore.org/sarif-2.1.0.json",ut=b(e=>e==="error"?"error":e==="warning"?"warning":"note","sarifLevelFor"),dt=b((e,t)=>t&&e.startsWith(`${t}/`)?{uri:e.slice(t.length+1),uriBaseId:"SRCROOT"}:{uri:e},"fileUri"),ft=b(e=>{const{href:t}=ye(e);return t.endsWith("/")?t:`${t}/`},"workspaceRootUri"),pt=b((e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),"compareFindings"),gt=b(e=>{const t=new Map;for(const r of e)r.ruleId&&(t.has(r.ruleId)||t.set(r.ruleId,{id:r.ruleId,name:r.ruleId}));return[...t.values()]},"collectRules"),mt=b((e,t)=>{const{uri:r,uriBaseId:n}=dt(e.file,t),o={artifactLocation:n?{uri:r,uriBaseId:n}:{uri:r}};if(e.line!==void 0){const i={startLine:e.line};e.column!==void 0&&(i.startColumn=e.column),e.endLine!==void 0&&(i.endLine=e.endLine),e.endColumn!==void 0&&(i.endColumn=e.endColumn),o.region=i}const s={level:ut(e.severity),locations:[{physicalLocation:o}],message:{text:e.message}};return e.ruleId&&(s.ruleId=e.ruleId),s},"buildResult"),ht=b((e,t)=>{const r=[...e.findings].sort(pt),n=gt(r),o={name:e.adapter,rules:n};e.presence?.declaredVersion&&(o.version=e.presence.declaredVersion);const s={results:r.map(i=>mt(i,t)),tool:{driver:o}};return t&&(s.originalUriBaseIds={SRCROOT:{uri:ft(t)}}),s},"buildRun"),Ut=b(e=>{const t={$schema:lt,runs:e.runs.map(r=>ht(r,e.workspaceRoot)),version:ct};return`${JSON.stringify(t,void 0,2)}
|
|
10
10
|
`},"emitSarif");var yt=Object.defineProperty,D=g((e,t)=>yt(e,"name",{value:t,configurable:!0}),"o");const T={error:3,info:1,warning:2};D((e,t)=>T[e]-T[t],"compareSeverity");const Ht=D(e=>{const t=[],r=[];let n,o=!1;for(const s of e){r.push({adapter:s.adapter,durationMs:s.durationMs,exitCode:s.exitCode,findingCount:s.findings.length}),s.exitCode!==0&&s.exitCode!==null&&s.findings.length===0&&(o=!0);for(const i of s.findings)t.push(i),(!n||T[i.severity]>T[n])&&(n=i.severity)}return{findings:t,hadProcessFailure:o,maxSeverity:n,runs:r}},"aggregate"),Qt=D(e=>{const t=new Map;for(const r of e){const n=t.get(r.file);n?n.push(r):t.set(r.file,[r])}return t},"groupFindingsByFile"),Xt=D(e=>e.hadProcessFailure||e.maxSeverity==="error"?1:0,"exitCodeFor");var vt=Object.defineProperty,O=g((e,t)=>vt(e,"name",{value:t,configurable:!0}),"a");const $t=O((e,t)=>{if(t==="fix"||process.env.VIS_NO_CACHE==="1"||e.length===0)return!1;for(const r of e)if(r==="."||r==="./"||r==="..")return!1;return!0},"cacheable"),xt=O(e=>{try{const t=re(e);return A("sha256").update(t).digest("hex")}catch{return}},"hashFile"),wt=O((e,t,r,n,o)=>{const s=e.cacheKey(t,n),i=[];for(const c of[...r].sort()){const l=j(c)?c:y(t.root,c);try{Ae(l)}catch{return}const m=xt(l);if(!m)return;i.push({hash:m,path:l})}const a=A("sha256");a.update(e.id),a.update("\0"),a.update(s),a.update("\0"),a.update(o);for(const c of i)a.update("\0"),a.update(c.path),a.update("\0"),a.update(c.hash);return{fileHashes:i,key:a.digest("hex")}},"computeCacheKey"),de=O((e,t)=>y(e,"lint-fmt",t),"adapterDir"),bt=O((e,t,r)=>{const n=y(de(e,t.id),`${r}.json`);try{const o=re(n,"utf8"),s=JSON.parse(o);return s.schema!==1?void 0:s}catch{return}},"readCacheEntry"),Ct=O((e,t,r,n,o)=>{const s=de(e,t.id),i={fileHashes:o,result:n,savedAt:Date.now(),schema:1};try{Se(s,{recursive:!0}),Fe(y(s,`${r}.json`),JSON.stringify(i))}catch{}},"writeCacheEntry");var At=Object.defineProperty,M=g((e,t)=>At(e,"name",{value:t,configurable:!0}),"h");M((e,t,r,n,o)=>{const s=e.bin(t),i=[...s.slice(1),...o==="fix"?e.argsFix(r,n):e.argsCheck(r,n)],a=Date.now();let c;try{c=te(s[0],i,{cwd:t.root,encoding:"utf8",timeout:6e4})}catch(l){return{durationMs:Date.now()-a,exitCode:null,stderr:l instanceof Error?l.message:String(l),stdout:""}}return c.error?{durationMs:Date.now()-a,exitCode:null,stderr:c.error.message,stdout:c.stdout??""}:{durationMs:Date.now()-a,exitCode:c.status,stderr:c.stderr??"",stdout:c.stdout??""}},"runAdapter");const X=M(async(e,t,r,n,o)=>{const s=e.bin(t),i=[...s.slice(1),...o==="fix"?e.argsFix(r,n):e.argsCheck(r,n)];return new Promise(a=>{const c=Date.now(),l=xe(s[0],i,{cwd:t.root}),m=[],u=[];let v=!1;const f=setTimeout(()=>{v=!0,l.kill("SIGKILL")},6e4);l.stdout.on("data",d=>m.push(d)),l.stderr.on("data",d=>u.push(d)),l.on("error",d=>{clearTimeout(f),a({durationMs:Date.now()-c,exitCode:null,stderr:d.message,stdout:""})}),l.on("close",d=>{clearTimeout(f),a({durationMs:Date.now()-c,exitCode:v?null:d,stderr:Buffer.concat(u).toString("utf8"),stdout:Buffer.concat(m).toString("utf8")})})})},"runAdapterAsync"),Yt=M(async(e,t,r,n=N())=>{if(e.length===0)return[];const{cacheRoot:o,concurrency:s}=typeof n=="number"?{concurrency:n}:{cacheRoot:n.cacheRoot,concurrency:n.concurrency??N()},i=M(async u=>{const v=u.options??t;if(o&&$t(u.files,r)){const f=wt(u.adapter,u.presence,u.files,v,r);if(f){const d=bt(o,u.adapter,f.key);if(d)return d.result;const E=await X(u.adapter,u.presence,u.files,v,r);return E.exitCode!==null&&Ct(o,u.adapter,f.key,E,f.fileHashes),E}}return X(u.adapter,u.presence,u.files,v,r)},"runOne");if(process.env.VIS_LINT_FMT_SERIAL==="1"){const u=[];for(const v of e)u.push(await i(v));return u}const a=Math.max(1,Math.min(s,e.length)),c=Array.from({length:e.length});let l=0;const m=M(async()=>{for(;;){const u=l;if(l+=1,u>=e.length)return;c[u]=await i(e[u])}},"worker");return await Promise.all(Array.from({length:a},()=>m())),c},"runAdaptersParallel");var St=Object.defineProperty,C=g((e,t)=>St(e,"name",{value:t,configurable:!0}),"s");const Ft=C(e=>{const t=new Set;for(const r of e)t.add(r.toLowerCase());return t},"buildExtensionSet"),jt=C((e,t)=>{const r=e.lastIndexOf(".");return r===-1||r===e.length-1?!1:t.has(e.slice(r+1).toLowerCase())},"hasMatchingExtension"),Zt=C(async e=>{const{extensions:t,initialFiles:r,label:n,log:o,runCycle:s,workspaceRoot:i}=e,a=o??(f=>{process.stdout.write(`${f}
|
|
11
|
-
`)}),c=Ft(t);await s(r),a(`▸ ${n}: watching workspace — press Ctrl-C to exit`);let l=new Set,m=!1;const u=C(async()=>{for(;l.size>0;){const f=[...l];l=new Set;try{await s(f)}catch(d){a(`✗ ${n}: watch cycle failed — ${d.message}`)}}},"consumePending"),v=je({debounceMs:200,filter:C(f=>jt(f,c),"filter"),onChange:C(async f=>{for(const d of f)l.add(j(d)?d:y(i,d));if(!m){m=!0;try{await u()}finally{m=!1}}},"onChange"),paths:[i]});await new Promise(f=>{const d=C(()=>{v.close(),process.off("SIGINT",d),process.off("SIGTERM",d),f()},"stop");process.once("SIGINT",d),process.once("SIGTERM",d)})},"runWatchLoop");export{Et as a,Tt as b,_t as c,ne as d,
|
|
11
|
+
`)}),c=Ft(t);await s(r),a(`▸ ${n}: watching workspace — press Ctrl-C to exit`);let l=new Set,m=!1;const u=C(async()=>{for(;l.size>0;){const f=[...l];l=new Set;try{await s(f)}catch(d){a(`✗ ${n}: watch cycle failed — ${d.message}`)}}},"consumePending"),v=je({debounceMs:200,filter:C(f=>jt(f,c),"filter"),onChange:C(async f=>{for(const d of f)l.add(j(d)?d:y(i,d));if(!m){m=!0;try{await u()}finally{m=!1}}},"onChange"),paths:[i]});await new Promise(f=>{const d=C(()=>{v.close(),process.off("SIGINT",d),process.off("SIGTERM",d),f()},"stop");process.once("SIGINT",d),process.once("SIGTERM",d)})},"runWatchLoop");export{Et as a,Tt as b,_t as c,ne as d,Lt as e,K as f,Jt as g,Wt as h,Vt as i,Yt as j,Ht as k,Je as l,Ut as m,Gt as n,zt as o,Xt as p,Zt as q,Bt as r,Kt as s,Qt as t,Dt as u,qt as v,Nt as w};
|
package/index.js
CHANGED
|
@@ -81,8 +81,8 @@ function requireNative() {
|
|
|
81
81
|
try {
|
|
82
82
|
const binding = require('@visulima/vis-binding-android-arm64')
|
|
83
83
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
84
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
86
|
}
|
|
87
87
|
return binding
|
|
88
88
|
} catch (e) {
|
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('@visulima/vis-binding-android-arm-eabi')
|
|
99
99
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
100
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -118,8 +118,8 @@ function requireNative() {
|
|
|
118
118
|
try {
|
|
119
119
|
const binding = require('@visulima/vis-binding-win32-x64-gnu')
|
|
120
120
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
|
|
121
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
122
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
121
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
123
|
}
|
|
124
124
|
return binding
|
|
125
125
|
} catch (e) {
|
|
@@ -134,8 +134,8 @@ function requireNative() {
|
|
|
134
134
|
try {
|
|
135
135
|
const binding = require('@visulima/vis-binding-win32-x64-msvc')
|
|
136
136
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
|
|
137
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
137
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
139
|
}
|
|
140
140
|
return binding
|
|
141
141
|
} catch (e) {
|
|
@@ -151,8 +151,8 @@ function requireNative() {
|
|
|
151
151
|
try {
|
|
152
152
|
const binding = require('@visulima/vis-binding-win32-ia32-msvc')
|
|
153
153
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
|
|
154
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
155
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
154
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
156
|
}
|
|
157
157
|
return binding
|
|
158
158
|
} catch (e) {
|
|
@@ -167,8 +167,8 @@ function requireNative() {
|
|
|
167
167
|
try {
|
|
168
168
|
const binding = require('@visulima/vis-binding-win32-arm64-msvc')
|
|
169
169
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
170
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
172
|
}
|
|
173
173
|
return binding
|
|
174
174
|
} catch (e) {
|
|
@@ -186,8 +186,8 @@ function requireNative() {
|
|
|
186
186
|
try {
|
|
187
187
|
const binding = require('@visulima/vis-binding-darwin-universal')
|
|
188
188
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
|
|
189
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
190
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
189
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
191
|
}
|
|
192
192
|
return binding
|
|
193
193
|
} catch (e) {
|
|
@@ -202,8 +202,8 @@ function requireNative() {
|
|
|
202
202
|
try {
|
|
203
203
|
const binding = require('@visulima/vis-binding-darwin-x64')
|
|
204
204
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
|
|
205
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
205
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
207
|
}
|
|
208
208
|
return binding
|
|
209
209
|
} catch (e) {
|
|
@@ -218,8 +218,8 @@ function requireNative() {
|
|
|
218
218
|
try {
|
|
219
219
|
const binding = require('@visulima/vis-binding-darwin-arm64')
|
|
220
220
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
|
|
221
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
221
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
223
|
}
|
|
224
224
|
return binding
|
|
225
225
|
} catch (e) {
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@visulima/vis-binding-freebsd-x64')
|
|
240
240
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
|
|
241
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
241
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
243
|
}
|
|
244
244
|
return binding
|
|
245
245
|
} catch (e) {
|
|
@@ -254,8 +254,8 @@ function requireNative() {
|
|
|
254
254
|
try {
|
|
255
255
|
const binding = require('@visulima/vis-binding-freebsd-arm64')
|
|
256
256
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
|
|
257
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
257
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
259
|
}
|
|
260
260
|
return binding
|
|
261
261
|
} catch (e) {
|
|
@@ -275,8 +275,8 @@ function requireNative() {
|
|
|
275
275
|
try {
|
|
276
276
|
const binding = require('@visulima/vis-binding-linux-x64-musl')
|
|
277
277
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
|
|
278
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
279
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
278
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
280
|
}
|
|
281
281
|
return binding
|
|
282
282
|
} catch (e) {
|
|
@@ -291,8 +291,8 @@ function requireNative() {
|
|
|
291
291
|
try {
|
|
292
292
|
const binding = require('@visulima/vis-binding-linux-x64-gnu')
|
|
293
293
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
294
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
296
|
}
|
|
297
297
|
return binding
|
|
298
298
|
} catch (e) {
|
|
@@ -309,8 +309,8 @@ function requireNative() {
|
|
|
309
309
|
try {
|
|
310
310
|
const binding = require('@visulima/vis-binding-linux-arm64-musl')
|
|
311
311
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
|
|
312
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
313
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
312
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
314
|
}
|
|
315
315
|
return binding
|
|
316
316
|
} catch (e) {
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@visulima/vis-binding-linux-arm64-gnu')
|
|
327
327
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
328
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
330
|
}
|
|
331
331
|
return binding
|
|
332
332
|
} catch (e) {
|
|
@@ -343,8 +343,8 @@ function requireNative() {
|
|
|
343
343
|
try {
|
|
344
344
|
const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
|
|
345
345
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
|
|
346
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
347
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
346
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
348
|
}
|
|
349
349
|
return binding
|
|
350
350
|
} catch (e) {
|
|
@@ -359,8 +359,8 @@ function requireNative() {
|
|
|
359
359
|
try {
|
|
360
360
|
const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
|
|
361
361
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
362
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
364
|
}
|
|
365
365
|
return binding
|
|
366
366
|
} catch (e) {
|
|
@@ -377,8 +377,8 @@ function requireNative() {
|
|
|
377
377
|
try {
|
|
378
378
|
const binding = require('@visulima/vis-binding-linux-loong64-musl')
|
|
379
379
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
|
|
380
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
381
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
380
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
382
|
}
|
|
383
383
|
return binding
|
|
384
384
|
} catch (e) {
|
|
@@ -393,8 +393,8 @@ function requireNative() {
|
|
|
393
393
|
try {
|
|
394
394
|
const binding = require('@visulima/vis-binding-linux-loong64-gnu')
|
|
395
395
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
396
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
398
|
}
|
|
399
399
|
return binding
|
|
400
400
|
} catch (e) {
|
|
@@ -411,8 +411,8 @@ function requireNative() {
|
|
|
411
411
|
try {
|
|
412
412
|
const binding = require('@visulima/vis-binding-linux-riscv64-musl')
|
|
413
413
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
|
|
414
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
415
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
414
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
416
|
}
|
|
417
417
|
return binding
|
|
418
418
|
} catch (e) {
|
|
@@ -427,8 +427,8 @@ function requireNative() {
|
|
|
427
427
|
try {
|
|
428
428
|
const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
|
|
429
429
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
|
|
430
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
431
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
430
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
432
|
}
|
|
433
433
|
return binding
|
|
434
434
|
} catch (e) {
|
|
@@ -444,8 +444,8 @@ function requireNative() {
|
|
|
444
444
|
try {
|
|
445
445
|
const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
|
|
446
446
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
|
|
447
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
448
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
447
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
449
449
|
}
|
|
450
450
|
return binding
|
|
451
451
|
} catch (e) {
|
|
@@ -460,8 +460,8 @@ function requireNative() {
|
|
|
460
460
|
try {
|
|
461
461
|
const binding = require('@visulima/vis-binding-linux-s390x-gnu')
|
|
462
462
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
|
|
463
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
464
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
463
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
465
|
}
|
|
466
466
|
return binding
|
|
467
467
|
} catch (e) {
|
|
@@ -480,8 +480,8 @@ function requireNative() {
|
|
|
480
480
|
try {
|
|
481
481
|
const binding = require('@visulima/vis-binding-openharmony-arm64')
|
|
482
482
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
|
|
483
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
484
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
483
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
485
|
}
|
|
486
486
|
return binding
|
|
487
487
|
} catch (e) {
|
|
@@ -496,8 +496,8 @@ function requireNative() {
|
|
|
496
496
|
try {
|
|
497
497
|
const binding = require('@visulima/vis-binding-openharmony-x64')
|
|
498
498
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
|
|
499
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
500
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
499
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
501
|
}
|
|
502
502
|
return binding
|
|
503
503
|
} catch (e) {
|
|
@@ -512,8 +512,8 @@ function requireNative() {
|
|
|
512
512
|
try {
|
|
513
513
|
const binding = require('@visulima/vis-binding-openharmony-arm')
|
|
514
514
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
|
|
515
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
515
|
+
if (bindingPackageVersion !== '1.0.0-alpha.34' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.35 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
517
|
}
|
|
518
518
|
return binding
|
|
519
519
|
} catch (e) {
|
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.35",
|
|
4
4
|
"description": "A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@visulima/secret-scanner": "1.0.0-alpha.5",
|
|
82
82
|
"@visulima/tabular": "4.0.0-alpha.13",
|
|
83
|
-
"@visulima/task-runner": "1.0.0-alpha.
|
|
83
|
+
"@visulima/task-runner": "1.0.0-alpha.22",
|
|
84
84
|
"@visulima/tui": "1.0.0-alpha.23",
|
|
85
85
|
"jiti": "^2.7.0",
|
|
86
86
|
"module-replacements": "^2.11.0",
|
|
@@ -110,14 +110,14 @@
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"optionalDependencies": {
|
|
113
|
-
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.
|
|
114
|
-
"@visulima/vis-binding-
|
|
115
|
-
"@visulima/vis-binding-linux-
|
|
116
|
-
"@visulima/vis-binding-linux-
|
|
117
|
-
"@visulima/vis-binding-linux-
|
|
118
|
-
"@visulima/vis-binding-
|
|
119
|
-
"@visulima/vis-binding-win32-x64-msvc": "1.0.0-alpha.
|
|
120
|
-
"@visulima/vis-binding-
|
|
113
|
+
"@visulima/vis-binding-darwin-arm64": "1.0.0-alpha.35",
|
|
114
|
+
"@visulima/vis-binding-linux-arm64-gnu": "1.0.0-alpha.35",
|
|
115
|
+
"@visulima/vis-binding-linux-x64-gnu": "1.0.0-alpha.35",
|
|
116
|
+
"@visulima/vis-binding-linux-x64-musl": "1.0.0-alpha.35",
|
|
117
|
+
"@visulima/vis-binding-linux-arm64-musl": "1.0.0-alpha.35",
|
|
118
|
+
"@visulima/vis-binding-darwin-x64": "1.0.0-alpha.35",
|
|
119
|
+
"@visulima/vis-binding-win32-x64-msvc": "1.0.0-alpha.35",
|
|
120
|
+
"@visulima/vis-binding-win32-arm64-msvc": "1.0.0-alpha.35"
|
|
121
121
|
},
|
|
122
122
|
"engines": {
|
|
123
123
|
"node": "^22.14.0 || >=24.10.0"
|