diff --git a/action/index.js b/action/index.js new file mode 100644 index 0000000..d19d25a --- /dev/null +++ b/action/index.js @@ -0,0 +1,8 @@ +"use strict";var gr=Object.create;var Ze=Object.defineProperty;var wr=Object.getOwnPropertyDescriptor;var Or=Object.getOwnPropertyNames;var br=Object.getPrototypeOf,Er=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Sr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Or(t))!Er.call(e,i)&&i!==r&&Ze(e,i,{get:()=>t[i],enumerable:!(n=wr(t,i))||n.enumerable});return e};var et=(e,t,r)=>(r=e!=null?gr(br(e)):{},Sr(t||!e||!e.__esModule?Ze(r,"default",{value:e,enumerable:!0}):r,e));var ee=_(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.toCommandProperties=W.toCommandValue=void 0;function Pr(e){return e==null?"":typeof e=="string"||e instanceof String?e:JSON.stringify(e)}W.toCommandValue=Pr;function Rr(e){return Object.keys(e).length?{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}W.toCommandProperties=Rr});var it=_(R=>{"use strict";var qr=R&&R.__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]}),xr=R&&R.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ar=R&&R.__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)&&qr(t,e,r);return xr(t,e),t};Object.defineProperty(R,"__esModule",{value:!0});R.issue=R.issueCommand=void 0;var Tr=Ar(require("os")),rt=ee();function nt(e,t,r){let n=new Pe(e,t,r);process.stdout.write(n.toString()+Tr.EOL)}R.issueCommand=nt;function Dr(e,t=""){nt(e,{},t)}R.issue=Dr;var tt="::",Pe=class{constructor(t,r,n){t||(t="missing.command"),this.command=t,this.properties=r,this.message=n}toString(){let t=tt+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}=${Mr(i)}`)}}return t+=`${tt}${Cr(this.message)}`,t}};function Cr(e){return rt.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function Mr(e){return rt.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});var ut=_(D=>{"use strict";var Ur=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]}),$r=D&&D.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ot=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)&&Ur(t,e,r);return $r(t,e),t};Object.defineProperty(D,"__esModule",{value:!0});D.issueCommand=void 0;var st=ot(require("fs")),Nr=ot(require("os")),Ir=ee();function jr(e,t){let r=process.env[`GITHUB_${e}`];if(!r)throw new Error(`Unable to find environment variable for file command ${e}`);if(!st.existsSync(r))throw new Error(`Missing file at path: ${r}`);st.appendFileSync(r,`${Ir.toCommandValue(t)}${Nr.EOL}`,{encoding:"utf8"})}D.issueCommand=jr});var qe=_(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.default=kr;var Br=Lr(require("crypto"));function Lr(e){return e&&e.__esModule?e:{default:e}}var re=new Uint8Array(256),te=re.length;function kr(){return te>re.length-16&&(Br.default.randomFillSync(re),te=0),re.slice(te,te+=16)}});var at=_(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.default=void 0;var Fr=/^(?:[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;ne.default=Fr});var K=_(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.default=void 0;var Wr=Vr(at());function Vr(e){return e&&e.__esModule?e:{default:e}}function Gr(e){return typeof e=="string"&&Wr.default.test(e)}var Jr=Gr;ie.default=Jr});var Y=_(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.default=void 0;var Hr=Qr(K());function Qr(e){return e&&e.__esModule?e:{default:e}}var w=[];for(let e=0;e<256;++e)w.push((e+256).toString(16).substr(1));function zr(e,t=0){let r=(w[e[t+0]]+w[e[t+1]]+w[e[t+2]]+w[e[t+3]]+"-"+w[e[t+4]]+w[e[t+5]]+"-"+w[e[t+6]]+w[e[t+7]]+"-"+w[e[t+8]]+w[e[t+9]]+"-"+w[e[t+10]]+w[e[t+11]]+w[e[t+12]]+w[e[t+13]]+w[e[t+14]]+w[e[t+15]]).toLowerCase();if(!(0,Hr.default)(r))throw TypeError("Stringified UUID is invalid");return r}var Kr=zr;se.default=Kr});var ft=_(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.default=void 0;var Yr=lt(qe()),Xr=lt(Y());function lt(e){return e&&e.__esModule?e:{default:e}}var ct,xe,Ae=0,Te=0;function Zr(e,t,r){let n=t&&r||0,i=t||new Array(16);e=e||{};let s=e.node||ct,o=e.clockseq!==void 0?e.clockseq:xe;if(s==null||o==null){let p=e.random||(e.rng||Yr.default)();s==null&&(s=ct=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),o==null&&(o=xe=(p[6]<<8|p[7])&16383)}let c=e.msecs!==void 0?e.msecs:Date.now(),l=e.nsecs!==void 0?e.nsecs:Te+1,u=c-Ae+(l-Te)/1e4;if(u<0&&e.clockseq===void 0&&(o=o+1&16383),(u<0||c>Ae)&&e.nsecs===void 0&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Ae=c,Te=l,xe=o,c+=122192928e5;let a=((c&268435455)*1e4+l)%4294967296;i[n++]=a>>>24&255,i[n++]=a>>>16&255,i[n++]=a>>>8&255,i[n++]=a&255;let f=c/4294967296*1e4&268435455;i[n++]=f>>>8&255,i[n++]=f&255,i[n++]=f>>>24&15|16,i[n++]=f>>>16&255,i[n++]=o>>>8|128,i[n++]=o&255;for(let p=0;p<6;++p)i[n+p]=s[p];return t||(0,Xr.default)(i)}var en=Zr;oe.default=en});var De=_(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.default=void 0;var tn=rn(K());function rn(e){return e&&e.__esModule?e:{default:e}}function nn(e){if(!(0,tn.default)(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 sn=nn;ue.default=sn});var Ce=_(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.default=cn;F.URL=F.DNS=void 0;var on=dt(Y()),un=dt(De());function dt(e){return e&&e.__esModule?e:{default:e}}function an(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.default=void 0;var ln=fn(require("crypto"));function fn(e){return e&&e.__esModule?e:{default:e}}function dn(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),ln.default.createHash("md5").update(e).digest()}var hn=dn;ae.default=hn});var vt=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.default=void 0;var pn=_t(Ce()),mn=_t(mt());function _t(e){return e&&e.__esModule?e:{default:e}}var _n=(0,pn.default)("v3",48,mn.default),vn=_n;ce.default=vn});var gt=_(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.default=void 0;var yn=yt(qe()),gn=yt(Y());function yt(e){return e&&e.__esModule?e:{default:e}}function wn(e,t,r){e=e||{};let n=e.random||(e.rng||yn.default)();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(0,gn.default)(n)}var On=wn;le.default=On});var wt=_(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.default=void 0;var bn=En(require("crypto"));function En(e){return e&&e.__esModule?e:{default:e}}function Sn(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),bn.default.createHash("sha1").update(e).digest()}var Pn=Sn;fe.default=Pn});var bt=_(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.default=void 0;var Rn=Ot(Ce()),qn=Ot(wt());function Ot(e){return e&&e.__esModule?e:{default:e}}var xn=(0,Rn.default)("v5",80,qn.default),An=xn;de.default=An});var Et=_(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.default=void 0;var Tn="00000000-0000-0000-0000-000000000000";he.default=Tn});var St=_(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.default=void 0;var Dn=Cn(K());function Cn(e){return e&&e.__esModule?e:{default:e}}function Mn(e){if(!(0,Dn.default)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Un=Mn;pe.default=Un});var Pt=_(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});Object.defineProperty(A,"v1",{enumerable:!0,get:function(){return $n.default}});Object.defineProperty(A,"v3",{enumerable:!0,get:function(){return Nn.default}});Object.defineProperty(A,"v4",{enumerable:!0,get:function(){return In.default}});Object.defineProperty(A,"v5",{enumerable:!0,get:function(){return jn.default}});Object.defineProperty(A,"NIL",{enumerable:!0,get:function(){return Bn.default}});Object.defineProperty(A,"version",{enumerable:!0,get:function(){return Ln.default}});Object.defineProperty(A,"validate",{enumerable:!0,get:function(){return kn.default}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return Fn.default}});Object.defineProperty(A,"parse",{enumerable:!0,get:function(){return Wn.default}});var $n=U(ft()),Nn=U(vt()),In=U(gt()),jn=U(bt()),Bn=U(Et()),Ln=U(St()),kn=U(K()),Fn=U(Y()),Wn=U(De());function U(e){return e&&e.__esModule?e:{default:e}}});var qt=_(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.checkBypass=V.getProxyUrl=void 0;function Vn(e){let t=e.protocol==="https:";if(Rt(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)}V.getProxyUrl=Vn;function Rt(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}V.checkBypass=Rt});var Dt=_(G=>{"use strict";var Ws=require("net"),Gn=require("tls"),Me=require("http"),xt=require("https"),Jn=require("events"),Vs=require("assert"),Hn=require("util");G.httpOverHttp=Qn;G.httpsOverHttp=zn;G.httpOverHttps=Kn;G.httpsOverHttps=Yn;function Qn(e){var t=new $(e);return t.request=Me.request,t}function zn(e){var t=new $(e);return t.request=Me.request,t.createSocket=At,t.defaultPort=443,t}function Kn(e){var t=new $(e);return t.request=xt.request,t}function Yn(e){var t=new $(e);return t.request=xt.request,t.createSocket=At,t.defaultPort=443,t}function $(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||Me.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(n,i,s,o){for(var c=Tt(i,s,o),l=0,u=t.requests.length;l=this.maxSockets){s.requests.push(o);return}s.createSocket(o,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),t.onSocket(c);function l(){s.emit("free",c,o)}function u(a){s.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}})};$.prototype.createSocket=function(t,r){var n=this,i={};n.sockets.push(i);var s=Ue({},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")),I("making CONNECT request");var o=n.request(s);o.useChunkedEncodingByDefault=!1,o.once("response",c),o.once("upgrade",l),o.once("connect",u),o.once("error",a),o.end();function c(f){f.upgrade=!0}function l(f,p,N){process.nextTick(function(){u(f,p,N)})}function u(f,p,N){if(o.removeAllListeners(),p.removeAllListeners(),f.statusCode!==200){I("tunneling socket could not be established, statusCode=%d",f.statusCode),p.destroy();var k=new Error("tunneling socket could not be established, statusCode="+f.statusCode);k.code="ECONNRESET",t.request.emit("error",k),n.removeSocket(i);return}if(N.length>0){I("got illegal response body from proxy"),p.destroy();var k=new Error("got illegal response body from proxy");k.code="ECONNRESET",t.request.emit("error",k),n.removeSocket(i);return}return I("tunneling connection has established"),n.sockets[n.sockets.indexOf(i)]=p,r(p)}function a(f){o.removeAllListeners(),I(`tunneling socket could not be established, cause=%s +`,f.message,f.stack);var p=new Error("tunneling socket could not be established, cause="+f.message);p.code="ECONNRESET",t.request.emit("error",p),n.removeSocket(i)}};$.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 At(e,t){var r=this;$.prototype.createSocket.call(r,e,function(n){var i=e.request.getHeader("host"),s=Ue({},r.options,{socket:n,servername:i?i.replace(/:.*$/,""):e.host}),o=Gn.connect(0,s);r.sockets[r.sockets.indexOf(n)]=o,t(o)})}function Tt(e,t,r){return typeof e=="string"?{host:e,port:t,localAddress:r}:e}function Ue(e){for(var t=1,r=arguments.length;t{Ct.exports=Dt()});var $t=_(v=>{"use strict";var Xn=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]}),Zn=v&&v.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ge=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)&&Xn(t,e,r);return Zn(t,e),t},g=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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(v,"__esModule",{value:!0});v.HttpClient=v.isHttps=v.HttpClientResponse=v.HttpClientError=v.getProxyUrl=v.MediaTypes=v.Headers=v.HttpCodes=void 0;var me=ge(require("http")),$e=ge(require("https")),Ut=ge(qt()),_e=ge(Mt()),T;(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"})(T=v.HttpCodes||(v.HttpCodes={}));var O;(function(e){e.Accept="accept",e.ContentType="content-type"})(O=v.Headers||(v.Headers={}));var j;(function(e){e.ApplicationJson="application/json"})(j=v.MediaTypes||(v.MediaTypes={}));function ei(e){let t=Ut.getProxyUrl(new URL(e));return t?t.href:""}v.getProxyUrl=ei;var ti=[T.MovedPermanently,T.ResourceMoved,T.SeeOther,T.TemporaryRedirect,T.PermanentRedirect],ri=[T.BadGateway,T.ServiceUnavailable,T.GatewayTimeout],ni=["OPTIONS","GET","DELETE","HEAD"],ii=10,si=5,J=class extends Error{constructor(t,r){super(t),this.name="HttpClientError",this.statusCode=r,Object.setPrototypeOf(this,J.prototype)}};v.HttpClientError=J;var ye=class{constructor(t){this.message=t}readBody(){return g(this,void 0,void 0,function*(){return new Promise(t=>g(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())})}))})}};v.HttpClientResponse=ye;function oi(e){return new URL(e).protocol==="https:"}v.isHttps=oi;var Ne=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 g(this,void 0,void 0,function*(){return this.request("OPTIONS",t,null,r||{})})}get(t,r){return g(this,void 0,void 0,function*(){return this.request("GET",t,null,r||{})})}del(t,r){return g(this,void 0,void 0,function*(){return this.request("DELETE",t,null,r||{})})}post(t,r,n){return g(this,void 0,void 0,function*(){return this.request("POST",t,r,n||{})})}patch(t,r,n){return g(this,void 0,void 0,function*(){return this.request("PATCH",t,r,n||{})})}put(t,r,n){return g(this,void 0,void 0,function*(){return this.request("PUT",t,r,n||{})})}head(t,r){return g(this,void 0,void 0,function*(){return this.request("HEAD",t,null,r||{})})}sendStream(t,r,n,i){return g(this,void 0,void 0,function*(){return this.request(t,r,n,i)})}getJson(t,r={}){return g(this,void 0,void 0,function*(){r[O.Accept]=this._getExistingOrDefaultHeader(r,O.Accept,j.ApplicationJson);let n=yield this.get(t,r);return this._processResponse(n,this.requestOptions)})}postJson(t,r,n={}){return g(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[O.Accept]=this._getExistingOrDefaultHeader(n,O.Accept,j.ApplicationJson),n[O.ContentType]=this._getExistingOrDefaultHeader(n,O.ContentType,j.ApplicationJson);let s=yield this.post(t,i,n);return this._processResponse(s,this.requestOptions)})}putJson(t,r,n={}){return g(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[O.Accept]=this._getExistingOrDefaultHeader(n,O.Accept,j.ApplicationJson),n[O.ContentType]=this._getExistingOrDefaultHeader(n,O.ContentType,j.ApplicationJson);let s=yield this.put(t,i,n);return this._processResponse(s,this.requestOptions)})}patchJson(t,r,n={}){return g(this,void 0,void 0,function*(){let i=JSON.stringify(r,null,2);n[O.Accept]=this._getExistingOrDefaultHeader(n,O.Accept,j.ApplicationJson),n[O.ContentType]=this._getExistingOrDefaultHeader(n,O.ContentType,j.ApplicationJson);let s=yield this.patch(t,i,n);return this._processResponse(s,this.requestOptions)})}request(t,r,n,i){return g(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&&ni.includes(t)?this._maxRetries+1:1,l=0,u;do{if(u=yield this.requestRaw(o,n),u&&u.message&&u.message.statusCode===T.Unauthorized){let f;for(let p of this.handlers)if(p.canHandleAuthentication(u)){f=p;break}return f?f.handleAuthentication(this,o,n):u}let a=this._maxRedirects;for(;u.message.statusCode&&ti.includes(u.message.statusCode)&&this._allowRedirects&&a>0;){let f=u.message.headers.location;if(!f)break;let p=new URL(f);if(s.protocol==="https:"&&s.protocol!==p.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 u.readBody(),p.hostname!==s.hostname)for(let N in i)N.toLowerCase()==="authorization"&&delete i[N];o=this._prepareRequest(t,p,i),u=yield this.requestRaw(o,n),a--}if(!u.message.statusCode||!ri.includes(u.message.statusCode))return u;l+=1,l{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(l,u){i||(i=!0,n(l,u))}let o=t.httpModule.request(t.options,l=>{let u=new ye(l);s(void 0,u)}),c;o.on("socket",l=>{c=l}),o.setTimeout(this._socketTimeout||3*6e4,()=>{c&&c.end(),s(new Error(`Request timeout: ${t.options.path}`))}),o.on("error",function(l){s(l)}),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?$e:me;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({},ve(this.requestOptions.headers),ve(t||{})):ve(t||{})}_getExistingOrDefaultHeader(t,r,n){let i;return this.requestOptions&&this.requestOptions.headers&&(i=ve(this.requestOptions.headers)[r]),t[r]||i||n}_getAgent(t){let r,n=Ut.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||me.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})},l,u=n.protocol==="https:";s?l=u?_e.httpsOverHttps:_e.httpsOverHttp:l=u?_e.httpOverHttps:_e.httpOverHttp,r=l(c),this._proxyAgent=r}if(this._keepAlive&&!r){let c={keepAlive:this._keepAlive,maxSockets:o};r=s?new $e.Agent(c):new me.Agent(c),this._agent=r}return r||(r=s?$e.globalAgent:me.globalAgent),s&&this._ignoreSslError&&(r.options=Object.assign(r.options||{},{rejectUnauthorized:!1})),r}_performExponentialBackoff(t){return g(this,void 0,void 0,function*(){t=Math.min(ii,t);let r=si*Math.pow(2,t);return new Promise(n=>setTimeout(()=>n(),r))})}_processResponse(t,r){return g(this,void 0,void 0,function*(){return new Promise((n,i)=>g(this,void 0,void 0,function*(){let s=t.message.statusCode||0,o={statusCode:s,result:null,headers:{}};s===T.NotFound&&n(o);function c(a,f){if(typeof f=="string"){let p=new Date(f);if(!isNaN(p.valueOf()))return p}return f}let l,u;try{u=yield t.readBody(),u&&u.length>0&&(r&&r.deserializeDates?l=JSON.parse(u,c):l=JSON.parse(u),o.result=l),o.headers=t.message.headers}catch{}if(s>299){let a;l&&l.message?a=l.message:u&&u.length>0?a=u:a=`Failed request: (${s})`;let f=new J(a,s);f.result=o.result,i(f)}else n(o)}))})}};v.HttpClient=Ne;var ve=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{})});var Nt=_(C=>{"use strict";var Le=C&&C.__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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(C,"__esModule",{value:!0});C.PersonalAccessTokenCredentialHandler=C.BearerCredentialHandler=C.BasicCredentialHandler=void 0;var Ie=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 Le(this,void 0,void 0,function*(){throw new Error("not implemented")})}};C.BasicCredentialHandler=Ie;var je=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 Le(this,void 0,void 0,function*(){throw new Error("not implemented")})}};C.BearerCredentialHandler=je;var Be=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 Le(this,void 0,void 0,function*(){throw new Error("not implemented")})}};C.PersonalAccessTokenCredentialHandler=Be});var Bt=_(H=>{"use strict";var It=H&&H.__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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(H,"__esModule",{value:!0});H.OidcClient=void 0;var ui=$t(),ai=Nt(),jt=ke(),B=class{static createHttpClient(t=!0,r=10){let n={allowRetries:t,maxRetries:r};return new ui.HttpClient("actions/oidc-client",[new ai.BearerCredentialHandler(B.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 It(this,void 0,void 0,function*(){let s=(r=(yield B.createHttpClient().getJson(t).catch(o=>{throw new Error(`Failed to get ID Token. + + Error Code : ${o.statusCode} + + Error Message: ${o.result.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 It(this,void 0,void 0,function*(){try{let r=B.getIDTokenUrl();if(t){let i=encodeURIComponent(t);r=`${r}&audience=${i}`}jt.debug(`ID token url is ${r}`);let n=yield B.getCall(r);return jt.setSecret(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};H.OidcClient=B});var Ge=_(b=>{"use strict";var Fe=b&&b.__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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(b,"__esModule",{value:!0});b.summary=b.markdownSummary=b.SUMMARY_DOCS_URL=b.SUMMARY_ENV_VAR=void 0;var ci=require("os"),We=require("fs"),{access:li,appendFile:fi,writeFile:di}=We.promises;b.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";b.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var Ve=class{constructor(){this._buffer=""}filePath(){return Fe(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let t=process.env[b.SUMMARY_ENV_VAR];if(!t)throw new Error(`Unable to find environment variable for $${b.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield li(t,We.constants.R_OK|We.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 Fe(this,void 0,void 0,function*(){let r=!!(t!=null&&t.overwrite),n=yield this.filePath();return yield(r?di:fi)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Fe(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(ci.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:l,colspan:u,rowspan:a}=o,f=c?"th":"td",p=Object.assign(Object.assign({},u&&{colspan:u}),a&&{rowspan:a});return this.wrap(f,l,p)}).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()}},Lt=new Ve;b.markdownSummary=Lt;b.summary=Lt});var kt=_(E=>{"use strict";var hi=E&&E.__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]}),pi=E&&E.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mi=E&&E.__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)&&hi(t,e,r);return pi(t,e),t};Object.defineProperty(E,"__esModule",{value:!0});E.toPlatformPath=E.toWin32Path=E.toPosixPath=void 0;var _i=mi(require("path"));function vi(e){return e.replace(/[\\]/g,"/")}E.toPosixPath=vi;function yi(e){return e.replace(/[/]/g,"\\")}E.toWin32Path=yi;function gi(e){return e.replace(/[/\\]/g,_i.sep)}E.toPlatformPath=gi});var ke=_(d=>{"use strict";var wi=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]}),Oi=d&&d.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ft=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)&&wi(t,e,r);return Oi(t,e),t},Wt=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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(d,"__esModule",{value:!0});d.getIDToken=d.getState=d.saveState=d.group=d.endGroup=d.startGroup=d.info=d.notice=d.warning=d.error=d.debug=d.isDebug=d.setFailed=d.setCommandEcho=d.setOutput=d.getBooleanInput=d.getMultilineInput=d.getInput=d.addPath=d.setSecret=d.exportVariable=d.ExitCode=void 0;var q=it(),Vt=ut(),Oe=ee(),we=Ft(require("os")),bi=Ft(require("path")),Ei=Pt(),Si=Bt(),Gt;(function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure"})(Gt=d.ExitCode||(d.ExitCode={}));function Pi(e,t){let r=Oe.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV||""){let i=`ghadelimiter_${Ei.v4()}`;if(e.includes(i))throw new Error(`Unexpected input: name should not contain the delimiter "${i}"`);if(r.includes(i))throw new Error(`Unexpected input: value should not contain the delimiter "${i}"`);let s=`${e}<<${i}${we.EOL}${r}${we.EOL}${i}`;Vt.issueCommand("ENV",s)}else q.issueCommand("set-env",{name:e},r)}d.exportVariable=Pi;function Ri(e){q.issueCommand("add-mask",{},e)}d.setSecret=Ri;function qi(e){process.env.GITHUB_PATH||""?Vt.issueCommand("PATH",e):q.issueCommand("add-path",{},e),process.env.PATH=`${e}${bi.delimiter}${process.env.PATH}`}d.addPath=qi;function Je(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()}d.getInput=Je;function xi(e,t){return Je(e,t).split(` +`).filter(n=>n!=="")}d.getMultilineInput=xi;function Ai(e,t){let r=["true","True","TRUE"],n=["false","False","FALSE"],i=Je(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\``)}d.getBooleanInput=Ai;function Ti(e,t){process.stdout.write(we.EOL),q.issueCommand("set-output",{name:e},t)}d.setOutput=Ti;function Di(e){q.issue("echo",e?"on":"off")}d.setCommandEcho=Di;function Ci(e){process.exitCode=Gt.Failure,Jt(e)}d.setFailed=Ci;function Mi(){return process.env.RUNNER_DEBUG==="1"}d.isDebug=Mi;function Ui(e){q.issueCommand("debug",{},e)}d.debug=Ui;function Jt(e,t={}){q.issueCommand("error",Oe.toCommandProperties(t),e instanceof Error?e.toString():e)}d.error=Jt;function $i(e,t={}){q.issueCommand("warning",Oe.toCommandProperties(t),e instanceof Error?e.toString():e)}d.warning=$i;function Ni(e,t={}){q.issueCommand("notice",Oe.toCommandProperties(t),e instanceof Error?e.toString():e)}d.notice=Ni;function Ii(e){process.stdout.write(e+we.EOL)}d.info=Ii;function Ht(e){q.issue("group",e)}d.startGroup=Ht;function Qt(){q.issue("endgroup")}d.endGroup=Qt;function ji(e,t){return Wt(this,void 0,void 0,function*(){Ht(e);let r;try{r=yield t()}finally{Qt()}return r})}d.group=ji;function Bi(e,t){q.issueCommand("save-state",{name:e},t)}d.saveState=Bi;function Li(e){return process.env[`STATE_${e}`]||""}d.getState=Li;function ki(e){return Wt(this,void 0,void 0,function*(){return yield Si.OidcClient.getIDToken(e)})}d.getIDToken=ki;var Fi=Ge();Object.defineProperty(d,"summary",{enumerable:!0,get:function(){return Fi.summary}});var Wi=Ge();Object.defineProperty(d,"markdownSummary",{enumerable:!0,get:function(){return Wi.markdownSummary}});var He=kt();Object.defineProperty(d,"toPosixPath",{enumerable:!0,get:function(){return He.toPosixPath}});Object.defineProperty(d,"toWin32Path",{enumerable:!0,get:function(){return He.toWin32Path}});Object.defineProperty(d,"toPlatformPath",{enumerable:!0,get:function(){return He.toPlatformPath}})});var ze=_(h=>{"use strict";var Vi=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]}),Gi=h&&h.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Kt=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)&&Vi(t,e,r);return Gi(t,e),t},Qe=h&&h.__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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})},x;Object.defineProperty(h,"__esModule",{value:!0});h.getCmdPath=h.tryGetExecutablePath=h.isRooted=h.isDirectory=h.exists=h.IS_WINDOWS=h.unlink=h.symlink=h.stat=h.rmdir=h.rename=h.readlink=h.readdir=h.mkdir=h.lstat=h.copyFile=h.chmod=void 0;var Ji=Kt(require("fs")),be=Kt(require("path"));x=Ji.promises,h.chmod=x.chmod,h.copyFile=x.copyFile,h.lstat=x.lstat,h.mkdir=x.mkdir,h.readdir=x.readdir,h.readlink=x.readlink,h.rename=x.rename,h.rmdir=x.rmdir,h.stat=x.stat,h.symlink=x.symlink,h.unlink=x.unlink;h.IS_WINDOWS=process.platform==="win32";function Hi(e){return Qe(this,void 0,void 0,function*(){try{yield h.stat(e)}catch(t){if(t.code==="ENOENT")return!1;throw t}return!0})}h.exists=Hi;function Qi(e,t=!1){return Qe(this,void 0,void 0,function*(){return(t?yield h.stat(e):yield h.lstat(e)).isDirectory()})}h.isDirectory=Qi;function zi(e){if(e=Yi(e),!e)throw new Error('isRooted() parameter "p" cannot be empty');return h.IS_WINDOWS?e.startsWith("\\")||/^[A-Z]:/i.test(e):e.startsWith("/")}h.isRooted=zi;function Ki(e,t){return Qe(this,void 0,void 0,function*(){let r;try{r=yield h.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(h.IS_WINDOWS){let i=be.extname(e).toUpperCase();if(t.some(s=>s.toUpperCase()===i))return e}else if(zt(r))return e}let n=e;for(let i of t){e=n+i,r=void 0;try{r=yield h.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(h.IS_WINDOWS){try{let s=be.dirname(e),o=be.basename(e).toUpperCase();for(let c of yield h.readdir(s))if(o===c.toUpperCase()){e=be.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(zt(r))return e}}return""})}h.tryGetExecutablePath=Ki;function Yi(e){return e=e||"",h.IS_WINDOWS?(e=e.replace(/\//g,"\\"),e.replace(/\\\\+/g,"\\")):e.replace(/\/\/+/g,"/")}function zt(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function Xi(){var e;return(e=process.env.COMSPEC)!==null&&e!==void 0?e:"cmd.exe"}h.getCmdPath=Xi});var sr=_(y=>{"use strict";var Zi=y&&y.__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=y&&y.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ke=y&&y.__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)&&Zi(t,e,r);return es(t,e),t},L=y&&y.__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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(y,"__esModule",{value:!0});y.findInPath=y.which=y.mkdirP=y.rmRF=y.mv=y.cp=void 0;var ts=require("assert"),Xt=Ke(require("child_process")),M=Ke(require("path")),Zt=require("util"),m=Ke(ze()),Yt=Zt.promisify(Xt.exec),rs=Zt.promisify(Xt.execFile);function ns(e,t,r={}){return L(this,void 0,void 0,function*(){let{force:n,recursive:i,copySourceDirectory:s}=ss(r),o=(yield m.exists(t))?yield m.stat(t):null;if(o&&o.isFile()&&!n)return;let c=o&&o.isDirectory()&&s?M.join(t,M.basename(e)):t;if(!(yield m.exists(e)))throw new Error(`no such file or directory: ${e}`);if((yield m.stat(e)).isDirectory())if(i)yield nr(e,c,0,n);else throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);else{if(M.relative(e,c)==="")throw new Error(`'${c}' and '${e}' are the same file`);yield ir(e,c,n)}})}y.cp=ns;function is(e,t,r={}){return L(this,void 0,void 0,function*(){if(yield m.exists(t)){let n=!0;if((yield m.isDirectory(t))&&(t=M.join(t,M.basename(e)),n=yield m.exists(t)),n)if(r.force==null||r.force)yield er(t);else throw new Error("Destination already exists")}yield Ye(M.dirname(t)),yield m.rename(e,t)})}y.mv=is;function er(e){return L(this,void 0,void 0,function*(){if(m.IS_WINDOWS){if(/[*"<>|]/.test(e))throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{let t=m.getCmdPath();(yield m.isDirectory(e,!0))?yield Yt(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}}):yield Yt(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}catch(t){if(t.code!=="ENOENT")throw t}try{yield m.unlink(e)}catch(t){if(t.code!=="ENOENT")throw t}}else{let t=!1;try{t=yield m.isDirectory(e)}catch(r){if(r.code!=="ENOENT")throw r;return}t?yield rs("rm",["-rf",`${e}`]):yield m.unlink(e)}})}y.rmRF=er;function Ye(e){return L(this,void 0,void 0,function*(){ts.ok(e,"a path argument must be provided"),yield m.mkdir(e,{recursive:!0})})}y.mkdirP=Ye;function tr(e,t){return L(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");if(t){let n=yield tr(e,!1);if(!n)throw m.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 rr(e);return r&&r.length>0?r[0]:""})}y.which=tr;function rr(e){return L(this,void 0,void 0,function*(){if(!e)throw new Error("parameter 'tool' is required");let t=[];if(m.IS_WINDOWS&&process.env.PATHEXT)for(let i of process.env.PATHEXT.split(M.delimiter))i&&t.push(i);if(m.isRooted(e)){let i=yield m.tryGetExecutablePath(e,t);return i?[i]:[]}if(e.includes(M.sep))return[];let r=[];if(process.env.PATH)for(let i of process.env.PATH.split(M.delimiter))i&&r.push(i);let n=[];for(let i of r){let s=yield m.tryGetExecutablePath(M.join(i,e),t);s&&n.push(s)}return n})}y.findInPath=rr;function ss(e){let t=e.force==null?!0:e.force,r=Boolean(e.recursive),n=e.copySourceDirectory==null?!0:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function nr(e,t,r,n){return L(this,void 0,void 0,function*(){if(r>=255)return;r++,yield Ye(t);let i=yield m.readdir(e);for(let s of i){let o=`${e}/${s}`,c=`${t}/${s}`;(yield m.lstat(o)).isDirectory()?yield nr(o,c,r,n):yield ir(o,c,n)}yield m.chmod(t,(yield m.stat(e)).mode)})}function ir(e,t,r){return L(this,void 0,void 0,function*(){if((yield m.lstat(e)).isSymbolicLink()){try{yield m.lstat(t),yield m.unlink(t)}catch(i){i.code==="EPERM"&&(yield m.chmod(t,"0666"),yield m.unlink(t))}let n=yield m.readlink(e);yield m.symlink(n,t,m.IS_WINDOWS?"junction":null)}else(!(yield m.exists(t))||r)&&(yield m.copyFile(e,t))})}});var cr=_(S=>{"use strict";var os=S&&S.__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]}),us=S&&S.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Q=S&&S.__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 us(t,e),t},or=S&&S.__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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(S,"__esModule",{value:!0});S.argStringToArray=S.ToolRunner=void 0;var Ee=Q(require("os")),ar=Q(require("events")),as=Q(require("child_process")),cs=Q(require("path")),ls=Q(sr()),ur=Q(ze()),fs=require("timers"),Se=process.platform==="win32",Xe=class extends ar.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(Se)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(Ee.EOL);for(;s>-1;){let o=i.substring(0,s);n(o),i=i.substring(s+Ee.EOL.length),s=i.indexOf(Ee.EOL)}return i}catch(i){return this._debug(`error processing line. Failed with error ${i}`),""}}_getSpawnFileName(){return Se&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(t){if(Se&&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 or(this,void 0,void 0,function*(){return!ur.isRooted(this.toolPath)&&(this.toolPath.includes("/")||Se&&this.toolPath.includes("\\"))&&(this.toolPath=cs.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield ls.which(this.toolPath,!0),new Promise((t,r)=>or(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`),this._debug("arguments:");for(let u of this.args)this._debug(` ${u}`);let n=this._cloneExecOptions(this.options);!n.silent&&n.outStream&&n.outStream.write(this._getCommandString(n)+Ee.EOL);let i=new X(n,this.toolPath);if(i.on("debug",u=>{this._debug(u)}),this.options.cwd&&!(yield ur.exists(this.options.cwd)))return r(new Error(`The cwd: ${this.options.cwd} does not exist!`));let s=this._getSpawnFileName(),o=as.spawn(s,this._getSpawnArgs(n),this._getSpawnOptions(this.options,s)),c="";o.stdout&&o.stdout.on("data",u=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(u),!n.silent&&n.outStream&&n.outStream.write(u),c=this._processLineBuffer(u,c,a=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(a)})});let l="";if(o.stderr&&o.stderr.on("data",u=>{i.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(u),!n.silent&&n.errStream&&n.outStream&&(n.failOnStdErr?n.errStream:n.outStream).write(u),l=this._processLineBuffer(u,l,a=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(a)})}),o.on("error",u=>{i.processError=u.message,i.processExited=!0,i.processClosed=!0,i.CheckComplete()}),o.on("exit",u=>{i.processExitCode=u,i.processExited=!0,this._debug(`Exit code ${u} received from tool '${this.toolPath}'`),i.CheckComplete()}),o.on("close",u=>{i.processExitCode=u,i.processExited=!0,i.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),i.CheckComplete()}),i.on("done",(u,a)=>{c.length>0&&this.emit("stdline",c),l.length>0&&this.emit("errline",l),o.removeAllListeners(),u?r(u):t(a)}),this.options.input){if(!o.stdin)throw new Error("child process missing stdin");o.stdin.end(this.options.input)}}))})}};S.ToolRunner=Xe;function ds(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}S.argStringToArray=ds;var X=class extends ar.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=fs.setTimeout(X.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 pr=_(P=>{"use strict";var hs=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}),ms=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)&&hs(t,e,r);return ps(t,e),t},dr=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{u(n.next(a))}catch(f){o(f)}}function l(a){try{u(n.throw(a))}catch(f){o(f)}}function u(a){a.done?s(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(P,"__esModule",{value:!0});P.getExecOutput=P.exec=void 0;var lr=require("string_decoder"),fr=ms(cr());function hr(e,t,r){return dr(this,void 0,void 0,function*(){let n=fr.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 fr.ToolRunner(i,t,r).exec()})}P.exec=hr;function _s(e,t,r){var n,i;return dr(this,void 0,void 0,function*(){let s="",o="",c=new lr.StringDecoder("utf8"),l=new lr.StringDecoder("utf8"),u=(n=r==null?void 0:r.listeners)===null||n===void 0?void 0:n.stdout,a=(i=r==null?void 0:r.listeners)===null||i===void 0?void 0:i.stderr,f=z=>{o+=l.write(z),a&&a(z)},p=z=>{s+=c.write(z),u&&u(z)},N=Object.assign(Object.assign({},r==null?void 0:r.listeners),{stdout:p,stderr:f}),k=yield hr(e,t,Object.assign(Object.assign({},r),{listeners:N}));return s+=c.end(),o+=l.end(),{exitCode:k,stdout:s,stderr:o}})}P.getExecOutput=_s});var Z=et(ke()),yr=et(pr());var _r="@whop-sdk/checkly-action",vr="0.1.1-canary5";var vs=`${_r}@${vr}`,ys=(0,Z.getInput)("checkly-token"),gs=(0,Z.getInput)("checkly-group"),ws=(0,Z.getInput)("checkly-account"),Os=(0,Z.getInput)("directory"),bs=[vs,"deploy","-t",ys,"--acc",ws,"-g",gs,"--dir",Os];(0,yr.exec)("npx",bs);