metascope 0.7.2 → 0.7.4
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/dist/bin/cli.js +82 -26
- package/dist/bin/jiti-DrL1yh8z.js +15 -0
- package/dist/bin/renovate-DsJhPuo4.js +1 -0
- package/dist/bin/shared-DFIEzkUg.js +5 -0
- package/dist/lib/package.js +1 -1
- package/dist/lib/sources/arduino-library-properties.d.ts +10 -10
- package/dist/lib/sources/cinder-cinderblock-xml.d.ts +11 -11
- package/dist/lib/sources/codemeta-json.d.ts +79 -79
- package/dist/lib/sources/go-go-mod.d.ts +4 -4
- package/dist/lib/sources/go-goreleaser-yaml.d.ts +8 -8
- package/dist/lib/sources/java-pom-xml.d.ts +12 -12
- package/dist/lib/sources/metadata-file.d.ts +4 -4
- package/dist/lib/sources/openframeworks-addon-config-mk.d.ts +7 -7
- package/dist/lib/sources/openframeworks-install-xml.d.ts +10 -10
- package/dist/lib/sources/processing-library-properties.d.ts +8 -8
- package/dist/lib/sources/processing-sketch-properties.d.ts +16 -16
- package/dist/lib/sources/publiccode-yaml.d.ts +23 -23
- package/dist/lib/sources/python-pkg-info.d.ts +18 -18
- package/dist/lib/sources/python-setup-cfg.d.ts +14 -14
- package/dist/lib/sources/python-setup-py.d.ts +14 -14
- package/dist/lib/sources/ruby-gemspec.d.ts +22 -22
- package/dist/lib/sources/rust-cargo-toml.d.ts +14 -14
- package/dist/lib/sources/xcode-info-plist.d.ts +12 -12
- package/dist/lib/sources/xcode-project-pbxproj.d.ts +8 -8
- package/dist/lib/templates/frontmatter.d.ts +1 -1
- package/dist/lib/templates/index.d.ts +1 -1
- package/package.json +14 -14
- package/readme.md +2 -2
- package/dist/bin/jiti-BTBDwj9g.js +0 -9
- package/dist/bin/renovate-DxDKd5Ft.js +0 -1
- package/dist/bin/shared-CTlQdTfh.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{accessSync as e,globSync as t,lstatSync as n,readFileSync as r,readdirSync as i,statSync as a,truncateSync as o,writeFileSync as s}from"node:fs";import{basename as c,dirname as l,join as u,relative as d,resolve as f}from"node:path";import{homedir as p}from"node:os";import{cwd as m,env as h,platform as g,stderr as _}from"node:process";import{styleText as v}from"node:util";import{access as y,mkdir as b,readFile as x,writeFile as S}from"node:fs/promises";import{pathToFileURL as C}from"node:url";import{createHash as w}from"node:crypto";function T(e){let t={},n=t,r=e.split(/\r?\n/);for(let e=0;e<r.length;e++){let i=r[e],a=ie(i).trim();if(!a)continue;let o=/^\[\[([^\]]+)\]\]$/.exec(a);if(o){let e=t,r=D(o[1]);for(let t=0;t<r.length-1;t++){let n=e[r[t]];Array.isArray(n)?e=n[n.length-1]:((!n||typeof n!=`object`)&&(e[r[t]]={}),e=e[r[t]])}let i=r[r.length-1];Array.isArray(e[i])||(e[i]=[]);let a={};e[i].push(a),n=a;continue}let s=/^\[([^[\]]+)\]$/.exec(a);if(s){n=t;for(let e of D(s[1]))(!(e in n)||typeof n[e]!=`object`||Array.isArray(n[e]))&&(n[e]={}),n=n[e];continue}let c=se(a);if(c<0)continue;let l=a.slice(0,c).trim(),u=a.slice(c+1).trim(),d=D(l),f=n;for(let e=0;e<d.length-1;e++)(!(d[e]in f)||typeof f[d[e]]!=`object`||Array.isArray(f[d[e]]))&&(f[d[e]]={}),f=f[d[e]];let p=d[d.length-1];if(u.startsWith(`[`)&&ae(u,`]`)<0){let t=[];E(u.slice(1),t);for(let n=e+1;n<r.length;n++){let i=ie(r[n]).trim();if(!i)continue;let a=ae(i,`]`);if(a>=0){E(i.slice(0,a),t),e=n;break}E(i,t)}f[p]=t}else f[p]=ee(u)}return t}function E(e,t){let n=e.trim();if(n)for(let e of re(n)){let n=e.trim();n&&t.push(ee(n))}}function ee(e){if(e.startsWith(`[`)){let t=[],n=oe(e,`]`);return E(e.slice(1,n<0?e.length:n),t),t}return e.startsWith(`{`)?ne(e):e.startsWith(`"""`)?ce(e.slice(3,e.lastIndexOf(`"""`))):e.startsWith(`'''`)?e.slice(3,e.lastIndexOf(`'''`)):e.startsWith(`"`)?ce(e.slice(1,e.lastIndexOf(`"`))):e.startsWith(`'`)?e.slice(1,e.lastIndexOf(`'`)):te(e)}function te(e){return e===`true`?!0:e===`false`?!1:/^[+-]?\d+(\.\d+)?$/.test(e)?Number(e):e}function ne(e){let t={},n=e.slice(1,e.lastIndexOf(`}`)).trim();if(!n)return t;for(let e of re(n)){let n=e.indexOf(`=`);if(n<0)continue;let r=e.slice(0,n).trim().replace(/^["']|["']$/g,``);t[r]=ee(e.slice(n+1).trim())}return t}function re(e){let t=[],n=0,r=null,i=0;for(let a=0;a<e.length;a++){let o=e[a];if(r){if(o===`\\`&&r===`"`){a++;continue}o===r&&(r=null)}else o===`"`||o===`'`?r=o:o===`[`||o===`{`?n++:o===`]`||o===`}`?n--:o===`,`&&n===0&&(t.push(e.slice(i,a)),i=a+1)}return i<e.length&&t.push(e.slice(i)),t}function D(e){let t=[],n=``,r=null;for(let i of e)if(r){if(i===r){r=null;continue}n+=i}else i===`"`||i===`'`?r=i:i===`.`?(t.push(n.trim()),n=``):n+=i;return n.trim()&&t.push(n.trim()),t}function ie(e){let t=ae(e,`#`);return t<0?e:e.slice(0,t)}function ae(e,t){let n=null;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(i===`\\`&&n===`"`){r++;continue}i===n&&(n=null)}else if(i===`"`||i===`'`)n=i;else if(i===t)return r}return-1}function oe(e,t){let n=-1,r=null;for(let i=0;i<e.length;i++){let a=e[i];if(r){if(a===`\\`&&r===`"`){i++;continue}a===r&&(r=null)}else a===`"`||a===`'`?r=a:a===t&&(n=i)}return n}function se(e){let t=null;for(let n=0;n<e.length;n++){let r=e[n];if(t){if(r===`\\`&&t===`"`){n++;continue}r===t&&(t=null)}else if(r===`"`||r===`'`)t=r;else if(r===`=`)return n}return-1}function ce(e){return e.replace(/\\(["\\bfnrt]|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/g,(e,t)=>{switch(t[0]){case`"`:return`"`;case`\\`:return`\\`;case`b`:return`\b`;case`f`:return`\f`;case`n`:return`
|
|
2
|
+
`;case`r`:return`\r`;case`t`:return` `;case`u`:case`U`:return String.fromCodePoint(Number.parseInt(t.slice(1),16));default:return t}})}const le=/^v?(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*))?(?:\+[a-zA-Z0-9._-]+)?$/,O=new Map;function k(e){if(typeof e!=`string`)return null;let t=O.get(e);if(t!==void 0)return t;let n=le.exec(e.trim());if(!n)return O.set(e,null),null;let r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=n[4]?n[4].split(`.`).map(e=>/^\d+$/.test(e)?Number(e):e):[],s={major:r,minor:i,patch:a,prerelease:o,version:`${r}.${i}.${a}${o.length?`-${o.join(`.`)}`:``}`};return O.set(e,s),s}function A(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:n?-1:r?1:e<t?-1:+(e>t)}function j(e,t){return e.major-t.major||e.minor-t.minor||e.patch-t.patch}function M(e,t){let n=j(e,t);if(n!==0)return n;if(!e.prerelease.length&&!t.prerelease.length)return 0;if(e.prerelease.length&&!t.prerelease.length)return-1;if(!e.prerelease.length&&t.prerelease.length)return 1;let r=Math.max(e.prerelease.length,t.prerelease.length);for(let n=0;n<r;n++){if(e.prerelease[n]===void 0)return-1;if(t.prerelease[n]===void 0)return 1;let r=A(e.prerelease[n],t.prerelease[n]);if(r!==0)return r}return 0}function N(e){return k(e)?.version??null}function P(e){return k(e)}const F=new Map,I=/(?:^|[^.\d])(\d+)(?:\.(\d+))?(?:\.(\d+))?/;function ue(e){if(typeof e!=`string`)return null;let t=F.get(e);if(t!==void 0)return t;let n=I.exec(e);if(!n)return F.set(e,null),null;let r={version:`${n[1]||`0`}.${n[2]||`0`}.${n[3]||`0`}`};return F.set(e,r),r}function L(e,t){let n=k(e),r=k(t);if(!n||!r||n.version===r.version)return null;let i=M(n,r),a=i>0?n:r,o=i>0?r:n,s=a.prerelease.length>0;if(o.prerelease.length>0&&!s){if(!o.patch&&!o.minor)return`major`;if(j(o,a)===0)return o.minor&&!o.patch?`minor`:`patch`}let c=s?`pre`:``;return n.major===r.major?n.minor===r.minor?n.patch===r.patch?`prerelease`:`${c}patch`:`${c}minor`:`${c}major`}function de(e,t){let n=k(e),r=k(t);return n&&r?M(n,r):null}function R(e,t){return(de(e,t)??-1)>0}function fe(e,t){return(de(e,t)??-1)>=0}function z(e,t){return(de(e,t)??1)<0}function pe(e,t){return(de(e,t)??1)!==0}function me(e){let t=/^(>=|<=|>|<|=)?\s*v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)?)$/.exec(e.trim());if(!t)return null;let n=t[2],r=k(`${n}.${t[3]??`0`}.${t[4]??`0`}${t[5]||``}`);return r?{op:t[1]||`=`,semver:r}:null}function he(e,t){let n=M(e,t.semver);switch(t.op){case`>=`:return n>=0;case`<=`:return n<=0;case`>`:return n>0;case`<`:return n<0;case`=`:return n===0;default:return n===0}}function B(e,t,n){return`${e}.${t}.${n}-0`}function ge(e){return e.replace(/~\s*v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)/g,(e,t,n,r,i)=>{let a=Number(t);if(n===void 0)return`>=${a}.0.0 <${B(a+1,0,0)}`;let o=Number(n);return`>=${a}.${o}.${r===void 0?0:Number(r)}${i||``} <${B(a,o+1,0)}`})}function _e(e){return e.replace(/\^\s*v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)/g,(e,t,n,r,i)=>{let a=Number(t),o=i||``;if(n===void 0)return`>=${a}.0.0 <${B(a+1,0,0)}`;let s=Number(n);if(r===void 0)return a===0?`>=${a}.${s}.0 <${B(a,s+1,0)}`:`>=${a}.${s}.0 <${B(a+1,0,0)}`;let c=Number(r);return a===0?s===0?`>=${a}.${s}.${c}${o} <${B(a,s,c+1)}`:`>=${a}.${s}.${c}${o} <${B(a,s+1,0)}`:`>=${a}.${s}.${c}${o} <${B(a+1,0,0)}`})}function V(e){return e.replace(/v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)\s+-\s+v?(\d+)(?:\.(\d+))?(?:\.(\d+))?((?:-[a-zA-Z0-9._-]+)?)/g,(e,t,n,r,i,a,o,s,c)=>{let l=Number(t),u=n===void 0?0:Number(n),d=r===void 0?0:Number(r),f=i||``,p=Number(a),m;return m=s===void 0?o===void 0?`<${B(p+1,0,0)}`:`<${B(p,Number(o)+1,0)}`:`<=${p}.${Number(o)}.${Number(s)}${c||``}`,`>=${l}.${u}.${d}${f} ${m}`})}function ve(e){return/^\s*[*xX]\s*$/.test(e)?`>=0.0.0`:(e=e.replace(/v?(\d+)\.[xX*](?:\.[xX*])?/g,(e,t)=>{let n=Number(t);return`>=${n}.0.0 <${B(n+1,0,0)}`}),e=e.replace(/v?(\d+)\.(\d+)\.[xX*]/g,(e,t,n)=>{let r=Number(t),i=Number(n);return`>=${r}.${i}.0 <${B(r,i+1,0)}`}),e=e.replace(/(^|[\s|])(\d+)\.(\d+)(?=\s|$)/g,(t,n,r,i,a)=>{let o=e.substring(0,a).trimEnd();if(/[<>=]$/.test(o))return t;let s=Number(r),c=Number(i);return`${n}>=${s}.${c}.0 <${B(s,c+1,0)}`}),e=e.replace(/(^|[\s|])(\d+)(?=\s|$)/g,(t,n,r,i)=>{let a=e.substring(0,i).trimEnd();if(/[<>=]$/.test(a))return t;let o=Number(r);return`${n}>=${o}.0.0 <${B(o+1,0,0)}`}),e)}const H=new Map;function ye(e){let t=H.get(e);if(t!==void 0)return t;let n=e.split(`||`).map(e=>e.trim()),r=[];for(let t of n){if(!t){r.push([]);continue}t=V(t),t=_e(t),t=ge(t),t=ve(t),t=t.replace(/(^|[\s])v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*)?)\b/g,(e,t)=>/[<>=]/.test(t)?e:`${t}=${e.trim()}`),t=t.replace(/(>=|<=|>|<|=)\s+/g,`$1`);let n=t.split(/\s+/).filter(Boolean),i=[];for(let t of n){let n=me(t);if(!n)return H.set(e,null),null;i.push(n)}if(i.length===0)return H.set(e,null),null;r.push(i)}let i=r.length?r:null;return H.set(e,i),i}function be(e,t){for(let n of t)if(!he(e,n))return!1;if(e.prerelease.length>0){for(let n of t)if(n.semver.prerelease.length>0&&n.semver.major===e.major&&n.semver.minor===e.minor&&n.semver.patch===e.patch)return!0;return!1}return!0}function U(e,t){let n=k(e);if(!n)return!1;let r=ye(t);if(!r)return!1;for(let e of r)if(e.length===0||be(n,e))return!0;return!1}function xe(e){return typeof e==`string`&&ye(e)?e:null}const Se=[[1e3,6e4,`sec`],[6e4,36e5,`min`],[36e5,864e5,`hour`],[864e5,6048e5,`day`],[6048e5,2628e6,`week`],[2628e6,31536e6,`month`],[31536e6,1/0,`year`]],Ce={"1 day ago":`yesterday`,"1 week ago":`last week`,"1 month ago":`last month`,"1 year ago":`last year`,"in 1 day":`tomorrow`,"in 1 week":`next week`,"in 1 month":`next month`,"in 1 year":`next year`},we={sec:`second`,min:`minute`};function Te(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function Ee(e,{now:t,noAffix:n=!1,times:r=Se,nowThreshold:i=2e3,nowString:a=`now`,unknownString:o=``,aliases:s=!1,aliasesMap:c=Ce,longUnits:l=!1}={}){let u=Te(e),d=t===void 0?Date.now():Te(t);if(u!==u)return o||String(e);let f=d-u,p=f<0;if(p&&(f=-f),f<i)return a;let m=0,h=``;for(let e=0,t=r.length;e<t;e++){let t=r[e];if(!(f>=t[1])){m=f/t[0]|0,h=(l&&we[t[2]]||t[2])+(m>1?`s`:``);break}}let g=`${m} ${h}`,_;return _=n?g:p?`in ${g}`:`${g} ago`,s?c[_]??_:_}function De(e){let t=[];for(let n of e){let[e,r]=n.replaceAll(/\s+/g,``).split(/[<>=~]+/),i=e?.replace(/\[.*?\]$/,``);i&&/^[0-9.a-z]+$/.test(r)&&t.push({name:i,version:r})}return t}const Oe=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`,`resolutions`,`packageManager`],ke=[`node`,`deno`,`bun`],Ae=[`project.dependencies`,`project.optional-dependencies`,`dependency-groups.dev`,`dependency-groups.lint`,`dependency-groups.test`],je=[`deps`,`indirect`,`replace`,`tool`],Me=[`dependencies`,`dev-dependencies`,`build-dependencies`,`workspace.dependencies`];function Ne(e,t){if(!(t instanceof Set))return!1;for(let n of t)if(n.test(e))return!0;return!1}function Pe(e,t){return t.split(`.`).reduce((e,t)=>e?.[t]??null,e)}function Fe(){let e=new Date,t=String(e.getMonth()+1).padStart(2,`0`),n=String(e.getDate()).padStart(2,`0`),r=String(e.getHours()).padStart(2,`0`),i=String(e.getMinutes()).padStart(2,`0`),a=String(e.getSeconds()).padStart(2,`0`),o=String(e.getMilliseconds()).padStart(3,`0`);return`${e.getFullYear()}-${t}-${n} ${r}:${i}:${a}.${o}`}const Ie={y:365,m:30,w:7,d:1,h:1/24,s:1/86400};function Le(e){let t=/^(\d+(?:\.\d+)?)\s*([a-z])$/i.exec(e);if(t){let[,e,n]=t,r=Ie[n.toLowerCase()];if(r)return Number(e)*r}let n=Number(e);if(!Number.isFinite(n))throw Error(`Invalid cooldown value: ${e}`);return n}async function W(e,t,{concurrency:n=1/0}={}){let r=Array.from(e);if(!Number.isFinite(n))return Promise.all(r.map(t));let i=Array(r.length),a=0;return await Promise.all(Array.from({length:Math.min(n,r.length)},async()=>{for(;a<r.length;){let e=a++;i[e]=await t(r[e])}})),i}const G=e=>e.replace(/[|\\{}()[\]^$+*?.-]/g,`\\$&`);async function Re(e,t){let n=e;for(;;){let e=await t(n);if(e)return e;let r=l(n);if(r===n)return null;n=r}}function ze(e){let t=new Map;return n=>{let r=t.get(n);return r||(r=e(n),t.set(n,r)),r}}const Be=u(g===`win32`?h.LOCALAPPDATA||u(p(),`AppData`,`Local`):h.XDG_CACHE_HOME||u(p(),`.cache`),`updates`);let Ve=null;function He(e){return w(`sha256`).update(e).digest(`hex`).substring(0,16)}async function Ue(e){try{let t=await x(u(Be,`${He(e)}.cache`),`utf8`),n=t.indexOf(`
|
|
3
|
+
`);if(n===-1)return null;let r=t.substring(0,n),i=t.substring(n+1);return r&&i?{etag:r,body:i}:null}catch{return null}}async function We(e,t,n){try{await(Ve??=b(Be,{recursive:!0})),await S(u(Be,`${He(e)}.cache`),`${t}\n${n}`)}catch{}}var Ge=`17.16.10`;function K(e,t,n){if(!t||!n||!e)return!0;let r=Date.parse(e);return Number.isNaN(r)?!0:(n-r)/(24*3600*1e3)>=t}const Ke=Ge,q=e=>e.replace(/^v/,``),qe=e=>e.endsWith(`/`)?e.slice(0,-1):e;function Je(e,t){return{headers:{"user-agent":`updates/${Ke}`,"accept-encoding":`gzip, deflate, br`,...t&&{Authorization:`${e} ${t}`}}}}async function Ye(e,t){try{return await fetch(e,t)}catch(t){throw Error(`Failed to fetch ${e}${t?.message?`: ${t.message}`:``}`)}}async function Xe(e){return typeof e.text==`function`?e.text():JSON.stringify(await e.json())}async function Ze(e,t,n={}){let r=t.noCache?null:await Ue(e),i=n.headers,a=r?{...i,"if-none-match":r.etag}:i,o=await t.doFetch(e,{...n,headers:a,signal:AbortSignal.timeout(t.fetchTimeout)});if(!o)return{res:void 0};if(o.status===304&&r)return{body:r.body,res:o};if(!o.ok)return{res:o};let s=await Xe(o),c=o.headers?.get?.(`etag`);return c&&!t.noCache&&await We(e,c,s),{body:s,res:o}}async function Qe(e,t,n={}){if(!t.noCache){let t=await Ue(e);if(t)return{body:t.body}}let r=await t.doFetch(e,{...n,signal:AbortSignal.timeout(t.fetchTimeout)});if(!r)return{res:void 0};if(!r.ok)return{res:r};let i=await Xe(r);return t.noCache||await We(e,`immutable`,i),{body:i,res:r}}function $e(e){return(P(e)?.prerelease.length??0)>0}function et(e){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e)}function tt(e,t,{useRel:n,allowDowngrade:r,name:i,matchesAny:a}){let o=J(e),s=J(t);if(!o||!s)return!0;let c=et(e)||$e(e),l=$e(t);return c&&!l?R(s,o)||n:!l&&z(s,o)?r===!0||a(i,r):!0}function J(e){return ue(e)?.version??``}function nt(e,t,{range:n,semvers:r,usePre:i,useRel:a,useGreatest:o,pinnedRange:s,cooldownDays:c,now:l,getVersionDate:u}){let d=J(n);if(!d)return d;i=et(n)||i,i&&(r.add(`prerelease`),r.has(`patch`)&&r.add(`prepatch`),r.has(`minor`)&&r.add(`preminor`),r.has(`major`)&&r.add(`premajor`));let f=u??(t=>e?.time?.[t]),p=0,m=d;for(let n of t){let t=P(n);if(!t?.version||t.prerelease.length&&(!i||a))continue;let u=t.version;if(s&&!U(u,s)||!K(f(n),c,l))continue;let d=L(m,u);if(!(!d||!r.has(d)))if(o||!(`time`in e))(fe(`${t.major}.${t.minor}.${t.patch}`,m)||s&&!U(m,s))&&(m=u);else{let t=Date.parse(e.time[n]);t>=0&&t>p&&(m=u,p=t)}}return m||null}function rt(e,{mode:t,range:n,useGreatest:r,useRel:i,usePre:a,semvers:o,pinnedRange:s,cooldownDays:c,now:l},{allowDowngrade:u,matchesAny:d,isGoPseudoVersion:f}){if(n===`*`||n.includes(`||`))return null;let p=[],m;if(t===`pypi`)p=Object.keys(e.releases).filter(e=>N(e)),m=t=>e.releases?.[t]?.[0]?.upload_time_iso_8601;else if(t===`npm`||t===`cargo`)p=Object.keys(e.versions).filter(e=>N(e)),m=t=>e.time?.[t];else if(t===`go`){let t=J(n);if(!t)return null;let r=a||et(n),p=e=>$e(e)&&(!r||i),m={useRel:i,allowDowngrade:u,name:e.name,matchesAny:d},h=e.old||n,g=J(e.new);if(g&&!f(e.new)&&!p(e.new)){let n=L(t,g);if(n&&o.has(n)&&tt(h,e.new,m)&&K(e.Time,c,l)&&(!s||U(g,s)))return e.new}let _=J(e.sameMajorNew);if(_&&!f(e.sameMajorNew)&&!p(e.sameMajorNew)){let n=L(t,_);if(n&&o.has(n)&&tt(h,e.sameMajorNew,m)&&K(e.sameMajorTime,c,l)&&(!s||U(_,s)))return e.Time=e.sameMajorTime,delete e.newPath,e.sameMajorNew}if(c&&l&&e.olderEligible&&!p(e.olderEligible.version)){let n=J(e.olderEligible.version);if(n){let r=L(t,n);if(r&&o.has(r)&&tt(h,e.olderEligible.version,m)&&(!s||U(n,s)))return e.Time=e.olderEligible.time,delete e.newPath,e.olderEligible.version}}return null}let h=nt(e,p,{range:n,semvers:o,usePre:a,useRel:i,useGreatest:r,pinnedRange:s,cooldownDays:c,now:l,getVersionDate:m});if(!h)return null;if(r)return h;{let r=``,f=``;t===`pypi`?(f=e.info.version,r=J(e.info.version)):r=e[`dist-tags`].latest;let p=J(n),m=et(n),g=$e(h),_=$e(r),v={useRel:i,allowDowngrade:u,name:e.name,matchesAny:d};if(!i&&a||m&&g)return h;if(m&&!g)return tt(n,h,v)?h:null;let y=L(p,r);return y&&y!==`prerelease`&&!o.has(y.replace(/^pre/,``))||i&&$e(r)?h:z(r,p)&&!_?tt(n,r,v)?r:null:!m&&_&&!a||s&&!U(r,s)||c&&l&&!K(t===`pypi`?e.releases?.[f||r]?.[0]?.upload_time_iso_8601:e.time?.[r],c,l)?h:f||r}}const it=new Map;if(h.UPDATES_FORGE_TOKENS)for(let e of h.UPDATES_FORGE_TOKENS.split(`,`)){let t=e.indexOf(`:`);t>0&&it.set(e.substring(0,t),e.substring(t+1))}const at=Array.from(new Set([`UPDATES_GITHUB_API_TOKEN`,`GITHUB_API_TOKEN`,`GH_TOKEN`,`GITHUB_TOKEN`,`HOMEBREW_GITHUB_API_TOKEN`].map(e=>h[e]).filter(Boolean)));let ot;function st(){return at.length?Promise.resolve(at):ot??=(async()=>{try{let[{execFile:e},{promisify:t}]=await Promise.all([import(`node:child_process`),import(`node:util`)]),{stdout:n}=await t(e)(`gh`,[`auth`,`token`],{encoding:`utf8`,timeout:5e3}),r=n.trim();return r?[r]:at}catch{return at}})()}const ct=new Map;async function lt(e){try{let t=it.get(new URL(e).hostname);if(t)return[t]}catch{}return st()}async function ut(e,t,n){let r;try{r=new URL(e).hostname}catch{r=``}let i=await(r?lt(e):st()),a=AbortSignal.timeout(t.fetchTimeout),o=e=>{let t=Je(`Bearer`,e);return n&&(t.headers={...t.headers,...n}),t.signal=a,t};if(!i.length)return t.doFetch(e,o());let s=r?ct.get(r):void 0;if(s)return t.doFetch(e,o(s));for(let n of i){let i=await t.doFetch(e,o(n));if(i.status!==401&&i.status!==403)return r&&ct.set(r,n),i}return t.doFetch(e,o())}function dt(e,t,n){let r=q(t);if(!N(r))return null;if(n){let n=t,i=q(t);for(let t of e){let e=q(t);N(e)&&(!n||R(e,i))&&(n=t,i=e)}if(pe(r,i))return n}else{let t=e.at(-1);if(!t)return null;let n=q(t);if(!N(n))return null;if(pe(r,n))return t}return null}function ft(e){return e=e.replace(`git@`,``).replace(/.+?\/\//,`https://`).replace(/\.git$/,``),/^[a-z]+:[a-z0-9-]\/[a-z0-9-]$/.test(e)?e.replace(/^(.+?):/,(e,t)=>`https://${t}.com/`):/^[a-z0-9-]\/[a-z0-9-]$/.test(e)?`https://github.com/${e}`:e}const pt=/^[0-9a-f]{7,}$/i;function mt(e){return e.map(e=>({name:e.name,commitSha:e.commit?.sha||``}))}async function ht(e,t){let n=t.noCache?null:await Ue(e),r=await ut(e,t,n?{"if-none-match":n.etag}:void 0);if(r?.status===304&&n)try{let e=JSON.parse(n.body);return{tags:e.tags||[],link:e.link||``}}catch{return null}if(!r?.ok)return null;let i=mt(await r.json()),a=r.headers.get(`link`)||``,o=r.headers.get(`etag`);return o&&!t.noCache&&await We(e,o,JSON.stringify({link:a,tags:i})),{tags:i,link:a}}async function gt(e,t,n,r){let i=r=>`${e}/repos/${t}/${n}/tags?per_page=100&page=${r}`;try{let e=await ht(i(1),r);if(!e)return[];let t=Array.from(e.tags),n=/<([^>]+)>;\s*rel="last"/.exec(e.link);if(!n)return t;let a=Number(new URL(n[1]).searchParams.get(`page`));if(a<2)return t;let o=await Promise.all(Array.from({length:a-1},(e,t)=>ht(i(t+2),r)));for(let e of o)e&&t.push(...e.tags);return t}catch{return[]}}function _t(e,t,n,r){throw e?.status&&e?.statusText?Error(`Received ${e.status} ${e.statusText} from ${t}`):Error(`Unable to fetch ${n} from ${r}`)}function vt(e,t,n=``){let r=t.startsWith(`v`),i=q(e),a=q(t).split(`.`).length,o=i.split(`.`),s;return s=a===1?o[0]:a===2?`${o[0]}.${o[1]||`0`}`:i,`${r?`v`:``}${s}${n}`}function yt(e){return e.startsWith(`https://bitbucket.org`)?`src/HEAD`:`tree/HEAD`}function bt({repository:e,homepage:t,info:n},r,i){if(n){let t=n.project_urls;for(let n of[`repository`,`Repository`,`repo`,`Repo`,`source`,`Source`,`source code`,`Source code`,`Source Code`,`homepage`,`Homepage`])if(t[n]){e=t[n];break}e??=`https://pypi.org/project/${i}/`}let a=``;return r===`https://npm.pkg.github.com`?`https://github.com/${i.replace(/^@/,``)}`:(e&&(a=ft(typeof e==`string`?e:e.url),a&&typeof e!=`string`&&e.directory&&(a=`${a}/${yt(a)}/${e.directory}`)),a||t||``)}function xt(e,t){return RegExp(`^${G(e).replaceAll(`\\*`,`.*`)}$`,t?`i`:``)}function St(e,t,n){return t&&typeof e==`string`?/^\/.+\/$/.test(e)?new RegExp(e.slice(1,-1)):xt(e,n):e instanceof RegExp?e:xt(e,n)}function Ct(e){return new Set(e.map(e=>St(e,!1,!0)))}function wt(e){if(typeof e==`boolean`)return e;if(!Array.isArray(e)||!e.length)return!1;let t=new Set;for(let n of e)t.add(St(n,!1,!1));return t}async function Tt(e){let t=await Promise.all([`js`,`ts`,`mjs`,`mts`].map(async t=>{let n=`updates.config.${t}`,r=u(e,n);try{await y(r)}catch{return null}try{return{configDir:e,filename:n,default:(await import(C(r).href)).default??{}}}catch(e){return Error(`Unable to parse config file ${n}: ${e?.message??e}`)}}));for(let e of t)if(e&&!(e instanceof Error))return e;for(let e of t)if(e instanceof Error)throw e;return null}const Et=ze(e=>Re(e,Tt));async function Dt(e){let t=await Et(e),n=t?.default??{},{loadRenovateConfig:r}=await import(`./renovate-DsJhPuo4.js`);return{...await r(t?.configDir??e,n.inherit?.renovate),...n}}function Ot(e){if(/^\s*\{/.test(e))return JSON.parse(e);let t={};for(let n of e.split(/\r?\n/)){let e=n.trim();if(!e||e.startsWith(`#`)||e.startsWith(`;`))continue;let r=e.indexOf(`=`);if(r===-1)continue;let i=e.slice(r+1).trim();i.length>=2&&(i.startsWith(`"`)&&i.endsWith(`"`)||i.startsWith(`'`)&&i.endsWith(`'`))&&(i=i.slice(1,-1)),t[e.slice(0,r).trim()]=i}return t}function kt(e){try{return Ot(r(e,`utf-8`))}catch{return}}function At(e){let t=m();for(;;){let n=u(t,e);try{return a(n),n}catch{}let r=l(t);if(r===t)break;t=r}}function jt(e){let t={},n=e.toLowerCase();for(let[r,i]of Object.entries(h))if(r.toLowerCase().startsWith(n)){let n=r.substring(e.length).split(`__`).filter(Boolean);if(n.length===0)continue;let a=t;for(let e=0;e<n.length;e++){let t=n[e];if(e===n.length-1)a[t]=i;else if(a[t]===void 0&&(a[t]={}),typeof a[t]==`object`)a=a[t];else break}}return t}function Mt(e,t={}){let n=g===`win32`,r=n?h.USERPROFILE:h.HOME,i=[{...t}],a=[];function o(e){if(!e||a.includes(e))return;let t=kt(e);t&&(i.push(t),a.push(e))}n||(o(u(`/etc`,e,`config`)),o(u(`/etc`,`${e}rc`))),r&&(o(u(r,`.config`,e,`config`)),o(u(r,`.config`,e)),o(u(r,`.${e}`,`config`)),o(u(r,`.${e}rc`))),o(At(`.${e}rc`));let s=jt(`${e}_`);return s.config&&o(s.config),Object.assign({},...i,s,a.length?{configs:a,config:a[a.length-1]}:void 0)}const Nt=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Pt=/^([^/]+)\/([^/]+)\/(?:.*\/)?([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ft=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,It=/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,Lt=`https://registry.npmjs.org`;let Y=null;const Rt=new Map;function zt(){return Y??=Mt(`npm`,{registry:Lt})}function Bt(e){return e.replace(/^\$\{?([^}]*)\}?$/,(e,t)=>h[t]||``)}function Vt(e,t){let n=n=>t[`${e}:${n}`]||t[`${e}/:${n}`],r=n(`_authToken`);if(r)return{token:Bt(r),type:`Bearer`};let i=n(`username`),a=n(`_password`);if(i&&a){let e=Buffer.from(Bt(a),`base64`).toString(`utf8`);return{token:Buffer.from(`${i}:${e}`).toString(`base64`),type:`Basic`,username:i,password:e}}let o=n(`_auth`);if(o)return{token:Bt(o),type:`Basic`}}function Ht(e,t){let n=new URL(e.startsWith(`//`)?`http:${e}`:e),r;for(;r!==`/`&&n.pathname!==r;){r=n.pathname||`/`;let e=Vt(`//${n.host}${r.replace(/\/$/,``)}`,t);if(e)return e;let i=r.endsWith(`/`)?r:`${r}/`;n.pathname=new URL(`..`,new URL(i,`http://x`)).pathname}let i=t._auth;if(i)return{token:Bt(i),type:`Basic`}}function Ut(e,t){let n=t[`${e}:registry`]||t.registry;return n.endsWith(`/`)?n:`${n}/`}function Wt(e,t){Y||=zt();let n=e.startsWith(`@`)?(/@[a-z0-9][\w.-]+/.exec(e)||[``])[0]:``,r=`${n}:${t}`,i=Rt.get(r);if(i)return i;let a=()=>({auth:Ht(t,Y),registry:t}),o;if(!e.startsWith(`@`))o=a();else{let e=qe(Ut(n,Y));if(e!==t)try{let t=Ht(e,Y);o=t?.token?{auth:t,registry:e}:a()}catch{o=a()}else o=a()}return Rt.set(r,o),o}function Gt(e,t,n){Y||=zt();let r=qe((typeof n.registry==`string`?n.registry:!1)||t.registry||Y.registry||Lt);return{...Wt(e,r),originalRegistry:r}}function Kt(e,t,n){let r=`${e}/${t.replace(/\//g,`%2f`)}`;return n?`${r}/${n}`:r}const qt=new Map,Jt=new Map,Yt=new Map;async function Xt(e,t,n,r,i){let{auth:a,registry:o}=Gt(e,n,r),s=Kt(o,t===`resolutions`?c(e):e),l=qt.get(s);if(!l){let t=Je(a?.type,a?.token),n={...t.headers,accept:`application/vnd.npm.install-v1+json`};t.headers=n,l=(async()=>{let r=i.noCache?null:await Ue(s);r&&(n[`if-none-match`]=r.etag);let a=await i.doFetch(s,{signal:AbortSignal.timeout(i.fetchTimeout),...t});if(a?.status===304&&r)return JSON.parse(r.body);if(a?.ok){let e=await a.text(),t=a.headers.get(`etag`);return t&&!i.noCache&&await We(s,t,e),JSON.parse(e)}_t(a,s,e,o)})().catch(e=>{throw qt.delete(s),e}),qt.set(s,l)}return[await l,t,o,e]}async function Zt(e,t,n,r,i){let{auth:a,registry:o}=Gt(e,n,r),s=Kt(o,e,t),c=Jt.get(s);if(c)return c;let l=(async()=>{try{let n=Je(a?.type,a?.token),r=await Qe(s,i,n);if(!(`body`in r))return{};let c=JSON.parse(r.body),l=``,u=c?._npmOperationalInternal?.tmp;if(u){let e=/(\d{13})/.exec(u);e&&(l=new Date(Number(e[1])).toISOString())}if(!l){let r=Kt(o,e),a=Yt.get(r);a||(a=i.doFetch(r,{...n,signal:AbortSignal.timeout(i.fetchTimeout)}).then(e=>e?.ok?e.json():null).catch(()=>(Yt.delete(r),null)),Yt.set(r,a)),l=(await a)?.time?.[t]||``}return{repository:c.repository,homepage:c.homepage,date:l}}catch{return{}}})();return Jt.set(s,l),l}function Qt(e){return e.startsWith(`npm:@jsr/`)||e.startsWith(`jsr:`)}function $t(e){return e.startsWith(`link:`)||e.startsWith(`file:`)}function en(e,t){if(e.startsWith(`npm:@jsr/`)){let t=/^npm:@jsr\/([^_]+)__([^@]+)@(.+)$/.exec(e);if(t)return{scope:t[1],name:t[2],version:t[3]}}else if(e.startsWith(`jsr:@`)){let t=/^jsr:@([^/]+)\/([^@]+)@(.+)$/.exec(e);if(t)return{scope:t[1],name:t[2],version:t[3]}}else if(e.startsWith(`jsr:`)){let n=e.substring(4);if(t?.startsWith(`@`)){let e=/^@([^/]+)\/(.+)$/.exec(t);if(e)return{scope:e[1],name:e[2],version:n}}}return{scope:null,name:null,version:``}}async function tn(e,t,n){let r=/^@([^/]+)\/(.+)$/.exec(e);if(!r)throw Error(`Invalid JSR package name: ${e}`);let[,i,a]=r,o=`${n.jsrApiUrl}/@${i}/${a}/meta.json`,s=await Ze(o,n,{headers:{"accept-encoding":`gzip, deflate, br`}});if(`body`in s){let r=JSON.parse(s.body),i={},a={};for(let[e,t]of Object.entries(r.versions))i[e]={version:e,time:t.createdAt},a[e]=t.createdAt;return[{name:e,"dist-tags":{latest:r.latest},versions:i,time:a},t,n.jsrApiUrl,e]}_t(s.res,o,e,`JSR`)}function nn(e,t){let n=new Map;for(let[e,{old:r,oldOrig:i,new:a}]of Object.entries(t)){let[t,o]=e.split(`\0`),s=i||r;t===`packageManager`?n.set(`${t}\0${o}@${s}`,`"${t}": "${o}@${a}"`):n.set(`${o}\0${s}`,`"${o}": "${a}"`)}return n.size?e.replace(/"((?:[^"\\]|\\.)*)": *"((?:[^"\\]|\\.)*)"/g,(e,t,r)=>n.get(`${t}\0${r}`)??e):e}function rn(e,t,n){let r=e.replace(It,t);if(n&&n!==e&&/^[\^~]/.test(r)){let e=n.substring(1).split(`.`),t=r.substring(1).split(`.`);e.length!==t.length&&(r=`${r[0]}${t.slice(0,e.length).join(`.`)}`)}if(n&&n!==e&&r.startsWith(`>=`)){let e=/^>=\s/.test(n)?`>= `:`>=`,t=n.replace(/^>=\s*/,``),i=r.replace(/^>=\s*/,``),a=t.split(`.`),o=i.split(`.`);a.length!==o.length&&(r=`${e}${o.slice(0,a.length).join(`.`)}`)}return r}function X(e){let t=e.match(Ft);return t?.length===1?e.replace(Ft,J(t[0])):e}async function an(e,t,n){let r=`${n.forgeApiUrl}/repos/${e}/${t}/commits`;try{let e=n.noCache?null:await Ue(r),t=await ut(r,n,e?{"if-none-match":e.etag}:void 0);if(t?.status===304&&e){let{sha:t,commit:n}=JSON.parse(e.body)[0];return{hash:t,commit:n}}if(!t?.ok)return{hash:``,commit:{}};let i=await t.text(),a=t.headers.get(`etag`);a&&!n.noCache&&await We(r,a,i);let{sha:o,commit:s}=JSON.parse(i)[0];return{hash:o,commit:s}}catch{return{hash:``,commit:{}}}}async function on(e,t,n){return(await gt(n.forgeApiUrl,e,t,n)).map(e=>e.name)}async function sn(e,t,n,r){let i=t.old.replace(Nt,``),[,a,o,s]=Pt.exec(i)||[];if(!a||!o||!s)return null;if(pt.test(s)){let{hash:n,commit:i}=await an(a,o,r);if(!n)return null;let c=i?.committer?.date??i?.author?.date,l=n.substring(0,s.length);if(s!==l)return{key:e,newRange:t.old.replace(s,l),user:a,repo:o,oldRef:s,newRef:l,newDate:c}}else{let t=dt(await on(a,o,r),s,n);if(t)return{key:e,newRange:t,user:a,repo:o,oldRef:s,newRef:t}}return null}async function cn(e,t,n){let r=`${n.pypiApiUrl}/pypi/${e}/json`,i=await Ze(r,n,{headers:{"accept-encoding":`gzip, deflate, br`}});if(`body`in i)return[JSON.parse(i.body),t,null,e];_t(i.res,r,e,n.pypiApiUrl)}function ln(e,t){let n=e;for(let[e,{old:r,oldOrig:i}]of Object.entries(t)){let a=e.split(`\0`)[1],o=i||r;n=n.replace(RegExp(`("${G(a)} *[<>=~]+ *)${G(o)}(")`,`g`),(n,r,i)=>`${r}${t[e].new}${i}`)}return n}let un;async function dn(){let[{execFile:e},{promisify:t}]=await Promise.all([import(`node:child_process`),import(`node:util`)]);return t(e)}function fn(){return un??=dn()}function pn(){let e=h.GOPROXY||`https://proxy.golang.org,direct`;for(let t of e.split(/[,|]/)){let e=t.trim();if(e&&e!==`direct`&&e!==`off`)return qe(e)}return`https://proxy.golang.org`}function mn(){return(h.GONOPROXY||h.GOPRIVATE||``).split(`,`).map(e=>e.trim()).filter(Boolean)}function hn(e,t){return t.some(t=>e===t||e.startsWith(`${t}/`))}function gn(e){return e.replace(/[A-Z]/g,e=>`!${e.toLowerCase()}`)}function _n(e){let t=/\/v(\d+)$/.exec(e);return t?Number.parseInt(t[1]):1}function vn(e,t){return t<=1?e.replace(/\/v\d+$/,``):`${e.replace(/\/v\d+$/,``)}/v${t}`}function yn(e,t){let n=t?/^(\S+)(?:\s+v\S+)?\s+=>\s+(\S+)\s+(v\S+)/.exec(e):/^replace\s+(\S+)(?:\s+v\S+)?\s+=>\s+(\S+)\s+(v\S+)/.exec(e);if(!n)return null;let[,r,i,a]=n;return i.startsWith(`./`)||i.startsWith(`/`)||i.startsWith(`../`)?null:{origModule:r,targetModule:i,targetVersion:a}}function bn(e,t,n){return t===`indirect`||e.startsWith(`golang.org/x/`)||xn(n)}function xn(e){return/\d{14}-[0-9a-f]{12}$/.test(e)}function Sn(e,t,n){return[{name:e,old:t,new:t},n,null,e]}async function Cn(e,t,n){if(!t)return null;let r=t,i=e+101,a=e+2,o=7;for(;a<=i;){let e=Math.min(a+o-1,i),t=await Promise.all(Array.from({length:e-a+1},(e,t)=>n(a+t))),s=t.indexOf(null),c=s===-1?t:t.slice(0,s);if(c.length&&(r=c.at(-1)),s!==-1)break;a=e+1,o*=2}return r}function wn(e,t,n,r,i,a){let o=r?.Version??i,s=r?.Time??a,c=r?.path??e;return[{name:e,old:n,new:q(o),Time:s,...c===e?{}:{newPath:c},sameMajorNew:q(i),sameMajorTime:a},t,null,e]}function Tn(e){let t={},n={},r={},i={},a=new Set,o=[],s=e.split(/\r?\n/),c=!1,l=!1,u=!1;for(let e of s){let i=e.trim();if(/^require\s*\(/.test(i)){c=!0;continue}if(/^replace\s*\(/.test(i)){l=!0;continue}if(/^tool\s*\(/.test(i)){u=!0;continue}if(i===`)`){c=!1,l=!1,u=!1;continue}if(u){i&&!i.startsWith(`//`)&&o.push(i);continue}let s=/^tool\s+(\S+)/.exec(i);if(s){o.push(s[1]);continue}let d=i.includes(`// indirect`);if(l||/^replace\s+/.test(i)){let e=yn(i,l);e&&(r[e.targetModule]=e.targetVersion,a.add(e.origModule));continue}let f=c?/^(\S+)\s+(v\S+)/.exec(i):/^require\s+(\S+)\s+(v\S+)/.exec(i);f&&((d?n:t)[f[1]]=f[2])}for(let e of a)delete t[e],delete n[e];if(o.length){let e=[...Object.keys(n),...Object.keys(t)];for(let r of o){let a=``;for(let t of e)(r===t||r.startsWith(`${t}/`))&&t.length>a.length&&(a=t);let o=a?n[a]?n:t[a]?t:null:null;o&&(i[a]=o[a],delete o[a])}}return{deps:t,indirect:n,replace:r,tool:i}}async function En(e,t,n,r,i){let a=_n(e),o=async(e,t)=>{try{let{stdout:n}=await(await fn())(`go`,[`list`,`-m`,`-json`,`${e}@latest`],{timeout:t,cwd:r,env:h}),i=JSON.parse(n);return{Version:i.Version,Time:i.Time||``,path:e}}catch{return null}},s=bn(e,t,n),[c,l]=await Promise.all([o(e,i.fetchTimeout),s?null:o(vn(e,a+1),i.goProbeTimeout)]);return c?wn(e,t,n,await Cn(a,l,t=>o(vn(e,t),i.goProbeTimeout)),c.Version,c.Time):Sn(e,n,t)}async function Dn(e,t,n,r,i,a){if(hn(e,a))return En(e,t,n,r,i);let o=gn(e),s=_n(e),c=async t=>{let n=vn(e,t);return i.doFetch(`${i.goProxyUrl}/${gn(n)}/@latest`,{signal:AbortSignal.timeout(i.goProbeTimeout),headers:{"accept-encoding":`gzip, deflate, br`}}).then(async e=>e.ok?{...await e.json(),path:n}:null).catch(()=>null)},l=bn(e,t,n),[u,d]=await Promise.all([i.doFetch(`${i.goProxyUrl}/${o}/@latest`,{signal:AbortSignal.timeout(i.fetchTimeout),headers:{"accept-encoding":`gzip, deflate, br`}}),l?null:c(s+1)]);if(!u.ok)return Sn(e,n,t);let f,p;try{let e=await u.json();f=e.Version,p=e.Time}catch{return Sn(e,n,t)}return wn(e,t,n,await Cn(s,d,c),f,p)}function On(e,t){let n=G(t);return e=e.replace(RegExp(`^replace\\s+${n}(\\s+v\\S+)?\\s+=>\\s+\\S+(\\s+v\\S+)?\\s*\\n`,`gm`),``),e=e.replace(RegExp(`^\\s+${n}(\\s+v\\S+)?\\s+=>\\s+\\S+(\\s+v\\S+)?\\s*\\n`,`gm`),``),e=e.replace(/^replace\s*\(\s*\)\s*\n/gm,``),e}function kn(e,t){let n=e,r={};for(let[e,{old:i,oldOrig:a}]of Object.entries(t)){let[o,s]=e.split(`\0`),c=a||i,l=t[e].new;if(o===`replace`){n=n.replace(RegExp(`(=>\\s+${G(s)}\\s+)v${G(c)}`,`g`),`$1v${l}`);continue}if(o===`indirect`){n=n.replace(RegExp(`(${G(s)}) +v${G(c)}`,`g`),`$1 v${l}`);continue}let u=_n(s),d=Number.parseInt(l.split(`.`)[0]);if(u!==d&&d>1){let e=vn(s,d);n=n.replace(RegExp(`${G(s)} +v${G(c)}`,`g`),`${e} v${l}`),o===`tool`&&(n=n.replace(RegExp(`(^\\s+|^tool\\s+)${G(s)}(/\\S+)?\\s*$`,`gm`),`$1${e}$2`)),r[s]=e}else n=n.replace(RegExp(`(${G(s)}) +v${G(c)}`,`g`),`$1 v${l}`);o!==`tool`&&(n=On(n,s))}return[n,r]}function An(e,n,i){if(!Object.keys(n).length)return;let a=t(`**/*.go`,{cwd:e});for(let t of a){let a=u(e,t),o=r(a,`utf8`),s=!1;for(let[e,t]of Object.entries(n)){let n=RegExp(`"${G(e)}(/|")`,`g`),r=o.replace(n,`"${t}$1`);r!==o&&(o=r,s=!0)}s&&i(a,o)}}function jn(e){let t=[],n={},r=e.split(/\r?\n/),i=!1,a=!1;for(let e of r){let r=e.trim();if(/^use\s*\(/.test(r)){i=!0;continue}if(/^replace\s*\(/.test(r)){a=!0;continue}if(r===`)`){i=!1,a=!1;continue}if(i){let e=/^(\S+)/.exec(r);e&&!r.startsWith(`//`)&&t.push(e[1]);continue}let o=/^use\s+(\S+)/.exec(r);if(o){t.push(o[1]);continue}if(a||/^replace\s+/.test(r)){let e=yn(r,a);e&&(n[e.targetModule]=e.targetVersion);continue}}return{use:t,replace:n}}function Mn(e){let t=`https://${Nn(e)}`,n=new URL(t),r=n.pathname.split(`/`);if(r.length>3){let[,e,i,...a]=r;return n.pathname=`/${e}/${i}/${yt(t)}/${a.join(`/`)}`,n.toString()}else return t}function Nn(e){return/\/v[0-9]$/.test(e)?l(e):e}function Pn(e){return e.replace(/(\d{7})\d{7}-[0-9a-f]{12}$/,`$1`)}const Fn=/^\s*(?:-\s*)?uses:\s*['"]?([^'"#\s]+)['"]?/gm;function In(e){if(e.startsWith(`docker://`)||e.startsWith(`./`))return null;let t=/^https?:\/\/([^/]+)\/(.+)$/.exec(e),n=t?.[1]??null,r=t?.[2]??e,i=r.indexOf(`@`);if(i===-1)return null;let a=r.substring(0,i),o=r.substring(i+1);if(!o)return null;let s=a.split(`/`);if(s.length<2)return null;let c=n?`${n}/${a}`:a;return{host:n,owner:s[0],repo:s[1],ref:o,name:c,isHash:pt.test(o)}}function Ln(e,t){return e?e===`github.com`?`https://api.github.com`:`https://${e}/api/v1`:t}async function Rn(e,t,n,r,i){let a=`${e}/repos/${t}/${n}/git/commits/${r}`;if(!i.noCache){let e=await Ue(a);if(e)return e.body}try{let e=await ut(a,i);if(!e?.ok)return``;let t=await e.json(),n=t?.committer?.date||t?.author?.date||``;return n&&!i.noCache&&await We(a,`immutable`,n),n}catch{return``}}function zn(e,t){return vt(P(q(e))?.version??q(e),t)}function Bn(e,t){let n=e;for(let{name:e,oldRef:r,newRef:i}of t){let t=RegExp(`(uses:\\s*['"]?)${G(e)}@${G(r)}`,`g`);n=n.replace(t,`$1${e}@${i}`)}return n}function Vn(e){let t=e.replace(/\\/g,`/`);return/\.github\/workflows\/[^/]+\.(ya?ml)$/.test(t)}function Hn(e){try{return i(e).filter(e=>/\.(ya?ml)$/.test(e)).map(t=>f(u(e,t)))}catch{return[]}}const Un=/^(v?\d+(?:\.\d+){0,2})(-.+)?$/,Wn=/^\s*FROM\s+(?:--platform=\S+\s+)?(\S+)/gm,Gn=/^\s*image:\s*['"]?([^\s'"#]+)['"]?/gm,Kn=/^\s*container:\s*['"]?([^\s'"#{}]+:[^\s'"#{}:]+)['"]?\s*$/gm,qn=/^\s*(?:-\s*)?uses:\s*['"]?docker:\/\/([^'"#\s]+)['"]?/gm;function Jn(e){let t=e.split(`/`);return t.length===1?{registry:null,namespace:`library`,repo:t[0]}:t.length===2&&!t[0].includes(`.`)&&!t[0].includes(`:`)?{registry:null,namespace:t[0],repo:t[1]}:{registry:t[0],namespace:t.slice(1,-1).join(`/`)||t[1],repo:t[t.length-1]}}function Yn(e){if(e=e.replace(/^docker:\/\//,``),e.includes(`@`))return null;let t=e.lastIndexOf(`:`),n,r;if(t===-1||e.lastIndexOf(`/`)>t||(n=e.substring(0,t),r=e.substring(t+1),!r||!Un.test(r)))return null;let{registry:i,namespace:a,repo:o}=Jn(n);return{registry:i,namespace:a,repo:o,tag:r,fullImage:n}}function Xn(e){let t=Un.exec(e);return t?{version:t[1],suffix:t[2]||``}:null}function Zn(e,t){let n=Xn(t);return n?vt(e,n.version,n.suffix):t}function Qn(e,t){let n=[];for(let r of e.matchAll(t)){let e=Yn(r[1]);e&&n.push({ref:e,match:r[1]})}return n}async function $n(e,t,n){let r={},i=`${n.dockerApiUrl}/v2/repositories/${e}/${t}/tags`,a=e=>`${i}?page_size=100&ordering=last_updated&page=${e}`,o={headers:{"accept-encoding":`gzip, deflate, br`}},s=async e=>{try{let t=await Ze(a(e),n,o);return`body`in t?JSON.parse(t.body):null}catch{return null}},c=await s(1);if(!c)return r;for(let e of c.results||[])r[e.name]=e.tag_last_pushed||e.last_updated||``;let l=Math.min(Math.ceil((c.count||0)/100),10);if(l<2)return r;let u=await Promise.all(Array.from({length:l-1},(e,t)=>s(t+2)));for(let e of u)if(e)for(let t of e.results||[])r[t.name]=t.tag_last_pushed||t.last_updated||``;return r}async function er(e,t,n){let{registry:r,namespace:i,repo:a}=Jn(e);if(r)throw Error(`Non-Docker-Hub registries are not yet supported: ${r}`);return[{tags:await $n(i,a,n),name:e},t,null,e]}function tr(e,t,n,r,i,a){let o=Xn(t);if(!o)return null;let s=ue(q(o.version))?.version;if(!s)return null;let c=s,l=``,u=``;for(let[t,s]of Object.entries(e)){let e=Xn(t);if(!e||e.suffix!==o.suffix)continue;let d=ue(q(e.version))?.version;if(!d||a&&!U(d,a)||!K(s,r,i))continue;let f=L(c,d);!f||!n.has(f)||fe(d,c)&&(c=d,l=t,u=s)}if(!l||c===s)return null;let d=Zn(c,t);return d===t?null:{newTag:d,date:u}}function nr(e,t,n){let r=e;for(let[e,i]of Object.entries(t)){let t=e.split(`\0`)[1],a=i.oldOrig||i.old;for(let e of n)r=r.replace(e(G(t),G(a)),`$1${t}:${i.new}`)}return r}function rr(e,t){return nr(e,t,[(e,t)=>RegExp(`(FROM\\s+(?:--platform=\\S+\\s+)?)${e}:${t}`,`g`)])}function ir(e,t){return nr(e,t,[(e,t)=>RegExp(`(image:\\s*['"]?)${e}:${t}`,`g`)])}function ar(e,t){return nr(e,t,[(e,t)=>RegExp(`((?:container|image):\\s*['"]?)${e}:${t}`,`g`),(e,t)=>RegExp(`(uses:\\s*['"]?docker://)${e}:${t}`,`g`)])}const or=[`Dockerfile`,`docker-compose.yml`,`docker-compose.yaml`];function sr(e){return/^docker-.+\.ya?ml$/.test(e)}function cr(e){return/^Dockerfile(\..+)?$/.test(e)}function lr(e){return cr(e)||sr(e)}function ur(e){return cr(e)?Wn:Gn}function dr(e){return e.registry?``:e.namespace===`library`?`https://hub.docker.com/_/${e.repo}`:`https://hub.docker.com/r/${e.namespace}/${e.repo}`}const fr=new Map;async function pr(e,t,n){let r=`${qe(n.cratesIoUrl)}/api/v1/crates/${encodeURIComponent(e)}/versions?per_page=100`,i=n.noCache?void 0:fr.get(r);return i||(i=Ze(r,n,Je()).then(t=>{`body`in t||_t(t.res,r,e,n.cratesIoUrl);let i;try{i=JSON.parse(t.body)}catch{throw Error(`Invalid JSON from ${r}`)}let a=(i.versions||[]).filter(e=>!e.yanked),o={},s={};for(let e of a)e.num&&(o[e.num]={},s[e.num]=e.created_at||``);return{name:e,versions:o,time:s,"dist-tags":{latest:a[0]?.num??``}}}).catch(e=>{throw fr.delete(r),e}),fr.set(r,i)),[await i,t,null,e]}function mr(e){let t=new Map;for(let n of e.split(`[[package]]`)){let e=/\bname\s*=\s*"([^"]+)"/.exec(n),r=/\bversion\s*=\s*"([^"]+)"/.exec(n);if(!e||!r)continue;let i=e[1],a=r[1];if(!N(a))continue;let o=t.get(i);o||t.set(i,o=[]),o.push(a)}return t}const hr=/^\d/;function gr(e,t){return hr.test(e)?rn(X(`^${e}`),t,`^${e}`).replace(/^\^/,``):rn(X(e),t,e)}function _r(e,t,n){let r=e.get(t);if(!r)return;let i=hr.test(n)?`^${n}`:n,a;for(let e of r)U(e,i)&&(!a||R(e,a))&&(a=e);return a}const vr=Me.map(G).join(`|`);function yr(e,t){let n=e;for(let[e,r]of Object.entries(t)){let[,t]=e.split(`\0`),i=r.oldOrig||r.old,a=r.new,o=G(t),s=G(i);n=n.replace(RegExp(`^(\\s*${o}\\s*=\\s*["'])${s}(["'].*)$`,`gm`),`$1${a}$2`),n=n.replace(RegExp(`(\\s*${o}\\s*=\\s*\\{\\s*version\\s*=\\s*["'])${s}(["'])`,`g`),`$1${a}$2`),n=n.replace(RegExp(`(\\[(?:${vr})\\.${o}\\][^\\[]*?version\\s*=\\s*["'])${s}(["'])`,`g`),`$1${a}$2`)}return n}function br(e){return e.split(`|`)[0]}function xr(e,t){let n=t===`.`?``:`|${t}`,r={};for(let[t,i]of Object.entries(e)){let[e,a]=t.split(`\0`),o=br(e);e===`${o}${n}`&&(r[`${o}${a}`]=i)}return r}const Sr=/[*?{[]/;async function Cr(e,n,r,i=32){let a=new Set,o=[];for(let i of e){let e=Sr.test(i)?t(i,{cwd:n}).map(e=>f(u(n,e))):[f(u(n,i))];for(let t of e){let e=u(t,r);if(a.has(e))continue;a.add(e);let i=d(n,t);o.push({absPath:e,memberPath:`./${i.replace(/\\/g,`/`)}`})}}return(await W(o,async({absPath:e,memberPath:t})=>{try{return{absPath:e,content:await x(e,`utf8`),memberPath:t}}catch{return null}},{concurrency:i})).filter(e=>e!==null)}function wr(e){let t=[],n=e.split(`
|
|
4
|
+
`),r=!1;for(let e of n){if(/^packages\s*:/.test(e)){r=!0;continue}if(r){if(/^\S/.test(e))break;let n=/^\s+-\s+['"]?([^'"#\s]+)['"]?/.exec(e);n&&t.push(n[1])}}return t}const Tr={"pnpm-workspace.yaml":`npm`,"package.json":`npm`,"pyproject.toml":`pypi`,"go.work":`go`,"go.mod":`go`,"Cargo.toml":`cargo`},Er=new Set([`npm`,`pypi`,`go`,`cargo`,`actions`,`docker`]),Dr=(e,t)=>typeof e==`string`?qe(e):typeof t==`function`?t():t;function Or(t,n){let r=new Map,i=new Set(t),a=n;for(;i.size;){for(let t of i){let n=u(a,t);try{e(n),r.set(t,n),i.delete(t)}catch{}}let t=l(a);if(t===a)break;a=t}return r}async function kr(e,t){let n=await W(e,async e=>{try{return[e,await x(e,`utf8`)]}catch(t){throw Error(`Unable to open ${e}: ${t.message}`)}},{concurrency:t});return new Map(n)}function Z(e,t){t&&(e.date=t,e.age=Ee(t,{noAffix:!0}))}function Ar(e){let t=0;for(let n of Object.keys(e))t+=Object.keys(e[n]).length;return t}function jr(e){console.error(`${Fe()} ${e}`)}function Mr(e){return e.replace(`${m()}/`,``).replace(`${m()}\\`,``)}function Q(e,t,n,r,i){if(i===`engines`&&ke.includes(e)||t===`pypi`&&e===`python`)return!1;if(!n.size&&!r.size)return!0;let a=t===`go`?e.replace(/\/v\d+$/,``):e;for(let t of r)if(t.test(e)||t.test(a))return!1;for(let t of n)if(t.test(e)||t.test(a))return!0;return!n.size}function Nr(e){let t=new Set;if(e)for(let r of e){let e;try{e=n(r)}catch(e){throw Error(`Unable to open ${r}: ${e.message}`)}if(e?.isFile())t.add(f(r));else if(e?.isDirectory()){for(let e of Object.keys(Tr)){let i=u(r,e),a=null;try{a=n(i)}catch{}a?.isFile()&&t.add(f(i))}try{for(let e of i(r,{withFileTypes:!0}))e.isFile()&&lr(e.name)&&t.add(f(u(r,e.name)))}catch{}let e=f(r).replace(/\\/g,`/`),a;a=e.endsWith(`.github/workflows`)?e:e.endsWith(`.github`)?u(e,`workflows`):u(e,`.github`,`workflows`);for(let e of Hn(a))t.add(e)}else throw Error(`${r} is neither a file nor directory`)}else{let e=u(`.github`,`workflows`),n=[...Object.keys(Tr),...or,e];for(let[r,i]of Or(n,m()))if(r===e)for(let e of Hn(i))t.add(e);else t.add(f(i));try{for(let e of i(m(),{withFileTypes:!0}))e.isFile()&&lr(e.name)&&!or.includes(e.name)&&t.add(f(u(m(),e.name)))}catch{}}for(let e of t)c(e)===`go.work`&&t.delete(u(l(e),`go.mod`));for(let e of t)c(e)===`pnpm-workspace.yaml`&&t.delete(u(l(e),`package.json`));return t}function $(e,t){g===`win32`&&o(e,0),s(e,t,g===`win32`?{flag:`r+`}:void 0)}function Pr(e){let t={results:{}};for(let n of Object.keys(e))for(let[r,i]of Object.entries(e[n])){typeof i.oldPrint==`string`&&(i.old=i.oldPrint),typeof i.newPrint==`string`&&(i.new=i.newPrint),typeof i.oldOrig==`string`&&!Qt(i.oldOrig)&&(i.old=n===`go`?Pn(i.oldOrig):i.oldOrig),n===`go`&&(i.new=Pn(i.new)),n===`actions`&&(i.old=q(i.old),i.new=q(i.new)),delete i.oldPrint,delete i.newPrint,delete i.oldOrig,delete i.date;let[e,a]=r.split(`\0`),o=t.results[n]??={};(o[e]??={})[a]=i}return t}let Fr=!1;async function Ir(e={}){if(!Fr){let{enableDnsCache:e}=await import(`./dns-CUigd8AG.js`);e(),Fr=!0}let t={...e},n=t.sockets??25,r=t.timeout??0,i=Dr(e.forgeapi,`https://api.github.com`),a=Dr(e.pypiapi,`https://pypi.org`),o=Dr(e.jsrapi,`https://jsr.io`),s=Dr(e.goproxy,pn),d=Dr(e.cargoapi,`https://crates.io`),p=Dr(e.dockerapi,`https://hub.docker.com`),m=mn(),h=t.color===!0||t.noColor!==!0&&_.isTTY,g=e=>h?t=>v(e,String(t)):String,y=g(`magenta`),b=g(`green`),S=g(`red`),C={fetchTimeout:r||5e3,goProbeTimeout:r?r/2:2500,forgeApiUrl:i,pypiApiUrl:a,jsrApiUrl:o,goProxyUrl:s,cratesIoUrl:d,dockerApiUrl:p,doFetch:async(e,n)=>{t.verbose&&jr(`${y(n?.method||`GET`)} ${e}`);let r=await Ye(e,n);return t.verbose&&jr(`${r.ok?b(r.status):S(r.status)} ${e}`),r},noCache:!!t.noCache},w=wt(t.greatest),E=wt(t.prerelease),ee=wt(t.release),te=wt(t.patch),ne=wt(t.minor),re=wt(t.allowDowngrade),D=t.modes?.length?new Set(t.modes):Er;D.has(`actions`)&&st();function ie(e){return te===!0||Ne(e,te)?new Set([`patch`]):ne===!0||Ne(e,ne)?new Set([`patch`,`minor`]):new Set([`patch`,`minor`,`major`])}let ae=new Map;function oe(e){let t=ae.get(e);return t||(t={useGreatest:typeof w==`boolean`?w:Ne(e,w),usePre:typeof E==`boolean`?E:Ne(e,E),useRel:typeof ee==`boolean`?ee:Ne(e,ee),semvers:ie(e)},ae.set(e,t)),t}let se=Ct(t.include??[]),ce=Ct(t.exclude??[]),le=t.pin??{},O={},k={},A={},j={},M=Date.now(),P=t.cooldown?Le(String(t.cooldown)):0,F=0,I=(e,t,n,r,i,a)=>{O[e][`${t}${n}${r}`]={old:i,oldOrig:a}},ue=Nr(t.files?.length?new Set(t.files):!1),L=await kr(Array.from(ue).filter(e=>{if(Vn(e))return D.has(`actions`)||D.has(`docker`);let t=c(e);if(lr(t))return D.has(`docker`);let n=Tr[t];return!!n&&D.has(n)}),n),de={},R={},fe=[],z=null,pe=[],me=!1,he=[],B=!1,ge=[],_e=[],V={};async function ve(e){let n=await Dt(e);return{modeConfig:n,modeInclude:n.include?.length?Ct([...t.include??[],...n.include]):se,modeExclude:n.exclude?.length?Ct([...t.exclude??[],...n.exclude]):ce,pin:{...n.pin,...le}}}function H(e,n){return t.types?.length?t.types:n?.types?.length?n.types:e===`npm`?Oe:e===`pypi`?Ae:e===`go`?t.indirect?je:je.filter(e=>e!==`indirect`):e===`cargo`?Me:[]}function ye(e,t,n,r){O.docker??={};for(let i of n)for(let{ref:n}of Qn(e,i)){if(!Q(n.fullImage,`docker`,r.include,r.exclude,`docker`))continue;let e=`${t}${n.fullImage}`;if(O.docker[e])continue;let i=Xn(n.tag);i&&(O.docker[e]={old:i.version,oldOrig:n.tag},_e.push({key:e,fullImage:n.fullImage,ref:n,filePin:r.pin}))}}async function be(e){let n=await Dt(e);return{include:n.include?.length?Ct([...t.include??[],...n.include]):se,exclude:n.exclude?.length?Ct([...t.exclude??[],...n.exclude]):ce,pin:n.pin??{}}}for(let e of ue){if(Vn(e)){let t=D.has(`actions`),n=D.has(`docker`);if(!t&&!n)continue;let r=L.get(e),a=Mr(e),o=await be(l(e));if(de[a]={absPath:e,content:r},t){O.actions??={};let e=Array.from(r.matchAll(Fn),e=>In(e[1])).filter(e=>e!==null);for(let t of e){if(!Q(t.name,`actions`,o.include,o.exclude,`actions`))continue;let e=`${a}${t.name}`;O.actions[e]||(O.actions[e]={old:t.ref},ge.push({...t,key:e,apiUrl:Ln(t.host,i),filePin:o.pin}))}}n&&(R[a]={absPath:e,content:r,fileType:`workflow`},ye(r,a,[Gn,Kn,qn],o));continue}let t=c(e);if(lr(t)){if(!D.has(`docker`))continue;let n=L.get(e),r=Mr(e),i=cr(t)?`dockerfile`:`compose`,a=await be(l(e));R[r]={absPath:e,content:n,fileType:i},ye(n,r,[ur(t)],a);continue}let r=Tr[t];if(!D.has(r))continue;if(t===`go.work`){O[r]??={};let t=l(f(e)),i=L.get(e);z={file:e,content:i};let a=jn(i),[o,s]=await Promise.all([ve(t),W(a.use,async e=>{let n=f(u(t,e,`go.mod`));try{return{usePath:e,modPath:n,content:await x(n,`utf8`)}}catch{return null}},{concurrency:n})]),{modeConfig:c,modeInclude:d,modeExclude:p,pin:m}=o,h=H(r,c);j[r]=e,V[r]={modeConfig:c,projectDir:t,pin:m};for(let e of s){if(!e)continue;let{usePath:t,modPath:n,content:i}=e,a=Tn(i),o=l(n);fe.push({absPath:n,content:i,projectDir:o,usePath:t});let s=t===`.`?``:`|${t}`;for(let e of h){let t=a[e]||{};for(let[n,i]of Object.entries(t))Q(n,r,d,p,e)&&I(r,e,s,n,Pn(i),q(i))}}for(let[e,t]of Object.entries(a.replace))Q(e,r,d,p,`replace`)&&I(r,`replace`,``,e,Pn(t),q(t));F+=Object.keys(O[r]).length;continue}if(t===`go.mod`&&z||t===`package.json`&&B)continue;if(t===`Cargo.toml`){O[r]??={};let t=L.get(e),i=T(t),a=l(f(e));j[r]=e;let o=Or([`Cargo.lock`],a).get(`Cargo.lock`),s=i.workspace?.members,c=Array.isArray(s)&&s.length,[u,d,p]=await Promise.all([ve(a),o?x(o,`utf8`):Promise.resolve(null),c?Cr(s,a,`Cargo.toml`,n):Promise.resolve([])]),{modeConfig:m,modeInclude:h,modeExclude:g,pin:_}=u,v=H(r,m);V[r]={modeConfig:m,projectDir:a,pin:_};let y=d?mr(d):new Map,b=(e,t)=>{for(let n of v){let i=Pe(e,n)||{};if(!(typeof i!=`object`||Array.isArray(i))){for(let[e,a]of Object.entries(i))if(Q(e,r,h,g,n))if(typeof a==`object`&&a&&`version`in a&&!(`git`in a)&&!(`path`in a)){let i=String(a.version);xe(i)&&I(r,n,t,e,_r(y,e,i)??X(i),i)}else typeof a==`string`&&xe(a)&&I(r,n,t,e,_r(y,e,a)??X(a),a)}}};if(c){me=!0,b(i,``),pe.push({absPath:f(e),content:t,memberPath:`.`});for(let e of p){pe.push(e);try{b(T(e.content),`|${e.memberPath}`)}catch(t){throw Error(`Error parsing ${e.absPath}: ${t.message}`)}}}else A[r]=t,b(i,``);F+=Object.keys(O[r]).length;continue}if(t===`pnpm-workspace.yaml`){O[r]??={};let t=l(f(e)),i=L.get(e);B=!0;let a=wr(i),o=u(t,`package.json`),[s,c,d]=await Promise.all([ve(t),x(o,`utf8`).catch(()=>null),Cr(a,t,`package.json`,n)]),{modeConfig:p,modeInclude:m,modeExclude:h,pin:g}=s,_=H(r,p);j[r]=e,V[r]={modeConfig:p,projectDir:t,pin:g};let v=(e,t)=>{for(let n of _){let i=e[n]||{};if(typeof i==`string`){let[e,a]=i.split(`@`);Q(e,r,m,h,n)&&I(r,n,t,e,X(a),a)}else if(typeof i==`object`&&!Array.isArray(i))for(let[e,a]of Object.entries(i))Q(e,r,m,h,n)&&(Qt(a)?I(r,n,t,e,en(a,e).version,a):xe(a)?I(r,n,t,e,X(a),a):$t(a)?I(r,n,t,e,`0.0.0`,a):k[`${n}${t}${e}`]={old:a})}};if(c!==null){let e;try{e=JSON.parse(c)}catch(e){throw Error(`Error parsing ${o}: ${e.message}`)}he.push({absPath:f(o),content:c,memberPath:`.`}),v(e,``)}for(let e of d){let t;try{t=JSON.parse(e.content)}catch(t){throw Error(`Error parsing ${e.absPath}: ${t.message}`)}he.push(e),v(t,`|${e.memberPath}`)}F+=Object.keys(O[r]).length+Object.keys(k).length;continue}j[r]=e,O[r]??={};let a=l(f(e)),{modeConfig:o,modeInclude:s,modeExclude:d,pin:p}=await ve(a),m=H(r,o),h={};A[r]=L.get(e);try{if(r===`npm`)h=JSON.parse(A[r]);else if(r===`pypi`)h=T(A[r]);else if(r===`go`){let e=Tn(A[r]);h.deps=e.deps,h.indirect=e.indirect,h.replace=e.replace,h.tool=e.tool}}catch(t){throw Error(`Error parsing ${e}: ${t.message}`)}for(let e of m){let t;if(t=r===`npm`||r===`go`?h[e]||{}:Pe(h,e)||{},Array.isArray(t)&&r===`pypi`)for(let{name:n,version:i}of De(t))Q(n,r,s,d,e)&&I(r,e,``,n,X(i),i);else if(typeof t==`string`){let[n,i]=t.split(`@`);Q(n,r,s,d,e)&&I(r,e,``,n,X(i),i)}else for(let[n,i]of Object.entries(t))Q(n,r,s,d,e)&&(r===`npm`&&Qt(i)?I(r,e,``,n,en(i,n).version,i):r!==`go`&&xe(i)?I(r,e,``,n,X(i),i):r===`npm`&&$t(i)?I(r,e,``,n,`0.0.0`,i):r===`npm`?k[`${e}${n}`]={old:i}:r===`go`&&I(r,e,``,n,Pn(i),q(i)))}F+=Object.keys(O[r]).length+Object.keys(k).length,V[r]={modeConfig:o,projectDir:a,pin:p}}if(O.actions&&(F+=Object.keys(O.actions).length),O.docker&&(F+=Object.keys(O.docker).length),F===0)return{results:{},message:`No dependencies found, nothing to do.`};let U=[],Se={registry:t.registry};for(let e of Object.keys(V)){let r=!!O[e]&&Object.keys(O[e]).length>0,i=e===`npm`&&Object.keys(k).length>0;if(!r&&!i)continue;let{modeConfig:a,projectDir:o,pin:s}=V[e];U.push((async()=>{let r=new Map,i=t.cooldown??a.cooldown,c=i?Le(String(i)):0,l=e=>{if(c)for(let[t,{date:n}]of Object.entries(e))n&&!K(n,c,M)&&delete e[t]};if(await W(Object.keys(O[e]),async t=>{let[n,i]=t.split(`\0`),l=br(n),u=O[e][t],d=null;if(e===`npm`){let{oldOrig:n}=u;if(n&&Qt(n))d=await tn(i,l,C);else if(n&&$t(n))try{d=await Xt(i,l,a,Se,C)}catch{delete O[e][t];return}else d=await Xt(i,l,a,Se,C)}else d=e===`go`?await Dn(i,l,u.oldOrig||u.old,o,C,m):e===`cargo`?await pr(i,l,C):await cn(i,l,C);if(!d)return;let[f,,p]=d;if(f?.error)throw Error(f.error);let{useGreatest:h,usePre:g,useRel:_,semvers:v}=oe(f.name),y=u.old,b=u.oldOrig,x=s[i],S=rt(f,{usePre:g,useRel:_,useGreatest:h,semvers:v,range:y,mode:e,pinnedRange:x,cooldownDays:c||void 0,now:c?M:void 0},{allowDowngrade:re,matchesAny:Ne,isGoPseudoVersion:xn}),w=``;if([`go`,`pypi`].includes(e)&&S)w=S;else if(e===`cargo`&&S&&b)w=gr(b,S);else if(S)if(b&&$t(b))w=String(zt()[`save-exact`])===`true`?S:`^${S}`;else if(b&&Qt(b)){let e=/^(npm:@jsr\/[^@]+@|jsr:@[^@]+@)(.+)$/.exec(b);e?w=`${e[1]}${S}`:b.startsWith(`jsr:`)&&(w=`jsr:${S}`)}else w=rn(y,S,b);if(!S||S===y||b&&b===w){delete O[e][t];return}let T=``;e===`pypi`&&f.releases?.[S]?.[0]?.upload_time_iso_8601?T=f.releases[S][0].upload_time_iso_8601:e===`go`&&f.Time?T=f.Time:e===`cargo`&&f.time?.[S]&&(T=f.time[S]),u.new=w,b&&Qt(b)&&(u.newPrint=S),e===`npm`?r.set(t,{name:i,promise:Zt(f.name,S,a,Se,C)}):e===`pypi`?u.info=bt(f,p,f.info.name):e===`go`?u.info=Mn(f.newPath||i):e===`cargo`&&(u.info=`https://crates.io/crates/${i}`),T&&Z(u,T)},{concurrency:n}),await Promise.all(Array.from(r,async([t,{name:n,promise:r}])=>{let i=await r,a=O[e][t];a&&(a.info=bt({repository:i.repository,homepage:i.homepage},null,n),i.date&&Z(a,i.date))})),e===`npm`&&Object.keys(k).length){let t=(await W(Object.entries(k),([e,t])=>{let n=e.split(`\0`)[1];return sn(e,t,oe(n).useGreatest,C)},{concurrency:n})).filter(e=>e!==null);for(let n of t){let{key:t,newRange:r,user:i,repo:a,oldRef:o,newRef:s,newDate:c}=n;O[e][t]={old:k[t].old,new:r,oldPrint:pt.test(o)?o.substring(0,7):o,newPrint:pt.test(s)?s.substring(0,7):s,info:`https://github.com/${i}/${a}`},c&&Z(O[e][t],c)}}l(O[e])})())}if(ge.length&&U.push((async()=>{let e=new Map;for(let t of ge){let n=`${t.apiUrl}/${t.owner}/${t.repo}`,r=e.get(n);r||e.set(n,r={apiUrl:t.apiUrl,owner:t.owner,repo:t.repo,infos:[]}),r.infos.push(t)}await W(e.values(),async({apiUrl:e,owner:t,repo:r,infos:i})=>{let a=await gt(e,t,r,C),o=[],s=new Map,c=new Map,l=new Map;for(let e of a){c.set(e.name,e);let t=q(e.name);N(t)&&(o.push(t),s.has(t)||s.set(t,e.name)),e.commitSha&&l.set(e.commitSha,e.name)}let u=new Map;async function d(n){if(u.has(n))return u.get(n);let i=await Rn(e,t,r,n,C);return u.set(n,i),i}async function f(e){let t=new Set;for(let n=0;n<20;n++){let n=nt({},t.size?o.filter(e=>!t.has(e)):o,e);if(!n||n===e.range)return null;let r=s.get(n);if(!r){t.add(n);continue}let i=c.get(r)?.commitSha||``;if(!P)return{version:n,tag:r,commitSha:i,date:``};let a=i?await d(i):``;if(K(a,P,M))return{version:n,tag:r,commitSha:i,date:a};t.add(n)}return null}await W(i,async({key:e,host:n,ref:i,name:a,isHash:o,filePin:s})=>{let u=O.actions[e],p=`https://${n||`github.com`}/${t}/${r}`,m=le[a]??s[a];if(o){let{usePre:t,useRel:n}=oe(a),r=await f({range:`0.0.0`,semvers:new Set([`patch`,`minor`,`major`]),usePre:t,useRel:n,useGreatest:!0,pinnedRange:m});if(!r){delete O.actions[e];return}let{tag:o,commitSha:s,date:c}=r;if(!s||s===i||s.startsWith(i)||i.startsWith(s)){delete O.actions[e];return}let d=l.get(i);if(!d){for(let[e,t]of l)if(e.startsWith(i)){d=t;break}}u.old=i,u.new=s.substring(0,i.length),u.oldPrint=d||i.substring(0,7),u.newPrint=o,u.info=p,c&&Z(u,c)}else{let t=J(q(i));if(!t){delete O.actions[e];return}let{usePre:n,useRel:r,semvers:o}=oe(a),s=await f({range:t,semvers:o,usePre:n,useRel:r,useGreatest:!0,pinnedRange:m});if(!s){delete O.actions[e];return}let{tag:l,commitSha:h,date:g}=s,_=zn(l,i);if(_===i){delete O.actions[e];return}if(u.new=c.has(_)?_:l,u.info=p,h&&g)Z(u,g);else if(h){let e=await d(h);e&&Z(u,e)}}},{concurrency:n})},{concurrency:n}),Object.keys(O.actions).length||delete O.actions})()),_e.length&&U.push((async()=>{let e=new Map;for(let t of _e){let n=e.get(t.fullImage);n||e.set(t.fullImage,n=[]),n.push(t)}await W(e.entries(),async([e,t])=>{let n;try{let[t]=await er(e,`docker`,C);n=t}catch{for(let e of t)delete O.docker[e.key];return}for(let e of t){let t=O.docker[e.key],r=t.oldOrig||t.old,{semvers:i}=oe(e.fullImage),a=le[e.fullImage]??e.filePin[e.fullImage],o=tr(n.tags,r,i,P||void 0,P?M:void 0,a);if(!o){delete O.docker[e.key];continue}t.new=o.newTag,t.info=dr(e.ref),Z(t,o.date)}},{concurrency:n}),Object.keys(O.docker).length||delete O.docker})()),await Promise.all(U),!Ar(O))return{results:{},message:`All dependencies are up to date.`};if(t.update){let e=(e,t,n)=>{for(let r of t){let t=xr(O[e],r.memberPath);Object.keys(t).length&&$(r.absPath,n(r.content,t))}},t=new Map;if(O.actions)for(let[e,n]of Object.entries(O.actions)){let[r,i]=e.split(`\0`),a=t.get(r);a||t.set(r,a=[]),a.push({name:i,oldRef:n.old,newRef:n.new})}let n=new Map;if(O.docker)for(let[e,t]of Object.entries(O.docker)){let[r]=e.split(`\0`),i=n.get(r);i||n.set(r,i={}),i[e]=t}let r=Pr(O);for(let r of Object.keys(O)){if(!Object.keys(O[r]).length)continue;if(r===`actions`){for(let[e,n]of t){let{absPath:t,content:r}=de[e]||{};if(!t)continue;let i=Bn(r,n);$(t,i),R[e]&&(R[e].content=i)}continue}if(r===`docker`){for(let[e,t]of n){let n=R[e];if(!n)continue;let{absPath:r,content:i,fileType:a}=n;$(r,(a===`dockerfile`?rr:a===`compose`?ir:ar)(i,t))}continue}let i=A[r];if(r===`go`&&z){for(let e of fe){let t=xr(O[r],e.usePath);if(!Object.keys(t).length)continue;let[n,i]=kn(e.content,t);n!==e.content&&$(e.absPath,n),An(e.projectDir,i,$)}let e={};for(let[t,n]of Object.entries(O[r]))t.split(`\0`)[0]===`replace`&&(e[t]=n);if(Object.keys(e).length){let[t]=kn(z.content,e);t!==z.content&&$(z.file,t)}}else if(r===`go`){let[e,t]=kn(i,O[r]);$(j[r],e),An(l(f(j[r])),t,$)}else if(r===`cargo`&&me)e(r,pe,yr);else if(r===`cargo`)$(j[r],yr(i,O[r]));else if(r===`npm`&&B)e(r,he,nn);else{let e=r===`npm`?nn:ln;$(j[r],e(i,O[r]))}}return r}return Pr(O)}function Lr(e){let t=``,n=0,r=e.length;for(;n<r;){let i=e[n];if(i===`"`){for(t+=i,n++;n<r;){let i=e[n];if(t+=i,n++,i===`\\`&&n<r){t+=e[n],n++;continue}if(i===`"`)break}continue}if(i===`/`&&n+1<r&&e[n+1]===`/`){for(n+=2;n<r&&e[n]!==`
|
|
5
|
+
`;)n++;continue}if(i===`/`&&n+1<r&&e[n+1]===`*`){for(n+=2;n<r&&(e[n]!==`*`||e[n+1]!==`/`);)n++;n+=2;continue}t+=i,n++}return t=t.replace(/,(\s*[}\]])/g,`$1`),JSON.parse(t)}export{ze as a,xe as i,Lr as n,Ir as r,Re as t};
|
package/dist/lib/package.js
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sources/arduino-library-properties.d.ts
|
|
5
5
|
declare const arduinoLibraryPropertiesSchema: z.ZodObject<{
|
|
6
|
-
architectures: z.ZodDefault<z.
|
|
6
|
+
architectures: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
7
7
|
authors: z.ZodArray<z.ZodObject<{
|
|
8
8
|
email: z.ZodOptional<z.ZodString>;
|
|
9
9
|
name: z.ZodString;
|
|
@@ -24,20 +24,20 @@ declare const arduinoLibraryPropertiesSchema: z.ZodObject<{
|
|
|
24
24
|
name: z.ZodString;
|
|
25
25
|
versionConstraint: z.ZodOptional<z.ZodString>;
|
|
26
26
|
}, z.core.$strip>>;
|
|
27
|
-
email: z.ZodOptional<z.
|
|
28
|
-
includes: z.ZodDefault<z.
|
|
29
|
-
license: z.ZodOptional<z.
|
|
27
|
+
email: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
28
|
+
includes: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
29
|
+
license: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
30
30
|
maintainer: z.ZodOptional<z.ZodObject<{
|
|
31
31
|
email: z.ZodOptional<z.ZodString>;
|
|
32
32
|
name: z.ZodString;
|
|
33
33
|
}, z.core.$strip>>;
|
|
34
|
-
name: z.ZodOptional<z.
|
|
35
|
-
paragraph: z.ZodOptional<z.
|
|
34
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
35
|
+
paragraph: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
36
36
|
raw: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
37
|
-
repository: z.ZodOptional<z.
|
|
38
|
-
sentence: z.ZodOptional<z.
|
|
39
|
-
url: z.ZodOptional<z.
|
|
40
|
-
version: z.ZodOptional<z.
|
|
37
|
+
repository: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
38
|
+
sentence: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
39
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
40
|
+
version: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
type ArduinoLibraryProperties = z.infer<typeof arduinoLibraryPropertiesSchema>;
|
|
43
43
|
type ArduinoLibraryPropertiesData = OneOrMany<SourceRecord<ArduinoLibraryProperties>> | undefined;
|
|
@@ -3,17 +3,17 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sources/cinder-cinderblock-xml.d.ts
|
|
5
5
|
declare const cinderCinderblockSchema: z.ZodObject<{
|
|
6
|
-
author: z.ZodDefault<z.
|
|
7
|
-
git: z.ZodOptional<z.
|
|
8
|
-
id: z.ZodOptional<z.
|
|
9
|
-
library: z.ZodOptional<z.
|
|
10
|
-
license: z.ZodOptional<z.
|
|
11
|
-
name: z.ZodOptional<z.
|
|
12
|
-
requires: z.ZodDefault<z.
|
|
13
|
-
summary: z.ZodOptional<z.
|
|
14
|
-
supports: z.ZodDefault<z.
|
|
15
|
-
url: z.ZodOptional<z.
|
|
16
|
-
version: z.ZodOptional<z.
|
|
6
|
+
author: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
7
|
+
git: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
8
|
+
id: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
9
|
+
library: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
10
|
+
license: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
11
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
12
|
+
requires: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
13
|
+
summary: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
14
|
+
supports: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
15
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
16
|
+
version: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
18
|
type CinderCinderblock = z.infer<typeof cinderCinderblockSchema>;
|
|
19
19
|
type CinderCinderblockXmlData = OneOrMany<SourceRecord<CinderCinderblock>> | undefined;
|
|
@@ -3,113 +3,113 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sources/codemeta-json.d.ts
|
|
5
5
|
declare const codeMetaJsonDataSchema: z.ZodObject<{
|
|
6
|
-
applicationCategory: z.ZodOptional<z.
|
|
7
|
-
applicationSubCategory: z.ZodOptional<z.
|
|
8
|
-
author: z.ZodOptional<z.
|
|
9
|
-
affiliation: z.ZodOptional<z.
|
|
10
|
-
email: z.ZodOptional<z.
|
|
11
|
-
familyName: z.ZodOptional<z.
|
|
12
|
-
givenName: z.ZodOptional<z.
|
|
13
|
-
id: z.ZodOptional<z.
|
|
14
|
-
name: z.ZodOptional<z.
|
|
6
|
+
applicationCategory: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
7
|
+
applicationSubCategory: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
8
|
+
author: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9
|
+
affiliation: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
10
|
+
email: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
11
|
+
familyName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
12
|
+
givenName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
13
|
+
id: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
14
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
15
15
|
type: z.ZodOptional<z.ZodEnum<{
|
|
16
16
|
Organization: "Organization";
|
|
17
17
|
Person: "Person";
|
|
18
18
|
}>>;
|
|
19
|
-
url: z.ZodOptional<z.
|
|
19
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
20
20
|
}, z.core.$strip>>>>>;
|
|
21
|
-
buildInstructions: z.ZodOptional<z.
|
|
22
|
-
codeRepository: z.ZodOptional<z.
|
|
23
|
-
continuousIntegration: z.ZodOptional<z.
|
|
24
|
-
contributor: z.ZodOptional<z.
|
|
25
|
-
affiliation: z.ZodOptional<z.
|
|
26
|
-
email: z.ZodOptional<z.
|
|
27
|
-
familyName: z.ZodOptional<z.
|
|
28
|
-
givenName: z.ZodOptional<z.
|
|
29
|
-
id: z.ZodOptional<z.
|
|
30
|
-
name: z.ZodOptional<z.
|
|
21
|
+
buildInstructions: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
22
|
+
codeRepository: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
23
|
+
continuousIntegration: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
24
|
+
contributor: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
affiliation: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
26
|
+
email: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
27
|
+
familyName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
28
|
+
givenName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
29
|
+
id: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
30
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
31
31
|
type: z.ZodOptional<z.ZodEnum<{
|
|
32
32
|
Organization: "Organization";
|
|
33
33
|
Person: "Person";
|
|
34
34
|
}>>;
|
|
35
|
-
url: z.ZodOptional<z.
|
|
35
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
36
36
|
}, z.core.$strip>>>>>;
|
|
37
|
-
copyrightHolder: z.ZodOptional<z.
|
|
38
|
-
affiliation: z.ZodOptional<z.
|
|
39
|
-
email: z.ZodOptional<z.
|
|
40
|
-
familyName: z.ZodOptional<z.
|
|
41
|
-
givenName: z.ZodOptional<z.
|
|
42
|
-
id: z.ZodOptional<z.
|
|
43
|
-
name: z.ZodOptional<z.
|
|
37
|
+
copyrightHolder: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
|
+
affiliation: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
39
|
+
email: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
40
|
+
familyName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
41
|
+
givenName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
42
|
+
id: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
43
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
44
44
|
type: z.ZodOptional<z.ZodEnum<{
|
|
45
45
|
Organization: "Organization";
|
|
46
46
|
Person: "Person";
|
|
47
47
|
}>>;
|
|
48
|
-
url: z.ZodOptional<z.
|
|
48
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
49
49
|
}, z.core.$strip>>>>>;
|
|
50
|
-
copyrightYear: z.ZodOptional<z.
|
|
51
|
-
dateCreated: z.ZodOptional<z.
|
|
52
|
-
dateModified: z.ZodOptional<z.
|
|
53
|
-
datePublished: z.ZodOptional<z.
|
|
54
|
-
description: z.ZodOptional<z.
|
|
55
|
-
developmentStatus: z.ZodOptional<z.
|
|
56
|
-
downloadUrl: z.ZodOptional<z.
|
|
57
|
-
funder: z.ZodOptional<z.
|
|
58
|
-
affiliation: z.ZodOptional<z.
|
|
59
|
-
email: z.ZodOptional<z.
|
|
60
|
-
familyName: z.ZodOptional<z.
|
|
61
|
-
givenName: z.ZodOptional<z.
|
|
62
|
-
id: z.ZodOptional<z.
|
|
63
|
-
name: z.ZodOptional<z.
|
|
50
|
+
copyrightYear: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodNumber>>>;
|
|
51
|
+
dateCreated: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
52
|
+
dateModified: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
53
|
+
datePublished: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
54
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
55
|
+
developmentStatus: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
56
|
+
downloadUrl: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
57
|
+
funder: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
58
|
+
affiliation: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
59
|
+
email: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
60
|
+
familyName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
61
|
+
givenName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
62
|
+
id: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
63
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
64
64
|
type: z.ZodOptional<z.ZodEnum<{
|
|
65
65
|
Organization: "Organization";
|
|
66
66
|
Person: "Person";
|
|
67
67
|
}>>;
|
|
68
|
-
url: z.ZodOptional<z.
|
|
68
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
69
69
|
}, z.core.$strip>>>>>;
|
|
70
|
-
funding: z.ZodOptional<z.
|
|
71
|
-
identifier: z.ZodOptional<z.
|
|
72
|
-
installUrl: z.ZodOptional<z.
|
|
70
|
+
funding: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
71
|
+
identifier: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
72
|
+
installUrl: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
73
73
|
isAccessibleForFree: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
-
issueTracker: z.ZodOptional<z.
|
|
75
|
-
keywords: z.ZodOptional<z.
|
|
76
|
-
license: z.ZodOptional<z.
|
|
77
|
-
maintainer: z.ZodOptional<z.
|
|
78
|
-
affiliation: z.ZodOptional<z.
|
|
79
|
-
email: z.ZodOptional<z.
|
|
80
|
-
familyName: z.ZodOptional<z.
|
|
81
|
-
givenName: z.ZodOptional<z.
|
|
82
|
-
id: z.ZodOptional<z.
|
|
83
|
-
name: z.ZodOptional<z.
|
|
74
|
+
issueTracker: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
75
|
+
keywords: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
76
|
+
license: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>>;
|
|
77
|
+
maintainer: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
+
affiliation: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
79
|
+
email: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
80
|
+
familyName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
81
|
+
givenName: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
82
|
+
id: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
83
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
84
84
|
type: z.ZodOptional<z.ZodEnum<{
|
|
85
85
|
Organization: "Organization";
|
|
86
86
|
Person: "Person";
|
|
87
87
|
}>>;
|
|
88
|
-
url: z.ZodOptional<z.
|
|
88
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
89
89
|
}, z.core.$strip>>>>>;
|
|
90
|
-
name: z.ZodOptional<z.
|
|
91
|
-
operatingSystem: z.ZodOptional<z.
|
|
92
|
-
programmingLanguage: z.ZodOptional<z.
|
|
93
|
-
readme: z.ZodOptional<z.
|
|
94
|
-
relatedLink: z.ZodOptional<z.
|
|
95
|
-
releaseNotes: z.ZodOptional<z.
|
|
96
|
-
runtimePlatform: z.ZodOptional<z.
|
|
97
|
-
softwareHelp: z.ZodOptional<z.
|
|
98
|
-
softwareRequirements: z.ZodOptional<z.
|
|
99
|
-
identifier: z.ZodOptional<z.
|
|
100
|
-
name: z.ZodOptional<z.
|
|
101
|
-
runtimePlatform: z.ZodOptional<z.
|
|
102
|
-
version: z.ZodOptional<z.
|
|
90
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
91
|
+
operatingSystem: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
92
|
+
programmingLanguage: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
93
|
+
readme: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
94
|
+
relatedLink: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>>;
|
|
95
|
+
releaseNotes: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
96
|
+
runtimePlatform: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>>;
|
|
97
|
+
softwareHelp: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
98
|
+
softwareRequirements: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
99
|
+
identifier: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
100
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
101
|
+
runtimePlatform: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
102
|
+
version: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
103
103
|
}, z.core.$strip>>>>>;
|
|
104
|
-
softwareSuggestions: z.ZodOptional<z.
|
|
105
|
-
identifier: z.ZodOptional<z.
|
|
106
|
-
name: z.ZodOptional<z.
|
|
107
|
-
runtimePlatform: z.ZodOptional<z.
|
|
108
|
-
version: z.ZodOptional<z.
|
|
104
|
+
softwareSuggestions: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
identifier: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
106
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
107
|
+
runtimePlatform: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
108
|
+
version: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
109
109
|
}, z.core.$strip>>>>>;
|
|
110
|
-
softwareVersion: z.ZodOptional<z.
|
|
111
|
-
url: z.ZodOptional<z.
|
|
112
|
-
version: z.ZodOptional<z.
|
|
110
|
+
softwareVersion: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
111
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
112
|
+
version: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>>>;
|
|
113
113
|
}, z.core.$strip>;
|
|
114
114
|
type CodeMetaJson = z.infer<typeof codeMetaJsonDataSchema>;
|
|
115
115
|
type CodeMetaJsonData = OneOrMany<SourceRecord<CodeMetaJson>> | undefined;
|
|
@@ -7,10 +7,10 @@ declare const goModDataSchema: z.ZodObject<{
|
|
|
7
7
|
module: z.ZodString;
|
|
8
8
|
version: z.ZodString;
|
|
9
9
|
}, z.core.$strip>>;
|
|
10
|
-
go_version: z.ZodOptional<z.
|
|
11
|
-
module: z.ZodOptional<z.
|
|
12
|
-
repository_url: z.ZodOptional<z.
|
|
13
|
-
tool_dependencies: z.ZodDefault<z.
|
|
10
|
+
go_version: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
11
|
+
module: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
12
|
+
repository_url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
13
|
+
tool_dependencies: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
/** Parsed go.mod metadata */
|
|
16
16
|
type GoMod = z.infer<typeof goModDataSchema>;
|
|
@@ -3,14 +3,14 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sources/go-goreleaser-yaml.d.ts
|
|
5
5
|
declare const goreleaserDataSchema: z.ZodObject<{
|
|
6
|
-
description: z.ZodOptional<z.
|
|
7
|
-
homepage: z.ZodOptional<z.
|
|
8
|
-
license: z.ZodOptional<z.
|
|
9
|
-
maintainer: z.ZodOptional<z.
|
|
10
|
-
operating_systems: z.ZodDefault<z.
|
|
11
|
-
project_name: z.ZodOptional<z.
|
|
12
|
-
repository_url: z.ZodOptional<z.
|
|
13
|
-
vendor: z.ZodOptional<z.
|
|
6
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
7
|
+
homepage: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
8
|
+
license: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
9
|
+
maintainer: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
10
|
+
operating_systems: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
11
|
+
project_name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
12
|
+
repository_url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
13
|
+
vendor: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
/** Parsed goreleaser metadata */
|
|
16
16
|
type Goreleaser = z.infer<typeof goreleaserDataSchema>;
|
|
@@ -3,8 +3,8 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sources/java-pom-xml.d.ts
|
|
5
5
|
declare const pomXmlSchema: z.ZodObject<{
|
|
6
|
-
artifactId: z.ZodOptional<z.
|
|
7
|
-
ciManagementUrl: z.ZodOptional<z.
|
|
6
|
+
artifactId: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
7
|
+
ciManagementUrl: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
8
8
|
contributors: z.ZodArray<z.ZodObject<{
|
|
9
9
|
email: z.ZodOptional<z.ZodString>;
|
|
10
10
|
name: z.ZodString;
|
|
@@ -16,7 +16,7 @@ declare const pomXmlSchema: z.ZodObject<{
|
|
|
16
16
|
groupId: z.ZodString;
|
|
17
17
|
version: z.ZodOptional<z.ZodString>;
|
|
18
18
|
}, z.core.$strip>>;
|
|
19
|
-
description: z.ZodOptional<z.
|
|
19
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
20
20
|
devDependencies: z.ZodArray<z.ZodObject<{
|
|
21
21
|
artifactId: z.ZodString;
|
|
22
22
|
groupId: z.ZodString;
|
|
@@ -28,23 +28,23 @@ declare const pomXmlSchema: z.ZodObject<{
|
|
|
28
28
|
organization: z.ZodOptional<z.ZodString>;
|
|
29
29
|
url: z.ZodOptional<z.ZodString>;
|
|
30
30
|
}, z.core.$strip>>;
|
|
31
|
-
groupId: z.ZodOptional<z.
|
|
32
|
-
identifier: z.ZodOptional<z.
|
|
33
|
-
inceptionYear: z.ZodOptional<z.
|
|
34
|
-
issueManagementUrl: z.ZodOptional<z.
|
|
35
|
-
javaVersion: z.ZodOptional<z.
|
|
31
|
+
groupId: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
32
|
+
identifier: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
33
|
+
inceptionYear: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
34
|
+
issueManagementUrl: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
35
|
+
javaVersion: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
36
36
|
licenses: z.ZodArray<z.ZodObject<{
|
|
37
37
|
name: z.ZodOptional<z.ZodString>;
|
|
38
38
|
url: z.ZodOptional<z.ZodString>;
|
|
39
39
|
}, z.core.$strip>>;
|
|
40
|
-
name: z.ZodOptional<z.
|
|
40
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
41
41
|
organization: z.ZodOptional<z.ZodObject<{
|
|
42
42
|
name: z.ZodString;
|
|
43
43
|
url: z.ZodOptional<z.ZodString>;
|
|
44
44
|
}, z.core.$strip>>;
|
|
45
|
-
scmUrl: z.ZodOptional<z.
|
|
46
|
-
url: z.ZodOptional<z.
|
|
47
|
-
version: z.ZodOptional<z.
|
|
45
|
+
scmUrl: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
46
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
47
|
+
version: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
48
48
|
}, z.core.$strip>;
|
|
49
49
|
type PomXml = z.infer<typeof pomXmlSchema>;
|
|
50
50
|
type JavaPomXmlData = OneOrMany<SourceRecord<PomXml>> | undefined;
|
|
@@ -3,10 +3,10 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sources/metadata-file.d.ts
|
|
5
5
|
declare const metadataSchema: z.ZodObject<{
|
|
6
|
-
description: z.ZodOptional<z.
|
|
7
|
-
homepage: z.ZodOptional<z.
|
|
8
|
-
keywords: z.ZodDefault<z.
|
|
9
|
-
repository: z.ZodOptional<z.
|
|
6
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
7
|
+
homepage: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
8
|
+
keywords: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
9
|
+
repository: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
10
10
|
}, z.core.$strip>;
|
|
11
11
|
type Metadata = z.infer<typeof metadataSchema>;
|
|
12
12
|
type MetadataFileData = OneOrMany<SourceRecord<Metadata>> | undefined;
|
|
@@ -3,13 +3,13 @@ import { z } from "zod";
|
|
|
3
3
|
|
|
4
4
|
//#region src/lib/sources/openframeworks-addon-config-mk.d.ts
|
|
5
5
|
declare const openframeworksAddonConfigSchema: z.ZodObject<{
|
|
6
|
-
author: z.ZodOptional<z.
|
|
7
|
-
dependencies: z.ZodDefault<z.
|
|
8
|
-
description: z.ZodOptional<z.
|
|
9
|
-
name: z.ZodOptional<z.
|
|
10
|
-
platformSections: z.ZodDefault<z.
|
|
11
|
-
tags: z.ZodDefault<z.
|
|
12
|
-
url: z.ZodOptional<z.
|
|
6
|
+
author: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
7
|
+
dependencies: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
8
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
9
|
+
name: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
10
|
+
platformSections: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
11
|
+
tags: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
|
|
12
|
+
url: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>>>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
type OpenframeworksAddonConfig = z.infer<typeof openframeworksAddonConfigSchema>;
|
|
15
15
|
type OpenframeworksAddonConfigMkData = OneOrMany<SourceRecord<OpenframeworksAddonConfig>> | undefined;
|