updates 14.2.7 → 14.2.8

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 (2) hide show
  1. package/bin/updates.js +1 -1
  2. package/package.json +1 -1
package/bin/updates.js CHANGED
@@ -25,7 +25,7 @@ Content-Type: ${a.type||"application/octet-stream"}\r
25
25
  `}}return t.message=r+`
26
26
  `,t}});var gh=C((OS,mh)=>{"use strict";mh.exports=zb;var qb=fh(),Ub=ph();function zb(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new qb;try{return e.parse(t),e.finish()}catch(r){throw Ub(r,t)}}});function ks({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var Ys=Se(fa(),1);var da=Ys.default.HttpProxyAgent,pa=Ys.default.HttpsProxyAgent;var Cr=class extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[r,n]of e)this.onEviction(r,n.value)}_deleteIfExpired(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,r.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,r){if(this._deleteIfExpired(e,r)===!1)return r.value}_getItemValue(e,r){return r.expiry?this._getOrDeleteIfExpired(e,r):r.value}_peek(e,r){let n=r.get(e);return this._getItemValue(e,n)}_set(e,r){this.cache.set(e,r),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,r){this.oldCache.delete(e),this._set(e,r)}*_entriesAscending(){for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield e)}for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let r=this.cache.get(e);return this._getItemValue(e,r)}if(this.oldCache.has(e)){let r=this.oldCache.get(e);if(this._deleteIfExpired(e,r)===!1)return this._moveToRecent(e,r),r.value}}set(e,r,{maxAge:n=this.maxAge}={}){let i=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:r,expiry:i}):this._set(e,{value:r,expiry:i})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this._entriesAscending()],n=r.length-e;n<0?(this.cache=new Map(r),this.oldCache=new Map,this._size=r.length):(n>0&&this._emitEvictions(r.slice(0,n)),this.oldCache=new Map(r.slice(n)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[r,n]=e;this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}for(let e of this.oldCache){let[r,n]=e;this.cache.has(r)||this._deleteIfExpired(r,n)===!1&&(yield[r,n.value])}}*entriesDescending(){let e=[...this.cache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}e=[...this.oldCache];for(let r=e.length-1;r>=0;--r){let n=e[r],[i,a]=n;this.cache.has(i)||this._deleteIfExpired(i,a)===!1&&(yield[i,a.value])}}*entriesAscending(){for(let[e,r]of this._entriesAscending())yield[e,r.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,r=this){for(let[n,i]of this.entriesAscending())e.call(r,i,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var ya=Se(ga(),1);import{Agent as vd}from"node:http";import{Agent as xd}from"node:https";var Od={agentCacheSize:512},ba={maxSockets:64,keepAlive:!1},Qs=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function Ks(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...Od,...e},n=new Cr({maxSize:r.agentCacheSize});async function i(u,h={}){let{origin:f,protocol:c}=new URL(u),g=h!=null&&h.noProxy?null:(0,ya.getProxyForUrl)(u),b=JSON.stringify({proxyUrl:g,origin:f,...h});if(n.has(b))return n.get(b);let m;if("noProxy"in h&&delete h.noProxy,e.undici){let{ProxyAgent:p,Agent:_}=await import("undici"),E={...h};"keepAlive"in E&&!("pipelining"in E)&&(E.pipelining=E.keepAlive?1:0),"keepAlive"in E&&delete E.keepAlive,"maxSockets"in E&&(E.connections=E.maxSockets,delete E.maxSockets),g?m=new p({...E,uri:g}):m=new _(E)}else{let p=c==="https:";g?m=new(p?pa:da)({...h,proxy:g}):m=new(p?xd:vd)(h)}return n.set(b,m),m}let a=(u,{timeout:h=0,agentOpts:f={},...c}={})=>new Promise(async(g,b)=>{var _;if(!e.undici&&!("agent"in c)){let E=await i(u,{...ba,...f});E&&(c.agent=E)}else if(e.undici&&!("dispatcher"in c)){let E=await i(u,{...ba,...f});E&&(c.dispatcher=E)}let m,p;h&&(!("signal"in c)&&globalThis.AbortController&&(p=new AbortController,c.signal=p.signal),m=setTimeout(()=>{var R;(R=p==null?void 0:p.abort)==null||R.call(p);let E=new Qs(`${c.method||"GET"} ${u} timed out after ${h}ms`);b(E)},h),(_=m==null?void 0:m.unref)==null||_.call(m)),t(u,c).then(E=>{m&&clearTimeout(m),g(E)}).catch(E=>{if(m&&clearTimeout(m),E.name==="AbortError")return g(null);b(E)})});return a.clearCache=()=>{for(let u of n.values())"destroy"in u&&u.destroy();n.clear()},a}var Lh=Se(Xs(),1);import np from"node:http";import sp from"node:https";import jt from"node:zlib";import tl,{PassThrough as rl,pipeline as Vt}from"node:stream";import{Buffer as Fn}from"node:buffer";function $d(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),n="",i=!1,a=r[0]||"text/plain",u=a;for(let g=1;g<r.length;g++)r[g]==="base64"?i=!0:r[g]&&(u+=`;${r[g]}`,r[g].indexOf("charset=")===0&&(n=r[g].substring(8)));!r[0]&&!n.length&&(u+=";charset=US-ASCII",n="US-ASCII");let h=i?"base64":"ascii",f=unescape(t.substring(e+1)),c=Buffer.from(f,h);return c.type=a,c.typeFull=u,c.charset=n,c}var Ra=$d;vr();On();import ot,{PassThrough as za}from"node:stream";import{types as Ma,deprecate as oi,promisify as Yd}from"node:util";import{Buffer as Re}from"node:buffer";var Ge=class extends Error{constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var pe=class extends Ge{constructor(e,r,n){super(e,r),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}};var In=Symbol.toStringTag,ri=t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[In]==="URLSearchParams",Or=t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[In]),$a=t=>typeof t=="object"&&(t[In]==="AbortSignal"||t[In]==="EventTarget"),La=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},Pa=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n};var Qd=Yd(ot.pipeline),me=Symbol("Body internals"),Ue=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:ri(e)?e=Re.from(e.toString()):Or(e)||Re.isBuffer(e)||(Ma.isAnyArrayBuffer(e)?e=Re.from(e):ArrayBuffer.isView(e)?e=Re.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ot||(e instanceof _t?(e=Ia(e),n=e.type.split("=")[1]):e=Re.from(String(e))));let i=e;Re.isBuffer(e)?i=ot.Readable.from(e):Or(e)&&(i=ot.Readable.from(e.stream())),this[me]={body:e,stream:i,boundary:n,disturbed:!1,error:null},this.size=r,e instanceof ot&&e.on("error",a=>{let u=a instanceof Ge?a:new pe(`Invalid response body while trying to fetch ${this.url}: ${a.message}`,"system",a);this[me].error=u})}get body(){return this[me].stream}get bodyUsed(){return this[me].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:n}=await ii(this);return e.slice(r,r+n)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let n=new _t,i=new URLSearchParams(await this.text());for(let[a,u]of i)n.append(a,u);return n}let{toFormData:r}=await Promise.resolve().then(()=>(Ua(),qa));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[me].body&&this[me].body.type||"",r=await this.arrayBuffer();return new Ve([r],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await ii(this);return new TextDecoder().decode(e)}buffer(){return ii(this)}};Ue.prototype.buffer=oi(Ue.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Ue.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:oi(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function ii(t){if(t[me].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[me].disturbed=!0,t[me].error)throw t[me].error;let{body:e}=t;if(e===null)return Re.alloc(0);if(!(e instanceof ot))return Re.alloc(0);let r=[],n=0;try{for await(let i of e){if(t.size>0&&n+i.length>t.size){let a=new pe(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(a),a}n+=i.length,r.push(i)}}catch(i){throw i instanceof Ge?i:new pe(`Invalid response body while trying to fetch ${t.url}: ${i.message}`,"system",i)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(i=>typeof i=="string")?Re.from(r.join("")):Re.concat(r,n)}catch(i){throw new pe(`Could not create Buffer from response body for ${t.url}: ${i.message}`,"system",i)}else throw new pe(`Premature close of server response while trying to fetch ${t.url}`)}var kt=(t,e)=>{let r,n,{body:i}=t[me];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return i instanceof ot&&typeof i.getBoundary!="function"&&(r=new za({highWaterMark:e}),n=new za({highWaterMark:e}),i.pipe(r),i.pipe(n),t[me].stream=r,i=n),i},Kd=oi(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Pn=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":ri(t)?"application/x-www-form-urlencoded;charset=UTF-8":Or(t)?t.type||null:Re.isBuffer(t)||Ma.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof _t?`multipart/form-data; boundary=${e[me].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${Kd(t)}`:t instanceof ot?null:"text/plain;charset=UTF-8",ka=t=>{let{body:e}=t[me];return e===null?0:Or(e)?e.size:Re.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},Wa=async(t,{body:e})=>{e===null?t.end():await Qd(e,t)};import{types as ja}from"node:util";import Dn from"node:http";var Nn=typeof Dn.validateHeaderName=="function"?Dn.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},ai=typeof Dn.validateHeaderValue=="function"?Dn.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},_e=class t extends URLSearchParams{constructor(e){let r=[];if(e instanceof t){let n=e.raw();for(let[i,a]of Object.entries(n))r.push(...a.map(u=>[i,u]))}else if(e!=null)if(typeof e=="object"&&!ja.isBoxedPrimitive(e)){let n=e[Symbol.iterator];if(n==null)r.push(...Object.entries(e));else{if(typeof n!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(i=>{if(typeof i!="object"||ja.isBoxedPrimitive(i))throw new TypeError("Each header pair must be an iterable object");return[...i]}).map(i=>{if(i.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...i]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([n,i])=>(Nn(n),ai(n,String(i)),[String(n).toLowerCase(),String(i)])):void 0,super(r),new Proxy(this,{get(n,i,a){switch(i){case"append":case"set":return(u,h)=>(Nn(u),ai(u,String(h)),URLSearchParams.prototype[i].call(n,String(u).toLowerCase(),String(h)));case"delete":case"has":case"getAll":return u=>(Nn(u),URLSearchParams.prototype[i].call(n,String(u).toLowerCase()));case"keys":return()=>(n.sort(),new Set(URLSearchParams.prototype.keys.call(n)).keys());default:return Reflect.get(n,i,a)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let n=r.join(", ");return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,r=void 0){for(let n of this.keys())Reflect.apply(e,r,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let n=this.getAll(r);return r==="host"?e[r]=n[0]:e[r]=n.length>1?n:n[0],e},{})}};Object.defineProperties(_e.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));function Va(t=[]){return new _e(t.reduce((e,r,n,i)=>(n%2===0&&e.push(i.slice(n,n+2)),e),[]).filter(([e,r])=>{try{return Nn(e),ai(e,String(r)),!0}catch{return!1}}))}var Xd=new Set([301,302,303,307,308]),Hn=t=>Xd.has(t);var Ne=Symbol("Response internals"),Ee=class t extends Ue{constructor(e=null,r={}){super(e,r);let n=r.status!=null?r.status:200,i=new _e(r.headers);if(e!==null&&!i.has("Content-Type")){let a=Pn(e,this);a&&i.append("Content-Type",a)}this[Ne]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:i,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Ne].type}get url(){return this[Ne].url||""}get status(){return this[Ne].status}get ok(){return this[Ne].status>=200&&this[Ne].status<300}get redirected(){return this[Ne].counter>0}get statusText(){return this[Ne].statusText}get headers(){return this[Ne].headers}get highWaterMark(){return this[Ne].highWaterMark}clone(){return new t(kt(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!Hn(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new t(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new t(null,{status:0,statusText:""});return e[Ne].type="error",e}static json(e=void 0,r={}){let n=JSON.stringify(e);if(n===void 0)throw new TypeError("data is not JSON serializable");let i=new _e(r&&r.headers);return i.has("content-type")||i.set("content-type","application/json"),new t(n,{...r,headers:i})}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Ee.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});import{format as ep}from"node:url";import{deprecate as tp}from"node:util";var Ga=t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""};import{isIP as Zd}from"node:net";function Ya(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}var Qa=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Ka="strict-origin-when-cross-origin";function Xa(t){if(!Qa.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function Jd(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=Zd(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:t.host==="localhost"||t.host.endsWith(".localhost")?!1:t.protocol==="file:"}function Wt(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:Jd(t)}function Za(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let n=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let i=t.referrer,a=Ya(i),u=Ya(i,!0);a.toString().length>4096&&(a=u),e&&(a=e(a)),r&&(u=r(u));let h=new URL(t.url);switch(n){case"no-referrer":return"no-referrer";case"origin":return u;case"unsafe-url":return a;case"strict-origin":return Wt(a)&&!Wt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:Wt(a)&&!Wt(h)?"no-referrer":u;case"same-origin":return a.origin===h.origin?a:"no-referrer";case"origin-when-cross-origin":return a.origin===h.origin?a:u;case"no-referrer-when-downgrade":return Wt(a)&&!Wt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function Ja(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&Qa.has(n)&&(r=n);return r}var se=Symbol("Request internals"),$r=t=>typeof t=="object"&&typeof t[se]=="object",rp=tp(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),St=class t extends Ue{constructor(e,r={}){let n;if($r(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==""||n.password!=="")throw new TypeError(`${n} is an url with embedded credentials.`);let i=r.method||e.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(i)&&(i=i.toUpperCase()),!$r(r)&&"data"in r&&rp(),(r.body!=null||$r(e)&&e.body!==null)&&(i==="GET"||i==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let a=r.body?r.body:$r(e)&&e.body!==null?kt(e):null;super(a,{size:r.size||e.size||0});let u=new _e(r.headers||e.headers||{});if(a!==null&&!u.has("Content-Type")){let c=Pn(a,this);c&&u.set("Content-Type",c)}let h=$r(e)?e.signal:null;if("signal"in r&&(h=r.signal),h!=null&&!$a(h))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let f=r.referrer==null?e.referrer:r.referrer;if(f==="")f="no-referrer";else if(f){let c=new URL(f);f=/^about:(\/\/)?client$/.test(c)?"client":c}else f=void 0;this[se]={method:i,redirect:r.redirect||e.redirect||"follow",headers:u,parsedURL:n,signal:h,referrer:f},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[se].method}get url(){return ep(this[se].parsedURL)}get headers(){return this[se].headers}get redirect(){return this[se].redirect}get signal(){return this[se].signal}get referrer(){if(this[se].referrer==="no-referrer")return"";if(this[se].referrer==="client")return"about:client";if(this[se].referrer)return this[se].referrer.toString()}get referrerPolicy(){return this[se].referrerPolicy}set referrerPolicy(e){this[se].referrerPolicy=Xa(e)}clone(){return new t(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(St.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var el=t=>{let{parsedURL:e}=t[se],r=new _e(t[se].headers);r.has("Accept")||r.set("Accept","*/*");let n=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(n="0"),t.body!==null){let h=ka(t);typeof h=="number"&&!Number.isNaN(h)&&(n=String(h))}n&&r.set("Content-Length",n),t.referrerPolicy===""&&(t.referrerPolicy=Ka),t.referrer&&t.referrer!=="no-referrer"?t[se].referrer=Za(t):t[se].referrer="no-referrer",t[se].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip, deflate, br");let{agent:i}=t;typeof i=="function"&&(i=i(e)),!r.has("Connection")&&!i&&r.set("Connection","close");let a=Ga(e),u={path:e.pathname+a,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:e,options:u}};var Bn=class extends Ge{constructor(e,r="aborted"){super(e,r)}};On();ni();var ip=new Set(["data:","http:","https:"]);async function qn(t,e){return new Promise((r,n)=>{let i=new St(t,e),{parsedURL:a,options:u}=el(i);if(!ip.has(a.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=Ra(i.url),E=new Ee(_,{headers:{"Content-Type":_.typeFull}});r(E);return}let h=(a.protocol==="https:"?sp:np).request,{signal:f}=i,c=null,g=()=>{let _=new Bn("The operation was aborted.");n(_),i.body&&i.body instanceof tl.Readable&&i.body.destroy(_),!(!c||!c.body)&&c.body.emit("error",_)};if(f&&f.aborted){g();return}let b=()=>{g(),p()},m=h(a.toString(),u);f&&f.addEventListener("abort",b);let p=()=>{m.abort(),f&&f.removeEventListener("abort",b)};m.on("error",_=>{n(new pe(`request to ${i.url} failed, reason: ${_.message}`,"system",_)),p()}),op(m,_=>{c&&c.body&&c.body.destroy(_)}),process.version<"v14"&&m.on("socket",_=>{let E;_.prependListener("end",()=>{E=_._eventsCount}),_.prependListener("close",R=>{if(c&&E<_._eventsCount&&!R){let A=new Error("Premature close");A.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",A)}})}),m.on("response",_=>{m.setTimeout(0);let E=Va(_.rawHeaders);if(Hn(_.statusCode)){let T=E.get("Location"),$=null;try{$=T===null?null:new URL(T,i.url)}catch{if(i.redirect!=="manual"){n(new pe(`uri requested responds with an invalid redirect URL: ${T}`,"invalid-redirect")),p();return}}switch(i.redirect){case"error":n(new pe(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),p();return;case"manual":break;case"follow":{if($===null)break;if(i.counter>=i.follow){n(new pe(`maximum redirect reached at: ${i.url}`,"max-redirect")),p();return}let D={headers:new _e(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:kt(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!La(i.url,$)||!Pa(i.url,$))for(let V of["authorization","www-authenticate","cookie","cookie2"])D.headers.delete(V);if(_.statusCode!==303&&i.body&&e.body instanceof tl.Readable){n(new pe("Cannot follow redirect with body being a readable stream","unsupported-redirect")),p();return}(_.statusCode===303||(_.statusCode===301||_.statusCode===302)&&i.method==="POST")&&(D.method="GET",D.body=void 0,D.headers.delete("content-length"));let H=Ja(E);H&&(D.referrerPolicy=H),r(qn(new St($,D))),p();return}default:return n(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}f&&_.once("end",()=>{f.removeEventListener("abort",b)});let R=Vt(_,new rl,T=>{T&&n(T)});process.version<"v12.10"&&_.on("aborted",b);let A={url:i.url,status:_.statusCode,statusText:_.statusMessage,headers:E,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark},N=E.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||N===null||_.statusCode===204||_.statusCode===304){c=new Ee(R,A),r(c);return}let L={flush:jt.Z_SYNC_FLUSH,finishFlush:jt.Z_SYNC_FLUSH};if(N==="gzip"||N==="x-gzip"){R=Vt(R,jt.createGunzip(L),T=>{T&&n(T)}),c=new Ee(R,A),r(c);return}if(N==="deflate"||N==="x-deflate"){let T=Vt(_,new rl,$=>{$&&n($)});T.once("data",$=>{($[0]&15)===8?R=Vt(R,jt.createInflate(),D=>{D&&n(D)}):R=Vt(R,jt.createInflateRaw(),D=>{D&&n(D)}),c=new Ee(R,A),r(c)}),T.once("end",()=>{c||(c=new Ee(R,A),r(c))});return}if(N==="br"){R=Vt(R,jt.createBrotliDecompress(),T=>{T&&n(T)}),c=new Ee(R,A),r(c);return}c=new Ee(R,A),r(c)}),Wa(m,i).catch(n)})}function op(t,e){let r=Fn.from(`0\r
27
27
  \r
28
- `),n=!1,i=!1,a;t.on("response",u=>{let{headers:h}=u;n=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),t.on("socket",u=>{let h=()=>{if(n&&!i){let c=new Error("Premature close");c.code="ERR_STREAM_PREMATURE_CLOSE",e(c)}},f=c=>{i=Fn.compare(c.slice(-5),r)===0,!i&&a&&(i=Fn.compare(a.slice(-3),r.slice(0,3))===0&&Fn.compare(c.slice(-2),r.slice(3))===0),a=c};u.prependListener("close",h),u.on("data",f),t.on("close",()=>{u.removeListener("close",h),u.removeListener("data",f)})})}var Ph=Se(Il(),1),Nh=Se(zn(),1),Dh=Se(Ll(),1),ne=Se(Oc(),1),Hh=Se(Nc(),1),Bh=Se(Yc(),1);import{cwd as Vb,stdout as Gb,argv as Yb,env as hs,exit as Gr,versions as Qb}from"node:process";import{join as fs,dirname as Fh,basename as Sh}from"node:path";import{lstatSync as Kb,readFileSync as Rh,truncateSync as Xb,writeFileSync as Zb,accessSync as Jb}from"node:fs";import{platform as ey}from"node:os";import{rootCertificates as Eh}from"node:tls";var Ib=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],$b={"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"};function is(t,{noAffix:e=!1,times:r=Ib,nowThreshold:n=1e4,nowString:i="now",aliases:a=!1,aliasesMap:u=$b}={}){let h=Date.now();if(t=typeof t=="number"?t:Date.parse(t),Number.isNaN(t))return"unknown";let f=!1,c=h-t;if(c<0&&(f=!0,c=Math.abs(c)),c<n)return i;let g,b;for(let p=0,_=r.length;p<_;p++){let E=r[p];if(!(c>=E[1])){g=Math.floor(c/E[0]),b=E[2]+(g>1?"s":"");break}}let m=`${f&&!e?"in ":""}${g} ${b}${!f&&!e?" ago":""}`;return a?u[m]??m:m}import Fi from"node:process";import Lb from"node:os";import Qc from"node:tty";function Ce(t,e=globalThis.Deno?globalThis.Deno.args:Fi.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:Z}=Fi,os;Ce("no-color")||Ce("no-colors")||Ce("color=false")||Ce("color=never")?os=0:(Ce("color")||Ce("colors")||Ce("color=true")||Ce("color=always"))&&(os=1);function Pb(){if("FORCE_COLOR"in Z)return Z.FORCE_COLOR==="true"?1:Z.FORCE_COLOR==="false"?0:Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}function Nb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Db(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Pb();n!==void 0&&(os=n);let i=r?os:n;if(i===0)return 0;if(r){if(Ce("color=16m")||Ce("color=full")||Ce("color=truecolor"))return 3;if(Ce("color=256"))return 2}if("TF_BUILD"in Z&&"AGENT_NAME"in Z)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(Z.TERM==="dumb")return a;if(Fi.platform==="win32"){let u=Lb.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in Z)return"GITHUB_ACTIONS"in Z?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in Z)||Z.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor"||Z.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Z){let u=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:a}function Kc(t,e={}){let r=Db(t,{streamIsTTY:t&&t.isTTY,...e});return Nb(r)}var Hb={stdout:Kc({isTTY:Qc.isatty(1)}),stderr:Kc({isTTY:Qc.isatty(2)})},Xc=Hb;var Zc=!0;function Jc(){Zc=!1}function qi(t,e,r){return Zc?`\x1B[${e}m${t}\x1B[${r}m`:t}var Ui=t=>qi(t,31,39),tr=t=>qi(t,32,39);var as=t=>qi(t,35,39);var qh=Se(gh(),1);var Mb=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Wi=new Set(["__proto__","prototype","constructor"]),kb=new Set("0123456789");function Wb(t){let e=[],r="",n="start",i=!1;for(let a of t)switch(a){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=a),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=a;break}if(Wi.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=a;break}if(n==="property"){if(Wi.has(r))return[];e.push(r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!kb.has(a))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=a}}switch(i&&(r+="\\"),n){case"property":{if(Wi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function jb(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function bh(t,e,r){if(!Mb(t)||typeof e!="string")return r===void 0?t:r;let n=Wb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(jb(t,a)?t=i===n.length-1?void 0:null:t=t[a],t==null){if(i!==n.length-1)return r;break}}return t===void 0?r:t}var ji=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},yh=t=>globalThis.DOMException===void 0?new ji(t):new DOMException(t),_h=t=>{let e=t.reason===void 0?yh("This operation was aborted."):t.reason;return e instanceof Error?e:yh(e)};async function Vi(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise((a,u)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let h=[],f=[],c=new Map,g=!1,b=!1,m=!1,p=0,_=0,E=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),R=N=>{g=!0,b=!0,u(N)};i&&(i.aborted&&R(_h(i)),i.addEventListener("abort",()=>{R(_h(i))}));let A=async()=>{if(b)return;let N=await E.next(),L=_;if(_++,N.done){if(m=!0,p===0&&!b){if(!n&&f.length>0){R(new AggregateError(f));return}if(b=!0,c.size===0){a(h);return}let T=[];for(let[$,D]of h.entries())c.get($)!==wh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let $=await e(T,L);$===wh&&c.set(L,$),h[L]=$,p--,await A()}catch(T){if(n)R(T);else{f.push(T),p--;try{await A()}catch($){R($)}}}})()};(async()=>{for(let N=0;N<r;N++){try{await A()}catch(L){R(L);break}if(m||g)break}})()})}var wh=Symbol("skip");async function Gi(t,e){return Vi(t,r=>r(),e)}function nr(t,e){var r=0,n,i;e=e||{};function a(){var u=n,h=arguments.length,f,c;e:for(;u;){if(u.args.length!==arguments.length){u=u.next;continue}for(c=0;c<h;c++)if(u.args[c]!==arguments[c]){u=u.next;continue e}return u!==n&&(u===i&&(i=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=n,u.prev=null,n.prev=u,n=u),u.val}for(f=new Array(h),c=0;c<h;c++)f[c]=arguments[c];return u={args:f,val:t.apply(null,f)},n?(n.prev=u,u.next=n):i=u,r===e.maxSize?(i=i.prev,i.next=null):r++,n=u,u.val}return a.clear=function(){n=null,i=null,r=0},a}var{fromUrl:ty}=Bh.default,lr,$h;globalThis.fetch&&!(($h=Qb)!=null&&$h.node)?lr=globalThis.fetch:lr=Ks(qn,{undici:!1});var Uh=96,Ke="\0",ry=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,ny=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ji=/^[0-9a-f]{7,}$/i,Th=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,ds=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),sy=nr(ty),Yi=nr(Ph.default),iy=nr(Dh.default),ps=nr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),oy=new Set(["patch"]),ay=new Set(["patch","minor"]),ly=new Set(["patch","minor","major"]),zh="14.2.7",ve={},z=(0,Lh.default)(Yb.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","l","language","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",l:"language",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(z["no-color"]||!Xc.stdout)&&Jc();var sr=ur(z.greatest),Qi=ur(z.prerelease),Ki=ur(z.release),ir=ur(z.patch),or=ur(z.minor),ar=ur(z["allow-downgrade"]),ze=(0,Nh.default)("npm",{registry:"https://registry.npmjs.org"}),Xi={npmrc:ze,recursive:!0},Ah=z.githubapi?ps(z.githubapi):"https://api.github.com",uy=z.pypiapi?ps(z.pypiapi):"https://pypi.org",Mh=typeof z.sockets=="number"?parseInt(z.sockets):Uh;function Ch(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function kh(t,e,r){let n=fs(e,t);try{return Jb(n),n}catch{}let i=Fh(e);return r&&n===r||i===e?null:kh(t,i,r)}function cy(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ps(iy(r,ze));if(n!==e)try{let i=Yi(n,Xi);if(i!=null&&i.token)return[i,n]}catch{}return[Yi(e,Xi),e]}else return[Yi(e,Xi),e]}var Wh=nr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${zh}`,...r&&{Authorization:`${e} ${r}`}}}));async function hy(t,e,r,n){let[i,a]=cy(t,r),h=(e==="resolutions"?Sy(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${as("fetch")} ${f}`);let c=await lr(f,Wh(n,i==null?void 0:i.type,i==null?void 0:i.token));if(c!=null&&c.ok)return z.verbose&&console.error(`${tr("done")} ${f}`),[await c.json(),e,a,t];throw c!=null&&c.status&&(c!=null&&c.statusText)?new Error(`Received ${c.status} ${c.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function fy(t,e,r){let n=`${uy}/pypi/${t}/json`;z.verbose&&console.error(`${as("fetch")} ${n}`);let i=await lr(n,Wh(r));if(i!=null&&i.ok)return z.verbose&&console.error(`${tr("done")} ${n}`),[await i.json(),e,null,t];throw i!=null&&i.status&&(i!=null&&i.statusText)?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function vh({repository:t,homepage:e,info:r},n,i){var h;r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a;if(n==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let f=typeof t=="string"?t:t.url,c=sy(f),g=(h=c==null?void 0:c.browse)==null?void 0:h.call(c);g&&(a=g),a&&t.directory&&c.treepath&&(a=`${a}/${c.treepath}/HEAD/${t.directory}`),!a&&(t!=null&&t.url)&&/^https?:/.test(t.url)&&(a=t.url),!a&&f&&(a=f)}let u=a||e||"";if(u){let f=new URL(u);f.protocol==="http:"&&f.hostname==="github.com"&&(f.protocol="https:",u=String(f))}return u}function xe(t,e={}){let r={},n=t instanceof Error;typeof t=="string"?r.message=t:n&&(r.error=t.stack||t.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(z.json){if(!n){r.results={};for(let[i,a]of Object.entries(e)){let[u,h]=i.split(Ke);r.results[u]||(r.results[u]={}),r.results[u][h]=a}}console.info(JSON.stringify(r))}else Object.keys(e).length&&!n&&console.info(dy(e)),(r.message||r.error)&&(r.message?console.info(r.message):r.error&&console.info(Ui(r.error)));z["error-on-outdated"]?Gr(Object.keys(e).length?2:0):z["error-on-unchanged"]?Gr(Object.keys(e).length?0:2):Gr(r.error?1:0)}function xh(t,e){let r=ey()==="win32";r&&Xb(t,0),Zb(t,e,r?{flag:"r+"}:void 0)}function Oh(t,e,r){let n=t.split(/\./),i=e.split(/\./),a=r?tr:Ui,u=/^[0-9a-zA-Z-.]+$/,h="";for(let f=0;f<n.length;f++)if(n[f]!==i[f]){u.test(n[f])?h+=a(n.slice(f).join(".")):h+=n[f].split("").map(c=>u.test(c)?a(c):c).join("")+a(`.${n.slice(f+1).join(".")}`);break}else h+=`${n[f]}.`;return h}function dy(t){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[r,n]of Object.entries(t))e.push([r.split(Ke)[1],Oh(n.old,n.new,!1),Oh(n.new,n.old,!0),n.age||"",n.info]);return(0,Hh.default)(e,{hsep:" ",stringLength:r=>r.replace(ks(),"").length})}function py(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`"${ds(i)}": *"${ds(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function my(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`${ds(i)} *= *"${ds(a)}"`,"g");r=r.replace(u,`${i} = "${e[n].new}"`)}return r}function gy(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Zi(t){let e=ne.default.parse(t);return e?!!e.prerelease.length:!1}function jh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function by(t){try{return ne.default.coerce(t).version}catch{return null}}function yy(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=by(r),f=0;n=new Set(n),i=jh(r)||i,i&&(n.add("prerelease"),n.has("patch")&&n.add("prepatch"),n.has("minor")&&n.add("preminor"),n.has("major")&&n.add("premajor"));for(let c of e){let g=ne.default.parse(c);if(g.prerelease.length&&(!i||a))continue;let b=ne.default.diff(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))ne.default.gte(ne.default.coerce(g.version).version,h)&&(h=g.version);else{let m=new Date(t.time[c]).getTime();m>=0&&m>f&&(h=g.version,f=m)}}return h||null}function Ih(t){return ne.default.coerce(t).version}function _y(t,{language:e,range:r,useGreatest:n,useRel:i,usePre:a,semvers:u}={}){var c;if(r==="*"||r.includes("||"))return null;let h=Object.keys(e==="py"?t.releases:t.versions).filter(g=>ne.default.valid(g)),f=yy(t,h,{range:r,semvers:u,usePre:a,useRel:i,useGreatest:n});if(n)return f;{let g,b;e==="py"?(b=t.info.version,g=Ih(t.info.version)):g=t["dist-tags"].latest;let m=Ih(r),p=jh(r),_=Zi(f),E=Zi(g),R=ne.default.gt(f,m);if(!i&&a||p&&_||i&&!R&&p&&!_||p&&!_&&R)return f;if(p&&!_&&!R)return null;let A=ne.default.diff(m,g);return A&&A!=="prerelease"&&!u.has(A.replace(/^pre/,""))||i&&Zi(g)?f:ne.default.lt(g,m)&&!E?ar===!0||(c=ar==null?void 0:ar.has)!=null&&c.call(ar,t.name)?g:null:b??g}}async function wy([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(ry,""),[i,a,u,h]=ny.exec(n)||[];if(!(!a||!u||!h))if(Ji.test(h)){let g={maxSockets:Mh},b=hs.UPDATES_GITHUB_API_TOKEN||hs.GITHUB_API_TOKEN||hs.GH_TOKEN||hs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Ah}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${as("fetch")} ${m}`);let p=await lr(m,g);if(z.verbose&&(p!=null&&p.ok)&&console.error(`${tr("done")} ${m}`),!p||!p.ok)return;let _=await p.json(),{sha:E,commit:R}=_[0];if(!E||!E.length)return;let A=((f=R==null?void 0:R.committer)==null?void 0:f.date)??((c=R==null?void 0:R.author)==null?void 0:c.date);if(E=E.substring(0,h.length),h!==E){let N=e.old.replace(h,E);return{key:t,newRange:N,user:a,repo:u,oldRef:h,newRef:E,newDate:A}}}else{let g=await lr(`${Ah}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let m=(await g.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!ne.default.valid(p))return;if(r){let _=h,E=h.replace(/^v/,"");for(let R of m){let A=R.replace(/^v/,"");ne.default.valid(A)&&(!_||ne.default.gt(A,E))&&(_=R,E=A)}if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],E=_.replace(/^v/,"");if(!ne.default.valid(E))return;if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function Sy(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Ry(t){let e=t.match(Th);return(e==null?void 0:e.length)!==1?t:t.replace(Th,ne.default.coerce(e[0]))}function ur(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}async function Ey(){var T,$,D,H,V,K,J,ae,He;for(let v of[process.stdout,process.stderr])($=(T=v==null?void 0:v._handle)==null?void 0:T.setBlocking)==null||$.call(T,!0);let{help:t,version:e,language:r,file:n,types:i,update:a}=z;if(t&&(Gb.write(`usage: updates [options]
28
+ `),n=!1,i=!1,a;t.on("response",u=>{let{headers:h}=u;n=h["transfer-encoding"]==="chunked"&&!h["content-length"]}),t.on("socket",u=>{let h=()=>{if(n&&!i){let c=new Error("Premature close");c.code="ERR_STREAM_PREMATURE_CLOSE",e(c)}},f=c=>{i=Fn.compare(c.slice(-5),r)===0,!i&&a&&(i=Fn.compare(a.slice(-3),r.slice(0,3))===0&&Fn.compare(c.slice(-2),r.slice(3))===0),a=c};u.prependListener("close",h),u.on("data",f),t.on("close",()=>{u.removeListener("close",h),u.removeListener("data",f)})})}var Ph=Se(Il(),1),Nh=Se(zn(),1),Dh=Se(Ll(),1),ne=Se(Oc(),1),Hh=Se(Nc(),1),Bh=Se(Yc(),1);import{cwd as Vb,stdout as Gb,argv as Yb,env as hs,exit as Gr,versions as Qb}from"node:process";import{join as fs,dirname as Fh,basename as Sh}from"node:path";import{lstatSync as Kb,readFileSync as Rh,truncateSync as Xb,writeFileSync as Zb,accessSync as Jb}from"node:fs";import{platform as ey}from"node:os";import{rootCertificates as Eh}from"node:tls";var Ib=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],$b={"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"};function is(t,{noAffix:e=!1,times:r=Ib,nowThreshold:n=1e4,nowString:i="now",aliases:a=!1,aliasesMap:u=$b}={}){let h=Date.now();if(t=typeof t=="number"?t:Date.parse(t),Number.isNaN(t))return"unknown";let f=!1,c=h-t;if(c<0&&(f=!0,c=Math.abs(c)),c<n)return i;let g,b;for(let p=0,_=r.length;p<_;p++){let E=r[p];if(!(c>=E[1])){g=Math.floor(c/E[0]),b=E[2]+(g>1?"s":"");break}}let m=`${f&&!e?"in ":""}${g} ${b}${!f&&!e?" ago":""}`;return a?u[m]??m:m}import Fi from"node:process";import Lb from"node:os";import Qc from"node:tty";function Ce(t,e=globalThis.Deno?globalThis.Deno.args:Fi.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}var{env:Z}=Fi,os;Ce("no-color")||Ce("no-colors")||Ce("color=false")||Ce("color=never")?os=0:(Ce("color")||Ce("colors")||Ce("color=true")||Ce("color=always"))&&(os=1);function Pb(){if("FORCE_COLOR"in Z)return Z.FORCE_COLOR==="true"?1:Z.FORCE_COLOR==="false"?0:Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}function Nb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Db(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=Pb();n!==void 0&&(os=n);let i=r?os:n;if(i===0)return 0;if(r){if(Ce("color=16m")||Ce("color=full")||Ce("color=truecolor"))return 3;if(Ce("color=256"))return 2}if("TF_BUILD"in Z&&"AGENT_NAME"in Z)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(Z.TERM==="dumb")return a;if(Fi.platform==="win32"){let u=Lb.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in Z)return"GITHUB_ACTIONS"in Z?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in Z)||Z.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor"||Z.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Z){let u=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Z.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM)||"COLORTERM"in Z?1:a}function Kc(t,e={}){let r=Db(t,{streamIsTTY:t&&t.isTTY,...e});return Nb(r)}var Hb={stdout:Kc({isTTY:Qc.isatty(1)}),stderr:Kc({isTTY:Qc.isatty(2)})},Xc=Hb;var Zc=!0;function Jc(){Zc=!1}function qi(t,e,r){return Zc?`\x1B[${e}m${t}\x1B[${r}m`:t}var Ui=t=>qi(t,31,39),tr=t=>qi(t,32,39);var as=t=>qi(t,35,39);var qh=Se(gh(),1);var Mb=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Wi=new Set(["__proto__","prototype","constructor"]),kb=new Set("0123456789");function Wb(t){let e=[],r="",n="start",i=!1;for(let a of t)switch(a){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=a),n="property",i=!i;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(i){i=!1,r+=a;break}if(Wi.has(r))return[];e.push(r),r="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(i){i=!1,r+=a;break}if(n==="property"){if(Wi.has(r))return[];e.push(r),r=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(r,10)),r="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!kb.has(a))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),i&&(i=!1,r+="\\"),r+=a}}switch(i&&(r+="\\"),n){case"property":{if(Wi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function jb(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function bh(t,e,r){if(!Mb(t)||typeof e!="string")return r===void 0?t:r;let n=Wb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(jb(t,a)?t=i===n.length-1?void 0:null:t=t[a],t==null){if(i!==n.length-1)return r;break}}return t===void 0?r:t}var ji=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},yh=t=>globalThis.DOMException===void 0?new ji(t):new DOMException(t),_h=t=>{let e=t.reason===void 0?yh("This operation was aborted."):t.reason;return e instanceof Error?e:yh(e)};async function Vi(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:i}={}){return new Promise((a,u)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let h=[],f=[],c=new Map,g=!1,b=!1,m=!1,p=0,_=0,E=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),R=N=>{g=!0,b=!0,u(N)};i&&(i.aborted&&R(_h(i)),i.addEventListener("abort",()=>{R(_h(i))}));let A=async()=>{if(b)return;let N=await E.next(),L=_;if(_++,N.done){if(m=!0,p===0&&!b){if(!n&&f.length>0){R(new AggregateError(f));return}if(b=!0,c.size===0){a(h);return}let T=[];for(let[$,D]of h.entries())c.get($)!==wh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let $=await e(T,L);$===wh&&c.set(L,$),h[L]=$,p--,await A()}catch(T){if(n)R(T);else{f.push(T),p--;try{await A()}catch($){R($)}}}})()};(async()=>{for(let N=0;N<r;N++){try{await A()}catch(L){R(L);break}if(m||g)break}})()})}var wh=Symbol("skip");async function Gi(t,e){return Vi(t,r=>r(),e)}function nr(t,e){var r=0,n,i;e=e||{};function a(){var u=n,h=arguments.length,f,c;e:for(;u;){if(u.args.length!==arguments.length){u=u.next;continue}for(c=0;c<h;c++)if(u.args[c]!==arguments[c]){u=u.next;continue e}return u!==n&&(u===i&&(i=u.prev),u.prev.next=u.next,u.next&&(u.next.prev=u.prev),u.next=n,u.prev=null,n.prev=u,n=u),u.val}for(f=new Array(h),c=0;c<h;c++)f[c]=arguments[c];return u={args:f,val:t.apply(null,f)},n?(n.prev=u,u.next=n):i=u,r===e.maxSize?(i=i.prev,i.next=null):r++,n=u,u.val}return a.clear=function(){n=null,i=null,r=0},a}var{fromUrl:ty}=Bh.default,lr,$h;globalThis.fetch&&!(($h=Qb)!=null&&$h.node)?lr=globalThis.fetch:lr=Ks(qn,{undici:!1});var Uh=96,Ke="\0",ry=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,ny=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Ji=/^[0-9a-f]{7,}$/i,Th=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,ds=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),sy=nr(ty),Yi=nr(Ph.default),iy=nr(Dh.default),ps=nr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),oy=new Set(["patch"]),ay=new Set(["patch","minor"]),ly=new Set(["patch","minor","major"]),zh="14.2.8",ve={},z=(0,Lh.default)(Yb.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","l","language","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",l:"language",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(z["no-color"]||!Xc.stdout)&&Jc();var sr=ur(z.greatest),Qi=ur(z.prerelease),Ki=ur(z.release),ir=ur(z.patch),or=ur(z.minor),ar=ur(z["allow-downgrade"]),ze=(0,Nh.default)("npm",{registry:"https://registry.npmjs.org"}),Xi={npmrc:ze,recursive:!0},Ah=z.githubapi?ps(z.githubapi):"https://api.github.com",uy=z.pypiapi?ps(z.pypiapi):"https://pypi.org",Mh=typeof z.sockets=="number"?parseInt(z.sockets):Uh;function Ch(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}function kh(t,e,r){let n=fs(e,t);try{return Jb(n),n}catch{}let i=Fh(e);return r&&n===r||i===e?null:kh(t,i,r)}function cy(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ps(iy(r,ze));if(n!==e)try{let i=Yi(n,Xi);if(i!=null&&i.token)return[i,n]}catch{}return[Yi(e,Xi),e]}else return[Yi(e,Xi),e]}var Wh=nr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${zh}`,...r&&{Authorization:`${e} ${r}`}}}));async function hy(t,e,r,n){let[i,a]=cy(t,r),h=(e==="resolutions"?Sy(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${as("fetch")} ${f}`);let c=await lr(f,Wh(n,i==null?void 0:i.type,i==null?void 0:i.token));if(c!=null&&c.ok)return z.verbose&&console.error(`${tr("done")} ${f}`),[await c.json(),e,a,t];throw c!=null&&c.status&&(c!=null&&c.statusText)?new Error(`Received ${c.status} ${c.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function fy(t,e,r){let n=`${uy}/pypi/${t}/json`;z.verbose&&console.error(`${as("fetch")} ${n}`);let i=await lr(n,Wh(r));if(i!=null&&i.ok)return z.verbose&&console.error(`${tr("done")} ${n}`),[await i.json(),e,null,t];throw i!=null&&i.status&&(i!=null&&i.statusText)?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function vh({repository:t,homepage:e,info:r},n,i){var h;r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let a;if(n==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let f=typeof t=="string"?t:t.url,c=sy(f),g=(h=c==null?void 0:c.browse)==null?void 0:h.call(c);g&&(a=g),a&&t.directory&&c.treepath&&(a=`${a}/${c.treepath}/HEAD/${t.directory}`),!a&&(t!=null&&t.url)&&/^https?:/.test(t.url)&&(a=t.url),!a&&f&&(a=f)}let u=a||e||"";if(u){let f=new URL(u);f.protocol==="http:"&&f.hostname==="github.com"&&(f.protocol="https:",u=String(f))}return u}function xe(t,e={}){let r={},n=t instanceof Error;typeof t=="string"?r.message=t:n&&(r.error=t.stack||t.message);for(let i of Object.values(e))"oldPrint"in i&&(i.old=i.oldPrint,delete i.oldPrint),"newPrint"in i&&(i.new=i.newPrint,delete i.newPrint),"oldOriginal"in i&&(i.old=i.oldOriginal,delete i.oldOriginal);if(z.json){if(!n){r.results={};for(let[i,a]of Object.entries(e)){let[u,h]=i.split(Ke);r.results[u]||(r.results[u]={}),r.results[u][h]=a}}console.info(JSON.stringify(r))}else Object.keys(e).length&&!n&&console.info(dy(e)),(r.message||r.error)&&(r.message?console.info(r.message):r.error&&console.info(Ui(r.error)));z["error-on-outdated"]?Gr(Object.keys(e).length?2:0):z["error-on-unchanged"]?Gr(Object.keys(e).length?0:2):Gr(r.error?1:0)}function xh(t,e){let r=ey()==="win32";r&&Xb(t,0),Zb(t,e,r?{flag:"r+"}:void 0)}function Oh(t,e,r){if(t===e)return t;let n=t.split(/\./),i=e.split(/\./),a=r?tr:Ui,u=/^[0-9a-zA-Z-.]+$/,h="";for(let f=0;f<n.length;f++)if(n[f]!==i[f]){u.test(n[f])?h+=a(n.slice(f).join(".")):h+=n[f].split("").map(c=>u.test(c)?a(c):c).join("")+a(`.${n.slice(f+1).join(".")}`);break}else h+=`${n[f]}.`;return h}function dy(t){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[r,n]of Object.entries(t))e.push([r.split(Ke)[1],Oh(n.old,n.new,!1),Oh(n.new,n.old,!0),n.age||"",n.info]);return(0,Hh.default)(e,{hsep:" ",stringLength:r=>r.replace(ks(),"").length})}function py(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`"${ds(i)}": *"${ds(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function my(t,e){let r=t;for(let n of Object.keys(e)){let i=n.split(Ke)[1],a=e[n].oldOriginal||e[n].old,u=new RegExp(`${ds(i)} *= *"${ds(a)}"`,"g");r=r.replace(u,`${i} = "${e[n].new}"`)}return r}function gy(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Zi(t){let e=ne.default.parse(t);return e?!!e.prerelease.length:!1}function jh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function by(t){try{return ne.default.coerce(t).version}catch{return null}}function yy(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=by(r),f=0;n=new Set(n),i=jh(r)||i,i&&(n.add("prerelease"),n.has("patch")&&n.add("prepatch"),n.has("minor")&&n.add("preminor"),n.has("major")&&n.add("premajor"));for(let c of e){let g=ne.default.parse(c);if(g.prerelease.length&&(!i||a))continue;let b=ne.default.diff(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))ne.default.gte(ne.default.coerce(g.version).version,h)&&(h=g.version);else{let m=new Date(t.time[c]).getTime();m>=0&&m>f&&(h=g.version,f=m)}}return h||null}function Ih(t){return ne.default.coerce(t).version}function _y(t,{language:e,range:r,useGreatest:n,useRel:i,usePre:a,semvers:u}={}){var c;if(r==="*"||r.includes("||"))return null;let h=Object.keys(e==="py"?t.releases:t.versions).filter(g=>ne.default.valid(g)),f=yy(t,h,{range:r,semvers:u,usePre:a,useRel:i,useGreatest:n});if(n)return f;{let g,b;e==="py"?(b=t.info.version,g=Ih(t.info.version)):g=t["dist-tags"].latest;let m=Ih(r),p=jh(r),_=Zi(f),E=Zi(g),R=ne.default.gt(f,m);if(!i&&a||p&&_||i&&!R&&p&&!_||p&&!_&&R)return f;if(p&&!_&&!R)return null;let A=ne.default.diff(m,g);return A&&A!=="prerelease"&&!u.has(A.replace(/^pre/,""))||i&&Zi(g)?f:ne.default.lt(g,m)&&!E?ar===!0||(c=ar==null?void 0:ar.has)!=null&&c.call(ar,t.name)?g:null:b??g}}async function wy([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(ry,""),[i,a,u,h]=ny.exec(n)||[];if(!(!a||!u||!h))if(Ji.test(h)){let g={maxSockets:Mh},b=hs.UPDATES_GITHUB_API_TOKEN||hs.GITHUB_API_TOKEN||hs.GH_TOKEN||hs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Ah}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${as("fetch")} ${m}`);let p=await lr(m,g);if(z.verbose&&(p!=null&&p.ok)&&console.error(`${tr("done")} ${m}`),!p||!p.ok)return;let _=await p.json(),{sha:E,commit:R}=_[0];if(!E||!E.length)return;let A=((f=R==null?void 0:R.committer)==null?void 0:f.date)??((c=R==null?void 0:R.author)==null?void 0:c.date);if(E=E.substring(0,h.length),h!==E){let N=e.old.replace(h,E);return{key:t,newRange:N,user:a,repo:u,oldRef:h,newRef:E,newDate:A}}}else{let g=await lr(`${Ah}/repos/${a}/${u}/git/refs/tags`);if(!g||!g.ok)return;let m=(await g.json()).map(_=>_.ref.replace(/^refs\/tags\//,"")),p=h.replace(/^v/,"");if(!ne.default.valid(p))return;if(r){let _=h,E=h.replace(/^v/,"");for(let R of m){let A=R.replace(/^v/,"");ne.default.valid(A)&&(!_||ne.default.gt(A,E))&&(_=R,E=A)}if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],E=_.replace(/^v/,"");if(!ne.default.valid(E))return;if(ne.default.neq(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function Sy(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Ry(t){let e=t.match(Th);return(e==null?void 0:e.length)!==1?t:t.replace(Th,ne.default.coerce(e[0]))}function ur(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}async function Ey(){var T,$,D,H,V,K,J,ae,He;for(let v of[process.stdout,process.stderr])($=(T=v==null?void 0:v._handle)==null?void 0:T.setBlocking)==null||$.call(T,!0);let{help:t,version:e,language:r,file:n,types:i,update:a}=z;if(t&&(Gb.write(`usage: updates [options]
29
29
 
30
30
  Options:
31
31
  -l, --language <lang> Language to check, either 'js' or 'py'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "updates",
3
- "version": "14.2.7",
3
+ "version": "14.2.8",
4
4
  "description": "Flexible npm and poetry dependency update tool",
5
5
  "author": "silverwind",
6
6
  "repository": "silverwind/updates",