From 9a8e5498fbf318a3e5803987f680406dfa2f61e4 Mon Sep 17 00:00:00 2001 From: Josh Willox Date: Mon, 11 Dec 2023 16:55:43 +1100 Subject: [PATCH] fix: improve cache logging --- dist/index.js | 10 +++++----- src/install.ts | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dist/index.js b/dist/index.js index 584f9e5..977ee74 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8,14 +8,14 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } var ui__default = /*#__PURE__*/_interopDefault(ui); var Ra__default = /*#__PURE__*/_interopDefault(Ra); -var Hn=Object.create;var Me=Object.defineProperty;var zn=Object.getOwnPropertyDescriptor;var Jn=Object.getOwnPropertyNames;var Kn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty;var _=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var U=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zn=(e,t)=>{for(var r in t)Me(e,r,{get:t[r],enumerable:!0});},rr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Jn(t))!Yn.call(e,i)&&i!==r&&Me(e,i,{get:()=>t[i],enumerable:!(n=zn(t,i))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?Hn(Kn(e)):{},rr(t||!e||!e.__esModule?Me(r,"default",{value:e,enumerable:!0}):r,e)),Qn=e=>rr(Me({},"__esModule",{value:!0}),e);var Fe=b(we=>{Object.defineProperty(we,"__esModule",{value:!0});we.toCommandProperties=we.toCommandValue=void 0;function ei(e){return e==null?"":typeof e=="string"||e instanceof String?e:JSON.stringify(e)}we.toCommandValue=ei;function ti(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}we.toCommandProperties=ti;});var or=b(W=>{var ri=W&&W.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),ni=W&&W.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),ii=W&&W.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&ri(t,e,r);return ni(t,e),t};Object.defineProperty(W,"__esModule",{value:!0});W.issue=W.issueCommand=void 0;var si=ii(_("os")),ir=Fe();function sr(e,t,r){let n=new at(e,t,r);process.stdout.write(n.toString()+si.EOL);}W.issueCommand=sr;function oi(e,t=""){sr(e,{},t);}W.issue=oi;var nr="::",at=class{constructor(t,r,n){t||(t="missing.command"),this.command=t,this.properties=r,this.message=n;}toString(){let t=nr+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:t+=",",t+=`${n}=${ci(i)}`);}}return t+=`${nr}${ai(this.message)}`,t}};function ai(e){return ir.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function ci(e){return ir.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});function xe(){return Be>Ge.length-16&&(ui__default.default.randomFillSync(Ge),Be=0),Ge.slice(Be,Be+=16)}var Ge,Be,ct=U(()=>{Ge=new Uint8Array(256),Be=Ge.length;});var ar,cr=U(()=>{ar=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function li(e){return typeof e=="string"&&ar.test(e)}var ae,Pe=U(()=>{cr();ae=li;});function fi(e,t=0){let r=(L[e[t+0]]+L[e[t+1]]+L[e[t+2]]+L[e[t+3]]+"-"+L[e[t+4]]+L[e[t+5]]+"-"+L[e[t+6]]+L[e[t+7]]+"-"+L[e[t+8]]+L[e[t+9]]+"-"+L[e[t+10]]+L[e[t+11]]+L[e[t+12]]+L[e[t+13]]+L[e[t+14]]+L[e[t+15]]).toLowerCase();if(!ae(r))throw TypeError("Stringified UUID is invalid");return r}var L,ce,Ne=U(()=>{Pe();L=[];for(let e=0;e<256;++e)L.push((e+256).toString(16).substr(1));ce=fi;});function di(e,t,r){let n=t&&r||0,i=t||new Array(16);e=e||{};let s=e.node||ur,o=e.clockseq!==void 0?e.clockseq:ut;if(s==null||o==null){let E=e.random||(e.rng||xe)();s==null&&(s=ur=[E[0]|1,E[1],E[2],E[3],E[4],E[5]]),o==null&&(o=ut=(E[6]<<8|E[7])&16383);}let c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:ft+1,l=c-lt+(u-ft)/1e4;if(l<0&&e.clockseq===void 0&&(o=o+1&16383),(l<0||c>lt)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");lt=c,ft=u,ut=o,c+=122192928e5;let a=((c&268435455)*1e4+u)%4294967296;i[n++]=a>>>24&255,i[n++]=a>>>16&255,i[n++]=a>>>8&255,i[n++]=a&255;let h=c/4294967296*1e4&268435455;i[n++]=h>>>8&255,i[n++]=h&255,i[n++]=h>>>24&15|16,i[n++]=h>>>16&255,i[n++]=o>>>8|128,i[n++]=o&255;for(let E=0;E<6;++E)i[n+E]=s[E];return t||ce(i)}var ur,ut,lt,ft,lr,fr=U(()=>{ct();Ne();lt=0,ft=0;lr=di;});function hi(e){if(!ae(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var Ve,dt=U(()=>{Pe();Ve=hi;});function pi(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r{Ne();dt();mi="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ei="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function gi(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),ui__default.default.createHash("md5").update(e).digest()}var dr,hr=U(()=>{dr=gi;});var wi,pr,mr=U(()=>{ht();hr();wi=ke("v3",48,dr),pr=wi;});function yi(e,t,r){e=e||{};let n=e.random||(e.rng||xe)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return ce(n)}var Er,vr=U(()=>{ct();Ne();Er=yi;});function Oi(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),ui__default.default.createHash("sha1").update(e).digest()}var gr,wr=U(()=>{gr=Oi;});var Ri,yr,_r=U(()=>{ht();wr();Ri=ke("v5",80,gr),yr=Ri;});var Or,Rr=U(()=>{Or="00000000-0000-0000-0000-000000000000";});function Si(e){if(!ae(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Sr,Tr=U(()=>{Pe();Sr=Si;});var Ir={};Zn(Ir,{NIL:()=>Or,parse:()=>Ve,stringify:()=>ce,v1:()=>lr,v3:()=>pr,v4:()=>Er,v5:()=>yr,validate:()=>ae,version:()=>Sr});var Ar=U(()=>{fr();mr();vr();_r();Rr();Tr();Pe();Ne();dt();});var Nr=b(H=>{var Ti=H&&H.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Ii=H&&H.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),xr=H&&H.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ti(t,e,r);return Ii(t,e),t};Object.defineProperty(H,"__esModule",{value:!0});H.prepareKeyValueMessage=H.issueFileCommand=void 0;var br=xr(_("fs")),pt=xr(_("os")),Ai=(Ar(),Qn(Ir)),Pr=Fe();function bi(e,t){let r=process.env[`GITHUB_${e}`];if(!r)throw new Error(`Unable to find environment variable for file command ${e}`);if(!br.existsSync(r))throw new Error(`Missing file at path: ${r}`);br.appendFileSync(r,`${Pr.toCommandValue(t)}${pt.EOL}`,{encoding:"utf8"});}H.issueFileCommand=bi;function xi(e,t){let r=`ghadelimiter_${Ai.v4()}`,n=Pr.toCommandValue(t);if(e.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return `${e}<<${r}${pt.EOL}${n}${pt.EOL}${r}`}H.prepareKeyValueMessage=xi;});var Lr=b(ye=>{Object.defineProperty(ye,"__esModule",{value:!0});ye.checkBypass=ye.getProxyUrl=void 0;function Pi(e){let t=e.protocol==="https:";if(Cr(e))return;let r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)return new URL(r)}ye.getProxyUrl=Pi;function Cr(e){if(!e.hostname)return !1;let t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return !1;let r;e.port?r=Number(e.port):e.protocol==="http:"?r=80:e.protocol==="https:"&&(r=443);let n=[e.hostname.toUpperCase()];typeof r=="number"&&n.push(`${n[0]}:${r}`);for(let i of t.split(",").map(s=>s.trim().toUpperCase()).filter(s=>s))if(n.some(s=>s===i))return !0;return !1}ye.checkBypass=Cr;});var jr=b(_e=>{_("net");var Ni=_("tls"),mt=_("http"),Dr=_("https"),Ci=_("events");_("assert");var Li=_("util");_e.httpOverHttp=Di;_e.httpsOverHttp=$i;_e.httpOverHttps=Ui;_e.httpsOverHttps=ji;function Di(e){var t=new ie(e);return t.request=mt.request,t}function $i(e){var t=new ie(e);return t.request=mt.request,t.createSocket=$r,t.defaultPort=443,t}function Ui(e){var t=new ie(e);return t.request=Dr.request,t}function ji(e){var t=new ie(e);return t.request=Dr.request,t.createSocket=$r,t.defaultPort=443,t}function ie(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||mt.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(n,i,s,o){for(var c=Ur(i,s,o),u=0,l=t.requests.length;u=this.maxSockets){s.requests.push(o);return}s.createSocket(o,function(c){c.on("free",u),c.on("close",l),c.on("agentRemove",l),t.onSocket(c);function u(){s.emit("free",c,o);}function l(a){s.removeSocket(c),c.removeListener("free",u),c.removeListener("close",l),c.removeListener("agentRemove",l);}});};ie.prototype.createSocket=function(t,r){var n=this,i={};n.sockets.push(i);var s=Et({},n.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:!1,headers:{host:t.host+":"+t.port}});t.localAddress&&(s.localAddress=t.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),ue("making CONNECT request");var o=n.request(s);o.useChunkedEncodingByDefault=!1,o.once("response",c),o.once("upgrade",u),o.once("connect",l),o.once("error",a),o.end();function c(h){h.upgrade=!0;}function u(h,E,C){process.nextTick(function(){l(h,E,C);});}function l(h,E,C){if(o.removeAllListeners(),E.removeAllListeners(),h.statusCode!==200){ue("tunneling socket could not be established, statusCode=%d",h.statusCode),E.destroy();var he=new Error("tunneling socket could not be established, statusCode="+h.statusCode);he.code="ECONNRESET",t.request.emit("error",he),n.removeSocket(i);return}if(C.length>0){ue("got illegal response body from proxy"),E.destroy();var he=new Error("got illegal response body from proxy");he.code="ECONNRESET",t.request.emit("error",he),n.removeSocket(i);return}return ue("tunneling connection has established"),n.sockets[n.sockets.indexOf(i)]=E,r(E)}function a(h){o.removeAllListeners(),ue(`tunneling socket could not be established, cause=%s -`,h.message,h.stack);var E=new Error("tunneling socket could not be established, cause="+h.message);E.code="ECONNRESET",t.request.emit("error",E),n.removeSocket(i);}};ie.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i);});}};function $r(e,t){var r=this;ie.prototype.createSocket.call(r,e,function(n){var i=e.request.getHeader("host"),s=Et({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),o=Ni.connect(0,s);r.sockets[r.sockets.indexOf(n)]=o,t(o);});}function Ur(e,t,r){return typeof e=="string"?{host:e,port:t,localAddress:r}:e}function Et(e){for(var t=1,r=arguments.length;t{Mr.exports=jr();});var wt=b(I=>{var Mi=I&&I.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),qi=I&&I.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Ke=I&&I.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Mi(t,e,r);return qi(t,e),t},N=I&&I.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(I,"__esModule",{value:!0});I.HttpClient=I.isHttps=I.HttpClientResponse=I.HttpClientError=I.getProxyUrl=I.MediaTypes=I.Headers=I.HttpCodes=void 0;var Xe=Ke(_("http")),vt=Ke(_("https")),Fr=Ke(Lr()),We=Ke(qr()),Z;(function(e){e[e.OK=200]="OK",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.ResourceMoved=302]="ResourceMoved",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.SwitchProxy=306]="SwitchProxy",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout";})(Z=I.HttpCodes||(I.HttpCodes={}));var j;(function(e){e.Accept="accept",e.ContentType="content-type";})(j=I.Headers||(I.Headers={}));var le;(function(e){e.ApplicationJson="application/json";})(le=I.MediaTypes||(I.MediaTypes={}));function Fi(e){let t=Fr.getProxyUrl(new URL(e));return t?t.href:""}I.getProxyUrl=Fi;var Bi=[Z.MovedPermanently,Z.ResourceMoved,Z.SeeOther,Z.TemporaryRedirect,Z.PermanentRedirect],Gi=[Z.BadGateway,Z.ServiceUnavailable,Z.GatewayTimeout],Vi=["OPTIONS","GET","DELETE","HEAD"],ki=10,Xi=5,ze=class e extends Error{constructor(t,r){super(t),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,e.prototype);}};I.HttpClientError=ze;var Je=class{constructor(t){this.message=t;}readBody(){return N(this,void 0,void 0,function*(){return new Promise(t=>N(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n]);}),this.message.on("end",()=>{t(r.toString());});}))})}};I.HttpClientResponse=Je;function Wi(e){return new URL(e).protocol==="https:"}I.isHttps=Wi;var gt=class{constructor(t,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=t,this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries));}options(t,r){return N(this,void 0,void 0,function*(){return this.request("OPTIONS",t,null,r||{})})}get(t,r){return N(this,void 0,void 0,function*(){return this.request("GET",t,null,r||{})})}del(t,r){return N(this,void 0,void 0,function*(){return this.request("DELETE",t,null,r||{})})}post(t,r,n){return N(this,void 0,void 0,function*(){return this.request("POST",t,r,n||{})})}patch(t,r,n){return N(this,void 0,void 0,function*(){return this.request("PATCH",t,r,n||{})})}put(t,r,n){return N(this,void 0,void 0,function*(){return this.request("PUT",t,r,n||{})})}head(t,r){return N(this,void 0,void 0,function*(){return this.request("HEAD",t,null,r||{})})}sendStream(t,r,n,i){return N(this,void 0,void 0,function*(){return this.request(t,r,n,i)})}getJson(t,r={}){return N(this,void 0,void 0,function*(){r[j.Accept]=this._getExistingOrDefaultHeader(r,j.Accept,le.ApplicationJson);let n=yield this.get(t,r);return this._processResponse(n,this.requestOptions)})}postJson(t,r,n={}){return N(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[j.Accept]=this._getExistingOrDefaultHeader(n,j.Accept,le.ApplicationJson),n[j.ContentType]=this._getExistingOrDefaultHeader(n,j.ContentType,le.ApplicationJson);let s=yield this.post(t,i,n);return this._processResponse(s,this.requestOptions)})}putJson(t,r,n={}){return N(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[j.Accept]=this._getExistingOrDefaultHeader(n,j.Accept,le.ApplicationJson),n[j.ContentType]=this._getExistingOrDefaultHeader(n,j.ContentType,le.ApplicationJson);let s=yield this.put(t,i,n);return this._processResponse(s,this.requestOptions)})}patchJson(t,r,n={}){return N(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[j.Accept]=this._getExistingOrDefaultHeader(n,j.Accept,le.ApplicationJson),n[j.ContentType]=this._getExistingOrDefaultHeader(n,j.ContentType,le.ApplicationJson);let s=yield this.patch(t,i,n);return this._processResponse(s,this.requestOptions)})}request(t,r,n,i){return N(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let s=new URL(r),o=this._prepareRequest(t,s,i),c=this._allowRetries&&Vi.includes(t)?this._maxRetries+1:1,u=0,l;do{if(l=yield this.requestRaw(o,n),l&&l.message&&l.message.statusCode===Z.Unauthorized){let h;for(let E of this.handlers)if(E.canHandleAuthentication(l)){h=E;break}return h?h.handleAuthentication(this,o,n):l}let a=this._maxRedirects;for(;l.message.statusCode&&Bi.includes(l.message.statusCode)&&this._allowRedirects&&a>0;){let h=l.message.headers.location;if(!h)break;let E=new URL(h);if(s.protocol==="https:"&&s.protocol!==E.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield l.readBody(),E.hostname!==s.hostname)for(let C in i)C.toLowerCase()==="authorization"&&delete i[C];o=this._prepareRequest(t,E,i),l=yield this.requestRaw(o,n),a--;}if(!l.message.statusCode||!Gi.includes(l.message.statusCode))return l;u+=1,u{function s(o,c){o?i(o):c?n(c):i(new Error("Unknown error"));}this.requestRawWithCallback(t,r,s);})})}requestRawWithCallback(t,r,n){typeof r=="string"&&(t.options.headers||(t.options.headers={}),t.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let i=!1;function s(u,l){i||(i=!0,n(u,l));}let o=t.httpModule.request(t.options,u=>{let l=new Je(u);s(void 0,l);}),c;o.on("socket",u=>{c=u;}),o.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),s(new Error(`Request timeout: ${t.options.path}`));}),o.on("error",function(u){s(u);}),r&&typeof r=="string"&&o.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){o.end();}),r.pipe(o)):o.end();}getAgent(t){let r=new URL(t);return this._getAgent(r)}_prepareRequest(t,r,n){let i={};i.parsedUrl=r;let s=i.parsedUrl.protocol==="https:";i.httpModule=s?vt:Xe;let o=s?443:80;if(i.options={},i.options.host=i.parsedUrl.hostname,i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):o,i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||""),i.options.method=t,i.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(i.options.headers["user-agent"]=this.userAgent),i.options.agent=this._getAgent(i.parsedUrl),this.handlers)for(let c of this.handlers)c.prepareRequest(i.options);return i}_mergeHeaders(t){return this.requestOptions&&this.requestOptions.headers?Object.assign({},He(this.requestOptions.headers),He(t||{})):He(t||{})}_getExistingOrDefaultHeader(t,r,n){let i;return this.requestOptions&&this.requestOptions.headers&&(i=He(this.requestOptions.headers)[r]),t[r]||i||n}_getAgent(t){let r,n=Fr.getProxyUrl(t),i=n&&n.hostname;if(this._keepAlive&&i&&(r=this._proxyAgent),this._keepAlive&&!i&&(r=this._agent),r)return r;let s=t.protocol==="https:",o=100;if(this.requestOptions&&(o=this.requestOptions.maxSockets||Xe.globalAgent.maxSockets),n&&n.hostname){let c={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},u,l=n.protocol==="https:";s?u=l?We.httpsOverHttps:We.httpsOverHttp:u=l?We.httpOverHttps:We.httpOverHttp,r=u(c),this._proxyAgent=r;}if(this._keepAlive&&!r){let c={keepAlive:this._keepAlive,maxSockets:o};r=s?new vt.Agent(c):new Xe.Agent(c),this._agent=r;}return r||(r=s?vt.globalAgent:Xe.globalAgent),s&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_performExponentialBackoff(t){return N(this,void 0,void 0,function*(){t=Math.min(ki,t);let r=Xi*Math.pow(2,t);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(t,r){return N(this,void 0,void 0,function*(){return new Promise((n,i)=>N(this,void 0,void 0,function*(){let s=t.message.statusCode||0,o={statusCode:s,result:null,headers:{}};s===Z.NotFound&&n(o);function c(a,h){if(typeof h=="string"){let E=new Date(h);if(!isNaN(E.valueOf()))return E}return h}let u,l;try{l=yield t.readBody(),l&&l.length>0&&(r&&r.deserializeDates?u=JSON.parse(l,c):u=JSON.parse(l),o.result=u),o.headers=t.message.headers;}catch{}if(s>299){let a;u&&u.message?a=u.message:l&&l.length>0?a=l:a=`Failed request: (${s})`;let h=new ze(a,s);h.result=o.result,i(h);}else n(o);}))})}};I.HttpClient=gt;var He=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});});var Br=b(ee=>{var Rt=ee&&ee.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(ee,"__esModule",{value:!0});ee.PersonalAccessTokenCredentialHandler=ee.BearerCredentialHandler=ee.BasicCredentialHandler=void 0;var yt=class{constructor(t,r){this.username=t,this.password=r;}prepareRequest(t){if(!t.headers)throw Error("The request has no headers");t.headers.Authorization=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`;}canHandleAuthentication(){return !1}handleAuthentication(){return Rt(this,void 0,void 0,function*(){throw new Error("not implemented")})}};ee.BasicCredentialHandler=yt;var _t=class{constructor(t){this.token=t;}prepareRequest(t){if(!t.headers)throw Error("The request has no headers");t.headers.Authorization=`Bearer ${this.token}`;}canHandleAuthentication(){return !1}handleAuthentication(){return Rt(this,void 0,void 0,function*(){throw new Error("not implemented")})}};ee.BearerCredentialHandler=_t;var Ot=class{constructor(t){this.token=t;}prepareRequest(t){if(!t.headers)throw Error("The request has no headers");t.headers.Authorization=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`;}canHandleAuthentication(){return !1}handleAuthentication(){return Rt(this,void 0,void 0,function*(){throw new Error("not implemented")})}};ee.PersonalAccessTokenCredentialHandler=Ot;});var kr=b(Oe=>{var Gr=Oe&&Oe.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.OidcClient=void 0;var Hi=wt(),zi=Br(),Vr=pe(),St=class e{static createHttpClient(t=!0,r=10){let n={allowRetries:t,maxRetries:r};return new Hi.HttpClient("actions/oidc-client",[new zi.BearerCredentialHandler(e.getRequestToken())],n)}static getRequestToken(){let t=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!t)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return t}static getIDTokenUrl(){let t=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!t)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return t}static getCall(t){var r;return Gr(this,void 0,void 0,function*(){let s=(r=(yield e.createHttpClient().getJson(t).catch(o=>{throw new Error(`Failed to get ID Token. +var Hn=Object.create;var Me=Object.defineProperty;var zn=Object.getOwnPropertyDescriptor;var Jn=Object.getOwnPropertyNames;var Kn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty;var _=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var U=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zn=(e,t)=>{for(var r in t)Me(e,r,{get:t[r],enumerable:!0});},rr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Jn(t))!Yn.call(e,i)&&i!==r&&Me(e,i,{get:()=>t[i],enumerable:!(n=zn(t,i))||n.enumerable});return e};var qe=(e,t,r)=>(r=e!=null?Hn(Kn(e)):{},rr(t||!e||!e.__esModule?Me(r,"default",{value:e,enumerable:!0}):r,e)),Qn=e=>rr(Me({},"__esModule",{value:!0}),e);var Fe=b(we=>{Object.defineProperty(we,"__esModule",{value:!0});we.toCommandProperties=we.toCommandValue=void 0;function ei(e){return e==null?"":typeof e=="string"||e instanceof String?e:JSON.stringify(e)}we.toCommandValue=ei;function ti(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}we.toCommandProperties=ti;});var or=b(W=>{var ri=W&&W.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),ni=W&&W.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),ii=W&&W.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&ri(t,e,r);return ni(t,e),t};Object.defineProperty(W,"__esModule",{value:!0});W.issue=W.issueCommand=void 0;var si=ii(_("os")),ir=Fe();function sr(e,t,r){let n=new at(e,t,r);process.stdout.write(n.toString()+si.EOL);}W.issueCommand=sr;function oi(e,t=""){sr(e,{},t);}W.issue=oi;var nr="::",at=class{constructor(t,r,n){t||(t="missing.command"),this.command=t,this.properties=r,this.message=n;}toString(){let t=nr+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let i=this.properties[n];i&&(r?r=!1:t+=",",t+=`${n}=${ci(i)}`);}}return t+=`${nr}${ai(this.message)}`,t}};function ai(e){return ir.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function ci(e){return ir.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});function xe(){return Be>Ge.length-16&&(ui__default.default.randomFillSync(Ge),Be=0),Ge.slice(Be,Be+=16)}var Ge,Be,ct=U(()=>{Ge=new Uint8Array(256),Be=Ge.length;});var ar,cr=U(()=>{ar=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function li(e){return typeof e=="string"&&ar.test(e)}var ce,Pe=U(()=>{cr();ce=li;});function fi(e,t=0){let r=(D[e[t+0]]+D[e[t+1]]+D[e[t+2]]+D[e[t+3]]+"-"+D[e[t+4]]+D[e[t+5]]+"-"+D[e[t+6]]+D[e[t+7]]+"-"+D[e[t+8]]+D[e[t+9]]+"-"+D[e[t+10]]+D[e[t+11]]+D[e[t+12]]+D[e[t+13]]+D[e[t+14]]+D[e[t+15]]).toLowerCase();if(!ce(r))throw TypeError("Stringified UUID is invalid");return r}var D,ue,Ne=U(()=>{Pe();D=[];for(let e=0;e<256;++e)D.push((e+256).toString(16).substr(1));ue=fi;});function di(e,t,r){let n=t&&r||0,i=t||new Array(16);e=e||{};let s=e.node||ur,o=e.clockseq!==void 0?e.clockseq:ut;if(s==null||o==null){let E=e.random||(e.rng||xe)();s==null&&(s=ur=[E[0]|1,E[1],E[2],E[3],E[4],E[5]]),o==null&&(o=ut=(E[6]<<8|E[7])&16383);}let c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:ft+1,l=c-lt+(u-ft)/1e4;if(l<0&&e.clockseq===void 0&&(o=o+1&16383),(l<0||c>lt)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");lt=c,ft=u,ut=o,c+=122192928e5;let a=((c&268435455)*1e4+u)%4294967296;i[n++]=a>>>24&255,i[n++]=a>>>16&255,i[n++]=a>>>8&255,i[n++]=a&255;let h=c/4294967296*1e4&268435455;i[n++]=h>>>8&255,i[n++]=h&255,i[n++]=h>>>24&15|16,i[n++]=h>>>16&255,i[n++]=o>>>8|128,i[n++]=o&255;for(let E=0;E<6;++E)i[n+E]=s[E];return t||ue(i)}var ur,ut,lt,ft,lr,fr=U(()=>{ct();Ne();lt=0,ft=0;lr=di;});function hi(e){if(!ce(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var Ve,dt=U(()=>{Pe();Ve=hi;});function pi(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r{Ne();dt();mi="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Ei="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function gi(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),ui__default.default.createHash("md5").update(e).digest()}var dr,hr=U(()=>{dr=gi;});var wi,pr,mr=U(()=>{ht();hr();wi=ke("v3",48,dr),pr=wi;});function yi(e,t,r){e=e||{};let n=e.random||(e.rng||xe)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return ue(n)}var Er,vr=U(()=>{ct();Ne();Er=yi;});function Oi(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),ui__default.default.createHash("sha1").update(e).digest()}var gr,wr=U(()=>{gr=Oi;});var Ri,yr,_r=U(()=>{ht();wr();Ri=ke("v5",80,gr),yr=Ri;});var Or,Rr=U(()=>{Or="00000000-0000-0000-0000-000000000000";});function Si(e){if(!ce(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Sr,Tr=U(()=>{Pe();Sr=Si;});var Ir={};Zn(Ir,{NIL:()=>Or,parse:()=>Ve,stringify:()=>ue,v1:()=>lr,v3:()=>pr,v4:()=>Er,v5:()=>yr,validate:()=>ce,version:()=>Sr});var Ar=U(()=>{fr();mr();vr();_r();Rr();Tr();Pe();Ne();dt();});var Nr=b(H=>{var Ti=H&&H.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Ii=H&&H.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),xr=H&&H.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ti(t,e,r);return Ii(t,e),t};Object.defineProperty(H,"__esModule",{value:!0});H.prepareKeyValueMessage=H.issueFileCommand=void 0;var br=xr(_("fs")),pt=xr(_("os")),Ai=(Ar(),Qn(Ir)),Pr=Fe();function bi(e,t){let r=process.env[`GITHUB_${e}`];if(!r)throw new Error(`Unable to find environment variable for file command ${e}`);if(!br.existsSync(r))throw new Error(`Missing file at path: ${r}`);br.appendFileSync(r,`${Pr.toCommandValue(t)}${pt.EOL}`,{encoding:"utf8"});}H.issueFileCommand=bi;function xi(e,t){let r=`ghadelimiter_${Ai.v4()}`,n=Pr.toCommandValue(t);if(e.includes(r))throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`);return `${e}<<${r}${pt.EOL}${n}${pt.EOL}${r}`}H.prepareKeyValueMessage=xi;});var Lr=b(ye=>{Object.defineProperty(ye,"__esModule",{value:!0});ye.checkBypass=ye.getProxyUrl=void 0;function Pi(e){let t=e.protocol==="https:";if(Cr(e))return;let r=t?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)return new URL(r)}ye.getProxyUrl=Pi;function Cr(e){if(!e.hostname)return !1;let t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return !1;let r;e.port?r=Number(e.port):e.protocol==="http:"?r=80:e.protocol==="https:"&&(r=443);let n=[e.hostname.toUpperCase()];typeof r=="number"&&n.push(`${n[0]}:${r}`);for(let i of t.split(",").map(s=>s.trim().toUpperCase()).filter(s=>s))if(n.some(s=>s===i))return !0;return !1}ye.checkBypass=Cr;});var jr=b(_e=>{_("net");var Ni=_("tls"),mt=_("http"),Dr=_("https"),Ci=_("events");_("assert");var Li=_("util");_e.httpOverHttp=Di;_e.httpsOverHttp=$i;_e.httpOverHttps=Ui;_e.httpsOverHttps=ji;function Di(e){var t=new se(e);return t.request=mt.request,t}function $i(e){var t=new se(e);return t.request=mt.request,t.createSocket=$r,t.defaultPort=443,t}function Ui(e){var t=new se(e);return t.request=Dr.request,t}function ji(e){var t=new se(e);return t.request=Dr.request,t.createSocket=$r,t.defaultPort=443,t}function se(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||mt.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(n,i,s,o){for(var c=Ur(i,s,o),u=0,l=t.requests.length;u=this.maxSockets){s.requests.push(o);return}s.createSocket(o,function(c){c.on("free",u),c.on("close",l),c.on("agentRemove",l),t.onSocket(c);function u(){s.emit("free",c,o);}function l(a){s.removeSocket(c),c.removeListener("free",u),c.removeListener("close",l),c.removeListener("agentRemove",l);}});};se.prototype.createSocket=function(t,r){var n=this,i={};n.sockets.push(i);var s=Et({},n.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:!1,headers:{host:t.host+":"+t.port}});t.localAddress&&(s.localAddress=t.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),le("making CONNECT request");var o=n.request(s);o.useChunkedEncodingByDefault=!1,o.once("response",c),o.once("upgrade",u),o.once("connect",l),o.once("error",a),o.end();function c(h){h.upgrade=!0;}function u(h,E,L){process.nextTick(function(){l(h,E,L);});}function l(h,E,L){if(o.removeAllListeners(),E.removeAllListeners(),h.statusCode!==200){le("tunneling socket could not be established, statusCode=%d",h.statusCode),E.destroy();var pe=new Error("tunneling socket could not be established, statusCode="+h.statusCode);pe.code="ECONNRESET",t.request.emit("error",pe),n.removeSocket(i);return}if(L.length>0){le("got illegal response body from proxy"),E.destroy();var pe=new Error("got illegal response body from proxy");pe.code="ECONNRESET",t.request.emit("error",pe),n.removeSocket(i);return}return le("tunneling connection has established"),n.sockets[n.sockets.indexOf(i)]=E,r(E)}function a(h){o.removeAllListeners(),le(`tunneling socket could not be established, cause=%s +`,h.message,h.stack);var E=new Error("tunneling socket could not be established, cause="+h.message);E.code="ECONNRESET",t.request.emit("error",E),n.removeSocket(i);}};se.prototype.removeSocket=function(t){var r=this.sockets.indexOf(t);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(i){n.request.onSocket(i);});}};function $r(e,t){var r=this;se.prototype.createSocket.call(r,e,function(n){var i=e.request.getHeader("host"),s=Et({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),o=Ni.connect(0,s);r.sockets[r.sockets.indexOf(n)]=o,t(o);});}function Ur(e,t,r){return typeof e=="string"?{host:e,port:t,localAddress:r}:e}function Et(e){for(var t=1,r=arguments.length;t{Mr.exports=jr();});var wt=b(I=>{var Mi=I&&I.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),qi=I&&I.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Ke=I&&I.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Mi(t,e,r);return qi(t,e),t},N=I&&I.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(I,"__esModule",{value:!0});I.HttpClient=I.isHttps=I.HttpClientResponse=I.HttpClientError=I.getProxyUrl=I.MediaTypes=I.Headers=I.HttpCodes=void 0;var Xe=Ke(_("http")),vt=Ke(_("https")),Fr=Ke(Lr()),We=Ke(qr()),Z;(function(e){e[e.OK=200]="OK",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.ResourceMoved=302]="ResourceMoved",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.SwitchProxy=306]="SwitchProxy",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout";})(Z=I.HttpCodes||(I.HttpCodes={}));var j;(function(e){e.Accept="accept",e.ContentType="content-type";})(j=I.Headers||(I.Headers={}));var fe;(function(e){e.ApplicationJson="application/json";})(fe=I.MediaTypes||(I.MediaTypes={}));function Fi(e){let t=Fr.getProxyUrl(new URL(e));return t?t.href:""}I.getProxyUrl=Fi;var Bi=[Z.MovedPermanently,Z.ResourceMoved,Z.SeeOther,Z.TemporaryRedirect,Z.PermanentRedirect],Gi=[Z.BadGateway,Z.ServiceUnavailable,Z.GatewayTimeout],Vi=["OPTIONS","GET","DELETE","HEAD"],ki=10,Xi=5,ze=class e extends Error{constructor(t,r){super(t),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,e.prototype);}};I.HttpClientError=ze;var Je=class{constructor(t){this.message=t;}readBody(){return N(this,void 0,void 0,function*(){return new Promise(t=>N(this,void 0,void 0,function*(){let r=Buffer.alloc(0);this.message.on("data",n=>{r=Buffer.concat([r,n]);}),this.message.on("end",()=>{t(r.toString());});}))})}};I.HttpClientResponse=Je;function Wi(e){return new URL(e).protocol==="https:"}I.isHttps=Wi;var gt=class{constructor(t,r,n){this._ignoreSslError=!1,this._allowRedirects=!0,this._allowRedirectDowngrade=!1,this._maxRedirects=50,this._allowRetries=!1,this._maxRetries=1,this._keepAlive=!1,this._disposed=!1,this.userAgent=t,this.handlers=r||[],this.requestOptions=n,n&&(n.ignoreSslError!=null&&(this._ignoreSslError=n.ignoreSslError),this._socketTimeout=n.socketTimeout,n.allowRedirects!=null&&(this._allowRedirects=n.allowRedirects),n.allowRedirectDowngrade!=null&&(this._allowRedirectDowngrade=n.allowRedirectDowngrade),n.maxRedirects!=null&&(this._maxRedirects=Math.max(n.maxRedirects,0)),n.keepAlive!=null&&(this._keepAlive=n.keepAlive),n.allowRetries!=null&&(this._allowRetries=n.allowRetries),n.maxRetries!=null&&(this._maxRetries=n.maxRetries));}options(t,r){return N(this,void 0,void 0,function*(){return this.request("OPTIONS",t,null,r||{})})}get(t,r){return N(this,void 0,void 0,function*(){return this.request("GET",t,null,r||{})})}del(t,r){return N(this,void 0,void 0,function*(){return this.request("DELETE",t,null,r||{})})}post(t,r,n){return N(this,void 0,void 0,function*(){return this.request("POST",t,r,n||{})})}patch(t,r,n){return N(this,void 0,void 0,function*(){return this.request("PATCH",t,r,n||{})})}put(t,r,n){return N(this,void 0,void 0,function*(){return this.request("PUT",t,r,n||{})})}head(t,r){return N(this,void 0,void 0,function*(){return this.request("HEAD",t,null,r||{})})}sendStream(t,r,n,i){return N(this,void 0,void 0,function*(){return this.request(t,r,n,i)})}getJson(t,r={}){return N(this,void 0,void 0,function*(){r[j.Accept]=this._getExistingOrDefaultHeader(r,j.Accept,fe.ApplicationJson);let n=yield this.get(t,r);return this._processResponse(n,this.requestOptions)})}postJson(t,r,n={}){return N(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[j.Accept]=this._getExistingOrDefaultHeader(n,j.Accept,fe.ApplicationJson),n[j.ContentType]=this._getExistingOrDefaultHeader(n,j.ContentType,fe.ApplicationJson);let s=yield this.post(t,i,n);return this._processResponse(s,this.requestOptions)})}putJson(t,r,n={}){return N(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[j.Accept]=this._getExistingOrDefaultHeader(n,j.Accept,fe.ApplicationJson),n[j.ContentType]=this._getExistingOrDefaultHeader(n,j.ContentType,fe.ApplicationJson);let s=yield this.put(t,i,n);return this._processResponse(s,this.requestOptions)})}patchJson(t,r,n={}){return N(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[j.Accept]=this._getExistingOrDefaultHeader(n,j.Accept,fe.ApplicationJson),n[j.ContentType]=this._getExistingOrDefaultHeader(n,j.ContentType,fe.ApplicationJson);let s=yield this.patch(t,i,n);return this._processResponse(s,this.requestOptions)})}request(t,r,n,i){return N(this,void 0,void 0,function*(){if(this._disposed)throw new Error("Client has already been disposed.");let s=new URL(r),o=this._prepareRequest(t,s,i),c=this._allowRetries&&Vi.includes(t)?this._maxRetries+1:1,u=0,l;do{if(l=yield this.requestRaw(o,n),l&&l.message&&l.message.statusCode===Z.Unauthorized){let h;for(let E of this.handlers)if(E.canHandleAuthentication(l)){h=E;break}return h?h.handleAuthentication(this,o,n):l}let a=this._maxRedirects;for(;l.message.statusCode&&Bi.includes(l.message.statusCode)&&this._allowRedirects&&a>0;){let h=l.message.headers.location;if(!h)break;let E=new URL(h);if(s.protocol==="https:"&&s.protocol!==E.protocol&&!this._allowRedirectDowngrade)throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(yield l.readBody(),E.hostname!==s.hostname)for(let L in i)L.toLowerCase()==="authorization"&&delete i[L];o=this._prepareRequest(t,E,i),l=yield this.requestRaw(o,n),a--;}if(!l.message.statusCode||!Gi.includes(l.message.statusCode))return l;u+=1,u{function s(o,c){o?i(o):c?n(c):i(new Error("Unknown error"));}this.requestRawWithCallback(t,r,s);})})}requestRawWithCallback(t,r,n){typeof r=="string"&&(t.options.headers||(t.options.headers={}),t.options.headers["Content-Length"]=Buffer.byteLength(r,"utf8"));let i=!1;function s(u,l){i||(i=!0,n(u,l));}let o=t.httpModule.request(t.options,u=>{let l=new Je(u);s(void 0,l);}),c;o.on("socket",u=>{c=u;}),o.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),s(new Error(`Request timeout: ${t.options.path}`));}),o.on("error",function(u){s(u);}),r&&typeof r=="string"&&o.write(r,"utf8"),r&&typeof r!="string"?(r.on("close",function(){o.end();}),r.pipe(o)):o.end();}getAgent(t){let r=new URL(t);return this._getAgent(r)}_prepareRequest(t,r,n){let i={};i.parsedUrl=r;let s=i.parsedUrl.protocol==="https:";i.httpModule=s?vt:Xe;let o=s?443:80;if(i.options={},i.options.host=i.parsedUrl.hostname,i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):o,i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||""),i.options.method=t,i.options.headers=this._mergeHeaders(n),this.userAgent!=null&&(i.options.headers["user-agent"]=this.userAgent),i.options.agent=this._getAgent(i.parsedUrl),this.handlers)for(let c of this.handlers)c.prepareRequest(i.options);return i}_mergeHeaders(t){return this.requestOptions&&this.requestOptions.headers?Object.assign({},He(this.requestOptions.headers),He(t||{})):He(t||{})}_getExistingOrDefaultHeader(t,r,n){let i;return this.requestOptions&&this.requestOptions.headers&&(i=He(this.requestOptions.headers)[r]),t[r]||i||n}_getAgent(t){let r,n=Fr.getProxyUrl(t),i=n&&n.hostname;if(this._keepAlive&&i&&(r=this._proxyAgent),this._keepAlive&&!i&&(r=this._agent),r)return r;let s=t.protocol==="https:",o=100;if(this.requestOptions&&(o=this.requestOptions.maxSockets||Xe.globalAgent.maxSockets),n&&n.hostname){let c={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})},u,l=n.protocol==="https:";s?u=l?We.httpsOverHttps:We.httpsOverHttp:u=l?We.httpOverHttps:We.httpOverHttp,r=u(c),this._proxyAgent=r;}if(this._keepAlive&&!r){let c={keepAlive:this._keepAlive,maxSockets:o};r=s?new vt.Agent(c):new Xe.Agent(c),this._agent=r;}return r||(r=s?vt.globalAgent:Xe.globalAgent),s&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_performExponentialBackoff(t){return N(this,void 0,void 0,function*(){t=Math.min(ki,t);let r=Xi*Math.pow(2,t);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(t,r){return N(this,void 0,void 0,function*(){return new Promise((n,i)=>N(this,void 0,void 0,function*(){let s=t.message.statusCode||0,o={statusCode:s,result:null,headers:{}};s===Z.NotFound&&n(o);function c(a,h){if(typeof h=="string"){let E=new Date(h);if(!isNaN(E.valueOf()))return E}return h}let u,l;try{l=yield t.readBody(),l&&l.length>0&&(r&&r.deserializeDates?u=JSON.parse(l,c):u=JSON.parse(l),o.result=u),o.headers=t.message.headers;}catch{}if(s>299){let a;u&&u.message?a=u.message:l&&l.length>0?a=l:a=`Failed request: (${s})`;let h=new ze(a,s);h.result=o.result,i(h);}else n(o);}))})}};I.HttpClient=gt;var He=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});});var Br=b(ee=>{var Rt=ee&&ee.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(ee,"__esModule",{value:!0});ee.PersonalAccessTokenCredentialHandler=ee.BearerCredentialHandler=ee.BasicCredentialHandler=void 0;var yt=class{constructor(t,r){this.username=t,this.password=r;}prepareRequest(t){if(!t.headers)throw Error("The request has no headers");t.headers.Authorization=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`;}canHandleAuthentication(){return !1}handleAuthentication(){return Rt(this,void 0,void 0,function*(){throw new Error("not implemented")})}};ee.BasicCredentialHandler=yt;var _t=class{constructor(t){this.token=t;}prepareRequest(t){if(!t.headers)throw Error("The request has no headers");t.headers.Authorization=`Bearer ${this.token}`;}canHandleAuthentication(){return !1}handleAuthentication(){return Rt(this,void 0,void 0,function*(){throw new Error("not implemented")})}};ee.BearerCredentialHandler=_t;var Ot=class{constructor(t){this.token=t;}prepareRequest(t){if(!t.headers)throw Error("The request has no headers");t.headers.Authorization=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`;}canHandleAuthentication(){return !1}handleAuthentication(){return Rt(this,void 0,void 0,function*(){throw new Error("not implemented")})}};ee.PersonalAccessTokenCredentialHandler=Ot;});var kr=b(Oe=>{var Gr=Oe&&Oe.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.OidcClient=void 0;var Hi=wt(),zi=Br(),Vr=me(),St=class e{static createHttpClient(t=!0,r=10){let n={allowRetries:t,maxRetries:r};return new Hi.HttpClient("actions/oidc-client",[new zi.BearerCredentialHandler(e.getRequestToken())],n)}static getRequestToken(){let t=process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;if(!t)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable");return t}static getIDTokenUrl(){let t=process.env.ACTIONS_ID_TOKEN_REQUEST_URL;if(!t)throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable");return t}static getCall(t){var r;return Gr(this,void 0,void 0,function*(){let s=(r=(yield e.createHttpClient().getJson(t).catch(o=>{throw new Error(`Failed to get ID Token. Error Code : ${o.statusCode} - Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(t){return Gr(this,void 0,void 0,function*(){try{let r=e.getIDTokenUrl();if(t){let i=encodeURIComponent(t);r=`${r}&audience=${i}`;}Vr.debug(`ID token url is ${r}`);let n=yield e.getCall(r);return Vr.setSecret(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};Oe.OidcClient=St;});var bt=b(F=>{var Tt=F&&F.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(F,"__esModule",{value:!0});F.summary=F.markdownSummary=F.SUMMARY_DOCS_URL=F.SUMMARY_ENV_VAR=void 0;var Ji=_("os"),It=_("fs"),{access:Ki,appendFile:Yi,writeFile:Zi}=It.promises;F.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";F.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var At=class{constructor(){this._buffer="";}filePath(){return Tt(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let t=process.env[F.SUMMARY_ENV_VAR];if(!t)throw new Error(`Unable to find environment variable for $${F.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield Ki(t,It.constants.R_OK|It.constants.W_OK);}catch{throw new Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}return this._filePath=t,this._filePath})}wrap(t,r,n={}){let i=Object.entries(n).map(([s,o])=>` ${s}="${o}"`).join("");return r?`<${t}${i}>${r}`:`<${t}${i}>`}write(t){return Tt(this,void 0,void 0,function*(){let r=!!t?.overwrite,n=yield this.filePath();return yield (r?Zi:Yi)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Tt(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(t,r=!1){return this._buffer+=t,r?this.addEOL():this}addEOL(){return this.addRaw(Ji.EOL)}addCodeBlock(t,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",t),n);return this.addRaw(i).addEOL()}addList(t,r=!1){let n=r?"ol":"ul",i=t.map(o=>this.wrap("li",o)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(t){let r=t.map(i=>{let s=i.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:c,data:u,colspan:l,rowspan:a}=o,h=c?"th":"td",E=Object.assign(Object.assign({},l&&{colspan:l}),a&&{rowspan:a});return this.wrap(h,u,E)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(t,r){let n=this.wrap("details",this.wrap("summary",t)+r);return this.addRaw(n).addEOL()}addImage(t,r,n){let{width:i,height:s}=n||{},o=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),c=this.wrap("img",null,Object.assign({src:t,alt:r},o));return this.addRaw(c).addEOL()}addHeading(t,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,t);return this.addRaw(s).addEOL()}addSeparator(){let t=this.wrap("hr",null);return this.addRaw(t).addEOL()}addBreak(){let t=this.wrap("br",null);return this.addRaw(t).addEOL()}addQuote(t,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",t,n);return this.addRaw(i).addEOL()}addLink(t,r){let n=this.wrap("a",t,{href:r});return this.addRaw(n).addEOL()}},Xr=new At;F.markdownSummary=Xr;F.summary=Xr;});var Wr=b(B=>{var Qi=B&&B.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),es=B&&B.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),ts=B&&B.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Qi(t,e,r);return es(t,e),t};Object.defineProperty(B,"__esModule",{value:!0});B.toPlatformPath=B.toWin32Path=B.toPosixPath=void 0;var rs=ts(_("path"));function ns(e){return e.replace(/[\\]/g,"/")}B.toPosixPath=ns;function is(e){return e.replace(/[/]/g,"\\")}B.toWin32Path=is;function ss(e){return e.replace(/[/\\]/g,rs.sep)}B.toPlatformPath=ss;});var pe=b(m=>{var os=m&&m.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),as=m&&m.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Hr=m&&m.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&os(t,e,r);return as(t,e),t},zr=m&&m.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(m,"__esModule",{value:!0});m.getIDToken=m.getState=m.saveState=m.group=m.endGroup=m.startGroup=m.info=m.notice=m.warning=m.error=m.debug=m.isDebug=m.setFailed=m.setCommandEcho=m.setOutput=m.getBooleanInput=m.getMultilineInput=m.getInput=m.addPath=m.setSecret=m.exportVariable=m.ExitCode=void 0;var z=or(),me=Nr(),Re=Fe(),Jr=Hr(_("os")),cs=Hr(_("path")),us=kr(),Kr;(function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure";})(Kr=m.ExitCode||(m.ExitCode={}));function ls(e,t){let r=Re.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV||"")return me.issueFileCommand("ENV",me.prepareKeyValueMessage(e,t));z.issueCommand("set-env",{name:e},r);}m.exportVariable=ls;function fs(e){z.issueCommand("add-mask",{},e);}m.setSecret=fs;function ds(e){process.env.GITHUB_PATH||""?me.issueFileCommand("PATH",e):z.issueCommand("add-path",{},e),process.env.PATH=`${e}${cs.delimiter}${process.env.PATH}`;}m.addPath=ds;function xt(e,t){let r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r)throw new Error(`Input required and not supplied: ${e}`);return t&&t.trimWhitespace===!1?r:r.trim()}m.getInput=xt;function hs(e,t){let r=xt(e,t).split(` + Error Message: ${o.message}`)})).result)===null||r===void 0?void 0:r.value;if(!s)throw new Error("Response json body do not have ID Token field");return s})}static getIDToken(t){return Gr(this,void 0,void 0,function*(){try{let r=e.getIDTokenUrl();if(t){let i=encodeURIComponent(t);r=`${r}&audience=${i}`;}Vr.debug(`ID token url is ${r}`);let n=yield e.getCall(r);return Vr.setSecret(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};Oe.OidcClient=St;});var bt=b(F=>{var Tt=F&&F.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(F,"__esModule",{value:!0});F.summary=F.markdownSummary=F.SUMMARY_DOCS_URL=F.SUMMARY_ENV_VAR=void 0;var Ji=_("os"),It=_("fs"),{access:Ki,appendFile:Yi,writeFile:Zi}=It.promises;F.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";F.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var At=class{constructor(){this._buffer="";}filePath(){return Tt(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let t=process.env[F.SUMMARY_ENV_VAR];if(!t)throw new Error(`Unable to find environment variable for $${F.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield Ki(t,It.constants.R_OK|It.constants.W_OK);}catch{throw new Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}return this._filePath=t,this._filePath})}wrap(t,r,n={}){let i=Object.entries(n).map(([s,o])=>` ${s}="${o}"`).join("");return r?`<${t}${i}>${r}`:`<${t}${i}>`}write(t){return Tt(this,void 0,void 0,function*(){let r=!!t?.overwrite,n=yield this.filePath();return yield (r?Zi:Yi)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Tt(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(t,r=!1){return this._buffer+=t,r?this.addEOL():this}addEOL(){return this.addRaw(Ji.EOL)}addCodeBlock(t,r){let n=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",t),n);return this.addRaw(i).addEOL()}addList(t,r=!1){let n=r?"ol":"ul",i=t.map(o=>this.wrap("li",o)).join(""),s=this.wrap(n,i);return this.addRaw(s).addEOL()}addTable(t){let r=t.map(i=>{let s=i.map(o=>{if(typeof o=="string")return this.wrap("td",o);let{header:c,data:u,colspan:l,rowspan:a}=o,h=c?"th":"td",E=Object.assign(Object.assign({},l&&{colspan:l}),a&&{rowspan:a});return this.wrap(h,u,E)}).join("");return this.wrap("tr",s)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(t,r){let n=this.wrap("details",this.wrap("summary",t)+r);return this.addRaw(n).addEOL()}addImage(t,r,n){let{width:i,height:s}=n||{},o=Object.assign(Object.assign({},i&&{width:i}),s&&{height:s}),c=this.wrap("img",null,Object.assign({src:t,alt:r},o));return this.addRaw(c).addEOL()}addHeading(t,r){let n=`h${r}`,i=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",s=this.wrap(i,t);return this.addRaw(s).addEOL()}addSeparator(){let t=this.wrap("hr",null);return this.addRaw(t).addEOL()}addBreak(){let t=this.wrap("br",null);return this.addRaw(t).addEOL()}addQuote(t,r){let n=Object.assign({},r&&{cite:r}),i=this.wrap("blockquote",t,n);return this.addRaw(i).addEOL()}addLink(t,r){let n=this.wrap("a",t,{href:r});return this.addRaw(n).addEOL()}},Xr=new At;F.markdownSummary=Xr;F.summary=Xr;});var Wr=b(B=>{var Qi=B&&B.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),es=B&&B.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),ts=B&&B.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Qi(t,e,r);return es(t,e),t};Object.defineProperty(B,"__esModule",{value:!0});B.toPlatformPath=B.toWin32Path=B.toPosixPath=void 0;var rs=ts(_("path"));function ns(e){return e.replace(/[\\]/g,"/")}B.toPosixPath=ns;function is(e){return e.replace(/[/]/g,"\\")}B.toWin32Path=is;function ss(e){return e.replace(/[/\\]/g,rs.sep)}B.toPlatformPath=ss;});var me=b(m=>{var os=m&&m.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),as=m&&m.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Hr=m&&m.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&os(t,e,r);return as(t,e),t},zr=m&&m.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(m,"__esModule",{value:!0});m.getIDToken=m.getState=m.saveState=m.group=m.endGroup=m.startGroup=m.info=m.notice=m.warning=m.error=m.debug=m.isDebug=m.setFailed=m.setCommandEcho=m.setOutput=m.getBooleanInput=m.getMultilineInput=m.getInput=m.addPath=m.setSecret=m.exportVariable=m.ExitCode=void 0;var z=or(),Ee=Nr(),Re=Fe(),Jr=Hr(_("os")),cs=Hr(_("path")),us=kr(),Kr;(function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure";})(Kr=m.ExitCode||(m.ExitCode={}));function ls(e,t){let r=Re.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV||"")return Ee.issueFileCommand("ENV",Ee.prepareKeyValueMessage(e,t));z.issueCommand("set-env",{name:e},r);}m.exportVariable=ls;function fs(e){z.issueCommand("add-mask",{},e);}m.setSecret=fs;function ds(e){process.env.GITHUB_PATH||""?Ee.issueFileCommand("PATH",e):z.issueCommand("add-path",{},e),process.env.PATH=`${e}${cs.delimiter}${process.env.PATH}`;}m.addPath=ds;function xt(e,t){let r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r)throw new Error(`Input required and not supplied: ${e}`);return t&&t.trimWhitespace===!1?r:r.trim()}m.getInput=xt;function hs(e,t){let r=xt(e,t).split(` `).filter(n=>n!=="");return t&&t.trimWhitespace===!1?r:r.map(n=>n.trim())}m.getMultilineInput=hs;function ps(e,t){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=xt(e,t);if(r.includes(i))return !0;if(n.includes(i))return !1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}m.getBooleanInput=ps;function ms(e,t){if(process.env.GITHUB_OUTPUT||"")return me.issueFileCommand("OUTPUT",me.prepareKeyValueMessage(e,t));process.stdout.write(Jr.EOL),z.issueCommand("set-output",{name:e},Re.toCommandValue(t));}m.setOutput=ms;function Es(e){z.issue("echo",e?"on":"off");}m.setCommandEcho=Es;function vs(e){process.exitCode=Kr.Failure,Yr(e);}m.setFailed=vs;function gs(){return process.env.RUNNER_DEBUG==="1"}m.isDebug=gs;function ws(e){z.issueCommand("debug",{},e);}m.debug=ws;function Yr(e,t={}){z.issueCommand("error",Re.toCommandProperties(t),e instanceof Error?e.toString():e);}m.error=Yr;function ys(e,t={}){z.issueCommand("warning",Re.toCommandProperties(t),e instanceof Error?e.toString():e);}m.warning=ys;function _s(e,t={}){z.issueCommand("notice",Re.toCommandProperties(t),e instanceof Error?e.toString():e);}m.notice=_s;function Os(e){process.stdout.write(e+Jr.EOL);}m.info=Os;function Zr(e){z.issue("group",e);}m.startGroup=Zr;function Qr(){z.issue("endgroup");}m.endGroup=Qr;function Rs(e,t){return zr(this,void 0,void 0,function*(){Zr(e);let r;try{r=yield t();}finally{Qr();}return r})}m.group=Rs;function Ss(e,t){if(process.env.GITHUB_STATE||"")return me.issueFileCommand("STATE",me.prepareKeyValueMessage(e,t));z.issueCommand("save-state",{name:e},Re.toCommandValue(t));}m.saveState=Ss;function Ts(e){return process.env[`STATE_${e}`]||""}m.getState=Ts;function Is(e){return zr(this,void 0,void 0,function*(){return yield us.OidcClient.getIDToken(e)})}m.getIDToken=Is;var As=bt();Object.defineProperty(m,"summary",{enumerable:!0,get:function(){return As.summary}});var bs=bt();Object.defineProperty(m,"markdownSummary",{enumerable:!0,get:function(){return bs.markdownSummary}});var Pt=Wr();Object.defineProperty(m,"toPosixPath",{enumerable:!0,get:function(){return Pt.toPosixPath}});Object.defineProperty(m,"toWin32Path",{enumerable:!0,get:function(){return Pt.toWin32Path}});Object.defineProperty(m,"toPlatformPath",{enumerable:!0,get:function(){return Pt.toPlatformPath}});});var $t=b(p=>{var xs=p&&p.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Ps=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),tn=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&xs(t,e,r);return Ps(t,e),t},Dt=p&&p.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})},G;Object.defineProperty(p,"__esModule",{value:!0});p.getCmdPath=p.tryGetExecutablePath=p.isRooted=p.isDirectory=p.exists=p.READONLY=p.UV_FS_O_EXLOCK=p.IS_WINDOWS=p.unlink=p.symlink=p.stat=p.rmdir=p.rm=p.rename=p.readlink=p.readdir=p.open=p.mkdir=p.lstat=p.copyFile=p.chmod=void 0;var rn=tn(_("fs")),Ye=tn(_("path"));G=rn.promises,p.chmod=G.chmod,p.copyFile=G.copyFile,p.lstat=G.lstat,p.mkdir=G.mkdir,p.open=G.open,p.readdir=G.readdir,p.readlink=G.readlink,p.rename=G.rename,p.rm=G.rm,p.rmdir=G.rmdir,p.stat=G.stat,p.symlink=G.symlink,p.unlink=G.unlink;p.IS_WINDOWS=process.platform==="win32";p.UV_FS_O_EXLOCK=268435456;p.READONLY=rn.constants.O_RDONLY;function Ns(e){return Dt(this,void 0,void 0,function*(){try{yield p.stat(e);}catch(t){if(t.code==="ENOENT")return !1;throw t}return !0})}p.exists=Ns;function Cs(e,t=!1){return Dt(this,void 0,void 0,function*(){return (t?yield p.stat(e):yield p.lstat(e)).isDirectory()})}p.isDirectory=Cs;function Ls(e){if(e=$s(e),!e)throw new Error('isRooted() parameter "p" cannot be empty');return p.IS_WINDOWS?e.startsWith("\\")||/^[A-Z]:/i.test(e):e.startsWith("/")}p.isRooted=Ls;function Ds(e,t){return Dt(this,void 0,void 0,function*(){let r;try{r=yield p.stat(e);}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${i}`);}if(r&&r.isFile()){if(p.IS_WINDOWS){let i=Ye.extname(e).toUpperCase();if(t.some(s=>s.toUpperCase()===i))return e}else if(en(r))return e}let n=e;for(let i of t){e=n+i,r=void 0;try{r=yield p.stat(e);}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${s}`);}if(r&&r.isFile()){if(p.IS_WINDOWS){try{let s=Ye.dirname(e),o=Ye.basename(e).toUpperCase();for(let c of yield p.readdir(s))if(o===c.toUpperCase()){e=Ye.join(s,c);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${s}`);}return e}else if(en(r))return e}}return ""})}p.tryGetExecutablePath=Ds;function $s(e){return e=e||"",p.IS_WINDOWS?(e=e.replace(/\//g,"\\"),e.replace(/\\\\+/g,"\\")):e.replace(/\/\/+/g,"/")}function en(e){return (e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function Us(){var e;return (e=process.env.COMSPEC)!==null&&e!==void 0?e:"cmd.exe"}p.getCmdPath=Us;});var jt=b(P=>{var js=P&&P.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Ms=P&&P.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),nn=P&&P.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&js(t,e,r);return Ms(t,e),t},fe=P&&P.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(P,"__esModule",{value:!0});P.findInPath=P.which=P.mkdirP=P.rmRF=P.mv=P.cp=void 0;var qs=_("assert"),te=nn(_("path")),R=nn($t());function Fs(e,t,r={}){return fe(this,void 0,void 0,function*(){let{force:n,recursive:i,copySourceDirectory:s}=Gs(r),o=(yield R.exists(t))?yield R.stat(t):null;if(o&&o.isFile()&&!n)return;let c=o&&o.isDirectory()&&s?te.join(t,te.basename(e)):t;if(!(yield R.exists(e)))throw new Error(`no such file or directory: ${e}`);if((yield R.stat(e)).isDirectory())if(i)yield cn(e,c,0,n);else throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);else {if(te.relative(e,c)==="")throw new Error(`'${c}' and '${e}' are the same file`);yield un(e,c,n);}})}P.cp=Fs;function Bs(e,t,r={}){return fe(this,void 0,void 0,function*(){if(yield R.exists(t)){let n=!0;if((yield R.isDirectory(t))&&(t=te.join(t,te.basename(e)),n=yield R.exists(t)),n)if(r.force==null||r.force)yield sn(t);else throw new Error("Destination already exists")}yield Ut(te.dirname(t)),yield R.rename(e,t);})}P.mv=Bs;function sn(e){return fe(this,void 0,void 0,function*(){if(R.IS_WINDOWS&&/[*"<>|]/.test(e))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield R.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300});}catch(t){throw new Error(`File was unable to be removed ${t}`)}})}P.rmRF=sn;function Ut(e){return fe(this,void 0,void 0,function*(){qs.ok(e,"a path argument must be provided"),yield R.mkdir(e,{recursive:!0});})}P.mkdirP=Ut;function on(e,t){return fe(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");if(t){let n=yield on(e,!1);if(!n)throw R.IS_WINDOWS?new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return n}let r=yield an(e);return r&&r.length>0?r[0]:""})}P.which=on;function an(e){return fe(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");let t=[];if(R.IS_WINDOWS&&process.env.PATHEXT)for(let i of process.env.PATHEXT.split(te.delimiter))i&&t.push(i);if(R.isRooted(e)){let i=yield R.tryGetExecutablePath(e,t);return i?[i]:[]}if(e.includes(te.sep))return [];let r=[];if(process.env.PATH)for(let i of process.env.PATH.split(te.delimiter))i&&r.push(i);let n=[];for(let i of r){let s=yield R.tryGetExecutablePath(te.join(i,e),t);s&&n.push(s);}return n})}P.findInPath=an;function Gs(e){let t=e.force==null?!0:e.force,r=!!e.recursive,n=e.copySourceDirectory==null?!0:!!e.copySourceDirectory;return {force:t,recursive:r,copySourceDirectory:n}}function cn(e,t,r,n){return fe(this,void 0,void 0,function*(){if(r>=255)return;r++,yield Ut(t);let i=yield R.readdir(e);for(let s of i){let o=`${e}/${s}`,c=`${t}/${s}`;(yield R.lstat(o)).isDirectory()?yield cn(o,c,r,n):yield un(o,c,n);}yield R.chmod(t,(yield R.stat(e)).mode);})}function un(e,t,r){return fe(this,void 0,void 0,function*(){if((yield R.lstat(e)).isSymbolicLink()){try{yield R.lstat(t),yield R.unlink(t);}catch(i){i.code==="EPERM"&&(yield R.chmod(t,"0666"),yield R.unlink(t));}let n=yield R.readlink(e);yield R.symlink(n,t,R.IS_WINDOWS?"junction":null);}else (!(yield R.exists(t))||r)&&(yield R.copyFile(e,t));})}});var Xt=b((v,pn)=>{v=pn.exports=g;var T;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?T=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e);}:T=function(){};v.SEMVER_SPEC_VERSION="2.0.0";var Ce=256,Ze=Number.MAX_SAFE_INTEGER||9007199254740991,Mt=16,Vs=Ce-6,Se=v.re=[],S=v.safeRe=[],d=v.src=[],f=v.tokens={},dn=0;function y(e){f[e]=dn++;}var Ft="[a-zA-Z0-9-]",qt=[["\\s",1],["\\d",Ce],[Ft,Vs]];function De(e){for(var t=0;t)?=?)";y("XRANGEIDENTIFIERLOOSE");d[f.XRANGEIDENTIFIERLOOSE]=d[f.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";y("XRANGEIDENTIFIER");d[f.XRANGEIDENTIFIER]=d[f.NUMERICIDENTIFIER]+"|x|X|\\*";y("XRANGEPLAIN");d[f.XRANGEPLAIN]="[v=\\s]*("+d[f.XRANGEIDENTIFIER]+")(?:\\.("+d[f.XRANGEIDENTIFIER]+")(?:\\.("+d[f.XRANGEIDENTIFIER]+")(?:"+d[f.PRERELEASE]+")?"+d[f.BUILD]+"?)?)?";y("XRANGEPLAINLOOSE");d[f.XRANGEPLAINLOOSE]="[v=\\s]*("+d[f.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+d[f.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+d[f.XRANGEIDENTIFIERLOOSE]+")(?:"+d[f.PRERELEASELOOSE]+")?"+d[f.BUILD]+"?)?)?";y("XRANGE");d[f.XRANGE]="^"+d[f.GTLT]+"\\s*"+d[f.XRANGEPLAIN]+"$";y("XRANGELOOSE");d[f.XRANGELOOSE]="^"+d[f.GTLT]+"\\s*"+d[f.XRANGEPLAINLOOSE]+"$";y("COERCE");d[f.COERCE]="(^|[^\\d])(\\d{1,"+Mt+"})(?:\\.(\\d{1,"+Mt+"}))?(?:\\.(\\d{1,"+Mt+"}))?(?:$|[^\\d])";y("COERCERTL");Se[f.COERCERTL]=new RegExp(d[f.COERCE],"g");S[f.COERCERTL]=new RegExp(De(d[f.COERCE]),"g");y("LONETILDE");d[f.LONETILDE]="(?:~>?)";y("TILDETRIM");d[f.TILDETRIM]="(\\s*)"+d[f.LONETILDE]+"\\s+";Se[f.TILDETRIM]=new RegExp(d[f.TILDETRIM],"g");S[f.TILDETRIM]=new RegExp(De(d[f.TILDETRIM]),"g");var ks="$1~";y("TILDE");d[f.TILDE]="^"+d[f.LONETILDE]+d[f.XRANGEPLAIN]+"$";y("TILDELOOSE");d[f.TILDELOOSE]="^"+d[f.LONETILDE]+d[f.XRANGEPLAINLOOSE]+"$";y("LONECARET");d[f.LONECARET]="(?:\\^)";y("CARETTRIM");d[f.CARETTRIM]="(\\s*)"+d[f.LONECARET]+"\\s+";Se[f.CARETTRIM]=new RegExp(d[f.CARETTRIM],"g");S[f.CARETTRIM]=new RegExp(De(d[f.CARETTRIM]),"g");var Xs="$1^";y("CARET");d[f.CARET]="^"+d[f.LONECARET]+d[f.XRANGEPLAIN]+"$";y("CARETLOOSE");d[f.CARETLOOSE]="^"+d[f.LONECARET]+d[f.XRANGEPLAINLOOSE]+"$";y("COMPARATORLOOSE");d[f.COMPARATORLOOSE]="^"+d[f.GTLT]+"\\s*("+d[f.LOOSEPLAIN]+")$|^$";y("COMPARATOR");d[f.COMPARATOR]="^"+d[f.GTLT]+"\\s*("+d[f.FULLPLAIN]+")$|^$";y("COMPARATORTRIM");d[f.COMPARATORTRIM]="(\\s*)"+d[f.GTLT]+"\\s*("+d[f.LOOSEPLAIN]+"|"+d[f.XRANGEPLAIN]+")";Se[f.COMPARATORTRIM]=new RegExp(d[f.COMPARATORTRIM],"g");S[f.COMPARATORTRIM]=new RegExp(De(d[f.COMPARATORTRIM]),"g");var Ws="$1$2$3";y("HYPHENRANGE");d[f.HYPHENRANGE]="^\\s*("+d[f.XRANGEPLAIN]+")\\s+-\\s+("+d[f.XRANGEPLAIN]+")\\s*$";y("HYPHENRANGELOOSE");d[f.HYPHENRANGELOOSE]="^\\s*("+d[f.XRANGEPLAINLOOSE]+")\\s+-\\s+("+d[f.XRANGEPLAINLOOSE]+")\\s*$";y("STAR");d[f.STAR]="(<|>)?=?\\s*\\*";for(re=0;reCe)return null;var r=t.loose?S[f.LOOSE]:S[f.FULL];if(!r.test(e))return null;try{return new g(e,t)}catch{return null}}v.valid=Hs;function Hs(e,t){var r=ve(e,t);return r?r.version:null}v.clean=zs;function zs(e,t){var r=ve(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}v.SemVer=g;function g(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof g){if(e.loose===t.loose)return e;e=e.version;}else if(typeof e!="string")throw new TypeError("Invalid Version: "+e);if(e.length>Ce)throw new TypeError("version is longer than "+Ce+" characters");if(!(this instanceof g))return new g(e,t);T("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?S[f.LOOSE]:S[f.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Ze||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ze||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ze||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var i=+n;if(i>=0&&i=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0);}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this};v.inc=Js;function Js(e,t,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new g(e,r).inc(t,n).version}catch{return null}}v.diff=Ks;function Ks(e,t){if(Bt(e,t))return null;var r=ve(e),n=ve(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease";}for(var o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==n[o])return i+o;return s}v.compareIdentifiers=Ee;var ln=/^[0-9]+$/;function Ee(e,t){var r=ln.test(e),n=ln.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}v.lt=Qe;function Qe(e,t,r){return se(e,t,r)<0}v.eq=Bt;function Bt(e,t,r){return se(e,t,r)===0}v.neq=hn;function hn(e,t,r){return se(e,t,r)!==0}v.gte=Gt;function Gt(e,t,r){return se(e,t,r)>=0}v.lte=Vt;function Vt(e,t,r){return se(e,t,r)<=0}v.cmp=et;function et(e,t,r,n){switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Bt(e,r,n);case"!=":return hn(e,r,n);case">":return Le(e,r,n);case">=":return Gt(e,r,n);case"<":return Qe(e,r,n);case"<=":return Vt(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}v.Comparator=J;function J(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof J){if(e.loose===!!t.loose)return e;e=e.value;}if(!(this instanceof J))return new J(e,t);e=e.trim().split(/\s+/).join(" "),T("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Te?this.value="":this.value=this.operator+this.semver.version,T("comp",this);}var Te={};J.prototype.parse=function(e){var t=this.options.loose?S[f.COMPARATORLOOSE]:S[f.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new g(r[2],this.options.loose):this.semver=Te;};J.prototype.toString=function(){return this.value};J.prototype.test=function(e){if(T("Comparator.test",e,this.options.loose),this.semver===Te||e===Te)return !0;if(typeof e=="string")try{e=new g(e,this.options);}catch{return !1}return et(e,this.operator,this.semver,this.options)};J.prototype.intersects=function(e,t){if(!(e instanceof J))throw new TypeError("a Comparator is required");(!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1});var r;if(this.operator==="")return this.value===""?!0:(r=new x(e.value,t),tt(this.value,r,t));if(e.operator==="")return e.value===""?!0:(r=new x(this.value,t),tt(e.semver,r,t));var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),c=et(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=et(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&o||c||u};v.Range=x;function x(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof x)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new x(e.raw,t);if(e instanceof J)return new x(e.value,t);if(!(this instanceof x))return new x(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format();}x.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range};x.prototype.toString=function(){return this.range};x.prototype.parseRange=function(e){var t=this.options.loose,r=t?S[f.HYPHENRANGELOOSE]:S[f.HYPHENRANGE];e=e.replace(r,Eo),T("hyphen replace",e),e=e.replace(S[f.COMPARATORTRIM],Ws),T("comparator trim",e,S[f.COMPARATORTRIM]),e=e.replace(S[f.TILDETRIM],ks),e=e.replace(S[f.CARETTRIM],Xs),e=e.split(/\s+/).join(" ");var n=t?S[f.COMPARATORLOOSE]:S[f.COMPARATOR],i=e.split(" ").map(function(s){return ao(s,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter(function(s){return !!s.match(n)})),i=i.map(function(s){return new J(s,this.options)},this),i};x.prototype.intersects=function(e,t){if(!(e instanceof x))throw new TypeError("a Range is required");return this.set.some(function(r){return fn(r,t)&&e.set.some(function(n){return fn(n,t)&&r.every(function(i){return n.every(function(s){return i.intersects(s,t)})})})})};function fn(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every(function(s){return i.intersects(s,t)}),i=n.pop();return r}v.toComparators=oo;function oo(e,t){return new x(e,t).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}function ao(e,t){return T("comp",e,t),e=lo(e,t),T("caret",e),e=co(e,t),T("tildes",e),e=ho(e,t),T("xrange",e),e=mo(e,t),T("stars",e),e}function M(e){return !e||e.toLowerCase()==="x"||e==="*"}function co(e,t){return e.trim().split(/\s+/).map(function(r){return uo(r,t)}).join(" ")}function uo(e,t){var r=t.loose?S[f.TILDELOOSE]:S[f.TILDE];return e.replace(r,function(n,i,s,o,c){T("tilde",e,n,i,s,o,c);var u;return M(i)?u="":M(s)?u=">="+i+".0.0 <"+(+i+1)+".0.0":M(o)?u=">="+i+"."+s+".0 <"+i+"."+(+s+1)+".0":c?(T("replaceTilde pr",c),u=">="+i+"."+s+"."+o+"-"+c+" <"+i+"."+(+s+1)+".0"):u=">="+i+"."+s+"."+o+" <"+i+"."+(+s+1)+".0",T("tilde return",u),u})}function lo(e,t){return e.trim().split(/\s+/).map(function(r){return fo(r,t)}).join(" ")}function fo(e,t){T("caret",e,t);var r=t.loose?S[f.CARETLOOSE]:S[f.CARET];return e.replace(r,function(n,i,s,o,c){T("caret",e,n,i,s,o,c);var u;return M(i)?u="":M(s)?u=">="+i+".0.0 <"+(+i+1)+".0.0":M(o)?i==="0"?u=">="+i+"."+s+".0 <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+".0 <"+(+i+1)+".0.0":c?(T("replaceCaret pr",c),i==="0"?s==="0"?u=">="+i+"."+s+"."+o+"-"+c+" <"+i+"."+s+"."+(+o+1):u=">="+i+"."+s+"."+o+"-"+c+" <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+"."+o+"-"+c+" <"+(+i+1)+".0.0"):(T("no pr"),i==="0"?s==="0"?u=">="+i+"."+s+"."+o+" <"+i+"."+s+"."+(+o+1):u=">="+i+"."+s+"."+o+" <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+"."+o+" <"+(+i+1)+".0.0"),T("caret return",u),u})}function ho(e,t){return T("replaceXRanges",e,t),e.split(/\s+/).map(function(r){return po(r,t)}).join(" ")}function po(e,t){e=e.trim();var r=t.loose?S[f.XRANGELOOSE]:S[f.XRANGE];return e.replace(r,function(n,i,s,o,c,u){T("xRange",e,n,i,s,o,c,u);var l=M(s),a=l||M(o),h=a||M(c),E=h;return i==="="&&E&&(i=""),u=t.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&E?(a&&(o=0),c=0,i===">"?(i=">=",a?(s=+s+1,o=0,c=0):(o=+o+1,c=0)):i==="<="&&(i="<",a?s=+s+1:o=+o+1),n=i+s+"."+o+"."+c+u):a?n=">="+s+".0.0"+u+" <"+(+s+1)+".0.0"+u:h&&(n=">="+s+"."+o+".0"+u+" <"+s+"."+(+o+1)+".0"+u),T("xRange return",n),n})}function mo(e,t){return T("replaceStars",e,t),e.trim().replace(S[f.STAR],"")}function Eo(e,t,r,n,i,s,o,c,u,l,a,h,E){return M(r)?t="":M(n)?t=">="+r+".0.0":M(i)?t=">="+r+"."+n+".0":t=">="+t,M(u)?c="":M(l)?c="<"+(+u+1)+".0.0":M(a)?c="<"+u+"."+(+l+1)+".0":h?c="<="+u+"."+l+"."+a+"-"+h:c="<="+c,(t+" "+c).trim()}x.prototype.test=function(e){if(!e)return !1;if(typeof e=="string")try{e=new g(e,this.options);}catch{return !1}for(var t=0;t0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return !0}return !1}return !0}v.satisfies=tt;function tt(e,t,r){try{t=new x(t,r);}catch{return !1}return t.test(e)}v.maxSatisfying=go;function go(e,t,r){var n=null,i=null;try{var s=new x(t,r);}catch{return null}return e.forEach(function(o){s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new g(n,r));}),n}v.minSatisfying=wo;function wo(e,t,r){var n=null,i=null;try{var s=new x(t,r);}catch{return null}return e.forEach(function(o){s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new g(n,r));}),n}v.minVersion=yo;function yo(e,t){e=new x(e,t);var r=new g("0.0.0");if(e.test(r)||(r=new g("0.0.0-0"),e.test(r)))return r;r=null;for(var n=0;n":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!r||Le(r,o))&&(r=o);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+s.operator)}});}return r&&e.test(r)?r:null}v.validRange=_o;function _o(e,t){try{return new x(e,t).range||"*"}catch{return null}}v.ltr=Oo;function Oo(e,t,r){return kt(e,t,"<",r)}v.gtr=Ro;function Ro(e,t,r){return kt(e,t,">",r)}v.outside=kt;function kt(e,t,r,n){e=new g(e,n),t=new x(t,n);var i,s,o,c,u;switch(r){case">":i=Le,s=Vt,o=Qe,c=">",u=">=";break;case"<":i=Qe,s=Gt,o=Le,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(tt(e,t,n))return !1;for(var l=0;l=0.0.0")),h=h||C,E=E||C,i(C.semver,h.semver,n)?h=C:o(C.semver,E.semver,n)&&(E=C);}),h.operator===c||h.operator===u||(!E.operator||E.operator===c)&&s(e,E.semver))return !1;if(E.operator===u&&o(e,E.semver))return !1}return !0}v.prerelease=So;function So(e,t){var r=ve(e,t);return r&&r.prerelease.length?r.prerelease:null}v.intersects=To;function To(e,t,r){return e=new x(e,r),t=new x(t,r),e.intersects(t)}v.coerce=Io;function Io(e,t){if(e instanceof g)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};var r=null;if(!t.rtl)r=e.match(S[f.COERCE]);else {for(var n;(n=S[f.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),S[f.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;S[f.COERCERTL].lastIndex=-1;}return r===null?null:ve(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}});var vn=b((D,Ht)=>{var Ao=D&&D.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),bo=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),xo=D&&D.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ao(t,e,r);return bo(t,e),t},Po=D&&D.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(D,"__esModule",{value:!0});D._readLinuxVersionFile=D._getOsVersion=D._findMatch=void 0;var mn=xo(Xt()),Wt=pe(),En=_("os"),No=_("child_process"),rt=_("fs");function Co(e,t,r,n){return Po(this,void 0,void 0,function*(){let i=En.platform(),s,o,c;for(let u of r){let l=u.version;if(Wt.debug(`check ${l} satisfies ${e}`),mn.satisfies(l,e)&&(!t||u.stable===t)&&(c=u.files.find(a=>{Wt.debug(`${a.arch}===${n} && ${a.platform}===${i}`);let h=a.arch===n&&a.platform===i;if(h&&a.platform_version){let E=Ht.exports._getOsVersion();E===a.platform_version?h=!0:h=mn.satisfies(E,a.platform_version);}return h}),c)){Wt.debug(`matched ${u.version}`),o=u;break}}return o&&c&&(s=Object.assign({},o),s.files=[c]),s})}D._findMatch=Co;function Lo(){let e=En.platform(),t="";if(e==="darwin")t=No.execSync("sw_vers -productVersion").toString();else if(e==="linux"){let r=Ht.exports._readLinuxVersionFile();if(r){let n=r.split(` -`);for(let i of n){let s=i.split("=");if(s.length===2&&(s[0].trim()==="VERSION_ID"||s[0].trim()==="DISTRIB_RELEASE")){t=s[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return t}D._getOsVersion=Lo;function Do(){let e="/etc/lsb-release",t="/etc/os-release",r="";return rt.existsSync(e)?r=rt.readFileSync(e).toString():rt.existsSync(t)&&(r=rt.readFileSync(t).toString()),r}D._readLinuxVersionFile=Do;});var wn=b((nu,gn)=>{var $o=_("crypto");gn.exports=function(){return $o.randomBytes(16)};});var On=b((iu,_n)=>{var yn=[];for($e=0;$e<256;++$e)yn[$e]=($e+256).toString(16).substr(1);var $e;function Uo(e,t){var r=t||0,n=yn;return [n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")}_n.exports=Uo;});var Sn=b((su,Rn)=>{var jo=wn(),Mo=On();function qo(e,t,r){var n=t&&r||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||jo)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t)for(var s=0;s<16;++s)t[n+s]=i[s];return t||Mo(i)}Rn.exports=qo;});var bn=b(V=>{var Fo=V&&V.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Bo=V&&V.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Ie=V&&V.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Fo(t,e,r);return Bo(t,e),t},Tn=V&&V.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(V,"__esModule",{value:!0});V.argStringToArray=V.ToolRunner=void 0;var nt=Ie(_("os")),An=Ie(_("events")),Go=Ie(_("child_process")),Vo=Ie(_("path")),ko=Ie(jt()),In=Ie($t()),Xo=_("timers"),it=process.platform==="win32",zt=class extends An.EventEmitter{constructor(t,r,n){if(super(),!t)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=t,this.args=r||[],this.options=n||{};}_debug(t){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(t);}_getCommandString(t,r){let n=this._getSpawnFileName(),i=this._getSpawnArgs(t),s=r?"":"[command]";if(it)if(this._isCmdFile()){s+=n;for(let o of i)s+=` ${o}`;}else if(t.windowsVerbatimArguments){s+=`"${n}"`;for(let o of i)s+=` ${o}`;}else {s+=this._windowsQuoteCmdArg(n);for(let o of i)s+=` ${this._windowsQuoteCmdArg(o)}`;}else {s+=n;for(let o of i)s+=` ${o}`;}return s}_processLineBuffer(t,r,n){try{let i=r+t.toString(),s=i.indexOf(nt.EOL);for(;s>-1;){let o=i.substring(0,s);n(o),i=i.substring(s+nt.EOL.length),s=i.indexOf(nt.EOL);}return i}catch(i){return this._debug(`error processing line. Failed with error ${i}`),""}}_getSpawnFileName(){return it&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(t){if(it&&this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let n of this.args)r+=" ",r+=t.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return r+='"',[r]}return this.args}_endsWith(t,r){return t.endsWith(r)}_isCmdFile(){let t=this.toolPath.toUpperCase();return this._endsWith(t,".CMD")||this._endsWith(t,".BAT")}_windowsQuoteCmdArg(t){if(!this._isCmdFile())return this._uvQuoteCmdArg(t);if(!t)return '""';let r=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],n=!1;for(let o of t)if(r.some(c=>c===o)){n=!0;break}if(!n)return t;let i='"',s=!0;for(let o=t.length;o>0;o--)i+=t[o-1],s&&t[o-1]==="\\"?i+="\\":t[o-1]==='"'?(s=!0,i+='"'):s=!1;return i+='"',i.split("").reverse().join("")}_uvQuoteCmdArg(t){if(!t)return '""';if(!t.includes(" ")&&!t.includes(" ")&&!t.includes('"'))return t;if(!t.includes('"')&&!t.includes("\\"))return `"${t}"`;let r='"',n=!0;for(let i=t.length;i>0;i--)r+=t[i-1],n&&t[i-1]==="\\"?r+="\\":t[i-1]==='"'?(n=!0,r+="\\"):n=!1;return r+='"',r.split("").reverse().join("")}_cloneExecOptions(t){t=t||{};let r={cwd:t.cwd||process.cwd(),env:t.env||process.env,silent:t.silent||!1,windowsVerbatimArguments:t.windowsVerbatimArguments||!1,failOnStdErr:t.failOnStdErr||!1,ignoreReturnCode:t.ignoreReturnCode||!1,delay:t.delay||1e4};return r.outStream=t.outStream||process.stdout,r.errStream=t.errStream||process.stderr,r}_getSpawnOptions(t,r){t=t||{};let n={};return n.cwd=t.cwd,n.env=t.env,n.windowsVerbatimArguments=t.windowsVerbatimArguments||this._isCmdFile(),t.windowsVerbatimArguments&&(n.argv0=`"${r}"`),n}exec(){return Tn(this,void 0,void 0,function*(){return !In.isRooted(this.toolPath)&&(this.toolPath.includes("/")||it&&this.toolPath.includes("\\"))&&(this.toolPath=Vo.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield ko.which(this.toolPath,!0),new Promise((t,r)=>Tn(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let l of this.args)this._debug(` ${l}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+nt.EOL);let i=new Jt(n,this.toolPath);if(i.on("debug",l=>{this._debug(l);}),this.options.cwd&&!(yield In.exists(this.options.cwd)))return r(new Error(`The cwd: ${this.options.cwd} does not exist!`));let s=this._getSpawnFileName(),o=Go.spawn(s,this._getSpawnArgs(n),this._getSpawnOptions(this.options,s)),c="";o.stdout&&o.stdout.on("data",l=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(l),!n.silent&&n.outStream&&n.outStream.write(l),c=this._processLineBuffer(l,c,a=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(a);});});let u="";if(o.stderr&&o.stderr.on("data",l=>{i.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(l),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(l),u=this._processLineBuffer(l,u,a=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(a);});}),o.on("error",l=>{i.processError=l.message,i.processExited=!0,i.processClosed=!0,i.CheckComplete();}),o.on("exit",l=>{i.processExitCode=l,i.processExited=!0,this._debug(`Exit code ${l} received from tool '${this.toolPath}'`),i.CheckComplete();}),o.on("close",l=>{i.processExitCode=l,i.processExited=!0,i.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),i.CheckComplete();}),i.on("done",(l,a)=>{c.length>0&&this.emit("stdline",c),u.length>0&&this.emit("errline",u),o.removeAllListeners(),l?r(l):t(a);}),this.options.input){if(!o.stdin)throw new Error("child process missing stdin");o.stdin.end(this.options.input);}}))})}};V.ToolRunner=zt;function Wo(e){let t=[],r=!1,n=!1,i="";function s(o){n&&o!=='"'&&(i+="\\"),i+=o,n=!1;}for(let o=0;o0&&(t.push(i),i="");continue}s(c);}return i.length>0&&t.push(i.trim()),t}V.argStringToArray=Wo;var Jt=class e extends An.EventEmitter{constructor(t,r){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!r)throw new Error("toolPath must not be empty");this.options=t,this.toolPath=r,t.delay&&(this.delay=t.delay);}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=Xo.setTimeout(e.HandleTimeout,this.delay,this)));}_debug(t){this.emit("debug",t);}_setResult(){let t;this.processExited&&(this.processError?t=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?t=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(t=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",t,this.processExitCode);}static HandleTimeout(t){if(!t.done){if(!t.processClosed&&t.processExited){let r=`The STDIO streams did not close within ${t.delay/1e3} seconds of the exit event from process '${t.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;t._debug(r);}t._setResult();}}};});var Kt=b(k=>{var Ho=k&&k.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),zo=k&&k.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Jo=k&&k.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ho(t,e,r);return zo(t,e),t},Nn=k&&k.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(k,"__esModule",{value:!0});k.getExecOutput=k.exec=void 0;var xn=_("string_decoder"),Pn=Jo(bn());function Cn(e,t,r){return Nn(this,void 0,void 0,function*(){let n=Pn.argStringToArray(e);if(n.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let i=n[0];return t=n.slice(1).concat(t||[]),new Pn.ToolRunner(i,t,r).exec()})}k.exec=Cn;function Ko(e,t,r){var n,i;return Nn(this,void 0,void 0,function*(){let s="",o="",c=new xn.StringDecoder("utf8"),u=new xn.StringDecoder("utf8"),l=(n=r?.listeners)===null||n===void 0?void 0:n.stdout,a=(i=r?.listeners)===null||i===void 0?void 0:i.stderr,h=be=>{o+=u.write(be),a&&a(be);},E=be=>{s+=c.write(be),l&&l(be);},C=Object.assign(Object.assign({},r?.listeners),{stdout:E,stderr:h}),he=yield Cn(e,t,Object.assign(Object.assign({},r),{listeners:C}));return s+=c.end(),o+=u.end(),{exitCode:he,stdout:s,stderr:o}})}k.getExecOutput=Ko;});var $n=b(K=>{var Yo=K&&K.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Zo=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Qo=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Yo(t,e,r);return Zo(t,e),t},Ln=K&&K.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(K,"__esModule",{value:!0});K.RetryHelper=void 0;var Dn=Qo(pe()),Yt=class{constructor(t,r,n){if(t<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=t,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(t,r){return Ln(this,void 0,void 0,function*(){let n=1;for(;nsetTimeout(r,t*1e3))})}};K.RetryHelper=Yt;});var Vn=b(w=>{var ea=w&&w.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),ta=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),ne=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&ea(t,e,r);return ta(t,e),t},q=w&&w.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})},ra=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(w,"__esModule",{value:!0});w.evaluateVersions=w.isExplicitVersion=w.findFromManifest=w.getManifestFromRepo=w.findAllVersions=w.find=w.cacheFile=w.cacheDir=w.extractZip=w.extractXar=w.extractTar=w.extract7z=w.downloadTool=w.HTTPError=void 0;var O=ne(pe()),X=ne(jt()),Y=ne(_("fs")),na=ne(vn()),je=ne(_("os")),Q=ne(_("path")),Un=ne(wt()),oe=ne(Xt()),ia=ne(_("stream")),sa=ne(_("util")),Ae=_("assert"),jn=ra(Sn()),de=Kt(),oa=$n(),Ue=class extends Error{constructor(t){super(`Unexpected HTTP response: ${t}`),this.httpStatusCode=t,Object.setPrototypeOf(this,new.target.prototype);}};w.HTTPError=Ue;var Qt=process.platform==="win32",aa=process.platform==="darwin",ca="actions/tool-cache";function ua(e,t,r,n){return q(this,void 0,void 0,function*(){t=t||Q.join(Gn(),jn.default()),yield X.mkdirP(Q.dirname(t)),O.debug(`Downloading ${e}`),O.debug(`Destination ${t}`);let i=3,s=Zt("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=Zt("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new oa.RetryHelper(i,s,o).execute(()=>q(this,void 0,void 0,function*(){return yield la(e,t||"",r,n)}),u=>!(u instanceof Ue&&u.httpStatusCode&&u.httpStatusCode<500&&u.httpStatusCode!==408&&u.httpStatusCode!==429))})}w.downloadTool=ua;function la(e,t,r,n){return q(this,void 0,void 0,function*(){if(Y.existsSync(t))throw new Error(`Destination file path ${t} already exists`);let i=new Un.HttpClient(ca,[],{allowRetries:!1});r&&(O.debug("set auth"),n===void 0&&(n={}),n.authorization=r);let s=yield i.get(e,n);if(s.message.statusCode!==200){let a=new Ue(s.message.statusCode);throw O.debug(`Failed to download from "${e}". Code(${s.message.statusCode}) Message(${s.message.statusMessage})`),a}let o=sa.promisify(ia.pipeline),u=Zt("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>s.message)(),l=!1;try{return yield o(u,Y.createWriteStream(t)),O.debug("download complete"),l=!0,t}finally{if(!l){O.debug("download failed");try{yield X.rmRF(t);}catch(a){O.debug(`Failed to delete '${t}'. ${a.message}`);}}}})}function fa(e,t,r){return q(this,void 0,void 0,function*(){Ae.ok(Qt,"extract7z() not supported on current OS"),Ae.ok(e,'parameter "file" is required'),t=yield st(t);let n=process.cwd();if(process.chdir(t),r)try{let s=["x",O.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],o={silent:!0};yield de.exec(`"${r}"`,s,o);}finally{process.chdir(n);}else {let i=Q.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,""),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),u=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${i}' -Source '${s}' -Target '${o}'`],l={silent:!0};try{let a=yield X.which("powershell",!0);yield de.exec(`"${a}"`,u,l);}finally{process.chdir(n);}}return t})}w.extract7z=fa;function da(e,t,r="xz"){return q(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'file' is required");t=yield st(t),O.debug("Checking tar --version");let n="";yield de.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:u=>n+=u.toString(),stderr:u=>n+=u.toString()}}),O.debug(n.trim());let i=n.toUpperCase().includes("GNU TAR"),s;r instanceof Array?s=r:s=[r],O.isDebug()&&!r.includes("v")&&s.push("-v");let o=t,c=e;return Qt&&i&&(s.push("--force-local"),o=t.replace(/\\/g,"/"),c=e.replace(/\\/g,"/")),i&&(s.push("--warning=no-unknown-keyword"),s.push("--overwrite")),s.push("-C",o,"-f",c),yield de.exec("tar",s),t})}w.extractTar=da;function ha(e,t,r=[]){return q(this,void 0,void 0,function*(){Ae.ok(aa,"extractXar() not supported on current OS"),Ae.ok(e,'parameter "file" is required'),t=yield st(t);let n;r instanceof Array?n=r:n=[r],n.push("-x","-C",t,"-f",e),O.isDebug()&&n.push("-v");let i=yield X.which("xar",!0);return yield de.exec(`"${i}"`,Oa(n)),t})}w.extractXar=ha;function pa(e,t){return q(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'file' is required");return t=yield st(t),Qt?yield ma(e,t):yield Ea(e,t),t})}w.extractZip=pa;function ma(e,t){return q(this,void 0,void 0,function*(){let r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=yield X.which("pwsh",!1);if(i){let o=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ")];O.debug(`Using pwsh at path: ${i}`),yield de.exec(`"${i}"`,o);}else {let o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ")],c=yield X.which("powershell",!0);O.debug(`Using powershell at path: ${c}`),yield de.exec(`"${c}"`,o);}})}function Ea(e,t){return q(this,void 0,void 0,function*(){let r=yield X.which("unzip",!0),n=[e];O.isDebug()||n.unshift("-q"),n.unshift("-o"),yield de.exec(`"${r}"`,n,{cwd:t});})}function va(e,t,r,n){return q(this,void 0,void 0,function*(){if(r=oe.clean(r)||r,n=n||je.arch(),O.debug(`Caching tool ${t} ${r} ${n}`),O.debug(`source dir: ${e}`),!Y.statSync(e).isDirectory())throw new Error("sourceDir is not a directory");let i=yield qn(t,r,n);for(let s of Y.readdirSync(e)){let o=Q.join(e,s);yield X.cp(o,i,{recursive:!0});}return Fn(t,r,n),i})}w.cacheDir=va;function ga(e,t,r,n,i){return q(this,void 0,void 0,function*(){if(n=oe.clean(n)||n,i=i||je.arch(),O.debug(`Caching tool ${r} ${n} ${i}`),O.debug(`source file: ${e}`),!Y.statSync(e).isFile())throw new Error("sourceFile is not a file");let s=yield qn(r,n,i),o=Q.join(s,t);return O.debug(`destination file ${o}`),yield X.cp(e,o),Fn(r,n,i),s})}w.cacheFile=ga;function wa(e,t,r){if(!e)throw new Error("toolName parameter is required");if(!t)throw new Error("versionSpec parameter is required");if(r=r||je.arch(),!er(t)){let i=Mn(e,r);t=Bn(i,t);}let n="";if(t){t=oe.clean(t)||"";let i=Q.join(ot(),e,t,r);O.debug(`checking cache: ${i}`),Y.existsSync(i)&&Y.existsSync(`${i}.complete`)?(O.debug(`Found tool in cache ${e} ${t} ${r}`),n=i):O.debug("not found");}return n}w.find=wa;function Mn(e,t){let r=[];t=t||je.arch();let n=Q.join(ot(),e);if(Y.existsSync(n)){let i=Y.readdirSync(n);for(let s of i)if(er(s)){let o=Q.join(n,s,t||"");Y.existsSync(o)&&Y.existsSync(`${o}.complete`)&&r.push(s);}}return r}w.findAllVersions=Mn;function ya(e,t,r,n="master"){return q(this,void 0,void 0,function*(){let i=[],s=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,o=new Un.HttpClient("tool-cache"),c={};r&&(O.debug("set auth"),c.authorization=r);let u=yield o.getJson(s,c);if(!u.result)return i;let l="";for(let h of u.result.tree)if(h.path==="versions-manifest.json"){l=h.url;break}c.accept="application/vnd.github.VERSION.raw";let a=yield (yield o.get(l,c)).readBody();if(a){a=a.replace(/^\uFEFF/,"");try{i=JSON.parse(a);}catch{O.debug("Invalid json");}}return i})}w.getManifestFromRepo=ya;function _a(e,t,r,n=je.arch()){return q(this,void 0,void 0,function*(){return yield na._findMatch(e,t,r,n)})}w.findFromManifest=_a;function st(e){return q(this,void 0,void 0,function*(){return e||(e=Q.join(Gn(),jn.default())),yield X.mkdirP(e),e})}function qn(e,t,r){return q(this,void 0,void 0,function*(){let n=Q.join(ot(),e,oe.clean(t)||t,r||"");O.debug(`destination ${n}`);let i=`${n}.complete`;return yield X.rmRF(n),yield X.rmRF(i),yield X.mkdirP(n),n})}function Fn(e,t,r){let i=`${Q.join(ot(),e,oe.clean(t)||t,r||"")}.complete`;Y.writeFileSync(i,""),O.debug("finished caching tool");}function er(e){let t=oe.clean(e)||"";O.debug(`isExplicit: ${t}`);let r=oe.valid(t)!=null;return O.debug(`explicit? ${r}`),r}w.isExplicitVersion=er;function Bn(e,t){let r="";O.debug(`evaluating ${e.length} versions`),e=e.sort((n,i)=>oe.gt(n,i)?1:-1);for(let n=e.length-1;n>=0;n--){let i=e[n];if(oe.satisfies(i,t)){r=i;break}}return r?O.debug(`matched: ${r}`):O.debug("match not found"),r}w.evaluateVersions=Bn;function ot(){let e=process.env.RUNNER_TOOL_CACHE||"";return Ae.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function Gn(){let e=process.env.RUNNER_TEMP||"";return Ae.ok(e,"Expected RUNNER_TEMP to be defined"),e}function Zt(e,t){let r=global[e];return r!==void 0?r:t}function Oa(e){return Array.from(new Set(e))}});var A=qe(pe());var Nt=(e,t=r=>r===void 0)=>e?Object.keys(e).reduce((n,i)=>(t(e[i])||(n[i]=e[i]),n),{}):{};var Ct=(e,t,r)=>{let n=t.split(/[\.\[\]]/g),i=e;for(let s of n){if(i===null||i===void 0)return r;s.trim()!==""&&(i=i[s]);}return i===void 0?r:i};var Lt=(e,t,r=/\{\{(.+?)\}\}/g)=>Array.from(e.matchAll(r)).reduce((n,i)=>n.replace(i[0],t[i[1]]),e);var ge=qe(pe()),$=qe(Vn()),kn=qe(Kt());async function Xn(e){if(!e.versionUrl)throw new Error("Version URL missing");let t=process.env.GITHUB_TOKEN||ge.getInput("token"),r=t?{headers:{Authorization:`Bearer ${t}`}}:{},i=await(await fetch(e.versionUrl,{...e.versionUrl.startsWith("https://api.github.com")?r:void 0})).text();if(e.versionPath&&(i=String(Ct(JSON.parse(i),e.versionPath))),e.versionRegex){let s=i.match(e.versionRegex);if(s)return s.groups?s.groups.version:s[0]}return i}async function Wn(e){if(!e.downloadUrl)throw new Error("Download URL missing");if(!e.version)throw new Error("Version missing");let t=e.preset||e.repo;if(t||(e.cache=!1,ge.warning("Tool name missing, disabling cache")),e.cache){let i=$.find(t,e.version);if(i)return i}let r=await $.downloadTool(e.downloadUrl);ge.debug("downloaded path: "+r);let n;return e.downloadUrl.endsWith(".tar.gz")?n=await $.extractTar(r):e.downloadUrl.endsWith(".7z")?n=await $.extract7z(r):e.downloadUrl.endsWith(".zip")?n=await $.extractZip(r):e.downloadUrl.endsWith(".pkg")&&(n=await $.extractXar(r)),ge.debug("extracted path: "+n),!n&&process.platform!=="win32"&&await(0, kn.exec)("chmod",["+x",r]),e.cache?n?await $.cacheDir(n,t,e.version):await $.cacheFile(r,e.downloadName||Ra__default.default.basename(e.downloadUrl),t,e.version):n||r}var Sa={"infisical-cli":{repo:"infisical/infisical",downloadUrl:"/releases/download/infisical-cli/v{{version}}/infisical_{{version}}_{{os}}_{{arch}}.{{archive}}"},"cloud-sql-proxy":{repo:"GoogleCloudPlatform/cloudsql-proxy",downloadUrl:"https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v{{version}}/cloud-sql-proxy.{{os}}.{{arch}}",downloadName:"cloud-sql-proxy"}},tr=Sa;async function Ia(){try{let e={os:process.platform==="win32"?"windows":process.platform,arch:process.arch==="x64"?"amd64":process.arch,arch2:process.arch,exe:process.platform==="win32"?".exe":"",archive:process.platform==="win32"?"zip":"tar.gz"},t={preset:A.getInput("preset"),repo:A.getInput("repo"),version:A.getInput("version"),versionUrl:A.getInput("version_url"),versionRegex:A.getInput("version_regex"),downloadUrl:A.getInput("download_url"),downloadName:A.getInput("download_name"),binPath:A.getInput("bin_path"),cache:A.getBooleanInput("cache")};if(A.debug("loaded config: "+JSON.stringify(t)),t.preset){if(!tr[t.preset])throw new Error(`Preset not found: ${t.preset}`);t={...t,...tr[t.preset],...Nt(t,n=>n==="")};}if(t.versionRegex&&typeof t.versionRegex=="string"&&(t.versionRegex=new RegExp(t.versionRegex)),!t.versionUrl&&!t.versionPath&&t.repo&&(t.versionPath="tag_name"),!t.versionUrl&&t.repo&&(t.versionUrl="https://api.github.com/repos/"+t.repo+"/releases/latest"),A.debug("resolved config: "+JSON.stringify(t)),!t.downloadUrl)throw new Error("Download URL missing");if(t.version==="latest"){let n=await Xn(t);if(!n)throw new Error("Version not found");t.version=n,A.debug("resolved version: "+t.version);}t.downloadUrl=Lt(t.downloadUrl,{...t,...e}),t.downloadUrl.startsWith("/")&&t.repo&&(t.downloadUrl="https://github.com/"+t.repo+t.downloadUrl),A.debug("templated download url: "+t.downloadUrl);let r=await Wn(t);A.debug("cached path: "+r),A.addPath(Ra__default.default.join(r,t.binPath)),A.info(`Successfully installed version ${t.version}`),A.setOutput("path",r),A.setOutput("version",t.version);}catch(e){e instanceof Error&&A.setFailed(e.message);}}Ia(); +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}m.getBooleanInput=ps;function ms(e,t){if(process.env.GITHUB_OUTPUT||"")return Ee.issueFileCommand("OUTPUT",Ee.prepareKeyValueMessage(e,t));process.stdout.write(Jr.EOL),z.issueCommand("set-output",{name:e},Re.toCommandValue(t));}m.setOutput=ms;function Es(e){z.issue("echo",e?"on":"off");}m.setCommandEcho=Es;function vs(e){process.exitCode=Kr.Failure,Yr(e);}m.setFailed=vs;function gs(){return process.env.RUNNER_DEBUG==="1"}m.isDebug=gs;function ws(e){z.issueCommand("debug",{},e);}m.debug=ws;function Yr(e,t={}){z.issueCommand("error",Re.toCommandProperties(t),e instanceof Error?e.toString():e);}m.error=Yr;function ys(e,t={}){z.issueCommand("warning",Re.toCommandProperties(t),e instanceof Error?e.toString():e);}m.warning=ys;function _s(e,t={}){z.issueCommand("notice",Re.toCommandProperties(t),e instanceof Error?e.toString():e);}m.notice=_s;function Os(e){process.stdout.write(e+Jr.EOL);}m.info=Os;function Zr(e){z.issue("group",e);}m.startGroup=Zr;function Qr(){z.issue("endgroup");}m.endGroup=Qr;function Rs(e,t){return zr(this,void 0,void 0,function*(){Zr(e);let r;try{r=yield t();}finally{Qr();}return r})}m.group=Rs;function Ss(e,t){if(process.env.GITHUB_STATE||"")return Ee.issueFileCommand("STATE",Ee.prepareKeyValueMessage(e,t));z.issueCommand("save-state",{name:e},Re.toCommandValue(t));}m.saveState=Ss;function Ts(e){return process.env[`STATE_${e}`]||""}m.getState=Ts;function Is(e){return zr(this,void 0,void 0,function*(){return yield us.OidcClient.getIDToken(e)})}m.getIDToken=Is;var As=bt();Object.defineProperty(m,"summary",{enumerable:!0,get:function(){return As.summary}});var bs=bt();Object.defineProperty(m,"markdownSummary",{enumerable:!0,get:function(){return bs.markdownSummary}});var Pt=Wr();Object.defineProperty(m,"toPosixPath",{enumerable:!0,get:function(){return Pt.toPosixPath}});Object.defineProperty(m,"toWin32Path",{enumerable:!0,get:function(){return Pt.toWin32Path}});Object.defineProperty(m,"toPlatformPath",{enumerable:!0,get:function(){return Pt.toPlatformPath}});});var $t=b(p=>{var xs=p&&p.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Ps=p&&p.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),tn=p&&p.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&xs(t,e,r);return Ps(t,e),t},Dt=p&&p.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})},G;Object.defineProperty(p,"__esModule",{value:!0});p.getCmdPath=p.tryGetExecutablePath=p.isRooted=p.isDirectory=p.exists=p.READONLY=p.UV_FS_O_EXLOCK=p.IS_WINDOWS=p.unlink=p.symlink=p.stat=p.rmdir=p.rm=p.rename=p.readlink=p.readdir=p.open=p.mkdir=p.lstat=p.copyFile=p.chmod=void 0;var rn=tn(_("fs")),Ye=tn(_("path"));G=rn.promises,p.chmod=G.chmod,p.copyFile=G.copyFile,p.lstat=G.lstat,p.mkdir=G.mkdir,p.open=G.open,p.readdir=G.readdir,p.readlink=G.readlink,p.rename=G.rename,p.rm=G.rm,p.rmdir=G.rmdir,p.stat=G.stat,p.symlink=G.symlink,p.unlink=G.unlink;p.IS_WINDOWS=process.platform==="win32";p.UV_FS_O_EXLOCK=268435456;p.READONLY=rn.constants.O_RDONLY;function Ns(e){return Dt(this,void 0,void 0,function*(){try{yield p.stat(e);}catch(t){if(t.code==="ENOENT")return !1;throw t}return !0})}p.exists=Ns;function Cs(e,t=!1){return Dt(this,void 0,void 0,function*(){return (t?yield p.stat(e):yield p.lstat(e)).isDirectory()})}p.isDirectory=Cs;function Ls(e){if(e=$s(e),!e)throw new Error('isRooted() parameter "p" cannot be empty');return p.IS_WINDOWS?e.startsWith("\\")||/^[A-Z]:/i.test(e):e.startsWith("/")}p.isRooted=Ls;function Ds(e,t){return Dt(this,void 0,void 0,function*(){let r;try{r=yield p.stat(e);}catch(i){i.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${i}`);}if(r&&r.isFile()){if(p.IS_WINDOWS){let i=Ye.extname(e).toUpperCase();if(t.some(s=>s.toUpperCase()===i))return e}else if(en(r))return e}let n=e;for(let i of t){e=n+i,r=void 0;try{r=yield p.stat(e);}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${s}`);}if(r&&r.isFile()){if(p.IS_WINDOWS){try{let s=Ye.dirname(e),o=Ye.basename(e).toUpperCase();for(let c of yield p.readdir(s))if(o===c.toUpperCase()){e=Ye.join(s,c);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${s}`);}return e}else if(en(r))return e}}return ""})}p.tryGetExecutablePath=Ds;function $s(e){return e=e||"",p.IS_WINDOWS?(e=e.replace(/\//g,"\\"),e.replace(/\\\\+/g,"\\")):e.replace(/\/\/+/g,"/")}function en(e){return (e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function Us(){var e;return (e=process.env.COMSPEC)!==null&&e!==void 0?e:"cmd.exe"}p.getCmdPath=Us;});var jt=b(P=>{var js=P&&P.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Ms=P&&P.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),nn=P&&P.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&js(t,e,r);return Ms(t,e),t},de=P&&P.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(P,"__esModule",{value:!0});P.findInPath=P.which=P.mkdirP=P.rmRF=P.mv=P.cp=void 0;var qs=_("assert"),te=nn(_("path")),R=nn($t());function Fs(e,t,r={}){return de(this,void 0,void 0,function*(){let{force:n,recursive:i,copySourceDirectory:s}=Gs(r),o=(yield R.exists(t))?yield R.stat(t):null;if(o&&o.isFile()&&!n)return;let c=o&&o.isDirectory()&&s?te.join(t,te.basename(e)):t;if(!(yield R.exists(e)))throw new Error(`no such file or directory: ${e}`);if((yield R.stat(e)).isDirectory())if(i)yield cn(e,c,0,n);else throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);else {if(te.relative(e,c)==="")throw new Error(`'${c}' and '${e}' are the same file`);yield un(e,c,n);}})}P.cp=Fs;function Bs(e,t,r={}){return de(this,void 0,void 0,function*(){if(yield R.exists(t)){let n=!0;if((yield R.isDirectory(t))&&(t=te.join(t,te.basename(e)),n=yield R.exists(t)),n)if(r.force==null||r.force)yield sn(t);else throw new Error("Destination already exists")}yield Ut(te.dirname(t)),yield R.rename(e,t);})}P.mv=Bs;function sn(e){return de(this,void 0,void 0,function*(){if(R.IS_WINDOWS&&/[*"<>|]/.test(e))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield R.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300});}catch(t){throw new Error(`File was unable to be removed ${t}`)}})}P.rmRF=sn;function Ut(e){return de(this,void 0,void 0,function*(){qs.ok(e,"a path argument must be provided"),yield R.mkdir(e,{recursive:!0});})}P.mkdirP=Ut;function on(e,t){return de(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");if(t){let n=yield on(e,!1);if(!n)throw R.IS_WINDOWS?new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`):new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);return n}let r=yield an(e);return r&&r.length>0?r[0]:""})}P.which=on;function an(e){return de(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");let t=[];if(R.IS_WINDOWS&&process.env.PATHEXT)for(let i of process.env.PATHEXT.split(te.delimiter))i&&t.push(i);if(R.isRooted(e)){let i=yield R.tryGetExecutablePath(e,t);return i?[i]:[]}if(e.includes(te.sep))return [];let r=[];if(process.env.PATH)for(let i of process.env.PATH.split(te.delimiter))i&&r.push(i);let n=[];for(let i of r){let s=yield R.tryGetExecutablePath(te.join(i,e),t);s&&n.push(s);}return n})}P.findInPath=an;function Gs(e){let t=e.force==null?!0:e.force,r=!!e.recursive,n=e.copySourceDirectory==null?!0:!!e.copySourceDirectory;return {force:t,recursive:r,copySourceDirectory:n}}function cn(e,t,r,n){return de(this,void 0,void 0,function*(){if(r>=255)return;r++,yield Ut(t);let i=yield R.readdir(e);for(let s of i){let o=`${e}/${s}`,c=`${t}/${s}`;(yield R.lstat(o)).isDirectory()?yield cn(o,c,r,n):yield un(o,c,n);}yield R.chmod(t,(yield R.stat(e)).mode);})}function un(e,t,r){return de(this,void 0,void 0,function*(){if((yield R.lstat(e)).isSymbolicLink()){try{yield R.lstat(t),yield R.unlink(t);}catch(i){i.code==="EPERM"&&(yield R.chmod(t,"0666"),yield R.unlink(t));}let n=yield R.readlink(e);yield R.symlink(n,t,R.IS_WINDOWS?"junction":null);}else (!(yield R.exists(t))||r)&&(yield R.copyFile(e,t));})}});var Xt=b((v,pn)=>{v=pn.exports=g;var T;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?T=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e);}:T=function(){};v.SEMVER_SPEC_VERSION="2.0.0";var Ce=256,Ze=Number.MAX_SAFE_INTEGER||9007199254740991,Mt=16,Vs=Ce-6,Se=v.re=[],S=v.safeRe=[],d=v.src=[],f=v.tokens={},dn=0;function y(e){f[e]=dn++;}var Ft="[a-zA-Z0-9-]",qt=[["\\s",1],["\\d",Ce],[Ft,Vs]];function De(e){for(var t=0;t)?=?)";y("XRANGEIDENTIFIERLOOSE");d[f.XRANGEIDENTIFIERLOOSE]=d[f.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";y("XRANGEIDENTIFIER");d[f.XRANGEIDENTIFIER]=d[f.NUMERICIDENTIFIER]+"|x|X|\\*";y("XRANGEPLAIN");d[f.XRANGEPLAIN]="[v=\\s]*("+d[f.XRANGEIDENTIFIER]+")(?:\\.("+d[f.XRANGEIDENTIFIER]+")(?:\\.("+d[f.XRANGEIDENTIFIER]+")(?:"+d[f.PRERELEASE]+")?"+d[f.BUILD]+"?)?)?";y("XRANGEPLAINLOOSE");d[f.XRANGEPLAINLOOSE]="[v=\\s]*("+d[f.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+d[f.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+d[f.XRANGEIDENTIFIERLOOSE]+")(?:"+d[f.PRERELEASELOOSE]+")?"+d[f.BUILD]+"?)?)?";y("XRANGE");d[f.XRANGE]="^"+d[f.GTLT]+"\\s*"+d[f.XRANGEPLAIN]+"$";y("XRANGELOOSE");d[f.XRANGELOOSE]="^"+d[f.GTLT]+"\\s*"+d[f.XRANGEPLAINLOOSE]+"$";y("COERCE");d[f.COERCE]="(^|[^\\d])(\\d{1,"+Mt+"})(?:\\.(\\d{1,"+Mt+"}))?(?:\\.(\\d{1,"+Mt+"}))?(?:$|[^\\d])";y("COERCERTL");Se[f.COERCERTL]=new RegExp(d[f.COERCE],"g");S[f.COERCERTL]=new RegExp(De(d[f.COERCE]),"g");y("LONETILDE");d[f.LONETILDE]="(?:~>?)";y("TILDETRIM");d[f.TILDETRIM]="(\\s*)"+d[f.LONETILDE]+"\\s+";Se[f.TILDETRIM]=new RegExp(d[f.TILDETRIM],"g");S[f.TILDETRIM]=new RegExp(De(d[f.TILDETRIM]),"g");var ks="$1~";y("TILDE");d[f.TILDE]="^"+d[f.LONETILDE]+d[f.XRANGEPLAIN]+"$";y("TILDELOOSE");d[f.TILDELOOSE]="^"+d[f.LONETILDE]+d[f.XRANGEPLAINLOOSE]+"$";y("LONECARET");d[f.LONECARET]="(?:\\^)";y("CARETTRIM");d[f.CARETTRIM]="(\\s*)"+d[f.LONECARET]+"\\s+";Se[f.CARETTRIM]=new RegExp(d[f.CARETTRIM],"g");S[f.CARETTRIM]=new RegExp(De(d[f.CARETTRIM]),"g");var Xs="$1^";y("CARET");d[f.CARET]="^"+d[f.LONECARET]+d[f.XRANGEPLAIN]+"$";y("CARETLOOSE");d[f.CARETLOOSE]="^"+d[f.LONECARET]+d[f.XRANGEPLAINLOOSE]+"$";y("COMPARATORLOOSE");d[f.COMPARATORLOOSE]="^"+d[f.GTLT]+"\\s*("+d[f.LOOSEPLAIN]+")$|^$";y("COMPARATOR");d[f.COMPARATOR]="^"+d[f.GTLT]+"\\s*("+d[f.FULLPLAIN]+")$|^$";y("COMPARATORTRIM");d[f.COMPARATORTRIM]="(\\s*)"+d[f.GTLT]+"\\s*("+d[f.LOOSEPLAIN]+"|"+d[f.XRANGEPLAIN]+")";Se[f.COMPARATORTRIM]=new RegExp(d[f.COMPARATORTRIM],"g");S[f.COMPARATORTRIM]=new RegExp(De(d[f.COMPARATORTRIM]),"g");var Ws="$1$2$3";y("HYPHENRANGE");d[f.HYPHENRANGE]="^\\s*("+d[f.XRANGEPLAIN]+")\\s+-\\s+("+d[f.XRANGEPLAIN]+")\\s*$";y("HYPHENRANGELOOSE");d[f.HYPHENRANGELOOSE]="^\\s*("+d[f.XRANGEPLAINLOOSE]+")\\s+-\\s+("+d[f.XRANGEPLAINLOOSE]+")\\s*$";y("STAR");d[f.STAR]="(<|>)?=?\\s*\\*";for(re=0;reCe)return null;var r=t.loose?S[f.LOOSE]:S[f.FULL];if(!r.test(e))return null;try{return new g(e,t)}catch{return null}}v.valid=Hs;function Hs(e,t){var r=ge(e,t);return r?r.version:null}v.clean=zs;function zs(e,t){var r=ge(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}v.SemVer=g;function g(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof g){if(e.loose===t.loose)return e;e=e.version;}else if(typeof e!="string")throw new TypeError("Invalid Version: "+e);if(e.length>Ce)throw new TypeError("version is longer than "+Ce+" characters");if(!(this instanceof g))return new g(e,t);T("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?S[f.LOOSE]:S[f.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Ze||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ze||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ze||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(n){if(/^[0-9]+$/.test(n)){var i=+n;if(i>=0&&i=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0);}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this};v.inc=Js;function Js(e,t,r,n){typeof r=="string"&&(n=r,r=void 0);try{return new g(e,r).inc(t,n).version}catch{return null}}v.diff=Ks;function Ks(e,t){if(Bt(e,t))return null;var r=ge(e),n=ge(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease";}for(var o in r)if((o==="major"||o==="minor"||o==="patch")&&r[o]!==n[o])return i+o;return s}v.compareIdentifiers=ve;var ln=/^[0-9]+$/;function ve(e,t){var r=ln.test(e),n=ln.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}v.lt=Qe;function Qe(e,t,r){return oe(e,t,r)<0}v.eq=Bt;function Bt(e,t,r){return oe(e,t,r)===0}v.neq=hn;function hn(e,t,r){return oe(e,t,r)!==0}v.gte=Gt;function Gt(e,t,r){return oe(e,t,r)>=0}v.lte=Vt;function Vt(e,t,r){return oe(e,t,r)<=0}v.cmp=et;function et(e,t,r,n){switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return Bt(e,r,n);case"!=":return hn(e,r,n);case">":return Le(e,r,n);case">=":return Gt(e,r,n);case"<":return Qe(e,r,n);case"<=":return Vt(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}v.Comparator=J;function J(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof J){if(e.loose===!!t.loose)return e;e=e.value;}if(!(this instanceof J))return new J(e,t);e=e.trim().split(/\s+/).join(" "),T("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Te?this.value="":this.value=this.operator+this.semver.version,T("comp",this);}var Te={};J.prototype.parse=function(e){var t=this.options.loose?S[f.COMPARATORLOOSE]:S[f.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new g(r[2],this.options.loose):this.semver=Te;};J.prototype.toString=function(){return this.value};J.prototype.test=function(e){if(T("Comparator.test",e,this.options.loose),this.semver===Te||e===Te)return !0;if(typeof e=="string")try{e=new g(e,this.options);}catch{return !1}return et(e,this.operator,this.semver,this.options)};J.prototype.intersects=function(e,t){if(!(e instanceof J))throw new TypeError("a Comparator is required");(!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1});var r;if(this.operator==="")return this.value===""?!0:(r=new x(e.value,t),tt(this.value,r,t));if(e.operator==="")return e.value===""?!0:(r=new x(this.value,t),tt(e.semver,r,t));var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),c=et(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),u=et(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return n||i||s&&o||c||u};v.Range=x;function x(e,t){if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),e instanceof x)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new x(e.raw,t);if(e instanceof J)return new x(e.value,t);if(!(this instanceof x))return new x(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(r){return this.parseRange(r.trim())},this).filter(function(r){return r.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format();}x.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range};x.prototype.toString=function(){return this.range};x.prototype.parseRange=function(e){var t=this.options.loose,r=t?S[f.HYPHENRANGELOOSE]:S[f.HYPHENRANGE];e=e.replace(r,Eo),T("hyphen replace",e),e=e.replace(S[f.COMPARATORTRIM],Ws),T("comparator trim",e,S[f.COMPARATORTRIM]),e=e.replace(S[f.TILDETRIM],ks),e=e.replace(S[f.CARETTRIM],Xs),e=e.split(/\s+/).join(" ");var n=t?S[f.COMPARATORLOOSE]:S[f.COMPARATOR],i=e.split(" ").map(function(s){return ao(s,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter(function(s){return !!s.match(n)})),i=i.map(function(s){return new J(s,this.options)},this),i};x.prototype.intersects=function(e,t){if(!(e instanceof x))throw new TypeError("a Range is required");return this.set.some(function(r){return fn(r,t)&&e.set.some(function(n){return fn(n,t)&&r.every(function(i){return n.every(function(s){return i.intersects(s,t)})})})})};function fn(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every(function(s){return i.intersects(s,t)}),i=n.pop();return r}v.toComparators=oo;function oo(e,t){return new x(e,t).set.map(function(r){return r.map(function(n){return n.value}).join(" ").trim().split(" ")})}function ao(e,t){return T("comp",e,t),e=lo(e,t),T("caret",e),e=co(e,t),T("tildes",e),e=ho(e,t),T("xrange",e),e=mo(e,t),T("stars",e),e}function M(e){return !e||e.toLowerCase()==="x"||e==="*"}function co(e,t){return e.trim().split(/\s+/).map(function(r){return uo(r,t)}).join(" ")}function uo(e,t){var r=t.loose?S[f.TILDELOOSE]:S[f.TILDE];return e.replace(r,function(n,i,s,o,c){T("tilde",e,n,i,s,o,c);var u;return M(i)?u="":M(s)?u=">="+i+".0.0 <"+(+i+1)+".0.0":M(o)?u=">="+i+"."+s+".0 <"+i+"."+(+s+1)+".0":c?(T("replaceTilde pr",c),u=">="+i+"."+s+"."+o+"-"+c+" <"+i+"."+(+s+1)+".0"):u=">="+i+"."+s+"."+o+" <"+i+"."+(+s+1)+".0",T("tilde return",u),u})}function lo(e,t){return e.trim().split(/\s+/).map(function(r){return fo(r,t)}).join(" ")}function fo(e,t){T("caret",e,t);var r=t.loose?S[f.CARETLOOSE]:S[f.CARET];return e.replace(r,function(n,i,s,o,c){T("caret",e,n,i,s,o,c);var u;return M(i)?u="":M(s)?u=">="+i+".0.0 <"+(+i+1)+".0.0":M(o)?i==="0"?u=">="+i+"."+s+".0 <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+".0 <"+(+i+1)+".0.0":c?(T("replaceCaret pr",c),i==="0"?s==="0"?u=">="+i+"."+s+"."+o+"-"+c+" <"+i+"."+s+"."+(+o+1):u=">="+i+"."+s+"."+o+"-"+c+" <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+"."+o+"-"+c+" <"+(+i+1)+".0.0"):(T("no pr"),i==="0"?s==="0"?u=">="+i+"."+s+"."+o+" <"+i+"."+s+"."+(+o+1):u=">="+i+"."+s+"."+o+" <"+i+"."+(+s+1)+".0":u=">="+i+"."+s+"."+o+" <"+(+i+1)+".0.0"),T("caret return",u),u})}function ho(e,t){return T("replaceXRanges",e,t),e.split(/\s+/).map(function(r){return po(r,t)}).join(" ")}function po(e,t){e=e.trim();var r=t.loose?S[f.XRANGELOOSE]:S[f.XRANGE];return e.replace(r,function(n,i,s,o,c,u){T("xRange",e,n,i,s,o,c,u);var l=M(s),a=l||M(o),h=a||M(c),E=h;return i==="="&&E&&(i=""),u=t.includePrerelease?"-0":"",l?i===">"||i==="<"?n="<0.0.0-0":n="*":i&&E?(a&&(o=0),c=0,i===">"?(i=">=",a?(s=+s+1,o=0,c=0):(o=+o+1,c=0)):i==="<="&&(i="<",a?s=+s+1:o=+o+1),n=i+s+"."+o+"."+c+u):a?n=">="+s+".0.0"+u+" <"+(+s+1)+".0.0"+u:h&&(n=">="+s+"."+o+".0"+u+" <"+s+"."+(+o+1)+".0"+u),T("xRange return",n),n})}function mo(e,t){return T("replaceStars",e,t),e.trim().replace(S[f.STAR],"")}function Eo(e,t,r,n,i,s,o,c,u,l,a,h,E){return M(r)?t="":M(n)?t=">="+r+".0.0":M(i)?t=">="+r+"."+n+".0":t=">="+t,M(u)?c="":M(l)?c="<"+(+u+1)+".0.0":M(a)?c="<"+u+"."+(+l+1)+".0":h?c="<="+u+"."+l+"."+a+"-"+h:c="<="+c,(t+" "+c).trim()}x.prototype.test=function(e){if(!e)return !1;if(typeof e=="string")try{e=new g(e,this.options);}catch{return !1}for(var t=0;t0){var i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return !0}return !1}return !0}v.satisfies=tt;function tt(e,t,r){try{t=new x(t,r);}catch{return !1}return t.test(e)}v.maxSatisfying=go;function go(e,t,r){var n=null,i=null;try{var s=new x(t,r);}catch{return null}return e.forEach(function(o){s.test(o)&&(!n||i.compare(o)===-1)&&(n=o,i=new g(n,r));}),n}v.minSatisfying=wo;function wo(e,t,r){var n=null,i=null;try{var s=new x(t,r);}catch{return null}return e.forEach(function(o){s.test(o)&&(!n||i.compare(o)===1)&&(n=o,i=new g(n,r));}),n}v.minVersion=yo;function yo(e,t){e=new x(e,t);var r=new g("0.0.0");if(e.test(r)||(r=new g("0.0.0-0"),e.test(r)))return r;r=null;for(var n=0;n":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!r||Le(r,o))&&(r=o);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+s.operator)}});}return r&&e.test(r)?r:null}v.validRange=_o;function _o(e,t){try{return new x(e,t).range||"*"}catch{return null}}v.ltr=Oo;function Oo(e,t,r){return kt(e,t,"<",r)}v.gtr=Ro;function Ro(e,t,r){return kt(e,t,">",r)}v.outside=kt;function kt(e,t,r,n){e=new g(e,n),t=new x(t,n);var i,s,o,c,u;switch(r){case">":i=Le,s=Vt,o=Qe,c=">",u=">=";break;case"<":i=Qe,s=Gt,o=Le,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(tt(e,t,n))return !1;for(var l=0;l=0.0.0")),h=h||L,E=E||L,i(L.semver,h.semver,n)?h=L:o(L.semver,E.semver,n)&&(E=L);}),h.operator===c||h.operator===u||(!E.operator||E.operator===c)&&s(e,E.semver))return !1;if(E.operator===u&&o(e,E.semver))return !1}return !0}v.prerelease=So;function So(e,t){var r=ge(e,t);return r&&r.prerelease.length?r.prerelease:null}v.intersects=To;function To(e,t,r){return e=new x(e,r),t=new x(t,r),e.intersects(t)}v.coerce=Io;function Io(e,t){if(e instanceof g)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};var r=null;if(!t.rtl)r=e.match(S[f.COERCE]);else {for(var n;(n=S[f.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||n.index+n[0].length!==r.index+r[0].length)&&(r=n),S[f.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;S[f.COERCERTL].lastIndex=-1;}return r===null?null:ge(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}});var vn=b(($,Ht)=>{var Ao=$&&$.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),bo=$&&$.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),xo=$&&$.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ao(t,e,r);return bo(t,e),t},Po=$&&$.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty($,"__esModule",{value:!0});$._readLinuxVersionFile=$._getOsVersion=$._findMatch=void 0;var mn=xo(Xt()),Wt=me(),En=_("os"),No=_("child_process"),rt=_("fs");function Co(e,t,r,n){return Po(this,void 0,void 0,function*(){let i=En.platform(),s,o,c;for(let u of r){let l=u.version;if(Wt.debug(`check ${l} satisfies ${e}`),mn.satisfies(l,e)&&(!t||u.stable===t)&&(c=u.files.find(a=>{Wt.debug(`${a.arch}===${n} && ${a.platform}===${i}`);let h=a.arch===n&&a.platform===i;if(h&&a.platform_version){let E=Ht.exports._getOsVersion();E===a.platform_version?h=!0:h=mn.satisfies(E,a.platform_version);}return h}),c)){Wt.debug(`matched ${u.version}`),o=u;break}}return o&&c&&(s=Object.assign({},o),s.files=[c]),s})}$._findMatch=Co;function Lo(){let e=En.platform(),t="";if(e==="darwin")t=No.execSync("sw_vers -productVersion").toString();else if(e==="linux"){let r=Ht.exports._readLinuxVersionFile();if(r){let n=r.split(` +`);for(let i of n){let s=i.split("=");if(s.length===2&&(s[0].trim()==="VERSION_ID"||s[0].trim()==="DISTRIB_RELEASE")){t=s[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return t}$._getOsVersion=Lo;function Do(){let e="/etc/lsb-release",t="/etc/os-release",r="";return rt.existsSync(e)?r=rt.readFileSync(e).toString():rt.existsSync(t)&&(r=rt.readFileSync(t).toString()),r}$._readLinuxVersionFile=Do;});var wn=b((nu,gn)=>{var $o=_("crypto");gn.exports=function(){return $o.randomBytes(16)};});var On=b((iu,_n)=>{var yn=[];for($e=0;$e<256;++$e)yn[$e]=($e+256).toString(16).substr(1);var $e;function Uo(e,t){var r=t||0,n=yn;return [n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")}_n.exports=Uo;});var Sn=b((su,Rn)=>{var jo=wn(),Mo=On();function qo(e,t,r){var n=t&&r||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||jo)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t)for(var s=0;s<16;++s)t[n+s]=i[s];return t||Mo(i)}Rn.exports=qo;});var bn=b(V=>{var Fo=V&&V.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Bo=V&&V.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Ie=V&&V.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Fo(t,e,r);return Bo(t,e),t},Tn=V&&V.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(V,"__esModule",{value:!0});V.argStringToArray=V.ToolRunner=void 0;var nt=Ie(_("os")),An=Ie(_("events")),Go=Ie(_("child_process")),Vo=Ie(_("path")),ko=Ie(jt()),In=Ie($t()),Xo=_("timers"),it=process.platform==="win32",zt=class extends An.EventEmitter{constructor(t,r,n){if(super(),!t)throw new Error("Parameter 'toolPath' cannot be null or empty.");this.toolPath=t,this.args=r||[],this.options=n||{};}_debug(t){this.options.listeners&&this.options.listeners.debug&&this.options.listeners.debug(t);}_getCommandString(t,r){let n=this._getSpawnFileName(),i=this._getSpawnArgs(t),s=r?"":"[command]";if(it)if(this._isCmdFile()){s+=n;for(let o of i)s+=` ${o}`;}else if(t.windowsVerbatimArguments){s+=`"${n}"`;for(let o of i)s+=` ${o}`;}else {s+=this._windowsQuoteCmdArg(n);for(let o of i)s+=` ${this._windowsQuoteCmdArg(o)}`;}else {s+=n;for(let o of i)s+=` ${o}`;}return s}_processLineBuffer(t,r,n){try{let i=r+t.toString(),s=i.indexOf(nt.EOL);for(;s>-1;){let o=i.substring(0,s);n(o),i=i.substring(s+nt.EOL.length),s=i.indexOf(nt.EOL);}return i}catch(i){return this._debug(`error processing line. Failed with error ${i}`),""}}_getSpawnFileName(){return it&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(t){if(it&&this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(let n of this.args)r+=" ",r+=t.windowsVerbatimArguments?n:this._windowsQuoteCmdArg(n);return r+='"',[r]}return this.args}_endsWith(t,r){return t.endsWith(r)}_isCmdFile(){let t=this.toolPath.toUpperCase();return this._endsWith(t,".CMD")||this._endsWith(t,".BAT")}_windowsQuoteCmdArg(t){if(!this._isCmdFile())return this._uvQuoteCmdArg(t);if(!t)return '""';let r=[" "," ","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'],n=!1;for(let o of t)if(r.some(c=>c===o)){n=!0;break}if(!n)return t;let i='"',s=!0;for(let o=t.length;o>0;o--)i+=t[o-1],s&&t[o-1]==="\\"?i+="\\":t[o-1]==='"'?(s=!0,i+='"'):s=!1;return i+='"',i.split("").reverse().join("")}_uvQuoteCmdArg(t){if(!t)return '""';if(!t.includes(" ")&&!t.includes(" ")&&!t.includes('"'))return t;if(!t.includes('"')&&!t.includes("\\"))return `"${t}"`;let r='"',n=!0;for(let i=t.length;i>0;i--)r+=t[i-1],n&&t[i-1]==="\\"?r+="\\":t[i-1]==='"'?(n=!0,r+="\\"):n=!1;return r+='"',r.split("").reverse().join("")}_cloneExecOptions(t){t=t||{};let r={cwd:t.cwd||process.cwd(),env:t.env||process.env,silent:t.silent||!1,windowsVerbatimArguments:t.windowsVerbatimArguments||!1,failOnStdErr:t.failOnStdErr||!1,ignoreReturnCode:t.ignoreReturnCode||!1,delay:t.delay||1e4};return r.outStream=t.outStream||process.stdout,r.errStream=t.errStream||process.stderr,r}_getSpawnOptions(t,r){t=t||{};let n={};return n.cwd=t.cwd,n.env=t.env,n.windowsVerbatimArguments=t.windowsVerbatimArguments||this._isCmdFile(),t.windowsVerbatimArguments&&(n.argv0=`"${r}"`),n}exec(){return Tn(this,void 0,void 0,function*(){return !In.isRooted(this.toolPath)&&(this.toolPath.includes("/")||it&&this.toolPath.includes("\\"))&&(this.toolPath=Vo.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield ko.which(this.toolPath,!0),new Promise((t,r)=>Tn(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let l of this.args)this._debug(` ${l}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+nt.EOL);let i=new Jt(n,this.toolPath);if(i.on("debug",l=>{this._debug(l);}),this.options.cwd&&!(yield In.exists(this.options.cwd)))return r(new Error(`The cwd: ${this.options.cwd} does not exist!`));let s=this._getSpawnFileName(),o=Go.spawn(s,this._getSpawnArgs(n),this._getSpawnOptions(this.options,s)),c="";o.stdout&&o.stdout.on("data",l=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(l),!n.silent&&n.outStream&&n.outStream.write(l),c=this._processLineBuffer(l,c,a=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(a);});});let u="";if(o.stderr&&o.stderr.on("data",l=>{i.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(l),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(l),u=this._processLineBuffer(l,u,a=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(a);});}),o.on("error",l=>{i.processError=l.message,i.processExited=!0,i.processClosed=!0,i.CheckComplete();}),o.on("exit",l=>{i.processExitCode=l,i.processExited=!0,this._debug(`Exit code ${l} received from tool '${this.toolPath}'`),i.CheckComplete();}),o.on("close",l=>{i.processExitCode=l,i.processExited=!0,i.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),i.CheckComplete();}),i.on("done",(l,a)=>{c.length>0&&this.emit("stdline",c),u.length>0&&this.emit("errline",u),o.removeAllListeners(),l?r(l):t(a);}),this.options.input){if(!o.stdin)throw new Error("child process missing stdin");o.stdin.end(this.options.input);}}))})}};V.ToolRunner=zt;function Wo(e){let t=[],r=!1,n=!1,i="";function s(o){n&&o!=='"'&&(i+="\\"),i+=o,n=!1;}for(let o=0;o0&&(t.push(i),i="");continue}s(c);}return i.length>0&&t.push(i.trim()),t}V.argStringToArray=Wo;var Jt=class e extends An.EventEmitter{constructor(t,r){if(super(),this.processClosed=!1,this.processError="",this.processExitCode=0,this.processExited=!1,this.processStderr=!1,this.delay=1e4,this.done=!1,this.timeout=null,!r)throw new Error("toolPath must not be empty");this.options=t,this.toolPath=r,t.delay&&(this.delay=t.delay);}CheckComplete(){this.done||(this.processClosed?this._setResult():this.processExited&&(this.timeout=Xo.setTimeout(e.HandleTimeout,this.delay,this)));}_debug(t){this.emit("debug",t);}_setResult(){let t;this.processExited&&(this.processError?t=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):this.processExitCode!==0&&!this.options.ignoreReturnCode?t=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`):this.processStderr&&this.options.failOnStdErr&&(t=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`))),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",t,this.processExitCode);}static HandleTimeout(t){if(!t.done){if(!t.processClosed&&t.processExited){let r=`The STDIO streams did not close within ${t.delay/1e3} seconds of the exit event from process '${t.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;t._debug(r);}t._setResult();}}};});var Kt=b(k=>{var Ho=k&&k.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),zo=k&&k.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Jo=k&&k.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Ho(t,e,r);return zo(t,e),t},Nn=k&&k.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(k,"__esModule",{value:!0});k.getExecOutput=k.exec=void 0;var xn=_("string_decoder"),Pn=Jo(bn());function Cn(e,t,r){return Nn(this,void 0,void 0,function*(){let n=Pn.argStringToArray(e);if(n.length===0)throw new Error("Parameter 'commandLine' cannot be null or empty.");let i=n[0];return t=n.slice(1).concat(t||[]),new Pn.ToolRunner(i,t,r).exec()})}k.exec=Cn;function Ko(e,t,r){var n,i;return Nn(this,void 0,void 0,function*(){let s="",o="",c=new xn.StringDecoder("utf8"),u=new xn.StringDecoder("utf8"),l=(n=r?.listeners)===null||n===void 0?void 0:n.stdout,a=(i=r?.listeners)===null||i===void 0?void 0:i.stderr,h=be=>{o+=u.write(be),a&&a(be);},E=be=>{s+=c.write(be),l&&l(be);},L=Object.assign(Object.assign({},r?.listeners),{stdout:E,stderr:h}),pe=yield Cn(e,t,Object.assign(Object.assign({},r),{listeners:L}));return s+=c.end(),o+=u.end(),{exitCode:pe,stdout:s,stderr:o}})}k.getExecOutput=Ko;});var $n=b(K=>{var Yo=K&&K.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),Zo=K&&K.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),Qo=K&&K.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&Yo(t,e,r);return Zo(t,e),t},Ln=K&&K.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})};Object.defineProperty(K,"__esModule",{value:!0});K.RetryHelper=void 0;var Dn=Qo(me()),Yt=class{constructor(t,r,n){if(t<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=t,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(n),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(t,r){return Ln(this,void 0,void 0,function*(){let n=1;for(;nsetTimeout(r,t*1e3))})}};K.RetryHelper=Yt;});var Vn=b(w=>{var ea=w&&w.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}});}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r];}),ta=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),ne=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&ea(t,e,r);return ta(t,e),t},q=w&&w.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s);})}return new(r||(r=Promise))(function(s,o){function c(a){try{l(n.next(a));}catch(h){o(h);}}function u(a){try{l(n.throw(a));}catch(h){o(h);}}function l(a){a.done?s(a.value):i(a.value).then(c,u);}l((n=n.apply(e,t||[])).next());})},ra=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(w,"__esModule",{value:!0});w.evaluateVersions=w.isExplicitVersion=w.findFromManifest=w.getManifestFromRepo=w.findAllVersions=w.find=w.cacheFile=w.cacheDir=w.extractZip=w.extractXar=w.extractTar=w.extract7z=w.downloadTool=w.HTTPError=void 0;var O=ne(me()),X=ne(jt()),Y=ne(_("fs")),na=ne(vn()),je=ne(_("os")),Q=ne(_("path")),Un=ne(wt()),ae=ne(Xt()),ia=ne(_("stream")),sa=ne(_("util")),Ae=_("assert"),jn=ra(Sn()),he=Kt(),oa=$n(),Ue=class extends Error{constructor(t){super(`Unexpected HTTP response: ${t}`),this.httpStatusCode=t,Object.setPrototypeOf(this,new.target.prototype);}};w.HTTPError=Ue;var Qt=process.platform==="win32",aa=process.platform==="darwin",ca="actions/tool-cache";function ua(e,t,r,n){return q(this,void 0,void 0,function*(){t=t||Q.join(Gn(),jn.default()),yield X.mkdirP(Q.dirname(t)),O.debug(`Downloading ${e}`),O.debug(`Destination ${t}`);let i=3,s=Zt("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=Zt("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);return yield new oa.RetryHelper(i,s,o).execute(()=>q(this,void 0,void 0,function*(){return yield la(e,t||"",r,n)}),u=>!(u instanceof Ue&&u.httpStatusCode&&u.httpStatusCode<500&&u.httpStatusCode!==408&&u.httpStatusCode!==429))})}w.downloadTool=ua;function la(e,t,r,n){return q(this,void 0,void 0,function*(){if(Y.existsSync(t))throw new Error(`Destination file path ${t} already exists`);let i=new Un.HttpClient(ca,[],{allowRetries:!1});r&&(O.debug("set auth"),n===void 0&&(n={}),n.authorization=r);let s=yield i.get(e,n);if(s.message.statusCode!==200){let a=new Ue(s.message.statusCode);throw O.debug(`Failed to download from "${e}". Code(${s.message.statusCode}) Message(${s.message.statusMessage})`),a}let o=sa.promisify(ia.pipeline),u=Zt("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>s.message)(),l=!1;try{return yield o(u,Y.createWriteStream(t)),O.debug("download complete"),l=!0,t}finally{if(!l){O.debug("download failed");try{yield X.rmRF(t);}catch(a){O.debug(`Failed to delete '${t}'. ${a.message}`);}}}})}function fa(e,t,r){return q(this,void 0,void 0,function*(){Ae.ok(Qt,"extract7z() not supported on current OS"),Ae.ok(e,'parameter "file" is required'),t=yield st(t);let n=process.cwd();if(process.chdir(t),r)try{let s=["x",O.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],o={silent:!0};yield he.exec(`"${r}"`,s,o);}finally{process.chdir(n);}else {let i=Q.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,""),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),u=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${i}' -Source '${s}' -Target '${o}'`],l={silent:!0};try{let a=yield X.which("powershell",!0);yield he.exec(`"${a}"`,u,l);}finally{process.chdir(n);}}return t})}w.extract7z=fa;function da(e,t,r="xz"){return q(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'file' is required");t=yield st(t),O.debug("Checking tar --version");let n="";yield he.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:u=>n+=u.toString(),stderr:u=>n+=u.toString()}}),O.debug(n.trim());let i=n.toUpperCase().includes("GNU TAR"),s;r instanceof Array?s=r:s=[r],O.isDebug()&&!r.includes("v")&&s.push("-v");let o=t,c=e;return Qt&&i&&(s.push("--force-local"),o=t.replace(/\\/g,"/"),c=e.replace(/\\/g,"/")),i&&(s.push("--warning=no-unknown-keyword"),s.push("--overwrite")),s.push("-C",o,"-f",c),yield he.exec("tar",s),t})}w.extractTar=da;function ha(e,t,r=[]){return q(this,void 0,void 0,function*(){Ae.ok(aa,"extractXar() not supported on current OS"),Ae.ok(e,'parameter "file" is required'),t=yield st(t);let n;r instanceof Array?n=r:n=[r],n.push("-x","-C",t,"-f",e),O.isDebug()&&n.push("-v");let i=yield X.which("xar",!0);return yield he.exec(`"${i}"`,Oa(n)),t})}w.extractXar=ha;function pa(e,t){return q(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'file' is required");return t=yield st(t),Qt?yield ma(e,t):yield Ea(e,t),t})}w.extractZip=pa;function ma(e,t){return q(this,void 0,void 0,function*(){let r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=yield X.which("pwsh",!1);if(i){let o=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ")];O.debug(`Using pwsh at path: ${i}`),yield he.exec(`"${i}"`,o);}else {let o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ;","try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;",`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ")],c=yield X.which("powershell",!0);O.debug(`Using powershell at path: ${c}`),yield he.exec(`"${c}"`,o);}})}function Ea(e,t){return q(this,void 0,void 0,function*(){let r=yield X.which("unzip",!0),n=[e];O.isDebug()||n.unshift("-q"),n.unshift("-o"),yield he.exec(`"${r}"`,n,{cwd:t});})}function va(e,t,r,n){return q(this,void 0,void 0,function*(){if(r=ae.clean(r)||r,n=n||je.arch(),O.debug(`Caching tool ${t} ${r} ${n}`),O.debug(`source dir: ${e}`),!Y.statSync(e).isDirectory())throw new Error("sourceDir is not a directory");let i=yield qn(t,r,n);for(let s of Y.readdirSync(e)){let o=Q.join(e,s);yield X.cp(o,i,{recursive:!0});}return Fn(t,r,n),i})}w.cacheDir=va;function ga(e,t,r,n,i){return q(this,void 0,void 0,function*(){if(n=ae.clean(n)||n,i=i||je.arch(),O.debug(`Caching tool ${r} ${n} ${i}`),O.debug(`source file: ${e}`),!Y.statSync(e).isFile())throw new Error("sourceFile is not a file");let s=yield qn(r,n,i),o=Q.join(s,t);return O.debug(`destination file ${o}`),yield X.cp(e,o),Fn(r,n,i),s})}w.cacheFile=ga;function wa(e,t,r){if(!e)throw new Error("toolName parameter is required");if(!t)throw new Error("versionSpec parameter is required");if(r=r||je.arch(),!er(t)){let i=Mn(e,r);t=Bn(i,t);}let n="";if(t){t=ae.clean(t)||"";let i=Q.join(ot(),e,t,r);O.debug(`checking cache: ${i}`),Y.existsSync(i)&&Y.existsSync(`${i}.complete`)?(O.debug(`Found tool in cache ${e} ${t} ${r}`),n=i):O.debug("not found");}return n}w.find=wa;function Mn(e,t){let r=[];t=t||je.arch();let n=Q.join(ot(),e);if(Y.existsSync(n)){let i=Y.readdirSync(n);for(let s of i)if(er(s)){let o=Q.join(n,s,t||"");Y.existsSync(o)&&Y.existsSync(`${o}.complete`)&&r.push(s);}}return r}w.findAllVersions=Mn;function ya(e,t,r,n="master"){return q(this,void 0,void 0,function*(){let i=[],s=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,o=new Un.HttpClient("tool-cache"),c={};r&&(O.debug("set auth"),c.authorization=r);let u=yield o.getJson(s,c);if(!u.result)return i;let l="";for(let h of u.result.tree)if(h.path==="versions-manifest.json"){l=h.url;break}c.accept="application/vnd.github.VERSION.raw";let a=yield (yield o.get(l,c)).readBody();if(a){a=a.replace(/^\uFEFF/,"");try{i=JSON.parse(a);}catch{O.debug("Invalid json");}}return i})}w.getManifestFromRepo=ya;function _a(e,t,r,n=je.arch()){return q(this,void 0,void 0,function*(){return yield na._findMatch(e,t,r,n)})}w.findFromManifest=_a;function st(e){return q(this,void 0,void 0,function*(){return e||(e=Q.join(Gn(),jn.default())),yield X.mkdirP(e),e})}function qn(e,t,r){return q(this,void 0,void 0,function*(){let n=Q.join(ot(),e,ae.clean(t)||t,r||"");O.debug(`destination ${n}`);let i=`${n}.complete`;return yield X.rmRF(n),yield X.rmRF(i),yield X.mkdirP(n),n})}function Fn(e,t,r){let i=`${Q.join(ot(),e,ae.clean(t)||t,r||"")}.complete`;Y.writeFileSync(i,""),O.debug("finished caching tool");}function er(e){let t=ae.clean(e)||"";O.debug(`isExplicit: ${t}`);let r=ae.valid(t)!=null;return O.debug(`explicit? ${r}`),r}w.isExplicitVersion=er;function Bn(e,t){let r="";O.debug(`evaluating ${e.length} versions`),e=e.sort((n,i)=>ae.gt(n,i)?1:-1);for(let n=e.length-1;n>=0;n--){let i=e[n];if(ae.satisfies(i,t)){r=i;break}}return r?O.debug(`matched: ${r}`):O.debug("match not found"),r}w.evaluateVersions=Bn;function ot(){let e=process.env.RUNNER_TOOL_CACHE||"";return Ae.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function Gn(){let e=process.env.RUNNER_TEMP||"";return Ae.ok(e,"Expected RUNNER_TEMP to be defined"),e}function Zt(e,t){let r=global[e];return r!==void 0?r:t}function Oa(e){return Array.from(new Set(e))}});var A=qe(me());var Nt=(e,t=r=>r===void 0)=>e?Object.keys(e).reduce((n,i)=>(t(e[i])||(n[i]=e[i]),n),{}):{};var Ct=(e,t,r)=>{let n=t.split(/[\.\[\]]/g),i=e;for(let s of n){if(i===null||i===void 0)return r;s.trim()!==""&&(i=i[s]);}return i===void 0?r:i};var Lt=(e,t,r=/\{\{(.+?)\}\}/g)=>Array.from(e.matchAll(r)).reduce((n,i)=>n.replace(i[0],t[i[1]]),e);var ie=qe(me()),C=qe(Vn()),kn=qe(Kt());async function Xn(e){if(!e.versionUrl)throw new Error("Version URL missing");let t=process.env.GITHUB_TOKEN||ie.getInput("token"),r=t?{headers:{Authorization:`Bearer ${t}`}}:{},i=await(await fetch(e.versionUrl,{...e.versionUrl.startsWith("https://api.github.com")?r:void 0})).text();if(e.versionPath&&(i=String(Ct(JSON.parse(i),e.versionPath))),e.versionRegex){let s=i.match(e.versionRegex);if(s)return s.groups?s.groups.version:s[0]}return i}async function Wn(e){if(!e.downloadUrl)throw new Error("Download URL missing");if(!e.version)throw new Error("Version missing");let t=e.preset||e.repo||e.id;if(e.cache&&!t&&(e.cache=!1,ie.warning("Tool name missing, disabling cache")),e.cache){let i=C.find(t,e.version);if(i)return ie.debug("cache hit: "+t+"@"+e.version),i;ie.debug("cache miss: "+t+"@"+e.version);let s=C.findAllVersions(t).join(", ");s&&ie.debug("available versions: "+s);}let r=await C.downloadTool(e.downloadUrl);ie.debug("downloaded path: "+r);let n;return e.downloadUrl.endsWith(".tar.gz")?n=await C.extractTar(r):e.downloadUrl.endsWith(".7z")?n=await C.extract7z(r):e.downloadUrl.endsWith(".zip")?n=await C.extractZip(r):e.downloadUrl.endsWith(".pkg")&&(n=await C.extractXar(r)),ie.debug("extracted path: "+n),!n&&process.platform!=="win32"&&await(0, kn.exec)("chmod",["+x",r]),e.cache?n?await C.cacheDir(n,t,e.version):await C.cacheFile(r,e.downloadName||Ra__default.default.basename(e.downloadUrl),t,e.version):n||r}var Sa={"infisical-cli":{repo:"infisical/infisical",downloadUrl:"/releases/download/infisical-cli/v{{version}}/infisical_{{version}}_{{os}}_{{arch}}.{{archive}}"},"cloud-sql-proxy":{repo:"GoogleCloudPlatform/cloudsql-proxy",downloadUrl:"https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v{{version}}/cloud-sql-proxy.{{os}}.{{arch}}",downloadName:"cloud-sql-proxy"}},tr=Sa;async function Ia(){try{let e={os:process.platform==="win32"?"windows":process.platform,arch:process.arch==="x64"?"amd64":process.arch,arch2:process.arch,exe:process.platform==="win32"?".exe":"",archive:process.platform==="win32"?"zip":"tar.gz"},t={id:A.getInput("id"),preset:A.getInput("preset"),repo:A.getInput("repo"),version:A.getInput("version"),versionUrl:A.getInput("version_url"),versionRegex:A.getInput("version_regex"),downloadUrl:A.getInput("download_url"),downloadName:A.getInput("download_name"),binPath:A.getInput("bin_path"),cache:A.getBooleanInput("cache")};if(A.debug("loaded config: "+JSON.stringify(t)),t.preset){if(!tr[t.preset])throw new Error(`Preset not found: ${t.preset}`);t={...t,...tr[t.preset],...Nt(t,n=>n==="")};}if(t.versionRegex&&typeof t.versionRegex=="string"&&(t.versionRegex=new RegExp(t.versionRegex)),!t.versionUrl&&!t.versionPath&&t.repo&&(t.versionPath="tag_name"),!t.versionUrl&&t.repo&&(t.versionUrl="https://api.github.com/repos/"+t.repo+"/releases/latest"),A.debug("resolved config: "+JSON.stringify(t)),!t.downloadUrl)throw new Error("Download URL missing");if(t.version==="latest"){let n=await Xn(t);if(!n)throw new Error("Version not found");t.version=n,A.debug("resolved version: "+t.version);}t.downloadUrl=Lt(t.downloadUrl,{...t,...e}),t.downloadUrl.startsWith("/")&&t.repo&&(t.downloadUrl="https://github.com/"+t.repo+t.downloadUrl),A.debug("templated download url: "+t.downloadUrl);let r=await Wn(t);A.debug("cached path: "+r),A.addPath(Ra__default.default.join(r,t.binPath)),A.info(`Successfully installed version ${t.version}`),A.setOutput("path",r),A.setOutput("version",t.version);}catch(e){e instanceof Error&&A.setFailed(e.message);}}Ia(); exports.main = Ia; diff --git a/src/install.ts b/src/install.ts index 63ae7b0..ee8ee6a 100644 --- a/src/install.ts +++ b/src/install.ts @@ -41,7 +41,7 @@ export async function downloadTool(config: Config) { if (!config.version) throw new Error("Version missing"); const toolName = config.preset || config.repo || config.id; - if (!toolName) { + if (config.cache && !toolName) { config.cache = false; core.warning("Tool name missing, disabling cache"); } @@ -49,7 +49,13 @@ export async function downloadTool(config: Config) { // check cache if (config.cache) { const toolPath = tc.find(toolName!, config.version); - if (toolPath) return toolPath; + if (toolPath) { + core.debug("cache hit: " + toolName + "@" + config.version); + return toolPath; + } + core.debug("cache miss: " + toolName + "@" + config.version); + const versions = tc.findAllVersions(toolName!).join(", "); + if (versions) core.debug("available versions: " + versions); } // download file