diff --git a/dist/index.js b/dist/index.js index 35c8fdb..a275754 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10,7 +10,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}g.g `).reduce(Km,Object.create(null)),Km=(t,e)=>{let a=parseInt(e,10);if(a!==Buffer.byteLength(e)+1)return t;e=e.slice((a+" ").length);let s=e.split("="),i=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!i)return t;let p=s.join("=");return t[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(p*1e3):/^[0-9]+$/.test(p)?+p:p,t};Sn.exports=fa});var At=c((Eh,On)=>{On.exports=t=>{let e=t.length-1,a=-1;for(;e>-1&&t.charAt(e)==="/";)a=e,e--;return a===-1?t:t.slice(0,a)}});var _s=c((Th,Dn)=>{"use strict";Dn.exports=t=>class extends t{warn(e,a,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=a instanceof Error&&a.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(a instanceof Error&&(s=Object.assign(a,s),a=a.message),this.emit("warn",s.tarCode,a,s)):a instanceof Error?this.emit("error",Object.assign(a,s)):this.emit("error",Object.assign(new Error(`${e}: ${a}`),s))}}});var jp=c((yh,Rn)=>{"use strict";var Es=["|","<",">","?",":"],Mp=Es.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Ym=new Map(Es.map((t,e)=>[t,Mp[e]])),Zm=new Map(Mp.map((t,e)=>[t,Es[e]]));Rn.exports={encode:t=>Es.reduce((e,a)=>e.split(a).join(Ym.get(a)),t),decode:t=>Mp.reduce((e,a)=>e.split(a).join(Zm.get(a)),t)}});var Hp=c((Sh,Nn)=>{var{isAbsolute:Jm,parse:An}=require("path").win32;Nn.exports=t=>{let e="",a=An(t);for(;Jm(t)||a.root;){let s=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":a.root;t=t.slice(s.length),e+=s,a=An(t)}return[e,t]}});var Fn=c((Oh,Pn)=>{"use strict";Pn.exports=(t,e,a)=>(t&=4095,a&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var er=c((Ah,zn)=>{"use strict";var In=ds(),xn=ws(),Bn=Rt(),ze=require("fs"),Cn=require("path"),He=Ot(),Xm=At(),qn=(t,e)=>e?(t=He(t).replace(/^\.(\/|$)/,""),Xm(e)+"/"+t):He(t),Qm=16*1024*1024,Gn=Symbol("process"),kn=Symbol("file"),Ln=Symbol("directory"),$p=Symbol("symlink"),Un=Symbol("hardlink"),va=Symbol("header"),Ts=Symbol("read"),Wp=Symbol("lstat"),bs=Symbol("onlstat"),Kp=Symbol("onread"),Yp=Symbol("onreadlink"),Zp=Symbol("openfile"),Jp=Symbol("onopenfile"),G1=Symbol("close"),ys=Symbol("mode"),Xp=Symbol("awaitDrain"),zp=Symbol("ondrain"),$e=Symbol("prefix"),Vn=Symbol("hadError"),Mn=_s(),e5=jp(),jn=Hp(),Hn=Fn(),Ss=Mn(class extends In{constructor(e,a){if(a=a||{},super(a),typeof e!="string")throw new TypeError("path is required");this.path=He(e),this.portable=!!a.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=a.maxReadSize||Qm,this.linkCache=a.linkCache||new Map,this.statCache=a.statCache||new Map,this.preservePaths=!!a.preservePaths,this.cwd=He(a.cwd||process.cwd()),this.strict=!!a.strict,this.noPax=!!a.noPax,this.noMtime=!!a.noMtime,this.mtime=a.mtime||null,this.prefix=a.prefix?He(a.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof a.onwarn=="function"&&this.on("warn",a.onwarn);let s=!1;if(!this.preservePaths){let[i,p]=jn(this.path);i&&(this.path=p,s=i)}this.win32=!!a.win32||process.platform==="win32",this.win32&&(this.path=e5.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=He(a.absolute||Cn.resolve(this.cwd,e)),this.path===""&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[bs](this.statCache.get(this.absolute)):this[Wp]()}emit(e,...a){return e==="error"&&(this[Vn]=!0),super.emit(e,...a)}[Wp](){ze.lstat(this.absolute,(e,a)=>{if(e)return this.emit("error",e);this[bs](a)})}[bs](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=a5(e),this.emit("stat",e),this[Gn]()}[Gn](){switch(this.type){case"File":return this[kn]();case"Directory":return this[Ln]();case"SymbolicLink":return this[$p]();default:return this.end()}}[ys](e){return Hn(e,this.type==="Directory",this.portable)}[$e](e){return qn(e,this.prefix)}[va](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new Bn({path:this[$e](this.path),linkpath:this.type==="Link"?this[$e](this.linkpath):this.linkpath,mode:this[ys](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new xn({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[$e](this.path),linkpath:this.type==="Link"?this[$e](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Ln](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[va](),this.end()}[$p](){ze.readlink(this.absolute,(e,a)=>{if(e)return this.emit("error",e);this[Yp](a)})}[Yp](e){this.linkpath=He(e),this[va](),this.end()}[Un](e){this.type="Link",this.linkpath=He(Cn.relative(this.cwd,e)),this.stat.size=0,this[va](),this.end()}[kn](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let a=this.linkCache.get(e);if(a.indexOf(this.cwd)===0)return this[Un](a)}this.linkCache.set(e,this.absolute)}if(this[va](),this.stat.size===0)return this.end();this[Zp]()}[Zp](){ze.open(this.absolute,"r",(e,a)=>{if(e)return this.emit("error",e);this[Jp](a)})}[Jp](e){if(this.fd=e,this[Vn])return this[G1]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let a=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(a),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[Ts]()}[Ts](){let{fd:e,buf:a,offset:s,length:i,pos:p}=this;ze.read(e,a,s,i,p,(r,d)=>{if(r)return this[G1](()=>this.emit("error",r));this[Kp](d)})}[G1](e){ze.close(this.fd,e)}[Kp](e){if(e<=0&&this.remain>0){let i=new Error("encountered unexpected EOF");return i.path=this.absolute,i.syscall="read",i.code="EOF",this[G1](()=>this.emit("error",i))}if(e>this.remain){let i=new Error("did not encounter expected EOF");return i.path=this.absolute,i.syscall="read",i.code="EOF",this[G1](()=>this.emit("error",i))}if(e===this.remain)for(let i=e;ithis[zp]())}[Xp](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[Ts]()}}),Qp=class extends Ss{[Wp](){this[bs](ze.lstatSync(this.absolute))}[$p](){this[Yp](ze.readlinkSync(this.absolute))}[Zp](){this[Jp](ze.openSync(this.absolute,"r"))}[Ts](){let e=!0;try{let{fd:a,buf:s,offset:i,length:p,pos:r}=this,d=ze.readSync(a,s,i,p,r);this[Kp](d),e=!1}finally{if(e)try{this[G1](()=>{})}catch{}}}[Xp](e){e()}[G1](e){ze.closeSync(this.fd),e()}},t5=Mn(class extends In{constructor(e,a){a=a||{},super(a),this.preservePaths=!!a.preservePaths,this.portable=!!a.portable,this.strict=!!a.strict,this.noPax=!!a.noPax,this.noMtime=!!a.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=a.prefix||null,this.path=He(e.path),this.mode=this[ys](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:a.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=He(e.linkpath),typeof a.onwarn=="function"&&this.on("warn",a.onwarn);let s=!1;if(!this.preservePaths){let[i,p]=jn(this.path);i&&(this.path=p,s=i)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new Bn({path:this[$e](this.path),linkpath:this.type==="Link"?this[$e](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.header.encode()&&!this.noPax&&super.write(new xn({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[$e](this.path),linkpath:this.type==="Link"?this[$e](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[$e](e){return qn(e,this.prefix)}[ys](e){return Hn(e,this.type==="Directory",this.portable)}write(e){let a=e.length;if(a>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=a,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});Ss.Sync=Qp;Ss.Tar=t5;var a5=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";zn.exports=Ss});var Wn=c((Nh,$n)=>{"use strict";$n.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var tr=c((Ph,Kn)=>{"use strict";Kn.exports=T;T.Node=Z1;T.create=T;function T(t){var e=this;if(e instanceof T||(e=new T),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var a=0,s=arguments.length;a1)a=e;else if(this.head)s=this.head.next,a=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;s!==null;i++)a=t(a,s.value,i),s=s.next;return a};T.prototype.reduceReverse=function(t,e){var a,s=this.tail;if(arguments.length>1)a=e;else if(this.tail)s=this.tail.prev,a=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;s!==null;i--)a=t(a,s.value,i),s=s.prev;return a};T.prototype.toArray=function(){for(var t=new Array(this.length),e=0,a=this.head;a!==null;e++)t[e]=a.value,a=a.next;return t};T.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,a=this.tail;a!==null;e++)t[e]=a.value,a=a.prev;return t};T.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var a=new T;if(ethis.length&&(e=this.length);for(var s=0,i=this.head;i!==null&&sthis.length&&(e=this.length);for(var s=this.length,i=this.tail;i!==null&&s>e;s--)i=i.prev;for(;i!==null&&s>t;s--,i=i.prev)a.push(i.value);return a};T.prototype.splice=function(t,e,...a){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,i=this.head;i!==null&&s{"use strict";var Fs=class{constructor(e,a){this.path=e||"./",this.absolute=a,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},r5=ds(),d5=Gp(),o5=vs(),lr=er(),n5=lr.Sync,l5=lr.Tar,m5=tr(),Yn=Buffer.alloc(1024),Rs=Symbol("onStat"),Os=Symbol("ended"),We=Symbol("queue"),Nt=Symbol("current"),J1=Symbol("process"),Ds=Symbol("processing"),Zn=Symbol("processJob"),Ke=Symbol("jobs"),ar=Symbol("jobDone"),As=Symbol("addFSEntry"),Jn=Symbol("addTarEntry"),rr=Symbol("stat"),dr=Symbol("readdir"),Ns=Symbol("onreaddir"),Ps=Symbol("pipe"),Xn=Symbol("entry"),sr=Symbol("entryOpt"),or=Symbol("writeEntryClass"),e0=Symbol("write"),ir=Symbol("ondrain"),Cs=require("fs"),Qn=require("path"),u5=_s(),pr=Ot(),mr=u5(class extends r5{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=pr(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[or]=lr,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new d5.Gzip(e.gzip),this.zip.on("data",a=>super.write(a)),this.zip.on("end",a=>super.end()),this.zip.on("drain",a=>this[ir]()),this.on("resume",a=>this.zip.resume())):this.on("drain",this[ir]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:a=>!0,this[We]=new m5,this[Ke]=0,this.jobs=+e.jobs||4,this[Ds]=!1,this[Os]=!1}[e0](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[Os]=!0,this[J1](),this}write(e){if(this[Os])throw new Error("write after end");return e instanceof o5?this[Jn](e):this[As](e),this.flowing}[Jn](e){let a=pr(Qn.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let s=new Fs(e.path,a,!1);s.entry=new l5(e,this[sr](s)),s.entry.on("end",i=>this[ar](s)),this[Ke]+=1,this[We].push(s)}this[J1]()}[As](e){let a=pr(Qn.resolve(this.cwd,e));this[We].push(new Fs(e,a)),this[J1]()}[rr](e){e.pending=!0,this[Ke]+=1;let a=this.follow?"stat":"lstat";Cs[a](e.absolute,(s,i)=>{e.pending=!1,this[Ke]-=1,s?this.emit("error",s):this[Rs](e,i)})}[Rs](e,a){this.statCache.set(e.absolute,a),e.stat=a,this.filter(e.path,a)||(e.ignore=!0),this[J1]()}[dr](e){e.pending=!0,this[Ke]+=1,Cs.readdir(e.absolute,(a,s)=>{if(e.pending=!1,this[Ke]-=1,a)return this.emit("error",a);this[Ns](e,s)})}[Ns](e,a){this.readdirCache.set(e.absolute,a),e.readdir=a,this[J1]()}[J1](){if(!this[Ds]){this[Ds]=!0;for(let e=this[We].head;e!==null&&this[Ke]this.warn(a,s,i),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[Xn](e){this[Ke]+=1;try{return new this[or](e.path,this[sr](e)).on("end",()=>this[ar](e)).on("error",a=>this.emit("error",a))}catch(a){this.emit("error",a)}}[ir](){this[Nt]&&this[Nt].entry&&this[Nt].entry.resume()}[Ps](e){e.piped=!0,e.readdir&&e.readdir.forEach(i=>{let p=e.path,r=p==="./"?"":p.replace(/\/*$/,"/");this[As](r+i)});let a=e.entry,s=this.zip;s?a.on("data",i=>{s.write(i)||a.pause()}):a.on("data",i=>{super.write(i)||a.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),nr=class extends mr{constructor(e){super(e),this[or]=n5}pause(){}resume(){}[rr](e){let a=this.follow?"statSync":"lstatSync";this[Rs](e,Cs[a](e.absolute))}[dr](e,a){this[Ns](e,Cs.readdirSync(e.absolute))}[Ps](e){let a=e.entry,s=this.zip;e.readdir&&e.readdir.forEach(i=>{let p=e.path,r=p==="./"?"":p.replace(/\/*$/,"/");this[As](r+i)}),s?a.on("data",i=>{s.write(i)}):a.on("data",i=>{super[e0](i)})}};mr.Sync=nr;t0.exports=mr});var Vt=c(wa=>{"use strict";var c5=gp(),h5=require("events").EventEmitter,le=require("fs"),hr=le.writev;if(!hr){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;hr=(a,s,i,p)=>{let r=(o,n)=>p(o,n,s),d=new e;d.oncomplete=r,t.writeBuffers(a,s,i,d)}}var Lt=Symbol("_autoClose"),ke=Symbol("_close"),ga=Symbol("_ended"),D=Symbol("_fd"),a0=Symbol("_finished"),L1=Symbol("_flags"),ur=Symbol("_flush"),fr=Symbol("_handleChunk"),vr=Symbol("_makeBuf"),Is=Symbol("_mode"),ks=Symbol("_needDrain"),Gt=Symbol("_onerror"),Ut=Symbol("_onopen"),cr=Symbol("_onread"),Ft=Symbol("_onwrite"),U1=Symbol("_open"),c1=Symbol("_path"),X1=Symbol("_pos"),Ye=Symbol("_queue"),Ct=Symbol("_read"),s0=Symbol("_readSize"),k1=Symbol("_reading"),Ls=Symbol("_remain"),i0=Symbol("_size"),Us=Symbol("_write"),Pt=Symbol("_writing"),Vs=Symbol("_defaultFlag"),kt=Symbol("_errored"),xs=class extends c5{constructor(e,a){if(a=a||{},super(a),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[kt]=!1,this[D]=typeof a.fd=="number"?a.fd:null,this[c1]=e,this[s0]=a.readSize||16*1024*1024,this[k1]=!1,this[i0]=typeof a.size=="number"?a.size:1/0,this[Ls]=this[i0],this[Lt]=typeof a.autoClose=="boolean"?a.autoClose:!0,typeof this[D]=="number"?this[Ct]():this[U1]()}get fd(){return this[D]}get path(){return this[c1]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[U1](){le.open(this[c1],"r",(e,a)=>this[Ut](e,a))}[Ut](e,a){e?this[Gt](e):(this[D]=a,this.emit("open",a),this[Ct]())}[vr](){return Buffer.allocUnsafe(Math.min(this[s0],this[Ls]))}[Ct](){if(!this[k1]){this[k1]=!0;let e=this[vr]();if(e.length===0)return process.nextTick(()=>this[cr](null,0,e));le.read(this[D],e,0,e.length,null,(a,s,i)=>this[cr](a,s,i))}}[cr](e,a,s){this[k1]=!1,e?this[Gt](e):this[fr](a,s)&&this[Ct]()}[ke](){if(this[Lt]&&typeof this[D]=="number"){let e=this[D];this[D]=null,le.close(e,a=>a?this.emit("error",a):this.emit("close"))}}[Gt](e){this[k1]=!0,this[ke](),this.emit("error",e)}[fr](e,a){let s=!1;return this[Ls]-=e,e>0&&(s=super.write(ethis[Ut](e,a))}[Ut](e,a){this[Vs]&&this[L1]==="r+"&&e&&e.code==="ENOENT"?(this[L1]="w",this[U1]()):e?this[Gt](e):(this[D]=a,this.emit("open",a),this[ur]())}end(e,a){return e&&this.write(e,a),this[ga]=!0,!this[Pt]&&!this[Ye].length&&typeof this[D]=="number"&&this[Ft](null,0),this}write(e,a){return typeof e=="string"&&(e=Buffer.from(e,a)),this[ga]?(this.emit("error",new Error("write() after end()")),!1):this[D]===null||this[Pt]||this[Ye].length?(this[Ye].push(e),this[ks]=!0,!1):(this[Pt]=!0,this[Us](e),!0)}[Us](e){le.write(this[D],e,0,e.length,this[X1],(a,s)=>this[Ft](a,s))}[Ft](e,a){e?this[Gt](e):(this[X1]!==null&&(this[X1]+=a),this[Ye].length?this[ur]():(this[Pt]=!1,this[ga]&&!this[a0]?(this[a0]=!0,this[ke](),this.emit("finish")):this[ks]&&(this[ks]=!1,this.emit("drain"))))}[ur](){if(this[Ye].length===0)this[ga]&&this[Ft](null,0);else if(this[Ye].length===1)this[Us](this[Ye].pop());else{let e=this[Ye];this[Ye]=[],hr(this[D],e,this[X1],(a,s)=>this[Ft](a,s))}}[ke](){if(this[Lt]&&typeof this[D]=="number"){let e=this[D];this[D]=null,le.close(e,a=>a?this.emit("error",a):this.emit("close"))}}},wr=class extends Bs{[U1](){let e;if(this[Vs]&&this[L1]==="r+")try{e=le.openSync(this[c1],this[L1],this[Is])}catch(a){if(a.code==="ENOENT")return this[L1]="w",this[U1]();throw a}else e=le.openSync(this[c1],this[L1],this[Is]);this[Ut](null,e)}[ke](){if(this[Lt]&&typeof this[D]=="number"){let e=this[D];this[D]=null,le.closeSync(e),this.emit("close")}}[Us](e){let a=!0;try{this[Ft](null,le.writeSync(this[D],e,0,e.length,this[X1])),a=!1}finally{if(a)try{this[ke]()}catch{}}}};wa.ReadStream=xs;wa.ReadStreamSync=gr;wa.WriteStream=Bs;wa.WriteStreamSync=wr});var Ws=c((Lh,u0)=>{"use strict";var f5=_s(),v5=Rt(),g5=require("events"),w5=tr(),_5=1024*1024,E5=vs(),p0=ws(),T5=Gp(),{nextTick:b5}=require("process"),_r=Buffer.from([31,139]),Se=Symbol("state"),Q1=Symbol("writeEntry"),h1=Symbol("readEntry"),Er=Symbol("nextEntry"),r0=Symbol("processEntry"),Oe=Symbol("extendedHeader"),_a=Symbol("globalExtendedHeader"),V1=Symbol("meta"),d0=Symbol("emitMeta"),N=Symbol("buffer"),f1=Symbol("queue"),et=Symbol("ended"),o0=Symbol("emittedEnd"),tt=Symbol("emit"),me=Symbol("unzip"),qs=Symbol("consumeChunk"),Ms=Symbol("consumeChunkSub"),Tr=Symbol("consumeBody"),n0=Symbol("consumeMeta"),l0=Symbol("consumeHeader"),js=Symbol("consuming"),br=Symbol("bufferConcat"),yr=Symbol("maybeEnd"),Ea=Symbol("writing"),I1=Symbol("aborted"),Hs=Symbol("onDone"),at=Symbol("sawValidEntry"),zs=Symbol("sawNullBlock"),$s=Symbol("sawEOF"),m0=Symbol("closeStream"),y5=t=>!0;u0.exports=f5(class extends g5{constructor(e){e=e||{},super(e),this.file=e.file||"",this[at]=null,this.on(Hs,a=>{(this[Se]==="begin"||this[at]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(Hs,e.ondone):this.on(Hs,a=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||_5,this.filter=typeof e.filter=="function"?e.filter:y5,this.writable=!0,this.readable=!1,this[f1]=new w5,this[N]=null,this[h1]=null,this[Q1]=null,this[Se]="begin",this[V1]="",this[Oe]=null,this[_a]=null,this[et]=!1,this[me]=null,this[I1]=!1,this[zs]=!1,this[$s]=!1,this.on("end",()=>this[m0]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[l0](e,a){this[at]===null&&(this[at]=!1);let s;try{s=new v5(e,a,this[Oe],this[_a])}catch(i){return this.warn("TAR_ENTRY_INVALID",i)}if(s.nullBlock)this[zs]?(this[$s]=!0,this[Se]==="begin"&&(this[Se]="header"),this[tt]("eof")):(this[zs]=!0,this[tt]("nullBlock"));else if(this[zs]=!1,!s.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:s});else if(!s.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:s});else{let i=s.type;if(/^(Symbolic)?Link$/.test(i)&&!s.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:s});else if(!/^(Symbolic)?Link$/.test(i)&&s.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:s});else{let p=this[Q1]=new E5(s,this[Oe],this[_a]);if(!this[at])if(p.remain){let r=()=>{p.invalid||(this[at]=!0)};p.on("end",r)}else this[at]=!0;p.meta?p.size>this.maxMetaEntrySize?(p.ignore=!0,this[tt]("ignoredEntry",p),this[Se]="ignore",p.resume()):p.size>0&&(this[V1]="",p.on("data",r=>this[V1]+=r),this[Se]="meta"):(this[Oe]=null,p.ignore=p.ignore||!this.filter(p.path,p),p.ignore?(this[tt]("ignoredEntry",p),this[Se]=p.remain?"ignore":"header",p.resume()):(p.remain?this[Se]="body":(this[Se]="header",p.end()),this[h1]?this[f1].push(p):(this[f1].push(p),this[Er]())))}}}[m0](){b5(()=>this.emit("close"))}[r0](e){let a=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[h1]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",s=>this[Er]()),a=!1)):(this[h1]=null,a=!1),a}[Er](){do;while(this[r0](this[f1].shift()));if(!this[f1].length){let e=this[h1];!e||e.flowing||e.size===e.remain?this[Ea]||this.emit("drain"):e.once("drain",s=>this.emit("drain"))}}[Tr](e,a){let s=this[Q1],i=s.blockRemain,p=i>=e.length&&a===0?e:e.slice(a,a+i);return s.write(p),s.blockRemain||(this[Se]="header",this[Q1]=null,s.end()),p.length}[n0](e,a){let s=this[Q1],i=this[Tr](e,a);return this[Q1]||this[d0](s),i}[tt](e,a,s){!this[f1].length&&!this[h1]?this.emit(e,a,s):this[f1].push([e,a,s])}[d0](e){switch(this[tt]("meta",this[V1]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[Oe]=p0.parse(this[V1],this[Oe],!1);break;case"GlobalExtendedHeader":this[_a]=p0.parse(this[V1],this[_a],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[Oe]=this[Oe]||Object.create(null),this[Oe].path=this[V1].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[Oe]=this[Oe]||Object.create(null),this[Oe].linkpath=this[V1].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[I1]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[I1])return;if(this[me]===null&&e){if(this[N]&&(e=Buffer.concat([this[N],e]),this[N]=null),e.length<_r.length)return this[N]=e,!0;for(let s=0;this[me]===null&&s<_r.length;s++)e[s]!==_r[s]&&(this[me]=!1);if(this[me]===null){let s=this[et];this[et]=!1,this[me]=new T5.Unzip,this[me].on("data",p=>this[qs](p)),this[me].on("error",p=>this.abort(p)),this[me].on("end",p=>{this[et]=!0,this[qs]()}),this[Ea]=!0;let i=this[me][s?"end":"write"](e);return this[Ea]=!1,i}}this[Ea]=!0,this[me]?this[me].write(e):this[qs](e),this[Ea]=!1;let a=this[f1].length?!1:this[h1]?this[h1].flowing:!0;return!a&&!this[f1].length&&this[h1].once("drain",s=>this.emit("drain")),a}[br](e){e&&!this[I1]&&(this[N]=this[N]?Buffer.concat([this[N],e]):e)}[yr](){if(this[et]&&!this[o0]&&!this[I1]&&!this[js]){this[o0]=!0;let e=this[Q1];if(e&&e.blockRemain){let a=this[N]?this[N].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${a} available)`,{entry:e}),this[N]&&e.write(this[N]),e.end()}this[tt](Hs)}}[qs](e){if(this[js])this[br](e);else if(!e&&!this[N])this[yr]();else{if(this[js]=!0,this[N]){this[br](e);let a=this[N];this[N]=null,this[Ms](a)}else this[Ms](e);for(;this[N]&&this[N].length>=512&&!this[I1]&&!this[$s];){let a=this[N];this[N]=null,this[Ms](a)}this[js]=!1}(!this[N]||this[et])&&this[yr]()}[Ms](e){let a=0,s=e.length;for(;a+512<=s&&!this[I1]&&!this[$s];)switch(this[Se]){case"begin":case"header":this[l0](e,a),a+=512;break;case"ignore":case"body":a+=this[Tr](e,a);break;case"meta":a+=this[n0](e,a);break;default:throw new Error("invalid state: "+this[Se])}a{"use strict";var S5=Et(),h0=Ws(),It=require("fs"),O5=Vt(),c0=require("path"),Sr=At();v0.exports=(t,e,a)=>{typeof t=="function"?(a=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(a=e,e=null),e?e=Array.from(e):e=[];let s=S5(t);if(s.sync&&typeof a=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof a=="function")throw new TypeError("callback only supported with file option");return e.length&&R5(s,e),s.noResume||D5(s),s.file&&s.sync?A5(s):s.file?N5(s,a):f0(s)};var D5=t=>{let e=t.onentry;t.onentry=e?a=>{e(a),a.resume()}:a=>a.resume()},R5=(t,e)=>{let a=new Map(e.map(p=>[Sr(p),!0])),s=t.filter,i=(p,r)=>{let d=r||c0.parse(p).root||".",o=p===d?!1:a.has(p)?a.get(p):i(c0.dirname(p),d);return a.set(p,o),o};t.filter=s?(p,r)=>s(p,r)&&i(Sr(p)):p=>i(Sr(p))},A5=t=>{let e=f0(t),a=t.file,s=!0,i;try{let p=It.statSync(a),r=t.maxReadSize||16*1024*1024;if(p.size{let a=new h0(t),s=t.maxReadSize||16*1024*1024,i=t.file,p=new Promise((r,d)=>{a.on("error",d),a.on("end",r),It.stat(i,(o,n)=>{if(o)d(o);else{let l=new O5.ReadStream(i,{readSize:s,size:n.size});l.on("error",d),l.pipe(a)}})});return e?p.then(e,e):p},f0=t=>new h0(t)});var b0=c((Vh,T0)=>{"use strict";var P5=Et(),Ys=Gs(),g0=Vt(),w0=Ks(),_0=require("path");T0.exports=(t,e,a)=>{if(typeof e=="function"&&(a=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let s=P5(t);if(s.sync&&typeof a=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof a=="function")throw new TypeError("callback only supported with file option");return s.file&&s.sync?F5(s,e):s.file?C5(s,e,a):s.sync?G5(s,e):k5(s,e)};var F5=(t,e)=>{let a=new Ys.Sync(t),s=new g0.WriteStreamSync(t.file,{mode:t.mode||438});a.pipe(s),E0(a,e)},C5=(t,e,a)=>{let s=new Ys(t),i=new g0.WriteStream(t.file,{mode:t.mode||438});s.pipe(i);let p=new Promise((r,d)=>{i.on("error",d),i.on("close",r),s.on("error",d)});return Or(s,e),a?p.then(a,a):p},E0=(t,e)=>{e.forEach(a=>{a.charAt(0)==="@"?w0({file:_0.resolve(t.cwd,a.slice(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(a)}),t.end()},Or=(t,e)=>{for(;e.length;){let a=e.shift();if(a.charAt(0)==="@")return w0({file:_0.resolve(t.cwd,a.slice(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>Or(t,e));t.add(a)}t.end()},G5=(t,e)=>{let a=new Ys.Sync(t);return E0(a,e),a},k5=(t,e)=>{let a=new Ys(t);return Or(a,e),a}});var Dr=c((Ih,N0)=>{"use strict";var L5=Et(),y0=Gs(),we=require("fs"),S0=Vt(),O0=Ks(),D0=require("path"),R0=Rt();N0.exports=(t,e,a)=>{let s=L5(t);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),s.sync?U5(s,e):I5(s,e,a)};var U5=(t,e)=>{let a=new y0.Sync(t),s=!0,i,p;try{try{i=we.openSync(t.file,"r+")}catch(o){if(o.code==="ENOENT")i=we.openSync(t.file,"w+");else throw o}let r=we.fstatSync(i),d=Buffer.alloc(512);e:for(p=0;pr.size)break;p+=n,t.mtimeCache&&t.mtimeCache.set(o.path,o.mtime)}s=!1,V5(t,a,p,i,e)}finally{if(s)try{we.closeSync(i)}catch{}}},V5=(t,e,a,s,i)=>{let p=new S0.WriteStreamSync(t.file,{fd:s,start:a});e.pipe(p),x5(e,i)},I5=(t,e,a)=>{e=Array.from(e);let s=new y0(t),i=(r,d,o)=>{let n=(h,E)=>{h?we.close(r,w=>o(h)):o(null,E)},l=0;if(d===0)return n(null,0);let m=0,u=Buffer.alloc(512),f=(h,E)=>{if(h)return n(h);if(m+=E,m<512&&E)return we.read(r,u,m,u.length-m,l+m,f);if(l===0&&u[0]===31&&u[1]===139)return n(new Error("cannot append to compressed archives"));if(m<512)return n(null,l);let w=new R0(u);if(!w.cksumValid)return n(null,l);let y=512*Math.ceil(w.size/512);if(l+y+512>d||(l+=y+512,l>=d))return n(null,l);t.mtimeCache&&t.mtimeCache.set(w.path,w.mtime),m=0,we.read(r,u,0,512,l,f)};we.read(r,u,0,512,l,f)},p=new Promise((r,d)=>{s.on("error",d);let o="r+",n=(l,m)=>{if(l&&l.code==="ENOENT"&&o==="r+")return o="w+",we.open(t.file,o,n);if(l)return d(l);we.fstat(m,(u,f)=>{if(u)return we.close(m,()=>d(u));i(m,f.size,(h,E)=>{if(h)return d(h);let w=new S0.WriteStream(t.file,{fd:m,start:E});s.pipe(w),w.on("error",d),w.on("close",r),A0(s,e)})})};we.open(t.file,o,n)});return a?p.then(a,a):p},x5=(t,e)=>{e.forEach(a=>{a.charAt(0)==="@"?O0({file:D0.resolve(t.cwd,a.slice(1)),sync:!0,noResume:!0,onentry:s=>t.add(s)}):t.add(a)}),t.end()},A0=(t,e)=>{for(;e.length;){let a=e.shift();if(a.charAt(0)==="@")return O0({file:D0.resolve(t.cwd,a.slice(1)),noResume:!0,onentry:s=>t.add(s)}).then(s=>A0(t,e));t.add(a)}t.end()}});var F0=c((xh,P0)=>{"use strict";var B5=Et(),q5=Dr();P0.exports=(t,e,a)=>{let s=B5(t);if(!s.file)throw new TypeError("file is required");if(s.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),M5(s),q5(s,e,a)};var M5=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(a,s)=>e(a,s)&&!(t.mtimeCache.get(a)>s.mtime):(a,s)=>!(t.mtimeCache.get(a)>s.mtime)}});var k0=c((Bh,G0)=>{var{promisify:C0}=require("util"),x1=require("fs"),j5=t=>{if(!t)t={mode:511,fs:x1};else if(typeof t=="object")t={mode:511,fs:x1,...t};else if(typeof t=="number")t={mode:t,fs:x1};else if(typeof t=="string")t={mode:parseInt(t,8),fs:x1};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||x1.mkdir,t.mkdirAsync=C0(t.mkdir),t.stat=t.stat||t.fs.stat||x1.stat,t.statAsync=C0(t.stat),t.statSync=t.statSync||t.fs.statSync||x1.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||x1.mkdirSync,t};G0.exports=j5});var U0=c((qh,L0)=>{var H5=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:z5,parse:$5}=require("path"),W5=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=z5(t),H5==="win32"){let e=/[*|"<>?:]/,{root:a}=$5(t);if(e.test(t.substr(a.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};L0.exports=W5});var q0=c((Mh,B0)=>{var{dirname:V0}=require("path"),I0=(t,e,a=void 0)=>a===e?Promise.resolve():t.statAsync(e).then(s=>s.isDirectory()?a:void 0,s=>s.code==="ENOENT"?I0(t,V0(e),e):void 0),x0=(t,e,a=void 0)=>{if(a!==e)try{return t.statSync(e).isDirectory()?a:void 0}catch(s){return s.code==="ENOENT"?x0(t,V0(e),e):void 0}};B0.exports={findMade:I0,findMadeSync:x0}});var Nr=c((jh,j0)=>{var{dirname:M0}=require("path"),Rr=(t,e,a)=>{e.recursive=!1;let s=M0(t);return s===t?e.mkdirAsync(t,e).catch(i=>{if(i.code!=="EISDIR")throw i}):e.mkdirAsync(t,e).then(()=>a||t,i=>{if(i.code==="ENOENT")return Rr(s,e).then(p=>Rr(t,e,p));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;return e.statAsync(t).then(p=>{if(p.isDirectory())return a;throw i},()=>{throw i})})},Ar=(t,e,a)=>{let s=M0(t);if(e.recursive=!1,s===t)try{return e.mkdirSync(t,e)}catch(i){if(i.code!=="EISDIR")throw i;return}try{return e.mkdirSync(t,e),a||t}catch(i){if(i.code==="ENOENT")return Ar(t,e,Ar(s,e,a));if(i.code!=="EEXIST"&&i.code!=="EROFS")throw i;try{if(!e.statSync(t).isDirectory())throw i}catch{throw i}}};j0.exports={mkdirpManual:Rr,mkdirpManualSync:Ar}});var $0=c((Hh,z0)=>{var{dirname:H0}=require("path"),{findMade:K5,findMadeSync:Y5}=q0(),{mkdirpManual:Z5,mkdirpManualSync:J5}=Nr(),X5=(t,e)=>(e.recursive=!0,H0(t)===t?e.mkdirAsync(t,e):K5(e,t).then(s=>e.mkdirAsync(t,e).then(()=>s).catch(i=>{if(i.code==="ENOENT")return Z5(t,e);throw i}))),Q5=(t,e)=>{if(e.recursive=!0,H0(t)===t)return e.mkdirSync(t,e);let s=Y5(e,t);try{return e.mkdirSync(t,e),s}catch(i){if(i.code==="ENOENT")return J5(t,e);throw i}};z0.exports={mkdirpNative:X5,mkdirpNativeSync:Q5}});var Z0=c((zh,Y0)=>{var W0=require("fs"),e8=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,Pr=e8.replace(/^v/,"").split("."),K0=+Pr[0]>10||+Pr[0]==10&&+Pr[1]>=12,t8=K0?t=>t.mkdir===W0.mkdir:()=>!1,a8=K0?t=>t.mkdirSync===W0.mkdirSync:()=>!1;Y0.exports={useNative:t8,useNativeSync:a8}});var a6=c(($h,t6)=>{var xt=k0(),Bt=U0(),{mkdirpNative:J0,mkdirpNativeSync:X0}=$0(),{mkdirpManual:Q0,mkdirpManualSync:e6}=Nr(),{useNative:s8,useNativeSync:i8}=Z0(),qt=(t,e)=>(t=Bt(t),e=xt(e),s8(e)?J0(t,e):Q0(t,e)),p8=(t,e)=>(t=Bt(t),e=xt(e),i8(e)?X0(t,e):e6(t,e));qt.sync=p8;qt.native=(t,e)=>J0(Bt(t),xt(e));qt.manual=(t,e)=>Q0(Bt(t),xt(e));qt.nativeSync=(t,e)=>X0(Bt(t),xt(e));qt.manualSync=(t,e)=>e6(Bt(t),xt(e));t6.exports=qt});var n6=c((Wh,o6)=>{"use strict";var De=require("fs"),st=require("path"),r8=De.lchown?"lchown":"chown",d8=De.lchownSync?"lchownSync":"chownSync",i6=De.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),s6=(t,e,a)=>{try{return De[d8](t,e,a)}catch(s){if(s.code!=="ENOENT")throw s}},o8=(t,e,a)=>{try{return De.chownSync(t,e,a)}catch(s){if(s.code!=="ENOENT")throw s}},n8=i6?(t,e,a,s)=>i=>{!i||i.code!=="EISDIR"?s(i):De.chown(t,e,a,s)}:(t,e,a,s)=>s,Fr=i6?(t,e,a)=>{try{return s6(t,e,a)}catch(s){if(s.code!=="EISDIR")throw s;o8(t,e,a)}}:(t,e,a)=>s6(t,e,a),l8=process.version,p6=(t,e,a)=>De.readdir(t,e,a),m8=(t,e)=>De.readdirSync(t,e);/^v4\./.test(l8)&&(p6=(t,e,a)=>De.readdir(t,a));var Zs=(t,e,a,s)=>{De[r8](t,e,a,n8(t,e,a,i=>{s(i&&i.code!=="ENOENT"?i:null)}))},r6=(t,e,a,s,i)=>{if(typeof e=="string")return De.lstat(st.resolve(t,e),(p,r)=>{if(p)return i(p.code!=="ENOENT"?p:null);r.name=e,r6(t,r,a,s,i)});if(e.isDirectory())Cr(st.resolve(t,e.name),a,s,p=>{if(p)return i(p);let r=st.resolve(t,e.name);Zs(r,a,s,i)});else{let p=st.resolve(t,e.name);Zs(p,a,s,i)}},Cr=(t,e,a,s)=>{p6(t,{withFileTypes:!0},(i,p)=>{if(i){if(i.code==="ENOENT")return s();if(i.code!=="ENOTDIR"&&i.code!=="ENOTSUP")return s(i)}if(i||!p.length)return Zs(t,e,a,s);let r=p.length,d=null,o=n=>{if(!d){if(n)return s(d=n);if(--r===0)return Zs(t,e,a,s)}};p.forEach(n=>r6(t,n,e,a,o))})},u8=(t,e,a,s)=>{if(typeof e=="string")try{let i=De.lstatSync(st.resolve(t,e));i.name=e,e=i}catch(i){if(i.code==="ENOENT")return;throw i}e.isDirectory()&&d6(st.resolve(t,e.name),a,s),Fr(st.resolve(t,e.name),a,s)},d6=(t,e,a)=>{let s;try{s=m8(t,{withFileTypes:!0})}catch(i){if(i.code==="ENOENT")return;if(i.code==="ENOTDIR"||i.code==="ENOTSUP")return Fr(t,e,a);throw i}return s&&s.length&&s.forEach(i=>u8(t,i,e,a)),Fr(t,e,a)};o6.exports=Cr;Cr.sync=d6});var c6=c((Kh,Gr)=>{"use strict";var l6=a6(),Re=require("fs"),Js=require("path"),m6=n6(),Le=Ot(),Xs=class extends Error{constructor(e,a){super("Cannot extract through symbolic link"),this.path=a,this.symlink=e}get name(){return"SylinkError"}},Qs=class extends Error{constructor(e,a){super(a+": Cannot cd into '"+e+"'"),this.path=e,this.code=a}get name(){return"CwdError"}},ei=(t,e)=>t.get(Le(e)),Ta=(t,e,a)=>t.set(Le(e),a),c8=(t,e)=>{Re.stat(t,(a,s)=>{(a||!s.isDirectory())&&(a=new Qs(t,a&&a.code||"ENOTDIR")),e(a)})};Gr.exports=(t,e,a)=>{t=Le(t);let s=e.umask,i=e.mode|448,p=(i&s)!==0,r=e.uid,d=e.gid,o=typeof r=="number"&&typeof d=="number"&&(r!==e.processUid||d!==e.processGid),n=e.preserve,l=e.unlink,m=e.cache,u=Le(e.cwd),f=(w,y)=>{w?a(w):(Ta(m,t,!0),y&&o?m6(y,r,d,Ze=>f(Ze)):p?Re.chmod(t,i,a):a())};if(m&&ei(m,t)===!0)return f();if(t===u)return c8(t,f);if(n)return l6(t,{mode:i}).then(w=>f(null,w),f);let E=Le(Js.relative(u,t)).split("/");ti(u,E,i,m,l,u,null,f)};var ti=(t,e,a,s,i,p,r,d)=>{if(!e.length)return d(null,r);let o=e.shift(),n=Le(Js.resolve(t+"/"+o));if(ei(s,n))return ti(n,e,a,s,i,p,r,d);Re.mkdir(n,a,u6(n,e,a,s,i,p,r,d))},u6=(t,e,a,s,i,p,r,d)=>o=>{o?Re.lstat(t,(n,l)=>{if(n)n.path=n.path&&Le(n.path),d(n);else if(l.isDirectory())ti(t,e,a,s,i,p,r,d);else if(i)Re.unlink(t,m=>{if(m)return d(m);Re.mkdir(t,a,u6(t,e,a,s,i,p,r,d))});else{if(l.isSymbolicLink())return d(new Xs(t,t+"/"+e.join("/")));d(o)}}):(r=r||t,ti(t,e,a,s,i,p,r,d))},h8=t=>{let e=!1,a="ENOTDIR";try{e=Re.statSync(t).isDirectory()}catch(s){a=s.code}finally{if(!e)throw new Qs(t,a)}};Gr.exports.sync=(t,e)=>{t=Le(t);let a=e.umask,s=e.mode|448,i=(s&a)!==0,p=e.uid,r=e.gid,d=typeof p=="number"&&typeof r=="number"&&(p!==e.processUid||r!==e.processGid),o=e.preserve,n=e.unlink,l=e.cache,m=Le(e.cwd),u=w=>{Ta(l,t,!0),w&&d&&m6.sync(w,p,r),i&&Re.chmodSync(t,s)};if(l&&ei(l,t)===!0)return u();if(t===m)return h8(m),u();if(o)return u(l6.sync(t,s));let h=Le(Js.relative(m,t)).split("/"),E=null;for(let w=h.shift(),y=m;w&&(y+="/"+w);w=h.shift())if(y=Le(Js.resolve(y)),!ei(l,y))try{Re.mkdirSync(y,s),E=E||y,Ta(l,y,!0)}catch{let ka=Re.lstatSync(y);if(ka.isDirectory()){Ta(l,y,!0);continue}else if(n){Re.unlinkSync(y),Re.mkdirSync(y,s),E=E||y,Ta(l,y,!0);continue}else if(ka.isSymbolicLink())return new Xs(y,y+"/"+h.join("/"))}return u(E)}});var Lr=c((Yh,h6)=>{var kr=Object.create(null),{hasOwnProperty:f8}=Object.prototype;h6.exports=t=>(f8.call(kr,t)||(kr[t]=t.normalize("NFKD")),kr[t])});var w6=c((Zh,g6)=>{var f6=require("assert"),v8=Lr(),g8=At(),{join:v6}=require("path"),w8=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,_8=w8==="win32";g6.exports=()=>{let t=new Map,e=new Map,a=n=>n.split("/").slice(0,-1).reduce((m,u)=>(m.length&&(u=v6(m[m.length-1],u)),m.push(u||"/"),m),[]),s=new Set,i=n=>{let l=e.get(n);if(!l)throw new Error("function does not have any path reservations");return{paths:l.paths.map(m=>t.get(m)),dirs:[...l.dirs].map(m=>t.get(m))}},p=n=>{let{paths:l,dirs:m}=i(n);return l.every(u=>u[0]===n)&&m.every(u=>u[0]instanceof Set&&u[0].has(n))},r=n=>s.has(n)||!p(n)?!1:(s.add(n),n(()=>d(n)),!0),d=n=>{if(!s.has(n))return!1;let{paths:l,dirs:m}=e.get(n),u=new Set;return l.forEach(f=>{let h=t.get(f);f6.equal(h[0],n),h.length===1?t.delete(f):(h.shift(),typeof h[0]=="function"?u.add(h[0]):h[0].forEach(E=>u.add(E)))}),m.forEach(f=>{let h=t.get(f);f6(h[0]instanceof Set),h[0].size===1&&h.length===1?t.delete(f):h[0].size===1?(h.shift(),u.add(h[0])):h[0].delete(n)}),s.delete(n),u.forEach(f=>r(f)),!0};return{check:p,reserve:(n,l)=>{n=_8?["win32 parallelization disabled"]:n.map(u=>v8(g8(v6(u))).toLowerCase());let m=new Set(n.map(u=>a(u)).reduce((u,f)=>u.concat(f)));return e.set(l,{dirs:m,paths:n}),n.forEach(u=>{let f=t.get(u);f?f.push(l):t.set(u,[l])}),m.forEach(u=>{let f=t.get(u);f?f[f.length-1]instanceof Set?f[f.length-1].add(l):f.push(new Set([l])):t.set(u,[new Set([l])])}),r(l)}}}});var T6=c((Jh,E6)=>{var E8=process.env.__FAKE_PLATFORM__||process.platform,T8=E8==="win32",b8=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:y8,O_TRUNC:S8,O_WRONLY:O8,UV_FS_O_FILEMAP:_6=0}=b8.constants,D8=T8&&!!_6,R8=512*1024,A8=_6|S8|y8|O8;E6.exports=D8?t=>t"w"});var Hr=c((Xh,L6)=>{"use strict";var N8=require("assert"),P8=Ws(),b=require("fs"),F8=Vt(),v1=require("path"),C6=c6(),b6=jp(),C8=w6(),G8=Hp(),_e=Ot(),k8=At(),L8=Lr(),y6=Symbol("onEntry"),Ir=Symbol("checkFs"),S6=Symbol("checkFs2"),ii=Symbol("pruneCache"),xr=Symbol("isReusable"),Ae=Symbol("makeFs"),Br=Symbol("file"),qr=Symbol("directory"),pi=Symbol("link"),O6=Symbol("symlink"),D6=Symbol("hardlink"),R6=Symbol("unsupported"),A6=Symbol("checkPath"),B1=Symbol("mkdir"),X=Symbol("onError"),ai=Symbol("pending"),N6=Symbol("pend"),Mt=Symbol("unpend"),Ur=Symbol("ended"),Vr=Symbol("maybeClose"),Mr=Symbol("skip"),ba=Symbol("doChown"),ya=Symbol("uid"),Sa=Symbol("gid"),Oa=Symbol("checkedCwd"),G6=require("crypto"),k6=T6(),U8=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Da=U8==="win32",V8=(t,e)=>{if(!Da)return b.unlink(t,e);let a=t+".DELETE."+G6.randomBytes(16).toString("hex");b.rename(t,a,s=>{if(s)return e(s);b.unlink(a,e)})},I8=t=>{if(!Da)return b.unlinkSync(t);let e=t+".DELETE."+G6.randomBytes(16).toString("hex");b.renameSync(t,e),b.unlinkSync(e)},P6=(t,e,a)=>t===t>>>0?t:e===e>>>0?e:a,F6=t=>L8(k8(_e(t))).toLowerCase(),x8=(t,e)=>{e=F6(e);for(let a of t.keys()){let s=F6(a);(s===e||s.indexOf(e+"/")===0)&&t.delete(a)}},B8=t=>{for(let e of t.keys())t.delete(e)},Ra=class extends P8{constructor(e){if(e||(e={}),e.ondone=a=>{this[Ur]=!0,this[Vr]()},super(e),this[Oa]=!1,this.reservations=C8(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[ai]=0,this[Ur]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Da,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=_e(v1.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",a=>this[y6](a))}warn(e,a,s={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(s.recoverable=!1),super.warn(e,a,s)}[Vr](){this[Ur]&&this[ai]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[A6](e){if(this.strip){let a=_e(e.path).split("/");if(a.length=this.strip)e.linkpath=s.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let a=_e(e.path),s=a.split("/");if(s.includes("..")||Da&&/^[a-z]:\.\.$/i.test(s[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:a}),!1;let[i,p]=G8(a);i&&(e.path=p,this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:e,path:a}))}if(v1.isAbsolute(e.path)?e.absolute=_e(v1.resolve(e.path)):e.absolute=_e(v1.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:_e(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:a}=v1.win32.parse(e.absolute);e.absolute=a+b6.encode(e.absolute.slice(a.length));let{root:s}=v1.win32.parse(e.path);e.path=s+b6.encode(e.path.slice(s.length))}return!0}[y6](e){if(!this[A6](e))return e.resume();switch(N8.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Ir](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[R6](e)}}[X](e,a){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:a}),this[Mt](),a.resume())}[B1](e,a,s){C6(_e(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:a,noChmod:this.noChmod},s)}[ba](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[ya](e){return P6(this.uid,e.uid,this.processUid)}[Sa](e){return P6(this.gid,e.gid,this.processGid)}[Br](e,a){let s=e.mode&4095||this.fmode,i=new F8.WriteStream(e.absolute,{flags:k6(e.size),mode:s,autoClose:!1});i.on("error",o=>{i.fd&&b.close(i.fd,()=>{}),i.write=()=>!0,this[X](o,e),a()});let p=1,r=o=>{if(o){i.fd&&b.close(i.fd,()=>{}),this[X](o,e),a();return}--p===0&&b.close(i.fd,n=>{n?this[X](n,e):this[Mt](),a()})};i.on("finish",o=>{let n=e.absolute,l=i.fd;if(e.mtime&&!this.noMtime){p++;let m=e.atime||new Date,u=e.mtime;b.futimes(l,m,u,f=>f?b.utimes(n,m,u,h=>r(h&&f)):r())}if(this[ba](e)){p++;let m=this[ya](e),u=this[Sa](e);b.fchown(l,m,u,f=>f?b.chown(n,m,u,h=>r(h&&f)):r())}r()});let d=this.transform&&this.transform(e)||e;d!==e&&(d.on("error",o=>{this[X](o,e),a()}),e.pipe(d)),d.pipe(i)}[qr](e,a){let s=e.mode&4095||this.dmode;this[B1](e.absolute,s,i=>{if(i){this[X](i,e),a();return}let p=1,r=d=>{--p===0&&(a(),this[Mt](),e.resume())};e.mtime&&!this.noMtime&&(p++,b.utimes(e.absolute,e.atime||new Date,e.mtime,r)),this[ba](e)&&(p++,b.chown(e.absolute,this[ya](e),this[Sa](e),r)),r()})}[R6](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[O6](e,a){this[pi](e,e.linkpath,"symlink",a)}[D6](e,a){let s=_e(v1.resolve(this.cwd,e.linkpath));this[pi](e,s,"link",a)}[N6](){this[ai]++}[Mt](){this[ai]--,this[Vr]()}[Mr](e){this[Mt](),e.resume()}[xr](e,a){return e.type==="File"&&!this.unlink&&a.isFile()&&a.nlink<=1&&!Da}[Ir](e){this[N6]();let a=[e.path];e.linkpath&&a.push(e.linkpath),this.reservations.reserve(a,s=>this[S6](e,s))}[ii](e){e.type==="SymbolicLink"?B8(this.dirCache):e.type!=="Directory"&&x8(this.dirCache,e.absolute)}[S6](e,a){this[ii](e);let s=d=>{this[ii](e),a(d)},i=()=>{this[B1](this.cwd,this.dmode,d=>{if(d){this[X](d,e),s();return}this[Oa]=!0,p()})},p=()=>{if(e.absolute!==this.cwd){let d=_e(v1.dirname(e.absolute));if(d!==this.cwd)return this[B1](d,this.dmode,o=>{if(o){this[X](o,e),s();return}r()})}r()},r=()=>{b.lstat(e.absolute,(d,o)=>{if(o&&(this.keep||this.newer&&o.mtime>e.mtime)){this[Mr](e),s();return}if(d||this[xr](e,o))return this[Ae](null,e,s);if(o.isDirectory()){if(e.type==="Directory"){let n=!this.noChmod&&e.mode&&(o.mode&4095)!==e.mode,l=m=>this[Ae](m,e,s);return n?b.chmod(e.absolute,e.mode,l):l()}if(e.absolute!==this.cwd)return b.rmdir(e.absolute,n=>this[Ae](n,e,s))}if(e.absolute===this.cwd)return this[Ae](null,e,s);V8(e.absolute,n=>this[Ae](n,e,s))})};this[Oa]?p():i()}[Ae](e,a,s){if(e){this[X](e,a),s();return}switch(a.type){case"File":case"OldFile":case"ContiguousFile":return this[Br](a,s);case"Link":return this[D6](a,s);case"SymbolicLink":return this[O6](a,s);case"Directory":case"GNUDumpDir":return this[qr](a,s)}}[pi](e,a,s,i){b[s](a,e.absolute,p=>{p?this[X](p,e):(this[Mt](),e.resume()),i()})}},si=t=>{try{return[null,t()]}catch(e){return[e,null]}},jr=class extends Ra{[Ae](e,a){return super[Ae](e,a,()=>{})}[Ir](e){if(this[ii](e),!this[Oa]){let p=this[B1](this.cwd,this.dmode);if(p)return this[X](p,e);this[Oa]=!0}if(e.absolute!==this.cwd){let p=_e(v1.dirname(e.absolute));if(p!==this.cwd){let r=this[B1](p,this.dmode);if(r)return this[X](r,e)}}let[a,s]=si(()=>b.lstatSync(e.absolute));if(s&&(this.keep||this.newer&&s.mtime>e.mtime))return this[Mr](e);if(a||this[xr](e,s))return this[Ae](null,e);if(s.isDirectory()){if(e.type==="Directory"){let r=!this.noChmod&&e.mode&&(s.mode&4095)!==e.mode,[d]=r?si(()=>{b.chmodSync(e.absolute,e.mode)}):[];return this[Ae](d,e)}let[p]=si(()=>b.rmdirSync(e.absolute));this[Ae](p,e)}let[i]=e.absolute===this.cwd?[]:si(()=>I8(e.absolute));this[Ae](i,e)}[Br](e,a){let s=e.mode&4095||this.fmode,i=d=>{let o;try{b.closeSync(p)}catch(n){o=n}(d||o)&&this[X](d||o,e),a()},p;try{p=b.openSync(e.absolute,k6(e.size),s)}catch(d){return i(d)}let r=this.transform&&this.transform(e)||e;r!==e&&(r.on("error",d=>this[X](d,e)),e.pipe(r)),r.on("data",d=>{try{b.writeSync(p,d,0,d.length)}catch(o){i(o)}}),r.on("end",d=>{let o=null;if(e.mtime&&!this.noMtime){let n=e.atime||new Date,l=e.mtime;try{b.futimesSync(p,n,l)}catch(m){try{b.utimesSync(e.absolute,n,l)}catch{o=m}}}if(this[ba](e)){let n=this[ya](e),l=this[Sa](e);try{b.fchownSync(p,n,l)}catch(m){try{b.chownSync(e.absolute,n,l)}catch{o=o||m}}}i(o)})}[qr](e,a){let s=e.mode&4095||this.dmode,i=this[B1](e.absolute,s);if(i){this[X](i,e),a();return}if(e.mtime&&!this.noMtime)try{b.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[ba](e))try{b.chownSync(e.absolute,this[ya](e),this[Sa](e))}catch{}a(),e.resume()}[B1](e,a){try{return C6.sync(_e(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:a})}catch(s){return s}}[pi](e,a,s,i){try{b[s+"Sync"](a,e.absolute),i(),e.resume()}catch(p){return this[X](p,e)}}};Ra.Sync=jr;L6.exports=Ra});var B6=c((Qh,x6)=>{"use strict";var q8=Et(),ri=Hr(),V6=require("fs"),I6=Vt(),U6=require("path"),zr=At();x6.exports=(t,e,a)=>{typeof t=="function"?(a=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(a=e,e=null),e?e=Array.from(e):e=[];let s=q8(t);if(s.sync&&typeof a=="function")throw new TypeError("callback not supported for sync tar functions");if(!s.file&&typeof a=="function")throw new TypeError("callback only supported with file option");return e.length&&M8(s,e),s.file&&s.sync?j8(s):s.file?H8(s,a):s.sync?z8(s):$8(s)};var M8=(t,e)=>{let a=new Map(e.map(p=>[zr(p),!0])),s=t.filter,i=(p,r)=>{let d=r||U6.parse(p).root||".",o=p===d?!1:a.has(p)?a.get(p):i(U6.dirname(p),d);return a.set(p,o),o};t.filter=s?(p,r)=>s(p,r)&&i(zr(p)):p=>i(zr(p))},j8=t=>{let e=new ri.Sync(t),a=t.file,s=V6.statSync(a),i=t.maxReadSize||16*1024*1024;new I6.ReadStreamSync(a,{readSize:i,size:s.size}).pipe(e)},H8=(t,e)=>{let a=new ri(t),s=t.maxReadSize||16*1024*1024,i=t.file,p=new Promise((r,d)=>{a.on("error",d),a.on("close",r),V6.stat(i,(o,n)=>{if(o)d(o);else{let l=new I6.ReadStream(i,{readSize:s,size:n.size});l.on("error",d),l.pipe(a)}})});return e?p.then(e,e):p},z8=t=>new ri.Sync(t),$8=t=>new ri(t)});var q6=c(q=>{"use strict";q.c=q.create=b0();q.r=q.replace=Dr();q.t=q.list=Ks();q.u=q.update=F0();q.x=q.extract=B6();q.Pack=Gs();q.Unpack=Hr();q.Parse=Ws();q.ReadEntry=vs();q.WriteEntry=er();q.Header=Rt();q.Pax=ws();q.types=Up()});var Wr=c(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.Context=void 0;var M6=require("fs"),W8=require("os"),$r=class{constructor(){var e,a,s;if(this.payload={},process.env.GITHUB_EVENT_PATH)if(M6.existsSync(process.env.GITHUB_EVENT_PATH))this.payload=JSON.parse(M6.readFileSync(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}));else{let i=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${i} does not exist${W8.EOL}`)}this.eventName=process.env.GITHUB_EVENT_NAME,this.sha=process.env.GITHUB_SHA,this.ref=process.env.GITHUB_REF,this.workflow=process.env.GITHUB_WORKFLOW,this.action=process.env.GITHUB_ACTION,this.actor=process.env.GITHUB_ACTOR,this.job=process.env.GITHUB_JOB,this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10),this.runId=parseInt(process.env.GITHUB_RUN_ID,10),this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:"https://api.github.com",this.serverUrl=(a=process.env.GITHUB_SERVER_URL)!==null&&a!==void 0?a:"https://github.com",this.graphqlUrl=(s=process.env.GITHUB_GRAPHQL_URL)!==null&&s!==void 0?s:"https://api.github.com/graphql"}get issue(){let e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){let[e,a]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:a}}if(this.payload.repository)return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name};throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}};di.Context=$r});var j6=c(ue=>{"use strict";var K8=ue&&ue.__createBinding||(Object.create?function(t,e,a,s){s===void 0&&(s=a),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,s){s===void 0&&(s=a),t[s]=e[a]}),Y8=ue&&ue.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Z8=ue&&ue.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&K8(e,t,a);return Y8(e,t),e};Object.defineProperty(ue,"__esModule",{value:!0});ue.getApiBaseUrl=ue.getProxyAgent=ue.getAuthString=void 0;var J8=Z8(Di());function X8(t,e){if(!t&&!e.auth)throw new Error("Parameter token or opts.auth is required");if(t&&e.auth)throw new Error("Parameters token and opts.auth may not both be specified");return typeof e.auth=="string"?e.auth:`token ${t}`}ue.getAuthString=X8;function Q8(t){return new J8.HttpClient().getAgent(t)}ue.getProxyAgent=Q8;function e7(){return process.env.GITHUB_API_URL||"https://api.github.com"}ue.getApiBaseUrl=e7});var Aa=c(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});function t7(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof process=="object"&&"version"in process?`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`:""}Kr.getUserAgent=t7});var $6=c((pf,z6)=>{z6.exports=H6;function H6(t,e,a,s){if(typeof a!="function")throw new Error("method for before hook must be a function");return s||(s={}),Array.isArray(e)?e.reverse().reduce(function(i,p){return H6.bind(null,t,p,i,s)},a)():Promise.resolve().then(function(){return t.registry[e]?t.registry[e].reduce(function(i,p){return p.hook.bind(null,i,s)},a)():a(s)})}});var K6=c((rf,W6)=>{W6.exports=a7;function a7(t,e,a,s){var i=s;t.registry[a]||(t.registry[a]=[]),e==="before"&&(s=function(p,r){return Promise.resolve().then(i.bind(null,r)).then(p.bind(null,r))}),e==="after"&&(s=function(p,r){var d;return Promise.resolve().then(p.bind(null,r)).then(function(o){return d=o,i(d,r)}).then(function(){return d})}),e==="error"&&(s=function(p,r){return Promise.resolve().then(p.bind(null,r)).catch(function(d){return i(d,r)})}),t.registry[a].push({hook:s,orig:i})}});var Z6=c((df,Y6)=>{Y6.exports=s7;function s7(t,e,a){if(t.registry[e]){var s=t.registry[e].map(function(i){return i.orig}).indexOf(a);s!==-1&&t.registry[e].splice(s,1)}}});var s4=c((of,Na)=>{var e4=$6(),i7=K6(),p7=Z6(),J6=Function.bind,X6=J6.bind(J6);function t4(t,e,a){var s=X6(p7,null).apply(null,a?[e,a]:[e]);t.api={remove:s},t.remove=s,["before","error","after","wrap"].forEach(function(i){var p=a?[e,i,a]:[e,i];t[i]=t.api[i]=X6(i7,null).apply(null,p)})}function r7(){var t="h",e={registry:{}},a=e4.bind(null,e,t);return t4(a,e,t),a}function a4(){var t={registry:{}},e=e4.bind(null,t);return t4(e,t),e}var Q6=!1;function jt(){return Q6||(console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'),Q6=!0),a4()}jt.Singular=r7.bind();jt.Collection=a4.bind();Na.exports=jt;Na.exports.Hook=jt;Na.exports.Singular=jt.Singular;Na.exports.Collection=jt.Collection});var Zr=c(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});function i4(t){return Object.prototype.toString.call(t)==="[object Object]"}function d7(t){var e,a;return i4(t)===!1?!1:(e=t.constructor,e===void 0?!0:(a=e.prototype,!(i4(a)===!1||a.hasOwnProperty("isPrototypeOf")===!1)))}Yr.isPlainObject=d7});var m4=c(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});var o7=Zr(),n7=Aa();function l7(t){return t?Object.keys(t).reduce((e,a)=>(e[a.toLowerCase()]=t[a],e),{}):{}}function d4(t,e){let a=Object.assign({},t);return Object.keys(e).forEach(s=>{o7.isPlainObject(e[s])?s in t?a[s]=d4(t[s],e[s]):Object.assign(a,{[s]:e[s]}):Object.assign(a,{[s]:e[s]})}),a}function p4(t){for(let e in t)t[e]===void 0&&delete t[e];return t}function Xr(t,e,a){if(typeof e=="string"){let[i,p]=e.split(" ");a=Object.assign(p?{method:i,url:p}:{url:i},a)}else a=Object.assign({},e);a.headers=l7(a.headers),p4(a),p4(a.headers);let s=d4(t||{},a);return t&&t.mediaType.previews.length&&(s.mediaType.previews=t.mediaType.previews.filter(i=>!s.mediaType.previews.includes(i)).concat(s.mediaType.previews)),s.mediaType.previews=s.mediaType.previews.map(i=>i.replace(/-preview/,"")),s}function m7(t,e){let a=/\?/.test(t)?"&":"?",s=Object.keys(e);return s.length===0?t:t+a+s.map(i=>i==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${i}=${encodeURIComponent(e[i])}`).join("&")}var u7=/\{[^}]+\}/g;function c7(t){return t.replace(/^\W+|\W+$/g,"").split(/,/)}function h7(t){let e=t.match(u7);return e?e.map(c7).reduce((a,s)=>a.concat(s),[]):[]}function r4(t,e){return Object.keys(t).filter(a=>!e.includes(a)).reduce((a,s)=>(a[s]=t[s],a),{})}function o4(t){return t.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}function zt(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Pa(t,e,a){return e=t==="+"||t==="#"?o4(e):zt(e),a?zt(a)+"="+e:e}function Ht(t){return t!=null}function Jr(t){return t===";"||t==="&"||t==="?"}function f7(t,e,a,s){var i=t[a],p=[];if(Ht(i)&&i!=="")if(typeof i=="string"||typeof i=="number"||typeof i=="boolean")i=i.toString(),s&&s!=="*"&&(i=i.substring(0,parseInt(s,10))),p.push(Pa(e,i,Jr(e)?a:""));else if(s==="*")Array.isArray(i)?i.filter(Ht).forEach(function(r){p.push(Pa(e,r,Jr(e)?a:""))}):Object.keys(i).forEach(function(r){Ht(i[r])&&p.push(Pa(e,i[r],r))});else{let r=[];Array.isArray(i)?i.filter(Ht).forEach(function(d){r.push(Pa(e,d))}):Object.keys(i).forEach(function(d){Ht(i[d])&&(r.push(zt(d)),r.push(Pa(e,i[d].toString())))}),Jr(e)?p.push(zt(a)+"="+r.join(",")):r.length!==0&&p.push(r.join(","))}else e===";"?Ht(i)&&p.push(zt(a)):i===""&&(e==="&"||e==="?")?p.push(zt(a)+"="):i===""&&p.push("");return p}function v7(t){return{expand:g7.bind(null,t)}}function g7(t,e){var a=["+","#",".","/",";","?","&"];return t.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(s,i,p){if(i){let d="",o=[];if(a.indexOf(i.charAt(0))!==-1&&(d=i.charAt(0),i=i.substr(1)),i.split(/,/g).forEach(function(n){var l=/([^:\*]*)(?::(\d+)|(\*))?/.exec(n);o.push(f7(e,d,l[1],l[2]||l[3]))}),d&&d!=="+"){var r=",";return d==="?"?r="&":d!=="#"&&(r=d),(o.length!==0?d:"")+o.join(r)}else return o.join(",")}else return o4(p)})}function n4(t){let e=t.method.toUpperCase(),a=(t.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),s=Object.assign({},t.headers),i,p=r4(t,["method","baseUrl","url","headers","request","mediaType"]),r=h7(a);a=v7(a).expand(p),/^http/.test(a)||(a=t.baseUrl+a);let d=Object.keys(t).filter(l=>r.includes(l)).concat("baseUrl"),o=r4(p,d);if(!/application\/octet-stream/i.test(s.accept)&&(t.mediaType.format&&(s.accept=s.accept.split(/,/).map(l=>l.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${t.mediaType.format}`)).join(",")),t.mediaType.previews.length)){let l=s.accept.match(/[\w-]+(?=-preview)/g)||[];s.accept=l.concat(t.mediaType.previews).map(m=>{let u=t.mediaType.format?`.${t.mediaType.format}`:"+json";return`application/vnd.github.${m}-preview${u}`}).join(",")}return["GET","HEAD"].includes(e)?a=m7(a,o):"data"in o?i=o.data:Object.keys(o).length?i=o:s["content-length"]=0,!s["content-type"]&&typeof i<"u"&&(s["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof i>"u"&&(i=""),Object.assign({method:e,url:a,headers:s},typeof i<"u"?{body:i}:null,t.request?{request:t.request}:null)}function w7(t,e,a){return n4(Xr(t,e,a))}function l4(t,e){let a=Xr(t,e),s=w7.bind(null,a);return Object.assign(s,{DEFAULTS:a,defaults:l4.bind(null,a),merge:Xr.bind(null,a),parse:n4})}var _7="6.0.12",E7=`octokit-endpoint.js/${_7} ${n7.getUserAgent()}`,T7={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":E7},mediaType:{format:"",previews:[]}},b7=l4(null,T7);Qr.endpoint=b7});var u4=c(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var ed=class extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="Deprecation"}};td.Deprecation=ed});var f4=c((uf,h4)=>{h4.exports=c4;function c4(t,e){if(t&&e)return c4(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(s){a[s]=t[s]}),a;function a(){for(var s=new Array(arguments.length),i=0;i{var v4=f4();ad.exports=v4(oi);ad.exports.strict=v4(g4);oi.proto=oi(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return oi(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return g4(this)},configurable:!0})});function oi(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function g4(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},a=t.name||"Function wrapped with `once`";return e.onceError=a+" shouldn't be called more than once",e.called=!1,e}});var T4=c(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});function y7(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var _4=u4(),E4=y7(w4()),S7=E4(t=>console.warn(t)),O7=E4(t=>console.warn(t)),sd=class extends Error{constructor(e,a,s){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="HttpError",this.status=a;let i;"headers"in s&&typeof s.headers<"u"&&(i=s.headers),"response"in s&&(this.response=s.response,i=s.response.headers);let p=Object.assign({},s.request);s.request.headers.authorization&&(p.headers=Object.assign({},s.request.headers,{authorization:s.request.headers.authorization.replace(/ .*$/," [REDACTED]")})),p.url=p.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=p,Object.defineProperty(this,"code",{get(){return S7(new _4.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")),a}}),Object.defineProperty(this,"headers",{get(){return O7(new _4.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")),i||{}}})}};id.RequestError=sd});var od=c(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});function D7(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var R7=m4(),A7=Aa(),N7=Zr(),P7=D7(ep()),Fa=T4(),F7="5.6.3";function C7(t){return t.arrayBuffer()}function b4(t){let e=t.request&&t.request.log?t.request.log:console;(N7.isPlainObject(t.body)||Array.isArray(t.body))&&(t.body=JSON.stringify(t.body));let a={},s,i;return(t.request&&t.request.fetch||P7)(t.url,Object.assign({method:t.method,body:t.body,headers:t.headers,redirect:t.redirect},t.request)).then(async r=>{i=r.url,s=r.status;for(let d of r.headers)a[d[0]]=d[1];if("deprecation"in a){let d=a.link&&a.link.match(/<([^>]+)>; rel="deprecation"/),o=d&&d.pop();e.warn(`[@octokit/request] "${t.method} ${t.url}" is deprecated. It is scheduled to be removed on ${a.sunset}${o?`. See ${o}`:""}`)}if(!(s===204||s===205)){if(t.method==="HEAD"){if(s<400)return;throw new Fa.RequestError(r.statusText,s,{response:{url:i,status:s,headers:a,data:void 0},request:t})}if(s===304)throw new Fa.RequestError("Not modified",s,{response:{url:i,status:s,headers:a,data:await pd(r)},request:t});if(s>=400){let d=await pd(r);throw new Fa.RequestError(G7(d),s,{response:{url:i,status:s,headers:a,data:d},request:t})}return pd(r)}}).then(r=>({status:s,url:i,headers:a,data:r})).catch(r=>{throw r instanceof Fa.RequestError?r:new Fa.RequestError(r.message,500,{request:t})})}async function pd(t){let e=t.headers.get("content-type");return/application\/json/.test(e)?t.json():!e||/^text\/|charset=utf-8$/.test(e)?t.text():C7(t)}function G7(t){return typeof t=="string"?t:"message"in t?Array.isArray(t.errors)?`${t.message}: ${t.errors.map(JSON.stringify).join(", ")}`:t.message:`Unknown error: ${JSON.stringify(t)}`}function rd(t,e){let a=t.defaults(e);return Object.assign(function(i,p){let r=a.merge(i,p);if(!r.request||!r.request.hook)return b4(a.parse(r));let d=(o,n)=>b4(a.parse(a.merge(o,n)));return Object.assign(d,{endpoint:a,defaults:rd.bind(null,a)}),r.request.hook(d,r)},{endpoint:a,defaults:rd.bind(null,a)})}var k7=rd(R7.endpoint,{headers:{"user-agent":`octokit-request.js/${F7} ${A7.getUserAgent()}`}});dd.request=k7});var O4=c(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});var S4=od(),L7=Aa(),U7="4.8.0";function V7(t){return`Request failed due to following response errors: `+t.errors.map(e=>` - ${e.message}`).join(` `)}var ni=class extends Error{constructor(e,a,s){super(V7(s)),this.request=e,this.headers=a,this.response=s,this.name="GraphqlResponseError",this.errors=s.errors,this.data=s.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},I7=["method","baseUrl","url","headers","request","query","mediaType"],x7=["query","method","url"],y4=/\/api\/v3\/?$/;function B7(t,e,a){if(a){if(typeof e=="string"&&"query"in a)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let r in a)if(x7.includes(r))return Promise.reject(new Error(`[@octokit/graphql] "${r}" cannot be used as variable name`))}let s=typeof e=="string"?Object.assign({query:e},a):e,i=Object.keys(s).reduce((r,d)=>I7.includes(d)?(r[d]=s[d],r):(r.variables||(r.variables={}),r.variables[d]=s[d],r),{}),p=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return y4.test(p)&&(i.url=p.replace(y4,"/api/graphql")),t(i).then(r=>{if(r.data.errors){let d={};for(let o of Object.keys(r.headers))d[o]=r.headers[o];throw new ni(i,d,r.data)}return r.data.data})}function nd(t,e){let a=t.defaults(e);return Object.assign((i,p)=>B7(a,i,p),{defaults:nd.bind(null,a),endpoint:S4.request.endpoint})}var q7=nd(S4.request,{headers:{"user-agent":`octokit-graphql.js/${U7} ${L7.getUserAgent()}`},method:"POST",url:"/graphql"});function M7(t){return nd(t,{method:"POST",url:"/graphql"})}Ca.GraphqlResponseError=ni;Ca.graphql=q7;Ca.withCustomRequest=M7});var D4=c(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var j7=/^v1\./,H7=/^ghs_/,z7=/^ghu_/;async function $7(t){let e=t.split(/\./).length===3,a=j7.test(t)||H7.test(t),s=z7.test(t);return{type:"token",token:t,tokenType:e?"app":a?"installation":s?"user-to-server":"oauth"}}function W7(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function K7(t,e,a,s){let i=e.endpoint.merge(a,s);return i.headers.authorization=W7(t),e(i)}var Y7=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign($7.bind(null,e),{hook:K7.bind(null,e)})};ld.createTokenAuth=Y7});var N4=c(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});var Z7=Aa(),J7=s4(),R4=od(),X7=O4(),Q7=D4();function eu(t,e){if(t==null)return{};var a={},s=Object.keys(t),i,p;for(p=0;p=0)&&(a[i]=t[i]);return a}function tu(t,e){if(t==null)return{};var a=eu(t,e),s,i;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,s)&&(a[s]=t[s])}return a}var A4="3.6.0",au=["authStrategy"],Ga=class{constructor(e={}){let a=new J7.Collection,s={baseUrl:R4.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:a.bind(null,"request")}),mediaType:{previews:[],format:""}};if(s.headers["user-agent"]=[e.userAgent,`octokit-core.js/${A4} ${Z7.getUserAgent()}`].filter(Boolean).join(" "),e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=R4.request.defaults(s),this.graphql=X7.withCustomRequest(this.request).defaults(s),this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log),this.hook=a,e.authStrategy){let{authStrategy:p}=e,r=tu(e,au),d=p(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:r},e.auth));a.wrap("request",d.hook),this.auth=d}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let p=Q7.createTokenAuth(e.auth);a.wrap("request",p.hook),this.auth=p}this.constructor.plugins.forEach(p=>{Object.assign(this,p(this,e))})}static defaults(e){return class extends this{constructor(...s){let i=s[0]||{};if(typeof e=="function"){super(e(i));return}super(Object.assign({},e,i,i.userAgent&&e.userAgent?{userAgent:`${i.userAgent} ${e.userAgent}`}:null))}}}static plugin(...e){var a;let s=this.plugins;return a=class extends this{},a.plugins=s.concat(e.filter(p=>!s.includes(p))),a}};Ga.VERSION=A4;Ga.plugins=[];md.Octokit=Ga});var V4=c(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});function P4(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),a.push.apply(a,s)}return a}function F4(t){for(var e=1;e{"use strict";Object.defineProperty($t,"__esModule",{value:!0});var pu="2.21.3";function I4(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),a.push.apply(a,s)}return a}function x4(t){for(var e=1;e({async next(){if(!d)return{done:!0};try{let o=await i({method:p,url:d,headers:r}),n=du(o);return d=((n.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1],{value:n}}catch(o){if(o.status!==409)throw o;return d="",{value:{status:200,headers:{},data:[]}}}}})}}function B4(t,e,a,s){return typeof a=="function"&&(s=a,a=void 0),q4(t,[],ud(t,e,a)[Symbol.asyncIterator](),s)}function q4(t,e,a,s){return a.next().then(i=>{if(i.done)return e;let p=!1;function r(){p=!0}return e=e.concat(s?s(i.value,r):i.value.data),p?e:q4(t,e,a,s)})}var ou=Object.assign(B4,{iterator:ud}),M4=["GET /app/hook/deliveries","GET /app/installations","GET /applications/grants","GET /authorizations","GET /enterprises/{enterprise}/actions/permissions/organizations","GET /enterprises/{enterprise}/actions/runner-groups","GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations","GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners","GET /enterprises/{enterprise}/actions/runners","GET /enterprises/{enterprise}/audit-log","GET /enterprises/{enterprise}/secret-scanning/alerts","GET /enterprises/{enterprise}/settings/billing/advanced-security","GET /events","GET /gists","GET /gists/public","GET /gists/starred","GET /gists/{gist_id}/comments","GET /gists/{gist_id}/commits","GET /gists/{gist_id}/forks","GET /installation/repositories","GET /issues","GET /licenses","GET /marketplace_listing/plans","GET /marketplace_listing/plans/{plan_id}/accounts","GET /marketplace_listing/stubbed/plans","GET /marketplace_listing/stubbed/plans/{plan_id}/accounts","GET /networks/{owner}/{repo}/events","GET /notifications","GET /organizations","GET /orgs/{org}/actions/cache/usage-by-repository","GET /orgs/{org}/actions/permissions/repositories","GET /orgs/{org}/actions/runner-groups","GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories","GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners","GET /orgs/{org}/actions/runners","GET /orgs/{org}/actions/secrets","GET /orgs/{org}/actions/secrets/{secret_name}/repositories","GET /orgs/{org}/audit-log","GET /orgs/{org}/blocks","GET /orgs/{org}/code-scanning/alerts","GET /orgs/{org}/codespaces","GET /orgs/{org}/credential-authorizations","GET /orgs/{org}/dependabot/secrets","GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories","GET /orgs/{org}/events","GET /orgs/{org}/external-groups","GET /orgs/{org}/failed_invitations","GET /orgs/{org}/hooks","GET /orgs/{org}/hooks/{hook_id}/deliveries","GET /orgs/{org}/installations","GET /orgs/{org}/invitations","GET /orgs/{org}/invitations/{invitation_id}/teams","GET /orgs/{org}/issues","GET /orgs/{org}/members","GET /orgs/{org}/migrations","GET /orgs/{org}/migrations/{migration_id}/repositories","GET /orgs/{org}/outside_collaborators","GET /orgs/{org}/packages","GET /orgs/{org}/packages/{package_type}/{package_name}/versions","GET /orgs/{org}/projects","GET /orgs/{org}/public_members","GET /orgs/{org}/repos","GET /orgs/{org}/secret-scanning/alerts","GET /orgs/{org}/settings/billing/advanced-security","GET /orgs/{org}/team-sync/groups","GET /orgs/{org}/teams","GET /orgs/{org}/teams/{team_slug}/discussions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions","GET /orgs/{org}/teams/{team_slug}/invitations","GET /orgs/{org}/teams/{team_slug}/members","GET /orgs/{org}/teams/{team_slug}/projects","GET /orgs/{org}/teams/{team_slug}/repos","GET /orgs/{org}/teams/{team_slug}/teams","GET /projects/columns/{column_id}/cards","GET /projects/{project_id}/collaborators","GET /projects/{project_id}/columns","GET /repos/{owner}/{repo}/actions/artifacts","GET /repos/{owner}/{repo}/actions/caches","GET /repos/{owner}/{repo}/actions/runners","GET /repos/{owner}/{repo}/actions/runs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts","GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs","GET /repos/{owner}/{repo}/actions/secrets","GET /repos/{owner}/{repo}/actions/workflows","GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs","GET /repos/{owner}/{repo}/assignees","GET /repos/{owner}/{repo}/branches","GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations","GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs","GET /repos/{owner}/{repo}/code-scanning/alerts","GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances","GET /repos/{owner}/{repo}/code-scanning/analyses","GET /repos/{owner}/{repo}/codespaces","GET /repos/{owner}/{repo}/codespaces/devcontainers","GET /repos/{owner}/{repo}/codespaces/secrets","GET /repos/{owner}/{repo}/collaborators","GET /repos/{owner}/{repo}/comments","GET /repos/{owner}/{repo}/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/commits","GET /repos/{owner}/{repo}/commits/{commit_sha}/comments","GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls","GET /repos/{owner}/{repo}/commits/{ref}/check-runs","GET /repos/{owner}/{repo}/commits/{ref}/check-suites","GET /repos/{owner}/{repo}/commits/{ref}/status","GET /repos/{owner}/{repo}/commits/{ref}/statuses","GET /repos/{owner}/{repo}/contributors","GET /repos/{owner}/{repo}/dependabot/secrets","GET /repos/{owner}/{repo}/deployments","GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses","GET /repos/{owner}/{repo}/environments","GET /repos/{owner}/{repo}/events","GET /repos/{owner}/{repo}/forks","GET /repos/{owner}/{repo}/git/matching-refs/{ref}","GET /repos/{owner}/{repo}/hooks","GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries","GET /repos/{owner}/{repo}/invitations","GET /repos/{owner}/{repo}/issues","GET /repos/{owner}/{repo}/issues/comments","GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/issues/events","GET /repos/{owner}/{repo}/issues/{issue_number}/comments","GET /repos/{owner}/{repo}/issues/{issue_number}/events","GET /repos/{owner}/{repo}/issues/{issue_number}/labels","GET /repos/{owner}/{repo}/issues/{issue_number}/reactions","GET /repos/{owner}/{repo}/issues/{issue_number}/timeline","GET /repos/{owner}/{repo}/keys","GET /repos/{owner}/{repo}/labels","GET /repos/{owner}/{repo}/milestones","GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels","GET /repos/{owner}/{repo}/notifications","GET /repos/{owner}/{repo}/pages/builds","GET /repos/{owner}/{repo}/projects","GET /repos/{owner}/{repo}/pulls","GET /repos/{owner}/{repo}/pulls/comments","GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/pulls/{pull_number}/comments","GET /repos/{owner}/{repo}/pulls/{pull_number}/commits","GET /repos/{owner}/{repo}/pulls/{pull_number}/files","GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments","GET /repos/{owner}/{repo}/releases","GET /repos/{owner}/{repo}/releases/{release_id}/assets","GET /repos/{owner}/{repo}/releases/{release_id}/reactions","GET /repos/{owner}/{repo}/secret-scanning/alerts","GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations","GET /repos/{owner}/{repo}/stargazers","GET /repos/{owner}/{repo}/subscribers","GET /repos/{owner}/{repo}/tags","GET /repos/{owner}/{repo}/teams","GET /repos/{owner}/{repo}/topics","GET /repositories","GET /repositories/{repository_id}/environments/{environment_name}/secrets","GET /search/code","GET /search/commits","GET /search/issues","GET /search/labels","GET /search/repositories","GET /search/topics","GET /search/users","GET /teams/{team_id}/discussions","GET /teams/{team_id}/discussions/{discussion_number}/comments","GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /teams/{team_id}/discussions/{discussion_number}/reactions","GET /teams/{team_id}/invitations","GET /teams/{team_id}/members","GET /teams/{team_id}/projects","GET /teams/{team_id}/repos","GET /teams/{team_id}/teams","GET /user/blocks","GET /user/codespaces","GET /user/codespaces/secrets","GET /user/emails","GET /user/followers","GET /user/following","GET /user/gpg_keys","GET /user/installations","GET /user/installations/{installation_id}/repositories","GET /user/issues","GET /user/keys","GET /user/marketplace_purchases","GET /user/marketplace_purchases/stubbed","GET /user/memberships/orgs","GET /user/migrations","GET /user/migrations/{migration_id}/repositories","GET /user/orgs","GET /user/packages","GET /user/packages/{package_type}/{package_name}/versions","GET /user/public_emails","GET /user/repos","GET /user/repository_invitations","GET /user/starred","GET /user/subscriptions","GET /user/teams","GET /users","GET /users/{username}/events","GET /users/{username}/events/orgs/{org}","GET /users/{username}/events/public","GET /users/{username}/followers","GET /users/{username}/following","GET /users/{username}/gists","GET /users/{username}/gpg_keys","GET /users/{username}/keys","GET /users/{username}/orgs","GET /users/{username}/packages","GET /users/{username}/projects","GET /users/{username}/received_events","GET /users/{username}/received_events/public","GET /users/{username}/repos","GET /users/{username}/starred","GET /users/{username}/subscriptions"];function nu(t){return typeof t=="string"?M4.includes(t):!1}function j4(t){return{paginate:Object.assign(B4.bind(null,t),{iterator:ud.bind(null,t)})}}j4.VERSION=pu;$t.composePaginateRest=ou;$t.isPaginatingEndpoint=nu;$t.paginateRest=j4;$t.paginatingEndpoints=M4});var W4=c(Y=>{"use strict";var lu=Y&&Y.__createBinding||(Object.create?function(t,e,a,s){s===void 0&&(s=a),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,s){s===void 0&&(s=a),t[s]=e[a]}),mu=Y&&Y.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$4=Y&&Y.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&lu(e,t,a);return mu(e,t),e};Object.defineProperty(Y,"__esModule",{value:!0});Y.getOctokitOptions=Y.GitHub=Y.defaults=Y.context=void 0;var uu=$4(Wr()),cd=$4(j6()),cu=N4(),hu=V4(),fu=H4();Y.context=new uu.Context;var z4=cd.getApiBaseUrl();Y.defaults={baseUrl:z4,request:{agent:cd.getProxyAgent(z4)}};Y.GitHub=cu.Octokit.plugin(hu.restEndpointMethods,fu.paginateRest).defaults(Y.defaults);function vu(t,e){let a=Object.assign({},e||{}),s=cd.getAuthString(t,a);return s&&(a.auth=s),a}Y.getOctokitOptions=vu});var Y4=c(Ne=>{"use strict";var gu=Ne&&Ne.__createBinding||(Object.create?function(t,e,a,s){s===void 0&&(s=a),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,s){s===void 0&&(s=a),t[s]=e[a]}),wu=Ne&&Ne.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_u=Ne&&Ne.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&gu(e,t,a);return wu(e,t),e};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.getOctokit=Ne.context=void 0;var Eu=_u(Wr()),K4=W4();Ne.context=new Eu.Context;function Tu(t,e,...a){let s=K4.GitHub.plugin(...a);return new s(K4.getOctokitOptions(t,e))}Ne.getOctokit=Tu});var J4=c((Of,fd)=>{var Z4=require("crypto"),mi=require("fs"),hd=8192;function bu(t){let e=mi.openSync(t,"r"),a=Z4.createHash("md5"),s=Buffer.alloc(hd);try{let i;do i=mi.readSync(e,s,0,hd),a.update(s.slice(0,i));while(i===hd)}finally{mi.closeSync(e)}return a.digest("hex")}function yu(t){return new Promise((e,a)=>{let s=Z4.createHash("md5"),i=mi.createReadStream(t);i.on("error",p=>{a(p)}),s.once("readable",()=>{e(s.read().toString("hex"))}),i.pipe(s)})}fd.exports=yu;fd.exports.sync=bu});var ui=P(e1());var za=P(e1()),To=()=>{let t=za.getInput("token",{required:!1}),e=t.length===0;return{uploadUrl:za.getInput("upload_url",{required:!0}),run:za.getInput("run",{required:!0}),token:t,tokenless:e}};var fe=P(e1()),_t=P(Xt());var qo=P(Xt());var M1={major:3,minor:16,patch:0},Mo=()=>F(void 0,null,function*(){let t="";try{yield(0,qo.exec)("valgrind",["--version"],{silent:!0,listeners:{stdout:a=>{t+=a.toString()}}})}catch(a){throw new Error("valgrind is not installed")}t=t.trim();let e=m3(t);if(!u3(e))throw new Error(`valgrind version ${Bo(e)} is not supported, please upgrade to at least ${Bo(M1)}. Upgrading to Ubuntu 22.04+ will allow you to have a valid version.`)}),Bo=t=>`${t.major}.${t.minor}.${t.patch}${t.codspeed?`.codspeed${t.codspeed}`:""}`,m3=t=>{let e=t.match(/valgrind-(\d+)\.(\d+)\.(\d+)(\.codspeed(\d*))?$/);if(!e)throw new Error(`Valgrind version ${t} is not valid`);return{major:parseInt(e[1]),minor:parseInt(e[2]),patch:parseInt(e[3]),codspeed:e[4]?e[5]?parseInt(e[5]):0:void 0}},u3=t=>t.codspeed!==void 0?!0:t.major>=M1.major&&(t.major>M1.major||t.minor>=M1.minor)&&(t.major>M1.major||t.minor>M1.minor||t.patch>=M1.patch);var R2=P(ep()),A2=P(require("node:fs"));var es=(t,e)=>F(void 0,null,function*(){try{let a=yield(0,R2.default)(t,rt(Xe({},e),{headers:rt(Xe({},e.headers),{"User-Agent":"codspeed-action"})}));if(a.status>=400)throw new Error(`Unexpected status code: ${a.status} ${yield a.text()}`);return a}catch(a){if(e.retries===void 0||e.retries===0)throw a;return yield new Promise(s=>{var i;return setTimeout(s,(i=e.delay)!=null?i:1e3)}),yield es(t,rt(Xe({},e),{retries:e.retries-1}))}}),N2=es,P2=(t,e,a)=>F(void 0,null,function*(){let s=Xe({headers:Xe({Accept:"application/json","Content-Type":"application/json"},a==null?void 0:a.headers)},a);return yield(yield es(t,Xe({method:"POST",body:JSON.stringify(e)},s))).json()}),F2=(t,e)=>F(void 0,null,function*(){let a=yield es(t,{});if(!a.ok)throw new Error(`Failed to download file. Status: ${a.status} ${a.statusText}`);let s=A2.default.createWriteStream(e);yield new Promise((i,p)=>{a.body.pipe(s),a.body.on("error",p),s.on("finish",()=>{s.close(),i()})})});var C2="3.21.0-0codspeed1",rm=()=>F(void 0,null,function*(){let t="",e=yield(0,_t.exec)("lsb_release -i -r -s",[],{silent:!0,listeners:{stdout:p=>{t+=p.toString()}}});if(e!==0)throw new Error("Failed to get system info");let[a,s]=t.trim().split(` -`);if(t="",e=yield(0,_t.exec)("dpkg --print-architecture",[],{silent:!0,listeners:{stdout:p=>{t+=p.toString()}}}),e!==0)throw new Error("Failed to get system info");let i=t.trim();return{os:a,osVersion:s,arch:i}}),dm=()=>F(void 0,null,function*(){fe.startGroup("Prepare environment");try{let t=yield rm();if(fe.debug(`OS: ${t.os}`),fe.debug(`OS Version: ${t.osVersion}`),fe.debug(`Arch: ${t.arch}`),t.os!=="Ubuntu")throw new Error("Only Ubuntu is supported for now");if(t.arch!=="amd64")throw new Error("Only amd64 is supported for now");if(!["20.04","22.04"].includes(t.osVersion))throw new Error("Only Ubuntu 20.04 and 22.04 are supported for now");let e=`https://github.com/CodSpeedHQ/valgrind-codspeed/releases/download/${C2}/valgrind_${C2}_ubuntu-${t.osVersion}_amd64.deb`;fe.debug(`Instaling valgrind from ${e}`);let a="/tmp/valgrind-codspeed.deb";yield F2(e,a),yield(0,_t.exec)(`sudo apt install ${a}`,[],{silent:!0}),yield Mo();try{yield(0,_t.exec)("pip show pytest-codspeed",[],{silent:!0})}catch(s){fe.warning("pytest-codspeed is not installed in your environment. Installing it..."),yield(0,_t.exec)("pip install pytest-codspeed",[],{silent:!0})}}catch(t){throw new Error(`Failed to prepare environment: ${t}`)}fe.info("Environment ready"),fe.endGroup()}),G2=dm;var Ge=P(e1()),ip=P(Xt()),I2=require("os"),x2=require("crypto"),B2=P(require("path")),q2=require("fs");var ra=P(require("fs/promises")),tp=P(require("path")),k2=P(e1());function L2(t){return F(this,null,function*(){let s=(yield ra.readdir(t)).filter(r=>r.endsWith(".out")).map(r=>r.split(".")[0]),p=(yield ra.readdir("/tmp")).filter(r=>{let d=r.match(/perf-(\d+)\.map/);return d&&s.includes(d[1])});yield Promise.all(p.map(r=>F(this,null,function*(){let d=tp.join("/tmp",r),o=tp.join(t,r);try{yield ra.copyFile(d,o)}catch(n){k2.warning(`Failed to copy ${d} to ${o}: ${n}`)}})))})}var ap=P(Xt()),sp=P(e1());var om=()=>F(void 0,null,function*(){let t="";try{return yield(0,ap.exec)("python",["-c","import sysconfig; print('/'.join(sysconfig.get_config_vars('LIBDIR', 'INSTSONAME')))"],{silent:!0,listeners:{stdout:e=>{t+=e.toString()}}}),[t.trim()]}catch(e){return sp.debug(`Failed to get python shared objects: ${e}`),[]}}),nm=()=>F(void 0,null,function*(){let t="";try{return yield(0,ap.exec)("node",["-e","console.log(process.execPath);"],{silent:!0,listeners:{stdout:e=>{t+=e.toString()}}}),[t.trim()]}catch(e){return sp.debug(`Failed to get nodejs shared objects: ${e}`),[]}}),U2=()=>F(void 0,null,function*(){return[...yield om(),...yield nm()]});var lm=()=>F(void 0,null,function*(){let t="";if((yield(0,ip.exec)("uname",["-m"],{silent:!0,listeners:{stdout:a=>{t+=a.toString()}}}))!==0)throw new Error("Failed to get architecture");return t.trim()}),mm=()=>{let t=B2.join((0,I2.tmpdir)(),`profile.${(0,x2.randomBytes)(6).readUIntLE(0,6).toString(36)}.out`);return(0,q2.mkdirSync)(t,{recursive:!0}),t},V2=t=>{["Using source line as position.","warning: L3 cache found, using its data for the LL simulation.","warning: specified LL cache:","warning: simulated LL cache:"].some(e=>t.includes(e))||Ge.info(t)},um=t=>F(void 0,null,function*(){Ge.startGroup("Run benchmarks");let e=yield lm(),a=mm(),s=`${a}/%p.out`,i=["*/esbuild"],p=yield U2();Ge.debug(`Objects to ignore: ${p.join(", ")}`);let r=["-q","--tool=callgrind","--trace-children=yes","--cache-sim=yes","--I1=32768,8,64","--D1=32768,8,64","--LL=8388608,16,64","--instr-atstart=no","--collect-systime=nsec","--compress-strings=no","--combine-dumps=yes","--dump-line=no",`--callgrind-out-file=${s}`,`--trace-children-skip=${i.join(",")}`,...p.map(n=>`--obj-skip=${n}`)],d=t.run.replace("cargo codspeed","cargo-codspeed").replace(/"/g,'\\"'),o=`${__dirname}/bin`;Ge.debug(`custom bin path: ${o}`);try{let n=["setarch",e,"-R","valgrind",...r,`sh -c "${d}"`].join(" ");Ge.debug(`Running: ${n}`);let l=yield(0,ip.exec)(n,[],{env:rt(Xe({},process.env),{PATH:`${o}:${process.env.PATH}`,PYTHONMALLOC:"malloc",PYTHONHASHSEED:"0",CODSPEED_V8_FLAGS:["--hash-seed=1","--random-seed=1","--no-randomize-hashes","--no-scavenge-task","--no-opt ","--predictable ","--predictable-gc-schedule"].join(" "),ARCH:e,CODSPEED_ENV:"github"}),silent:!0,listeners:{stdline:V2,errline:V2}});if(l!==0)throw new Error(`Process exited with non-zero exit code: ${l}`)}catch(n){throw Ge.debug(`Error: ${n}`),new Error("Failed to run benchmarks")}return yield L2(a),Ge.endGroup(),{profileFolder:a}}),M2=um;var ce=P(e1()),X4=P(require("fs")),Q4=P(q6()),el=require("stream"),Ue=P(Y4()),tl=P(require("node:crypto")),al=P(J4());var Su=a=>F(void 0,[a],function*({profilePath:t,inputs:e}){var o,n,l,m,u,f,h;let s=(o=Ue.context.payload)==null?void 0:o.pull_request,i=(n=Ue.context.payload)==null?void 0:n.sender,p=yield(0,al.default)(t),r=Buffer.from(p,"hex").toString("base64"),d=(s==null?void 0:s.head.repo.id)===(s==null?void 0:s.base.repo.id)?s==null?void 0:s.head.ref:`${s==null?void 0:s.head.repo.owner.login}:${s==null?void 0:s.head.ref}`;return{version:1,tokenless:e.tokenless,ref:Ue.context.ref,headRef:d,baseRef:(l=s==null?void 0:s.base)==null?void 0:l.ref,owner:Ue.context.repo.owner,repository:Ue.context.repo.repo,event:Ue.context.eventName,commitHash:(h=(f=(u=(m=Ue.context.payload)==null?void 0:m.pull_request)==null?void 0:u.head)==null?void 0:f.sha)!=null?h:Ue.context.sha,profileMd5:r,ghData:{runId:Ue.context.runId,job:Ue.context.job,sender:i&&{id:i.id,login:i.login}},runner:{name:"@codspeed/action",version:"1.7.0"}}}),Ou=(t,e)=>F(void 0,null,function*(){ce.startGroup("Upload Results");let a=`${e}.tar.gz`;yield Q4.c({file:a,gzip:!0,cwd:e},["."]);let s=yield Su({profilePath:a,inputs:t});if(ce.debug("Upload metadata:"),ce.debug(JSON.stringify(s,null,2)),t.tokenless){let o=tl.default.createHash("sha256").update(JSON.stringify(s)).digest("hex");ce.info(`CodSpeed Run Hash: "${o}"`)}ce.info("Preparing upload...");let i=t.tokenless?void 0:{Authorization:t.token},p=yield P2(t.uploadUrl,s,{headers:i,retries:3});ce.debug(`runId: ${p.runId}`),ce.info("Uploading profile data...");let r=X4.readFileSync(a);ce.debug(`Uploading ${r.length} bytes...`);let d=yield N2(p.uploadUrl,{method:"PUT",body:el.Readable.from(r),headers:{"Content-Type":"application/gzip","Content-Length":r.length.toString(),"Content-MD5":s.profileMd5},retries:3});if(d.status!==200)throw new Error(`Upload failed with status ${d.status}: ${yield d.text()}`);ce.info("Results uploaded."),ce.endGroup()}),sl=Ou;var Du="1.7.0",Ru=process.env.CODSPEED_SKIP_UPLOAD==="true",Au=String.raw` +`);if(t="",e=yield(0,_t.exec)("dpkg --print-architecture",[],{silent:!0,listeners:{stdout:p=>{t+=p.toString()}}}),e!==0)throw new Error("Failed to get system info");let i=t.trim();return{os:a,osVersion:s,arch:i}}),dm=()=>F(void 0,null,function*(){fe.startGroup("Prepare environment");try{let t=yield rm();if(fe.debug(`OS: ${t.os}`),fe.debug(`OS Version: ${t.osVersion}`),fe.debug(`Arch: ${t.arch}`),t.os!=="Ubuntu")throw new Error("Only Ubuntu is supported for now");if(t.arch!=="amd64")throw new Error("Only amd64 is supported for now");if(!["20.04","22.04"].includes(t.osVersion))throw new Error("Only Ubuntu 20.04 and 22.04 are supported for now");let e=`https://github.com/CodSpeedHQ/valgrind-codspeed/releases/download/${C2}/valgrind_${C2}_ubuntu-${t.osVersion}_amd64.deb`;fe.debug(`Instaling valgrind from ${e}`);let a="/tmp/valgrind-codspeed.deb";yield F2(e,a),yield(0,_t.exec)(`sudo apt install ${a}`,[],{silent:!0}),yield Mo();try{yield(0,_t.exec)("pip show pytest-codspeed",[],{silent:!0})}catch(s){fe.warning("pytest-codspeed is not installed in your environment. Installing it..."),yield(0,_t.exec)("pip install pytest-codspeed",[],{silent:!0})}}catch(t){throw new Error(`Failed to prepare environment: ${t}`)}fe.info("Environment ready"),fe.endGroup()}),G2=dm;var Ge=P(e1()),ip=P(Xt()),I2=require("os"),x2=require("crypto"),B2=P(require("path")),q2=require("fs");var ra=P(require("fs/promises")),tp=P(require("path")),k2=P(e1());function L2(t){return F(this,null,function*(){let s=(yield ra.readdir(t)).filter(r=>r.endsWith(".out")).map(r=>r.split(".")[0]),p=(yield ra.readdir("/tmp")).filter(r=>{let d=r.match(/perf-(\d+)\.map/);return d&&s.includes(d[1])});yield Promise.all(p.map(r=>F(this,null,function*(){let d=tp.join("/tmp",r),o=tp.join(t,r);try{yield ra.copyFile(d,o)}catch(n){k2.warning(`Failed to copy ${d} to ${o}: ${n}`)}})))})}var ap=P(Xt()),sp=P(e1());var om=()=>F(void 0,null,function*(){let t="";try{return yield(0,ap.exec)("python",["-c","import sysconfig; print('/'.join(sysconfig.get_config_vars('LIBDIR', 'INSTSONAME')))"],{silent:!0,listeners:{stdout:e=>{t+=e.toString()}}}),[t.trim()]}catch(e){return sp.debug(`Failed to get python shared objects: ${e}`),[]}}),nm=()=>F(void 0,null,function*(){let t="";try{return yield(0,ap.exec)("node",["-e","console.log(process.execPath);"],{silent:!0,listeners:{stdout:e=>{t+=e.toString()}}}),[t.trim()]}catch(e){return sp.debug(`Failed to get nodejs shared objects: ${e}`),[]}}),U2=()=>F(void 0,null,function*(){return[...yield om(),...yield nm()]});var lm=()=>F(void 0,null,function*(){let t="";if((yield(0,ip.exec)("uname",["-m"],{silent:!0,listeners:{stdout:a=>{t+=a.toString()}}}))!==0)throw new Error("Failed to get architecture");return t.trim()}),mm=()=>{let t=B2.join((0,I2.tmpdir)(),`profile.${(0,x2.randomBytes)(6).readUIntLE(0,6).toString(36)}.out`);return(0,q2.mkdirSync)(t,{recursive:!0}),t},V2=t=>{["Using source line as position.","warning: L3 cache found, using its data for the LL simulation.","warning: specified LL cache:","warning: simulated LL cache:"].some(e=>t.includes(e))||Ge.info(t)},um=t=>F(void 0,null,function*(){Ge.startGroup("Run benchmarks");let e=yield lm(),a=mm(),s=`${a}/%p.out`,i=["*/esbuild"],p=yield U2();Ge.debug(`Objects to ignore: ${p.join(", ")}`);let r=["-q","--tool=callgrind","--trace-children=yes","--cache-sim=yes","--I1=32768,8,64","--D1=32768,8,64","--LL=8388608,16,64","--instr-atstart=no","--collect-systime=nsec","--compress-strings=no","--combine-dumps=yes","--dump-line=no",`--callgrind-out-file=${s}`,`--trace-children-skip=${i.join(",")}`,...p.map(n=>`--obj-skip=${n}`)],d=t.run.replace("cargo codspeed","cargo-codspeed").replace(/"/g,'\\"'),o=`${__dirname}/bin`;Ge.debug(`custom bin path: ${o}`);try{let n=["setarch",e,"-R","valgrind",...r,`sh -c "${d}"`].join(" ");Ge.debug(`Running: ${n}`);let l=yield(0,ip.exec)(n,[],{env:rt(Xe({},process.env),{PATH:`${o}:${process.env.PATH}`,PYTHONMALLOC:"malloc",PYTHONHASHSEED:"0",CODSPEED_V8_FLAGS:["--hash-seed=1","--random-seed=1","--no-randomize-hashes","--no-scavenge-task","--no-opt ","--predictable ","--predictable-gc-schedule"].join(" "),ARCH:e,CODSPEED_ENV:"github"}),silent:!0,listeners:{stdline:V2,errline:V2}});if(l!==0)throw new Error(`Process exited with non-zero exit code: ${l}`)}catch(n){throw Ge.debug(`Error: ${n}`),new Error("Failed to run benchmarks")}return yield L2(a),Ge.endGroup(),{profileFolder:a}}),M2=um;var ce=P(e1()),X4=P(require("fs")),Q4=P(q6()),el=require("stream"),Ue=P(Y4()),tl=P(require("node:crypto")),al=P(J4());var Su=a=>F(void 0,[a],function*({profilePath:t,inputs:e}){var o,n,l,m,u,f,h;let s=(o=Ue.context.payload)==null?void 0:o.pull_request,i=(n=Ue.context.payload)==null?void 0:n.sender,p=yield(0,al.default)(t),r=Buffer.from(p,"hex").toString("base64"),d=(s==null?void 0:s.head.repo.id)===(s==null?void 0:s.base.repo.id)?s==null?void 0:s.head.ref:`${s==null?void 0:s.head.repo.owner.login}:${s==null?void 0:s.head.ref}`;return{version:1,tokenless:e.tokenless,ref:Ue.context.ref,headRef:d,baseRef:(l=s==null?void 0:s.base)==null?void 0:l.ref,owner:Ue.context.repo.owner,repository:Ue.context.repo.repo,event:Ue.context.eventName,commitHash:(h=(f=(u=(m=Ue.context.payload)==null?void 0:m.pull_request)==null?void 0:u.head)==null?void 0:f.sha)!=null?h:Ue.context.sha,profileMd5:r,ghData:{runId:Ue.context.runId,job:Ue.context.job,sender:i&&{id:i.id,login:i.login}},runner:{name:"@codspeed/action",version:"1.7.1"}}}),Ou=(t,e)=>F(void 0,null,function*(){ce.startGroup("Upload Results");let a=`${e}.tar.gz`;yield Q4.c({file:a,gzip:!0,cwd:e},["."]);let s=yield Su({profilePath:a,inputs:t});if(ce.debug("Upload metadata:"),ce.debug(JSON.stringify(s,null,2)),t.tokenless){let o=tl.default.createHash("sha256").update(JSON.stringify(s)).digest("hex");ce.info(`CodSpeed Run Hash: "${o}"`)}ce.info("Preparing upload...");let i=t.tokenless?void 0:{Authorization:t.token},p=yield P2(t.uploadUrl,s,{headers:i,retries:3});ce.debug(`runId: ${p.runId}`),ce.info("Uploading profile data...");let r=X4.readFileSync(a);ce.debug(`Uploading ${r.length} bytes...`);let d=yield N2(p.uploadUrl,{method:"PUT",body:el.Readable.from(r),headers:{"Content-Type":"application/gzip","Content-Length":r.length.toString(),"Content-MD5":s.profileMd5},retries:3});if(d.status!==200)throw new Error(`Upload failed with status ${d.status}: ${yield d.text()}`);ce.info("Results uploaded."),ce.endGroup()}),sl=Ou;var Du="1.7.1",Ru=process.env.CODSPEED_SKIP_UPLOAD==="true",Au=String.raw` ______ __ _____ __ / ____/____ ____/ // ___/ ____ ___ ___ ____/ / / / / __ \ / __ / \__ \ / __ \ / _ \ / _ \ / __ / diff --git a/package.json b/package.json index a2a8e05..446ba06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codspeed/action", - "version": "1.7.0", + "version": "1.7.1", "private": true, "description": "Github Actions for running CodSpeed in your CI", "main": "lib/main.js",