@visulima/vis 6.1.2 → 6.1.3

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 (89) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/binx.js +1 -1
  4. package/dist/packem_chunks/bloom-sync.js +1 -1
  5. package/dist/packem_chunks/catalog2.js +1 -1
  6. package/dist/packem_chunks/cli-exec.js +1 -1
  7. package/dist/packem_chunks/cli-main.js +1 -1
  8. package/dist/packem_chunks/fix.js +1 -1
  9. package/dist/packem_chunks/handler12.js +1 -1
  10. package/dist/packem_chunks/handler15.js +1 -1
  11. package/dist/packem_chunks/handler2.js +1 -1
  12. package/dist/packem_chunks/handler20.js +1 -1
  13. package/dist/packem_chunks/handler21.js +1 -1
  14. package/dist/packem_chunks/handler23.js +1 -1
  15. package/dist/packem_chunks/handler24.js +1 -1
  16. package/dist/packem_chunks/handler25.js +1 -1
  17. package/dist/packem_chunks/handler28.js +1 -1
  18. package/dist/packem_chunks/handler3.js +1 -1
  19. package/dist/packem_chunks/handler32.js +1 -1
  20. package/dist/packem_chunks/handler4.js +1 -1
  21. package/dist/packem_chunks/handler46.js +1 -1
  22. package/dist/packem_chunks/handler5.js +1 -1
  23. package/dist/packem_chunks/handler50.js +1 -1
  24. package/dist/packem_chunks/handler52.js +1 -1
  25. package/dist/packem_chunks/handler54.js +1 -1
  26. package/dist/packem_chunks/handler55.js +1 -1
  27. package/dist/packem_chunks/handler56.js +1 -1
  28. package/dist/packem_chunks/handler58.js +1 -1
  29. package/dist/packem_chunks/handler59.js +1 -1
  30. package/dist/packem_chunks/handler6.js +1 -1
  31. package/dist/packem_chunks/handler60.js +1 -1
  32. package/dist/packem_chunks/handler61.js +1 -1
  33. package/dist/packem_chunks/handler62.js +1 -1
  34. package/dist/packem_chunks/handler63.js +1 -1
  35. package/dist/packem_chunks/handler64.js +1 -1
  36. package/dist/packem_chunks/handler65.js +1 -1
  37. package/dist/packem_chunks/handler68.js +1 -1
  38. package/dist/packem_chunks/handler69.js +1 -1
  39. package/dist/packem_chunks/handler70.js +1 -1
  40. package/dist/packem_chunks/handler71.js +1 -1
  41. package/dist/packem_chunks/handler72.js +1 -1
  42. package/dist/packem_chunks/handler73.js +1 -1
  43. package/dist/packem_chunks/handler74.js +1 -1
  44. package/dist/packem_chunks/handler75.js +1 -1
  45. package/dist/packem_chunks/handler76.js +1 -1
  46. package/dist/packem_chunks/handler77.js +1 -1
  47. package/dist/packem_chunks/handler78.js +1 -1
  48. package/dist/packem_chunks/handler79.js +27 -27
  49. package/dist/packem_chunks/handler8.js +1 -1
  50. package/dist/packem_chunks/heal.js +1 -1
  51. package/dist/packem_chunks/help-command.js +1 -1
  52. package/dist/packem_chunks/index7.js +1 -1
  53. package/dist/packem_chunks/prune.js +1 -1
  54. package/dist/packem_chunks/status.js +1 -1
  55. package/dist/packem_chunks/sync.js +1 -1
  56. package/dist/packem_chunks/verify-lockfile.js +1 -1
  57. package/dist/packem_shared/{ReleaseClient-CWD9BC5w.js → ReleaseClient-CRuCHDsT.js} +1 -1
  58. package/dist/packem_shared/{advisories-DO-P0V1_.js → advisories-BKsh48bi.js} +1 -1
  59. package/dist/packem_shared/{affected-selection-CeeZo7Uy.js → affected-selection-C7rvg_xC.js} +1 -1
  60. package/dist/packem_shared/{ai-analysis-BCJ1kuDM.js → ai-analysis-qdksWsn1.js} +1 -1
  61. package/dist/packem_shared/{ai-fix-DIMErSws.js → ai-fix-DEwd0QKC.js} +1 -1
  62. package/dist/packem_shared/{bin-BcLTer1k.js → bin-BND-N6AL.js} +1 -1
  63. package/dist/packem_shared/{dependency-scan-D_v3KM59.js → dependency-scan-B1CU6P9M.js} +1 -1
  64. package/dist/packem_shared/{ecosystem-gate-CwsTc7YW.js → ecosystem-gate-InIAzSPA.js} +1 -1
  65. package/dist/packem_shared/glob-Cyk1H9ZL-DlsGNNhY.js +1 -0
  66. package/dist/packem_shared/{index-BS6A9QR_.js → index-BS3mFsh-.js} +1 -1
  67. package/dist/packem_shared/{index-9Ot7jTd4.js → index-BtVOr8mn.js} +1 -1
  68. package/dist/packem_shared/{missing-package-json-1BIoWQq0.js → missing-package-json-DDVQ_scH.js} +1 -1
  69. package/dist/packem_shared/{multi-eco-lockfiles-fgkpeHJv.js → multi-eco-lockfiles-h_HBOpPX.js} +1 -1
  70. package/dist/packem_shared/{osv-Do9PMOea.js → osv-BLj4LauP.js} +1 -1
  71. package/dist/packem_shared/{package-version-Bq6Cne_7.js → package-version-D0b8b41D.js} +1 -1
  72. package/dist/packem_shared/{project-name-filter-ZQaLgytG.js → project-name-filter-C6ObyhZ4.js} +1 -1
  73. package/dist/packem_shared/publish-DkgvB2Lk.js +34 -0
  74. package/dist/packem_shared/{registry-Dg9XI6RT.js → registry-B6LWRK9T.js} +1 -1
  75. package/dist/packem_shared/{renderToString-DR0zDUjh-DXppT6AM.js → renderToString-DR0zDUjh-5WQEQBtg.js} +1 -1
  76. package/dist/packem_shared/{scaffold-files-DJlz36Mu.js → scaffold-files-02tUvEKC.js} +1 -1
  77. package/dist/packem_shared/{scan-progress-DymX71_5.js → scan-progress-D_POj2sy.js} +1 -1
  78. package/dist/packem_shared/{spinner-CPoBymcv.js → spinner-8fJUI_wl.js} +1 -1
  79. package/dist/packem_shared/{table-oA7p7-yP.js → table-bf3rvDd-.js} +1 -1
  80. package/dist/packem_shared/{tabs-BiSifphV.js → tabs-CvrVM8BU.js} +1 -1
  81. package/dist/packem_shared/{use-measured-height-BHm-HiSF.js → use-measured-height-CQ-qYCmz.js} +1 -1
  82. package/dist/packem_shared/{vis-update-app-6QOYxnNx.js → vis-update-app-a93HLRLX.js} +1 -1
  83. package/dist/packem_shared/{vis-user-error-3YS7sPYy.js → vis-user-error-Cpb0P6VA.js} +1 -1
  84. package/dist/packem_shared/{watch-loop-CGi66Fs0.js → watch-loop-CGPe21AK.js} +1 -1
  85. package/dist/release/index.js +1 -1
  86. package/index.js +26 -26
  87. package/package.json +9 -9
  88. package/dist/packem_shared/glob-Cyk1H9ZL-CL9optrn.js +0 -1
  89. package/dist/packem_shared/publish-Dc0XGH3K.js +0 -34
@@ -1 +1 @@
1
- import{e as h,U as u}from"./index-BzhrR_iC.js";import{h as m,l as E,m as D,L as o}from"./registry-Dg9XI6RT.js";import{y as l}from"./isAccessibleSync-DYKTrrvc-C-_5cgwu.js";const S=/\/+$/,f=/node_modules/,p=/\.git/,_=/[$()+.?[\\\]^{|}]/g,y=/\/\*\*$|\/\*\/\*$/,P=t=>{for(const r of o(t,{includeDirs:!1,includeSymlinks:!1,skip:[f,p]}))if(r.name==="package.json")return!0;return!1},d=(t,r,n)=>{for(const e of o(t,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]})){if(e.path===t||e.name.startsWith(".")||l(h(e.path,"package.json")))continue;const i=`${r}/${e.name}`;P(e.path)?d(e.path,i,n):n.push(i)}},g=(t,r)=>{const n=r.replace(S,"");if(n.startsWith("!"))return[];const e=[];if(n.endsWith("/*")&&!n.endsWith("/*/*")){const a=n.slice(0,-2),s=u(t,a);if(!l(s))return[];for(const c of o(s,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]}))c.path===s||c.name.startsWith(".")||e.push(h(a,c.name));return e}if(n.endsWith("/**")||n.endsWith("/*/*")){const a=n.replace(y,""),s=u(t,a);return l(s)&&d(s,a,e),e}if(!n.includes("/")&&n.includes("*")){const a=n.replaceAll(_,String.raw`\$&`).replaceAll("*",".*"),s=new RegExp(`^${a}$`);for(const c of o(t,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]}))c.path!==t&&s.test(c.name)&&e.push(c.name);return e}const i=u(t,n);return l(i)&&e.push(n),e},x=t=>{const n=m(t)??E(t)??[],e=new Set,i=[];for(const a of n)for(const s of g(t,a))s==="."||e.has(s)||(e.add(s),D(h(t,s))||i.push({packageDir:s}));return i};export{x as l};
1
+ import{e as h,U as u}from"./index-BzhrR_iC.js";import{h as m,l as E,m as D,L as o}from"./registry-B6LWRK9T.js";import{y as l}from"./isAccessibleSync-DYKTrrvc-C-_5cgwu.js";const S=/\/+$/,f=/node_modules/,p=/\.git/,_=/[$()+.?[\\\]^{|}]/g,y=/\/\*\*$|\/\*\/\*$/,P=t=>{for(const r of o(t,{includeDirs:!1,includeSymlinks:!1,skip:[f,p]}))if(r.name==="package.json")return!0;return!1},d=(t,r,n)=>{for(const e of o(t,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]})){if(e.path===t||e.name.startsWith(".")||l(h(e.path,"package.json")))continue;const i=`${r}/${e.name}`;P(e.path)?d(e.path,i,n):n.push(i)}},g=(t,r)=>{const n=r.replace(S,"");if(n.startsWith("!"))return[];const e=[];if(n.endsWith("/*")&&!n.endsWith("/*/*")){const a=n.slice(0,-2),s=u(t,a);if(!l(s))return[];for(const c of o(s,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]}))c.path===s||c.name.startsWith(".")||e.push(h(a,c.name));return e}if(n.endsWith("/**")||n.endsWith("/*/*")){const a=n.replace(y,""),s=u(t,a);return l(s)&&d(s,a,e),e}if(!n.includes("/")&&n.includes("*")){const a=n.replaceAll(_,String.raw`\$&`).replaceAll("*",".*"),s=new RegExp(`^${a}$`);for(const c of o(t,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]}))c.path!==t&&s.test(c.name)&&e.push(c.name);return e}const i=u(t,n);return l(i)&&e.push(n),e},x=t=>{const n=m(t)??E(t)??[],e=new Set,i=[];for(const a of n)for(const s of g(t,a))s==="."||e.has(s)||(e.add(s),D(h(t,s))||i.push({packageDir:s}));return i};export{x as l};
@@ -1 +1 @@
1
- import{createRequire as J}from"node:module";import{e as K}from"./index-BzhrR_iC.js";import{u as X}from"./registry-Dg9XI6RT.js";import{e as L,i as Z,s as Q}from"./maven-pom-B0KG9kJQ.js";import{c as ee}from"./composer-DR3D-Psb.js";let Y;const B=e=>(Y??=J(import.meta.url))(e),S=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,G=e=>{if(typeof S<"u"&&S.versions&&S.versions.node){const[n,t]=S.versions.node.split(".").map(Number);if(n>22||n===22&&t>=3||n===20&&t>=16)return S.getBuiltinModule(e)}return B(e)},{existsSync:E,readFileSync:_}=G("node:fs"),{resolve:w,dirname:M,join:x}=G("node:path"),oe=8,ne=8,te="vis:maven:version-unresolved",N=(e,n,t)=>`pkg:maven/${encodeURIComponent(e)}/${encodeURIComponent(n)}${t===void 0?"":`@${encodeURIComponent(t)}`}`,A=e=>{if(E(e))try{return{path:e,scan:Q(_(e,"utf8"))}}catch{return}},D=e=>{const n=e.scan.parent;if(!n)return;const t=n.relativePath||"../pom.xml",o=t.endsWith(".xml")?w(M(e.path),t):w(M(e.path),t,"pom.xml"),s=A(o);return s&&s.scan.artifactId?.value===n.artifactId?.value&&L(s.scan)===n.groupId?.value?s:void 0},se=e=>{const n=[e];let t=D(e);for(;t&&n.length<oe;)n.push(t),t=D(t);return n},P=(e,n,t=0)=>{if(e===""||t>ne)return;let o=!1;const s=e.replaceAll(/\$\{([^}]+)\}/g,(c,r)=>{const i=n(r),a=i===void 0?void 0:P(i,n,t+1);return a===void 0?(o=!0,""):a});return o||s.includes("${")?void 0:s},C=(e,n)=>{if(e===void 0)return{unresolved:""};const t=P(e,n);return t===void 0||!Z(t)?{unresolved:e}:{version:t}},re=e=>{const n=[],t=new Set,o=s=>{const c=w(s),r=A(c);if(!(!r||t.has(c))){t.add(c),n.push(se(r));for(const i of r.scan.modules)o(i.endsWith(".xml")?w(M(c),i):w(M(c),i,"pom.xml"))}};return o(e),n},T=e=>{const n=[];for(const t of re(w(e,"pom.xml"))){const o=t[0].scan,s=new Map;for(const m of t)for(const[y,b]of m.scan.properties)s.has(y)||s.set(y,b.value);const c=L(o),r=o.artifactId?.value,i=o.version?.value??o.parent?.version?.value,a=o.parent?.version?.value,u=m=>{switch(m){case"artifactId":case"pom.artifactId":case"project.artifactId":return r;case"groupId":case"pom.groupId":case"project.groupId":return c;case"pom.version":case"project.version":case"version":return i;case"project.parent.version":return a;default:return s.get(m)}},l=c===void 0?void 0:P(c,u),g=r===void 0?void 0:P(r,u),h=C(i,u),v=new Map;for(const m of t)for(const y of m.scan.dependencies){const b=y.groupId?.value??"",d=y.artifactId?.value??"",p=`${b}:${d}`;if(v.has(p))continue;const f=P(b,u),k=P(d,u),j=f===void 0||k===void 0?{unresolved:y.version?.value??""}:C(y.version?.value,u);v.set(p,{artifact:k,group:f,scope:y.scope?.value??"compile",unresolved:f===void 0||k===void 0?p:j.unresolved,version:j.version})}n.push({artifact:g,dependencies:[...v.values()],group:l,path:t[0].path,unresolved:h.unresolved,version:h.version})}return n},O=e=>e==="test"||e==="provided",ce=(e,n)=>{const t=new Set(n),o=new Map;for(const r of e)r.group!==void 0&&r.artifact!==void 0&&o.set(`${r.group}:${r.artifact}`,r);const s=new Set(e.filter(r=>r.artifact!==void 0&&t.has(r.artifact))),c=[...s];for(;c.length>0;){const r=c.shift();for(const i of r.dependencies){const a=o.get(`${i.group}:${i.artifact}`);a!==void 0&&!s.has(a)&&(s.add(a),c.push(a))}}return e.filter(r=>s.has(r))},De=(e,n={})=>{const t=n.includeDev??!1,o=new Map,s=new Map,c=(a,u,l,g,h)=>{const v=N(a,u,l);if(!o.has(v)){const m={"bom-ref":v,group:a,name:u,purl:v,type:"library"};l!==void 0&&(m.version=l),g!==void 0&&(m.properties=[{name:te,value:g}]),h!==void 0&&(m.scope=h),o.set(v,m)}return v},r=T(e);for(const a of n.focusNames===void 0?r:ce(r,n.focusNames)){const u=a.group!==void 0&&a.artifact!==void 0?c(a.group,a.artifact,a.version,a.unresolved):void 0;for(const l of a.dependencies){if(O(l.scope)&&!t||l.group===void 0||l.artifact===void 0)continue;const g=c(l.group,l.artifact,l.version,l.unresolved,O(l.scope)?"optional":"required");u!==void 0&&s.set(u,(s.get(u)??new Set).add(g))}}const i=[...o.values()].sort((a,u)=>(a["bom-ref"]??"").localeCompare(u["bom-ref"]??""));return{components:i,dependencies:i.map(a=>{const u=a["bom-ref"]??"",l=[...s.get(u)??[]].sort();return l.length>0?{dependsOn:l,ref:u}:{ref:u}})}},ie=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=t.trim();if(o.length===0||o.startsWith("#"))continue;const s=o.indexOf("="),c=(s===-1?o:o.slice(0,s)).split(":");if(c.length<3||!c[0]||!c[1]||!c[2])continue;const r=s===-1?[]:o.slice(s+1).split(",").map(i=>i.trim()).filter(i=>i.length>0);n.push({artifact:c[1],configurations:r,group:c[0],version:c[2]})}return n},ae=e=>["",...X(e,[])].map(t=>x(e,t,"gradle.lockfile")).filter(t=>E(t)),U=e=>{const n=[];for(const t of ae(e))try{n.push(...ie(_(t,"utf8")))}catch{}return n},de=e=>e.configurations.length>0&&e.configurations.every(n=>/test/i.test(n)),Ce=(e,n={})=>{const t=n.includeDev??!1,o=new Map;for(const r of U(e)){const i=N(r.group,r.artifact,r.version),a=o.get(i),u=de(r);o.set(i,{dev:(a?.dev??!0)&&u,entry:r})}const s=[...o.keys()].filter(r=>t||!o.get(r).dev).sort();return{components:s.map(r=>{const{dev:i,entry:a}=o.get(r);return{"bom-ref":r,group:a.group,name:a.artifact,purl:r,scope:i?"optional":"required",type:"library",version:a.version}}),dependencies:s.map(r=>({ref:r}))}},V=(e,n)=>{const{focusNames:t,includeDev:o=!1,normalize:s,purl:c}=n,r=new Map;for(const d of e){const p=`${s(d.name)}@${d.version}`;r.set(p,(r.get(p)??0)+1)}const i=d=>{const p=(r.get(`${s(d.name)}@${d.version}`)??0)>1,f=c(d.name,d.version);return p&&d.source!==void 0?`${f}?source=${encodeURIComponent(d.source)}`:f},a=new Map;for(const d of e){const p=s(d.name);a.set(p,[...a.get(p)??[],d])}const u=d=>{const p=(a.get(s(d.name))??[]).filter(f=>(d.version===void 0||f.version===d.version)&&(d.source===void 0||f.source===d.source));return p.length===1?p[0]:void 0},l=t===void 0?void 0:new Set(t.map(d=>s(d))),g=e.filter(d=>d.member&&(l===void 0||l.has(s(d.name)))),h=new Set(g),v=[...g];for(;v.length>0;){const d=v.shift();for(const p of d.deps){if(p.kind==="dev"&&!o)continue;const f=u(p);f!==void 0&&!h.has(f)&&(h.add(f),v.push(f))}}const m=[...h],y=m.map(d=>{const p=i(d);return{"bom-ref":p,name:d.name,purl:p,type:"library",version:d.version}}).sort((d,p)=>(d["bom-ref"]??"").localeCompare(p["bom-ref"]??"")),b=m.map(d=>{const p=[...new Set(d.deps.filter(k=>o||k.kind!=="dev").map(k=>u(k)).filter(k=>k!==void 0&&h.has(k)).map(k=>i(k)))].sort(),f=i(d);return p.length>0?{dependsOn:p,ref:f}:{ref:f}}).sort((d,p)=>d.ref.localeCompare(p.ref));return{components:y,dependencies:b}},ue=(e,n)=>`pkg:hex/${encodeURIComponent(e)}@${encodeURIComponent(n)}`,le=/^\s*"[^"]+":\s*\{:hex,\s*:([a-z_]\w*),\s*"([^"]+)"/,q=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=le.exec(t);if(o?.[1]===void 0||o[2]===void 0)continue;const s=[];for(const c of t.matchAll(/\{:([a-z_]\w*),\s*"/g))s.push({kind:"main",name:c[1]});n.push({deps:s,member:!0,name:o[1],version:o[2]})}return n},Oe=(e,n={})=>{let t;try{t=_(x(e,"mix.lock"),"utf8")}catch{return{components:[],dependencies:[]}}return V(q(t),{includeDev:n.includeDev,normalize:o=>o,purl:ue})},pe=(e,n)=>`pkg:nuget/${encodeURIComponent(e)}@${encodeURIComponent(n)}`,$=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),I=e=>e.toLowerCase(),z=e=>{let n;try{n=JSON.parse(e)}catch{return[]}if(!$(n)||!$(n.dependencies))return[];const t=[];for(const i of Object.values(n.dependencies)){if(!$(i))continue;const a=new Map;for(const[u,l]of Object.entries(i))$(l)&&a.set(u,{depIds:$(l.dependencies)?Object.keys(l.dependencies):[],resolved:typeof l.resolved=="string"?l.resolved:void 0,type:typeof l.type=="string"?l.type:""});t.push(a)}const o=new Set;let s=!1;for(const i of t)for(const a of i.values())if(a.type==="Direct"&&(s=!0),a.type==="Project")for(const u of a.depIds)o.add(I(u));const c=new Map;for(const i of t)for(const[a,u]of i){if(u.type==="Project"||u.resolved===void 0)continue;const l=`${I(a)}\0${u.resolved}`,g=c.get(l)??{deps:[],member:!1,name:a,version:u.resolved};c.set(l,g),u.type==="Direct"&&(g.member=!0);for(const h of u.depIds){const v=i.get(h)?.resolved;v!==void 0&&g.deps.push({kind:"main",name:h,version:v})}}const r=!s&&o.size===0;return[...c.values()].map(i=>({...i,member:r||i.member||o.has(I(i.name))}))},Ge=e=>{let n;try{n=_(x(e,"packages.lock.json"),"utf8")}catch{return{components:[],dependencies:[]}}return V(z(n),{normalize:I,purl:pe})},F={"crates.io":["Cargo.lock"],Go:["go.sum"],Hex:["mix.lock"],Maven:["gradle.lockfile","pom.xml"],NuGet:["packages.lock.json"],Packagist:["composer.lock"],Pub:["pubspec.lock"],PyPI:["uv.lock","poetry.lock","Pipfile.lock"],RubyGems:["Gemfile.lock"],SwiftURL:["Package.resolved"]},fe={cargo:"crates.io",composer:"Packagist","crates.io":"crates.io",dart:"Pub",go:"Go",gradle:"Maven",hex:"Hex",maven:"Maven",npm:"npm",nuget:"NuGet",packagist:"Packagist",pub:"Pub",pypi:"PyPI",rubygems:"RubyGems",swift:"SwiftURL",swifturl:"SwiftURL"},R=e=>fe[e.toLowerCase()]??e,Le=e=>F[R(e)]??[],ve=(e,n)=>{const t=R(n),o=F[t]??[];for(const s of o){const c=K(e,s);if(E(c))return c}},H=e=>{const n=new Set,t=[];for(const o of e){const s=`${o.name}@${o.version}`;n.has(s)||(n.add(s),t.push(o))}return t},me=/\[\[package\]\]([\s\S]*?)(?=\[\[|$)/g,ge=/^\s*name\s*=\s*"([^"]+)"\s*$/m,he=/^\s*version\s*=\s*"([^"]+)"\s*$/m,ke=e=>{const n=[];for(const t of e.matchAll(me)){const o=t[1]??"",s=ge.exec(o)?.[1],c=he.exec(o)?.[1];s&&c&&n.push({isDev:!1,name:s,version:c})}return n},ye=e=>{let n;try{n=JSON.parse(e)}catch{return[]}if(typeof n!="object"||n===null)return[];const t=[];for(const o of["default","develop"]){const s=n[o];if(!(typeof s!="object"||s===null))for(const[c,r]of Object.entries(s)){if(typeof r!="object"||r===null)continue;const i=r.version;if(typeof i!="string")continue;const a=i.replace(/^==/,"").trim();a.length>0&&t.push({isDev:!1,name:c,version:a})}}return t},be=e=>{const n=[];let t;try{t=JSON.parse(e)}catch{return n}for(const[o,s]of[["packages",!1],["packages-dev",!0]]){const c=t[o];if(Array.isArray(c))for(const r of c)typeof r.name=="string"&&typeof r.version=="string"&&n.push({isDev:s,name:r.name,version:ee(r.version)})}return n},Pe=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=t.trim();if(o.length===0)continue;const s=o.split(/\s+/);if(s.length<3)continue;const[c,r]=s;if(!c||!r?.endsWith("/go.mod"))continue;const i=r.slice(0,-7);i.length!==0&&n.push({isDev:!1,name:c,version:i})}return n},we=/^ {4}([^ ()]+) \(([^()]+)\)\s*$/,Se=e=>{const n=[];let t=!1,o=!1;for(const s of e.split(/\r?\n/)){if(s.startsWith("GEM")){t=!0,o=!1;continue}if(t&&/^[A-Z]/.test(s)){t=!1,o=!1;continue}if(t&&s.trim()==="specs:"){o=!0;continue}if(o){const c=we.exec(s);if(c){const[,r,i]=c,a=i?.split("-")[0];r&&a&&n.push({isDev:!1,name:r,version:a})}}}return n},$e=e=>{const n=[];let t=!1;for(const o of e.split(/\r?\n/)){if(/^\S/.test(o)){t=o.trimEnd()==="packages:";continue}const s=n.at(-1),c=/^ {2}(\S+):\s*$/.exec(o);if(t&&c?.[1]!==void 0){n.push({name:c[1]});continue}const[,r,i]=/^ {4}(dependency|source|version): "?([^"]*)"?\s*$/.exec(o)??[];t&&s!==void 0&&r!==void 0&&i!==void 0&&(r==="source"?s.source=i:r==="version"?s.version=i:s.dependency=i)}return n.filter(o=>o.source==="hosted"&&o.version!==void 0&&o.version.length>0).map(o=>({isDev:o.dependency==="direct dev",name:o.name,version:o.version}))},_e=e=>e.trim().replace(/^[a-z+]+:\/\//i,"").replace(/^[^@/]+@([^:/]+):/,"$1/").replace(/\.git$/,"").replace(/\/+$/,""),Ie=e=>{let n;try{n=JSON.parse(e)}catch{return[]}const t=typeof n=="object"&&n!==null?n.pins:void 0;if(!Array.isArray(t))return[];const o=[];for(const s of t)typeof s.location=="string"&&typeof s.state?.version=="string"&&s.state.version.length>0&&o.push({isDev:!1,name:_e(s.location),version:s.state.version});return o},W=e=>{const n=[],t=[];for(const o of T(e))for(const s of o.dependencies){if(s.group===void 0||s.artifact===void 0||s.version===void 0){t.push(s.group!==void 0&&s.artifact!==void 0?`${s.group}:${s.artifact}`:s.unresolved??"");continue}n.push({isDev:!1,name:`${s.group}:${s.artifact}`,version:s.version})}for(const o of U(e))n.push({isDev:!1,name:`${o.group}:${o.artifact}`,version:o.version});return{packages:H(n),unresolved:[...new Set(t)]}},Ne=e=>W(e).unresolved,Ae=(e,n)=>{if(R(n)==="Maven")return W(e).packages;const t=ve(e,n);if(!t)return[];let o;try{o=_(t,"utf8")}catch{return[]}const s=t.split(/[/\\]/).pop()??"";let c;switch(s){case"Cargo.lock":case"poetry.lock":case"uv.lock":{c=ke(o);break}case"composer.lock":{c=be(o);break}case"Gemfile.lock":{c=Se(o);break}case"go.sum":{c=Pe(o);break}case"mix.lock":{c=q(o).map(r=>({isDev:!1,name:r.name,version:r.version}));break}case"Package.resolved":{c=Ie(o);break}case"packages.lock.json":{c=z(o).map(r=>({isDev:!1,name:r.name,version:r.version}));break}case"Pipfile.lock":{c=ye(o);break}case"pubspec.lock":{c=$e(o);break}default:return[]}return H(c)};export{Oe as a,V as b,R as c,De as d,Ce as e,Ge as f,ae as g,ve as h,Le as i,Ae as l,Ne as m};
1
+ import{createRequire as J}from"node:module";import{e as K}from"./index-BzhrR_iC.js";import{u as X}from"./registry-B6LWRK9T.js";import{e as L,i as Z,s as Q}from"./maven-pom-B0KG9kJQ.js";import{c as ee}from"./composer-DR3D-Psb.js";let Y;const B=e=>(Y??=J(import.meta.url))(e),S=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,G=e=>{if(typeof S<"u"&&S.versions&&S.versions.node){const[n,t]=S.versions.node.split(".").map(Number);if(n>22||n===22&&t>=3||n===20&&t>=16)return S.getBuiltinModule(e)}return B(e)},{existsSync:E,readFileSync:_}=G("node:fs"),{resolve:w,dirname:M,join:x}=G("node:path"),oe=8,ne=8,te="vis:maven:version-unresolved",N=(e,n,t)=>`pkg:maven/${encodeURIComponent(e)}/${encodeURIComponent(n)}${t===void 0?"":`@${encodeURIComponent(t)}`}`,A=e=>{if(E(e))try{return{path:e,scan:Q(_(e,"utf8"))}}catch{return}},D=e=>{const n=e.scan.parent;if(!n)return;const t=n.relativePath||"../pom.xml",o=t.endsWith(".xml")?w(M(e.path),t):w(M(e.path),t,"pom.xml"),s=A(o);return s&&s.scan.artifactId?.value===n.artifactId?.value&&L(s.scan)===n.groupId?.value?s:void 0},se=e=>{const n=[e];let t=D(e);for(;t&&n.length<oe;)n.push(t),t=D(t);return n},P=(e,n,t=0)=>{if(e===""||t>ne)return;let o=!1;const s=e.replaceAll(/\$\{([^}]+)\}/g,(c,r)=>{const i=n(r),a=i===void 0?void 0:P(i,n,t+1);return a===void 0?(o=!0,""):a});return o||s.includes("${")?void 0:s},C=(e,n)=>{if(e===void 0)return{unresolved:""};const t=P(e,n);return t===void 0||!Z(t)?{unresolved:e}:{version:t}},re=e=>{const n=[],t=new Set,o=s=>{const c=w(s),r=A(c);if(!(!r||t.has(c))){t.add(c),n.push(se(r));for(const i of r.scan.modules)o(i.endsWith(".xml")?w(M(c),i):w(M(c),i,"pom.xml"))}};return o(e),n},T=e=>{const n=[];for(const t of re(w(e,"pom.xml"))){const o=t[0].scan,s=new Map;for(const m of t)for(const[y,b]of m.scan.properties)s.has(y)||s.set(y,b.value);const c=L(o),r=o.artifactId?.value,i=o.version?.value??o.parent?.version?.value,a=o.parent?.version?.value,u=m=>{switch(m){case"artifactId":case"pom.artifactId":case"project.artifactId":return r;case"groupId":case"pom.groupId":case"project.groupId":return c;case"pom.version":case"project.version":case"version":return i;case"project.parent.version":return a;default:return s.get(m)}},l=c===void 0?void 0:P(c,u),g=r===void 0?void 0:P(r,u),h=C(i,u),v=new Map;for(const m of t)for(const y of m.scan.dependencies){const b=y.groupId?.value??"",d=y.artifactId?.value??"",p=`${b}:${d}`;if(v.has(p))continue;const f=P(b,u),k=P(d,u),j=f===void 0||k===void 0?{unresolved:y.version?.value??""}:C(y.version?.value,u);v.set(p,{artifact:k,group:f,scope:y.scope?.value??"compile",unresolved:f===void 0||k===void 0?p:j.unresolved,version:j.version})}n.push({artifact:g,dependencies:[...v.values()],group:l,path:t[0].path,unresolved:h.unresolved,version:h.version})}return n},O=e=>e==="test"||e==="provided",ce=(e,n)=>{const t=new Set(n),o=new Map;for(const r of e)r.group!==void 0&&r.artifact!==void 0&&o.set(`${r.group}:${r.artifact}`,r);const s=new Set(e.filter(r=>r.artifact!==void 0&&t.has(r.artifact))),c=[...s];for(;c.length>0;){const r=c.shift();for(const i of r.dependencies){const a=o.get(`${i.group}:${i.artifact}`);a!==void 0&&!s.has(a)&&(s.add(a),c.push(a))}}return e.filter(r=>s.has(r))},De=(e,n={})=>{const t=n.includeDev??!1,o=new Map,s=new Map,c=(a,u,l,g,h)=>{const v=N(a,u,l);if(!o.has(v)){const m={"bom-ref":v,group:a,name:u,purl:v,type:"library"};l!==void 0&&(m.version=l),g!==void 0&&(m.properties=[{name:te,value:g}]),h!==void 0&&(m.scope=h),o.set(v,m)}return v},r=T(e);for(const a of n.focusNames===void 0?r:ce(r,n.focusNames)){const u=a.group!==void 0&&a.artifact!==void 0?c(a.group,a.artifact,a.version,a.unresolved):void 0;for(const l of a.dependencies){if(O(l.scope)&&!t||l.group===void 0||l.artifact===void 0)continue;const g=c(l.group,l.artifact,l.version,l.unresolved,O(l.scope)?"optional":"required");u!==void 0&&s.set(u,(s.get(u)??new Set).add(g))}}const i=[...o.values()].sort((a,u)=>(a["bom-ref"]??"").localeCompare(u["bom-ref"]??""));return{components:i,dependencies:i.map(a=>{const u=a["bom-ref"]??"",l=[...s.get(u)??[]].sort();return l.length>0?{dependsOn:l,ref:u}:{ref:u}})}},ie=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=t.trim();if(o.length===0||o.startsWith("#"))continue;const s=o.indexOf("="),c=(s===-1?o:o.slice(0,s)).split(":");if(c.length<3||!c[0]||!c[1]||!c[2])continue;const r=s===-1?[]:o.slice(s+1).split(",").map(i=>i.trim()).filter(i=>i.length>0);n.push({artifact:c[1],configurations:r,group:c[0],version:c[2]})}return n},ae=e=>["",...X(e,[])].map(t=>x(e,t,"gradle.lockfile")).filter(t=>E(t)),U=e=>{const n=[];for(const t of ae(e))try{n.push(...ie(_(t,"utf8")))}catch{}return n},de=e=>e.configurations.length>0&&e.configurations.every(n=>/test/i.test(n)),Ce=(e,n={})=>{const t=n.includeDev??!1,o=new Map;for(const r of U(e)){const i=N(r.group,r.artifact,r.version),a=o.get(i),u=de(r);o.set(i,{dev:(a?.dev??!0)&&u,entry:r})}const s=[...o.keys()].filter(r=>t||!o.get(r).dev).sort();return{components:s.map(r=>{const{dev:i,entry:a}=o.get(r);return{"bom-ref":r,group:a.group,name:a.artifact,purl:r,scope:i?"optional":"required",type:"library",version:a.version}}),dependencies:s.map(r=>({ref:r}))}},V=(e,n)=>{const{focusNames:t,includeDev:o=!1,normalize:s,purl:c}=n,r=new Map;for(const d of e){const p=`${s(d.name)}@${d.version}`;r.set(p,(r.get(p)??0)+1)}const i=d=>{const p=(r.get(`${s(d.name)}@${d.version}`)??0)>1,f=c(d.name,d.version);return p&&d.source!==void 0?`${f}?source=${encodeURIComponent(d.source)}`:f},a=new Map;for(const d of e){const p=s(d.name);a.set(p,[...a.get(p)??[],d])}const u=d=>{const p=(a.get(s(d.name))??[]).filter(f=>(d.version===void 0||f.version===d.version)&&(d.source===void 0||f.source===d.source));return p.length===1?p[0]:void 0},l=t===void 0?void 0:new Set(t.map(d=>s(d))),g=e.filter(d=>d.member&&(l===void 0||l.has(s(d.name)))),h=new Set(g),v=[...g];for(;v.length>0;){const d=v.shift();for(const p of d.deps){if(p.kind==="dev"&&!o)continue;const f=u(p);f!==void 0&&!h.has(f)&&(h.add(f),v.push(f))}}const m=[...h],y=m.map(d=>{const p=i(d);return{"bom-ref":p,name:d.name,purl:p,type:"library",version:d.version}}).sort((d,p)=>(d["bom-ref"]??"").localeCompare(p["bom-ref"]??"")),b=m.map(d=>{const p=[...new Set(d.deps.filter(k=>o||k.kind!=="dev").map(k=>u(k)).filter(k=>k!==void 0&&h.has(k)).map(k=>i(k)))].sort(),f=i(d);return p.length>0?{dependsOn:p,ref:f}:{ref:f}}).sort((d,p)=>d.ref.localeCompare(p.ref));return{components:y,dependencies:b}},ue=(e,n)=>`pkg:hex/${encodeURIComponent(e)}@${encodeURIComponent(n)}`,le=/^\s*"[^"]+":\s*\{:hex,\s*:([a-z_]\w*),\s*"([^"]+)"/,q=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=le.exec(t);if(o?.[1]===void 0||o[2]===void 0)continue;const s=[];for(const c of t.matchAll(/\{:([a-z_]\w*),\s*"/g))s.push({kind:"main",name:c[1]});n.push({deps:s,member:!0,name:o[1],version:o[2]})}return n},Oe=(e,n={})=>{let t;try{t=_(x(e,"mix.lock"),"utf8")}catch{return{components:[],dependencies:[]}}return V(q(t),{includeDev:n.includeDev,normalize:o=>o,purl:ue})},pe=(e,n)=>`pkg:nuget/${encodeURIComponent(e)}@${encodeURIComponent(n)}`,$=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),I=e=>e.toLowerCase(),z=e=>{let n;try{n=JSON.parse(e)}catch{return[]}if(!$(n)||!$(n.dependencies))return[];const t=[];for(const i of Object.values(n.dependencies)){if(!$(i))continue;const a=new Map;for(const[u,l]of Object.entries(i))$(l)&&a.set(u,{depIds:$(l.dependencies)?Object.keys(l.dependencies):[],resolved:typeof l.resolved=="string"?l.resolved:void 0,type:typeof l.type=="string"?l.type:""});t.push(a)}const o=new Set;let s=!1;for(const i of t)for(const a of i.values())if(a.type==="Direct"&&(s=!0),a.type==="Project")for(const u of a.depIds)o.add(I(u));const c=new Map;for(const i of t)for(const[a,u]of i){if(u.type==="Project"||u.resolved===void 0)continue;const l=`${I(a)}\0${u.resolved}`,g=c.get(l)??{deps:[],member:!1,name:a,version:u.resolved};c.set(l,g),u.type==="Direct"&&(g.member=!0);for(const h of u.depIds){const v=i.get(h)?.resolved;v!==void 0&&g.deps.push({kind:"main",name:h,version:v})}}const r=!s&&o.size===0;return[...c.values()].map(i=>({...i,member:r||i.member||o.has(I(i.name))}))},Ge=e=>{let n;try{n=_(x(e,"packages.lock.json"),"utf8")}catch{return{components:[],dependencies:[]}}return V(z(n),{normalize:I,purl:pe})},F={"crates.io":["Cargo.lock"],Go:["go.sum"],Hex:["mix.lock"],Maven:["gradle.lockfile","pom.xml"],NuGet:["packages.lock.json"],Packagist:["composer.lock"],Pub:["pubspec.lock"],PyPI:["uv.lock","poetry.lock","Pipfile.lock"],RubyGems:["Gemfile.lock"],SwiftURL:["Package.resolved"]},fe={cargo:"crates.io",composer:"Packagist","crates.io":"crates.io",dart:"Pub",go:"Go",gradle:"Maven",hex:"Hex",maven:"Maven",npm:"npm",nuget:"NuGet",packagist:"Packagist",pub:"Pub",pypi:"PyPI",rubygems:"RubyGems",swift:"SwiftURL",swifturl:"SwiftURL"},R=e=>fe[e.toLowerCase()]??e,Le=e=>F[R(e)]??[],ve=(e,n)=>{const t=R(n),o=F[t]??[];for(const s of o){const c=K(e,s);if(E(c))return c}},H=e=>{const n=new Set,t=[];for(const o of e){const s=`${o.name}@${o.version}`;n.has(s)||(n.add(s),t.push(o))}return t},me=/\[\[package\]\]([\s\S]*?)(?=\[\[|$)/g,ge=/^\s*name\s*=\s*"([^"]+)"\s*$/m,he=/^\s*version\s*=\s*"([^"]+)"\s*$/m,ke=e=>{const n=[];for(const t of e.matchAll(me)){const o=t[1]??"",s=ge.exec(o)?.[1],c=he.exec(o)?.[1];s&&c&&n.push({isDev:!1,name:s,version:c})}return n},ye=e=>{let n;try{n=JSON.parse(e)}catch{return[]}if(typeof n!="object"||n===null)return[];const t=[];for(const o of["default","develop"]){const s=n[o];if(!(typeof s!="object"||s===null))for(const[c,r]of Object.entries(s)){if(typeof r!="object"||r===null)continue;const i=r.version;if(typeof i!="string")continue;const a=i.replace(/^==/,"").trim();a.length>0&&t.push({isDev:!1,name:c,version:a})}}return t},be=e=>{const n=[];let t;try{t=JSON.parse(e)}catch{return n}for(const[o,s]of[["packages",!1],["packages-dev",!0]]){const c=t[o];if(Array.isArray(c))for(const r of c)typeof r.name=="string"&&typeof r.version=="string"&&n.push({isDev:s,name:r.name,version:ee(r.version)})}return n},Pe=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=t.trim();if(o.length===0)continue;const s=o.split(/\s+/);if(s.length<3)continue;const[c,r]=s;if(!c||!r?.endsWith("/go.mod"))continue;const i=r.slice(0,-7);i.length!==0&&n.push({isDev:!1,name:c,version:i})}return n},we=/^ {4}([^ ()]+) \(([^()]+)\)\s*$/,Se=e=>{const n=[];let t=!1,o=!1;for(const s of e.split(/\r?\n/)){if(s.startsWith("GEM")){t=!0,o=!1;continue}if(t&&/^[A-Z]/.test(s)){t=!1,o=!1;continue}if(t&&s.trim()==="specs:"){o=!0;continue}if(o){const c=we.exec(s);if(c){const[,r,i]=c,a=i?.split("-")[0];r&&a&&n.push({isDev:!1,name:r,version:a})}}}return n},$e=e=>{const n=[];let t=!1;for(const o of e.split(/\r?\n/)){if(/^\S/.test(o)){t=o.trimEnd()==="packages:";continue}const s=n.at(-1),c=/^ {2}(\S+):\s*$/.exec(o);if(t&&c?.[1]!==void 0){n.push({name:c[1]});continue}const[,r,i]=/^ {4}(dependency|source|version): "?([^"]*)"?\s*$/.exec(o)??[];t&&s!==void 0&&r!==void 0&&i!==void 0&&(r==="source"?s.source=i:r==="version"?s.version=i:s.dependency=i)}return n.filter(o=>o.source==="hosted"&&o.version!==void 0&&o.version.length>0).map(o=>({isDev:o.dependency==="direct dev",name:o.name,version:o.version}))},_e=e=>e.trim().replace(/^[a-z+]+:\/\//i,"").replace(/^[^@/]+@([^:/]+):/,"$1/").replace(/\.git$/,"").replace(/\/+$/,""),Ie=e=>{let n;try{n=JSON.parse(e)}catch{return[]}const t=typeof n=="object"&&n!==null?n.pins:void 0;if(!Array.isArray(t))return[];const o=[];for(const s of t)typeof s.location=="string"&&typeof s.state?.version=="string"&&s.state.version.length>0&&o.push({isDev:!1,name:_e(s.location),version:s.state.version});return o},W=e=>{const n=[],t=[];for(const o of T(e))for(const s of o.dependencies){if(s.group===void 0||s.artifact===void 0||s.version===void 0){t.push(s.group!==void 0&&s.artifact!==void 0?`${s.group}:${s.artifact}`:s.unresolved??"");continue}n.push({isDev:!1,name:`${s.group}:${s.artifact}`,version:s.version})}for(const o of U(e))n.push({isDev:!1,name:`${o.group}:${o.artifact}`,version:o.version});return{packages:H(n),unresolved:[...new Set(t)]}},Ne=e=>W(e).unresolved,Ae=(e,n)=>{if(R(n)==="Maven")return W(e).packages;const t=ve(e,n);if(!t)return[];let o;try{o=_(t,"utf8")}catch{return[]}const s=t.split(/[/\\]/).pop()??"";let c;switch(s){case"Cargo.lock":case"poetry.lock":case"uv.lock":{c=ke(o);break}case"composer.lock":{c=be(o);break}case"Gemfile.lock":{c=Se(o);break}case"go.sum":{c=Pe(o);break}case"mix.lock":{c=q(o).map(r=>({isDev:!1,name:r.name,version:r.version}));break}case"Package.resolved":{c=Ie(o);break}case"packages.lock.json":{c=z(o).map(r=>({isDev:!1,name:r.name,version:r.version}));break}case"Pipfile.lock":{c=ye(o);break}case"pubspec.lock":{c=$e(o);break}default:return[]}return H(c)};export{Oe as a,V as b,R as c,De as d,Ce as e,Ge as f,ae as g,ve as h,Le as i,Ae as l,Ne as m};
@@ -1 +1 @@
1
- import{a as u}from"./advisories-DO-P0V1_.js";const d=e=>{const s=e.database_specific?.severity?.toUpperCase();if(s==="CRITICAL"||s==="HIGH"||s==="MODERATE"||s==="LOW")return s;const r=e.severity?.find(t=>t.type==="CVSS_V3")?.score;if(r){const t=Number.parseFloat(r);return t>=9?"CRITICAL":t>=7?"HIGH":t>=4?"MODERATE":"LOW"}return"UNKNOWN"},v=e=>{const s=e.severity?.find(r=>r.type==="CVSS_V3")?.score;return s?Number.parseFloat(s):void 0},y=e=>{const s=[];for(const r of e.affected??[])for(const t of r.ranges??[])for(const o of t.events??[])o.fixed&&s.push(o.fixed);return s},l=e=>({aliases:e.aliases?.length?e.aliases:void 0,cvssScore:v(e),fixedVersions:y(e),id:e.id,severity:d(e),summary:e.summary??""}),O=async(e,s=1e4)=>{if(e.length===0)return new Map;const r=e.map(n=>({package:{ecosystem:"npm",name:n.name},version:n.version})),t=new AbortController,o=setTimeout(()=>{t.abort()},s);try{const n=await fetch("https://api.osv.dev/v1/querybatch",{body:JSON.stringify({queries:r}),headers:{"Content-Type":"application/json"},method:"POST",signal:t.signal});if(!n.ok)return new Map;const f=await n.json(),i=new Map;for(const[p,c]of e.entries()){const a=f.results[p]?.vulns;a&&a.length>0&&i.set(u(c.name,c.version),a.map(m=>l(m)))}return i}catch{return new Map}finally{clearTimeout(o)}};export{O as f};
1
+ import{a as u}from"./advisories-BKsh48bi.js";const d=e=>{const s=e.database_specific?.severity?.toUpperCase();if(s==="CRITICAL"||s==="HIGH"||s==="MODERATE"||s==="LOW")return s;const r=e.severity?.find(t=>t.type==="CVSS_V3")?.score;if(r){const t=Number.parseFloat(r);return t>=9?"CRITICAL":t>=7?"HIGH":t>=4?"MODERATE":"LOW"}return"UNKNOWN"},v=e=>{const s=e.severity?.find(r=>r.type==="CVSS_V3")?.score;return s?Number.parseFloat(s):void 0},y=e=>{const s=[];for(const r of e.affected??[])for(const t of r.ranges??[])for(const o of t.events??[])o.fixed&&s.push(o.fixed);return s},l=e=>({aliases:e.aliases?.length?e.aliases:void 0,cvssScore:v(e),fixedVersions:y(e),id:e.id,severity:d(e),summary:e.summary??""}),O=async(e,s=1e4)=>{if(e.length===0)return new Map;const r=e.map(n=>({package:{ecosystem:"npm",name:n.name},version:n.version})),t=new AbortController,o=setTimeout(()=>{t.abort()},s);try{const n=await fetch("https://api.osv.dev/v1/querybatch",{body:JSON.stringify({queries:r}),headers:{"Content-Type":"application/json"},method:"POST",signal:t.signal});if(!n.ok)return new Map;const f=await n.json(),i=new Map;for(const[p,c]of e.entries()){const a=f.results[p]?.vulns;a&&a.length>0&&i.set(u(c.name,c.version),a.map(m=>l(m)))}return i}catch{return new Map}finally{clearTimeout(o)}};export{O as f};
@@ -1,4 +1,4 @@
1
1
  import{createRequire as ct}from"node:module";import{k as be,m as ee,z as te,a as mt,g as Lt,f as gt}from"./index-BzhrR_iC.js";import{L as De}from"./index-BisalDCf.js";import{a as ie,g as St}from"./_commonjsHelpers-DTfxOvZk.js";import{r as vt,a as Ct}from"./clean-DRiLimTx.js";import{p as yt}from"./readJsonSync-CbryXYxN-EWl7_7KX.js";let ht;const ut=u=>(ht??=ct(import.meta.url))(u),F=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=u=>{if(typeof F<"u"&&F.versions&&F.versions.node){const[e,t]=F.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return F.getBuiltinModule(u)}return ut(u)},{dirname:pt}=R("node:path"),Pe=R("node:url"),{fileURLToPath:ft}=Pe,ye=R("node:module"),{createRequire:dt}=ye,Pt=R("util"),Di=u=>"Bun"in u,Ai=()=>process.argv,wi=()=>process.cwd(),xi=()=>process.env,Ei=()=>process.execArgv,Oi=()=>process.execPath,Ni=()=>process.platform,Fi=()=>process.arch,Gi=(u=0)=>{process.exit(u)},$i=(u,e)=>{const t=process;return t.on(u,e),()=>{t.removeListener(u,e)}};var T,ne;function Ae(){return ne||(ne=1,T=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","ALGLIB-Documentation","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Advanced-Cryptics-Dictionary","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BOLA-1.1","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-Tso","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Mark-Modifications","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","Buddy","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CAPEC-tou","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","ESA-PL-permissive-2.4","ESA-PL-strong-copyleft-2.4","ESA-PL-weak-copyleft-2.4","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-SMC","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HPND-sell-variant-critical-systems","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ISO-permission","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-STK","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MMPL-1.0.1","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-TNT","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSC-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OSSP","OpenMDW-1.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","ParaType-Free-Font-1.3","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGMLUG-PM","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TekHVC","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","UnRAR","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","Vixie-Cron","W3C","W3C-19980720","W3C-20150513","WTFNMFPL","WTFPL","Watcom-1.0","Widget-Workshop","WordNet","Wsuipa","X11","X11-distribute-modifications-variant","X11-no-permit-persons","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","hyphen-bulgarian","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]),T}var U,se;function bt(){return se||(se=1,U=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]),U}var M,oe;function Dt(){return oe||(oe=1,M=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]),M}var k,ae;function At(){if(ae)return k;ae=1;var u=[].concat(Ae()).concat(bt()),e=Dt();return k=function(t){var n=0;function s(){return n<t.length}function r(g){if(g instanceof RegExp){var c=t.slice(n),L=c.match(g);if(L)return n+=L[0].length,L[0]}else if(t.indexOf(g,n)===n)return n+=g.length,g}function a(){r(/[ ]*/)}function l(){for(var g,c=["WITH","AND","OR","(",")",":","+"],L=0;L<c.length&&(g=r(c[L]),!g);L++);if(g==="+"&&n>1&&t[n-2]===" ")throw new Error("Space before `+`");return g&&{type:"OPERATOR",string:g}}function o(){return r(/[A-Za-z0-9-.]+/)}function h(){var g=o();if(!g)throw new Error("Expected idstring at offset "+n);return g}function f(){if(r("DocumentRef-")){var g=h();return{type:"DOCUMENTREF",string:g}}}function S(){if(r("LicenseRef-")){var g=h();return{type:"LICENSEREF",string:g}}}function b(){var g=n,c=o();if(u.indexOf(c)!==-1)return{type:"LICENSE",string:c};if(e.indexOf(c)!==-1)return{type:"EXCEPTION",string:c};n=g}function v(){return l()||f()||S()||b()}for(var C=[];s()&&(a(),!!s());){var m=v();if(!m)throw new Error("Unexpected `"+t[n]+"` at offset "+n);C.push(m)}return C},k}var _,le;function wt(){return le||(le=1,_=function(u){var e=0;function t(){return e<u.length}function n(){return t()?u[e]:null}function s(){if(!t())throw new Error;e++}function r(m){var g=n();if(g&&g.type==="OPERATOR"&&m===g.string)return s(),g.string}function a(){if(r("WITH")){var m=n();if(m&&m.type==="EXCEPTION")return s(),m.string;throw new Error("Expected exception after `WITH`")}}function l(){var m=e,g="",c=n();if(c.type==="DOCUMENTREF"&&(s(),g+="DocumentRef-"+c.string+":",!r(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(c=n(),c.type==="LICENSEREF")return s(),g+="LicenseRef-"+c.string,{license:g};e=m}function o(){var m=n();if(m&&m.type==="LICENSE"){s();var g={license:m.string};r("+")&&(g.plus=!0);var c=a();return c&&(g.exception=c),g}}function h(){var m=r("(");if(m){var g=v();if(!r(")"))throw new Error("Expected `)`");return g}}function f(){return h()||l()||o()}function S(m,g){return function c(){var L=g();if(L){if(!r(m))return L;var y=c();if(!y)throw new Error("Expected expression");return{left:L,conjunction:m.toLowerCase(),right:y}}}}var b=S("AND",f),v=S("OR",b),C=v();if(!C||t())throw new Error("Syntax error");return C}),_}var W,ce;function we(){if(ce)return W;ce=1;var u=At(),e=wt();return W=function(t){return e(u(t))},W}var H,he;function xt(){if(he)return H;he=1;var u=we(),e=Ae();function t(c){try{return u(c),!0}catch{return!1}}function n(c,L){var y=L[0].length-c[0].length;return y!==0?y:c[0].toUpperCase().localeCompare(L[0].toUpperCase())}var s=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(n),r=0,a=1,l=[function(c){return c.toUpperCase()},function(c){return c.trim()},function(c){return c.replace(/\./g,"")},function(c){return c.replace(/\s+/g,"")},function(c){return c.replace(/\s+/g,"-")},function(c){return c.replace("v","-")},function(c){return c.replace(/,?\s*(\d)/,"-$1")},function(c){return c.replace(/,?\s*(\d)/,"-$1.0")},function(c){return c.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(c){return c.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(c){return c[0].toUpperCase()+c.slice(1)},function(c){return c.replace("/","-")},function(c){return c.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(c){return c.indexOf("3.0")!==-1?c+"-or-later":c+"-only"},function(c){return c+"only"},function(c){return c.replace(/(\d)$/,"-$1.0")},function(c){return c.replace(/(-| )?(\d)$/,"-$2-Clause")},function(c){return c.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(c){return c.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(c){return c.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(c){return c.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(c){return c.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(c){return c.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(c){return"CC-"+c},function(c){return"CC-"+c+"-4.0"},function(c){return c.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(c){return"CC-"+c.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],o=e.map(function(c){var L=/^(.*)-\d+\.\d+$/.exec(c);return L?[L[0],L[1]]:[c,null]}).reduce(function(c,L){var y=L[1];return c[y]=c[y]||[],c[y].push(L[0]),c},{}),h=Object.keys(o).map(function(L){return[L,o[L]]}).filter(function(L){return L[1].length===1&&L[0]!==null&&L[0]!=="APL"}).map(function(L){return[L[0],L[1][0]]});o=void 0;var f=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(h).sort(n),S=0,b=1,v=function(c){for(var L=0;L<l.length;L++){var y=l[L](c).trim();if(y!==c&&t(y))return y}return null},C=function(c){for(var L=c.toUpperCase(),y=0;y<f.length;y++){var i=f[y];if(L.indexOf(i[S])>-1)return i[b]}return null},m=function(c,L){for(var y=0;y<s.length;y++){var i=s[y],p=i[r];if(c.indexOf(p)>-1){var d=c.replace(p,i[a]),P=L(d);if(P!==null)return P}}return null};H=function(c,L){L=L||{};var y=L.upgrade===void 0?!0:!!L.upgrade;function i(D){return y?g(D):D}var p=typeof c=="string"&&c.trim().length!==0;if(!p)throw Error("Invalid argument. Expected non-empty string.");if(c=c.trim(),t(c))return i(c);var d=c.replace(/\+$/,"").trim();if(t(d))return i(d);var P=v(c);return P!==null||(P=m(c,function(D){return t(D)?D:v(D)}),P!==null)||(P=C(c),P!==null)||(P=m(c,C),P!==null)?i(P):null};function g(c){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(c)!==-1?c+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(c)!==-1?c.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(c)!==-1?c+"-or-later":c}return H}var j,ue;function Et(){if(ue)return j;ue=1;var u=we(),e=xt(),t='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',n=/^SEE LICEN[CS]E IN (.+)$/;function s(a,l){return l.slice(0,a.length)===a}function r(a){if(a.hasOwnProperty("license")){var l=a.license;return s("LicenseRef",l)||s("DocumentRef",l)}else return r(a.left)||r(a.right)}return j=function(a){var l;try{l=u(a)}catch{var o;if(a==="UNLICENSED"||a==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(o=n.exec(a))return{validForOldPackages:!0,validForNewPackages:!0,inFile:o[1]};var h={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(a.trim().length!==0){var f=e(a);f&&h.warnings.push('license is similar to the valid expression "'+f+'"')}return h}return r(l)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},j}var xe={hasSubscribers:!1},A=xe,N=xe;import("node:diagnostics_channel").then(u=>{A=u.channel("lru-cache:metrics"),N=u.tracingChannel("lru-cache")}).catch(()=>{});var Ot=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,z=()=>A.hasSubscribers||N.hasSubscribers,Ee=new Set,pe=process||{},Nt=(u,e,t,n)=>{typeof pe.emitWarning=="function"?pe.emitWarning(u,e,t,n):console.error(`[${t}] ${e}: ${u}`)},Ft=u=>!Ee.has(u),O=u=>!!u&&u===Math.floor(u)&&u>0&&isFinite(u),Oe=u=>O(u)?u<=Math.pow(2,8)?Uint8Array:u<=Math.pow(2,16)?Uint16Array:u<=Math.pow(2,32)?Uint32Array:u<=Number.MAX_SAFE_INTEGER?B:null:null,B=class extends Array{constructor(e){super(e),this.fill(0)}},Gt=class ${heap;length;static#n=!1;static create(e){let t=Oe(e);if(!t)return[];$.#n=!0;let n=new $(e,t);return $.#n=!1,n}constructor(e,t){if(!$.#n)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},$t=class Ne{#n;#c;#t;#O;#g;#R;#I;#S;get perf(){return this.#S}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#o;#v;#s;#r;#e;#u;#f;#h;#a;#C;#l;#P;#y;#d;#m;#b;#T;#p;#N;static unsafeExposeInternals(e){return{starts:e.#y,ttls:e.#d,autopurgeTimers:e.#m,sizes:e.#P,keyMap:e.#s,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#f,get head(){return e.#h},get tail(){return e.#a},free:e.#C,isBackgroundFetch:t=>e.#i(t),backgroundFetch:(t,n,s,r)=>e.#k(t,n,s,r),moveToTail:t=>e.#B(t),indexes:t=>e.#D(t),rindexes:t=>e.#A(t),isStale:t=>e.#L(t)}}get max(){return this.#n}get maxSize(){return this.#c}get calculatedSize(){return this.#v}get size(){return this.#o}get fetchMethod(){return this.#R}get memoMethod(){return this.#I}get dispose(){return this.#t}get onInsert(){return this.#O}get disposeAfter(){return this.#g}constructor(e){let{max:t=0,ttl:n,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:o,dispose:h,onInsert:f,disposeAfter:S,noDisposeOnSet:b,noUpdateTTL:v,maxSize:C=0,maxEntrySize:m=0,sizeCalculation:g,fetchMethod:c,memoMethod:L,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:i,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:P,backgroundFetchSize:D=1,perf:w}=e;if(this.backgroundFetchSize=D,w!==void 0&&typeof w?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#S=w??Ot,t!==0&&!O(t))throw new TypeError("max option must be a nonnegative integer");let x=t?Oe(t):Array;if(!x)throw new Error("invalid max value: "+t);if(this.#n=t,this.#c=C,this.maxEntrySize=m||this.#c,this.sizeCalculation=g,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(L!==void 0&&typeof L!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#I=L,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#R=c,this.#T=!!c,this.#s=new Map,this.#r=Array.from({length:t}).fill(void 0),this.#e=Array.from({length:t}).fill(void 0),this.#u=new x(t),this.#f=new x(t),this.#h=0,this.#a=0,this.#C=Gt.create(t),this.#o=0,this.#v=0,typeof h=="function"&&(this.#t=h),typeof f=="function"&&(this.#O=f),typeof S=="function"?(this.#g=S,this.#l=[]):(this.#g=void 0,this.#l=void 0),this.#b=!!this.#t,this.#N=!!this.#O,this.#p=!!this.#g,this.noDisposeOnSet=!!b,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!d,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#c!==0&&!O(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!O(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!o,this.noDeleteOnStaleGet=!!i,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=O(s)||s===0?s:1,this.ttlAutopurge=!!r,this.ttl=n||0,this.ttl){if(!O(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#_()}if(this.#n===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#n&&!this.#c){let I="LRU_CACHE_UNBOUNDED";Ft(I)&&(Ee.add(I),Nt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,Ne))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#_(){let e=new B(this.#n),t=new B(this.#n);this.#d=e,this.#y=t;let n=this.ttlAutopurge?Array.from({length:this.#n}):void 0;this.#m=n,this.#W=(o,h,f=this.#S.now())=>{t[o]=h!==0?f:0,e[o]=h,s(o,h)},this.#F=o=>{t[o]=e[o]!==0?this.#S.now():0,s(o,e[o])};let s=this.ttlAutopurge?(o,h)=>{if(n?.[o]&&(clearTimeout(n[o]),n[o]=void 0),h&&h!==0&&n){let f=setTimeout(()=>{this.#L(o)?(this.#w(this.#r[o],"expire"),n[o]=void 0):s(o,l(o))},h+1);f.unref&&f.unref(),n[o]=f}}:()=>{};this.#x=(o,h)=>{if(e[h]){let f=e[h],S=t[h];if(!f||!S)return;o.ttl=f,o.start=S,o.now=r||a();let b=o.now-S;o.remainingTTL=f-b}};let r=0,a=()=>{let o=this.#S.now();if(this.ttlResolution>0){r=o;let h=setTimeout(()=>r=0,this.ttlResolution);h.unref&&h.unref()}return o};this.getRemainingTTL=o=>{let h=this.#s.get(o);return h===void 0?0:l(h)};let l=o=>{let h=e[o],f=t[o];if(!h||!f)return 1/0;let S=(r||a())-f;return h-S};this.#L=o=>{let h=t[o],f=e[o];return!!f&&!!h&&(r||a())-h>f}}#F=()=>{};#x=()=>{};#W=()=>{};#L=()=>!1;#V(){let e=new B(this.#n);this.#v=0,this.#P=e,this.#G=t=>{this.#v-=e[t],e[t]=0},this.#H=(t,n,s,r)=>{if(!O(s)){if(this.#i(n))return this.backgroundFetchSize;if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(s=r(n,t),!O(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#U=(t,n,s)=>{if(e[t]=n,this.#c){let r=this.#c-e[t];for(;this.#v>r;)this.#M(!0)}this.#v+=e[t],s&&(s.entrySize=n,s.totalCalculatedSize=this.#v)}}#G=e=>{};#U=(e,t,n)=>{};#H=(e,t,n,s)=>{if(n||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#D({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#a;this.#j(t)&&((e||!this.#L(t))&&(yield t),t!==this.#h);)t=this.#f[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#j(t)&&((e||!this.#L(t))&&(yield t),t!==this.#a);)t=this.#u[t]}#j(e){return e!==void 0&&this.#s.get(this.#r[e])===e}*entries(){for(let e of this.#D())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*rentries(){for(let e of this.#A())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*keys(){for(let e of this.#D()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*rkeys(){for(let e of this.#A()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*values(){for(let e of this.#D())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#A())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#D()){let s=this.#e[n],r=this.#i(s)?s.__staleWhileFetching:s;if(r!==void 0&&e(r,this.#r[n],this))return this.#$(this.#r[n],t)}}forEach(e,t=this){for(let n of this.#D()){let s=this.#e[n],r=this.#i(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#r[n],this)}}rforEach(e,t=this){for(let n of this.#A()){let s=this.#e[n],r=this.#i(s)?s.__staleWhileFetching:s;r!==void 0&&e.call(t,r,this.#r[n],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#L(t)&&(this.#w(this.#r[t],"expire"),e=!0);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let n=this.#e[t],s=this.#i(n)?n.__staleWhileFetching:n;if(s===void 0)return;let r={value:s};if(this.#d&&this.#y){let a=this.#d[t],l=this.#y[t];if(a&&l){let o=a-(this.#S.now()-l);r.ttl=o,r.start=Date.now()}}return this.#P&&(r.size=this.#P[t]),r}dump(){let e=[];for(let t of this.#D({allowStale:!0})){let n=this.#r[t],s=this.#e[t],r=this.#i(s)?s.__staleWhileFetching:s;if(r===void 0||n===void 0)continue;let a={value:r};if(this.#d&&this.#y){a.ttl=this.#d[t];let l=this.#S.now()-this.#y[t];a.start=Math.floor(Date.now()-l)}this.#P&&(a.size=this.#P[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let s=Date.now()-n.start;n.start=this.#S.now()-s}this.#E(t,n.value,n)}}set(e,t,n={}){let{status:s=A.hasSubscribers?{}:void 0}=n;n.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let r=this.#E(e,t,n);return s&&A.hasSubscribers&&A.publish(s),r}#E(e,t,n,s){let{ttl:r=this.ttl,start:a,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:h}=n,f=this.#i(t);if(t===void 0)return h&&(h.set="deleted"),this.delete(e),this;let{noUpdateTTL:S=this.noUpdateTTL}=n;h&&!f&&(h.value=t);let b=this.#H(e,t,n.size||0,o,h);if(this.maxEntrySize&&b>this.maxEntrySize)return this.#w(e,"set"),h&&(h.set="miss",h.maxEntrySizeExceeded=!0),this;let v=this.#o===0?void 0:this.#s.get(e);if(v===void 0)v=this.#o===0?this.#a:this.#C.length!==0?this.#C.pop():this.#o===this.#n?this.#M(!1):this.#o,this.#r[v]=e,this.#e[v]=t,this.#s.set(e,v),this.#u[this.#a]=v,this.#f[v]=this.#a,this.#a=v,this.#o++,this.#U(v,b,h),h&&(h.set="add"),S=!1,this.#N&&!f&&this.#O?.(t,e,"add");else{this.#B(v);let C=this.#e[v];if(t!==C){if(!l)if(this.#i(C)){C!==s&&C.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=C;m!==void 0&&m!==t&&(this.#b&&this.#t?.(m,e,"set"),this.#p&&this.#l?.push([m,e,"set"]))}else this.#b&&this.#t?.(C,e,"set"),this.#p&&this.#l?.push([C,e,"set"]);if(this.#G(v),this.#U(v,b,h),this.#e[v]=t,!f){let m=C&&this.#i(C)?C.__staleWhileFetching:C,g=m===void 0?"add":t!==m?"replace":"update";h&&(h.set=g,m!==void 0&&(h.oldValue=m)),this.#N&&this.onInsert?.(t,e,g)}}else f||(h&&(h.set="update"),this.#N&&this.onInsert?.(t,e,"update"))}if(r!==0&&!this.#d&&this.#_(),this.#d&&(S||this.#W(v,r,a),h&&this.#x(h,v)),!l&&this.#p&&this.#l){let C=this.#l,m;for(;m=C?.shift();)this.#g?.(...m)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#h];if(this.#M(!0),this.#i(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#l){let e=this.#l,t;for(;t=e?.shift();)this.#g?.(...t)}}}#M(e){let t=this.#h,n=this.#r[t],s=this.#e[t],r=this.#i(s);r&&s.__abortController.abort(new Error("evicted"));let a=r?s.__staleWhileFetching:s;return(this.#b||this.#p)&&a!==void 0&&(this.#b&&this.#t?.(a,n,"evict"),this.#p&&this.#l?.push([a,n,"evict"])),this.#G(t),this.#m?.[t]&&(clearTimeout(this.#m[t]),this.#m[t]=void 0),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#C.push(t)),this.#o===1?(this.#h=this.#a=0,this.#C.length=0):this.#h=this.#u[t],this.#s.delete(n),this.#o--,t}has(e,t={}){let{status:n=A.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let s=this.#K(e,t);return A.hasSubscribers&&A.publish(n),s}#K(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:s}=t,r=this.#s.get(e);if(r!==void 0){let a=this.#e[r];if(this.#i(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#L(r))s&&(s.has="stale",this.#x(s,r));else return n&&this.#F(r),s&&(s.has="hit",this.#x(s,r)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:n=z()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let s=this.#X(e,t);return A.hasSubscribers&&A.publish(n),s}#X(e,t){let{status:n,allowStale:s=this.allowStale}=t,r=this.#s.get(e);if(r===void 0||!s&&this.#L(r)){n&&(n.peek=r===void 0?"miss":"stale");return}let a=this.#e[r],l=this.#i(a)?a.__staleWhileFetching:a;return n&&(l!==void 0?(n.peek="hit",n.value=l):n.peek="miss"),l}#k(e,t,n,s){let r=t===void 0?void 0:this.#e[t];if(this.#i(r))return r;let a=new AbortController,{signal:l}=n;l?.addEventListener("abort",()=>a.abort(l.reason),{signal:a.signal});let o={signal:a.signal,options:n,context:s},h=(m,g=!1)=>{let{aborted:c}=a.signal,L=n.ignoreFetchAbort&&m!==void 0,y=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&m!==void 0);if(n.status&&(c&&!g?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,L&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),c&&!L&&!g)return S(a.signal.reason,y);let i=v,p=this.#e[t];return(p===v||p===void 0&&L&&g)&&(m===void 0?i.__staleWhileFetching!==void 0?this.#e[t]=i.__staleWhileFetching:this.#w(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#E(e,m,o.options,i))),m},f=m=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=m),S(m,!1)),S=(m,g)=>{let{aborted:c}=a.signal,L=c&&n.allowStaleOnFetchAbort,y=L||n.allowStaleOnFetchRejection,i=y||n.noDeleteOnFetchRejection,p=v;if(this.#e[t]===v&&(!i||!g&&p.__staleWhileFetching===void 0?this.#w(e,"fetch"):L||(this.#e[t]=p.__staleWhileFetching)),y)return n.status&&p.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw m},b=(m,g)=>{let c=this.#R?.(e,r,o);a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(m(void 0),n.allowStaleOnFetchAbort&&(m=L=>h(L,!0)))}),c&&c instanceof Promise?c.then(L=>m(L===void 0?void 0:L),g):c!==void 0&&m(c)};n.status&&(n.status.fetchDispatched=!0);let v=new Promise(b).then(h,f),C=Object.assign(v,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.#E(e,C,{...o.options,status:void 0}),t=this.#s.get(e)):this.#e[t]=C,C}#i(e){if(!this.#T)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=N.hasSubscribers,{status:s=z()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let r=this.#z(e,t);return s&&n&&(s.trace=!0,N.tracePromise(()=>r,s).catch(()=>{})),r}async#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:o=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:S=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:m,forceRefresh:g=!1,status:c,signal:L}=t;if(c&&(c.op="fetch",c.key=e,g&&(c.forceRefresh=!0),c.cache=this),!this.#T)return c&&(c.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:c});let y={allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:l,size:o,sizeCalculation:h,noUpdateTTL:f,noDeleteOnFetchRejection:S,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:C,ignoreFetchAbort:v,status:c,signal:L},i=this.#s.get(e);if(i===void 0){c&&(c.fetch="miss");let p=this.#k(e,i,y,m);return p.__returned=p}else{let p=this.#e[i];if(this.#i(p)){let w=n&&p.__staleWhileFetching!==void 0;return c&&(c.fetch="inflight",w&&(c.returnedStale=!0)),w?p.__staleWhileFetching:p.__returned=p}let d=this.#L(i);if(!g&&!d)return c&&(c.fetch="hit"),this.#B(i),s&&this.#F(i),c&&this.#x(c,i),p;let P=this.#k(e,i,y,m),D=P.__staleWhileFetching!==void 0&&n;return c&&(c.fetch=d?"stale":"refresh",D&&d&&(c.returnedStale=!0)),D?P.__staleWhileFetching:P.__returned=P}}forceFetch(e,t={}){let n=N.hasSubscribers,{status:s=z()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let r=this.#J(e,t);return s&&n&&(s.trace=!0,N.tracePromise(()=>r,s).catch(()=>{})),r}async#J(e,t={}){let n=await this.#z(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=A.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let s=this.#Z(e,t);return n&&(n.value=s),A.hasSubscribers&&A.publish(n),s}#Z(e,t={}){let n=this.#I;if(!n)throw new Error("no memoMethod provided to constructor");let{context:s,status:r,forceRefresh:a,...l}=t;r&&a&&(r.forceRefresh=!0);let o=this.#$(e,l),h=a||o===void 0;if(r&&(r.memo=h?"miss":"hit",h||(r.value=o)),!h)return o;let f=n(e,o,{options:l,context:s});return r&&(r.value=f),this.#E(e,f,l),f}get(e,t={}){let{status:n=A.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let s=this.#$(e,t);return n&&(s!==void 0&&(n.value=s),A.hasSubscribers&&A.publish(n)),s}#$(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=t,l=this.#s.get(e);if(l===void 0){a&&(a.get="miss");return}let o=this.#e[l],h=this.#i(o);return a&&this.#x(a,l),this.#L(l)?h?(a&&(a.get="stale-fetching"),n&&o.__staleWhileFetching!==void 0?(a&&(a.returnedStale=!0),o.__staleWhileFetching):void 0):(r||this.#w(e,"expire"),a&&(a.get="stale"),n?(a&&(a.returnedStale=!0),o):void 0):(a&&(a.get=h?"fetching":"hit"),this.#B(l),s&&this.#F(l),h?o.__staleWhileFetching:o)}#Y(e,t){this.#f[t]=e,this.#u[e]=t}#B(e){e!==this.#a&&(e===this.#h?this.#h=this.#u[e]:this.#Y(this.#f[e],this.#u[e]),this.#Y(this.#a,e),this.#a=e)}delete(e){return this.#w(e,"delete")}#w(e,t){A.hasSubscribers&&A.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#o!==0){let s=this.#s.get(e);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m[s]),this.#m[s]=void 0),n=!0,this.#o===1)this.#q(t);else{this.#G(s);let r=this.#e[s];if(this.#i(r)?r.__abortController.abort(new Error("deleted")):(this.#b||this.#p)&&(this.#b&&this.#t?.(r,e,t),this.#p&&this.#l?.push([r,e,t])),this.#s.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#a)this.#a=this.#f[s];else if(s===this.#h)this.#h=this.#u[s];else{let a=this.#f[s];this.#u[a]=this.#u[s];let l=this.#u[s];this.#f[l]=this.#f[s]}this.#o--,this.#C.push(s)}}if(this.#p&&this.#l?.length){let s=this.#l,r;for(;r=s?.shift();)this.#g?.(...r)}return n}clear(){return this.#q("delete")}#q(e){for(let t of this.#A({allowStale:!0})){let n=this.#e[t];if(this.#i(n))n.__abortController.abort(new Error("deleted"));else{let s=this.#r[t];this.#b&&this.#t?.(n,s,e),this.#p&&this.#l?.push([n,s,e])}}if(this.#s.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#y){this.#d.fill(0),this.#y.fill(0);for(let t of this.#m??[])t!==void 0&&clearTimeout(t);this.#m?.fill(void 0)}if(this.#P&&this.#P.fill(0),this.#h=0,this.#a=0,this.#C.length=0,this.#v=0,this.#o=0,this.#p&&this.#l){let t=this.#l,n;for(;n=t?.shift();)this.#g?.(...n)}}};const Bt=Object.defineProperty({__proto__:null,LRUCache:$t},Symbol.toStringTag,{value:"Module"}),Rt=ie(Bt);var Y,fe;function It(){if(fe)return Y;fe=1;const u=(...r)=>r.every(a=>a)?r.join(""):"",e=r=>r?encodeURIComponent(r):"",t=r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),n={sshtemplate:({domain:r,user:a,project:l,committish:o})=>`git@${r}:${a}/${l}.git${u("#",o)}`,sshurltemplate:({domain:r,user:a,project:l,committish:o})=>`git+ssh://git@${r}/${a}/${l}.git${u("#",o)}`,edittemplate:({domain:r,user:a,project:l,committish:o,editpath:h,path:f})=>`https://${r}/${a}/${l}${u("/",h,"/",e(o||"HEAD"),"/",f)}`,browsetemplate:({domain:r,user:a,project:l,committish:o,treepath:h})=>`https://${r}/${a}/${l}${u("/",h,"/",e(o))}`,browsetreetemplate:({domain:r,user:a,project:l,committish:o,treepath:h,path:f,fragment:S,hashformat:b})=>`https://${r}/${a}/${l}/${h}/${e(o||"HEAD")}/${f}${u("#",b(S||""))}`,browseblobtemplate:({domain:r,user:a,project:l,committish:o,blobpath:h,path:f,fragment:S,hashformat:b})=>`https://${r}/${a}/${l}/${h}/${e(o||"HEAD")}/${f}${u("#",b(S||""))}`,docstemplate:({domain:r,user:a,project:l,treepath:o,committish:h})=>`https://${r}/${a}/${l}${u("/",o,"/",e(h))}#readme`,httpstemplate:({auth:r,domain:a,user:l,project:o,committish:h})=>`git+https://${u(r,"@")}${a}/${l}/${o}.git${u("#",h)}`,filetemplate:({domain:r,user:a,project:l,committish:o,path:h})=>`https://${r}/${a}/${l}/raw/${e(o||"HEAD")}/${h}`,shortcuttemplate:({type:r,user:a,project:l,committish:o})=>`${r}:${a}/${l}${u("#",o)}`,pathtemplate:({user:r,project:a,committish:l})=>`${r}/${a}${u("#",l)}`,bugstemplate:({domain:r,user:a,project:l})=>`https://${r}/${a}/${l}/issues`,hashformat:t},s={};s.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:a,project:l,committish:o,path:h})=>`https://${u(r,"@")}raw.githubusercontent.com/${a}/${l}/${e(o||"HEAD")}/${h}`,gittemplate:({auth:r,domain:a,user:l,project:o,committish:h})=>`git://${u(r,"@")}${a}/${l}/${o}.git${u("#",h)}`,tarballtemplate:({domain:r,user:a,project:l,committish:o})=>`https://codeload.${r}/${a}/${l}/tar.gz/${e(o||"HEAD")}`,extract:r=>{let[,a,l,o,h]=r.pathname.split("/",5);if(!(o&&o!=="tree")&&(o||(h=r.hash.slice(1)),l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!a||!l)))return{user:a,project:l,committish:h}}},s.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:a,project:l,committish:o,treepath:h,path:f,editpath:S})=>`https://${r}/${a}/${l}${u("/",h,"/",e(o||"HEAD"),"/",f,S)}`,tarballtemplate:({domain:r,user:a,project:l,committish:o})=>`https://${r}/${a}/${l}/get/${e(o||"HEAD")}.tar.gz`,extract:r=>{let[,a,l,o]=r.pathname.split("/",4);if(!["get"].includes(o)&&(l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!a||!l)))return{user:a,project:l,committish:r.hash.slice(1)}}},s.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:r,user:a,project:l,committish:o})=>`https://${r}/api/v4/projects/${e(a+"/"+l)}/repository/archive.tar.gz?sha=${e(o||"HEAD")}`,extract:r=>{const a=r.pathname.slice(1);if(a.includes("/-/")||a.includes("/archive.tar.gz"))return;const l=a.split("/");let o=l.pop();o.endsWith(".git")&&(o=o.slice(0,-4));const h=l.join("/");if(!(!h||!o))return{user:h,project:o,committish:r.hash.slice(1)}}},s.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:a,committish:l})=>`git@${r}:${a}.git${u("#",l)}`,sshurltemplate:({domain:r,project:a,committish:l})=>`git+ssh://git@${r}/${a}.git${u("#",l)}`,edittemplate:({domain:r,user:a,project:l,committish:o,editpath:h})=>`https://${r}/${a}/${l}${u("/",e(o))}/${h}`,browsetemplate:({domain:r,project:a,committish:l})=>`https://${r}/${a}${u("/",e(l))}`,browsetreetemplate:({domain:r,project:a,committish:l,path:o,hashformat:h})=>`https://${r}/${a}${u("/",e(l))}${u("#",h(o))}`,browseblobtemplate:({domain:r,project:a,committish:l,path:o,hashformat:h})=>`https://${r}/${a}${u("/",e(l))}${u("#",h(o))}`,docstemplate:({domain:r,project:a,committish:l})=>`https://${r}/${a}${u("/",e(l))}`,httpstemplate:({domain:r,project:a,committish:l})=>`git+https://${r}/${a}.git${u("#",l)}`,filetemplate:({user:r,project:a,committish:l,path:o})=>`https://gist.githubusercontent.com/${r}/${a}/raw${u("/",e(l))}/${o}`,shortcuttemplate:({type:r,project:a,committish:l})=>`${r}:${a}${u("#",l)}`,pathtemplate:({project:r,committish:a})=>`${r}${u("#",a)}`,bugstemplate:({domain:r,project:a})=>`https://${r}/${a}`,gittemplate:({domain:r,project:a,committish:l})=>`git://${r}/${a}.git${u("#",l)}`,tarballtemplate:({project:r,committish:a})=>`https://codeload.github.com/gist/${r}/tar.gz/${e(a||"HEAD")}`,extract:r=>{let[,a,l,o]=r.pathname.split("/",4);if(o!=="raw"){if(!l){if(!a)return;l=a,a=null}return l.endsWith(".git")&&(l=l.slice(0,-4)),{user:a,project:l,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+t(r)}},s.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:a,project:l,committish:o,path:h})=>`https://${r}/${a}/${l}/blob/${e(o)||"HEAD"}/${h}`,httpstemplate:({domain:r,user:a,project:l,committish:o})=>`https://${r}/${a}/${l}${u("#",o)}`,tarballtemplate:({domain:r,user:a,project:l,committish:o})=>`https://${r}/${a}/${l}/archive/${e(o)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:r=>{let[,a,l,o]=r.pathname.split("/",4);if(!["archive"].includes(o)&&(l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!a||!l)))return{user:a,project:l,committish:r.hash.slice(1)}}};for(const[r,a]of Object.entries(s))s[r]=Object.assign({},n,a);return Y=s,Y}var q,de;function Fe(){if(de)return q;de=1;const u=(s,r,a)=>{const l=s.indexOf(a);return s.lastIndexOf(r,l>-1?l:1/0)},e=s=>{try{return new URL(s)}catch{}},t=(s,r)=>{const a=s.indexOf(":"),l=s.slice(0,a+1);if(Object.prototype.hasOwnProperty.call(r,l)||s.substr(a,3)==="://")return s;const o=s.indexOf("@");return o>-1?o>a?`git+ssh://${s}`:s:`${s.slice(0,a+1)}//${s.slice(a+1)}`},n=s=>{const r=u(s,"@","#"),a=u(s,":","#");return a>r&&(s=s.slice(0,a)+"/"+s.slice(a+1)),u(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s};return q=(s,r)=>{const a=r?t(s,r):s;return e(a)||e(n(a))},q}var V,me;function Tt(){if(me)return V;me=1;const u=Fe(),e=t=>{const n=t.indexOf("#"),s=t.indexOf("/"),r=t.indexOf("/",s+1),a=t.indexOf(":"),l=/\s/.exec(t),o=t.indexOf("@"),h=!l||n>-1&&l.index>n,f=o===-1||n>-1&&o>n,S=a===-1||n>-1&&a>n,b=r===-1||n>-1&&r>n,v=s>0,C=n>-1?t[n-1]!=="/":!t.endsWith("/"),m=!t.startsWith(".");return h&&v&&C&&m&&f&&S&&b};return V=(t,n,{gitHosts:s,protocols:r})=>{if(!t)return;const a=e(t)?`github:${t}`:t,l=u(a,r);if(!l)return;const o=s.byShortcut[l.protocol],h=s.byDomain[l.hostname.startsWith("www.")?l.hostname.slice(4):l.hostname],f=o||h;if(!f)return;const S=s[o||h];let b=null;r[l.protocol]?.auth&&(l.username||l.password)&&(b=`${l.username}${l.password?":"+l.password:""}`);let v=null,C=null,m=null,g=null;try{if(o){let c=l.pathname.startsWith("/")?l.pathname.slice(1):l.pathname;const L=c.indexOf("@");L>-1&&(c=c.slice(L+1));const y=c.lastIndexOf("/");y>-1?(C=decodeURIComponent(c.slice(0,y)),C||(C=null),m=decodeURIComponent(c.slice(y+1))):m=decodeURIComponent(c),m.endsWith(".git")&&(m=m.slice(0,-4)),l.hash&&(v=decodeURIComponent(l.hash.slice(1))),g="shortcut"}else{if(!S.protocols.includes(l.protocol))return;const c=S.extract(l);if(!c)return;C=c.user&&decodeURIComponent(c.user),m=decodeURIComponent(c.project),v=decodeURIComponent(c.committish),g=r[l.protocol]?.name||l.protocol.slice(0,-1)}}catch(c){if(c instanceof URIError)return;throw c}return[f,C,b,m,v,g,n]},V}var K,Le;function Ut(){if(Le)return K;Le=1;const{LRUCache:u}=Rt,e=It(),t=Tt(),n=Fe(),s=new u({max:1e3});function r(l){try{const{protocol:o,hostname:h,pathname:f}=new URL(l);if(!h)return null;const S=/(?:git\+)http:$/.test(o)?"http:":"https:",b=f.replace(/\.git$/,"");return`${S}//${h}${b}`}catch{return null}}class a{constructor(o,h,f,S,b,v,C={}){Object.assign(this,a.#n[o],{type:o,user:h,auth:f,project:S,committish:b,default:v,opts:C})}static#n={byShortcut:{},byDomain:{}};static#c={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(o,h){a.#n[o]=h,a.#n.byDomain[h.domain]=o,a.#n.byShortcut[`${o}:`]=o,a.#c[`${o}:`]={name:o}}static fromUrl(o,h){if(typeof o!="string")return;const f=o+JSON.stringify(h||{});if(!s.has(f)){const S=t(o,h,{gitHosts:a.#n,protocols:a.#c});s.set(f,S?new a(...S):void 0)}return s.get(f)}static fromManifest(o,h={}){if(!o||typeof o!="object")return;const f=o.repository,S=f&&(typeof f=="string"?f:typeof f=="object"&&typeof f.url=="string"?f.url:null);if(!S)throw new Error("no repository");const b=S&&a.fromUrl(S.replace(/^git\+/,""),h)||null;if(b)return b;const v=r(S);return a.fromUrl(v,h)||v}static parseUrl(o){return n(o)}#t(o,h){if(typeof o!="function")return null;const f={...this,...this.opts,...h};f.path||(f.path=""),f.path.startsWith("/")&&(f.path=f.path.slice(1)),f.noCommittish&&(f.committish=null);const S=o(f);return f.noGitPlus&&S.startsWith("git+")?S.slice(4):S}hash(){return this.committish?`#${this.committish}`:""}ssh(o){return this.#t(this.sshtemplate,o)}sshurl(o){return this.#t(this.sshurltemplate,o)}browse(o,...h){return typeof o!="string"?this.#t(this.browsetemplate,o):typeof h[0]!="string"?this.#t(this.browsetreetemplate,{...h[0],path:o}):this.#t(this.browsetreetemplate,{...h[1],fragment:h[0],path:o})}browseFile(o,...h){return typeof h[0]!="string"?this.#t(this.browseblobtemplate,{...h[0],path:o}):this.#t(this.browseblobtemplate,{...h[1],fragment:h[0],path:o})}docs(o){return this.#t(this.docstemplate,o)}bugs(o){return this.#t(this.bugstemplate,o)}https(o){return this.#t(this.httpstemplate,o)}git(o){return this.#t(this.gittemplate,o)}shortcut(o){return this.#t(this.shortcuttemplate,o)}path(o){return this.#t(this.pathtemplate,o)}tarball(o){return this.#t(this.tarballtemplate,{...o,noCommittish:!1})}file(o,h){return this.#t(this.filetemplate,{...h,path:o})}edit(o,h){return this.#t(this.edittemplate,{...h,path:o})}getDefaultRepresentation(){return this.default}toString(o){return this.default&&typeof this[this.default]=="function"?this[this.default](o):this.sshurl(o)}}for(const[l,o]of Object.entries(e))a.addHost(l,o);return K=a,K}var X,ge;function Mt(){if(ge)return X;ge=1,X=u;function u(e){if(!e||e==="ERROR: No README data found!")return;e=e.trim().split(`
2
2
  `);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;const n=e.length;let s=t+1;for(;s<n&&e[s].trim();)s++;return e.slice(t,s).join(" ").trim()}return X}var Ge={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},$e={web:"url",name:"url"},Be={server:"start",tests:"test"};const kt={topLevel:Ge,bugs:$e,script:Be},_t=Object.defineProperty({__proto__:null,bugs:$e,default:kt,script:Be,topLevel:Ge},Symbol.toStringTag,{value:"Module"}),Wt=ie(_t);var J,Se;function Ht(){if(Se)return J;Se=1;var{URL:u}=Pe,e=vt(),t=Ct(),n=Et(),s=Ut(),{isBuiltin:r}=ye,a=["dependencies","devDependencies","optionalDependencies"],l=Mt(),o=Wt,h=i=>i.includes("@")&&i.indexOf("@")<i.lastIndexOf(".");J={warn:function(){},fixRepositoryField:function(i){if(i.repositories&&(this.warn("repositories"),i.repository=i.repositories[0]),!i.repository)return this.warn("missingRepository");typeof i.repository=="string"&&(i.repository={type:"git",url:i.repository});var p=i.repository.url||"";if(p){var d=s.fromUrl(p);d&&(p=i.repository.url=d.getDefaultRepresentation()==="shortcut"?d.https():d.toString())}p.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",p)},fixTypos:function(i){Object.keys(o.topLevel).forEach(function(p){Object.prototype.hasOwnProperty.call(i,p)&&this.warn("typo",p,o.topLevel[p])},this)},fixScriptsField:function(i){if(i.scripts){if(typeof i.scripts!="object"){this.warn("nonObjectScripts"),delete i.scripts;return}Object.keys(i.scripts).forEach(function(p){typeof i.scripts[p]!="string"?(this.warn("nonStringScript"),delete i.scripts[p]):o.script[p]&&!i.scripts[o.script[p]]&&this.warn("typo",p,o.script[p],"scripts")},this)}},fixFilesField:function(i){var p=i.files;p&&!Array.isArray(p)?(this.warn("nonArrayFiles"),delete i.files):i.files&&(i.files=i.files.filter(function(d){return!d||typeof d!="string"?(this.warn("invalidFilename",d),!1):!0},this))},fixBinField:function(i){if(i.bin&&typeof i.bin=="string"){var p={},d;(d=i.name.match(/^@[^/]+[/](.*)$/))?p[d[1]]=i.bin:p[i.name]=i.bin,i.bin=p}},fixManField:function(i){i.man&&typeof i.man=="string"&&(i.man=[i.man])},fixBundleDependenciesField:function(i){var p="bundledDependencies",d="bundleDependencies";i[p]&&!i[d]&&(i[d]=i[p],delete i[p]),i[d]&&!Array.isArray(i[d])?(this.warn("nonArrayBundleDependencies"),delete i[d]):i[d]&&(i[d]=i[d].filter(function(P){return!P||typeof P!="string"?(this.warn("nonStringBundleDependency",P),!1):(i.dependencies||(i.dependencies={}),Object.prototype.hasOwnProperty.call(i.dependencies,P)||(this.warn("nonDependencyBundleDependency",P),i.dependencies[P]="*"),!0)},this))},fixDependencies:function(i){L(i,this.warn),g(i,this.warn),this.fixBundleDependenciesField(i),["dependencies","devDependencies"].forEach(function(p){if(p in i){if(!i[p]||typeof i[p]!="object"){this.warn("nonObjectDependencies",p),delete i[p];return}Object.keys(i[p]).forEach(function(d){var P=i[p][d];typeof P!="string"&&(this.warn("nonStringDependency",d,JSON.stringify(P)),delete i[p][d]);var D=s.fromUrl(i[p][d]);D&&(i[p][d]=D.toString())},this)}},this)},fixModulesField:function(i){i.modules&&(this.warn("deprecatedModules"),delete i.modules)},fixKeywordsField:function(i){typeof i.keywords=="string"&&(i.keywords=i.keywords.split(/,\s+/)),i.keywords&&!Array.isArray(i.keywords)?(delete i.keywords,this.warn("nonArrayKeywords")):i.keywords&&(i.keywords=i.keywords.filter(function(p){return typeof p!="string"||!p?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(i,p){var d=!p;if(!i.version)return i.version="",!0;if(!e(i.version,d))throw new Error('Invalid version: "'+i.version+'"');return i.version=t(i.version,d),!0},fixPeople:function(i){v(i,C),v(i,m)},fixNameField:function(i,p){typeof p=="boolean"?p={strict:p}:typeof p>"u"&&(p={});var d=p.strict;if(!i.name&&!d){i.name="";return}if(typeof i.name!="string")throw new Error("name field must be a string.");d||(i.name=i.name.trim()),b(i.name,d,p.allowLegacyCase),r(i.name)&&this.warn("conflictingName",i.name)},fixDescriptionField:function(i){i.description&&typeof i.description!="string"&&(this.warn("nonStringDescription"),delete i.description),i.readme&&!i.description&&(i.description=l(i.readme)),i.description===void 0&&delete i.description,i.description||this.warn("missingDescription")},fixReadmeField:function(i){i.readme||(this.warn("missingReadme"),i.readme="ERROR: No README data found!")},fixBugsField:function(i){if(!i.bugs&&i.repository&&i.repository.url){var p=s.fromUrl(i.repository.url);p&&p.bugs()&&(i.bugs={url:p.bugs()})}else if(i.bugs){if(typeof i.bugs=="string")h(i.bugs)?i.bugs={email:i.bugs}:u.canParse(i.bugs)?i.bugs={url:i.bugs}:this.warn("nonEmailUrlBugsString");else{y(i.bugs,this.warn);var d=i.bugs;i.bugs={},d.url&&(u.canParse(d.url)?i.bugs.url=d.url:this.warn("nonUrlBugsUrlField")),d.email&&(typeof d.email=="string"&&h(d.email)?i.bugs.email=d.email:this.warn("nonEmailBugsEmailField"))}!i.bugs.email&&!i.bugs.url&&(delete i.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(i){if(!i.homepage&&i.repository&&i.repository.url){var p=s.fromUrl(i.repository.url);p&&p.docs()&&(i.homepage=p.docs())}if(i.homepage){if(typeof i.homepage!="string")return this.warn("nonUrlHomepage"),delete i.homepage;u.canParse(i.homepage)||(i.homepage="http://"+i.homepage)}},fixLicenseField:function(i){const p=i.license||i.licence;if(!p)return this.warn("missingLicense");if(typeof p!="string"||p.length<1||p.trim()==="")return this.warn("invalidLicense");if(!n(p).validForNewPackages)return this.warn("invalidLicense")}};function f(i){if(i.charAt(0)!=="@")return!1;var p=i.slice(1).split("/");return p.length!==2?!1:p[0]&&p[1]&&p[0]===encodeURIComponent(p[0])&&p[1]===encodeURIComponent(p[1])}function S(i){return!i.match(/[/@\s+%:]/)&&i===encodeURIComponent(i)}function b(i,p,d){if(i.charAt(0)==="."||!(f(i)||S(i))||p&&!d&&i!==i.toLowerCase()||i.toLowerCase()==="node_modules"||i.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(i))}function v(i,p){return i.author&&(i.author=p(i.author)),["maintainers","contributors"].forEach(function(d){Array.isArray(i[d])&&(i[d]=i[d].map(p))}),i}function C(i){if(typeof i=="string")return i;var p=i.name||"",d=i.url||i.web,P=d?" ("+d+")":"",D=i.email||i.mail,w=D?" <"+D+">":"";return p+w+P}function m(i){if(typeof i!="string")return i;var p=i.match(/^([^(<]+)/),d=i.match(/\(([^()]+)\)/),P=i.match(/<([^<>]+)>/),D={};return p&&p[0].trim()&&(D.name=p[0].trim()),P&&(D.email=P[1]),d&&(D.url=d[1]),D}function g(i){var p=i.optionalDependencies;if(p){var d=i.dependencies||{};Object.keys(p).forEach(function(P){d[P]=p[P]}),i.dependencies=d}}function c(i,p,d){if(!i)return{};if(typeof i=="string"&&(i=i.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(i))return i;d("deprecatedArrayDependencies",p);var P={};return i.filter(function(D){return typeof D=="string"}).forEach(function(D){D=D.trim().split(/(:?[@\s><=])/);var w=D.shift(),x=D.join("");x=x.trim(),x=x.replace(/^@/,""),P[w]=x}),P}function L(i,p){a.forEach(function(d){i[d]&&(i[d]=c(i[d],d,p))})}function y(i,p){i&&Object.keys(i).forEach(function(d){o.bugs[d]&&(p("typo",d,o.bugs[d],"bugs"),i[o.bugs[d]]=i[d],delete i[d])})}return J}var Re="'repositories' (plural) Not supported. Please pick one as the 'repository' field",Ie="No repository field.",Te="Probably broken git url: %s",Ue="scripts must be an object",Me="script values must be string commands",ke="Invalid 'files' member",_e="Invalid filename in 'files' list: %s",We="Invalid 'bundleDependencies' list. Must be array of package names",He="Invalid bundleDependencies member: %s",je="Non-dependency in bundleDependencies: %s",ze="%s field must be an object",Ye="Invalid dependency: %s %s",qe="specifying %s as array is deprecated",Ve="modules field is deprecated",Ke="keywords should be an array of strings",Xe="keywords should be an array of strings",Je="%s is also the name of a node core module.",Ze="'description' field should be a string",Qe="No description",et="No README data",tt="No license field.",it="Bug string field must be url, email, or {email,url}",rt="bugs.url field must be a string url. Deleted.",nt="bugs.email field must be a string email. Deleted.",st="Normalized value of bugs field is an empty object. Deleted.",ot="homepage field must be a string url. Deleted.",at="license should be a valid SPDX license expression",lt="%s should probably be %s.";const jt={repositories:Re,missingRepository:Ie,brokenGitUrl:Te,nonObjectScripts:Ue,nonStringScript:Me,nonArrayFiles:ke,invalidFilename:_e,nonArrayBundleDependencies:We,nonStringBundleDependency:He,nonDependencyBundleDependency:je,nonObjectDependencies:ze,nonStringDependency:Ye,deprecatedArrayDependencies:qe,deprecatedModules:Ve,nonArrayKeywords:Ke,nonStringKeyword:Xe,conflictingName:Je,nonStringDescription:Ze,missingDescription:Qe,missingReadme:et,missingLicense:tt,nonEmailUrlBugsString:it,nonUrlBugsUrlField:rt,nonEmailBugsEmailField:nt,emptyNormalizedBugs:st,nonUrlHomepage:ot,invalidLicense:at,typo:lt},zt=Object.defineProperty({__proto__:null,brokenGitUrl:Te,conflictingName:Je,default:jt,deprecatedArrayDependencies:qe,deprecatedModules:Ve,emptyNormalizedBugs:st,invalidFilename:_e,invalidLicense:at,missingDescription:Qe,missingLicense:tt,missingReadme:et,missingRepository:Ie,nonArrayBundleDependencies:We,nonArrayFiles:ke,nonArrayKeywords:Ke,nonDependencyBundleDependency:je,nonEmailBugsEmailField:nt,nonEmailUrlBugsString:it,nonObjectDependencies:ze,nonObjectScripts:Ue,nonStringBundleDependency:He,nonStringDependency:Ye,nonStringDescription:Ze,nonStringKeyword:Xe,nonStringScript:Me,nonUrlBugsUrlField:rt,nonUrlHomepage:ot,repositories:Re,typo:lt},Symbol.toStringTag,{value:"Module"}),Yt=ie(zt);var Z,ve;function qt(){if(ve)return Z;ve=1;var u=Pt,e=Yt;Z=function(){var n=Array.prototype.slice.call(arguments,0),s=n.shift();if(s==="typo")return t.apply(null,n);var r=e[s]?e[s]:s+": '%s'";return n.unshift(r),u.format.apply(null,n)};function t(n,s,r){return r&&(n=r+"['"+n+"']",s=r+"['"+s+"']"),u.format(e.typo,n,s)}return Z}var Q,Ce;function Vt(){if(Ce)return Q;Ce=1,Q=r;var u=Ht();r.fixer=u;var e=qt(),t=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],n=["dependencies","people","typos"],s=t.map(function(l){return a(l)+"Field"});s=s.concat(n);function r(l,o,h){o===!0&&(o=null,h=!0),h||(h=!1),(!o||l.private)&&(o=function(){}),l.scripts&&l.scripts.install==="node-gyp rebuild"&&!l.scripts.preinstall&&(l.gypfile=!0),u.warn=function(){o(e.apply(null,arguments))},s.forEach(function(f){u["fix"+a(f)](l,h)}),l._id=l.name+"@"+l.version}function a(l){return l.charAt(0).toUpperCase()+l.slice(1)}return Q}var Kt=Vt();const Xt=St(Kt),Jt=(u,e,t)=>{const n=ee(u),s=ee(e),r=s===n?".":mt(n,s);return t.some(a=>{const l=a.startsWith("./")?a.slice(2):a,o=r.startsWith("./")?r.slice(2):r;if(l==="."&&o===".")return!0;if(l.endsWith("/**")){const h=l.slice(0,-3);return o===h||o.startsWith(`${h}/`)}if(l.endsWith("/*")){const h=l.slice(0,-2);return h===""?o!=="."&&!o.includes("/"):o.startsWith(`${h}/`)||o===h}return o===l||o.startsWith(`${l}/`)})},Zt=u=>{const e=be("pnpm-workspace.yaml",{cwd:ee(u),type:"file"});if(!e)return;const t=De(te(e)),n=Array.isArray(t.packages)?t.packages:[];if(!Jt(e,u,n))return;const s={};return t.catalog&&typeof t.catalog=="object"&&(s.catalog=t.catalog),t.catalogs&&typeof t.catalogs=="object"&&(s.catalogs=t.catalogs),Object.keys(s).length>0?s:void 0},Qt=(u,e,t)=>{if(e==="catalog:")return t.catalog?.[u];if(e.startsWith("catalog:")){const n=e.slice(8);return t.catalogs?.[n]?.[u]}},ei=(u,e)=>{for(const[t,n]of Object.entries(u)){if(typeof n!="string")continue;const s=Qt(t,n,e);s&&(u[t]=s)}},ti=(u,e)=>{const t=["dependencies","devDependencies","peerDependencies","optionalDependencies"];for(const n of t){if(!u[n]||typeof u[n]!="object")continue;const s=u[n];ei(s,e)}};let ii;const ri=u=>(ii??=dt(import.meta.url))(u),G=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,re=u=>{if(typeof G<"u"&&G.versions&&G.versions.node){const[e,t]=G.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return G.getBuiltinModule(u)}return ri(u)},{existsSync:Ri}=re("node:fs"),{createInterface:Ii}=re("node:readline"),{styleText:Ti}=re("node:util"),ni=new Set(["__proto__","prototype","constructor"]);Math.max(...[...ni].map(u=>u.length));typeof process.stdout<"u"&&globalThis.window;const si=/, ([^,]*)$/,oi=new Map,ai=(u,e={})=>{const t=e.strict&&e.ignoreWarnings?e.ignoreWarnings.map(String).toSorted((n,s)=>n.localeCompare(s)).join(","):"";return`${u}|s${String(e.strict?1:0)}|c${String(e.resolveCatalogs?1:0)}|j${String(e.json5===!1?0:1)}|y${String(e.yaml===!1?0:1)}|w${t}`};class li extends Error{constructor(e){super(`The following warnings were encountered while normalizing package data:
3
3
  - ${e.join(`
4
- - `)}`),this.name="PackageJsonValidationError"}}const ci=(u,e,t=[])=>{const n=[];if(Xt(u,s=>{n.push(s)},e),e&&n.length>0){const s=n.filter(r=>!t.some(a=>a instanceof RegExp?a.test(r):a===r));if(s.length>0)throw new li(s)}return u},hi=u=>{const e=te(u);return De(e)},ui=u=>{const e=te(u);return gt.parse(e)},pi=(u,e)=>e?.yaml!==!1&&(u.endsWith(".yaml")||u.endsWith(".yml"))?hi(u):e?.json5!==!1&&u.endsWith(".json5")?ui(u):yt(u),fi=(u,e={})=>{const t={type:"file"};u&&(t.cwd=u);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");const s=be(n,t);if(!s)throw new Lt(`No such file or directory, for ${n.join(", ").replace(si," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:oi,a=ai(s,e);if(e.cache&&r.has(a))return r.get(a);const l=pi(s,e);if(e.resolveCatalogs){const h=Zt(s);h&&ti(l,h)}ci(l,e.strict??!1,e.ignoreWarnings);const o={packageJson:l,path:s};return e.cache&&r.set(a,o),o};var di="6.1.1";const mi={version:di},Li=mi.version,gi="@visulima/vis";let E;const Ui=()=>{if(E!==void 0)return E;const u=process.env.VIS_VERSION;if(u)return E=u,E;try{const{packageJson:e}=fi(pt(ft(import.meta.url)),{json5:!1,yaml:!1});if(e.name===gi&&typeof e.version=="string")return E=e.version,E}catch{}return E=Li,E};export{$i as P,Ei as a,Ni as b,Ai as c,Ui as g,Oi as i,wi as n,Fi as p,Di as r,xi as t,Gi as u};
4
+ - `)}`),this.name="PackageJsonValidationError"}}const ci=(u,e,t=[])=>{const n=[];if(Xt(u,s=>{n.push(s)},e),e&&n.length>0){const s=n.filter(r=>!t.some(a=>a instanceof RegExp?a.test(r):a===r));if(s.length>0)throw new li(s)}return u},hi=u=>{const e=te(u);return De(e)},ui=u=>{const e=te(u);return gt.parse(e)},pi=(u,e)=>e?.yaml!==!1&&(u.endsWith(".yaml")||u.endsWith(".yml"))?hi(u):e?.json5!==!1&&u.endsWith(".json5")?ui(u):yt(u),fi=(u,e={})=>{const t={type:"file"};u&&(t.cwd=u);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");const s=be(n,t);if(!s)throw new Lt(`No such file or directory, for ${n.join(", ").replace(si," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:oi,a=ai(s,e);if(e.cache&&r.has(a))return r.get(a);const l=pi(s,e);if(e.resolveCatalogs){const h=Zt(s);h&&ti(l,h)}ci(l,e.strict??!1,e.ignoreWarnings);const o={packageJson:l,path:s};return e.cache&&r.set(a,o),o};var di="6.1.2";const mi={version:di},Li=mi.version,gi="@visulima/vis";let E;const Ui=()=>{if(E!==void 0)return E;const u=process.env.VIS_VERSION;if(u)return E=u,E;try{const{packageJson:e}=fi(pt(ft(import.meta.url)),{json5:!1,yaml:!1});if(e.name===gi&&typeof e.version=="string")return E=e.version,E}catch{}return E=Li,E};export{$i as P,Ei as a,Ni as b,Ai as c,Ui as g,Oi as i,wi as n,Fi as p,Di as r,xi as t,Gi as u};
@@ -1,4 +1,4 @@
1
- import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-3YS7sPYy.js";let g;const m=e=>(g??=p(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,n]=c.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return c.getBuiltinModule(e)}return m(e)},{createInterface:j}=h("node:readline"),y=e=>{const s=new Set;for(const n of Object.values(e.projects))for(const t of Object.keys(n.targets??{}))s.add(t);return[...s].sort()},b=e=>{const s=new Map;for(const n of e.values())for(const[t,o]of Object.entries(n))for(const r of o.aliases??[])s.has(r)||s.set(r,t);return s},$=(e,s)=>s.get(e)??e,w=(e,s)=>{if(e.length===0)return s.length;if(s.length===0)return e.length;const n=[];for(let t=0;t<=s.length;t++)n[t]=[t];for(let t=0;t<=e.length;t++)n[0][t]=t;for(let t=1;t<=s.length;t++)for(let o=1;o<=e.length;o++){const r=s[t-1]===e[o-1]?0:1;n[t][o]=Math.min(n[t-1][o]+1,n[t][o-1]+1,n[t-1][o-1]+r)}return n[s.length][e.length]},v=(e,s,n=3)=>f(e,s,1,n)[0],f=(e,s,n=3,t=3)=>{const o=[];for(const r of s){const i=w(e.toLowerCase(),r.toLowerCase());i<=t&&o.push({distance:i,name:r})}return o.sort((r,i)=>r.distance-i.distance||r.name.localeCompare(i.name)),o.slice(0,n).map(r=>r.name)},M=e=>e.length===0?" (no targets found)":e.map(s=>` - ${s}`).join(`
1
+ import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-Cpb0P6VA.js";let g;const m=e=>(g??=p(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,n]=c.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return c.getBuiltinModule(e)}return m(e)},{createInterface:j}=h("node:readline"),y=e=>{const s=new Set;for(const n of Object.values(e.projects))for(const t of Object.keys(n.targets??{}))s.add(t);return[...s].sort()},b=e=>{const s=new Map;for(const n of e.values())for(const[t,o]of Object.entries(n))for(const r of o.aliases??[])s.has(r)||s.set(r,t);return s},$=(e,s)=>s.get(e)??e,w=(e,s)=>{if(e.length===0)return s.length;if(s.length===0)return e.length;const n=[];for(let t=0;t<=s.length;t++)n[t]=[t];for(let t=0;t<=e.length;t++)n[0][t]=t;for(let t=1;t<=s.length;t++)for(let o=1;o<=e.length;o++){const r=s[t-1]===e[o-1]?0:1;n[t][o]=Math.min(n[t-1][o]+1,n[t][o-1]+1,n[t-1][o-1]+r)}return n[s.length][e.length]},v=(e,s,n=3)=>f(e,s,1,n)[0],f=(e,s,n=3,t=3)=>{const o=[];for(const r of s){const i=w(e.toLowerCase(),r.toLowerCase());i<=t&&o.push({distance:i,name:r})}return o.sort((r,i)=>r.distance-i.distance||r.name.localeCompare(i.name)),o.slice(0,n).map(r=>r.name)},M=e=>e.length===0?" (no targets found)":e.map(s=>` - ${s}`).join(`
2
2
  `),S=async e=>{if(e.length===0||!process.stdin.isTTY||!process.stdout.isTTY)return;const s=j({input:process.stdin,output:process.stdout});try{process.stdout.write(`Available targets:
3
3
  `);for(const[r,i]of e.entries())process.stdout.write(` ${String(r+1).padStart(2," ")}. ${i}
4
4
  `);process.stdout.write(`
@@ -0,0 +1,34 @@
1
+ import{DEFAULT_CHANGES_DIR as V}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{createShellRunner as F}from"../packem_chunks/shell-runner.js";import{r as _,b as W}from"./apply-DoeQAAGm.js";import{parseCatalogs as D}from"../packem_chunks/catalog.js";import{c as E}from"../packem_chunks/index3.js";import{r as M}from"../packem_chunks/context.js";import{escapeMarkdown as L}from"../packem_chunks/security.js";import{VisReleaseError as O}from"./VisReleaseError-DZtgcKf8.js";const B=/\{(name|version|previousVersion|date|repo|contributors)\}/g,U=(e,s)=>e.replaceAll(B,(i,g)=>s[g]??""),K=(e,s={})=>{const i=new Set;for(const o of s.internalAuthors??[]){const u=o.trim().toLowerCase().replace(/^@/,"");u.length>0&&i.add(u)}const g=new Set,c=[];for(const o of e){const u=o.meta?.author;if(u)for(const r of u.split(",")){const t=r.trim();if(!t)continue;const h=t.replace(/^@/,"");if(h.length===0)continue;const n=h.toLowerCase();g.has(n)||i.has(n)||(g.add(n),c.push(L(t)))}}return c.length===0?"":c.map(o=>`- ${o}`).join(`
2
+ `)},J=e=>e.length===0?"":`## Related releases
3
+
4
+ ${e.map(i=>`- [${i.name}](${i.url})`).join(`
5
+ `)}`,Y=(e,s,i)=>{if(!s||!s.header&&!s.footer)return e;const g=o=>U(o,{contributors:i.contributors??"",date:i.date,name:i.name,previousVersion:i.previousVersion,repo:i.repo,version:i.version}).replaceAll(/\n{3,}/g,`
6
+
7
+ `).replace(/\s+$/,""),c=[];if(s.header){const o=g(s.header);o.length>0&&c.push(o)}if(c.push(e),s.footer){const o=g(s.footer);o.length>0&&c.push(o)}return c.join(`
8
+
9
+ `)},z=e=>{if(!Array.isArray(e))return;const[s,i]=e;if(s!=="github"||typeof i!="object"||i===null)return;const{internalAuthors:g}=i;if(Array.isArray(g))return g.filter(c=>typeof c=="string")},q=e=>(e.config.publish?.publishArgs??[]).includes("--provenance")&&e.pm.id!=="bun",X=async(e,s)=>{const{options:i,persistState:g,releases:c,result:o,state:u}=s,{removePendingStages:r,upsertPendingStages:t}=await import("../packem_chunks/staged-registry.js"),h=await e.pm.readCatalogYaml(e.cwd),n=D(h),d=e.depGraph.topologicalSort(c.map(l=>l.name)),w=new Map(c.map(l=>[l.name,l])),b=new Set,C=new Map;for(const l of e.plan.releases){const m=e.depGraph.getPackage(l.name);m&&C.set(l.name,{...m.manifest,version:l.newVersion})}const P={config:e.config,cwd:e.cwd},R=e.config.plugins?.length?await import("../packem_chunks/defineReleasePlugin.js"):void 0;for(const l of d){const m=w.get(l);if(!m){o.skipped.push({name:l,reason:"topo-sort returned a name not in the release plan (internal bug)"});continue}const f=e.depGraph.getPackage(l);if(!f)continue;const y=[...new Set(e.depGraph.getDependencies(l).filter(p=>p.kind!=="devDependencies"&&b.has(p.name)).map(p=>p.name))];if(y.length>0){o.skipped.push({name:l,reason:`dependency-failed: not published because ${y.join(", ")} failed to publish (publishing would orphan this package's dependency range)`}),b.add(l);continue}const a=e.perPackageConfig.get(l)??{},v=M(f,a),$=i.publishActionsOverride??E(v),k=i.tag??e.channel?.tag;if(R){const p=await R.runWillPublishHooks(P,{dir:f.dir,name:l,oldVersion:m.oldVersion,version:m.newVersion});if(p.skip){o.skipped.push({name:l,reason:`plugin-skipped${p.by?` by "${p.by}"`:""}`}),b.add(l);continue}}const A=s.stagedRegistry.pending.find(p=>p.name===l&&p.version===m.newVersion);try{const p=await $.publish({catalogs:n,cleanPackageJsonConfig:e.config.publish?.cleanPackageJson,dryRun:i.dryRun,otp:i.otp,perPackageConfig:a,pkg:f,pm:e.pm,provenance:q(e),registry:a.registry,release:m,resumeStageId:A?.id,tag:k,versionedManifestByName:C,workspaceConfig:e.config});if(p.published||p.alreadyPublished){const T=s.stagedRegistry.pending.filter(H=>H.name===l&&H.version===m.newVersion).map(H=>H.id);T.length>0&&(s.stagedRegistry=r(s.stagedRegistry,T))}if(p.published)o.published.push({name:l,stageId:p.stageId,tarball:p.tarball,version:m.newVersion}),u.published.push(`${l}@${m.newVersion}`),R&&await R.runAfterPublishHooks(P,{dir:f.dir,name:l,oldVersion:m.oldVersion,version:m.newVersion});else if(p.alreadyPublished)o.skipped.push({name:l,reason:"already-published"}),u.published.push(`${l}@${m.newVersion}`);else if(o.skipped.push({name:l,reason:p.output??"skipped"}),p.stageId){const T=(p.output??"").startsWith("stage-rejected")?"rejected":"timeout";s.stagedRegistry=t(s.stagedRegistry,[{id:p.stageId,name:l,reason:T,stagedAt:new Date().toISOString(),tag:k??"latest",version:m.newVersion}])}await g()}catch(p){o.failed.push({name:l,reason:p.message}),b.add(l)}}R&&await R.runAfterPublishAllHooks(P,{failed:o.failed.map(l=>({name:l.name,reason:l.reason})),published:o.published.map(l=>({name:l.name,version:l.version})),skipped:o.skipped.map(l=>({name:l.name,reason:l.reason}))})},Q=async(e,s,i,g)=>{const{createRemoteClient:c,detectRemoteProvider:o}=await import("../packem_chunks/detect.js"),u=await o(e.cwd,i,e.config.provider),r=c(u,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}),t=await r.detectRepoSlug(e.cwd,i);if(!t)return;const h=typeof e.config.aggregateRelease=="object"?e.config.aggregateRelease:{enabled:e.config.aggregateRelease===!0},n=e.config.publish?.draftRelease===!0,d=e.config.publish?.discussionCategory,w=e.config.publish?.addReleases;if(h.enabled){const a=new Date().toISOString().slice(0,10),$=(h.title??"Release {date}").replaceAll("{date}",a),k=`release-${a}`,A=s.published.map(p=>`- \`${p.name}\` → ${p.version}`).join(`
10
+ `);try{const p=await r.createRelease(i,{body:A,cwd:e.cwd,discussionCategory:d,draft:n,repo:t,tag:k,title:$});if(p?.url)for(const T of s.published)T.url=p.url}catch{}return}const{defaultTagFor:b,renderTagPattern:C}=await import("../packem_chunks/git.js"),P=e.config.releaseTagPattern,R=e.channel?.tag,l=e.config.publish?.releaseAssets??{},m=new Date().toISOString().slice(0,10),f=z(e.config.changelog),y=K(e.plan.consumedChangeFiles??[],{internalAuthors:f});for(const a of g.groups){const v=a.members.map($=>`- \`${$}\` → ${s.published.find(k=>k.name===$)?.version??a.version}`).join(`
11
+ `);try{const $=await r.createRelease(i,{body:v,cwd:e.cwd,discussionCategory:d,draft:n,prerelease:a.version.includes("-"),repo:t,tag:a.tag,title:`${a.name} ${a.version}`});if($?.url)for(const k of s.published)a.members.includes(k.name)&&(k.url=$.url)}catch($){console.warn(`createRelease failed for group ${a.name} (tag ${a.tag}): ${$.message}`)}}for(const a of s.published){if(g.grouped.has(a.name))continue;const $=e.perPackageConfig.get(a.name)?.releaseTagPattern??P,k=$?C($,{channel:R,name:a.name,version:a.version}):b(a.name,a.version),A=a.version.includes("-");let p=`Release of ${a.name}@${a.version}.`;if(a.stageId&&(p=`${p}
12
+
13
+ > ⏳ **Staged — not yet installable.** Approve via \`vis release stage approve ${a.stageId}\` or the npmjs.com web UI.`),l.stampHashes&&a.tarball&&(p=`${p}
14
+
15
+ ### Tarball integrity
16
+
17
+ - size: \`${a.tarball.size}\` bytes
18
+ - sha256: \`${a.tarball.sha256}\`
19
+ - sha512: \`${a.tarball.sha512}\``),w!==void 0&&w!==!1)try{const N=k.lastIndexOf("@"),S=N>0?k.slice(0,N+1):"",j=await r.listRecentReleases(i,{cwd:e.cwd,excludeTag:k,limit:5,repo:t,tagPrefix:S}),I=J(j);I&&(p=w==="top"?`${I}
20
+
21
+ ${p}`:`${p}
22
+
23
+ ${I}`)}catch{}const{releaseNoteTemplate:T}=e.config;if(T){const S=e.plan.releases.find(j=>j.name===a.name)?.oldVersion??"";p=Y(p,T,{contributors:y,date:m,name:a.name,previousVersion:S,repo:t,version:a.version})}const H=[];l.uploadTarball&&a.tarball&&H.push(a.tarball.path);try{const N=await r.createRelease(i,{assets:H.length>0?H:void 0,body:p,cwd:e.cwd,discussionCategory:d,draft:n,prerelease:A,repo:t,tag:k,title:`${a.name} v${a.version}`});N?.url&&(a.url=N.url)}catch(N){console.warn(`createRelease failed for ${a.name}@${a.version} (tag ${k}): ${N.message}`)}}},Z=async(e,s,i)=>{const{changesDir:g,options:c,persistState:o,result:u,runner:r,state:t}=s,{writeStagedRegistry:h}=await import("../packem_chunks/staged-registry.js");if(!c.dryRun&&u.published.length>0&&u.tagsPushed){e.config.publish?.noRelease!==!0&&await Q(e,u,r,i);try{const{walkSuccessfulRelease:n}=await import("../packem_chunks/success-walk.js"),{createRemoteClient:d,detectRemoteProvider:w}=await import("../packem_chunks/detect.js"),{resolveFormatter:b}=await import("../packem_chunks/resolveFormatter.js"),C=await w(e.cwd,r,e.config.provider),P=d(C,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}),R=await P.detectRepoSlug(e.cwd,r),l=await b(e.config.changelog,e.cwd),{recordRecentlyWalked:m}=await import("../packem_chunks/staged-registry.js"),f=new Set([...t.walked??[],...(s.stagedRegistry.recentlyWalked??[]).map(a=>a.key)]),y={...u,published:u.published.filter(a=>!f.has(`${a.name}@${a.version}`))};if(y.published.length>0){const a=await n(e,y,r,{client:P,formatter:l,repo:R}),v=y.published.map($=>`${$.name}@${$.version}`);t.walked=[...t.walked??[],...v],await o(),s.stagedRegistry=m(s.stagedRegistry,v),a.warnings.length>0&&e.plan.warnings.push(...a.warnings)}}catch(n){e.plan.warnings.push(`successWalk: could not run post-release walk: ${n.message}`)}if(e.config.notifications)try{const{dispatchNotifications:n}=await import("../packem_chunks/interface.js"),{createRemoteClient:d,detectRemoteProvider:w}=await import("../packem_chunks/detect.js"),b=await w(e.cwd,r,e.config.provider),P=await d(b,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,r);let R;try{const f=`${e.cwd}/package.json`,y=await import("node:fs/promises");R=JSON.parse(await y.readFile(f,"utf8")).name}catch{}const l=new Set([...t.notified??[],...(s.stagedRegistry.recentlyNotified??[]).map(f=>f.key)]),m=u.published.filter(f=>!l.has(`${f.name}@${f.version}`));if(m.length>0){const f=await n(e.config.notifications,{channel:e.channel?.tag,completedAt:new Date().toISOString(),...R===void 0?{}:{monorepoName:R},published:m.map(y=>({name:y.name,tag:e.channel?.tag,...y.url===void 0?{}:{url:y.url},version:y.version})),...P===void 0?{}:{repo:P},skipped:u.skipped.map(y=>({name:y.name,reason:y.reason}))},{warn:y=>e.plan.warnings.push(y)});if(f.succeeded.length>0){const y=m.map(v=>`${v.name}@${v.version}`);t.notified=[...t.notified??[],...y],await o();const{recordRecentlyNotified:a}=await import("../packem_chunks/staged-registry.js");s.stagedRegistry=a(s.stagedRegistry,y)}if(f.failed.length>0||f.succeeded.length>0){const y=f.succeeded.length+f.failed.length;if(f.failed.length>0){e.plan.warnings.push(`[notifications] dispatched ${f.succeeded.length}/${y} channels${f.succeeded.length>0?` (succeeded: ${f.succeeded.join(", ")})`:""}; ${f.failed.length} failed.`);for(const a of f.failed)e.plan.warnings.push(`[notifications:${a.id}] ${a.error}`)}}}}catch(n){e.plan.warnings.push(`notifications: dispatch failed: ${n.message}`)}if(!c.dryRun)try{const n=await h(e.cwd,g,s.stagedRegistry);if(n.changed){const{stageAndCommitFile:d}=await import("../packem_chunks/git.js");try{await d({cwd:e.cwd,runner:r},n.path,"chore(release): record cross-runner notify/walk dedupe [skip ci]",{author:e.config.gitUser,push:!c.noPush,sign:e.config.gitSignCommits===!0})}catch(w){process.stderr.write(`[vis release] Warning: could not commit ${n.path} (notify/walk dedupe): ${w.message}
24
+ `)}}}catch(n){process.stderr.write(`[vis release] Warning: could not update cross-runner dedupe registry: ${n.message}
25
+ `)}}},x=async e=>{const{defaultTagFor:s,floatingMajorTagFor:i,renderTagPattern:g}=await import("../packem_chunks/git.js"),{resolveSyncTagGroups:c}=await import("../packem_chunks/group-tags.js"),o=e.plan.releases.filter(n=>e.depGraph.getPackage(n.name)?.manifest?.private!==!0).map(n=>({name:n.name,version:n.newVersion})),u=c(e.config,o),r=u.groups.map(n=>n.tag),t=[],h=!!e.channel?.prerelease||!!e.preMode;for(const{name:n,version:d}of o){if(u.grouped.has(n))continue;const w=e.perPackageConfig.get(n),b=w?.releaseTagPattern??e.config.releaseTagPattern;if(r.push(b?g(b,{channel:e.channel?.tag,name:n,version:d}):s(n,d)),e.config.floatingMajorTag===!0&&!h&&!b?.includes("{major}")&&w?.skipNpmPublish!==!0){const C=i(n,d);C!==void 0&&t.push(C)}}return{created:r,updated:t}},ee=async(e,s,i)=>{if((await s.run("git",["remote","get-url","--push","origin"],{cwd:e.cwd,silent:!0})).exitCode!==0)return;const{getCurrentBranch:c,resolvePushCredentials:o,verifyPushAccess:u}=await import("../packem_chunks/git.js"),r={cwd:e.cwd,runner:s},t=await u(r);if(t!==void 0)return`Cannot push to origin, nothing was published. Set VIS_GH_TOKEN (or GITHUB_TOKEN / GITLAB_TOKEN) with write access, or pass --no-push. git said: ${t}`;const{createRemoteClient:h,detectRemoteProvider:n}=await import("../packem_chunks/detect.js");let d;try{d=await n(e.cwd,s,e.config.provider)}catch{return}if(d!=="github")return;const b=await h(d,{githubHost:e.config.githubHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,s);if(!b)return;const C=await o(r),P={...process.env};C!==void 0&&(P.GH_TOKEN=C.token),e.config.githubHost&&(P.GH_HOST=e.config.githubHost),e.config.httpProxy&&(P.HTTPS_PROXY=e.config.httpProxy,P.HTTP_PROXY=e.config.httpProxy);const{checkGithubPushRules:R}=await import("../packem_chunks/github-push-rules.js"),l=i.noTag?{created:[],updated:[]}:await x(e),m=await R(s,{branch:await c(r),createdTags:l.created,cwd:e.cwd,env:P,repo:b,signedCommits:e.config.gitSignCommits===!0,updatedTags:l.updated});for(const f of m.warnings)process.stderr.write(`[vis release] Warning: ${f}
26
+ `);if(m.blocked.length>0)return`GitHub push rules would reject this release, nothing was published:
27
+ - ${m.blocked.join(`
28
+ - `)}
29
+ Grant the pushing token a bypass, adjust the ruleset, or pass --no-push / --no-tag.`},ae=async(e,s,i,g)=>{if(!i.dryRun&&e.channel?.mode==="version-pr"){const{createRemoteClient:c,detectRemoteProvider:o}=await import("../packem_chunks/detect.js");let u;try{const t=await o(e.cwd,s,e.config.provider);u=await c(t,{githubHost:e.config.githubHost,gitlabHost:e.config.gitlabHost,httpProxy:e.config.httpProxy}).detectRepoSlug(e.cwd,s)}catch(t){return g.failed.push({name:"_preflight",reason:`Could not read the remote to check for an open release PR: ${t.message}`}),!0}const r=e.config.versionPr?.branch??"vis-release/version-packages";if(u)try{const t=await s.run("gh",["pr","list","--head",r,"--state","open","--json","number"],{cwd:e.cwd,silent:!0});if(t.exitCode===0&&t.stdout.trim()&&t.stdout.trim()!=="[]"){const h=JSON.parse(t.stdout);if(h[0])return g.failed.push({name:"_preflight",reason:`Open release PR #${h[0].number} exists. Merge or close it before publishing locally. (Override: --no-push then \`git push --tags\` manually.)`}),!0}}catch{}}if(!i.dryRun&&e.config.prePublishCommand)try{await _(e.cwd,e.config.prePublishCommand,"prePublishCommand")}catch(c){return g.failed.push({name:"_prePublishCommand",reason:c.message}),!0}if(!i.dryRun&&!i.noPush){let c;try{c=await ee(e,s,{noTag:i.noTag===!0})}catch(o){return g.failed.push({name:"_preflight",reason:`Could not verify the release pushes: ${o.message}`}),!0}if(c!==void 0)return g.failed.push({name:"_pushAccess",reason:c}),!0}return!1},se=async(e,s)=>{const{changesDir:i,options:g,runner:c}=s,{writeStagedRegistry:o}=await import("../packem_chunks/staged-registry.js");if(!g.dryRun){const u=s.priorRegistrySnapshot.pending.length,r=s.stagedRegistry.pending.length,t=await o(e.cwd,i,s.stagedRegistry);if(t.changed){const{stageAndCommitFile:h}=await import("../packem_chunks/git.js");let n;if(t.removed)n="chore(release): clear pending stage registry [skip ci]";else if(r>u){const d=r-u;n=`chore(release): record ${d} new pending stage${d===1?"":"s"} [skip ci]`}else if(r<u){const d=u-r;n=`chore(release): drain ${d} resolved stage${d===1?"":"s"} [skip ci]`}else n=`chore(release): update pending stage registry (${r} pending) [skip ci]`;try{await h({cwd:e.cwd,runner:c},t.path,n,{author:e.config.gitUser,push:!g.noPush,sign:e.config.gitSignCommits===!0})}catch(d){process.stderr.write(`[vis release] Warning: could not commit ${t.path}: ${d.message}
30
+ `)}}}},ie=async(e,s)=>{const{options:i,result:g,runner:c}=s;if(!i.dryRun&&g.published.length>0&&e.config.workspaceChangelog!==!1){const o=e.config.workspaceChangelog,u=typeof o=="object"?o:void 0,r=typeof e.config.aggregateRelease=="object"?e.config.aggregateRelease.enabled:e.config.aggregateRelease===!0;if(u!==void 0||r)try{const{writeWorkspaceChangelogWave:t}=await import("../packem_chunks/workspace.js"),h=new Set(g.published.map(w=>w.name)),n=e.plan.releases.filter(w=>h.has(w.name)),d=await t({changelogConfig:e.config.changelog,cwd:e.cwd,workspaceChangelog:e.config.workspaceChangelog},n);if(d)try{const{stageAndCommitFile:w}=await import("../packem_chunks/git.js");await w({cwd:e.cwd,runner:c},d,"chore(release): record wave [skip ci]",{author:e.config.gitUser,push:!i.noPush,sign:e.config.gitSignCommits===!0})}catch(w){process.stderr.write(`[vis release] Warning: could not commit workspace CHANGELOG.md: ${w.message}
31
+ `)}}catch(t){process.stderr.write(`[vis release] Warning: could not write workspace CHANGELOG.md wave entry: ${t.message}
32
+ `)}}},G=async(e,s,i,g,c)=>{const{stageAndCommitFile:o}=await import("../packem_chunks/git.js"),{stateFilePath:u}=await import("../packem_chunks/state.js");try{const r=await o({cwd:e.cwd,runner:s},u(e.cwd,i,!0),`chore(release): ${g} publish lock [skip ci]`,{author:e.config.gitUser,push:!c.noPush,sign:e.config.gitSignCommits===!0});!c.noPush&&r.committed&&!r.pushed&&process.stderr.write(`[vis release] Warning: publish lock (${g}) was committed locally but could not be pushed — cross-runner resume may use a stale lock.
33
+ `)}catch(r){process.stderr.write(`[vis release] Warning: could not commit publish lock (${g}): ${r.message}
34
+ `)}},re=async(e,s,i,g)=>{const{filterPlanByState:c,newState:o,readState:u,writeState:r}=await import("../packem_chunks/state.js"),{readStagedRegistry:t}=await import("../packem_chunks/staged-registry.js"),h=e.config.changesDir??V,n=e.config.publish?.lockInGit===!0;let d=i.resume||n?await u(e.cwd,h,n):void 0;d&&n&&(d.channel=e.channel?.tag);const w=async()=>{i.dryRun||!d||(await r(e.cwd,h,d,n),n&&await G(e,s,h,"progress",{noPush:i.noPush}))};let b=await t(e.cwd,h);await W(e,"publish",b,{runner:s}),b=await t(e.cwd,h);const C={...b,pending:[...b.pending]};let{releases:P}=e.plan;return d?P=c(P,d):(d=o(e.channel?.tag,e.plan.releases),i.dryRun||(await r(e.cwd,h,d,n),n&&await G(e,s,h,"open",{noPush:i.noPush}))),{changesDir:h,lockInGit:n,options:i,persistState:w,priorRegistrySnapshot:C,releases:P,result:g,runner:s,stagedRegistry:b,state:d}},te=async(e,s,i)=>{const{changesDir:g,lockInGit:c,options:o,persistState:u,result:r,runner:t,state:h}=s,{clearState:n}=await import("../packem_chunks/state.js");if(!o.dryRun&&!o.noTag&&r.published.length>0){const{createOrUpdateFloatingTag:d,createTag:w,defaultTagFor:b,floatingMajorTagFor:C,pushTags:P,renderTagPattern:R}=await import("../packem_chunks/git.js"),l=e.config.releaseTagPattern,m=e.channel?.tag,f=e.config.floatingMajorTag===!0,y=!!e.channel?.prerelease||!!e.preMode;for(const{name:a,version:v}of r.published){if(i.grouped.has(a))continue;const k=e.perPackageConfig.get(a)?.releaseTagPattern??l,A=k?R(k,{channel:m,name:a,version:v}):b(a,v);try{await w({cwd:e.cwd,runner:t},A,`Release ${a}@${v}`,{signing:e.config.signing,skipRemoteCheck:e.firstRelease}),r.tags.push(A)}catch(S){e.firstRelease&&S instanceof O&&S.code==="TAG_COLLISION"?r.skipped.push({name:A,reason:"tag-creation: tag already exists (first-release — skipped)"}):r.failed.push({name:A,reason:`tag-creation: ${S.message}`})}const p=e.depGraph.getPackage(a),T=e.perPackageConfig.get(a),H=p?.manifest?.private===!0,N=T?.skipNpmPublish===!0;if(f&&!y&&!k?.includes("{major}")&&!H&&!N){const S=C(a,v);if(S!==void 0)try{await d({cwd:e.cwd,runner:t},S,{push:!o.noPush,signing:e.config.signing}),r.tags.push(S)}catch(j){r.skipped.push({name:S,reason:`floating-major-tag: ${j.message}`})}}}for(const a of i.groups)try{await w({cwd:e.cwd,runner:t},a.tag,`Release ${a.name} ${a.version}`,{signing:e.config.signing,skipRemoteCheck:e.firstRelease}),r.tags.push(a.tag)}catch(v){e.firstRelease&&v instanceof O&&v.code==="TAG_COLLISION"?r.skipped.push({name:a.tag,reason:"tag-creation: tag already exists (first-release — skipped)"}):r.failed.push({name:a.tag,reason:`tag-creation: ${v.message}`})}if(!o.noPush&&r.tags.length>0)try{await P({cwd:e.cwd,runner:t}),r.tagsPushed=!0}catch(a){r.tagsPushed=!1,r.failed.push({name:"_pushTags",reason:`git push --tags failed: ${a.message}. Retry with: git push --tags`})}h.tagged=[...r.tags],h.pushed=r.tagsPushed,await u(),r.failed.length===0&&!o.dryRun&&(await n(e.cwd,g,c),c&&await G(e,t,g,"close",{noPush:o.noPush}))}},he=async(e,s={})=>{const i={failed:[],published:[],skipped:[],tags:[],tagsPushed:!1},g=F();if(e.plan.releases.length===0||await ae(e,g,s,i))return i;const c=e.config.changesDir??V,{acquireLock:o,releaseLock:u}=await import("../packem_chunks/state.js");let r=!1;if(!s.dryRun)try{await o(e.cwd,c),r=!0}catch(t){return i.failed.push({name:"_lock",reason:t.message}),i}try{const t=await re(e,g,s,i);await X(e,t);const{resolveSyncTagGroups:h}=await import("../packem_chunks/group-tags.js"),n=h(e.config,i.published);if(await te(e,t,n),await se(e,t),await ie(e,t),await Z(e,t,n),!s.dryRun&&e.config.postPublishCommand)try{await _(e.cwd,e.config.postPublishCommand,"postPublishCommand")}catch(d){i.failed.push({name:"_postPublishCommand",reason:d.message})}return i}finally{r&&await u(e.cwd,c)}};export{he as p};