@visulima/vis 1.0.0-alpha.15 → 1.0.0-alpha.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/LICENSE.md +44 -233
- package/dist/bin.js +1 -1
- package/dist/config/index.d.ts +200 -94
- package/dist/config/index.js +1 -1
- package/dist/packem_chunks/bin.js +271 -271
- package/dist/packem_chunks/config.js +18 -0
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +4 -4
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +5 -5
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -1
- package/dist/packem_chunks/handler21.js +18 -1
- package/dist/packem_chunks/handler22.js +1 -5
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +5 -3
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +3 -1
- package/dist/packem_chunks/handler27.js +1 -7
- package/dist/packem_chunks/handler28.js +1 -23
- package/dist/packem_chunks/handler29.js +7 -3
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +23 -18
- package/dist/packem_chunks/handler31.js +3 -1
- package/dist/packem_chunks/handler32.js +1 -2
- package/dist/packem_chunks/handler33.js +2 -25
- package/dist/packem_chunks/handler34.js +25 -2
- package/dist/packem_chunks/handler35.js +2 -2
- package/dist/packem_chunks/handler36.js +8 -8
- package/dist/packem_chunks/handler37.js +3 -3
- package/dist/packem_chunks/handler38.js +3 -3
- package/dist/packem_chunks/handler39.js +1 -1
- package/dist/packem_chunks/handler40.js +5 -5
- package/dist/packem_chunks/handler41.js +9 -9
- package/dist/packem_chunks/handler42.js +9 -9
- package/dist/packem_chunks/handler43.js +1 -1
- package/dist/packem_chunks/handler44.js +5 -5
- package/dist/packem_chunks/handler45.js +3 -3
- package/dist/packem_chunks/handler46.js +9 -9
- package/dist/packem_chunks/handler47.js +161 -36
- package/dist/packem_chunks/handler48.js +1 -1
- package/dist/packem_chunks/handler5.js +5 -5
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +2 -2
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +16 -16
- package/dist/packem_chunks/index.js +1 -1
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_shared/{ai-analysis-CGVjqwdc.js → ai-analysis-C_GpXikx.js} +3 -3
- package/dist/packem_shared/ai-cache-DrCLD4gc.js +1 -0
- package/dist/packem_shared/ai-fix-CWOz12Om.js +43 -0
- package/dist/packem_shared/applyDefaults-DLY94gWA.js +1 -0
- package/dist/packem_shared/cache-directory-C_U1qsIw.js +1 -0
- package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
- package/dist/packem_shared/dependency-scan-YdgNVvoz.js +2 -0
- package/dist/packem_shared/docker-B4i5yxtP.js +60 -0
- package/dist/packem_shared/failure-log-CSC6KfcO.js +2 -0
- package/dist/packem_shared/flakiness-Dzz-I3dB.js +1 -0
- package/dist/packem_shared/lifecycle-C7vfQmA3.js +2 -0
- package/dist/packem_shared/{lockfile-B7JJzxnL.js → lockfile-i-qvq_k8.js} +1 -1
- package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
- package/dist/packem_shared/{readTomlSync-1fKo0R52-DAKNI1Me.js → readTomlSync-1fKo0R52-DtxWULlF.js} +1 -1
- package/dist/packem_shared/run-summary-utils-CJv75pla.js +1 -0
- package/dist/packem_shared/runtime-check-CBU6W8qG.js +1 -0
- package/dist/packem_shared/{selectors-Sem2CTYA.js → selectors-B2ISH581.js} +1 -1
- package/dist/packem_shared/toolchain-B7dckBQ1.js +5 -0
- package/dist/packem_shared/typosquats-B3A38-qx.js +1 -0
- package/dist/packem_shared/verify-WDStBFvK.js +1 -0
- package/dist/packem_shared/vis-update-app-D0uL3eO5.js +1 -0
- package/package.json +13 -13
- package/schemas/project.schema.json +12 -2
- package/schemas/vis-config.schema.json +248 -3
- package/dist/packem_chunks/applyDefaults.js +0 -2
- package/dist/packem_shared/ai-cache-BdPgSfg2.js +0 -1
- package/dist/packem_shared/ai-fix-iHtGLkJS.js +0 -43
- package/dist/packem_shared/cache-directory-DTfMSzT9.js +0 -1
- package/dist/packem_shared/dependency-scan-SQeRzrpJ.js +0 -2
- package/dist/packem_shared/docker-D5p9mRPU.js +0 -2
- package/dist/packem_shared/failure-log-CElcbnb9.js +0 -2
- package/dist/packem_shared/flakiness-C4t4_NoA.js +0 -1
- package/dist/packem_shared/otel-CO8UEfTa.js +0 -17
- package/dist/packem_shared/otelPlugin-DTynZDWh.js +0 -1
- package/dist/packem_shared/registry-D04iOQ5H.js +0 -2
- package/dist/packem_shared/run-summary-utils-BPraMTcm.js +0 -1
- package/dist/packem_shared/runtime-check-l4qFpo08.js +0 -1
- package/dist/packem_shared/toolchain-BhZNts--.js +0 -5
- package/dist/packem_shared/typosquats-Dr7VIL2B.js +0 -1
- package/dist/packem_shared/verify-C6NNOhTA.js +0 -1
- package/dist/packem_shared/vis-update-app-DGiMc5kb.js +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var Yo=Object.defineProperty;var x=(e,t)=>Yo(e,"name",{value:t,configurable:!0});import{createRequire as Qo}from"node:module";import{createJiti as Kn}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const es=Qo(import.meta.url),hr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,on=x(e=>{if(typeof hr<"u"&&hr.versions&&hr.versions.node){const[t,o]=hr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return hr.getBuiltinModule(e)}return es(e)},"__cjs_getBuiltinModule"),{createHash:Jn}=on("node:crypto"),{readdirSync:Hn,readFileSync:ts,copyFileSync:rs,unlinkSync:ns}=on("node:fs"),{createRequire:Me}=on("node:module");var os=Object.defineProperty,He=x((e,t)=>os(e,"name",{value:t,configurable:!0}),"K$3"),ss=Object.defineProperty,W=He((e,t)=>ss(e,"name",{value:t,configurable:!0}),"E");const is=Me(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xn=W(e=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[t,o]=Ue.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ue.getBuiltinModule(e)}return is(e)},"__cjs_getBuiltinModule"),{existsSync:qe}=Xn("node:fs"),{env:Ze,cwd:Yn}=Ue,{createRequire:Ke}=Xn("node:module"),Qn=0,Ve=2,eo=Symbol("findUpStop");var as=Object.defineProperty,cs=W((e,t)=>as(e,"name",{value:t,configurable:!0}),"t$4"),ls=Object.defineProperty,us=cs((e,t)=>ls(e,"name",{value:t,configurable:!0}),"t"),fs=Object.defineProperty,ps=us((e,t)=>fs(e,"name",{value:t,configurable:!0}),"n");const sn=ps(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var ds=Object.defineProperty,gs=W((e,t)=>ds(e,"name",{value:t,configurable:!0}),"i$4"),hs=Object.defineProperty,ms=gs((e,t)=>hs(e,"name",{value:t,configurable:!0}),"r"),bs=Object.defineProperty,ys=ms((e,t)=>bs(e,"name",{value:t,configurable:!0}),"i");const jn=ys(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var $s=Object.defineProperty,vs=W((e,t)=>$s(e,"name",{value:t,configurable:!0}),"i$3"),xs=Object.defineProperty,to=vs((e,t)=>xs(e,"name",{value:t,configurable:!0}),"s");const ws=Ke(import.meta.url),mr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,js=to(e=>{if(typeof mr<"u"&&mr.versions&&mr.versions.node){const[t,o]=mr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return mr.getBuiltinModule(e)}return ws(e)},"__cjs_getBuiltinModule"),{lstatSync:On,mkdirSync:Os}=js("node:fs");var Ps=Object.defineProperty,ks=to((e,t)=>Ps(e,"name",{value:t,configurable:!0}),"o");const Es=ks(e=>{sn(e);try{const t=On(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(jn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Os(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const o=On(e);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(jn(o))}'`,{cause:t})}},"ensureDirSync");var As=Object.defineProperty,b=W((e,t)=>As(e,"name",{value:t,configurable:!0}),"s$6");let Pn=b(()=>{var e=(()=>{var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,p=b((r,n)=>{for(var s in n)t(r,s,{get:n[s],enumerable:!0})},"ne"),m=b((r,n,s,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of c(n))!u.call(r,i)&&i!==s&&t(r,i,{get:b(()=>n[i],"get"),enumerable:!(a=o(n,i))||a.enumerable});return r},"ae"),h=b(r=>m(t({},"__esModule",{value:!0}),r),"oe"),j={};p(j,{zeptomatch:b(()=>Ee,"zeptomatch")});var E=b(r=>{const n=new Set,s=[r];for(let a=0;a<s.length;a++){const i=s[a];if(n.has(i))continue;n.add(i);const{children:l}=i;if(l?.length)for(let f=0,g=l.length;f<g;f++)s.push(l[f])}return Array.from(n)},"M"),P=b(r=>{let n="";const s=E(r);for(let a=0,i=s.length;a<i;a++){const l=s[a];if(!l.regex)continue;const f=l.regex.flags;if(n||(n=f),n!==f)throw new Error(`Inconsistent RegExp flags used: "${n}" and "${f}"`)}return n},"se"),O=b((r,n,s)=>{const a=s.get(r);if(a!==void 0)return a;const i=r.partial??n;let l="";if(r.regex&&(l+=i?"(?:$|":"",l+=r.regex.source),r.children?.length){const f=T(r.children.map(g=>O(g,n,s)).filter(Boolean));if(f?.length){const g=r.children.some(U=>!U.regex||!(U.partial??n)),w=f.length>1||i&&(!l.length||g);l+=w?i?"(?:$|":"(?:":"",l+=f.join("|"),l+=w?")":""}}return r.regex&&(l+=i?")":""),s.set(r,l),l},"O"),B=b((r,n)=>{const s=new Map,a=E(r);for(let i=a.length-1;i>=0;i--){const l=O(a[i],n,s);if(!(i>0))return l}return""},"ie"),T=b(r=>Array.from(new Set(r)),"ue"),k=b((r,n,s)=>k.compile(r,s).test(n),"R");k.compile=(r,n)=>{const s=n?.partial??!1,a=B(r,s),i=P(r);return new RegExp(`^(?:${a})$`,i)};var G=k,X=b((r,n)=>{const s=G.compile(r,n),a=`${s.source.slice(0,-1)}[\\\\/]?$`,i=s.flags;return new RegExp(a,i)},"le"),se=X,Ce=b(r=>{const n=r.map(a=>a.source).join("|")||"$^",s=r[0]?.flags;return new RegExp(n,s)},"ve"),Be=Ce,Q=b(r=>Array.isArray(r),"j"),I=b(r=>typeof r=="function","_"),Ne=b(r=>r.length===0,"he"),Ie=(()=>{const{toString:r}=Function.prototype,n=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return s=>(s.length===0||s.length===1)&&n.test(r.call(s))})(),Ye=b(r=>typeof r=="number","de"),Qe=b(r=>typeof r=="object"&&r!==null,"xe"),et=b(r=>r instanceof RegExp,"me"),tt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return n=>r.test(n.source)})(),rt=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return n=>r.test(n.source)&&!n.flags.includes("i")})(),fe=b(r=>typeof r=="string","A"),z=b(r=>r===void 0,"f"),nt=b(r=>{const n=new Map;return s=>{const a=n.get(s);if(a!==void 0)return a;const i=r(s);return n.set(s,i),i}},"ye"),pe=b((r,n,s={})=>{const a={cache:{},input:r,index:0,indexBacktrackMax:0,options:s,output:[]},i=M(n)(a),l=Math.max(a.index,a.indexBacktrackMax);if(i&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${l}`)},"I"),d=b((r,n)=>Q(r)?ot(r,n):fe(r)?de(r,n):st(r,n),"i"),ot=b((r,n)=>{const s={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const i=a.charCodeAt(0);s[i]=!0}return a=>{const i=a.input;let l=a.index,f=l;for(;f<i.length&&i.charCodeAt(f)in s;)f+=1;if(f>l){if(!z(n)&&!a.options.silent){const g=i.slice(l,f),w=I(n)?n(g,i,`${l}`):n;z(w)||a.output.push(w)}a.index=f}return!0}},"we"),st=b((r,n)=>{if(rt(r))return de(r.source,n);{const s=r.source,a=r.flags.replace(/y|$/,"y"),i=new RegExp(s,a);return tt(r)&&I(n)&&!Ie(n)?it(i,n):at(i,n)}},"$e"),it=b((r,n)=>s=>{const a=s.index,i=s.input;r.lastIndex=a;const l=r.exec(i);if(l){const f=r.lastIndex;if(!s.options.silent){const g=n(...l,i,`${a}`);z(g)||s.output.push(g)}return s.index=f,!0}else return!1},"Ee"),at=b((r,n)=>s=>{const a=s.index,i=s.input;if(r.lastIndex=a,r.test(i)){const l=r.lastIndex;if(!z(n)&&!s.options.silent){const f=I(n)?n(i.slice(a,l),i,`${a}`):n;z(f)||s.output.push(f)}return s.index=l,!0}else return!1},"Ce"),de=b((r,n)=>s=>{const a=s.index,i=s.input;if(i.startsWith(r,a)){if(!z(n)&&!s.options.silent){const l=I(n)?n(r,i,`${a}`):n;z(l)||s.output.push(l)}return s.index+=r.length,!0}else return!1},"F"),ee=b((r,n,s,a)=>{const i=M(r),l=n>1;return re(te(he(f=>{let g=0;for(;g<s;){const w=f.index;if(!i(f)||(g+=1,f.index===w))break}return g>=n},l),a))},"k"),ge=b((r,n)=>ee(r,0,1,n),"L"),J=b((r,n)=>ee(r,0,1/0,n),"$"),ct=b((r,n)=>ee(r,1,1/0,n),"Re"),R=b((r,n)=>{const s=r.map(M);return re(te(he(a=>{for(let i=0,l=s.length;i<l;i++)if(!s[i](a))return!1;return!0}),n))},"x"),A=b((r,n)=>{const s=r.map(M);return re(te(a=>{for(let i=0,l=s.length;i<l;i++)if(s[i](a))return!0;return!1},n))},"p"),he=b((r,n=!0,s=!1)=>{const a=M(r);return n?i=>{const l=i.index,f=i.output.length,g=a(i);return!g&&!s&&(i.indexBacktrackMax=Math.max(i.indexBacktrackMax,i.index)),(!g||s)&&(i.index=l,i.output.length!==f&&(i.output.length=f)),g}:a},"q"),te=b((r,n)=>{const s=M(r);return n?a=>{if(a.options.silent)return s(a);const i=a.output.length;if(s(a)){const l=a.output.splice(i,1/0),f=n(l);return z(f)||a.output.push(f),!0}else return!1}:s},"B"),re=(()=>{let r=0;return n=>{const s=M(n),a=r+=1;return i=>{var l;if(i.options.memoization===!1)return s(i);const f=i.index,g=(l=i.cache)[a]||(l[a]={indexMax:-1,queue:[]}),w=g.queue;if(f<=g.indexMax){const q=g.store||(g.store=new Map);if(w.length){for(let F=0,pr=w.length;F<pr;F+=2){const dr=w[F*2],gr=w[F*2+1];q.set(dr,gr)}w.length=0}const S=q.get(f);if(S===!1)return!1;if(Ye(S))return i.index=S,!0;if(S)return i.index=S.index,S.output?.length&&i.output.push(...S.output),!0}const U=i.output.length,fr=s(i);if(g.indexMax=Math.max(g.indexMax,f),fr){const q=i.index,S=i.output.length;if(S>U){const F=i.output.slice(U,S);w.push(f,{index:q,output:F})}else w.push(f,q);return!0}else return w.push(f,!1),!1}}})(),me=b(r=>{let n;return s=>(n||(n=M(r())),n(s))},"G"),M=nt(r=>{if(I(r))return Ne(r)?me(r):r;if(fe(r)||et(r))return d(r);if(Q(r))return R(r);if(Qe(r))return A(Object.values(r));throw new Error("Invalid rule")}),C=b(r=>r,"d"),lt=b(r=>typeof r=="string","ke"),ut=b(r=>{const n=new WeakMap,s=new WeakMap;return(a,i)=>{const l=i?.partial?s:n,f=l.get(a);if(f!==void 0)return f;const g=r(a,i);return l.set(a,g),g}},"Be"),ft=b(r=>{const n={},s={};return(a,i)=>{const l=i?.partial?s:n;return l[a]??(l[a]=r(a,i))}},"Pe"),pt=d(/\\./,C),dt=d(/./,C),gt=d(/\*\*\*+/,"*"),ht=d(/([^/{[(!])\*\*/,(r,n)=>`${n}*`),mt=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,n)=>`${n}*`),bt=J(A([pt,gt,ht,mt,dt])),yt=bt,$t=b(r=>pe(r,yt,{memoization:!1}).join(""),"Ie"),vt=$t,be="abcdefghijklmnopqrstuvwxyz",xt=b(r=>{let n="";for(;r>0;){const s=(r-1)%26;n=be[s]+n,r=Math.floor((r-1)/26)}return n},"Le"),ye=b(r=>{let n=0;for(let s=0,a=r.length;s<a;s++)n=n*26+be.indexOf(r[s])+1;return n},"V"),ne=b((r,n)=>{if(n<r)return ne(n,r);const s=[];for(;r<=n;)s.push(r++);return s},"b"),wt=b((r,n,s)=>ne(r,n).map(a=>String(a).padStart(s,"0")),"qe"),$e=b((r,n)=>ne(ye(r),ye(n)).map(xt),"W"),y=b(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),L=b(r=>({children:r}),"y"),D=(()=>{const r=b((n,s,a)=>{if(a.has(n))return;a.add(n);const{children:i}=n;if(!i.length)i.push(s);else for(let l=0,f=i.length;l<f;l++)r(i[l],s,a)},"e");return n=>{if(!n.length)return L([]);for(let s=n.length-1;s>=1;s--){const a=new Set,i=n[s-1],l=n[s];r(i,l,a)}return n[0]}})(),_=b(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),jt=d(/\\./,y),Ot=d(/[$.*+?^(){}[\]\|]/,r=>y(`\\${r}`)),Pt=d(/[\\\/]/,_),kt=d(/[^$.*+?^(){}[\]\|\\\/]+/,y),Et=d(/^(?:!!)*!(.*)$/,(r,n)=>y(`(?!^${Ee.compile(n).source}$).*?`)),At=d(/^(!!)+/),St=A([Et,At]),zt=d(/\/(\*\*\/)+/,()=>L([D([_(),y(".+?"),_()]),_()])),Mt=d(/^(\*\*\/)+/,()=>L([y("^"),D([y(".*?"),_()])])),_t=d(/\/(\*\*)$/,()=>L([D([_(),y(".*?")]),y("$")])),Tt=d(/\*\*/,()=>y(".*?")),ve=A([zt,Mt,_t,Tt]),Ct=d(/\*\/(?!\*\*\/|\*$)/,()=>D([y("[^\\\\/]*?"),_()])),Bt=d(/\*/,()=>y("[^\\\\/]*")),xe=A([Ct,Bt]),we=d("?",()=>y("[^\\\\/]")),Nt=d("[",C),It=d("]",C),Rt=d(/[!^]/,"^\\\\/"),Dt=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,C),Ft=d(/\\./,C),Wt=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Lt=d(/[\\\/]/,"\\\\/"),Ut=d(/[^$.*+?^(){}[\]\|\\\/]+/,C),qt=A([Ft,Wt,Lt,Dt,Ut]),je=R([Nt,ge(Rt),J(qt),It],r=>y(r.join(""))),Zt=d("{","(?:"),Vt=d("}",")"),Gt=d(/(\d+)\.\.(\d+)/,(r,n,s)=>wt(+n,+s,Math.min(n.length,s.length)).join("|")),Jt=d(/([a-z]+)\.\.([a-z]+)/,(r,n,s)=>$e(n,s).join("|")),Ht=d(/([A-Z]+)\.\.([A-Z]+)/,(r,n,s)=>$e(n.toLowerCase(),s.toLowerCase()).join("|").toUpperCase()),Kt=A([Gt,Jt,Ht]),Oe=R([Zt,Kt,Vt],r=>y(r.join(""))),Xt=d("{"),Yt=d("}"),Qt=d(","),er=d(/\\./,y),tr=d(/[$.*+?^(){[\]\|]/,r=>y(`\\${r}`)),rr=d(/[\\\/]/,_),nr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,y),or=me(()=>ke),sr=d("",()=>y("(?:)")),ir=ct(A([ve,xe,we,je,Oe,or,er,tr,rr,nr]),D),Pe=A([ir,sr]),ke=R([Xt,ge(R([Pe,J(R([Qt,Pe]))])),Yt],L),ar=J(A([St,ve,xe,we,je,Oe,ke,jt,Ot,Pt,kt]),D),cr=ar,lr=b(r=>pe(r,cr,{memoization:!1})[0],"kr"),ur=lr,oe=b((r,n,s)=>oe.compile(r,s).test(n),"N");oe.compile=(()=>{const r=ft((s,a)=>se(ur(vt(s)),a)),n=ut((s,a)=>Be(s.map(i=>r(i,a))));return(s,a)=>lt(s)?r(s,a):n(s,a)})();var Ee=oe;return h(j)})();return e.default||e},"_lazyMatch"),Kr;const Ss=b((e,t)=>(Kr||(Kr=Pn(),Pn=null),Kr(e,t)),"zeptomatch"),zs=/^[A-Z]:\//i,ie=b((e="")=>e&&e.replaceAll("\\","/").replace(zs,t=>t.toUpperCase()),"normalizeWindowsPath"),Ms=/^[/\\]{2}/,_s=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,ro=/^[A-Z]:$/i,kn=/^\/([A-Z]:)?$/i,Ts=/.(\.[^./]+)$/,Cs=/^[/\\]|^[a-z]:[/\\]/i,Bs=/\/$/,Ns=b(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),no=b((e,t)=>{let o="",c=0,u=-1,p=0,m;for(let h=0;h<=e.length;++h){if(h<e.length)m=e[h];else{if(m==="/")break;m="/"}if(m==="/"){if(!(u===h-1||p===1))if(p===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const j=o.lastIndexOf("/");j===-1?(o="",c=0):(o=o.slice(0,j),c=o.length-1-o.lastIndexOf("/")),u=h,p=0;continue}else if(o.length>0){o="",c=0,u=h,p=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(u+1,h)}`:o=e.slice(u+1,h),c=h-u-1;u=h,p=0}else m==="."&&p!==-1?++p:p=-1}return o},"normalizeString"),Re=b(e=>_s.test(e),"isAbsolute"),oo=b(function(e){if(e.length===0)return".";e=ie(e);const t=Ms.exec(e),o=Re(e),c=e.at(-1)==="/";return e=no(e,!o),e.length===0?o?"/":c?"./":".":(c&&(e+="/"),ro.test(e)&&(e+="/"),t?o?`//${e}`:`//./${e}`:o&&!Re(e)?`/${e}`:e)},"normalize"),so=b((...e)=>{let t="";for(const o of e)if(o)if(t.length>0){const c=t.at(-1)==="/",u=o[0]==="/";c&&u?t+=o.slice(1):t+=c||u?o:`/${o}`}else t+=o;return oo(t)},"join"),le=b(function(...e){e=e.map(c=>ie(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const u=c>=0?e[c]:Ns();!u||u.length===0||(t=`${u}/${t}`,o=Re(u))}return t=no(t,!o),o&&!Re(t)?`/${t}`:t.length>0?t:"."},"resolve");b(function(e){return ie(e)},"toNamespacedPath");const io=b(function(e){return Ts.exec(ie(e))?.[1]??""},"extname");b(function(e,t){const o=le(e).replace(kn,"$1").split("/"),c=le(t).replace(kn,"$1").split("/");if(c[0][1]===":"&&o[0][1]===":"&&o[0]!==c[0])return c.join("/");const u=[...o];for(const p of u){if(c[0]!==p)break;o.shift(),c.shift()}return[...o.map(()=>".."),...c].join("/")},"relative");const an=b(e=>{const t=ie(e).replace(Bs,"").split("/").slice(0,-1);return t.length===1&&ro.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Re(e)?"/":".")},"dirname");b(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return ie(e.root?le(...t):t.join("/"))},"format");const Is=b((e,t)=>{const o=ie(e).split("/").pop();return t&&o.endsWith(t)?o.slice(0,-t.length):o},"basename"),ao=b(function(e){const t=Cs.exec(e)?.[0]?.replaceAll("\\","/")??"",o=Is(e),c=io(o);return{base:o,dir:an(e),ext:c,name:o.slice(0,o.length-c.length),root:t}},"parse");b((e,t)=>Ss(t,oo(e)),"matchesGlob");var Rs=Object.defineProperty,Y=W((e,t)=>Rs(e,"name",{value:t,configurable:!0}),"i$2");const Ds=Ke(import.meta.url),br=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fs=Y(e=>{if(typeof br<"u"&&br.versions&&br.versions.node){const[t,o]=br.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return br.getBuiltinModule(e)}return Ds(e)},"__cjs_getBuiltinModule"),{fileURLToPath:Ws}=Fs("node:url");function Rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(Rr,"dn$1");He(Rr,"Nr");W(Rr,"w$1");Y(Rr,"getDefaultExportFromCjs");var En,An;function Dr(){return An||(An=1,En=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),En}x(Dr,"gn$1");He(Dr,"Dr");W(Dr,"y$2");Y(Dr,"requireBinaryExtensions");var Ls=Dr();const Us=Rr(Ls),qs=new Set(Us),Zs=new Set(["/","\\",void 0]),Sn=Symbol.for("pathe:normalizedAlias"),Vs=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Gs=Y((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),Br=Y((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),co=Y(e=>{if(e[Sn])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([o],[c])=>Gs(o,c)));for(const o in t)for(const c in t)c===o||o.startsWith(c)||t[o].startsWith(c)&&Zs.has(t[o][c.length])&&(t[o]=t[c]+t[o].slice(c.length));return Object.defineProperty(t,Sn,{enumerable:!1,value:!0}),t},"normalizeAliases");Y((e,t)=>{e=ie(e),t=co(t);for(const[o,c]of Object.entries(t)){if(!e.startsWith(o))continue;const u=Br(o)?o.slice(0,-1):o;if(Br(e[u.length]))return so(c,e.slice(o.length))}return e},"resolveAlias");Y(e=>Vs.exec(e)?.[2],"filename");Y((e,t)=>{e=ie(e),t=co(t);for(const[o,c]of Object.entries(t).toReversed()){if(!e.startsWith(c))continue;const u=Br(c)?c.slice(0,-1):c;if(Br(e[u.length]))return so(o,e.slice(c.length))}return e},"reverseResolveAlias");const Js=/^(?:\.?\.[/\\]|\.\.\B)/,Hs=/^(?:msys|cygwin)$/;Y(e=>Js.test(e)||e==="..","isRelative");Y(e=>qs.has(io(e).slice(1).toLowerCase()),"isBinaryPath");const Ge=Y(e=>ie(e instanceof URL?Ws(e):e),"toPath");Y(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:Hs.test(e)},"isWindows");var Ks=Object.defineProperty,Xs=W((e,t)=>Ks(e,"name",{value:t,configurable:!0}),"p"),Ys=Object.defineProperty,lo=Xs((e,t)=>Ys(e,"name",{value:t,configurable:!0}),"a");const Qs=Ke(import.meta.url),yr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=lo(e=>{if(typeof yr<"u"&&yr.versions&&yr.versions.node){const[t,o]=yr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return yr.getBuiltinModule(e)}return Qs(e)},"__cjs_getBuiltinModule"),{stat:ei,lstat:ti}=uo("node:fs/promises"),{fileURLToPath:ri}=uo("node:url");var ni=Object.defineProperty,zn=lo((e,t)=>ni(e,"name",{value:t,configurable:!0}),"n");const oi=zn(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const o=t.cwd?Ge(t.cwd):process.cwd();let c=le(o);const{root:u}=ao(c),p=Ge(t.stopAt??u),m=le(c,p),h=t.type??"file",j=zn(async function(P){return typeof e=="function"?[await e(P)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const E=t.allowSymlinks?ei:ti;for(;c&&c!==m&&c!==u;){const P=await j(c);for(let O of P){if(O===eo)return;if(O===void 0)continue;Buffer.isBuffer(O)?O=O.toString():O instanceof URL&&(O=ri(O));const B=Re(O)?O:le(c,O);try{const T=await E(B);if(h==="file"&&T.isFile()||h==="directory"&&T.isDirectory())return B}catch{}}c=an(c)}},"findUp");var si=Object.defineProperty,ii=W((e,t)=>si(e,"name",{value:t,configurable:!0}),"u$3"),ai=Object.defineProperty,fo=ii((e,t)=>ai(e,"name",{value:t,configurable:!0}),"i");const ci=Ke(import.meta.url),$r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,po=fo(e=>{if(typeof $r<"u"&&$r.versions&&$r.versions.node){const[t,o]=$r.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return $r.getBuiltinModule(e)}return ci(e)},"__cjs_getBuiltinModule"),{statSync:li,lstatSync:ui}=po("node:fs"),{fileURLToPath:fi}=po("node:url");var pi=Object.defineProperty,Mn=fo((e,t)=>pi(e,"name",{value:t,configurable:!0}),"o");const di=Mn((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const o=t.cwd?Ge(t.cwd):process.cwd();let c=le(o);const{root:u}=ao(c),p=Ge(t.stopAt??u),m=le(c,p),h=t.type??"file",j=Mn(function(P){return typeof e=="function"?[e(P)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const E=t.allowSymlinks?li:ui;for(;c&&c!==m&&c!==u;){for(let P of j(c)){if(P===eo)return;if(P===void 0)continue;Buffer.isBuffer(P)?P=P.toString():P instanceof URL&&(P=fi(P));const O=Re(P)?P:le(c,P);try{const B=E(O);if(h==="file"&&B.isFile()||h==="directory"&&B.isDirectory())return O}catch{}}c=an(c)}},"findUpSync");var gi=Object.defineProperty,go=W((e,t)=>gi(e,"name",{value:t,configurable:!0}),"t$2"),hi=Object.defineProperty,cn=go((e,t)=>hi(e,"name",{value:t,configurable:!0}),"s");const mi=Ke(import.meta.url),vr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bi=cn(e=>{if(typeof vr<"u"&&vr.versions&&vr.versions.node){const[t,o]=vr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return vr.getBuiltinModule(e)}return mi(e)},"__cjs_getBuiltinModule"),{access:yi}=bi("node:fs/promises");var $i=Object.defineProperty,vi=cn((e,t)=>$i(e,"name",{value:t,configurable:!0}),"o");async function Se(e,t=Qn){sn(e),e=Ge(e);try{return await yi(e,t),!0}catch{return!1}}x(Se,"Q$3");He(Se,"se");W(Se,"i$1");go(Se,"d");cn(Se,"m");vi(Se,"isAccessible");var xi=Object.defineProperty,ho=W((e,t)=>xi(e,"name",{value:t,configurable:!0}),"t$1"),wi=Object.defineProperty,ln=ho((e,t)=>wi(e,"name",{value:t,configurable:!0}),"t");const ji=Ke(import.meta.url),xr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oi=ln(e=>{if(typeof xr<"u"&&xr.versions&&xr.versions.node){const[t,o]=xr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return xr.getBuiltinModule(e)}return ji(e)},"__cjs_getBuiltinModule"),{accessSync:Pi}=Oi("node:fs");var ki=Object.defineProperty,Ei=ln((e,t)=>ki(e,"name",{value:t,configurable:!0}),"o");function ze(e,t=Qn){sn(e),e=Ge(e);try{return Pi(e,t),!0}catch{return!1}}x(ze,"ee$1");He(ze,"ie");W(ze,"i");ho(ze,"d");ln(ze,"m");Ei(ze,"isAccessibleSync");var Ai=Object.defineProperty,mo=W((e,t)=>Ai(e,"name",{value:t,configurable:!0}),"o"),Si=Object.defineProperty,bo=mo((e,t)=>Si(e,"name",{value:t,configurable:!0}),"o"),zi=Object.defineProperty,Mi=bo((e,t)=>zi(e,"name",{value:t,configurable:!0}),"o");let yo=class extends Error{static{x(this,"Jn")}static{He(this,"Xr")}static{W(this,"s")}static{mo(this,"u")}static{bo(this,"n")}static{Mi(this,"NotFoundError")}constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}};var _i=Object.defineProperty,Ti=W((e,t)=>_i(e,"name",{value:t,configurable:!0}),"$e"),Ci=Object.defineProperty,un=Ti((e,t)=>Ci(e,"name",{value:t,configurable:!0}),"W"),Bi=Object.defineProperty,$=un((e,t)=>Bi(e,"name",{value:t,configurable:!0}),"u$1");let _n=$(()=>{var e=(()=>{var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,p=$((r,n)=>{for(var s in n)t(r,s,{get:n[s],enumerable:!0})},"ne"),m=$((r,n,s,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of c(n))!u.call(r,i)&&i!==s&&t(r,i,{get:$(()=>n[i],"get"),enumerable:!(a=o(n,i))||a.enumerable});return r},"ae"),h=$(r=>m(t({},"__esModule",{value:!0}),r),"oe"),j={};p(j,{zeptomatch:$(()=>Ee,"zeptomatch")});var E=$(r=>{const n=new Set,s=[r];for(let a=0;a<s.length;a++){const i=s[a];if(n.has(i))continue;n.add(i);const{children:l}=i;if(l?.length)for(let f=0,g=l.length;f<g;f++)s.push(l[f])}return Array.from(n)},"M"),P=$(r=>{let n="";const s=E(r);for(let a=0,i=s.length;a<i;a++){const l=s[a];if(!l.regex)continue;const f=l.regex.flags;if(n||(n=f),n!==f)throw new Error(`Inconsistent RegExp flags used: "${n}" and "${f}"`)}return n},"se"),O=$((r,n,s)=>{const a=s.get(r);if(a!==void 0)return a;const i=r.partial??n;let l="";if(r.regex&&(l+=i?"(?:$|":"",l+=r.regex.source),r.children?.length){const f=T(r.children.map(g=>O(g,n,s)).filter(Boolean));if(f?.length){const g=r.children.some(U=>!U.regex||!(U.partial??n)),w=f.length>1||i&&(!l.length||g);l+=w?i?"(?:$|":"(?:":"",l+=f.join("|"),l+=w?")":""}}return r.regex&&(l+=i?")":""),s.set(r,l),l},"O"),B=$((r,n)=>{const s=new Map,a=E(r);for(let i=a.length-1;i>=0;i--){const l=O(a[i],n,s);if(!(i>0))return l}return""},"ie"),T=$(r=>Array.from(new Set(r)),"ue"),k=$((r,n,s)=>k.compile(r,s).test(n),"R");k.compile=(r,n)=>{const s=n?.partial??!1,a=B(r,s),i=P(r);return new RegExp(`^(?:${a})$`,i)};var G=k,X=$((r,n)=>{const s=G.compile(r,n),a=`${s.source.slice(0,-1)}[\\\\/]?$`,i=s.flags;return new RegExp(a,i)},"le"),se=X,Ce=$(r=>{const n=r.map(a=>a.source).join("|")||"$^",s=r[0]?.flags;return new RegExp(n,s)},"ve"),Be=Ce,Q=$(r=>Array.isArray(r),"j"),I=$(r=>typeof r=="function","_"),Ne=$(r=>r.length===0,"he"),Ie=(()=>{const{toString:r}=Function.prototype,n=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return s=>(s.length===0||s.length===1)&&n.test(r.call(s))})(),Ye=$(r=>typeof r=="number","de"),Qe=$(r=>typeof r=="object"&&r!==null,"xe"),et=$(r=>r instanceof RegExp,"me"),tt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return n=>r.test(n.source)})(),rt=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return n=>r.test(n.source)&&!n.flags.includes("i")})(),fe=$(r=>typeof r=="string","A"),z=$(r=>r===void 0,"f"),nt=$(r=>{const n=new Map;return s=>{const a=n.get(s);if(a!==void 0)return a;const i=r(s);return n.set(s,i),i}},"ye"),pe=$((r,n,s={})=>{const a={cache:{},input:r,index:0,indexBacktrackMax:0,options:s,output:[]},i=M(n)(a),l=Math.max(a.index,a.indexBacktrackMax);if(i&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${l}`)},"I"),d=$((r,n)=>Q(r)?ot(r,n):fe(r)?de(r,n):st(r,n),"i"),ot=$((r,n)=>{const s={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const i=a.charCodeAt(0);s[i]=!0}return a=>{const i=a.input;let l=a.index,f=l;for(;f<i.length&&i.charCodeAt(f)in s;)f+=1;if(f>l){if(!z(n)&&!a.options.silent){const g=i.slice(l,f),w=I(n)?n(g,i,`${l}`):n;z(w)||a.output.push(w)}a.index=f}return!0}},"we"),st=$((r,n)=>{if(rt(r))return de(r.source,n);{const s=r.source,a=r.flags.replace(/y|$/,"y"),i=new RegExp(s,a);return tt(r)&&I(n)&&!Ie(n)?it(i,n):at(i,n)}},"$e"),it=$((r,n)=>s=>{const a=s.index,i=s.input;r.lastIndex=a;const l=r.exec(i);if(l){const f=r.lastIndex;if(!s.options.silent){const g=n(...l,i,`${a}`);z(g)||s.output.push(g)}return s.index=f,!0}else return!1},"Ee"),at=$((r,n)=>s=>{const a=s.index,i=s.input;if(r.lastIndex=a,r.test(i)){const l=r.lastIndex;if(!z(n)&&!s.options.silent){const f=I(n)?n(i.slice(a,l),i,`${a}`):n;z(f)||s.output.push(f)}return s.index=l,!0}else return!1},"Ce"),de=$((r,n)=>s=>{const a=s.index,i=s.input;if(i.startsWith(r,a)){if(!z(n)&&!s.options.silent){const l=I(n)?n(r,i,`${a}`):n;z(l)||s.output.push(l)}return s.index+=r.length,!0}else return!1},"F"),ee=$((r,n,s,a)=>{const i=M(r),l=n>1;return re(te(he(f=>{let g=0;for(;g<s;){const w=f.index;if(!i(f)||(g+=1,f.index===w))break}return g>=n},l),a))},"k"),ge=$((r,n)=>ee(r,0,1,n),"L"),J=$((r,n)=>ee(r,0,1/0,n),"$"),ct=$((r,n)=>ee(r,1,1/0,n),"Re"),R=$((r,n)=>{const s=r.map(M);return re(te(he(a=>{for(let i=0,l=s.length;i<l;i++)if(!s[i](a))return!1;return!0}),n))},"x"),A=$((r,n)=>{const s=r.map(M);return re(te(a=>{for(let i=0,l=s.length;i<l;i++)if(s[i](a))return!0;return!1},n))},"p"),he=$((r,n=!0,s=!1)=>{const a=M(r);return n?i=>{const l=i.index,f=i.output.length,g=a(i);return!g&&!s&&(i.indexBacktrackMax=Math.max(i.indexBacktrackMax,i.index)),(!g||s)&&(i.index=l,i.output.length!==f&&(i.output.length=f)),g}:a},"q"),te=$((r,n)=>{const s=M(r);return n?a=>{if(a.options.silent)return s(a);const i=a.output.length;if(s(a)){const l=a.output.splice(i,1/0),f=n(l);return z(f)||a.output.push(f),!0}else return!1}:s},"B"),re=(()=>{let r=0;return n=>{const s=M(n),a=r+=1;return i=>{var l;if(i.options.memoization===!1)return s(i);const f=i.index,g=(l=i.cache)[a]||(l[a]={indexMax:-1,queue:[]}),w=g.queue;if(f<=g.indexMax){const q=g.store||(g.store=new Map);if(w.length){for(let F=0,pr=w.length;F<pr;F+=2){const dr=w[F*2],gr=w[F*2+1];q.set(dr,gr)}w.length=0}const S=q.get(f);if(S===!1)return!1;if(Ye(S))return i.index=S,!0;if(S)return i.index=S.index,S.output?.length&&i.output.push(...S.output),!0}const U=i.output.length,fr=s(i);if(g.indexMax=Math.max(g.indexMax,f),fr){const q=i.index,S=i.output.length;if(S>U){const F=i.output.slice(U,S);w.push(f,{index:q,output:F})}else w.push(f,q);return!0}else return w.push(f,!1),!1}}})(),me=$(r=>{let n;return s=>(n||(n=M(r())),n(s))},"G"),M=nt(r=>{if(I(r))return Ne(r)?me(r):r;if(fe(r)||et(r))return d(r);if(Q(r))return R(r);if(Qe(r))return A(Object.values(r));throw new Error("Invalid rule")}),C=$(r=>r,"d"),lt=$(r=>typeof r=="string","ke"),ut=$(r=>{const n=new WeakMap,s=new WeakMap;return(a,i)=>{const l=i?.partial?s:n,f=l.get(a);if(f!==void 0)return f;const g=r(a,i);return l.set(a,g),g}},"Be"),ft=$(r=>{const n={},s={};return(a,i)=>{const l=i?.partial?s:n;return l[a]??(l[a]=r(a,i))}},"Pe"),pt=d(/\\./,C),dt=d(/./,C),gt=d(/\*\*\*+/,"*"),ht=d(/([^/{[(!])\*\*/,(r,n)=>`${n}*`),mt=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,n)=>`${n}*`),bt=J(A([pt,gt,ht,mt,dt])),yt=bt,$t=$(r=>pe(r,yt,{memoization:!1}).join(""),"Ie"),vt=$t,be="abcdefghijklmnopqrstuvwxyz",xt=$(r=>{let n="";for(;r>0;){const s=(r-1)%26;n=be[s]+n,r=Math.floor((r-1)/26)}return n},"Le"),ye=$(r=>{let n=0;for(let s=0,a=r.length;s<a;s++)n=n*26+be.indexOf(r[s])+1;return n},"V"),ne=$((r,n)=>{if(n<r)return ne(n,r);const s=[];for(;r<=n;)s.push(r++);return s},"b"),wt=$((r,n,s)=>ne(r,n).map(a=>String(a).padStart(s,"0")),"qe"),$e=$((r,n)=>ne(ye(r),ye(n)).map(xt),"W"),y=$(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),L=$(r=>({children:r}),"y"),D=(()=>{const r=$((n,s,a)=>{if(a.has(n))return;a.add(n);const{children:i}=n;if(!i.length)i.push(s);else for(let l=0,f=i.length;l<f;l++)r(i[l],s,a)},"e");return n=>{if(!n.length)return L([]);for(let s=n.length-1;s>=1;s--){const a=new Set,i=n[s-1],l=n[s];r(i,l,a)}return n[0]}})(),_=$(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),jt=d(/\\./,y),Ot=d(/[$.*+?^(){}[\]\|]/,r=>y(`\\${r}`)),Pt=d(/[\\\/]/,_),kt=d(/[^$.*+?^(){}[\]\|\\\/]+/,y),Et=d(/^(?:!!)*!(.*)$/,(r,n)=>y(`(?!^${Ee.compile(n).source}$).*?`)),At=d(/^(!!)+/),St=A([Et,At]),zt=d(/\/(\*\*\/)+/,()=>L([D([_(),y(".+?"),_()]),_()])),Mt=d(/^(\*\*\/)+/,()=>L([y("^"),D([y(".*?"),_()])])),_t=d(/\/(\*\*)$/,()=>L([D([_(),y(".*?")]),y("$")])),Tt=d(/\*\*/,()=>y(".*?")),ve=A([zt,Mt,_t,Tt]),Ct=d(/\*\/(?!\*\*\/|\*$)/,()=>D([y("[^\\\\/]*?"),_()])),Bt=d(/\*/,()=>y("[^\\\\/]*")),xe=A([Ct,Bt]),we=d("?",()=>y("[^\\\\/]")),Nt=d("[",C),It=d("]",C),Rt=d(/[!^]/,"^\\\\/"),Dt=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,C),Ft=d(/\\./,C),Wt=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Lt=d(/[\\\/]/,"\\\\/"),Ut=d(/[^$.*+?^(){}[\]\|\\\/]+/,C),qt=A([Ft,Wt,Lt,Dt,Ut]),je=R([Nt,ge(Rt),J(qt),It],r=>y(r.join(""))),Zt=d("{","(?:"),Vt=d("}",")"),Gt=d(/(\d+)\.\.(\d+)/,(r,n,s)=>wt(+n,+s,Math.min(n.length,s.length)).join("|")),Jt=d(/([a-z]+)\.\.([a-z]+)/,(r,n,s)=>$e(n,s).join("|")),Ht=d(/([A-Z]+)\.\.([A-Z]+)/,(r,n,s)=>$e(n.toLowerCase(),s.toLowerCase()).join("|").toUpperCase()),Kt=A([Gt,Jt,Ht]),Oe=R([Zt,Kt,Vt],r=>y(r.join(""))),Xt=d("{"),Yt=d("}"),Qt=d(","),er=d(/\\./,y),tr=d(/[$.*+?^(){[\]\|]/,r=>y(`\\${r}`)),rr=d(/[\\\/]/,_),nr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,y),or=me(()=>ke),sr=d("",()=>y("(?:)")),ir=ct(A([ve,xe,we,je,Oe,or,er,tr,rr,nr]),D),Pe=A([ir,sr]),ke=R([Xt,ge(R([Pe,J(R([Qt,Pe]))])),Yt],L),ar=J(A([St,ve,xe,we,je,Oe,ke,jt,Ot,Pt,kt]),D),cr=ar,lr=$(r=>pe(r,cr,{memoization:!1})[0],"kr"),ur=lr,oe=$((r,n,s)=>oe.compile(r,s).test(n),"N");oe.compile=(()=>{const r=ft((s,a)=>se(ur(vt(s)),a)),n=ut((s,a)=>Be(s.map(i=>r(i,a))));return(s,a)=>lt(s)?r(s,a):n(s,a)})();var Ee=oe;return h(j)})();return e.default||e},"_lazyMatch"),Xr;const Ni=$((e,t)=>(Xr||(Xr=_n(),_n=null),Xr(e,t)),"default");var Ii=Object.defineProperty,Ri=un((e,t)=>Ii(e,"name",{value:t,configurable:!0}),"t$1");const Di=/^[A-Z]:\//i,Fe=Ri((e="")=>e&&e.replaceAll("\\","/").replace(Di,t=>t.toUpperCase()),"normalizeWindowsPath");var Fi=Object.defineProperty,H=un((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"r");const Wi=/^[/\\]{2}/,Li=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$o=/^[A-Z]:$/i,Tn=/^\/([A-Z]:)?$/i,Ui=/.(\.[^./]+)$/,qi=/^[/\\]|^[a-z]:[/\\]/i,Zi=/\/$/,Vi=H(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),vo=H((e,t)=>{let o="",c=0,u=-1,p=0,m;for(let h=0;h<=e.length;++h){if(h<e.length)m=e[h];else{if(m==="/")break;m="/"}if(m==="/"){if(!(u===h-1||p===1))if(p===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const j=o.lastIndexOf("/");j===-1?(o="",c=0):(o=o.slice(0,j),c=o.length-1-o.lastIndexOf("/")),u=h,p=0;continue}else if(o.length>0){o="",c=0,u=h,p=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(u+1,h)}`:o=e.slice(u+1,h),c=h-u-1;u=h,p=0}else m==="."&&p!==-1?++p:p=-1}return o},"normalizeString"),Ar=H(e=>Li.test(e),"isAbsolute"),xo=H(function(e){if(e.length===0)return".";e=Fe(e);const t=Wi.exec(e),o=Ar(e),c=e.at(-1)==="/";return e=vo(e,!o),e.length===0?o?"/":c?"./":".":(c&&(e+="/"),$o.test(e)&&(e+="/"),t?o?`//${e}`:`//./${e}`:o&&!Ar(e)?`/${e}`:e)},"normalize"),Ae=H((...e)=>{let t="";for(const o of e)if(o)if(t.length>0){const c=t.at(-1)==="/",u=o[0]==="/";c&&u?t+=o.slice(1):t+=c||u?o:`/${o}`}else t+=o;return xo(t)},"join"),en=H(function(...e){e=e.map(c=>Fe(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const u=c>=0?e[c]:Vi();!u||u.length===0||(t=`${u}/${t}`,o=Ar(u))}return t=vo(t,!o),o&&!Ar(t)?`/${t}`:t.length>0?t:"."},"resolve");H(function(e){return Fe(e)},"toNamespacedPath");const Gi=H(function(e){return Ui.exec(Fe(e))?.[1]??""},"extname");H(function(e,t){const o=en(e).replace(Tn,"$1").split("/"),c=en(t).replace(Tn,"$1").split("/");if(c[0][1]===":"&&o[0][1]===":"&&o[0]!==c[0])return c.join("/");const u=[...o];for(const p of u){if(c[0]!==p)break;o.shift(),c.shift()}return[...o.map(()=>".."),...c].join("/")},"relative");const fn=H(e=>{const t=Fe(e).replace(Zi,"").split("/").slice(0,-1);return t.length===1&&$o.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Ar(e)?"/":".")},"dirname");H(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return Fe(e.root?en(...t):t.join("/"))},"format");const Ji=H((e,t)=>{const o=Fe(e).split("/").pop();return t&&o.endsWith(t)?o.slice(0,-t.length):o},"basename");H(function(e){const t=qi.exec(e)?.[0]?.replaceAll("\\","/")??"",o=Ji(e),c=Gi(o);return{base:o,dir:fn(e),ext:c,name:o.slice(0,o.length-c.length),root:t}},"parse");H((e,t)=>Ni(t,xo(e)),"matchesGlob");var Hi=Object.defineProperty,pn=W((e,t)=>Hi(e,"name",{value:t,configurable:!0}),"u");const Nr=pn((e,t)=>(t?.create&&Es(e),e),"useDirectory");pn(async(e,t)=>{if(Ze.CACHE_DIR&&!["0","1","false","true"].includes(Ze.CACHE_DIR))return Nr(Ae(Ze.CACHE_DIR,e),t);const o=await oi("package.json",{cwd:t?.cwd??Yn(),type:"file"});if(!o){if(t?.throwError)throw new yo("No such file or directory found.");return}const c=Ae(fn(o),"node_modules"),u=Ae(c,".cache"),p=Ae(u,e);if(!(qe(p)&&!await Se(p,Ve))&&!(qe(u)&&!await Se(u,Ve))&&!(qe(c)&&!await Se(c,Ve)))return Nr(p,t)},"findCacheDirectory");const Ki=pn((e,t)=>{if(Ze.CACHE_DIR&&!["0","1","false","true"].includes(Ze.CACHE_DIR))return Nr(Ae(Ze.CACHE_DIR,e),t);const o=di("package.json",{cwd:t?.cwd??Yn(),type:"file"});if(!o){if(t?.throwError)throw new yo("No such file or directory found.");return}const c=Ae(fn(o),"node_modules"),u=Ae(c,".cache"),p=Ae(u,e);if(!(qe(p)&&!ze(p,Ve))&&!(qe(u)&&!ze(u,Ve))&&!(qe(c)&&!ze(c,Ve)))return Nr(p,t)},"findCacheDirectorySync"),wo=Ki,tn=0,jo=4,Eu=Symbol("findUpStop"),Au=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g;var Xi=Object.defineProperty,Yi=x((e,t)=>Xi(e,"name",{value:t,configurable:!0}),"t$a"),Qi=Object.defineProperty,ea=Yi((e,t)=>Qi(e,"name",{value:t,configurable:!0}),"t"),ta=Object.defineProperty,ra=ea((e,t)=>ta(e,"name",{value:t,configurable:!0}),"n");const Fr=ra(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var na=Object.defineProperty,oa=x((e,t)=>na(e,"name",{value:t,configurable:!0}),"i$9"),sa=Object.defineProperty,ia=oa((e,t)=>sa(e,"name",{value:t,configurable:!0}),"r"),aa=Object.defineProperty,ca=ia((e,t)=>aa(e,"name",{value:t,configurable:!0}),"i");const Cn=ca(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var la=Object.defineProperty,ua=x((e,t)=>la(e,"name",{value:t,configurable:!0}),"i$8"),fa=Object.defineProperty,Oo=ua((e,t)=>fa(e,"name",{value:t,configurable:!0}),"s");const pa=Me(import.meta.url),wr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,da=Oo(e=>{if(typeof wr<"u"&&wr.versions&&wr.versions.node){const[t,o]=wr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return wr.getBuiltinModule(e)}return pa(e)},"__cjs_getBuiltinModule"),{lstatSync:Bn,mkdirSync:ga}=da("node:fs");var ha=Object.defineProperty,ma=Oo((e,t)=>ha(e,"name",{value:t,configurable:!0}),"o");const Wr=ma(e=>{Fr(e);try{const t=Bn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Cn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{ga(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const o=Bn(e);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Cn(o))}'`,{cause:t})}},"ensureDirSync");var ba=Object.defineProperty,ya=x((e,t)=>ba(e,"name",{value:t,configurable:!0}),"$e"),$a=Object.defineProperty,dn=ya((e,t)=>$a(e,"name",{value:t,configurable:!0}),"W"),va=Object.defineProperty,v=dn((e,t)=>va(e,"name",{value:t,configurable:!0}),"u$1");let Nn=v(()=>{var e=(()=>{var t=Object.defineProperty,o=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,p=v((r,n)=>{for(var s in n)t(r,s,{get:n[s],enumerable:!0})},"ne"),m=v((r,n,s,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of c(n))!u.call(r,i)&&i!==s&&t(r,i,{get:v(()=>n[i],"get"),enumerable:!(a=o(n,i))||a.enumerable});return r},"ae"),h=v(r=>m(t({},"__esModule",{value:!0}),r),"oe"),j={};p(j,{zeptomatch:v(()=>Ee,"zeptomatch")});var E=v(r=>{const n=new Set,s=[r];for(let a=0;a<s.length;a++){const i=s[a];if(n.has(i))continue;n.add(i);const{children:l}=i;if(l?.length)for(let f=0,g=l.length;f<g;f++)s.push(l[f])}return Array.from(n)},"M"),P=v(r=>{let n="";const s=E(r);for(let a=0,i=s.length;a<i;a++){const l=s[a];if(!l.regex)continue;const f=l.regex.flags;if(n||(n=f),n!==f)throw new Error(`Inconsistent RegExp flags used: "${n}" and "${f}"`)}return n},"se"),O=v((r,n,s)=>{const a=s.get(r);if(a!==void 0)return a;const i=r.partial??n;let l="";if(r.regex&&(l+=i?"(?:$|":"",l+=r.regex.source),r.children?.length){const f=T(r.children.map(g=>O(g,n,s)).filter(Boolean));if(f?.length){const g=r.children.some(U=>!U.regex||!(U.partial??n)),w=f.length>1||i&&(!l.length||g);l+=w?i?"(?:$|":"(?:":"",l+=f.join("|"),l+=w?")":""}}return r.regex&&(l+=i?")":""),s.set(r,l),l},"O"),B=v((r,n)=>{const s=new Map,a=E(r);for(let i=a.length-1;i>=0;i--){const l=O(a[i],n,s);if(!(i>0))return l}return""},"ie"),T=v(r=>Array.from(new Set(r)),"ue"),k=v((r,n,s)=>k.compile(r,s).test(n),"R");k.compile=(r,n)=>{const s=n?.partial??!1,a=B(r,s),i=P(r);return new RegExp(`^(?:${a})$`,i)};var G=k,X=v((r,n)=>{const s=G.compile(r,n),a=`${s.source.slice(0,-1)}[\\\\/]?$`,i=s.flags;return new RegExp(a,i)},"le"),se=X,Ce=v(r=>{const n=r.map(a=>a.source).join("|")||"$^",s=r[0]?.flags;return new RegExp(n,s)},"ve"),Be=Ce,Q=v(r=>Array.isArray(r),"j"),I=v(r=>typeof r=="function","_"),Ne=v(r=>r.length===0,"he"),Ie=(()=>{const{toString:r}=Function.prototype,n=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return s=>(s.length===0||s.length===1)&&n.test(r.call(s))})(),Ye=v(r=>typeof r=="number","de"),Qe=v(r=>typeof r=="object"&&r!==null,"xe"),et=v(r=>r instanceof RegExp,"me"),tt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return n=>r.test(n.source)})(),rt=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return n=>r.test(n.source)&&!n.flags.includes("i")})(),fe=v(r=>typeof r=="string","A"),z=v(r=>r===void 0,"f"),nt=v(r=>{const n=new Map;return s=>{const a=n.get(s);if(a!==void 0)return a;const i=r(s);return n.set(s,i),i}},"ye"),pe=v((r,n,s={})=>{const a={cache:{},input:r,index:0,indexBacktrackMax:0,options:s,output:[]},i=M(n)(a),l=Math.max(a.index,a.indexBacktrackMax);if(i&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${l}`)},"I"),d=v((r,n)=>Q(r)?ot(r,n):fe(r)?de(r,n):st(r,n),"i"),ot=v((r,n)=>{const s={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: "${a}"`);const i=a.charCodeAt(0);s[i]=!0}return a=>{const i=a.input;let l=a.index,f=l;for(;f<i.length&&i.charCodeAt(f)in s;)f+=1;if(f>l){if(!z(n)&&!a.options.silent){const g=i.slice(l,f),w=I(n)?n(g,i,`${l}`):n;z(w)||a.output.push(w)}a.index=f}return!0}},"we"),st=v((r,n)=>{if(rt(r))return de(r.source,n);{const s=r.source,a=r.flags.replace(/y|$/,"y"),i=new RegExp(s,a);return tt(r)&&I(n)&&!Ie(n)?it(i,n):at(i,n)}},"$e"),it=v((r,n)=>s=>{const a=s.index,i=s.input;r.lastIndex=a;const l=r.exec(i);if(l){const f=r.lastIndex;if(!s.options.silent){const g=n(...l,i,`${a}`);z(g)||s.output.push(g)}return s.index=f,!0}else return!1},"Ee"),at=v((r,n)=>s=>{const a=s.index,i=s.input;if(r.lastIndex=a,r.test(i)){const l=r.lastIndex;if(!z(n)&&!s.options.silent){const f=I(n)?n(i.slice(a,l),i,`${a}`):n;z(f)||s.output.push(f)}return s.index=l,!0}else return!1},"Ce"),de=v((r,n)=>s=>{const a=s.index,i=s.input;if(i.startsWith(r,a)){if(!z(n)&&!s.options.silent){const l=I(n)?n(r,i,`${a}`):n;z(l)||s.output.push(l)}return s.index+=r.length,!0}else return!1},"F"),ee=v((r,n,s,a)=>{const i=M(r),l=n>1;return re(te(he(f=>{let g=0;for(;g<s;){const w=f.index;if(!i(f)||(g+=1,f.index===w))break}return g>=n},l),a))},"k"),ge=v((r,n)=>ee(r,0,1,n),"L"),J=v((r,n)=>ee(r,0,1/0,n),"$"),ct=v((r,n)=>ee(r,1,1/0,n),"Re"),R=v((r,n)=>{const s=r.map(M);return re(te(he(a=>{for(let i=0,l=s.length;i<l;i++)if(!s[i](a))return!1;return!0}),n))},"x"),A=v((r,n)=>{const s=r.map(M);return re(te(a=>{for(let i=0,l=s.length;i<l;i++)if(s[i](a))return!0;return!1},n))},"p"),he=v((r,n=!0,s=!1)=>{const a=M(r);return n?i=>{const l=i.index,f=i.output.length,g=a(i);return!g&&!s&&(i.indexBacktrackMax=Math.max(i.indexBacktrackMax,i.index)),(!g||s)&&(i.index=l,i.output.length!==f&&(i.output.length=f)),g}:a},"q"),te=v((r,n)=>{const s=M(r);return n?a=>{if(a.options.silent)return s(a);const i=a.output.length;if(s(a)){const l=a.output.splice(i,1/0),f=n(l);return z(f)||a.output.push(f),!0}else return!1}:s},"B"),re=(()=>{let r=0;return n=>{const s=M(n),a=r+=1;return i=>{var l;if(i.options.memoization===!1)return s(i);const f=i.index,g=(l=i.cache)[a]||(l[a]={indexMax:-1,queue:[]}),w=g.queue;if(f<=g.indexMax){const q=g.store||(g.store=new Map);if(w.length){for(let F=0,pr=w.length;F<pr;F+=2){const dr=w[F*2],gr=w[F*2+1];q.set(dr,gr)}w.length=0}const S=q.get(f);if(S===!1)return!1;if(Ye(S))return i.index=S,!0;if(S)return i.index=S.index,S.output?.length&&i.output.push(...S.output),!0}const U=i.output.length,fr=s(i);if(g.indexMax=Math.max(g.indexMax,f),fr){const q=i.index,S=i.output.length;if(S>U){const F=i.output.slice(U,S);w.push(f,{index:q,output:F})}else w.push(f,q);return!0}else return w.push(f,!1),!1}}})(),me=v(r=>{let n;return s=>(n||(n=M(r())),n(s))},"G"),M=nt(r=>{if(I(r))return Ne(r)?me(r):r;if(fe(r)||et(r))return d(r);if(Q(r))return R(r);if(Qe(r))return A(Object.values(r));throw new Error("Invalid rule")}),C=v(r=>r,"d"),lt=v(r=>typeof r=="string","ke"),ut=v(r=>{const n=new WeakMap,s=new WeakMap;return(a,i)=>{const l=i?.partial?s:n,f=l.get(a);if(f!==void 0)return f;const g=r(a,i);return l.set(a,g),g}},"Be"),ft=v(r=>{const n={},s={};return(a,i)=>{const l=i?.partial?s:n;return l[a]??(l[a]=r(a,i))}},"Pe"),pt=d(/\\./,C),dt=d(/./,C),gt=d(/\*\*\*+/,"*"),ht=d(/([^/{[(!])\*\*/,(r,n)=>`${n}*`),mt=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,n)=>`${n}*`),bt=J(A([pt,gt,ht,mt,dt])),yt=bt,$t=v(r=>pe(r,yt,{memoization:!1}).join(""),"Ie"),vt=$t,be="abcdefghijklmnopqrstuvwxyz",xt=v(r=>{let n="";for(;r>0;){const s=(r-1)%26;n=be[s]+n,r=Math.floor((r-1)/26)}return n},"Le"),ye=v(r=>{let n=0;for(let s=0,a=r.length;s<a;s++)n=n*26+be.indexOf(r[s])+1;return n},"V"),ne=v((r,n)=>{if(n<r)return ne(n,r);const s=[];for(;r<=n;)s.push(r++);return s},"b"),wt=v((r,n,s)=>ne(r,n).map(a=>String(a).padStart(s,"0")),"qe"),$e=v((r,n)=>ne(ye(r),ye(n)).map(xt),"W"),y=v(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),L=v(r=>({children:r}),"y"),D=(()=>{const r=v((n,s,a)=>{if(a.has(n))return;a.add(n);const{children:i}=n;if(!i.length)i.push(s);else for(let l=0,f=i.length;l<f;l++)r(i[l],s,a)},"e");return n=>{if(!n.length)return L([]);for(let s=n.length-1;s>=1;s--){const a=new Set,i=n[s-1],l=n[s];r(i,l,a)}return n[0]}})(),_=v(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),jt=d(/\\./,y),Ot=d(/[$.*+?^(){}[\]\|]/,r=>y(`\\${r}`)),Pt=d(/[\\\/]/,_),kt=d(/[^$.*+?^(){}[\]\|\\\/]+/,y),Et=d(/^(?:!!)*!(.*)$/,(r,n)=>y(`(?!^${Ee.compile(n).source}$).*?`)),At=d(/^(!!)+/),St=A([Et,At]),zt=d(/\/(\*\*\/)+/,()=>L([D([_(),y(".+?"),_()]),_()])),Mt=d(/^(\*\*\/)+/,()=>L([y("^"),D([y(".*?"),_()])])),_t=d(/\/(\*\*)$/,()=>L([D([_(),y(".*?")]),y("$")])),Tt=d(/\*\*/,()=>y(".*?")),ve=A([zt,Mt,_t,Tt]),Ct=d(/\*\/(?!\*\*\/|\*$)/,()=>D([y("[^\\\\/]*?"),_()])),Bt=d(/\*/,()=>y("[^\\\\/]*")),xe=A([Ct,Bt]),we=d("?",()=>y("[^\\\\/]")),Nt=d("[",C),It=d("]",C),Rt=d(/[!^]/,"^\\\\/"),Dt=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,C),Ft=d(/\\./,C),Wt=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),Lt=d(/[\\\/]/,"\\\\/"),Ut=d(/[^$.*+?^(){}[\]\|\\\/]+/,C),qt=A([Ft,Wt,Lt,Dt,Ut]),je=R([Nt,ge(Rt),J(qt),It],r=>y(r.join(""))),Zt=d("{","(?:"),Vt=d("}",")"),Gt=d(/(\d+)\.\.(\d+)/,(r,n,s)=>wt(+n,+s,Math.min(n.length,s.length)).join("|")),Jt=d(/([a-z]+)\.\.([a-z]+)/,(r,n,s)=>$e(n,s).join("|")),Ht=d(/([A-Z]+)\.\.([A-Z]+)/,(r,n,s)=>$e(n.toLowerCase(),s.toLowerCase()).join("|").toUpperCase()),Kt=A([Gt,Jt,Ht]),Oe=R([Zt,Kt,Vt],r=>y(r.join(""))),Xt=d("{"),Yt=d("}"),Qt=d(","),er=d(/\\./,y),tr=d(/[$.*+?^(){[\]\|]/,r=>y(`\\${r}`)),rr=d(/[\\\/]/,_),nr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,y),or=me(()=>ke),sr=d("",()=>y("(?:)")),ir=ct(A([ve,xe,we,je,Oe,or,er,tr,rr,nr]),D),Pe=A([ir,sr]),ke=R([Xt,ge(R([Pe,J(R([Qt,Pe]))])),Yt],L),ar=J(A([St,ve,xe,we,je,Oe,ke,jt,Ot,Pt,kt]),D),cr=ar,lr=v(r=>pe(r,cr,{memoization:!1})[0],"kr"),ur=lr,oe=v((r,n,s)=>oe.compile(r,s).test(n),"N");oe.compile=(()=>{const r=ft((s,a)=>se(ur(vt(s)),a)),n=ut((s,a)=>Be(s.map(i=>r(i,a))));return(s,a)=>lt(s)?r(s,a):n(s,a)})();var Ee=oe;return h(j)})();return e.default||e},"_lazyMatch"),Yr;const xa=v((e,t)=>(Yr||(Yr=Nn(),Nn=null),Yr(e,t)),"default");var wa=Object.defineProperty,ja=dn((e,t)=>wa(e,"name",{value:t,configurable:!0}),"t$1");const Oa=/^[A-Z]:\//i,ae=ja((e="")=>e&&e.replaceAll("\\","/").replace(Oa,t=>t.toUpperCase()),"normalizeWindowsPath");var Pa=Object.defineProperty,K=dn((e,t)=>Pa(e,"name",{value:t,configurable:!0}),"r");const ka=/^[/\\]{2}/,Ea=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Po=/^[A-Z]:$/i,In=/^\/([A-Z]:)?$/i,Aa=/.(\.[^./]+)$/,Sa=/^[/\\]|^[a-z]:[/\\]/i,za=/\/$/,Ma=/^win/i,_a=K(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Su="/",zu=Ma.test(globalThis.process?.platform??"")?";":":",ko=K((e,t)=>{let o="",c=0,u=-1,p=0,m;for(let h=0;h<=e.length;++h){if(h<e.length)m=e[h];else{if(m==="/")break;m="/"}if(m==="/"){if(!(u===h-1||p===1))if(p===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const j=o.lastIndexOf("/");j===-1?(o="",c=0):(o=o.slice(0,j),c=o.length-1-o.lastIndexOf("/")),u=h,p=0;continue}else if(o.length>0){o="",c=0,u=h,p=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(u+1,h)}`:o=e.slice(u+1,h),c=h-u-1;u=h,p=0}else m==="."&&p!==-1?++p:p=-1}return o},"normalizeString"),De=K(e=>Ea.test(e),"isAbsolute"),Eo=K(function(e){if(e.length===0)return".";e=ae(e);const t=ka.exec(e),o=De(e),c=e.at(-1)==="/";return e=ko(e,!o),e.length===0?o?"/":c?"./":".":(c&&(e+="/"),Po.test(e)&&(e+="/"),t?o?`//${e}`:`//./${e}`:o&&!De(e)?`/${e}`:e)},"normalize"),Z=K((...e)=>{let t="";for(const o of e)if(o)if(t.length>0){const c=t.at(-1)==="/",u=o[0]==="/";c&&u?t+=o.slice(1):t+=c||u?o:`/${o}`}else t+=o;return Eo(t)},"join"),rn=K(function(...e){e=e.map(c=>ae(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const u=c>=0?e[c]:_a();!u||u.length===0||(t=`${u}/${t}`,o=De(u))}return t=ko(t,!o),o&&!De(t)?`/${t}`:t.length>0?t:"."},"resolve");K(function(e){return ae(e)},"toNamespacedPath");const Ao=K(function(e){return Aa.exec(ae(e))?.[1]??""},"extname"),Mu=K(function(e,t){const o=rn(e).replace(In,"$1").split("/"),c=rn(t).replace(In,"$1").split("/");if(c[0][1]===":"&&o[0][1]===":"&&o[0]!==c[0])return c.join("/");const u=[...o];for(const p of u){if(c[0]!==p)break;o.shift(),c.shift()}return[...o.map(()=>".."),...c].join("/")},"relative"),Xe=K(e=>{const t=ae(e).replace(za,"").split("/").slice(0,-1);return t.length===1&&Po.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(De(e)?"/":".")},"dirname");K(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return ae(e.root?rn(...t):t.join("/"))},"format");const Ta=K((e,t)=>{const o=ae(e).split("/").pop();return t&&o.endsWith(t)?o.slice(0,-t.length):o},"basename"),_u=K(function(e){const t=Sa.exec(e)?.[0]?.replaceAll("\\","/")??"",o=Ta(e),c=Ao(o);return{base:o,dir:Xe(e),ext:c,name:o.slice(0,o.length-c.length),root:t}},"parse");K((e,t)=>xa(t,Eo(e)),"matchesGlob");var Ca=Object.defineProperty,We=x((e,t)=>Ca(e,"name",{value:t,configurable:!0}),"n$5"),Ba=Object.defineProperty,ue=We((e,t)=>Ba(e,"name",{value:t,configurable:!0}),"a");const Na=Me(import.meta.url),jr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ia=ue(e=>{if(typeof jr<"u"&&jr.versions&&jr.versions.node){const[t,o]=jr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return jr.getBuiltinModule(e)}return Na(e)},"__cjs_getBuiltinModule"),{fileURLToPath:Ra}=Ia("node:url");var Da=Object.defineProperty,Je=ue((e,t)=>Da(e,"name",{value:t,configurable:!0}),"t$1");function Lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(Lr,"m$4");We(Lr,"d");ue(Lr,"getDefaultExportFromCjs");Je(Lr,"getDefaultExportFromCjs");function gn(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(gn,"h$2");We(gn,"O");ue(gn,"getDefaultExportFromNamespaceIfPresent");Je(gn,"getDefaultExportFromNamespaceIfPresent");function hn(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}x(hn,"x$3");We(hn,"P");ue(hn,"getDefaultExportFromNamespaceIfNotNamed");Je(hn,"getDefaultExportFromNamespaceIfNotNamed");function mn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=Je(ue(We(x(function c(){var u=!1;try{u=this instanceof c}catch{}return u?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"a"),"s"),"a"),"a");o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(c){var u=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(o,c,u.get?u:{enumerable:!0,get:Je(function(){return e[c]},"get")})}),o}x(mn,"y$3");We(mn,"_");ue(mn,"getAugmentedNamespace");Je(mn,"getAugmentedNamespace");var Rn,Dn;function bn(){return Dn||(Dn=1,Rn=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Rn}x(bn,"w$2");We(bn,"k");ue(bn,"requireBinaryExtensions");var Fa=bn();const Wa=Lr(Fa);var La=Object.defineProperty,ce=ue((e,t)=>La(e,"name",{value:t,configurable:!0}),"r");const Ua=new Set(Wa),qa=new Set(["/","\\",void 0]),Fn=Symbol.for("pathe:normalizedAlias"),Za=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Va=ce((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),Ir=ce((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),So=ce(e=>{if(e[Fn])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([o],[c])=>Va(o,c)));for(const o in t)for(const c in t)c===o||o.startsWith(c)||t[o].startsWith(c)&&qa.has(t[o][c.length])&&(t[o]=t[c]+t[o].slice(c.length));return Object.defineProperty(t,Fn,{enumerable:!1,value:!0}),t},"normalizeAliases");ce((e,t)=>{e=ae(e),t=So(t);for(const[o,c]of Object.entries(t)){if(!e.startsWith(o))continue;const u=Ir(o)?o.slice(0,-1):o;if(Ir(e[u.length]))return Z(c,e.slice(o.length))}return e},"resolveAlias");ce(e=>Za.exec(e)?.[2],"filename");ce((e,t)=>{e=ae(e),t=So(t);for(const[o,c]of Object.entries(t).toReversed()){if(!e.startsWith(c))continue;const u=Ir(c)?c.slice(0,-1):c;if(Ir(e[u.length]))return Z(o,e.slice(c.length))}return e},"reverseResolveAlias");const Ga=/^(?:\.?\.[/\\]|\.\.\B)/,Ja=/^(?:msys|cygwin)$/;ce(e=>Ga.test(e)||e==="..","isRelative");ce(e=>Ua.has(Ao(e).slice(1).toLowerCase()),"isBinaryPath");const Ur=ce(e=>ae(e instanceof URL?Ra(e):e),"toPath");ce(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:Ja.test(e)},"isWindows");var Ha=Object.defineProperty,zo=x((e,t)=>Ha(e,"name",{value:t,configurable:!0}),"t$8"),Ka=Object.defineProperty,yn=zo((e,t)=>Ka(e,"name",{value:t,configurable:!0}),"t");const Xa=Me(import.meta.url),Or=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ya=yn(e=>{if(typeof Or<"u"&&Or.versions&&Or.versions.node){const[t,o]=Or.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Or.getBuiltinModule(e)}return Xa(e)},"__cjs_getBuiltinModule"),{accessSync:Qa}=Ya("node:fs");var ec=Object.defineProperty,tc=yn((e,t)=>ec(e,"name",{value:t,configurable:!0}),"o");function V(e,t=tn){Fr(e),e=Ur(e);try{return Qa(e,t),!0}catch{return!1}}x(V,"i$6");zo(V,"d");yn(V,"m");tc(V,"isAccessibleSync");var rc=Object.defineProperty,Mo=x((e,t)=>rc(e,"name",{value:t,configurable:!0}),"t$7"),nc=Object.defineProperty,_o=Mo((e,t)=>nc(e,"name",{value:t,configurable:!0}),"t"),oc=Object.defineProperty,sc=_o((e,t)=>oc(e,"name",{value:t,configurable:!0}),"o");let Wn=class extends Error{static{x(this,"c")}static{Mo(this,"i")}static{_o(this,"n")}static{sc(this,"PermissionError")}constructor(t){super(`EPERM: Operation not permitted, ${t}`)}get code(){return"EPERM"}set code(t){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(t){throw new Error("Cannot overwrite name of PermissionError")}};var ic=Object.defineProperty,ac=x((e,t)=>ic(e,"name",{value:t,configurable:!0}),"a$5"),cc=Object.defineProperty,To=ac((e,t)=>cc(e,"name",{value:t,configurable:!0}),"i");const lc=Me(import.meta.url),Pr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Co=To(e=>{if(typeof Pr<"u"&&Pr.versions&&Pr.versions.node){const[t,o]=Pr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Pr.getBuiltinModule(e)}return lc(e)},"__cjs_getBuiltinModule"),{readFileSync:uc}=Co("node:fs"),{unzipSync:fc,brotliDecompressSync:pc}=Co("node:zlib");var dc=Object.defineProperty,Bo=To((e,t)=>dc(e,"name",{value:t,configurable:!0}),"r");const gc={brotli:pc,gzip:fc,none:Bo(e=>e,"none")},hc=Bo((e,t)=>{if(Fr(e),e=Ur(e),!V(e))throw new Wn(`unable to read the non-accessible file: ${e}`);if(!V(e,jo))throw new Wn(`invalid access to read file at: ${e}`);const{buffer:o,compression:c,encoding:u,flag:p}=t??{},m=uc(e,p?{encoding:u,flag:p}:{encoding:u}),h=gc[c??"none"],j=h(m);return o?j:j.toString()},"readFileSync");var mc=Object.defineProperty,bc=x((e,t)=>mc(e,"name",{value:t,configurable:!0}),"x$2"),yc=Object.defineProperty,No=bc((e,t)=>yc(e,"name",{value:t,configurable:!0}),"$"),$c=Object.defineProperty,vc=No((e,t)=>$c(e,"name",{value:t,configurable:!0}),"A"),xc=Object.defineProperty,$n=vc((e,t)=>xc(e,"name",{value:t,configurable:!0}),"$"),wc=Object.defineProperty,jc=$n((e,t)=>wc(e,"name",{value:t,configurable:!0}),"r$1");const Oc=jc(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
+
`),"normalizeLF"),Pc=globalThis.process??Object.create(null),Ln={versions:{}},Un=new Proxy(Pc,{get(e,t){if(t in e)return e[t];if(t in Ln)return Ln[t]}});var kc=Object.defineProperty,Ec=$n((e,t)=>kc(e,"name",{value:t,configurable:!0}),"b");const Ac=Ec((e,t,o,c)=>{const u={column:0,line:-1,...e.start},p={...u,...e.end},m=u.line,h=u.column,j=p.line,E=p.column;let P=Math.max(m-(o+1),0),O=Math.min(t.length,j+c);m===-1&&(P=0),j===-1&&(O=t.length);const B=j-m,T={};if(B)for(let k=0;k<=B;k++){const G=k+m;if(!h)T[G]=!0;else if(k===0){const X=t[G-1]?.length;T[G]=[h,(X??0)-h+1]}else if(k===B)T[G]=[0,E];else{const X=t[G-k]?.length;T[G]=[0,X]}}else h===E?T[m]=h?[h,0]:!0:T[m]=[h,(E??0)-(h??0)];return{end:O,markerLines:T,start:P}},"getMarkerLines");var Sc=Object.defineProperty,Cr=$n((e,t)=>Sc(e,"name",{value:t,configurable:!0}),"t");const zc=Un.platform==="win32"&&!Un.env?.WT_SESSION?">":"❯",Mc=Cr((e,t,o)=>{const c={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...o,color:{gutter:Cr(k=>k,"gutter"),marker:Cr(k=>k,"marker"),message:Cr(k=>k,"message"),...o?.color}},u=typeof t.start.column=="number";let p=Oc(e).split(`
|
|
3
|
+
`);typeof c.tabWidth=="number"&&(p=p.map(k=>k.replaceAll(" "," ".repeat(c.tabWidth))));const{end:m,markerLines:h,start:j}=Ac(t,p,c.linesAbove,c.linesBelow),E=String(m).length,{gutter:P,marker:O,message:B}=c.color;let T=p.slice(j,m).map((k,G)=>{const X=j+1+G,se=h[X],Ce=` ${String(X)}`.slice(-E),Be=!h[X+1],Q=` ${Ce}${c.showGutter?" |":""}`;if(se){let I="";if(Array.isArray(se)){const Ne=k.replaceAll(/[^\t]/g," ").slice(0,Math.max(se[0]-1,0)),Ie=se[1]||1;I=[`
|
|
4
|
+
`,c.prefix+P(Q.replaceAll(/\d/g," "))," ",Ne,O("^").repeat(Ie)].join(""),Be&&c.message&&(I+=` ${B(c.message)}`)}return[c.prefix+O(zc),P(Q),k.length>0?` ${k}`:"",I].join("")}return`${c.prefix} ${P(Q)}${k.length>0?` ${k}`:""}`}).join(`
|
|
5
|
+
`);return c.message&&!u&&(T=`${c.prefix+" ".repeat(E+1)+c.message}
|
|
6
|
+
${T}`),T},"codeFrame");var _c=Object.defineProperty,Tc=No((e,t)=>_c(e,"name",{value:t,configurable:!0}),"s"),Cc=Object.defineProperty,Bc=Tc((e,t)=>Cc(e,"name",{value:t,configurable:!0}),"o"),Nc=Object.defineProperty,vn=Bc((e,t)=>Nc(e,"name",{value:t,configurable:!0}),"l");const qn=vn((e,t)=>{let o=0,c=t.length-2;for(;o<c;){const u=o+(c-o>>1);if(e<t[u])c=u-1;else if(e>=t[u+1])o=u+1;else{o=u;break}}return o},"binarySearch"),Ic=/\n|\r(?!\n)/,Rc=vn(e=>e.split(Ic).reduce((t,o)=>(t.push(t.at(-1)+o.length+1),t),[0]),"getLineStartIndexes"),Dc=vn((e,t,o)=>{const c=o?.skipChecks??!1;if(!c&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!c&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const p=Rc(e),m=qn(t,p);return{column:t-p[m]+1,line:m+1}}const u=qn(t,e);return{column:t-e[u]+1,line:u+1}},"indexToLineColumn");var Fc=Object.defineProperty,Io=x((e,t)=>Fc(e,"name",{value:t,configurable:!0}),"t$6"),Wc=Object.defineProperty,Ro=Io((e,t)=>Wc(e,"name",{value:t,configurable:!0}),"t"),Lc=Object.defineProperty,Uc=Ro((e,t)=>Lc(e,"name",{value:t,configurable:!0}),"i");let qc=class extends Error{static{x(this,"m")}static{Io(this,"m")}static{Ro(this,"t")}static{Uc(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
7
|
+
|
|
8
|
+
${this.codeFrame}
|
|
9
|
+
`:""}`}set message(t){this.#e=t}};var Zc=Object.defineProperty,Do=x((e,t)=>Zc(e,"name",{value:t,configurable:!0}),"u$3"),Vc=Object.defineProperty,Fo=Do((e,t)=>Vc(e,"name",{value:t,configurable:!0}),"s"),Gc=Object.defineProperty,Mr=Fo((e,t)=>Gc(e,"name",{value:t,configurable:!0}),"a");const Jc=Mr(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Hc=Mr((e,t,o)=>Mc(e,{start:t},{tabWidth:!1,...o}),"generateCodeFrame"),Kc=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Xc=Mr((e,t)=>{const o=Kc.exec(t);if(!o)return;const[,c,u,p]=o;if(u&&p)return{column:Number(p),line:Number(u)};let m=Number(c);return m===e.length&&(m=e.length-1),Dc(e,m)},"getErrorLocation"),Yc=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Qc=Mr(e=>e.replace(Yc,(t,o,c)=>`"${c}"(${Jc(c)})`),"addCodePointToUnexpectedToken");function qr(e,t,o,c){typeof t=="string"&&(typeof o=="object"&&(c=o),o=t,t=void 0);let u;try{return JSON.parse(e,t)}catch(h){u=h.message}let p;e?(p=Xc(e,u),u=Qc(u)):u+=" while parsing empty string";const m=new qc(u);throw m.fileName=o,p&&(m.codeFrame=Hc(e,p,c)),m}x(qr,"d$3");Do(qr,"w");Fo(qr,"E");Mr(qr,"parseJson");var el=Object.defineProperty,Wo=x((e,t)=>el(e,"name",{value:t,configurable:!0}),"t$5"),tl=Object.defineProperty,Lo=Wo((e,t)=>tl(e,"name",{value:t,configurable:!0}),"t"),rl=Object.defineProperty,nl=Lo((e,t)=>rl(e,"name",{value:t,configurable:!0}),"r");function _r(e,t,o){typeof t=="object"&&(o=t,t=void 0);const c=hc(e,{buffer:!0,encoding:void 0});let u=new TextDecoder().decode(c);const{beforeParse:p,color:m}=o??{};return typeof p=="function"&&(u=p(u)),qr(u,t,Ur(e),{color:m})}x(_r,"n$3");Wo(_r,"s");Lo(_r,"J");nl(_r,"readJsonSync");var ol=Object.defineProperty,sl=x((e,t)=>ol(e,"name",{value:t,configurable:!0}),"a$3"),il=Object.defineProperty,al=sl((e,t)=>il(e,"name",{value:t,configurable:!0}),"t"),cl=Object.defineProperty,ll=al((e,t)=>cl(e,"name",{value:t,configurable:!0}),"e");const ul=ll(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");var fl=Object.defineProperty,pl=x((e,t)=>fl(e,"name",{value:t,configurable:!0}),"t$3"),dl=Object.defineProperty,gl=pl((e,t)=>dl(e,"name",{value:t,configurable:!0}),"r"),hl=Object.defineProperty,ml=gl((e,t)=>hl(e,"name",{value:t,configurable:!0}),"f");const bl=new TextEncoder,yl=ml(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return bl.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");var $l=Object.defineProperty,vl=x((e,t)=>$l(e,"name",{value:t,configurable:!0}),"m"),xl=Object.defineProperty,Uo=vl((e,t)=>xl(e,"name",{value:t,configurable:!0}),"s");const wl=Me(import.meta.url),kr=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jl=Uo(e=>{if(typeof kr<"u"&&kr.versions&&kr.versions.node){const[t,o]=kr.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return kr.getBuiltinModule(e)}return wl(e)},"__cjs_getBuiltinModule"),{mkdirSync:Ol,writeFileSync:Pl,statSync:kl,renameSync:Zn,chownSync:El,chmodSync:Al,unlinkSync:Sl}=jl("node:fs");var zl=Object.defineProperty,Ml=Uo((e,t)=>zl(e,"name",{value:t,configurable:!0}),"f");const _l=Ml((e,t,o)=>{o={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...o},Fr(e),ul(t),e=Ur(e);const c=`${e}.tmp`;try{const u=V(e,tn);if(!u&&o.recursive){const m=Xe(e);V(m,tn)||Ol(m,{recursive:!0})}let p;if(Pl(c,yl(t),{encoding:o.encoding,flag:o.flag}),u&&!o.overwrite&&(p=kl(e),o.chown??={gid:p.gid,uid:p.uid},Zn(e,`${e}.bak`)),o.chown)try{El(c,o.chown.uid,o.chown.gid)}catch{}Al(c,p&&!o.mode?p.mode:o.mode??438),Zn(c,e)}catch(u){throw new Error(`Failed to write file at: ${e} - ${u.message}`,{cause:u})}finally{V(c)&&Sl(`${e}.tmp`)}},"writeFileSync");var Tl=Object.defineProperty,_e=x((e,t)=>Tl(e,"name",{value:t,configurable:!0}),"i$1"),Cl=Object.defineProperty,Te=_e((e,t)=>Cl(e,"name",{value:t,configurable:!0}),"s"),Bl=Object.defineProperty,Le=Te((e,t)=>Bl(e,"name",{value:t,configurable:!0}),"i");const Nl=/^(?:( )+|\t+)/,Tr="space";function Sr(e,t,o){return e&&t===Tr&&o===1}x(Sr,"d$1");_e(Sr,"g");Te(Sr,"I");Le(Sr,"shouldIgnoreSingleSpace");function zr(e,t){const o=new Map;let c=0,u,p;for(const m of e.split(/\n/g)){if(!m)continue;const h=m.match(Nl);if(h===null)c=0,u="";else{const j=h[0].length,E=h[1]?Tr:"tab";if(Sr(t,E,j))continue;E!==u&&(c=0),u=E;let P=1,O=0;const B=j-c;if(c=j,B===0)P=0,O=1;else{const k=Math.abs(B);if(Sr(t,E,k))continue;p=Zr(E,k)}const T=o.get(p);o.set(p,T===void 0?[1,0]:[T[0]+P,T[1]+O])}}return o}x(zr,"p$1");_e(zr,"y");Te(zr,"h");Le(zr,"makeIndentsMap");function Zr(e,t){return(e===Tr?"s":"t")+String(t)}x(Zr,"b$2");_e(Zr,"v");Te(Zr,"m");Le(Zr,"encodeIndentsKey");function Vr(e){const t=e[0]==="s"?Tr:"tab",o=Number(e.slice(1));return{type:t,amount:o}}x(Vr,"v");_e(Vr,"M");Te(Vr,"_");Le(Vr,"decodeIndentsKey");function Gr(e){let t,o=0,c=0;for(const[u,[p,m]]of e)(p>o||p===o&&m>c)&&(o=p,c=m,t=u);return t}x(Gr,"I$1");_e(Gr,"S");Te(Gr,"k");Le(Gr,"getMostUsedKey");function Jr(e,t){return(e===Tr?" ":" ").repeat(t)}x(Jr,"h");_e(Jr,"k");Te(Jr,"D");Le(Jr,"makeIndentString");function Hr(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=zr(e,!0);t.size===0&&(t=zr(e,!1));const o=Gr(t);let c,u=0,p="";return o!==void 0&&({type:c,amount:u}=Vr(o),p=Jr(c,u)),{amount:u,type:c,indent:p}}x(Hr,"M$1");_e(Hr,"x");Te(Hr,"C");Le(Hr,"detectIndent");var Il=Object.defineProperty,Rl=x((e,t)=>Il(e,"name",{value:t,configurable:!0}),"a$1"),Dl=Object.defineProperty,qo=Rl((e,t)=>Dl(e,"name",{value:t,configurable:!0}),"i");const Fl=Me(import.meta.url),Er=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wl=qo(e=>{if(typeof Er<"u"&&Er.versions&&Er.versions.node){const[t,o]=Er.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Er.getBuiltinModule(e)}return Fl(e)},"__cjs_getBuiltinModule"),{readFileSync:Ll}=Wl("node:fs");var Ul=Object.defineProperty,ql=qo((e,t)=>Ul(e,"name",{value:t,configurable:!0}),"r");const Zo=ql((e,t,o={})=>{const{detectIndent:c,indent:u,replacer:p,stringify:m=JSON.stringify,...h}={indent:" ",...o};let j=u,E=`
|
|
10
|
+
`;if(V(e,jo))try{const O=Ll(e,"utf8");if(c){const{indent:B}=Hr(O);j=B}E=O.endsWith(`
|
|
11
|
+
`)?`
|
|
12
|
+
`:""}catch(O){if(O.code!=="ENOENT")throw O}const P=m(t,p,j);_l(e,`${P}${E}`,h)},"writeJsonSync");var Zl=Object.defineProperty,Vl=x((e,t)=>Zl(e,"name",{value:t,configurable:!0}),"s");class xn extends Error{static{x(this,"VisConfigError")}static{Vl(this,"VisConfigError")}chain;constructor(t,o,c){super(t,c),this.name=this.constructor.name,this.chain=o}}var Gl=Object.defineProperty,Jl=x((e,t)=>Gl(e,"name",{value:t,configurable:!0}),"e");class Hl extends xn{static{x(this,"VisConfigCycleError")}static{Jl(this,"VisConfigCycleError")}constructor(t,o){const c=[...o,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${c}`,o)}}var Kl=Object.defineProperty,Xl=x((e,t)=>Kl(e,"name",{value:t,configurable:!0}),"t$1");class Vn extends xn{static{x(this,"VisConfigLoadError")}static{Xl(this,"VisConfigLoadError")}constructor(t,o,c){const u=c instanceof Error?c.message:String(c),p=o.length>0?`
|
|
13
|
+
Chain: ${o.join(" → ")}`:"";super(`Failed to load ${t}: ${u}${p}`,o,{cause:c})}}var Yl=Object.defineProperty,Vo=x((e,t)=>Yl(e,"name",{value:t,configurable:!0}),"t");const Ql=Vo(e=>e.join(" → "),"formatChain");class Qr extends xn{static{x(this,"VisConfigNotFoundError")}static{Vo(this,"VisConfigNotFoundError")}constructor(t,o,c){const u=o.length>0?o[o.length-1]:"<unknown>",p=c.length>0?`
|
|
14
|
+
Tried:
|
|
15
|
+
${c.join(`
|
|
16
|
+
`)}`:"";super(`Cannot resolve "${t}" extended from ${u}.${p}
|
|
17
|
+
Chain: ${Ql(o)}`,o)}}var eu=Object.defineProperty,Go=x((e,t)=>eu(e,"name",{value:t,configurable:!0}),"i");const Gn="@inherit",tu=["aliases","dependsOn","inputs","outputs"],ru=Go((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Gn))return[...t];const o=[];for(const c of t){if(c===Gn){e!==void 0&&o.push(...e);continue}o.push(c)}return o},"mergeArrayWithInherit"),nu=Go((e,t)=>{const o={...e,...t};for(const c of tu){const u=e?.[c],p=t?.[c],m=ru(u,p);m===void 0?delete o[c]:o[c]=m}return o},"mergeTargetWithInherit");var ou=Object.defineProperty,N=x((e,t)=>ou(e,"name",{value:t,configurable:!0}),"r");const Jo=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],su=new Set(Jo),Ho=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],iu=new Set(Ho),au={blockExoticSubdeps:!0,strictDepBuilds:!0,trustPolicy:"no-downgrade",trustPolicyIgnoreAfter:43200},cu=N(e=>({...au,...e}),"mergeSecurityDefaults"),nn=N(e=>({...e,security:cu(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),lu=N(e=>{let t;try{t=Hn(e)}catch{return}const o=new Set(t.filter(c=>su.has(c)));for(const c of Jo)if(o.has(c))return Z(e,c)},"findVisConfigFile"),uu=N(e=>{let t;try{t=Hn(e)}catch{return}const o=new Set(t.filter(c=>iu.has(c)));for(const c of Ho)if(o.has(c))return Z(e,c)},"findVisTaskConfigFile"),wn=N(e=>Jn("sha256").update(ts(e)).digest("hex"),"hashFileContents"),fu=N(e=>{const t=Jn("sha256"),o=[...e].sort();for(const c of o)t.update(c),t.update(":"),t.update(wn(c)),t.update(`
|
|
18
|
+
`);return t.digest("hex")},"hashConfigChain"),pu=N(e=>{const t=Z(e,"node_modules");if(V(t)){const c=Z(t,".cache","vis");return Wr(c),Z(c,"vis-config-cache.json")}const o=wo("vis",{create:!0,cwd:e});return o?Z(o,"vis-config-cache.json"):void 0},"getConfigCachePath"),du=N((e,t)=>{if(V(e))try{const o=_r(e);if(o.hash===t)return o.config}catch{}},"readConfigCache"),gu=N((e,t,o)=>{try{Wr(Xe(e)),Zo(e,{config:o,hash:t})}catch{}},"writeConfigCache"),hu=N(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),mu=N((e,t,o)=>{if(De(e))throw new Qr(e,[...o,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const c=[];if(e.startsWith("./")||e.startsWith("../")){const u=Xe(t),p=Z(u,e);if(c.push(p),V(p))return p;throw new Qr(e,[...o,t],c)}try{return Me(t).resolve(e)}catch{throw c.push(`require.resolve("${e}") from ${t}`),new Qr(e,[...o,t],c)}},"resolveExtendsSpecifier"),Ko=N(async(e,t,o)=>{const c=wn(t),u=t.slice(t.lastIndexOf(".")),p=Z(Xe(t),`.vis-config-tmp-${c}${u}`);rs(t,p);let m;try{m=await e.import(p,{default:!0,try:!0})??{}}catch(h){throw new Vn(t,o,h)}finally{try{ns(p)}catch{}}try{return(typeof m=="function"?await m()??{}:m)??{}}catch(h){throw new Vn(t,o,h)}},"loadRawConfig"),bu=N((e,t)=>{const o={...e,...t};if(e.targetDefaults||t.targetDefaults){const c=new Set([...Object.keys(e.targetDefaults??{}),...Object.keys(t.targetDefaults??{})]),u={};for(const p of c)u[p]=nu(e.targetDefaults?.[p],t.targetDefaults?.[p]);o.targetDefaults=u}return(e.taskDefaults||t.taskDefaults)&&(o.taskDefaults=[...e.taskDefaults??[],...t.taskDefaults??[]]),(e.fileGroups||t.fileGroups)&&(o.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(o.taskGroups={...e.taskGroups,...t.taskGroups}),(e.security||t.security)&&(o.security={...e.security,...t.security}),(e.update||t.update)&&(o.update={...e.update,...t.update}),(e.taskRunnerOptions||t.taskRunnerOptions)&&(o.taskRunnerOptions={...e.taskRunnerOptions,...t.taskRunnerOptions}),delete o.extends,o},"mergeVisConfigs"),Xo=N(async(e,t,o,c,u,p)=>{if(c.has(t))throw new Hl(t,o);if(!u.has(t)){c.add(t);try{const m=await Ko(e,t,o),h=hu(m.extends);for(const j of h){const E=mu(j,t,o);await Xo(e,E,[...o,t],c,u,p)}u.set(t,m),p.push(t)}finally{c.delete(t)}}},"resolveConfigChain"),Bu=N(async(e,t)=>{let o;if(t?.explicitConfigPath){const O=De(t.explicitConfigPath)?t.explicitConfigPath:Z(e,t.explicitConfigPath);if(!V(O))throw new Error(`Cannot find config file at ${O}`);o=O}else o=lu(e);if(!o)return nn({});const c=Kn(e,{fsCache:!1,moduleCache:!1}),u=new Set,p=new Map,m=[];await Xo(c,o,[],u,p,m);const h=fu(m),j=pu(e);if(j){const O=du(j,h);if(O)return O}let E={};for(const O of m)E=bu(E,p.get(O));const P=nn(E);return j&&gu(j,h,P),P},"loadVisConfig"),yu=N(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),$u=N((e,t)=>{const o=Z(e,"node_modules"),c=yu(t);if(V(o)){const p=Z(o,".cache","vis","task-configs");return Wr(p),Z(p,`${c}.json`)}const u=wo("vis",{create:!0,cwd:e});return u?Z(u,"task-configs",`${c}.json`):void 0},"getVisTaskCachePath"),vu=N((e,t)=>{if(V(e))try{const o=_r(e);if(o.hash===t)return o.config}catch{}},"readVisTaskCache"),xu=N((e,t,o)=>{try{Wr(Xe(e)),Zo(e,{config:o,hash:t})}catch{}},"writeVisTaskCache"),Nu=N(async(e,t,o)=>{const c=uu(t);if(!c)return;const u=wn(c),p=$u(e,o);if(p){const j=vu(p,u);if(j)return j}const m=Kn(t,{fsCache:!1,moduleCache:!1}),h=await Ko(m,c,[]);return p&&xu(p,u,h),h},"loadVisTaskConfig"),Iu=N(e=>e,"defineTaskConfig"),Ru=N(e=>nn(e),"defineConfig");export{hc as $,nu as A,_l as B,rn as C,wo as D,uu as I,Xe as K,Eo as L,Z as M,au as O,Ta as Q,Ur as U,Bu as X,tn as _,V as a,De as b,zu as c,_u as d,Nu as e,Fr as f,Cn as g,Wr as h,Iu as i,lu as j,Ho as k,nn as l,Eu as m,_r as n,Au as o,Jo as p,Wn as q,Ru as r,jo as s,qr as t,ul as u,yl as v,Zo as w,Hr as x,Su as y,Mu as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var T=Object.defineProperty;var v=(e,t)=>T(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,d as j,c as I,p}from"./bin.js";import{z as _}from"
|
|
1
|
+
var T=Object.defineProperty;var v=(e,t)=>T(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,d as j,c as I,p}from"./bin.js";import{z as _}from"./config.js";import{r as W,a as B,b as L,c as w}from"../packem_shared/ai-fix-CWOz12Om.js";import{l as N}from"../packem_shared/failure-log-CSC6KfcO.js";const A=q(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=v(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[t,r]=m.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return m.getBuiltinModule(e)}return A(e)},"__cjs_getBuiltinModule"),{createInterface:z}=J("node:readline");var M=Object.defineProperty,l=v((e,t)=>M(e,"name",{value:t,configurable:!0}),"c");const U={"ambiguous-match":"ambiguous match",applied:"applied",error:"error","missing-file":"missing file","no-match":"no match","outside-workspace":"outside workspace"},S=l((e,t,r)=>{const o=W(e,t,r),s=_(e,o);return s===""||s.startsWith("..")?o:s},"formatDisplayPath"),E=l((e,t,r)=>{const o=[$(`Fix proposal (${e.provider}, confidence: ${e.confidence})`),"",e.explanation||P("<no explanation>")];if(e.cannotFix)return o.push(""),o.push(R(`Cannot fix automatically: ${e.cannotFix}`)),o.join(`
|
|
2
2
|
`);if(e.patches.length===0)return o.push(""),o.push(R("No patches were proposed.")),o.join(`
|
|
3
3
|
`);o.push(""),o.push($(`Patches (${String(e.patches.length)}):`));for(const[s,i]of e.patches.entries()){const a=S(t,r,i.file);o.push(""),o.push(D(`[${String(s+1)}] ${a}`)),i.reason&&o.push(P(` reason: ${i.reason}`));for(const u of i.oldString.split(`
|
|
4
4
|
`))o.push(j(` - ${u}`));for(const u of i.newString.split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var O=Object.defineProperty;var w=(o,e)=>O(o,"name",{value:e,configurable:!0});import{createTaskGraph as b}from"@visulima/task-runner";import{y as E,m as R}from"./bin.js";import{r as x,f as G}from"../packem_shared/selectors-
|
|
1
|
+
var O=Object.defineProperty;var w=(o,e)=>O(o,"name",{value:e,configurable:!0});import{createTaskGraph as b}from"@visulima/task-runner";import{y as E,m as R}from"./bin.js";import{r as x,f as G}from"../packem_shared/selectors-B2ISH581.js";var J=Object.defineProperty,m=w((o,e)=>J(o,"name",{value:e,configurable:!0}),"u");const P=m((o,e,n)=>{const c=[],t=new Set,l=m((r,f)=>{if(t.has(r))return;t.add(r);const s=e[r]??[];for(const i of s)l(i,f+1);const d=n[r],u=" ".repeat(f);c.push(`${u}${r}${d?.cache===!1?" (no-cache)":""}`)},"walk");for(const r of o)l(r,0);return c},"renderPlan"),S=m((o,e,n)=>({roots:o,tasks:Object.fromEntries(Object.entries(n).map(([c,t])=>[c,{cache:t.cache,dependsOn:e[c]??[],outputs:t.outputs,parallelism:t.parallelism,projectRoot:t.projectRoot,target:t.target}]))}),"toJson"),T=m(async({argument:o,logger:e,options:n,visConfig:c,workspaceRoot:t})=>{const l=o[0];if(!l)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!t)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:r,packageJsons:f,workspace:s}=E(t,c),d=R(t,s,f),u=await x(l,s,process.cwd(),t),{target:i}=u;let h=u.projects;n.query&&(h=G(h,s,n.query));const j=h.filter(p=>s.projects[p]?.targets?.[i]!==void 0);if(j.length===0){e.info(`No projects have a "${i}" target.`);return}const y=j.map(p=>{const k=s.projects[p],g=k.targets?.[i],$={project:p,target:i};return{cache:g?.cache,id:`${p}:${i}`,outputs:g?.outputs??[],overrides:{command:g?.command},parallelism:g?.parallelism,projectRoot:k.root,target:$}}),a=b(y,{projectGraph:d,targetDefaults:r.targetDefaults,workspace:s});if(n.json){e.info(JSON.stringify(S(a.roots,a.dependencies,a.tasks),null,2));return}const v=P(a.roots,a.dependencies,a.tasks);e.info(`Execution plan (${Object.keys(a.tasks).length} task(s), ${a.roots.length} root(s)):`),e.info("");for(const p of v)e.info(p)},"execute");export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var g=Object.defineProperty;var
|
|
1
|
+
var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"./config.js";import{y as v,m as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-B4i5yxtP.js";var E=Object.defineProperty,m=d((t,o)=>E(t,"name",{value:o,configurable:!0}),"f");const C=m(async({argument:t,logger:o,options:s,visConfig:w,workspaceRoot:e})=>{const n=t[0];if(!n)throw new Error("Missing subcommand. Usage: vis docker <scaffold|prune>");if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:k,workspace:c}=v(e,w);if(n==="scaffold"){const a=h(e,c,k),r=s.focus;if(!r)throw new Error("Missing --focus. Pass one or more project names, comma-separated.");const f=r.split(",").map(i=>i.trim()).filter(Boolean);if(f.length===0)throw new Error("--focus resolved to an empty list. Provide at least one project name.");const u=l(e,s.out??".vis/docker"),{projects:p}=j({focus:f,includeSources:!!s.includeSources,log:m(i=>o.info(i),"log"),outDir:u,projectGraph:a,pruneLockfile:s.pruneLockfile!==!1,workspace:c,workspaceRoot:e});o.info(`Scaffolded ${p.length} project(s) into ${u}`),o.info(`Focus closure: ${p.toSorted().join(", ")}`);return}if(n==="prune"){const a=l(e,s.context??".vis/docker"),{removed:r}=x({contextRoot:a,workspace:c,workspaceRoot:e});o.info(`Pruned ${r.length} unfocused project(s)`),r.length>0&&o.debug?.(r.join(`
|
|
2
2
|
`));return}throw new Error(`Unknown subcommand: "${n}". Expected scaffold or prune.`)},"execute");export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=Object.defineProperty;var t=(o,r)=>d(o,"name",{value:r,configurable:!0});import{h as m,P as g}from"./bin.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=t((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const
|
|
1
|
+
var d=Object.defineProperty;var t=(o,r)=>d(o,"name",{value:r,configurable:!0});import{h as m,P as g}from"./bin.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=t((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const x=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:n})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=n??process.cwd(),p=m(l,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),c=g(p,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},l,r);c!==0&&(process.exitCode=c)},"execute");export{x as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as r,
|
|
1
|
+
var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as r,a as u,$ as p,B as $}from"./config.js";import{k as j}from"./bin.js";const b=_(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{rmSync:y}=d("node:fs"),{homedir:n}=d("node:os"),{createInterface:w}=d("node:readline");var T=Object.defineProperty,m=a((e,i)=>T(e,"name",{value:i,configurable:!0}),"l");const f=j(),h=[r(n(),".zshrc"),r(n(),".zshenv"),r(n(),".bashrc"),r(n(),".bash_profile"),r(n(),".profile"),r(n(),".config","fish","config.fish")],M=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
|
|
2
2
|
`),o=l.filter(t=>!t.includes(".vis/bin")&&!t.includes("VIS_HOME")&&!t.includes("# vis "));o.length!==l.length&&($(s,o.join(`
|
|
3
3
|
`)),i.push(s))}catch{e.warn(`warning: could not clean ${s}`)}return i},"cleanShellProfiles"),B=m(async({logger:e,options:i})=>{if(!u(f)){e.info("vis is not installed (no ~/.vis directory found).");return}e.info("This will remove:"),e.info(` ${f}/`);const s=h.filter(o=>u(o)&&p(o).includes(".vis"));for(const o of s)e.info(` Lines in ${o}`);if(!i.yes){if(!process.stdin.isTTY)throw new Error("Non-interactive terminal. Use --yes to confirm.");const o=w({input:process.stdin,output:process.stdout}),t=await new Promise(v=>{o.question(`
|
|
4
4
|
Type "uninstall" to confirm: `,v)});if(o.close(),t.trim()!=="uninstall"){e.info("Aborted.");return}}const l=M(e);for(const o of l)e.info(`Cleaned ${o}`);try{y(f,{force:!0,recursive:!0}),e.info(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=Object.defineProperty;var r=(e,a)=>l(e,"name",{value:a,configurable:!0});import{h as g,
|
|
1
|
+
var l=Object.defineProperty;var r=(e,a)=>l(e,"name",{value:a,configurable:!0});import{h as g,w as d}from"./bin.js";var k=Object.defineProperty,u=r((e,a)=>k(e,"name",{value:a,configurable:!0}),"t");const b=u(async({argument:e,logger:a,options:c,visConfig:s,workspaceRoot:i})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[t,...f]=e,n=i??process.cwd(),p=g(n,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),o=d(p,{fields:f,json:c.json||!1,package:t},n,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{b as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _=Object.defineProperty;var y=(s,e)=>_(s,"name",{value:e,configurable:!0});import{createRequire as C}from"node:module";import{
|
|
1
|
+
var _=Object.defineProperty;var y=(s,e)=>_(s,"name",{value:e,configurable:!0});import{createRequire as C}from"node:module";import{a as g,M as h,B as b,j as O}from"./config.js";import{p as t,I as E,b as x,A as M}from"./bin.js";const T=C(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,S=y(s=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[e,o]=p.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return p.getBuiltinModule(s)}return T(s)},"__cjs_getBuiltinModule"),{execFileSync:B}=S("node:child_process"),{createInterface:I}=S("node:readline");var R=Object.defineProperty,f=y((s,e)=>R(s,"name",{value:e,configurable:!0}),"f");const N=f(s=>{const e=[];return g(h(s,"turbo.json"))&&e.push("turborepo"),g(h(s,"nx.json"))&&e.push("nx"),g(h(s,".moon"))&&e.push("moon"),e},"detectExistingTools"),P=f((s,e)=>new Promise(o=>{s.question(e,n=>{o(n.trim())})}),"ask"),d=f(async(s,e,o=!0)=>{const n=await P(s,`${e} ${o?"[Y/n]":"[y/N]"} `);return n===""?o:n.toLowerCase()==="y"||n.toLowerCase()==="yes"},"confirm"),w=f((s,e)=>{const o=[],n=Object.entries(e.allowBuilds).filter(([,c])=>c).map(([c])=>` "${c}": true,`).join(`
|
|
2
2
|
`);let i=` allowBuilds: ${n?`{
|
|
3
3
|
${n}
|
|
4
4
|
}`:"{}"},`;return e.enableSocket&&(i+=`
|
|
@@ -14,7 +14,7 @@ ${o.join(`
|
|
|
14
14
|
|
|
15
15
|
`)}
|
|
16
16
|
});
|
|
17
|
-
`},"generateConfigContent"),q=
|
|
17
|
+
`},"generateConfigContent"),q=f(async(s,e,o)=>{const n=I({input:process.stdin,output:process.stdout});t.info(`
|
|
18
18
|
vis init — interactive setup
|
|
19
|
-
`);const i=await d(n," Enable Socket.dev security scanning?");i&&(t.success(" Socket.dev enabled — scores, alerts, and supply chain data active."),process.env.VIS_SOCKET_TOKEN||t.notice(" Set VIS_SOCKET_TOKEN for a custom API token (optional).")),t.info("");const
|
|
20
|
-
`);for(const
|
|
19
|
+
`);const i=await d(n," Enable Socket.dev security scanning?");i&&(t.success(" Socket.dev enabled — scores, alerts, and supply chain data active."),process.env.VIS_SOCKET_TOKEN||t.notice(" Set VIS_SOCKET_TOKEN for a custom API token (optional).")),t.info("");const c=await d(n," Scan for packages with build scripts?"),l={};if(c){t.info(" Scanning node_modules...");const r=E(s,{});if(r.length>0){t.info(` Found ${String(r.length)} package${r.length===1?"":"s"} with build scripts:
|
|
20
|
+
`);for(const u of r){const a=await d(n,` Allow ${u}?`,!1),j=u.split(" (")[0]??u;l[j]=a,a&&t.success(` ✓ ${j} approved`)}}else t.info(" No packages with build scripts found.")}t.info("");const v=await d(n," Set up pre-commit hooks (lint-staged)?",!1);let $=!1;(e.name==="pnpm"||e.name==="yarn"||e.name==="npm"||e.name==="bun")&&(t.info(""),$=await d(n,` Sync security settings to ${e.name} config?`));const m=N(s);if(m.length>0&&(t.info(""),t.info(` Detected existing tools: ${m.join(", ")}`),await d(n,` Run \`vis migrate\` for ${m.join(", ")}?`,!1))){n.close();const[r,...u]=e.name==="pnpm"?["pnpm","exec"]:e.name==="yarn"?["yarn","exec"]:e.name==="bun"?["bunx"]:["npx"];for(const a of m){t.info(` Migrating from ${a}...`);try{B(r,[...u,"vis","migrate",a],{cwd:s,stdio:"inherit"})}catch{t.warn(` Migration from ${a} had issues — run \`vis migrate ${a}\` manually.`)}}if(g(o))t.success(`Migrated config written to ${o}`);else{const a=w(e.name,{allowBuilds:l,enableSocket:i,staged:v});b(o,a),t.success(`Created ${o}`)}t.notice(" Run 'vis doctor' to see your project's full health status.");return}n.close(),t.info("");const k=w(e.name,{allowBuilds:l,enableSocket:i,staged:v});if(b(o,k),t.success(`Created ${o}`),$){const r=Object.fromEntries(Object.entries(l).filter(([,a])=>a)),u=x(e.name,s,r);for(const a of u)t.success(` ${a}`)}t.info(""),t.info(" Setup complete. Your config:"),t.info(` Security: ${i?"Socket.dev enabled":"defaults only"}`),t.info(` Build scripts: ${Object.values(l).filter(Boolean).length} approved`),t.info(` Git hooks: ${v?"lint-staged configured":"not configured"}`),t.info(` PM sync: ${$?"done":"skipped"}`),t.info(""),t.notice(" Run 'vis doctor' to see your project's full health status."),t.info("")},"runInteractiveInit"),K=f((s,e,o,n)=>{const i=w(e.name,{allowBuilds:{},enableSocket:!1,staged:!1});if(b(n,i),t.success(`Created ${n}`),t.info(" Secure defaults applied automatically by defineConfig()."),o.syncNative){const c=x(e.name,s,{});for(const l of c)t.success(` ${l}`)}t.info(""),t.notice("Run 'vis doctor' for a full health check, or 'vis init' in a terminal for guided setup.")},"runStaticInit"),V=f(async({options:s,workspaceRoot:e})=>{const o=e??process.cwd(),n=M(o),i=O(o);if(i&&!s.force){t.warn(`Config already exists: ${i}`),t.notice("Use --force to overwrite, or edit the existing file.");return}const c=i??h(o,"vis.config.ts");process.stdin.isTTY&&s.interactive!==!1?await q(o,n,c):K(o,n,s,c)},"execute");export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C=Object.defineProperty;var f=(o,e)=>C(o,"name",{value:e,configurable:!0});import{createRequire as j}from"node:module";import{a as z,M as v,K as R,d as L}from"./config.js";import{p as t,A as M,h as T,v as $,x as B}from"./bin.js";import{s as D}from"../packem_shared/typosquats-B3A38-qx.js";import{o as E}from"../packem_shared/utils-DrNg0XTR.js";const O=j(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,q=f(o=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[e,r]=i.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return i.getBuiltinModule(o)}return O(o)},"__cjs_getBuiltinModule"),{rmSync:S}=q("node:fs");var F=Object.defineProperty,y=f((o,e)=>F(o,"name",{value:e,configurable:!0}),"f");const A=["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json","bun.lock","bun.lockb"],P=y(o=>{let e=o;for(;;){for(const a of A)if(z(v(e,a)))return!0;const r=R(e);if(r===e||L(e).root===e)return!1;e=r}},"hasLockfile"),g=new Set(["aube","auto","bun","npm","pnpm","yarn"]),Q=y(async({logger:o,options:e,visConfig:r,workspaceRoot:a})=>{const s=a??process.cwd();if(e.typosquatCheck!==!1&&!await D(s,r?.security?.typosquatAllowlist)){process.exitCode=1;return}const l=e.installer;if(l&&!g.has(l)){t.error(`Invalid --installer value: "${l}". Expected one of: ${[...g].join(", ")}.`),process.exitCode=1;return}const b=l,_=e.aube===!1;let c;try{c=_?M(s):T(s,{backend:b,configBackend:r?.install?.backend,configCorepack:r?.install?.corepack})}catch(n){t.error(n instanceof Error?n.message:String(n)),process.exitCode=1;return}const p=$(s,c);p&&t.warn(p);const w=E(e.filter),u=e.ci||!1,d=e.frozenLockfile||u,h=e.frozenLockfile===!1||e.force||e.lockfileOnly,x=P(s),m=d||!h&&x;if(!d&&m&&!e.silent&&t.info("Defaulting to frozen lockfile (pass --no-frozen-lockfile to allow lockfile updates)."),u){t.info("Clean install: removing node_modules...");try{S(v(s,"node_modules"),{force:!0,recursive:!0})}catch(n){t.error(`Failed to remove node_modules: ${n instanceof Error?n.message:String(n)}`),process.exitCode=1;return}}const k=B(c,{dev:e.dev||!1,filter:w,force:e.force||!1,frozenLockfile:m,ignoreScripts:!e.runScripts,lockfileOnly:e.lockfileOnly||!1,noOptional:e.optional===!1,offline:e.offline||!1,prod:e.prod||!1,recursive:e.recursive||!1,silent:e.silent||!1,workspaceRoot:e.workspaceRoot||!1},s,o,{preferOffline:e.preferOffline||!1});k!==0&&(process.exitCode=k)},"execute");export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=Object.defineProperty;var n=(e,a)=>l(e,"name",{value:a,configurable:!0});import{h as p,M as f}from"./bin.js";var g=Object.defineProperty,u=n((e,a)=>g(e,"name",{value:a,configurable:!0}),"s");const
|
|
1
|
+
var l=Object.defineProperty;var n=(e,a)=>l(e,"name",{value:a,configurable:!0});import{h as p,M as f}from"./bin.js";var g=Object.defineProperty,u=n((e,a)=>g(e,"name",{value:a,configurable:!0}),"s");const m=u(async({argument:e,logger:a,visConfig:o,workspaceRoot:s})=>{const t=e?.[0]??null,r=s??process.cwd(),i=p(r,{configBackend:o?.install?.backend,configCorepack:o?.install?.corepack}),c=f(i,t,r,a);c!==0&&(process.exitCode=c)},"execute");export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=Object.defineProperty;var
|
|
1
|
+
var d=Object.defineProperty;var n=(e,o)=>d(e,"name",{value:o,configurable:!0});import{h as g,K as u}from"./bin.js";var f=Object.defineProperty,b=n((e,o)=>f(e,"name",{value:o,configurable:!0}),"t");const m=b(async({argument:e,logger:o,visConfig:c,workspaceRoot:t})=>{const a=e;if(!a||a.length===0)throw new Error("No subcommand specified. Available: cache, publish, audit, list, view, config, whoami, login, logout, pack, owner, dist-tag, search, fund, ping, token, deprecate, rebuild, prune, plugin");const[s,...l]=a,r=t??process.cwd(),p=g(r,{configBackend:c?.install?.backend,configCorepack:c?.install?.corepack}),i=u(p,s,l,r,o);i!==0&&(process.exitCode=i)},"execute");export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var f=Object.defineProperty;var i=(e,o)=>f(e,"name",{value:o,configurable:!0});import{h as p,
|
|
1
|
+
var f=Object.defineProperty;var i=(e,o)=>f(e,"name",{value:o,configurable:!0});import{h as p,L as g}from"./bin.js";import{o as v}from"../packem_shared/utils-DrNg0XTR.js";var k=Object.defineProperty,d=i((e,o)=>k(e,"name",{value:o,configurable:!0}),"l");const w=d(async({argument:e,logger:o,options:a,visConfig:s,workspaceRoot:l})=>{const r=e;if(!r||r.length===0)throw new Error("No packages specified. Usage: vis remove <packages...>");const c=process.cwd(),n=p(l??c,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),t=g(n,{filter:v(a.filter),global:a.global||!1,packages:r,recursive:a.recursive||!1,saveDev:a.saveDev||!1,workspaceRoot:a.workspaceRoot||!1},c,o);t!==0&&(process.exitCode=t)},"execute");export{w as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
`)},"renderListJson"),
|
|
3
|
-
`),process.exitCode=1;return}
|
|
4
|
-
`),process.exitCode=1;return}
|
|
5
|
-
`);return}if(d!==void 0){
|
|
1
|
+
var S=Object.defineProperty;var p=(t,a)=>S(t,"name",{value:a,configurable:!0});import{readLastRunSummary as v,getLastRunSummaryPath as x}from"@visulima/task-runner";import{p as f,n as $,Q as l}from"./bin.js";import{r as I,l as y}from"../packem_shared/run-summary-utils-CJv75pla.js";var w=Object.defineProperty,n=p((t,a)=>w(t,"name",{value:a,configurable:!0}),"a");const T=new Set(["json","table"]),C=n(t=>t??process.cwd(),"resolveWorkspaceRoot"),h=n(t=>t===void 0?"-":t<1e3?`${String(t)}ms`:`${(t/1e3).toFixed(2)}s`,"formatDuration"),k=n(t=>t.exitCode===void 0?t.cacheStatus:t.exitCode===0?t.cacheStatus==="MISS"?"OK":t.cacheStatus:`FAIL(${String(t.exitCode)})`,"formatStatus"),o=n((t,a)=>t.length>=a?t:t+" ".repeat(a-t.length),"padCell"),R=n(t=>t.exitCode!==void 0&&t.exitCode!==0,"isFailedTask"),g=n((t,a)=>{a.info(`Run ${t.id}`),a.info(` start: ${t.startTime}`),a.info(` end: ${t.endTime}`),a.info(` duration: ${h(t.duration)}`),a.info(` totals: ${String(t.stats.total)} total · ${String(t.stats.succeeded)} ok · ${String(t.stats.cached)} cached · ${String(t.stats.skipped)} skipped · ${String(t.stats.failed)} failed`),a.info(` env: node ${t.environment.nodeVersion} · ${t.environment.platform}/${t.environment.arch}`),a.info("")},"renderRunHeader"),D=n((t,a)=>{if(t.length===0){a.info("(no tasks match the current filter)");return}const r=t.map(e=>({duration:h(e.duration),hash:e.hash?e.hash.slice(0,12):"-",status:k(e),taskId:e.taskId})),s={duration:Math.max(8,...r.map(e=>e.duration.length)),hash:Math.max(4,...r.map(e=>e.hash.length)),status:Math.max(6,...r.map(e=>e.status.length)),taskId:Math.max(4,...r.map(e=>e.taskId.length))};a.info(` ${o("task",s.taskId)} ${o("status",s.status)} ${o("duration",s.duration)} ${o("hash",s.hash)}`),a.info(` ${"-".repeat(s.taskId)} ${"-".repeat(s.status)} ${"-".repeat(s.duration)} ${"-".repeat(s.hash)}`);for(const e of r)a.info(` ${o(e.taskId,s.taskId)} ${o(e.status,s.status)} ${o(e.duration,s.duration)} ${o(e.hash,s.hash)}`)},"renderTaskTable"),j=n((t,a,r)=>{g(t,r),r.info(`Task ${a.taskId}`),r.info(` status: ${k(a)}`),r.info(` cache: ${a.cacheStatus}`),r.info(` duration: ${h(a.duration)}`),r.info(` exit: ${a.exitCode===void 0?"-":String(a.exitCode)}`),r.info(` hash: ${a.hash??"(none)"}`),r.info(` start: ${a.startTime??"-"}`),r.info(` end: ${a.endTime??"-"}`),a.dependencies.length>0&&r.info(` deps: ${a.dependencies.join(", ")}`),r.info(""),f.info(`Drill into hash inputs with: vis cache why ${a.taskId} --run ${t.id}`)},"renderTaskDetail"),M=n(t=>{process.stdout.write(`${JSON.stringify(t.map(a=>({id:a.id,mtime:new Date(a.mtimeMs).toISOString(),path:a.path})),void 0,2)}
|
|
2
|
+
`)},"renderListJson"),O=n((t,a,r)=>{if(t.length===0){f.info(`No recorded runs found in ${$(a)}/. Run with --summarize to record a run.`);return}const s={id:Math.max(2,...t.map(e=>e.id.length)),mtime:24};r.info(` ${o("id",s.id)} ${o("mtime",s.mtime)}`),r.info(` ${"-".repeat(s.id)} ${"-".repeat(s.mtime)}`);for(const e of t)r.info(` ${o(e.id,s.id)} ${new Date(e.mtimeMs).toISOString()}`)},"renderListTable"),b=n((t,a)=>{let{tasks:r}=t;return a.task!==void 0&&(r=r.filter(s=>s.taskId===a.task)),a.failed&&(r=r.filter(s=>R(s))),r},"filterTasks"),N=n(async(t,a)=>{const{failed:r,format:s,runId:e,task:d,workspaceRoot:m}=t,i=e===void 0?await v(m,{dataDirectory:l(m)}):await I(m,e);if(!i){if(s==="json"){process.stdout.write(`${JSON.stringify({error:"no-summary",runId:e??null},void 0,2)}
|
|
3
|
+
`),process.exitCode=1;return}e===void 0?f.error(`No previous run summary found. Run a task first to populate \`${x(m,{dataDirectory:l(m)})}\`.`):f.error(`Run summary "${e}" not found in ${$(m)}/.`),process.exitCode=1;return}const c=b(i,{failed:r,task:d});if(d!==void 0&&c.length===0){if(s==="json"){process.stdout.write(`${JSON.stringify({error:"task-not-in-summary",runId:i.id,taskId:d},void 0,2)}
|
|
4
|
+
`),process.exitCode=1;return}f.error(`Task "${d}" was not part of run ${i.id}.`),process.exitCode=1;return}if(i.stats.failed>0&&(process.exitCode=1),s==="json"){process.stdout.write(`${JSON.stringify({duration:i.duration,endTime:i.endTime,environment:i.environment,runId:i.id,startTime:i.startTime,stats:i.stats,tasks:c.map(u=>({cacheStatus:u.cacheStatus,dependencies:u.dependencies,duration:u.duration,endTime:u.endTime,exitCode:u.exitCode,hash:u.hash??null,startTime:u.startTime,taskId:u.taskId}))},void 0,2)}
|
|
5
|
+
`);return}if(d!==void 0){j(i,c[0],a);return}g(i,a),D(c,a)},"runReplay"),V=n(async({logger:t,options:a,workspaceRoot:r})=>{const s=C(r),e=a.format??"table";if(!T.has(e)){f.error(`Invalid --format: ${e}. Expected "table" or "json".`),process.exitCode=1;return}if(a.list===!0){const d=await y(s);if(e==="json"){M(d);return}O(d,s,t);return}await N({failed:a.failed===!0,format:e,runId:a.run,task:a.task,workspaceRoot:s},t)},"replayExecute");export{V as default,V as replayExecute,N as runReplay};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var j=Object.defineProperty;var g=(n,r)=>j(n,"name",{value:r,configurable:!0});import{getAffectedProjects as v}from"@visulima/task-runner";import{y as E,m as F}from"./bin.js";import{f as b}from"../packem_shared/selectors-
|
|
1
|
+
var j=Object.defineProperty;var g=(n,r)=>j(n,"name",{value:r,configurable:!0});import{getAffectedProjects as v}from"@visulima/task-runner";import{y as E,m as F}from"./bin.js";import{f as b}from"../packem_shared/selectors-B2ISH581.js";var S=Object.defineProperty,$=g((n,r)=>S(n,"name",{value:r,configurable:!0}),"m");const T=$(async({argument:n,logger:r,options:e,runtime:l,visConfig:h,workspaceRoot:u})=>{const f=n[0];if(!f)throw new Error("Missing target. Usage: vis affected <target>");if(!u)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const s=u,{packageJsons:m,workspace:i}=E(s,h),w=F(s,i,m),d=new Set(["deep","direct","none"]),c=e.downstream??"deep",p=e.upstream??"none";if(!d.has(c))throw new Error(`Invalid --downstream value: "${c}". Must be "none", "direct", or "deep".`);if(!d.has(p))throw new Error(`Invalid --upstream value: "${p}". Must be "none", "direct", or "deep".`);const y={base:e.base,downstream:c,head:e.head,projectGraph:w,projects:i.projects,upstream:p,workspaceRoot:s},o=await v(y);if(o.changedFiles.length===0){r.info("No files changed. Nothing to run.");return}if(o.affectedProjects.length===0){r.info("No projects affected by the changes.");return}let{affectedProjects:a}=o;if(e.query&&(a=b(a,i,e.query),a.length===0)){r.info(`Query "${String(e.query)}" matched no affected projects.`);return}r.info(`Affected projects: ${a.join(", ")}`),o.changedFiles.length>0&&(process.env.VIS_AFFECTED_FILES=o.changedFiles.join(`
|
|
2
2
|
`));const t=[f,`--projects=${a.join(",")}`];e.parallel!==void 0&&t.push(`--parallel=${String(e.parallel)}`),e.cache||t.push("--no-cache"),e.dryRun&&t.push("--dry-run"),e.partition&&t.push(`--partition=${String(e.partition)}`),e.reverse&&t.push("--reverse"),typeof e.runnerTags=="string"&&e.runnerTags!==""&&t.push(`--runner-tags=${e.runnerTags}`);try{await l.runCommand("run",{argv:t})}finally{delete process.env.VIS_AFFECTED_FILES}},"execute");export{T as default};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var T=Object.defineProperty;var k=(o,e)=>T(o,"name",{value:e,configurable:!0});import{createRequire as F}from"node:module";import{p as c,X as A,y as H,Y as L,Z as P,$ as U}from"./bin.js";import{c as D,r as O,s as b,S as z,a as $,b as C,d as G,p as q,i as M,e as B}from"../packem_shared/lifecycle-C7vfQmA3.js";import{formatAge as V}from"./handler21.js";const _=F(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,I=k(o=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[e,r]=m.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return m.getBuiltinModule(o)}return _(o)},"__cjs_getBuiltinModule"),{stat:y,open:R,watch:N}=I("node:fs/promises");var W=Object.defineProperty,g=k((o,e)=>W(o,"name",{value:e,configurable:!0}),"f");const h=g(async o=>{const e=o?.plugins;if(!e||e.length===0)return;const r=D();return await O(r,e),{callHook:g(async(d,...s)=>{try{await r.callHook(d,...s)}catch(t){const n=t instanceof Error?t.message:String(t);c.warn(`Plugin error in ${d}: ${n}`)}},"callHook")}},"loadServiceHooks"),J=g(o=>{const e=o.trim(),r=e.lastIndexOf(":");if(!(r<=0||r===e.length-1))return{project:e.slice(0,r),target:e.slice(r+1)}},"splitTargetId"),j=g(async(o,e,r)=>{const d=J(r);if(!d){c.error(`Invalid target id "${r}". Expected "<project>:<target>", e.g. "@my/api:db".`);return}const s=await A(o),{projectOptions:t,workspace:n}=H(o,e,s),i=n.projects[d.project],a=t.get(d.project)?.[d.target];if(!i||!a){c.error(`Target "${r}" not found in this workspace.`);return}const p=a.options?.service;if(!p){c.error(`Target "${r}" is not a service. Add an \`options.service\` block to make it eligible for \`vis service\`.`);return}if(!a.command){c.error(`Target "${r}" has no command — services must be runnable.`);return}const f=L(o,i.root,a.options?.runFromWorkspaceRoot===!0),v=a.options?.envFile?P(f,a.options.envFile):{};return{command:a.command,cwd:f,env:{...v,...p.env},service:p,target:a,targetId:r}},"resolveTarget"),w=g(o=>{if(!o)throw new Error("Could not determine workspace root. Run `vis service` inside a workspace.");return o},"requireWorkspace"),se=g(async({argument:o,options:e,visConfig:r,workspaceRoot:d})=>{const s=w(d),t=o[0]?.trim();if(!t){c.error("Missing target id. Usage: vis service start <project>:<target>"),process.exitCode=1;return}const n=await j(s,r,t);if(!n){process.exitCode=1;return}try{const{entry:i}=await b({command:n.command,config:n.service,cwd:n.cwd,env:n.env,id:t,readinessTimeoutMs:e.timeout,skipReadiness:e.readiness===!1,workspaceRoot:s});await(await h(r))?.callHook("service:start",i),c.success(`Started ${t} (pid ${String(i.pid)})`),c.info(` log: ${i.logFile}`)}catch(i){const a=i instanceof Error?i.message:String(i);i instanceof z?c.error(`Readiness probe failed for ${t}: ${a}`):c.error(`Failed to start ${t}: ${a}`),process.exitCode=1}},"serviceStartExecute"),S=g(async({graceMs:o,hookSink:e,id:r,workspaceRoot:d})=>{const s=await $(d,r),{stopped:t}=await C({graceMs:o,id:r,workspaceRoot:d});return t?(s&&await e?.callHook("service:stop",s),c.success(`Stopped ${r}`),!0):(c.info(`No running service registered for ${r}`),!1)},"stopOne"),ie=g(async({argument:o,options:e,visConfig:r,workspaceRoot:d})=>{const s=w(d),{graceMs:t}=e,n=o[0]?.trim(),i=await h(r);if(e.all===!0){if(n){c.error("Cannot combine --all with a target id. Use one or the other."),process.exitCode=1;return}const a=await G(s);if(a.length===0){c.info("No running services registered for this workspace.");return}for(const p of a)await S({graceMs:t,hookSink:i,id:p.id,workspaceRoot:s});return}if(!n){c.error("Missing target id. Usage: vis service stop <project>:<target> | --all"),process.exitCode=1;return}await S({graceMs:t,hookSink:i,id:n,workspaceRoot:s})||(process.exitCode=1)},"serviceStopExecute"),X=g(o=>{const e=o.config.readiness?.tcp.port??o.config.port;return e===void 0?"—":String(e)},"formatPort"),E=new Set(["json","table"]),ae=g(async({logger:o,options:e,workspaceRoot:r})=>{const d=w(r),s=e.format??"table";if(!E.has(s)){c.error(`Invalid --format "${s}". Expected one of: ${[...E].sort().join(", ")}.`),process.exitCode=1;return}const{surviving:t}=await q(d);if(s==="json"){const l=Date.now();process.stdout.write(`${JSON.stringify(t.map(u=>{const x=Date.parse(u.startedAt);return{ageMs:Number.isFinite(x)?l-x:null,alive:M(u.pid),command:u.command,cwd:u.cwd,env:u.env,id:u.id,logFile:u.logFile,pid:u.pid,port:u.config.readiness?.tcp.port??u.config.port??null,startedAt:u.startedAt,visVersion:u.visVersion}}),void 0,2)}
|
|
2
|
+
`);return}if(t.length===0){c.info("No running services registered for this workspace.");return}const n=Date.now(),i=t.map(l=>{const u=Date.parse(l.startedAt);return{age:Number.isFinite(u)?V(u,n):"?",id:l.id,log:l.logFile,pid:String(l.pid),port:X(l)}}),a=Math.max(2,...i.map(l=>l.id.length)),p=Math.max(3,...i.map(l=>l.pid.length)),f=Math.max(4,...i.map(l=>l.port.length)),v=Math.max(3,...i.map(l=>l.age.length));o.info(` ${"id".padEnd(a)} ${"pid".padEnd(p)} ${"port".padEnd(f)} ${"age".padEnd(v)} log`),o.info(` ${"-".repeat(a)} ${"-".repeat(p)} ${"-".repeat(f)} ${"-".repeat(v)} ---`);for(const l of i)o.info(` ${l.id.padEnd(a)} ${l.pid.padEnd(p)} ${l.port.padEnd(f)} ${l.age.padEnd(v)} ${l.log}`)},"serviceListExecute"),ne=g(async({argument:o,options:e,workspaceRoot:r})=>{const d=w(r),s=o[0]?.trim();if(!s){c.error("Missing target id. Usage: vis service status <project>:<target>"),process.exitCode=1;return}const t=await $(d,s);if(!t){c.error(`No service registered for ${s}.`),process.exitCode=1;return}if(!M(t.pid)){c.error(`Service ${s} is not running (pid ${String(t.pid)} is dead). Run \`vis service start ${s}\` to recover.`),process.exitCode=1;return}try{await B(t.config,{timeoutMs:e.timeout}),c.success(`${s} healthy (pid ${String(t.pid)})`)}catch(n){const i=n instanceof Error?n.message:String(n);c.error(`${s} probe failed: ${i}`),process.exitCode=1}},"serviceStatusExecute"),ce=g(async({argument:o,options:e,visConfig:r,workspaceRoot:d})=>{const s=w(d),t=o[0]?.trim();if(!t){c.error("Missing target id. Usage: vis service restart <project>:<target>"),process.exitCode=1;return}const n=await h(r),i=await $(s,t);(await C({graceMs:e.graceMs,id:t,workspaceRoot:s})).stopped&&i&&await n?.callHook("service:stop",i);const a=await j(s,r,t);if(!a){process.exitCode=1;return}try{const{entry:p}=await b({command:a.command,config:a.service,cwd:a.cwd,env:a.env,id:t,readinessTimeoutMs:e.timeout,skipReadiness:e.readiness===!1,workspaceRoot:s});await n?.callHook("service:start",p),c.success(`Restarted ${t} (pid ${String(p.pid)})`)}catch(p){const f=p instanceof Error?p.message:String(p);c.error(`Failed to restart ${t}: ${f}`),process.exitCode=1}},"serviceRestartExecute"),Y=200,Z=1024*1024,K=g(async o=>{let e=0;try{e=(await y(o)).size}catch{e=0}const r=new AbortController;let d=!1;const s=g(()=>{d=!0,r.abort()},"onSigint"),t=g(()=>{r.abort()},"onSigterm");process.on("SIGINT",s),process.on("SIGTERM",t);let n=!1;const i=g(async()=>{if(!n){n=!0;try{const a=await y(o).catch(()=>{});if(!a||(a.size<e&&(e=0),a.size===e))return;const p=a.size-e,f=Math.min(p,Z),v=await R(o,"r");try{const l=Buffer.alloc(f);await v.read(l,0,f,e),process.stdout.write(l),e+=f}finally{await v.close().catch(()=>{})}}finally{n=!1}}},"tickOnce");try{const a=(async()=>{try{const p=N(o,{signal:r.signal});for(;!(await p.next()).done;)await i()}catch{}})();for(;!r.signal.aborted;)await i(),await new Promise(p=>{const f=setTimeout(p,Y);r.signal.addEventListener("abort",()=>{clearTimeout(f),p()},{once:!0})});await a.catch(()=>{}),await i().catch(()=>{})}finally{process.off("SIGINT",s),process.off("SIGTERM",t)}d&&(process.exitCode=130)},"tailLog"),de=g(async({argument:o,options:e,workspaceRoot:r})=>{const d=w(r),s=o[0]?.trim();if(!s){c.error("Missing target id. Usage: vis service logs <project>:<target>"),process.exitCode=1;return}const t=await $(d,s);if(!t){c.error(`No service registered for ${s}.`),process.exitCode=1;return}if(!await U(t.logFile)){c.warn(`Log file is missing for ${s}: ${t.logFile}`),process.exitCode=1;return}if(e.follow===!0){await K(t.logFile);return}const n=await R(t.logFile,"r");try{const i=n.createReadStream();await new Promise((a,p)=>{i.on("end",a),i.on("error",p),i.pipe(process.stdout,{end:!1})})}finally{await n.close().catch(()=>{})}},"serviceLogsExecute");export{ae as serviceListExecute,de as serviceLogsExecute,ce as serviceRestartExecute,se as serviceStartExecute,ne as serviceStatusExecute,ie as serviceStopExecute};
|