@visulima/vis 6.5.0 → 6.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/cargo-plan.js +1 -1
- package/dist/packem_chunks/catalog-detector.js +1 -1
- package/dist/packem_chunks/catalog.js +11 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +2 -2
- package/dist/packem_chunks/context.js +4 -4
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler32.js +1 -1
- package/dist/packem_chunks/handler39.js +5 -5
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler49.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/handler54.js +1 -1
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler56.js +5 -5
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler60.js +1 -1
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +1 -1
- package/dist/packem_chunks/handler66.js +1 -1
- package/dist/packem_chunks/handler67.js +1 -1
- package/dist/packem_chunks/handler68.js +1 -1
- package/dist/packem_chunks/handler69.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +1 -1
- package/dist/packem_chunks/handler71.js +1 -1
- package/dist/packem_chunks/handler72.js +1 -1
- package/dist/packem_chunks/handler73.js +1 -1
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +1 -1
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler78.js +1 -1
- package/dist/packem_chunks/handler79.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index3.js +28 -35
- package/dist/packem_chunks/index5.js +140 -801
- package/dist/packem_chunks/index6.js +801 -140
- package/dist/packem_chunks/index7.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/native-addon.js +12 -0
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/python-plan.js +1 -1
- package/dist/packem_chunks/python-projects.js +1 -1
- package/dist/packem_chunks/python.js +1 -1
- package/dist/packem_chunks/snapshot.js +2 -2
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_chunks/version-resolver.js +1 -1
- package/dist/packem_chunks/workspace.js +1 -1
- package/dist/packem_shared/{ReleaseClient-DaoIXjdn.js → ReleaseClient-CQaGkUHL.js} +1 -1
- package/dist/packem_shared/{advisories-DPfjSK6L.js → advisories-DzWrfMwP.js} +1 -1
- package/dist/packem_shared/{affected-selection-CEH0nr7L.js → affected-selection-mQmHyn-j.js} +1 -1
- package/dist/packem_shared/{ai-analysis-_x1ObDrt.js → ai-analysis-CIN__RZj.js} +1 -1
- package/dist/packem_shared/{ai-cache-CDnuFo2o.js → ai-cache-BgoifbUT.js} +1 -1
- package/dist/packem_shared/{ai-fix-DFlK168W.js → ai-fix-BG2olCnp.js} +1 -1
- package/dist/packem_shared/apply-BrRx__KL.js +8 -0
- package/dist/packem_shared/apply-release-plan-Cf6TJxK2.js +15 -0
- package/dist/packem_shared/{bin-IOaJHdvM.js → bin-DcZlUzKR.js} +1 -1
- package/dist/packem_shared/{build-scripts-udyGO2o_.js → build-scripts-BtdNDGRO.js} +1 -1
- package/dist/packem_shared/createVersionActions-GD1Y4pNe.js +1 -0
- package/dist/packem_shared/{dependency-scan-BtbCm8-s.js → dependency-scan-BmnwM6FX.js} +1 -1
- package/dist/packem_shared/{detect-859xRNqW.js → detect-DwXq9NzG.js} +1 -1
- package/dist/packem_shared/{docker-C6KwNzQN.js → docker-CN9h1ZAl.js} +1 -1
- package/dist/packem_shared/{ecosystem-gate-DOQpvPpW.js → ecosystem-gate-DX0ZULH7.js} +1 -1
- package/dist/packem_shared/{env-CK7L59IV.js → env-BUf_aJzW.js} +1 -1
- package/dist/packem_shared/{env-consistency-CPPb-xcn.js → env-consistency-B69mYzeD.js} +1 -1
- package/dist/packem_shared/{failure-log-DeV1UYXh.js → failure-log-DiIZhhLI.js} +1 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-CoX0RPCo.js +1 -0
- package/dist/packem_shared/{index-D4AA8lkJ.js → index-CBn2VY5B.js} +1 -1
- package/dist/packem_shared/{index-SMwaTj0E.js → index-DhxUCW8T.js} +1 -1
- package/dist/packem_shared/{lifecycle-Bh4g1Nw5.js → lifecycle-GbShWxRp.js} +1 -1
- package/dist/packem_shared/{manifests-DwbazsLq.js → manifests-dmM8N980.js} +1 -1
- package/dist/packem_shared/{min-release-age-CdwchJ9y.js → min-release-age-PO0aM3R7.js} +1 -1
- package/dist/packem_shared/{missing-package-json-C1471EYw.js → missing-package-json-BhiqxoDg.js} +1 -1
- package/dist/packem_shared/{multi-eco-lockfiles-BLuR5c-0.js → multi-eco-lockfiles-BK7QtgHY.js} +1 -1
- package/dist/packem_shared/{native-config-sync-DfJbQPjx.js → native-config-sync-B0GvRp9j.js} +1 -1
- package/dist/packem_shared/{osv-BOHJQmTi.js → osv-J53omdC9.js} +1 -1
- package/dist/packem_shared/{package-version-CKOVJRf5.js → package-version-C6xroAcI.js} +1 -1
- package/dist/packem_shared/{packument-B9mRtyX_.js → packument-DZRLzoJA.js} +1 -1
- package/dist/packem_shared/{project-name-filter-D2BnruR3.js → project-name-filter-DHT0wEZm.js} +1 -1
- package/dist/packem_shared/{provenance-0_jMjBFB.js → provenance-Cv6Fj_BX.js} +1 -1
- package/dist/packem_shared/{publish-missing-Df39xUBX.js → publish-missing-CfwPeX1q.js} +1 -1
- package/dist/packem_shared/{registry-qnmM5zts.js → registry-B5KGXKED.js} +1 -1
- package/dist/packem_shared/{registry-keys-B8v0maMC.js → registry-keys-BXUXfg-B.js} +1 -1
- package/dist/packem_shared/{renderToString-DR0zDUjh-CXoq9r5t.js → renderToString-DR0zDUjh-BY4_eILr.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-h-OAowPZ.js → resolve-explicit-Sfza3_kc.js} +1 -1
- package/dist/packem_shared/{run-summary-utils-B9iTtwWX.js → run-summary-utils-CQjbLnkh.js} +1 -1
- package/dist/packem_shared/{runtime-check-BAP6OdMD.js → runtime-check-BTZdc1k2.js} +1 -1
- package/dist/packem_shared/{s1ngularity-BEgUeVZN.js → s1ngularity-BrjAz--X.js} +1 -1
- package/dist/packem_shared/{scaffold-files-Hxak1SJe.js → scaffold-files-B77HPWjE.js} +1 -1
- package/dist/packem_shared/{scan-progress-DWNXvT3O.js → scan-progress-D5c-HQ_W.js} +1 -1
- package/dist/packem_shared/{selectors-a5O0ZJuW.js → selectors-l6BxIFLB.js} +1 -1
- package/dist/packem_shared/{signatures-WNCS80My.js → signatures-C4MN75Bv.js} +1 -1
- package/dist/packem_shared/{spinner-D0API6jF.js → spinner-BryD7iJl.js} +1 -1
- package/dist/packem_shared/{table-Bl_qTZDf.js → table-BzBEMntH.js} +1 -1
- package/dist/packem_shared/{tabs-ApX_AMUl.js → tabs-DL_c_u-P.js} +1 -1
- package/dist/packem_shared/{toolchain-De9sHJyE.js → toolchain-CbsBoqgN.js} +1 -1
- package/dist/packem_shared/{typosquats-DxV7JosT.js → typosquats-DRl1AA90.js} +1 -1
- package/dist/packem_shared/{use-measured-height-T4XFSNby.js → use-measured-height-DobMKRXG.js} +1 -1
- package/dist/packem_shared/{vis-update-app-DabaMe5c.js → vis-update-app-CyCv-5iU.js} +1 -1
- package/dist/packem_shared/{vis-user-error-xjSn62_Z.js → vis-user-error-DjdeJsEK.js} +1 -1
- package/dist/packem_shared/{watch-loop-B1eIlmKa.js → watch-loop-D2QKvSts.js} +1 -1
- package/dist/release/index.js +1 -1
- package/index.js +26 -26
- package/package.json +9 -9
- package/dist/packem_chunks/cargo-lock.js +0 -5
- package/dist/packem_chunks/catalog2.js +0 -11
- package/dist/packem_shared/apply-DA-Dv8Pq.js +0 -8
- package/dist/packem_shared/apply-release-plan-BZ_E8GXQ.js +0 -15
- package/dist/packem_shared/clean-package-json-rutwkKl-.js +0 -1
- package/dist/packem_shared/createVersionActions-DXo4z8VN.js +0 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-Dl3N7_h2.js +0 -1
package/dist/packem_shared/{multi-eco-lockfiles-BLuR5c-0.js → multi-eco-lockfiles-BK7QtgHY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as J}from"node:module";import{e as K}from"./index-0dnGN3GP.js";import{x as X}from"./registry-qnmM5zts.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,l=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)}},u=c===void 0?void 0:P(c,l),g=r===void 0?void 0:P(r,l),h=C(i,l),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,l),k=P(d,l),j=f===void 0||k===void 0?{unresolved:y.version?.value??""}:C(y.version?.value,l);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:u,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,l,u,g,h)=>{const v=N(a,l,u);if(!o.has(v)){const m={"bom-ref":v,group:a,name:l,purl:v,type:"library"};u!==void 0&&(m.version=u),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 l=a.group!==void 0&&a.artifact!==void 0?c(a.group,a.artifact,a.version,a.unresolved):void 0;for(const u of a.dependencies){if(O(u.scope)&&!t||u.group===void 0||u.artifact===void 0)continue;const g=c(u.group,u.artifact,u.version,u.unresolved,O(u.scope)?"optional":"required");l!==void 0&&s.set(l,(s.get(l)??new Set).add(g))}}const i=[...o.values()].sort((a,l)=>(a["bom-ref"]??"").localeCompare(l["bom-ref"]??""));return{components:i,dependencies:i.map(a=>{const l=a["bom-ref"]??"",u=[...s.get(l)??[]].sort();return u.length>0?{dependsOn:u,ref:l}:{ref:l}})}},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),l=de(r);o.set(i,{dev:(a?.dev??!0)&&l,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 l=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},u=t===void 0?void 0:new Set(t.map(d=>s(d))),g=e.filter(d=>d.member&&(u===void 0||u.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=l(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=>l(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}},le=(e,n)=>`pkg:hex/${encodeURIComponent(e)}@${encodeURIComponent(n)}`,ue=/^\s*"[^"]+":\s*\{:hex,\s*:([a-z_]\w*),\s*"([^"]+)"/,q=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=ue.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:le})},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[l,u]of Object.entries(i))$(u)&&a.set(l,{depIds:$(u.dependencies)?Object.keys(u.dependencies):[],resolved:typeof u.resolved=="string"?u.resolved:void 0,type:typeof u.type=="string"?u.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 l of a.depIds)o.add(I(l));const c=new Map;for(const i of t)for(const[a,l]of i){if(l.type==="Project"||l.resolved===void 0)continue;const u=`${I(a)}\0${l.resolved}`,g=c.get(u)??{deps:[],member:!1,name:a,version:l.resolved};c.set(u,g),l.type==="Direct"&&(g.member=!0);for(const h of l.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-0dnGN3GP.js";import{x as X}from"./registry-B5KGXKED.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,l=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)}},u=c===void 0?void 0:P(c,l),g=r===void 0?void 0:P(r,l),h=C(i,l),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,l),k=P(d,l),j=f===void 0||k===void 0?{unresolved:y.version?.value??""}:C(y.version?.value,l);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:u,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,l,u,g,h)=>{const v=N(a,l,u);if(!o.has(v)){const m={"bom-ref":v,group:a,name:l,purl:v,type:"library"};u!==void 0&&(m.version=u),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 l=a.group!==void 0&&a.artifact!==void 0?c(a.group,a.artifact,a.version,a.unresolved):void 0;for(const u of a.dependencies){if(O(u.scope)&&!t||u.group===void 0||u.artifact===void 0)continue;const g=c(u.group,u.artifact,u.version,u.unresolved,O(u.scope)?"optional":"required");l!==void 0&&s.set(l,(s.get(l)??new Set).add(g))}}const i=[...o.values()].sort((a,l)=>(a["bom-ref"]??"").localeCompare(l["bom-ref"]??""));return{components:i,dependencies:i.map(a=>{const l=a["bom-ref"]??"",u=[...s.get(l)??[]].sort();return u.length>0?{dependsOn:u,ref:l}:{ref:l}})}},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),l=de(r);o.set(i,{dev:(a?.dev??!0)&&l,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 l=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},u=t===void 0?void 0:new Set(t.map(d=>s(d))),g=e.filter(d=>d.member&&(u===void 0||u.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=l(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=>l(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}},le=(e,n)=>`pkg:hex/${encodeURIComponent(e)}@${encodeURIComponent(n)}`,ue=/^\s*"[^"]+":\s*\{:hex,\s*:([a-z_]\w*),\s*"([^"]+)"/,q=e=>{const n=[];for(const t of e.split(/\r?\n/)){const o=ue.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:le})},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[l,u]of Object.entries(i))$(u)&&a.set(l,{depIds:$(u.dependencies)?Object.keys(u.dependencies):[],resolved:typeof u.resolved=="string"?u.resolved:void 0,type:typeof u.type=="string"?u.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 l of a.depIds)o.add(I(l));const c=new Map;for(const i of t)for(const[a,l]of i){if(l.type==="Project"||l.resolved===void 0)continue;const u=`${I(a)}\0${l.resolved}`,g=c.get(u)??{deps:[],member:!1,name:a,version:l.resolved};c.set(u,g),l.type==="Direct"&&(g.member=!0);for(const h of l.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};
|
package/dist/packem_shared/{native-config-sync-DfJbQPjx.js → native-config-sync-B0GvRp9j.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as o,z as f}from"./index-0dnGN3GP.js";import{l as E}from"../packem_chunks/ts-loader.js";import{i as O}from"../packem_chunks/cli-main.js";import{U as c}from"./env-
|
|
1
|
+
import{e as o,z as f}from"./index-0dnGN3GP.js";import{l as E}from"../packem_chunks/ts-loader.js";import{i as O}from"../packem_chunks/cli-main.js";import{U as c}from"./env-BUf_aJzW.js";import{y as u}from"./isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{p as C}from"./package-version-C6xroAcI.js";const J=(x,a,d)=>{const s=[],$=Object.entries(d).filter(([,n])=>n).map(([n])=>n);switch(x){case"bun":{const n=o(a,"package.json");if(u(n))try{const e=C(n);e.trustedDependencies=$,c(n,`${JSON.stringify(e,null,2)}
|
|
2
2
|
`),s.push(`Updated package.json trustedDependencies with ${$.length} packages`)}catch(e){s.push(`Failed to update package.json: ${e instanceof Error?e.message:String(e)}`)}break}case"npm":{const n=o(a,".npmrc");let e=u(n)?f(n):"";/^\s*ignore-scripts\s*=\s*true\s*$/m.test(e)?s.push(".npmrc already has ignore-scripts=true"):(e=`${e.trimEnd()}
|
|
3
3
|
ignore-scripts=true
|
|
4
4
|
`,c(n,e),s.push("Added ignore-scripts=true to .npmrc"));break}case"pnpm":{const n=o(a,"pnpm-workspace.yaml");if(!u(n)){s.push("pnpm-workspace.yaml not found. Cannot sync allowBuilds.");break}let e={},m=[];try{const t=E(n);e=t?.allowBuilds??{},m=Array.isArray(t?.onlyBuiltDependencies)?t.onlyBuiltDependencies:[]}catch{}const y={...e,...d},j=Object.keys(d).filter(t=>e[t]!==d[t]).length,g=$.toSorted((t,l)=>t.localeCompare(l)),S=[...new Set([...m,...g])].toSorted((t,l)=>t.localeCompare(l)),b=g.filter(t=>!m.includes(t)).length;if(j===0&&b===0)s.push(`All ${String(Object.keys(d).length)} allowBuilds entries already present in pnpm-workspace.yaml.`);else{const t=Object.keys(y).sort(),l=i=>i.startsWith("@")||i.includes("/")||/[:#\s]/.test(i),h=i=>l(i)?`'${i.replaceAll("'","''")}'`:i,p=`allowBuilds:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./advisories-
|
|
1
|
+
import{a as u}from"./advisories-DzWrfMwP.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{r as mt,f as Lt,T as gt,z as R,C as St,k as be,m as te,a as vt,g as Ct,c as Pt}from"./index-0dnGN3GP.js";import{L as De}from"./index-BisalDCf.js";import{a as ie,g as yt}from"./_commonjsHelpers-DTfxOvZk.js";import{r as bt,a as Dt}from"./clean-DRiLimTx.js";let ht;const ut=h=>(ht??=ct(import.meta.url))(h),F=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=h=>{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(h)}return ut(h)},{dirname:pt}=T("node:path"),Pe=T("node:url"),{fileURLToPath:ft}=Pe,ye=T("node:module"),{createRequire:dt}=ye,At=T("util"),Bi=h=>"Bun"in h,Ti=()=>process.argv,Ri=()=>process.cwd(),Ii=()=>process.env,Ui=()=>process.execArgv,Mi=()=>process.execPath,ki=()=>process.platform,_i=()=>process.arch,Wi=(h=0)=>{process.exit(h)},Hi=(h,e)=>{const t=process;return t.on(h,e),()=>{t.removeListener(h,e)}},wt=h=>String.raw`\u{${h.codePointAt(0).toString(16)}}`,xt=(h,e,t)=>gt(h,{start:e},{tabWidth:!1,...t}),Et=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Ot=(h,e)=>{const t=Et.exec(e);if(!t)return;const[,n,i,r]=t;if(i&&r)return{column:Number(r),line:Number(i)};let o=Number(n);return o===h.length&&(o=h.length-1),Lt(h,o)},Nt=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Ft=h=>h.replace(Nt,(e,t,n)=>`"${n}"(${wt(n)})`);function Gt(h,e,t,n){let i;try{return JSON.parse(h,e)}catch(l){i=l.message}let r;h?(r=Ot(h,i),i=Ft(i)):i+=" while parsing empty string";const o=new mt(i);throw o.fileName=t,r&&(o.codeFrame=xt(h,r,n)),o}function $t(h,e,t){const n=R(h,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:r,color:o}={};return typeof r=="function"&&(i=r(i)),Gt(i,e,St(h),{color:o})}var U,ne;function Ae(){return ne||(ne=1,U=["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"]),U}var M,se;function Bt(){return se||(se=1,M=["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"]),M}var k,oe;function Tt(){return oe||(oe=1,k=["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"]),k}var _,ae;function Rt(){if(ae)return _;ae=1;var h=[].concat(Ae()).concat(Bt()),e=Tt();return _=function(t){var n=0;function i(){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 o(){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 a(){return r(/[A-Za-z0-9-.]+/)}function u(){var g=a();if(!g)throw new Error("Expected idstring at offset "+n);return g}function f(){if(r("DocumentRef-")){var g=u();return{type:"DOCUMENTREF",string:g}}}function S(){if(r("LicenseRef-")){var g=u();return{type:"LICENSEREF",string:g}}}function b(){var g=n,c=a();if(h.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=[];i()&&(o(),!!i());){var m=v();if(!m)throw new Error("Unexpected `"+t[n]+"` at offset "+n);C.push(m)}return C},_}var W,le;function It(){return le||(le=1,W=function(h){var e=0;function t(){return e<h.length}function n(){return t()?h[e]:null}function i(){if(!t())throw new Error;e++}function r(m){var g=n();if(g&&g.type==="OPERATOR"&&m===g.string)return i(),g.string}function o(){if(r("WITH")){var m=n();if(m&&m.type==="EXCEPTION")return i(),m.string;throw new Error("Expected exception after `WITH`")}}function l(){var m=e,g="",c=n();if(c.type==="DOCUMENTREF"&&(i(),g+="DocumentRef-"+c.string+":",!r(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(c=n(),c.type==="LICENSEREF")return i(),g+="LicenseRef-"+c.string,{license:g};e=m}function a(){var m=n();if(m&&m.type==="LICENSE"){i();var g={license:m.string};r("+")&&(g.plus=!0);var c=o();return c&&(g.exception=c),g}}function u(){var m=r("(");if(m){var g=v();if(!r(")"))throw new Error("Expected `)`");return g}}function f(){return u()||l()||a()}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}),W}var H,ce;function we(){if(ce)return H;ce=1;var h=Rt(),e=It();return H=function(t){return e(h(t))},H}var j,he;function Ut(){if(he)return j;he=1;var h=we(),e=Ae();function t(c){try{return h(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 i=[["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,o=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"}],a=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},{}),u=Object.keys(a).map(function(L){return[L,a[L]]}).filter(function(L){return L[1].length===1&&L[0]!==null&&L[0]!=="APL"}).map(function(L){return[L[0],L[1][0]]});a=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(u).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 s=f[y];if(L.indexOf(s[S])>-1)return s[b]}return null},m=function(c,L){for(var y=0;y<i.length;y++){var s=i[y],p=s[r];if(c.indexOf(p)>-1){var d=c.replace(p,s[o]),P=L(d);if(P!==null)return P}}return null};j=function(c,L){L=L||{};var y=L.upgrade===void 0?!0:!!L.upgrade;function s(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 s(c);var d=c.replace(/\+$/,"").trim();if(t(d))return s(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)?s(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 j}var z,ue;function Mt(){if(ue)return z;ue=1;var h=we(),e=Ut(),t='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',n=/^SEE LICEN[CS]E IN (.+)$/;function i(o,l){return l.slice(0,o.length)===o}function r(o){if(o.hasOwnProperty("license")){var l=o.license;return i("LicenseRef",l)||i("DocumentRef",l)}else return r(o.left)||r(o.right)}return z=function(o){var l;try{l=h(o)}catch{var a;if(o==="UNLICENSED"||o==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(a=n.exec(o))return{validForOldPackages:!0,validForNewPackages:!0,inFile:a[1]};var u={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(o.trim().length!==0){var f=e(o);f&&u.warnings.push('license is similar to the valid expression "'+f+'"')}return u}return r(l)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},z}var xe={hasSubscribers:!1},A=xe,N=xe;import("node:diagnostics_channel").then(h=>{A=h.channel("lru-cache:metrics"),N=h.tracingChannel("lru-cache")}).catch(()=>{});var kt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Y=()=>A.hasSubscribers||N.hasSubscribers,Ee=new Set,pe=process||{},_t=(h,e,t,n)=>{typeof pe.emitWarning=="function"?pe.emitWarning(h,e,t,n):console.error(`[${t}] ${e}: ${h}`)},Wt=h=>!Ee.has(h),O=h=>!!h&&h===Math.floor(h)&&h>0&&isFinite(h),Oe=h=>O(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?B:null:null,B=class extends Array{constructor(e){super(e),this.fill(0)}},Ht=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]}},jt=class Ne{#n;#c;#t;#O;#g;#T;#R;#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;#I;#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,i,r)=>e.#k(t,n,i,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.#T}get memoMethod(){return this.#R}get dispose(){return this.#t}get onInsert(){return this.#O}get disposeAfter(){return this.#g}constructor(e){let{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:o,updateAgeOnHas:l,allowStale:a,dispose:u,onInsert:f,disposeAfter:S,noDisposeOnSet:b,noUpdateTTL:v,maxSize:C=0,maxEntrySize:m=0,sizeCalculation:g,fetchMethod:c,memoMethod:L,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:s,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??kt,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.#R=L,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#T=c,this.#I=!!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=Ht.create(t),this.#o=0,this.#v=0,typeof u=="function"&&(this.#t=u),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=!!a,this.noDeleteOnStaleGet=!!s,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!l,this.ttlResolution=O(i)||i===0?i: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";Wt(I)&&(Ee.add(I),_t("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=(a,u,f=this.#S.now())=>{t[a]=u!==0?f:0,e[a]=u,i(a,u)},this.#F=a=>{t[a]=e[a]!==0?this.#S.now():0,i(a,e[a])};let i=this.ttlAutopurge?(a,u)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),u&&u!==0&&n){let f=setTimeout(()=>{this.#L(a)?(this.#w(this.#r[a],"expire"),n[a]=void 0):i(a,l(a))},u+1);f.unref&&f.unref(),n[a]=f}}:()=>{};this.#x=(a,u)=>{if(e[u]){let f=e[u],S=t[u];if(!f||!S)return;a.ttl=f,a.start=S,a.now=r||o();let b=a.now-S;a.remainingTTL=f-b}};let r=0,o=()=>{let a=this.#S.now();if(this.ttlResolution>0){r=a;let u=setTimeout(()=>r=0,this.ttlResolution);u.unref&&u.unref()}return a};this.getRemainingTTL=a=>{let u=this.#s.get(a);return u===void 0?0:l(u)};let l=a=>{let u=e[a],f=t[a];if(!u||!f)return 1/0;let S=(r||o())-f;return u-S};this.#L=a=>{let u=t[a],f=e[a];return!!f&&!!u&&(r||o())-u>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,i,r)=>{if(!O(i)){if(this.#i(n))return this.backgroundFetchSize;if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(n,t),!O(i))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 i},this.#U=(t,n,i)=>{if(e[t]=n,this.#c){let r=this.#c-e[t];for(;this.#v>r;)this.#M(!0)}this.#v+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#v)}}#G=e=>{};#U=(e,t,n)=>{};#H=(e,t,n,i)=>{if(n||i)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 i=this.#e[n],r=this.#i(i)?i.__staleWhileFetching:i;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 i=this.#e[n],r=this.#i(i)?i.__staleWhileFetching:i;r!==void 0&&e.call(t,r,this.#r[n],this)}}rforEach(e,t=this){for(let n of this.#A()){let i=this.#e[n],r=this.#i(i)?i.__staleWhileFetching:i;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],i=this.#i(n)?n.__staleWhileFetching:n;if(i===void 0)return;let r={value:i};if(this.#d&&this.#y){let o=this.#d[t],l=this.#y[t];if(o&&l){let a=o-(this.#S.now()-l);r.ttl=a,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],i=this.#e[t],r=this.#i(i)?i.__staleWhileFetching:i;if(r===void 0||n===void 0)continue;let o={value:r};if(this.#d&&this.#y){o.ttl=this.#d[t];let l=this.#S.now()-this.#y[t];o.start=Math.floor(Date.now()-l)}this.#P&&(o.size=this.#P[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#S.now()-i}this.#E(t,n.value,n)}}set(e,t,n={}){let{status:i=A.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,t!==void 0&&(i.value=t),i.cache=this);let r=this.#E(e,t,n);return i&&A.hasSubscribers&&A.publish(i),r}#E(e,t,n,i){let{ttl:r=this.ttl,start:o,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=n,f=this.#i(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:S=this.noUpdateTTL}=n;u&&!f&&(u.value=t);let b=this.#H(e,t,n.size||0,a,u);if(this.maxEntrySize&&b>this.maxEntrySize)return this.#w(e,"set"),u&&(u.set="miss",u.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,u),u&&(u.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!==i&&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,u),this.#e[v]=t,!f){let m=C&&this.#i(C)?C.__staleWhileFetching:C,g=m===void 0?"add":t!==m?"replace":"update";u&&(u.set=g,m!==void 0&&(u.oldValue=m)),this.#N&&this.onInsert?.(t,e,g)}}else f||(u&&(u.set="update"),this.#N&&this.onInsert?.(t,e,"update"))}if(r!==0&&!this.#d&&this.#_(),this.#d&&(S||this.#W(v,r,o),u&&this.#x(u,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],i=this.#e[t],r=this.#i(i);r&&i.__abortController.abort(new Error("evicted"));let o=r?i.__staleWhileFetching:i;return(this.#b||this.#p)&&o!==void 0&&(this.#b&&this.#t?.(o,n,"evict"),this.#p&&this.#l?.push([o,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 i=this.#K(e,t);return A.hasSubscribers&&A.publish(n),i}#K(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,r=this.#s.get(e);if(r!==void 0){let o=this.#e[r];if(this.#i(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#L(r))i&&(i.has="stale",this.#x(i,r));else return n&&this.#F(r),i&&(i.has="hit",this.#x(i,r)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{status:n=Y()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let i=this.#J(e,t);return A.hasSubscribers&&A.publish(n),i}#J(e,t){let{status:n,allowStale:i=this.allowStale}=t,r=this.#s.get(e);if(r===void 0||!i&&this.#L(r)){n&&(n.peek=r===void 0?"miss":"stale");return}let o=this.#e[r],l=this.#i(o)?o.__staleWhileFetching:o;return n&&(l!==void 0?(n.peek="hit",n.value=l):n.peek="miss"),l}#k(e,t,n,i){let r=t===void 0?void 0:this.#e[t];if(this.#i(r))return r;let o=new AbortController,{signal:l}=n;l?.addEventListener("abort",()=>o.abort(l.reason),{signal:o.signal});let a={signal:o.signal,options:n,context:i},u=(m,g=!1)=>{let{aborted:c}=o.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=o.signal.reason,L&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),c&&!L&&!g)return S(o.signal.reason,y);let s=v,p=this.#e[t];return(p===v||p===void 0&&L&&g)&&(m===void 0?s.__staleWhileFetching!==void 0?this.#e[t]=s.__staleWhileFetching:this.#w(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#E(e,m,a.options,s))),m},f=m=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=m),S(m,!1)),S=(m,g)=>{let{aborted:c}=o.signal,L=c&&n.allowStaleOnFetchAbort,y=L||n.allowStaleOnFetchRejection,s=y||n.noDeleteOnFetchRejection,p=v;if(this.#e[t]===v&&(!s||!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.#T?.(e,r,a);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(m(void 0),n.allowStaleOnFetchAbort&&(m=L=>u(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(u,f),C=Object.assign(v,{__abortController:o,__staleWhileFetching:r,__returned:void 0});return t===void 0?(this.#E(e,C,{...a.options,status:void 0}),t=this.#s.get(e)):this.#e[t]=C,C}#i(e){if(!this.#I)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:i=Y()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let r=this.#z(e,t);return i&&n&&(i.trace=!0,N.tracePromise(()=>r,i).catch(()=>{})),r}async#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:a=0,sizeCalculation:u=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.#I)return c&&(c.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:c});let y={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:o,noDisposeOnSet:l,size:a,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:S,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:C,ignoreFetchAbort:v,status:c,signal:L},s=this.#s.get(e);if(s===void 0){c&&(c.fetch="miss");let p=this.#k(e,s,y,m);return p.__returned=p}else{let p=this.#e[s];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(s);if(!g&&!d)return c&&(c.fetch="hit"),this.#B(s),i&&this.#F(s),c&&this.#x(c,s),p;let P=this.#k(e,s,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:i=Y()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let r=this.#X(e,t);return i&&n&&(i.trace=!0,N.tracePromise(()=>r,i).catch(()=>{})),r}async#X(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 i=this.#Z(e,t);return n&&(n.value=i),A.hasSubscribers&&A.publish(n),i}#Z(e,t={}){let n=this.#R;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:r,forceRefresh:o,...l}=t;r&&o&&(r.forceRefresh=!0);let a=this.#$(e,l),u=o||a===void 0;if(r&&(r.memo=u?"miss":"hit",u||(r.value=a)),!u)return a;let f=n(e,a,{options:l,context:i});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 i=this.#$(e,t);return n&&(i!==void 0&&(n.value=i),A.hasSubscribers&&A.publish(n)),i}#$(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:o}=t,l=this.#s.get(e);if(l===void 0){o&&(o.get="miss");return}let a=this.#e[l],u=this.#i(a);return o&&this.#x(o,l),this.#L(l)?u?(o&&(o.get="stale-fetching"),n&&a.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),a.__staleWhileFetching):void 0):(r||this.#w(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),a):void 0):(o&&(o.get=u?"fetching":"hit"),this.#B(l),i&&this.#F(l),u?a.__staleWhileFetching:a)}#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 i=this.#s.get(e);if(i!==void 0)if(this.#m?.[i]&&(clearTimeout(this.#m[i]),this.#m[i]=void 0),n=!0,this.#o===1)this.#q(t);else{this.#G(i);let r=this.#e[i];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[i]=void 0,this.#e[i]=void 0,i===this.#a)this.#a=this.#f[i];else if(i===this.#h)this.#h=this.#u[i];else{let o=this.#f[i];this.#u[o]=this.#u[i];let l=this.#u[i];this.#f[l]=this.#f[i]}this.#o--,this.#C.push(i)}}if(this.#p&&this.#l?.length){let i=this.#l,r;for(;r=i?.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 i=this.#r[t];this.#b&&this.#t?.(n,i,e),this.#p&&this.#l?.push([n,i,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 zt=Object.defineProperty({__proto__:null,LRUCache:jt},Symbol.toStringTag,{value:"Module"}),Yt=ie(zt);var q,fe;function qt(){if(fe)return q;fe=1;const h=(...r)=>r.every(o=>o)?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:o,project:l,committish:a})=>`git@${r}:${o}/${l}.git${h("#",a)}`,sshurltemplate:({domain:r,user:o,project:l,committish:a})=>`git+ssh://git@${r}/${o}/${l}.git${h("#",a)}`,edittemplate:({domain:r,user:o,project:l,committish:a,editpath:u,path:f})=>`https://${r}/${o}/${l}${h("/",u,"/",e(a||"HEAD"),"/",f)}`,browsetemplate:({domain:r,user:o,project:l,committish:a,treepath:u})=>`https://${r}/${o}/${l}${h("/",u,"/",e(a))}`,browsetreetemplate:({domain:r,user:o,project:l,committish:a,treepath:u,path:f,fragment:S,hashformat:b})=>`https://${r}/${o}/${l}/${u}/${e(a||"HEAD")}/${f}${h("#",b(S||""))}`,browseblobtemplate:({domain:r,user:o,project:l,committish:a,blobpath:u,path:f,fragment:S,hashformat:b})=>`https://${r}/${o}/${l}/${u}/${e(a||"HEAD")}/${f}${h("#",b(S||""))}`,docstemplate:({domain:r,user:o,project:l,treepath:a,committish:u})=>`https://${r}/${o}/${l}${h("/",a,"/",e(u))}#readme`,httpstemplate:({auth:r,domain:o,user:l,project:a,committish:u})=>`git+https://${h(r,"@")}${o}/${l}/${a}.git${h("#",u)}`,filetemplate:({domain:r,user:o,project:l,committish:a,path:u})=>`https://${r}/${o}/${l}/raw/${e(a||"HEAD")}/${u}`,shortcuttemplate:({type:r,user:o,project:l,committish:a})=>`${r}:${o}/${l}${h("#",a)}`,pathtemplate:({user:r,project:o,committish:l})=>`${r}/${o}${h("#",l)}`,bugstemplate:({domain:r,user:o,project:l})=>`https://${r}/${o}/${l}/issues`,hashformat:t},i={};i.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:r,user:o,project:l,committish:a,path:u})=>`https://${h(r,"@")}raw.githubusercontent.com/${o}/${l}/${e(a||"HEAD")}/${u}`,gittemplate:({auth:r,domain:o,user:l,project:a,committish:u})=>`git://${h(r,"@")}${o}/${l}/${a}.git${h("#",u)}`,tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://codeload.${r}/${o}/${l}/tar.gz/${e(a||"HEAD")}`,extract:r=>{let[,o,l,a,u]=r.pathname.split("/",5);if(!(a&&a!=="tree")&&(a||(u=r.hash.slice(1)),l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!o||!l)))return{user:o,project:l,committish:u}}},i.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:r,user:o,project:l,committish:a,treepath:u,path:f,editpath:S})=>`https://${r}/${o}/${l}${h("/",u,"/",e(a||"HEAD"),"/",f,S)}`,tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/${o}/${l}/get/${e(a||"HEAD")}.tar.gz`,extract:r=>{let[,o,l,a]=r.pathname.split("/",4);if(!["get"].includes(a)&&(l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!o||!l)))return{user:o,project:l,committish:r.hash.slice(1)}}},i.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/api/v4/projects/${e(o+"/"+l)}/repository/archive.tar.gz?sha=${e(a||"HEAD")}`,extract:r=>{const o=r.pathname.slice(1);if(o.includes("/-/")||o.includes("/archive.tar.gz"))return;const l=o.split("/");let a=l.pop();a.endsWith(".git")&&(a=a.slice(0,-4));const u=l.join("/");if(!(!u||!a))return{user:u,project:a,committish:r.hash.slice(1)}}},i.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:r,project:o,committish:l})=>`git@${r}:${o}.git${h("#",l)}`,sshurltemplate:({domain:r,project:o,committish:l})=>`git+ssh://git@${r}/${o}.git${h("#",l)}`,edittemplate:({domain:r,user:o,project:l,committish:a,editpath:u})=>`https://${r}/${o}/${l}${h("/",e(a))}/${u}`,browsetemplate:({domain:r,project:o,committish:l})=>`https://${r}/${o}${h("/",e(l))}`,browsetreetemplate:({domain:r,project:o,committish:l,path:a,hashformat:u})=>`https://${r}/${o}${h("/",e(l))}${h("#",u(a))}`,browseblobtemplate:({domain:r,project:o,committish:l,path:a,hashformat:u})=>`https://${r}/${o}${h("/",e(l))}${h("#",u(a))}`,docstemplate:({domain:r,project:o,committish:l})=>`https://${r}/${o}${h("/",e(l))}`,httpstemplate:({domain:r,project:o,committish:l})=>`git+https://${r}/${o}.git${h("#",l)}`,filetemplate:({user:r,project:o,committish:l,path:a})=>`https://gist.githubusercontent.com/${r}/${o}/raw${h("/",e(l))}/${a}`,shortcuttemplate:({type:r,project:o,committish:l})=>`${r}:${o}${h("#",l)}`,pathtemplate:({project:r,committish:o})=>`${r}${h("#",o)}`,bugstemplate:({domain:r,project:o})=>`https://${r}/${o}`,gittemplate:({domain:r,project:o,committish:l})=>`git://${r}/${o}.git${h("#",l)}`,tarballtemplate:({project:r,committish:o})=>`https://codeload.github.com/gist/${r}/tar.gz/${e(o||"HEAD")}`,extract:r=>{let[,o,l,a]=r.pathname.split("/",4);if(a!=="raw"){if(!l){if(!o)return;l=o,o=null}return l.endsWith(".git")&&(l=l.slice(0,-4)),{user:o,project:l,committish:r.hash.slice(1)}}},hashformat:function(r){return r&&"file-"+t(r)}},i.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:r,user:o,project:l,committish:a,path:u})=>`https://${r}/${o}/${l}/blob/${e(a)||"HEAD"}/${u}`,httpstemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/${o}/${l}${h("#",a)}`,tarballtemplate:({domain:r,user:o,project:l,committish:a})=>`https://${r}/${o}/${l}/archive/${e(a)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:r=>{let[,o,l,a]=r.pathname.split("/",4);if(!["archive"].includes(a)&&(l&&l.endsWith(".git")&&(l=l.slice(0,-4)),!(!o||!l)))return{user:o,project:l,committish:r.hash.slice(1)}}};for(const[r,o]of Object.entries(i))i[r]=Object.assign({},n,o);return q=i,q}var V,de;function Fe(){if(de)return V;de=1;const h=(i,r,o)=>{const l=i.indexOf(o);return i.lastIndexOf(r,l>-1?l:1/0)},e=i=>{try{return new URL(i)}catch{}},t=(i,r)=>{const o=i.indexOf(":"),l=i.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(r,l)||i.substr(o,3)==="://")return i;const a=i.indexOf("@");return a>-1?a>o?`git+ssh://${i}`:i:`${i.slice(0,o+1)}//${i.slice(o+1)}`},n=i=>{const r=h(i,"@","#"),o=h(i,":","#");return o>r&&(i=i.slice(0,o)+"/"+i.slice(o+1)),h(i,":","#")===-1&&i.indexOf("//")===-1&&(i=`git+ssh://${i}`),i};return V=(i,r)=>{const o=r?t(i,r):i;return e(o)||e(n(o))},V}var K,me;function Vt(){if(me)return K;me=1;const h=Fe(),e=t=>{const n=t.indexOf("#"),i=t.indexOf("/"),r=t.indexOf("/",i+1),o=t.indexOf(":"),l=/\s/.exec(t),a=t.indexOf("@"),u=!l||n>-1&&l.index>n,f=a===-1||n>-1&&a>n,S=o===-1||n>-1&&o>n,b=r===-1||n>-1&&r>n,v=i>0,C=n>-1?t[n-1]!=="/":!t.endsWith("/"),m=!t.startsWith(".");return u&&v&&C&&m&&f&&S&&b};return K=(t,n,{gitHosts:i,protocols:r})=>{if(!t)return;const o=e(t)?`github:${t}`:t,l=h(o,r);if(!l)return;const a=i.byShortcut[l.protocol],u=i.byDomain[l.hostname.startsWith("www.")?l.hostname.slice(4):l.hostname],f=a||u;if(!f)return;const S=i[a||u];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(a){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]},K}var J,Le;function Kt(){if(Le)return J;Le=1;const{LRUCache:h}=Yt,e=qt(),t=Vt(),n=Fe(),i=new h({max:1e3});function r(l){try{const{protocol:a,hostname:u,pathname:f}=new URL(l);if(!u)return null;const S=/(?:git\+)http:$/.test(a)?"http:":"https:",b=f.replace(/\.git$/,"");return`${S}//${u}${b}`}catch{return null}}class o{constructor(a,u,f,S,b,v,C={}){Object.assign(this,o.#n[a],{type:a,user:u,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(a,u){o.#n[a]=u,o.#n.byDomain[u.domain]=a,o.#n.byShortcut[`${a}:`]=a,o.#c[`${a}:`]={name:a}}static fromUrl(a,u){if(typeof a!="string")return;const f=a+JSON.stringify(u||{});if(!i.has(f)){const S=t(a,u,{gitHosts:o.#n,protocols:o.#c});i.set(f,S?new o(...S):void 0)}return i.get(f)}static fromManifest(a,u={}){if(!a||typeof a!="object")return;const f=a.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&&o.fromUrl(S.replace(/^git\+/,""),u)||null;if(b)return b;const v=r(S);return o.fromUrl(v,u)||v}static parseUrl(a){return n(a)}#t(a,u){if(typeof a!="function")return null;const f={...this,...this.opts,...u};f.path||(f.path=""),f.path.startsWith("/")&&(f.path=f.path.slice(1)),f.noCommittish&&(f.committish=null);const S=a(f);return f.noGitPlus&&S.startsWith("git+")?S.slice(4):S}hash(){return this.committish?`#${this.committish}`:""}ssh(a){return this.#t(this.sshtemplate,a)}sshurl(a){return this.#t(this.sshurltemplate,a)}browse(a,...u){return typeof a!="string"?this.#t(this.browsetemplate,a):typeof u[0]!="string"?this.#t(this.browsetreetemplate,{...u[0],path:a}):this.#t(this.browsetreetemplate,{...u[1],fragment:u[0],path:a})}browseFile(a,...u){return typeof u[0]!="string"?this.#t(this.browseblobtemplate,{...u[0],path:a}):this.#t(this.browseblobtemplate,{...u[1],fragment:u[0],path:a})}docs(a){return this.#t(this.docstemplate,a)}bugs(a){return this.#t(this.bugstemplate,a)}https(a){return this.#t(this.httpstemplate,a)}git(a){return this.#t(this.gittemplate,a)}shortcut(a){return this.#t(this.shortcuttemplate,a)}path(a){return this.#t(this.pathtemplate,a)}tarball(a){return this.#t(this.tarballtemplate,{...a,noCommittish:!1})}file(a,u){return this.#t(this.filetemplate,{...u,path:a})}edit(a,u){return this.#t(this.edittemplate,{...u,path:a})}getDefaultRepresentation(){return this.default}toString(a){return this.default&&typeof this[this.default]=="function"?this[this.default](a):this.sshurl(a)}}for(const[l,a]of Object.entries(e))o.addHost(l,a);return J=o,J}var X,ge;function Jt(){if(ge)return X;ge=1,X=h;function h(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 i=t+1;for(;i<n&&e[i].trim();)i++;return e.slice(t,i).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 Xt={topLevel:Ge,bugs:$e,script:Be},Zt=Object.defineProperty({__proto__:null,bugs:$e,default:Xt,script:Be,topLevel:Ge},Symbol.toStringTag,{value:"Module"}),Qt=ie(Zt);var Z,Se;function ei(){if(Se)return Z;Se=1;var{URL:h}=Pe,e=bt(),t=Dt(),n=Mt(),i=Kt(),{isBuiltin:r}=ye,o=["dependencies","devDependencies","optionalDependencies"],l=Jt(),a=Qt,u=s=>s.includes("@")&&s.indexOf("@")<s.lastIndexOf(".");Z={warn:function(){},fixRepositoryField:function(s){if(s.repositories&&(this.warn("repositories"),s.repository=s.repositories[0]),!s.repository)return this.warn("missingRepository");typeof s.repository=="string"&&(s.repository={type:"git",url:s.repository});var p=s.repository.url||"";if(p){var d=i.fromUrl(p);d&&(p=s.repository.url=d.getDefaultRepresentation()==="shortcut"?d.https():d.toString())}p.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",p)},fixTypos:function(s){Object.keys(a.topLevel).forEach(function(p){Object.prototype.hasOwnProperty.call(s,p)&&this.warn("typo",p,a.topLevel[p])},this)},fixScriptsField:function(s){if(s.scripts){if(typeof s.scripts!="object"){this.warn("nonObjectScripts"),delete s.scripts;return}Object.keys(s.scripts).forEach(function(p){typeof s.scripts[p]!="string"?(this.warn("nonStringScript"),delete s.scripts[p]):a.script[p]&&!s.scripts[a.script[p]]&&this.warn("typo",p,a.script[p],"scripts")},this)}},fixFilesField:function(s){var p=s.files;p&&!Array.isArray(p)?(this.warn("nonArrayFiles"),delete s.files):s.files&&(s.files=s.files.filter(function(d){return!d||typeof d!="string"?(this.warn("invalidFilename",d),!1):!0},this))},fixBinField:function(s){if(s.bin&&typeof s.bin=="string"){var p={},d;(d=s.name.match(/^@[^/]+[/](.*)$/))?p[d[1]]=s.bin:p[s.name]=s.bin,s.bin=p}},fixManField:function(s){s.man&&typeof s.man=="string"&&(s.man=[s.man])},fixBundleDependenciesField:function(s){var p="bundledDependencies",d="bundleDependencies";s[p]&&!s[d]&&(s[d]=s[p],delete s[p]),s[d]&&!Array.isArray(s[d])?(this.warn("nonArrayBundleDependencies"),delete s[d]):s[d]&&(s[d]=s[d].filter(function(P){return!P||typeof P!="string"?(this.warn("nonStringBundleDependency",P),!1):(s.dependencies||(s.dependencies={}),Object.prototype.hasOwnProperty.call(s.dependencies,P)||(this.warn("nonDependencyBundleDependency",P),s.dependencies[P]="*"),!0)},this))},fixDependencies:function(s){L(s,this.warn),g(s,this.warn),this.fixBundleDependenciesField(s),["dependencies","devDependencies"].forEach(function(p){if(p in s){if(!s[p]||typeof s[p]!="object"){this.warn("nonObjectDependencies",p),delete s[p];return}Object.keys(s[p]).forEach(function(d){var P=s[p][d];typeof P!="string"&&(this.warn("nonStringDependency",d,JSON.stringify(P)),delete s[p][d]);var D=i.fromUrl(s[p][d]);D&&(s[p][d]=D.toString())},this)}},this)},fixModulesField:function(s){s.modules&&(this.warn("deprecatedModules"),delete s.modules)},fixKeywordsField:function(s){typeof s.keywords=="string"&&(s.keywords=s.keywords.split(/,\s+/)),s.keywords&&!Array.isArray(s.keywords)?(delete s.keywords,this.warn("nonArrayKeywords")):s.keywords&&(s.keywords=s.keywords.filter(function(p){return typeof p!="string"||!p?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(s,p){var d=!p;if(!s.version)return s.version="",!0;if(!e(s.version,d))throw new Error('Invalid version: "'+s.version+'"');return s.version=t(s.version,d),!0},fixPeople:function(s){v(s,C),v(s,m)},fixNameField:function(s,p){typeof p=="boolean"?p={strict:p}:typeof p>"u"&&(p={});var d=p.strict;if(!s.name&&!d){s.name="";return}if(typeof s.name!="string")throw new Error("name field must be a string.");d||(s.name=s.name.trim()),b(s.name,d,p.allowLegacyCase),r(s.name)&&this.warn("conflictingName",s.name)},fixDescriptionField:function(s){s.description&&typeof s.description!="string"&&(this.warn("nonStringDescription"),delete s.description),s.readme&&!s.description&&(s.description=l(s.readme)),s.description===void 0&&delete s.description,s.description||this.warn("missingDescription")},fixReadmeField:function(s){s.readme||(this.warn("missingReadme"),s.readme="ERROR: No README data found!")},fixBugsField:function(s){if(!s.bugs&&s.repository&&s.repository.url){var p=i.fromUrl(s.repository.url);p&&p.bugs()&&(s.bugs={url:p.bugs()})}else if(s.bugs){if(typeof s.bugs=="string")u(s.bugs)?s.bugs={email:s.bugs}:h.canParse(s.bugs)?s.bugs={url:s.bugs}:this.warn("nonEmailUrlBugsString");else{y(s.bugs,this.warn);var d=s.bugs;s.bugs={},d.url&&(h.canParse(d.url)?s.bugs.url=d.url:this.warn("nonUrlBugsUrlField")),d.email&&(typeof d.email=="string"&&u(d.email)?s.bugs.email=d.email:this.warn("nonEmailBugsEmailField"))}!s.bugs.email&&!s.bugs.url&&(delete s.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(s){if(!s.homepage&&s.repository&&s.repository.url){var p=i.fromUrl(s.repository.url);p&&p.docs()&&(s.homepage=p.docs())}if(s.homepage){if(typeof s.homepage!="string")return this.warn("nonUrlHomepage"),delete s.homepage;h.canParse(s.homepage)||(s.homepage="http://"+s.homepage)}},fixLicenseField:function(s){const p=s.license||s.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(s){if(s.charAt(0)!=="@")return!1;var p=s.slice(1).split("/");return p.length!==2?!1:p[0]&&p[1]&&p[0]===encodeURIComponent(p[0])&&p[1]===encodeURIComponent(p[1])}function S(s){return!s.match(/[/@\s+%:]/)&&s===encodeURIComponent(s)}function b(s,p,d){if(s.charAt(0)==="."||!(f(s)||S(s))||p&&!d&&s!==s.toLowerCase()||s.toLowerCase()==="node_modules"||s.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(s))}function v(s,p){return s.author&&(s.author=p(s.author)),["maintainers","contributors"].forEach(function(d){Array.isArray(s[d])&&(s[d]=s[d].map(p))}),s}function C(s){if(typeof s=="string")return s;var p=s.name||"",d=s.url||s.web,P=d?" ("+d+")":"",D=s.email||s.mail,w=D?" <"+D+">":"";return p+w+P}function m(s){if(typeof s!="string")return s;var p=s.match(/^([^(<]+)/),d=s.match(/\(([^()]+)\)/),P=s.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(s){var p=s.optionalDependencies;if(p){var d=s.dependencies||{};Object.keys(p).forEach(function(P){d[P]=p[P]}),s.dependencies=d}}function c(s,p,d){if(!s)return{};if(typeof s=="string"&&(s=s.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(s))return s;d("deprecatedArrayDependencies",p);var P={};return s.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(s,p){o.forEach(function(d){s[d]&&(s[d]=c(s[d],d,p))})}function y(s,p){s&&Object.keys(s).forEach(function(d){a.bugs[d]&&(p("typo",d,a.bugs[d],"bugs"),s[a.bugs[d]]=s[d],delete s[d])})}return Z}var Te="'repositories' (plural) Not supported. Please pick one as the 'repository' field",Re="No repository field.",Ie="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",Je="keywords should be an array of strings",Xe="%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 ti={repositories:Te,missingRepository:Re,brokenGitUrl:Ie,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:Je,conflictingName:Xe,nonStringDescription:Ze,missingDescription:Qe,missingReadme:et,missingLicense:tt,nonEmailUrlBugsString:it,nonUrlBugsUrlField:rt,nonEmailBugsEmailField:nt,emptyNormalizedBugs:st,nonUrlHomepage:ot,invalidLicense:at,typo:lt},ii=Object.defineProperty({__proto__:null,brokenGitUrl:Ie,conflictingName:Xe,default:ti,deprecatedArrayDependencies:qe,deprecatedModules:Ve,emptyNormalizedBugs:st,invalidFilename:_e,invalidLicense:at,missingDescription:Qe,missingLicense:tt,missingReadme:et,missingRepository:Re,nonArrayBundleDependencies:We,nonArrayFiles:ke,nonArrayKeywords:Ke,nonDependencyBundleDependency:je,nonEmailBugsEmailField:nt,nonEmailUrlBugsString:it,nonObjectDependencies:ze,nonObjectScripts:Ue,nonStringBundleDependency:He,nonStringDependency:Ye,nonStringDescription:Ze,nonStringKeyword:Je,nonStringScript:Me,nonUrlBugsUrlField:rt,nonUrlHomepage:ot,repositories:Te,typo:lt},Symbol.toStringTag,{value:"Module"}),ri=ie(ii);var Q,ve;function ni(){if(ve)return Q;ve=1;var h=At,e=ri;Q=function(){var n=Array.prototype.slice.call(arguments,0),i=n.shift();if(i==="typo")return t.apply(null,n);var r=e[i]?e[i]:i+": '%s'";return n.unshift(r),h.format.apply(null,n)};function t(n,i,r){return r&&(n=r+"['"+n+"']",i=r+"['"+i+"']"),h.format(e.typo,n,i)}return Q}var ee,Ce;function si(){if(Ce)return ee;Ce=1,ee=r;var h=ei();r.fixer=h;var e=ni(),t=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],n=["dependencies","people","typos"],i=t.map(function(l){return o(l)+"Field"});i=i.concat(n);function r(l,a,u){a===!0&&(a=null,u=!0),u||(u=!1),(!a||l.private)&&(a=function(){}),l.scripts&&l.scripts.install==="node-gyp rebuild"&&!l.scripts.preinstall&&(l.gypfile=!0),h.warn=function(){a(e.apply(null,arguments))},i.forEach(function(f){h["fix"+o(f)](l,u)}),l._id=l.name+"@"+l.version}function o(l){return l.charAt(0).toUpperCase()+l.slice(1)}return ee}var oi=si();const ai=yt(oi),li=(h,e,t)=>{const n=te(h),i=te(e),r=i===n?".":vt(n,i);return t.some(o=>{const l=o.startsWith("./")?o.slice(2):o,a=r.startsWith("./")?r.slice(2):r;if(l==="."&&a===".")return!0;if(l.endsWith("/**")){const u=l.slice(0,-3);return a===u||a.startsWith(`${u}/`)}if(l.endsWith("/*")){const u=l.slice(0,-2);return u===""?a!=="."&&!a.includes("/"):a.startsWith(`${u}/`)||a===u}return a===l||a.startsWith(`${l}/`)})},ci=h=>{const e=be("pnpm-workspace.yaml",{cwd:te(h),type:"file"});if(!e)return;const t=De(R(e)),n=Array.isArray(t.packages)?t.packages:[];if(!li(e,h,n))return;const i={};return t.catalog&&typeof t.catalog=="object"&&(i.catalog=t.catalog),t.catalogs&&typeof t.catalogs=="object"&&(i.catalogs=t.catalogs),Object.keys(i).length>0?i:void 0},hi=(h,e,t)=>{if(e==="catalog:")return t.catalog?.[h];if(e.startsWith("catalog:")){const n=e.slice(8);return t.catalogs?.[n]?.[h]}},ui=(h,e)=>{for(const[t,n]of Object.entries(h)){if(typeof n!="string")continue;const i=hi(t,n,e);i&&(h[t]=i)}},pi=(h,e)=>{const t=["dependencies","devDependencies","peerDependencies","optionalDependencies"];for(const n of t){if(!h[n]||typeof h[n]!="object")continue;const i=h[n];ui(i,e)}};let fi;const di=h=>(fi??=dt(import.meta.url))(h),G=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,re=h=>{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(h)}return di(h)},{existsSync:zi}=re("node:fs"),{createInterface:Yi}=re("node:readline"),{styleText:qi}=re("node:util"),mi=new Set(["__proto__","prototype","constructor"]);Math.max(...[...mi].map(h=>h.length));typeof process.stdout<"u"&&globalThis.window;const Li=/, ([^,]*)$/,gi=new Map,Si=(h,e={})=>{const t=e.strict&&e.ignoreWarnings?e.ignoreWarnings.map(String).toSorted((n,i)=>n.localeCompare(i)).join(","):"";return`${h}|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 vi extends Error{constructor(e){super(`The following warnings were encountered while normalizing package data:
|
|
3
3
|
- ${e.join(`
|
|
4
|
-
- `)}`),this.name="PackageJsonValidationError"}}const Ci=(h,e,t=[])=>{const n=[];if(ai(h,i=>{n.push(i)},e),e&&n.length>0){const i=n.filter(r=>!t.some(o=>o instanceof RegExp?o.test(r):o===r));if(i.length>0)throw new vi(i)}return h},Pi=h=>{const e=R(h);return De(e)},yi=h=>{const e=R(h);return Pt.parse(e)},bi=(h,e)=>e?.yaml!==!1&&(h.endsWith(".yaml")||h.endsWith(".yml"))?Pi(h):e?.json5!==!1&&h.endsWith(".json5")?yi(h):$t(h),Di=(h,e={})=>{const t={type:"file"};h&&(t.cwd=h);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");const i=be(n,t);if(!i)throw new Ct(`No such file or directory, for ${n.join(", ").replace(Li," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:gi,o=Si(i,e);if(e.cache&&r.has(o))return r.get(o);const l=bi(i,e);if(e.resolveCatalogs){const u=ci(i);u&&pi(l,u)}Ci(l,e.strict??!1,e.ignoreWarnings);const a={packageJson:l,path:i};return e.cache&&r.set(o,a),a};var Ai="6.
|
|
4
|
+
- `)}`),this.name="PackageJsonValidationError"}}const Ci=(h,e,t=[])=>{const n=[];if(ai(h,i=>{n.push(i)},e),e&&n.length>0){const i=n.filter(r=>!t.some(o=>o instanceof RegExp?o.test(r):o===r));if(i.length>0)throw new vi(i)}return h},Pi=h=>{const e=R(h);return De(e)},yi=h=>{const e=R(h);return Pt.parse(e)},bi=(h,e)=>e?.yaml!==!1&&(h.endsWith(".yaml")||h.endsWith(".yml"))?Pi(h):e?.json5!==!1&&h.endsWith(".json5")?yi(h):$t(h),Di=(h,e={})=>{const t={type:"file"};h&&(t.cwd=h);const n=["package.json"];e.yaml!==!1&&n.push("package.yaml","package.yml"),e.json5!==!1&&n.push("package.json5");const i=be(n,t);if(!i)throw new Ct(`No such file or directory, for ${n.join(", ").replace(Li," or $1")} found.`);const r=e.cache&&typeof e.cache!="boolean"?e.cache:gi,o=Si(i,e);if(e.cache&&r.has(o))return r.get(o);const l=bi(i,e);if(e.resolveCatalogs){const u=ci(i);u&&pi(l,u)}Ci(l,e.strict??!1,e.ignoreWarnings);const a={packageJson:l,path:i};return e.cache&&r.set(o,a),a};var Ai="6.5.0";const wi={version:Ai},xi=wi.version,Ei="@visulima/vis";let E;const Vi=()=>{if(E!==void 0)return E;const h=process.env.VIS_VERSION;if(h)return E=h,E;try{const{packageJson:e}=Di(pt(ft(import.meta.url)),{json5:!1,yaml:!1});if(e.name===Ei&&typeof e.version=="string")return E=e.version,E}catch{}return E=xi,E};export{Gt as N,Hi as P,Ui as a,ki as b,Ti as c,_i as d,Vi as g,Mi as i,Ri as n,$t as p,Bi as r,Ii as t,Wi as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as b}from"node:module";import{e as p}from"./index-0dnGN3GP.js";import{a as j}from"./index--eV4qIz5.js";import{h as S,g as U}from"./env-
|
|
1
|
+
import{createRequire as b}from"node:module";import{e as p}from"./index-0dnGN3GP.js";import{a as j}from"./index--eV4qIz5.js";import{h as S,g as U}from"./env-BUf_aJzW.js";import{y as E}from"./isAccessibleSync-DYKTrrvc-CBsMZhj-.js";import{p as R}from"./package-version-C6xroAcI.js";let _;const T=t=>(_??=b(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[e,s]=d.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return d.getBuiltinModule(t)}return T(t)},{rmSync:u,writeFileSync:C}=k("node:fs"),g=3,F=1800*1e3,A=15e3,v=()=>p(U(),"packuments"),y=t=>p(v(),`${encodeURIComponent(t)}.json`),M=t=>{const e=y(t);if(E(e))try{const s=R(e);if(s.cacheVersion!==g){u(e,{force:!0});return}if(Date.now()-s.createdAt>s.ttlMs){u(e,{force:!0});return}return s.packument}catch{u(e,{force:!0});return}},w=(t,e,s)=>{S(v());const o={cacheVersion:g,createdAt:Date.now(),packument:e,ttlMs:s};C(y(t),JSON.stringify(o),"utf8")},P=t=>{const e={},s=t.versions??{};for(const[a,r]of Object.entries(s)){const i=r.dist,n={version:a};if(r._npmUser!==void 0&&(n._npmUser=r._npmUser),r.maintainers!==void 0&&(n.maintainers=r.maintainers),r.bin!==void 0&&(n.bin=r.bin),i!==void 0){const c={};i.signatures!==void 0&&(c.signatures=i.signatures),i.attestations!==void 0&&(c.attestations=i.attestations),typeof i.integrity=="string"&&(c.integrity=i.integrity),typeof i.tarball=="string"&&(c.tarball=i.tarball),typeof i.unpackedSize=="number"&&Number.isFinite(i.unpackedSize)&&i.unpackedSize>=0&&(c.unpackedSize=i.unpackedSize),typeof i.fileCount=="number"&&Number.isInteger(i.fileCount)&&i.fileCount>=0&&(c.fileCount=i.fileCount),n.dist=c}r.repository!==void 0&&(n.repository=r.repository),r.license!==void 0&&(n.license=r.license),typeof r.readme=="string"&&(n.readme=r.readme),typeof r.readmeFilename=="string"&&(n.readmeFilename=r.readmeFilename),typeof r.private=="boolean"&&(n.private=r.private),typeof r.deprecated=="string"&&(n.deprecated=r.deprecated),r.scripts!==void 0&&typeof r.scripts=="object"&&(n.scripts=r.scripts),e[a]=n}const o={name:typeof t.name=="string"?t.name:"",versions:e};return t["dist-tags"]!==void 0&&(o["dist-tags"]=t["dist-tags"]),t.time!==void 0&&(o.time=t.time),typeof t.readme=="string"&&(o.readme=t.readme),o},D=t=>{const e={Accept:"application/json"};return t!==void 0&&t!==""&&(e.Authorization=`Bearer ${t}`),e},N=async(t,e)=>{if(e.registryUrl!==void 0)return{authToken:e.authToken,url:e.registryUrl};if(e.workspaceRoot!==void 0){const{getRegistryForPackage:s,loadNpmrc:o}=await import("../packem_chunks/catalog.js"),a=o(e.workspaceRoot),{token:r,url:i}=s(t,a);return{authToken:e.authToken??r,url:i}}return{authToken:e.authToken,url:"https://registry.npmjs.org"}},I=async(t,e={})=>{const s=e.cacheTtlMs??F,o=M(t);if(o!==void 0)return o;if(e.offline)return;const a=await N(t,e),i=`${a.url.endsWith("/")?a.url.slice(0,-1):a.url}/${t.replace("/","%2f")}`,n=new AbortController,c=setTimeout(()=>{n.abort()},A),l=()=>{n.abort()};e.signal?.addEventListener("abort",l,{once:!0});try{const f=await fetch(i,{headers:D(a.authToken),signal:n.signal});if(f.status===404)return;if(!f.ok)throw new Error(`Registry returned ${String(f.status)} for ${t}`);const h=await f.json(),m=P(h);return w(t,m,s),m}finally{clearTimeout(c),e.signal?.removeEventListener("abort",l)}},x=(t,e)=>{const s=Object.keys(t.versions);if(s.length===0)return;if(e===void 0||e===""||e==="latest")return t["dist-tags"]?.latest??s.at(-1);const o=t["dist-tags"]?.[e];return o!==void 0?o:Object.hasOwn(t.versions,e)?e:j.maxSatisfying(s,e)??void 0};export{I as g,x as r};
|
package/dist/packem_shared/{project-name-filter-D2BnruR3.js → project-name-filter-DHT0wEZm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-
|
|
1
|
+
import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-DjdeJsEK.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(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./index--eV4qIz5.js";import{g as u}from"./packument-
|
|
1
|
+
import{a as i}from"./index--eV4qIz5.js";import{g as u}from"./packument-DZRLzoJA.js";import{c as d}from"../packem_chunks/cli-main.js";const v=8,h=async(r,e,o)=>{if(r.length===0)return[];const t=Math.max(1,Math.min(e,r.length)),s=Array.from({length:r.length});let n=0;const c=async()=>{for(;n<r.length;){const a=n;n+=1;const l=r[a];s[a]=await o(l,a)}};return await Promise.all(Array.from({length:t},()=>c())),s},f=(r,e)=>r.versions[e]?.dist?.attestations?.provenance!==void 0,p=(r,e)=>i.valid(e)?Object.keys(r.versions).filter(t=>i.valid(t)!==null&&i.lt(t,e)).filter(t=>i.satisfies(t,"*",{includePrerelease:!1})).filter(t=>f(r,t)).sort((t,s)=>i.lt(t,s)?1:-1)[0]:void 0,m=async(r,e={})=>{if(d("provenance"))return[];const o=new Set(e.allowlist),t=e.concurrency??v;return(await h(r,t,async({name:n,version:c})=>{if(o.has(n))return;const a=await u(n,{workspaceRoot:e.workspaceRoot});if(a===void 0||f(a,c))return;const l=p(a,c);if(l!==void 0)return{packageName:n,priorVersionWithProvenance:l,version:c}})).filter(n=>n!==void 0)};export{v as D,p as f,h as m,m as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as I}from"./index--eV4qIz5.js";import{c as D,d as W,D as L}from"../packem_chunks/version-resolver.js";import{createTag as U,pushTags as K,resolveReleaseSource as z,renderTagPattern as J,defaultTagFor as Y}from"../packem_chunks/git.js";import{createShellRunner as _}from"../packem_chunks/shell-runner.js";import{DEFAULT_CHANGES_DIR as E}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{r as B,b as q}from"./apply-
|
|
1
|
+
import{s as I}from"./index--eV4qIz5.js";import{c as D,d as W,D as L}from"../packem_chunks/version-resolver.js";import{createTag as U,pushTags as K,resolveReleaseSource as z,renderTagPattern as J,defaultTagFor as Y}from"../packem_chunks/git.js";import{createShellRunner as _}from"../packem_chunks/shell-runner.js";import{DEFAULT_CHANGES_DIR as E}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{r as B,b as q}from"./apply-BrRx__KL.js";import{p as X}from"../packem_chunks/native-addon.js";import{c as Q}from"../packem_chunks/index3.js";import{a as Z}from"../packem_chunks/context.js";import{escapeMarkdown as x}from"../packem_chunks/security.js";import{VisReleaseError as F}from"./VisReleaseError-DZtgcKf8.js";const ee=/\{(name|version|previousVersion|date|repo|contributors)\}/g,se=(e,s)=>e.replaceAll(ee,(a,l)=>s[l]??""),ae=(e,s={})=>{const a=new Set;for(const n of s.internalAuthors??[]){const u=n.trim().toLowerCase().replace(/^@/,"");u.length>0&&a.add(u)}const l=new Set,r=[];for(const n of e){const u=n.meta?.author;if(u)for(const o of u.split(",")){const g=o.trim();if(!g)continue;const t=g.replace(/^@/,"");if(t.length===0)continue;const i=t.toLowerCase();l.has(i)||a.has(i)||(l.add(i),r.push(x(g)))}}return r.length===0?"":r.map(n=>`- ${n}`).join(`
|
|
2
2
|
`)},ie=e=>e.length===0?"":`## Related releases
|
|
3
3
|
|
|
4
4
|
${e.map(a=>`- [${a.name}](${a.url})`).join(`
|