updates 17.3.2 → 17.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +3 -3
  2. package/dist/index.js +20 -20
  3. package/package.json +9 -9
package/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
 
8
8
  # Supported files
9
9
 
10
- - `package.json`, supported with all npm package managers
11
- - `pyproject.toml`: supports `uv` and `poetry`
12
- - `go.mod`: supports standard go dependencies
10
+ - `package.json` - supports all npm package managers
11
+ - `pyproject.toml` - supports `uv` and `poetry`
12
+ - `go.mod` - supports go dependencies
13
13
 
14
14
  # Usage
15
15
 
package/dist/index.js CHANGED
@@ -1,36 +1,36 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as e}from"node:module";import{cwd as t,env as n,exit as r,platform as i,stderr as a,stdout as o,versions as s}from"node:process";import{basename as c,dirname as l,join as u,resolve as d}from"node:path";import{pathToFileURL as f}from"node:url";import{accessSync as p,lstatSync as m,readFileSync as h,truncateSync as g,writeFileSync as _}from"node:fs";import{parseArgs as v,stripVTControlCharacters as y,styleText as b}from"node:util";var x=Object.create,S=Object.defineProperty,C=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,w=(e,t)=>()=>(e&&(t=e(e=0)),t),T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),re=(e,t)=>{let n={};for(var r in e)S(n,r,{get:e[r],enumerable:!0});return t&&S(n,Symbol.toStringTag,{value:`Module`}),n},ie=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ee(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ne.call(e,s)&&s!==n&&S(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=C(t,s))||r.enumerable});return e},ae=(e,t,n)=>(n=e==null?{}:x(te(e)),ie(t||!e||!e.__esModule?S(n,`default`,{value:e,enumerable:!0}):n,e)),oe=e(import.meta.url);async function se(e,t,{concurrency:n=1/0,stopOnError:r=!0,signal:i}={}){return new Promise((a,o)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!=`function`)throw TypeError(`Mapper function is required`);if(!(Number.isSafeInteger(n)&&n>=1||n===1/0))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let s=[],c=[],l=new Map,u=!1,d=!1,f=!1,p=0,m=0,h=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=()=>{y(i.reason)},_=()=>{i?.removeEventListener(`abort`,g)},v=e=>{a(e),_()},y=e=>{u=!0,d=!0,o(e),_()};i&&(i.aborted&&y(i.reason),i.addEventListener(`abort`,g,{once:!0}));let b=async()=>{if(d)return;let e=await h.next(),n=m;if(m++,e.done){if(f=!0,p===0&&!d){if(!r&&c.length>0){y(AggregateError(c));return}if(d=!0,l.size===0){v(s);return}let e=[];for(let[t,n]of s.entries())l.get(t)!==ce&&e.push(n);v(e)}return}p++,(async()=>{try{let r=await e.value;if(d)return;let i=await t(r,n);i===ce&&l.set(n,i),s[n]=i,p--,await b()}catch(e){if(r)y(e);else{c.push(e),p--;try{await b()}catch(e){y(e)}}}})()};(async()=>{for(let e=0;e<n;e++){try{await b()}catch(e){y(e);break}if(f||u)break}})()})}const ce=Symbol(`skip`);var le=`17.3.2`;const ue=/^v?(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9._-]+(?:\.[a-zA-Z0-9._-]+)*))?(?:\+[a-zA-Z0-9._-]+)?$/;function E(e){if(typeof e!=`string`)return null;let t=ue.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=t[4]?t[4].split(`.`).map(e=>/^\d+$/.test(e)?Number(e):e):[];return{major:n,minor:r,patch:i,prerelease:a,version:`${n}.${r}.${i}${a.length?`-${a.join(`.`)}`:``}`}}function de(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?1:0}function fe(e,t){return e.major-t.major||e.minor-t.minor||e.patch-t.patch}function D(e,t){let n=fe(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=de(e.prerelease[n],t.prerelease[n]);if(r!==0)return r}return 0}function O(e){return E(e)?.version??null}function pe(e){return E(e)}function me(e){if(typeof e!=`string`)return null;let t=/(?:^|[^.\d])(\d+)(?:\.(\d+))?(?:\.(\d+))?/.exec(e);return t?{version:`${t[1]||`0`}.${t[2]||`0`}.${t[3]||`0`}`}:null}function k(e,t){let n=E(e),r=E(t);if(!n||!r||n.version===r.version)return null;let i=D(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(fe(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 he(e,t){let n=E(e),r=E(t);return!n||!r?!1:D(n,r)>0}function ge(e,t){let n=E(e),r=E(t);return!n||!r?!1:D(n,r)>=0}function _e(e,t){let n=E(e),r=E(t);return!n||!r?!1:D(n,r)<0}function ve(e,t){let n=E(e),r=E(t);return!n||!r?!0:D(n,r)!==0}function ye(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=E(`${n}.${t[3]??`0`}.${t[4]??`0`}${t[5]||``}`);return r?{op:t[1]||`=`,semver:r}:null}function be(e,t){let n=D(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 A(e,t,n){return`${e}.${t}.${n}-0`}function xe(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 <${A(a+1,0,0)}`;let o=Number(n);return`>=${a}.${o}.${r===void 0?0:Number(r)}${i||``} <${A(a,o+1,0)}`})}function Se(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 <${A(a+1,0,0)}`;let s=Number(n);if(r===void 0)return a===0?`>=${a}.${s}.0 <${A(a,s+1,0)}`:`>=${a}.${s}.0 <${A(a+1,0,0)}`;let c=Number(r);return a===0?s===0?`>=${a}.${s}.${c}${o} <${A(a,s,c+1)}`:`>=${a}.${s}.${c}${o} <${A(a,s+1,0)}`:`>=${a}.${s}.${c}${o} <${A(a+1,0,0)}`})}function Ce(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?`<${A(p+1,0,0)}`:`<${A(p,Number(o)+1,0)}`:`<=${p}.${Number(o)}.${Number(s)}${c||``}`,`>=${l}.${u}.${d}${f} ${m}`})}function we(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 <${A(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 <${A(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 <${A(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 <${A(o+1,0,0)}`}),e)}function Te(e){let t=e.split(`||`).map(e=>e.trim()),n=[];for(let e of t){if(!e){n.push([]);continue}e=Ce(e),e=Se(e),e=xe(e),e=we(e),e=e.replace(/(^|[\s])v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+(?:\.[a-zA-Z0-9._-]+)*)?)\b/g,(e,t)=>/[<>=]/.test(t)?e:`${t}=${e.trim()}`),e=e.replace(/(>=|<=|>|<|=)\s+/g,`$1`);let t=e.split(/\s+/).filter(Boolean),r=[];for(let e of t){let t=ye(e);if(!t)return null;r.push(t)}if(r.length===0)return null;n.push(r)}return n.length?n:null}function Ee(e,t){for(let n of t)if(!be(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 De(e,t){let n=E(e);if(!n)return!1;let r=Te(t);if(!r)return!1;for(let e of r)if(e.length===0||Ee(n,e))return!0;return!1}function Oe(e){if(typeof e!=`string`)return null;try{return Te(e)?e:null}catch{return null}}const ke=[[1e3,6e4,`sec`],[6e4,36e5,`min`],[36e5,864e5,`hour`],[864e5,6048e5,`day`],[6048e5,2628e6,`week`],[2628e6,31536e6,`month`],[31536e6,1/0,`year`]],Ae={"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`},je={sec:`second`,min:`minute`};function Me(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function Ne(e,{now:t,noAffix:n=!1,times:r=ke,nowThreshold:i=2e3,nowString:a=`now`,unknownString:o=``,aliases:s=!1,aliasesMap:c=Ae,longUnits:l=!1}={}){let u=Me(e);if(t=t===void 0?Date.now():Me(t),Number.isNaN(u))return o||String(e);let d=!1,f=t-u;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return a;let p=0,m=``;for(let e=0,t=r.length;e<t;e++){let t=r[e];if(!(f>=t[1])){p=Math.floor(f/t[0]),m=(l&&je[t[2]]||t[2])+(p>1?`s`:``);break}}let h=`${d&&!n?`in `:``}${p} ${m}${!d&&!n?` ago`:``}`;return s?c[h]??h:h}function Pe(e){let t=[];for(let n of e){let[e,r]=n.replaceAll(/\s+/g,``).split(/[<>=~]+/);e&&/^[0-9.a-z]+$/.test(r)&&t.push({name:e,version:r})}return t}const Fe=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`,`resolutions`,`packageManager`],Ie=[`node`,`deno`,`bun`],Le=[`tool.poetry.dependencies`,`tool.poetry.dev-dependencies`,`tool.poetry.test-dependencies`,`tool.poetry.group.dev.dependencies`,`tool.poetry.group.test.dependencies`],Re=[`project.dependencies`,`project.optional-dependencies`,`dependency-groups.dev`,`dependency-groups.lint`,`dependency-groups.test`],ze=[`deps`];var Be=T((e=>{e.parse=e.decode=i,e.stringify=e.encode=n,e.safe=o,e.unsafe=s;var t=typeof process<`u`&&process.platform===`win32`?`\r
2
+ import{createRequire as e}from"node:module";import{cwd as t,env as n,exit as r,platform as i,stderr as a,stdout as o,versions as s}from"node:process";import{basename as c,dirname as l,join as u,resolve as d}from"node:path";import{pathToFileURL as f}from"node:url";import{accessSync as p,globSync as m,lstatSync as h,readFileSync as g,truncateSync as _,writeFileSync as v}from"node:fs";import{parseArgs as y,stripVTControlCharacters as b,styleText as x}from"node:util";import S from"node:dns";var C=Object.create,w=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,te=Object.getOwnPropertyNames,ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty,T=(e,t)=>()=>(e&&(t=e(e=0)),t),E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ie=(e,t)=>{let n={};for(var r in e)w(n,r,{get:e[r],enumerable:!0});return t||w(n,Symbol.toStringTag,{value:`Module`}),n},ae=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=te(t),a=0,o=i.length,s;a<o;a++)s=i[a],!re.call(e,s)&&s!==n&&w(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ee(t,s))||r.enumerable});return e},oe=(e,t,n)=>(n=e==null?{}:C(ne(e)),ae(t||!e||!e.__esModule?w(n,`default`,{value:e,enumerable:!0}):n,e)),se=e(import.meta.url);async function ce(e,t,{concurrency:n=1/0,stopOnError:r=!0,signal:i}={}){return new Promise((a,o)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!=`function`)throw TypeError(`Mapper function is required`);if(!(Number.isSafeInteger(n)&&n>=1||n===1/0))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let s=[],c=[],l=new Map,u=!1,d=!1,f=!1,p=0,m=0,h=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=()=>{y(i.reason)},_=()=>{i?.removeEventListener(`abort`,g)},v=e=>{a(e),_()},y=e=>{u=!0,d=!0,o(e),_()};i&&(i.aborted&&y(i.reason),i.addEventListener(`abort`,g,{once:!0}));let b=async()=>{if(d)return;let e=await h.next(),n=m;if(m++,e.done){if(f=!0,p===0&&!d){if(!r&&c.length>0){y(AggregateError(c));return}if(d=!0,l.size===0){v(s);return}let e=[];for(let[t,n]of s.entries())l.get(t)!==le&&e.push(n);v(e)}return}p++,(async()=>{try{let r=await e.value;if(d)return;let i=await t(r,n);i===le&&l.set(n,i),s[n]=i,p--,await b()}catch(e){if(r)y(e);else{c.push(e),p--;try{await b()}catch(e){y(e)}}}})()};(async()=>{for(let e=0;e<n;e++){try{await b()}catch(e){y(e);break}if(f||u)break}})()})}const le=Symbol(`skip`);var ue=`17.5.0`;const de=/^v?(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9._-]+(?:\.[a-zA-Z0-9._-]+)*))?(?:\+[a-zA-Z0-9._-]+)?$/;function D(e){if(typeof e!=`string`)return null;let t=de.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]),a=t[4]?t[4].split(`.`).map(e=>/^\d+$/.test(e)?Number(e):e):[];return{major:n,minor:r,patch:i,prerelease:a,version:`${n}.${r}.${i}${a.length?`-${a.join(`.`)}`:``}`}}function fe(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?1:0}function pe(e,t){return e.major-t.major||e.minor-t.minor||e.patch-t.patch}function O(e,t){let n=pe(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=fe(e.prerelease[n],t.prerelease[n]);if(r!==0)return r}return 0}function k(e){return D(e)?.version??null}function me(e){return D(e)}function he(e){if(typeof e!=`string`)return null;let t=/(?:^|[^.\d])(\d+)(?:\.(\d+))?(?:\.(\d+))?/.exec(e);return t?{version:`${t[1]||`0`}.${t[2]||`0`}.${t[3]||`0`}`}:null}function ge(e,t){let n=D(e),r=D(t);if(!n||!r||n.version===r.version)return null;let i=O(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(pe(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 _e(e,t){let n=D(e),r=D(t);return!n||!r?!1:O(n,r)>0}function ve(e,t){let n=D(e),r=D(t);return!n||!r?!1:O(n,r)>=0}function ye(e,t){let n=D(e),r=D(t);return!n||!r?!1:O(n,r)<0}function be(e,t){let n=D(e),r=D(t);return!n||!r?!0:O(n,r)!==0}function xe(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=D(`${n}.${t[3]??`0`}.${t[4]??`0`}${t[5]||``}`);return r?{op:t[1]||`=`,semver:r}:null}function Se(e,t){let n=O(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 A(e,t,n){return`${e}.${t}.${n}-0`}function Ce(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 <${A(a+1,0,0)}`;let o=Number(n);return`>=${a}.${o}.${r===void 0?0:Number(r)}${i||``} <${A(a,o+1,0)}`})}function we(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 <${A(a+1,0,0)}`;let s=Number(n);if(r===void 0)return a===0?`>=${a}.${s}.0 <${A(a,s+1,0)}`:`>=${a}.${s}.0 <${A(a+1,0,0)}`;let c=Number(r);return a===0?s===0?`>=${a}.${s}.${c}${o} <${A(a,s,c+1)}`:`>=${a}.${s}.${c}${o} <${A(a,s+1,0)}`:`>=${a}.${s}.${c}${o} <${A(a+1,0,0)}`})}function Te(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?`<${A(p+1,0,0)}`:`<${A(p,Number(o)+1,0)}`:`<=${p}.${Number(o)}.${Number(s)}${c||``}`,`>=${l}.${u}.${d}${f} ${m}`})}function Ee(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 <${A(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 <${A(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 <${A(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 <${A(o+1,0,0)}`}),e)}function De(e){let t=e.split(`||`).map(e=>e.trim()),n=[];for(let e of t){if(!e){n.push([]);continue}e=Te(e),e=we(e),e=Ce(e),e=Ee(e),e=e.replace(/(^|[\s])v?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+(?:\.[a-zA-Z0-9._-]+)*)?)\b/g,(e,t)=>/[<>=]/.test(t)?e:`${t}=${e.trim()}`),e=e.replace(/(>=|<=|>|<|=)\s+/g,`$1`);let t=e.split(/\s+/).filter(Boolean),r=[];for(let e of t){let t=xe(e);if(!t)return null;r.push(t)}if(r.length===0)return null;n.push(r)}return n.length?n:null}function Oe(e,t){for(let n of t)if(!Se(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 ke(e,t){let n=D(e);if(!n)return!1;let r=De(t);if(!r)return!1;for(let e of r)if(e.length===0||Oe(n,e))return!0;return!1}function Ae(e){if(typeof e!=`string`)return null;try{return De(e)?e:null}catch{return null}}const je=[[1e3,6e4,`sec`],[6e4,36e5,`min`],[36e5,864e5,`hour`],[864e5,6048e5,`day`],[6048e5,2628e6,`week`],[2628e6,31536e6,`month`],[31536e6,1/0,`year`]],Me={"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`},Ne={sec:`second`,min:`minute`};function Pe(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function Fe(e,{now:t,noAffix:n=!1,times:r=je,nowThreshold:i=2e3,nowString:a=`now`,unknownString:o=``,aliases:s=!1,aliasesMap:c=Me,longUnits:l=!1}={}){let u=Pe(e);if(t=t===void 0?Date.now():Pe(t),Number.isNaN(u))return o||String(e);let d=!1,f=t-u;if(f<0&&(d=!0,f=Math.abs(f)),f<i)return a;let p=0,m=``;for(let e=0,t=r.length;e<t;e++){let t=r[e];if(!(f>=t[1])){p=Math.floor(f/t[0]),m=(l&&Ne[t[2]]||t[2])+(p>1?`s`:``);break}}let h=`${d&&!n?`in `:``}${p} ${m}${!d&&!n?` ago`:``}`;return s?c[h]??h:h}function Ie(e){let t=[];for(let n of e){let[e,r]=n.replaceAll(/\s+/g,``).split(/[<>=~]+/);e&&/^[0-9.a-z]+$/.test(r)&&t.push({name:e,version:r})}return t}const Le=[`dependencies`,`devDependencies`,`peerDependencies`,`optionalDependencies`,`resolutions`,`packageManager`],Re=[`node`,`deno`,`bun`],ze=[`tool.poetry.dependencies`,`tool.poetry.dev-dependencies`,`tool.poetry.test-dependencies`,`tool.poetry.group.dev.dependencies`,`tool.poetry.group.test.dependencies`],Be=[`project.dependencies`,`project.optional-dependencies`,`dependency-groups.dev`,`dependency-groups.lint`,`dependency-groups.test`],Ve=[`deps`];function He(){let e=new Map,t=new Map,n=S.lookup;S.lookup=function(r,...i){let a={},o;typeof i[0]==`function`?o=i[0]:(a=typeof i[0]==`number`?{family:i[0]}:i[0]||{},o=i[1]);let s=e.get(r);if(s){a.all?o(null,s):o(null,s[0].address,s[0].family);return}if(t.has(r)){t.get(r).push({options:a,callback:o});return}t.set(r,[{options:a,callback:o}]),n.call(S,r,{all:!0},(n,i)=>{let a=t.get(r);t.delete(r),!n&&i?.length&&e.set(r,i);for(let{options:e,callback:t}of a)n?t(n):e.all?t(null,i):t(null,i[0].address,i[0].family)})}}var Ue=E((e=>{e.parse=e.decode=i,e.stringify=e.encode=n,e.safe=o,e.unsafe=s;var t=typeof process<`u`&&process.platform===`win32`?`\r
3
3
  `:`
4
4
  `;function n(e,i){var a=[],s=``;typeof i==`string`?i={section:i,whitespace:!1}:(i||={},i.whitespace=i.whitespace===!0);var c=i.whitespace?` = `:`=`;return Object.keys(e).forEach(function(n,r,i){var l=e[n];l&&Array.isArray(l)?l.forEach(function(e){s+=o(n+`[]`)+c+o(e)+`
5
- `}):l&&typeof l==`object`?a.push(n):s+=o(n)+c+o(l)+t}),i.section&&s.length&&(s=`[`+o(i.section)+`]`+t+s),a.forEach(function(a,o,c){var l=r(a).join(`\\.`),u=(i.section?i.section+`.`:``)+l,d=n(e[a],{section:u,whitespace:i.whitespace});s.length&&d.length&&(s+=t),s+=d}),s}function r(e){return e.replace(/\1/g,`LITERAL\\1LITERAL`).replace(/\\\./g,``).split(/\./).map(function(e){return e.replace(/\1/g,`\\.`).replace(/\2LITERAL\\1LITERAL\2/g,``)})}function i(e){var t={},n=t,i=null,a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach(function(e,r,o){if(!(!e||e.match(/^\s*[;#]/))){var c=e.match(a);if(c){if(c[1]!==void 0){if(i=s(c[1]),i===`__proto__`){n={};return}n=t[i]=t[i]||{};return}var l=s(c[2]);if(l!==`__proto__`){var u=c[3]?s(c[4]):!0;switch(u){case`true`:case`false`:case`null`:u=JSON.parse(u)}if(l.length>2&&l.slice(-2)===`[]`){if(l=l.substring(0,l.length-2),l===`__proto__`)return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(u):n[l]=u}}}}),Object.keys(t).filter(function(e,n,i){if(!t[e]||typeof t[e]!=`object`||Array.isArray(t[e]))return!1;var a=r(e),o=t,s=a.pop(),c=s.replace(/\\\./g,`.`);return a.forEach(function(e,t,n){e!==`__proto__`&&((!o[e]||typeof o[e]!=`object`)&&(o[e]={}),o=o[e])}),o===t&&c===s?!1:(o[c]=t[e],!0)}).forEach(function(e,n,r){delete t[e]}),t}function a(e){return e.charAt(0)===`"`&&e.slice(-1)===`"`||e.charAt(0)===`'`&&e.slice(-1)===`'`}function o(e){return typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&a(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,`\\;`).replace(/#/g,`\\#`)}function s(e,t){if(e=(e||``).trim(),a(e)){e.charAt(0)===`'`&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var n=!1,r=``,i=0,o=e.length;i<o;i++){var s=e.charAt(i);if(n)`\\;#`.indexOf(s)===-1?r+=`\\`+s:r+=s,n=!1;else if(`;#`.indexOf(s)!==-1)break;else s===`\\`?n=!0:r+=s}return n&&(r+=`\\`),r.trim()}return e}})),Ve=T(((e,t)=>{var n=1,r=2;function i(){return``}function a(e,t,n){return e.slice(t,n).replace(/\S/g,` `)}t.exports=function(e,t){t||={};for(var o,s,c=!1,l=!1,u=0,d=``,f=t.whitespace===!1?i:a,p=0;p<e.length;p++)if(o=e[p],s=e[p+1],!l&&o===`"`&&(e[p-1]===`\\`&&e[p-2]!==`\\`||(c=!c)),!c){if(!l&&o+s===`//`)d+=e.slice(u,p),u=p,l=n,p++;else if(l===n&&o+s===`\r
5
+ `}):l&&typeof l==`object`?a.push(n):s+=o(n)+c+o(l)+t}),i.section&&s.length&&(s=`[`+o(i.section)+`]`+t+s),a.forEach(function(a,o,c){var l=r(a).join(`\\.`),u=(i.section?i.section+`.`:``)+l,d=n(e[a],{section:u,whitespace:i.whitespace});s.length&&d.length&&(s+=t),s+=d}),s}function r(e){return e.replace(/\1/g,`LITERAL\\1LITERAL`).replace(/\\\./g,``).split(/\./).map(function(e){return e.replace(/\1/g,`\\.`).replace(/\2LITERAL\\1LITERAL\2/g,``)})}function i(e){var t={},n=t,i=null,a=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;return e.split(/[\r\n]+/g).forEach(function(e,r,o){if(!(!e||e.match(/^\s*[;#]/))){var c=e.match(a);if(c){if(c[1]!==void 0){if(i=s(c[1]),i===`__proto__`){n={};return}n=t[i]=t[i]||{};return}var l=s(c[2]);if(l!==`__proto__`){var u=c[3]?s(c[4]):!0;switch(u){case`true`:case`false`:case`null`:u=JSON.parse(u)}if(l.length>2&&l.slice(-2)===`[]`){if(l=l.substring(0,l.length-2),l===`__proto__`)return;n[l]?Array.isArray(n[l])||(n[l]=[n[l]]):n[l]=[]}Array.isArray(n[l])?n[l].push(u):n[l]=u}}}}),Object.keys(t).filter(function(e,n,i){if(!t[e]||typeof t[e]!=`object`||Array.isArray(t[e]))return!1;var a=r(e),o=t,s=a.pop(),c=s.replace(/\\\./g,`.`);return a.forEach(function(e,t,n){e!==`__proto__`&&((!o[e]||typeof o[e]!=`object`)&&(o[e]={}),o=o[e])}),o===t&&c===s?!1:(o[c]=t[e],!0)}).forEach(function(e,n,r){delete t[e]}),t}function a(e){return e.charAt(0)===`"`&&e.slice(-1)===`"`||e.charAt(0)===`'`&&e.slice(-1)===`'`}function o(e){return typeof e!=`string`||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&a(e)||e!==e.trim()?JSON.stringify(e):e.replace(/;/g,`\\;`).replace(/#/g,`\\#`)}function s(e,t){if(e=(e||``).trim(),a(e)){e.charAt(0)===`'`&&(e=e.substr(1,e.length-2));try{e=JSON.parse(e)}catch{}}else{for(var n=!1,r=``,i=0,o=e.length;i<o;i++){var s=e.charAt(i);if(n)`\\;#`.indexOf(s)===-1?r+=`\\`+s:r+=s,n=!1;else if(`;#`.indexOf(s)!==-1)break;else s===`\\`?n=!0:r+=s}return n&&(r+=`\\`),r.trim()}return e}})),We=E(((e,t)=>{var n=1,r=2;function i(){return``}function a(e,t,n){return e.slice(t,n).replace(/\S/g,` `)}t.exports=function(e,t){t||={};for(var o,s,c=!1,l=!1,u=0,d=``,f=t.whitespace===!1?i:a,p=0;p<e.length;p++)if(o=e[p],s=e[p+1],!l&&o===`"`&&(e[p-1]===`\\`&&e[p-2]!==`\\`||(c=!c)),!c){if(!l&&o+s===`//`)d+=e.slice(u,p),u=p,l=n,p++;else if(l===n&&o+s===`\r
6
6
  `){p++,l=!1,d+=f(e,u,p),u=p;continue}else if(l===n&&o===`
7
- `)l=!1,d+=f(e,u,p),u=p;else if(!l&&o+s===`/*`){d+=e.slice(u,p),u=p,l=r,p++;continue}else if(l===r&&o+s===`*/`){p++,l=!1,d+=f(e,u,p+1),u=p+1;continue}}return d+(l?f(e.substr(u)):e.substr(u))}})),He=T((e=>{var t=oe(`fs`),n=Be(),r=oe(`path`),i=Ve(),a=e.parse=function(e){return/^\s*{/.test(e)?JSON.parse(i(e)):n.parse(e)},o=e.file=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null});for(var n in e)if(typeof e[n]!=`string`)return;var i=r.join.apply(null,e);try{return t.readFileSync(i,`utf-8`)}catch{return}};e.json=function(){var e=o.apply(null,arguments);return e?a(e):null},e.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)if(i.toLowerCase().indexOf(e.toLowerCase())===0){for(var a=i.substring(r).split(`__`),o;(o=a.indexOf(``))>-1;)a.splice(o,1);var s=n;a.forEach(function(e,n){!e||typeof s!=`object`||(n===a.length-1&&(s[e]=t[i]),s[e]===void 0&&(s[e]={}),s=s[e])})}return n},e.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function n(e,i){var a=r.join(e,i);try{return t.statSync(a),a}catch{if(r.dirname(e)!==e)return n(r.dirname(e),i)}}return n(process.cwd(),e)}})),Ue=T(((e,t)=>{function n(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}else if(e instanceof Date)return new Date(e.getTime());else if(e instanceof RegExp)return new RegExp(e);else throw Error(`Unexpected situation`)}function i(e){var t=[];return e.forEach(function(e,a){typeof e==`object`&&e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}function a(e,t){return t===`__proto__`?void 0:e[t]}var o=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=`object`)return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),s,c;return t.forEach(function(t){typeof t!=`object`||!t||Array.isArray(t)||Object.keys(t).forEach(function(l){if(c=a(e,l),s=a(t,l),s!==e)if(typeof s!=`object`||!s){e[l]=s;return}else if(Array.isArray(s)){e[l]=i(s);return}else if(n(s)){e[l]=r(s);return}else if(typeof c!=`object`||!c||Array.isArray(c)){e[l]=o({},s);return}else{e[l]=o(c,s);return}})}),e}})),We=T(((e,t)=>{function n(e,t){var n=e;return t.slice(0,-1).forEach(function(e){n=n[e]||{}}),t[t.length-1]in n}function r(e){return typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function i(e,t){return t===`constructor`&&typeof e[t]==`function`||t===`__proto__`}t.exports=function(e,t){t||={};var a={bools:{},strings:{},unknownFn:null};typeof t.unknown==`function`&&(a.unknownFn=t.unknown),typeof t.boolean==`boolean`&&t.boolean?a.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(e){a.bools[e]=!0});var o={};function s(e){return o[e].some(function(e){return a.bools[e]})}Object.keys(t.alias||{}).forEach(function(e){o[e]=[].concat(t.alias[e]),o[e].forEach(function(t){o[t]=[e].concat(o[e].filter(function(e){return t!==e}))})}),[].concat(t.string).filter(Boolean).forEach(function(e){a.strings[e]=!0,o[e]&&[].concat(o[e]).forEach(function(e){a.strings[e]=!0})});var c=t.default||{},l={_:[]};function u(e,t){return a.allBools&&/^--[^=]+$/.test(t)||a.strings[e]||a.bools[e]||o[e]}function d(e,t,n){for(var r=e,o=0;o<t.length-1;o++){var s=t[o];if(i(r,s))return;r[s]===void 0&&(r[s]={}),(r[s]===Object.prototype||r[s]===Number.prototype||r[s]===String.prototype)&&(r[s]={}),r[s]===Array.prototype&&(r[s]=[]),r=r[s]}var c=t[t.length-1];i(r,c)||((r===Object.prototype||r===Number.prototype||r===String.prototype)&&(r={}),r===Array.prototype&&(r=[]),r[c]===void 0||a.bools[c]||typeof r[c]==`boolean`?r[c]=n:Array.isArray(r[c])?r[c].push(n):r[c]=[r[c],n])}function f(e,t,n){if(!(n&&a.unknownFn&&!u(e,n)&&a.unknownFn(n)===!1)){var i=!a.strings[e]&&r(t)?Number(t):t;d(l,e.split(`.`),i),(o[e]||[]).forEach(function(e){d(l,e.split(`.`),i)})}}Object.keys(a.bools).forEach(function(e){f(e,c[e]===void 0?!1:c[e])});var p=[];e.indexOf(`--`)!==-1&&(p=e.slice(e.indexOf(`--`)+1),e=e.slice(0,e.indexOf(`--`)));for(var m=0;m<e.length;m++){var h=e[m],g,_;if(/^--.+=/.test(h)){var v=h.match(/^--([^=]+)=([\s\S]*)$/);g=v[1];var y=v[2];a.bools[g]&&(y=y!==`false`),f(g,y,h)}else if(/^--no-.+/.test(h))g=h.match(/^--no-(.+)/)[1],f(g,!1,h);else if(/^--.+/.test(h))g=h.match(/^--(.+)/)[1],_=e[m+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!a.bools[g]&&!a.allBools&&(!o[g]||!s(g))?(f(g,_,h),m+=1):/^(true|false)$/.test(_)?(f(g,_===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h);else if(/^-[^-]+/.test(h)){for(var b=h.slice(1,-1).split(``),x=!1,S=0;S<b.length;S++){if(_=h.slice(S+2),_===`-`){f(b[S],_,h);continue}if(/[A-Za-z]/.test(b[S])&&_[0]===`=`){f(b[S],_.slice(1),h),x=!0;break}if(/[A-Za-z]/.test(b[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(b[S],_,h),x=!0;break}if(b[S+1]&&b[S+1].match(/\W/)){f(b[S],h.slice(S+2),h),x=!0;break}else f(b[S],a.strings[b[S]]?``:!0,h)}g=h.slice(-1)[0],!x&&g!==`-`&&(e[m+1]&&!/^(-|--)[^-]/.test(e[m+1])&&!a.bools[g]&&(!o[g]||!s(g))?(f(g,e[m+1],h),m+=1):e[m+1]&&/^(true|false)$/.test(e[m+1])?(f(g,e[m+1]===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h))}else if((!a.unknownFn||a.unknownFn(h)!==!1)&&l._.push(a.strings._||!r(h)?h:Number(h)),t.stopEarly){l._.push.apply(l._,e.slice(m+1));break}}return Object.keys(c).forEach(function(e){n(l,e.split(`.`))||(d(l,e.split(`.`),c[e]),(o[e]||[]).forEach(function(t){d(l,t.split(`.`),c[e])}))}),t[`--`]?l[`--`]=p.slice():p.forEach(function(e){l._.push(e)}),l}})),Ge=T(((e,t)=>{var n=He(),r=oe(`path`).join,i=Ue(),a=`/etc`,o=process.platform===`win32`,s=o?process.env.USERPROFILE:process.env.HOME;t.exports=function(e,t,c,l){if(typeof e!=`string`)throw Error(`rc(name): name *must* be string`);c||=We()(process.argv.slice(2)),t=(typeof t==`string`?n.json(t):t)||{},l||=n.parse;var u=n.env(e+`_`),d=[t],f=[];function p(e){if(!(f.indexOf(e)>=0)){var t=n.file(e);t&&(d.push(l(t)),f.push(e))}}return o||[r(a,e,`config`),r(a,e+`rc`)].forEach(p),s&&[r(s,`.config`,e,`config`),r(s,`.config`,e),r(s,`.`+e,`config`),r(s,`.`+e+`rc`)].forEach(p),p(n.find(`.`+e+`rc`)),u.config&&p(u.config),c.config&&p(c.config),i.apply(null,d.concat([u,c,f.length?{configs:f,config:f[f.length-1]}:void 0]))}}));function Ke(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function qe(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
7
+ `)l=!1,d+=f(e,u,p),u=p;else if(!l&&o+s===`/*`){d+=e.slice(u,p),u=p,l=r,p++;continue}else if(l===r&&o+s===`*/`){p++,l=!1,d+=f(e,u,p+1),u=p+1;continue}}return d+(l?f(e.substr(u)):e.substr(u))}})),Ge=E((e=>{var t=se(`fs`),n=Ue(),r=se(`path`),i=We(),a=e.parse=function(e){return/^\s*{/.test(e)?JSON.parse(i(e)):n.parse(e)},o=e.file=function(){var e=[].slice.call(arguments).filter(function(e){return e!=null});for(var n in e)if(typeof e[n]!=`string`)return;var i=r.join.apply(null,e);try{return t.readFileSync(i,`utf-8`)}catch{return}};e.json=function(){var e=o.apply(null,arguments);return e?a(e):null},e.env=function(e,t){t||=process.env;var n={},r=e.length;for(var i in t)if(i.toLowerCase().indexOf(e.toLowerCase())===0){for(var a=i.substring(r).split(`__`),o;(o=a.indexOf(``))>-1;)a.splice(o,1);var s=n;a.forEach(function(e,n){!e||typeof s!=`object`||(n===a.length-1&&(s[e]=t[i]),s[e]===void 0&&(s[e]={}),s=s[e])})}return n},e.find=function(){var e=r.join.apply(null,[].slice.call(arguments));function n(e,i){var a=r.join(e,i);try{return t.statSync(a),a}catch{if(r.dirname(e)!==e)return n(r.dirname(e),i)}}return n(process.cwd(),e)}})),Ke=E(((e,t)=>{function n(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}else if(e instanceof Date)return new Date(e.getTime());else if(e instanceof RegExp)return new RegExp(e);else throw Error(`Unexpected situation`)}function i(e){var t=[];return e.forEach(function(e,a){typeof e==`object`&&e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}function a(e,t){return t===`__proto__`?void 0:e[t]}var o=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=`object`)return!1;if(arguments.length<2)return arguments[0];var e=arguments[0],t=Array.prototype.slice.call(arguments,1),s,c;return t.forEach(function(t){typeof t!=`object`||!t||Array.isArray(t)||Object.keys(t).forEach(function(l){if(c=a(e,l),s=a(t,l),s!==e)if(typeof s!=`object`||!s){e[l]=s;return}else if(Array.isArray(s)){e[l]=i(s);return}else if(n(s)){e[l]=r(s);return}else if(typeof c!=`object`||!c||Array.isArray(c)){e[l]=o({},s);return}else{e[l]=o(c,s);return}})}),e}})),qe=E(((e,t)=>{function n(e,t){var n=e;return t.slice(0,-1).forEach(function(e){n=n[e]||{}}),t[t.length-1]in n}function r(e){return typeof e==`number`||/^0x[0-9a-f]+$/i.test(e)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function i(e,t){return t===`constructor`&&typeof e[t]==`function`||t===`__proto__`}t.exports=function(e,t){t||={};var a={bools:{},strings:{},unknownFn:null};typeof t.unknown==`function`&&(a.unknownFn=t.unknown),typeof t.boolean==`boolean`&&t.boolean?a.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(e){a.bools[e]=!0});var o={};function s(e){return o[e].some(function(e){return a.bools[e]})}Object.keys(t.alias||{}).forEach(function(e){o[e]=[].concat(t.alias[e]),o[e].forEach(function(t){o[t]=[e].concat(o[e].filter(function(e){return t!==e}))})}),[].concat(t.string).filter(Boolean).forEach(function(e){a.strings[e]=!0,o[e]&&[].concat(o[e]).forEach(function(e){a.strings[e]=!0})});var c=t.default||{},l={_:[]};function u(e,t){return a.allBools&&/^--[^=]+$/.test(t)||a.strings[e]||a.bools[e]||o[e]}function d(e,t,n){for(var r=e,o=0;o<t.length-1;o++){var s=t[o];if(i(r,s))return;r[s]===void 0&&(r[s]={}),(r[s]===Object.prototype||r[s]===Number.prototype||r[s]===String.prototype)&&(r[s]={}),r[s]===Array.prototype&&(r[s]=[]),r=r[s]}var c=t[t.length-1];i(r,c)||((r===Object.prototype||r===Number.prototype||r===String.prototype)&&(r={}),r===Array.prototype&&(r=[]),r[c]===void 0||a.bools[c]||typeof r[c]==`boolean`?r[c]=n:Array.isArray(r[c])?r[c].push(n):r[c]=[r[c],n])}function f(e,t,n){if(!(n&&a.unknownFn&&!u(e,n)&&a.unknownFn(n)===!1)){var i=!a.strings[e]&&r(t)?Number(t):t;d(l,e.split(`.`),i),(o[e]||[]).forEach(function(e){d(l,e.split(`.`),i)})}}Object.keys(a.bools).forEach(function(e){f(e,c[e]===void 0?!1:c[e])});var p=[];e.indexOf(`--`)!==-1&&(p=e.slice(e.indexOf(`--`)+1),e=e.slice(0,e.indexOf(`--`)));for(var m=0;m<e.length;m++){var h=e[m],g,_;if(/^--.+=/.test(h)){var v=h.match(/^--([^=]+)=([\s\S]*)$/);g=v[1];var y=v[2];a.bools[g]&&(y=y!==`false`),f(g,y,h)}else if(/^--no-.+/.test(h))g=h.match(/^--no-(.+)/)[1],f(g,!1,h);else if(/^--.+/.test(h))g=h.match(/^--(.+)/)[1],_=e[m+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!a.bools[g]&&!a.allBools&&(!o[g]||!s(g))?(f(g,_,h),m+=1):/^(true|false)$/.test(_)?(f(g,_===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h);else if(/^-[^-]+/.test(h)){for(var b=h.slice(1,-1).split(``),x=!1,S=0;S<b.length;S++){if(_=h.slice(S+2),_===`-`){f(b[S],_,h);continue}if(/[A-Za-z]/.test(b[S])&&_[0]===`=`){f(b[S],_.slice(1),h),x=!0;break}if(/[A-Za-z]/.test(b[S])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){f(b[S],_,h),x=!0;break}if(b[S+1]&&b[S+1].match(/\W/)){f(b[S],h.slice(S+2),h),x=!0;break}else f(b[S],a.strings[b[S]]?``:!0,h)}g=h.slice(-1)[0],!x&&g!==`-`&&(e[m+1]&&!/^(-|--)[^-]/.test(e[m+1])&&!a.bools[g]&&(!o[g]||!s(g))?(f(g,e[m+1],h),m+=1):e[m+1]&&/^(true|false)$/.test(e[m+1])?(f(g,e[m+1]===`true`,h),m+=1):f(g,a.strings[g]?``:!0,h))}else if((!a.unknownFn||a.unknownFn(h)!==!1)&&l._.push(a.strings._||!r(h)?h:Number(h)),t.stopEarly){l._.push.apply(l._,e.slice(m+1));break}}return Object.keys(c).forEach(function(e){n(l,e.split(`.`))||(d(l,e.split(`.`),c[e]),(o[e]||[]).forEach(function(t){d(l,t.split(`.`),c[e])}))}),t[`--`]?l[`--`]=p.slice():p.forEach(function(e){l._.push(e)}),l}})),Je=E(((e,t)=>{var n=Ge(),r=se(`path`).join,i=Ke(),a=`/etc`,o=process.platform===`win32`,s=o?process.env.USERPROFILE:process.env.HOME;t.exports=function(e,t,c,l){if(typeof e!=`string`)throw Error(`rc(name): name *must* be string`);c||=qe()(process.argv.slice(2)),t=(typeof t==`string`?n.json(t):t)||{},l||=n.parse;var u=n.env(e+`_`),d=[t],f=[];function p(e){if(!(f.indexOf(e)>=0)){var t=n.file(e);t&&(d.push(l(t)),f.push(e))}}return o||[r(a,e,`config`),r(a,e+`rc`)].forEach(p),s&&[r(s,`.config`,e,`config`),r(s,`.config`,e),r(s,`.`+e,`config`),r(s,`.`+e+`rc`)].forEach(p),p(n.find(`.`+e+`rc`)),u.config&&p(u.config),c.config&&p(c.config),i.apply(null,d.concat([u,c,f.length?{configs:f,config:f[f.length-1]}:void 0]))}}));function Ye(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function Xe(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
8
8
  `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
9
- `))}return i}var j,M=w((()=>{j=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=Ke(t.toml,t.ptr),i=qe(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}}}));function Je(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}function Ye(e,t=0,n=e.length){let r=e.indexOf(`
9
+ `))}return i}var j,M=T((()=>{j=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=Ye(t.toml,t.ptr),i=Xe(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}}}));function Ze(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}function Qe(e,t=0,n=e.length){let r=e.indexOf(`
10
10
  `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function N(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
11
11
  `)return n;if(r===`\r`&&e[n+1]===`
12
12
  `)return n+1;if(r<` `&&r!==` `||r===``)throw new j(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function P(e,t,n,r){let i;for(;(i=e[t])===` `||i===` `||!n&&(i===`
13
13
  `||i===`\r`&&e[t+1]===`
14
- `);)t++;return r||i!==`#`?t:P(e,N(e,t),n)}function Xe(e,t,n,r,i=!1){if(!r)return t=Ye(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=Ye(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
14
+ `);)t++;return r||i!==`#`?t:P(e,N(e,t),n)}function $e(e,t,n,r,i=!1){if(!r)return t=Qe(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=Qe(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
15
15
  `||t===`\r`&&e[a+1]===`
16
- `))return a}throw new j(`cannot find end of structure`,{toml:e,ptr:t})}function Ze(e,t){let n=e[t],r=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=r.length-1;do t=e.indexOf(r,++t);while(t>-1&&n!==`'`&&Je(e,t));return t>-1&&(t+=r.length,r.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}var Qe=w((()=>{M()})),$e,F,et=w((()=>{$e=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,F=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match($e);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}}}));function tt(e,t=0,n=e.length){let r=e[t]===`'`,i=e[t++]===e[t]&&e[t]===e[t+1];i&&(n-=2,e[t+=2]===`\r`&&t++,e[t]===`
16
+ `))return a}throw new j(`cannot find end of structure`,{toml:e,ptr:t})}function et(e,t){let n=e[t],r=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=r.length-1;do t=e.indexOf(r,++t);while(t>-1&&n!==`'`&&Ze(e,t));return t>-1&&(t+=r.length,r.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}var tt=T((()=>{M()})),nt,rt,it=T((()=>{nt=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,rt=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(nt);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}}}));function at(e,t=0,n=e.length){let r=e[t]===`'`,i=e[t++]===e[t]&&e[t]===e[t+1];i&&(n-=2,e[t+=2]===`\r`&&t++,e[t]===`
17
17
  `&&t++);let a=0,o,s=``,c=t;for(;t<n-1;){let n=e[t++];if(n===`
18
18
  `||n===`\r`&&e[t]===`
19
- `){if(!i)throw new j(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(n<` `&&n!==` `||n===``)throw new j(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(o){if(o=!1,n===`x`||n===`u`||n===`U`){let r=e.slice(t,t+=n===`x`?2:n===`u`?4:8);if(!ot.test(r))throw new j(`invalid unicode escape`,{toml:e,ptr:a});try{s+=String.fromCodePoint(parseInt(r,16))}catch{throw new j(`invalid unicode escape`,{toml:e,ptr:a})}}else if(i&&(n===`
19
+ `){if(!i)throw new j(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(n<` `&&n!==` `||n===``)throw new j(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(o){if(o=!1,n===`x`||n===`u`||n===`U`){let r=e.slice(t,t+=n===`x`?2:n===`u`?4:8);if(!ut.test(r))throw new j(`invalid unicode escape`,{toml:e,ptr:a});try{s+=String.fromCodePoint(parseInt(r,16))}catch{throw new j(`invalid unicode escape`,{toml:e,ptr:a})}}else if(i&&(n===`
20
20
  `||n===` `||n===` `||n===`\r`)){if(t=P(e,t-1,!0),e[t]!==`
21
- `&&e[t]!==`\r`)throw new j(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:a});t=P(e,t)}else if(n in st)s+=st[n];else throw new j(`unrecognized escape sequence`,{toml:e,ptr:a});c=t}else !r&&n===`\\`&&(a=t-1,o=!0,s+=e.slice(c,a))}return s+e.slice(c,n-1)}function nt(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=rt.test(e);if(i||it.test(e)){if(at.test(e))throw new j(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new j(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new j(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new F(e);if(!a.isValid())throw new j(`invalid value`,{toml:t,ptr:n});return a}var rt,it,at,ot,st,ct=w((()=>{Qe(),et(),M(),rt=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,it=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,at=/^[+-]?0[0-9_]/,ot=/^[0-9a-f]{2,8}$/i,st={b:`\b`,t:` `,n:`
22
- `,f:`\f`,r:`\r`,e:`\x1B`,'"':`"`,"\\":`\\`}}));function lt(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(N(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function ut(e,t,n,r,i){if(r===0)throw new j(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?mt(e,t,r,i):pt(e,t,r,i);if(n){if(s=P(e,s),e[s]===`,`)s++;else if(e[s]!==n)throw new j(`expected comma or end of structure`,{toml:e,ptr:s})}return[o,s]}let o;if(a===`"`||a===`'`){o=Ze(e,t);let r=tt(e,t,o);if(n){if(o=P(e,o),e[o]&&e[o]!==`,`&&e[o]!==n&&e[o]!==`
23
- `&&e[o]!==`\r`)throw new j(`unexpected character encountered`,{toml:e,ptr:o});o+=+(e[o]===`,`)}return[r,o]}o=Xe(e,t,`,`,n);let s=lt(e,t,o-+(e[o-1]===`,`));if(!s[0])throw new j(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=P(e,t+s[1]),o+=+(e[o]===`,`)),[nt(s[0],e,t,i),o]}var dt=w((()=>{ct(),gt(),Qe(),M()}));function ft(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new j(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new j(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let s=Ze(e,t);if(s<0)throw new j(`unfinished string encountered`,{toml:e,ptr:t});r=e.indexOf(`.`,s);let c=e.slice(s,r<0||r>a?a:r),l=Ye(c);if(l>-1)throw new j(`newlines are not allowed in keys`,{toml:e,ptr:t+r+l});if(c.trimStart())throw new j(`found extra tokens after the string part`,{toml:e,ptr:s});if(a<s&&(a=e.indexOf(n,s),a<0))throw new j(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(tt(e,t,s))}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!ht.test(n))throw new j(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,P(e,a+1,!0,!0)]}function pt(e,t,n,r){let i={},a=new Set,o;for(t++;(o=e[t++])!==`}`&&o;)if(o===`,`)throw new j(`expected value, found comma`,{toml:e,ptr:t-1});else if(o===`#`)t=N(e,t);else if(o!==` `&&o!==` `&&o!==`
24
- `&&o!==`\r`){let o,s=i,c=!1,[l,u]=ft(e,t-1);for(let n=0;n<l.length;n++){if(n&&(s=c?s[o]:s[o]={}),o=l[n],(c=Object.hasOwn(s,o))&&(typeof s[o]!=`object`||a.has(s[o])))throw new j(`trying to redefine an already defined value`,{toml:e,ptr:t});!c&&o===`__proto__`&&Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new j(`trying to redefine an already defined value`,{toml:e,ptr:t});let[d,f]=ut(e,u,`}`,n-1,r);a.add(d),s[o]=d,t=f}if(!o)throw new j(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function mt(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new j(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=N(e,t);else if(a!==` `&&a!==` `&&a!==`
25
- `&&a!==`\r`){let a=ut(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new j(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}var ht,gt=w((()=>{ct(),dt(),Qe(),M(),ht=/^[a-zA-Z0-9-_]+[ \t]*$/}));function _t(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function vt(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=P(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=ft(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new j(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=_t(n[0],r,i,t?2:1);if(!c)throw new j(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=ft(e,s),i=_t(r[0],a,o,0);if(!i)throw new j(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=ut(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=P(e,s,!0),e[s]&&e[s]!==`
26
- `&&e[s]!==`\r`)throw new j(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=P(e,s)}return r}var yt=w((()=>{gt(),dt(),Qe(),M()}));function I(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function bt(e){for(let t=0;t<e.length;t++)if(I(e[t])!==`object`)return!1;return e.length!=0}function xt(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function St(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return xt(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return Ct(e,n,r);if(t===`array`)return wt(e,n,r)}function Ct(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=Ot.test(o)?o:xt(o),i+=` = `,i+=St(e[o],I(e[o]),t-1,n)}return i+` }`}function wt(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=St(e[i],I(e[i]),t-1,n)}return r+` ]`}function Tt(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
27
- `}[[${t}]]\n`,i+=Et(0,e[a],t,n,r);return i}function Et(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=I(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=Ot.test(c)?c:xt(c);if(e===`array`&&bt(t[c]))o+=(o&&`
28
- `)+Tt(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
29
- `)+Et(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=St(t[c],e,r,i),a+=`
30
- `}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function Dt(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(I(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=Et(0,e,``,t,n);return r[r.length-1]===`
21
+ `&&e[t]!==`\r`)throw new j(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:a});t=P(e,t)}else if(n in dt)s+=dt[n];else throw new j(`unrecognized escape sequence`,{toml:e,ptr:a});c=t}else !r&&n===`\\`&&(a=t-1,o=!0,s+=e.slice(c,a))}return s+e.slice(c,n-1)}function ot(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=st.test(e);if(i||ct.test(e)){if(lt.test(e))throw new j(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new j(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new j(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new rt(e);if(!a.isValid())throw new j(`invalid value`,{toml:t,ptr:n});return a}var st,ct,lt,ut,dt,ft=T((()=>{tt(),it(),M(),st=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ct=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,lt=/^[+-]?0[0-9_]/,ut=/^[0-9a-f]{2,8}$/i,dt={b:`\b`,t:` `,n:`
22
+ `,f:`\f`,r:`\r`,e:`\x1B`,'"':`"`,"\\":`\\`}}));function pt(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(N(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function mt(e,t,n,r,i){if(r===0)throw new j(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?vt(e,t,r,i):_t(e,t,r,i);if(n){if(s=P(e,s),e[s]===`,`)s++;else if(e[s]!==n)throw new j(`expected comma or end of structure`,{toml:e,ptr:s})}return[o,s]}let o;if(a===`"`||a===`'`){o=et(e,t);let r=at(e,t,o);if(n){if(o=P(e,o),e[o]&&e[o]!==`,`&&e[o]!==n&&e[o]!==`
23
+ `&&e[o]!==`\r`)throw new j(`unexpected character encountered`,{toml:e,ptr:o});o+=+(e[o]===`,`)}return[r,o]}o=$e(e,t,`,`,n);let s=pt(e,t,o-+(e[o-1]===`,`));if(!s[0])throw new j(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=P(e,t+s[1]),o+=+(e[o]===`,`)),[ot(s[0],e,t,i),o]}var ht=T((()=>{ft(),bt(),tt(),M()}));function gt(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new j(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new j(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let s=et(e,t);if(s<0)throw new j(`unfinished string encountered`,{toml:e,ptr:t});r=e.indexOf(`.`,s);let c=e.slice(s,r<0||r>a?a:r),l=Qe(c);if(l>-1)throw new j(`newlines are not allowed in keys`,{toml:e,ptr:t+r+l});if(c.trimStart())throw new j(`found extra tokens after the string part`,{toml:e,ptr:s});if(a<s&&(a=e.indexOf(n,s),a<0))throw new j(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(at(e,t,s))}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!yt.test(n))throw new j(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,P(e,a+1,!0,!0)]}function _t(e,t,n,r){let i={},a=new Set,o;for(t++;(o=e[t++])!==`}`&&o;)if(o===`,`)throw new j(`expected value, found comma`,{toml:e,ptr:t-1});else if(o===`#`)t=N(e,t);else if(o!==` `&&o!==` `&&o!==`
24
+ `&&o!==`\r`){let o,s=i,c=!1,[l,u]=gt(e,t-1);for(let n=0;n<l.length;n++){if(n&&(s=c?s[o]:s[o]={}),o=l[n],(c=Object.hasOwn(s,o))&&(typeof s[o]!=`object`||a.has(s[o])))throw new j(`trying to redefine an already defined value`,{toml:e,ptr:t});!c&&o===`__proto__`&&Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new j(`trying to redefine an already defined value`,{toml:e,ptr:t});let[d,f]=mt(e,u,`}`,n-1,r);a.add(d),s[o]=d,t=f}if(!o)throw new j(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function vt(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new j(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=N(e,t);else if(a!==` `&&a!==` `&&a!==`
25
+ `&&a!==`\r`){let a=mt(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new j(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}var yt,bt=T((()=>{ft(),ht(),tt(),M(),yt=/^[a-zA-Z0-9-_]+[ \t]*$/}));function xt(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function St(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=P(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=gt(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new j(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=xt(n[0],r,i,t?2:1);if(!c)throw new j(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=gt(e,s),i=xt(r[0],a,o,0);if(!i)throw new j(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=mt(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=P(e,s,!0),e[s]&&e[s]!==`
26
+ `&&e[s]!==`\r`)throw new j(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=P(e,s)}return r}var Ct=T((()=>{bt(),ht(),tt(),M()}));function F(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function wt(e){for(let t=0;t<e.length;t++)if(F(e[t])!==`object`)return!1;return e.length!=0}function Tt(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function Et(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return Tt(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return Dt(e,n,r);if(t===`array`)return Ot(e,n,r)}function Dt(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=Mt.test(o)?o:Tt(o),i+=` = `,i+=Et(e[o],F(e[o]),t-1,n)}return i+` }`}function Ot(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=Et(e[i],F(e[i]),t-1,n)}return r+` ]`}function kt(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
27
+ `}[[${t}]]\n`,i+=At(0,e[a],t,n,r);return i}function At(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=F(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=Mt.test(c)?c:Tt(c);if(e===`array`&&wt(t[c]))o+=(o&&`
28
+ `)+kt(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
29
+ `)+At(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=Et(t[c],e,r,i),a+=`
30
+ `}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function jt(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(F(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=At(0,e,``,t,n);return r[r.length-1]===`
31
31
  `?r:r+`
32
- `}var Ot,kt=w((()=>{Ot=/^[a-z0-9-_]+$/i})),At=re({TomlDate:()=>F,TomlError:()=>j,default:()=>jt,parse:()=>vt,stringify:()=>Dt}),jt,Mt=w((()=>{yt(),kt(),et(),M(),jt={parse:vt,stringify:Dt,TomlDate:F,TomlError:j}}));const Nt=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Pt=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ft=/^[0-9a-f]{7,}$/i,It=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Lt=/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,L=e=>e.replace(/[|\\{}()[\]^$+*?.-]/g,`\\$&`),R=e=>e.endsWith(`/`)?e.substring(0,e.length-1):e,Rt=le,zt={"package.json":`npm`,"pyproject.toml":`pypi`,"go.mod":`go`},Bt={"allow-downgrade":{short:`d`,type:`string`,multiple:!0},"error-on-outdated":{short:`E`,type:`boolean`},"error-on-unchanged":{short:`U`,type:`boolean`},exclude:{short:`e`,type:`string`,multiple:!0},file:{short:`f`,type:`string`,multiple:!0},forgeapi:{type:`string`},goproxy:{type:`string`},greatest:{short:`g`,type:`string`,multiple:!0},help:{short:`h`,type:`boolean`},include:{short:`i`,type:`string`,multiple:!0},json:{short:`j`,type:`boolean`},jsrapi:{type:`string`},cooldown:{short:`C`,type:`string`},minor:{short:`m`,type:`string`,multiple:!0},modes:{short:`M`,type:`string`,multiple:!0},color:{short:`c`,type:`boolean`},"no-color":{short:`n`,type:`boolean`},patch:{short:`P`,type:`string`,multiple:!0},pin:{short:`l`,type:`string`,multiple:!0},prerelease:{short:`p`,type:`string`,multiple:!0},pypiapi:{type:`string`},registry:{short:`r`,type:`string`},release:{short:`R`,type:`string`,multiple:!0},sockets:{short:`s`,type:`string`},types:{short:`t`,type:`string`,multiple:!0},update:{short:`u`,type:`boolean`},verbose:{short:`V`,type:`boolean`},version:{short:`v`,type:`boolean`}};function z(e){return Array.isArray(e)&&e.every(e=>e===!0)?!0:Array.isArray(e)?new Set(e.flatMap(e=>typeof e==`string`?cn(e):``).filter(Boolean)):typeof e==`string`?new Set([e]):typeof e==`boolean`?e:!1}function Vt(e){for(let[t,{short:n}]of Object.entries(Bt))if(t===e||n===e)return t;return``}const B=v({strict:!1,allowPositionals:!0,tokens:!0,options:Bt}),V=B.values;for(let[e,t]of B.tokens.entries())if(t.kind===`option`&&t.value?.startsWith(`-`)){let n=Vt(t.value.substring(1)),r=B.tokens[e+1];V[t.name]=[!0],V[n]||(V[n]=[]),r.kind===`positional`&&r.value?V[n].push(r.value):V[n].push(!0)}const H=B.values,[Ht,Ut,Wt]=[`magenta`,`red`,`green`].map(e=>H[`no-color`]?String:t=>b(e,String(t))),U=Q(z(H.greatest)),Gt=Q(z(H.prerelease)),Kt=Q(z(H.release)),qt=Q(z(H.patch)),Jt=Q(z(H.minor)),Yt=Q(z(H[`allow-downgrade`])),Xt=z(H.modes)||new Set([`npm`,`pypi`,`go`]),Zt=typeof H.forgeapi==`string`?R(H.forgeapi):`https://api.github.com`,Qt=typeof H.pypiapi==`string`?R(H.pypiapi):`https://pypi.org`,$t=typeof H.jsrapi==`string`?R(H.jsrapi):`https://jsr.io`,en=typeof H.goproxy==`string`?R(H.goproxy):nn(),tn=rn();function nn(){let e=n.GOPROXY||`https://proxy.golang.org,direct`;for(let t of e.split(/[,|]/)){let e=t.trim();if(e&&e!==`direct`&&e!==`off`)return R(e)}return`https://proxy.golang.org`}function rn(){return(n.GONOPROXY||n.GOPRIVATE||``).split(`,`).map(e=>e.trim()).filter(Boolean)}function an(e){return tn.some(t=>e===t||e.startsWith(`${t}/`))}const W=e=>e.replace(/^v/,``);function G(e,t){for(let n of t instanceof Set?t:[])if(n.test(e))return!0;return!1}function on(e,t){let n=t[`${e}:registry`]||t.registry;return n.endsWith(`/`)?n:`${n}/`}function sn(e,t){return t.split(`.`).reduce((e,t)=>e?.[t]??null,e)}function cn(e){return e.split(`,`).filter(Boolean)}function ln(e){let t={};if(Array.isArray(e)){for(let n of e)if(typeof n==`string`){let[e,r]=n.split(`=`,2);e&&r&&Oe(r)&&(t[e]=r)}}else if(typeof e==`string`){let[n,r]=e.split(`=`,2);n&&r&&Oe(r)&&(t[n]=r)}return t}function un(e,t){let n=u(t,e);try{return p(n),n}catch{}let r=l(t);return r===t?null:un(e,r)}const dn=`https://registry.npmjs.org`;let K=null;const fn=new Map;async function pn(){return K||(await Promise.resolve().then(()=>ae(Ge(),1))).default(`npm`,{registry:dn})}function mn(e){return e.replace(/^\$\{?([^}]*)\}?$/,(e,t)=>n[t]||``)}function hn(e,t){let n=t[`${e}:_authToken`]||t[`${e}/:_authToken`];if(n)return{token:mn(n),type:`Bearer`};let r=t[`${e}:username`]||t[`${e}/:username`],i=t[`${e}:_password`]||t[`${e}/:_password`];if(r&&i){let e=Buffer.from(mn(i),`base64`).toString(`utf8`);return{token:Buffer.from(`${r}:${e}`).toString(`base64`),type:`Basic`,username:r,password:e}}let a=t[`${e}:_auth`]||t[`${e}/:_auth`];if(a)return{token:mn(a),type:`Basic`}}function q(e,t){let n=new URL(e.startsWith(`//`)?`http:${e}`:e),r;for(;r!==`/`&&n.pathname!==r;){r=n.pathname||`/`;let e=hn(`//${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:mn(i),type:`Basic`}}async function gn(e,t){K||=await pn();let n=e.startsWith(`@`)?(/@[a-z0-9][\w-.]+/.exec(e)||[``])[0]:``,r=`${n}:${t}`,i=fn.get(r);if(i)return i;let a;if(!e.startsWith(`@`))a={auth:q(t,K),registry:t};else{let e=R(on(n,K));if(e!==t)try{let n=q(e,K);a=n?.token?{auth:n,registry:e}:{auth:q(t,K),registry:t}}catch{a={auth:q(t,K),registry:t}}else a={auth:q(t,K),registry:t}}return fn.set(r,a),a}function _n(e,t){return{headers:{"user-agent":`updates/${Rt}`,"accept-encoding":`gzip, deflate, br`,...t&&{Authorization:`${e} ${t}`}}}}function vn(){let e=new Date;return[e.getFullYear(),`-`,String(e.getMonth()+1).padStart(2,`0`),`-`,String(e.getDate()).padStart(2,`0`),` `,String(e.getHours()).padStart(2,`0`),`:`,String(e.getMinutes()).padStart(2,`0`),`:`,String(e.getSeconds()).padStart(2,`0`)].join(``)}function yn(e){console.error(`${vn()} ${e}`)}const bn=[`|`,`/`,`-`,`\\`];let xn;function Sn(){if(H.json||H.verbose||!a.isTTY)return;let e=0;a.write(`\x1B[?25l`),xn=setInterval(()=>{a.write(`\r${bn[e++%bn.length]}`)},80)}function Cn(){xn&&(clearInterval(xn),xn=void 0,a.write(`\r \r\x1B[?25h`))}async function J(e,t){H.verbose&&yn(`${Ht(`fetch`)} ${e}`);let n=await fetch(e,t);return H.verbose&&yn(`${n.ok?Wt(n.status):Ut(n.status)} ${e}`),n}async function wn(e,t,n){K||=await pn();let{auth:r,registry:i}=await gn(e,R((typeof H.registry==`string`?H.registry:!1)||n.registry||K.registry||dn)),a=`${i}/${(t===`resolutions`?c(e):e).replace(/\//g,`%2f`)}`,o=await J(a,_n(r?.type,r?.token));if(o?.ok)return[await o.json(),t,i,e];throw o?.status&&o?.statusText?Error(`Received ${o.status} ${o.statusText} from ${a}`):Error(`Unable to fetch ${e} from ${i}`)}async function Tn(e,t){let n=`${Qt}/pypi/${e}/json`,r=await J(n,{headers:{"accept-encoding":`gzip, deflate, br`}});if(r?.ok)return[await r.json(),t,null,e];throw r?.status&&r?.statusText?Error(`Received ${r.status} ${r.statusText} from ${n}`):Error(`Unable to fetch ${e} from ${Qt}`)}function Y(e){return e.startsWith(`npm:@jsr/`)||e.startsWith(`jsr:`)}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 Dn(e,t){let n=/^@([^/]+)\/(.+)$/.exec(e);if(!n)throw Error(`Invalid JSR package name: ${e}`);let[,r,i]=n,a=`${$t}/@${r}/${i}/meta.json`,o=await J(a,{headers:{"accept-encoding":`gzip, deflate, br`}});if(o?.ok){let n=await o.json(),r={};for(let[e,t]of Object.entries(n.versions))r[e]={version:e,time:t.createdAt};return[{name:e,"dist-tags":{latest:n.latest},versions:r,time:Object.fromEntries(Object.entries(n.versions).map(([e,t])=>[e,t.createdAt]))},t,$t,e]}else if(o?.status&&o?.statusText)throw Error(`Received ${o.status} ${o.statusText} from ${a}`);else throw Error(`Unable to fetch ${e} from JSR`)}function On(e){return e.replace(/[A-Z]/g,e=>`!${e.toLowerCase()}`)}function kn(e){let t=/\/v(\d+)$/.exec(e);return t?parseInt(t[1]):1}function An(e,t){return t<=1?e.replace(/\/v\d+$/,``):`${e.replace(/\/v\d+$/,``)}/v${t}`}function jn(e){let t={},n=e.split(/\r?\n/),r=!1;for(let e of n){let n=e.trim();if(/^require\s*\(/.test(n)){r=!0;continue}if(n===`)`){r=!1;continue}if(n.includes(`// indirect`))continue;let i=r?/^(\S+)\s+(v\S+)/.exec(n):/^require\s+(\S+)\s+(v\S+)/.exec(n);i&&(t[i[1]]=i[2])}return t}async function Mn(e,t,n){let r=[{old:n,new:n},t,null,e];if(an(e))return r;let i=On(e),a=kn(e),o=async t=>{let n=An(e,t);return J(`${en}/${On(n)}/@latest`,{signal:AbortSignal.timeout(5e3)}).then(async e=>e.ok?{...await e.json(),path:n}:null).catch(()=>null)},[s,c]=await Promise.all([J(`${en}/${i}/@latest`,{signal:AbortSignal.timeout(1e4)}),o(a+1)]);if(!s.ok)return r;let l,u;try{let e=await s.json();l=e.Version,u=e.Time}catch{return r}let d=l,f=u,p=e,m=e=>{d=e.Version,f=e.Time,p=e.path};if(c){m(c);let e=await o(a+2);if(e){m(e);for(let e=a+3;e<=a+100;e+=20){let t=Math.min(e+20,a+101),n=Array.from({length:t-e},(t,n)=>({result:o(e+n)})),r=await Promise.all(n.map(e=>e.result)),i=!1;for(let e of r){if(!e)break;m(e),i=!0}if(!i||r.some(e=>!e))break}}}return[{old:n,new:W(d),Time:f,...p===e?{}:{newPath:p},sameMajorNew:W(l),sameMajorTime:u},t,null,e]}function Nn(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}function Pn(e){return e.startsWith(`https://bitbucket.org`)?`src/HEAD`:`tree/HEAD`}function Fn({repository:e,homepage:t,info:n},r,i){n&&(e=n.project_urls.repository||n.project_urls.Repository||n.project_urls.repo||n.project_urls.Repo||n.project_urls.source||n.project_urls.Source||n.project_urls[`source code`]||n.project_urls[`Source code`]||n.project_urls[`Source Code`]||n.project_urls.homepage||n.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a=``;return r===`https://npm.pkg.github.com`?`https://github.com/${i.replace(/^@/,``)}`:(e&&(a=Nn(typeof e==`string`?e:e.url),a&&typeof e!=`string`&&e.directory&&(a=`${a}/${Pn(a)}/${e.directory}`)),a||t||``)}function In(e){let t=`https://${Un(e)}`,n=new URL(t),r=n.pathname.split(`/`);if(r.length>3){let[e,i,a,...o]=r;return n.pathname=`/${i}/${a}/${Pn(t)}/${o.join(`/`)}`,n.toString()}else return t}async function Ln(e){console.info(H.json?JSON.stringify({message:e}):e),await X()}async function X(e,t){if(Cn(),e){let t=e.stack??e.message,n=e.cause;H.json?console.info(JSON.stringify({error:t,cause:n})):(console.info(Ut(t)),n&&console.info(Ut(`Caused by: ${String(n)}`)))}i===`win32`&&Number(s?.node?.split(`.`)[0])>=23&&await new Promise(e=>setTimeout(e,50)),r(t||e?1:0)}function Rn(e={}){for(let t of Object.keys(e))for(let n of Object.values(e[t]))typeof n.oldPrint==`string`&&(n.old=n.oldPrint),typeof n.newPrint==`string`&&(n.new=n.newPrint),typeof n.oldOrig==`string`&&!Y(n.oldOrig)&&(n.old=n.oldOrig),delete n.oldPrint,delete n.newPrint,delete n.oldOrig,delete n.date;let t=0;for(let n of Object.keys(e))t+=Object.keys(e[n]).length;if(H.json){let t={results:{}};for(let n of Object.keys(e))for(let[r,i]of Object.entries(e[n])){let[e,a]=r.split(`\0`);t.results[n]||(t.results[n]={}),t.results[n][e]||(t.results[n][e]={}),t.results[n][e][a]=i}console.info(JSON.stringify(t))}else t&&console.info(Wn(e));return H[`error-on-outdated`]?t?2:0:H[`error-on-unchanged`]?t?0:2:0}function zn(e,t){i===`win32`&&g(e,0),_(e,t,i===`win32`?{flag:`r+`}:void 0)}function Bn(e,t,n){if(e===t)return e;let r=e.split(/\./),i=t.split(/\./),a=/^[0-9a-zA-Z-.]+$/,o=``;for(let e=0;e<r.length;e++)if(r[e]!==i[e]){a.test(r[e])?o+=n(r.slice(e).join(`.`)):o+=r[e].split(``).map(e=>a.test(e)?n(e):e).join(``)+n(`.${r.slice(e+1).join(`.`)}`.replace(/\.$/,``));break}else o+=`${r[e]}.`;return o.replace(/\.$/,``)}const Vn=e=>y(e).length;function Hn(e,t=` `){let n=``,r=Array(e[0].length).fill(0);for(let t of e)for(let[e,n]of t.entries()){let t=Vn(n);t>r[e]&&(r[e]=t)}for(let[i,a]of e.entries()){for(let[e,i]of a.entries()){e>0&&(n+=t);let o=` `.repeat(r[e]-Vn(i));n+=i+(e===a.length-1?``:o)}i<e.length-1&&(n+=`
33
- `)}return n}function Un(e){return/\/v[0-9]$/.test(e)?l(e):e}function Wn(e){let t=Object.keys(e).filter(t=>Object.keys(e[t]).length>0),n=t.length>1,r=[n?[`NAME`,`MODE`,`OLD`,`NEW`,`AGE`,`INFO`]:[`NAME`,`OLD`,`NEW`,`AGE`,`INFO`]],i=new Set;for(let a of t)for(let[t,o]of Object.entries(e[a])){let[e,s]=t.split(`\0`),c=`${a}|${s}`;if(i.has(c))continue;i.add(c);let l=[];l.push(a===`go`?Un(s):s),n&&l.push(a),l.push(Bn(o.old,o.new,Ut)),l.push(Bn(o.new,o.old,Wt)),l.push(o.age||``),l.push(o.info||``),r.push(l)}return Hn(r)}function Gn(e,t){let n=e;for(let[e,{old:r,oldOrig:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;if(a===`packageManager`){let r=RegExp(`"${L(a)}": *"${o}@${L(s)}"`,`g`);n=n.replace(r,`"${a}": "${o}@${t[e].new}"`)}else{let r=RegExp(`"${L(o)}": *"${L(s)}"`,`g`);n=n.replace(r,`"${o}": "${t[e].new}"`)}}return n}function Kn(e,t){let n=e;for(let[e,{old:r,oldOrig:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;n=n.replace(RegExp(`${L(o)} *= *"${L(s)}"`,`g`),`${o} = "${t[e].new}"`),n=n.replace(RegExp(`("${L(o)} *[<>=~]+ *)${L(s)}(")`,`g`),(n,r,i)=>`${r}${t[e].new}${i}`)}return n}function qn(e,t){let n=e;for(let[e,{old:r,oldOrig:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r,c=t[e].new,l=kn(o),u=parseInt(c.split(`.`)[0]);if(l!==u&&u>1){let e=An(o,u);n=n.replace(RegExp(`${L(o)} +v${L(s)}`,`g`),`${e} v${c}`)}else n=n.replace(RegExp(`(${L(o)}) +v${L(s)}`,`g`),`$1 v${c}`)}return n}function Jn(e,t,n){let r=e.replace(Lt,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 Yn(e){let t=pe(e);return t?!!t.prerelease.length:!1}function Xn(e){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e)}function Z(e){try{return me(e)?.version??``}catch{return``}}function Zn(e,t,{range:n,semvers:r,usePre:i,useRel:a,useGreatest:o,pinnedRange:s}){let c=Z(n);if(!c)return c;i=Xn(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 l=0,u=c;for(let n of t){let t=pe(n);if(!t?.version||t.prerelease.length&&(!i||a))continue;let c=t.version;if(s&&!De(c,s))continue;let d=k(u,c);if(!(!d||!r.has(d)))if(o||!(`time`in e))ge(Z(c),u)&&(u=c);else{let t=new Date(e.time[n]).getTime();t>=0&&t>l&&(u=c,l=t)}}return u||null}function Qn(e,{mode:t,range:n,useGreatest:r,useRel:i,usePre:a,semvers:o,pinnedRange:s}){if(n===`*`||n.includes(`||`))return null;let c=[];if(t===`pypi`)c=Object.keys(e.releases).filter(e=>O(e));else if(t===`npm`)c=Object.keys(e.versions).filter(e=>O(e));else if(t===`go`){let t=Z(n);if(!t)return null;let r=Z(e.new);if(r){let n=k(t,r);if(n&&o.has(n))return e.new}let i=Z(e.sameMajorNew);if(i){let n=k(t,i);if(n&&o.has(n))return e.Time=e.sameMajorTime,delete e.newPath,e.sameMajorNew}return null}let l=Zn(e,c,{range:n,semvers:o,usePre:a,useRel:i,useGreatest:r,pinnedRange:s});if(!l)return null;if(r)return l;{let r=``,c=``;t===`pypi`?(c=e.info.version,r=Z(e.info.version)):r=e[`dist-tags`].latest;let u=Z(n),d=Xn(n),f=Yn(l),p=Yn(r),m=he(l,u);if(!i&&a||d&&f||i&&!m&&d&&!f||d&&!f&&m)return l;if(d&&!f&&!m)return null;let h=k(u,r);return h&&h!==`prerelease`&&!o.has(h.replace(/^pre/,``))||i&&Yn(r)?l:_e(r,u)&&!p?Yt===!0||G(e.name,Yt)?r:null:!d&&p&&!a||s&&!De(r,s)?l:c||r}}function $n(e){let t={headers:{"accept-encoding":`gzip, deflate, br`}},r=n.UPDATES_GITHUB_API_TOKEN||n.GITHUB_API_TOKEN||n.GH_TOKEN||n.GITHUB_TOKEN||n.HOMEBREW_GITHUB_API_TOKEN;return r&&(t.headers={...t.headers,Authorization:`Bearer ${r}`}),J(e,t)}async function er(e,t){let n=await $n(`${Zt}/repos/${e}/${t}/commits`);if(!n?.ok)return{hash:``,commit:{}};let{sha:r,commit:i}=(await n.json())[0];return{hash:r,commit:i}}async function tr(e,t){let n=await $n(`${Zt}/repos/${e}/${t}/git/refs/tags`);return n?.ok?(await n.json()).map(e=>e.ref.replace(/^refs\/tags\//,``)):[]}function nr(e,t,n){let r=W(t);if(!O(r))return null;if(n){let n=t,i=W(t);for(let t of e){let e=W(t);O(e)&&(!n||he(e,i))&&(n=t,i=e)}if(ve(r,i))return n}else{let t=e.at(-1);if(!t)return null;let n=W(t);if(!O(n))return null;if(ve(r,n))return t}return null}async function rr(e,t,n){let r=t.old.replace(Nt,``),[i,a,o,s]=Pt.exec(r)||[];if(!a||!o||!s)return null;if(Ft.test(s)){let{hash:n,commit:r}=await er(a,o);if(!n)return null;let i=r?.committer?.date??r?.author?.date,c=n.substring(0,s.length);if(s!==c)return{key:e,newRange:t.old.replace(s,c),user:a,repo:o,oldRef:s,newRef:c,newDate:i}}else{let t=nr(await tr(a,o),s,n);if(t)return{key:e,newRange:t,user:a,repo:o,oldRef:s,newRef:t}}return null}function ir(e){return e.replace(/-.*/,``)}function ar(e){let t=e.match(It);return t?.length===1?e.replace(It,Z(t[0])):e}function or(e,t){return RegExp(`^${L(e).replaceAll(`\\*`,`.*`)}$`,t?`i`:``)}function sr(e,t,n){return t&&typeof e==`string`?/^\/.+\/$/.test(e)?new RegExp(e.slice(1,-1)):or(e,n):e instanceof RegExp?e:or(e,n)}function Q(e){if(e instanceof Set){let t=new Set;for(let n of e)t.add(sr(n,!0,!1));return t}return e}function cr(e,t){let n=new Set;for(let t of e||[])n.add(sr(t,!0,!0));for(let e of t||[])n.add(sr(e,!1,!0));return n}function $(e,t,n,r,i){if(i===`engines`&&Ie.includes(e)||t===`pypi`&&e===`python`)return!1;if(!n.size&&!r.size)return!0;for(let t of r)if(t.test(e))return!1;for(let t of n)if(t.test(e))return!0;return!n.size}function lr(e,t,n){return!e||!t?!0:(n-Date.parse(e))/(24*3600*1e3)>=t}function ur(e){let n=new Set,r=new Set;if(e)for(let t of e){let e;try{e=m(t)}catch(e){throw Error(`Unable to open ${t}: ${e.message}`)}if(e?.isFile()){let e=d(t);n.add(e),r.add(e)}else if(e?.isDirectory())for(let e of Object.keys(zt)){let r=u(t,e),i=null;try{i=m(r)}catch{}i?.isFile()&&n.add(d(r))}else throw Error(`${t} is neither a file nor directory`)}else for(let e of Object.keys(zt)){let r=un(e,t());r&&n.add(d(r))}return[n,r]}async function dr(e){let t=[];for(let e of[``,`.config/`])for(let n of[`js`,`ts`,`mjs`,`mts`])t.push(`${e}updates${e?``:`.config`}.${n}`);let n={};try{({default:n}=await Promise.any(t.map(async t=>{let n=u(e,...t.split(`/`)),r=f(n);try{p(n)}catch{throw Error(`File not found: ${t}`)}try{return await import(r.href)}catch(e){throw Error(`Unable to parse config file ${t}: ${e.message}`)}})))}catch(e){if(e instanceof AggregateError){let t=e.errors.filter(e=>e.message.startsWith(`Unable to parse`));if(t.length>0)throw t[0]}}return n}async function fr(){for(let e of[o,a])e?._handle?.setBlocking?.(!0);let e=typeof H.sockets==`number`?H.sockets:96,{help:t,version:n,file:r,types:i,update:s}=H;t&&(o.write(`usage: updates [options]
32
+ `}var Mt,Nt=T((()=>{Mt=/^[a-z0-9-_]+$/i})),Pt=ie({TomlDate:()=>rt,TomlError:()=>j,default:()=>Ft,parse:()=>St,stringify:()=>jt}),Ft,It=T((()=>{Ct(),Nt(),it(),M(),Ft={parse:St,stringify:jt,TomlDate:rt,TomlError:j}}));const Lt=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Rt=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,zt=/^[0-9a-f]{7,}$/i,Bt=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Vt=/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,I=e=>e.replace(/[|\\{}()[\]^$+*?.-]/g,`\\$&`),L=e=>e.endsWith(`/`)?e.substring(0,e.length-1):e,Ht=ue,Ut={"package.json":`npm`,"pyproject.toml":`pypi`,"go.mod":`go`},Wt={"allow-downgrade":{short:`d`,type:`string`,multiple:!0},"error-on-outdated":{short:`E`,type:`boolean`},"error-on-unchanged":{short:`U`,type:`boolean`},exclude:{short:`e`,type:`string`,multiple:!0},file:{short:`f`,type:`string`,multiple:!0},forgeapi:{type:`string`},goproxy:{type:`string`},greatest:{short:`g`,type:`string`,multiple:!0},help:{short:`h`,type:`boolean`},include:{short:`i`,type:`string`,multiple:!0},json:{short:`j`,type:`boolean`},jsrapi:{type:`string`},cooldown:{short:`C`,type:`string`},minor:{short:`m`,type:`string`,multiple:!0},modes:{short:`M`,type:`string`,multiple:!0},color:{short:`c`,type:`boolean`},"no-color":{short:`n`,type:`boolean`},patch:{short:`P`,type:`string`,multiple:!0},pin:{short:`l`,type:`string`,multiple:!0},prerelease:{short:`p`,type:`string`,multiple:!0},pypiapi:{type:`string`},registry:{short:`r`,type:`string`},release:{short:`R`,type:`string`,multiple:!0},sockets:{short:`s`,type:`string`},types:{short:`t`,type:`string`,multiple:!0},update:{short:`u`,type:`boolean`},verbose:{short:`V`,type:`boolean`},version:{short:`v`,type:`boolean`}};function R(e){return Array.isArray(e)&&e.every(e=>e===!0)?!0:Array.isArray(e)?new Set(e.flatMap(e=>typeof e==`string`?dn(e):``).filter(Boolean)):typeof e==`string`?new Set([e]):typeof e==`boolean`?e:!1}function Gt(e){for(let[t,{short:n}]of Object.entries(Wt))if(t===e||n===e)return t;return``}const z=y({strict:!1,allowPositionals:!0,tokens:!0,options:Wt}),B=z.values;for(let[e,t]of z.tokens.entries())if(t.kind===`option`&&t.value?.startsWith(`-`)){let n=Gt(t.value.substring(1)),r=z.tokens[e+1];B[t.name]=[!0],B[n]||(B[n]=[]),r.kind===`positional`&&r.value?B[n].push(r.value):B[n].push(!0)}const V=z.values,[Kt,H,qt]=[`magenta`,`red`,`green`].map(e=>V[`no-color`]?String:t=>x(e,String(t))),U=Q(R(V.greatest)),Jt=Q(R(V.prerelease)),Yt=Q(R(V.release)),Xt=Q(R(V.patch)),Zt=Q(R(V.minor)),Qt=Q(R(V[`allow-downgrade`])),$t=R(V.modes)||new Set([`npm`,`pypi`,`go`]),en=typeof V.forgeapi==`string`?L(V.forgeapi):`https://api.github.com`,tn=typeof V.pypiapi==`string`?L(V.pypiapi):`https://pypi.org`,nn=typeof V.jsrapi==`string`?L(V.jsrapi):`https://jsr.io`,rn=typeof V.goproxy==`string`?L(V.goproxy):on(),an=sn();function on(){let e=n.GOPROXY||`https://proxy.golang.org,direct`;for(let t of e.split(/[,|]/)){let e=t.trim();if(e&&e!==`direct`&&e!==`off`)return L(e)}return`https://proxy.golang.org`}function sn(){return(n.GONOPROXY||n.GOPRIVATE||``).split(`,`).map(e=>e.trim()).filter(Boolean)}function cn(e){return an.some(t=>e===t||e.startsWith(`${t}/`))}const W=e=>e.replace(/^v/,``);function G(e,t){for(let n of t instanceof Set?t:[])if(n.test(e))return!0;return!1}function ln(e,t){let n=t[`${e}:registry`]||t.registry;return n.endsWith(`/`)?n:`${n}/`}function un(e,t){return t.split(`.`).reduce((e,t)=>e?.[t]??null,e)}function dn(e){return e.split(`,`).filter(Boolean)}function fn(e){let t={};if(Array.isArray(e)){for(let n of e)if(typeof n==`string`){let[e,r]=n.split(`=`,2);e&&r&&Ae(r)&&(t[e]=r)}}else if(typeof e==`string`){let[n,r]=e.split(`=`,2);n&&r&&Ae(r)&&(t[n]=r)}return t}function pn(e,t){let n=u(t,e);try{return p(n),n}catch{}let r=l(t);return r===t?null:pn(e,r)}const mn=`https://registry.npmjs.org`;let K=null;const hn=new Map;async function gn(){return K||(await Promise.resolve().then(()=>oe(Je(),1))).default(`npm`,{registry:mn})}function _n(e){return e.replace(/^\$\{?([^}]*)\}?$/,(e,t)=>n[t]||``)}function vn(e,t){let n=t[`${e}:_authToken`]||t[`${e}/:_authToken`];if(n)return{token:_n(n),type:`Bearer`};let r=t[`${e}:username`]||t[`${e}/:username`],i=t[`${e}:_password`]||t[`${e}/:_password`];if(r&&i){let e=Buffer.from(_n(i),`base64`).toString(`utf8`);return{token:Buffer.from(`${r}:${e}`).toString(`base64`),type:`Basic`,username:r,password:e}}let a=t[`${e}:_auth`]||t[`${e}/:_auth`];if(a)return{token:_n(a),type:`Basic`}}function q(e,t){let n=new URL(e.startsWith(`//`)?`http:${e}`:e),r;for(;r!==`/`&&n.pathname!==r;){r=n.pathname||`/`;let e=vn(`//${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:_n(i),type:`Basic`}}async function yn(e,t){K||=await gn();let n=e.startsWith(`@`)?(/@[a-z0-9][\w-.]+/.exec(e)||[``])[0]:``,r=`${n}:${t}`,i=hn.get(r);if(i)return i;let a;if(!e.startsWith(`@`))a={auth:q(t,K),registry:t};else{let e=L(ln(n,K));if(e!==t)try{let n=q(e,K);a=n?.token?{auth:n,registry:e}:{auth:q(t,K),registry:t}}catch{a={auth:q(t,K),registry:t}}else a={auth:q(t,K),registry:t}}return hn.set(r,a),a}function bn(e,t){return{headers:{"user-agent":`updates/${Ht}`,"accept-encoding":`gzip, deflate, br`,...t&&{Authorization:`${e} ${t}`}}}}function xn(){let e=new Date;return[e.getFullYear(),`-`,String(e.getMonth()+1).padStart(2,`0`),`-`,String(e.getDate()).padStart(2,`0`),` `,String(e.getHours()).padStart(2,`0`),`:`,String(e.getMinutes()).padStart(2,`0`),`:`,String(e.getSeconds()).padStart(2,`0`)].join(``)}function Sn(e){console.error(`${xn()} ${e}`)}async function J(e,t){V.verbose&&Sn(`${Kt(`fetch`)} ${e}`);let n=await fetch(e,t);return V.verbose&&Sn(`${n.ok?qt(n.status):H(n.status)} ${e}`),n}async function Cn(e,t,n){K||=await gn();let{auth:r,registry:i}=await yn(e,L((typeof V.registry==`string`?V.registry:!1)||n.registry||K.registry||mn)),a=`${i}/${(t===`resolutions`?c(e):e).replace(/\//g,`%2f`)}`,o=await J(a,bn(r?.type,r?.token));if(o?.ok)return[await o.json(),t,i,e];throw o?.status&&o?.statusText?Error(`Received ${o.status} ${o.statusText} from ${a}`):Error(`Unable to fetch ${e} from ${i}`)}async function wn(e,t){let n=`${tn}/pypi/${e}/json`,r=await J(n,{headers:{"accept-encoding":`gzip, deflate, br`}});if(r?.ok)return[await r.json(),t,null,e];throw r?.status&&r?.statusText?Error(`Received ${r.status} ${r.statusText} from ${n}`):Error(`Unable to fetch ${e} from ${tn}`)}function Y(e){return e.startsWith(`npm:@jsr/`)||e.startsWith(`jsr:`)}function Tn(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 En(e,t){let n=/^@([^/]+)\/(.+)$/.exec(e);if(!n)throw Error(`Invalid JSR package name: ${e}`);let[,r,i]=n,a=`${nn}/@${r}/${i}/meta.json`,o=await J(a,{headers:{"accept-encoding":`gzip, deflate, br`}});if(o?.ok){let n=await o.json(),r={};for(let[e,t]of Object.entries(n.versions))r[e]={version:e,time:t.createdAt};return[{name:e,"dist-tags":{latest:n.latest},versions:r,time:Object.fromEntries(Object.entries(n.versions).map(([e,t])=>[e,t.createdAt]))},t,nn,e]}else if(o?.status&&o?.statusText)throw Error(`Received ${o.status} ${o.statusText} from ${a}`);else throw Error(`Unable to fetch ${e} from JSR`)}function Dn(e){return e.replace(/[A-Z]/g,e=>`!${e.toLowerCase()}`)}function On(e){let t=/\/v(\d+)$/.exec(e);return t?parseInt(t[1]):1}function kn(e,t){return t<=1?e.replace(/\/v\d+$/,``):`${e.replace(/\/v\d+$/,``)}/v${t}`}function An(e){let t={},n=e.split(/\r?\n/),r=!1;for(let e of n){let n=e.trim();if(/^require\s*\(/.test(n)){r=!0;continue}if(n===`)`){r=!1;continue}if(n.includes(`// indirect`))continue;let i=r?/^(\S+)\s+(v\S+)/.exec(n):/^require\s+(\S+)\s+(v\S+)/.exec(n);i&&(t[i[1]]=i[2])}return t}async function jn(e,t,n){let r=[{old:n,new:n},t,null,e];if(cn(e))return r;let i=Dn(e),a=On(e),o=async t=>{let n=kn(e,t);return J(`${rn}/${Dn(n)}/@latest`,{signal:AbortSignal.timeout(3e3)}).then(async e=>e.ok?{...await e.json(),path:n}:null).catch(()=>null)},[s,c]=await Promise.all([J(`${rn}/${i}/@latest`,{signal:AbortSignal.timeout(1e4)}),o(a+1)]);if(!s.ok)return r;let l,u;try{let e=await s.json();l=e.Version,u=e.Time}catch{return r}let d=l,f=u,p=e,m=e=>{d=e.Version,f=e.Time,p=e.path};if(c){m(c);let e=await o(a+2);if(e){m(e);for(let e=a+3;e<=a+100;e+=20){let t=Math.min(e+20,a+101),n=Array.from({length:t-e},(t,n)=>({result:o(e+n)})),r=await Promise.all(n.map(e=>e.result)),i=!1;for(let e of r){if(!e)break;m(e),i=!0}if(!i||r.some(e=>!e))break}}}return[{old:n,new:W(d),Time:f,...p===e?{}:{newPath:p},sameMajorNew:W(l),sameMajorTime:u},t,null,e]}function Mn(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}function Nn(e){return e.startsWith(`https://bitbucket.org`)?`src/HEAD`:`tree/HEAD`}function Pn({repository:e,homepage:t,info:n},r,i){n&&(e=n.project_urls.repository||n.project_urls.Repository||n.project_urls.repo||n.project_urls.Repo||n.project_urls.source||n.project_urls.Source||n.project_urls[`source code`]||n.project_urls[`Source code`]||n.project_urls[`Source Code`]||n.project_urls.homepage||n.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a=``;return r===`https://npm.pkg.github.com`?`https://github.com/${i.replace(/^@/,``)}`:(e&&(a=Mn(typeof e==`string`?e:e.url),a&&typeof e!=`string`&&e.directory&&(a=`${a}/${Nn(a)}/${e.directory}`)),a||t||``)}function Fn(e){let t=`https://${Hn(e)}`,n=new URL(t),r=n.pathname.split(`/`);if(r.length>3){let[e,i,a,...o]=r;return n.pathname=`/${i}/${a}/${Nn(t)}/${o.join(`/`)}`,n.toString()}else return t}async function In(e){console.info(V.json?JSON.stringify({message:e}):e),await X()}async function X(e,t){if(e){let t=e.stack??e.message,n=e.cause;V.json?console.info(JSON.stringify({error:t,cause:n})):(console.info(H(t)),n&&console.info(H(`Caused by: ${String(n)}`)))}i===`win32`&&Number(s?.node?.split(`.`)[0])>=23&&await new Promise(e=>setTimeout(e,50)),r(t||e?1:0)}function Ln(e={}){for(let t of Object.keys(e))for(let n of Object.values(e[t]))typeof n.oldPrint==`string`&&(n.old=n.oldPrint),typeof n.newPrint==`string`&&(n.new=n.newPrint),typeof n.oldOrig==`string`&&!Y(n.oldOrig)&&(n.old=n.oldOrig),delete n.oldPrint,delete n.newPrint,delete n.oldOrig,delete n.date;let t=0;for(let n of Object.keys(e))t+=Object.keys(e[n]).length;if(V.json){let t={results:{}};for(let n of Object.keys(e))for(let[r,i]of Object.entries(e[n])){let[e,a]=r.split(`\0`);t.results[n]||(t.results[n]={}),t.results[n][e]||(t.results[n][e]={}),t.results[n][e][a]=i}console.info(JSON.stringify(t))}else t&&console.info(Un(e));return V[`error-on-outdated`]?t?2:0:V[`error-on-unchanged`]?t?0:2:0}function Rn(e,t){i===`win32`&&_(e,0),v(e,t,i===`win32`?{flag:`r+`}:void 0)}function zn(e,t,n){if(e===t)return e;let r=e.split(/\./),i=t.split(/\./),a=/^[0-9a-zA-Z-.]+$/,o=``;for(let e=0;e<r.length;e++)if(r[e]!==i[e]){a.test(r[e])?o+=n(r.slice(e).join(`.`)):o+=r[e].split(``).map(e=>a.test(e)?n(e):e).join(``)+n(`.${r.slice(e+1).join(`.`)}`.replace(/\.$/,``));break}else o+=`${r[e]}.`;return o.replace(/\.$/,``)}const Bn=e=>b(e).length;function Vn(e,t=` `){let n=``,r=Array(e[0].length).fill(0);for(let t of e)for(let[e,n]of t.entries()){let t=Bn(n);t>r[e]&&(r[e]=t)}for(let[i,a]of e.entries()){for(let[e,i]of a.entries()){e>0&&(n+=t);let o=` `.repeat(r[e]-Bn(i));n+=i+(e===a.length-1?``:o)}i<e.length-1&&(n+=`
33
+ `)}return n}function Hn(e){return/\/v[0-9]$/.test(e)?l(e):e}function Un(e){let t=Object.keys(e).filter(t=>Object.keys(e[t]).length>0),n=t.length>1,r=[n?[`NAME`,`MODE`,`OLD`,`NEW`,`AGE`,`INFO`]:[`NAME`,`OLD`,`NEW`,`AGE`,`INFO`]],i=new Set;for(let a of t)for(let[t,o]of Object.entries(e[a])){let[e,s]=t.split(`\0`),c=`${a}|${s}`;if(i.has(c))continue;i.add(c);let l=[];l.push(a===`go`?Hn(s):s),n&&l.push(a),l.push(zn(o.old,o.new,H)),l.push(zn(o.new,o.old,qt)),l.push(o.age||``),l.push(o.info||``),r.push(l)}return Vn(r)}function Wn(e,t){let n=e;for(let[e,{old:r,oldOrig:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;if(a===`packageManager`){let r=RegExp(`"${I(a)}": *"${o}@${I(s)}"`,`g`);n=n.replace(r,`"${a}": "${o}@${t[e].new}"`)}else{let r=RegExp(`"${I(o)}": *"${I(s)}"`,`g`);n=n.replace(r,`"${o}": "${t[e].new}"`)}}return n}function Gn(e,t){let n=e;for(let[e,{old:r,oldOrig:i}]of Object.entries(t)){let[a,o]=e.split(`\0`),s=i||r;n=n.replace(RegExp(`${I(o)} *= *"${I(s)}"`,`g`),`${o} = "${t[e].new}"`),n=n.replace(RegExp(`("${I(o)} *[<>=~]+ *)${I(s)}(")`,`g`),(n,r,i)=>`${r}${t[e].new}${i}`)}return n}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,u=On(s),d=parseInt(l.split(`.`)[0]);if(u!==d&&d>1){let e=kn(s,d);n=n.replace(RegExp(`${I(s)} +v${I(c)}`,`g`),`${e} v${l}`),r[s]=e}else n=n.replace(RegExp(`(${I(s)}) +v${I(c)}`,`g`),`$1 v${l}`)}return[n,r]}function qn(e,t){if(!Object.keys(t).length)return;let n=m(`**/*.go`,{cwd:e});for(let r of n){let n=u(e,r),i=g(n,`utf8`),a=!1;for(let[e,n]of Object.entries(t)){let t=RegExp(`"${I(e)}(/|")`,`g`),r=i.replace(t,`"${n}$1`);r!==i&&(i=r,a=!0)}a&&Rn(n,i)}}function Jn(e,t,n){let r=e.replace(Vt,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 Yn(e){let t=me(e);return t?!!t.prerelease.length:!1}function Xn(e){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(e)}function Z(e){try{return he(e)?.version??``}catch{return``}}function Zn(e,t,{range:n,semvers:r,usePre:i,useRel:a,useGreatest:o,pinnedRange:s}){let c=Z(n);if(!c)return c;i=Xn(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 l=0,u=c;for(let n of t){let t=me(n);if(!t?.version||t.prerelease.length&&(!i||a))continue;let c=t.version;if(s&&!ke(c,s))continue;let d=ge(u,c);if(!(!d||!r.has(d)))if(o||!(`time`in e))ve(Z(c),u)&&(u=c);else{let t=new Date(e.time[n]).getTime();t>=0&&t>l&&(u=c,l=t)}}return u||null}function Qn(e,{mode:t,range:n,useGreatest:r,useRel:i,usePre:a,semvers:o,pinnedRange:s}){if(n===`*`||n.includes(`||`))return null;let c=[];if(t===`pypi`)c=Object.keys(e.releases).filter(e=>k(e));else if(t===`npm`)c=Object.keys(e.versions).filter(e=>k(e));else if(t===`go`){let t=Z(n);if(!t)return null;let r=Z(e.new);if(r){let n=ge(t,r);if(n&&o.has(n))return e.new}let i=Z(e.sameMajorNew);if(i){let n=ge(t,i);if(n&&o.has(n))return e.Time=e.sameMajorTime,delete e.newPath,e.sameMajorNew}return null}let l=Zn(e,c,{range:n,semvers:o,usePre:a,useRel:i,useGreatest:r,pinnedRange:s});if(!l)return null;if(r)return l;{let r=``,c=``;t===`pypi`?(c=e.info.version,r=Z(e.info.version)):r=e[`dist-tags`].latest;let u=Z(n),d=Xn(n),f=Yn(l),p=Yn(r),m=_e(l,u);if(!i&&a||d&&f||i&&!m&&d&&!f||d&&!f&&m)return l;if(d&&!f&&!m)return null;let h=ge(u,r);return h&&h!==`prerelease`&&!o.has(h.replace(/^pre/,``))||i&&Yn(r)?l:ye(r,u)&&!p?Qt===!0||G(e.name,Qt)?r:null:!d&&p&&!a||s&&!ke(r,s)?l:c||r}}function $n(e){let t={headers:{"accept-encoding":`gzip, deflate, br`}},r=n.UPDATES_GITHUB_API_TOKEN||n.GITHUB_API_TOKEN||n.GH_TOKEN||n.GITHUB_TOKEN||n.HOMEBREW_GITHUB_API_TOKEN;return r&&(t.headers={...t.headers,Authorization:`Bearer ${r}`}),J(e,t)}async function er(e,t){let n=await $n(`${en}/repos/${e}/${t}/commits`);if(!n?.ok)return{hash:``,commit:{}};let{sha:r,commit:i}=(await n.json())[0];return{hash:r,commit:i}}async function tr(e,t){let n=await $n(`${en}/repos/${e}/${t}/git/refs/tags`);return n?.ok?(await n.json()).map(e=>e.ref.replace(/^refs\/tags\//,``)):[]}function nr(e,t,n){let r=W(t);if(!k(r))return null;if(n){let n=t,i=W(t);for(let t of e){let e=W(t);k(e)&&(!n||_e(e,i))&&(n=t,i=e)}if(be(r,i))return n}else{let t=e.at(-1);if(!t)return null;let n=W(t);if(!k(n))return null;if(be(r,n))return t}return null}async function rr(e,t,n){let r=t.old.replace(Lt,``),[i,a,o,s]=Rt.exec(r)||[];if(!a||!o||!s)return null;if(zt.test(s)){let{hash:n,commit:r}=await er(a,o);if(!n)return null;let i=r?.committer?.date??r?.author?.date,c=n.substring(0,s.length);if(s!==c)return{key:e,newRange:t.old.replace(s,c),user:a,repo:o,oldRef:s,newRef:c,newDate:i}}else{let t=nr(await tr(a,o),s,n);if(t)return{key:e,newRange:t,user:a,repo:o,oldRef:s,newRef:t}}return null}function ir(e){return e.replace(/-.*/,``)}function ar(e){let t=e.match(Bt);return t?.length===1?e.replace(Bt,Z(t[0])):e}function or(e,t){return RegExp(`^${I(e).replaceAll(`\\*`,`.*`)}$`,t?`i`:``)}function sr(e,t,n){return t&&typeof e==`string`?/^\/.+\/$/.test(e)?new RegExp(e.slice(1,-1)):or(e,n):e instanceof RegExp?e:or(e,n)}function Q(e){if(e instanceof Set){let t=new Set;for(let n of e)t.add(sr(n,!0,!1));return t}return e}function cr(e,t){let n=new Set;for(let t of e||[])n.add(sr(t,!0,!0));for(let e of t||[])n.add(sr(e,!1,!0));return n}function $(e,t,n,r,i){if(i===`engines`&&Re.includes(e)||t===`pypi`&&e===`python`)return!1;if(!n.size&&!r.size)return!0;for(let t of r)if(t.test(e))return!1;for(let t of n)if(t.test(e))return!0;return!n.size}function lr(e,t,n){return!e||!t?!0:(n-Date.parse(e))/(24*3600*1e3)>=t}function ur(e){let n=new Set,r=new Set;if(e)for(let t of e){let e;try{e=h(t)}catch(e){throw Error(`Unable to open ${t}: ${e.message}`)}if(e?.isFile()){let e=d(t);n.add(e),r.add(e)}else if(e?.isDirectory())for(let e of Object.keys(Ut)){let r=u(t,e),i=null;try{i=h(r)}catch{}i?.isFile()&&n.add(d(r))}else throw Error(`${t} is neither a file nor directory`)}else for(let e of Object.keys(Ut)){let r=pn(e,t());r&&n.add(d(r))}return[n,r]}async function dr(e){let t=[];for(let e of[``,`.config/`])for(let n of[`js`,`ts`,`mjs`,`mts`])t.push(`${e}updates${e?``:`.config`}.${n}`);let n={};try{({default:n}=await Promise.any(t.map(async t=>{let n=u(e,...t.split(`/`)),r=f(n);try{p(n)}catch{throw Error(`File not found: ${t}`)}try{return await import(r.href)}catch(e){throw Error(`Unable to parse config file ${t}: ${e.message}`)}})))}catch(e){if(e instanceof AggregateError){let t=e.errors.filter(e=>e.message.startsWith(`Unable to parse`));if(t.length>0)throw t[0]}}return n}async function fr(){for(let e of[o,a])e?._handle?.setBlocking?.(!0);He();let e=typeof V.sockets==`number`?V.sockets:96,{help:t,version:n,file:r,types:i,update:s}=V;t&&(o.write(`usage: updates [options]
34
34
 
35
35
  Options:
36
36
  -u, --update Update versions and write package file
@@ -67,4 +67,4 @@ import{createRequire as e}from"node:module";import{cwd as t,env as n,exit as r,p
67
67
  $ updates -f pyproject.toml
68
68
  $ updates -f go.mod
69
69
  $ updates -l typescript=^5.0.0
70
- `),await X()),n&&(console.info(Rt),await X());let u={},f={},p={},m={},g=Date.now(),_=0,[v,y]=ur(z(r));Sn();for(let t of v){let n=zt[c(t)];if(!Xt.has(n)&&!y.has(t))continue;m[n]=t,u[n]||(u[n]={});let r=await dr(l(d(t))),a=[],o=[];Array.isArray(H.include)&&(a=H.include.filter(e=>typeof e==`string`).flatMap(e=>cn(e))),Array.isArray(H.exclude)&&(o=H.exclude.filter(e=>typeof e==`string`).flatMap(e=>cn(e)));let s=cr(a,r?.include??[]),v=cr(o,r?.exclude??[]),b=ln(H.pin),x={...r?.pin,...b},S=[];Array.isArray(i)?S=i.filter(e=>typeof e==`string`):`types`in r&&Array.isArray(r.types)?S=r.types:n===`npm`?S=Fe:n===`pypi`?S=[...Re,...Le]:n===`go`&&(S=Array.from(ze));let C={};try{p[n]=h(t,`utf8`)}catch(e){throw Error(`Unable to open ${t}: ${e.message}`)}try{if(n===`npm`)C=JSON.parse(p[n]);else if(n===`pypi`){let{parse:e}=await Promise.resolve().then(()=>(Mt(),At));C=e(p[n])}else C.deps=jn(p[n])}catch(e){throw Error(`Error parsing ${t}: ${e.message}`)}for(let e of S){let t;if(t=n===`npm`||n===`go`?C[e]||{}:sn(C,e)||{},Array.isArray(t)&&n===`pypi`)for(let{name:r,version:i}of Pe(t))$(r,n,s,v,e)&&(u[n][`${e}${r}`]={old:ar(i),oldOrig:i});else if(typeof t==`string`){let[r,i]=t.split(`@`);u[n][`${e}${r}`]={old:ar(i),oldOrig:i}}else for(let[r,i]of Object.entries(t))if(n===`npm`&&Y(i)&&$(r,n,s,v,e)){let t=En(i,r);u[n][`${e}${r}`]={old:t.version,oldOrig:i}}else n!==`go`&&Oe(i)&&$(r,n,s,v,e)?u[n][`${e}${r}`]={old:ar(i),oldOrig:i}:n===`npm`&&!Y(i)&&$(r,n,s,v,e)?f[`${e}${r}`]={old:i}:n===`go`&&$(r,n,s,v,e)&&(u[n][`${e}${r}`]={old:ir(i),oldOrig:W(i)})}if(_+=Object.keys(u[n]).length+Object.keys(f).length,!_)continue;let ee=[];ee=await se(Object.keys(u[n]),async e=>{let[t,i]=e.split(`\0`);if(n===`npm`){let{oldOrig:a}=u[n][e];return a&&Y(a)?Dn(i,t):wn(i,t,r)}else if(n===`go`)return Mn(i,t,u[n][e].oldOrig||u[n][e].old);else return Tn(i,t)},{concurrency:e});for(let[e,t,r,i]of ee){if(e?.error)throw Error(e.error);let a=typeof U==`boolean`?U:G(e.name,U),o=typeof Gt==`boolean`?Gt:G(e.name,Gt),s=typeof Kt==`boolean`?Kt:G(e.name,Kt),c;c=qt===!0||G(e.name,qt)?new Set([`patch`]):Jt===!0||G(e.name,Jt)?new Set([`patch`,`minor`]):new Set([`patch`,`minor`,`major`]);let l=`${t}${i}`,d=u[n][l].old,f=u[n][l].oldOrig,p=x[i],m=Qn(e,{usePre:o,useRel:s,useGreatest:a,semvers:c,range:d,mode:n,pinnedRange:p}),h=``;if([`go`,`pypi`].includes(n)&&m)h=m;else if(m)if(f&&Y(f))if(f.startsWith(`npm:@jsr/`)){let e=/^(npm:@jsr\/[^@]+@)(.+)$/.exec(f);e&&(h=`${e[1]}${m}`)}else if(f.startsWith(`jsr:@`)){let e=/^(jsr:@[^@]+@)(.+)$/.exec(f);e&&(h=`${e[1]}${m}`)}else f.startsWith(`jsr:`)&&(h=`jsr:${m}`);else h=Jn(d,m,f);if(!m||f&&f===h){delete u[n][l];continue}let g=``;if(n===`npm`&&e.time?.[m]?g=e.time[m]:n===`pypi`&&e.releases?.[m]?.[0]?.upload_time_iso_8601?g=e.releases[m][0].upload_time_iso_8601:n===`go`&&e.Time&&(g=e.Time),u[n][l].new=h,f&&Y(f)&&(u[n][l].newPrint=m),n===`npm`)u[n][l].info=Fn(e?.versions?.[m],r,e.name);else if(n===`pypi`)u[n][l].info=Fn(e,r,e.info.name);else if(n===`go`){let t=e.newPath||i;u[n][l].info=In(t)}g&&(u[n][l].date=g,u[n][l].age=Ne(g,{noAffix:!0}))}if(Object.keys(f).length){let t=(await se(Object.entries(f),([e,t])=>{let n=e.split(`\0`)[1];return rr(e,t,typeof U==`boolean`?U:G(n,U))},{concurrency:e})).filter(e=>e!==null);for(let e of t){let{key:t,newRange:r,user:i,repo:a,oldRef:o,newRef:s,newDate:c}=e;u[n][t]={old:f[t].old,new:r,oldPrint:Ft.test(o)?o.substring(0,7):o,newPrint:Ft.test(s)?s.substring(0,7):s,info:`https://github.com/${i}/${a}`,...c?{age:Ne(c,{noAffix:!0})}:{}}}}let te=H.cooldown??r.cooldown;if(te){for(let e of Object.keys(u))for(let[t,{date:n}]of Object.entries(u[e]))if(!lr(n,Number(te),g)){delete u[e][t];continue}}}Cn(),_===0&&Ln(`No dependencies found, nothing to do.`);let b=0;for(let e of Object.keys(u))b+=Object.keys(u[e]).length;b||Ln(`All dependencies are up to date.`);let x=Rn(u);if(s){for(let e of Object.keys(u))if(Object.keys(u[e]).length){try{let t=e===`npm`?Gn:e===`go`?qn:Kn,n=p[e];zn(m[e],t(n,u[e]))}catch(t){throw Error(`Error writing ${c(m[e])}: ${t.message}`)}console.info(Wt(`✨ ${c(m[e])} updated`))}}await X(void 0,x)}try{await fr()}catch(e){await X(e)}export{};
70
+ `),await X()),n&&(console.info(Ht),await X());let u={},f={},p={},m={},h=Date.now(),_=0,[v,y]=ur(R(r));for(let t of v){let n=Ut[c(t)];if(!$t.has(n)&&!y.has(t))continue;m[n]=t,u[n]||(u[n]={});let r=await dr(l(d(t))),a=[],o=[];Array.isArray(V.include)&&(a=V.include.filter(e=>typeof e==`string`).flatMap(e=>dn(e))),Array.isArray(V.exclude)&&(o=V.exclude.filter(e=>typeof e==`string`).flatMap(e=>dn(e)));let s=cr(a,r?.include??[]),v=cr(o,r?.exclude??[]),b=fn(V.pin),x={...r?.pin,...b},S=[];Array.isArray(i)?S=i.filter(e=>typeof e==`string`):`types`in r&&Array.isArray(r.types)?S=r.types:n===`npm`?S=Le:n===`pypi`?S=[...Be,...ze]:n===`go`&&(S=Array.from(Ve));let C={};try{p[n]=g(t,`utf8`)}catch(e){throw Error(`Unable to open ${t}: ${e.message}`)}try{if(n===`npm`)C=JSON.parse(p[n]);else if(n===`pypi`){let{parse:e}=await Promise.resolve().then(()=>(It(),Pt));C=e(p[n])}else C.deps=An(p[n])}catch(e){throw Error(`Error parsing ${t}: ${e.message}`)}for(let e of S){let t;if(t=n===`npm`||n===`go`?C[e]||{}:un(C,e)||{},Array.isArray(t)&&n===`pypi`)for(let{name:r,version:i}of Ie(t))$(r,n,s,v,e)&&(u[n][`${e}${r}`]={old:ar(i),oldOrig:i});else if(typeof t==`string`){let[r,i]=t.split(`@`);u[n][`${e}${r}`]={old:ar(i),oldOrig:i}}else for(let[r,i]of Object.entries(t))if(n===`npm`&&Y(i)&&$(r,n,s,v,e)){let t=Tn(i,r);u[n][`${e}${r}`]={old:t.version,oldOrig:i}}else n!==`go`&&Ae(i)&&$(r,n,s,v,e)?u[n][`${e}${r}`]={old:ar(i),oldOrig:i}:n===`npm`&&!Y(i)&&$(r,n,s,v,e)?f[`${e}${r}`]={old:i}:n===`go`&&$(r,n,s,v,e)&&(u[n][`${e}${r}`]={old:ir(i),oldOrig:W(i)})}if(_+=Object.keys(u[n]).length+Object.keys(f).length,!_)continue;let w=[];w=await ce(Object.keys(u[n]),async e=>{let[t,i]=e.split(`\0`);if(n===`npm`){let{oldOrig:a}=u[n][e];return a&&Y(a)?En(i,t):Cn(i,t,r)}else if(n===`go`)return jn(i,t,u[n][e].oldOrig||u[n][e].old);else return wn(i,t)},{concurrency:e});for(let[e,t,r,i]of w){if(e?.error)throw Error(e.error);let a=typeof U==`boolean`?U:G(e.name,U),o=typeof Jt==`boolean`?Jt:G(e.name,Jt),s=typeof Yt==`boolean`?Yt:G(e.name,Yt),c;c=Xt===!0||G(e.name,Xt)?new Set([`patch`]):Zt===!0||G(e.name,Zt)?new Set([`patch`,`minor`]):new Set([`patch`,`minor`,`major`]);let l=`${t}${i}`,d=u[n][l].old,f=u[n][l].oldOrig,p=x[i],m=Qn(e,{usePre:o,useRel:s,useGreatest:a,semvers:c,range:d,mode:n,pinnedRange:p}),h=``;if([`go`,`pypi`].includes(n)&&m)h=m;else if(m)if(f&&Y(f))if(f.startsWith(`npm:@jsr/`)){let e=/^(npm:@jsr\/[^@]+@)(.+)$/.exec(f);e&&(h=`${e[1]}${m}`)}else if(f.startsWith(`jsr:@`)){let e=/^(jsr:@[^@]+@)(.+)$/.exec(f);e&&(h=`${e[1]}${m}`)}else f.startsWith(`jsr:`)&&(h=`jsr:${m}`);else h=Jn(d,m,f);if(!m||f&&f===h){delete u[n][l];continue}let g=``;if(n===`npm`&&e.time?.[m]?g=e.time[m]:n===`pypi`&&e.releases?.[m]?.[0]?.upload_time_iso_8601?g=e.releases[m][0].upload_time_iso_8601:n===`go`&&e.Time&&(g=e.Time),u[n][l].new=h,f&&Y(f)&&(u[n][l].newPrint=m),n===`npm`)u[n][l].info=Pn(e?.versions?.[m],r,e.name);else if(n===`pypi`)u[n][l].info=Pn(e,r,e.info.name);else if(n===`go`){let t=e.newPath||i;u[n][l].info=Fn(t)}g&&(u[n][l].date=g,u[n][l].age=Fe(g,{noAffix:!0}))}if(Object.keys(f).length){let t=(await ce(Object.entries(f),([e,t])=>{let n=e.split(`\0`)[1];return rr(e,t,typeof U==`boolean`?U:G(n,U))},{concurrency:e})).filter(e=>e!==null);for(let e of t){let{key:t,newRange:r,user:i,repo:a,oldRef:o,newRef:s,newDate:c}=e;u[n][t]={old:f[t].old,new:r,oldPrint:zt.test(o)?o.substring(0,7):o,newPrint:zt.test(s)?s.substring(0,7):s,info:`https://github.com/${i}/${a}`,...c?{age:Fe(c,{noAffix:!0})}:{}}}}let ee=V.cooldown??r.cooldown;if(ee){for(let e of Object.keys(u))for(let[t,{date:n}]of Object.entries(u[e]))if(!lr(n,Number(ee),h)){delete u[e][t];continue}}}_===0&&In(`No dependencies found, nothing to do.`);let b=0;for(let e of Object.keys(u))b+=Object.keys(u[e]).length;b||In(`All dependencies are up to date.`);let x=Ln(u);if(s){for(let e of Object.keys(u))if(Object.keys(u[e]).length){try{let t=p[e];if(e===`go`){let[n,r]=Kn(t,u[e]);Rn(m[e],n),qn(l(d(m[e])),r)}else{let n=e===`npm`?Wn:Gn;Rn(m[e],n(t,u[e]))}}catch(t){throw Error(`Error writing ${c(m[e])}: ${t.message}`)}console.info(qt(`✨ ${c(m[e])} updated`))}}await X(void 0,x)}try{await fr()}catch(e){await X(e)}export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "updates",
3
- "version": "17.3.2",
3
+ "version": "17.5.0",
4
4
  "description": " Flexible dependency update tool",
5
5
  "author": "silverwind",
6
6
  "repository": "silverwind/updates",
@@ -16,22 +16,22 @@
16
16
  "node": ">=22"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "25.2.0",
19
+ "@types/node": "25.2.3",
20
20
  "@types/rc": "1.2.4",
21
- "@typescript/native-preview": "7.0.0-dev.20260203.1",
21
+ "@typescript/native-preview": "7.0.0-dev.20260211.1",
22
22
  "eslint": "9.39.2",
23
- "eslint-config-silverwind": "120.1.2",
23
+ "eslint-config-silverwind": "121.0.0",
24
24
  "nano-spawn": "2.0.0",
25
25
  "p-map": "7.0.4",
26
26
  "rc": "1.2.8",
27
27
  "smol-toml": "1.6.0",
28
28
  "timerel": "5.8.5",
29
- "tsdown": "0.20.1",
30
- "tsdown-config-silverwind": "1.7.3",
29
+ "tsdown": "0.20.3",
30
+ "tsdown-config-silverwind": "1.7.5",
31
31
  "typescript": "5.9.3",
32
- "typescript-config-silverwind": "14.0.0",
33
- "versions": "14.1.0",
32
+ "typescript-config-silverwind": "14.0.1",
33
+ "versions": "14.1.2",
34
34
  "vitest": "4.0.18",
35
- "vitest-config-silverwind": "10.6.2"
35
+ "vitest-config-silverwind": "10.6.3"
36
36
  }
37
37
  }