updates 14.3.3 → 14.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/updates.js +1 -1
- package/package.json +5 -5
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 _h=C((vS,yh)=>{"use strict";yh.exports=qb;var Bb=mh(),Fb=bh();function qb(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Bb;try{return e.parse(t),e.finish()}catch(r){throw Fb(r,t)}}});function Ms({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 Gs=Pe(da(),1);var pa=Gs.default.HttpProxyAgent,ma=Gs.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 _a=Pe(ba(),1);import{Agent as Sd}from"node:http";import{Agent as Rd}from"node:https";var Ed={agentCacheSize:512},ya={maxSockets:64,keepAlive:!1},Ys=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace(this,t)}};function Qs(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...Ed,...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,_a.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?ma:pa)({...h,proxy:g}):m=new(p?Rd:Sd)(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,{...ya,...f});E&&(c.agent=E)}else if(e.undici&&!("dispatcher"in c)){let E=await i(u,{...ya,...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 Ys(`${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 xh=Pe(Ks(),1);import Xd from"node:http";import Zd from"node:https";import jt from"node:zlib";import rl,{PassThrough as nl,pipeline as Vt}from"node:stream";import{Buffer as Fn}from"node:buffer";function Ad(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 Ea=Ad;vr();On();import ot,{PassThrough as Ma}from"node:stream";import{types as Wa,deprecate as ii,promisify as Md}from"node:util";import{Buffer as Se}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,ti=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]),La=t=>typeof t=="object"&&(t[In]==="AbortSignal"||t[In]==="EventTarget"),Pa=(t,e)=>{let r=new URL(e).hostname,n=new URL(t).hostname;return r===n||r.endsWith(`.${n}`)},Na=(t,e)=>{let r=new URL(e).protocol,n=new URL(t).protocol;return r===n};var Wd=Md(ot.pipeline),me=Symbol("Body internals"),Ue=class{constructor(e,{size:r=0}={}){let n=null;e===null?e=null:ti(e)?e=Se.from(e.toString()):Or(e)||Se.isBuffer(e)||(Wa.isAnyArrayBuffer(e)?e=Se.from(e):ArrayBuffer.isView(e)?e=Se.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ot||(e instanceof _t?(e=$a(e),n=e.type.split("=")[1]):e=Se.from(String(e))));let i=e;Se.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 si(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(()=>(za(),Ua));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 si(this);return new TextDecoder().decode(e)}buffer(){return si(this)}};Ue.prototype.buffer=ii(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:ii(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function si(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 Se.alloc(0);if(!(e instanceof ot))return Se.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")?Se.from(r.join("")):Se.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 Wt=(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 Ma({highWaterMark:e}),n=new Ma({highWaterMark:e}),i.pipe(r),i.pipe(n),t[me].stream=r,i=n),i},kd=ii(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":ti(t)?"application/x-www-form-urlencoded;charset=UTF-8":Or(t)?t.type||null:Se.isBuffer(t)||Wa.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:Se.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},ja=async(t,{body:e})=>{e===null?t.end():await Wd(e,t)};import{types as Va}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}},oi=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"&&!Va.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"||Va.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),oi(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),oi(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 Ga(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),oi(e,String(r)),!0}catch{return!1}}))}var jd=new Set([301,302,303,307,308]),Hn=t=>jd.has(t);var Ne=Symbol("Response internals"),Re=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(Wt(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(Re.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 Yd}from"node:url";import{deprecate as Qd}from"node:util";var Ya=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 Vd}from"node:net";function Qa(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 Ka=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),Xa="strict-origin-when-cross-origin";function Za(t){if(!Ka.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function Gd(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=Vd(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 kt(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:Gd(t)}function Ja(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=Qa(i),u=Qa(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 kt(a)&&!kt(h)?"no-referrer":u.toString();case"strict-origin-when-cross-origin":return a.origin===h.origin?a:kt(a)&&!kt(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 kt(a)&&!kt(h)?"no-referrer":a;default:throw new TypeError(`Invalid referrerPolicy: ${n}`)}}function el(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let n of e)n&&Ka.has(n)&&(r=n);return r}var se=Symbol("Request internals"),$r=t=>typeof t=="object"&&typeof t[se]=="object",Kd=Qd(()=>{},".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&&Kd(),(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?Wt(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&&!La(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 Yd(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=Za(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 tl=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=Xa),t.referrer&&t.referrer!=="no-referrer"?t[se].referrer=Ja(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=Ya(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();ri();var Jd=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}=tl(i);if(!Jd.has(a.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${a.protocol.replace(/:$/,"")}" is not supported.`);if(a.protocol==="data:"){let _=Ea(i.url),E=new Re(_,{headers:{"Content-Type":_.typeFull}});r(E);return}let h=(a.protocol==="https:"?Zd:Xd).request,{signal:f}=i,c=null,g=()=>{let _=new Bn("The operation was aborted.");n(_),i.body&&i.body instanceof rl.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()}),ep(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=Ga(_.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:Wt(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!Pa(i.url,$)||!Na(i.url,$))for(let G of["authorization","www-authenticate","cookie","cookie2"])D.headers.delete(G);if(_.statusCode!==303&&i.body&&e.body instanceof rl.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=el(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 nl,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 Re(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 Re(R,A),r(c);return}if(N==="deflate"||N==="x-deflate"){let T=Vt(_,new nl,$=>{$&&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 Re(R,A),r(c)}),T.once("end",()=>{c||(c=new Re(R,A),r(c))});return}if(N==="br"){R=Vt(R,jt.createBrotliDecompress(),T=>{T&&n(T)}),c=new Re(R,A),r(c);return}c=new Re(R,A),r(c)}),ja(m,i).catch(n)})}function ep(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 Oh=Pe($l(),1),Ih=Pe(ci(),1),V=Pe(xc(),1),$h=Pe(Pc(),1),Lh=Pe(Gc(),1);import{cwd as Ub,stdout as zb,argv as Mb,env as cs,exit as Gr,versions as Wb}from"node:process";import{join as hs,dirname as Ph,basename as Yi,resolve as kb}from"node:path";import{lstatSync as jb,readFileSync as wh,truncateSync as Vb,writeFileSync as Gb,accessSync as Yb}from"node:fs";var Tb=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Ab={"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 ss(t,{now:e,noAffix:r=!1,times:n=Tb,nowThreshold:i=1e4,nowString:a="now",aliases:u=!1,aliasesMap:h=Ab}={}){if(t=typeof t=="number"?t:Date.parse(t),e=e?typeof e=="number"?e:Date.parse(e):new Date,Number.isNaN(t))return"unknown";let f=!1,c=e-t;if(c<0&&(f=!0,c=Math.abs(c)),c<i)return a;let g,b;for(let p=0,_=n.length;p<_;p++){let E=n[p];if(!(c>=E[1])){g=Math.floor(c/E[0]),b=E[2]+(g>1?"s":"");break}}let m=`${f&&!r?"in ":""}${g} ${b}${!f&&!r?" ago":""}`;return u?h[m]??m:m}import Fi from"node:process";import Cb from"node:os";import Yc from"node:tty";function Ae(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:X}=Fi,is;Ae("no-color")||Ae("no-colors")||Ae("color=false")||Ae("color=never")?is=0:(Ae("color")||Ae("colors")||Ae("color=true")||Ae("color=always"))&&(is=1);function vb(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function xb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ob(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=vb();n!==void 0&&(is=n);let i=r?is:n;if(i===0)return 0;if(r){if(Ae("color=16m")||Ae("color=full")||Ae("color=truecolor"))return 3;if(Ae("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(X.TERM==="dumb")return a;if(Fi.platform==="win32"){let u=Cb.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in X)||X.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let u=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:a}function Qc(t,e={}){let r=Ob(t,{streamIsTTY:t&&t.isTTY,...e});return xb(r)}var Ib={stdout:Qc({isTTY:Yc.isatty(1)}),stderr:Qc({isTTY:Yc.isatty(2)})},Kc=Ib;var Xc=!0;function Zc(){Xc=!1}function qi(t,e,r){return Xc?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Ui=(...t)=>qi(t,31,39),tr=(...t)=>qi(t,32,39);var os=(...t)=>qi(t,35,39);var $b=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var zi=new Set(["__proto__","prototype","constructor"]),Lb=new Set("0123456789");function Pb(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(zi.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(zi.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"&&!Lb.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(zi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Nb(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 Jc(t,e,r){if(!$b(t)||typeof e!="string")return r===void 0?t:r;let n=Pb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(Nb(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 Mi=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},eh=t=>globalThis.DOMException===void 0?new Mi(t):new DOMException(t),th=t=>{let e=t.reason===void 0?eh("This operation was aborted."):t.reason;return e instanceof Error?e:eh(e)};async function Wi(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(th(i)),i.addEventListener("abort",()=>{R(th(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($)!==rh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let $=await e(T,L);$===rh&&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 rh=Symbol("skip");async function ki(t,e){return Wi(t,r=>r(),e)}function rr(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 lr,vh;globalThis.fetch&&!((vh=Wb)!=null&&vh.node)?lr=globalThis.fetch:lr=Qs(qn,{undici:!1});var Nh=96,Ke="\0",Qb=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Kb=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,eo=/^[0-9a-f]{7,}$/i,Sh=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,fs=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),Xb=rr(Lh.default.fromUrl),Qi=rr(Oh.default),ds=rr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),Zb=new Set(["patch"]),Jb=new Set(["patch","minor"]),ey=new Set(["patch","minor","major"]),Dh="14.3.3",Ce={},z=(0,xh.default)(Mb.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"]||!Kc.stdout)&&Zc();var sr=ur(z.greatest),Ki=ur(z.prerelease),Xi=ur(z.release),ir=ur(z.patch),or=ur(z.minor),ar=ur(z["allow-downgrade"]),ze=(0,Ih.default)("npm",{registry:"https://registry.npmjs.org"}),Zi={npmrc:ze,recursive:!0},Rh=z.githubapi?ds(z.githubapi):"https://api.github.com",ty=z.pypiapi?ds(z.pypiapi):"https://pypi.org",Hh=typeof z.sockets=="number"?parseInt(z.sockets):Nh,ry=rr((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function Bh(t,e,r){let n=hs(e,t);try{return Yb(n),n}catch{}let i=Ph(e);return r&&n===r||i===e?null:Bh(t,i,r)}function ny(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ds(ry(r,ze));if(n!==e)try{let i=Qi(n,Zi);if(i!=null&&i.token)return[i,n]}catch{}return[Qi(e,Zi),e]}else return[Qi(e,Zi),e]}var Fh=rr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${Dh}`,...r&&{Authorization:`${e} ${r}`}}}));async function sy(t,e,r,n){let[i,a]=ny(t,r),h=(e==="resolutions"?my(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${os("fetch")} ${f}`);let c=await lr(f,Fh(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 iy(t,e,r){let n=`${ty}/pypi/${t}/json`;z.verbose&&console.error(`${os("fetch")} ${n}`);let i=await lr(n,Fh(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 Eh({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=Xb(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 ve(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(ay(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)}async function oy(t,e){let{platform:r}=await import("node:os"),n=r()==="win32";n&&Vb(t,0),Gb(t,e,n?{flag:"r+"}:void 0)}function Th(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 ay(t){let e=[["NAME","OLD","NEW","AGE","INFO"]];for(let[r,n]of Object.entries(t))e.push([r.split(Ke)[1],Th(n.old,n.new,!1),Th(n.new,n.old,!0),n.age||"",n.info]);return(0,$h.default)(e,{hsep:" ",stringLength:r=>r.replace(Ms(),"").length})}function ly(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(`"${fs(i)}": *"${fs(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function uy(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(`${fs(i)} *= *"${fs(a)}"`,"g");r=r.replace(u,`${i} = "${e[n].new}"`)}return r}function cy(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Ji(t){let e=(0,V.parse)(t);return e?!!e.prerelease.length:!1}function qh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function hy(t){try{return(0,V.coerce)(t).version}catch{return null}}function fy(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=hy(r),f=0;n=new Set(n),i=qh(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=(0,V.parse)(c);if(g.prerelease.length&&(!i||a))continue;let b=(0,V.diff)(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))(0,V.gte)((0,V.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 dy(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=>(0,V.valid)(g)),f=fy(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=(0,V.coerce)(t.info.version).version):g=t["dist-tags"].latest;let m=(0,V.coerce)(r).version,p=qh(r),_=Ji(f),E=Ji(g),R=(0,V.gt)(f,m);if(!i&&a||p&&_||i&&!R&&p&&!_||p&&!_&&R)return f;if(p&&!_&&!R)return null;let A=(0,V.diff)(m,g);return A&&A!=="prerelease"&&!u.has(A.replace(/^pre/,""))||i&&Ji(g)?f:(0,V.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 py([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(Qb,""),[i,a,u,h]=Kb.exec(n)||[];if(!(!a||!u||!h))if(eo.test(h)){let g={maxSockets:Hh},b=cs.UPDATES_GITHUB_API_TOKEN||cs.GITHUB_API_TOKEN||cs.GH_TOKEN||cs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Rh}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${os("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(`${Rh}/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(!(0,V.valid)(p))return;if(r){let _=h,E=h.replace(/^v/,"");for(let R of m){let A=R.replace(/^v/,"");(0,V.valid)(A)&&(!_||(0,V.gt)(A,E))&&(_=R,E=A)}if((0,V.neq)(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],E=_.replace(/^v/,"");if(!(0,V.valid)(E))return;if((0,V.neq)(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function my(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function gy(t){let e=t.match(Sh);return(e==null?void 0:e.length)!==1?t:t.replace(Sh,(0,V.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}function Ah(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function Ch(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}async function by(){var T,$,D,H,G,Z,ee,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&&(zb.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 Oh=Pe($l(),1),Ih=Pe(ci(),1),V=Pe(xc(),1),$h=Pe(Pc(),1),Lh=Pe(Gc(),1);import{cwd as Ub,stdout as zb,argv as Mb,env as cs,exit as Gr,versions as Wb}from"node:process";import{join as hs,dirname as Ph,basename as Yi,resolve as kb}from"node:path";import{lstatSync as jb,readFileSync as wh,truncateSync as Vb,writeFileSync as Gb,accessSync as Yb}from"node:fs";var Tb=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Ab={"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 ss(t,{now:e,noAffix:r=!1,times:n=Tb,nowThreshold:i=1e4,nowString:a="now",aliases:u=!1,aliasesMap:h=Ab}={}){if(t=typeof t=="number"?t:Date.parse(t),e=e?typeof e=="number"?e:Date.parse(e):new Date,Number.isNaN(t))return"unknown";let f=!1,c=e-t;if(c<0&&(f=!0,c=Math.abs(c)),c<i)return a;let g,b;for(let p=0,_=n.length;p<_;p++){let E=n[p];if(!(c>=E[1])){g=Math.floor(c/E[0]),b=E[2]+(g>1?"s":"");break}}let m=`${f&&!r?"in ":""}${g} ${b}${!f&&!r?" ago":""}`;return u?h[m]??m:m}import Fi from"node:process";import Cb from"node:os";import Yc from"node:tty";function Ae(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:X}=Fi,is;Ae("no-color")||Ae("no-colors")||Ae("color=false")||Ae("color=never")?is=0:(Ae("color")||Ae("colors")||Ae("color=true")||Ae("color=always"))&&(is=1);function vb(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function xb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ob(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let n=vb();n!==void 0&&(is=n);let i=r?is:n;if(i===0)return 0;if(r){if(Ae("color=16m")||Ae("color=full")||Ae("color=truecolor"))return 3;if(Ae("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let a=i||0;if(X.TERM==="dumb")return a;if(Fi.platform==="win32"){let u=Cb.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in X)||X.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let u=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:a}function Qc(t,e={}){let r=Ob(t,{streamIsTTY:t&&t.isTTY,...e});return xb(r)}var Ib={stdout:Qc({isTTY:Yc.isatty(1)}),stderr:Qc({isTTY:Yc.isatty(2)})},Kc=Ib;var Xc=!0;function Zc(){Xc=!1}function qi(t,e,r){return Xc?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Ui=(...t)=>qi(t,31,39),tr=(...t)=>qi(t,32,39);var os=(...t)=>qi(t,35,39);var $b=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var zi=new Set(["__proto__","prototype","constructor"]),Lb=new Set("0123456789");function Pb(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(zi.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(zi.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"&&!Lb.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(zi.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Nb(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 Jc(t,e,r){if(!$b(t)||typeof e!="string")return r===void 0?t:r;let n=Pb(e);if(n.length===0)return r;for(let i=0;i<n.length;i++){let a=n[i];if(Nb(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 Mi=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},eh=t=>globalThis.DOMException===void 0?new Mi(t):new DOMException(t),th=t=>{let e=t.reason===void 0?eh("This operation was aborted."):t.reason;return e instanceof Error?e:eh(e)};async function Wi(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(th(i)),i.addEventListener("abort",()=>{R(th(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($)!==rh&&T.push(D);a(T)}return}p++,(async()=>{try{let T=await N.value;if(b)return;let $=await e(T,L);$===rh&&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 rh=Symbol("skip");async function ki(t,e){return Wi(t,r=>r(),e)}function rr(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 lr,vh;globalThis.fetch&&!((vh=Wb)!=null&&vh.node)?lr=globalThis.fetch:lr=Qs(qn,{undici:!1});var Nh=96,Ke="\0",Qb=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Kb=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,eo=/^[0-9a-f]{7,}$/i,Sh=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,fs=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),Xb=rr(Lh.default.fromUrl),Qi=rr(Oh.default),ds=rr(t=>t.endsWith("/")?t.substring(0,t.length-1):t),Zb=new Set(["patch"]),Jb=new Set(["patch","minor"]),ey=new Set(["patch","minor","major"]),Dh="14.3.4",Ce={},z=(0,xh.default)(Mb.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"]||!Kc.stdout)&&Zc();var sr=ur(z.greatest),Ki=ur(z.prerelease),Xi=ur(z.release),ir=ur(z.patch),or=ur(z.minor),ar=ur(z["allow-downgrade"]),ze=(0,Ih.default)("npm",{registry:"https://registry.npmjs.org"}),Zi={npmrc:ze,recursive:!0},Rh=z.githubapi?ds(z.githubapi):"https://api.github.com",ty=z.pypiapi?ds(z.pypiapi):"https://pypi.org",Hh=typeof z.sockets=="number"?parseInt(z.sockets):Nh,ry=rr((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function Bh(t,e,r){let n=hs(e,t);try{return Yb(n),n}catch{}let i=Ph(e);return r&&n===r||i===e?null:Bh(t,i,r)}function ny(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=ds(ry(r,ze));if(n!==e)try{let i=Qi(n,Zi);if(i!=null&&i.token)return[i,n]}catch{}return[Qi(e,Zi),e]}else return[Qi(e,Zi),e]}var Fh=rr((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${Dh}`,...r&&{Authorization:`${e} ${r}`}}}));async function sy(t,e,r,n){let[i,a]=ny(t,r),h=(e==="resolutions"?my(t):t).replace(/\//g,"%2f"),f=`${a}/${h}`;z.verbose&&console.error(`${os("fetch")} ${f}`);let c=await lr(f,Fh(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 iy(t,e,r){let n=`${ty}/pypi/${t}/json`;z.verbose&&console.error(`${os("fetch")} ${n}`);let i=await lr(n,Fh(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 Eh({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=Xb(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 ve(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(ay(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)}async function oy(t,e){let{platform:r}=await import("node:os"),n=r()==="win32";n&&Vb(t,0),Gb(t,e,n?{flag:"r+"}:void 0)}function Th(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 ay(t){let e=[["NAME","OLD","NEW","AGE","INFO"]],r=new Set;for(let[n,i]of Object.entries(t)){let a=n.split(Ke)[1];r.has(a)||(r.add(a),e.push([a,Th(i.old,i.new,!1),Th(i.new,i.old,!0),i.age||"",i.info]))}return(0,$h.default)(e,{hsep:" ",stringLength:n=>n.replace(Ms(),"").length})}function ly(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(`"${fs(i)}": *"${fs(a)}"`,"g");r=r.replace(u,`"${i}": "${e[n].new}"`)}return r}function uy(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(`${fs(i)} *= *"${fs(a)}"`,"g");r=r.replace(u,`${i} = "${e[n].new}"`)}return r}function cy(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Ji(t){let e=(0,V.parse)(t);return e?!!e.prerelease.length:!1}function qh(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function hy(t){try{return(0,V.coerce)(t).version}catch{return null}}function fy(t,e,{range:r,semvers:n,usePre:i,useRel:a,useGreatest:u}={}){let h=hy(r),f=0;n=new Set(n),i=qh(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=(0,V.parse)(c);if(g.prerelease.length&&(!i||a))continue;let b=(0,V.diff)(h,g.version);if(!(!b||!n.has(b)))if(u||!("time"in t))(0,V.gte)((0,V.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 dy(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=>(0,V.valid)(g)),f=fy(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=(0,V.coerce)(t.info.version).version):g=t["dist-tags"].latest;let m=(0,V.coerce)(r).version,p=qh(r),_=Ji(f),E=Ji(g),R=(0,V.gt)(f,m);if(!i&&a||p&&_||i&&!R&&p&&!_||p&&!_&&R)return f;if(p&&!_&&!R)return null;let A=(0,V.diff)(m,g);return A&&A!=="prerelease"&&!u.has(A.replace(/^pre/,""))||i&&Ji(g)?f:(0,V.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 py([t,e],{useGreatest:r}={}){var f,c;let n=e.old.replace(Qb,""),[i,a,u,h]=Kb.exec(n)||[];if(!(!a||!u||!h))if(eo.test(h)){let g={maxSockets:Hh},b=cs.UPDATES_GITHUB_API_TOKEN||cs.GITHUB_API_TOKEN||cs.GH_TOKEN||cs.HOMEBREW_GITHUB_API_TOKEN;b&&(g.headers={Authorization:`Bearer ${b}`});let m=`${Rh}/repos/${a}/${u}/commits`;z.verbose&&console.error(`${os("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(`${Rh}/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(!(0,V.valid)(p))return;if(r){let _=h,E=h.replace(/^v/,"");for(let R of m){let A=R.replace(/^v/,"");(0,V.valid)(A)&&(!_||(0,V.gt)(A,E))&&(_=R,E=A)}if((0,V.neq)(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}else{let _=m[m.length-1],E=_.replace(/^v/,"");if(!(0,V.valid)(E))return;if((0,V.neq)(p,E))return{key:t,newRange:_,user:a,repo:u,oldRef:h,newRef:_}}}}function my(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function gy(t){let e=t.match(Sh);return(e==null?void 0:e.length)!==1?t:t.replace(Sh,(0,V.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}function Ah(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function Ch(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}async function by(){var T,$,D,H,G,Z,ee,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&&(zb.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.3.
|
|
3
|
+
"version": "14.3.4",
|
|
4
4
|
"description": "Flexible npm and poetry dependency update tool",
|
|
5
5
|
"author": "silverwind",
|
|
6
6
|
"repository": "silverwind/updates",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@iarna/toml": "2.2.5",
|
|
18
18
|
"ansi-regex": "6.0.1",
|
|
19
|
-
"dot-prop": "8.0.
|
|
20
|
-
"esbuild": "0.18.
|
|
21
|
-
"eslint": "8.
|
|
22
|
-
"eslint-config-silverwind": "
|
|
19
|
+
"dot-prop": "8.0.2",
|
|
20
|
+
"esbuild": "0.18.14",
|
|
21
|
+
"eslint": "8.45.0",
|
|
22
|
+
"eslint-config-silverwind": "74.0.0",
|
|
23
23
|
"execa": "7.1.1",
|
|
24
24
|
"fetch-enhanced": "11.1.2",
|
|
25
25
|
"glowie": "1.2.0",
|