|
|
|
@@ -1,50 +1,50 @@
|
|
|
|
|
var yd=Object.create;var ug=Object.defineProperty;var pd=Object.getOwnPropertyDescriptor;var Dd=Object.getOwnPropertyNames;var md=Object.getPrototypeOf,kd=Object.prototype.hasOwnProperty;var u=(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 Rd=(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 Fd=(e,A,t,r)=>{if(A&&typeof A=="object"||typeof A=="function")for(let s of Dd(A))!kd.call(e,s)&&s!==t&&ug(e,s,{get:()=>A[s],enumerable:!(r=pd(A,s))||r.enumerable});return e};var dg=(e,A,t)=>(t=e!=null?yd(md(e)):{},Fd(A||!e||!e.__esModule?ug(t,"default",{value:e,enumerable:!0}):t,e));import{createRequire as Nd}from"node:module";import Sd from"node:path";import bd from"node:url";var E=Rd(()=>{"use strict";globalThis.require=Nd(import.meta.url);globalThis.__filename=bd.fileURLToPath(import.meta.url);globalThis.__dirname=Sd.dirname(__filename)});var mg=d(dt=>{"use strict";E();var HU=u("net"),Td=u("tls"),bi=u("http"),yg=u("https"),xd=u("events"),VU=u("assert"),Yd=u("util");dt.httpOverHttp=Gd;dt.httpsOverHttp=Jd;dt.httpOverHttps=vd;dt.httpsOverHttps=Hd;function Gd(e){var A=new ce(e);return A.request=bi.request,A}function Jd(e){var A=new ce(e);return A.request=bi.request,A.createSocket=pg,A.defaultPort=443,A}function vd(e){var A=new ce(e);return A.request=yg.request,A}function Hd(e){var A=new ce(e);return A.request=yg.request,A.createSocket=pg,A.defaultPort=443,A}function ce(e){var A=this;A.options=e||{},A.proxyOptions=A.options.proxy||{},A.maxSockets=A.options.maxSockets||bi.Agent.defaultMaxSockets,A.requests=[],A.sockets=[],A.on("free",function(r,s,n,i){for(var o=Dg(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)})}Yd.inherits(ce,xd.EventEmitter);ce.prototype.addRequest=function(A,t,r,s){var n=this,i=Ui({request:A},n.options,Dg(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=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")),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 pg(e,A){var t=this;ce.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=Td.connect(0,n);t.sockets[t.sockets.indexOf(r)]=i,A(i)})}function Dg(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 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 Rg=d((OU,kg)=>{"use strict";E();kg.exports=mg()});var X=d((ZU,Fg)=>{"use strict";E();Fg.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((zU,$g)=>{"use strict";E();var Ng=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[Ng]===!0}[Ng]=!0},Sg=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),Mi=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[Sg]===!0}[Sg]=!0},bg=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),Li=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[bg]===!0}[bg]=!0},Ug=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),Ti=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[Ug]===!0}[Ug]=!0},Mg=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),xi=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[Mg]===!0}[Mg]=!0},Lg=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),Yi=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 sy(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(Vw.has(i)){s=i;break}}s!==""&&(e.referrerPolicy=s)}function ny(){return"allowed"}function iy(){return"success"}function oy(){return"success"}function ay(e){let A=null;A=e.mode,e.headersList.set("sec-fetch-mode",A,!0)}function cy(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&&No(e.origin)&&!No(kr(e))&&(A=null);break;case"same-origin":Vs(e,kr(e))||(A=null);break;default:}e.headersList.append("origin",A,!0)}}}function Nt(e,A){return e}function gy(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 Qy(e){return Nt(Zw.now(),e)}function Ey(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 BE(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function By(e){return{referrerPolicy:e.referrerPolicy}}function ly(e){let A=e.referrerPolicy;We(A);let t=null;if(e.referrer==="client"){let o=oE();if(!o||o.origin==="null")return"no-referrer";t=new URL(o)}else e.referrer instanceof URL&&(t=e.referrer);let r=Fo(t),s=Fo(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??Fo(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 Fo(e,A){return We(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 Iy(e,A){if(Hs===void 0)return!0;let t=lE(A);if(t==="no metadata"||t.length===0)return!0;let r=hy(t),s=uy(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)),dy(a,o))return!0}return!1}var Cy=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function lE(e){let A=[],t=!0;for(let r of e.split(" ")){t=!1;let s=Cy.exec(r);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let n=s.groups.algo.toLowerCase();cE.includes(n)&&A.push(s.groups)}return t===!0?"no metadata":A}function hy(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 uy(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 dy(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 fy(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 wy(){let e,A;return{promise:new Promise((r,s)=>{e=r,A=s}),resolve:e,reject:A}}function yy(e){return e.controller.state==="aborted"}function py(e){return e.controller.state==="aborted"||e.controller.state==="terminated"}function Dy(e){return Kw[e.toLowerCase()]??e}function my(e){let A=JSON.stringify(e);if(A===void 0)throw new TypeError("Value is not JSON serializable");return We(typeof A=="string"),A}var ky=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function IE(e,A,t=0,r=1){class s{#A;#e;#t;constructor(i,o){this.#A=i,
Line truncated
|
|
|
|
|
`);function tp(e){for(let A=0;A<e.length;++A)if((e.charCodeAt(A)&-128)!==0)return!1;return!0}function rp(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 sp(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,Ap,n)||n.position===e.length-4&&Os(e,ep,n))return s;if(e[n.position]!==13||e[n.position+1]!==10)return"failure";n.position+=2;let o=np(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",tp(g)||(g=""),C=new jy([B],c,{type:g})):C=Zy(Buffer.from(B)),Ws(RE(a)),Ws(typeof C=="string"&&RE(C)||zy(C)),s.push(Ky(a,C,c))}}function np(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=xo(i,!0,!0,o=>o===9||o===32),!_y.test(i.toString())||e[A.position]!==58)return"failure";switch(A.position++,bt(o=>o===32||o===9,e,A),Py(i)){case"content-disposition":{if(t=r=null,!Os(e,$y,A)||(A.position+=17,t=SE(e,A),t===null))return"failure";if(Os(e,NE,A)){let o=A.position+NE.length;if(e[o]===42&&(A.position+=1,o+=1),e[o]!==61||e[o+1]!==34||(A.position+=12,r=SE(e,A),r===null))return"failure"}break}case"content-type":{let o=bt(a=>a!==10&&a!==13,e,A);o=xo(o,!1,!0,a=>a===9||a===32),s=FE(o);break}case"content-transfer-encoding":{let o=bt(a=>a!==10&&a!==13,e,A);o=xo(o,!1,!0,a=>a===9||a===32),n=FE(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 SE(e,A){Ws(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 xo(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}bE.exports={multipartFormDataParser:sp,validateBoundary:rp}});var Lt=d((qM,VE)=>{"use strict";E();var Nr=T(),{ReadableStreamFrom:ip,isBlobLike:ME,isReadableStreamLike:op,readableStreamClose:ap,createDeferredPromise:cp,fullyReadBody:gp,extractMimeType:Qp,utf8DecodeBytes:xE}=DA(),{FormData:LE}=Fr(),{kState:Mt}=pe(),{webidl:Ep}=gA(),{Blob:Bp}=u("node:buffer"),Yo=u("node:assert"),{isErrored:YE,isDisturbed:lp}=u("node:stream"),{isArrayBuffer:Ip}=u("node:util/types"),{serializeAMimeType:Cp}=hA(),{multipartFormDataParser:hp}=UE(),Go;try{let e=u("node:crypto");Go=A=>e.randomInt(0,A)}catch{Go=e=>Math.floor(Math.random(e))}var Ps=new TextEncoder;function up(){}var GE=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,JE;GE&&(JE=new FinalizationRegistry(e=>{let A=e.deref();A&&!A.locked&&!lp(A)&&!YE(A)&&A.cancel("Response object has been garbage collected").catch(up)}));function vE(e,A=!1){let t=null;e instanceof ReadableStream?t=e:ME(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(()=>ap(a))},start(){},type:"bytes"}),Yo(op(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(Ip(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${`${Go(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 h=Ps.encode(`--${a}--\r
|
|
|
|
|
`);B.push(h),n+=h.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(ME(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:ip(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(!YE(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 dp(e,A=!1){return e instanceof ReadableStream&&(Yo(!Nr.isDisturbed(e),"The body has already been consumed."),Yo(!e.locked,"The stream is locked.")),vE(e,A)}function fp(e,A){let[t,r]=A.stream.tee();return A.stream=t,{stream:r,length:A.length,source:A.source}}function wp(e){if(e.aborted)throw new DOMException("The operation was aborted.","AbortError")}function yp(e){return{blob(){return Ut(this,t=>{let r=TE(this);return r===null?r="":r&&(r=Cp(r)),new Bp([t],{type:r})},e)},arrayBuffer(){return Ut(this,t=>new Uint8Array(t).buffer,e)},text(){return Ut(this,xE,e)},json(){return Ut(this,Dp,e)},formData(){return Ut(this,t=>{let r=TE(this);if(r!==null)switch(r.essence){case"multipart/form-data":{let s=hp(t,r);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let n=new LE;return n[Mt]=s,n}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(t.toString()),n=new LE;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 pp(e){Object.assign(e.prototype,yp(e))}async function Ut(e,A,t){if(Ep.brandCheck(e,t),HE(e))throw new TypeError("Body is unusable: Body has already been read");wp(e[Mt]);let r=cp(),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 gp(e[Mt].body,n,s),r.promise)}function HE(e){let A=e[Mt].body;return A!=null&&(A.stream.locked||Nr.isDisturbed(A.stream))}function Dp(e){return JSON.parse(xE(e))}function TE(e){let A=e[Mt].headersList,t=Qp(A);return t==="failure"?null:t}VE.exports={extractBody:vE,safelyExtractBody:dp,cloneBody:fp,mixinBody:pp,streamRegistry:JE,hasFinalizationRegistry:GE,bodyUnusable:HE}});var sB=d((OM,rB)=>{"use strict";E();var N=u("node:assert"),k=T(),{channels:qE}=wt(),Jo=fo(),{RequestContentLengthMismatchError:Oe,ResponseContentLengthMismatchError:WE,RequestAbortedError:jE,InvalidArgumentError:mp,HeadersTimeoutError:kp,HeadersOverflowError:Rp,SocketError:Tt,InformationalError:Pe,BodyTimeoutError:Fp,HTTPParserError:Np,ResponseExceededMaxSizeError:Sp}=J(),{kUrl:$E,kReset:uA,kClient:Ks,kParser:z,kBlocking:Ur,kRunning:rA,kPending:AB,kSize:OE,kWriting:De,kQueue:HA,kNoRef:Sr,kKeepAliveDefaultTimeout:bp,kHostHeader:Up,kPendingIdx:Mp,kRunningIdx:TA,kError:lA,kPipelining:Xs,kSocket:Ze,kKeepAliveTimeoutValue:$s,kMaxHeadersSize:vo,kKeepAliveMaxTimeout:Lp,kKeepAliveTimeoutThreshold:Tp,kHeadersTimeout:xp,kBodyTimeout:Yp,kStrictContentLength:qo,kMaxRequests:PE,kCounter:Gp,kMaxResponseSize:Jp,kOnError:ZE,kResume:le,kHTTPContext:eB}=X(),mA=JQ(),_E=Buffer.alloc(0),Zs=Buffer[Symbol.species],_s=k.addListener,vp=k.removeAllListeners,_e=Symbol("kIdleSocketValidation"),xt=Symbol("kIdleSocketValidationTimeout"),Zo=Symbol("kSocketUsed"),Ho;async function Hp(){let e=process.env.JEST_WORKER_ID?po():void 0,A;try{A=await WebAssembly.compile(VQ())}catch{A=await WebAssembly.compile(e||po())}return await WebAssembly.instantiate(A,{env:{wasm_on_url:(t,r,s)=>0,wasm_on_status:(t,r,s)=>{N(AA.ptr===t);let n=r-$A+jA.byteOffset;return AA.onStatus(new Zs(jA.buffer,n,s))||0},wasm_on_message_begin:t=>(N(AA.ptr===t),AA.onMessageBegin()||0),wasm_on_header_field:(t,r,s)=>{N(AA.ptr===t);let n=r-$A+jA.byteOffset;return AA.onHeaderField(new Zs(jA.buffer,n,s))||0},wasm_on_header_value:(t,r,s)=>{N(AA.ptr===t);let n=r-$A+jA.byteOffset;return AA.onHeaderValue(new Zs(jA.buffer,n,s))||0},wasm_on_headers_complete:(t,r,s,n)=>(N(AA.ptr===t),AA.onHeadersComplete(r,!!s,!!n)||0),wasm_on_body:(t,r,s)=>{N(AA.ptr===t);let n=r-$A+jA.byteOffset;return AA.onBody(new Zs(jA.buffer,n,s))||0},wasm_on_message_complete:t=>(N(AA.ptr===t),AA.onMessageComplete()||0)}})}var Vo=null,Wo=Hp();Wo.catch();var AA=null,jA=null,zs=0,$A=null,Vp=0,br=1,Yt=2|br,js=4|br,Oo=8|Vp,Po=class{constructor(A,t,{exports:r}){N(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"?h+=`host: ${s}\r
|
|
|
|
|
`:h+=e[Up],n?h+=`connection: upgrade\r
|
|
|
|
|
`);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[Tp],n?u+=`connection: upgrade\r
|
|
|
|
|
upgrade: ${n}\r
|
|
|
|
|
`:e[Xs]&&!C[uA]?h+=`connection: keep-alive\r
|
|
|
|
|
`:h+=`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 F=0;F<p.length;F++)h+=`${l}: ${p[F]}\r
|
|
|
|
|
`;else h+=`${l}: ${p}\r
|
|
|
|
|
`}return qE.sendHeaders.hasSubscribers&&qE.sendHeaders.publish({request:A,headers:h,socket:C}),!a||B===0?KE(I,null,e,A,C,g,h,Q):k.isBuffer(a)?KE(I,a,e,A,C,g,h,Q):k.isBlobLike(a)?typeof a.stream=="function"?XE(I,a.stream(),e,A,C,g,h,Q):zp(I,a,e,A,C,g,h,Q):k.isStream(a)?_p(I,a,e,A,C,g,h,Q):k.isIterable(a)?XE(I,a,e,A,C,g,h,Q):N(!1),!0}function _p(e,A,t,r,s,n,i,o){N(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(h){k.destroy(this,h)}},Q=function(){a||A.resume&&A.resume()},B=function(){if(queueMicrotask(()=>{A.removeListener("error",C)}),!a){let I=new jE;queueMicrotask(()=>C(I))}},C=function(I){if(!a){if(a=!0,N(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(h){I=h}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 KE(e,A,t,r,s,n,i,o){try{A?k.isBuffer(A)&&(N(n===A.byteLength,"buffer body must have content length"),s.cork(),s.write(`${i}content-length: ${n}\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 F=0;F<p.length;F++)u+=`${l}: ${p[F]}\r
|
|
|
|
|
`;else u+=`${l}: ${p}\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[uA]=!0)):n===0?s.write(`${i}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):(N(n===null,"no body must not have content length"),s.write(`${i}\r
|
|
|
|
|
`,"latin1")),r.onRequestSent(),t[le]()}catch(a){e(a)}}async function zp(e,A,t,r,s,n,i,o){N(n===A.size,"blob body must have content length");try{if(n!=null&&n!==A.size)throw new Oe;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[uA]=!0),t[le]()}catch(a){e(a)}}async function XE(e,A,t,r,s,n,i,o){N(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)=>{N(a===null),s[lA]?C(s[lA]):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[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 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[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[qo])throw new Oe;process.emitWarning(new Oe)}t.cork(),i===0&&(!o&&r.reset!==!1&&(t[uA]=!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[De]=!1,A[lA])throw A[lA];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[qo])throw new Oe;process.emitWarning(new Oe)}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[De]=!1,A&&(N(r[rA]<=1,"pipeline should only contain this request"),s(A))}};rB.exports=qp});var EB=d((ZM,QB)=>{"use strict";E();var xA=u("node:assert"),{errorMonitor:_o}=u("node:events"),{pipeline:Kp}=u("node:stream"),x=T(),{RequestContentLengthMismatchError:Ko,RequestAbortedError:zo,SocketError:Mr,InformationalError:en}=J(),{kUrl:tn,kReset:sn,kClient:Gt,kRunning:nn,kPending:Xp,kQueue:ze,kPendingIdx:jo,kRunningIdx:Ae,kError:qA,kSocket:oA,kStrictContentLength:jp,kOnError:$o,kMaxConcurrentStreams:cB,kHTTP2Session:VA,kResume:ke,kSize:$p,kHTTPContext:AD}=X(),me=Symbol("open streams"),nB,iB=!1,rn;try{rn=u("node:http2")}catch{rn={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:eD,HTTP2_HEADER_METHOD:tD,HTTP2_HEADER_PATH:rD,HTTP2_HEADER_SCHEME:sD,HTTP2_HEADER_CONTENT_LENGTH:nD,HTTP2_HEADER_EXPECT:iD,HTTP2_HEADER_STATUS:Xo}}=rn;function gB(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 oD(e){let{[Xo]:A,...t}=e;return gB(t)}async function aD(e,A){e[oA]=A,iB||(iB=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let t=rn.connect(e[tn],{createConnection:()=>A,peerMaxConcurrentStreams:e[cB]});t[me]=0,t[Gt]=e,t[oA]=A,x.addListener(t,"error",gD),x.addListener(t,"frameError",QD),x.addListener(t,"end",ED),x.addListener(t,"goaway",BD),x.addListener(t,"close",function(){let{[Gt]:s}=this,{[oA]:n}=s,i=this[oA][qA]||this[qA]||new Mr("closed",x.getSocketInfo(n));if(s[VA]=null,s.destroyed){xA(s[Xp]===0);let o=s[ze].splice(s[Ae]);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){xA(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[qA]=s,this[Gt][$o](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[qA]||new Mr("closed",x.getSocketInfo(this));e[oA]=null,this[VA]!=null&&this[VA].destroy(s),e[jo]=e[Ae],xA(e[nn]===0),e.emit("disconnect",e[tn],[e],s),e[ke]()});let r=!1;return A.on("close",()=>{r=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return ID(e,...s)},resume(){cD(e)},destroy(s,n){r?queueMicrotask(n):A.destroy(s).on("close",n)},get destroyed(){return A.destroyed},busy(){return!1}}}function cD(e){let A=e[oA];A?.destroyed===!1&&(e[$p]===0&&e[cB]===0?(A.unref(),e[VA].unref()):(A.ref(),e[VA].ref()))}function gD(e){xA(e.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[oA][qA]=e,this[Gt][$o](e)}function QD(e,A,t){if(t===0){let r=new en(`HTTP/2: "frameError" received - type ${e}, code ${A}`);this[oA][qA]=r,this[Gt][$o](r)}}function ED(){let e=new Mr("other side closed",x.getSocketInfo(this[oA]));this.destroy(e),x.destroy(this[oA],e)}function BD(e){let A=this[qA]||new Mr(`HTTP/2: "GOAWAY" frame received with code ${e}`,x.getSocketInfo(this)),t=this[Gt];if(t[oA]=null,t[AD]=null,this[VA]!=null&&(this[VA].destroy(A),this[VA]=null),x.destroy(this[oA],A),t[Ae]<t[ze].length){let r=t[ze][t[Ae]];t[ze][t[Ae]++]=null,x.errorRequest(t,r,A),t[jo]=t[Ae]}xA(t[nn]===0),t.emit("disconnect",t[tn],[t],A),t[ke]()}function lD(e){return e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS"&&e!=="TRACE"&&e!=="CONNECT"}function ID(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 D=0;D<c.length;D+=2){let v=c[D+0],Z=c[D+1];if(Array.isArray(Z))for(let _=0;_<Z.length;_++)Q[v]?Q[v]+=`,${Z[_]}`:Q[v]=Z[_];else Q[v]=Z}let B,{hostname:C,port:I}=e[tn];Q[eD]=n||`${C}${I?`:${I}`:""}`,Q[tD]=r;let h=D=>{if(!A.aborted){if(A.completed){r==="CONNECT"&&B!=null&&x.destroy(B,D||new zo);return}D=D||new zo,x.errorRequest(e,A,D),B!=null&&x.destroy(B,D),x.destroy(g,D),e[ze][e[Ae]++]=null,e[ke]()}};try{A.onConnect(h)}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(_o,Z),A.onUpgradeResponse(Number(aA[Xo]),aA,oD)},Z=aA=>{D=!0,B.off("response",v),A.onUpgradeError(aA)},_=()=>{try{A.onUpgrade(null,null,B)}catch(aA){B.off("response",v),h(aA);return}A.aborted||(B.off("error",h),B.once(_o,Z),e[ze][e[Ae]++]=null)};return B.once("response",v),B.once("error",h),++t[me],_(),B.once("close",()=>{!D&&A.completed&&(B.off("response",v),B.off(_o,Z),A.onUpgradeError(new en(`HTTP/2: "stream error" received - code ${B.rstCode}`))),t[me]-=1,t[me]===0&&t.unref()}),!0}Q[rD]=s,Q[sD]="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)){nB??=Lt().extractBody;let[D,v]=nB(g);Q["content-type"]=v,g=D.stream,l=D.length}if(l==null&&(l
Line truncated
|
|
|
|
|
`,this[HD]=a??3e5,this[vD]=s??3e5,this[VD]=p??!0,this[qD]=D,this[ra]=Z,this[Fe]=null,this[_D]=aA>-1?aA:-1,this[KD]=we??100,this[tA]=null,this[WA]=[],this[Ce]=0,this[OA]=0,this[Yr]=ut=>na(this,ut),this[zD]=ut=>DB(this,ut)}get pipelining(){return this[gn]}set pipelining(A){this[gn]=A,this[Yr](!0)}get[vr](){return this[WA].length-this[OA]}get[Jr](){return this[OA]-this[Ce]}get[Gr](){return this[WA].length-this[Ce]}get[MD](){return!!this[tA]&&!this[vt]&&!this[tA].destroyed}get[ta](){return!!(this[tA]?.busy(null)||this[Gr]>=(pB(this)||1)||this[vr]>0)}[UD](A){mB(this),this.once("connect",A)}[ZD](A,t){let r=A.origin||this[te].origin,s=new kD(r,A,t);return this[WA].push(s),this[Xe]||(Ke.bodyLength(s.body)==null&&Ke.isIterable(s.body)?(this[Xe]=1,queueMicrotask(()=>na(this))):this[Yr](!0)),this[Xe]&&this[Ne]!==2&&this[ta]&&(this[Ne]=2),this[Ne]<2}async[OD](){return new Promise(A=>{this[Gr]?this[Fe]=A:A(null)})}async[PD](A){return new Promise(t=>{let r=this[WA].splice(this[OA]);for(let n=0;n<r.length;n++){let i=r[n];Ke.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]()})}},$D=cn();function DB(e,A){if(e[Jr]===0&&A.code!=="UND_ERR_INFO"&&A.code!=="UND_ERR_SOCKET"){Ie(e[OA]===e[Ce]);let t=e[WA].splice(e[Ce]);for(let r=0;r<t.length;r++){let s=t[r];Ke.errorRequest(e,s,A)}Ie(e[Gr]===0)}}async function mB(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(yB.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){Ke.destroy(n.on("error",fB),new ND);return}Ie(n);try{e[tA]=n.alpnProtocol==="h2"?await jD(e,n):await XD(e,n)}catch(i){throw n.destroy().on("error",fB),i}e[vt]=!1,n[WD]=0,n[ra]=e[ra],n[bD]=e,n[TD]=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[WA][e[OA]].servername===e[Re];){let i=e[WA][e[OA]++];Ke.errorRequest(e,i,n)}else DB(e,n);e.emit("connectionError",e[te],[e],n)}e[Yr]()}function wB(e){e[Ne]=0,e.emit("drain",e[te],[e])}function na(e,A){e[Xe]!==2&&(e[Xe]=2,A0(e,A),e[Xe]=0,e[Ce]>256&&(e[WA].splice(0,e[Ce]),e[OA]-=e[Ce],e[Ce]=0))}function A0(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[ta])e[Ne]=2;else if(e[Ne]===2){A?(e[Ne]=1,queueMicrotask(()=>wB(e))):wB(e);continue}if(e[vr]===0||e[Jr]>=(pB(e)||1))return;let t=e[WA][e[OA]];if(e[te].protocol==="https:"&&e[Re]!==t.servername){if(e[Jr]>0)return;e[Re]=t.servername,e[tA]?.destroy(new FD("servername changed"),()=>{e[tA]=null,na(e)})}if(e[vt])return;if(!e[tA]){mB(e);return}if(e[tA].destroyed||e[tA].busy(t))return;!t.aborted&&e[tA].write(t)?e[OA]++:e[WA].splice(e[OA],1)}}kB.exports=sa});var ia=d((tL,RB)=>{"use strict";E();var Qn=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)}};RB.exports=class{constructor(){this.head=this.tail=new Qn}isEmpty(){return this.head.isEmpty()}push(A){this.head.isFull()&&(this.head=this.head.next=new Qn),this.head.push(A)}shift(){let A=this.tail,t=A.shift();return A.isEmpty()&&A.next!==null&&(this.tail=A.next),t}}});var NB=d((sL,FB)=>{"use strict";E();var{kFree:e0,kConnected:t0,kPending:r0,kQueued:s0,kRunning:n0,kSize:i0}=X(),je=Symbol("pool"),oa=class{constructor(A){this[je]=A}get connected(){return this[je][t0]}get free(){return this[je][e0]}get pending(){return this[je][r0]}get queued(){return this[je][s0]}get running(){return this[je][n0]}get size(){return this[je][i0]}};FB.exports=oa});var Ba=d((iL,JB)=>{"use strict";E();var o0=mt(),a0=ia(),{kConnected:aa,kSize:SB,kRunning:bB,kPending:UB,kQueued:Hr,kBusy:c0,kFree:g0,kUrl:Q0,kClose:E0,kDestroy:B0,kDispatch:l0}=X(),I0=NB(),dA=Symbol("clients"),IA=Symbol("needDrain"),Vr=Symbol("queue"),ca=Symbol("closed resolve"),ga=Symbol("onDrain"),MB=Symbol("onConnect"),LB=Symbol("onDisconnect"),TB=Symbol("onConnectionError"),Qa=Symbol("get dispatcher"),YB=Sy
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())}};PI.exports=Bc});var Nn=d((iT,XI)=>{"use strict";E();var _I=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:Hk}=J(),Vk=qt();KI()===void 0&&zI(new Vk);function zI(e){if(!e||typeof e.dispatch!="function")throw new Hk("Argument agent must implement Agent");Object.defineProperty(globalThis,_I,{value:e,writable:!0,enumerable:!1,configurable:!1})}function KI(){return globalThis[_I]}XI.exports={setGlobalDispatcher:zI,getGlobalDispatcher:KI}});var Sn=d((cT,jI)=>{"use strict";E();jI.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 AC=d((QT,$I)=>{"use strict";E();var qk=an();$I.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 qk(t,i,s,n);return t(o,a)}}});var tC=d((BT,eC)=>{"use strict";E();var Wk=dn();eC.exports=e=>A=>function(r,s){return A(r,new Wk({...r,retryOptions:{...e,...r.retryOptions}},{handler:s,dispatch:A}))}});var sC=d((IT,rC)=>{"use strict";E();var Ok=T(),{InvalidArgumentError:Pk,RequestAbortedError:Zk}=J(),_k=Sn(),lc=class extends _k{#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 Pk("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=Ok.parseHeaders(t)["content-length"];if(i!=null&&i>this.#A)throw new Zk(`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 lc({maxSize:n},s);return A(r,i)}}rC.exports=zk});var oC=d((hT,iC)=>{"use strict";E();var{isIP:Kk}=u("node:net"),{lookup:Xk}=u("node:dns"),jk=Sn(),{InvalidArgumentError:jt,InformationalError:$k}=J(),nC=Math.pow(2,31)-1,Ic=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 $k("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){Xk(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===nC?(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===nC?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 Cc(this,A,t)}},Cc=class extends jk{#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(Ci(A,s,Eb)){Bb(A,n)&&(t.retry=A.toString("utf8",n));return}if(Ci(A,s,Qb)){lb(A,n)&&(t.id=A.toString("utf8",n));return}if(Ci(A,s,gb)){let i=A.toString("utf8",n);i.length>0&&(t.event=i)}}processEvent(A){A.retry&&nb(A.retry)&&(this.state.reconnectionTime=parseInt(A.retry,10)),A.id&&ib(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())}};Ju.exports={EventSourceStream:ng}});var _u=d((mx,Zu)=>{"use strict";E();var{pipeline:Ib}=u("node:stream"),{fetching:Cb}=es(),{makeRequest:hb}=er(),{webidl:fe}=gA(),{EventSourceStream:ub}=vu(),{parseMIMEType:db}=hA(),{createFastMessageEvent:fb}=or(),{isNetworkError:Hu}=$r(),{delay:wb}=rg(),{kEnumerableProperty:lt}=T(),{environmentSettingsObject:Vu}=DA(),qu=!1,Wu=3e3,Is=0,Ou=1,Cs=2,yb="anonymous",pb="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(),fe.util.markAsUncloneable(this);let r="EventSource constructor";fe.argumentLengthCheck(arguments,1,r),qu||(qu=!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:Wu};let s=Vu,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=yb;t.withCredentials&&(i=pb,this.#t=!0);let o={redirect:"follow",keepalive:!0,mode:"cors",credentials:i==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};o.client=Vu.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=hb(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=>{Hu(r)&&(this.dispatchEvent(new Event("error")),this.close()),this.#a()};A.processResponseEndOfBody=t,A.processResponse=r=>{if(Hu(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?db(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=Ou,this.dispatchEvent(new Event("open")),this.#o.origin=r.urlList[r.urlList.length-1].origin;let o=new ub({eventSourceSettings:this.#o,push:a=>{this.dispatchEvent(fb(a.type,a.options))}});Ib(r.body.stream,o,a=>{a?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#r=Cb(A)}async#a(){this.#n!==Cs&&(this.#n=Is,this.dispatchEvent(new Event("error")),await wb(this.#o.rec
Line truncated
|
|
|
|
|
`).filter(r=>r!=="");return A&&A.trimWhitespace===!1?t:t.map(r=>r.trim())}function hd(e){process.exitCode=Ig.Failure,DU(e)}function DU(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 ud(e,A={}){Cr("notice",ws(A),e instanceof Error?e.toString():e)}function dd(e){process.stdout.write(e+Id.EOL)}function mU(e){Si("group",e)}function kU(){Si("endgroup")}function fd(e,A){return pU(this,void 0,void 0,function*(){mU(e);let t;try{t=yield A()}finally{kU()}return t})}E();import wd from"node:path";var mi=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=vA("env-regex"),t=A?new RegExp(A):this.options.envRegex,r=Cd("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:wd.resolve(this._configurationFile.value)}:null}getDockerImage(){return vA("renovate-image")||null}getVersion(){return vA("renovate-version")||null}mountDockerSocket(){return vA("mount-docker-socket")==="true"}dockerSocketHostPath(){return vA("docker-socket-host-path")||"/var/run/docker.sock"}getDockerCmdFile(){let A=vA("docker-cmd-file");return A&&A!==""?wd.resolve(A):null}getDockerUser(){return vA("docker-user")||null}getDockerVolumeMounts(){return vA("docker-volumes").split(";").map(A=>A.trim()).filter(A=>!!A)}getDockerNetwork(){return vA("docker-network")}toEnvironmentVariables(){return[...this._environmentVariables].map(([A,t])=>({key:A,value:t}))}get(A,t,r){let s=vA(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 ki=class e{static image="ghcr.io/renovatebot/renovate";static version="44";fullImageReference;constructor(A){let t=A.getDockerImage(),r=A.getVersion();if(t?.includes(":")){dd("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 Cg from"node:fs/promises";import hg from"node:path";var Ri=class e{constructor(A){this.input=A;this.docker=new ki(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 lg(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=hg.basename(t.value),g=hg.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 Cg.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=`/${hg.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 Bg(o);a!==0&&new Error(`'docker run' failed with exit code ${a}.`)}async getDockerGroupId(){let A="/etc/group",t=await Cg.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:
|
|
|
|
|