From 725c31f47c731521facc6f5444879a3c647e825f Mon Sep 17 00:00:00 2001 From: ame-yu Date: Fri, 27 Mar 2020 13:45:02 +0800 Subject: [PATCH] update v2 --- ReadMe.md | 17 ++++++++++++----- action.yml | 11 ++++++++--- dist/index.js | 2 +- src/index.js | 5 +++-- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index b073327..5b4917b 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,4 +1,6 @@ -### Delete latest before release +# Delete latest before release +## Usage +### Example Workflow file In this case i want keep my repository just 1 release. ```yml name: Main @@ -13,10 +15,9 @@ jobs: uses: actions/checkout@v2 - name: Delete - uses: ame-yu/action-delete-latest-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPOSITORY: $ {{ github.repository }} + uses: ame-yu/action-delete-latest-release@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Release uses: softprops/action-gh-release@v1 @@ -24,3 +25,9 @@ jobs: name: type-your-release-name tag_name: tag-here ``` +### Inputs + +| name | value | default | description | +| ---- | ----- | ------- | ----------- | +| github_token | string | | Token for the repo. Can be passed in using `${{ secrets.GITHUB_TOKEN }}`. | +| repository | string | '' | Repository name. Default or empty repository name represents current github repository.| \ No newline at end of file diff --git a/action.yml b/action.yml index b089755..ab80e89 100644 --- a/action.yml +++ b/action.yml @@ -3,9 +3,14 @@ name: 'Delete latest release' description: 'Delete latest release' author: "ame-yu" -env: - "GITHUB_TOKEN": "As provided by Github Actions" - "GITHUB_REPOSITORY": "As provided by Github Actions" +inputs: + github_token: + description: 'Token for the repo. Can be passed in using $\{{ secrets.GITHUB_TOKEN }}' + required: true + repository: + description: 'Repository name. Default or empty value represents current github repository (${GITHUB_REPOSITORY})' + default: '' + required: false runs: using: "node12" main: "dist/index.js" diff --git a/dist/index.js b/dist/index.js index 055acaa..1846f5c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var o=t[r]={i:r,l:false,exports:{}};e[r].call(o.exports,o,o.exports,__webpack_require__);o.l=true;return o.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(676)}return startup()}({2:function(e,r,t){"use strict";const o=t(87);const s=t(118);const n=t(49);const i=(e,r)=>{if(!e&&r){throw new Error("You can't specify a `release` without specifying `platform`")}e=e||o.platform();let t;if(e==="darwin"){if(!r&&o.platform()==="darwin"){r=o.release()}const e=r?Number(r.split(".")[0])>15?"macOS":"OS X":"macOS";t=r?s(r).name:"";return e+(t?" "+t:"")}if(e==="linux"){if(!r&&o.platform()==="linux"){r=o.release()}t=r?r.replace(/^(\d+\.\d+).*/,"$1"):"";return"Linux"+(t?" "+t:"")}if(e==="win32"){if(!r&&o.platform()==="win32"){r=o.release()}t=r?n(r):"";return"Windows"+(t?" "+t:"")}return e};e.exports=i},9:function(e,r,t){var o=t(969);var s=function(){};var n=function(e){return e.setHeader&&typeof e.abort==="function"};var i=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var a=function(e,r,t){if(typeof r==="function")return a(e,null,r);if(!r)r={};t=o(t||s);var c=e._writableState;var u=e._readableState;var l=r.readable||r.readable!==false&&e.readable;var p=r.writable||r.writable!==false&&e.writable;var f=false;var d=function(){if(!e.writable)m()};var m=function(){p=false;if(!l)t.call(e)};var h=function(){l=false;if(!p)t.call(e)};var g=function(r){t.call(e,r?new Error("exited with error code: "+r):null)};var w=function(r){t.call(e,r)};var T=function(){process.nextTick(b)};var b=function(){if(f)return;if(l&&!(u&&(u.ended&&!u.destroyed)))return t.call(e,new Error("premature close"));if(p&&!(c&&(c.ended&&!c.destroyed)))return t.call(e,new Error("premature close"))};var v=function(){e.req.on("finish",m)};if(n(e)){e.on("complete",m);e.on("abort",T);if(e.req)v();else e.on("request",v)}else if(p&&!c){e.on("end",d);e.on("close",d)}if(i(e))e.on("exit",g);e.on("end",h);e.on("finish",m);if(r.error!==false)e.on("error",w);e.on("close",T);return function(){f=true;e.removeListener("complete",m);e.removeListener("abort",T);e.removeListener("request",v);if(e.req)e.req.removeListener("finish",m);e.removeListener("end",d);e.removeListener("close",d);e.removeListener("finish",m);e.removeListener("exit",g);e.removeListener("end",h);e.removeListener("error",w);e.removeListener("close",T)}};e.exports=a},11:function(e){e.exports=wrappy;function wrappy(e,r){if(e&&r)return wrappy(e)(r);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(r){wrapper[r]=e[r]});return wrapper;function wrapper(){var r=new Array(arguments.length);for(var t=0;t{e=e||{};const r=e.env||process.env;const t=e.platform||process.platform;if(t!=="win32"){return"PATH"}return Object.keys(r).find(e=>e.toUpperCase()==="PATH")||"Path"})},49:function(e,r,t){"use strict";const o=t(87);const s=t(955);const n=new Map([["10.0","10"],["6.3","8.1"],["6.2","8"],["6.1","7"],["6.0","Vista"],["5.2","Server 2003"],["5.1","XP"],["5.0","2000"],["4.9","ME"],["4.1","98"],["4.0","95"]]);const i=e=>{const r=/\d+\.\d/.exec(e||o.release());if(e&&!r){throw new Error("`release` argument doesn't match `n.n`")}const t=(r||[])[0];if((!e||e===o.release())&&["6.1","6.2","6.3","10.0"].includes(t)){const e=s.sync("wmic",["os","get","Caption"]).stdout||"";const r=(e.match(/2008|2012|2016/)||[])[0];if(r){return`Server ${r}`}}return n.get(t)};e.exports=i},87:function(e){e.exports=require("os")},118:function(e,r,t){"use strict";const o=t(87);const s=new Map([[19,"Catalina"],[18,"Mojave"],[17,"High Sierra"],[16,"Sierra"],[15,"El Capitan"],[14,"Yosemite"],[13,"Mavericks"],[12,"Mountain Lion"],[11,"Lion"],[10,"Snow Leopard"],[9,"Leopard"],[8,"Tiger"],[7,"Panther"],[6,"Jaguar"],[5,"Puma"]]);const n=e=>{e=Number((e||o.release()).split(".")[0]);return{name:s.get(e),version:"10."+(e-4)}};e.exports=n;e.exports.default=n},129:function(e){e.exports=require("child_process")},145:function(e,r,t){"use strict";const o=t(453);const s=t(966);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}function getStream(e,r){if(!e){return Promise.reject(new Error("Expected a stream"))}r=Object.assign({maxBuffer:Infinity},r);const{maxBuffer:t}=r;let n;return new Promise((i,a)=>{const c=e=>{if(e){e.bufferedData=n.getBufferedValue()}a(e)};n=o(e,s(r),e=>{if(e){c(e);return}i()});n.on("data",()=>{if(n.getBufferedLength()>t){c(new MaxBufferError)}})}).then(()=>n.getBufferedValue())}e.exports=getStream;e.exports.buffer=((e,r)=>getStream(e,Object.assign({},r,{encoding:"buffer"})));e.exports.array=((e,r)=>getStream(e,Object.assign({},r,{array:true})));e.exports.MaxBufferError=MaxBufferError},168:function(e){"use strict";const r=["stdin","stdout","stderr"];const t=e=>r.some(r=>Boolean(e[r]));e.exports=(e=>{if(!e){return null}if(e.stdio&&t(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${r.map(e=>`\`${e}\``).join(", ")}`)}if(typeof e.stdio==="string"){return e.stdio}const o=e.stdio||[];if(!Array.isArray(o)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof o}\``)}const s=[];const n=Math.max(o.length,r.length);for(let t=0;t)?=?)";var P=c++;a[P]=a[l]+"|x|X|\\*";var O=c++;a[O]=a[u]+"|x|X|\\*";var k=c++;a[k]="[v=\\s]*("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:"+a[g]+")?"+a[b]+"?"+")?)?";var G=c++;a[G]="[v=\\s]*("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:"+a[w]+")?"+a[b]+"?"+")?)?";var R=c++;a[R]="^"+a[S]+"\\s*"+a[k]+"$";var x=c++;a[x]="^"+a[S]+"\\s*"+a[G]+"$";var j=c++;a[j]="(?:^|[^\\d])"+"(\\d{1,"+n+"})"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:$|[^\\d])";var C=c++;a[C]="(?:~>?)";var A=c++;a[A]="(\\s*)"+a[C]+"\\s+";i[A]=new RegExp(a[A],"g");var D="$1~";var q=c++;a[q]="^"+a[C]+a[k]+"$";var L=c++;a[L]="^"+a[C]+a[G]+"$";var U=c++;a[U]="(?:\\^)";var B=c++;a[B]="(\\s*)"+a[U]+"\\s+";i[B]=new RegExp(a[B],"g");var F="$1^";var I=c++;a[I]="^"+a[U]+a[k]+"$";var $=c++;a[$]="^"+a[U]+a[G]+"$";var H=c++;a[H]="^"+a[S]+"\\s*("+y+")$|^$";var M=c++;a[M]="^"+a[S]+"\\s*("+E+")$|^$";var N=c++;a[N]="(\\s*)"+a[S]+"\\s*("+y+"|"+a[k]+")";i[N]=new RegExp(a[N],"g");var V="$1$2$3";var z=c++;a[z]="^\\s*("+a[k]+")"+"\\s+-\\s+"+"("+a[k]+")"+"\\s*$";var W=c++;a[W]="^\\s*("+a[G]+")"+"\\s+-\\s+"+"("+a[G]+")"+"\\s*$";var X=c++;a[X]="(<|>)?=?\\s*\\*";for(var K=0;Ko){return null}var t=r.loose?i[_]:i[v];if(!t.test(e)){return null}try{return new SemVer(e,r)}catch(e){return null}}r.valid=valid;function valid(e,r){var t=parse(e,r);return t?t.version:null}r.clean=clean;function clean(e,r){var t=parse(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}r.SemVer=SemVer;function SemVer(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===r.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>o){throw new TypeError("version is longer than "+o+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,r)}t("SemVer",e,r);this.options=r;this.loose=!!r.loose;var n=e.trim().match(r.loose?i[_]:i[v]);if(!n){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(r>=0&&r=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1){this.prerelease.push(0)}}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1])){this.prerelease=[r,0]}}else{this.prerelease=[r,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};r.inc=inc;function inc(e,r,t,o){if(typeof t==="string"){o=t;t=undefined}try{return new SemVer(e,t).inc(r,o).version}catch(e){return null}}r.diff=diff;function diff(e,r){if(eq(e,r)){return null}else{var t=parse(e);var o=parse(r);var s="";if(t.prerelease.length||o.prerelease.length){s="pre";var n="prerelease"}for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==o[i]){return s+i}}}return n}}r.compareIdentifiers=compareIdentifiers;var Z=/^[0-9]+$/;function compareIdentifiers(e,r){var t=Z.test(e);var o=Z.test(r);if(t&&o){e=+e;r=+r}return e===r?0:t&&!o?-1:o&&!t?1:e0}r.lt=lt;function lt(e,r,t){return compare(e,r,t)<0}r.eq=eq;function eq(e,r,t){return compare(e,r,t)===0}r.neq=neq;function neq(e,r,t){return compare(e,r,t)!==0}r.gte=gte;function gte(e,r,t){return compare(e,r,t)>=0}r.lte=lte;function lte(e,r,t){return compare(e,r,t)<=0}r.cmp=cmp;function cmp(e,r,t,o){switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e===t;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e!==t;case"":case"=":case"==":return eq(e,t,o);case"!=":return neq(e,t,o);case">":return gt(e,t,o);case">=":return gte(e,t,o);case"<":return lt(e,t,o);case"<=":return lte(e,t,o);default:throw new TypeError("Invalid operator: "+r)}}r.Comparator=Comparator;function Comparator(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!r.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,r)}t("comparator",e,r);this.options=r;this.loose=!!r.loose;this.parse(e);if(this.semver===J){this.value=""}else{this.value=this.operator+this.semver.version}t("comp",this)}var J={};Comparator.prototype.parse=function(e){var r=this.options.loose?i[H]:i[M];var t=e.match(r);if(!t){throw new TypeError("Invalid comparator: "+e)}this.operator=t[1];if(this.operator==="="){this.operator=""}if(!t[2]){this.semver=J}else{this.semver=new SemVer(t[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){t("Comparator.test",e,this.options.loose);if(this.semver===J){return true}if(typeof e==="string"){e=new SemVer(e,this.options)}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,r){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}var t;if(this.operator===""){t=new Range(e.value,r);return satisfies(this.value,t,r)}else if(e.operator===""){t=new Range(this.value,r);return satisfies(e.semver,t,r)}var o=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var n=this.semver.version===e.semver.version;var i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,r)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var c=cmp(this.semver,">",e.semver,r)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return o||s||n&&i||a||c};r.Range=Range;function Range(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease){return e}else{return new Range(e.raw,r)}}if(e instanceof Comparator){return new Range(e.value,r)}if(!(this instanceof Range)){return new Range(e,r)}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var r=this.options.loose;e=e.trim();var o=r?i[W]:i[z];e=e.replace(o,hyphenReplace);t("hyphen replace",e);e=e.replace(i[N],V);t("comparator trim",e,i[N]);e=e.replace(i[A],D);e=e.replace(i[B],F);e=e.split(/\s+/).join(" ");var s=r?i[H]:i[M];var n=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){n=n.filter(function(e){return!!e.match(s)})}n=n.map(function(e){return new Comparator(e,this.options)},this);return n};Range.prototype.intersects=function(e,r){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(t){return t.every(function(t){return e.set.some(function(e){return e.every(function(e){return t.intersects(e,r)})})})})};r.toComparators=toComparators;function toComparators(e,r){return new Range(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,r){t("comp",e,r);e=replaceCarets(e,r);t("caret",e);e=replaceTildes(e,r);t("tildes",e);e=replaceXRanges(e,r);t("xrange",e);e=replaceStars(e,r);t("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,r){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,r)}).join(" ")}function replaceTilde(e,r){var o=r.loose?i[L]:i[q];return e.replace(o,function(r,o,s,n,i){t("tilde",e,r,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else if(i){t("replaceTilde pr",i);a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}t("tilde return",a);return a})}function replaceCarets(e,r){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,r)}).join(" ")}function replaceCaret(e,r){t("caret",e,r);var o=r.loose?i[$]:i[I];return e.replace(o,function(r,o,s,n,i){t("caret",e,r,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){if(o==="0"){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+".0 <"+(+o+1)+".0.0"}}else if(i){t("replaceCaret pr",i);if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+(+o+1)+".0.0"}}else{t("no pr");if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+" <"+(+o+1)+".0.0"}}t("caret return",a);return a})}function replaceXRanges(e,r){t("replaceXRanges",e,r);return e.split(/\s+/).map(function(e){return replaceXRange(e,r)}).join(" ")}function replaceXRange(e,r){e=e.trim();var o=r.loose?i[x]:i[R];return e.replace(o,function(r,o,s,n,i,a){t("xRange",e,r,o,s,n,i,a);var c=isX(s);var u=c||isX(n);var l=u||isX(i);var p=l;if(o==="="&&p){o=""}if(c){if(o===">"||o==="<"){r="<0.0.0"}else{r="*"}}else if(o&&p){if(u){n=0}i=0;if(o===">"){o=">=";if(u){s=+s+1;n=0;i=0}else{n=+n+1;i=0}}else if(o==="<="){o="<";if(u){s=+s+1}else{n=+n+1}}r=o+s+"."+n+"."+i}else if(u){r=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(l){r=">="+s+"."+n+".0 <"+s+"."+(+n+1)+".0"}t("xRange return",r);return r})}function replaceStars(e,r){t("replaceStars",e,r);return e.trim().replace(i[X],"")}function hyphenReplace(e,r,t,o,s,n,i,a,c,u,l,p,f){if(isX(t)){r=""}else if(isX(o)){r=">="+t+".0.0"}else if(isX(s)){r=">="+t+"."+o+".0"}else{r=">="+r}if(isX(c)){a=""}else if(isX(u)){a="<"+(+c+1)+".0.0"}else if(isX(l)){a="<"+c+"."+(+u+1)+".0"}else if(p){a="<="+c+"."+u+"."+l+"-"+p}else{a="<="+a}return(r+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){e=new SemVer(e,this.options)}for(var r=0;r0){var n=e[s].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch){return true}}}return false}return true}r.satisfies=satisfies;function satisfies(e,r,t){try{r=new Range(r,t)}catch(e){return false}return r.test(e)}r.maxSatisfying=maxSatisfying;function maxSatisfying(e,r,t){var o=null;var s=null;try{var n=new Range(r,t)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===-1){o=e;s=new SemVer(o,t)}}});return o}r.minSatisfying=minSatisfying;function minSatisfying(e,r,t){var o=null;var s=null;try{var n=new Range(r,t)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===1){o=e;s=new SemVer(o,t)}}});return o}r.minVersion=minVersion;function minVersion(e,r){e=new Range(e,r);var t=new SemVer("0.0.0");if(e.test(t)){return t}t=new SemVer("0.0.0-0");if(e.test(t)){return t}t=null;for(var o=0;o":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!t||gt(t,r)){t=r}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(t&&e.test(t)){return t}return null}r.validRange=validRange;function validRange(e,r){try{return new Range(e,r).range||"*"}catch(e){return null}}r.ltr=ltr;function ltr(e,r,t){return outside(e,r,"<",t)}r.gtr=gtr;function gtr(e,r,t){return outside(e,r,">",t)}r.outside=outside;function outside(e,r,t,o){e=new SemVer(e,o);r=new Range(r,o);var s,n,i,a,c;switch(t){case">":s=gt;n=lte;i=lt;a=">";c=">=";break;case"<":s=lt;n=gte;i=gt;a="<";c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,r,o)){return false}for(var u=0;u=0.0.0")}p=p||e;f=f||e;if(s(e.semver,p.semver,o)){p=e}else if(i(e.semver,f.semver,o)){f=e}});if(p.operator===a||p.operator===c){return false}if((!f.operator||f.operator===a)&&n(e,f.semver)){return false}else if(f.operator===c&&i(e,f.semver)){return false}}return true}r.prerelease=prerelease;function prerelease(e,r){var t=parse(e,r);return t&&t.prerelease.length?t.prerelease:null}r.intersects=intersects;function intersects(e,r,t){e=new Range(e,t);r=new Range(r,t);return e.intersects(r)}r.coerce=coerce;function coerce(e){if(e instanceof SemVer){return e}if(typeof e!=="string"){return null}var r=e.match(i[j]);if(r==null){return null}return parse(r[1]+"."+(r[2]||"0")+"."+(r[3]||"0"))}},299:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});const t="2.0.2";function normalizePaginatedListResponse(e,r,t){const o="total_count"in t.data&&!("url"in t.data);if(!o)return;const s=t.data.incomplete_results;const n=t.data.repository_selection;const i=t.data.total_count;delete t.data.incomplete_results;delete t.data.repository_selection;delete t.data.total_count;const a=Object.keys(t.data)[0];const c=t.data[a];t.data=c;if(typeof s!=="undefined"){t.data.incomplete_results=s}if(typeof n!=="undefined"){t.data.repository_selection=n}t.data.total_count=i}function iterator(e,r,t){const o=e.request.endpoint(r,t);const s=o.method;const n=o.headers;let i=o.url;return{[Symbol.asyncIterator]:()=>({next(){if(!i){return Promise.resolve({done:true})}return e.request({method:s,url:i,headers:n}).then(r=>{normalizePaginatedListResponse(e,i,r);i=((r.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:r}})}})}}function paginate(e,r,t,o){if(typeof t==="function"){o=t;t=undefined}return gather(e,[],iterator(e,r,t)[Symbol.asyncIterator](),o)}function gather(e,r,t,o){return t.next().then(s=>{if(s.done){return r}let n=false;function done(){n=true}r=r.concat(o?o(s.value,done):s.value.data);if(n){return r}return gather(e,r,t,o)})}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=t;r.paginateRest=paginateRest},323:function(e){"use strict";var r=e.exports=function(e){return e!==null&&typeof e==="object"&&typeof e.pipe==="function"};r.writable=function(e){return r(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object"};r.readable=function(e){return r(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object"};r.duplex=function(e){return r.writable(e)&&r.readable(e)};r.transform=function(e){return r.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object"}},357:function(e){e.exports=require("assert")},363:function(e){e.exports=register;function register(e,r,t,o){if(typeof t!=="function"){throw new Error("method for before hook must be a function")}if(!o){o={}}if(Array.isArray(r)){return r.reverse().reduce(function(r,t){return register.bind(null,e,t,r,o)},t)()}return Promise.resolve().then(function(){if(!e.registry[r]){return t(o)}return e.registry[r].reduce(function(e,r){return r.hook.bind(null,e,o)},t)()})}},385:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=_interopDefault(t(696));var s=t(796);function lowercaseKeys(e){if(!e){return{}}return Object.keys(e).reduce((r,t)=>{r[t.toLowerCase()]=e[t];return r},{})}function mergeDeep(e,r){const t=Object.assign({},e);Object.keys(r).forEach(s=>{if(o(r[s])){if(!(s in e))Object.assign(t,{[s]:r[s]});else t[s]=mergeDeep(e[s],r[s])}else{Object.assign(t,{[s]:r[s]})}});return t}function merge(e,r,t){if(typeof r==="string"){let[e,o]=r.split(" ");t=Object.assign(o?{method:e,url:o}:{url:e},t)}else{t=Object.assign({},r)}t.headers=lowercaseKeys(t.headers);const o=mergeDeep(e||{},t);if(e&&e.mediaType.previews.length){o.mediaType.previews=e.mediaType.previews.filter(e=>!o.mediaType.previews.includes(e)).concat(o.mediaType.previews)}o.mediaType.previews=o.mediaType.previews.map(e=>e.replace(/-preview/,""));return o}function addQueryParameters(e,r){const t=/\?/.test(e)?"&":"?";const o=Object.keys(r);if(o.length===0){return e}return e+t+o.map(e=>{if(e==="q"){return"q="+r.q.split("+").map(encodeURIComponent).join("+")}return`${e}=${encodeURIComponent(r[e])}`}).join("&")}const n=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const r=e.match(n);if(!r){return[]}return r.map(removeNonChars).reduce((e,r)=>e.concat(r),[])}function omit(e,r){return Object.keys(e).filter(e=>!r.includes(e)).reduce((r,t)=>{r[t]=e[t];return r},{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){if(!/%[0-9A-Fa-f]/.test(e)){e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")}return e}).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function encodeValue(e,r,t){r=e==="+"||e==="#"?encodeReserved(r):encodeUnreserved(r);if(t){return encodeUnreserved(t)+"="+r}else{return r}}function isDefined(e){return e!==undefined&&e!==null}function isKeyOperator(e){return e===";"||e==="&"||e==="?"}function getValues(e,r,t,o){var s=e[t],n=[];if(isDefined(s)&&s!==""){if(typeof s==="string"||typeof s==="number"||typeof s==="boolean"){s=s.toString();if(o&&o!=="*"){s=s.substring(0,parseInt(o,10))}n.push(encodeValue(r,s,isKeyOperator(r)?t:""))}else{if(o==="*"){if(Array.isArray(s)){s.filter(isDefined).forEach(function(e){n.push(encodeValue(r,e,isKeyOperator(r)?t:""))})}else{Object.keys(s).forEach(function(e){if(isDefined(s[e])){n.push(encodeValue(r,s[e],e))}})}}else{const e=[];if(Array.isArray(s)){s.filter(isDefined).forEach(function(t){e.push(encodeValue(r,t))})}else{Object.keys(s).forEach(function(t){if(isDefined(s[t])){e.push(encodeUnreserved(t));e.push(encodeValue(r,s[t].toString()))}})}if(isKeyOperator(r)){n.push(encodeUnreserved(t)+"="+e.join(","))}else if(e.length!==0){n.push(e.join(","))}}}}else{if(r===";"){if(isDefined(s)){n.push(encodeUnreserved(t))}}else if(s===""&&(r==="&"||r==="?")){n.push(encodeUnreserved(t)+"=")}else if(s===""){n.push("")}}return n}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,r){var t=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(e,o,s){if(o){let e="";const s=[];if(t.indexOf(o.charAt(0))!==-1){e=o.charAt(0);o=o.substr(1)}o.split(/,/g).forEach(function(t){var o=/([^:\*]*)(?::(\d+)|(\*))?/.exec(t);s.push(getValues(r,e,o[1],o[2]||o[3]))});if(e&&e!=="+"){var n=",";if(e==="?"){n="&"}else if(e!=="#"){n=e}return(s.length!==0?e:"")+s.join(n)}else{return s.join(",")}}else{return encodeReserved(s)}})}function parse(e){let r=e.method.toUpperCase();let t=(e.url||"/").replace(/:([a-z]\w+)/g,"{+$1}");let o=Object.assign({},e.headers);let s;let n=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const i=extractUrlVariableNames(t);t=parseUrl(t).expand(n);if(!/^http/.test(t)){t=e.baseUrl+t}const a=Object.keys(e).filter(e=>i.includes(e)).concat("baseUrl");const c=omit(n,a);const u=/application\/octet-stream/i.test(o.accept);if(!u){if(e.mediaType.format){o.accept=o.accept.split(/,/).map(r=>r.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`)).join(",")}if(e.mediaType.previews.length){const r=o.accept.match(/[\w-]+(?=-preview)/g)||[];o.accept=r.concat(e.mediaType.previews).map(r=>{const t=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${r}-preview${t}`}).join(",")}}if(["GET","HEAD"].includes(r)){t=addQueryParameters(t,c)}else{if("data"in c){s=c.data}else{if(Object.keys(c).length){s=c}else{o["content-length"]=0}}}if(!o["content-type"]&&typeof s!=="undefined"){o["content-type"]="application/json; charset=utf-8"}if(["PATCH","PUT"].includes(r)&&typeof s==="undefined"){s=""}return Object.assign({method:r,url:t,headers:o},typeof s!=="undefined"?{body:s}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,r,t){return parse(merge(e,r,t))}function withDefaults(e,r){const t=merge(e,r);const o=endpointWithDefaults.bind(null,t);return Object.assign(o,{DEFAULTS:t,defaults:withDefaults.bind(null,t),merge:merge.bind(null,t),parse:parse})}const i="5.5.3";const a=`octokit-endpoint.js/${i} ${s.getUserAgent()}`;const c={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":a},mediaType:{format:"",previews:[]}};const u=withDefaults(null,c);r.endpoint=u},389:function(e,r,t){"use strict";const o=t(747);const s=t(866);function readShebang(e){const r=150;let t;if(Buffer.alloc){t=Buffer.alloc(r)}else{t=new Buffer(r);t.fill(0)}let n;try{n=o.openSync(e,"r");o.readSync(n,t,0,r,0);o.closeSync(n)}catch(e){}return s(t.toString())}e.exports=readShebang},413:function(e){e.exports=require("stream")},427:function(e,r,t){"use strict";const o=t(669);let s;if(typeof o.getSystemErrorName==="function"){e.exports=o.getSystemErrorName}else{try{s=process.binding("uv");if(typeof s.errname!=="function"){throw new TypeError("uv.errname is not a function")}}catch(e){console.error("execa/lib/errname: unable to establish process.binding('uv')",e);s=null}e.exports=(e=>errname(s,e))}e.exports.__test__=errname;function errname(e,r){if(e){return e.errname(r)}if(!(r<0)){throw new Error("err >= 0")}return`Unknown system error ${r}`}},448:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var o=t(796);var s=t(523);var n=t(753);var i=t(898);var a=t(813);const c="2.4.2";class Octokit{constructor(e={}){const r=new s.Collection;const t={baseUrl:n.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};t.headers["user-agent"]=[e.userAgent,`octokit-core.js/${c} ${o.getUserAgent()}`].filter(Boolean).join(" ");if(e.baseUrl){t.baseUrl=e.baseUrl}if(e.previews){t.mediaType.previews=e.previews}if(e.timeZone){t.headers["time-zone"]=e.timeZone}this.request=n.request.defaults(t);this.graphql=i.withCustomRequest(this.request).defaults(t);this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log);this.hook=r;if(!e.authStrategy){if(!e.auth){this.auth=(async()=>({type:"unauthenticated"}))}else{const t=a.createTokenAuth(e.auth);r.wrap("request",t.hook);this.auth=t}}else{const t=e.authStrategy(Object.assign({request:this.request},e.auth));r.wrap("request",t.hook);this.auth=t}const u=this.constructor;u.plugins.forEach(r=>{Object.assign(this,r(this,e))})}static defaults(e){const r=class extends(this){constructor(...r){const t=r[0]||{};super(Object.assign({},e,t,t.userAgent&&e.userAgent?{userAgent:`${t.userAgent} ${e.userAgent}`}:null))}};return r}static plugin(e){var r;const t=this.plugins;const o=Array.isArray(e)?e:[e];const s=(r=class extends(this){},r.plugins=t.concat(o.filter(e=>!t.includes(e))),r);return s}}Octokit.VERSION=c;Octokit.plugins=[];r.Octokit=Octokit},453:function(e,r,t){var o=t(969);var s=t(9);var n=t(747);var i=function(){};var a=/^v?\.0/.test(process.version);var c=function(e){return typeof e==="function"};var u=function(e){if(!a)return false;if(!n)return false;return(e instanceof(n.ReadStream||i)||e instanceof(n.WriteStream||i))&&c(e.close)};var l=function(e){return e.setHeader&&c(e.abort)};var p=function(e,r,t,n){n=o(n);var a=false;e.on("close",function(){a=true});s(e,{readable:r,writable:t},function(e){if(e)return n(e);a=true;n()});var p=false;return function(r){if(a)return;if(p)return;p=true;if(u(e))return e.close(i);if(l(e))return e.abort();if(c(e.destroy))return e.destroy();n(r||new Error("stream was destroyed"))}};var f=function(e){e()};var d=function(e,r){return e.pipe(r)};var m=function(){var e=Array.prototype.slice.call(arguments);var r=c(e[e.length-1]||i)&&e.pop()||i;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var t;var o=e.map(function(s,n){var i=n0;return p(s,i,a,function(e){if(!t)t=e;if(e)o.forEach(f);if(i)return;o.forEach(f);r(t)})});return e.reduce(d)};e.exports=m},454:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=_interopDefault(t(413));var s=_interopDefault(t(605));var n=_interopDefault(t(835));var i=_interopDefault(t(211));var a=_interopDefault(t(761));const c=o.Readable;const u=Symbol("buffer");const l=Symbol("type");class Blob{constructor(){this[l]="";const e=arguments[0];const r=arguments[1];const t=[];let o=0;if(e){const r=e;const s=Number(r.length);for(let e=0;e1&&arguments[1]!==undefined?arguments[1]:{},s=t.size;let n=s===undefined?0:s;var i=t.timeout;let a=i===undefined?0:i;if(e==null){e=null}else if(isURLSearchParams(e)){e=Buffer.from(e.toString())}else if(isBlob(e));else if(Buffer.isBuffer(e));else if(Object.prototype.toString.call(e)==="[object ArrayBuffer]"){e=Buffer.from(e)}else if(ArrayBuffer.isView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof o);else{e=Buffer.from(String(e))}this[f]={body:e,disturbed:false,error:null};this.size=n;this.timeout=a;if(e instanceof o){e.on("error",function(e){const t=e.name==="AbortError"?e:new FetchError(`Invalid response body while trying to fetch ${r.url}: ${e.message}`,"system",e);r[f].error=t})}}Body.prototype={get body(){return this[f].body},get bodyUsed(){return this[f].disturbed},arrayBuffer(){return consumeBody.call(this).then(function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)})},blob(){let e=this.headers&&this.headers.get("content-type")||"";return consumeBody.call(this).then(function(r){return Object.assign(new Blob([],{type:e.toLowerCase()}),{[u]:r})})},json(){var e=this;return consumeBody.call(this).then(function(r){try{return JSON.parse(r.toString())}catch(r){return Body.Promise.reject(new FetchError(`invalid json response body at ${e.url} reason: ${r.message}`,"invalid-json"))}})},text(){return consumeBody.call(this).then(function(e){return e.toString()})},buffer(){return consumeBody.call(this)},textConverted(){var e=this;return consumeBody.call(this).then(function(r){return convertBody(r,e.headers)})}};Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});Body.mixIn=function(e){for(const r of Object.getOwnPropertyNames(Body.prototype)){if(!(r in e)){const t=Object.getOwnPropertyDescriptor(Body.prototype,r);Object.defineProperty(e,r,t)}}};function consumeBody(){var e=this;if(this[f].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[f].disturbed=true;if(this[f].error){return Body.Promise.reject(this[f].error)}let r=this.body;if(r===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(r)){r=r.stream()}if(Buffer.isBuffer(r)){return Body.Promise.resolve(r)}if(!(r instanceof o)){return Body.Promise.resolve(Buffer.alloc(0))}let t=[];let s=0;let n=false;return new Body.Promise(function(o,i){let a;if(e.timeout){a=setTimeout(function(){n=true;i(new FetchError(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))},e.timeout)}r.on("error",function(r){if(r.name==="AbortError"){n=true;i(r)}else{i(new FetchError(`Invalid response body while trying to fetch ${e.url}: ${r.message}`,"system",r))}});r.on("data",function(r){if(n||r===null){return}if(e.size&&s+r.length>e.size){n=true;i(new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}s+=r.length;t.push(r)});r.on("end",function(){if(n){return}clearTimeout(a);try{o(Buffer.concat(t,s))}catch(r){i(new FetchError(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r))}})})}function convertBody(e,r){if(typeof p!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const t=r.get("content-type");let o="utf-8";let s,n;if(t){s=/charset=([^;]*)/i.exec(t)}n=e.slice(0,1024).toString();if(!s&&n){s=/0&&arguments[0]!==undefined?arguments[0]:undefined;this[g]=Object.create(null);if(e instanceof Headers){const r=e.raw();const t=Object.keys(r);for(const e of t){for(const t of r[e]){this.append(e,t)}}return}if(e==null);else if(typeof e==="object"){const r=e[Symbol.iterator];if(r!=null){if(typeof r!=="function"){throw new TypeError("Header pairs must be iterable")}const t=[];for(const r of e){if(typeof r!=="object"||typeof r[Symbol.iterator]!=="function"){throw new TypeError("Each header pair must be iterable")}t.push(Array.from(r))}for(const e of t){if(e.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}this.append(e[0],e[1])}}else{for(const r of Object.keys(e)){const t=e[r];this.append(r,t)}}}else{throw new TypeError("Provided initializer must be an object")}}get(e){e=`${e}`;validateName(e);const r=find(this[g],e);if(r===undefined){return null}return this[g][r].join(", ")}forEach(e){let r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined;let t=getHeaders(this);let o=0;while(o1&&arguments[1]!==undefined?arguments[1]:"key+value";const t=Object.keys(e[g]).sort();return t.map(r==="key"?function(e){return e.toLowerCase()}:r==="value"?function(r){return e[g][r].join(", ")}:function(r){return[r.toLowerCase(),e[g][r].join(", ")]})}const w=Symbol("internal");function createHeadersIterator(e,r){const t=Object.create(T);t[w]={target:e,kind:r,index:0};return t}const T=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==T){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[w];const r=e.target,t=e.kind,o=e.index;const s=getHeaders(r,t);const n=s.length;if(o>=n){return{value:undefined,done:true}}this[w].index=o+1;return{value:s[o],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(T,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const r=Object.assign({__proto__:null},e[g]);const t=find(e[g],"Host");if(t!==undefined){r[t]=r[t][0]}return r}function createHeadersLenient(e){const r=new Headers;for(const t of Object.keys(e)){if(m.test(t)){continue}if(Array.isArray(e[t])){for(const o of e[t]){if(h.test(o)){continue}if(r[g][t]===undefined){r[g][t]=[o]}else{r[g][t].push(o)}}}else if(!h.test(e[t])){r[g][t]=[e[t]]}}return r}const b=Symbol("Response internals");const v=s.STATUS_CODES;class Response{constructor(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Body.call(this,e,r);const t=r.status||200;const o=new Headers(r.headers);if(e!=null&&!o.has("Content-Type")){const r=extractContentType(e);if(r){o.append("Content-Type",r)}}this[b]={url:r.url,status:t,statusText:r.statusText||v[t],headers:o,counter:r.counter}}get url(){return this[b].url||""}get status(){return this[b].status}get ok(){return this[b].status>=200&&this[b].status<300}get redirected(){return this[b].counter>0}get statusText(){return this[b].statusText}get headers(){return this[b].headers}clone(){return new Response(clone(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Body.mixIn(Response.prototype);Object.defineProperties(Response.prototype,{url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});Object.defineProperty(Response.prototype,Symbol.toStringTag,{value:"Response",writable:false,enumerable:false,configurable:true});const E=Symbol("Request internals");const y=n.parse;const _=n.format;const S="destroy"in o.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[E]==="object"}function isAbortSignal(e){const r=e&&typeof e==="object"&&Object.getPrototypeOf(e);return!!(r&&r.constructor.name==="AbortSignal")}class Request{constructor(e){let r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let t;if(!isRequest(e)){if(e&&e.href){t=y(e.href)}else{t=y(`${e}`)}e={}}else{t=y(e.url)}let o=r.method||e.method||"GET";o=o.toUpperCase();if((r.body!=null||isRequest(e)&&e.body!==null)&&(o==="GET"||o==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}let s=r.body!=null?r.body:isRequest(e)&&e.body!==null?clone(e):null;Body.call(this,s,{timeout:r.timeout||e.timeout||0,size:r.size||e.size||0});const n=new Headers(r.headers||e.headers||{});if(s!=null&&!n.has("Content-Type")){const e=extractContentType(s);if(e){n.append("Content-Type",e)}}let i=isRequest(e)?e.signal:null;if("signal"in r)i=r.signal;if(i!=null&&!isAbortSignal(i)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[E]={method:o,redirect:r.redirect||e.redirect||"follow",headers:n,parsedURL:t,signal:i};this.follow=r.follow!==undefined?r.follow:e.follow!==undefined?e.follow:20;this.compress=r.compress!==undefined?r.compress:e.compress!==undefined?e.compress:true;this.counter=r.counter||e.counter||0;this.agent=r.agent||e.agent}get method(){return this[E].method}get url(){return _(this[E].parsedURL)}get headers(){return this[E].headers}get redirect(){return this[E].redirect}get signal(){return this[E].signal}clone(){return new Request(this)}}Body.mixIn(Request.prototype);Object.defineProperty(Request.prototype,Symbol.toStringTag,{value:"Request",writable:false,enumerable:false,configurable:true});Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true}});function getNodeRequestOptions(e){const r=e[E].parsedURL;const t=new Headers(e[E].headers);if(!t.has("Accept")){t.set("Accept","*/*")}if(!r.protocol||!r.hostname){throw new TypeError("Only absolute URLs are supported")}if(!/^https?:$/.test(r.protocol)){throw new TypeError("Only HTTP(S) protocols are supported")}if(e.signal&&e.body instanceof o.Readable&&!S){throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8")}let s=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)){s="0"}if(e.body!=null){const r=getTotalBytes(e);if(typeof r==="number"){s=String(r)}}if(s){t.set("Content-Length",s)}if(!t.has("User-Agent")){t.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)")}if(e.compress&&!t.has("Accept-Encoding")){t.set("Accept-Encoding","gzip,deflate")}let n=e.agent;if(typeof n==="function"){n=n(r)}if(!t.has("Connection")&&!n){t.set("Connection","close")}return Object.assign({},r,{method:e.method,headers:exportNodeCompatibleHeaders(t),agent:n})}function AbortError(e){Error.call(this,e);this.type="aborted";this.message=e;Error.captureStackTrace(this,this.constructor)}AbortError.prototype=Object.create(Error.prototype);AbortError.prototype.constructor=AbortError;AbortError.prototype.name="AbortError";const P=o.PassThrough;const O=n.resolve;function fetch(e,r){if(!fetch.Promise){throw new Error("native promise missing, set fetch.Promise to your favorite alternative")}Body.Promise=fetch.Promise;return new fetch.Promise(function(t,n){const c=new Request(e,r);const u=getNodeRequestOptions(c);const l=(u.protocol==="https:"?i:s).request;const p=c.signal;let f=null;const d=function abort(){let e=new AbortError("The user aborted a request.");n(e);if(c.body&&c.body instanceof o.Readable){c.body.destroy(e)}if(!f||!f.body)return;f.body.emit("error",e)};if(p&&p.aborted){d();return}const m=function abortAndFinalize(){d();finalize()};const h=l(u);let g;if(p){p.addEventListener("abort",m)}function finalize(){h.abort();if(p)p.removeEventListener("abort",m);clearTimeout(g)}if(c.timeout){h.once("socket",function(e){g=setTimeout(function(){n(new FetchError(`network timeout at: ${c.url}`,"request-timeout"));finalize()},c.timeout)})}h.on("error",function(e){n(new FetchError(`request to ${c.url} failed, reason: ${e.message}`,"system",e));finalize()});h.on("response",function(e){clearTimeout(g);const r=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const o=r.get("Location");const s=o===null?null:O(c.url,o);switch(c.redirect){case"error":n(new FetchError(`redirect mode is set to error: ${c.url}`,"no-redirect"));finalize();return;case"manual":if(s!==null){try{r.set("Location",s)}catch(e){n(e)}}break;case"follow":if(s===null){break}if(c.counter>=c.follow){n(new FetchError(`maximum redirect reached at: ${c.url}`,"max-redirect"));finalize();return}const o={headers:new Headers(c.headers),follow:c.follow,counter:c.counter+1,agent:c.agent,compress:c.compress,method:c.method,body:c.body,signal:c.signal,timeout:c.timeout};if(e.statusCode!==303&&c.body&&getTotalBytes(c)===null){n(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&c.method==="POST"){o.method="GET";o.body=undefined;o.headers.delete("content-length")}t(fetch(new Request(s,o)));finalize();return}}e.once("end",function(){if(p)p.removeEventListener("abort",m)});let o=e.pipe(new P);const s={url:c.url,status:e.statusCode,statusText:e.statusMessage,headers:r,size:c.size,timeout:c.timeout,counter:c.counter};const i=r.get("Content-Encoding");if(!c.compress||c.method==="HEAD"||i===null||e.statusCode===204||e.statusCode===304){f=new Response(o,s);t(f);return}const u={flush:a.Z_SYNC_FLUSH,finishFlush:a.Z_SYNC_FLUSH};if(i=="gzip"||i=="x-gzip"){o=o.pipe(a.createGunzip(u));f=new Response(o,s);t(f);return}if(i=="deflate"||i=="x-deflate"){const r=e.pipe(new P);r.once("data",function(e){if((e[0]&15)===8){o=o.pipe(a.createInflate())}else{o=o.pipe(a.createInflateRaw())}f=new Response(o,s);t(f)});return}if(i=="br"&&typeof a.createBrotliDecompress==="function"){o=o.pipe(a.createBrotliDecompress());f=new Response(o,s);t(f);return}f=new Response(o,s);t(f)});writeToStream(h,c)})}fetch.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};fetch.Promise=global.Promise;e.exports=r=fetch;Object.defineProperty(r,"__esModule",{value:true});r.default=r;r.Headers=Headers;r.Request=Request;r.Response=Response;r.FetchError=FetchError},462:function(e){"use strict";const r=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(r,"^$1");return e}function escapeArgument(e,t){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(r,"^$1");if(t){e=e.replace(r,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},463:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=t(692);var s=_interopDefault(t(969));const n=s(e=>console.warn(e));class RequestError extends Error{constructor(e,r,t){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.status=r;Object.defineProperty(this,"code",{get(){n(new o.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return r}});this.headers=t.headers||{};const s=Object.assign({},t.request);if(t.request.headers.authorization){s.headers=Object.assign({},t.request.headers,{authorization:t.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}s.url=s.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=s}}r.RequestError=RequestError},489:function(e,r,t){"use strict";const o=t(622);const s=t(814);const n=t(39)();function resolveCommandAttempt(e,r){const t=process.cwd();const i=e.options.cwd!=null;if(i){try{process.chdir(e.options.cwd)}catch(e){}}let a;try{a=s.sync(e.command,{path:(e.options.env||process.env)[n],pathExt:r?o.delimiter:undefined})}catch(e){}finally{process.chdir(t)}if(a){a=o.resolve(i?e.options.cwd:"",a)}return a}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},510:function(e){e.exports=addHook;function addHook(e,r,t,o){var s=o;if(!e.registry[t]){e.registry[t]=[]}if(r==="before"){o=function(e,r){return Promise.resolve().then(s.bind(null,r)).then(e.bind(null,r))}}if(r==="after"){o=function(e,r){var t;return Promise.resolve().then(e.bind(null,r)).then(function(e){t=e;return s(t,r)}).then(function(){return t})}}if(r==="error"){o=function(e,r){return Promise.resolve().then(e.bind(null,r)).catch(function(e){return s(e,r)})}}e.registry[t].push({hook:o,orig:s})}},523:function(e,r,t){var o=t(363);var s=t(510);var n=t(763);var i=Function.bind;var a=i.bind(i);function bindApi(e,r,t){var o=a(n,null).apply(null,t?[r,t]:[r]);e.api={remove:o};e.remove=o;["before","error","after","wrap"].forEach(function(o){var n=t?[r,o,t]:[r,o];e[o]=e.api[o]=a(s,null).apply(null,n)})}function HookSingular(){var e="h";var r={registry:{}};var t=o.bind(null,r,e);bindApi(t,r,e);return t}function HookCollection(){var e={registry:{}};var r=o.bind(null,e);bindApi(r,e);return r}var c=false;function Hook(){if(!c){console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');c=true}return HookCollection()}Hook.Singular=HookSingular.bind();Hook.Collection=HookCollection.bind();e.exports=Hook;e.exports.Hook=Hook;e.exports.Singular=Hook.Singular;e.exports.Collection=Hook.Collection},568:function(e,r,t){"use strict";const o=t(622);const s=t(948);const n=t(489);const i=t(462);const a=t(389);const c=t(280);const u=process.platform==="win32";const l=/\.(?:com|exe)$/i;const p=/node_modules[\\\/].bin[\\\/][^\\\/]+\.cmd$/i;const f=s(()=>c.satisfies(process.version,"^4.8.0 || ^5.7.0 || >= 6.0.0",true))||false;function detectShebang(e){e.file=n(e);const r=e.file&&a(e.file);if(r){e.args.unshift(e.file);e.command=r;return n(e)}return e.file}function parseNonShell(e){if(!u){return e}const r=detectShebang(e);const t=!l.test(r);if(e.options.forceShell||t){const t=p.test(r);e.command=o.normalize(e.command);e.command=i.command(e.command);e.args=e.args.map(e=>i.argument(e,t));const s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parseShell(e){if(f){return e}const r=[e.command].concat(e.args).join(" ");if(u){e.command=typeof e.options.shell==="string"?e.options.shell:process.env.comspec||"cmd.exe";e.args=["/d","/s","/c",`"${r}"`];e.options.windowsVerbatimArguments=true}else{if(typeof e.options.shell==="string"){e.command=e.options.shell}else if(process.platform==="android"){e.command="/system/bin/sh"}else{e.command="/bin/sh"}e.args=["-c",r]}return e}function parse(e,r,t){if(r&&!Array.isArray(r)){t=r;r=null}r=r?r.slice(0):[];t=Object.assign({},t);const o={command:e,args:r,options:t,file:undefined,original:{command:e,args:r}};return t.shell?parseShell(o):parseNonShell(o)}e.exports=parse},605:function(e){e.exports=require("http")},614:function(e){e.exports=require("events")},621:function(e,r,t){"use strict";const o=t(622);const s=t(39);e.exports=(e=>{e=Object.assign({cwd:process.cwd(),path:process.env[s()]},e);let r;let t=o.resolve(e.cwd);const n=[];while(r!==t){n.push(o.join(t,"node_modules/.bin"));r=t;t=o.resolve(t,"..")}n.push(o.dirname(process.execPath));return n.concat(e.path).join(o.delimiter)});e.exports.env=(r=>{r=Object.assign({env:process.env},r);const t=Object.assign({},r.env);const o=s({env:t});r.path=t[o];t[o]=e.exports(r);return t})},622:function(e){e.exports=require("path")},654:function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},669:function(e){e.exports=require("util")},676:function(e,r,t){const{Octokit:o}=t(889);const{env:s}=t(765);const n=s.GITHUB_TOKEN;const[i,a]=s.GITHUB_REPOSITORY.split("/");const c=new o({auth:n});c.repos.getLatestRelease({owner:i,repo:a}).then(e=>{if(!e.data){console.error("💡 No latest release found, skip delete.");return}const r=e.data.id;c.repos.deleteRelease({owner:i,repo:a,release_id:r})}).catch(e=>{if(e.status===404){console.error("💡 No latest release found, skip delete.");return}console.error("❌ Can't get latest Release");console.error(e)})},692:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});class Deprecation extends Error{constructor(e){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="Deprecation"}}r.Deprecation=Deprecation},696:function(e){"use strict";function isObject(e){return e!=null&&typeof e==="object"&&Array.isArray(e)===false}function isObjectObject(e){return isObject(e)===true&&Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var r,t;if(isObjectObject(e)===false)return false;r=e.constructor;if(typeof r!=="function")return false;t=r.prototype;if(isObjectObject(t)===false)return false;if(t.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},697:function(e){"use strict";e.exports=((e,r)=>{r=r||(()=>{});return e.then(e=>new Promise(e=>{e(r())}).then(()=>e),e=>new Promise(e=>{e(r())}).then(()=>{throw e}))})},742:function(e,r,t){var o=t(747);var s;if(process.platform==="win32"||global.TESTING_WINDOWS){s=t(818)}else{s=t(197)}e.exports=isexe;isexe.sync=sync;function isexe(e,r,t){if(typeof r==="function"){t=r;r={}}if(!t){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise(function(t,o){isexe(e,r||{},function(e,r){if(e){o(e)}else{t(r)}})})}s(e,r||{},function(e,o){if(e){if(e.code==="EACCES"||r&&r.ignoreErrors){e=null;o=false}}t(e,o)})}function sync(e,r){try{return s.sync(e,r||{})}catch(e){if(r&&r.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},747:function(e){e.exports=require("fs")},753:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=t(385);var s=t(796);var n=_interopDefault(t(696));var i=_interopDefault(t(454));var a=t(463);const c="5.3.2";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){if(n(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let r={};let t;let o;const s=e.request&&e.request.fetch||i;return s(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then(s=>{o=s.url;t=s.status;for(const e of s.headers){r[e[0]]=e[1]}if(t===204||t===205){return}if(e.method==="HEAD"){if(t<400){return}throw new a.RequestError(s.statusText,t,{headers:r,request:e})}if(t===304){throw new a.RequestError("Not modified",t,{headers:r,request:e})}if(t>=400){return s.text().then(o=>{const s=new a.RequestError(o,t,{headers:r,request:e});try{let e=JSON.parse(s.message);Object.assign(s,e);let r=e.errors;s.message=s.message+": "+r.map(JSON.stringify).join(", ")}catch(e){}throw s})}const n=s.headers.get("content-type");if(/application\/json/.test(n)){return s.json()}if(!n||/^text\/|charset=utf-8$/.test(n)){return s.text()}return getBufferResponse(s)}).then(e=>{return{status:t,url:o,headers:r,data:e}}).catch(t=>{if(t instanceof a.RequestError){throw t}throw new a.RequestError(t.message,500,{headers:r,request:e})})}function withDefaults(e,r){const t=e.defaults(r);const o=function(e,r){const o=t.merge(e,r);if(!o.request||!o.request.hook){return fetchWrapper(t.parse(o))}const s=(e,r)=>{return fetchWrapper(t.parse(t.merge(e,r)))};Object.assign(s,{endpoint:t,defaults:withDefaults.bind(null,t)});return o.request.hook(s,o)};return Object.assign(o,{endpoint:t,defaults:withDefaults.bind(null,t)})}const u=withDefaults(o.endpoint,{headers:{"user-agent":`octokit-request.js/${c} ${s.getUserAgent()}`}});r.request=u},761:function(e){e.exports=require("zlib")},763:function(e){e.exports=removeHook;function removeHook(e,r,t){if(!e.registry[r]){return}var o=e.registry[r].map(function(e){return e.orig}).indexOf(t);if(o===-1){return}e.registry[r].splice(o,1)}},765:function(e){e.exports=require("process")},768:function(e){"use strict";e.exports=function(e){var r=typeof e==="string"?"\n":"\n".charCodeAt();var t=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===r){e=e.slice(0,e.length-1)}if(e[e.length-1]===t){e=e.slice(0,e.length-1)}return e}},796:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=_interopDefault(t(2));function getUserAgent(){try{return`Node.js/${process.version.substr(1)} (${o()}; ${process.arch})`}catch(e){if(/wmic os get Caption/.test(e.message)){return"Windows "}return""}}r.getUserAgent=getUserAgent},813:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});async function auth(e){const r=e.split(/\./).length===3?"app":/^v\d+\./.test(e)?"installation":"oauth";return{type:"token",token:e,tokenType:r}}function withAuthorizationPrefix(e){if(e.split(/\./).length===3){return`bearer ${e}`}return`token ${e}`}async function hook(e,r,t,o){const s=r.endpoint.merge(t,o);s.headers.authorization=withAuthorizationPrefix(e);return r(s)}const t=function createTokenAuth(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")}e=e.replace(/^(token|bearer) +/i,"");return Object.assign(auth.bind(null,e),{hook:hook.bind(null,e)})};r.createTokenAuth=t},814:function(e,r,t){e.exports=which;which.sync=whichSync;var o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var s=t(622);var n=o?";":":";var i=t(742);function getNotFoundError(e){var r=new Error("not found: "+e);r.code="ENOENT";return r}function getPathInfo(e,r){var t=r.colon||n;var s=r.path||process.env.PATH||"";var i=[""];s=s.split(t);var a="";if(o){s.unshift(process.cwd());a=r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";i=a.split(t);if(e.indexOf(".")!==-1&&i[0]!=="")i.unshift("")}if(e.match(/\//)||o&&e.match(/\\/))s=[""];return{env:s,ext:i,extExe:a}}function which(e,r,t){if(typeof r==="function"){t=r;r={}}var o=getPathInfo(e,r);var n=o.env;var a=o.ext;var c=o.extExe;var u=[];(function F(o,l){if(o===l){if(r.all&&u.length)return t(null,u);else return t(getNotFoundError(e))}var p=n[o];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var f=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){f=e.slice(0,2)+f}(function E(e,s){if(e===s)return F(o+1,l);var n=a[e];i(f+n,{pathExt:c},function(o,i){if(!o&&i){if(r.all)u.push(f+n);else return t(null,f+n)}return E(e+1,s)})})(0,a.length)})(0,n.length)}function whichSync(e,r){r=r||{};var t=getPathInfo(e,r);var o=t.env;var n=t.ext;var a=t.extExe;var c=[];for(var u=0,l=o.length;u"}throw e}}r.getUserAgent=getUserAgent},866:function(e,r,t){"use strict";var o=t(816);e.exports=function(e){var r=e.match(o);if(!r){return null}var t=r[0].replace(/#! ?/,"").split(" ");var s=t[0].split("/").pop();var n=t[1];return s==="env"?n:s+(n?" "+n:"")}},881:function(e){"use strict";const r=process.platform==="win32";function notFoundError(e,r){return Object.assign(new Error(`${r} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,t){if(!r){return}const o=e.emit;e.emit=function(r,s){if(r==="exit"){const r=verifyENOENT(s,t,"spawn");if(r){return o.call(e,"error",r)}}return o.apply(e,arguments)}}function verifyENOENT(e,t){if(r&&e===1&&!t.file){return notFoundError(t.original,"spawn")}return null}function verifyENOENTSync(e,t){if(r&&e===1&&!t.file){return notFoundError(t.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},889:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var o=t(448);var s=t(916);var n=t(299);var i=t(842);const a="17.0.0";const c=o.Octokit.plugin(s.requestLog).plugin([n.paginateRest,i.restEndpointMethods]).defaults({userAgent:`octokit-rest.js/${a}`});r.Octokit=c},898:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var o=t(753);var s=t(862);const n="4.3.1";class GraphqlError extends Error{constructor(e,r){const t=r.data.errors[0].message;super(t);Object.assign(this,r.data);this.name="GraphqlError";this.request=e;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}const i=["method","baseUrl","url","headers","request","query"];function graphql(e,r,t){t=typeof r==="string"?t=Object.assign({query:r},t):t=r;const o=Object.keys(t).reduce((e,r)=>{if(i.includes(r)){e[r]=t[r];return e}if(!e.variables){e.variables={}}e.variables[r]=t[r];return e},{});return e(o).then(e=>{if(e.data.errors){throw new GraphqlError(o,{data:e.data})}return e.data.data})}function withDefaults(e,r){const t=e.defaults(r);const s=(e,r)=>{return graphql(t,e,r)};return Object.assign(s,{defaults:withDefaults.bind(null,t),endpoint:o.request.endpoint})}const a=withDefaults(o.request,{headers:{"user-agent":`octokit-graphql.js/${n} ${s.getUserAgent()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults(e,{method:"POST",url:"/graphql"})}r.graphql=a;r.withCustomRequest=withCustomRequest},916:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});const t="1.0.0";function requestLog(e){e.hook.wrap("request",(r,t)=>{e.log.debug("request",t);const o=Date.now();const s=e.request.endpoint.parse(t);const n=s.url.replace(t.baseUrl,"");return r(t).then(r=>{e.log.info(`${s.method} ${n} - ${r.status} in ${Date.now()-o}ms`);return r}).catch(r=>{e.log.info(`${s.method} ${n} - ${r.status} in ${Date.now()-o}ms`);throw r})})}requestLog.VERSION=t;r.requestLog=requestLog},948:function(e){"use strict";e.exports=function(e){try{return e()}catch(e){}}},955:function(e,r,t){"use strict";const o=t(622);const s=t(129);const n=t(20);const i=t(768);const a=t(621);const c=t(323);const u=t(145);const l=t(697);const p=t(260);const f=t(427);const d=t(168);const m=1e3*1e3*10;function handleArgs(e,r,t){let s;t=Object.assign({extendEnv:true,env:{}},t);if(t.extendEnv){t.env=Object.assign({},process.env,t.env)}if(t.__winShell===true){delete t.__winShell;s={command:e,args:r,options:t,file:e,original:{cmd:e,args:r}}}else{s=n._parse(e,r,t)}t=Object.assign({maxBuffer:m,buffer:true,stripEof:true,preferLocal:true,localDir:s.options.cwd||process.cwd(),encoding:"utf8",reject:true,cleanup:true},s.options);t.stdio=d(t);if(t.preferLocal){t.env=a.env(Object.assign({},t,{cwd:t.localDir}))}if(t.detached){t.cleanup=false}if(process.platform==="win32"&&o.basename(s.command)==="cmd.exe"){s.args.unshift("/q")}return{cmd:s.command,args:s.args,opts:t,parsed:s}}function handleInput(e,r){if(r===null||r===undefined){return}if(c(r)){r.pipe(e.stdin)}else{e.stdin.end(r)}}function handleOutput(e,r){if(r&&e.stripEof){r=i(r)}return r}function handleShell(e,r,t){let o="/bin/sh";let s=["-c",r];t=Object.assign({},t);if(process.platform==="win32"){t.__winShell=true;o=process.env.comspec||"cmd.exe";s=["/s","/c",`"${r}"`];t.windowsVerbatimArguments=true}if(t.shell){o=t.shell;delete t.shell}return e(o,s,t)}function getStream(e,r,{encoding:t,buffer:o,maxBuffer:s}){if(!e[r]){return null}let n;if(!o){n=new Promise((t,o)=>{e[r].once("end",t).once("error",o)})}else if(t){n=u(e[r],{encoding:t,maxBuffer:s})}else{n=u.buffer(e[r],{maxBuffer:s})}return n.catch(e=>{e.stream=r;e.message=`${r} ${e.message}`;throw e})}function makeError(e,r){const{stdout:t,stderr:o}=e;let s=e.error;const{code:n,signal:i}=e;const{parsed:a,joinedCmd:c}=r;const u=r.timedOut||false;if(!s){let e="";if(Array.isArray(a.opts.stdio)){if(a.opts.stdio[2]!=="inherit"){e+=e.length>0?o:`\n${o}`}if(a.opts.stdio[1]!=="inherit"){e+=`\n${t}`}}else if(a.opts.stdio!=="inherit"){e=`\n${o}${t}`}s=new Error(`Command failed: ${c}${e}`);s.code=n<0?f(n):n}s.stdout=t;s.stderr=o;s.failed=true;s.signal=i||null;s.cmd=c;s.timedOut=u;return s}function joinCmd(e,r){let t=e;if(Array.isArray(r)&&r.length>0){t+=" "+r.join(" ")}return t}e.exports=((e,r,t)=>{const o=handleArgs(e,r,t);const{encoding:i,buffer:a,maxBuffer:c}=o.opts;const u=joinCmd(e,r);let f;try{f=s.spawn(o.cmd,o.args,o.opts)}catch(e){return Promise.reject(e)}let d;if(o.opts.cleanup){d=p(()=>{f.kill()})}let m=null;let h=false;const g=()=>{if(m){clearTimeout(m);m=null}if(d){d()}};if(o.opts.timeout>0){m=setTimeout(()=>{m=null;h=true;f.kill(o.opts.killSignal)},o.opts.timeout)}const w=new Promise(e=>{f.on("exit",(r,t)=>{g();e({code:r,signal:t})});f.on("error",r=>{g();e({error:r})});if(f.stdin){f.stdin.on("error",r=>{g();e({error:r})})}});function destroy(){if(f.stdout){f.stdout.destroy()}if(f.stderr){f.stderr.destroy()}}const T=()=>l(Promise.all([w,getStream(f,"stdout",{encoding:i,buffer:a,maxBuffer:c}),getStream(f,"stderr",{encoding:i,buffer:a,maxBuffer:c})]).then(e=>{const r=e[0];r.stdout=e[1];r.stderr=e[2];if(r.error||r.code!==0||r.signal!==null){const e=makeError(r,{joinedCmd:u,parsed:o,timedOut:h});e.killed=e.killed||f.killed;if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,r.stdout),stderr:handleOutput(o.opts,r.stderr),code:0,failed:false,killed:false,signal:null,cmd:u,timedOut:false}}),destroy);n._enoent.hookChildProcess(f,o.parsed);handleInput(f,o.opts.input);f.then=((e,r)=>T().then(e,r));f.catch=(e=>T().catch(e));return f});e.exports.stdout=((...r)=>e.exports(...r).then(e=>e.stdout));e.exports.stderr=((...r)=>e.exports(...r).then(e=>e.stderr));e.exports.shell=((r,t)=>handleShell(e.exports,r,t));e.exports.sync=((e,r,t)=>{const o=handleArgs(e,r,t);const n=joinCmd(e,r);if(c(o.opts.input)){throw new TypeError("The `input` option cannot be a stream in sync mode")}const i=s.spawnSync(o.cmd,o.args,o.opts);i.code=i.status;if(i.error||i.status!==0||i.signal!==null){const e=makeError(i,{joinedCmd:n,parsed:o});if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,i.stdout),stderr:handleOutput(o.opts,i.stderr),code:0,failed:false,signal:null,cmd:n,timedOut:false}});e.exports.shellSync=((r,t)=>handleShell(e.exports.sync,r,t))},966:function(e,r,t){"use strict";const{PassThrough:o}=t(413);e.exports=(e=>{e=Object.assign({},e);const{array:r}=e;let{encoding:t}=e;const s=t==="buffer";let n=false;if(r){n=!(t||s)}else{t=t||"utf8"}if(s){t=null}let i=0;const a=[];const c=new o({objectMode:n});if(t){c.setEncoding(t)}c.on("data",e=>{a.push(e);if(n){i=a.length}else{i+=e.length}});c.getBufferedValue=(()=>{if(r){return a}return s?Buffer.concat(a,i):a.join("")});c.getBufferedLength=(()=>i);return c})},969:function(e,r,t){var o=t(11);e.exports=o(once);e.exports.strict=o(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var r=function(){if(r.called)return r.value;r.called=true;return r.value=e.apply(this,arguments)};r.called=false;return r}function onceStrict(e){var r=function(){if(r.called)throw new Error(r.onceError);r.called=true;return r.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";r.onceError=t+" shouldn't be called more than once";r.called=false;return r}}}); \ No newline at end of file +module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var o=t[r]={i:r,l:false,exports:{}};e[r].call(o.exports,o,o.exports,__webpack_require__);o.l=true;return o.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(676)}return startup()}({2:function(e,r,t){"use strict";const o=t(87);const s=t(118);const n=t(49);const i=(e,r)=>{if(!e&&r){throw new Error("You can't specify a `release` without specifying `platform`")}e=e||o.platform();let t;if(e==="darwin"){if(!r&&o.platform()==="darwin"){r=o.release()}const e=r?Number(r.split(".")[0])>15?"macOS":"OS X":"macOS";t=r?s(r).name:"";return e+(t?" "+t:"")}if(e==="linux"){if(!r&&o.platform()==="linux"){r=o.release()}t=r?r.replace(/^(\d+\.\d+).*/,"$1"):"";return"Linux"+(t?" "+t:"")}if(e==="win32"){if(!r&&o.platform()==="win32"){r=o.release()}t=r?n(r):"";return"Windows"+(t?" "+t:"")}return e};e.exports=i},9:function(e,r,t){var o=t(969);var s=function(){};var n=function(e){return e.setHeader&&typeof e.abort==="function"};var i=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var a=function(e,r,t){if(typeof r==="function")return a(e,null,r);if(!r)r={};t=o(t||s);var c=e._writableState;var u=e._readableState;var l=r.readable||r.readable!==false&&e.readable;var p=r.writable||r.writable!==false&&e.writable;var f=false;var d=function(){if(!e.writable)m()};var m=function(){p=false;if(!l)t.call(e)};var h=function(){l=false;if(!p)t.call(e)};var g=function(r){t.call(e,r?new Error("exited with error code: "+r):null)};var w=function(r){t.call(e,r)};var T=function(){process.nextTick(b)};var b=function(){if(f)return;if(l&&!(u&&(u.ended&&!u.destroyed)))return t.call(e,new Error("premature close"));if(p&&!(c&&(c.ended&&!c.destroyed)))return t.call(e,new Error("premature close"))};var v=function(){e.req.on("finish",m)};if(n(e)){e.on("complete",m);e.on("abort",T);if(e.req)v();else e.on("request",v)}else if(p&&!c){e.on("end",d);e.on("close",d)}if(i(e))e.on("exit",g);e.on("end",h);e.on("finish",m);if(r.error!==false)e.on("error",w);e.on("close",T);return function(){f=true;e.removeListener("complete",m);e.removeListener("abort",T);e.removeListener("request",v);if(e.req)e.req.removeListener("finish",m);e.removeListener("end",d);e.removeListener("close",d);e.removeListener("finish",m);e.removeListener("exit",g);e.removeListener("end",h);e.removeListener("error",w);e.removeListener("close",T)}};e.exports=a},11:function(e){e.exports=wrappy;function wrappy(e,r){if(e&&r)return wrappy(e)(r);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(r){wrapper[r]=e[r]});return wrapper;function wrapper(){var r=new Array(arguments.length);for(var t=0;t{e=e||{};const r=e.env||process.env;const t=e.platform||process.platform;if(t!=="win32"){return"PATH"}return Object.keys(r).find(e=>e.toUpperCase()==="PATH")||"Path"})},49:function(e,r,t){"use strict";const o=t(87);const s=t(955);const n=new Map([["10.0","10"],["6.3","8.1"],["6.2","8"],["6.1","7"],["6.0","Vista"],["5.2","Server 2003"],["5.1","XP"],["5.0","2000"],["4.9","ME"],["4.1","98"],["4.0","95"]]);const i=e=>{const r=/\d+\.\d/.exec(e||o.release());if(e&&!r){throw new Error("`release` argument doesn't match `n.n`")}const t=(r||[])[0];if((!e||e===o.release())&&["6.1","6.2","6.3","10.0"].includes(t)){const e=s.sync("wmic",["os","get","Caption"]).stdout||"";const r=(e.match(/2008|2012|2016/)||[])[0];if(r){return`Server ${r}`}}return n.get(t)};e.exports=i},87:function(e){e.exports=require("os")},118:function(e,r,t){"use strict";const o=t(87);const s=new Map([[19,"Catalina"],[18,"Mojave"],[17,"High Sierra"],[16,"Sierra"],[15,"El Capitan"],[14,"Yosemite"],[13,"Mavericks"],[12,"Mountain Lion"],[11,"Lion"],[10,"Snow Leopard"],[9,"Leopard"],[8,"Tiger"],[7,"Panther"],[6,"Jaguar"],[5,"Puma"]]);const n=e=>{e=Number((e||o.release()).split(".")[0]);return{name:s.get(e),version:"10."+(e-4)}};e.exports=n;e.exports.default=n},129:function(e){e.exports=require("child_process")},145:function(e,r,t){"use strict";const o=t(453);const s=t(966);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}function getStream(e,r){if(!e){return Promise.reject(new Error("Expected a stream"))}r=Object.assign({maxBuffer:Infinity},r);const{maxBuffer:t}=r;let n;return new Promise((i,a)=>{const c=e=>{if(e){e.bufferedData=n.getBufferedValue()}a(e)};n=o(e,s(r),e=>{if(e){c(e);return}i()});n.on("data",()=>{if(n.getBufferedLength()>t){c(new MaxBufferError)}})}).then(()=>n.getBufferedValue())}e.exports=getStream;e.exports.buffer=((e,r)=>getStream(e,Object.assign({},r,{encoding:"buffer"})));e.exports.array=((e,r)=>getStream(e,Object.assign({},r,{array:true})));e.exports.MaxBufferError=MaxBufferError},168:function(e){"use strict";const r=["stdin","stdout","stderr"];const t=e=>r.some(r=>Boolean(e[r]));e.exports=(e=>{if(!e){return null}if(e.stdio&&t(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${r.map(e=>`\`${e}\``).join(", ")}`)}if(typeof e.stdio==="string"){return e.stdio}const o=e.stdio||[];if(!Array.isArray(o)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof o}\``)}const s=[];const n=Math.max(o.length,r.length);for(let t=0;t)?=?)";var P=c++;a[P]=a[l]+"|x|X|\\*";var O=c++;a[O]=a[u]+"|x|X|\\*";var k=c++;a[k]="[v=\\s]*("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:"+a[g]+")?"+a[b]+"?"+")?)?";var G=c++;a[G]="[v=\\s]*("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:"+a[w]+")?"+a[b]+"?"+")?)?";var R=c++;a[R]="^"+a[S]+"\\s*"+a[k]+"$";var x=c++;a[x]="^"+a[S]+"\\s*"+a[G]+"$";var j=c++;a[j]="(?:^|[^\\d])"+"(\\d{1,"+n+"})"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:$|[^\\d])";var C=c++;a[C]="(?:~>?)";var A=c++;a[A]="(\\s*)"+a[C]+"\\s+";i[A]=new RegExp(a[A],"g");var D="$1~";var q=c++;a[q]="^"+a[C]+a[k]+"$";var L=c++;a[L]="^"+a[C]+a[G]+"$";var U=c++;a[U]="(?:\\^)";var B=c++;a[B]="(\\s*)"+a[U]+"\\s+";i[B]=new RegExp(a[B],"g");var F="$1^";var I=c++;a[I]="^"+a[U]+a[k]+"$";var $=c++;a[$]="^"+a[U]+a[G]+"$";var H=c++;a[H]="^"+a[S]+"\\s*("+y+")$|^$";var M=c++;a[M]="^"+a[S]+"\\s*("+E+")$|^$";var N=c++;a[N]="(\\s*)"+a[S]+"\\s*("+y+"|"+a[k]+")";i[N]=new RegExp(a[N],"g");var V="$1$2$3";var z=c++;a[z]="^\\s*("+a[k]+")"+"\\s+-\\s+"+"("+a[k]+")"+"\\s*$";var W=c++;a[W]="^\\s*("+a[G]+")"+"\\s+-\\s+"+"("+a[G]+")"+"\\s*$";var X=c++;a[X]="(<|>)?=?\\s*\\*";for(var K=0;Ko){return null}var t=r.loose?i[_]:i[v];if(!t.test(e)){return null}try{return new SemVer(e,r)}catch(e){return null}}r.valid=valid;function valid(e,r){var t=parse(e,r);return t?t.version:null}r.clean=clean;function clean(e,r){var t=parse(e.trim().replace(/^[=v]+/,""),r);return t?t.version:null}r.SemVer=SemVer;function SemVer(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===r.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>o){throw new TypeError("version is longer than "+o+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,r)}t("SemVer",e,r);this.options=r;this.loose=!!r.loose;var n=e.trim().match(r.loose?i[_]:i[v]);if(!n){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var r=+e;if(r>=0&&r=0){if(typeof this.prerelease[t]==="number"){this.prerelease[t]++;t=-2}}if(t===-1){this.prerelease.push(0)}}if(r){if(this.prerelease[0]===r){if(isNaN(this.prerelease[1])){this.prerelease=[r,0]}}else{this.prerelease=[r,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};r.inc=inc;function inc(e,r,t,o){if(typeof t==="string"){o=t;t=undefined}try{return new SemVer(e,t).inc(r,o).version}catch(e){return null}}r.diff=diff;function diff(e,r){if(eq(e,r)){return null}else{var t=parse(e);var o=parse(r);var s="";if(t.prerelease.length||o.prerelease.length){s="pre";var n="prerelease"}for(var i in t){if(i==="major"||i==="minor"||i==="patch"){if(t[i]!==o[i]){return s+i}}}return n}}r.compareIdentifiers=compareIdentifiers;var Y=/^[0-9]+$/;function compareIdentifiers(e,r){var t=Y.test(e);var o=Y.test(r);if(t&&o){e=+e;r=+r}return e===r?0:t&&!o?-1:o&&!t?1:e0}r.lt=lt;function lt(e,r,t){return compare(e,r,t)<0}r.eq=eq;function eq(e,r,t){return compare(e,r,t)===0}r.neq=neq;function neq(e,r,t){return compare(e,r,t)!==0}r.gte=gte;function gte(e,r,t){return compare(e,r,t)>=0}r.lte=lte;function lte(e,r,t){return compare(e,r,t)<=0}r.cmp=cmp;function cmp(e,r,t,o){switch(r){case"===":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e===t;case"!==":if(typeof e==="object")e=e.version;if(typeof t==="object")t=t.version;return e!==t;case"":case"=":case"==":return eq(e,t,o);case"!=":return neq(e,t,o);case">":return gt(e,t,o);case">=":return gte(e,t,o);case"<":return lt(e,t,o);case"<=":return lte(e,t,o);default:throw new TypeError("Invalid operator: "+r)}}r.Comparator=Comparator;function Comparator(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!r.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,r)}t("comparator",e,r);this.options=r;this.loose=!!r.loose;this.parse(e);if(this.semver===Z){this.value=""}else{this.value=this.operator+this.semver.version}t("comp",this)}var Z={};Comparator.prototype.parse=function(e){var r=this.options.loose?i[H]:i[M];var t=e.match(r);if(!t){throw new TypeError("Invalid comparator: "+e)}this.operator=t[1];if(this.operator==="="){this.operator=""}if(!t[2]){this.semver=Z}else{this.semver=new SemVer(t[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){t("Comparator.test",e,this.options.loose);if(this.semver===Z){return true}if(typeof e==="string"){e=new SemVer(e,this.options)}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,r){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}var t;if(this.operator===""){t=new Range(e.value,r);return satisfies(this.value,t,r)}else if(e.operator===""){t=new Range(this.value,r);return satisfies(e.semver,t,r)}var o=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var n=this.semver.version===e.semver.version;var i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,r)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var c=cmp(this.semver,">",e.semver,r)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return o||s||n&&i||a||c};r.Range=Range;function Range(e,r){if(!r||typeof r!=="object"){r={loose:!!r,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease){return e}else{return new Range(e.raw,r)}}if(e instanceof Comparator){return new Range(e.value,r)}if(!(this instanceof Range)){return new Range(e,r)}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var r=this.options.loose;e=e.trim();var o=r?i[W]:i[z];e=e.replace(o,hyphenReplace);t("hyphen replace",e);e=e.replace(i[N],V);t("comparator trim",e,i[N]);e=e.replace(i[A],D);e=e.replace(i[B],F);e=e.split(/\s+/).join(" ");var s=r?i[H]:i[M];var n=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){n=n.filter(function(e){return!!e.match(s)})}n=n.map(function(e){return new Comparator(e,this.options)},this);return n};Range.prototype.intersects=function(e,r){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(t){return t.every(function(t){return e.set.some(function(e){return e.every(function(e){return t.intersects(e,r)})})})})};r.toComparators=toComparators;function toComparators(e,r){return new Range(e,r).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,r){t("comp",e,r);e=replaceCarets(e,r);t("caret",e);e=replaceTildes(e,r);t("tildes",e);e=replaceXRanges(e,r);t("xrange",e);e=replaceStars(e,r);t("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,r){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,r)}).join(" ")}function replaceTilde(e,r){var o=r.loose?i[L]:i[q];return e.replace(o,function(r,o,s,n,i){t("tilde",e,r,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else if(i){t("replaceTilde pr",i);a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}t("tilde return",a);return a})}function replaceCarets(e,r){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,r)}).join(" ")}function replaceCaret(e,r){t("caret",e,r);var o=r.loose?i[$]:i[I];return e.replace(o,function(r,o,s,n,i){t("caret",e,r,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){if(o==="0"){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+".0 <"+(+o+1)+".0.0"}}else if(i){t("replaceCaret pr",i);if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+(+o+1)+".0.0"}}else{t("no pr");if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+" <"+(+o+1)+".0.0"}}t("caret return",a);return a})}function replaceXRanges(e,r){t("replaceXRanges",e,r);return e.split(/\s+/).map(function(e){return replaceXRange(e,r)}).join(" ")}function replaceXRange(e,r){e=e.trim();var o=r.loose?i[x]:i[R];return e.replace(o,function(r,o,s,n,i,a){t("xRange",e,r,o,s,n,i,a);var c=isX(s);var u=c||isX(n);var l=u||isX(i);var p=l;if(o==="="&&p){o=""}if(c){if(o===">"||o==="<"){r="<0.0.0"}else{r="*"}}else if(o&&p){if(u){n=0}i=0;if(o===">"){o=">=";if(u){s=+s+1;n=0;i=0}else{n=+n+1;i=0}}else if(o==="<="){o="<";if(u){s=+s+1}else{n=+n+1}}r=o+s+"."+n+"."+i}else if(u){r=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(l){r=">="+s+"."+n+".0 <"+s+"."+(+n+1)+".0"}t("xRange return",r);return r})}function replaceStars(e,r){t("replaceStars",e,r);return e.trim().replace(i[X],"")}function hyphenReplace(e,r,t,o,s,n,i,a,c,u,l,p,f){if(isX(t)){r=""}else if(isX(o)){r=">="+t+".0.0"}else if(isX(s)){r=">="+t+"."+o+".0"}else{r=">="+r}if(isX(c)){a=""}else if(isX(u)){a="<"+(+c+1)+".0.0"}else if(isX(l)){a="<"+c+"."+(+u+1)+".0"}else if(p){a="<="+c+"."+u+"."+l+"-"+p}else{a="<="+a}return(r+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){e=new SemVer(e,this.options)}for(var r=0;r0){var n=e[s].semver;if(n.major===r.major&&n.minor===r.minor&&n.patch===r.patch){return true}}}return false}return true}r.satisfies=satisfies;function satisfies(e,r,t){try{r=new Range(r,t)}catch(e){return false}return r.test(e)}r.maxSatisfying=maxSatisfying;function maxSatisfying(e,r,t){var o=null;var s=null;try{var n=new Range(r,t)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===-1){o=e;s=new SemVer(o,t)}}});return o}r.minSatisfying=minSatisfying;function minSatisfying(e,r,t){var o=null;var s=null;try{var n=new Range(r,t)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===1){o=e;s=new SemVer(o,t)}}});return o}r.minVersion=minVersion;function minVersion(e,r){e=new Range(e,r);var t=new SemVer("0.0.0");if(e.test(t)){return t}t=new SemVer("0.0.0-0");if(e.test(t)){return t}t=null;for(var o=0;o":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!t||gt(t,r)){t=r}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(t&&e.test(t)){return t}return null}r.validRange=validRange;function validRange(e,r){try{return new Range(e,r).range||"*"}catch(e){return null}}r.ltr=ltr;function ltr(e,r,t){return outside(e,r,"<",t)}r.gtr=gtr;function gtr(e,r,t){return outside(e,r,">",t)}r.outside=outside;function outside(e,r,t,o){e=new SemVer(e,o);r=new Range(r,o);var s,n,i,a,c;switch(t){case">":s=gt;n=lte;i=lt;a=">";c=">=";break;case"<":s=lt;n=gte;i=gt;a="<";c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,r,o)){return false}for(var u=0;u=0.0.0")}p=p||e;f=f||e;if(s(e.semver,p.semver,o)){p=e}else if(i(e.semver,f.semver,o)){f=e}});if(p.operator===a||p.operator===c){return false}if((!f.operator||f.operator===a)&&n(e,f.semver)){return false}else if(f.operator===c&&i(e,f.semver)){return false}}return true}r.prerelease=prerelease;function prerelease(e,r){var t=parse(e,r);return t&&t.prerelease.length?t.prerelease:null}r.intersects=intersects;function intersects(e,r,t){e=new Range(e,t);r=new Range(r,t);return e.intersects(r)}r.coerce=coerce;function coerce(e){if(e instanceof SemVer){return e}if(typeof e!=="string"){return null}var r=e.match(i[j]);if(r==null){return null}return parse(r[1]+"."+(r[2]||"0")+"."+(r[3]||"0"))}},299:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});const t="2.0.2";function normalizePaginatedListResponse(e,r,t){const o="total_count"in t.data&&!("url"in t.data);if(!o)return;const s=t.data.incomplete_results;const n=t.data.repository_selection;const i=t.data.total_count;delete t.data.incomplete_results;delete t.data.repository_selection;delete t.data.total_count;const a=Object.keys(t.data)[0];const c=t.data[a];t.data=c;if(typeof s!=="undefined"){t.data.incomplete_results=s}if(typeof n!=="undefined"){t.data.repository_selection=n}t.data.total_count=i}function iterator(e,r,t){const o=e.request.endpoint(r,t);const s=o.method;const n=o.headers;let i=o.url;return{[Symbol.asyncIterator]:()=>({next(){if(!i){return Promise.resolve({done:true})}return e.request({method:s,url:i,headers:n}).then(r=>{normalizePaginatedListResponse(e,i,r);i=((r.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:r}})}})}}function paginate(e,r,t,o){if(typeof t==="function"){o=t;t=undefined}return gather(e,[],iterator(e,r,t)[Symbol.asyncIterator](),o)}function gather(e,r,t,o){return t.next().then(s=>{if(s.done){return r}let n=false;function done(){n=true}r=r.concat(o?o(s.value,done):s.value.data);if(n){return r}return gather(e,r,t,o)})}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=t;r.paginateRest=paginateRest},323:function(e){"use strict";var r=e.exports=function(e){return e!==null&&typeof e==="object"&&typeof e.pipe==="function"};r.writable=function(e){return r(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object"};r.readable=function(e){return r(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object"};r.duplex=function(e){return r.writable(e)&&r.readable(e)};r.transform=function(e){return r.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object"}},357:function(e){e.exports=require("assert")},363:function(e){e.exports=register;function register(e,r,t,o){if(typeof t!=="function"){throw new Error("method for before hook must be a function")}if(!o){o={}}if(Array.isArray(r)){return r.reverse().reduce(function(r,t){return register.bind(null,e,t,r,o)},t)()}return Promise.resolve().then(function(){if(!e.registry[r]){return t(o)}return e.registry[r].reduce(function(e,r){return r.hook.bind(null,e,o)},t)()})}},385:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=_interopDefault(t(696));var s=t(796);function lowercaseKeys(e){if(!e){return{}}return Object.keys(e).reduce((r,t)=>{r[t.toLowerCase()]=e[t];return r},{})}function mergeDeep(e,r){const t=Object.assign({},e);Object.keys(r).forEach(s=>{if(o(r[s])){if(!(s in e))Object.assign(t,{[s]:r[s]});else t[s]=mergeDeep(e[s],r[s])}else{Object.assign(t,{[s]:r[s]})}});return t}function merge(e,r,t){if(typeof r==="string"){let[e,o]=r.split(" ");t=Object.assign(o?{method:e,url:o}:{url:e},t)}else{t=Object.assign({},r)}t.headers=lowercaseKeys(t.headers);const o=mergeDeep(e||{},t);if(e&&e.mediaType.previews.length){o.mediaType.previews=e.mediaType.previews.filter(e=>!o.mediaType.previews.includes(e)).concat(o.mediaType.previews)}o.mediaType.previews=o.mediaType.previews.map(e=>e.replace(/-preview/,""));return o}function addQueryParameters(e,r){const t=/\?/.test(e)?"&":"?";const o=Object.keys(r);if(o.length===0){return e}return e+t+o.map(e=>{if(e==="q"){return"q="+r.q.split("+").map(encodeURIComponent).join("+")}return`${e}=${encodeURIComponent(r[e])}`}).join("&")}const n=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const r=e.match(n);if(!r){return[]}return r.map(removeNonChars).reduce((e,r)=>e.concat(r),[])}function omit(e,r){return Object.keys(e).filter(e=>!r.includes(e)).reduce((r,t)=>{r[t]=e[t];return r},{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){if(!/%[0-9A-Fa-f]/.test(e)){e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")}return e}).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function encodeValue(e,r,t){r=e==="+"||e==="#"?encodeReserved(r):encodeUnreserved(r);if(t){return encodeUnreserved(t)+"="+r}else{return r}}function isDefined(e){return e!==undefined&&e!==null}function isKeyOperator(e){return e===";"||e==="&"||e==="?"}function getValues(e,r,t,o){var s=e[t],n=[];if(isDefined(s)&&s!==""){if(typeof s==="string"||typeof s==="number"||typeof s==="boolean"){s=s.toString();if(o&&o!=="*"){s=s.substring(0,parseInt(o,10))}n.push(encodeValue(r,s,isKeyOperator(r)?t:""))}else{if(o==="*"){if(Array.isArray(s)){s.filter(isDefined).forEach(function(e){n.push(encodeValue(r,e,isKeyOperator(r)?t:""))})}else{Object.keys(s).forEach(function(e){if(isDefined(s[e])){n.push(encodeValue(r,s[e],e))}})}}else{const e=[];if(Array.isArray(s)){s.filter(isDefined).forEach(function(t){e.push(encodeValue(r,t))})}else{Object.keys(s).forEach(function(t){if(isDefined(s[t])){e.push(encodeUnreserved(t));e.push(encodeValue(r,s[t].toString()))}})}if(isKeyOperator(r)){n.push(encodeUnreserved(t)+"="+e.join(","))}else if(e.length!==0){n.push(e.join(","))}}}}else{if(r===";"){if(isDefined(s)){n.push(encodeUnreserved(t))}}else if(s===""&&(r==="&"||r==="?")){n.push(encodeUnreserved(t)+"=")}else if(s===""){n.push("")}}return n}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,r){var t=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(e,o,s){if(o){let e="";const s=[];if(t.indexOf(o.charAt(0))!==-1){e=o.charAt(0);o=o.substr(1)}o.split(/,/g).forEach(function(t){var o=/([^:\*]*)(?::(\d+)|(\*))?/.exec(t);s.push(getValues(r,e,o[1],o[2]||o[3]))});if(e&&e!=="+"){var n=",";if(e==="?"){n="&"}else if(e!=="#"){n=e}return(s.length!==0?e:"")+s.join(n)}else{return s.join(",")}}else{return encodeReserved(s)}})}function parse(e){let r=e.method.toUpperCase();let t=(e.url||"/").replace(/:([a-z]\w+)/g,"{+$1}");let o=Object.assign({},e.headers);let s;let n=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const i=extractUrlVariableNames(t);t=parseUrl(t).expand(n);if(!/^http/.test(t)){t=e.baseUrl+t}const a=Object.keys(e).filter(e=>i.includes(e)).concat("baseUrl");const c=omit(n,a);const u=/application\/octet-stream/i.test(o.accept);if(!u){if(e.mediaType.format){o.accept=o.accept.split(/,/).map(r=>r.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`)).join(",")}if(e.mediaType.previews.length){const r=o.accept.match(/[\w-]+(?=-preview)/g)||[];o.accept=r.concat(e.mediaType.previews).map(r=>{const t=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${r}-preview${t}`}).join(",")}}if(["GET","HEAD"].includes(r)){t=addQueryParameters(t,c)}else{if("data"in c){s=c.data}else{if(Object.keys(c).length){s=c}else{o["content-length"]=0}}}if(!o["content-type"]&&typeof s!=="undefined"){o["content-type"]="application/json; charset=utf-8"}if(["PATCH","PUT"].includes(r)&&typeof s==="undefined"){s=""}return Object.assign({method:r,url:t,headers:o},typeof s!=="undefined"?{body:s}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,r,t){return parse(merge(e,r,t))}function withDefaults(e,r){const t=merge(e,r);const o=endpointWithDefaults.bind(null,t);return Object.assign(o,{DEFAULTS:t,defaults:withDefaults.bind(null,t),merge:merge.bind(null,t),parse:parse})}const i="5.5.3";const a=`octokit-endpoint.js/${i} ${s.getUserAgent()}`;const c={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":a},mediaType:{format:"",previews:[]}};const u=withDefaults(null,c);r.endpoint=u},389:function(e,r,t){"use strict";const o=t(747);const s=t(866);function readShebang(e){const r=150;let t;if(Buffer.alloc){t=Buffer.alloc(r)}else{t=new Buffer(r);t.fill(0)}let n;try{n=o.openSync(e,"r");o.readSync(n,t,0,r,0);o.closeSync(n)}catch(e){}return s(t.toString())}e.exports=readShebang},413:function(e){e.exports=require("stream")},427:function(e,r,t){"use strict";const o=t(669);let s;if(typeof o.getSystemErrorName==="function"){e.exports=o.getSystemErrorName}else{try{s=process.binding("uv");if(typeof s.errname!=="function"){throw new TypeError("uv.errname is not a function")}}catch(e){console.error("execa/lib/errname: unable to establish process.binding('uv')",e);s=null}e.exports=(e=>errname(s,e))}e.exports.__test__=errname;function errname(e,r){if(e){return e.errname(r)}if(!(r<0)){throw new Error("err >= 0")}return`Unknown system error ${r}`}},448:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var o=t(796);var s=t(523);var n=t(753);var i=t(898);var a=t(813);const c="2.4.2";class Octokit{constructor(e={}){const r=new s.Collection;const t={baseUrl:n.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};t.headers["user-agent"]=[e.userAgent,`octokit-core.js/${c} ${o.getUserAgent()}`].filter(Boolean).join(" ");if(e.baseUrl){t.baseUrl=e.baseUrl}if(e.previews){t.mediaType.previews=e.previews}if(e.timeZone){t.headers["time-zone"]=e.timeZone}this.request=n.request.defaults(t);this.graphql=i.withCustomRequest(this.request).defaults(t);this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log);this.hook=r;if(!e.authStrategy){if(!e.auth){this.auth=(async()=>({type:"unauthenticated"}))}else{const t=a.createTokenAuth(e.auth);r.wrap("request",t.hook);this.auth=t}}else{const t=e.authStrategy(Object.assign({request:this.request},e.auth));r.wrap("request",t.hook);this.auth=t}const u=this.constructor;u.plugins.forEach(r=>{Object.assign(this,r(this,e))})}static defaults(e){const r=class extends(this){constructor(...r){const t=r[0]||{};super(Object.assign({},e,t,t.userAgent&&e.userAgent?{userAgent:`${t.userAgent} ${e.userAgent}`}:null))}};return r}static plugin(e){var r;const t=this.plugins;const o=Array.isArray(e)?e:[e];const s=(r=class extends(this){},r.plugins=t.concat(o.filter(e=>!t.includes(e))),r);return s}}Octokit.VERSION=c;Octokit.plugins=[];r.Octokit=Octokit},453:function(e,r,t){var o=t(969);var s=t(9);var n=t(747);var i=function(){};var a=/^v?\.0/.test(process.version);var c=function(e){return typeof e==="function"};var u=function(e){if(!a)return false;if(!n)return false;return(e instanceof(n.ReadStream||i)||e instanceof(n.WriteStream||i))&&c(e.close)};var l=function(e){return e.setHeader&&c(e.abort)};var p=function(e,r,t,n){n=o(n);var a=false;e.on("close",function(){a=true});s(e,{readable:r,writable:t},function(e){if(e)return n(e);a=true;n()});var p=false;return function(r){if(a)return;if(p)return;p=true;if(u(e))return e.close(i);if(l(e))return e.abort();if(c(e.destroy))return e.destroy();n(r||new Error("stream was destroyed"))}};var f=function(e){e()};var d=function(e,r){return e.pipe(r)};var m=function(){var e=Array.prototype.slice.call(arguments);var r=c(e[e.length-1]||i)&&e.pop()||i;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var t;var o=e.map(function(s,n){var i=n0;return p(s,i,a,function(e){if(!t)t=e;if(e)o.forEach(f);if(i)return;o.forEach(f);r(t)})});return e.reduce(d)};e.exports=m},454:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=_interopDefault(t(413));var s=_interopDefault(t(605));var n=_interopDefault(t(835));var i=_interopDefault(t(211));var a=_interopDefault(t(761));const c=o.Readable;const u=Symbol("buffer");const l=Symbol("type");class Blob{constructor(){this[l]="";const e=arguments[0];const r=arguments[1];const t=[];let o=0;if(e){const r=e;const s=Number(r.length);for(let e=0;e1&&arguments[1]!==undefined?arguments[1]:{},s=t.size;let n=s===undefined?0:s;var i=t.timeout;let a=i===undefined?0:i;if(e==null){e=null}else if(isURLSearchParams(e)){e=Buffer.from(e.toString())}else if(isBlob(e));else if(Buffer.isBuffer(e));else if(Object.prototype.toString.call(e)==="[object ArrayBuffer]"){e=Buffer.from(e)}else if(ArrayBuffer.isView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof o);else{e=Buffer.from(String(e))}this[f]={body:e,disturbed:false,error:null};this.size=n;this.timeout=a;if(e instanceof o){e.on("error",function(e){const t=e.name==="AbortError"?e:new FetchError(`Invalid response body while trying to fetch ${r.url}: ${e.message}`,"system",e);r[f].error=t})}}Body.prototype={get body(){return this[f].body},get bodyUsed(){return this[f].disturbed},arrayBuffer(){return consumeBody.call(this).then(function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)})},blob(){let e=this.headers&&this.headers.get("content-type")||"";return consumeBody.call(this).then(function(r){return Object.assign(new Blob([],{type:e.toLowerCase()}),{[u]:r})})},json(){var e=this;return consumeBody.call(this).then(function(r){try{return JSON.parse(r.toString())}catch(r){return Body.Promise.reject(new FetchError(`invalid json response body at ${e.url} reason: ${r.message}`,"invalid-json"))}})},text(){return consumeBody.call(this).then(function(e){return e.toString()})},buffer(){return consumeBody.call(this)},textConverted(){var e=this;return consumeBody.call(this).then(function(r){return convertBody(r,e.headers)})}};Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});Body.mixIn=function(e){for(const r of Object.getOwnPropertyNames(Body.prototype)){if(!(r in e)){const t=Object.getOwnPropertyDescriptor(Body.prototype,r);Object.defineProperty(e,r,t)}}};function consumeBody(){var e=this;if(this[f].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[f].disturbed=true;if(this[f].error){return Body.Promise.reject(this[f].error)}let r=this.body;if(r===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(r)){r=r.stream()}if(Buffer.isBuffer(r)){return Body.Promise.resolve(r)}if(!(r instanceof o)){return Body.Promise.resolve(Buffer.alloc(0))}let t=[];let s=0;let n=false;return new Body.Promise(function(o,i){let a;if(e.timeout){a=setTimeout(function(){n=true;i(new FetchError(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))},e.timeout)}r.on("error",function(r){if(r.name==="AbortError"){n=true;i(r)}else{i(new FetchError(`Invalid response body while trying to fetch ${e.url}: ${r.message}`,"system",r))}});r.on("data",function(r){if(n||r===null){return}if(e.size&&s+r.length>e.size){n=true;i(new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}s+=r.length;t.push(r)});r.on("end",function(){if(n){return}clearTimeout(a);try{o(Buffer.concat(t,s))}catch(r){i(new FetchError(`Could not create Buffer from response body for ${e.url}: ${r.message}`,"system",r))}})})}function convertBody(e,r){if(typeof p!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const t=r.get("content-type");let o="utf-8";let s,n;if(t){s=/charset=([^;]*)/i.exec(t)}n=e.slice(0,1024).toString();if(!s&&n){s=/0&&arguments[0]!==undefined?arguments[0]:undefined;this[g]=Object.create(null);if(e instanceof Headers){const r=e.raw();const t=Object.keys(r);for(const e of t){for(const t of r[e]){this.append(e,t)}}return}if(e==null);else if(typeof e==="object"){const r=e[Symbol.iterator];if(r!=null){if(typeof r!=="function"){throw new TypeError("Header pairs must be iterable")}const t=[];for(const r of e){if(typeof r!=="object"||typeof r[Symbol.iterator]!=="function"){throw new TypeError("Each header pair must be iterable")}t.push(Array.from(r))}for(const e of t){if(e.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}this.append(e[0],e[1])}}else{for(const r of Object.keys(e)){const t=e[r];this.append(r,t)}}}else{throw new TypeError("Provided initializer must be an object")}}get(e){e=`${e}`;validateName(e);const r=find(this[g],e);if(r===undefined){return null}return this[g][r].join(", ")}forEach(e){let r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined;let t=getHeaders(this);let o=0;while(o1&&arguments[1]!==undefined?arguments[1]:"key+value";const t=Object.keys(e[g]).sort();return t.map(r==="key"?function(e){return e.toLowerCase()}:r==="value"?function(r){return e[g][r].join(", ")}:function(r){return[r.toLowerCase(),e[g][r].join(", ")]})}const w=Symbol("internal");function createHeadersIterator(e,r){const t=Object.create(T);t[w]={target:e,kind:r,index:0};return t}const T=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==T){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[w];const r=e.target,t=e.kind,o=e.index;const s=getHeaders(r,t);const n=s.length;if(o>=n){return{value:undefined,done:true}}this[w].index=o+1;return{value:s[o],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(T,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const r=Object.assign({__proto__:null},e[g]);const t=find(e[g],"Host");if(t!==undefined){r[t]=r[t][0]}return r}function createHeadersLenient(e){const r=new Headers;for(const t of Object.keys(e)){if(m.test(t)){continue}if(Array.isArray(e[t])){for(const o of e[t]){if(h.test(o)){continue}if(r[g][t]===undefined){r[g][t]=[o]}else{r[g][t].push(o)}}}else if(!h.test(e[t])){r[g][t]=[e[t]]}}return r}const b=Symbol("Response internals");const v=s.STATUS_CODES;class Response{constructor(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Body.call(this,e,r);const t=r.status||200;const o=new Headers(r.headers);if(e!=null&&!o.has("Content-Type")){const r=extractContentType(e);if(r){o.append("Content-Type",r)}}this[b]={url:r.url,status:t,statusText:r.statusText||v[t],headers:o,counter:r.counter}}get url(){return this[b].url||""}get status(){return this[b].status}get ok(){return this[b].status>=200&&this[b].status<300}get redirected(){return this[b].counter>0}get statusText(){return this[b].statusText}get headers(){return this[b].headers}clone(){return new Response(clone(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Body.mixIn(Response.prototype);Object.defineProperties(Response.prototype,{url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});Object.defineProperty(Response.prototype,Symbol.toStringTag,{value:"Response",writable:false,enumerable:false,configurable:true});const E=Symbol("Request internals");const y=n.parse;const _=n.format;const S="destroy"in o.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[E]==="object"}function isAbortSignal(e){const r=e&&typeof e==="object"&&Object.getPrototypeOf(e);return!!(r&&r.constructor.name==="AbortSignal")}class Request{constructor(e){let r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let t;if(!isRequest(e)){if(e&&e.href){t=y(e.href)}else{t=y(`${e}`)}e={}}else{t=y(e.url)}let o=r.method||e.method||"GET";o=o.toUpperCase();if((r.body!=null||isRequest(e)&&e.body!==null)&&(o==="GET"||o==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}let s=r.body!=null?r.body:isRequest(e)&&e.body!==null?clone(e):null;Body.call(this,s,{timeout:r.timeout||e.timeout||0,size:r.size||e.size||0});const n=new Headers(r.headers||e.headers||{});if(s!=null&&!n.has("Content-Type")){const e=extractContentType(s);if(e){n.append("Content-Type",e)}}let i=isRequest(e)?e.signal:null;if("signal"in r)i=r.signal;if(i!=null&&!isAbortSignal(i)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[E]={method:o,redirect:r.redirect||e.redirect||"follow",headers:n,parsedURL:t,signal:i};this.follow=r.follow!==undefined?r.follow:e.follow!==undefined?e.follow:20;this.compress=r.compress!==undefined?r.compress:e.compress!==undefined?e.compress:true;this.counter=r.counter||e.counter||0;this.agent=r.agent||e.agent}get method(){return this[E].method}get url(){return _(this[E].parsedURL)}get headers(){return this[E].headers}get redirect(){return this[E].redirect}get signal(){return this[E].signal}clone(){return new Request(this)}}Body.mixIn(Request.prototype);Object.defineProperty(Request.prototype,Symbol.toStringTag,{value:"Request",writable:false,enumerable:false,configurable:true});Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true}});function getNodeRequestOptions(e){const r=e[E].parsedURL;const t=new Headers(e[E].headers);if(!t.has("Accept")){t.set("Accept","*/*")}if(!r.protocol||!r.hostname){throw new TypeError("Only absolute URLs are supported")}if(!/^https?:$/.test(r.protocol)){throw new TypeError("Only HTTP(S) protocols are supported")}if(e.signal&&e.body instanceof o.Readable&&!S){throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8")}let s=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)){s="0"}if(e.body!=null){const r=getTotalBytes(e);if(typeof r==="number"){s=String(r)}}if(s){t.set("Content-Length",s)}if(!t.has("User-Agent")){t.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)")}if(e.compress&&!t.has("Accept-Encoding")){t.set("Accept-Encoding","gzip,deflate")}let n=e.agent;if(typeof n==="function"){n=n(r)}if(!t.has("Connection")&&!n){t.set("Connection","close")}return Object.assign({},r,{method:e.method,headers:exportNodeCompatibleHeaders(t),agent:n})}function AbortError(e){Error.call(this,e);this.type="aborted";this.message=e;Error.captureStackTrace(this,this.constructor)}AbortError.prototype=Object.create(Error.prototype);AbortError.prototype.constructor=AbortError;AbortError.prototype.name="AbortError";const P=o.PassThrough;const O=n.resolve;function fetch(e,r){if(!fetch.Promise){throw new Error("native promise missing, set fetch.Promise to your favorite alternative")}Body.Promise=fetch.Promise;return new fetch.Promise(function(t,n){const c=new Request(e,r);const u=getNodeRequestOptions(c);const l=(u.protocol==="https:"?i:s).request;const p=c.signal;let f=null;const d=function abort(){let e=new AbortError("The user aborted a request.");n(e);if(c.body&&c.body instanceof o.Readable){c.body.destroy(e)}if(!f||!f.body)return;f.body.emit("error",e)};if(p&&p.aborted){d();return}const m=function abortAndFinalize(){d();finalize()};const h=l(u);let g;if(p){p.addEventListener("abort",m)}function finalize(){h.abort();if(p)p.removeEventListener("abort",m);clearTimeout(g)}if(c.timeout){h.once("socket",function(e){g=setTimeout(function(){n(new FetchError(`network timeout at: ${c.url}`,"request-timeout"));finalize()},c.timeout)})}h.on("error",function(e){n(new FetchError(`request to ${c.url} failed, reason: ${e.message}`,"system",e));finalize()});h.on("response",function(e){clearTimeout(g);const r=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const o=r.get("Location");const s=o===null?null:O(c.url,o);switch(c.redirect){case"error":n(new FetchError(`redirect mode is set to error: ${c.url}`,"no-redirect"));finalize();return;case"manual":if(s!==null){try{r.set("Location",s)}catch(e){n(e)}}break;case"follow":if(s===null){break}if(c.counter>=c.follow){n(new FetchError(`maximum redirect reached at: ${c.url}`,"max-redirect"));finalize();return}const o={headers:new Headers(c.headers),follow:c.follow,counter:c.counter+1,agent:c.agent,compress:c.compress,method:c.method,body:c.body,signal:c.signal,timeout:c.timeout};if(e.statusCode!==303&&c.body&&getTotalBytes(c)===null){n(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&c.method==="POST"){o.method="GET";o.body=undefined;o.headers.delete("content-length")}t(fetch(new Request(s,o)));finalize();return}}e.once("end",function(){if(p)p.removeEventListener("abort",m)});let o=e.pipe(new P);const s={url:c.url,status:e.statusCode,statusText:e.statusMessage,headers:r,size:c.size,timeout:c.timeout,counter:c.counter};const i=r.get("Content-Encoding");if(!c.compress||c.method==="HEAD"||i===null||e.statusCode===204||e.statusCode===304){f=new Response(o,s);t(f);return}const u={flush:a.Z_SYNC_FLUSH,finishFlush:a.Z_SYNC_FLUSH};if(i=="gzip"||i=="x-gzip"){o=o.pipe(a.createGunzip(u));f=new Response(o,s);t(f);return}if(i=="deflate"||i=="x-deflate"){const r=e.pipe(new P);r.once("data",function(e){if((e[0]&15)===8){o=o.pipe(a.createInflate())}else{o=o.pipe(a.createInflateRaw())}f=new Response(o,s);t(f)});return}if(i=="br"&&typeof a.createBrotliDecompress==="function"){o=o.pipe(a.createBrotliDecompress());f=new Response(o,s);t(f);return}f=new Response(o,s);t(f)});writeToStream(h,c)})}fetch.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};fetch.Promise=global.Promise;e.exports=r=fetch;Object.defineProperty(r,"__esModule",{value:true});r.default=r;r.Headers=Headers;r.Request=Request;r.Response=Response;r.FetchError=FetchError},462:function(e){"use strict";const r=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(r,"^$1");return e}function escapeArgument(e,t){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(r,"^$1");if(t){e=e.replace(r,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},463:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=t(692);var s=_interopDefault(t(969));const n=s(e=>console.warn(e));class RequestError extends Error{constructor(e,r,t){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.status=r;Object.defineProperty(this,"code",{get(){n(new o.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return r}});this.headers=t.headers||{};const s=Object.assign({},t.request);if(t.request.headers.authorization){s.headers=Object.assign({},t.request.headers,{authorization:t.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}s.url=s.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=s}}r.RequestError=RequestError},489:function(e,r,t){"use strict";const o=t(622);const s=t(814);const n=t(39)();function resolveCommandAttempt(e,r){const t=process.cwd();const i=e.options.cwd!=null;if(i){try{process.chdir(e.options.cwd)}catch(e){}}let a;try{a=s.sync(e.command,{path:(e.options.env||process.env)[n],pathExt:r?o.delimiter:undefined})}catch(e){}finally{process.chdir(t)}if(a){a=o.resolve(i?e.options.cwd:"",a)}return a}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},510:function(e){e.exports=addHook;function addHook(e,r,t,o){var s=o;if(!e.registry[t]){e.registry[t]=[]}if(r==="before"){o=function(e,r){return Promise.resolve().then(s.bind(null,r)).then(e.bind(null,r))}}if(r==="after"){o=function(e,r){var t;return Promise.resolve().then(e.bind(null,r)).then(function(e){t=e;return s(t,r)}).then(function(){return t})}}if(r==="error"){o=function(e,r){return Promise.resolve().then(e.bind(null,r)).catch(function(e){return s(e,r)})}}e.registry[t].push({hook:o,orig:s})}},523:function(e,r,t){var o=t(363);var s=t(510);var n=t(763);var i=Function.bind;var a=i.bind(i);function bindApi(e,r,t){var o=a(n,null).apply(null,t?[r,t]:[r]);e.api={remove:o};e.remove=o;["before","error","after","wrap"].forEach(function(o){var n=t?[r,o,t]:[r,o];e[o]=e.api[o]=a(s,null).apply(null,n)})}function HookSingular(){var e="h";var r={registry:{}};var t=o.bind(null,r,e);bindApi(t,r,e);return t}function HookCollection(){var e={registry:{}};var r=o.bind(null,e);bindApi(r,e);return r}var c=false;function Hook(){if(!c){console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');c=true}return HookCollection()}Hook.Singular=HookSingular.bind();Hook.Collection=HookCollection.bind();e.exports=Hook;e.exports.Hook=Hook;e.exports.Singular=Hook.Singular;e.exports.Collection=Hook.Collection},568:function(e,r,t){"use strict";const o=t(622);const s=t(948);const n=t(489);const i=t(462);const a=t(389);const c=t(280);const u=process.platform==="win32";const l=/\.(?:com|exe)$/i;const p=/node_modules[\\\/].bin[\\\/][^\\\/]+\.cmd$/i;const f=s(()=>c.satisfies(process.version,"^4.8.0 || ^5.7.0 || >= 6.0.0",true))||false;function detectShebang(e){e.file=n(e);const r=e.file&&a(e.file);if(r){e.args.unshift(e.file);e.command=r;return n(e)}return e.file}function parseNonShell(e){if(!u){return e}const r=detectShebang(e);const t=!l.test(r);if(e.options.forceShell||t){const t=p.test(r);e.command=o.normalize(e.command);e.command=i.command(e.command);e.args=e.args.map(e=>i.argument(e,t));const s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parseShell(e){if(f){return e}const r=[e.command].concat(e.args).join(" ");if(u){e.command=typeof e.options.shell==="string"?e.options.shell:process.env.comspec||"cmd.exe";e.args=["/d","/s","/c",`"${r}"`];e.options.windowsVerbatimArguments=true}else{if(typeof e.options.shell==="string"){e.command=e.options.shell}else if(process.platform==="android"){e.command="/system/bin/sh"}else{e.command="/bin/sh"}e.args=["-c",r]}return e}function parse(e,r,t){if(r&&!Array.isArray(r)){t=r;r=null}r=r?r.slice(0):[];t=Object.assign({},t);const o={command:e,args:r,options:t,file:undefined,original:{command:e,args:r}};return t.shell?parseShell(o):parseNonShell(o)}e.exports=parse},605:function(e){e.exports=require("http")},614:function(e){e.exports=require("events")},621:function(e,r,t){"use strict";const o=t(622);const s=t(39);e.exports=(e=>{e=Object.assign({cwd:process.cwd(),path:process.env[s()]},e);let r;let t=o.resolve(e.cwd);const n=[];while(r!==t){n.push(o.join(t,"node_modules/.bin"));r=t;t=o.resolve(t,"..")}n.push(o.dirname(process.execPath));return n.concat(e.path).join(o.delimiter)});e.exports.env=(r=>{r=Object.assign({env:process.env},r);const t=Object.assign({},r.env);const o=s({env:t});r.path=t[o];t[o]=e.exports(r);return t})},622:function(e){e.exports=require("path")},654:function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},669:function(e){e.exports=require("util")},676:function(e,r,t){const{Octokit:o}=t(889);const{env:s}=t(765);const n=s.INPUT_GITHUB_TOKEN;const i=s.INPUT_REPOSITORY||s.GITHUB_REPOSITORY;const[a,c]=i.split("/");const u=new o({auth:n});u.repos.getLatestRelease({owner:a,repo:c}).then(e=>{if(!e.data){console.error("💡 No latest release found, skip delete.");return}const r=e.data.id;u.repos.deleteRelease({owner:a,repo:c,release_id:r})}).catch(e=>{if(e.status===404){console.error("💡 No latest release found, skip delete.");return}console.error("❌ Can't get latest Release");console.error(e)})},692:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});class Deprecation extends Error{constructor(e){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="Deprecation"}}r.Deprecation=Deprecation},696:function(e){"use strict";function isObject(e){return e!=null&&typeof e==="object"&&Array.isArray(e)===false}function isObjectObject(e){return isObject(e)===true&&Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var r,t;if(isObjectObject(e)===false)return false;r=e.constructor;if(typeof r!=="function")return false;t=r.prototype;if(isObjectObject(t)===false)return false;if(t.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},697:function(e){"use strict";e.exports=((e,r)=>{r=r||(()=>{});return e.then(e=>new Promise(e=>{e(r())}).then(()=>e),e=>new Promise(e=>{e(r())}).then(()=>{throw e}))})},742:function(e,r,t){var o=t(747);var s;if(process.platform==="win32"||global.TESTING_WINDOWS){s=t(818)}else{s=t(197)}e.exports=isexe;isexe.sync=sync;function isexe(e,r,t){if(typeof r==="function"){t=r;r={}}if(!t){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise(function(t,o){isexe(e,r||{},function(e,r){if(e){o(e)}else{t(r)}})})}s(e,r||{},function(e,o){if(e){if(e.code==="EACCES"||r&&r.ignoreErrors){e=null;o=false}}t(e,o)})}function sync(e,r){try{return s.sync(e,r||{})}catch(e){if(r&&r.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},747:function(e){e.exports=require("fs")},753:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=t(385);var s=t(796);var n=_interopDefault(t(696));var i=_interopDefault(t(454));var a=t(463);const c="5.3.2";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){if(n(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let r={};let t;let o;const s=e.request&&e.request.fetch||i;return s(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then(s=>{o=s.url;t=s.status;for(const e of s.headers){r[e[0]]=e[1]}if(t===204||t===205){return}if(e.method==="HEAD"){if(t<400){return}throw new a.RequestError(s.statusText,t,{headers:r,request:e})}if(t===304){throw new a.RequestError("Not modified",t,{headers:r,request:e})}if(t>=400){return s.text().then(o=>{const s=new a.RequestError(o,t,{headers:r,request:e});try{let e=JSON.parse(s.message);Object.assign(s,e);let r=e.errors;s.message=s.message+": "+r.map(JSON.stringify).join(", ")}catch(e){}throw s})}const n=s.headers.get("content-type");if(/application\/json/.test(n)){return s.json()}if(!n||/^text\/|charset=utf-8$/.test(n)){return s.text()}return getBufferResponse(s)}).then(e=>{return{status:t,url:o,headers:r,data:e}}).catch(t=>{if(t instanceof a.RequestError){throw t}throw new a.RequestError(t.message,500,{headers:r,request:e})})}function withDefaults(e,r){const t=e.defaults(r);const o=function(e,r){const o=t.merge(e,r);if(!o.request||!o.request.hook){return fetchWrapper(t.parse(o))}const s=(e,r)=>{return fetchWrapper(t.parse(t.merge(e,r)))};Object.assign(s,{endpoint:t,defaults:withDefaults.bind(null,t)});return o.request.hook(s,o)};return Object.assign(o,{endpoint:t,defaults:withDefaults.bind(null,t)})}const u=withDefaults(o.endpoint,{headers:{"user-agent":`octokit-request.js/${c} ${s.getUserAgent()}`}});r.request=u},761:function(e){e.exports=require("zlib")},763:function(e){e.exports=removeHook;function removeHook(e,r,t){if(!e.registry[r]){return}var o=e.registry[r].map(function(e){return e.orig}).indexOf(t);if(o===-1){return}e.registry[r].splice(o,1)}},765:function(e){e.exports=require("process")},768:function(e){"use strict";e.exports=function(e){var r=typeof e==="string"?"\n":"\n".charCodeAt();var t=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===r){e=e.slice(0,e.length-1)}if(e[e.length-1]===t){e=e.slice(0,e.length-1)}return e}},796:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=_interopDefault(t(2));function getUserAgent(){try{return`Node.js/${process.version.substr(1)} (${o()}; ${process.arch})`}catch(e){if(/wmic os get Caption/.test(e.message)){return"Windows "}return""}}r.getUserAgent=getUserAgent},813:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});async function auth(e){const r=e.split(/\./).length===3?"app":/^v\d+\./.test(e)?"installation":"oauth";return{type:"token",token:e,tokenType:r}}function withAuthorizationPrefix(e){if(e.split(/\./).length===3){return`bearer ${e}`}return`token ${e}`}async function hook(e,r,t,o){const s=r.endpoint.merge(t,o);s.headers.authorization=withAuthorizationPrefix(e);return r(s)}const t=function createTokenAuth(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")}e=e.replace(/^(token|bearer) +/i,"");return Object.assign(auth.bind(null,e),{hook:hook.bind(null,e)})};r.createTokenAuth=t},814:function(e,r,t){e.exports=which;which.sync=whichSync;var o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var s=t(622);var n=o?";":":";var i=t(742);function getNotFoundError(e){var r=new Error("not found: "+e);r.code="ENOENT";return r}function getPathInfo(e,r){var t=r.colon||n;var s=r.path||process.env.PATH||"";var i=[""];s=s.split(t);var a="";if(o){s.unshift(process.cwd());a=r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";i=a.split(t);if(e.indexOf(".")!==-1&&i[0]!=="")i.unshift("")}if(e.match(/\//)||o&&e.match(/\\/))s=[""];return{env:s,ext:i,extExe:a}}function which(e,r,t){if(typeof r==="function"){t=r;r={}}var o=getPathInfo(e,r);var n=o.env;var a=o.ext;var c=o.extExe;var u=[];(function F(o,l){if(o===l){if(r.all&&u.length)return t(null,u);else return t(getNotFoundError(e))}var p=n[o];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var f=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){f=e.slice(0,2)+f}(function E(e,s){if(e===s)return F(o+1,l);var n=a[e];i(f+n,{pathExt:c},function(o,i){if(!o&&i){if(r.all)u.push(f+n);else return t(null,f+n)}return E(e+1,s)})})(0,a.length)})(0,n.length)}function whichSync(e,r){r=r||{};var t=getPathInfo(e,r);var o=t.env;var n=t.ext;var a=t.extExe;var c=[];for(var u=0,l=o.length;u"}throw e}}r.getUserAgent=getUserAgent},866:function(e,r,t){"use strict";var o=t(816);e.exports=function(e){var r=e.match(o);if(!r){return null}var t=r[0].replace(/#! ?/,"").split(" ");var s=t[0].split("/").pop();var n=t[1];return s==="env"?n:s+(n?" "+n:"")}},881:function(e){"use strict";const r=process.platform==="win32";function notFoundError(e,r){return Object.assign(new Error(`${r} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,t){if(!r){return}const o=e.emit;e.emit=function(r,s){if(r==="exit"){const r=verifyENOENT(s,t,"spawn");if(r){return o.call(e,"error",r)}}return o.apply(e,arguments)}}function verifyENOENT(e,t){if(r&&e===1&&!t.file){return notFoundError(t.original,"spawn")}return null}function verifyENOENTSync(e,t){if(r&&e===1&&!t.file){return notFoundError(t.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},889:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var o=t(448);var s=t(916);var n=t(299);var i=t(842);const a="17.0.0";const c=o.Octokit.plugin(s.requestLog).plugin([n.paginateRest,i.restEndpointMethods]).defaults({userAgent:`octokit-rest.js/${a}`});r.Octokit=c},898:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var o=t(753);var s=t(862);const n="4.3.1";class GraphqlError extends Error{constructor(e,r){const t=r.data.errors[0].message;super(t);Object.assign(this,r.data);this.name="GraphqlError";this.request=e;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}const i=["method","baseUrl","url","headers","request","query"];function graphql(e,r,t){t=typeof r==="string"?t=Object.assign({query:r},t):t=r;const o=Object.keys(t).reduce((e,r)=>{if(i.includes(r)){e[r]=t[r];return e}if(!e.variables){e.variables={}}e.variables[r]=t[r];return e},{});return e(o).then(e=>{if(e.data.errors){throw new GraphqlError(o,{data:e.data})}return e.data.data})}function withDefaults(e,r){const t=e.defaults(r);const s=(e,r)=>{return graphql(t,e,r)};return Object.assign(s,{defaults:withDefaults.bind(null,t),endpoint:o.request.endpoint})}const a=withDefaults(o.request,{headers:{"user-agent":`octokit-graphql.js/${n} ${s.getUserAgent()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults(e,{method:"POST",url:"/graphql"})}r.graphql=a;r.withCustomRequest=withCustomRequest},916:function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:true});const t="1.0.0";function requestLog(e){e.hook.wrap("request",(r,t)=>{e.log.debug("request",t);const o=Date.now();const s=e.request.endpoint.parse(t);const n=s.url.replace(t.baseUrl,"");return r(t).then(r=>{e.log.info(`${s.method} ${n} - ${r.status} in ${Date.now()-o}ms`);return r}).catch(r=>{e.log.info(`${s.method} ${n} - ${r.status} in ${Date.now()-o}ms`);throw r})})}requestLog.VERSION=t;r.requestLog=requestLog},948:function(e){"use strict";e.exports=function(e){try{return e()}catch(e){}}},955:function(e,r,t){"use strict";const o=t(622);const s=t(129);const n=t(20);const i=t(768);const a=t(621);const c=t(323);const u=t(145);const l=t(697);const p=t(260);const f=t(427);const d=t(168);const m=1e3*1e3*10;function handleArgs(e,r,t){let s;t=Object.assign({extendEnv:true,env:{}},t);if(t.extendEnv){t.env=Object.assign({},process.env,t.env)}if(t.__winShell===true){delete t.__winShell;s={command:e,args:r,options:t,file:e,original:{cmd:e,args:r}}}else{s=n._parse(e,r,t)}t=Object.assign({maxBuffer:m,buffer:true,stripEof:true,preferLocal:true,localDir:s.options.cwd||process.cwd(),encoding:"utf8",reject:true,cleanup:true},s.options);t.stdio=d(t);if(t.preferLocal){t.env=a.env(Object.assign({},t,{cwd:t.localDir}))}if(t.detached){t.cleanup=false}if(process.platform==="win32"&&o.basename(s.command)==="cmd.exe"){s.args.unshift("/q")}return{cmd:s.command,args:s.args,opts:t,parsed:s}}function handleInput(e,r){if(r===null||r===undefined){return}if(c(r)){r.pipe(e.stdin)}else{e.stdin.end(r)}}function handleOutput(e,r){if(r&&e.stripEof){r=i(r)}return r}function handleShell(e,r,t){let o="/bin/sh";let s=["-c",r];t=Object.assign({},t);if(process.platform==="win32"){t.__winShell=true;o=process.env.comspec||"cmd.exe";s=["/s","/c",`"${r}"`];t.windowsVerbatimArguments=true}if(t.shell){o=t.shell;delete t.shell}return e(o,s,t)}function getStream(e,r,{encoding:t,buffer:o,maxBuffer:s}){if(!e[r]){return null}let n;if(!o){n=new Promise((t,o)=>{e[r].once("end",t).once("error",o)})}else if(t){n=u(e[r],{encoding:t,maxBuffer:s})}else{n=u.buffer(e[r],{maxBuffer:s})}return n.catch(e=>{e.stream=r;e.message=`${r} ${e.message}`;throw e})}function makeError(e,r){const{stdout:t,stderr:o}=e;let s=e.error;const{code:n,signal:i}=e;const{parsed:a,joinedCmd:c}=r;const u=r.timedOut||false;if(!s){let e="";if(Array.isArray(a.opts.stdio)){if(a.opts.stdio[2]!=="inherit"){e+=e.length>0?o:`\n${o}`}if(a.opts.stdio[1]!=="inherit"){e+=`\n${t}`}}else if(a.opts.stdio!=="inherit"){e=`\n${o}${t}`}s=new Error(`Command failed: ${c}${e}`);s.code=n<0?f(n):n}s.stdout=t;s.stderr=o;s.failed=true;s.signal=i||null;s.cmd=c;s.timedOut=u;return s}function joinCmd(e,r){let t=e;if(Array.isArray(r)&&r.length>0){t+=" "+r.join(" ")}return t}e.exports=((e,r,t)=>{const o=handleArgs(e,r,t);const{encoding:i,buffer:a,maxBuffer:c}=o.opts;const u=joinCmd(e,r);let f;try{f=s.spawn(o.cmd,o.args,o.opts)}catch(e){return Promise.reject(e)}let d;if(o.opts.cleanup){d=p(()=>{f.kill()})}let m=null;let h=false;const g=()=>{if(m){clearTimeout(m);m=null}if(d){d()}};if(o.opts.timeout>0){m=setTimeout(()=>{m=null;h=true;f.kill(o.opts.killSignal)},o.opts.timeout)}const w=new Promise(e=>{f.on("exit",(r,t)=>{g();e({code:r,signal:t})});f.on("error",r=>{g();e({error:r})});if(f.stdin){f.stdin.on("error",r=>{g();e({error:r})})}});function destroy(){if(f.stdout){f.stdout.destroy()}if(f.stderr){f.stderr.destroy()}}const T=()=>l(Promise.all([w,getStream(f,"stdout",{encoding:i,buffer:a,maxBuffer:c}),getStream(f,"stderr",{encoding:i,buffer:a,maxBuffer:c})]).then(e=>{const r=e[0];r.stdout=e[1];r.stderr=e[2];if(r.error||r.code!==0||r.signal!==null){const e=makeError(r,{joinedCmd:u,parsed:o,timedOut:h});e.killed=e.killed||f.killed;if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,r.stdout),stderr:handleOutput(o.opts,r.stderr),code:0,failed:false,killed:false,signal:null,cmd:u,timedOut:false}}),destroy);n._enoent.hookChildProcess(f,o.parsed);handleInput(f,o.opts.input);f.then=((e,r)=>T().then(e,r));f.catch=(e=>T().catch(e));return f});e.exports.stdout=((...r)=>e.exports(...r).then(e=>e.stdout));e.exports.stderr=((...r)=>e.exports(...r).then(e=>e.stderr));e.exports.shell=((r,t)=>handleShell(e.exports,r,t));e.exports.sync=((e,r,t)=>{const o=handleArgs(e,r,t);const n=joinCmd(e,r);if(c(o.opts.input)){throw new TypeError("The `input` option cannot be a stream in sync mode")}const i=s.spawnSync(o.cmd,o.args,o.opts);i.code=i.status;if(i.error||i.status!==0||i.signal!==null){const e=makeError(i,{joinedCmd:n,parsed:o});if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,i.stdout),stderr:handleOutput(o.opts,i.stderr),code:0,failed:false,signal:null,cmd:n,timedOut:false}});e.exports.shellSync=((r,t)=>handleShell(e.exports.sync,r,t))},966:function(e,r,t){"use strict";const{PassThrough:o}=t(413);e.exports=(e=>{e=Object.assign({},e);const{array:r}=e;let{encoding:t}=e;const s=t==="buffer";let n=false;if(r){n=!(t||s)}else{t=t||"utf8"}if(s){t=null}let i=0;const a=[];const c=new o({objectMode:n});if(t){c.setEncoding(t)}c.on("data",e=>{a.push(e);if(n){i=a.length}else{i+=e.length}});c.getBufferedValue=(()=>{if(r){return a}return s?Buffer.concat(a,i):a.join("")});c.getBufferedLength=(()=>i);return c})},969:function(e,r,t){var o=t(11);e.exports=o(once);e.exports.strict=o(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var r=function(){if(r.called)return r.value;r.called=true;return r.value=e.apply(this,arguments)};r.called=false;return r}function onceStrict(e){var r=function(){if(r.called)throw new Error(r.onceError);r.called=true;return r.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";r.onceError=t+" shouldn't be called more than once";r.called=false;return r}}}); \ No newline at end of file diff --git a/src/index.js b/src/index.js index da957d2..a74309c 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,8 @@ const { Octokit } = require("@octokit/rest"); const {env} = require ("process"); -const token = env.GITHUB_TOKEN -const [owner, repo] = env.GITHUB_REPOSITORY.split("/") +const token = env.INPUT_GITHUB_TOKEN +const repository = env.INPUT_REPOSITORY || env.GITHUB_REPOSITORY +const [owner, repo] = repository.split("/") const octokit = new Octokit({ auth: token