@visulima/vis 1.0.0-alpha.26 → 1.0.0-alpha.27

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE.md +17 -17
  3. package/README.md +24 -22
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +1 -1
  6. package/dist/config/index.d.ts +176 -16
  7. package/dist/packem_chunks/bin.js +263 -263
  8. package/dist/packem_chunks/bloom-status.js +1 -1
  9. package/dist/packem_chunks/bloom-sync.js +1 -1
  10. package/dist/packem_chunks/config.js +12 -12
  11. package/dist/packem_chunks/handler10.js +1 -1
  12. package/dist/packem_chunks/handler11.js +1 -1
  13. package/dist/packem_chunks/handler12.js +1 -1
  14. package/dist/packem_chunks/handler13.js +1 -1
  15. package/dist/packem_chunks/handler14.js +8 -9
  16. package/dist/packem_chunks/handler15.js +1 -1
  17. package/dist/packem_chunks/handler16.js +1 -1
  18. package/dist/packem_chunks/handler17.js +1 -1
  19. package/dist/packem_chunks/handler18.js +1 -1
  20. package/dist/packem_chunks/handler19.js +1 -1
  21. package/dist/packem_chunks/handler2.js +1 -1
  22. package/dist/packem_chunks/handler20.js +1 -1
  23. package/dist/packem_chunks/handler22.js +1 -1
  24. package/dist/packem_chunks/handler23.js +1 -1
  25. package/dist/packem_chunks/handler27.js +1 -1
  26. package/dist/packem_chunks/handler28.js +1 -1
  27. package/dist/packem_chunks/handler29.js +1 -1
  28. package/dist/packem_chunks/handler30.js +3 -3
  29. package/dist/packem_chunks/handler31.js +2 -2
  30. package/dist/packem_chunks/handler34.js +1 -1
  31. package/dist/packem_chunks/handler35.js +3 -22
  32. package/dist/packem_chunks/handler36.js +21 -60
  33. package/dist/packem_chunks/handler37.js +61 -6
  34. package/dist/packem_chunks/handler38.js +3 -24
  35. package/dist/packem_chunks/handler39.js +6 -153
  36. package/dist/packem_chunks/handler4.js +1 -1
  37. package/dist/packem_chunks/handler40.js +24 -10
  38. package/dist/packem_chunks/handler41.js +153 -25
  39. package/dist/packem_chunks/handler42.js +10 -708
  40. package/dist/packem_chunks/handler43.js +25 -24
  41. package/dist/packem_chunks/handler44.js +659 -273
  42. package/dist/packem_chunks/handler45.js +24 -46
  43. package/dist/packem_chunks/handler46.js +322 -3
  44. package/dist/packem_chunks/handler47.js +48 -27
  45. package/dist/packem_chunks/handler48.js +3 -187
  46. package/dist/packem_chunks/handler49.js +23 -30
  47. package/dist/packem_chunks/handler5.js +6 -6
  48. package/dist/packem_chunks/handler50.js +196 -0
  49. package/dist/packem_chunks/handler51.js +34 -0
  50. package/dist/packem_chunks/handler8.js +1 -1
  51. package/dist/packem_chunks/handler9.js +1 -1
  52. package/dist/packem_chunks/heal-accept.js +1 -1
  53. package/dist/packem_chunks/help-command.js +16 -16
  54. package/dist/packem_chunks/index.js +1 -1
  55. package/dist/packem_chunks/list.js +1 -1
  56. package/dist/packem_chunks/loader.js +1 -1
  57. package/dist/packem_chunks/prune.js +1 -1
  58. package/dist/packem_chunks/status.js +1 -1
  59. package/dist/packem_chunks/sync.js +1 -1
  60. package/dist/packem_chunks/sync2.js +1 -1
  61. package/dist/packem_chunks/tripwire.js +1 -1
  62. package/dist/packem_chunks/verify-lockfile.js +1 -1
  63. package/dist/packem_shared/{advisories-DS8JEB_g.js → advisories-xIOdLbAI.js} +1 -1
  64. package/dist/packem_shared/{cyclonedx-ja1cbU69.js → cyclonedx-B3ILsY74.js} +1 -1
  65. package/dist/packem_shared/{docker-Bw9gKo69.js → docker-BynKrOLe.js} +1 -1
  66. package/dist/packem_shared/{index-88UK-tt_.js → index-B_KtN1MB.js} +1 -1
  67. package/dist/packem_shared/{index-CS6a2wFB.js → index-efSniSRN.js} +1 -1
  68. package/dist/packem_shared/{lifecycle-ChCFTm5Q.js → lifecycle-CJRNbN3x.js} +2 -2
  69. package/dist/packem_shared/{min-release-age-heJgeP7o.js → min-release-age-aEn0x8Vy.js} +1 -1
  70. package/dist/packem_shared/{native-config-sync-BOeuyrBj.js → native-config-sync-DdhTLlKL.js} +1 -1
  71. package/dist/packem_shared/{osv-bloom-QSAn2Dcw.js → osv-bloom-BJhlc_I2.js} +2 -2
  72. package/dist/packem_shared/{pm-runner-BzGZmzYs.js → pm-runner-BwX5AL3W.js} +1 -1
  73. package/dist/packem_shared/{provenance-BsBn1f5S.js → provenance-BuiEsWbI.js} +1 -1
  74. package/dist/packem_shared/{resolve-explicit-CBPr617N.js → resolve-explicit-RgRrUDZv.js} +1 -1
  75. package/dist/packem_shared/{s1ngularity-j_ArCZAs.js → s1ngularity-Bs9fUf3q.js} +1 -1
  76. package/dist/packem_shared/{scan-progress-EbvmIh4i.js → scan-progress-DjPT66jy.js} +2 -2
  77. package/dist/packem_shared/{signatures-CaXzNuEn.js → signatures-LYMy8OR5.js} +1 -1
  78. package/dist/packem_shared/{typosquats-C1e6RNjF.js → typosquats-znskIR5j.js} +1 -1
  79. package/dist/packem_shared/watch-BSVsZ_1I.js +1 -0
  80. package/dist/packem_shared/watch-loop-DLlMLg_J.js +11 -0
  81. package/index.js +751 -567
  82. package/package.json +11 -11
  83. package/schemas/project.schema.json +86 -1
  84. package/schemas/vis-config.schema.json +255 -7
@@ -1,2 +1,2 @@
1
- var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/index.server-B7ETiT4C.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-QSAn2Dcw.js";var d=Object.defineProperty,n=a((o,r)=>d(o,"name",{value:r,configurable:!0}),"s");const c=n(o=>{if(!o)return"never";const r=Date.parse(o);if(Number.isNaN(r))return o;const t=Date.now()-r;if(t<0)return o;const e=Math.floor(t/6e4);if(e<1)return"just now";if(e<60)return`${e}m ago`;const s=Math.floor(e/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),p=n(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),g=n(async({options:o,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,o.cacheDir);if(o.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
1
+ var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/index.server-B7ETiT4C.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-BJhlc_I2.js";var d=Object.defineProperty,n=a((o,r)=>d(o,"name",{value:r,configurable:!0}),"s");const c=n(o=>{if(!o)return"never";const r=Date.parse(o);if(Number.isNaN(r))return o;const t=Date.now()-r;if(t<0)return o;const e=Math.floor(t/6e4);if(e<1)return"just now";if(e<60)return`${e}m ago`;const s=Math.floor(e/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),p=n(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),g=n(async({options:o,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,o.cacheDir);if(o.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
2
2
  `);return}if(i.info(`Cache: ${t.cacheDir}`),!t.present){i.warn(`No osv-bloom filter yet. Run ${l("vis advisories bloom sync")} to populate.`);return}if(t.manifest){const{manifest:e}=t;i.info(`Built: ${e.builtAtRfc3339} (${c(e.builtAtRfc3339)})`),i.info(`Fetch: ${t.fetchedAtIso??f("—")} (${c(t.fetchedAtIso)})`),i.info(`Filter: ${u(p(e.bloomByteLen))} m=${e.bloomMBits.toLocaleString()} bits k=${String(e.bloomKHashes)}`),i.info(`Set: ${e.entryCount.toLocaleString()} entries from ${e.advisoryCount.toLocaleString()} advisories (target FPR ${e.targetFpr})`),i.info(f(`Digest: ${e.setDigestSha256}`))}else i.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},"execute"),y=g;export{y as advisoriesBloomStatusExecute};
@@ -1,2 +1,2 @@
1
- var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/index.server-B7ETiT4C.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-EbvmIh4i.js";import{s as y,D as h}from"../packem_shared/osv-bloom-QSAn2Dcw.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",m=w(t),u=o.source??m.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:m.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:u,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:u,upToDate:e?.upToDate??!1},void 0,2)}
1
+ var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/index.server-B7ETiT4C.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-DjPT66jy.js";import{s as y,D as h}from"../packem_shared/osv-bloom-BJhlc_I2.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",m=w(t),u=o.source??m.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:m.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:u,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:u,upToDate:e?.upToDate??!1},void 0,2)}
2
2
  `):e&&(n.info(d(`Cache: ${e.cacheDir}`)),n.info(d(`Built: ${e.manifest.builtAtRfc3339}`)),r||n.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),r&&(process.exitCode=1)},"execute"),x=B;export{x as advisoriesBloomSyncExecute};
@@ -1,19 +1,19 @@
1
- var lo=Object.defineProperty;var m=(e,t)=>lo(e,"name",{value:t,configurable:!0});import{createRequire as fo}from"node:module";import{f as nr,$ as yo,U as or,i as D,_ as Dt,K as Ce,s as bo,M as A,a as sr}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{createJiti as ir}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const po=fo(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lt=m(e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,r]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ye.getBuiltinModule(e)}return po(e)},"__cjs_getBuiltinModule"),{createHash:tr}=lt("node:crypto"),{readdirSync:rr,readFileSync:go,copyFileSync:mo,unlinkSync:ho}=lt("node:fs"),{createRequire:Se}=lt("node:module");var vo=Object.defineProperty,z=m((e,t)=>vo(e,"name",{value:t,configurable:!0}),"O$2"),$o=Object.defineProperty,k=z((e,t)=>$o(e,"name",{value:t,configurable:!0}),"h");const wo=Se(import.meta.url),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ar=k(e=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[t,r]=ie.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ie.getBuiltinModule(e)}return wo(e)},"__cjs_getBuiltinModule"),{existsSync:ae}=ar("node:fs"),{env:ce,cwd:cr}=ie,{createRequire:pe}=ar("node:module"),ur=0,ue=2,lr=Symbol("findUpStop");var jo=Object.defineProperty,xo=k((e,t)=>jo(e,"name",{value:t,configurable:!0}),"t$4"),Oo=Object.defineProperty,ko=xo((e,t)=>Oo(e,"name",{value:t,configurable:!0}),"t"),Po=Object.defineProperty,To=ko((e,t)=>Po(e,"name",{value:t,configurable:!0}),"n");const ft=To(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Eo=Object.defineProperty,So=k((e,t)=>Eo(e,"name",{value:t,configurable:!0}),"i$4"),Co=Object.defineProperty,Ao=So((e,t)=>Co(e,"name",{value:t,configurable:!0}),"r"),_o=Object.defineProperty,No=Ao((e,t)=>_o(e,"name",{value:t,configurable:!0}),"i");const zt=No(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Mo=Object.defineProperty,Bo=k((e,t)=>Mo(e,"name",{value:t,configurable:!0}),"i$3"),Do=Object.defineProperty,fr=Bo((e,t)=>Do(e,"name",{value:t,configurable:!0}),"s");const zo=pe(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ro=fr(e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,r]=be.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return be.getBuiltinModule(e)}return zo(e)},"__cjs_getBuiltinModule"),{lstatSync:Rt,mkdirSync:Io}=Ro("node:fs");var Fo=Object.defineProperty,Lo=fr((e,t)=>Fo(e,"name",{value:t,configurable:!0}),"o");const Wo=Lo(e=>{ft(e);try{const t=Rt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(zt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Io(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Rt(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(zt(r))}'`,{cause:t})}},"ensureDirSync");var Uo=Object.defineProperty,Vo=k((e,t)=>Uo(e,"name",{value:t,configurable:!0}),"$e"),qo=Object.defineProperty,pt=Vo((e,t)=>qo(e,"name",{value:t,configurable:!0}),"W"),Ko=Object.defineProperty,g=pt((e,t)=>Ko(e,"name",{value:t,configurable:!0}),"u$1");let It=g(()=>{var e=(()=>{var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,c=g((o,s)=>{for(var a in s)t(o,a,{get:s[a],enumerable:!0})},"ne"),f=g((o,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let u of n(s))!i.call(o,u)&&u!==a&&t(o,u,{get:g(()=>s[u],"get"),enumerable:!(l=r(s,u))||l.enumerable});return o},"ae"),d=g(o=>f(t({},"__esModule",{value:!0}),o),"oe"),v={};c(v,{zeptomatch:g(()=>Bt,"zeptomatch")});var w=g(o=>{const s=new Set,a=[o];for(let l=0;l<a.length;l++){const u=a[l];if(s.has(u))continue;s.add(u);const{children:p}=u;if(p?.length)for(let h=0,j=p.length;h<j;h++)a.push(p[h])}return Array.from(s)},"M"),$=g(o=>{let s="";const a=w(o);for(let l=0,u=a.length;l<u;l++){const p=a[l];if(!p.regex)continue;const h=p.regex.flags;if(s||(s=h),s!==h)throw new Error(`Inconsistent RegExp flags used: "${s}" and "${h}"`)}return s},"se"),y=g((o,s,a)=>{const l=a.get(o);if(l!==void 0)return l;const u=o.partial??s;let p="";if(o.regex&&(p+=u?"(?:$|":"",p+=o.regex.source),o.children?.length){const h=P(o.children.map(j=>y(j,s,a)).filter(Boolean));if(h?.length){const j=o.children.some(me=>!me.regex||!(me.partial??s)),S=h.length>1||u&&(!p.length||j);p+=S?u?"(?:$|":"(?:":"",p+=h.join("|"),p+=S?")":""}}return o.regex&&(p+=u?")":""),a.set(o,p),p},"O"),E=g((o,s)=>{const a=new Map,l=w(o);for(let u=l.length-1;u>=0;u--){const p=y(l[u],s,a);if(!(u>0))return p}return""},"ie"),P=g(o=>Array.from(new Set(o)),"ue"),x=g((o,s,a)=>x.compile(o,a).test(s),"R");x.compile=(o,s)=>{const a=s?.partial??!1,l=E(o,a),u=$(o);return new RegExp(`^(?:${l})$`,u)};var _=x,F=g((o,s)=>{const a=_.compile(o,s),l=`${a.source.slice(0,-1)}[\\\\/]?$`,u=a.flags;return new RegExp(l,u)},"le"),te=F,Qe=g(o=>{const s=o.map(l=>l.source).join("|")||"$^",a=o[0]?.flags;return new RegExp(s,a)},"ve"),Ye=Qe,re=g(o=>Array.isArray(o),"j"),L=g(o=>typeof o=="function","_"),et=g(o=>o.length===0,"he"),tt=(()=>{const{toString:o}=Function.prototype,s=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return a=>(a.length===0||a.length===1)&&s.test(o.call(a))})(),Kr=g(o=>typeof o=="number","de"),Gr=g(o=>typeof o=="object"&&o!==null,"xe"),Jr=g(o=>o instanceof RegExp,"me"),Zr=(()=>{const o=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return s=>o.test(s.source)})(),Hr=(()=>{const o=/^[a-zA-Z0-9_-]+$/;return s=>o.test(s.source)&&!s.flags.includes("i")})(),vt=g(o=>typeof o=="string","A"),V=g(o=>o===void 0,"f"),Xr=g(o=>{const s=new Map;return a=>{const l=s.get(a);if(l!==void 0)return l;const u=o(a);return s.set(a,u),u}},"ye"),$t=g((o,s,a={})=>{const l={cache:{},input:o,index:0,indexBacktrackMax:0,options:a,output:[]},u=q(s)(l),p=Math.max(l.index,l.indexBacktrackMax);if(u&&l.index===o.length)return l.output;throw new Error(`Failed to parse at index ${p}`)},"I"),b=g((o,s)=>re(o)?Qr(o,s):vt(o)?wt(o,s):Yr(o,s),"i"),Qr=g((o,s)=>{const a={};for(const l of o){if(l.length!==1)throw new Error(`Invalid character: "${l}"`);const u=l.charCodeAt(0);a[u]=!0}return l=>{const u=l.input;let p=l.index,h=p;for(;h<u.length&&u.charCodeAt(h)in a;)h+=1;if(h>p){if(!V(s)&&!l.options.silent){const j=u.slice(p,h),S=L(s)?s(j,u,`${p}`):s;V(S)||l.output.push(S)}l.index=h}return!0}},"we"),Yr=g((o,s)=>{if(Hr(o))return wt(o.source,s);{const a=o.source,l=o.flags.replace(/y|$/,"y"),u=new RegExp(a,l);return Zr(o)&&L(s)&&!tt(s)?en(u,s):tn(u,s)}},"$e"),en=g((o,s)=>a=>{const l=a.index,u=a.input;o.lastIndex=l;const p=o.exec(u);if(p){const h=o.lastIndex;if(!a.options.silent){const j=s(...p,u,`${l}`);V(j)||a.output.push(j)}return a.index=h,!0}else return!1},"Ee"),tn=g((o,s)=>a=>{const l=a.index,u=a.input;if(o.lastIndex=l,o.test(u)){const p=o.lastIndex;if(!V(s)&&!a.options.silent){const h=L(s)?s(u.slice(l,p),u,`${l}`):s;V(h)||a.output.push(h)}return a.index=p,!0}else return!1},"Ce"),wt=g((o,s)=>a=>{const l=a.index,u=a.input;if(u.startsWith(o,l)){if(!V(s)&&!a.options.silent){const p=L(s)?s(o,u,`${l}`):s;V(p)||a.output.push(p)}return a.index+=o.length,!0}else return!1},"F"),rt=g((o,s,a,l)=>{const u=q(o),p=s>1;return ot(nt(xt(h=>{let j=0;for(;j<a;){const S=h.index;if(!u(h)||(j+=1,h.index===S))break}return j>=s},p),l))},"k"),jt=g((o,s)=>rt(o,0,1,s),"L"),Ie=g((o,s)=>rt(o,0,1/0,s),"$"),rn=g((o,s)=>rt(o,1,1/0,s),"Re"),ne=g((o,s)=>{const a=o.map(q);return ot(nt(xt(l=>{for(let u=0,p=a.length;u<p;u++)if(!a[u](l))return!1;return!0}),s))},"x"),N=g((o,s)=>{const a=o.map(q);return ot(nt(l=>{for(let u=0,p=a.length;u<p;u++)if(a[u](l))return!0;return!1},s))},"p"),xt=g((o,s=!0,a=!1)=>{const l=q(o);return s?u=>{const p=u.index,h=u.output.length,j=l(u);return!j&&!a&&(u.indexBacktrackMax=Math.max(u.indexBacktrackMax,u.index)),(!j||a)&&(u.index=p,u.output.length!==h&&(u.output.length=h)),j}:l},"q"),nt=g((o,s)=>{const a=q(o);return s?l=>{if(l.options.silent)return a(l);const u=l.output.length;if(a(l)){const p=l.output.splice(u,1/0),h=s(p);return V(h)||l.output.push(h),!0}else return!1}:a},"B"),ot=(()=>{let o=0;return s=>{const a=q(s),l=o+=1;return u=>{var p;if(u.options.memoization===!1)return a(u);const h=u.index,j=(p=u.cache)[l]||(p[l]={indexMax:-1,queue:[]}),S=j.queue;if(h<=j.indexMax){const he=j.store||(j.store=new Map);if(S.length){for(let se=0,ao=S.length;se<ao;se+=2){const co=S[se*2],uo=S[se*2+1];he.set(co,uo)}S.length=0}const M=he.get(h);if(M===!1)return!1;if(Kr(M))return u.index=M,!0;if(M)return u.index=M.index,M.output?.length&&u.output.push(...M.output),!0}const me=u.output.length,io=a(u);if(j.indexMax=Math.max(j.indexMax,h),io){const he=u.index,M=u.output.length;if(M>me){const se=u.output.slice(me,M);S.push(h,{index:he,output:se})}else S.push(h,he);return!0}else return S.push(h,!1),!1}}})(),Ot=g(o=>{let s;return a=>(s||(s=q(o())),s(a))},"G"),q=Xr(o=>{if(L(o))return et(o)?Ot(o):o;if(vt(o)||Jr(o))return b(o);if(re(o))return ne(o);if(Gr(o))return N(Object.values(o));throw new Error("Invalid rule")}),X=g(o=>o,"d"),nn=g(o=>typeof o=="string","ke"),on=g(o=>{const s=new WeakMap,a=new WeakMap;return(l,u)=>{const p=u?.partial?a:s,h=p.get(l);if(h!==void 0)return h;const j=o(l,u);return p.set(l,j),j}},"Be"),sn=g(o=>{const s={},a={};return(l,u)=>{const p=u?.partial?a:s;return p[l]??(p[l]=o(l,u))}},"Pe"),an=b(/\\./,X),cn=b(/./,X),un=b(/\*\*\*+/,"*"),ln=b(/([^/{[(!])\*\*/,(o,s)=>`${s}*`),fn=b(/(^|.)\*\*(?=[^*/)\]}])/,(o,s)=>`${s}*`),pn=Ie(N([an,un,ln,fn,cn])),dn=pn,gn=g(o=>$t(o,dn,{memoization:!1}).join(""),"Ie"),mn=gn,kt="abcdefghijklmnopqrstuvwxyz",hn=g(o=>{let s="";for(;o>0;){const a=(o-1)%26;s=kt[a]+s,o=Math.floor((o-1)/26)}return s},"Le"),Pt=g(o=>{let s=0;for(let a=0,l=o.length;a<l;a++)s=s*26+kt.indexOf(o[a])+1;return s},"V"),st=g((o,s)=>{if(s<o)return st(s,o);const a=[];for(;o<=s;)a.push(o++);return a},"b"),yn=g((o,s,a)=>st(o,s).map(l=>String(l).padStart(a,"0")),"qe"),Tt=g((o,s)=>st(Pt(o),Pt(s)).map(hn),"W"),T=g(o=>({partial:!1,regex:new RegExp(o,"s"),children:[]}),"c"),ge=g(o=>({children:o}),"y"),oe=(()=>{const o=g((s,a,l)=>{if(l.has(s))return;l.add(s);const{children:u}=s;if(!u.length)u.push(a);else for(let p=0,h=u.length;p<h;p++)o(u[p],a,l)},"e");return s=>{if(!s.length)return ge([]);for(let a=s.length-1;a>=1;a--){const l=new Set,u=s[a-1],p=s[a];o(u,p,l)}return s[0]}})(),K=g(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),bn=b(/\\./,T),vn=b(/[$.*+?^(){}[\]\|]/,o=>T(`\\${o}`)),$n=b(/[\\\/]/,K),wn=b(/[^$.*+?^(){}[\]\|\\\/]+/,T),jn=b(/^(?:!!)*!(.*)$/,(o,s)=>T(`(?!^${Bt.compile(s).source}$).*?`)),xn=b(/^(!!)+/),On=N([jn,xn]),kn=b(/\/(\*\*\/)+/,()=>ge([oe([K(),T(".+?"),K()]),K()])),Pn=b(/^(\*\*\/)+/,()=>ge([T("^"),oe([T(".*?"),K()])])),Tn=b(/\/(\*\*)$/,()=>ge([oe([K(),T(".*?")]),T("$")])),En=b(/\*\*/,()=>T(".*?")),Et=N([kn,Pn,Tn,En]),Sn=b(/\*\/(?!\*\*\/|\*$)/,()=>oe([T("[^\\\\/]*?"),K()])),Cn=b(/\*/,()=>T("[^\\\\/]*")),St=N([Sn,Cn]),Ct=b("?",()=>T("[^\\\\/]")),An=b("[",X),_n=b("]",X),Nn=b(/[!^]/,"^\\\\/"),Mn=b(/[a-z]-[a-z]|[0-9]-[0-9]/i,X),Bn=b(/\\./,X),Dn=b(/[$.*+?^(){}[\|]/,o=>`\\${o}`),zn=b(/[\\\/]/,"\\\\/"),Rn=b(/[^$.*+?^(){}[\]\|\\\/]+/,X),In=N([Bn,Dn,zn,Mn,Rn]),At=ne([An,jt(Nn),Ie(In),_n],o=>T(o.join(""))),Fn=b("{","(?:"),Ln=b("}",")"),Wn=b(/(\d+)\.\.(\d+)/,(o,s,a)=>yn(+s,+a,Math.min(s.length,a.length)).join("|")),Un=b(/([a-z]+)\.\.([a-z]+)/,(o,s,a)=>Tt(s,a).join("|")),Vn=b(/([A-Z]+)\.\.([A-Z]+)/,(o,s,a)=>Tt(s.toLowerCase(),a.toLowerCase()).join("|").toUpperCase()),qn=N([Wn,Un,Vn]),_t=ne([Fn,qn,Ln],o=>T(o.join(""))),Kn=b("{"),Gn=b("}"),Jn=b(","),Zn=b(/\\./,T),Hn=b(/[$.*+?^(){[\]\|]/,o=>T(`\\${o}`)),Xn=b(/[\\\/]/,K),Qn=b(/[^$.*+?^(){}[\]\|\\\/,]+/,T),Yn=Ot(()=>Mt),eo=b("",()=>T("(?:)")),to=rn(N([Et,St,Ct,At,_t,Yn,Zn,Hn,Xn,Qn]),oe),Nt=N([to,eo]),Mt=ne([Kn,jt(ne([Nt,Ie(ne([Jn,Nt]))])),Gn],ge),ro=Ie(N([On,Et,St,Ct,At,_t,Mt,bn,vn,$n,wn]),oe),no=ro,oo=g(o=>$t(o,no,{memoization:!1})[0],"kr"),so=oo,it=g((o,s,a)=>it.compile(o,a).test(s),"N");it.compile=(()=>{const o=sn((a,l)=>te(so(mn(a)),l)),s=on((a,l)=>Ye(a.map(u=>o(u,l))));return(a,l)=>nn(a)?o(a,l):s(a,l)})();var Bt=it;return d(v)})();return e.default||e},"_lazyMatch"),at;const Go=g((e,t)=>(at||(at=It(),It=null),at(e,t)),"default");var Jo=Object.defineProperty,Zo=pt((e,t)=>Jo(e,"name",{value:t,configurable:!0}),"t$1");const Ho=/^[A-Z]:\//i,R=Zo((e="")=>e&&e.replaceAll("\\","/").replace(Ho,t=>t.toUpperCase()),"normalizeWindowsPath");var Xo=Object.defineProperty,C=pt((e,t)=>Xo(e,"name",{value:t,configurable:!0}),"r");const Qo=/^[/\\]{2}/,Yo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,pr=/^[A-Z]:$/i,Ft=/^\/([A-Z]:)?$/i,es=/.(\.[^./]+)$/,ts=/^[/\\]|^[a-z]:[/\\]/i,rs=/\/$/,ns=C(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),dr=C((e,t)=>{let r="",n=0,i=-1,c=0,f;for(let d=0;d<=e.length;++d){if(d<e.length)f=e[d];else{if(f==="/")break;f="/"}if(f==="/"){if(!(i===d-1||c===1))if(c===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const v=r.lastIndexOf("/");v===-1?(r="",n=0):(r=r.slice(0,v),n=r.length-1-r.lastIndexOf("/")),i=d,c=0;continue}else if(r.length>0){r="",n=0,i=d,c=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(i+1,d)}`:r=e.slice(i+1,d),n=d-i-1;i=d,c=0}else f==="."&&c!==-1?++c:c=-1}return r},"normalizeString"),Q=C(e=>Yo.test(e),"isAbsolute"),gr=C(function(e){if(e.length===0)return".";e=R(e);const t=Qo.exec(e),r=Q(e),n=e.at(-1)==="/";return e=dr(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),pr.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!Q(e)?`/${e}`:e)},"normalize"),B=C((...e)=>{let t="";for(const r of e)if(r)if(t.length>0){const n=t.at(-1)==="/",i=r[0]==="/";n&&i?t+=r.slice(1):t+=n||i?r:`/${r}`}else t+=r;return gr(t)},"join"),W=C(function(...e){e=e.map(n=>R(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:ns();!i||i.length===0||(t=`${i}/${t}`,r=Q(i))}return t=dr(t,!r),r&&!Q(t)?`/${t}`:t.length>0?t:"."},"resolve");C(function(e){return R(e)},"toNamespacedPath");const mr=C(function(e){return es.exec(R(e))?.[1]??""},"extname");C(function(e,t){const r=W(e).replace(Ft,"$1").split("/"),n=W(t).replace(Ft,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const i=[...r];for(const c of i){if(n[0]!==c)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Ae=C(e=>{const t=R(e).replace(rs,"").split("/").slice(0,-1);return t.length===1&&pr.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Q(e)?"/":".")},"dirname");C(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return R(e.root?W(...t):t.join("/"))},"format");const os=C((e,t)=>{const r=R(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),hr=C(function(e){const t=ts.exec(e)?.[0]?.replaceAll("\\","/")??"",r=os(e),n=mr(r);return{base:r,dir:Ae(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"parse");C((e,t)=>Go(t,gr(e)),"matchesGlob");var ss=Object.defineProperty,Y=k((e,t)=>ss(e,"name",{value:t,configurable:!0}),"n$2"),is=Object.defineProperty,U=Y((e,t)=>is(e,"name",{value:t,configurable:!0}),"a");const as=pe(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cs=U(e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,r]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ve.getBuiltinModule(e)}return as(e)},"__cjs_getBuiltinModule"),{fileURLToPath:us}=cs("node:url");var ls=Object.defineProperty,le=U((e,t)=>ls(e,"name",{value:t,configurable:!0}),"t$1");function de(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(de,"ue");z(de,"de");k(de,"m$4");Y(de,"d");U(de,"getDefaultExportFromCjs");le(de,"getDefaultExportFromCjs");function _e(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(_e,"me");z(_e,"je");k(_e,"h");Y(_e,"O");U(_e,"getDefaultExportFromNamespaceIfPresent");le(_e,"getDefaultExportFromNamespaceIfPresent");function Ne(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}m(Ne,"he");z(Ne,"Oe");k(Ne,"x");Y(Ne,"P");U(Ne,"getDefaultExportFromNamespaceIfNotNamed");le(Ne,"getDefaultExportFromNamespaceIfNotNamed");function Me(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=le(U(Y(k(z(m(function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"c"),"c"),"a"),"s"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:le(function(){return e[n]},"get")})}),r}m(Me,"ye");z(Me,"Pe");k(Me,"y$2");Y(Me,"_");U(Me,"getAugmentedNamespace");le(Me,"getAugmentedNamespace");var Lt,Wt;function Be(){return Wt||(Wt=1,Lt=["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"]),Lt}m(Be,"be");z(Be,"_e");k(Be,"w$1");Y(Be,"k");U(Be,"requireBinaryExtensions");var fs=Be();const ps=de(fs);var ds=Object.defineProperty,I=U((e,t)=>ds(e,"name",{value:t,configurable:!0}),"r");const gs=new Set(ps),ms=new Set(["/","\\",void 0]),Ut=Symbol.for("pathe:normalizedAlias"),hs=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,ys=I((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),Le=I((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),yr=I(e=>{if(e[Ut])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[n])=>ys(r,n)));for(const r in t)for(const n in t)n===r||r.startsWith(n)||t[r].startsWith(n)&&ms.has(t[r][n.length])&&(t[r]=t[n]+t[r].slice(n.length));return Object.defineProperty(t,Ut,{enumerable:!1,value:!0}),t},"normalizeAliases");I((e,t)=>{e=R(e),t=yr(t);for(const[r,n]of Object.entries(t)){if(!e.startsWith(r))continue;const i=Le(r)?r.slice(0,-1):r;if(Le(e[i.length]))return B(n,e.slice(r.length))}return e},"resolveAlias");I(e=>hs.exec(e)?.[2],"filename");I((e,t)=>{e=R(e),t=yr(t);for(const[r,n]of Object.entries(t).toReversed()){if(!e.startsWith(n))continue;const i=Le(n)?n.slice(0,-1):n;if(Le(e[i.length]))return B(r,e.slice(n.length))}return e},"reverseResolveAlias");const bs=/^(?:\.?\.[/\\]|\.\.\B)/,vs=/^(?:msys|cygwin)$/;I(e=>bs.test(e)||e==="..","isRelative");I(e=>gs.has(mr(e).slice(1).toLowerCase()),"isBinaryPath");const fe=I(e=>R(e instanceof URL?us(e):e),"toPath");I(()=>{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:vs.test(e)},"isWindows");var $s=Object.defineProperty,ws=k((e,t)=>$s(e,"name",{value:t,configurable:!0}),"p"),js=Object.defineProperty,br=ws((e,t)=>js(e,"name",{value:t,configurable:!0}),"a");const xs=pe(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vr=br(e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,r]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return $e.getBuiltinModule(e)}return xs(e)},"__cjs_getBuiltinModule"),{stat:Os,lstat:ks}=vr("node:fs/promises"),{fileURLToPath:Ps}=vr("node:url");var Ts=Object.defineProperty,Vt=br((e,t)=>Ts(e,"name",{value:t,configurable:!0}),"n");const Es=Vt(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 r=t.cwd?fe(t.cwd):process.cwd();let n=W(r);const{root:i}=hr(n),c=fe(t.stopAt??i),f=W(n,c),d=t.type??"file",v=Vt(async function($){return typeof e=="function"?[await e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const w=t.allowSymlinks?Os:ks;for(;n&&n!==f&&n!==i;){const $=await v(n);for(let y of $){if(y===lr)return;if(y===void 0)continue;Buffer.isBuffer(y)?y=y.toString():y instanceof URL&&(y=Ps(y));const E=Q(y)?y:W(n,y);try{const P=await w(E);if(d==="file"&&P.isFile()||d==="directory"&&P.isDirectory())return E}catch{}}n=Ae(n)}},"findUp");var Ss=Object.defineProperty,Cs=k((e,t)=>Ss(e,"name",{value:t,configurable:!0}),"u$3"),As=Object.defineProperty,$r=Cs((e,t)=>As(e,"name",{value:t,configurable:!0}),"i");const _s=pe(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wr=$r(e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,r]=we.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return we.getBuiltinModule(e)}return _s(e)},"__cjs_getBuiltinModule"),{statSync:Ns,lstatSync:Ms}=wr("node:fs"),{fileURLToPath:Bs}=wr("node:url");var Ds=Object.defineProperty,qt=$r((e,t)=>Ds(e,"name",{value:t,configurable:!0}),"o");const zs=qt((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 r=t.cwd?fe(t.cwd):process.cwd();let n=W(r);const{root:i}=hr(n),c=fe(t.stopAt??i),f=W(n,c),d=t.type??"file",v=qt(function($){return typeof e=="function"?[e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const w=t.allowSymlinks?Ns:Ms;for(;n&&n!==f&&n!==i;){for(let $ of v(n)){if($===lr)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=Bs($));const y=Q($)?$:W(n,$);try{const E=w(y);if(d==="file"&&E.isFile()||d==="directory"&&E.isDirectory())return y}catch{}}n=Ae(n)}},"findUpSync");var Rs=Object.defineProperty,jr=k((e,t)=>Rs(e,"name",{value:t,configurable:!0}),"t$2"),Is=Object.defineProperty,dt=jr((e,t)=>Is(e,"name",{value:t,configurable:!0}),"s");const Fs=pe(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ls=dt(e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,r]=je.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return je.getBuiltinModule(e)}return Fs(e)},"__cjs_getBuiltinModule"),{access:Ws}=Ls("node:fs/promises");var Us=Object.defineProperty,Vs=dt((e,t)=>Us(e,"name",{value:t,configurable:!0}),"o");async function G(e,t=ur){ft(e),e=fe(e);try{return await Ws(e,t),!0}catch{return!1}}m(G,"D$2");z(G,"G");k(G,"i$1");jr(G,"d");dt(G,"m");Vs(G,"isAccessible");var qs=Object.defineProperty,xr=k((e,t)=>qs(e,"name",{value:t,configurable:!0}),"t$1"),Ks=Object.defineProperty,gt=xr((e,t)=>Ks(e,"name",{value:t,configurable:!0}),"t");const Gs=pe(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Js=gt(e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,r]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return xe.getBuiltinModule(e)}return Gs(e)},"__cjs_getBuiltinModule"),{accessSync:Zs}=Js("node:fs");var Hs=Object.defineProperty,Xs=gt((e,t)=>Hs(e,"name",{value:t,configurable:!0}),"o");function J(e,t=ur){ft(e),e=fe(e);try{return Zs(e,t),!0}catch{return!1}}m(J,"I$2");z(J,"V");k(J,"i");xr(J,"d");gt(J,"m");Xs(J,"isAccessibleSync");var Qs=Object.defineProperty,Or=k((e,t)=>Qs(e,"name",{value:t,configurable:!0}),"o"),Ys=Object.defineProperty,kr=Or((e,t)=>Ys(e,"name",{value:t,configurable:!0}),"o"),ei=Object.defineProperty,ti=kr((e,t)=>ei(e,"name",{value:t,configurable:!0}),"o");class Pr extends Error{static{m(this,"$t")}static{z(this,"wt")}static{k(this,"s")}static{Or(this,"u")}static{kr(this,"n")}static{ti(this,"NotFoundError")}constructor(t){super(`ENOENT: ${t}`)}get code(){return"ENOENT"}set code(t){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(t){throw new Error("Cannot overwrite name of NotFoundError")}}var ri=Object.defineProperty,mt=k((e,t)=>ri(e,"name",{value:t,configurable:!0}),"u");const We=mt((e,t)=>(t?.create&&Wo(e),e),"useDirectory");mt(async(e,t)=>{if(ce.CACHE_DIR&&!["0","1","false","true"].includes(ce.CACHE_DIR))return We(B(ce.CACHE_DIR,e),t);const r=await Es("package.json",{cwd:t?.cwd??cr(),type:"file"});if(!r){if(t?.throwError)throw new Pr("No such file or directory found.");return}const n=B(Ae(r),"node_modules"),i=B(n,".cache"),c=B(i,e);if(!(ae(c)&&!await G(c,ue))&&!(ae(i)&&!await G(i,ue))&&!(ae(n)&&!await G(n,ue)))return We(c,t)},"findCacheDirectory");const ni=mt((e,t)=>{if(ce.CACHE_DIR&&!["0","1","false","true"].includes(ce.CACHE_DIR))return We(B(ce.CACHE_DIR,e),t);const r=zs("package.json",{cwd:t?.cwd??cr(),type:"file"});if(!r){if(t?.throwError)throw new Pr("No such file or directory found.");return}const n=B(Ae(r),"node_modules"),i=B(n,".cache"),c=B(i,e);if(!(ae(c)&&!J(c,ue))&&!(ae(i)&&!J(i,ue))&&!(ae(n)&&!J(n,ue)))return We(c,t)},"findCacheDirectorySync"),Tr=ni;var oi=Object.defineProperty,si=m((e,t)=>oi(e,"name",{value:t,configurable:!0}),"i$7"),ii=Object.defineProperty,ai=si((e,t)=>ii(e,"name",{value:t,configurable:!0}),"r"),ci=Object.defineProperty,ui=ai((e,t)=>ci(e,"name",{value:t,configurable:!0}),"i");const Kt=ui(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var li=Object.defineProperty,fi=m((e,t)=>li(e,"name",{value:t,configurable:!0}),"i$6"),pi=Object.defineProperty,Er=fi((e,t)=>pi(e,"name",{value:t,configurable:!0}),"s");const di=Se(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gi=Er(e=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[t,r]=Oe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Oe.getBuiltinModule(e)}return di(e)},"__cjs_getBuiltinModule"),{lstatSync:Gt,mkdirSync:mi}=gi("node:fs");var hi=Object.defineProperty,yi=Er((e,t)=>hi(e,"name",{value:t,configurable:!0}),"o");const Ue=yi(e=>{nr(e);try{const t=Gt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Kt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{mi(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Gt(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Kt(r))}'`,{cause:t})}},"ensureDirSync");var bi=Object.defineProperty,vi=m((e,t)=>bi(e,"name",{value:t,configurable:!0}),"x$2"),$i=Object.defineProperty,Sr=vi((e,t)=>$i(e,"name",{value:t,configurable:!0}),"$"),wi=Object.defineProperty,ji=Sr((e,t)=>wi(e,"name",{value:t,configurable:!0}),"A"),xi=Object.defineProperty,ht=ji((e,t)=>xi(e,"name",{value:t,configurable:!0}),"$"),Oi=Object.defineProperty,ki=ht((e,t)=>Oi(e,"name",{value:t,configurable:!0}),"r$1");const Pi=ki(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
- `),"normalizeLF"),Ti=globalThis.process??Object.create(null),Jt={versions:{}},Zt=new Proxy(Ti,{get(e,t){if(t in e)return e[t];if(t in Jt)return Jt[t]}});var Ei=Object.defineProperty,Si=ht((e,t)=>Ei(e,"name",{value:t,configurable:!0}),"b");const Ci=Si((e,t,r,n)=>{const i={column:0,line:-1,...e.start},c={...i,...e.end},f=i.line,d=i.column,v=c.line,w=c.column;let $=Math.max(f-(r+1),0),y=Math.min(t.length,v+n);f===-1&&($=0),v===-1&&(y=t.length);const E=v-f,P={};if(E)for(let x=0;x<=E;x++){const _=x+f;if(!d)P[_]=!0;else if(x===0){const F=t[_-1]?.length;P[_]=[d,(F??0)-d+1]}else if(x===E)P[_]=[0,w];else{const F=t[_-x]?.length;P[_]=[0,F]}}else d===w?P[f]=d?[d,0]:!0:P[f]=[d,(w??0)-(d??0)];return{end:y,markerLines:P,start:$}},"getMarkerLines");var Ai=Object.defineProperty,Fe=ht((e,t)=>Ai(e,"name",{value:t,configurable:!0}),"t");const _i=Zt.platform==="win32"&&!Zt.env?.WT_SESSION?">":"❯",Ni=Fe((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:Fe(x=>x,"gutter"),marker:Fe(x=>x,"marker"),message:Fe(x=>x,"message"),...r?.color}},i=typeof t.start.column=="number";let c=Pi(e).split(`
3
- `);typeof n.tabWidth=="number"&&(c=c.map(x=>x.replaceAll(" "," ".repeat(n.tabWidth))));const{end:f,markerLines:d,start:v}=Ci(t,c,n.linesAbove,n.linesBelow),w=String(f).length,{gutter:$,marker:y,message:E}=n.color;let P=c.slice(v,f).map((x,_)=>{const F=v+1+_,te=d[F],Qe=` ${String(F)}`.slice(-w),Ye=!d[F+1],re=` ${Qe}${n.showGutter?" |":""}`;if(te){let L="";if(Array.isArray(te)){const et=x.replaceAll(/[^\t]/g," ").slice(0,Math.max(te[0]-1,0)),tt=te[1]||1;L=[`
4
- `,n.prefix+$(re.replaceAll(/\d/g," "))," ",et,y("^").repeat(tt)].join(""),Ye&&n.message&&(L+=` ${E(n.message)}`)}return[n.prefix+y(_i),$(re),x.length>0?` ${x}`:"",L].join("")}return`${n.prefix} ${$(re)}${x.length>0?` ${x}`:""}`}).join(`
1
+ var co=Object.defineProperty;var m=(e,t)=>co(e,"name",{value:t,configurable:!0});import{createRequire as uo}from"node:module";import{f as nr,$ as mo,U as or,i as B,_ as Bt,K as Ce,s as ho,M as A,a as sr}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{createJiti as ir}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const lo=uo(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lt=m(e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,r]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ye.getBuiltinModule(e)}return lo(e)},"__cjs_getBuiltinModule"),{createHash:tr}=lt("node:crypto"),{readdirSync:rr,readFileSync:fo,copyFileSync:po,unlinkSync:go}=lt("node:fs"),{createRequire:Se}=lt("node:module");var yo=Object.defineProperty,D=m((e,t)=>yo(e,"name",{value:t,configurable:!0}),"O$2"),bo=Object.defineProperty,k=D((e,t)=>bo(e,"name",{value:t,configurable:!0}),"h");const vo=Se(import.meta.url),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ar=k(e=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[t,r]=ae.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ae.getBuiltinModule(e)}return vo(e)},"__cjs_getBuiltinModule"),{existsSync:ce}=ar("node:fs"),{env:ue,cwd:cr}=ae,{createRequire:pe}=ar("node:module"),ur=0,le=2,lr=Symbol("findUpStop");var $o=Object.defineProperty,wo=k((e,t)=>$o(e,"name",{value:t,configurable:!0}),"t$4"),jo=Object.defineProperty,xo=wo((e,t)=>jo(e,"name",{value:t,configurable:!0}),"t"),Oo=Object.defineProperty,ko=xo((e,t)=>Oo(e,"name",{value:t,configurable:!0}),"n");const ft=ko(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Po=Object.defineProperty,To=k((e,t)=>Po(e,"name",{value:t,configurable:!0}),"i$4"),Eo=Object.defineProperty,So=To((e,t)=>Eo(e,"name",{value:t,configurable:!0}),"r"),Co=Object.defineProperty,Ao=So((e,t)=>Co(e,"name",{value:t,configurable:!0}),"i");const Dt=Ao(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var _o=Object.defineProperty,No=k((e,t)=>_o(e,"name",{value:t,configurable:!0}),"i$3"),Mo=Object.defineProperty,fr=No((e,t)=>Mo(e,"name",{value:t,configurable:!0}),"s");const zo=pe(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bo=fr(e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,r]=be.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return be.getBuiltinModule(e)}return zo(e)},"__cjs_getBuiltinModule"),{lstatSync:It,mkdirSync:Do}=Bo("node:fs");var Io=Object.defineProperty,Ro=fr((e,t)=>Io(e,"name",{value:t,configurable:!0}),"o");const Fo=Ro(e=>{ft(e);try{const t=It(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Dt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Do(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=It(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Dt(r))}'`,{cause:t})}},"ensureDirSync");var Wo=Object.defineProperty,Lo=k((e,t)=>Wo(e,"name",{value:t,configurable:!0}),"$e"),Vo=Object.defineProperty,pt=Lo((e,t)=>Vo(e,"name",{value:t,configurable:!0}),"W"),Uo=Object.defineProperty,g=pt((e,t)=>Uo(e,"name",{value:t,configurable:!0}),"u$1");let Rt=g(()=>{var e=(()=>{var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,c=g((o,s)=>{for(var a in s)t(o,a,{get:s[a],enumerable:!0})},"ne"),f=g((o,s,a,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let u of n(s))!i.call(o,u)&&u!==a&&t(o,u,{get:g(()=>s[u],"get"),enumerable:!(l=r(s,u))||l.enumerable});return o},"ae"),d=g(o=>f(t({},"__esModule",{value:!0}),o),"oe"),v={};c(v,{zeptomatch:g(()=>zt,"zeptomatch")});var w=g(o=>{const s=new Set,a=[o];for(let l=0;l<a.length;l++){const u=a[l];if(s.has(u))continue;s.add(u);const{children:p}=u;if(p?.length)for(let h=0,j=p.length;h<j;h++)a.push(p[h])}return Array.from(s)},"M"),$=g(o=>{let s="";const a=w(o);for(let l=0,u=a.length;l<u;l++){const p=a[l];if(!p.regex)continue;const h=p.regex.flags;if(s||(s=h),s!==h)throw new Error(`Inconsistent RegExp flags used: "${s}" and "${h}"`)}return s},"se"),y=g((o,s,a)=>{const l=a.get(o);if(l!==void 0)return l;const u=o.partial??s;let p="";if(o.regex&&(p+=u?"(?:$|":"",p+=o.regex.source),o.children?.length){const h=P(o.children.map(j=>y(j,s,a)).filter(Boolean));if(h?.length){const j=o.children.some(me=>!me.regex||!(me.partial??s)),S=h.length>1||u&&(!p.length||j);p+=S?u?"(?:$|":"(?:":"",p+=h.join("|"),p+=S?")":""}}return o.regex&&(p+=u?")":""),a.set(o,p),p},"O"),E=g((o,s)=>{const a=new Map,l=w(o);for(let u=l.length-1;u>=0;u--){const p=y(l[u],s,a);if(!(u>0))return p}return""},"ie"),P=g(o=>Array.from(new Set(o)),"ue"),x=g((o,s,a)=>x.compile(o,a).test(s),"R");x.compile=(o,s)=>{const a=s?.partial??!1,l=E(o,a),u=$(o);return new RegExp(`^(?:${l})$`,u)};var _=x,F=g((o,s)=>{const a=_.compile(o,s),l=`${a.source.slice(0,-1)}[\\\\/]?$`,u=a.flags;return new RegExp(l,u)},"le"),re=F,Ye=g(o=>{const s=o.map(l=>l.source).join("|")||"$^",a=o[0]?.flags;return new RegExp(s,a)},"ve"),Qe=Ye,ne=g(o=>Array.isArray(o),"j"),W=g(o=>typeof o=="function","_"),et=g(o=>o.length===0,"he"),tt=(()=>{const{toString:o}=Function.prototype,s=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return a=>(a.length===0||a.length===1)&&s.test(o.call(a))})(),Ur=g(o=>typeof o=="number","de"),qr=g(o=>typeof o=="object"&&o!==null,"xe"),Kr=g(o=>o instanceof RegExp,"me"),Gr=(()=>{const o=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return s=>o.test(s.source)})(),Jr=(()=>{const o=/^[a-zA-Z0-9_-]+$/;return s=>o.test(s.source)&&!s.flags.includes("i")})(),vt=g(o=>typeof o=="string","A"),U=g(o=>o===void 0,"f"),Hr=g(o=>{const s=new Map;return a=>{const l=s.get(a);if(l!==void 0)return l;const u=o(a);return s.set(a,u),u}},"ye"),$t=g((o,s,a={})=>{const l={cache:{},input:o,index:0,indexBacktrackMax:0,options:a,output:[]},u=q(s)(l),p=Math.max(l.index,l.indexBacktrackMax);if(u&&l.index===o.length)return l.output;throw new Error(`Failed to parse at index ${p}`)},"I"),b=g((o,s)=>ne(o)?Zr(o,s):vt(o)?wt(o,s):Xr(o,s),"i"),Zr=g((o,s)=>{const a={};for(const l of o){if(l.length!==1)throw new Error(`Invalid character: "${l}"`);const u=l.charCodeAt(0);a[u]=!0}return l=>{const u=l.input;let p=l.index,h=p;for(;h<u.length&&u.charCodeAt(h)in a;)h+=1;if(h>p){if(!U(s)&&!l.options.silent){const j=u.slice(p,h),S=W(s)?s(j,u,`${p}`):s;U(S)||l.output.push(S)}l.index=h}return!0}},"we"),Xr=g((o,s)=>{if(Jr(o))return wt(o.source,s);{const a=o.source,l=o.flags.replace(/y|$/,"y"),u=new RegExp(a,l);return Gr(o)&&W(s)&&!tt(s)?Yr(u,s):Qr(u,s)}},"$e"),Yr=g((o,s)=>a=>{const l=a.index,u=a.input;o.lastIndex=l;const p=o.exec(u);if(p){const h=o.lastIndex;if(!a.options.silent){const j=s(...p,u,`${l}`);U(j)||a.output.push(j)}return a.index=h,!0}else return!1},"Ee"),Qr=g((o,s)=>a=>{const l=a.index,u=a.input;if(o.lastIndex=l,o.test(u)){const p=o.lastIndex;if(!U(s)&&!a.options.silent){const h=W(s)?s(u.slice(l,p),u,`${l}`):s;U(h)||a.output.push(h)}return a.index=p,!0}else return!1},"Ce"),wt=g((o,s)=>a=>{const l=a.index,u=a.input;if(u.startsWith(o,l)){if(!U(s)&&!a.options.silent){const p=W(s)?s(o,u,`${l}`):s;U(p)||a.output.push(p)}return a.index+=o.length,!0}else return!1},"F"),rt=g((o,s,a,l)=>{const u=q(o),p=s>1;return ot(nt(xt(h=>{let j=0;for(;j<a;){const S=h.index;if(!u(h)||(j+=1,h.index===S))break}return j>=s},p),l))},"k"),jt=g((o,s)=>rt(o,0,1,s),"L"),Re=g((o,s)=>rt(o,0,1/0,s),"$"),en=g((o,s)=>rt(o,1,1/0,s),"Re"),oe=g((o,s)=>{const a=o.map(q);return ot(nt(xt(l=>{for(let u=0,p=a.length;u<p;u++)if(!a[u](l))return!1;return!0}),s))},"x"),N=g((o,s)=>{const a=o.map(q);return ot(nt(l=>{for(let u=0,p=a.length;u<p;u++)if(a[u](l))return!0;return!1},s))},"p"),xt=g((o,s=!0,a=!1)=>{const l=q(o);return s?u=>{const p=u.index,h=u.output.length,j=l(u);return!j&&!a&&(u.indexBacktrackMax=Math.max(u.indexBacktrackMax,u.index)),(!j||a)&&(u.index=p,u.output.length!==h&&(u.output.length=h)),j}:l},"q"),nt=g((o,s)=>{const a=q(o);return s?l=>{if(l.options.silent)return a(l);const u=l.output.length;if(a(l)){const p=l.output.splice(u,1/0),h=s(p);return U(h)||l.output.push(h),!0}else return!1}:a},"B"),ot=(()=>{let o=0;return s=>{const a=q(s),l=o+=1;return u=>{var p;if(u.options.memoization===!1)return a(u);const h=u.index,j=(p=u.cache)[l]||(p[l]={indexMax:-1,queue:[]}),S=j.queue;if(h<=j.indexMax){const he=j.store||(j.store=new Map);if(S.length){for(let ie=0,so=S.length;ie<so;ie+=2){const io=S[ie*2],ao=S[ie*2+1];he.set(io,ao)}S.length=0}const M=he.get(h);if(M===!1)return!1;if(Ur(M))return u.index=M,!0;if(M)return u.index=M.index,M.output?.length&&u.output.push(...M.output),!0}const me=u.output.length,oo=a(u);if(j.indexMax=Math.max(j.indexMax,h),oo){const he=u.index,M=u.output.length;if(M>me){const ie=u.output.slice(me,M);S.push(h,{index:he,output:ie})}else S.push(h,he);return!0}else return S.push(h,!1),!1}}})(),Ot=g(o=>{let s;return a=>(s||(s=q(o())),s(a))},"G"),q=Hr(o=>{if(W(o))return et(o)?Ot(o):o;if(vt(o)||Kr(o))return b(o);if(ne(o))return oe(o);if(qr(o))return N(Object.values(o));throw new Error("Invalid rule")}),Y=g(o=>o,"d"),tn=g(o=>typeof o=="string","ke"),rn=g(o=>{const s=new WeakMap,a=new WeakMap;return(l,u)=>{const p=u?.partial?a:s,h=p.get(l);if(h!==void 0)return h;const j=o(l,u);return p.set(l,j),j}},"Be"),nn=g(o=>{const s={},a={};return(l,u)=>{const p=u?.partial?a:s;return p[l]??(p[l]=o(l,u))}},"Pe"),on=b(/\\./,Y),sn=b(/./,Y),an=b(/\*\*\*+/,"*"),cn=b(/([^/{[(!])\*\*/,(o,s)=>`${s}*`),un=b(/(^|.)\*\*(?=[^*/)\]}])/,(o,s)=>`${s}*`),ln=Re(N([on,an,cn,un,sn])),fn=ln,pn=g(o=>$t(o,fn,{memoization:!1}).join(""),"Ie"),dn=pn,kt="abcdefghijklmnopqrstuvwxyz",gn=g(o=>{let s="";for(;o>0;){const a=(o-1)%26;s=kt[a]+s,o=Math.floor((o-1)/26)}return s},"Le"),Pt=g(o=>{let s=0;for(let a=0,l=o.length;a<l;a++)s=s*26+kt.indexOf(o[a])+1;return s},"V"),st=g((o,s)=>{if(s<o)return st(s,o);const a=[];for(;o<=s;)a.push(o++);return a},"b"),mn=g((o,s,a)=>st(o,s).map(l=>String(l).padStart(a,"0")),"qe"),Tt=g((o,s)=>st(Pt(o),Pt(s)).map(gn),"W"),T=g(o=>({partial:!1,regex:new RegExp(o,"s"),children:[]}),"c"),ge=g(o=>({children:o}),"y"),se=(()=>{const o=g((s,a,l)=>{if(l.has(s))return;l.add(s);const{children:u}=s;if(!u.length)u.push(a);else for(let p=0,h=u.length;p<h;p++)o(u[p],a,l)},"e");return s=>{if(!s.length)return ge([]);for(let a=s.length-1;a>=1;a--){const l=new Set,u=s[a-1],p=s[a];o(u,p,l)}return s[0]}})(),K=g(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),hn=b(/\\./,T),yn=b(/[$.*+?^(){}[\]\|]/,o=>T(`\\${o}`)),bn=b(/[\\\/]/,K),vn=b(/[^$.*+?^(){}[\]\|\\\/]+/,T),$n=b(/^(?:!!)*!(.*)$/,(o,s)=>T(`(?!^${zt.compile(s).source}$).*?`)),wn=b(/^(!!)+/),jn=N([$n,wn]),xn=b(/\/(\*\*\/)+/,()=>ge([se([K(),T(".+?"),K()]),K()])),On=b(/^(\*\*\/)+/,()=>ge([T("^"),se([T(".*?"),K()])])),kn=b(/\/(\*\*)$/,()=>ge([se([K(),T(".*?")]),T("$")])),Pn=b(/\*\*/,()=>T(".*?")),Et=N([xn,On,kn,Pn]),Tn=b(/\*\/(?!\*\*\/|\*$)/,()=>se([T("[^\\\\/]*?"),K()])),En=b(/\*/,()=>T("[^\\\\/]*")),St=N([Tn,En]),Ct=b("?",()=>T("[^\\\\/]")),Sn=b("[",Y),Cn=b("]",Y),An=b(/[!^]/,"^\\\\/"),_n=b(/[a-z]-[a-z]|[0-9]-[0-9]/i,Y),Nn=b(/\\./,Y),Mn=b(/[$.*+?^(){}[\|]/,o=>`\\${o}`),zn=b(/[\\\/]/,"\\\\/"),Bn=b(/[^$.*+?^(){}[\]\|\\\/]+/,Y),Dn=N([Nn,Mn,zn,_n,Bn]),At=oe([Sn,jt(An),Re(Dn),Cn],o=>T(o.join(""))),In=b("{","(?:"),Rn=b("}",")"),Fn=b(/(\d+)\.\.(\d+)/,(o,s,a)=>mn(+s,+a,Math.min(s.length,a.length)).join("|")),Wn=b(/([a-z]+)\.\.([a-z]+)/,(o,s,a)=>Tt(s,a).join("|")),Ln=b(/([A-Z]+)\.\.([A-Z]+)/,(o,s,a)=>Tt(s.toLowerCase(),a.toLowerCase()).join("|").toUpperCase()),Vn=N([Fn,Wn,Ln]),_t=oe([In,Vn,Rn],o=>T(o.join(""))),Un=b("{"),qn=b("}"),Kn=b(","),Gn=b(/\\./,T),Jn=b(/[$.*+?^(){[\]\|]/,o=>T(`\\${o}`)),Hn=b(/[\\\/]/,K),Zn=b(/[^$.*+?^(){}[\]\|\\\/,]+/,T),Xn=Ot(()=>Mt),Yn=b("",()=>T("(?:)")),Qn=en(N([Et,St,Ct,At,_t,Xn,Gn,Jn,Hn,Zn]),se),Nt=N([Qn,Yn]),Mt=oe([Un,jt(oe([Nt,Re(oe([Kn,Nt]))])),qn],ge),eo=Re(N([jn,Et,St,Ct,At,_t,Mt,hn,yn,bn,vn]),se),to=eo,ro=g(o=>$t(o,to,{memoization:!1})[0],"kr"),no=ro,it=g((o,s,a)=>it.compile(o,a).test(s),"N");it.compile=(()=>{const o=nn((a,l)=>re(no(dn(a)),l)),s=rn((a,l)=>Qe(a.map(u=>o(u,l))));return(a,l)=>tn(a)?o(a,l):s(a,l)})();var zt=it;return d(v)})();return e.default||e},"_lazyMatch"),at;const qo=g((e,t)=>(at||(at=Rt(),Rt=null),at(e,t)),"default");var Ko=Object.defineProperty,Go=pt((e,t)=>Ko(e,"name",{value:t,configurable:!0}),"t$1");const Jo=/^[A-Z]:\//i,I=Go((e="")=>e&&e.replaceAll("\\","/").replace(Jo,t=>t.toUpperCase()),"normalizeWindowsPath");var Ho=Object.defineProperty,C=pt((e,t)=>Ho(e,"name",{value:t,configurable:!0}),"r");const Zo=/^[/\\]{2}/,Xo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,pr=/^[A-Z]:$/i,Ft=/^\/([A-Z]:)?$/i,Yo=/.(\.[^./]+)$/,Qo=/^[/\\]|^[a-z]:[/\\]/i,es=/\/$/,ts=C(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),dr=C((e,t)=>{let r="",n=0,i=-1,c=0,f;for(let d=0;d<=e.length;++d){if(d<e.length)f=e[d];else{if(f==="/")break;f="/"}if(f==="/"){if(!(i===d-1||c===1))if(c===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const v=r.lastIndexOf("/");v===-1?(r="",n=0):(r=r.slice(0,v),n=r.length-1-r.lastIndexOf("/")),i=d,c=0;continue}else if(r.length>0){r="",n=0,i=d,c=0;continue}}t&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${e.slice(i+1,d)}`:r=e.slice(i+1,d),n=d-i-1;i=d,c=0}else f==="."&&c!==-1?++c:c=-1}return r},"normalizeString"),Q=C(e=>Xo.test(e),"isAbsolute"),gr=C(function(e){if(e.length===0)return".";e=I(e);const t=Zo.exec(e),r=Q(e),n=e.at(-1)==="/";return e=dr(e,!r),e.length===0?r?"/":n?"./":".":(n&&(e+="/"),pr.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!Q(e)?`/${e}`:e)},"normalize"),z=C((...e)=>{let t="";for(const r of e)if(r)if(t.length>0){const n=t.at(-1)==="/",i=r[0]==="/";n&&i?t+=r.slice(1):t+=n||i?r:`/${r}`}else t+=r;return gr(t)},"join"),L=C(function(...e){e=e.map(n=>I(n));let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:ts();!i||i.length===0||(t=`${i}/${t}`,r=Q(i))}return t=dr(t,!r),r&&!Q(t)?`/${t}`:t.length>0?t:"."},"resolve");C(function(e){return I(e)},"toNamespacedPath");const mr=C(function(e){return Yo.exec(I(e))?.[1]??""},"extname");C(function(e,t){const r=L(e).replace(Ft,"$1").split("/"),n=L(t).replace(Ft,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const i=[...r];for(const c of i){if(n[0]!==c)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Ae=C(e=>{const t=I(e).replace(es,"").split("/").slice(0,-1);return t.length===1&&pr.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Q(e)?"/":".")},"dirname");C(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return I(e.root?L(...t):t.join("/"))},"format");const rs=C((e,t)=>{const r=I(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),hr=C(function(e){const t=Qo.exec(e)?.[0]?.replaceAll("\\","/")??"",r=rs(e),n=mr(r);return{base:r,dir:Ae(e),ext:n,name:r.slice(0,r.length-n.length),root:t}},"parse");C((e,t)=>qo(t,gr(e)),"matchesGlob");var ns=Object.defineProperty,ee=k((e,t)=>ns(e,"name",{value:t,configurable:!0}),"n$2"),os=Object.defineProperty,V=ee((e,t)=>os(e,"name",{value:t,configurable:!0}),"a");const ss=pe(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,is=V(e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,r]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ve.getBuiltinModule(e)}return ss(e)},"__cjs_getBuiltinModule"),{fileURLToPath:as}=is("node:url");var cs=Object.defineProperty,fe=V((e,t)=>cs(e,"name",{value:t,configurable:!0}),"t$1");function de(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(de,"ue");D(de,"de");k(de,"m$4");ee(de,"d");V(de,"getDefaultExportFromCjs");fe(de,"getDefaultExportFromCjs");function _e(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}m(_e,"me");D(_e,"je");k(_e,"h$2");ee(_e,"O");V(_e,"getDefaultExportFromNamespaceIfPresent");fe(_e,"getDefaultExportFromNamespaceIfPresent");function Ne(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}m(Ne,"he");D(Ne,"Oe");k(Ne,"x");ee(Ne,"P");V(Ne,"getDefaultExportFromNamespaceIfNotNamed");fe(Ne,"getDefaultExportFromNamespaceIfNotNamed");function Me(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=fe(V(ee(k(D(m(function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"c"),"c"),"a"),"s"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:fe(function(){return e[n]},"get")})}),r}m(Me,"ye");D(Me,"Pe");k(Me,"y$3");ee(Me,"_");V(Me,"getAugmentedNamespace");fe(Me,"getAugmentedNamespace");var Wt,Lt;function ze(){return Lt||(Lt=1,Wt=["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"]),Wt}m(ze,"be");D(ze,"_e");k(ze,"w$1");ee(ze,"k");V(ze,"requireBinaryExtensions");var us=ze();const ls=de(us);var fs=Object.defineProperty,R=V((e,t)=>fs(e,"name",{value:t,configurable:!0}),"r");const ps=new Set(ls),ds=new Set(["/","\\",void 0]),Vt=Symbol.for("pathe:normalizedAlias"),gs=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,ms=R((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),We=R((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),yr=R(e=>{if(e[Vt])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[n])=>ms(r,n)));for(const r in t)for(const n in t)n===r||r.startsWith(n)||t[r].startsWith(n)&&ds.has(t[r][n.length])&&(t[r]=t[n]+t[r].slice(n.length));return Object.defineProperty(t,Vt,{enumerable:!1,value:!0}),t},"normalizeAliases");R((e,t)=>{e=I(e),t=yr(t);for(const[r,n]of Object.entries(t)){if(!e.startsWith(r))continue;const i=We(r)?r.slice(0,-1):r;if(We(e[i.length]))return z(n,e.slice(r.length))}return e},"resolveAlias");R(e=>gs.exec(e)?.[2],"filename");R((e,t)=>{e=I(e),t=yr(t);for(const[r,n]of Object.entries(t).toReversed()){if(!e.startsWith(n))continue;const i=We(n)?n.slice(0,-1):n;if(We(e[i.length]))return z(r,e.slice(n.length))}return e},"reverseResolveAlias");const hs=/^(?:\.?\.[/\\]|\.\.\B)/,ys=/^(?:msys|cygwin)$/;R(e=>hs.test(e)||e==="..","isRelative");R(e=>ps.has(mr(e).slice(1).toLowerCase()),"isBinaryPath");const G=R(e=>I(e instanceof URL?as(e):e),"toPath");R(()=>{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:ys.test(e)},"isWindows");var bs=Object.defineProperty,vs=k((e,t)=>bs(e,"name",{value:t,configurable:!0}),"y$2"),$s=Object.defineProperty,br=vs((e,t)=>$s(e,"name",{value:t,configurable:!0}),"a");const ws=pe(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,js=br(e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,r]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return $e.getBuiltinModule(e)}return ws(e)},"__cjs_getBuiltinModule"),{stat:xs,lstat:Os}=js("node:fs/promises");var ks=Object.defineProperty,Ut=br((e,t)=>ks(e,"name",{value:t,configurable:!0}),"s");const Ps=Ut(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 r=t.cwd?G(t.cwd):process.cwd();let n=L(r);const{root:i}=hr(n),c=G(t.stopAt??i),f=L(n,c),d=t.type??"file",v=Ut(async function($){return typeof e=="function"?[await e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const w=t.allowSymlinks?xs:Os;for(;n&&n!==f&&n!==i;){const $=await v(n);for(let y of $){if(y===lr)return;if(y===void 0)continue;Buffer.isBuffer(y)?y=y.toString():y instanceof URL&&(y=G(y));const E=Q(y)?y:L(n,y);try{const P=await w(E);if(d==="file"&&P.isFile()||d==="directory"&&P.isDirectory())return E}catch{}}n=Ae(n)}},"findUp");var Ts=Object.defineProperty,Es=k((e,t)=>Ts(e,"name",{value:t,configurable:!0}),"p"),Ss=Object.defineProperty,vr=Es((e,t)=>Ss(e,"name",{value:t,configurable:!0}),"i");const Cs=pe(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,As=vr(e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,r]=we.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return we.getBuiltinModule(e)}return Cs(e)},"__cjs_getBuiltinModule"),{statSync:_s,lstatSync:Ns}=As("node:fs");var Ms=Object.defineProperty,qt=vr((e,t)=>Ms(e,"name",{value:t,configurable:!0}),"o");const zs=qt((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 r=t.cwd?G(t.cwd):process.cwd();let n=L(r);const{root:i}=hr(n),c=G(t.stopAt??i),f=L(n,c),d=t.type??"file",v=qt(function($){return typeof e=="function"?[e($)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const w=t.allowSymlinks?_s:Ns;for(;n&&n!==f&&n!==i;){for(let $ of v(n)){if($===lr)return;if($===void 0)continue;Buffer.isBuffer($)?$=$.toString():$ instanceof URL&&($=G($));const y=Q($)?$:L(n,$);try{const E=w(y);if(d==="file"&&E.isFile()||d==="directory"&&E.isDirectory())return y}catch{}}n=Ae(n)}},"findUpSync");var Bs=Object.defineProperty,$r=k((e,t)=>Bs(e,"name",{value:t,configurable:!0}),"t$2"),Ds=Object.defineProperty,dt=$r((e,t)=>Ds(e,"name",{value:t,configurable:!0}),"s");const Is=pe(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=dt(e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,r]=je.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return je.getBuiltinModule(e)}return Is(e)},"__cjs_getBuiltinModule"),{access:Fs}=Rs("node:fs/promises");var Ws=Object.defineProperty,Ls=dt((e,t)=>Ws(e,"name",{value:t,configurable:!0}),"o");async function J(e,t=ur){ft(e),e=G(e);try{return await Fs(e,t),!0}catch{return!1}}m(J,"I$2");D(J,"V");k(J,"i$1");$r(J,"d");dt(J,"m");Ls(J,"isAccessible");var Vs=Object.defineProperty,wr=k((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"t$1"),Us=Object.defineProperty,gt=wr((e,t)=>Us(e,"name",{value:t,configurable:!0}),"t");const qs=pe(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ks=gt(e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,r]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return xe.getBuiltinModule(e)}return qs(e)},"__cjs_getBuiltinModule"),{accessSync:Gs}=Ks("node:fs");var Js=Object.defineProperty,Hs=gt((e,t)=>Js(e,"name",{value:t,configurable:!0}),"o");function H(e,t=ur){ft(e),e=G(e);try{return Gs(e,t),!0}catch{return!1}}m(H,"F$3");D(H,"X");k(H,"i");wr(H,"d");gt(H,"m");Hs(H,"isAccessibleSync");var Zs=Object.defineProperty,jr=k((e,t)=>Zs(e,"name",{value:t,configurable:!0}),"o"),Xs=Object.defineProperty,xr=jr((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"o"),Ys=Object.defineProperty,Qs=xr((e,t)=>Ys(e,"name",{value:t,configurable:!0}),"o");class Or extends Error{static{m(this,"wt")}static{D(this,"$t")}static{k(this,"s")}static{jr(this,"u")}static{xr(this,"n")}static{Qs(this,"NotFoundError")}constructor(t){super(`ENOENT: ${t}`)}get code(){return"ENOENT"}set code(t){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(t){throw new Error("Cannot overwrite name of NotFoundError")}}var ei=Object.defineProperty,mt=k((e,t)=>ei(e,"name",{value:t,configurable:!0}),"u");const Le=mt((e,t)=>(t?.create&&Fo(e),e),"useDirectory");mt(async(e,t)=>{if(ue.CACHE_DIR&&!["0","1","false","true"].includes(ue.CACHE_DIR))return Le(z(ue.CACHE_DIR,e),t);const r=await Ps("package.json",{cwd:t?.cwd??cr(),type:"file"});if(!r){if(t?.throwError)throw new Or("No such file or directory found.");return}const n=z(Ae(r),"node_modules"),i=z(n,".cache"),c=z(i,e);if(!(ce(c)&&!await J(c,le))&&!(ce(i)&&!await J(i,le))&&!(ce(n)&&!await J(n,le)))return Le(c,t)},"findCacheDirectory");const ti=mt((e,t)=>{if(ue.CACHE_DIR&&!["0","1","false","true"].includes(ue.CACHE_DIR))return Le(z(ue.CACHE_DIR,e),t);const r=zs("package.json",{cwd:t?.cwd??cr(),type:"file"});if(!r){if(t?.throwError)throw new Or("No such file or directory found.");return}const n=z(Ae(r),"node_modules"),i=z(n,".cache"),c=z(i,e);if(!(ce(c)&&!H(c,le))&&!(ce(i)&&!H(i,le))&&!(ce(n)&&!H(n,le)))return Le(c,t)},"findCacheDirectorySync"),kr=ti;var ri=Object.defineProperty,ni=m((e,t)=>ri(e,"name",{value:t,configurable:!0}),"i$7"),oi=Object.defineProperty,si=ni((e,t)=>oi(e,"name",{value:t,configurable:!0}),"r"),ii=Object.defineProperty,ai=si((e,t)=>ii(e,"name",{value:t,configurable:!0}),"i");const Kt=ai(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var ci=Object.defineProperty,ui=m((e,t)=>ci(e,"name",{value:t,configurable:!0}),"i$6"),li=Object.defineProperty,Pr=ui((e,t)=>li(e,"name",{value:t,configurable:!0}),"s");const fi=Se(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pi=Pr(e=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[t,r]=Oe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Oe.getBuiltinModule(e)}return fi(e)},"__cjs_getBuiltinModule"),{lstatSync:Gt,mkdirSync:di}=pi("node:fs");var gi=Object.defineProperty,mi=Pr((e,t)=>gi(e,"name",{value:t,configurable:!0}),"o");const Ve=mi(e=>{nr(e);try{const t=Gt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Kt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{di(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Gt(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Kt(r))}'`,{cause:t})}},"ensureDirSync");var hi=Object.defineProperty,yi=m((e,t)=>hi(e,"name",{value:t,configurable:!0}),"x$2"),bi=Object.defineProperty,Tr=yi((e,t)=>bi(e,"name",{value:t,configurable:!0}),"$"),vi=Object.defineProperty,$i=Tr((e,t)=>vi(e,"name",{value:t,configurable:!0}),"A"),wi=Object.defineProperty,ht=$i((e,t)=>wi(e,"name",{value:t,configurable:!0}),"$"),ji=Object.defineProperty,xi=ht((e,t)=>ji(e,"name",{value:t,configurable:!0}),"r$1");const Oi=xi(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),"normalizeLF"),ki=globalThis.process??Object.create(null),Jt={versions:{}},Ht=new Proxy(ki,{get(e,t){if(t in e)return e[t];if(t in Jt)return Jt[t]}});var Pi=Object.defineProperty,Ti=ht((e,t)=>Pi(e,"name",{value:t,configurable:!0}),"b");const Ei=Ti((e,t,r,n)=>{const i={column:0,line:-1,...e.start},c={...i,...e.end},f=i.line,d=i.column,v=c.line,w=c.column;let $=Math.max(f-(r+1),0),y=Math.min(t.length,v+n);f===-1&&($=0),v===-1&&(y=t.length);const E=v-f,P={};if(E)for(let x=0;x<=E;x++){const _=x+f;if(!d)P[_]=!0;else if(x===0){const F=t[_-1]?.length;P[_]=[d,(F??0)-d+1]}else if(x===E)P[_]=[0,w];else{const F=t[_-x]?.length;P[_]=[0,F]}}else d===w?P[f]=d?[d,0]:!0:P[f]=[d,(w??0)-(d??0)];return{end:y,markerLines:P,start:$}},"getMarkerLines");var Si=Object.defineProperty,Fe=ht((e,t)=>Si(e,"name",{value:t,configurable:!0}),"t");const Ci=Ht.platform==="win32"&&!Ht.env?.WT_SESSION?">":"❯",Ai=Fe((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:Fe(x=>x,"gutter"),marker:Fe(x=>x,"marker"),message:Fe(x=>x,"message"),...r?.color}},i=typeof t.start.column=="number";let c=Oi(e).split(`
3
+ `);typeof n.tabWidth=="number"&&(c=c.map(x=>x.replaceAll(" "," ".repeat(n.tabWidth))));const{end:f,markerLines:d,start:v}=Ei(t,c,n.linesAbove,n.linesBelow),w=String(f).length,{gutter:$,marker:y,message:E}=n.color;let P=c.slice(v,f).map((x,_)=>{const F=v+1+_,re=d[F],Ye=` ${String(F)}`.slice(-w),Qe=!d[F+1],ne=` ${Ye}${n.showGutter?" |":""}`;if(re){let W="";if(Array.isArray(re)){const et=x.replaceAll(/[^\t]/g," ").slice(0,Math.max(re[0]-1,0)),tt=re[1]||1;W=[`
4
+ `,n.prefix+$(ne.replaceAll(/\d/g," "))," ",et,y("^").repeat(tt)].join(""),Qe&&n.message&&(W+=` ${E(n.message)}`)}return[n.prefix+y(Ci),$(ne),x.length>0?` ${x}`:"",W].join("")}return`${n.prefix} ${$(ne)}${x.length>0?` ${x}`:""}`}).join(`
5
5
  `);return n.message&&!i&&(P=`${n.prefix+" ".repeat(w+1)+n.message}
6
- ${P}`),P},"codeFrame");var Mi=Object.defineProperty,Bi=Sr((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"s"),Di=Object.defineProperty,zi=Bi((e,t)=>Di(e,"name",{value:t,configurable:!0}),"o"),Ri=Object.defineProperty,yt=zi((e,t)=>Ri(e,"name",{value:t,configurable:!0}),"l");const Ht=yt((e,t)=>{let r=0,n=t.length-2;for(;r<n;){const i=r+(n-r>>1);if(e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return r},"binarySearch"),Ii=/\n|\r(?!\n)/,Fi=yt(e=>e.split(Ii).reduce((t,r)=>(t.push(t.at(-1)+r.length+1),t),[0]),"getLineStartIndexes"),Li=yt((e,t,r)=>{const n=r?.skipChecks??!1;if(!n&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!n&&(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 c=Fi(e),f=Ht(t,c);return{column:t-c[f]+1,line:f+1}}const i=Ht(t,e);return{column:t-e[i]+1,line:i+1}},"indexToLineColumn");var Wi=Object.defineProperty,Cr=m((e,t)=>Wi(e,"name",{value:t,configurable:!0}),"t$6"),Ui=Object.defineProperty,Ar=Cr((e,t)=>Ui(e,"name",{value:t,configurable:!0}),"t"),Vi=Object.defineProperty,qi=Ar((e,t)=>Vi(e,"name",{value:t,configurable:!0}),"i");let Ki=class extends Error{static{m(this,"m")}static{Cr(this,"m")}static{Ar(this,"t")}static{qi(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?`
6
+ ${P}`),P},"codeFrame");var _i=Object.defineProperty,Ni=Tr((e,t)=>_i(e,"name",{value:t,configurable:!0}),"s"),Mi=Object.defineProperty,zi=Ni((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"o"),Bi=Object.defineProperty,yt=zi((e,t)=>Bi(e,"name",{value:t,configurable:!0}),"l");const Zt=yt((e,t)=>{let r=0,n=t.length-2;for(;r<n;){const i=r+(n-r>>1);if(e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return r},"binarySearch"),Di=/\n|\r(?!\n)/,Ii=yt(e=>e.split(Di).reduce((t,r)=>(t.push(t.at(-1)+r.length+1),t),[0]),"getLineStartIndexes"),Ri=yt((e,t,r)=>{const n=r?.skipChecks??!1;if(!n&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!n&&(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 c=Ii(e),f=Zt(t,c);return{column:t-c[f]+1,line:f+1}}const i=Zt(t,e);return{column:t-e[i]+1,line:i+1}},"indexToLineColumn");var Fi=Object.defineProperty,Er=m((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"t$6"),Wi=Object.defineProperty,Sr=Er((e,t)=>Wi(e,"name",{value:t,configurable:!0}),"t"),Li=Object.defineProperty,Vi=Sr((e,t)=>Li(e,"name",{value:t,configurable:!0}),"i");let Ui=class extends Error{static{m(this,"m")}static{Er(this,"m")}static{Sr(this,"t")}static{Vi(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
7
 
8
8
  ${this.codeFrame}
9
- `:""}`}set message(t){this.#e=t}};var Gi=Object.defineProperty,_r=m((e,t)=>Gi(e,"name",{value:t,configurable:!0}),"u$3"),Ji=Object.defineProperty,Nr=_r((e,t)=>Ji(e,"name",{value:t,configurable:!0}),"s"),Zi=Object.defineProperty,De=Nr((e,t)=>Zi(e,"name",{value:t,configurable:!0}),"a");const Hi=De(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Xi=De((e,t,r)=>Ni(e,{start:t},{tabWidth:!1,...r}),"generateCodeFrame"),Qi=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Yi=De((e,t)=>{const r=Qi.exec(t);if(!r)return;const[,n,i,c]=r;if(i&&c)return{column:Number(c),line:Number(i)};let f=Number(n);return f===e.length&&(f=e.length-1),Li(e,f)},"getErrorLocation"),ea=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,ta=De(e=>e.replace(ea,(t,r,n)=>`"${n}"(${Hi(n)})`),"addCodePointToUnexpectedToken");function Ve(e,t,r,n){typeof t=="string"&&(typeof r=="object"&&(n=r),r=t,t=void 0);let i;try{return JSON.parse(e,t)}catch(d){i=d.message}let c;e?(c=Yi(e,i),i=ta(i)):i+=" while parsing empty string";const f=new Ki(i);throw f.fileName=r,c&&(f.codeFrame=Xi(e,c,n)),f}m(Ve,"d$5");_r(Ve,"w");Nr(Ve,"E");De(Ve,"parseJson");var ra=Object.defineProperty,Mr=m((e,t)=>ra(e,"name",{value:t,configurable:!0}),"t$5"),na=Object.defineProperty,Br=Mr((e,t)=>na(e,"name",{value:t,configurable:!0}),"t"),oa=Object.defineProperty,sa=Br((e,t)=>oa(e,"name",{value:t,configurable:!0}),"r");function ze(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=yo(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:c,color:f}=r??{};return typeof c=="function"&&(i=c(i)),Ve(i,t,or(e),{color:f})}m(ze,"n$3");Mr(ze,"s");Br(ze,"J");sa(ze,"readJsonSync");var ia=Object.defineProperty,aa=m((e,t)=>ia(e,"name",{value:t,configurable:!0}),"a$3"),ca=Object.defineProperty,ua=aa((e,t)=>ca(e,"name",{value:t,configurable:!0}),"t"),la=Object.defineProperty,fa=ua((e,t)=>la(e,"name",{value:t,configurable:!0}),"e");const pa=fa(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 da=Object.defineProperty,ga=m((e,t)=>da(e,"name",{value:t,configurable:!0}),"t$3"),ma=Object.defineProperty,ha=ga((e,t)=>ma(e,"name",{value:t,configurable:!0}),"r"),ya=Object.defineProperty,ba=ha((e,t)=>ya(e,"name",{value:t,configurable:!0}),"f");const va=new TextEncoder,$a=ba(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return va.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 wa=Object.defineProperty,ja=m((e,t)=>wa(e,"name",{value:t,configurable:!0}),"m$1"),xa=Object.defineProperty,Dr=ja((e,t)=>xa(e,"name",{value:t,configurable:!0}),"s");const Oa=Se(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ka=Dr(e=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[t,r]=ke.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ke.getBuiltinModule(e)}return Oa(e)},"__cjs_getBuiltinModule"),{mkdirSync:Pa,writeFileSync:Ta,statSync:Ea,renameSync:Xt,chownSync:Sa,chmodSync:Ca,unlinkSync:Aa}=ka("node:fs");var _a=Object.defineProperty,Na=Dr((e,t)=>_a(e,"name",{value:t,configurable:!0}),"f");const Ma=Na((e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},nr(e),pa(t),e=or(e);const n=`${e}.tmp`;try{const i=D(e,Dt);if(!i&&r.recursive){const f=Ce(e);D(f,Dt)||Pa(f,{recursive:!0})}let c;if(Ta(n,$a(t),{encoding:r.encoding,flag:r.flag}),i&&!r.overwrite&&(c=Ea(e),r.chown??={gid:c.gid,uid:c.uid},Xt(e,`${e}.bak`)),r.chown)try{Sa(n,r.chown.uid,r.chown.gid)}catch{}Ca(n,c&&!r.mode?c.mode:r.mode??438),Xt(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{D(n)&&Aa(`${e}.tmp`)}},"writeFileSync");var Ba=Object.defineProperty,Z=m((e,t)=>Ba(e,"name",{value:t,configurable:!0}),"i$2"),Da=Object.defineProperty,H=Z((e,t)=>Da(e,"name",{value:t,configurable:!0}),"s"),za=Object.defineProperty,ee=H((e,t)=>za(e,"name",{value:t,configurable:!0}),"i");const Ra=/^(?:( )+|\t+)/,Re="space";function Te(e,t,r){return e&&t===Re&&r===1}m(Te,"d$3");Z(Te,"g");H(Te,"I");ee(Te,"shouldIgnoreSingleSpace");function Ee(e,t){const r=new Map;let n=0,i,c;for(const f of e.split(/\n/g)){if(!f)continue;const d=f.match(Ra);if(d===null)n=0,i="";else{const v=d[0].length,w=d[1]?Re:"tab";if(Te(t,w,v))continue;w!==i&&(n=0),i=w;let $=1,y=0;const E=v-n;if(n=v,E===0)$=0,y=1;else{const x=Math.abs(E);if(Te(t,w,x))continue;c=qe(w,x)}const P=r.get(c);r.set(c,P===void 0?[1,0]:[P[0]+$,P[1]+y])}}return r}m(Ee,"p");Z(Ee,"y");H(Ee,"h");ee(Ee,"makeIndentsMap");function qe(e,t){return(e===Re?"s":"t")+String(t)}m(qe,"b$1");Z(qe,"v");H(qe,"m");ee(qe,"encodeIndentsKey");function Ke(e){const t=e[0]==="s"?Re:"tab",r=Number(e.slice(1));return{type:t,amount:r}}m(Ke,"v");Z(Ke,"M");H(Ke,"_");ee(Ke,"decodeIndentsKey");function Ge(e){let t,r=0,n=0;for(const[i,[c,f]]of e)(c>r||c===r&&f>n)&&(r=c,n=f,t=i);return t}m(Ge,"I");Z(Ge,"S");H(Ge,"k");ee(Ge,"getMostUsedKey");function Je(e,t){return(e===Re?" ":" ").repeat(t)}m(Je,"h$1");Z(Je,"k");H(Je,"D");ee(Je,"makeIndentString");function Ze(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=Ee(e,!0);t.size===0&&(t=Ee(e,!1));const r=Ge(t);let n,i=0,c="";return r!==void 0&&({type:n,amount:i}=Ke(r),c=Je(n,i)),{amount:i,type:n,indent:c}}m(Ze,"M");Z(Ze,"x");H(Ze,"C");ee(Ze,"detectIndent");var Ia=Object.defineProperty,Fa=m((e,t)=>Ia(e,"name",{value:t,configurable:!0}),"a$1"),La=Object.defineProperty,zr=Fa((e,t)=>La(e,"name",{value:t,configurable:!0}),"i");const Wa=Se(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ua=zr(e=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[t,r]=Pe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Pe.getBuiltinModule(e)}return Wa(e)},"__cjs_getBuiltinModule"),{readFileSync:Va}=Ua("node:fs");var qa=Object.defineProperty,Ka=zr((e,t)=>qa(e,"name",{value:t,configurable:!0}),"r");const Rr=Ka((e,t,r={})=>{const{detectIndent:n,indent:i,replacer:c,stringify:f=JSON.stringify,...d}={indent:" ",...r};let v=i,w=`
10
- `;if(D(e,bo))try{const y=Va(e,"utf8");if(n){const{indent:E}=Ze(y);v=E}w=y.endsWith(`
9
+ `:""}`}set message(t){this.#e=t}};var qi=Object.defineProperty,Cr=m((e,t)=>qi(e,"name",{value:t,configurable:!0}),"u$3"),Ki=Object.defineProperty,Ar=Cr((e,t)=>Ki(e,"name",{value:t,configurable:!0}),"s"),Gi=Object.defineProperty,Be=Ar((e,t)=>Gi(e,"name",{value:t,configurable:!0}),"a");const Ji=Be(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Hi=Be((e,t,r)=>Ai(e,{start:t},{tabWidth:!1,...r}),"generateCodeFrame"),Zi=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Xi=Be((e,t)=>{const r=Zi.exec(t);if(!r)return;const[,n,i,c]=r;if(i&&c)return{column:Number(c),line:Number(i)};let f=Number(n);return f===e.length&&(f=e.length-1),Ri(e,f)},"getErrorLocation"),Yi=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Qi=Be(e=>e.replace(Yi,(t,r,n)=>`"${n}"(${Ji(n)})`),"addCodePointToUnexpectedToken");function Ue(e,t,r,n){typeof t=="string"&&(typeof r=="object"&&(n=r),r=t,t=void 0);let i;try{return JSON.parse(e,t)}catch(d){i=d.message}let c;e?(c=Xi(e,i),i=Qi(i)):i+=" while parsing empty string";const f=new Ui(i);throw f.fileName=r,c&&(f.codeFrame=Hi(e,c,n)),f}m(Ue,"d$5");Cr(Ue,"w");Ar(Ue,"E");Be(Ue,"parseJson");var ea=Object.defineProperty,_r=m((e,t)=>ea(e,"name",{value:t,configurable:!0}),"t$5"),ta=Object.defineProperty,Nr=_r((e,t)=>ta(e,"name",{value:t,configurable:!0}),"t"),ra=Object.defineProperty,na=Nr((e,t)=>ra(e,"name",{value:t,configurable:!0}),"r");function De(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=mo(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:c,color:f}=r??{};return typeof c=="function"&&(i=c(i)),Ue(i,t,or(e),{color:f})}m(De,"n$3");_r(De,"s");Nr(De,"J");na(De,"readJsonSync");var oa=Object.defineProperty,sa=m((e,t)=>oa(e,"name",{value:t,configurable:!0}),"a$3"),ia=Object.defineProperty,aa=sa((e,t)=>ia(e,"name",{value:t,configurable:!0}),"t"),ca=Object.defineProperty,ua=aa((e,t)=>ca(e,"name",{value:t,configurable:!0}),"e");const la=ua(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 fa=Object.defineProperty,pa=m((e,t)=>fa(e,"name",{value:t,configurable:!0}),"t$3"),da=Object.defineProperty,ga=pa((e,t)=>da(e,"name",{value:t,configurable:!0}),"r"),ma=Object.defineProperty,ha=ga((e,t)=>ma(e,"name",{value:t,configurable:!0}),"f");const ya=new TextEncoder,ba=ha(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return ya.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 va=Object.defineProperty,$a=m((e,t)=>va(e,"name",{value:t,configurable:!0}),"m$1"),wa=Object.defineProperty,Mr=$a((e,t)=>wa(e,"name",{value:t,configurable:!0}),"s");const ja=Se(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xa=Mr(e=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[t,r]=ke.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ke.getBuiltinModule(e)}return ja(e)},"__cjs_getBuiltinModule"),{mkdirSync:Oa,writeFileSync:ka,statSync:Pa,renameSync:Xt,chownSync:Ta,chmodSync:Ea,unlinkSync:Sa}=xa("node:fs");var Ca=Object.defineProperty,Aa=Mr((e,t)=>Ca(e,"name",{value:t,configurable:!0}),"f");const _a=Aa((e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},nr(e),la(t),e=or(e);const n=`${e}.tmp`;try{const i=B(e,Bt);if(!i&&r.recursive){const f=Ce(e);B(f,Bt)||Oa(f,{recursive:!0})}let c;if(ka(n,ba(t),{encoding:r.encoding,flag:r.flag}),i&&!r.overwrite&&(c=Pa(e),r.chown??={gid:c.gid,uid:c.uid},Xt(e,`${e}.bak`)),r.chown)try{Ta(n,r.chown.uid,r.chown.gid)}catch{}Ea(n,c&&!r.mode?c.mode:r.mode??438),Xt(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{B(n)&&Sa(`${e}.tmp`)}},"writeFileSync");var Na=Object.defineProperty,Z=m((e,t)=>Na(e,"name",{value:t,configurable:!0}),"i$2"),Ma=Object.defineProperty,X=Z((e,t)=>Ma(e,"name",{value:t,configurable:!0}),"s"),za=Object.defineProperty,te=X((e,t)=>za(e,"name",{value:t,configurable:!0}),"i");const Ba=/^(?:( )+|\t+)/,Ie="space";function Te(e,t,r){return e&&t===Ie&&r===1}m(Te,"d$3");Z(Te,"g");X(Te,"I");te(Te,"shouldIgnoreSingleSpace");function Ee(e,t){const r=new Map;let n=0,i,c;for(const f of e.split(/\n/g)){if(!f)continue;const d=f.match(Ba);if(d===null)n=0,i="";else{const v=d[0].length,w=d[1]?Ie:"tab";if(Te(t,w,v))continue;w!==i&&(n=0),i=w;let $=1,y=0;const E=v-n;if(n=v,E===0)$=0,y=1;else{const x=Math.abs(E);if(Te(t,w,x))continue;c=qe(w,x)}const P=r.get(c);r.set(c,P===void 0?[1,0]:[P[0]+$,P[1]+y])}}return r}m(Ee,"p");Z(Ee,"y");X(Ee,"h");te(Ee,"makeIndentsMap");function qe(e,t){return(e===Ie?"s":"t")+String(t)}m(qe,"b$1");Z(qe,"v");X(qe,"m");te(qe,"encodeIndentsKey");function Ke(e){const t=e[0]==="s"?Ie:"tab",r=Number(e.slice(1));return{type:t,amount:r}}m(Ke,"v");Z(Ke,"M");X(Ke,"_");te(Ke,"decodeIndentsKey");function Ge(e){let t,r=0,n=0;for(const[i,[c,f]]of e)(c>r||c===r&&f>n)&&(r=c,n=f,t=i);return t}m(Ge,"I");Z(Ge,"S");X(Ge,"k");te(Ge,"getMostUsedKey");function Je(e,t){return(e===Ie?" ":" ").repeat(t)}m(Je,"h$1");Z(Je,"k");X(Je,"D");te(Je,"makeIndentString");function He(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=Ee(e,!0);t.size===0&&(t=Ee(e,!1));const r=Ge(t);let n,i=0,c="";return r!==void 0&&({type:n,amount:i}=Ke(r),c=Je(n,i)),{amount:i,type:n,indent:c}}m(He,"M");Z(He,"x");X(He,"C");te(He,"detectIndent");var Da=Object.defineProperty,Ia=m((e,t)=>Da(e,"name",{value:t,configurable:!0}),"a$1"),Ra=Object.defineProperty,zr=Ia((e,t)=>Ra(e,"name",{value:t,configurable:!0}),"i");const Fa=Se(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wa=zr(e=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[t,r]=Pe.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Pe.getBuiltinModule(e)}return Fa(e)},"__cjs_getBuiltinModule"),{readFileSync:La}=Wa("node:fs");var Va=Object.defineProperty,Ua=zr((e,t)=>Va(e,"name",{value:t,configurable:!0}),"r");const Br=Ua((e,t,r={})=>{const{detectIndent:n,indent:i,replacer:c,stringify:f=JSON.stringify,...d}={indent:" ",...r};let v=i,w=`
10
+ `;if(B(e,ho))try{const y=La(e,"utf8");if(n){const{indent:E}=He(y);v=E}w=y.endsWith(`
11
11
  `)?`
12
- `:""}catch(y){if(y.code!=="ENOENT")throw y}const $=f(t,c,v);Ma(e,`${$}${w}`,d)},"writeJsonSync");var Ga=Object.defineProperty,Ja=m((e,t)=>Ga(e,"name",{value:t,configurable:!0}),"s$1");class He extends Error{static{m(this,"VisConfigError")}static{Ja(this,"VisConfigError")}chain;constructor(t,r,n){super(t,n),this.name=this.constructor.name,this.chain=r}}var Za=Object.defineProperty,Ha=m((e,t)=>Za(e,"name",{value:t,configurable:!0}),"e");class Xa extends He{static{m(this,"VisConfigCycleError")}static{Ha(this,"VisConfigCycleError")}constructor(t,r){const n=[...r,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${n}`,r)}}var Qa=Object.defineProperty,Ya=m((e,t)=>Qa(e,"name",{value:t,configurable:!0}),"s");class Ir extends He{static{m(this,"VisConfigDeprecatedKeyError")}static{Ya(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,r,n){const i=[`${t} uses removed keys.`,""];for(const c of n){const f=c.location?` (at ${c.location})`:"";i.push(` • ${c.name}${f} → renamed to \`${c.renamedTo}\``);for(const d of c.children??[])i.push(` ↳ ${d.name} → renamed to \`${d.renamedTo}\``)}i.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(i.join(`
13
- `),r),this.filePath=t,this.removedKeys=n}}var ec=Object.defineProperty,tc=m((e,t)=>ec(e,"name",{value:t,configurable:!0}),"t$1");class Qt extends He{static{m(this,"VisConfigLoadError")}static{tc(this,"VisConfigLoadError")}constructor(t,r,n){const i=n instanceof Error?n.message:String(n),c=r.length>0?`
14
- Chain: ${r.join(" → ")}`:"";super(`Failed to load ${t}: ${i}${c}`,r,{cause:n})}}var rc=Object.defineProperty,Fr=m((e,t)=>rc(e,"name",{value:t,configurable:!0}),"t");const nc=Fr(e=>e.join(" → "),"formatChain");class ct extends He{static{m(this,"VisConfigNotFoundError")}static{Fr(this,"VisConfigNotFoundError")}constructor(t,r,n){const i=r.length>0?r[r.length-1]:"<unknown>",c=n.length>0?`
12
+ `:""}catch(y){if(y.code!=="ENOENT")throw y}const $=f(t,c,v);_a(e,`${$}${w}`,d)},"writeJsonSync");var qa=Object.defineProperty,Ka=m((e,t)=>qa(e,"name",{value:t,configurable:!0}),"s$1");class Ze extends Error{static{m(this,"VisConfigError")}static{Ka(this,"VisConfigError")}chain;constructor(t,r,n){super(t,n),this.name=this.constructor.name,this.chain=r}}var Ga=Object.defineProperty,Ja=m((e,t)=>Ga(e,"name",{value:t,configurable:!0}),"e");class Ha extends Ze{static{m(this,"VisConfigCycleError")}static{Ja(this,"VisConfigCycleError")}constructor(t,r){const n=[...r,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${n}`,r)}}var Za=Object.defineProperty,Xa=m((e,t)=>Za(e,"name",{value:t,configurable:!0}),"s");class Dr extends Ze{static{m(this,"VisConfigDeprecatedKeyError")}static{Xa(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,r,n){const i=[`${t} uses removed keys.`,""];for(const c of n){const f=c.location?` (at ${c.location})`:"";i.push(` • ${c.name}${f} → renamed to \`${c.renamedTo}\``);for(const d of c.children??[])i.push(` ↳ ${d.name} → renamed to \`${d.renamedTo}\``)}i.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(i.join(`
13
+ `),r),this.filePath=t,this.removedKeys=n}}var Ya=Object.defineProperty,Qa=m((e,t)=>Ya(e,"name",{value:t,configurable:!0}),"t$1");class Yt extends Ze{static{m(this,"VisConfigLoadError")}static{Qa(this,"VisConfigLoadError")}constructor(t,r,n){const i=n instanceof Error?n.message:String(n),c=r.length>0?`
14
+ Chain: ${r.join(" → ")}`:"";super(`Failed to load ${t}: ${i}${c}`,r,{cause:n})}}var ec=Object.defineProperty,Ir=m((e,t)=>ec(e,"name",{value:t,configurable:!0}),"t");const tc=Ir(e=>e.join(" → "),"formatChain");class ct extends Ze{static{m(this,"VisConfigNotFoundError")}static{Ir(this,"VisConfigNotFoundError")}constructor(t,r,n){const i=r.length>0?r[r.length-1]:"<unknown>",c=n.length>0?`
15
15
  Tried:
16
16
  ${n.join(`
17
17
  `)}`:"";super(`Cannot resolve "${t}" extended from ${i}.${c}
18
- Chain: ${nc(r)}`,r)}}var oc=Object.defineProperty,Lr=m((e,t)=>oc(e,"name",{value:t,configurable:!0}),"i$1");const Yt="@inherit",sc=["aliases","dependsOn","inputs","outputs"],ic=Lr((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Yt))return[...t];const r=[];for(const n of t){if(n===Yt){e!==void 0&&r.push(...e);continue}r.push(n)}return r},"mergeArrayWithInherit"),ac=Lr((e,t)=>{const r={...e,...t};for(const n of sc){const i=e?.[n],c=t?.[n],f=ic(i,c);f===void 0?delete r[n]:r[n]=f}return r},"mergeTargetWithInherit");var cc=Object.defineProperty,Xe=m((e,t)=>cc(e,"name",{value:t,configurable:!0}),"o");const uc=Xe(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:r}=e,n=[];if(Array.isArray(r))for(const[i,c]of r.entries())c&&typeof c=="object"&&(Object.hasOwn(c,"scope")&&n.push({location:`taskDefaults[${i}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(c,"targets")&&n.push({location:`taskDefaults[${i}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:n.length>0?n:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[r,n]of e.scopedTasks.entries())n&&typeof n=="object"&&(Object.hasOwn(n,"scope")&&t.push({location:`scopedTasks[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(n,"targets")&&t.push({location:`scopedTasks[${r}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),lc=Xe(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),fc=Xe((e,t,r)=>{if(!r||typeof r!="object")return;const n=uc(r);if(n.length>0)throw new Ir(e,t,n)},"assertNoDeprecatedConfigKeys"),pc=Xe((e,t,r)=>{if(!r||typeof r!="object")return;const n=lc(r);if(n.length>0)throw new Ir(e,t,n)},"assertNoDeprecatedTaskKeys");var dc=Object.defineProperty,O=m((e,t)=>dc(e,"name",{value:t,configurable:!0}),"r");const Wr=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],gc=new Set(Wr),Ur=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],mc=new Set(Ur),zc=2880,ut={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},hc=O(e=>{if(!e)return{...ut};const t=ut.policies??{},r=e.policies??{},n={...t,...r};for(const i of Object.keys(t)){const c=t[i],f=r[i];c!==void 0&&f!==void 0&&(n[i]={...c,...f})}return{...ut,...e,policies:n}},"mergeSecurityDefaults"),er=O(e=>({...e,security:hc(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),yc=O(e=>{let t;try{t=rr(e)}catch{return}const r=new Set(t.filter(n=>gc.has(n)));for(const n of Wr)if(r.has(n))return A(e,n)},"findVisConfigFile"),bc=O(e=>{let t;try{t=rr(e)}catch{return}const r=new Set(t.filter(n=>mc.has(n)));for(const n of Ur)if(r.has(n))return A(e,n)},"findVisTaskConfigFile"),bt=O(e=>tr("sha256").update(go(e)).digest("hex"),"hashFileContents"),vc=O(e=>{const t=tr("sha256"),r=[...e].sort();for(const n of r)t.update(n),t.update(":"),t.update(bt(n)),t.update(`
19
- `);return t.digest("hex")},"hashConfigChain"),$c=O(e=>{const t=A(e,"node_modules");if(D(t)){const n=A(t,".cache","vis");return Ue(n),A(n,"vis-config-cache.json")}const r=Tr("vis",{create:!0,cwd:e});return r?A(r,"vis-config-cache.json"):void 0},"getConfigCachePath"),wc=O((e,t)=>{if(D(e))try{const r=ze(e);if(r.hash===t)return r.config}catch{}},"readConfigCache"),jc=O((e,t,r)=>{try{Ue(Ce(e)),Rr(e,{config:r,hash:t})}catch{}},"writeConfigCache"),xc=O(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),Oc=O((e,t,r)=>{if(sr(e))throw new ct(e,[...r,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const n=[];if(e.startsWith("./")||e.startsWith("../")){const i=Ce(t),c=A(i,e);if(n.push(c),D(c))return c;throw new ct(e,[...r,t],n)}try{return Se(t).resolve(e)}catch{throw n.push(`require.resolve("${e}") from ${t}`),new ct(e,[...r,t],n)}},"resolveExtendsSpecifier"),Vr=O(async(e,t,r)=>{const n=bt(t),i=t.slice(t.lastIndexOf(".")),c=A(Ce(t),`.vis-config-tmp-${n}${i}`);mo(t,c);let f;try{f=await e.import(c,{default:!0,try:!0})??{}}catch(d){throw new Qt(t,r,d)}finally{try{ho(c)}catch{}}try{return(typeof f=="function"?await f()??{}:f)??{}}catch(d){throw new Qt(t,r,d)}},"loadRawConfig"),kc=O((e,t)=>{const r={...e,...t};if(e.tasks||t.tasks){const n=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),i={};for(const c of n)i[c]=ac(e.tasks?.[c],t.tasks?.[c]);r.tasks=i}if((e.scopedTasks||t.scopedTasks)&&(r.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(r.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(r.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const n=e.security?.policies??{},i=t.security?.policies??{},c={...n,...i};for(const f of Object.keys(n)){const d=n[f],v=i[f];d!==void 0&&v!==void 0&&(c[f]={...d,...v})}r.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:c}}return(e.update||t.update)&&(r.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(r.taskRunner={...e.taskRunner,...t.taskRunner}),delete r.extends,r},"mergeVisConfigs"),qr=O(async(e,t,r,n,i,c)=>{if(n.has(t))throw new Xa(t,r);if(!i.has(t)){n.add(t);try{const f=await Vr(e,t,r);fc(t,r,f);const d=xc(f.extends);for(const v of d){const w=Oc(v,t,r);await qr(e,w,[...r,t],n,i,c)}i.set(t,f),c.push(t)}finally{n.delete(t)}}},"resolveConfigChain"),Rc=O(async(e,t)=>{let r;if(t?.explicitConfigPath){const y=sr(t.explicitConfigPath)?t.explicitConfigPath:A(e,t.explicitConfigPath);if(!D(y))throw new Error(`Cannot find config file at ${y}`);r=y}else r=yc(e);if(!r)return er({});const n=ir(e,{fsCache:!1,moduleCache:!1}),i=new Set,c=new Map,f=[];await qr(n,r,[],i,c,f);const d=vc(f),v=$c(e);if(v){const y=wc(v,d);if(y)return y}let w={};for(const y of f)w=kc(w,c.get(y));const $=er(w);return v&&jc(v,d,$),$},"loadVisConfig"),Pc=O(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),Tc=O((e,t)=>{const r=A(e,"node_modules"),n=Pc(t);if(D(r)){const c=A(r,".cache","vis","task-configs");return Ue(c),A(c,`${n}.json`)}const i=Tr("vis",{create:!0,cwd:e});return i?A(i,"task-configs",`${n}.json`):void 0},"getVisTaskCachePath"),Ec=O((e,t)=>{if(D(e))try{const r=ze(e);if(r.hash===t)return r.config}catch{}},"readVisTaskCache"),Sc=O((e,t,r)=>{try{Ue(Ce(e)),Rr(e,{config:r,hash:t})}catch{}},"writeVisTaskCache"),Ic=O(async(e,t,r)=>{const n=bc(t);if(!n)return;const i=bt(n),c=Tc(e,r);if(c){const w=Ec(c,i);if(w)return w}const f=ir(t,{fsCache:!1,moduleCache:!1}),d=await Vr(f,n,[]);pc(n,[],d);const v=d;return c&&Sc(c,i,v),v},"loadVisTaskConfig"),Fc=O(e=>e,"defineTaskConfig"),Lc=O(e=>e,"defineConfig");export{Ma as B,Tr as D,bc as G,zc as H,Ze as M,Ur as V,Fc as a,Ue as b,Lc as c,Kt as d,Rc as e,Ve as f,$a as g,Wr as h,ac as i,yc as j,ut as l,er as m,ze as n,Ic as r,pa as s,Rr as w};
18
+ Chain: ${tc(r)}`,r)}}var rc=Object.defineProperty,Rr=m((e,t)=>rc(e,"name",{value:t,configurable:!0}),"i$1");const Qt="@inherit",nc=["aliases","dependsOn","inputs","outputs"],oc=Rr((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Qt))return[...t];const r=[];for(const n of t){if(n===Qt){e!==void 0&&r.push(...e);continue}r.push(n)}return r},"mergeArrayWithInherit"),sc=Rr((e,t)=>{const r={...e,...t};for(const n of nc){const i=e?.[n],c=t?.[n],f=oc(i,c);f===void 0?delete r[n]:r[n]=f}return r},"mergeTargetWithInherit");var ic=Object.defineProperty,Xe=m((e,t)=>ic(e,"name",{value:t,configurable:!0}),"o");const ac=Xe(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:r}=e,n=[];if(Array.isArray(r))for(const[i,c]of r.entries())c&&typeof c=="object"&&(Object.hasOwn(c,"scope")&&n.push({location:`taskDefaults[${i}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(c,"targets")&&n.push({location:`taskDefaults[${i}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:n.length>0?n:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[r,n]of e.scopedTasks.entries())n&&typeof n=="object"&&(Object.hasOwn(n,"scope")&&t.push({location:`scopedTasks[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(n,"targets")&&t.push({location:`scopedTasks[${r}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),cc=Xe(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),uc=Xe((e,t,r)=>{if(!r||typeof r!="object")return;const n=ac(r);if(n.length>0)throw new Dr(e,t,n)},"assertNoDeprecatedConfigKeys"),lc=Xe((e,t,r)=>{if(!r||typeof r!="object")return;const n=cc(r);if(n.length>0)throw new Dr(e,t,n)},"assertNoDeprecatedTaskKeys");var fc=Object.defineProperty,O=m((e,t)=>fc(e,"name",{value:t,configurable:!0}),"r");const Fr=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],pc=new Set(Fr),Wr=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],dc=new Set(Wr),zc=2880,ut={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},gc=O(e=>{if(!e)return{...ut};const t=ut.policies??{},r=e.policies??{},n={...t,...r};for(const i of Object.keys(t)){const c=t[i],f=r[i];c!==void 0&&f!==void 0&&(n[i]={...c,...f})}return{...ut,...e,policies:n}},"mergeSecurityDefaults"),er=O(e=>({...e,security:gc(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),mc=O(e=>{let t;try{t=rr(e)}catch{return}const r=new Set(t.filter(n=>pc.has(n)));for(const n of Fr)if(r.has(n))return A(e,n)},"findVisConfigFile"),hc=O(e=>{let t;try{t=rr(e)}catch{return}const r=new Set(t.filter(n=>dc.has(n)));for(const n of Wr)if(r.has(n))return A(e,n)},"findVisTaskConfigFile"),bt=O(e=>tr("sha256").update(fo(e)).digest("hex"),"hashFileContents"),yc=O(e=>{const t=tr("sha256"),r=[...e].sort();for(const n of r)t.update(n),t.update(":"),t.update(bt(n)),t.update(`
19
+ `);return t.digest("hex")},"hashConfigChain"),bc=O(e=>{const t=A(e,"node_modules");if(B(t)){const n=A(t,".cache","vis");return Ve(n),A(n,"vis-config-cache.json")}const r=kr("vis",{create:!0,cwd:e});return r?A(r,"vis-config-cache.json"):void 0},"getConfigCachePath"),vc=O((e,t)=>{if(B(e))try{const r=De(e);if(r.hash===t)return r.config}catch{}},"readConfigCache"),$c=O((e,t,r)=>{try{Ve(Ce(e)),Br(e,{config:r,hash:t})}catch{}},"writeConfigCache"),wc=O(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),jc=O((e,t,r)=>{if(sr(e))throw new ct(e,[...r,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const n=[];if(e.startsWith("./")||e.startsWith("../")){const i=Ce(t),c=A(i,e);if(n.push(c),B(c))return c;throw new ct(e,[...r,t],n)}try{return Se(t).resolve(e)}catch{throw n.push(`require.resolve("${e}") from ${t}`),new ct(e,[...r,t],n)}},"resolveExtendsSpecifier"),Lr=O(async(e,t,r)=>{const n=bt(t),i=t.slice(t.lastIndexOf(".")),c=A(Ce(t),`.vis-config-tmp-${n}${i}`);po(t,c);let f;try{f=await e.import(c,{default:!0,try:!0})??{}}catch(d){throw new Yt(t,r,d)}finally{try{go(c)}catch{}}try{return(typeof f=="function"?await f()??{}:f)??{}}catch(d){throw new Yt(t,r,d)}},"loadRawConfig"),xc=O((e,t)=>{const r={...e,...t};if(e.tasks||t.tasks){const n=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),i={};for(const c of n)i[c]=sc(e.tasks?.[c],t.tasks?.[c]);r.tasks=i}if((e.scopedTasks||t.scopedTasks)&&(r.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(r.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(r.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const n=e.security?.policies??{},i=t.security?.policies??{},c={...n,...i};for(const f of Object.keys(n)){const d=n[f],v=i[f];d!==void 0&&v!==void 0&&(c[f]={...d,...v})}r.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:c}}return(e.update||t.update)&&(r.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(r.taskRunner={...e.taskRunner,...t.taskRunner}),delete r.extends,r},"mergeVisConfigs"),Vr=O(async(e,t,r,n,i,c)=>{if(n.has(t))throw new Ha(t,r);if(!i.has(t)){n.add(t);try{const f=await Lr(e,t,r);uc(t,r,f);const d=wc(f.extends);for(const v of d){const w=jc(v,t,r);await Vr(e,w,[...r,t],n,i,c)}i.set(t,f),c.push(t)}finally{n.delete(t)}}},"resolveConfigChain"),Bc=O(async(e,t)=>{let r;if(t?.explicitConfigPath){const y=sr(t.explicitConfigPath)?t.explicitConfigPath:A(e,t.explicitConfigPath);if(!B(y))throw new Error(`Cannot find config file at ${y}`);r=y}else r=mc(e);if(!r)return er({});const n=ir(e,{fsCache:!1,moduleCache:!1}),i=new Set,c=new Map,f=[];await Vr(n,r,[],i,c,f);const d=yc(f),v=bc(e);if(v){const y=vc(v,d);if(y)return y}let w={};for(const y of f)w=xc(w,c.get(y));const $=er(w);return v&&$c(v,d,$),$},"loadVisConfig"),Oc=O(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),kc=O((e,t)=>{const r=A(e,"node_modules"),n=Oc(t);if(B(r)){const c=A(r,".cache","vis","task-configs");return Ve(c),A(c,`${n}.json`)}const i=kr("vis",{create:!0,cwd:e});return i?A(i,"task-configs",`${n}.json`):void 0},"getVisTaskCachePath"),Pc=O((e,t)=>{if(B(e))try{const r=De(e);if(r.hash===t)return r.config}catch{}},"readVisTaskCache"),Tc=O((e,t,r)=>{try{Ve(Ce(e)),Br(e,{config:r,hash:t})}catch{}},"writeVisTaskCache"),Dc=O(async(e,t,r)=>{const n=hc(t);if(!n)return;const i=bt(n),c=kc(e,r);if(c){const w=Pc(c,i);if(w)return w}const f=ir(t,{fsCache:!1,moduleCache:!1}),d=await Lr(f,n,[]);lc(n,[],d);const v=d;return c&&Tc(c,i,v),v},"loadVisTaskConfig"),Ic=O(e=>e,"defineTaskConfig"),Rc=O(e=>e,"defineConfig");export{kr as B,hc as G,zc as H,He as M,Wr as V,Ic as a,Ve as b,Rc as c,_a as d,Bc as e,Kt as f,Ue as g,Fr as h,ba as i,mc as j,sc as k,ut as l,er as m,De as n,Dc as r,la as s,Br as w};
@@ -1,2 +1,2 @@
1
- var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{C as v,S as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-Bw9gKo69.js";var C=Object.defineProperty,m=d((t,o)=>C(t,"name",{value:o,configurable:!0}),"f");const $=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(`
1
+ var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{C as v,S as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-BynKrOLe.js";var C=Object.defineProperty,m=d((t,o)=>C(t,"name",{value:o,configurable:!0}),"f");const $=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{$ as default};
@@ -1 +1 @@
1
- var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{R as m,N as g}from"../packem_shared/pm-runner-BzGZmzYs.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const x=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??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
+ var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{R as m,N as g}from"../packem_shared/pm-runner-BwX5AL3W.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const x=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??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 n,i as u,$ as p}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{B as $}from"./config.js";import{l 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:r}=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=[n(r(),".zshrc"),n(r(),".zshenv"),n(r(),".bashrc"),n(r(),".bash_profile"),n(r(),".profile"),n(r(),".config","fish","config.fish")],M=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
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 n,i as u,$ as p}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{d as $}from"./config.js";import{l 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:r}=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=[n(r(),".zshrc"),n(r(),".zshenv"),n(r(),".bashrc"),n(r(),".bash_profile"),n(r(),".profile"),n(r(),".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"),R=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 g=Object.defineProperty;var c=(e,a)=>g(e,"name",{value:a,configurable:!0});import{R as d,S as k}from"../packem_shared/pm-runner-BzGZmzYs.js";var u=Object.defineProperty,v=c((e,a)=>u(e,"name",{value:a,configurable:!0}),"t");const x=v(async({argument:e,logger:a,options:r,process:i,visConfig:n,workspaceRoot:t})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[f,...p]=e,s=t??i.cwd,l=d(s,{configBackend:n?.install?.backend,configCorepack:n?.install?.corepack}),o=k(l,{fields:p,json:r.json||!1,package:f},s,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{x as default};
1
+ var g=Object.defineProperty;var c=(e,a)=>g(e,"name",{value:a,configurable:!0});import{R as d,S as k}from"../packem_shared/pm-runner-BwX5AL3W.js";var u=Object.defineProperty,v=c((e,a)=>u(e,"name",{value:a,configurable:!0}),"t");const x=v(async({argument:e,logger:a,options:r,process:i,visConfig:n,workspaceRoot:t})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[f,...p]=e,s=t??i.cwd,l=d(s,{configBackend:n?.install?.backend,configCorepack:n?.install?.corepack}),o=k(l,{fields:p,json:r.json||!1,package:f},s,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{x as default};
@@ -1,4 +1,4 @@
1
- var D=Object.defineProperty;var j=(t,s)=>D(t,"name",{value:s,configurable:!0});import{createRequire as M}from"node:module";import{i as b,M as d,z as P}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{H as v,B as w,j as K}from"./config.js";import{p as e}from"./bin.js";import{A as q}from"../packem_shared/pm-runner-BzGZmzYs.js";import{O as G}from"../packem_shared/build-scripts-3E2pmscY.js";import{N as A}from"../packem_shared/native-config-sync-BOeuyrBj.js";import{E as T}from"../packem_shared/min-release-age-heJgeP7o.js";const N=M(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=j(t=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,o]=h.versions.node.split(".").map(Number);if(s>22||s===22&&o>=3||s===20&&o>=16)return h.getBuiltinModule(t)}return N(t)},"__cjs_getBuiltinModule"),{execFileSync:I}=C("node:child_process"),{createInterface:F}=C("node:readline");var L=Object.defineProperty,u=j((t,s)=>L(t,"name",{value:s,configurable:!0}),"f");const Y=u(t=>{const s=[];return b(d(t,"turbo.json"))&&s.push("turborepo"),b(d(t,"nx.json"))&&s.push("nx"),b(d(t,".moon"))&&s.push("moon"),s},"detectExistingTools"),E=u((t,s)=>new Promise(o=>{t.question(s,i=>{o(i.trim())})}),"ask"),m=u(async(t,s,o=!0)=>{const i=await E(t,`${s} ${o?"[Y/n]":"[y/N]"} `);return i===""?o:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),k=u((t,s)=>{const o=[],i=Object.entries(s.allowBuilds).filter(([,l])=>l).map(([l])=>` "${l}": true,`).join(`
1
+ var D=Object.defineProperty;var j=(o,s)=>D(o,"name",{value:s,configurable:!0});import{createRequire as M}from"node:module";import{i as b,M as d,z as P}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{H as v,d as w,j as K}from"./config.js";import{p as e}from"./bin.js";import{A as q}from"../packem_shared/pm-runner-BwX5AL3W.js";import{O as G}from"../packem_shared/build-scripts-3E2pmscY.js";import{N as A}from"../packem_shared/native-config-sync-DdhTLlKL.js";import{E as T}from"../packem_shared/min-release-age-aEn0x8Vy.js";const N=M(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=j(o=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,t]=h.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return h.getBuiltinModule(o)}return N(o)},"__cjs_getBuiltinModule"),{execFileSync:I}=C("node:child_process"),{createInterface:F}=C("node:readline");var L=Object.defineProperty,u=j((o,s)=>L(o,"name",{value:s,configurable:!0}),"f");const Y=u(o=>{const s=[];return b(d(o,"turbo.json"))&&s.push("turborepo"),b(d(o,"nx.json"))&&s.push("nx"),b(d(o,".moon"))&&s.push("moon"),s},"detectExistingTools"),E=u((o,s)=>new Promise(t=>{o.question(s,i=>{t(i.trim())})}),"ask"),m=u(async(o,s,t=!0)=>{const i=await E(o,`${s} ${t?"[Y/n]":"[y/N]"} `);return i===""?t:i.toLowerCase()==="y"||i.toLowerCase()==="yes"},"confirm"),k=u((o,s)=>{const t=[],i=Object.entries(s.allowBuilds).filter(([,l])=>l).map(([l])=>` "${l}": true,`).join(`
2
2
  `),a=[` installScripts: {
3
3
  allow: ${i?`{
4
4
  ${i}
@@ -10,19 +10,18 @@ ${a.join(`
10
10
  `)}
11
11
  },`;return s.enableSocket&&(n+=`
12
12
  socket: { enabled: true },`),s.enableDepsDev&&(n+=`
13
- depsDev: { enabled: true },`),o.push(` security: {
13
+ depsDev: { enabled: true },`),t.push(` security: {
14
14
  ${n}
15
- },`),s.staged&&o.push(` staged: {
16
- "*.{ts,tsx}": "eslint --fix",
17
- "*.{ts,tsx,js,jsx,json,md}": "prettier --write",
15
+ },`),s.staged&&t.push(` staged: {
16
+ "*": ["vis lint --staged --fix", "vis fmt --staged"],
18
17
  },`),`import { defineConfig } from "@visulima/vis/config";
19
18
 
20
19
  export default defineConfig({
21
- ${o.join(`
20
+ ${t.join(`
22
21
 
23
22
  `)}
24
23
  });
25
- `},"generateConfigContent"),z=u(async(t,s,o)=>{const i=F({input:process.stdin,output:process.stdout});e.info(`
24
+ `},"generateConfigContent"),z=u(async(o,s,t)=>{const i=F({input:process.stdin,output:process.stdout});e.info(`
26
25
  vis init — interactive setup
27
- `);const a=await m(i," Enable Socket.dev security scanning?");a&&(e.success(" Socket.dev enabled — scores, alerts, and supply chain data active."),process.env.VIS_SOCKET_TOKEN||e.notice(" Set VIS_SOCKET_TOKEN for a custom API token (optional).")),e.info("");const n=await m(i," Enable Google deps.dev (OpenSSF Scorecard + GHSA advisories)?");n&&e.success(" deps.dev enabled — Scorecard signals and advisories merged into the security report."),e.info("");const l=await m(i," Scan for packages with build scripts?"),g={};if(l){e.info(" Scanning node_modules...");const c=G(t,{});if(c.length>0){e.info(` Found ${String(c.length)} package${c.length===1?"":"s"} with build scripts:
28
- `);for(const r of c){const f=await m(i,` Allow ${r}?`,!1),_=r.split(" (")[0]??r;g[_]=f,f&&e.success(` ✓ ${_} approved`)}}else e.info(" No packages with build scripts found.")}e.info("");const O=await m(i," Enforce a minimum release age (block freshly-published versions)?");let p;if(O){const c=await E(i,` Minimum age in minutes (default ${String(v)} = 2 days): `),r=c===""?v:Number.parseInt(c,10);p=Number.isFinite(r)&&r>0?r:v,e.success(` minimumReleaseAge: ${String(p)} minutes`)}e.info("");const S=await m(i," Set up pre-commit hooks (lint-staged)?",!1);let y=!1;(s.name==="pnpm"||s.name==="yarn"||s.name==="npm"||s.name==="bun")&&(e.info(""),y=await m(i,` Sync security settings to ${s.name} config?`));const $=Y(t);if($.length>0&&(e.info(""),e.info(` Detected existing tools: ${$.join(", ")}`),await m(i,` Run \`vis migrate\` for ${$.join(", ")}?`,!1))){i.close();const[c,...r]=s.name==="pnpm"?["pnpm","exec"]:s.name==="yarn"?["yarn","exec"]:s.name==="bun"?["bunx"]:["npx"];for(const f of $){e.info(` Migrating from ${f}...`);try{I(c,[...r,"vis","migrate",f],{cwd:t,stdio:"inherit"})}catch{e.warn(` Migration from ${f} had issues — run \`vis migrate ${f}\` manually.`)}}if(b(o))e.success(`Migrated config written to ${o}`);else{const f=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});w(o,f),e.success(`Created ${o}`)}e.notice(" Run 'vis doctor' to see your project's full health status.");return}i.close(),e.info("");const B=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});if(w(o,B),e.success(`Created ${o}`),y){const c=Object.fromEntries(Object.entries(g).filter(([,r])=>r));for(const r of A(s.name,t,c))e.success(` ${r}`);for(const r of T(s.name,t,p))e.success(` ${r}`)}e.info(""),e.info(" Setup complete. Your config:");const x=[a&&"Socket.dev",n&&"deps.dev"].filter(Boolean);e.info(` Security: ${x.length>0?`${x.join(" + ")} enabled`:"defaults only"}`),e.info(` Build scripts: ${Object.values(g).filter(Boolean).length} approved`),e.info(` Min age: ${p===void 0?"not enforced":`${String(p)} minutes`}`),e.info(` Git hooks: ${S?"lint-staged configured":"not configured"}`),e.info(` PM sync: ${y?"done":"skipped"}`),e.info(""),e.notice(" Run 'vis doctor' to see your project's full health status."),e.info("")},"runInteractiveInit"),H=u((t,s,o,i)=>{const a=k(s.name,{allowBuilds:{},enableDepsDev:!1,enableSocket:!1,minimumReleaseAge:v,staged:!1});if(w(i,a),e.success(`Created ${i}`),e.info(" Secure defaults are applied automatically by defineConfig()."),o.syncNative){for(const n of A(s.name,t,{}))e.success(` ${n}`);for(const n of T(s.name,t,v))e.success(` ${n}`)}e.info(""),e.notice("Run 'vis doctor' for a full health check, or 'vis init' in a terminal for guided setup.")},"runStaticInit"),R=u((t,s,o)=>{const i=d(t,".."),a=d(s,"node_modules","@visulima","vis","schemas",o),n=P(i,a),l=n===""?`./${o}`:n.split(/[/\\]/u).join("/");return l.startsWith(".")?l:`./${l}`},"buildSchemaRef"),V=u((t,s)=>{const o=R(d(t,"project.json"),s,"project.schema.json"),i=R(d(t,"vis.config.ts"),s,"vis-config.schema.json");e.info(""),e.info("Paste these into your config files to get editor IntelliSense:"),e.info(""),e.info(` project.json → "$schema": "${o}"`),e.info(` vis.config.ts → see ${i} (vis.config.ts is TypeScript; use the import path directly)`),e.info(""),e.notice("For nested project.json files, the `..` depth changes — run `vis migrate nx` to auto-rewrite all of them.")},"printSchemaPaths"),oe=u(async({options:t,workspaceRoot:s})=>{const o=s??process.cwd();if(t.schema){V(o,o);return}const i=q(o),a=K(o);if(a&&!t.force){e.warn(`Config already exists: ${a}`),e.notice("Use --force to overwrite, or edit the existing file.");return}const n=a??d(o,"vis.config.ts");process.stdin.isTTY&&t.interactive!==!1?await z(o,i,n):H(o,i,t,n)},"execute");export{R as buildSchemaRefForTesting,oe as default};
26
+ `);const a=await m(i," Enable Socket.dev security scanning?");a&&(e.success(" Socket.dev enabled — scores, alerts, and supply chain data active."),process.env.VIS_SOCKET_TOKEN||e.notice(" Set VIS_SOCKET_TOKEN for a custom API token (optional).")),e.info("");const n=await m(i," Enable Google deps.dev (OpenSSF Scorecard + GHSA advisories)?");n&&e.success(" deps.dev enabled — Scorecard signals and advisories merged into the security report."),e.info("");const l=await m(i," Scan for packages with build scripts?"),g={};if(l){e.info(" Scanning node_modules...");const c=G(o,{});if(c.length>0){e.info(` Found ${String(c.length)} package${c.length===1?"":"s"} with build scripts:
27
+ `);for(const r of c){const f=await m(i,` Allow ${r}?`,!1),x=r.split(" (")[0]??r;g[x]=f,f&&e.success(` ✓ ${x} approved`)}}else e.info(" No packages with build scripts found.")}e.info("");const O=await m(i," Enforce a minimum release age (block freshly-published versions)?");let p;if(O){const c=await E(i,` Minimum age in minutes (default ${String(v)} = 2 days): `),r=c===""?v:Number.parseInt(c,10);p=Number.isFinite(r)&&r>0?r:v,e.success(` minimumReleaseAge: ${String(p)} minutes`)}e.info("");const S=await m(i," Set up pre-commit hooks (lint-staged)?",!1);let y=!1;(s.name==="pnpm"||s.name==="yarn"||s.name==="npm"||s.name==="bun")&&(e.info(""),y=await m(i,` Sync security settings to ${s.name} config?`));const $=Y(o);if($.length>0&&(e.info(""),e.info(` Detected existing tools: ${$.join(", ")}`),await m(i,` Run \`vis migrate\` for ${$.join(", ")}?`,!1))){i.close();const[c,...r]=s.name==="pnpm"?["pnpm","exec"]:s.name==="yarn"?["yarn","exec"]:s.name==="bun"?["bunx"]:["npx"];for(const f of $){e.info(` Migrating from ${f}...`);try{I(c,[...r,"vis","migrate",f],{cwd:o,stdio:"inherit"})}catch{e.warn(` Migration from ${f} had issues — run \`vis migrate ${f}\` manually.`)}}if(b(t))e.success(`Migrated config written to ${t}`);else{const f=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});w(t,f),e.success(`Created ${t}`)}e.notice(" Run 'vis doctor' to see your project's full health status.");return}i.close(),e.info("");const B=k(s.name,{allowBuilds:g,enableDepsDev:n,enableSocket:a,minimumReleaseAge:p,staged:S});if(w(t,B),e.success(`Created ${t}`),y){const c=Object.fromEntries(Object.entries(g).filter(([,r])=>r));for(const r of A(s.name,o,c))e.success(` ${r}`);for(const r of T(s.name,o,p))e.success(` ${r}`)}e.info(""),e.info(" Setup complete. Your config:");const _=[a&&"Socket.dev",n&&"deps.dev"].filter(Boolean);e.info(` Security: ${_.length>0?`${_.join(" + ")} enabled`:"defaults only"}`),e.info(` Build scripts: ${Object.values(g).filter(Boolean).length} approved`),e.info(` Min age: ${p===void 0?"not enforced":`${String(p)} minutes`}`),e.info(` Git hooks: ${S?"lint-staged configured":"not configured"}`),e.info(` PM sync: ${y?"done":"skipped"}`),e.info(""),e.notice(" Run 'vis doctor' to see your project's full health status."),e.info("")},"runInteractiveInit"),H=u((o,s,t,i)=>{const a=k(s.name,{allowBuilds:{},enableDepsDev:!1,enableSocket:!1,minimumReleaseAge:v,staged:!1});if(w(i,a),e.success(`Created ${i}`),e.info(" Secure defaults are applied automatically by defineConfig()."),t.syncNative){for(const n of A(s.name,o,{}))e.success(` ${n}`);for(const n of T(s.name,o,v))e.success(` ${n}`)}e.info(""),e.notice("Run 'vis doctor' for a full health check, or 'vis init' in a terminal for guided setup.")},"runStaticInit"),R=u((o,s,t)=>{const i=d(o,".."),a=d(s,"node_modules","@visulima","vis","schemas",t),n=P(i,a),l=n===""?`./${t}`:n.split(/[/\\]/u).join("/");return l.startsWith(".")?l:`./${l}`},"buildSchemaRef"),V=u((o,s)=>{const t=R(d(o,"project.json"),s,"project.schema.json"),i=R(d(o,"vis.config.ts"),s,"vis-config.schema.json");e.info(""),e.info("Paste these into your config files to get editor IntelliSense:"),e.info(""),e.info(` project.json → "$schema": "${t}"`),e.info(` vis.config.ts → see ${i} (vis.config.ts is TypeScript; use the import path directly)`),e.info(""),e.notice("For nested project.json files, the `..` depth changes — run `vis migrate nx` to auto-rewrite all of them.")},"printSchemaPaths"),te=u(async({options:o,workspaceRoot:s})=>{const t=s??process.cwd();if(o.schema){V(t,t);return}const i=q(t),a=K(t);if(a&&!o.force){e.warn(`Config already exists: ${a}`),e.notice("Use --force to overwrite, or edit the existing file.");return}const n=a??d(t,"vis.config.ts");process.stdin.isTTY&&o.interactive!==!1?await z(t,i,n):H(t,i,o,n)},"execute");export{R as buildSchemaRefForTesting,te as default};
@@ -1,4 +1,4 @@
1
- var y=Object.defineProperty;var w=(r,e)=>y(r,"name",{value:e,configurable:!0});import{I as N,E as $,T as M,e as R}from"../packem_shared/index.server-B7ETiT4C.js";import{p as g}from"./bin.js";import{r as S,M as x,a as A,b,c as P,d as j,e as C,f as E,g as B,h as D}from"../packem_shared/s1ngularity-j_ArCZAs.js";import{g as O,a as V,r as F}from"../packem_shared/provenance-BsBn1f5S.js";import{r as I}from"../packem_shared/signatures-CaXzNuEn.js";var T=Object.defineProperty,p=w((r,e)=>T(r,"name",{value:e,configurable:!0}),"p");const k=new Set(["archivedRepo","author","downloads","expiredDomains","metadata","newBin","provenance","s1ngularity","signatures"]),U=p(r=>{const e=r.trim();if(e==="")return;if(e.startsWith("@")){const o=e.indexOf("@",1);return o===-1?{name:e,spec:void 0}:{name:e.slice(0,o),spec:e.slice(o+1)||void 0}}const i=e.indexOf("@");return i===-1?{name:e,spec:void 0}:{name:e.slice(0,i),spec:e.slice(i+1)||void 0}},"parsePackageArg"),L=p(r=>{if(r===void 0||r.trim()==="")return;const e=new Set;for(const i of r.split(",")){const o=i.trim();if(!k.has(o))throw new Error(`Unknown marshall in --only: ${o}. Known: ${[...k].sort().join(", ")}.`);e.add(o)}return e},"parseOnlyFlag"),l=p((r,e)=>r===void 0||r.has(e),"should"),J=p(r=>r?.has("signatures")??!1,"shouldRunSignatures"),Q=p(async({argument:r,options:e,workspaceRoot:i})=>{if(!r||r.length===0)throw new Error("No package specified. Usage: vis inspect <package>[@<spec>]");const o=U(r[0]);if(o===void 0)throw new Error(`Invalid package argument: "${String(r[0])}". Usage: vis inspect <package>[@<spec>]`);const t=L(e.only),u=await O(o.name,{workspaceRoot:i});if(u===void 0){g.error(`Package ${o.name} not found in the registry.`),process.exitCode=2;return}const h=V(u,o.spec);if(h===void 0){g.error(`Could not resolve ${o.name}@${o.spec??"latest"} to a published version.`),process.exitCode=2;return}const c=[{name:o.name,version:h}],n=new x;if(l(t,"author")){const s=await S(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"author",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"provenance")){const s=await F(c);for(const a of s)n.add({marshall:"provenance",message:`Prior version ${a.priorVersionWithProvenance} had provenance but ${a.version} does not.`,packageName:a.packageName,severity:"error"})}if(l(t,"s1ngularity")){const s=await A(c,{workspaceRoot:i});for(const a of s){const d=a.hookChanges.map(v=>`${v.hook} (${v.kind})`).join(", "),m=a.hookChanges.length===1;n.add({marshall:"s1ngularity",message:`${a.version} ${m?"has an":"has"} install-script ${m?"change":"changes"} [${d}] AND dropped the provenance attestation that ${a.priorVersion} carried — this is the s1ngularity compromised-publish shape.`,packageName:a.packageName,severity:"error"})}}if(l(t,"newBin")){const s=await b(c);for(const a of s){const d=a.newBins.map(m=>m.command).join(", ");n.add({marshall:"newBin",message:`${a.toVersion} adds new bin script${a.newBins.length===1?"":"s"}: ${d} (prior: ${a.fromVersion}).`,packageName:a.packageName,severity:"warning"})}}if(l(t,"metadata")){const s=await P(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"metadata",message:`Missing/invalid metadata: ${a.issues.join(", ")}.`,packageName:a.packageName,severity:"warning"})}if(l(t,"downloads")){const s=await j([o.name]);for(const a of s){const d=a.downloadsLastMonth===void 0?"unknown":String(a.downloadsLastMonth);n.add({marshall:"downloads",message:a.kind==="no-data"?"npm stats API returned no monthly download data.":`Only ${d} downloads in the past month.`,packageName:a.packageName,severity:a.severity})}}if(l(t,"expiredDomains")){const s=await C(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"expiredDomains",message:a.kind==="expired"?`Maintainer email domain ${a.domain} (${a.maintainer}) is unregistered — potential hijack risk.`:`Could not verify maintainer email domain ${a.domain} (${a.maintainer}).`,packageName:a.packageName,severity:a.severity})}if(J(t)){const s=await I(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"signatures",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"archivedRepo")){const s=await E(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"archivedRepo",message:a.kind==="archived"?`Source repo ${a.owner}/${a.repo} is archived${a.archivedAt===void 0?"":` (since ${a.archivedAt})`}.`:`Source repo ${a.owner}/${a.repo} returned 404 from GitHub.`,packageName:a.packageName,severity:"warning"})}const f=n.all();if(e.json===!0)process.stdout.write(`${JSON.stringify(B(f),void 0,2)}
1
+ var y=Object.defineProperty;var w=(r,e)=>y(r,"name",{value:e,configurable:!0});import{I as N,E as $,T as M,e as R}from"../packem_shared/index.server-B7ETiT4C.js";import{p as g}from"./bin.js";import{r as S,M as x,a as A,b,c as P,d as j,e as C,f as E,g as B,h as D}from"../packem_shared/s1ngularity-Bs9fUf3q.js";import{g as O,a as V,r as F}from"../packem_shared/provenance-BuiEsWbI.js";import{r as I}from"../packem_shared/signatures-LYMy8OR5.js";var T=Object.defineProperty,p=w((r,e)=>T(r,"name",{value:e,configurable:!0}),"p");const k=new Set(["archivedRepo","author","downloads","expiredDomains","metadata","newBin","provenance","s1ngularity","signatures"]),U=p(r=>{const e=r.trim();if(e==="")return;if(e.startsWith("@")){const o=e.indexOf("@",1);return o===-1?{name:e,spec:void 0}:{name:e.slice(0,o),spec:e.slice(o+1)||void 0}}const i=e.indexOf("@");return i===-1?{name:e,spec:void 0}:{name:e.slice(0,i),spec:e.slice(i+1)||void 0}},"parsePackageArg"),L=p(r=>{if(r===void 0||r.trim()==="")return;const e=new Set;for(const i of r.split(",")){const o=i.trim();if(!k.has(o))throw new Error(`Unknown marshall in --only: ${o}. Known: ${[...k].sort().join(", ")}.`);e.add(o)}return e},"parseOnlyFlag"),l=p((r,e)=>r===void 0||r.has(e),"should"),J=p(r=>r?.has("signatures")??!1,"shouldRunSignatures"),Q=p(async({argument:r,options:e,workspaceRoot:i})=>{if(!r||r.length===0)throw new Error("No package specified. Usage: vis inspect <package>[@<spec>]");const o=U(r[0]);if(o===void 0)throw new Error(`Invalid package argument: "${String(r[0])}". Usage: vis inspect <package>[@<spec>]`);const t=L(e.only),u=await O(o.name,{workspaceRoot:i});if(u===void 0){g.error(`Package ${o.name} not found in the registry.`),process.exitCode=2;return}const h=V(u,o.spec);if(h===void 0){g.error(`Could not resolve ${o.name}@${o.spec??"latest"} to a published version.`),process.exitCode=2;return}const c=[{name:o.name,version:h}],n=new x;if(l(t,"author")){const s=await S(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"author",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"provenance")){const s=await F(c);for(const a of s)n.add({marshall:"provenance",message:`Prior version ${a.priorVersionWithProvenance} had provenance but ${a.version} does not.`,packageName:a.packageName,severity:"error"})}if(l(t,"s1ngularity")){const s=await A(c,{workspaceRoot:i});for(const a of s){const d=a.hookChanges.map(v=>`${v.hook} (${v.kind})`).join(", "),m=a.hookChanges.length===1;n.add({marshall:"s1ngularity",message:`${a.version} ${m?"has an":"has"} install-script ${m?"change":"changes"} [${d}] AND dropped the provenance attestation that ${a.priorVersion} carried — this is the s1ngularity compromised-publish shape.`,packageName:a.packageName,severity:"error"})}}if(l(t,"newBin")){const s=await b(c);for(const a of s){const d=a.newBins.map(m=>m.command).join(", ");n.add({marshall:"newBin",message:`${a.toVersion} adds new bin script${a.newBins.length===1?"":"s"}: ${d} (prior: ${a.fromVersion}).`,packageName:a.packageName,severity:"warning"})}}if(l(t,"metadata")){const s=await P(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"metadata",message:`Missing/invalid metadata: ${a.issues.join(", ")}.`,packageName:a.packageName,severity:"warning"})}if(l(t,"downloads")){const s=await j([o.name]);for(const a of s){const d=a.downloadsLastMonth===void 0?"unknown":String(a.downloadsLastMonth);n.add({marshall:"downloads",message:a.kind==="no-data"?"npm stats API returned no monthly download data.":`Only ${d} downloads in the past month.`,packageName:a.packageName,severity:a.severity})}}if(l(t,"expiredDomains")){const s=await C(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"expiredDomains",message:a.kind==="expired"?`Maintainer email domain ${a.domain} (${a.maintainer}) is unregistered — potential hijack risk.`:`Could not verify maintainer email domain ${a.domain} (${a.maintainer}).`,packageName:a.packageName,severity:a.severity})}if(J(t)){const s=await I(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"signatures",message:a.message,packageName:a.packageName,severity:a.severity})}if(l(t,"archivedRepo")){const s=await E(c,{workspaceRoot:i});for(const a of s)n.add({marshall:"archivedRepo",message:a.kind==="archived"?`Source repo ${a.owner}/${a.repo} is archived${a.archivedAt===void 0?"":` (since ${a.archivedAt})`}.`:`Source repo ${a.owner}/${a.repo} returned 404 from GitHub.`,packageName:a.packageName,severity:"warning"})}const f=n.all();if(e.json===!0)process.stdout.write(`${JSON.stringify(B(f),void 0,2)}
2
2
  `);else{const s=`${o.name}@${h}`;if(f.length===0)g.info(`${N("✓")} ${s} — no findings.`);else{g.info(`${$("Inspecting")} ${s}`);for(const m of D(f))process.stdout.write(`${m}
3
3
  `);const a=n.errors().length,d=n.warnings().length;process.stdout.write(`
4
4
  ${$("Summary:")} ${M(`${String(a)} error${a===1?"":"s"}`)}, ${R(`${String(d)} warning${d===1?"":"s"}`)}.
@@ -1 +1 @@
1
- var M=Object.defineProperty;var d=(s,r)=>M(s,"name",{value:r,configurable:!0});import{createRequire as T}from"node:module";import{i as F,M as h,K as N,O as H}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{p as n}from"./bin.js";import{A as J,R as K,I as Q,C as U}from"../packem_shared/pm-runner-BzGZmzYs.js";import{s as W}from"../packem_shared/typosquats-C1e6RNjF.js";import{h as G,P as V}from"../packem_shared/peer-warnings-EvSJ18gE.js";import{o as X}from"../packem_shared/utils-DrNg0XTR.js";const B=T(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,A=d(s=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[r,t]=l.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return l.getBuiltinModule(s)}return B(s)},"__cjs_getBuiltinModule"),{rmSync:$}=A("node:fs");var Y=Object.defineProperty,y=d((s,r)=>Y(s,"name",{value:r,configurable:!0}),"u");const Z=["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json","bun.lock","bun.lockb"],ee=y(s=>{let r=s;for(;;){for(const e of Z)if(F(h(r,e)))return!0;const t=N(r);if(t===r||H(r).root===r)return!1;r=t}},"hasLockfile"),g=new Set(["aube","auto","bun","npm","pnpm","yarn"]),ce=y(async s=>{const{argument:r,logger:t,options:e,visConfig:c,workspaceRoot:C}=s,a=C??process.cwd();if(r&&r.length>0){const o=e,{default:j}=await import("./handler17.js"),q=o.marshallCheck===!1||o["no-marshall-check"]===!0?!1:void 0,S=o.socketCheck===!1||o["no-socket-check"]===!0?!1:void 0,P=o.typosquatCheck===!1||o["no-typosquat-check"]===!0?!1:void 0,z=o.runScripts===!0||o["run-scripts"]===!0,E=o.workspaceRoot===!0||o["workspace-root"]===!0,I=o.saveOptional===!0||o["save-optional"]===!0,D=e.dev===!0,L={autoInstallPeers:!1,exact:o.exact===!0,filter:e.filter,global:!1,marshallCheck:q,runScripts:z,saveDev:D,saveOptional:I,savePeer:!1,socketCheck:S,to:void 0,typosquatCheck:P,workspace:!1,workspaceRoot:E};await j({...s,argument:r,options:L});return}if(e.typosquatCheck!==!1&&!await W(a,c?.security?.typosquatAllowlist)){process.exitCode=1;return}const i=e.installer;if(i&&!g.has(i)){n.error(`Invalid --installer value: "${i}". Expected one of: ${[...g].join(", ")}.`),process.exitCode=1;return}const w=i,b=e.aube===!1;let f;try{f=b?J(a):K(a,{backend:w,configBackend:c?.install?.backend,configCorepack:c?.install?.corepack})}catch(o){n.error(o instanceof Error?o.message:String(o)),process.exitCode=1;return}const k=Q(a,f);k&&n.warn(k);const _=X(e.filter),p=e.ci||!1,m=e.frozenLockfile||p,O=e.frozenLockfile===!1||e.force||e.lockfileOnly,x=ee(a),v=m||!O&&x;if(!m&&v&&!e.silent&&n.info("Defaulting to frozen lockfile (pass --no-frozen-lockfile to allow lockfile updates)."),p){n.info("Clean install: removing node_modules...");try{$(h(a,"node_modules"),{force:!0,recursive:!0})}catch(o){n.error(`Failed to remove node_modules: ${o instanceof Error?o.message:String(o)}`),process.exitCode=1;return}}const{code:u,output:R}=await U(f,{dev:e.dev||!1,filter:_,force:e.force||!1,frozenLockfile:v,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},a,t,{ciMode:p,preferOffline:e.preferOffline||!1});u!==0&&(process.exitCode=u),u===0&&!e.silent&&G(R)&&n.info(V)},"execute");export{ce as default};
1
+ var M=Object.defineProperty;var d=(s,r)=>M(s,"name",{value:r,configurable:!0});import{createRequire as T}from"node:module";import{i as F,M as h,K as N,O as H}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{p as n}from"./bin.js";import{A as J,R as K,I as Q,C as U}from"../packem_shared/pm-runner-BwX5AL3W.js";import{s as W}from"../packem_shared/typosquats-znskIR5j.js";import{h as G,P as V}from"../packem_shared/peer-warnings-EvSJ18gE.js";import{o as X}from"../packem_shared/utils-DrNg0XTR.js";const B=T(import.meta.url),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,A=d(s=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[r,t]=l.versions.node.split(".").map(Number);if(r>22||r===22&&t>=3||r===20&&t>=16)return l.getBuiltinModule(s)}return B(s)},"__cjs_getBuiltinModule"),{rmSync:$}=A("node:fs");var Y=Object.defineProperty,y=d((s,r)=>Y(s,"name",{value:r,configurable:!0}),"u");const Z=["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json","bun.lock","bun.lockb"],ee=y(s=>{let r=s;for(;;){for(const e of Z)if(F(h(r,e)))return!0;const t=N(r);if(t===r||H(r).root===r)return!1;r=t}},"hasLockfile"),g=new Set(["aube","auto","bun","npm","pnpm","yarn"]),ce=y(async s=>{const{argument:r,logger:t,options:e,visConfig:c,workspaceRoot:C}=s,a=C??process.cwd();if(r&&r.length>0){const o=e,{default:j}=await import("./handler17.js"),q=o.marshallCheck===!1||o["no-marshall-check"]===!0?!1:void 0,S=o.socketCheck===!1||o["no-socket-check"]===!0?!1:void 0,P=o.typosquatCheck===!1||o["no-typosquat-check"]===!0?!1:void 0,z=o.runScripts===!0||o["run-scripts"]===!0,E=o.workspaceRoot===!0||o["workspace-root"]===!0,I=o.saveOptional===!0||o["save-optional"]===!0,D=e.dev===!0,L={autoInstallPeers:!1,exact:o.exact===!0,filter:e.filter,global:!1,marshallCheck:q,runScripts:z,saveDev:D,saveOptional:I,savePeer:!1,socketCheck:S,to:void 0,typosquatCheck:P,workspace:!1,workspaceRoot:E};await j({...s,argument:r,options:L});return}if(e.typosquatCheck!==!1&&!await W(a,c?.security?.typosquatAllowlist)){process.exitCode=1;return}const i=e.installer;if(i&&!g.has(i)){n.error(`Invalid --installer value: "${i}". Expected one of: ${[...g].join(", ")}.`),process.exitCode=1;return}const w=i,b=e.aube===!1;let f;try{f=b?J(a):K(a,{backend:w,configBackend:c?.install?.backend,configCorepack:c?.install?.corepack})}catch(o){n.error(o instanceof Error?o.message:String(o)),process.exitCode=1;return}const k=Q(a,f);k&&n.warn(k);const _=X(e.filter),p=e.ci||!1,m=e.frozenLockfile||p,O=e.frozenLockfile===!1||e.force||e.lockfileOnly,x=ee(a),v=m||!O&&x;if(!m&&v&&!e.silent&&n.info("Defaulting to frozen lockfile (pass --no-frozen-lockfile to allow lockfile updates)."),p){n.info("Clean install: removing node_modules...");try{$(h(a,"node_modules"),{force:!0,recursive:!0})}catch(o){n.error(`Failed to remove node_modules: ${o instanceof Error?o.message:String(o)}`),process.exitCode=1;return}}const{code:u,output:R}=await U(f,{dev:e.dev||!1,filter:_,force:e.force||!1,frozenLockfile:v,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},a,t,{ciMode:p,preferOffline:e.preferOffline||!1});u!==0&&(process.exitCode=u),u===0&&!e.silent&&G(R)&&n.info(V)},"execute");export{ce as default};
@@ -1 +1 @@
1
- var L=Object.defineProperty;var $=(s,a)=>L(s,"name",{value:a,configurable:!0});import{createRequire as O}from"node:module";import{E as M,T as N,e as z,I as E}from"../packem_shared/index.server-B7ETiT4C.js";import{n as B,w as U}from"./config.js";import{K as V,I as C,L as Y,p as f,M as R,N as J,Q as K,f as Q,C as W,U as X,R as G,X as H,i as x,b as Z,Y as ee}from"./bin.js";import{M as oe}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{y as se,R as te,P as ne}from"../packem_shared/pm-runner-BzGZmzYs.js";import{r as D,a as ae,b as re,p as ie}from"../packem_shared/resolve-explicit-CBPr617N.js";import{r as ce}from"../packem_shared/typosquats-C1e6RNjF.js";import{d as _,o as P}from"../packem_shared/utils-DrNg0XTR.js";const A=O(import.meta.url),v=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=$(s=>{if(typeof v<"u"&&v.versions&&v.versions.node){const[a,e]=v.versions.node.split(".").map(Number);if(a>22||a===22&&e>=3||a===20&&e>=16)return v.getBuiltinModule(s)}return A(s)},"__cjs_getBuiltinModule"),{createInterface:I}=F("node:readline");var le=Object.defineProperty,w=$((s,a)=>le(s,"name",{value:a,configurable:!0}),"c");const j=w(s=>s==="default"?"catalog:":`catalog:${s}`,"buildCatalogRef"),b=w(s=>s==="default"?"default catalog":`catalog "${s}"`,"labelForCatalog"),pe=w((s,a)=>{const e=[];for(const[o,n]of a)o.includes(":")||n.has(s)&&e.push(o);if(e.length===0)return;if(e.length===1){const[o]=e;return{source:b(o),spec:j(o)}}const r=e.find(o=>o==="default")??e[0],i=e.filter(o=>o!==r);return{candidates:[...e],conflict:!0,source:`${b(r)} (also in: ${i.map(o=>b(o)).join(", ")})`,spec:j(r)}},"resolveFromCatalogs"),fe=w((s,a)=>{const e=new Map;for(const[c,l]of a){if(!c.includes(":"))continue;const u=l.get(s);u!==void 0&&e.set(u,(e.get(u)??0)+1)}if(e.size===0)return;const r=[...e.entries()],i=r.reduce((c,[,l])=>c+l,0);if(r.length===1){const[[c]]=r;return{source:`siblings (${String(i)} pkg${i===1?"":"s"} on ${c})`,spec:c}}const o=[...r].sort((c,l)=>l[1]-c[1]),[n,t]=o[0],p=o.slice(1).map(([c,l])=>`${c} (×${String(l)})`);return{candidates:o.map(([c])=>c),conflict:!0,source:`siblings (most common: ${n} ×${String(t)}; conflicts: ${p.join(", ")})`,spec:n}},"resolveFromSiblings"),ue=w((s,a)=>pe(s,a)||fe(s,a),"conformToCatalog");var de=Object.defineProperty,g=$((s,a)=>de(s,"name",{value:a,configurable:!0}),"u");const ge=g((s,a,e)=>{const r=[];for(const i of s.values()){const{overall:o}=i.score,n=V(o),t=`${String(Math.round(o*100))}%`,p=i.alerts.length,c=C(i),l=Y(c,i.version,e),u=n==="red"?N:n==="yellow"?z:E;if(l?f.info(` ${u(t)} ${R(i)} ${M(`[accepted: ${l.reason}]`)}`):f.info(` ${u(t)} ${R(i)}`),p>0){const d=i.alerts.filter(m=>m.severity==="critical"||m.severity==="high").length;d>0&&f.warn(` ${String(d)} critical/high alert${d===1?"":"s"}`)}o<a&&!l&&r.push(i)}return r},"displaySecurityReports"),me=g(async(s,a)=>{const e=I({input:process.stdin,output:process.stdout}),r=g(t=>new Promise(p=>{e.question(t,c=>{p(c.trim())})}),"ask"),i=String(Math.round(a*100));f.warn(""),f.warn(`${String(s.length)} package${s.length===1?"":"s"} scored below the minimum threshold (${i}%):`);for(const t of s){const p=C(t),c=`${String(Math.round(t.score.overall*100))}%`;f.warn(` • ${p}@${t.version} — score: ${c} (${J(t.score.overall)})`)}f.warn("");const o=await r("Continue adding these packages? [y/N] ");if(o.toLowerCase()!=="y"&&o.toLowerCase()!=="yes")return e.close(),!1;const n=await r("Remember this decision? (prints config snippet) [y/N] ");if(e.close(),n.toLowerCase()==="y"||n.toLowerCase()==="yes"){f.notice(""),f.notice("Add the following to security.acceptedRisks in vis.config.ts:"),f.notice("");for(const t of s){const p=C(t),c=K(p,t.version,t.score.overall,"Reviewed and accepted");f.notice(c)}f.notice("")}return!0},"confirmLowScorePackages"),ke=g(async(s,a,e,r)=>{const i=await D(s);if(i.length===0)return!0;f.info(""),f.info(`${a.map(t=>t.displayName).join(" + ")} security check:`);const o=await Q(a,i);if(o.size===0)return f.info(" Could not fetch security data. Proceeding."),!0;const n=ge(o,e,r);return n.length===0?(f.info(""),!0):process.stdin.isTTY?me(n,e):(f.warn(`Aborting: ${String(n.length)} package${n.length===1?"":"s"} below minimum score. Use --no-socket-check to skip.`),!1)},"runSocketPreCheck"),he=["dependencies","devDependencies","peerDependencies","optionalDependencies"],ve=g(s=>s.savePeer?"peerDependencies":s.saveOptional?"optionalDependencies":s.saveDev?"devDependencies":"dependencies","pickDepSection"),T=g((s,a)=>s.startsWith("catalog:")||!a?s:s.replace(/^[\^~]/,""),"applyExactPrefix"),we=g(async(s,a)=>{const e=[];for(const o of s){const{name:n,versionSpec:t}=_(o);if(!n)continue;if(t!==void 0){e.push({explicit:t,name:n});continue}const p=ue(n,a);if(p){p.conflict&&f.warn(`${n}: ambiguous constraint — picking ${p.spec} (${p.source}). Pass ${n}@<version> to override.`),e.push({entry:{name:n,source:p.source,spec:p.spec},kind:"resolved",name:n});continue}e.push({kind:"missing",name:n})}const r=e.filter(o=>"kind"in o&&o.kind==="missing").map(o=>o.name),i=r.length>0?await ae(r):new Map;return e.map(o=>{if("explicit"in o)return{name:o.name,source:"explicit",spec:o.explicit};if(o.kind==="resolved")return o.entry;const n=i.get(o.name);if(n===void 0)throw new Error(`--to: cannot resolve a version for "${o.name}" (not in any catalog or sibling, and registry lookup failed). Pass ${o.name}@<version> explicitly.`);const t=`^${n}`;return f.info(`${o.name}: no existing constraint — using registry latest (${t}). Add to a catalog to share this version across workspace packages.`),{name:o.name,source:"registry latest",spec:t}})},"planConformedSpecs"),$e=g((s,a,e,r)=>{for(const{name:i,spec:o}of a){const n=T(o,r);for(const p of he){if(p===e)continue;const c=s[p];c?.[i]!==void 0&&(delete c[i],Object.keys(c).length===0&&delete s[p])}let t=s[e];t===void 0&&(t={},s[e]=t),t[i]=n}},"applyPlannedSpecsToPackageJson"),ye=g(async({ignoreScripts:s,logger:a,options:e,packages:r,pm:i,target:o,visConfig:n,workspaceRoot:t})=>{const{workspace:p}=W(t,n??{}),c=p.projects[o];if(!c){const k=Object.keys(p.projects).sort();throw new Error(`--to: workspace package "${o}" not found. Available: ${k.length>0?k.slice(0,10).join(", "):"(none)"}${k.length>10?`, ... (${String(k.length-10)} more)`:""}.`)}const l=oe(t,c.root,"package.json"),{packageManager:u}=X(t),d=G(t,u),m=ve(e),h=e.exact??!1,y=await we(r,d);if(y.length===0)return 0;const S=B(l);$e(S,y,m,h),U(l,S,{indent:H(l,{useEditorconfig:n?.editorconfig??!0}),overwrite:!0});for(const k of y){const q=T(k.spec,h);f.info(`${E("+")} ${k.name}@${q} → ${o}/${m} (${M(k.source)})`)}return se(i,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:s,lockfileOnly:!1,noOptional:!1,offline:!1,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},t,a)},"applyConformedAdd"),_e=g(async({argument:s,logger:a,options:e,visConfig:r,workspaceRoot:i})=>{let o=s;if(!o||o.length===0)throw new Error("No packages specified. Usage: vis add <packages...>");if(e.typosquatCheck!==!1){const l=o.map(d=>_(d)),u=await ce(l.map(d=>d.name),r?.security?.typosquatAllowlist);if(!u.ok){process.exitCode=1;return}o=l.map((d,m)=>{const h=u.packages[m];return h!==d.name?d.versionSpec?`${h}@${d.versionSpec}`:h??"":o[m]??""})}if(e.marshallCheck!==!1){const l=await D(o);if(l.length>0){const u=await re(l,{config:r?.security?.marshalls,workspaceRoot:i});if(!await ie(u)){process.exitCode=1;return}}}if(e.socketCheck!==!1){const l=new Set;x("socket")&&l.add("socket"),x("depsDev")&&l.add("deps-dev");const u=Z(r?.security,{disabled:l,minimumScore:r?.security?.policies?.score?.minimum});if(u.length>0){const d=r?.security?.policies?.score?.minimum??ee;if(!await ke(o,u,d,r?.security?.acceptedRisks)){process.exitCode=1;return}}}const n=process.cwd(),t=te(i??n,{configBackend:r?.install?.backend,configCorepack:r?.install?.corepack}),p=!e.runScripts;if(e.to){if(e.global||e.workspaceRoot)throw new Error("--to is incompatible with --global / --workspace-root.");if(e.filter&&P(e.filter).length>0)throw new Error("--to and --filter are mutually exclusive — --to already targets one package.");if(!i)throw new Error("--to requires a monorepo workspace. Run from inside a pnpm/bun/yarn/npm workspace.");const l=await ye({ignoreScripts:p,logger:a,options:e,packages:o,pm:t,target:e.to,visConfig:r,workspaceRoot:i});l!==0&&(process.exitCode=l);return}const c=ne(t,{exact:e.exact||!1,filter:P(e.filter),global:e.global||!1,optional:e.saveOptional||!1,packages:o,peer:e.savePeer||!1,saveDev:e.saveDev||!1,workspace:e.workspace||!1,workspaceRoot:e.workspaceRoot||!1},n,a,{autoInstallPeers:e.autoInstallPeers||!1,ignoreScripts:p});c!==0&&(process.exitCode=c)},"execute");export{_e as default};
1
+ var L=Object.defineProperty;var $=(s,a)=>L(s,"name",{value:a,configurable:!0});import{createRequire as O}from"node:module";import{E as M,T as N,e as z,I as E}from"../packem_shared/index.server-B7ETiT4C.js";import{n as B,w as U}from"./config.js";import{K as V,I as C,L as Y,p as f,M as R,N as J,Q as K,f as Q,C as W,U as X,R as G,X as H,i as x,b as Z,Y as ee}from"./bin.js";import{M as oe}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{y as se,R as te,P as ne}from"../packem_shared/pm-runner-BwX5AL3W.js";import{r as D,a as ae,b as re,p as ie}from"../packem_shared/resolve-explicit-RgRrUDZv.js";import{r as ce}from"../packem_shared/typosquats-znskIR5j.js";import{d as _,o as P}from"../packem_shared/utils-DrNg0XTR.js";const A=O(import.meta.url),v=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=$(s=>{if(typeof v<"u"&&v.versions&&v.versions.node){const[a,e]=v.versions.node.split(".").map(Number);if(a>22||a===22&&e>=3||a===20&&e>=16)return v.getBuiltinModule(s)}return A(s)},"__cjs_getBuiltinModule"),{createInterface:I}=F("node:readline");var le=Object.defineProperty,w=$((s,a)=>le(s,"name",{value:a,configurable:!0}),"c");const j=w(s=>s==="default"?"catalog:":`catalog:${s}`,"buildCatalogRef"),b=w(s=>s==="default"?"default catalog":`catalog "${s}"`,"labelForCatalog"),pe=w((s,a)=>{const e=[];for(const[o,n]of a)o.includes(":")||n.has(s)&&e.push(o);if(e.length===0)return;if(e.length===1){const[o]=e;return{source:b(o),spec:j(o)}}const r=e.find(o=>o==="default")??e[0],i=e.filter(o=>o!==r);return{candidates:[...e],conflict:!0,source:`${b(r)} (also in: ${i.map(o=>b(o)).join(", ")})`,spec:j(r)}},"resolveFromCatalogs"),fe=w((s,a)=>{const e=new Map;for(const[c,l]of a){if(!c.includes(":"))continue;const u=l.get(s);u!==void 0&&e.set(u,(e.get(u)??0)+1)}if(e.size===0)return;const r=[...e.entries()],i=r.reduce((c,[,l])=>c+l,0);if(r.length===1){const[[c]]=r;return{source:`siblings (${String(i)} pkg${i===1?"":"s"} on ${c})`,spec:c}}const o=[...r].sort((c,l)=>l[1]-c[1]),[n,t]=o[0],p=o.slice(1).map(([c,l])=>`${c} (×${String(l)})`);return{candidates:o.map(([c])=>c),conflict:!0,source:`siblings (most common: ${n} ×${String(t)}; conflicts: ${p.join(", ")})`,spec:n}},"resolveFromSiblings"),ue=w((s,a)=>pe(s,a)||fe(s,a),"conformToCatalog");var de=Object.defineProperty,g=$((s,a)=>de(s,"name",{value:a,configurable:!0}),"u");const ge=g((s,a,e)=>{const r=[];for(const i of s.values()){const{overall:o}=i.score,n=V(o),t=`${String(Math.round(o*100))}%`,p=i.alerts.length,c=C(i),l=Y(c,i.version,e),u=n==="red"?N:n==="yellow"?z:E;if(l?f.info(` ${u(t)} ${R(i)} ${M(`[accepted: ${l.reason}]`)}`):f.info(` ${u(t)} ${R(i)}`),p>0){const d=i.alerts.filter(m=>m.severity==="critical"||m.severity==="high").length;d>0&&f.warn(` ${String(d)} critical/high alert${d===1?"":"s"}`)}o<a&&!l&&r.push(i)}return r},"displaySecurityReports"),me=g(async(s,a)=>{const e=I({input:process.stdin,output:process.stdout}),r=g(t=>new Promise(p=>{e.question(t,c=>{p(c.trim())})}),"ask"),i=String(Math.round(a*100));f.warn(""),f.warn(`${String(s.length)} package${s.length===1?"":"s"} scored below the minimum threshold (${i}%):`);for(const t of s){const p=C(t),c=`${String(Math.round(t.score.overall*100))}%`;f.warn(` • ${p}@${t.version} — score: ${c} (${J(t.score.overall)})`)}f.warn("");const o=await r("Continue adding these packages? [y/N] ");if(o.toLowerCase()!=="y"&&o.toLowerCase()!=="yes")return e.close(),!1;const n=await r("Remember this decision? (prints config snippet) [y/N] ");if(e.close(),n.toLowerCase()==="y"||n.toLowerCase()==="yes"){f.notice(""),f.notice("Add the following to security.acceptedRisks in vis.config.ts:"),f.notice("");for(const t of s){const p=C(t),c=K(p,t.version,t.score.overall,"Reviewed and accepted");f.notice(c)}f.notice("")}return!0},"confirmLowScorePackages"),ke=g(async(s,a,e,r)=>{const i=await D(s);if(i.length===0)return!0;f.info(""),f.info(`${a.map(t=>t.displayName).join(" + ")} security check:`);const o=await Q(a,i);if(o.size===0)return f.info(" Could not fetch security data. Proceeding."),!0;const n=ge(o,e,r);return n.length===0?(f.info(""),!0):process.stdin.isTTY?me(n,e):(f.warn(`Aborting: ${String(n.length)} package${n.length===1?"":"s"} below minimum score. Use --no-socket-check to skip.`),!1)},"runSocketPreCheck"),he=["dependencies","devDependencies","peerDependencies","optionalDependencies"],ve=g(s=>s.savePeer?"peerDependencies":s.saveOptional?"optionalDependencies":s.saveDev?"devDependencies":"dependencies","pickDepSection"),T=g((s,a)=>s.startsWith("catalog:")||!a?s:s.replace(/^[\^~]/,""),"applyExactPrefix"),we=g(async(s,a)=>{const e=[];for(const o of s){const{name:n,versionSpec:t}=_(o);if(!n)continue;if(t!==void 0){e.push({explicit:t,name:n});continue}const p=ue(n,a);if(p){p.conflict&&f.warn(`${n}: ambiguous constraint — picking ${p.spec} (${p.source}). Pass ${n}@<version> to override.`),e.push({entry:{name:n,source:p.source,spec:p.spec},kind:"resolved",name:n});continue}e.push({kind:"missing",name:n})}const r=e.filter(o=>"kind"in o&&o.kind==="missing").map(o=>o.name),i=r.length>0?await ae(r):new Map;return e.map(o=>{if("explicit"in o)return{name:o.name,source:"explicit",spec:o.explicit};if(o.kind==="resolved")return o.entry;const n=i.get(o.name);if(n===void 0)throw new Error(`--to: cannot resolve a version for "${o.name}" (not in any catalog or sibling, and registry lookup failed). Pass ${o.name}@<version> explicitly.`);const t=`^${n}`;return f.info(`${o.name}: no existing constraint — using registry latest (${t}). Add to a catalog to share this version across workspace packages.`),{name:o.name,source:"registry latest",spec:t}})},"planConformedSpecs"),$e=g((s,a,e,r)=>{for(const{name:i,spec:o}of a){const n=T(o,r);for(const p of he){if(p===e)continue;const c=s[p];c?.[i]!==void 0&&(delete c[i],Object.keys(c).length===0&&delete s[p])}let t=s[e];t===void 0&&(t={},s[e]=t),t[i]=n}},"applyPlannedSpecsToPackageJson"),ye=g(async({ignoreScripts:s,logger:a,options:e,packages:r,pm:i,target:o,visConfig:n,workspaceRoot:t})=>{const{workspace:p}=W(t,n??{}),c=p.projects[o];if(!c){const k=Object.keys(p.projects).sort();throw new Error(`--to: workspace package "${o}" not found. Available: ${k.length>0?k.slice(0,10).join(", "):"(none)"}${k.length>10?`, ... (${String(k.length-10)} more)`:""}.`)}const l=oe(t,c.root,"package.json"),{packageManager:u}=X(t),d=G(t,u),m=ve(e),h=e.exact??!1,y=await we(r,d);if(y.length===0)return 0;const S=B(l);$e(S,y,m,h),U(l,S,{indent:H(l,{useEditorconfig:n?.editorconfig??!0}),overwrite:!0});for(const k of y){const q=T(k.spec,h);f.info(`${E("+")} ${k.name}@${q} → ${o}/${m} (${M(k.source)})`)}return se(i,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:s,lockfileOnly:!1,noOptional:!1,offline:!1,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},t,a)},"applyConformedAdd"),_e=g(async({argument:s,logger:a,options:e,visConfig:r,workspaceRoot:i})=>{let o=s;if(!o||o.length===0)throw new Error("No packages specified. Usage: vis add <packages...>");if(e.typosquatCheck!==!1){const l=o.map(d=>_(d)),u=await ce(l.map(d=>d.name),r?.security?.typosquatAllowlist);if(!u.ok){process.exitCode=1;return}o=l.map((d,m)=>{const h=u.packages[m];return h!==d.name?d.versionSpec?`${h}@${d.versionSpec}`:h??"":o[m]??""})}if(e.marshallCheck!==!1){const l=await D(o);if(l.length>0){const u=await re(l,{config:r?.security?.marshalls,workspaceRoot:i});if(!await ie(u)){process.exitCode=1;return}}}if(e.socketCheck!==!1){const l=new Set;x("socket")&&l.add("socket"),x("depsDev")&&l.add("deps-dev");const u=Z(r?.security,{disabled:l,minimumScore:r?.security?.policies?.score?.minimum});if(u.length>0){const d=r?.security?.policies?.score?.minimum??ee;if(!await ke(o,u,d,r?.security?.acceptedRisks)){process.exitCode=1;return}}}const n=process.cwd(),t=te(i??n,{configBackend:r?.install?.backend,configCorepack:r?.install?.corepack}),p=!e.runScripts;if(e.to){if(e.global||e.workspaceRoot)throw new Error("--to is incompatible with --global / --workspace-root.");if(e.filter&&P(e.filter).length>0)throw new Error("--to and --filter are mutually exclusive — --to already targets one package.");if(!i)throw new Error("--to requires a monorepo workspace. Run from inside a pnpm/bun/yarn/npm workspace.");const l=await ye({ignoreScripts:p,logger:a,options:e,packages:o,pm:t,target:e.to,visConfig:r,workspaceRoot:i});l!==0&&(process.exitCode=l);return}const c=ne(t,{exact:e.exact||!1,filter:P(e.filter),global:e.global||!1,optional:e.saveOptional||!1,packages:o,peer:e.savePeer||!1,saveDev:e.saveDev||!1,workspace:e.workspace||!1,workspaceRoot:e.workspaceRoot||!1},n,a,{autoInstallPeers:e.autoInstallPeers||!1,ignoreScripts:p});c!==0&&(process.exitCode=c)},"execute");export{_e as default};
@@ -1 +1 @@
1
- var l=Object.defineProperty;var c=(e,a)=>l(e,"name",{value:a,configurable:!0});import{R as p,$ as f}from"../packem_shared/pm-runner-BzGZmzYs.js";var g=Object.defineProperty,u=c((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,n=s??process.cwd(),i=p(n,{configBackend:o?.install?.backend,configCorepack:o?.install?.corepack}),r=f(i,t,n,a);r!==0&&(process.exitCode=r)},"execute");export{m as default};
1
+ var l=Object.defineProperty;var c=(e,a)=>l(e,"name",{value:a,configurable:!0});import{R as p,$ as f}from"../packem_shared/pm-runner-BwX5AL3W.js";var g=Object.defineProperty,u=c((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,n=s??process.cwd(),i=p(n,{configBackend:o?.install?.backend,configCorepack:o?.install?.corepack}),r=f(i,t,n,a);r!==0&&(process.exitCode=r)},"execute");export{m as default};
@@ -1 +1 @@
1
- var d=Object.defineProperty;var i=(e,o)=>d(e,"name",{value:o,configurable:!0});import{R as g,L as u}from"../packem_shared/pm-runner-BzGZmzYs.js";var f=Object.defineProperty,b=i((e,o)=>f(e,"name",{value:o,configurable:!0}),"t");const w=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,n=t??process.cwd(),p=g(n,{configBackend:c?.install?.backend,configCorepack:c?.install?.corepack}),r=u(p,s,l,n,o);r!==0&&(process.exitCode=r)},"execute");export{w as default};
1
+ var d=Object.defineProperty;var i=(e,o)=>d(e,"name",{value:o,configurable:!0});import{R as g,L as u}from"../packem_shared/pm-runner-BwX5AL3W.js";var f=Object.defineProperty,b=i((e,o)=>f(e,"name",{value:o,configurable:!0}),"t");const w=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,n=t??process.cwd(),p=g(n,{configBackend:c?.install?.backend,configCorepack:c?.install?.corepack}),r=u(p,s,l,n,o);r!==0&&(process.exitCode=r)},"execute");export{w as default};