|
|
|
@@ -1,50 +1,50 @@
|
|
|
|
|
var dd=Object.create;var Ig=Object.defineProperty;var fd=Object.getOwnPropertyDescriptor;var wd=Object.getOwnPropertyNames;var yd=Object.getPrototypeOf,pd=Object.prototype.hasOwnProperty;var h=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(A,t)=>(typeof require<"u"?require:A)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Dd=(e,A,t)=>()=>{if(t)throw t[0];try{return e&&(A=e(e=0)),A}catch(r){throw t=[r],r}};var d=(e,A)=>()=>{try{return A||e((A={exports:{}}).exports,A),A.exports}catch(t){throw A=0,t}};var md=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let s of wd(A))!pd.call(e,s)&&s!==t&&Ig(e,s,{get:()=>A[s],enumerable:!(r=fd(A,s))||r.enumerable});return e};var Cg=(e,A,t)=>(t=e!=null?dd(yd(e)):{},md(A||!e||!e.__esModule?Ig(t,"default",{value:e,enumerable:!0}):t,e));import{createRequire as kd}from"node:module";import Rd from"node:path";import Fd from"node:url";var E=Dd(()=>{"use strict";globalThis.require=kd(import.meta.url);globalThis.__filename=Fd.fileURLToPath(import.meta.url);globalThis.__dirname=Rd.dirname(__filename)});var yg=d(ut=>{"use strict";E();var Jb=h("net"),bd=h("tls"),Si=h("http"),dg=h("https"),Md=h("events"),vb=h("assert"),Ld=h("util");ut.httpOverHttp=Td;ut.httpsOverHttp=xd;ut.httpOverHttps=Yd;ut.httpsOverHttps=Gd;function Td(e){var A=new ae(e);return A.request=Si.request,A}function xd(e){var A=new ae(e);return A.request=Si.request,A.createSocket=fg,A.defaultPort=443,A}function Yd(e){var A=new ae(e);return A.request=dg.request,A}function Gd(e){var A=new ae(e);return A.request=dg.request,A.createSocket=fg,A.defaultPort=443,A}function ae(e){var A=this;A.options=e||{},A.proxyOptions=A.options.proxy||{},A.maxSockets=A.options.maxSockets||Si.Agent.defaultMaxSockets,A.requests=[],A.sockets=[],A.on("free",function(r,s,n,i){for(var o=wg(s,n,i),a=0,c=A.requests.length;a<c;++a){var g=A.requests[a];if(g.host===o.host&&g.port===o.port){A.requests.splice(a,1),g.request.onSocket(r);return}}r.destroy(),A.removeSocket(r)})}Ld.inherits(ae,Md.EventEmitter);ae.prototype.addRequest=function(A,t,r,s){var n=this,i=Ui({request:A},n.options,wg(t,r,s));if(n.sockets.length>=this.maxSockets){n.requests.push(i);return}n.createSocket(i,function(o){o.on("free",a),o.on("close",c),o.on("agentRemove",c),A.onSocket(o);function a(){n.emit("free",o,i)}function c(g){n.removeSocket(o),o.removeListener("free",a),o.removeListener("close",c),o.removeListener("agentRemove",c)}})};ae.prototype.createSocket=function(A,t){var r=this,s={};r.sockets.push(s);var n=Ui({},r.proxyOptions,{method:"CONNECT",path:A.host+":"+A.port,agent:!1,headers:{host:A.host+":"+A.port}});A.localAddress&&(n.localAddress=A.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")),pe("making CONNECT request");var i=r.request(n);i.useChunkedEncodingByDefault=!1,i.once("response",o),i.once("upgrade",a),i.once("connect",c),i.once("error",g),i.end();function o(Q){Q.upgrade=!0}function a(Q,B,C){process.nextTick(function(){c(Q,B,C)})}function c(Q,B,C){if(i.removeAllListeners(),B.removeAllListeners(),Q.statusCode!==200){pe("tunneling socket could not be established, statusCode=%d",Q.statusCode),B.destroy();var I=new Error("tunneling socket could not be established, statusCode="+Q.statusCode);I.code="ECONNRESET",A.request.emit("error",I),r.removeSocket(s);return}if(C.length>0){pe("got illegal response body from proxy"),B.destroy();var I=new Error("got illegal response body from proxy");I.code="ECONNRESET",A.request.emit("error",I),r.removeSocket(s);return}return pe("tunneling connection has established"),r.sockets[r.sockets.indexOf(s)]=B,t(B)}function g(Q){i.removeAllListeners(),pe(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,Q.message,Q.stack);var B=new Error("tunneling socket could not be established, cause="+Q.message);B.code="ECONNRESET",A.request.emit("error",B),r.removeSocket(s)}};ae.prototype.removeSocket=function(A){var t=this.sockets.indexOf(A);if(t!==-1){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,function(s){r.request.onSocket(s)})}};function fg(e,A){var t=this;ae.prototype.createSocket.call(t,e,function(r){var s=e.request.getHeader("host"),n=Ui({},t.options,{socket:r,servername:s?s.replace(/:.*$/,""):e.host}),i=bd.connect(0,n);t.sockets[t.sockets.indexOf(r)]=i,A(i)})}function wg(e,A,t){return typeof e=="string"?{host:e,port:A,localAddress:t}:e}function Ui(e){for(var A=1,t=arguments.length;A<t;++A){var r=arguments[A];if(typeof r=="object")for(var s=Object.keys(r),n=0,i=s.length;n<i;++n){var o=s[n];r[o]!==void 0&&(e[o]=r[o])}}return e}var pe;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?pe=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:pe=function(){};ut.debug=pe});var Dg=d((qb,pg)=>{"use strict";E();pg.exports=yg()});var z=d((Ob,mg)=>{"use strict";E();mg.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var J=d((Zb,Kg)=>{"use strict";E();var kg=Symbol.for("undici.error.UND_ERR"),K=class extends Error{constructor(A){super(A),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](A){return A&&A[kg]===!0}[kg]=!0},Rg=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),bi=class extends K{constructor(A){super(A),this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](A){return A&&A[Rg]===!0}[Rg]=!0},Fg=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),Mi=class extends K{constructor(A){super(A),this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](A){return A&&A[Fg]===!0}[Fg]=!0},Ng=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),Li=class extends K{constructor(A){super(A),this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](A){return A&&A[Ng]===!0}[Ng]=!0},Sg=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),Ti=class extends K{constructor(A){super(A),this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](A){return A&&A[Sg]===!0}[Sg]=!0},Ug=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),xi=class extends K{constructor(A,t,r,s){super(A),this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS
Line truncated
|
|
|
|
|
`)||e.includes("\r")||e.includes("\0"))===!1}function ey(e,A){let{headersList:t}=A,r=(t.get("referrer-policy",!0)??"").split(","),s="";if(r.length>0)for(let n=r.length;n!==0;n--){let i=r[n-1].trim();if(Jw.has(i)){s=i;break}}s!==""&&(e.referrerPolicy=s)}function ty(){return"allowed"}function ry(){return"success"}function sy(){return"success"}function ny(e){let A=null;A=e.mode,e.headersList.set("sec-fetch-mode",A,!0)}function iy(e){let A=e.origin;if(!(A==="client"||A===void 0)){if(e.responseTainting==="cors"||e.mode==="websocket")e.headersList.append("origin",A,!0);else if(e.method!=="GET"&&e.method!=="HEAD"){switch(e.referrerPolicy){case"no-referrer":A=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":e.origin&&Fo(e.origin)&&!Fo(kr(e))&&(A=null);break;case"same-origin":Vs(e,kr(e))||(A=null);break;default:}e.headersList.append("origin",A,!0)}}}function Ft(e,A){return e}function oy(e,A,t){return!e?.startTime||e.startTime<A?{domainLookupStartTime:A,domainLookupEndTime:A,connectionStartTime:A,connectionEndTime:A,secureConnectionStartTime:A,ALPNNegotiatedProtocol:e?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Ft(e.domainLookupStartTime,t),domainLookupEndTime:Ft(e.domainLookupEndTime,t),connectionStartTime:Ft(e.connectionStartTime,t),connectionEndTime:Ft(e.connectionEndTime,t),secureConnectionStartTime:Ft(e.secureConnectionStartTime,t),ALPNNegotiatedProtocol:e.ALPNNegotiatedProtocol}}function ay(e){return Ft(Ww.now(),e)}function cy(e){return{startTime:e.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:e.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function gE(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function gy(e){return{referrerPolicy:e.referrerPolicy}}function Qy(e){let A=e.referrerPolicy;Oe(A);let t=null;if(e.referrer==="client"){let o=sE();if(!o||o.origin==="null")return"no-referrer";t=new URL(o)}else e.referrer instanceof URL&&(t=e.referrer);let r=Ro(t),s=Ro(t,!0);r.toString().length>4096&&(r=s);let n=Vs(e,r),i=mr(r)&&!mr(e.url);switch(A){case"origin":return s??Ro(t,!0);case"unsafe-url":return r;case"same-origin":return n?s:"no-referrer";case"origin-when-cross-origin":return n?r:s;case"strict-origin-when-cross-origin":{let o=kr(e);return Vs(r,o)?r:mr(r)&&!mr(o)?"no-referrer":s}default:return i?"no-referrer":s}}function Ro(e,A){return Oe(e instanceof URL),e=new URL(e),e.protocol==="file:"||e.protocol==="about:"||e.protocol==="blank:"?"no-referrer":(e.username="",e.password="",e.hash="",A&&(e.pathname="",e.search=""),e)}function mr(e){if(!(e instanceof URL))return!1;if(e.href==="about:blank"||e.href==="about:srcdoc"||e.protocol==="data:"||e.protocol==="file:")return!0;return A(e.origin);function A(t){if(t==null||t==="null")return!1;let r=new URL(t);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}function Ey(e,A){if(Hs===void 0)return!0;let t=QE(A);if(t==="no metadata"||t.length===0)return!0;let r=ly(t),s=Iy(t,r);for(let n of s){let i=n.algo,o=n.hash,a=Hs.createHash(i).update(e).digest("base64");if(a[a.length-1]==="="&&(a[a.length-2]==="="?a=a.slice(0,-2):a=a.slice(0,-1)),Cy(a,o))return!0}return!1}var By=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function QE(e){let A=[],t=!0;for(let r of e.split(" ")){t=!1;let s=By.exec(r);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let n=s.groups.algo.toLowerCase();iE.includes(n)&&A.push(s.groups)}return t===!0?"no metadata":A}function ly(e){let A=e[0].algo;if(A[3]==="5")return A;for(let t=1;t<e.length;++t){let r=e[t];if(r.algo[3]==="5"){A="sha512";break}else{if(A[3]==="3")continue;r.algo[3]==="3"&&(A="sha384")}}return A}function Iy(e,A){if(e.length===1)return e;let t=0;for(let r=0;r<e.length;++r)e[r].algo===A&&(e[t++]=e[r]);return e.length=t,e}function Cy(e,A){if(e.length!==A.length)return!1;for(let t=0;t<e.length;++t)if(e[t]!==A[t]){if(e[t]==="+"&&A[t]==="-"||e[t]==="/"&&A[t]==="_")continue;return!1}return!0}function hy(e){}function Vs(e,A){return e.origin===A.origin&&e.origin==="null"||e.protocol===A.protocol&&e.hostname===A.hostname&&e.port===A.port}function uy(){let e,A;return{promise:new Promise((r,s)=>{e=r,A=s}),resolve:e,reject:A}}function dy(e){return e.controller.state==="aborted"}function fy(e){return e.controller.state==="aborted"||e.controller.state==="terminated"}function wy(e){return Zw[e.toLowerCase()]??e}function yy(e){let A=JSON.stringify(e);if(A===void 0)throw new TypeError("Value is not JSON serializable");return Oe(typeof A=="string"),A}var py=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function EE(e,A,t=0,r=1){class s{#A;#e;#t;constructor(i,o){this.#A=i,
Line truncated
|
|
|
|
|
`);function $y(e){for(let A=0;A<e.length;++A)if((e.charCodeAt(A)&-128)!==0)return!1;return!0}function Ap(e){let A=e.length;if(A<27||A>70)return!1;for(let t=0;t<A;++t){let r=e.charCodeAt(t);if(!(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r===39||r===45||r===95))return!1}return!0}function ep(e,A){Ws(A!=="failure"&&A.essence==="multipart/form-data");let t=A.parameters.get("boundary");if(t===void 0)return"failure";let r=Buffer.from(`--${t}`,"utf8"),s=[],n={position:0};for(;e[n.position]===13&&e[n.position+1]===10;)n.position+=2;let i=e.length;for(;e[i-1]===10&&e[i-2]===13;)i-=2;for(i!==e.length&&(e=e.subarray(0,i));;){if(e.subarray(n.position,n.position+r.length).equals(r))n.position+=r.length;else return"failure";if(n.position===e.length-2&&Os(e,Xy,n)||n.position===e.length-4&&Os(e,jy,n))return s;if(e[n.position]!==13||e[n.position+1]!==10)return"failure";n.position+=2;let o=tp(e,n);if(o==="failure")return"failure";let{name:a,filename:c,contentType:g,encoding:Q}=o;n.position+=2;let B;{let I=e.indexOf(r.subarray(2),n.position);if(I===-1)return"failure";B=e.subarray(n.position,I-4),n.position+=B.length,Q==="base64"&&(B=Buffer.from(B.toString(),"base64"))}if(e[n.position]!==13||e[n.position+1]!==10)return"failure";n.position+=2;let C;c!==null?(g??="text/plain",$y(g)||(g=""),C=new zy([B],c,{type:g})):C=Wy(Buffer.from(B)),Ws(DE(a)),Ws(typeof C=="string"&&DE(C)||Py(C)),s.push(Zy(a,C,c))}}function tp(e,A){let t=null,r=null,s=null,n=null;for(;;){if(e[A.position]===13&&e[A.position+1]===10)return t===null?"failure":{name:t,filename:r,contentType:s,encoding:n};let i=St(o=>o!==10&&o!==13&&o!==58,e,A);if(i=To(i,!0,!0,o=>o===9||o===32),!Oy.test(i.toString())||e[A.position]!==58)return"failure";switch(A.position++,St(o=>o===32||o===9,e,A),qy(i)){case"content-disposition":{if(t=r=null,!Os(e,Ky,A)||(A.position+=17,t=RE(e,A),t===null))return"failure";if(Os(e,kE,A)){let o=A.position+kE.length;if(e[o]===42&&(A.position+=1,o+=1),e[o]!==61||e[o+1]!==34||(A.position+=12,r=RE(e,A),r===null))return"failure"}break}case"content-type":{let o=St(a=>a!==10&&a!==13,e,A);o=To(o,!1,!0,a=>a===9||a===32),s=mE(o);break}case"content-transfer-encoding":{let o=St(a=>a!==10&&a!==13,e,A);o=To(o,!1,!0,a=>a===9||a===32),n=mE(o);break}default:St(o=>o!==10&&o!==13,e,A)}if(e[A.position]!==13&&e[A.position+1]!==10)return"failure";A.position+=2}}function RE(e,A){Ws(e[A.position-1]===34);let t=St(r=>r!==10&&r!==13&&r!==34,e,A);return e[A.position]!==34?null:(A.position++,t=new TextDecoder().decode(t).replace(/%0A/ig,`
|
|
|
|
|
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),t)}function St(e,A,t){let r=t.position;for(;r<A.length&&e(A[r]);)++r;return A.subarray(t.position,t.position=r)}function To(e,A,t,r){let s=0,n=e.length-1;if(A)for(;s<e.length&&r(e[s]);)s++;if(t)for(;n>0&&r(e[n]);)n--;return s===0&&n===e.length-1?e:e.subarray(s,n+1)}function Os(e,A,t){if(e.length<A.length)return!1;for(let r=0;r<A.length;r++)if(A[r]!==e[t.position+r])return!1;return!0}FE.exports={multipartFormDataParser:ep,validateBoundary:Ap}});var Mt=d((HM,JE)=>{"use strict";E();var Nr=T(),{ReadableStreamFrom:rp,isBlobLike:SE,isReadableStreamLike:sp,readableStreamClose:np,createDeferredPromise:ip,fullyReadBody:op,extractMimeType:ap,utf8DecodeBytes:ME}=wA(),{FormData:UE}=Fr(),{kState:bt}=De(),{webidl:cp}=aA(),{Blob:gp}=h("node:buffer"),xo=h("node:assert"),{isErrored:LE,isDisturbed:Qp}=h("node:stream"),{isArrayBuffer:Ep}=h("node:util/types"),{serializeAMimeType:Bp}=IA(),{multipartFormDataParser:lp}=NE(),Yo;try{let e=h("node:crypto");Yo=A=>e.randomInt(0,A)}catch{Yo=e=>Math.floor(Math.random(e))}var Ps=new TextEncoder;function Ip(){}var TE=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,xE;TE&&(xE=new FinalizationRegistry(e=>{let A=e.deref();A&&!A.locked&&!Qp(A)&&!LE(A)&&A.cancel("Response object has been garbage collected").catch(Ip)}));function YE(e,A=!1){let t=null;e instanceof ReadableStream?t=e:SE(e)?t=e.stream():t=new ReadableStream({async pull(a){let c=typeof s=="string"?Ps.encode(s):s;c.byteLength&&a.enqueue(c),queueMicrotask(()=>np(a))},start(){},type:"bytes"}),xo(sp(t));let r=null,s=null,n=null,i=null;if(typeof e=="string")s=e,i="text/plain;charset=UTF-8";else if(e instanceof URLSearchParams)s=e.toString(),i="application/x-www-form-urlencoded;charset=UTF-8";else if(Ep(e))s=new Uint8Array(e.slice());else if(ArrayBuffer.isView(e))s=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));else if(Nr.isFormDataLike(e)){let a=`----formdata-undici-0${`${Yo(1e11)}`.padStart(11,"0")}`,c=`--${a}\r
|
|
|
|
|
var Dd=Object.create;var fg=Object.defineProperty;var md=Object.getOwnPropertyDescriptor;var kd=Object.getOwnPropertyNames;var Rd=Object.getPrototypeOf,Fd=Object.prototype.hasOwnProperty;var h=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(A,t)=>(typeof require<"u"?require:A)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Nd=(e,A,t)=>()=>{if(t)throw t[0];try{return e&&(A=e(e=0)),A}catch(r){throw t=[r],r}};var d=(e,A)=>()=>{try{return A||e((A={exports:{}}).exports,A),A.exports}catch(t){throw A=0,t}};var Sd=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let s of kd(A))!Fd.call(e,s)&&s!==t&&fg(e,s,{get:()=>A[s],enumerable:!(r=md(A,s))||r.enumerable});return e};var wg=(e,A,t)=>(t=e!=null?Dd(Rd(e)):{},Sd(A||!e||!e.__esModule?fg(t,"default",{value:e,enumerable:!0}):t,e));import{createRequire as bd}from"node:module";import Ud from"node:path";import Md from"node:url";var E=Nd(()=>{"use strict";globalThis.require=bd(import.meta.url);globalThis.__filename=Md.fileURLToPath(import.meta.url);globalThis.__dirname=Ud.dirname(__filename)});var Rg=d(dt=>{"use strict";E();var KU=h("net"),Yd=h("tls"),Mi=h("http"),Dg=h("https"),Gd=h("events"),XU=h("assert"),Jd=h("util");dt.httpOverHttp=vd;dt.httpsOverHttp=Hd;dt.httpOverHttps=Vd;dt.httpsOverHttps=qd;function vd(e){var A=new ce(e);return A.request=Mi.request,A}function Hd(e){var A=new ce(e);return A.request=Mi.request,A.createSocket=mg,A.defaultPort=443,A}function Vd(e){var A=new ce(e);return A.request=Dg.request,A}function qd(e){var A=new ce(e);return A.request=Dg.request,A.createSocket=mg,A.defaultPort=443,A}function ce(e){var A=this;A.options=e||{},A.proxyOptions=A.options.proxy||{},A.maxSockets=A.options.maxSockets||Mi.Agent.defaultMaxSockets,A.requests=[],A.sockets=[],A.on("free",function(r,s,n,i){for(var o=kg(s,n,i),a=0,c=A.requests.length;a<c;++a){var g=A.requests[a];if(g.host===o.host&&g.port===o.port){A.requests.splice(a,1),g.request.onSocket(r);return}}r.destroy(),A.removeSocket(r)})}Jd.inherits(ce,Gd.EventEmitter);ce.prototype.addRequest=function(A,t,r,s){var n=this,i=Li({request:A},n.options,kg(t,r,s));if(n.sockets.length>=this.maxSockets){n.requests.push(i);return}n.createSocket(i,function(o){o.on("free",a),o.on("close",c),o.on("agentRemove",c),A.onSocket(o);function a(){n.emit("free",o,i)}function c(g){n.removeSocket(o),o.removeListener("free",a),o.removeListener("close",c),o.removeListener("agentRemove",c)}})};ce.prototype.createSocket=function(A,t){var r=this,s={};r.sockets.push(s);var n=Li({},r.proxyOptions,{method:"CONNECT",path:A.host+":"+A.port,agent:!1,headers:{host:A.host+":"+A.port}});A.localAddress&&(n.localAddress=A.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")),ye("making CONNECT request");var i=r.request(n);i.useChunkedEncodingByDefault=!1,i.once("response",o),i.once("upgrade",a),i.once("connect",c),i.once("error",g),i.end();function o(Q){Q.upgrade=!0}function a(Q,B,C){process.nextTick(function(){c(Q,B,C)})}function c(Q,B,C){if(i.removeAllListeners(),B.removeAllListeners(),Q.statusCode!==200){ye("tunneling socket could not be established, statusCode=%d",Q.statusCode),B.destroy();var I=new Error("tunneling socket could not be established, statusCode="+Q.statusCode);I.code="ECONNRESET",A.request.emit("error",I),r.removeSocket(s);return}if(C.length>0){ye("got illegal response body from proxy"),B.destroy();var I=new Error("got illegal response body from proxy");I.code="ECONNRESET",A.request.emit("error",I),r.removeSocket(s);return}return ye("tunneling connection has established"),r.sockets[r.sockets.indexOf(s)]=B,t(B)}function g(Q){i.removeAllListeners(),ye(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,Q.message,Q.stack);var B=new Error("tunneling socket could not be established, cause="+Q.message);B.code="ECONNRESET",A.request.emit("error",B),r.removeSocket(s)}};ce.prototype.removeSocket=function(A){var t=this.sockets.indexOf(A);if(t!==-1){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createSocket(r,function(s){r.request.onSocket(s)})}};function mg(e,A){var t=this;ce.prototype.createSocket.call(t,e,function(r){var s=e.request.getHeader("host"),n=Li({},t.options,{socket:r,servername:s?s.replace(/:.*$/,""):e.host}),i=Yd.connect(0,n);t.sockets[t.sockets.indexOf(r)]=i,A(i)})}function kg(e,A,t){return typeof e=="string"?{host:e,port:A,localAddress:t}:e}function Li(e){for(var A=1,t=arguments.length;A<t;++A){var r=arguments[A];if(typeof r=="object")for(var s=Object.keys(r),n=0,i=s.length;n<i;++n){var o=s[n];r[o]!==void 0&&(e[o]=r[o])}}return e}var ye;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ye=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:ye=function(){};dt.debug=ye});var Ng=d((AM,Fg)=>{"use strict";E();Fg.exports=Rg()});var X=d((tM,Sg)=>{"use strict";E();Sg.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var J=d((sM,eQ)=>{"use strict";E();var bg=Symbol.for("undici.error.UND_ERR"),j=class extends Error{constructor(A){super(A),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](A){return A&&A[bg]===!0}[bg]=!0},Ug=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),Ti=class extends j{constructor(A){super(A),this.name="ConnectTimeoutError",this.message=A||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](A){return A&&A[Ug]===!0}[Ug]=!0},Mg=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),xi=class extends j{constructor(A){super(A),this.name="HeadersTimeoutError",this.message=A||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](A){return A&&A[Mg]===!0}[Mg]=!0},Lg=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),Yi=class extends j{constructor(A){super(A),this.name="HeadersOverflowError",this.message=A||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](A){return A&&A[Lg]===!0}[Lg]=!0},Tg=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),Gi=class extends j{constructor(A){super(A),this.name="BodyTimeoutError",this.message=A||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](A){return A&&A[Tg]===!0}[Tg]=!0},xg=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),Ji=class extends j{constructor(A,t,r,s){super(A),this.name="ResponseStatusCodeError",this.message=A||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS
Line truncated
|
|
|
|
|
`)||e.includes("\r")||e.includes("\0"))===!1}function oy(e,A){let{headersList:t}=A,r=(t.get("referrer-policy",!0)??"").split(","),s="";if(r.length>0)for(let n=r.length;n!==0;n--){let i=r[n-1].trim();if(Ow.has(i)){s=i;break}}s!==""&&(e.referrerPolicy=s)}function ay(){return"allowed"}function cy(){return"success"}function gy(){return"success"}function Qy(e){let A=null;A=e.mode,e.headersList.set("sec-fetch-mode",A,!0)}function Ey(e){let A=e.origin;if(!(A==="client"||A===void 0)){if(e.responseTainting==="cors"||e.mode==="websocket")e.headersList.append("origin",A,!0);else if(e.method!=="GET"&&e.method!=="HEAD"){switch(e.referrerPolicy){case"no-referrer":A=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":e.origin&&bo(e.origin)&&!bo(kr(e))&&(A=null);break;case"same-origin":Os(e,kr(e))||(A=null);break;default:}e.headersList.append("origin",A,!0)}}}function Nt(e,A){return e}function By(e,A,t){return!e?.startTime||e.startTime<A?{domainLookupStartTime:A,domainLookupEndTime:A,connectionStartTime:A,connectionEndTime:A,secureConnectionStartTime:A,ALPNNegotiatedProtocol:e?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Nt(e.domainLookupStartTime,t),domainLookupEndTime:Nt(e.domainLookupEndTime,t),connectionStartTime:Nt(e.connectionStartTime,t),connectionEndTime:Nt(e.connectionEndTime,t),secureConnectionStartTime:Nt(e.secureConnectionStartTime,t),ALPNNegotiatedProtocol:e.ALPNNegotiatedProtocol}}function ly(e){return Nt(Kw.now(),e)}function Iy(e){return{startTime:e.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:e.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function CE(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function Cy(e){return{referrerPolicy:e.referrerPolicy}}function hy(e){let A=e.referrerPolicy;Oe(A);let t=null;if(e.referrer==="client"){let o=gE();if(!o||o.origin==="null")return"no-referrer";t=new URL(o)}else e.referrer instanceof URL&&(t=e.referrer);let r=So(t),s=So(t,!0);r.toString().length>4096&&(r=s);let n=Os(e,r),i=mr(r)&&!mr(e.url);switch(A){case"origin":return s??So(t,!0);case"unsafe-url":return r;case"same-origin":return n?s:"no-referrer";case"origin-when-cross-origin":return n?r:s;case"strict-origin-when-cross-origin":{let o=kr(e);return Os(r,o)?r:mr(r)&&!mr(o)?"no-referrer":s}default:return i?"no-referrer":s}}function So(e,A){return Oe(e instanceof URL),e=new URL(e),e.protocol==="file:"||e.protocol==="about:"||e.protocol==="blank:"?"no-referrer":(e.username="",e.password="",e.hash="",A&&(e.pathname="",e.search=""),e)}function mr(e){if(!(e instanceof URL))return!1;if(e.href==="about:blank"||e.href==="about:srcdoc"||e.protocol==="data:"||e.protocol==="file:")return!0;return A(e.origin);function A(t){if(t==null||t==="null")return!1;let r=new URL(t);return!!(r.protocol==="https:"||r.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(r.hostname)||r.hostname==="localhost"||r.hostname.includes("localhost.")||r.hostname.endsWith(".localhost"))}}function uy(e,A){if(Ws===void 0)return!0;let t=hE(A);if(t==="no metadata"||t.length===0)return!0;let r=fy(t),s=wy(t,r);for(let n of s){let i=n.algo,o=n.hash,a=Ws.createHash(i).update(e).digest("base64");if(a[a.length-1]==="="&&(a[a.length-2]==="="?a=a.slice(0,-2):a=a.slice(0,-1)),yy(a,o))return!0}return!1}var dy=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function hE(e){let A=[],t=!0;for(let r of e.split(" ")){t=!1;let s=dy.exec(r);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let n=s.groups.algo.toLowerCase();EE.includes(n)&&A.push(s.groups)}return t===!0?"no metadata":A}function fy(e){let A=e[0].algo;if(A[3]==="5")return A;for(let t=1;t<e.length;++t){let r=e[t];if(r.algo[3]==="5"){A="sha512";break}else{if(A[3]==="3")continue;r.algo[3]==="3"&&(A="sha384")}}return A}function wy(e,A){if(e.length===1)return e;let t=0;for(let r=0;r<e.length;++r)e[r].algo===A&&(e[t++]=e[r]);return e.length=t,e}function yy(e,A){if(e.length!==A.length)return!1;for(let t=0;t<e.length;++t)if(e[t]!==A[t]){if(e[t]==="+"&&A[t]==="-"||e[t]==="/"&&A[t]==="_")continue;return!1}return!0}function py(e){}function Os(e,A){return e.origin===A.origin&&e.origin==="null"||e.protocol===A.protocol&&e.hostname===A.hostname&&e.port===A.port}function Dy(){let e,A;return{promise:new Promise((r,s)=>{e=r,A=s}),resolve:e,reject:A}}function my(e){return e.controller.state==="aborted"}function ky(e){return e.controller.state==="aborted"||e.controller.state==="terminated"}function Ry(e){return $w[e.toLowerCase()]??e}function Fy(e){let A=JSON.stringify(e);if(A===void 0)throw new TypeError("Value is not JSON serializable");return Oe(typeof A=="string"),A}var Ny=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function uE(e,A,t=0,r=1){class s{#A;#e;#t;constructor(i,o){this.#A=i,
Line truncated
|
|
|
|
|
`);function np(e){for(let A=0;A<e.length;++A)if((e.charCodeAt(A)&-128)!==0)return!1;return!0}function ip(e){let A=e.length;if(A<27||A>70)return!1;for(let t=0;t<A;++t){let r=e.charCodeAt(t);if(!(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r===39||r===45||r===95))return!1}return!0}function op(e,A){Zs(A!=="failure"&&A.essence==="multipart/form-data");let t=A.parameters.get("boundary");if(t===void 0)return"failure";let r=Buffer.from(`--${t}`,"utf8"),s=[],n={position:0};for(;e[n.position]===13&&e[n.position+1]===10;)n.position+=2;let i=e.length;for(;e[i-1]===10&&e[i-2]===13;)i-=2;for(i!==e.length&&(e=e.subarray(0,i));;){if(e.subarray(n.position,n.position+r.length).equals(r))n.position+=r.length;else return"failure";if(n.position===e.length-2&&zs(e,rp,n)||n.position===e.length-4&&zs(e,sp,n))return s;if(e[n.position]!==13||e[n.position+1]!==10)return"failure";n.position+=2;let o=ap(e,n);if(o==="failure")return"failure";let{name:a,filename:c,contentType:g,encoding:Q}=o;n.position+=2;let B;{let I=e.indexOf(r.subarray(2),n.position);if(I===-1)return"failure";B=e.subarray(n.position,I-4),n.position+=B.length,Q==="base64"&&(B=Buffer.from(B.toString(),"base64"))}if(e[n.position]!==13||e[n.position+1]!==10)return"failure";n.position+=2;let C;c!==null?(g??="text/plain",np(g)||(g=""),C=new ep([B],c,{type:g})):C=Ky(Buffer.from(B)),Zs(SE(a)),Zs(typeof C=="string"&&SE(C)||jy(C)),s.push($y(a,C,c))}}function ap(e,A){let t=null,r=null,s=null,n=null;for(;;){if(e[A.position]===13&&e[A.position+1]===10)return t===null?"failure":{name:t,filename:r,contentType:s,encoding:n};let i=bt(o=>o!==10&&o!==13&&o!==58,e,A);if(i=Go(i,!0,!0,o=>o===9||o===32),!Xy.test(i.toString())||e[A.position]!==58)return"failure";switch(A.position++,bt(o=>o===32||o===9,e,A),_y(i)){case"content-disposition":{if(t=r=null,!zs(e,tp,A)||(A.position+=17,t=ME(e,A),t===null))return"failure";if(zs(e,UE,A)){let o=A.position+UE.length;if(e[o]===42&&(A.position+=1,o+=1),e[o]!==61||e[o+1]!==34||(A.position+=12,r=ME(e,A),r===null))return"failure"}break}case"content-type":{let o=bt(a=>a!==10&&a!==13,e,A);o=Go(o,!1,!0,a=>a===9||a===32),s=bE(o);break}case"content-transfer-encoding":{let o=bt(a=>a!==10&&a!==13,e,A);o=Go(o,!1,!0,a=>a===9||a===32),n=bE(o);break}default:bt(o=>o!==10&&o!==13,e,A)}if(e[A.position]!==13&&e[A.position+1]!==10)return"failure";A.position+=2}}function ME(e,A){Zs(e[A.position-1]===34);let t=bt(r=>r!==10&&r!==13&&r!==34,e,A);return e[A.position]!==34?null:(A.position++,t=new TextDecoder().decode(t).replace(/%0A/ig,`
|
|
|
|
|
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),t)}function bt(e,A,t){let r=t.position;for(;r<A.length&&e(A[r]);)++r;return A.subarray(t.position,t.position=r)}function Go(e,A,t,r){let s=0,n=e.length-1;if(A)for(;s<e.length&&r(e[s]);)s++;if(t)for(;n>0&&r(e[n]);)n--;return s===0&&n===e.length-1?e:e.subarray(s,n+1)}function zs(e,A,t){if(e.length<A.length)return!1;for(let r=0;r<A.length;r++)if(A[r]!==e[t.position+r])return!1;return!0}LE.exports={multipartFormDataParser:op,validateBoundary:ip}});var Lt=d((jM,OE)=>{"use strict";E();var Nr=T(),{ReadableStreamFrom:cp,isBlobLike:xE,isReadableStreamLike:gp,readableStreamClose:Qp,createDeferredPromise:Ep,fullyReadBody:Bp,extractMimeType:lp,utf8DecodeBytes:JE}=DA(),{FormData:YE}=Fr(),{kState:Mt}=pe(),{webidl:Ip}=gA(),{Blob:Cp}=h("node:buffer"),Jo=h("node:assert"),{isErrored:vE,isDisturbed:hp}=h("node:stream"),{isArrayBuffer:up}=h("node:util/types"),{serializeAMimeType:dp}=hA(),{multipartFormDataParser:fp}=TE(),vo;try{let e=h("node:crypto");vo=A=>e.randomInt(0,A)}catch{vo=e=>Math.floor(Math.random(e))}var _s=new TextEncoder;function wp(){}var HE=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,VE;HE&&(VE=new FinalizationRegistry(e=>{let A=e.deref();A&&!A.locked&&!hp(A)&&!vE(A)&&A.cancel("Response object has been garbage collected").catch(wp)}));function qE(e,A=!1){let t=null;e instanceof ReadableStream?t=e:xE(e)?t=e.stream():t=new ReadableStream({async pull(a){let c=typeof s=="string"?_s.encode(s):s;c.byteLength&&a.enqueue(c),queueMicrotask(()=>Qp(a))},start(){},type:"bytes"}),Jo(gp(t));let r=null,s=null,n=null,i=null;if(typeof e=="string")s=e,i="text/plain;charset=UTF-8";else if(e instanceof URLSearchParams)s=e.toString(),i="application/x-www-form-urlencoded;charset=UTF-8";else if(up(e))s=new Uint8Array(e.slice());else if(ArrayBuffer.isView(e))s=new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));else if(Nr.isFormDataLike(e)){let a=`----formdata-undici-0${`${vo(1e11)}`.padStart(11,"0")}`,c=`--${a}\r
|
|
|
|
|
Content-Disposition: form-data`;let g=w=>w.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),Q=w=>w.replace(/\r?\n|\r/g,`\r
|
|
|
|
|
`),B=[],C=new Uint8Array([13,10]);n=0;let I=!1;for(let[w,l]of e)if(typeof l=="string"){let p=Ps.encode(c+`; name="${g(Q(w))}"\r
|
|
|
|
|
`),B=[],C=new Uint8Array([13,10]);n=0;let I=!1;for(let[w,l]of e)if(typeof l=="string"){let p=_s.encode(c+`; name="${g(Q(w))}"\r
|
|
|
|
|
\r
|
|
|
|
|
${Q(l)}\r
|
|
|
|
|
`);B.push(p),n+=p.byteLength}else{let p=Ps.encode(`${c}; name="${g(Q(w))}"`+(l.name?`; filename="${g(l.name)}"`:"")+`\r
|
|
|
|
|
`);B.push(p),n+=p.byteLength}else{let p=_s.encode(`${c}; name="${g(Q(w))}"`+(l.name?`; filename="${g(l.name)}"`:"")+`\r
|
|
|
|
|
Content-Type: ${l.type||"application/octet-stream"}\r
|
|
|
|
|
\r
|
|
|
|
|
`);B.push(p,l,C),typeof l.size=="number"?n+=p.byteLength+l.size+C.byteLength:I=!0}let u=Ps.encode(`--${a}--\r
|
|
|
|
|
`);B.push(u),n+=u.byteLength,I&&(n=null),s=e,r=async function*(){for(let w of B)w.stream?yield*w.stream():yield w},i=`multipart/form-data; boundary=${a}`}else if(SE(e))s=e,n=e.size,e.type&&(i=e.type);else if(typeof e[Symbol.asyncIterator]=="function"){if(A)throw new TypeError("keepalive");if(Nr.isDisturbed(e)||e.locked)throw new TypeError("Response body object should not be disturbed or locked");t=e instanceof ReadableStream?e:rp(e)}if((typeof s=="string"||Nr.isBuffer(s))&&(n=Buffer.byteLength(s)),r!=null){let a;t=new ReadableStream({async start(){a=r(e)[Symbol.asyncIterator]()},async pull(c){let{value:g,done:Q}=await a.next();if(Q)queueMicrotask(()=>{c.close(),c.byobRequest?.respond(0)});else if(!LE(t)){let B=new Uint8Array(g);B.byteLength&&c.enqueue(B)}return c.desiredSize>0},async cancel(c){await a.return()},type:"bytes"})}return[{stream:t,source:s,length:n},i]}function Cp(e,A=!1){return e instanceof ReadableStream&&(xo(!Nr.isDisturbed(e),"The body has already been consumed."),xo(!e.locked,"The stream is locked.")),YE(e,A)}function hp(e,A){let[t,r]=A.stream.tee();return A.stream=t,{stream:r,length:A.length,source:A.source}}function up(e){if(e.aborted)throw new DOMException("The operation was aborted.","AbortError")}function dp(e){return{blob(){return Ut(this,t=>{let r=bE(this);return r===null?r="":r&&(r=Bp(r)),new gp([t],{type:r})},e)},arrayBuffer(){return Ut(this,t=>new Uint8Array(t).buffer,e)},text(){return Ut(this,ME,e)},json(){return Ut(this,wp,e)},formData(){return Ut(this,t=>{let r=bE(this);if(r!==null)switch(r.essence){case"multipart/form-data":{let s=lp(t,r);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let n=new UE;return n[bt]=s,n}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(t.toString()),n=new UE;for(let[i,o]of s)n.append(i,o);return n}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},e)},bytes(){return Ut(this,t=>new Uint8Array(t),e)}}}function fp(e){Object.assign(e.prototype,dp(e))}async function Ut(e,A,t){if(cp.brandCheck(e,t),GE(e))throw new TypeError("Body is unusable: Body has already been read");up(e[bt]);let r=ip(),s=i=>r.reject(i),n=i=>{try{r.resolve(A(i))}catch(o){s(o)}};return e[bt].body==null?(n(Buffer.allocUnsafe(0)),r.promise):(await op(e[bt].body,n,s),r.promise)}function GE(e){let A=e[bt].body;return A!=null&&(A.stream.locked||Nr.isDisturbed(A.stream))}function wp(e){return JSON.parse(ME(e))}function bE(e){let A=e[bt].headersList,t=ap(A);return t==="failure"?null:t}JE.exports={extractBody:YE,safelyExtractBody:Cp,cloneBody:hp,mixinBody:fp,streamRegistry:xE,hasFinalizationRegistry:TE,bodyUnusable:GE}});var eB=d((qM,AB)=>{"use strict";E();var F=h("node:assert"),S=T(),{channels:vE}=ft(),Go=uo(),{RequestContentLengthMismatchError:Pe,ResponseContentLengthMismatchError:HE,RequestAbortedError:zE,InvalidArgumentError:yp,HeadersTimeoutError:pp,HeadersOverflowError:Dp,SocketError:Lt,InformationalError:Tt,BodyTimeoutError:mp,HTTPParserError:kp,ResponseExceededMaxSizeError:Rp}=J(),{kUrl:KE,kReset:CA,kClient:Ks,kParser:Z,kBlocking:br,kRunning:rA,kPending:XE,kSize:VE,kWriting:me,kQueue:GA,kNoRef:Sr,kKeepAliveDefaultTimeout:Fp,kHostHeader:Np,kPendingIdx:Sp,kRunningIdx:bA,kError:EA,kPipelining:Xs,kSocket:Ze,kKeepAliveTimeoutValue:$s,kMaxHeadersSize:Jo,kKeepAliveMaxTimeout:Up,kKeepAliveTimeoutThreshold:bp,kHeadersTimeout:Mp,kBodyTimeout:Lp,kStrictContentLength:Vo,kMaxRequests:qE,kCounter:Tp,kMaxResponseSize:xp,kOnError:WE,kResume:le,kHTTPContext:jE}=z(),yA=xQ(),OE=Buffer.alloc(0),Zs=Buffer[Symbol.species],_s=S.addListener,Yp=S.removeAllListeners,_e=Symbol("kIdleSocketValidation"),xt=Symbol("kIdleSocketValidationTimeout"),Po=Symbol("kSocketUsed"),vo;async function Gp(){let e=process.env.JEST_WORKER_ID?yo():void 0,A;try{A=await WebAssembly.compile(JQ())}catch{A=await WebAssembly.compile(e||yo())}return await WebAssembly.instantiate(A,{env:{wasm_on_url:(t,r,s)=>0,wasm_on_status:(t,r,s)=>{F($.ptr===t);let n=r-$A+jA.byteOffset;return $.onStatus(new Zs(jA.buffer,n,s))||0},wasm_on_message_begin:t=>(F($.ptr===t),$.onMessageBegin()||0),wasm_on_header_field:(t,r,s)=>{F($.ptr===t);let n=r-$A+jA.byteOffset;return $.onHeaderField(new Zs(jA.buffer,n,s))||0},wasm_on_header_value:(t,r,s)=>{F($.ptr===t);let n=r-$A+jA.byteOffset;return $.onHeaderValue(new Zs(jA.buffer,n,s))||0},wasm_on_headers_complete:(t,r,s,n)=>(F($.ptr===t),$.onHeadersComplete(r,!!s,!!n)||0),wasm_on_body:(t,r,s)=>{F($.ptr===t);let n=r-$A+jA.byteOffset;return $.onBody(new Zs(jA.buffer,n,s))||0},wasm_on_message_complete:t=>(F($.ptr===t),$.onMessageComplete()||0)}})}var Ho=null,qo=Gp();qo.catch();var $=null,jA=null,zs=0,$A=null,Jp=0,Ur=1,Yt=2|Ur,js=4|Ur,Wo=8|Jp,Oo=class{constructor(A,t,{exports:r}){F(Number.isFinite(A[Jo])&&A[Jo]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(yA.TYPE.RESPONSE),this.client=A,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.up
Line truncated
|
|
|
|
|
`);B.push(p,l,C),typeof l.size=="number"?n+=p.byteLength+l.size+C.byteLength:I=!0}let u=_s.encode(`--${a}--\r
|
|
|
|
|
`);B.push(u),n+=u.byteLength,I&&(n=null),s=e,r=async function*(){for(let w of B)w.stream?yield*w.stream():yield w},i=`multipart/form-data; boundary=${a}`}else if(xE(e))s=e,n=e.size,e.type&&(i=e.type);else if(typeof e[Symbol.asyncIterator]=="function"){if(A)throw new TypeError("keepalive");if(Nr.isDisturbed(e)||e.locked)throw new TypeError("Response body object should not be disturbed or locked");t=e instanceof ReadableStream?e:cp(e)}if((typeof s=="string"||Nr.isBuffer(s))&&(n=Buffer.byteLength(s)),r!=null){let a;t=new ReadableStream({async start(){a=r(e)[Symbol.asyncIterator]()},async pull(c){let{value:g,done:Q}=await a.next();if(Q)queueMicrotask(()=>{c.close(),c.byobRequest?.respond(0)});else if(!vE(t)){let B=new Uint8Array(g);B.byteLength&&c.enqueue(B)}return c.desiredSize>0},async cancel(c){await a.return()},type:"bytes"})}return[{stream:t,source:s,length:n},i]}function yp(e,A=!1){return e instanceof ReadableStream&&(Jo(!Nr.isDisturbed(e),"The body has already been consumed."),Jo(!e.locked,"The stream is locked.")),qE(e,A)}function pp(e,A){let[t,r]=A.stream.tee();return A.stream=t,{stream:r,length:A.length,source:A.source}}function Dp(e){if(e.aborted)throw new DOMException("The operation was aborted.","AbortError")}function mp(e){return{blob(){return Ut(this,t=>{let r=GE(this);return r===null?r="":r&&(r=dp(r)),new Cp([t],{type:r})},e)},arrayBuffer(){return Ut(this,t=>new Uint8Array(t).buffer,e)},text(){return Ut(this,JE,e)},json(){return Ut(this,Rp,e)},formData(){return Ut(this,t=>{let r=GE(this);if(r!==null)switch(r.essence){case"multipart/form-data":{let s=fp(t,r);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let n=new YE;return n[Mt]=s,n}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(t.toString()),n=new YE;for(let[i,o]of s)n.append(i,o);return n}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},e)},bytes(){return Ut(this,t=>new Uint8Array(t),e)}}}function kp(e){Object.assign(e.prototype,mp(e))}async function Ut(e,A,t){if(Ip.brandCheck(e,t),WE(e))throw new TypeError("Body is unusable: Body has already been read");Dp(e[Mt]);let r=Ep(),s=i=>r.reject(i),n=i=>{try{r.resolve(A(i))}catch(o){s(o)}};return e[Mt].body==null?(n(Buffer.allocUnsafe(0)),r.promise):(await Bp(e[Mt].body,n,s),r.promise)}function WE(e){let A=e[Mt].body;return A!=null&&(A.stream.locked||Nr.isDisturbed(A.stream))}function Rp(e){return JSON.parse(JE(e))}function GE(e){let A=e[Mt].headersList,t=lp(A);return t==="failure"?null:t}OE.exports={extractBody:qE,safelyExtractBody:yp,cloneBody:pp,mixinBody:kp,streamRegistry:VE,hasFinalizationRegistry:HE,bodyUnusable:WE}});var oB=d((AL,iB)=>{"use strict";E();var S=h("node:assert"),k=T(),{channels:PE}=wt(),Ho=yo(),{RequestContentLengthMismatchError:Pe,ResponseContentLengthMismatchError:ZE,RequestAbortedError:eB,InvalidArgumentError:Fp,HeadersTimeoutError:Np,HeadersOverflowError:Sp,SocketError:Tt,InformationalError:Ze,BodyTimeoutError:bp,HTTPParserError:Up,ResponseExceededMaxSizeError:Mp}=J(),{kUrl:tB,kReset:uA,kClient:$s,kParser:_,kBlocking:Ur,kRunning:rA,kPending:rB,kSize:zE,kWriting:De,kQueue:vA,kNoRef:Sr,kKeepAliveDefaultTimeout:Lp,kHostHeader:Tp,kPendingIdx:xp,kRunningIdx:TA,kError:lA,kPipelining:An,kSocket:ze,kKeepAliveTimeoutValue:tn,kMaxHeadersSize:Vo,kKeepAliveMaxTimeout:Yp,kKeepAliveTimeoutThreshold:Gp,kHeadersTimeout:Jp,kBodyTimeout:vp,kStrictContentLength:Oo,kMaxRequests:_E,kCounter:Hp,kMaxResponseSize:Vp,kOnError:KE,kResume:le,kHTTPContext:sB}=X(),mA=VQ(),XE=Buffer.alloc(0),Ks=Buffer[Symbol.species],Xs=k.addListener,qp=k.removeAllListeners,_e=Symbol("kIdleSocketValidation"),xt=Symbol("kIdleSocketValidationTimeout"),_o=Symbol("kSocketUsed"),qo;async function Wp(){let e=process.env.JEST_WORKER_ID?mo():void 0,A;try{A=await WebAssembly.compile(OQ())}catch{A=await WebAssembly.compile(e||mo())}return await WebAssembly.instantiate(A,{env:{wasm_on_url:(t,r,s)=>0,wasm_on_status:(t,r,s)=>{S(AA.ptr===t);let n=r-jA+XA.byteOffset;return AA.onStatus(new Ks(XA.buffer,n,s))||0},wasm_on_message_begin:t=>(S(AA.ptr===t),AA.onMessageBegin()||0),wasm_on_header_field:(t,r,s)=>{S(AA.ptr===t);let n=r-jA+XA.byteOffset;return AA.onHeaderField(new Ks(XA.buffer,n,s))||0},wasm_on_header_value:(t,r,s)=>{S(AA.ptr===t);let n=r-jA+XA.byteOffset;return AA.onHeaderValue(new Ks(XA.buffer,n,s))||0},wasm_on_headers_complete:(t,r,s,n)=>(S(AA.ptr===t),AA.onHeadersComplete(r,!!s,!!n)||0),wasm_on_body:(t,r,s)=>{S(AA.ptr===t);let n=r-jA+XA.byteOffset;return AA.onBody(new Ks(XA.buffer,n,s))||0},wasm_on_message_complete:t=>(S(AA.ptr===t),AA.onMessageComplete()||0)}})}var Wo=null,Po=Wp();Po.catch();var AA=null,XA=null,js=0,jA=null,Op=0,br=1,Yt=2|br,en=4|br,Zo=8|Op,zo=class{constructor(A,t,{exports:r}){S(Number.isFinite(A[Vo])&&A[Vo]>0),this.llhttp=r,this.ptr=this.llhttp.llhttp_alloc(mA.TYPE.RESPONSE),this.client=A,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.status
Line truncated
|
|
|
|
|
`;if(typeof s=="string"?u+=`host: ${s}\r
|
|
|
|
|
`:u+=e[Np],n?u+=`connection: upgrade\r
|
|
|
|
|
`:u+=e[Tp],n?u+=`connection: upgrade\r
|
|
|
|
|
upgrade: ${n}\r
|
|
|
|
|
`:e[Xs]&&!C[CA]?u+=`connection: keep-alive\r
|
|
|
|
|
`:e[An]&&!C[uA]?u+=`connection: keep-alive\r
|
|
|
|
|
`:u+=`connection: close\r
|
|
|
|
|
`,Array.isArray(c))for(let w=0;w<c.length;w+=2){let l=c[w+0],p=c[w+1];if(Array.isArray(p))for(let k=0;k<p.length;k++)u+=`${l}: ${p[k]}\r
|
|
|
|
|
`,Array.isArray(c))for(let w=0;w<c.length;w+=2){let l=c[w+0],p=c[w+1];if(Array.isArray(p))for(let F=0;F<p.length;F++)u+=`${l}: ${p[F]}\r
|
|
|
|
|
`;else u+=`${l}: ${p}\r
|
|
|
|
|
`}return vE.sendHeaders.hasSubscribers&&vE.sendHeaders.publish({request:A,headers:u,socket:C}),!a||B===0?ZE(I,null,e,A,C,g,u,Q):S.isBuffer(a)?ZE(I,a,e,A,C,g,u,Q):S.isBlobLike(a)?typeof a.stream=="function"?_E(I,a.stream(),e,A,C,g,u,Q):Pp(I,a,e,A,C,g,u,Q):S.isStream(a)?Op(I,a,e,A,C,g,u,Q):S.isIterable(a)?_E(I,a,e,A,C,g,u,Q):F(!1),!0}function Op(e,A,t,r,s,n,i,o){F(n!==0||t[rA]===0,"stream body cannot be pipelined");let a=!1,c=new An({abort:e,socket:s,request:r,contentLength:n,client:t,expectsPayload:o,header:i}),g=function(I){if(!a)try{!c.write(I)&&this.pause&&this.pause()}catch(u){S.destroy(this,u)}},Q=function(){a||A.resume&&A.resume()},B=function(){if(queueMicrotask(()=>{A.removeListener("error",C)}),!a){let I=new zE;queueMicrotask(()=>C(I))}},C=function(I){if(!a){if(a=!0,F(s.destroyed||s[me]&&t[rA]<=1),s.off("drain",Q).off("error",C),A.removeListener("data",g).removeListener("end",C).removeListener("close",B),!I)try{c.end()}catch(u){I=u}c.destroy(I),I&&(I.code!=="UND_ERR_INFO"||I.message!=="reset")?S.destroy(A,I):S.destroy(A)}};A.on("data",g).on("end",C).on("error",C).on("close",B),A.resume&&A.resume(),s.on("drain",Q).on("error",C),A.errorEmitted??A.errored?setImmediate(()=>C(A.errored)):(A.endEmitted??A.readableEnded)&&setImmediate(()=>C(null)),(A.closeEmitted??A.closed)&&setImmediate(B)}function ZE(e,A,t,r,s,n,i,o){try{A?S.isBuffer(A)&&(F(n===A.byteLength,"buffer body must have content length"),s.cork(),s.write(`${i}content-length: ${n}\r
|
|
|
|
|
`}return PE.sendHeaders.hasSubscribers&&PE.sendHeaders.publish({request:A,headers:u,socket:C}),!a||B===0?$E(I,null,e,A,C,g,u,Q):k.isBuffer(a)?$E(I,a,e,A,C,g,u,Q):k.isBlobLike(a)?typeof a.stream=="function"?AB(I,a.stream(),e,A,C,g,u,Q):jp(I,a,e,A,C,g,u,Q):k.isStream(a)?Xp(I,a,e,A,C,g,u,Q):k.isIterable(a)?AB(I,a,e,A,C,g,u,Q):S(!1),!0}function Xp(e,A,t,r,s,n,i,o){S(n!==0||t[rA]===0,"stream body cannot be pipelined");let a=!1,c=new rn({abort:e,socket:s,request:r,contentLength:n,client:t,expectsPayload:o,header:i}),g=function(I){if(!a)try{!c.write(I)&&this.pause&&this.pause()}catch(u){k.destroy(this,u)}},Q=function(){a||A.resume&&A.resume()},B=function(){if(queueMicrotask(()=>{A.removeListener("error",C)}),!a){let I=new eB;queueMicrotask(()=>C(I))}},C=function(I){if(!a){if(a=!0,S(s.destroyed||s[De]&&t[rA]<=1),s.off("drain",Q).off("error",C),A.removeListener("data",g).removeListener("end",C).removeListener("close",B),!I)try{c.end()}catch(u){I=u}c.destroy(I),I&&(I.code!=="UND_ERR_INFO"||I.message!=="reset")?k.destroy(A,I):k.destroy(A)}};A.on("data",g).on("end",C).on("error",C).on("close",B),A.resume&&A.resume(),s.on("drain",Q).on("error",C),A.errorEmitted??A.errored?setImmediate(()=>C(A.errored)):(A.endEmitted??A.readableEnded)&&setImmediate(()=>C(null)),(A.closeEmitted??A.closed)&&setImmediate(B)}function $E(e,A,t,r,s,n,i,o){try{A?k.isBuffer(A)&&(S(n===A.byteLength,"buffer body must have content length"),s.cork(),s.write(`${i}content-length: ${n}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),s.write(A),s.uncork(),r.onBodySent(A),!o&&r.reset!==!1&&(s[CA]=!0)):n===0?s.write(`${i}content-length: 0\r
|
|
|
|
|
`,"latin1"),s.write(A),s.uncork(),r.onBodySent(A),!o&&r.reset!==!1&&(s[uA]=!0)):n===0?s.write(`${i}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):(F(n===null,"no body must not have content length"),s.write(`${i}\r
|
|
|
|
|
`,"latin1")),r.onRequestSent(),t[le]()}catch(a){e(a)}}async function Pp(e,A,t,r,s,n,i,o){F(n===A.size,"blob body must have content length");try{if(n!=null&&n!==A.size)throw new Pe;let a=Buffer.from(await A.arrayBuffer());s.cork(),s.write(`${i}content-length: ${n}\r
|
|
|
|
|
`,"latin1"):(S(n===null,"no body must not have content length"),s.write(`${i}\r
|
|
|
|
|
`,"latin1")),r.onRequestSent(),t[le]()}catch(a){e(a)}}async function jp(e,A,t,r,s,n,i,o){S(n===A.size,"blob body must have content length");try{if(n!=null&&n!==A.size)throw new Pe;let a=Buffer.from(await A.arrayBuffer());s.cork(),s.write(`${i}content-length: ${n}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),s.write(a),s.uncork(),r.onBodySent(a),r.onRequestSent(),!o&&r.reset!==!1&&(s[CA]=!0),t[le]()}catch(a){e(a)}}async function _E(e,A,t,r,s,n,i,o){F(n!==0||t[rA]===0,"iterator body cannot be pipelined");let a=null;function c(){if(a){let B=a;a=null,B()}}let g=()=>new Promise((B,C)=>{F(a===null),s[EA]?C(s[EA]):a=B});s.on("close",c).on("drain",c);let Q=new An({abort:e,socket:s,request:r,contentLength:n,client:t,expectsPayload:o,header:i});try{for await(let B of A){if(s[EA])throw s[EA];Q.write(B)||await g()}Q.end()}catch(B){Q.destroy(B)}finally{s.off("close",c).off("drain",c)}}var An=class{constructor({abort:A,socket:t,request:r,contentLength:s,client:n,expectsPayload:i,header:o}){this.socket=t,this.request=r,this.contentLength=s,this.client=n,this.bytesWritten=0,this.expectsPayload=i,this.header=o,this.abort=A,t[me]=!0}write(A){let{socket:t,request:r,contentLength:s,client:n,bytesWritten:i,expectsPayload:o,header:a}=this;if(t[EA])throw t[EA];if(t.destroyed)return!1;let c=Buffer.byteLength(A);if(!c)return!0;if(s!==null&&i+c>s){if(n[Vo])throw new Pe;process.emitWarning(new Pe)}t.cork(),i===0&&(!o&&r.reset!==!1&&(t[CA]=!0),s===null?t.write(`${a}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"),s.write(a),s.uncork(),r.onBodySent(a),r.onRequestSent(),!o&&r.reset!==!1&&(s[uA]=!0),t[le]()}catch(a){e(a)}}async function AB(e,A,t,r,s,n,i,o){S(n!==0||t[rA]===0,"iterator body cannot be pipelined");let a=null;function c(){if(a){let B=a;a=null,B()}}let g=()=>new Promise((B,C)=>{S(a===null),s[lA]?C(s[lA]):a=B});s.on("close",c).on("drain",c);let Q=new rn({abort:e,socket:s,request:r,contentLength:n,client:t,expectsPayload:o,header:i});try{for await(let B of A){if(s[lA])throw s[lA];Q.write(B)||await g()}Q.end()}catch(B){Q.destroy(B)}finally{s.off("close",c).off("drain",c)}}var rn=class{constructor({abort:A,socket:t,request:r,contentLength:s,client:n,expectsPayload:i,header:o}){this.socket=t,this.request=r,this.contentLength=s,this.client=n,this.bytesWritten=0,this.expectsPayload=i,this.header=o,this.abort=A,t[De]=!0}write(A){let{socket:t,request:r,contentLength:s,client:n,bytesWritten:i,expectsPayload:o,header:a}=this;if(t[lA])throw t[lA];if(t.destroyed)return!1;let c=Buffer.byteLength(A);if(!c)return!0;if(s!==null&&i+c>s){if(n[Oo])throw new Pe;process.emitWarning(new Pe)}t.cork(),i===0&&(!o&&r.reset!==!1&&(t[uA]=!0),s===null?t.write(`${a}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"):t.write(`${a}content-length: ${s}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1")),s===null&&t.write(`\r
|
|
|
|
|
${c.toString(16)}\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=c;let g=t.write(A);return t.uncork(),r.onBodySent(A),g||t[Z].timeout&&t[Z].timeoutType===Yt&&t[Z].timeout.refresh&&t[Z].timeout.refresh(),g}end(){let{socket:A,contentLength:t,client:r,bytesWritten:s,expectsPayload:n,header:i,request:o}=this;if(o.onRequestSent(),A[me]=!1,A[EA])throw A[EA];if(!A.destroyed){if(s===0?n?A.write(`${i}content-length: 0\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=c;let g=t.write(A);return t.uncork(),r.onBodySent(A),g||t[_].timeout&&t[_].timeoutType===Yt&&t[_].timeout.refresh&&t[_].timeout.refresh(),g}end(){let{socket:A,contentLength:t,client:r,bytesWritten:s,expectsPayload:n,header:i,request:o}=this;if(o.onRequestSent(),A[De]=!1,A[lA])throw A[lA];if(!A.destroyed){if(s===0?n?A.write(`${i}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):A.write(`${i}\r
|
|
|
|
|
`,"latin1"):t===null&&A.write(`\r
|
|
|
|
|
0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),t!==null&&s!==t){if(r[Vo])throw new Pe;process.emitWarning(new Pe)}A[Z].timeout&&A[Z].timeoutType===Yt&&A[Z].timeout.refresh&&A[Z].timeout.refresh(),r[le]()}}destroy(A){let{socket:t,client:r,abort:s}=this;t[me]=!1,A&&(F(r[rA]<=1,"pipeline should only contain this request"),s(A))}};AB.exports=vp});var cB=d((OM,aB)=>{"use strict";E();var MA=h("node:assert"),{pipeline:Zp}=h("node:stream"),x=T(),{RequestContentLengthMismatchError:Zo,RequestAbortedError:tB,SocketError:Mr,InformationalError:_o}=J(),{kUrl:en,kReset:rn,kClient:Gt,kRunning:sn,kPending:_p,kQueue:ke,kPendingIdx:zo,kRunningIdx:JA,kError:HA,kSocket:oA,kStrictContentLength:zp,kOnError:Ko,kMaxConcurrentStreams:oB,kHTTP2Session:vA,kResume:Re,kSize:Kp,kHTTPContext:Xp}=z(),Ie=Symbol("open streams"),rB,sB=!1,tn;try{tn=h("node:http2")}catch{tn={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:jp,HTTP2_HEADER_METHOD:$p,HTTP2_HEADER_PATH:AD,HTTP2_HEADER_SCHEME:eD,HTTP2_HEADER_CONTENT_LENGTH:tD,HTTP2_HEADER_EXPECT:rD,HTTP2_HEADER_STATUS:sD}}=tn;function nD(e){let A=[];for(let[t,r]of Object.entries(e))if(Array.isArray(r))for(let s of r)A.push(Buffer.from(t),Buffer.from(s));else A.push(Buffer.from(t),Buffer.from(r));return A}async function iD(e,A){e[oA]=A,sB||(sB=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let t=tn.connect(e[en],{createConnection:()=>A,peerMaxConcurrentStreams:e[oB]});t[Ie]=0,t[Gt]=e,t[oA]=A,x.addListener(t,"error",aD),x.addListener(t,"frameError",cD),x.addListener(t,"end",gD),x.addListener(t,"goaway",QD),x.addListener(t,"close",function(){let{[Gt]:s}=this,{[oA]:n}=s,i=this[oA][HA]||this[HA]||new Mr("closed",x.getSocketInfo(n));if(s[vA]=null,s.destroyed){MA(s[_p]===0);let o=s[ke].splice(s[JA]);for(let a=0;a<o.length;a++){let c=o[a];x.errorRequest(s,c,i)}}}),t.unref(),e[vA]=t,A[vA]=t,x.addListener(A,"error",function(s){MA(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[HA]=s,this[Gt][Ko](s)}),x.addListener(A,"end",function(){x.destroy(this,new Mr("other side closed",x.getSocketInfo(this)))}),x.addListener(A,"close",function(){let s=this[HA]||new Mr("closed",x.getSocketInfo(this));e[oA]=null,this[vA]!=null&&this[vA].destroy(s),e[zo]=e[JA],MA(e[sn]===0),e.emit("disconnect",e[en],[e],s),e[Re]()});let r=!1;return A.on("close",()=>{r=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return BD(e,...s)},resume(){oD(e)},destroy(s,n){r?queueMicrotask(n):A.destroy(s).on("close",n)},get destroyed(){return A.destroyed},busy(){return!1}}}function oD(e){let A=e[oA];A?.destroyed===!1&&(e[Kp]===0&&e[oB]===0?(A.unref(),e[vA].unref()):(A.ref(),e[vA].ref()))}function aD(e){MA(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[oA][HA]=e,this[Gt][Ko](e)}function cD(e,A,t){if(t===0){let r=new _o(`HTTP/2: "frameError" received - type ${e}, code ${A}`);this[oA][HA]=r,this[Gt][Ko](r)}}function gD(){let e=new Mr("other side closed",x.getSocketInfo(this[oA]));this.destroy(e),x.destroy(this[oA],e)}function QD(e){let A=this[HA]||new Mr(`HTTP/2: "GOAWAY" frame received with code ${e}`,x.getSocketInfo(this)),t=this[Gt];if(t[oA]=null,t[Xp]=null,this[vA]!=null&&(this[vA].destroy(A),this[vA]=null),x.destroy(this[oA],A),t[JA]<t[ke].length){let r=t[ke][t[JA]];t[ke][t[JA]++]=null,x.errorRequest(t,r,A),t[zo]=t[JA]}MA(t[sn]===0),t.emit("disconnect",t[en],[t],A),t[Re]()}function ED(e){return e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS"&&e!=="TRACE"&&e!=="CONNECT"}function BD(e,A){let t=e[vA],{method:r,path:s,host:n,upgrade:i,expectContinue:o,signal:a,headers:c}=A,{body:g}=A;if(i)return x.errorRequest(e,A,new Error("Upgrade not supported for H2")),!1;let Q={};for(let R=0;R<c.length;R+=2){let O=c[R+0],AA=c[R+1];if(Array.isArray(AA))for(let j=0;j<AA.length;j++)Q[O]?Q[O]+=`,${AA[j]}`:Q[O]=AA[j];else Q[O]=AA}let B,{hostname:C,port:I}=e[en];Q[jp]=n||`${C}${I?`:${I}`:""}`,Q[$p]=r;let u=R=>{A.aborted||A.completed||(R=R||new tB,x.errorRequest(e,A,R),B!=null&&x.destroy(B,R),x.destroy(g,R),e[ke][e[JA]++]=null,e[Re]())};try{A.onConnect(u)}catch(R){x.errorRequest(e,A,R)}if(A.aborted)return!1;if(r==="CONNECT")return t.ref(),B=t.request(Q,{endStream:!1,signal:a}),B.id&&!B.pending?(A.onUpgrade(null,null,B),++t[Ie],e[ke][e[JA]++]=null):B.once("ready",()=>{A.onUpgrade(null,null,B),++t[Ie],e[ke][e[JA]++]=null}),B.once("close",()=>{t[Ie]-=1,t[Ie]===0&&t.unref()}),!0;Q[AD]=s,Q[eD]="https";let w=r==="PUT"||r==="POST"||r==="PATCH";g&&typeof g.read=="function"&&g.read(0);let l=x.bodyLength(g);if(x.isFormDataLike(g)){rB??=Mt().extractBody;let[R,O]=rB(g);Q["content-type"]=O,g=R.stream,l=R.length}if(l==null&&(l=A.contentLength),(l===0||!w)&&(l=null),ED(r)&&l>0&&A.contentLength!=null&&A.contentLength!==l){if(e[zp])return x.errorRequest(e,A,new Zo),!1;process.emitWarning(new Zo)}l!=null&&(MA(g,"no body must not have content length"),Q[tD]=`${l}`),t.ref();let p=r==="GET"||r==="HEAD"||g===null;return o?(Q[rD]="100-continue",B=t.request(Q,{endStream:p,signal:a}),B.once("continue",k)):(B=t.request(Q,{endStream:p,signal:a}),k()),++t[Ie],B.once("response"
Line truncated
|
|
|
|
|
`,this[JD]=a??3e5,this[GD]=s??3e5,this[vD]=p??!0,this[HD]=R,this[Aa]=AA,this[Ne]=null,this[PD]=_A>-1?_A:-1,this[_D]=ye??100,this[tA]=null,this[VA]=[],this[he]=0,this[qA]=0,this[Yr]=ht=>ta(this,ht),this[ZD]=ht=>wB(this,ht)}get pipelining(){return this[cn]}set pipelining(A){this[cn]=A,this[Yr](!0)}get[vr](){return this[VA].length-this[qA]}get[Jr](){return this[qA]-this[he]}get[Gr](){return this[VA].length-this[he]}get[UD](){return!!this[tA]&&!this[vt]&&!this[tA].destroyed}get[$o](){return!!(this[tA]?.busy(null)||this[Gr]>=(fB(this)||1)||this[vr]>0)}[SD](A){yB(this),this.once("connect",A)}[OD](A,t){let r=A.origin||this[ee].origin,s=new DD(r,A,t);return this[VA].push(s),this[Ke]||(ze.bodyLength(s.body)==null&&ze.isIterable(s.body)?(this[Ke]=1,queueMicrotask(()=>ta(this))):this[Yr](!0)),this[Ke]&&this[Se]!==2&&this[$o]&&(this[Se]=2),this[Se]<2}async[qD](){return new Promise(A=>{this[Gr]?this[Ne]=A:A(null)})}async[WD](A){return new Promise(t=>{let r=this[VA].splice(this[qA]);for(let n=0;n<r.length;n++){let i=r[n];ze.errorRequest(this,i,A)}let s=()=>{this[Ne]&&(this[Ne](),this[Ne]=null),t(null)};this[tA]?(this[tA].destroy(A,s),this[tA]=null):queueMicrotask(s),this[Yr]()})}},XD=an();function wB(e,A){if(e[Jr]===0&&A.code!=="UND_ERR_INFO"&&A.code!=="UND_ERR_SOCKET"){Ce(e[qA]===e[he]);let t=e[VA].splice(e[he]);for(let r=0;r<t.length;r++){let s=t[r];ze.errorRequest(e,s,A)}Ce(e[Gr]===0)}}async function yB(e){Ce(!e[vt]),Ce(!e[tA]);let{host:A,hostname:t,protocol:r,port:s}=e[ee];if(t[0]==="["){let n=t.indexOf("]");Ce(n!==-1);let i=t.substring(1,n);Ce(dB.isIP(i)),t=i}e[vt]=!0,Jt.beforeConnect.hasSubscribers&&Jt.beforeConnect.publish({connectParams:{host:A,hostname:t,protocol:r,port:s,version:e[tA]?.version,servername:e[Fe],localAddress:e[xr]},connector:e[Tr]});try{let n=await new Promise((i,o)=>{e[Tr]({host:A,hostname:t,protocol:r,port:s,servername:e[Fe],localAddress:e[xr]},(a,c)=>{a?o(a):i(c)})});if(e.destroyed){ze.destroy(n.on("error",hB),new RD);return}Ce(n);try{e[tA]=n.alpnProtocol==="h2"?await KD(e,n):await zD(e,n)}catch(i){throw n.destroy().on("error",hB),i}e[vt]=!1,n[VD]=0,n[Aa]=e[Aa],n[ND]=e,n[MD]=null,Jt.connected.hasSubscribers&&Jt.connected.publish({connectParams:{host:A,hostname:t,protocol:r,port:s,version:e[tA]?.version,servername:e[Fe],localAddress:e[xr]},connector:e[Tr],socket:n}),e.emit("connect",e[ee],[e])}catch(n){if(e.destroyed)return;if(e[vt]=!1,Jt.connectError.hasSubscribers&&Jt.connectError.publish({connectParams:{host:A,hostname:t,protocol:r,port:s,version:e[tA]?.version,servername:e[Fe],localAddress:e[xr]},connector:e[Tr],error:n}),n.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Ce(e[Jr]===0);e[vr]>0&&e[VA][e[qA]].servername===e[Fe];){let i=e[VA][e[qA]++];ze.errorRequest(e,i,n)}else wB(e,n);e.emit("connectionError",e[ee],[e],n)}e[Yr]()}function uB(e){e[Se]=0,e.emit("drain",e[ee],[e])}function ta(e,A){e[Ke]!==2&&(e[Ke]=2,jD(e,A),e[Ke]=0,e[he]>256&&(e[VA].splice(0,e[he]),e[qA]-=e[he],e[he]=0))}function jD(e,A){for(;;){if(e.destroyed){Ce(e[vr]===0);return}if(e[Ne]&&!e[Gr]){e[Ne](),e[Ne]=null;return}if(e[tA]&&e[tA].resume(),e[$o])e[Se]=2;else if(e[Se]===2){A?(e[Se]=1,queueMicrotask(()=>uB(e))):uB(e);continue}if(e[vr]===0||e[Jr]>=(fB(e)||1))return;let t=e[VA][e[qA]];if(e[ee].protocol==="https:"&&e[Fe]!==t.servername){if(e[Jr]>0)return;e[Fe]=t.servername,e[tA]?.destroy(new kD("servername changed"),()=>{e[tA]=null,ta(e)})}if(e[vt])return;if(!e[tA]){yB(e);return}if(e[tA].destroyed||e[tA].busy(t))return;!t.aborted&&e[tA].write(t)?e[qA]++:e[VA].splice(e[qA],1)}}pB.exports=ea});var ra=d((AL,DB)=>{"use strict";E();var gn=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(A){this.list[this.top]=A,this.top=this.top+1&2047}shift(){let A=this.list[this.bottom];return A===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,A)}};DB.exports=class{constructor(){this.head=this.tail=new gn}isEmpty(){return this.head.isEmpty()}push(A){this.head.isFull()&&(this.head=this.head.next=new gn),this.head.push(A)}shift(){let A=this.tail,t=A.shift();return A.isEmpty()&&A.next!==null&&(this.tail=A.next),t}}});var kB=d((tL,mB)=>{"use strict";E();var{kFree:$D,kConnected:A0,kPending:e0,kQueued:t0,kRunning:r0,kSize:s0}=z(),Xe=Symbol("pool"),sa=class{constructor(A){this[Xe]=A}get connected(){return this[Xe][A0]}get free(){return this[Xe][$D]}get pending(){return this[Xe][e0]}get queued(){return this[Xe][t0]}get running(){return this[Xe][r0]}get size(){return this[Xe][s0]}};mB.exports=sa});var ga=d((sL,xB)=>{"use strict";E();var n0=Dt(),i0=ra(),{kConnected:na,kSize:RB,kRunning:FB,kPending:NB,kQueued:Hr,kBusy:o0,kFree:a0,kUrl:c0,kClose:g0,kDestroy:Q0,kDispatch:E0}=z(),B0=kB(),hA=Symbol("clients"),BA=Symbol("needDrain"),Vr=Symbol("queue"),ia=Symbol("closed resolve"),oa=Symbol("onDrain"),SB=Symbol("onConnect"),UB=Symbol("onDisconnect"),bB=Symbol("onConnectionError"),aa=Symbol("get dispatcher"),LB=S
Line truncated
|
|
|
|
|
`,"latin1"),t!==null&&s!==t){if(r[Oo])throw new Pe;process.emitWarning(new Pe)}A[_].timeout&&A[_].timeoutType===Yt&&A[_].timeout.refresh&&A[_].timeout.refresh(),r[le]()}}destroy(A){let{socket:t,client:r,abort:s}=this;t[De]=!1,A&&(S(r[rA]<=1,"pipeline should only contain this request"),s(A))}};iB.exports=Pp});var IB=d((tL,lB)=>{"use strict";E();var Ae=h("node:assert"),{errorMonitor:Ko}=h("node:events"),{pipeline:$p}=h("node:stream"),x=T(),{RequestContentLengthMismatchError:jo,RequestAbortedError:Xo,SocketError:Mr,InformationalError:sn}=J(),{kUrl:nn,kReset:an,kClient:Gt,kRunning:cn,kPending:AD,kQueue:Ke,kPendingIdx:Aa,kRunningIdx:$A,kError:VA,kSocket:oA,kStrictContentLength:eD,kOnError:ea,kMaxConcurrentStreams:EB,kHTTP2Session:HA,kResume:ke,kSize:tD,kHTTPContext:rD}=X(),me=Symbol("open streams"),aB,cB=!1,on;try{on=h("node:http2")}catch{on={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:sD,HTTP2_HEADER_METHOD:nD,HTTP2_HEADER_PATH:iD,HTTP2_HEADER_SCHEME:oD,HTTP2_HEADER_CONTENT_LENGTH:aD,HTTP2_HEADER_EXPECT:cD,HTTP2_HEADER_STATUS:$o}}=on;function BB(e){let A=[];for(let[t,r]of Object.entries(e))if(Array.isArray(r))for(let s of r)A.push(Buffer.from(t),Buffer.from(s));else A.push(Buffer.from(t),Buffer.from(r));return A}function gD(e){let{[$o]:A,...t}=e;return BB(t)}async function QD(e,A){e[oA]=A,cB||(cB=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let t=on.connect(e[nn],{createConnection:()=>A,peerMaxConcurrentStreams:e[EB]});t[me]=0,t[Gt]=e,t[oA]=A,x.addListener(t,"error",BD),x.addListener(t,"frameError",lD),x.addListener(t,"end",ID),x.addListener(t,"goaway",CD),x.addListener(t,"close",function(){let{[Gt]:s}=this,{[oA]:n}=s,i=this[oA][VA]||this[VA]||new Mr("closed",x.getSocketInfo(n));if(s[HA]=null,s.destroyed){Ae(s[AD]===0);let o=s[Ke].splice(s[$A]);for(let a=0;a<o.length;a++){let c=o[a];x.errorRequest(s,c,i)}}}),t.unref(),e[HA]=t,A[HA]=t,x.addListener(A,"error",function(s){this[VA]=s,this[Gt][ea](s)}),x.addListener(A,"end",function(){x.destroy(this,new Mr("other side closed",x.getSocketInfo(this)))}),x.addListener(A,"close",function(){let s=this[VA]||new Mr("closed",x.getSocketInfo(this));e[oA]=null,this[HA]!=null&&this[HA].destroy(s),e[Aa]=e[$A],Ae(e[cn]===0),e.emit("disconnect",e[nn],[e],s),e[ke]()});let r=!1;return A.on("close",()=>{r=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return uD(e,...s)},resume(){ED(e)},destroy(s,n){r?queueMicrotask(n):A.destroy(s).on("close",n)},get destroyed(){return A.destroyed},busy(){return!1}}}function ED(e){let A=e[oA];A?.destroyed===!1&&(e[tD]===0&&e[EB]===0?(A.unref(),e[HA].unref()):(A.ref(),e[HA].ref()))}function BD(e){this[oA][VA]=e,this[Gt][ea](e)}function lD(e,A,t){if(t===0){let r=new sn(`HTTP/2: "frameError" received - type ${e}, code ${A}`);this[oA][VA]=r,this[Gt][ea](r)}}function ID(){let e=new Mr("other side closed",x.getSocketInfo(this[oA]));this.destroy(e),x.destroy(this[oA],e)}function CD(e){let A=this[VA]||new Mr(`HTTP/2: "GOAWAY" frame received with code ${e}`,x.getSocketInfo(this)),t=this[Gt];if(t[oA]=null,t[rD]=null,this[HA]!=null&&(this[HA].destroy(A),this[HA]=null),x.destroy(this[oA],A),t[$A]<t[Ke].length){let r=t[Ke][t[$A]];t[Ke][t[$A]++]=null,x.errorRequest(t,r,A),t[Aa]=t[$A]}Ae(t[cn]===0),t.emit("disconnect",t[nn],[t],A),t[ke]()}function hD(e){return e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS"&&e!=="TRACE"&&e!=="CONNECT"}function uD(e,A){let t=e[HA],{method:r,path:s,host:n,upgrade:i,expectContinue:o,signal:a,headers:c}=A,{body:g}=A;if(i)return x.errorRequest(e,A,new Error("Upgrade not supported for H2")),!1;let Q={};for(let D=0;D<c.length;D+=2){let v=c[D+0],Z=c[D+1];if(Array.isArray(Z))for(let z=0;z<Z.length;z++)Q[v]?Q[v]+=`,${Z[z]}`:Q[v]=Z[z];else Q[v]=Z}let B,{hostname:C,port:I}=e[nn];Q[sD]=n||`${C}${I?`:${I}`:""}`,Q[nD]=r;let u=D=>{if(!A.aborted){if(A.completed){r==="CONNECT"&&B!=null&&x.destroy(B,D||new Xo);return}D=D||new Xo,x.errorRequest(e,A,D),B!=null&&x.destroy(B,D),x.destroy(g,D),e[Ke][e[$A]++]=null,e[ke]()}};try{A.onConnect(u)}catch(D){x.errorRequest(e,A,D)}if(A.aborted)return!1;if(r==="CONNECT"){t.ref(),B=t.request(Q,{endStream:!1,signal:a});let D=!1,v=aA=>{D=!0,B.off(Ko,Z),A.onUpgradeResponse(Number(aA[$o]),aA,gD)},Z=aA=>{D=!0,B.off("response",v),A.onUpgradeError(aA)},z=()=>{try{A.onUpgrade(null,null,B)}catch(aA){B.off("response",v),u(aA);return}A.aborted||(B.off("error",u),B.once(Ko,Z),e[Ke][e[$A]++]=null)};return B.once("response",v),B.once("error",u),++t[me],z(),B.once("close",()=>{!D&&A.completed&&(B.off("response",v),B.off(Ko,Z),A.onUpgradeError(new sn(`HTTP/2: "stream error" received - code ${B.rstCode}`))),t[me]-=1,t[me]===0&&t.unref()}),!0}Q[iD]=s,Q[oD]="https";let w=r==="PUT"||r==="POST"||r==="PATCH";g&&typeof g.read=="function"&&g.read(0);let l=x.bodyLength(g);if(x.isFormDataLike(g)){aB??=Lt().extractBody;let[D,v]=aB(g);Q["content-type"]=v,g=D.stream,l=D.length}if(l==null&&(l=A.contentLength),(l===0||!w)&&(l=null),hD(r)&&l>0&&A.contentLength!=null&&A.contentLeng
Line truncated
|
|
|
|
|
`,this[WD]=a??3e5,this[qD]=s??3e5,this[OD]=p??!0,this[PD]=D,this[na]=Z,this[Fe]=null,this[XD]=aA>-1?aA:-1,this[$D]=we??100,this[tA]=null,this[qA]=[],this[Ce]=0,this[WA]=0,this[Yr]=He=>oa(this,He),this[jD]=He=>RB(this,He)}get pipelining(){return this[Bn]}set pipelining(A){this[Bn]=A,this[Yr](!0)}get[vr](){return this[qA].length-this[WA]}get[Jr](){return this[WA]-this[Ce]}get[Gr](){return this[qA].length-this[Ce]}get[xD](){return!!this[tA]&&!this[vt]&&!this[tA].destroyed}get[sa](){return!!(this[tA]?.busy(null)||this[Gr]>=(kB(this)||1)||this[vr]>0)}[TD](A){FB(this),this.once("connect",A)}[KD](A,t){let r=A.origin||this[te].origin,s=new ND(r,A,t);return this[qA].push(s),this[je]||(Xe.bodyLength(s.body)==null&&Xe.isIterable(s.body)?(this[je]=1,queueMicrotask(()=>oa(this))):this[Yr](!0)),this[je]&&this[Ne]!==2&&this[sa]&&(this[Ne]=2),this[Ne]<2}async[zD](){return new Promise(A=>{this[Gr]?this[Fe]=A:A(null)})}async[_D](A){return new Promise(t=>{let r=this[qA].splice(this[WA]);for(let n=0;n<r.length;n++){let i=r[n];Xe.errorRequest(this,i,A)}let s=()=>{this[Fe]&&(this[Fe](),this[Fe]=null),t(null)};this[tA]?(this[tA].destroy(A,s),this[tA]=null):queueMicrotask(s),this[Yr]()})}},t0=En();function RB(e,A){if(e[Jr]===0&&A.code!=="UND_ERR_INFO"&&A.code!=="UND_ERR_SOCKET"){Ie(e[WA]===e[Ce]);let t=e[qA].splice(e[Ce]);for(let r=0;r<t.length;r++){let s=t[r];Xe.errorRequest(e,s,A)}Ie(e[Gr]===0)}}async function FB(e){Ie(!e[vt]),Ie(!e[tA]);let{host:A,hostname:t,protocol:r,port:s}=e[te];if(t[0]==="["){let n=t.indexOf("]");Ie(n!==-1);let i=t.substring(1,n);Ie(mB.isIP(i)),t=i}e[vt]=!0,Jt.beforeConnect.hasSubscribers&&Jt.beforeConnect.publish({connectParams:{host:A,hostname:t,protocol:r,port:s,version:e[tA]?.version,servername:e[Re],localAddress:e[xr]},connector:e[Tr]});try{let n=await new Promise((i,o)=>{e[Tr]({host:A,hostname:t,protocol:r,port:s,servername:e[Re],localAddress:e[xr]},(a,c)=>{a?o(a):i(c)})});if(e.destroyed){Xe.destroy(n.on("error",pB),new UD);return}Ie(n);try{e[tA]=n.alpnProtocol==="h2"?await e0(e,n):await A0(e,n)}catch(i){throw n.destroy().on("error",pB),i}e[vt]=!1,n[ZD]=0,n[na]=e[na],n[LD]=e,n[GD]=null,Jt.connected.hasSubscribers&&Jt.connected.publish({connectParams:{host:A,hostname:t,protocol:r,port:s,version:e[tA]?.version,servername:e[Re],localAddress:e[xr]},connector:e[Tr],socket:n}),e.emit("connect",e[te],[e])}catch(n){if(e.destroyed)return;if(e[vt]=!1,Jt.connectError.hasSubscribers&&Jt.connectError.publish({connectParams:{host:A,hostname:t,protocol:r,port:s,version:e[tA]?.version,servername:e[Re],localAddress:e[xr]},connector:e[Tr],error:n}),n.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Ie(e[Jr]===0);e[vr]>0&&e[qA][e[WA]].servername===e[Re];){let i=e[qA][e[WA]++];Xe.errorRequest(e,i,n)}else RB(e,n);e.emit("connectionError",e[te],[e],n)}e[Yr]()}function DB(e){e[Ne]=0,e.emit("drain",e[te],[e])}function oa(e,A){e[je]!==2&&(e[je]=2,r0(e,A),e[je]=0,e[Ce]>256&&(e[qA].splice(0,e[Ce]),e[WA]-=e[Ce],e[Ce]=0))}function r0(e,A){for(;;){if(e.destroyed){Ie(e[vr]===0);return}if(e[Fe]&&!e[Gr]){e[Fe](),e[Fe]=null;return}if(e[tA]&&e[tA].resume(),e[sa])e[Ne]=2;else if(e[Ne]===2){A?(e[Ne]=1,queueMicrotask(()=>DB(e))):DB(e);continue}if(e[vr]===0||e[Jr]>=(kB(e)||1))return;let t=e[qA][e[WA]];if(e[te].protocol==="https:"&&e[Re]!==t.servername){if(e[Jr]>0)return;e[Re]=t.servername,e[tA]?.destroy(new bD("servername changed"),()=>{e[tA]=null,oa(e)})}if(e[vt])return;if(!e[tA]){FB(e);return}if(e[tA].destroyed||e[tA].busy(t))return;!t.aborted&&e[tA].write(t)?e[WA]++:e[qA].splice(e[WA],1)}}NB.exports=ia});var aa=d((QL,SB)=>{"use strict";E();var ln=class{constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(A){this.list[this.top]=A,this.top=this.top+1&2047}shift(){let A=this.list[this.bottom];return A===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,A)}};SB.exports=class{constructor(){this.head=this.tail=new ln}isEmpty(){return this.head.isEmpty()}push(A){this.head.isFull()&&(this.head=this.head.next=new ln),this.head.push(A)}shift(){let A=this.tail,t=A.shift();return A.isEmpty()&&A.next!==null&&(this.tail=A.next),t}}});var UB=d((BL,bB)=>{"use strict";E();var{kFree:s0,kConnected:n0,kPending:i0,kQueued:o0,kRunning:a0,kSize:c0}=X(),$e=Symbol("pool"),ca=class{constructor(A){this[$e]=A}get connected(){return this[$e][n0]}get free(){return this[$e][s0]}get pending(){return this[$e][i0]}get queued(){return this[$e][o0]}get running(){return this[$e][a0]}get size(){return this[$e][c0]}};bB.exports=ca});var Ia=d((IL,VB)=>{"use strict";E();var g0=mt(),Q0=aa(),{kConnected:ga,kSize:MB,kRunning:LB,kPending:TB,kQueued:Hr,kBusy:E0,kFree:B0,kUrl:l0,kClose:I0,kDestroy:C0,kDispatch:h0}=X(),u0=UB(),dA=Symbol("clients"),IA=Symbol("needDrain"),Vr=Symbol("queue"),Qa=Symbol("closed resolve"),Ea=Symbol("onDrain"),xB=Symbol("onConnect"),YB=Symbol("onDisconnect"),GB=Symbol("onConnectionError"),Ba=Symbol("get dispatcher"),vB=Sy
Line truncated
|
|
|
|
|
${r.count} ${r.noun} ${r.is} pending:
|
|
|
|
|
|
|
|
|
|
${A.format(t)}
|
|
|
|
|
`.trim())}};qI.exports=gc});var Fn=d((sT,_I)=>{"use strict";E();var OI=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Jk}=J(),vk=qt();ZI()===void 0&&PI(new vk);function PI(e){if(!e||typeof e.dispatch!="function")throw new Jk("Argument agent must implement Agent");Object.defineProperty(globalThis,OI,{value:e,writable:!0,enumerable:!1,configurable:!1})}function ZI(){return globalThis[OI]}_I.exports={setGlobalDispatcher:PI,getGlobalDispatcher:ZI}});var Nn=d((oT,zI)=>{"use strict";E();zI.exports=class{#A;constructor(A){if(typeof A!="object"||A===null)throw new TypeError("handler must be an object");this.#A=A}onConnect(...A){return this.#A.onConnect?.(...A)}onError(...A){return this.#A.onError?.(...A)}onUpgrade(...A){return this.#A.onUpgrade?.(...A)}onResponseStarted(...A){return this.#A.onResponseStarted?.(...A)}onHeaders(...A){return this.#A.onHeaders?.(...A)}onData(...A){return this.#A.onData?.(...A)}onComplete(...A){return this.#A.onComplete?.(...A)}onBodySent(...A){return this.#A.onBodySent?.(...A)}}});var XI=d((cT,KI)=>{"use strict";E();var Hk=on();KI.exports=e=>{let A=e?.maxRedirections;return t=>function(s,n){let{maxRedirections:i=A,...o}=s;if(!i)return t(s,n);let a=new Hk(t,i,s,n);return t(o,a)}}});var $I=d((QT,jI)=>{"use strict";E();var Vk=un();jI.exports=e=>A=>function(r,s){return A(r,new Vk({...r,retryOptions:{...e,...r.retryOptions}},{handler:s,dispatch:A}))}});var eC=d((BT,AC)=>{"use strict";E();var qk=T(),{InvalidArgumentError:Wk,RequestAbortedError:Ok}=J(),Pk=Nn(),Qc=class extends Pk{#A=1024*1024;#e=null;#t=!1;#n=!1;#s=0;#r=null;#i=null;constructor({maxSize:A},t){if(super(t),A!=null&&(!Number.isFinite(A)||A<1))throw new Wk("maxSize must be a number greater than 0");this.#A=A??this.#A,this.#i=t}onConnect(A){this.#e=A,this.#i.onConnect(this.#o.bind(this))}#o(A){this.#n=!0,this.#r=A}onHeaders(A,t,r,s){let i=qk.parseHeaders(t)["content-length"];if(i!=null&&i>this.#A)throw new Ok(`Response size (${i}) larger than maxSize (${this.#A})`);return this.#n?!0:this.#i.onHeaders(A,t,r,s)}onError(A){this.#t||(A=this.#r??A,this.#i.onError(A))}onData(A){return this.#s=this.#s+A.length,this.#s>=this.#A&&(this.#t=!0,this.#n?this.#i.onError(this.#r):this.#i.onComplete([])),!0}onComplete(A){if(!this.#t){if(this.#n){this.#i.onError(this.reason);return}this.#i.onComplete(A)}}};function Zk({maxSize:e}={maxSize:1024*1024}){return A=>function(r,s){let{dumpMaxSize:n=e}=r,i=new Qc({maxSize:n},s);return A(r,i)}}AC.exports=Zk});var sC=d((IT,rC)=>{"use strict";E();var{isIP:_k}=h("node:net"),{lookup:zk}=h("node:dns"),Kk=Nn(),{InvalidArgumentError:jt,InformationalError:Xk}=J(),tC=Math.pow(2,31)-1,Ec=class{#A=0;#e=0;#t=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(A){this.#A=A.maxTTL,this.#e=A.maxItems,this.dualStack=A.dualStack,this.affinity=A.affinity,this.lookup=A.lookup??this.#n,this.pick=A.pick??this.#s}get full(){return this.#t.size===this.#e}runLookup(A,t,r){let s=this.#t.get(A.hostname);if(s==null&&this.full){r(null,A.origin);return}let n={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...t.dns,maxTTL:this.#A,maxItems:this.#e};if(s==null)this.lookup(A,n,(i,o)=>{if(i||o==null||o.length===0){r(i??new Xk("No DNS entries found"));return}this.setRecords(A,o);let a=this.#t.get(A.hostname),c=this.pick(A,a,n.affinity),g;typeof c.port=="number"?g=`:${c.port}`:A.port!==""?g=`:${A.port}`:g="",r(null,`${A.protocol}//${c.family===6?`[${c.address}]`:c.address}${g}`)});else{let i=this.pick(A,s,n.affinity);if(i==null){this.#t.delete(A.hostname),this.runLookup(A,t,r);return}let o;typeof i.port=="number"?o=`:${i.port}`:A.port!==""?o=`:${A.port}`:o="",r(null,`${A.protocol}//${i.family===6?`[${i.address}]`:i.address}${o}`)}}#n(A,t,r){zk(A.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,n)=>{if(s)return r(s);let i=new Map;for(let o of n)i.set(`${o.address}:${o.family}`,o);r(null,i.values())})}#s(A,t,r){let s=null,{records:n,offset:i}=t,o;if(this.dualStack?(r==null&&(i==null||i===tC?(t.offset=0,r=4):(t.offset++,r=(t.offset&1)===1?6:4)),n[r]!=null&&n[r].ips.length>0?o=n[r]:o=n[r===4?6:4]):o=n[r],o==null||o.ips.length===0)return s;o.offset==null||o.offset===tC?o.offset=0:o.offset++;let a=o.offset%o.ips.length;return s=o.ips[a]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(o.ips.splice(a,1),this.pick(A,t,r)):s}setRecords(A,t){let r=Date.now(),s={records:{4:null,6:null}};for(let n of t){n.timestamp=r,typeof n.ttl=="number"?n.ttl=Math.min(n.ttl,this.#A):n.ttl=this.#A;let i=s.records[n.family]??{ips:[]};i.ips.push(n),s.records[n.family]=i}this.#t.set(A.hostname,s)}getHandler(A,t){return new Bc(this,A,t)}},Bc=class extends Kk{#A=null;#e=null;#t=null;#n=null;#s=null;constructor(A,{origin:t,handler:r,dispatch:s},n){super(r),this.#s=t,this.#n=r,this.#e={...n},this.#A=A,this.#t=s}onError(A){switch(A.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#A.dualStack){this.#A.runLookup(this.#s,this.#e,(t,r)=>{if(t)return this.#n.onError(t);let s={...thi
Line truncated
|
|
|
|
|
${i}`;return}if(Ii(A,s,gU)){QU(A,n)&&(t.retry=A.toString("utf8",n));return}if(Ii(A,s,cU)){EU(A,n)&&(t.id=A.toString("utf8",n));return}if(Ii(A,s,aU)){let i=A.toString("utf8",n);i.length>0&&(t.event=i)}}processEvent(A){A.retry&&rU(A.retry)&&(this.state.reconnectionTime=parseInt(A.retry,10)),A.id&&sU(A.id)&&(this.state.lastEventId=A.id),A.data!==void 0&&this.push({type:A.event||"message",options:{data:A.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event.data=void 0,this.event.event=void 0,this.event.id=void 0,this.event.retry=void 0}hasPendingEvent(){return this.event.data!==void 0||this.event.event!==void 0||this.event.id!==void 0||this.event.retry!==void 0}hasCurrentByte(){return this.chunkIndex<this.chunks.length&&this.pos<this.chunks[this.chunkIndex].length}currentByte(){return this.chunks[this.chunkIndex][this.pos]}consumeCurrentByte(){this.advanceCursor(),this.syncLineStartToCursor()}advanceCursor(){for(this.pos++;this.chunkIndex<this.chunks.length&&this.pos>=this.chunks[this.chunkIndex].length;)this.chunkIndex++,this.pos=0}syncLineStartToCursor(){this.lineChunkIndex=this.chunkIndex,this.linePos=this.pos,this.dropConsumedChunks()}dropConsumedChunks(){for(;this.lineChunkIndex>0;)this.chunks.shift(),this.lineChunkIndex--,this.chunkIndex--;this.chunkIndex===this.chunks.length&&(this.chunks.length=0,this.chunkIndex=0,this.pos=0,this.lineChunkIndex=0,this.linePos=0)}readLine(){if(this.lineChunkIndex===this.chunkIndex)return this.chunks[this.chunkIndex].subarray(this.linePos,this.pos);let A=[],t=0;for(let r=this.lineChunkIndex;r<=this.chunkIndex;r++){let s=this.chunks[r],n=r===this.lineChunkIndex?this.linePos:0,i=r===this.chunkIndex?this.pos:s.length,o=s.subarray(n,i);t+=o.length,A.push(o)}return Buffer.concat(A,t)}peekBufferedByte(A){let t=this.lineChunkIndex,r=this.linePos;for(;t<this.chunks.length;){let s=this.chunks[t],n=s.length-r;if(A<n)return s[r+A];A-=n,t++,r=0}}discardLeadingBytes(A){for(;A>0&&this.lineChunkIndex<this.chunks.length;){let r=this.chunks[this.lineChunkIndex].length-this.linePos;A<r?(this.linePos+=A,A=0):(A-=r,this.lineChunkIndex++,this.linePos=0)}this.chunkIndex=this.lineChunkIndex,this.pos=this.linePos,this.dropConsumedChunks()}handleBOM(){let A=this.peekBufferedByte(0),t=this.peekBufferedByte(1),r=this.peekBufferedByte(2);return t===void 0?(A===Er[0]||(this.checkBOM=!1),!0):r===void 0?A===Er[0]&&t===Er[1]?!0:(this.checkBOM=!1,!1):(A===Er[0]&&t===Er[1]&&r===Er[2]&&this.discardLeadingBytes(3),this.checkBOM=!1,!this.hasCurrentByte())}};xu.exports={EventSourceStream:tg}});var Ou=d((px,Wu)=>{"use strict";E();var{pipeline:BU}=h("node:stream"),{fetching:lU}=es(),{makeRequest:IU}=er(),{webidl:we}=aA(),{EventSourceStream:CU}=Yu(),{parseMIMEType:hU}=IA(),{createFastMessageEvent:uU}=or(),{isNetworkError:Gu}=$r(),{delay:dU}=Ag(),{kEnumerableProperty:Bt}=T(),{environmentSettingsObject:Ju}=wA(),vu=!1,Hu=3e3,Is=0,Vu=1,Cs=2,fU="anonymous",wU="use-credentials",Br=class e extends EventTarget{#A={open:null,error:null,message:null};#e=null;#t=!1;#n=Is;#s=null;#r=null;#i;#o;constructor(A,t={}){super(),we.util.markAsUncloneable(this);let r="EventSource constructor";we.argumentLengthCheck(arguments,1,r),vu||(vu=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),A=we.converters.USVString(A,r,"url"),t=we.converters.EventSourceInitDict(t,r,"eventSourceInitDict"),this.#i=t.dispatcher,this.#o={lastEventId:"",reconnectionTime:Hu};let s=Ju,n;try{n=new URL(A,s.settingsObject.baseUrl),this.#o.origin=n.origin}catch(a){throw new DOMException(a,"SyntaxError")}this.#e=n.href;let i=fU;t.withCredentials&&(i=wU,this.#t=!0);let o={redirect:"follow",keepalive:!0,mode:"cors",credentials:i==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};o.client=Ju.settingsObject,o.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],o.cache="no-store",o.initiator="other",o.urlList=[new URL(this.#e)],this.#s=IU(o),this.#c()}get readyState(){return this.#n}get url(){return this.#e}get withCredentials(){return this.#t}#c(){if(this.#n===Cs)return;this.#n=Is;let A={request:this.#s,dispatcher:this.#i},t=r=>{Gu(r)&&(this.dispatchEvent(new Event("error")),this.close()),this.#a()};A.processResponseEndOfBody=t,A.processResponse=r=>{if(Gu(r))if(r.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#a();return}let s=r.headersList.get("content-type",!0),n=s!==null?hU(s):"failure",i=n!=="failure"&&n.essence==="text/event-stream";if(r.status!==200||i===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#n=Vu,this.dispatchEvent(new Event("open")),this.#o.origin=r.urlList[r.urlList.length-1].origin;let o=new CU({eventSourceSettings:this.#o,push:a=>{this.dispatchEvent(uU(a.type,a.options))}});BU(r.body.stream,o,a=>{a?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#r=lU(A)}async#a(){this.#n!==Cs&&(this.#n=Is,this.dispatchEvent(new Event("error")),await dU(this.#o.rec
Line truncated
|
|
|
|
|
`).filter(r=>r!=="");return A&&A.trimWhitespace===!1?t:t.map(r=>r.trim())}function ld(e){process.exitCode=Eg.Failure,yb(e)}function yb(e,A={}){Cr("error",ws(A),e instanceof Error?e.toString():e)}function ds(e,A={}){Cr("warning",ws(A),e instanceof Error?e.toString():e)}function Id(e,A={}){Cr("notice",ws(A),e instanceof Error?e.toString():e)}function Cd(e){process.stdout.write(e+Ed.EOL)}function pb(e){Ni("group",e)}function Db(){Ni("endgroup")}function hd(e,A){return wb(this,void 0,void 0,function*(){pb(e);let t;try{t=yield A()}finally{Db()}return t})}E();import ud from"node:path";var Di=class{options={envRegex:/^(?:RENOVATE_\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|NO_COLOR|(?:HTTPS?|NO)_PROXY|(?:https?|no)_proxy)$/,configurationFile:{input:"configurationFile",env:"RENOVATE_CONFIG_FILE",optional:!0},token:{input:"token",env:"RENOVATE_TOKEN",optional:!1}};token;_environmentVariables;_configurationFile;constructor(){let A=YA("env-regex"),t=A?new RegExp(A):this.options.envRegex,r=Bd("additional-env-list");this._environmentVariables=new Map(Object.entries(process.env).filter(([s])=>t.test(s)||r.includes(s)).filter(s=>s[1]!==void 0));for(let s of r)this._environmentVariables.has(s)||ds(`Environment variable '${s}' listed in 'additional-env-list' was not found in the parent process environment; it will not be passed to the renovate container.`);this.token=this.get(this.options.token.input,this.options.token.env,this.options.token.optional),this._configurationFile=this.get(this.options.configurationFile.input,this.options.configurationFile.env,this.options.configurationFile.optional)}configurationFile(){return this._configurationFile.value!==""?{key:this._configurationFile.key,value:ud.resolve(this._configurationFile.value)}:null}getDockerImage(){return YA("renovate-image")||null}getVersion(){return YA("renovate-version")||null}mountDockerSocket(){return YA("mount-docker-socket")==="true"}dockerSocketHostPath(){return YA("docker-socket-host-path")||"/var/run/docker.sock"}getDockerCmdFile(){let A=YA("docker-cmd-file");return A&&A!==""?ud.resolve(A):null}getDockerUser(){return YA("docker-user")||null}getDockerVolumeMounts(){return YA("docker-volumes").split(";").map(A=>A.trim()).filter(A=>!!A)}getDockerNetwork(){return YA("docker-network")}toEnvironmentVariables(){return[...this._environmentVariables].map(([A,t])=>({key:A,value:t}))}get(A,t,r){let s=YA(A),n=this._environmentVariables.get(t);if(s===""&&n===void 0&&!r)throw new Error([`'${A}' MUST be passed using its input or the '${t}'`,"environment variable"].join(" "));return this._environmentVariables.delete(t),s!==""?{key:t,value:s}:{key:t,value:n??""}}};E();E();var mi=class e{static image="ghcr.io/renovatebot/renovate";static version="44";fullImageReference;constructor(A){let t=A.getDockerImage(),r=A.getVersion();if(t?.includes(":")){Cd("Docker image looks like it contains a version, using that as the image itself"),this.fullImageReference=t;return}t||(ds(`No Docker image specified, using ${e.image}`),t=e.image),r||(ds(`No Docker version specified, using ${e.version}`),r=e.version),this.fullImageReference=`${t}:${r}`}image(){return this.fullImageReference}};import Bg from"node:fs/promises";import lg from"node:path";var ki=class e{constructor(A){this.input=A;this.docker=new mi(A)}input;static dockerGroupRegex=/^docker:x:(?<groupId>[1-9][0-9]*):/m;configFileMountDir="/github-action";docker;async runDockerContainerForVersion(){let A=`docker run --env FORCE_COLOR=3 --rm ${this.docker.image()} --version`,{exitCode:t,stdout:r}=await Qg(A);return t!==0&&new Error(`'docker run' failed with exit code ${t}.`),r.trim()}async runDockerContainer(){await this.validateArguments();let A=this.input.toEnvironmentVariables().map(c=>`--env ${c.key}`).concat([`--env ${this.input.token.key}=${this.input.token.value} --env FORCE_COLOR=3`]),t=this.input.configurationFile();if(t!==null){let c=lg.basename(t.value),g=lg.join(this.configFileMountDir,c);A.push(`--env ${t.key}=${g}`,`--volume ${t.value}:${g}`)}if(this.input.mountDockerSocket()){let c=this.input.dockerSocketHostPath();if(!(await Bg.stat(c)).isSocket())throw new Error(`docker socket host path '${c}' MUST exist and be a socket`);A.push(`--volume ${c}:/var/run/docker.sock`,`--group-add ${await this.getDockerGroupId()}`)}let r=this.input.getDockerCmdFile(),s=null;if(r!==null){let g=`/${lg.basename(r)}`;A.push(`--volume ${r}:${g}`),s=g}let n=this.input.getDockerUser();n!==null&&A.push(`--user ${n}`);for(let c of this.input.getDockerVolumeMounts())A.push(`--volume ${c}`);let i=this.input.getDockerNetwork();i&&A.push(`--network ${i}`),A.push("--rm",this.docker.image()),s!==null&&A.push(s);let o=`docker run ${A.join(" ")}`,a=await gg(o);a!==0&&new Error(`'docker run' failed with exit code ${a}.`)}async getDockerGroupId(){let A="/etc/group",t=await Bg.readFile(A,{encoding:"utf-8"}),r=e.dockerGroupRegex.exec(t);if(r?.groups?.groupId===void 0)throw new Error(`Could not find group docker in ${A}`);return r.groups.groupId}async validateLine truncated
|
|
|
|
|
`.trim())}};_I.exports=Ic});var Xr=d((IT,AC)=>{"use strict";E();var XI=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Wk}=J(),Ok=qt();$I()===void 0&&jI(new Ok);function jI(e){if(!e||typeof e.dispatch!="function")throw new Wk("Argument agent must implement Agent");Object.defineProperty(globalThis,XI,{value:e,writable:!0,enumerable:!1,configurable:!1})}function $I(){return globalThis[XI]}AC.exports={setGlobalDispatcher:jI,getGlobalDispatcher:$I}});var Un=d((uT,eC)=>{"use strict";E();eC.exports=class{#A;constructor(A){if(typeof A!="object"||A===null)throw new TypeError("handler must be an object");this.#A=A}onConnect(...A){return this.#A.onConnect?.(...A)}onError(...A){return this.#A.onError?.(...A)}onUpgrade(...A){return this.#A.onUpgrade?.(...A)}onResponseStarted(...A){return this.#A.onResponseStarted?.(...A)}onHeaders(...A){return this.#A.onHeaders?.(...A)}onData(...A){return this.#A.onData?.(...A)}onComplete(...A){return this.#A.onComplete?.(...A)}onBodySent(...A){return this.#A.onBodySent?.(...A)}}});var rC=d((fT,tC)=>{"use strict";E();var Pk=Qn();tC.exports=e=>{let A=e?.maxRedirections;return t=>function(s,n){let{maxRedirections:i=A,...o}=s;if(!i)return t(s,n);let a=new Pk(t,i,s,n);return t(o,a)}}});var nC=d((yT,sC)=>{"use strict";E();var Zk=yn();sC.exports=e=>A=>function(r,s){return A(r,new Zk({...r,retryOptions:{...e,...r.retryOptions}},{handler:s,dispatch:A}))}});var oC=d((DT,iC)=>{"use strict";E();var zk=T(),{InvalidArgumentError:_k,RequestAbortedError:Kk}=J(),Xk=Un(),Cc=class extends Xk{#A=1024*1024;#e=null;#t=!1;#s=!1;#n=0;#r=null;#i=null;constructor({maxSize:A},t){if(super(t),A!=null&&(!Number.isFinite(A)||A<1))throw new _k("maxSize must be a number greater than 0");this.#A=A??this.#A,this.#i=t}onConnect(A){this.#e=A,this.#i.onConnect(this.#o.bind(this))}#o(A){this.#s=!0,this.#r=A}onHeaders(A,t,r,s){let i=zk.parseHeaders(t)["content-length"];if(i!=null&&i>this.#A)throw new Kk(`Response size (${i}) larger than maxSize (${this.#A})`);return this.#s?!0:this.#i.onHeaders(A,t,r,s)}onError(A){this.#t||(A=this.#r??A,this.#i.onError(A))}onData(A){return this.#n=this.#n+A.length,this.#n>=this.#A&&(this.#t=!0,this.#s?this.#i.onError(this.#r):this.#i.onComplete([])),!0}onComplete(A){if(!this.#t){if(this.#s){this.#i.onError(this.reason);return}this.#i.onComplete(A)}}};function jk({maxSize:e}={maxSize:1024*1024}){return A=>function(r,s){let{dumpMaxSize:n=e}=r,i=new Cc({maxSize:n},s);return A(r,i)}}iC.exports=jk});var gC=d((kT,cC)=>{"use strict";E();var{isIP:$k}=h("node:net"),{lookup:AR}=h("node:dns"),eR=Un(),{InvalidArgumentError:jt,InformationalError:tR}=J(),aC=Math.pow(2,31)-1,hc=class{#A=0;#e=0;#t=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(A){this.#A=A.maxTTL,this.#e=A.maxItems,this.dualStack=A.dualStack,this.affinity=A.affinity,this.lookup=A.lookup??this.#s,this.pick=A.pick??this.#n}get full(){return this.#t.size===this.#e}runLookup(A,t,r){let s=this.#t.get(A.hostname);if(s==null&&this.full){r(null,A.origin);return}let n={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...t.dns,maxTTL:this.#A,maxItems:this.#e};if(s==null)this.lookup(A,n,(i,o)=>{if(i||o==null||o.length===0){r(i??new tR("No DNS entries found"));return}this.setRecords(A,o);let a=this.#t.get(A.hostname),c=this.pick(A,a,n.affinity),g;typeof c.port=="number"?g=`:${c.port}`:A.port!==""?g=`:${A.port}`:g="",r(null,`${A.protocol}//${c.family===6?`[${c.address}]`:c.address}${g}`)});else{let i=this.pick(A,s,n.affinity);if(i==null){this.#t.delete(A.hostname),this.runLookup(A,t,r);return}let o;typeof i.port=="number"?o=`:${i.port}`:A.port!==""?o=`:${A.port}`:o="",r(null,`${A.protocol}//${i.family===6?`[${i.address}]`:i.address}${o}`)}}#s(A,t,r){AR(A.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,n)=>{if(s)return r(s);let i=new Map;for(let o of n)i.set(`${o.address}:${o.family}`,o);r(null,i.values())})}#n(A,t,r){let s=null,{records:n,offset:i}=t,o;if(this.dualStack?(r==null&&(i==null||i===aC?(t.offset=0,r=4):(t.offset++,r=(t.offset&1)===1?6:4)),n[r]!=null&&n[r].ips.length>0?o=n[r]:o=n[r===4?6:4]):o=n[r],o==null||o.ips.length===0)return s;o.offset==null||o.offset===aC?o.offset=0:o.offset++;let a=o.offset%o.ips.length;return s=o.ips[a]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(o.ips.splice(a,1),this.pick(A,t,r)):s}setRecords(A,t){let r=Date.now(),s={records:{4:null,6:null}};for(let n of t){n.timestamp=r,typeof n.ttl=="number"?n.ttl=Math.min(n.ttl,this.#A):n.ttl=this.#A;let i=s.records[n.family]??{ips:[]};i.ips.push(n),s.records[n.family]=i}this.#t.set(A.hostname,s)}getHandler(A,t){return new uc(this,A,t)}},uc=class extends eR{#A=null;#e=null;#t=null;#s=null;#n=null;constructor(A,{origin:t,handler:r,dispatch:s},n){super(r),this.#n=t,this.#s=r,this.#e={...n},this.#A=A,this.#t=s}onError(A){switch(A.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#A.dualStack){this.#A.runLookup(this.#n,this.#e,(t,r)=>{if(t)return this.#s.onError(t);let s={...thi
Line truncated
|
|
|
|
|
${a}`,this.dataLineCount++;return}if(ui(A,s,hb)){wb(A,n)&&(this.setEventFieldSize("retry",A.length-n),t.retry=A.toString("utf8",n));return}if(ui(A,s,Cb)){yb(A,n)&&(this.setEventFieldSize("id",A.length-n),t.id=A.toString("utf8",n));return}ui(A,s,Ib)&&n<A.length&&(this.setEventFieldSize("event",A.length-n),t.event=A.toString("utf8",n))}setEventFieldSize(A,t){let r=this.eventSize-this.eventFieldSizes[A]+t;if(this.maxEventSize>0&&r>this.maxEventSize)throw di();this.eventSize=r,this.eventFieldSizes[A]=t}processEvent(A){A.retry&&cb(A.retry)&&(this.state.reconnectionTime=parseInt(A.retry,10)),A.id&&gb(A.id)&&(this.state.lastEventId=A.id),A.data!==void 0&&this.push({type:A.event||"message",options:{data:A.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event.data=void 0,this.event.event=void 0,this.event.id=void 0,this.event.retry=void 0,this.eventSize=0,this.dataLineCount=0,this.eventFieldSizes.data=0,this.eventFieldSizes.event=0,this.eventFieldSizes.id=0,this.eventFieldSizes.retry=0}hasPendingEvent(){return this.event.data!==void 0||this.event.event!==void 0||this.event.id!==void 0||this.event.retry!==void 0}hasCurrentByte(){return this.chunkIndex<this.chunks.length&&this.pos<this.chunks[this.chunkIndex].length}currentByte(){return this.chunks[this.chunkIndex][this.pos]}consumeCurrentByte(){this.advanceCursor(),this.syncLineStartToCursor()}advanceCursor(){for(this.pos++;this.chunkIndex<this.chunks.length&&this.pos>=this.chunks[this.chunkIndex].length;)this.chunkIndex++,this.pos=0}syncLineStartToCursor(){this.lineChunkIndex=this.chunkIndex,this.linePos=this.pos,this.lineLength=0,this.dropConsumedChunks()}dropConsumedChunks(){if(this.lineChunkIndex>0){let A=this.lineChunkIndex;this.chunks.splice(0,A),this.lineChunkIndex=0,this.chunkIndex-=A}this.chunkIndex===this.chunks.length&&(this.chunks.length=0,this.chunkIndex=0,this.pos=0,this.lineChunkIndex=0,this.linePos=0)}readLine(){if(this.lineChunkIndex===this.chunkIndex)return this.chunks[this.chunkIndex].subarray(this.linePos,this.pos);let A=[],t=0;for(let r=this.lineChunkIndex;r<=this.chunkIndex;r++){let s=this.chunks[r],n=r===this.lineChunkIndex?this.linePos:0,i=r===this.chunkIndex?this.pos:s.length,o=s.subarray(n,i);t+=o.length,A.push(o)}return Buffer.concat(A,t)}peekBufferedByte(A){let t=this.lineChunkIndex,r=this.linePos;for(;t<this.chunks.length;){let s=this.chunks[t],n=s.length-r;if(A<n)return s[r+A];A-=n,t++,r=0}}discardLeadingBytes(A){for(;A>0&&this.lineChunkIndex<this.chunks.length;){let r=this.chunks[this.lineChunkIndex].length-this.linePos;A<r?(this.linePos+=A,A=0):(A-=r,this.lineChunkIndex++,this.linePos=0)}this.chunkIndex=this.lineChunkIndex,this.pos=this.linePos,this.dropConsumedChunks()}handleBOM(){let A=this.peekBufferedByte(0),t=this.peekBufferedByte(1),r=this.peekBufferedByte(2);return t===void 0?(A===Er[0]||(this.checkBOM=!1),!0):r===void 0?A===Er[0]&&t===Er[1]?!0:(this.checkBOM=!1,!1):(A===Er[0]&&t===Er[1]&&r===Er[2]&&this.discardLeadingBytes(3),this.checkBOM=!1,!this.hasCurrentByte())}};Hu.exports={EventSourceStream:og}});var Ku=d((Lx,_u)=>{"use strict";E();var{pipeline:pb}=h("node:stream"),{fetching:Db}=ts(),{makeRequest:mb}=er(),{webidl:fe}=gA(),{EventSourceStream:kb}=Vu(),{parseMIMEType:Rb}=hA(),{createFastMessageEvent:Fb}=or(),{isNetworkError:qu}=As(),{delay:Nb}=ig(),{kEnumerableProperty:It}=T(),{environmentSettingsObject:Wu}=DA(),{getGlobalDispatcher:Sb}=Xr(),Ou=!1,Pu=3e3,hs=0,Zu=1,us=2,bb="anonymous",Ub="use-credentials",Br=class e extends EventTarget{#A={open:null,error:null,message:null};#e=null;#t=!1;#s=hs;#n=null;#r=null;#i;#o;constructor(A,t={}){super(),fe.util.markAsUncloneable(this);let r="EventSource constructor";fe.argumentLengthCheck(arguments,1,r),Ou||(Ou=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),A=fe.converters.USVString(A,r,"url"),t=fe.converters.EventSourceInitDict(t,r,"eventSourceInitDict"),this.#i=t.dispatcher,this.#o={lastEventId:"",reconnectionTime:Pu};let s=Wu,n;try{n=new URL(A,s.settingsObject.baseUrl),this.#o.origin=n.origin}catch(a){throw new DOMException(a,"SyntaxError")}this.#e=n.href;let i=bb;t.withCredentials&&(i=Ub,this.#t=!0);let o={redirect:"follow",keepalive:!0,mode:"cors",credentials:i==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};o.client=Wu.settingsObject,o.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],o.cache="no-store",o.initiator="other",o.urlList=[new URL(this.#e)],this.#n=mb(o),this.#c()}get readyState(){return this.#s}get url(){return this.#e}get withCredentials(){return this.#t}#c(){if(this.#s===us)return;this.#s=hs;let A={request:this.#n,dispatcher:this.#i},t=r=>{qu(r)&&(this.dispatchEvent(new Event("error")),this.close()),this.#a()};A.processResponseEndOfBody=t,A.processResponse=r=>{if(qu(r))if(r.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#a();return}let s=r.headersList.get("content-type",!0),n=s!==null?Rb(s):"failure",i=n!=="
Line truncated
|
|
|
|
|
`).filter(r=>r!=="");return A&&A.trimWhitespace===!1?t:t.map(r=>r.trim())}function dd(e){process.exitCode=hg.Failure,MU(e)}function MU(e,A={}){Cr("error",Ds(A),e instanceof Error?e.toString():e)}function ws(e,A={}){Cr("warning",Ds(A),e instanceof Error?e.toString():e)}function fd(e,A={}){Cr("notice",Ds(A),e instanceof Error?e.toString():e)}function wd(e){process.stdout.write(e+hd.EOL)}function LU(e){Ui("group",e)}function TU(){Ui("endgroup")}function yd(e,A){return UU(this,void 0,void 0,function*(){LU(e);let t;try{t=yield A()}finally{TU()}return t})}E();import pd from"node:path";var Fi=class{options={envRegex:/^(?:RENOVATE_\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|NO_COLOR|(?:HTTPS?|NO)_PROXY|(?:https?|no)_proxy)$/,configurationFile:{input:"configurationFile",env:"RENOVATE_CONFIG_FILE",optional:!0},token:{input:"token",env:"RENOVATE_TOKEN",optional:!1}};token;_environmentVariables;_configurationFile;constructor(){let A=JA("env-regex"),t=A?new RegExp(A):this.options.envRegex,r=ud("additional-env-list");this._environmentVariables=new Map(Object.entries(process.env).filter(([s])=>t.test(s)||r.includes(s)).filter(s=>s[1]!==void 0));for(let s of r)this._environmentVariables.has(s)||ws(`Environment variable '${s}' listed in 'additional-env-list' was not found in the parent process environment; it will not be passed to the renovate container.`);this.token=this.get(this.options.token.input,this.options.token.env,this.options.token.optional),this._configurationFile=this.get(this.options.configurationFile.input,this.options.configurationFile.env,this.options.configurationFile.optional)}configurationFile(){return this._configurationFile.value!==""?{key:this._configurationFile.key,value:pd.resolve(this._configurationFile.value)}:null}getDockerImage(){return JA("renovate-image")||null}getVersion(){return JA("renovate-version")||null}mountDockerSocket(){return JA("mount-docker-socket")==="true"}dockerSocketHostPath(){return JA("docker-socket-host-path")||"/var/run/docker.sock"}getDockerCmdFile(){let A=JA("docker-cmd-file");return A&&A!==""?pd.resolve(A):null}getDockerUser(){return JA("docker-user")||null}getDockerVolumeMounts(){return JA("docker-volumes").split(";").map(A=>A.trim()).filter(A=>!!A)}getDockerNetwork(){return JA("docker-network")}toEnvironmentVariables(){return[...this._environmentVariables].map(([A,t])=>({key:A,value:t}))}get(A,t,r){let s=JA(A),n=this._environmentVariables.get(t);if(s===""&&n===void 0&&!r)throw new Error([`'${A}' MUST be passed using its input or the '${t}'`,"environment variable"].join(" "));return this._environmentVariables.delete(t),s!==""?{key:t,value:s}:{key:t,value:n??""}}};E();import ug from"node:fs/promises";import dg from"node:path";E();var Ni=class e{static image="ghcr.io/renovatebot/renovate";static version="45";fullImageReference;constructor(A){let t=A.getDockerImage(),r=A.getVersion();if(t?.includes(":")){wd("Docker image looks like it contains a version, using that as the image itself"),this.fullImageReference=t;return}t||(ws(`No Docker image specified, using ${e.image}`),t=e.image),r||(ws(`No Docker version specified, using ${e.version}`),r=e.version),this.fullImageReference=`${t}:${r}`}image(){return this.fullImageReference}};var Si=class e{constructor(A){this.input=A;this.docker=new Ni(A)}input;static dockerGroupRegex=/^docker:x:(?<groupId>[1-9][0-9]*):/m;static userAgentKey="RENOVATE_USER_AGENT";static defaultUserAgent="Renovate/{{renovateVersion}} (https://github.com/renovatebot/github-action)";configFileMountDir="/github-action";docker;async runDockerContainerForVersion(){let A=`docker run --env FORCE_COLOR=3 --rm ${this.docker.image()} --version`,{exitCode:t,stdout:r}=await Cg(A);if(t!==0)throw new Error(`'docker run' failed with exit code ${t}.`);return r.trim()}async runDockerContainer(){await this.validateArguments();let A=this.input.toEnvironmentVariables().map(c=>`--env ${c.key}`).concat([`--env ${this.input.token.key}=${this.input.token.value} --env FORCE_COLOR=3`]);this.input.toEnvironmentVariables().some(c=>c.key===e.userAgentKey)||A.push(`--env "${e.userAgentKey}=${e.defaultUserAgent}"`);let t=this.input.configurationFile();if(t!==null){let c=dg.basename(t.value),g=dg.join(this.configFileMountDir,c);A.push(`--env ${t.key}=${g}`,`--volume ${t.value}:${g}`)}if(this.input.mountDockerSocket()){let c=this.input.dockerSocketHostPath();if(!(await ug.stat(c)).isSocket())throw new Error(`docker socket host path '${c}' MUST exist and be a socket`);A.push(`--volume ${c}:/var/run/docker.sock`,`--group-add ${await this.getDockerGroupId()}`)}let r=this.input.getDockerCmdFile(),s=null;if(r!==null){let g=`/${dg.basename(r)}`;A.push(`--volume ${r}:${g}`),s=g}let n=this.input.getDockerUser();n!==null&&A.push(`--user ${n}`);for(let c of this.input.getDockerVolumeMounts())A.push(`--volume ${c}`);let i=this.input.getDockerNetwork();i&&A.push(`--network ${i}`),A.push("--rm",this.docker.image()),s!==null&&A.push(s);let o=`docker run ${A.join(" ")}`,a=await Ig(o);if(a!==0)throw neLine truncated
|
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
|
|
undici/lib/web/fetch/body.js:
|
|
|
|
|