From 7642fd5fc4f21a3dcbabb2be76fd002d25ec75cf Mon Sep 17 00:00:00 2001 From: allisonport-db Date: Fri, 3 Dec 2021 12:42:56 -0800 Subject: [PATCH] refactor args --- dist/index.js | 2 +- src/generate-project-query.js | 6 +++--- src/get-action-data.js | 3 +-- src/index.js | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index c41f6cf..dc496f2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10,4 +10,4 @@ * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function isObjectObject(e){return isObject(e)===true&&Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObjectObject(e)===false)return false;t=e.constructor;if(typeof t!=="function")return false;r=t.prototype;if(isObjectObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},1554:e=>{"use strict";var t=e.exports=function(e){return e!==null&&typeof e==="object"&&typeof e.pipe==="function"};t.writable=function(e){return t(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object"};t.readable=function(e){return t(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object"};t.duplex=function(e){return t.writable(e)&&t.readable(e)};t.transform=function(e){return t.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object"}},7126:(e,t,r)=>{var i=r(5747);var n;if(process.platform==="win32"||global.TESTING_WINDOWS){n=r(2001)}else{n=r(9728)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,r){if(typeof t==="function"){r=t;t={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,i){isexe(e,t||{},(function(e,t){if(e){i(e)}else{r(t)}}))}))}n(e,t||{},(function(e,i){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;i=false}}r(e,i)}))}function sync(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},9728:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var i=r(5747);function isexe(e,t,r){i.stat(e,(function(e,i){r(e,e?false:checkStat(i,t))}))}function sync(e,t){return checkStat(i.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var r=e.mode;var i=e.uid;var n=e.gid;var s=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var o=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var u=parseInt("010",8);var p=parseInt("001",8);var c=a|u;var d=r&p||r&u&&n===o||r&a&&i===s||r&c&&s===0;return d}},2001:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var i=r(5747);function checkPathExt(e,t){var r=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var i=0;i{var t="Expected a function";var r="__lodash_hash_undefined__";var i=1/0;var n="[object Function]",s="[object GeneratorFunction]",o="[object Symbol]";var a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,p=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var d=/[\\^$.*+?()[\]{}|]/g;var l=/\\(\\)?/g;var g=/^\[object .+?Constructor\]$/;var m=typeof global=="object"&&global&&global.Object===Object&&global;var h=typeof self=="object"&&self&&self.Object===Object&&self;var y=m||h||Function("return this")();function getValue(e,t){return e==null?undefined:e[t]}function isHostObject(e){var t=false;if(e!=null&&typeof e.toString!="function"){try{t=!!(e+"")}catch(e){}}return t}var b=Array.prototype,_=Function.prototype,q=Object.prototype;var v=y["__core-js_shared__"];var w=function(){var e=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var T=_.toString;var k=q.hasOwnProperty;var j=q.toString;var O=RegExp("^"+T.call(k).replace(d,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var C=y.Symbol,P=b.splice;var S=getNative(y,"Map"),x=getNative(Object,"create");var A=C?C.prototype:undefined,R=A?A.toString:undefined;function Hash(e){var t=-1,r=e?e.length:0;this.clear();while(++t-1}function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);if(i<0){r.push([e,t])}else{r[i][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e?e.length:0;this.clear();while(++t{var t="Expected a function";var r="__lodash_hash_undefined__";var i=1/0,n=9007199254740991;var s="[object Function]",o="[object GeneratorFunction]",a="[object Symbol]";var u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var l=/[\\^$.*+?()[\]{}|]/g;var g=/\\(\\)?/g;var m=/^\[object .+?Constructor\]$/;var h=/^(?:0|[1-9]\d*)$/;var y=typeof global=="object"&&global&&global.Object===Object&&global;var b=typeof self=="object"&&self&&self.Object===Object&&self;var _=y||b||Function("return this")();function getValue(e,t){return e==null?undefined:e[t]}function isHostObject(e){var t=false;if(e!=null&&typeof e.toString!="function"){try{t=!!(e+"")}catch(e){}}return t}var q=Array.prototype,v=Function.prototype,w=Object.prototype;var T=_["__core-js_shared__"];var k=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var j=v.toString;var O=w.hasOwnProperty;var C=w.toString;var P=RegExp("^"+j.call(O).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var S=_.Symbol,x=q.splice;var A=getNative(_,"Map"),R=getNative(Object,"create");var G=S?S.prototype:undefined,L=G?G.toString:undefined;function Hash(e){var t=-1,r=e?e.length:0;this.clear();while(++t-1}function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);if(i<0){r.push([e,t])}else{r[i][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e?e.length:0;this.clear();while(++t-1&&e%1==0&&e{var t=200;var r="__lodash_hash_undefined__";var i=1/0;var n="[object Function]",s="[object GeneratorFunction]";var o=/[\\^$.*+?()[\]{}|]/g;var a=/^\[object .+?Constructor\]$/;var u=typeof global=="object"&&global&&global.Object===Object&&global;var p=typeof self=="object"&&self&&self.Object===Object&&self;var c=u||p||Function("return this")();function arrayIncludes(e,t){var r=e?e.length:0;return!!r&&baseIndexOf(e,t,0)>-1}function arrayIncludesWith(e,t,r){var i=-1,n=e?e.length:0;while(++i-1}function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);if(i<0){r.push([e,t])}else{r[i][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e?e.length:0;this.clear();while(++t=t){var c=r?null:j(e);if(c){return setToArray(c)}a=false;s=cacheHas;p=new SetCache}else{p=r?[]:u}e:while(++n{"use strict";const i=r(2087);const n=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 macosRelease=e=>{e=Number((e||i.release()).split(".")[0]);return{name:n.get(e),version:"10."+(e-4)}};e.exports=macosRelease;e.exports.default=macosRelease},8560:e=>{"use strict";e.exports=function(e){try{return e()}catch(e){}}},467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var i=_interopDefault(r(2413));var n=_interopDefault(r(8605));var s=_interopDefault(r(8835));var o=_interopDefault(r(7211));var a=_interopDefault(r(8761));const u=i.Readable;const p=Symbol("buffer");const c=Symbol("type");class Blob{constructor(){this[c]="";const e=arguments[0];const t=arguments[1];const r=[];let i=0;if(e){const t=e;const n=Number(t.length);for(let e=0;e1&&arguments[1]!==undefined?arguments[1]:{},n=r.size;let s=n===undefined?0:n;var o=r.timeout;let a=o===undefined?0:o;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 i);else{e=Buffer.from(String(e))}this[l]={body:e,disturbed:false,error:null};this.size=s;this.timeout=a;if(e instanceof i){e.on("error",(function(e){const r=e.name==="AbortError"?e:new FetchError(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[l].error=r}))}}Body.prototype={get body(){return this[l].body},get bodyUsed(){return this[l].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(t){return Object.assign(new Blob([],{type:e.toLowerCase()}),{[p]:t})}))},json(){var e=this;return consumeBody.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return Body.Promise.reject(new FetchError(`invalid json response body at ${e.url} reason: ${t.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(t){return convertBody(t,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 t of Object.getOwnPropertyNames(Body.prototype)){if(!(t in e)){const r=Object.getOwnPropertyDescriptor(Body.prototype,t);Object.defineProperty(e,t,r)}}};function consumeBody(){var e=this;if(this[l].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[l].disturbed=true;if(this[l].error){return Body.Promise.reject(this[l].error)}let t=this.body;if(t===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(t)){t=t.stream()}if(Buffer.isBuffer(t)){return Body.Promise.resolve(t)}if(!(t instanceof i)){return Body.Promise.resolve(Buffer.alloc(0))}let r=[];let n=0;let s=false;return new Body.Promise((function(i,o){let a;if(e.timeout){a=setTimeout((function(){s=true;o(new FetchError(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)}t.on("error",(function(t){if(t.name==="AbortError"){s=true;o(t)}else{o(new FetchError(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))}}));t.on("data",(function(t){if(s||t===null){return}if(e.size&&n+t.length>e.size){s=true;o(new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}n+=t.length;r.push(t)}));t.on("end",(function(){if(s){return}clearTimeout(a);try{i(Buffer.concat(r,n))}catch(t){o(new FetchError(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}))}))}function convertBody(e,t){if(typeof d!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const r=t.get("content-type");let i="utf-8";let n,s;if(r){n=/charset=([^;]*)/i.exec(r)}s=e.slice(0,1024).toString();if(!n&&s){n=/0&&arguments[0]!==undefined?arguments[0]:undefined;this[y]=Object.create(null);if(e instanceof Headers){const t=e.raw();const r=Object.keys(t);for(const e of r){for(const r of t[e]){this.append(e,r)}}return}if(e==null);else if(typeof e==="object"){const t=e[Symbol.iterator];if(t!=null){if(typeof t!=="function"){throw new TypeError("Header pairs must be iterable")}const r=[];for(const t of e){if(typeof t!=="object"||typeof t[Symbol.iterator]!=="function"){throw new TypeError("Each header pair must be iterable")}r.push(Array.from(t))}for(const e of r){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 t of Object.keys(e)){const r=e[t];this.append(t,r)}}}else{throw new TypeError("Provided initializer must be an object")}}get(e){e=`${e}`;validateName(e);const t=find(this[y],e);if(t===undefined){return null}return this[y][t].join(", ")}forEach(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined;let r=getHeaders(this);let i=0;while(i1&&arguments[1]!==undefined?arguments[1]:"key+value";const r=Object.keys(e[y]).sort();return r.map(t==="key"?function(e){return e.toLowerCase()}:t==="value"?function(t){return e[y][t].join(", ")}:function(t){return[t.toLowerCase(),e[y][t].join(", ")]})}const b=Symbol("internal");function createHeadersIterator(e,t){const r=Object.create(_);r[b]={target:e,kind:t,index:0};return r}const _=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==_){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[b];const t=e.target,r=e.kind,i=e.index;const n=getHeaders(t,r);const s=n.length;if(i>=s){return{value:undefined,done:true}}this[b].index=i+1;return{value:n[i],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(_,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const t=Object.assign({__proto__:null},e[y]);const r=find(e[y],"Host");if(r!==undefined){t[r]=t[r][0]}return t}function createHeadersLenient(e){const t=new Headers;for(const r of Object.keys(e)){if(m.test(r)){continue}if(Array.isArray(e[r])){for(const i of e[r]){if(h.test(i)){continue}if(t[y][r]===undefined){t[y][r]=[i]}else{t[y][r].push(i)}}}else if(!h.test(e[r])){t[y][r]=[e[r]]}}return t}const q=Symbol("Response internals");const v=n.STATUS_CODES;class Response{constructor(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Body.call(this,e,t);const r=t.status||200;const i=new Headers(t.headers);if(e!=null&&!i.has("Content-Type")){const t=extractContentType(e);if(t){i.append("Content-Type",t)}}this[q]={url:t.url,status:r,statusText:t.statusText||v[r],headers:i,counter:t.counter}}get url(){return this[q].url||""}get status(){return this[q].status}get ok(){return this[q].status>=200&&this[q].status<300}get redirected(){return this[q].counter>0}get statusText(){return this[q].statusText}get headers(){return this[q].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 w=Symbol("Request internals");const T=s.parse;const k=s.format;const j="destroy"in i.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[w]==="object"}function isAbortSignal(e){const t=e&&typeof e==="object"&&Object.getPrototypeOf(e);return!!(t&&t.constructor.name==="AbortSignal")}class Request{constructor(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let r;if(!isRequest(e)){if(e&&e.href){r=T(e.href)}else{r=T(`${e}`)}e={}}else{r=T(e.url)}let i=t.method||e.method||"GET";i=i.toUpperCase();if((t.body!=null||isRequest(e)&&e.body!==null)&&(i==="GET"||i==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}let n=t.body!=null?t.body:isRequest(e)&&e.body!==null?clone(e):null;Body.call(this,n,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});const s=new Headers(t.headers||e.headers||{});if(n!=null&&!s.has("Content-Type")){const e=extractContentType(n);if(e){s.append("Content-Type",e)}}let o=isRequest(e)?e.signal:null;if("signal"in t)o=t.signal;if(o!=null&&!isAbortSignal(o)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[w]={method:i,redirect:t.redirect||e.redirect||"follow",headers:s,parsedURL:r,signal:o};this.follow=t.follow!==undefined?t.follow:e.follow!==undefined?e.follow:20;this.compress=t.compress!==undefined?t.compress:e.compress!==undefined?e.compress:true;this.counter=t.counter||e.counter||0;this.agent=t.agent||e.agent}get method(){return this[w].method}get url(){return k(this[w].parsedURL)}get headers(){return this[w].headers}get redirect(){return this[w].redirect}get signal(){return this[w].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 t=e[w].parsedURL;const r=new Headers(e[w].headers);if(!r.has("Accept")){r.set("Accept","*/*")}if(!t.protocol||!t.hostname){throw new TypeError("Only absolute URLs are supported")}if(!/^https?:$/.test(t.protocol)){throw new TypeError("Only HTTP(S) protocols are supported")}if(e.signal&&e.body instanceof i.Readable&&!j){throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8")}let n=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)){n="0"}if(e.body!=null){const t=getTotalBytes(e);if(typeof t==="number"){n=String(t)}}if(n){r.set("Content-Length",n)}if(!r.has("User-Agent")){r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)")}if(e.compress&&!r.has("Accept-Encoding")){r.set("Accept-Encoding","gzip,deflate")}let s=e.agent;if(typeof s==="function"){s=s(t)}if(!r.has("Connection")&&!s){r.set("Connection","close")}return Object.assign({},t,{method:e.method,headers:exportNodeCompatibleHeaders(r),agent:s})}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 O=i.PassThrough;const C=s.resolve;function fetch(e,t){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(r,s){const u=new Request(e,t);const p=getNodeRequestOptions(u);const c=(p.protocol==="https:"?o:n).request;const d=u.signal;let l=null;const g=function abort(){let e=new AbortError("The user aborted a request.");s(e);if(u.body&&u.body instanceof i.Readable){u.body.destroy(e)}if(!l||!l.body)return;l.body.emit("error",e)};if(d&&d.aborted){g();return}const m=function abortAndFinalize(){g();finalize()};const h=c(p);let y;if(d){d.addEventListener("abort",m)}function finalize(){h.abort();if(d)d.removeEventListener("abort",m);clearTimeout(y)}if(u.timeout){h.once("socket",(function(e){y=setTimeout((function(){s(new FetchError(`network timeout at: ${u.url}`,"request-timeout"));finalize()}),u.timeout)}))}h.on("error",(function(e){s(new FetchError(`request to ${u.url} failed, reason: ${e.message}`,"system",e));finalize()}));h.on("response",(function(e){clearTimeout(y);const t=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const i=t.get("Location");const n=i===null?null:C(u.url,i);switch(u.redirect){case"error":s(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${u.url}`,"no-redirect"));finalize();return;case"manual":if(n!==null){try{t.set("Location",n)}catch(e){s(e)}}break;case"follow":if(n===null){break}if(u.counter>=u.follow){s(new FetchError(`maximum redirect reached at: ${u.url}`,"max-redirect"));finalize();return}const i={headers:new Headers(u.headers),follow:u.follow,counter:u.counter+1,agent:u.agent,compress:u.compress,method:u.method,body:u.body,signal:u.signal,timeout:u.timeout,size:u.size};if(e.statusCode!==303&&u.body&&getTotalBytes(u)===null){s(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)&&u.method==="POST"){i.method="GET";i.body=undefined;i.headers.delete("content-length")}r(fetch(new Request(n,i)));finalize();return}}e.once("end",(function(){if(d)d.removeEventListener("abort",m)}));let i=e.pipe(new O);const n={url:u.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:u.size,timeout:u.timeout,counter:u.counter};const o=t.get("Content-Encoding");if(!u.compress||u.method==="HEAD"||o===null||e.statusCode===204||e.statusCode===304){l=new Response(i,n);r(l);return}const p={flush:a.Z_SYNC_FLUSH,finishFlush:a.Z_SYNC_FLUSH};if(o=="gzip"||o=="x-gzip"){i=i.pipe(a.createGunzip(p));l=new Response(i,n);r(l);return}if(o=="deflate"||o=="x-deflate"){const t=e.pipe(new O);t.once("data",(function(e){if((e[0]&15)===8){i=i.pipe(a.createInflate())}else{i=i.pipe(a.createInflateRaw())}l=new Response(i,n);r(l)}));return}if(o=="br"&&typeof a.createBrotliDecompress==="function"){i=i.pipe(a.createBrotliDecompress());l=new Response(i,n);r(l);return}l=new Response(i,n);r(l)}));writeToStream(h,u)}))}fetch.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};fetch.Promise=global.Promise;e.exports=t=fetch;Object.defineProperty(t,"__esModule",{value:true});t.default=t;t.Headers=Headers;t.Request=Request;t.Response=Response;t.FetchError=FetchError},502:(e,t,r)=>{"use strict";const i=r(5622);const n=r(539);e.exports=e=>{e=Object.assign({cwd:process.cwd(),path:process.env[n()]},e);let t;let r=i.resolve(e.cwd);const s=[];while(t!==r){s.push(i.join(r,"node_modules/.bin"));t=r;r=i.resolve(r,"..")}s.push(i.dirname(process.execPath));return s.concat(e.path).join(i.delimiter)};e.exports.env=t=>{t=Object.assign({env:process.env},t);const r=Object.assign({},t.env);const i=n({env:r});t.path=r[i];r[i]=e.exports(t);return r}},2072:(e,t,r)=>{e.exports=paginationMethodsPlugin;function paginationMethodsPlugin(e){e.getFirstPage=r(9555).bind(null,e);e.getLastPage=r(2203).bind(null,e);e.getNextPage=r(6655).bind(null,e);e.getPreviousPage=r(3032).bind(null,e);e.hasFirstPage=r(9631);e.hasLastPage=r(4286);e.hasNextPage=r(500);e.hasPreviousPage=r(5996)}},191:e=>{e.exports=deprecate;const t={};function deprecate(e){if(t[e]){return}console.warn(`DEPRECATED (@octokit/rest): ${e}`);t[e]=1}},9555:(e,t,r)=>{e.exports=getFirstPage;const i=r(8604);function getFirstPage(e,t,r){return i(e,t,"first",r)}},2203:(e,t,r)=>{e.exports=getLastPage;const i=r(8604);function getLastPage(e,t,r){return i(e,t,"last",r)}},6655:(e,t,r)=>{e.exports=getNextPage;const i=r(8604);function getNextPage(e,t,r){return i(e,t,"next",r)}},7889:e=>{e.exports=getPageLinks;function getPageLinks(e){e=e.link||e.headers.link||"";const t={};e.replace(/<([^>]*)>;\s*rel="([\w]*)"/g,((e,r,i)=>{t[i]=r}));return t}},8604:(e,t,r)=>{e.exports=getPage;const i=r(191);const n=r(7889);const s=r(6058);function getPage(e,t,r,o){i(`octokit.get${r.charAt(0).toUpperCase()+r.slice(1)}Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);const a=n(t)[r];if(!a){const e=new s(`No ${r} page found`,404);return Promise.reject(e)}const u={url:a,headers:applyAcceptHeader(t,o)};const p=e.request(u);return p}function applyAcceptHeader(e,t){const r=e.headers&&e.headers["x-github-media-type"];if(!r||t&&t.accept){return t}t=t||{};t.accept="application/vnd."+r.replace("; param=",".").replace("; format=","+");return t}},3032:(e,t,r)=>{e.exports=getPreviousPage;const i=r(8604);function getPreviousPage(e,t,r){return i(e,t,"prev",r)}},9631:(e,t,r)=>{e.exports=hasFirstPage;const i=r(191);const n=r(7889);function hasFirstPage(e){i(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).first}},4286:(e,t,r)=>{e.exports=hasLastPage;const i=r(191);const n=r(7889);function hasLastPage(e){i(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).last}},500:(e,t,r)=>{e.exports=hasNextPage;const i=r(191);const n=r(7889);function hasNextPage(e){i(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).next}},5996:(e,t,r)=>{e.exports=hasPreviousPage;const i=r(191);const n=r(7889);function hasPreviousPage(e){i(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).prev}},6058:e=>{e.exports=class HttpError extends Error{constructor(e,t,r){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.code=t;this.headers=r}}},1223:(e,t,r)=>{var i=r(2940);e.exports=i(once);e.exports.strict=i(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 f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},4824:(e,t,r)=>{"use strict";const i=r(2087);const n=r(7493);const s=r(3515);const osName=(e,t)=>{if(!e&&t){throw new Error("You can't specify a `release` without specifying `platform`")}e=e||i.platform();let r;if(e==="darwin"){if(!t&&i.platform()==="darwin"){t=i.release()}const e=t?Number(t.split(".")[0])>15?"macOS":"OS X":"macOS";r=t?n(t).name:"";return e+(r?" "+r:"")}if(e==="linux"){if(!t&&i.platform()==="linux"){t=i.release()}r=t?t.replace(/^(\d+\.\d+).*/,"$1"):"";return"Linux"+(r?" "+r:"")}if(e==="win32"){if(!t&&i.platform()==="win32"){t=i.release()}r=t?s(t):"";return"Windows"+(r?" "+r:"")}return e};e.exports=osName},1330:e=>{"use strict";e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},539:e=>{"use strict";e.exports=e=>{e=e||{};const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).find((e=>e.toUpperCase()==="PATH"))||"Path"}},8341:(e,t,r)=>{var i=r(1223);var n=r(1205);var s=r(5747);var noop=function(){};var o=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!o)return false;if(!s)return false;return(e instanceof(s.ReadStream||noop)||e instanceof(s.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,r,s){s=i(s);var o=false;e.on("close",(function(){o=true}));n(e,{readable:t,writable:r},(function(e){if(e)return s(e);o=true;s()}));var a=false;return function(t){if(o)return;if(a)return;a=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();s(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var i=e.map((function(n,s){var o=s0;return destroyer(n,o,a,(function(e){if(!r)r=e;if(e)i.forEach(call);if(o)return;i.forEach(call);t(r)}))}));return e.reduce(pipe)};e.exports=pump},5911:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var i=256;var n=Number.MAX_SAFE_INTEGER||9007199254740991;var s=16;var o=t.re=[];var a=t.src=[];var u=0;var p=u++;a[p]="0|[1-9]\\d*";var c=u++;a[c]="[0-9]+";var d=u++;a[d]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=u++;a[l]="("+a[p]+")\\."+"("+a[p]+")\\."+"("+a[p]+")";var g=u++;a[g]="("+a[c]+")\\."+"("+a[c]+")\\."+"("+a[c]+")";var m=u++;a[m]="(?:"+a[p]+"|"+a[d]+")";var h=u++;a[h]="(?:"+a[c]+"|"+a[d]+")";var y=u++;a[y]="(?:-("+a[m]+"(?:\\."+a[m]+")*))";var b=u++;a[b]="(?:-?("+a[h]+"(?:\\."+a[h]+")*))";var _=u++;a[_]="[0-9A-Za-z-]+";var q=u++;a[q]="(?:\\+("+a[_]+"(?:\\."+a[_]+")*))";var v=u++;var w="v?"+a[l]+a[y]+"?"+a[q]+"?";a[v]="^"+w+"$";var T="[v=\\s]*"+a[g]+a[b]+"?"+a[q]+"?";var k=u++;a[k]="^"+T+"$";var j=u++;a[j]="((?:<|>)?=?)";var O=u++;a[O]=a[c]+"|x|X|\\*";var C=u++;a[C]=a[p]+"|x|X|\\*";var P=u++;a[P]="[v=\\s]*("+a[C]+")"+"(?:\\.("+a[C]+")"+"(?:\\.("+a[C]+")"+"(?:"+a[y]+")?"+a[q]+"?"+")?)?";var S=u++;a[S]="[v=\\s]*("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:"+a[b]+")?"+a[q]+"?"+")?)?";var x=u++;a[x]="^"+a[j]+"\\s*"+a[P]+"$";var A=u++;a[A]="^"+a[j]+"\\s*"+a[S]+"$";var R=u++;a[R]="(?:^|[^\\d])"+"(\\d{1,"+s+"})"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:$|[^\\d])";var G=u++;a[G]="(?:~>?)";var L=u++;a[L]="(\\s*)"+a[G]+"\\s+";o[L]=new RegExp(a[L],"g");var D="$1~";var I=u++;a[I]="^"+a[G]+a[P]+"$";var U=u++;a[U]="^"+a[G]+a[S]+"$";var H=u++;a[H]="(?:\\^)";var $=u++;a[$]="(\\s*)"+a[H]+"\\s+";o[$]=new RegExp(a[$],"g");var B="$1^";var M=u++;a[M]="^"+a[H]+a[P]+"$";var N=u++;a[N]="^"+a[H]+a[S]+"$";var z=u++;a[z]="^"+a[j]+"\\s*("+T+")$|^$";var V=u++;a[V]="^"+a[j]+"\\s*("+w+")$|^$";var W=u++;a[W]="(\\s*)"+a[j]+"\\s*("+T+"|"+a[P]+")";o[W]=new RegExp(a[W],"g");var K="$1$2$3";var J=u++;a[J]="^\\s*("+a[P]+")"+"\\s+-\\s+"+"("+a[P]+")"+"\\s*$";var X=u++;a[X]="^\\s*("+a[S]+")"+"\\s+-\\s+"+"("+a[S]+")"+"\\s*$";var Y=u++;a[Y]="(<|>)?=?\\s*\\*";for(var Q=0;Qi){return null}var r=t.loose?o[k]:o[v];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>i){throw new TypeError("version is longer than "+i+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var s=e.trim().match(t.loose?o[k]:o[v]);if(!s){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>n||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>n||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>n||this.patch<0){throw new TypeError("Invalid patch version")}if(!s[4]){this.prerelease=[]}else{this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,i){if(typeof r==="string"){i=r;r=undefined}try{return new SemVer(e,r).inc(t,i).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var i=parse(t);var n="";if(r.prerelease.length||i.prerelease.length){n="pre";var s="prerelease"}for(var o in r){if(o==="major"||o==="minor"||o==="patch"){if(r[o]!==i[o]){return n+o}}}return s}}t.compareIdentifiers=compareIdentifiers;var Z=/^[0-9]+$/;function compareIdentifiers(e,t){var r=Z.test(e);var i=Z.test(t);if(r&&i){e=+e;t=+t}return e===t?0:r&&!i?-1:i&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,i){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,i);case"!=":return neq(e,r,i);case">":return gt(e,r,i);case">=":return gte(e,r,i);case"<":return lt(e,r,i);case"<=":return lte(e,r,i);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===ee){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var ee={};Comparator.prototype.parse=function(e){var t=this.options.loose?o[z]:o[V];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1];if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=ee}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===ee){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,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){r=new Range(this.value,t);return satisfies(e.semver,r,t)}var i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var s=this.semver.version===e.semver.version;var o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var u=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return i||n||s&&o||a||u};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.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 t=this.options.loose;e=e.trim();var i=t?o[X]:o[J];e=e.replace(i,hyphenReplace);r("hyphen replace",e);e=e.replace(o[W],K);r("comparator trim",e,o[W]);e=e.replace(o[L],D);e=e.replace(o[$],B);e=e.split(/\s+/).join(" ");var n=t?o[z]:o[V];var s=e.split(" ").map((function(e){return parseComparator(e,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){s=s.filter((function(e){return!!e.match(n)}))}s=s.map((function(e){return new Comparator(e,this.options)}),this);return s};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))};t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map((function(e){return replaceTilde(e,t)})).join(" ")}function replaceTilde(e,t){var i=t.loose?o[U]:o[I];return e.replace(i,(function(t,i,n,s,o){r("tilde",e,t,i,n,s,o);var a;if(isX(i)){a=""}else if(isX(n)){a=">="+i+".0.0 <"+(+i+1)+".0.0"}else if(isX(s)){a=">="+i+"."+n+".0 <"+i+"."+(+n+1)+".0"}else if(o){r("replaceTilde pr",o);a=">="+i+"."+n+"."+s+"-"+o+" <"+i+"."+(+n+1)+".0"}else{a=">="+i+"."+n+"."+s+" <"+i+"."+(+n+1)+".0"}r("tilde return",a);return a}))}function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,t)})).join(" ")}function replaceCaret(e,t){r("caret",e,t);var i=t.loose?o[N]:o[M];return e.replace(i,(function(t,i,n,s,o){r("caret",e,t,i,n,s,o);var a;if(isX(i)){a=""}else if(isX(n)){a=">="+i+".0.0 <"+(+i+1)+".0.0"}else if(isX(s)){if(i==="0"){a=">="+i+"."+n+".0 <"+i+"."+(+n+1)+".0"}else{a=">="+i+"."+n+".0 <"+(+i+1)+".0.0"}}else if(o){r("replaceCaret pr",o);if(i==="0"){if(n==="0"){a=">="+i+"."+n+"."+s+"-"+o+" <"+i+"."+n+"."+(+s+1)}else{a=">="+i+"."+n+"."+s+"-"+o+" <"+i+"."+(+n+1)+".0"}}else{a=">="+i+"."+n+"."+s+"-"+o+" <"+(+i+1)+".0.0"}}else{r("no pr");if(i==="0"){if(n==="0"){a=">="+i+"."+n+"."+s+" <"+i+"."+n+"."+(+s+1)}else{a=">="+i+"."+n+"."+s+" <"+i+"."+(+n+1)+".0"}}else{a=">="+i+"."+n+"."+s+" <"+(+i+1)+".0.0"}}r("caret return",a);return a}))}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map((function(e){return replaceXRange(e,t)})).join(" ")}function replaceXRange(e,t){e=e.trim();var i=t.loose?o[A]:o[x];return e.replace(i,(function(t,i,n,s,o,a){r("xRange",e,t,i,n,s,o,a);var u=isX(n);var p=u||isX(s);var c=p||isX(o);var d=c;if(i==="="&&d){i=""}if(u){if(i===">"||i==="<"){t="<0.0.0"}else{t="*"}}else if(i&&d){if(p){s=0}o=0;if(i===">"){i=">=";if(p){n=+n+1;s=0;o=0}else{s=+s+1;o=0}}else if(i==="<="){i="<";if(p){n=+n+1}else{s=+s+1}}t=i+n+"."+s+"."+o}else if(p){t=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(c){t=">="+n+"."+s+".0 <"+n+"."+(+s+1)+".0"}r("xRange return",t);return t}))}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(o[Y],"")}function hyphenReplace(e,t,r,i,n,s,o,a,u,p,c,d,l){if(isX(r)){t=""}else if(isX(i)){t=">="+r+".0.0"}else if(isX(n)){t=">="+r+"."+i+".0"}else{t=">="+t}if(isX(u)){a=""}else if(isX(p)){a="<"+(+u+1)+".0.0"}else if(isX(c)){a="<"+u+"."+(+p+1)+".0"}else if(d){a="<="+u+"."+p+"."+c+"-"+d}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){e=new SemVer(e,this.options)}for(var t=0;t0){var s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var i=null;var n=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(s.test(e)){if(!i||n.compare(e)===-1){i=e;n=new SemVer(i,r)}}}));return i}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var i=null;var n=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(s.test(e)){if(!i||n.compare(e)===1){i=e;n=new SemVer(i,r)}}}));return i}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var i=0;i":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,i){e=new SemVer(e,i);t=new Range(t,i);var n,s,o,a,u;switch(r){case">":n=gt;s=lte;o=lt;a=">";u=">=";break;case"<":n=lt;s=gte;o=gt;a="<";u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,i)){return false}for(var p=0;p=0.0.0")}d=d||e;l=l||e;if(n(e.semver,d.semver,i)){d=e}else if(o(e.semver,l.semver,i)){l=e}}));if(d.operator===a||d.operator===u){return false}if((!l.operator||l.operator===a)&&s(e,l.semver)){return false}else if(l.operator===u&&o(e,l.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e){if(e instanceof SemVer){return e}if(typeof e!=="string"){return null}var t=e.match(o[R]);if(t==null){return null}return parse(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},7032:(e,t,r)=>{"use strict";var i=r(2638);e.exports=function(e){var t=e.match(i);if(!t){return null}var r=t[0].replace(/#! ?/,"").split(" ");var n=r[0].split("/").pop();var s=r[1];return n==="env"?s:n+(s?" "+s:"")}},2638:e=>{"use strict";e.exports=/^#!.*/},4931:(e,t,r)=>{var i=r(2357);var n=r(3710);var s=r(8614);if(typeof s!=="function"){s=s.EventEmitter}var o;if(process.__signal_exit_emitter__){o=process.__signal_exit_emitter__}else{o=process.__signal_exit_emitter__=new s;o.count=0;o.emitted={}}if(!o.infinite){o.setMaxListeners(Infinity);o.infinite=true}e.exports=function(e,t){i.equal(typeof e,"function","a callback must be provided for exit handler");if(u===false){load()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var remove=function(){o.removeListener(r,e);if(o.listeners("exit").length===0&&o.listeners("afterexit").length===0){unload()}};o.on(r,e);return remove};e.exports.unload=unload;function unload(){if(!u){return}u=false;n.forEach((function(e){try{process.removeListener(e,a[e])}catch(e){}}));process.emit=c;process.reallyExit=p;o.count-=1}function emit(e,t,r){if(o.emitted[e]){return}o.emitted[e]=true;o.emit(e,t,r)}var a={};n.forEach((function(e){a[e]=function listener(){var t=process.listeners(e);if(t.length===o.count){unload();emit("exit",null,e);emit("afterexit",null,e);process.kill(process.pid,e)}}}));e.exports.signals=function(){return n};e.exports.load=load;var u=false;function load(){if(u){return}u=true;o.count+=1;n=n.filter((function(e){try{process.on(e,a[e]);return true}catch(e){return false}}));process.emit=processEmit;process.reallyExit=processReallyExit}var p=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);p.call(process,process.exitCode)}var c=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var r=c.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return r}else{return c.apply(this,arguments)}}},3710: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")}},5515:e=>{"use strict";e.exports=function(e){var t=typeof e==="string"?"\n":"\n".charCodeAt();var r=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===r){e=e.slice(0,e.length-1)}return e}},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var i=r(1631);var n=r(4016);var s=r(8605);var o=r(7211);var a=r(8614);var u=r(2357);var p=r(1669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,i,n){var s=toOptions(r,i,n);for(var o=0,a=t.requests.length;o=this.maxSockets){n.requests.push(s);return}n.createSocket(s,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,s)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var i={};r.sockets.push(i);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}c("making CONNECT request");var s=r.request(n);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,o,a){s.removeAllListeners();o.removeAllListeners();if(n.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",n.statusCode);o.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(i);return}if(a.length>0){c("got illegal response body from proxy");o.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(i);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(i)]=o;return t(o)}function onError(t){s.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(i)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(i){var s=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:i,servername:s?s.replace(/:.*$/,""):e.host});var a=n.connect(0,o);r.sockets[r.sockets.indexOf(i)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var i=_interopDefault(r(4824));function getUserAgent(){try{return`Node.js/${process.version.substr(1)} (${i()}; ${process.arch})`}catch(e){if(/wmic os get Caption/.test(e.message)){return"Windows "}throw e}}t.getUserAgent=getUserAgent},4207:(e,t,r)=>{e.exports=which;which.sync=whichSync;var i=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var n=r(5622);var s=i?";":":";var o=r(7126);function getNotFoundError(e){var t=new Error("not found: "+e);t.code="ENOENT";return t}function getPathInfo(e,t){var r=t.colon||s;var n=t.path||process.env.PATH||"";var o=[""];n=n.split(r);var a="";if(i){n.unshift(process.cwd());a=t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";o=a.split(r);if(e.indexOf(".")!==-1&&o[0]!=="")o.unshift("")}if(e.match(/\//)||i&&e.match(/\\/))n=[""];return{env:n,ext:o,extExe:a}}function which(e,t,r){if(typeof t==="function"){r=t;t={}}var i=getPathInfo(e,t);var s=i.env;var a=i.ext;var u=i.extExe;var p=[];(function F(i,c){if(i===c){if(t.all&&p.length)return r(null,p);else return r(getNotFoundError(e))}var d=s[i];if(d.charAt(0)==='"'&&d.slice(-1)==='"')d=d.slice(1,-1);var l=n.join(d,e);if(!d&&/^\.[\\\/]/.test(e)){l=e.slice(0,2)+l}(function E(e,n){if(e===n)return F(i+1,c);var s=a[e];o(l+s,{pathExt:u},(function(i,o){if(!i&&o){if(t.all)p.push(l+s);else return r(null,l+s)}return E(e+1,n)}))})(0,a.length)})(0,s.length)}function whichSync(e,t){t=t||{};var r=getPathInfo(e,t);var i=r.env;var s=r.ext;var a=r.extExe;var u=[];for(var p=0,c=i.length;p{"use strict";const i=r(2087);const n=r(5447);const s=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 windowsRelease=e=>{const t=/\d+\.\d/.exec(e||i.release());if(e&&!t){throw new Error("`release` argument doesn't match `n.n`")}const r=(t||[])[0];if((!e||e===i.release())&&["6.1","6.2","6.3","10.0"].includes(r)){const e=n.sync("wmic",["os","get","Caption"]).stdout||"";const t=(e.match(/2008|2012|2016/)||[])[0];if(t){return`Server ${t}`}}return s.get(r)};e.exports=windowsRelease},2940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{const generateMutationQuery=(e,t,r,i,n)=>{const s=e.repository.projects.nodes||[];const o=e.repository.owner&&e.repository.owner.projects&&e.repository.owner.projects.nodes||[];const a=[...s,...o].filter((e=>e.name===t)).flatMap((e=>e)).filter((e=>{const t=e.columns.nodes.filter((e=>e.name===r));return t.length>0}));if(a.length===0){throw new Error(`Could not find the column "${r}" or project "${t}"`)}const u={};for(const e of a){u[e.id]={columnId:e.columns.nodes.filter((e=>e.name===r)).map((e=>e.id))[0]}}const p=e.projectCards.nodes.filter((e=>e.project.name===t));for(const e of p){u[e.project.id].cardId=e.id;u[e.project.id].isArchived=e.isArchived}const c=Object.keys(u).map((e=>{if(n==="update"){return u[e].cardId?`mutation {\n\t\t\t\t\tmoveProjectCard( input: {\n\t\t\t\t\t\tcardId: "${u[e].cardId}",\n\t\t\t\t\t\tcolumnId: "${u[e].columnId}"\n\t\t\t\t}) { clientMutationId } }`:`mutation {\n\t\t\t\t\taddProjectCard( input: {\n\t\t\t\t\t\tcontentId: "${i}",\n\t\t\t\t\t\tprojectColumnId: "${u[e].columnId}"\n\t\t\t\t}) { clientMutationId } }`}if(n==="delete"&&u[e].cardId){return`mutation {\n\t\t\t\t\t\tdeleteProjectCard( input: {\n\t\t\t\t\t\t\tcardId: "${u[e].cardId}"\n\t\t\t\t\t}) { clientMutationId } }`}if(n==="archive"&&!u[e].isArchived){return`mutation {\n\t\t\t\t\t\tupdateProjectCard(input: { \n\t\t\t\t\t\t\tprojectCardId: "${u[e].cardId}", \n\t\t\t\t\t\t\tisArchived: true \n\t\t\t\t\t}) { clientMutationId } }`}if(n==="add"&&!u[e].cardId){return`mutation {\n\t\t\t\t\taddProjectCard( input: {\n\t\t\t\t\t\tcontentId: "${i}",\n\t\t\t\t\t\tprojectColumnId: "${u[e].columnId}"\n\t\t\t\t}) { clientMutationId } }`}return undefined}));return c.filter((e=>e!==undefined))};e.exports=generateMutationQuery},8305:e=>{const projectQuery=(e,t,r)=>`query {\n\t\tresource( url: "${e}" ) {\n\t\t\t... on ${!t?"Issue":"PullRequest"} {\n\t\t\t\tprojectCards {\n\t\t\t\t\tnodes {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tisArchived\n\t\t\t\t\t\tproject {\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trepository {\n\t\t\t\t\tprojects( search: "${r}", first: 10, states: [OPEN] ) {\n\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tcolumns( first: 100 ) {\n\t\t\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\towner {\n\t\t\t\t\t\t... on ProjectOwner {\n\t\t\t\t\t\t\tprojects( search: "${r}", first: 10, states: [OPEN] ) {\n\t\t\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tcolumns( first: 100 ) {\n\t\t\t\t\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}`;e.exports=projectQuery},3751:e=>{const t=new Set(["pull_request","pull_request_target","pull_request_review","issues","issue_comment"]);const getActionData=e=>{const{eventName:r,payload:i}=e;if(!t.has(r)){throw new Error(`Only pull requests, reviews, issues, or comments allowed. Received:\n${r}`)}const n=r==="issues"||r==="issue_comment"?i.issue:i.pull_request;return{eventName:r,action:i.action,nodeId:n.node_id,url:n.html_url,is_pr:!!i.pull_request||!!i.issue.pull_request}};e.exports=getActionData},2877:module=>{module.exports=eval("require")("encoding")},2357:e=>{"use strict";e.exports=require("assert")},3129:e=>{"use strict";e.exports=require("child_process")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},2413:e=>{"use strict";e.exports=require("stream")},4016:e=>{"use strict";e.exports=require("tls")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},8761:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var i=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);i=false}finally{if(i)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{const e=__nccwpck_require__(2186);const t=__nccwpck_require__(5438);const r=__nccwpck_require__(3751);const i=__nccwpck_require__(8305);const n=__nccwpck_require__(4683);(async()=>{try{const s=e.getInput("repo-token");const o=e.getInput("project");const a=e.getInput("column");const u=e.getInput("action")||"update";const{eventName:p,nodeId:c,url:d,is_pr:l}=r(t.context);const g=new t.GitHub(s);const m=i(d,l,o);e.debug(m);const{resource:h}=await g.graphql(m);e.debug(JSON.stringify(h));const y=n(h,o,a,c,u);if((u==="delete"||u==="archive"||u==="add")&&y.length===0){console.log("✅ There is nothing to do with card");return}e.debug(y.join("\n"));await Promise.all(y.map((e=>g.graphql(e))));if(y.length>1){console.log(`✅ Card materialised into to ${a} in ${y.length} projects called ${o}`)}else{console.log(`✅ Card materialised into ${a} in ${o}`)}}catch(t){e.setFailed(t.message)}})()})();module.exports=__webpack_exports__})(); \ No newline at end of file + */function isObjectObject(e){return isObject(e)===true&&Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObjectObject(e)===false)return false;t=e.constructor;if(typeof t!=="function")return false;r=t.prototype;if(isObjectObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},1554:e=>{"use strict";var t=e.exports=function(e){return e!==null&&typeof e==="object"&&typeof e.pipe==="function"};t.writable=function(e){return t(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object"};t.readable=function(e){return t(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object"};t.duplex=function(e){return t.writable(e)&&t.readable(e)};t.transform=function(e){return t.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object"}},7126:(e,t,r)=>{var i=r(5747);var n;if(process.platform==="win32"||global.TESTING_WINDOWS){n=r(2001)}else{n=r(9728)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,r){if(typeof t==="function"){r=t;t={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,i){isexe(e,t||{},(function(e,t){if(e){i(e)}else{r(t)}}))}))}n(e,t||{},(function(e,i){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;i=false}}r(e,i)}))}function sync(e,t){try{return n.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},9728:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var i=r(5747);function isexe(e,t,r){i.stat(e,(function(e,i){r(e,e?false:checkStat(i,t))}))}function sync(e,t){return checkStat(i.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var r=e.mode;var i=e.uid;var n=e.gid;var s=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var o=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var u=parseInt("010",8);var p=parseInt("001",8);var c=a|u;var d=r&p||r&u&&n===o||r&a&&i===s||r&c&&s===0;return d}},2001:(e,t,r)=>{e.exports=isexe;isexe.sync=sync;var i=r(5747);function checkPathExt(e,t){var r=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var i=0;i{var t="Expected a function";var r="__lodash_hash_undefined__";var i=1/0;var n="[object Function]",s="[object GeneratorFunction]",o="[object Symbol]";var a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,p=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var d=/[\\^$.*+?()[\]{}|]/g;var l=/\\(\\)?/g;var g=/^\[object .+?Constructor\]$/;var m=typeof global=="object"&&global&&global.Object===Object&&global;var h=typeof self=="object"&&self&&self.Object===Object&&self;var y=m||h||Function("return this")();function getValue(e,t){return e==null?undefined:e[t]}function isHostObject(e){var t=false;if(e!=null&&typeof e.toString!="function"){try{t=!!(e+"")}catch(e){}}return t}var b=Array.prototype,_=Function.prototype,q=Object.prototype;var v=y["__core-js_shared__"];var w=function(){var e=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var T=_.toString;var k=q.hasOwnProperty;var j=q.toString;var O=RegExp("^"+T.call(k).replace(d,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var C=y.Symbol,P=b.splice;var S=getNative(y,"Map"),x=getNative(Object,"create");var A=C?C.prototype:undefined,R=A?A.toString:undefined;function Hash(e){var t=-1,r=e?e.length:0;this.clear();while(++t-1}function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);if(i<0){r.push([e,t])}else{r[i][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e?e.length:0;this.clear();while(++t{var t="Expected a function";var r="__lodash_hash_undefined__";var i=1/0,n=9007199254740991;var s="[object Function]",o="[object GeneratorFunction]",a="[object Symbol]";var u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p=/^\w*$/,c=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var l=/[\\^$.*+?()[\]{}|]/g;var g=/\\(\\)?/g;var m=/^\[object .+?Constructor\]$/;var h=/^(?:0|[1-9]\d*)$/;var y=typeof global=="object"&&global&&global.Object===Object&&global;var b=typeof self=="object"&&self&&self.Object===Object&&self;var _=y||b||Function("return this")();function getValue(e,t){return e==null?undefined:e[t]}function isHostObject(e){var t=false;if(e!=null&&typeof e.toString!="function"){try{t=!!(e+"")}catch(e){}}return t}var q=Array.prototype,v=Function.prototype,w=Object.prototype;var T=_["__core-js_shared__"];var k=function(){var e=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var j=v.toString;var O=w.hasOwnProperty;var C=w.toString;var P=RegExp("^"+j.call(O).replace(l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var S=_.Symbol,x=q.splice;var A=getNative(_,"Map"),R=getNative(Object,"create");var G=S?S.prototype:undefined,L=G?G.toString:undefined;function Hash(e){var t=-1,r=e?e.length:0;this.clear();while(++t-1}function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);if(i<0){r.push([e,t])}else{r[i][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e?e.length:0;this.clear();while(++t-1&&e%1==0&&e{var t=200;var r="__lodash_hash_undefined__";var i=1/0;var n="[object Function]",s="[object GeneratorFunction]";var o=/[\\^$.*+?()[\]{}|]/g;var a=/^\[object .+?Constructor\]$/;var u=typeof global=="object"&&global&&global.Object===Object&&global;var p=typeof self=="object"&&self&&self.Object===Object&&self;var c=u||p||Function("return this")();function arrayIncludes(e,t){var r=e?e.length:0;return!!r&&baseIndexOf(e,t,0)>-1}function arrayIncludesWith(e,t,r){var i=-1,n=e?e.length:0;while(++i-1}function listCacheSet(e,t){var r=this.__data__,i=assocIndexOf(r,e);if(i<0){r.push([e,t])}else{r[i][1]=t}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(e){var t=-1,r=e?e.length:0;this.clear();while(++t=t){var c=r?null:j(e);if(c){return setToArray(c)}a=false;s=cacheHas;p=new SetCache}else{p=r?[]:u}e:while(++n{"use strict";const i=r(2087);const n=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 macosRelease=e=>{e=Number((e||i.release()).split(".")[0]);return{name:n.get(e),version:"10."+(e-4)}};e.exports=macosRelease;e.exports.default=macosRelease},8560:e=>{"use strict";e.exports=function(e){try{return e()}catch(e){}}},467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var i=_interopDefault(r(2413));var n=_interopDefault(r(8605));var s=_interopDefault(r(8835));var o=_interopDefault(r(7211));var a=_interopDefault(r(8761));const u=i.Readable;const p=Symbol("buffer");const c=Symbol("type");class Blob{constructor(){this[c]="";const e=arguments[0];const t=arguments[1];const r=[];let i=0;if(e){const t=e;const n=Number(t.length);for(let e=0;e1&&arguments[1]!==undefined?arguments[1]:{},n=r.size;let s=n===undefined?0:n;var o=r.timeout;let a=o===undefined?0:o;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 i);else{e=Buffer.from(String(e))}this[l]={body:e,disturbed:false,error:null};this.size=s;this.timeout=a;if(e instanceof i){e.on("error",(function(e){const r=e.name==="AbortError"?e:new FetchError(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[l].error=r}))}}Body.prototype={get body(){return this[l].body},get bodyUsed(){return this[l].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(t){return Object.assign(new Blob([],{type:e.toLowerCase()}),{[p]:t})}))},json(){var e=this;return consumeBody.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return Body.Promise.reject(new FetchError(`invalid json response body at ${e.url} reason: ${t.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(t){return convertBody(t,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 t of Object.getOwnPropertyNames(Body.prototype)){if(!(t in e)){const r=Object.getOwnPropertyDescriptor(Body.prototype,t);Object.defineProperty(e,t,r)}}};function consumeBody(){var e=this;if(this[l].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[l].disturbed=true;if(this[l].error){return Body.Promise.reject(this[l].error)}let t=this.body;if(t===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(t)){t=t.stream()}if(Buffer.isBuffer(t)){return Body.Promise.resolve(t)}if(!(t instanceof i)){return Body.Promise.resolve(Buffer.alloc(0))}let r=[];let n=0;let s=false;return new Body.Promise((function(i,o){let a;if(e.timeout){a=setTimeout((function(){s=true;o(new FetchError(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)}t.on("error",(function(t){if(t.name==="AbortError"){s=true;o(t)}else{o(new FetchError(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))}}));t.on("data",(function(t){if(s||t===null){return}if(e.size&&n+t.length>e.size){s=true;o(new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}n+=t.length;r.push(t)}));t.on("end",(function(){if(s){return}clearTimeout(a);try{i(Buffer.concat(r,n))}catch(t){o(new FetchError(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}))}))}function convertBody(e,t){if(typeof d!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const r=t.get("content-type");let i="utf-8";let n,s;if(r){n=/charset=([^;]*)/i.exec(r)}s=e.slice(0,1024).toString();if(!n&&s){n=/0&&arguments[0]!==undefined?arguments[0]:undefined;this[y]=Object.create(null);if(e instanceof Headers){const t=e.raw();const r=Object.keys(t);for(const e of r){for(const r of t[e]){this.append(e,r)}}return}if(e==null);else if(typeof e==="object"){const t=e[Symbol.iterator];if(t!=null){if(typeof t!=="function"){throw new TypeError("Header pairs must be iterable")}const r=[];for(const t of e){if(typeof t!=="object"||typeof t[Symbol.iterator]!=="function"){throw new TypeError("Each header pair must be iterable")}r.push(Array.from(t))}for(const e of r){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 t of Object.keys(e)){const r=e[t];this.append(t,r)}}}else{throw new TypeError("Provided initializer must be an object")}}get(e){e=`${e}`;validateName(e);const t=find(this[y],e);if(t===undefined){return null}return this[y][t].join(", ")}forEach(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined;let r=getHeaders(this);let i=0;while(i1&&arguments[1]!==undefined?arguments[1]:"key+value";const r=Object.keys(e[y]).sort();return r.map(t==="key"?function(e){return e.toLowerCase()}:t==="value"?function(t){return e[y][t].join(", ")}:function(t){return[t.toLowerCase(),e[y][t].join(", ")]})}const b=Symbol("internal");function createHeadersIterator(e,t){const r=Object.create(_);r[b]={target:e,kind:t,index:0};return r}const _=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==_){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[b];const t=e.target,r=e.kind,i=e.index;const n=getHeaders(t,r);const s=n.length;if(i>=s){return{value:undefined,done:true}}this[b].index=i+1;return{value:n[i],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(_,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const t=Object.assign({__proto__:null},e[y]);const r=find(e[y],"Host");if(r!==undefined){t[r]=t[r][0]}return t}function createHeadersLenient(e){const t=new Headers;for(const r of Object.keys(e)){if(m.test(r)){continue}if(Array.isArray(e[r])){for(const i of e[r]){if(h.test(i)){continue}if(t[y][r]===undefined){t[y][r]=[i]}else{t[y][r].push(i)}}}else if(!h.test(e[r])){t[y][r]=[e[r]]}}return t}const q=Symbol("Response internals");const v=n.STATUS_CODES;class Response{constructor(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Body.call(this,e,t);const r=t.status||200;const i=new Headers(t.headers);if(e!=null&&!i.has("Content-Type")){const t=extractContentType(e);if(t){i.append("Content-Type",t)}}this[q]={url:t.url,status:r,statusText:t.statusText||v[r],headers:i,counter:t.counter}}get url(){return this[q].url||""}get status(){return this[q].status}get ok(){return this[q].status>=200&&this[q].status<300}get redirected(){return this[q].counter>0}get statusText(){return this[q].statusText}get headers(){return this[q].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 w=Symbol("Request internals");const T=s.parse;const k=s.format;const j="destroy"in i.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[w]==="object"}function isAbortSignal(e){const t=e&&typeof e==="object"&&Object.getPrototypeOf(e);return!!(t&&t.constructor.name==="AbortSignal")}class Request{constructor(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let r;if(!isRequest(e)){if(e&&e.href){r=T(e.href)}else{r=T(`${e}`)}e={}}else{r=T(e.url)}let i=t.method||e.method||"GET";i=i.toUpperCase();if((t.body!=null||isRequest(e)&&e.body!==null)&&(i==="GET"||i==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}let n=t.body!=null?t.body:isRequest(e)&&e.body!==null?clone(e):null;Body.call(this,n,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});const s=new Headers(t.headers||e.headers||{});if(n!=null&&!s.has("Content-Type")){const e=extractContentType(n);if(e){s.append("Content-Type",e)}}let o=isRequest(e)?e.signal:null;if("signal"in t)o=t.signal;if(o!=null&&!isAbortSignal(o)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[w]={method:i,redirect:t.redirect||e.redirect||"follow",headers:s,parsedURL:r,signal:o};this.follow=t.follow!==undefined?t.follow:e.follow!==undefined?e.follow:20;this.compress=t.compress!==undefined?t.compress:e.compress!==undefined?e.compress:true;this.counter=t.counter||e.counter||0;this.agent=t.agent||e.agent}get method(){return this[w].method}get url(){return k(this[w].parsedURL)}get headers(){return this[w].headers}get redirect(){return this[w].redirect}get signal(){return this[w].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 t=e[w].parsedURL;const r=new Headers(e[w].headers);if(!r.has("Accept")){r.set("Accept","*/*")}if(!t.protocol||!t.hostname){throw new TypeError("Only absolute URLs are supported")}if(!/^https?:$/.test(t.protocol)){throw new TypeError("Only HTTP(S) protocols are supported")}if(e.signal&&e.body instanceof i.Readable&&!j){throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8")}let n=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)){n="0"}if(e.body!=null){const t=getTotalBytes(e);if(typeof t==="number"){n=String(t)}}if(n){r.set("Content-Length",n)}if(!r.has("User-Agent")){r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)")}if(e.compress&&!r.has("Accept-Encoding")){r.set("Accept-Encoding","gzip,deflate")}let s=e.agent;if(typeof s==="function"){s=s(t)}if(!r.has("Connection")&&!s){r.set("Connection","close")}return Object.assign({},t,{method:e.method,headers:exportNodeCompatibleHeaders(r),agent:s})}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 O=i.PassThrough;const C=s.resolve;function fetch(e,t){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(r,s){const u=new Request(e,t);const p=getNodeRequestOptions(u);const c=(p.protocol==="https:"?o:n).request;const d=u.signal;let l=null;const g=function abort(){let e=new AbortError("The user aborted a request.");s(e);if(u.body&&u.body instanceof i.Readable){u.body.destroy(e)}if(!l||!l.body)return;l.body.emit("error",e)};if(d&&d.aborted){g();return}const m=function abortAndFinalize(){g();finalize()};const h=c(p);let y;if(d){d.addEventListener("abort",m)}function finalize(){h.abort();if(d)d.removeEventListener("abort",m);clearTimeout(y)}if(u.timeout){h.once("socket",(function(e){y=setTimeout((function(){s(new FetchError(`network timeout at: ${u.url}`,"request-timeout"));finalize()}),u.timeout)}))}h.on("error",(function(e){s(new FetchError(`request to ${u.url} failed, reason: ${e.message}`,"system",e));finalize()}));h.on("response",(function(e){clearTimeout(y);const t=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const i=t.get("Location");const n=i===null?null:C(u.url,i);switch(u.redirect){case"error":s(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${u.url}`,"no-redirect"));finalize();return;case"manual":if(n!==null){try{t.set("Location",n)}catch(e){s(e)}}break;case"follow":if(n===null){break}if(u.counter>=u.follow){s(new FetchError(`maximum redirect reached at: ${u.url}`,"max-redirect"));finalize();return}const i={headers:new Headers(u.headers),follow:u.follow,counter:u.counter+1,agent:u.agent,compress:u.compress,method:u.method,body:u.body,signal:u.signal,timeout:u.timeout,size:u.size};if(e.statusCode!==303&&u.body&&getTotalBytes(u)===null){s(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)&&u.method==="POST"){i.method="GET";i.body=undefined;i.headers.delete("content-length")}r(fetch(new Request(n,i)));finalize();return}}e.once("end",(function(){if(d)d.removeEventListener("abort",m)}));let i=e.pipe(new O);const n={url:u.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:u.size,timeout:u.timeout,counter:u.counter};const o=t.get("Content-Encoding");if(!u.compress||u.method==="HEAD"||o===null||e.statusCode===204||e.statusCode===304){l=new Response(i,n);r(l);return}const p={flush:a.Z_SYNC_FLUSH,finishFlush:a.Z_SYNC_FLUSH};if(o=="gzip"||o=="x-gzip"){i=i.pipe(a.createGunzip(p));l=new Response(i,n);r(l);return}if(o=="deflate"||o=="x-deflate"){const t=e.pipe(new O);t.once("data",(function(e){if((e[0]&15)===8){i=i.pipe(a.createInflate())}else{i=i.pipe(a.createInflateRaw())}l=new Response(i,n);r(l)}));return}if(o=="br"&&typeof a.createBrotliDecompress==="function"){i=i.pipe(a.createBrotliDecompress());l=new Response(i,n);r(l);return}l=new Response(i,n);r(l)}));writeToStream(h,u)}))}fetch.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};fetch.Promise=global.Promise;e.exports=t=fetch;Object.defineProperty(t,"__esModule",{value:true});t.default=t;t.Headers=Headers;t.Request=Request;t.Response=Response;t.FetchError=FetchError},502:(e,t,r)=>{"use strict";const i=r(5622);const n=r(539);e.exports=e=>{e=Object.assign({cwd:process.cwd(),path:process.env[n()]},e);let t;let r=i.resolve(e.cwd);const s=[];while(t!==r){s.push(i.join(r,"node_modules/.bin"));t=r;r=i.resolve(r,"..")}s.push(i.dirname(process.execPath));return s.concat(e.path).join(i.delimiter)};e.exports.env=t=>{t=Object.assign({env:process.env},t);const r=Object.assign({},t.env);const i=n({env:r});t.path=r[i];r[i]=e.exports(t);return r}},2072:(e,t,r)=>{e.exports=paginationMethodsPlugin;function paginationMethodsPlugin(e){e.getFirstPage=r(9555).bind(null,e);e.getLastPage=r(2203).bind(null,e);e.getNextPage=r(6655).bind(null,e);e.getPreviousPage=r(3032).bind(null,e);e.hasFirstPage=r(9631);e.hasLastPage=r(4286);e.hasNextPage=r(500);e.hasPreviousPage=r(5996)}},191:e=>{e.exports=deprecate;const t={};function deprecate(e){if(t[e]){return}console.warn(`DEPRECATED (@octokit/rest): ${e}`);t[e]=1}},9555:(e,t,r)=>{e.exports=getFirstPage;const i=r(8604);function getFirstPage(e,t,r){return i(e,t,"first",r)}},2203:(e,t,r)=>{e.exports=getLastPage;const i=r(8604);function getLastPage(e,t,r){return i(e,t,"last",r)}},6655:(e,t,r)=>{e.exports=getNextPage;const i=r(8604);function getNextPage(e,t,r){return i(e,t,"next",r)}},7889:e=>{e.exports=getPageLinks;function getPageLinks(e){e=e.link||e.headers.link||"";const t={};e.replace(/<([^>]*)>;\s*rel="([\w]*)"/g,((e,r,i)=>{t[i]=r}));return t}},8604:(e,t,r)=>{e.exports=getPage;const i=r(191);const n=r(7889);const s=r(6058);function getPage(e,t,r,o){i(`octokit.get${r.charAt(0).toUpperCase()+r.slice(1)}Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);const a=n(t)[r];if(!a){const e=new s(`No ${r} page found`,404);return Promise.reject(e)}const u={url:a,headers:applyAcceptHeader(t,o)};const p=e.request(u);return p}function applyAcceptHeader(e,t){const r=e.headers&&e.headers["x-github-media-type"];if(!r||t&&t.accept){return t}t=t||{};t.accept="application/vnd."+r.replace("; param=",".").replace("; format=","+");return t}},3032:(e,t,r)=>{e.exports=getPreviousPage;const i=r(8604);function getPreviousPage(e,t,r){return i(e,t,"prev",r)}},9631:(e,t,r)=>{e.exports=hasFirstPage;const i=r(191);const n=r(7889);function hasFirstPage(e){i(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).first}},4286:(e,t,r)=>{e.exports=hasLastPage;const i=r(191);const n=r(7889);function hasLastPage(e){i(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).last}},500:(e,t,r)=>{e.exports=hasNextPage;const i=r(191);const n=r(7889);function hasNextPage(e){i(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).next}},5996:(e,t,r)=>{e.exports=hasPreviousPage;const i=r(191);const n=r(7889);function hasPreviousPage(e){i(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`);return n(e).prev}},6058:e=>{e.exports=class HttpError extends Error{constructor(e,t,r){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.code=t;this.headers=r}}},1223:(e,t,r)=>{var i=r(2940);e.exports=i(once);e.exports.strict=i(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 f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},4824:(e,t,r)=>{"use strict";const i=r(2087);const n=r(7493);const s=r(3515);const osName=(e,t)=>{if(!e&&t){throw new Error("You can't specify a `release` without specifying `platform`")}e=e||i.platform();let r;if(e==="darwin"){if(!t&&i.platform()==="darwin"){t=i.release()}const e=t?Number(t.split(".")[0])>15?"macOS":"OS X":"macOS";r=t?n(t).name:"";return e+(r?" "+r:"")}if(e==="linux"){if(!t&&i.platform()==="linux"){t=i.release()}r=t?t.replace(/^(\d+\.\d+).*/,"$1"):"";return"Linux"+(r?" "+r:"")}if(e==="win32"){if(!t&&i.platform()==="win32"){t=i.release()}r=t?s(t):"";return"Windows"+(r?" "+r:"")}return e};e.exports=osName},1330:e=>{"use strict";e.exports=(e,t)=>{t=t||(()=>{});return e.then((e=>new Promise((e=>{e(t())})).then((()=>e))),(e=>new Promise((e=>{e(t())})).then((()=>{throw e}))))}},539:e=>{"use strict";e.exports=e=>{e=e||{};const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).find((e=>e.toUpperCase()==="PATH"))||"Path"}},8341:(e,t,r)=>{var i=r(1223);var n=r(1205);var s=r(5747);var noop=function(){};var o=/^v?\.0/.test(process.version);var isFn=function(e){return typeof e==="function"};var isFS=function(e){if(!o)return false;if(!s)return false;return(e instanceof(s.ReadStream||noop)||e instanceof(s.WriteStream||noop))&&isFn(e.close)};var isRequest=function(e){return e.setHeader&&isFn(e.abort)};var destroyer=function(e,t,r,s){s=i(s);var o=false;e.on("close",(function(){o=true}));n(e,{readable:t,writable:r},(function(e){if(e)return s(e);o=true;s()}));var a=false;return function(t){if(o)return;if(a)return;a=true;if(isFS(e))return e.close(noop);if(isRequest(e))return e.abort();if(isFn(e.destroy))return e.destroy();s(t||new Error("stream was destroyed"))}};var call=function(e){e()};var pipe=function(e,t){return e.pipe(t)};var pump=function(){var e=Array.prototype.slice.call(arguments);var t=isFn(e[e.length-1]||noop)&&e.pop()||noop;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var i=e.map((function(n,s){var o=s0;return destroyer(n,o,a,(function(e){if(!r)r=e;if(e)i.forEach(call);if(o)return;i.forEach(call);t(r)}))}));return e.reduce(pipe)};e.exports=pump},5911:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var i=256;var n=Number.MAX_SAFE_INTEGER||9007199254740991;var s=16;var o=t.re=[];var a=t.src=[];var u=0;var p=u++;a[p]="0|[1-9]\\d*";var c=u++;a[c]="[0-9]+";var d=u++;a[d]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var l=u++;a[l]="("+a[p]+")\\."+"("+a[p]+")\\."+"("+a[p]+")";var g=u++;a[g]="("+a[c]+")\\."+"("+a[c]+")\\."+"("+a[c]+")";var m=u++;a[m]="(?:"+a[p]+"|"+a[d]+")";var h=u++;a[h]="(?:"+a[c]+"|"+a[d]+")";var y=u++;a[y]="(?:-("+a[m]+"(?:\\."+a[m]+")*))";var b=u++;a[b]="(?:-?("+a[h]+"(?:\\."+a[h]+")*))";var _=u++;a[_]="[0-9A-Za-z-]+";var q=u++;a[q]="(?:\\+("+a[_]+"(?:\\."+a[_]+")*))";var v=u++;var w="v?"+a[l]+a[y]+"?"+a[q]+"?";a[v]="^"+w+"$";var T="[v=\\s]*"+a[g]+a[b]+"?"+a[q]+"?";var k=u++;a[k]="^"+T+"$";var j=u++;a[j]="((?:<|>)?=?)";var O=u++;a[O]=a[c]+"|x|X|\\*";var C=u++;a[C]=a[p]+"|x|X|\\*";var P=u++;a[P]="[v=\\s]*("+a[C]+")"+"(?:\\.("+a[C]+")"+"(?:\\.("+a[C]+")"+"(?:"+a[y]+")?"+a[q]+"?"+")?)?";var S=u++;a[S]="[v=\\s]*("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:\\.("+a[O]+")"+"(?:"+a[b]+")?"+a[q]+"?"+")?)?";var x=u++;a[x]="^"+a[j]+"\\s*"+a[P]+"$";var A=u++;a[A]="^"+a[j]+"\\s*"+a[S]+"$";var R=u++;a[R]="(?:^|[^\\d])"+"(\\d{1,"+s+"})"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:$|[^\\d])";var G=u++;a[G]="(?:~>?)";var L=u++;a[L]="(\\s*)"+a[G]+"\\s+";o[L]=new RegExp(a[L],"g");var D="$1~";var I=u++;a[I]="^"+a[G]+a[P]+"$";var U=u++;a[U]="^"+a[G]+a[S]+"$";var H=u++;a[H]="(?:\\^)";var $=u++;a[$]="(\\s*)"+a[H]+"\\s+";o[$]=new RegExp(a[$],"g");var B="$1^";var M=u++;a[M]="^"+a[H]+a[P]+"$";var N=u++;a[N]="^"+a[H]+a[S]+"$";var z=u++;a[z]="^"+a[j]+"\\s*("+T+")$|^$";var V=u++;a[V]="^"+a[j]+"\\s*("+w+")$|^$";var W=u++;a[W]="(\\s*)"+a[j]+"\\s*("+T+"|"+a[P]+")";o[W]=new RegExp(a[W],"g");var K="$1$2$3";var J=u++;a[J]="^\\s*("+a[P]+")"+"\\s+-\\s+"+"("+a[P]+")"+"\\s*$";var X=u++;a[X]="^\\s*("+a[S]+")"+"\\s+-\\s+"+"("+a[S]+")"+"\\s*$";var Y=u++;a[Y]="(<|>)?=?\\s*\\*";for(var Q=0;Qi){return null}var r=t.loose?o[k]:o[v];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>i){throw new TypeError("version is longer than "+i+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var s=e.trim().match(t.loose?o[k]:o[v]);if(!s){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>n||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>n||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>n||this.patch<0){throw new TypeError("Invalid patch version")}if(!s[4]){this.prerelease=[]}else{this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,i){if(typeof r==="string"){i=r;r=undefined}try{return new SemVer(e,r).inc(t,i).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var i=parse(t);var n="";if(r.prerelease.length||i.prerelease.length){n="pre";var s="prerelease"}for(var o in r){if(o==="major"||o==="minor"||o==="patch"){if(r[o]!==i[o]){return n+o}}}return s}}t.compareIdentifiers=compareIdentifiers;var Z=/^[0-9]+$/;function compareIdentifiers(e,t){var r=Z.test(e);var i=Z.test(t);if(r&&i){e=+e;t=+t}return e===t?0:r&&!i?-1:i&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,i){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,i);case"!=":return neq(e,r,i);case">":return gt(e,r,i);case">=":return gte(e,r,i);case"<":return lt(e,r,i);case"<=":return lte(e,r,i);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===ee){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var ee={};Comparator.prototype.parse=function(e){var t=this.options.loose?o[z]:o[V];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1];if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=ee}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===ee){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,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){r=new Range(this.value,t);return satisfies(e.semver,r,t)}var i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var s=this.semver.version===e.semver.version;var o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var u=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return i||n||s&&o||a||u};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.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 t=this.options.loose;e=e.trim();var i=t?o[X]:o[J];e=e.replace(i,hyphenReplace);r("hyphen replace",e);e=e.replace(o[W],K);r("comparator trim",e,o[W]);e=e.replace(o[L],D);e=e.replace(o[$],B);e=e.split(/\s+/).join(" ");var n=t?o[z]:o[V];var s=e.split(" ").map((function(e){return parseComparator(e,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){s=s.filter((function(e){return!!e.match(n)}))}s=s.map((function(e){return new Comparator(e,this.options)}),this);return s};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))};t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map((function(e){return replaceTilde(e,t)})).join(" ")}function replaceTilde(e,t){var i=t.loose?o[U]:o[I];return e.replace(i,(function(t,i,n,s,o){r("tilde",e,t,i,n,s,o);var a;if(isX(i)){a=""}else if(isX(n)){a=">="+i+".0.0 <"+(+i+1)+".0.0"}else if(isX(s)){a=">="+i+"."+n+".0 <"+i+"."+(+n+1)+".0"}else if(o){r("replaceTilde pr",o);a=">="+i+"."+n+"."+s+"-"+o+" <"+i+"."+(+n+1)+".0"}else{a=">="+i+"."+n+"."+s+" <"+i+"."+(+n+1)+".0"}r("tilde return",a);return a}))}function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,t)})).join(" ")}function replaceCaret(e,t){r("caret",e,t);var i=t.loose?o[N]:o[M];return e.replace(i,(function(t,i,n,s,o){r("caret",e,t,i,n,s,o);var a;if(isX(i)){a=""}else if(isX(n)){a=">="+i+".0.0 <"+(+i+1)+".0.0"}else if(isX(s)){if(i==="0"){a=">="+i+"."+n+".0 <"+i+"."+(+n+1)+".0"}else{a=">="+i+"."+n+".0 <"+(+i+1)+".0.0"}}else if(o){r("replaceCaret pr",o);if(i==="0"){if(n==="0"){a=">="+i+"."+n+"."+s+"-"+o+" <"+i+"."+n+"."+(+s+1)}else{a=">="+i+"."+n+"."+s+"-"+o+" <"+i+"."+(+n+1)+".0"}}else{a=">="+i+"."+n+"."+s+"-"+o+" <"+(+i+1)+".0.0"}}else{r("no pr");if(i==="0"){if(n==="0"){a=">="+i+"."+n+"."+s+" <"+i+"."+n+"."+(+s+1)}else{a=">="+i+"."+n+"."+s+" <"+i+"."+(+n+1)+".0"}}else{a=">="+i+"."+n+"."+s+" <"+(+i+1)+".0.0"}}r("caret return",a);return a}))}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map((function(e){return replaceXRange(e,t)})).join(" ")}function replaceXRange(e,t){e=e.trim();var i=t.loose?o[A]:o[x];return e.replace(i,(function(t,i,n,s,o,a){r("xRange",e,t,i,n,s,o,a);var u=isX(n);var p=u||isX(s);var c=p||isX(o);var d=c;if(i==="="&&d){i=""}if(u){if(i===">"||i==="<"){t="<0.0.0"}else{t="*"}}else if(i&&d){if(p){s=0}o=0;if(i===">"){i=">=";if(p){n=+n+1;s=0;o=0}else{s=+s+1;o=0}}else if(i==="<="){i="<";if(p){n=+n+1}else{s=+s+1}}t=i+n+"."+s+"."+o}else if(p){t=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(c){t=">="+n+"."+s+".0 <"+n+"."+(+s+1)+".0"}r("xRange return",t);return t}))}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(o[Y],"")}function hyphenReplace(e,t,r,i,n,s,o,a,u,p,c,d,l){if(isX(r)){t=""}else if(isX(i)){t=">="+r+".0.0"}else if(isX(n)){t=">="+r+"."+i+".0"}else{t=">="+t}if(isX(u)){a=""}else if(isX(p)){a="<"+(+u+1)+".0.0"}else if(isX(c)){a="<"+u+"."+(+p+1)+".0"}else if(d){a="<="+u+"."+p+"."+c+"-"+d}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){e=new SemVer(e,this.options)}for(var t=0;t0){var s=e[n].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var i=null;var n=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(s.test(e)){if(!i||n.compare(e)===-1){i=e;n=new SemVer(i,r)}}}));return i}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var i=null;var n=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(s.test(e)){if(!i||n.compare(e)===1){i=e;n=new SemVer(i,r)}}}));return i}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var i=0;i":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,i){e=new SemVer(e,i);t=new Range(t,i);var n,s,o,a,u;switch(r){case">":n=gt;s=lte;o=lt;a=">";u=">=";break;case"<":n=lt;s=gte;o=gt;a="<";u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,i)){return false}for(var p=0;p=0.0.0")}d=d||e;l=l||e;if(n(e.semver,d.semver,i)){d=e}else if(o(e.semver,l.semver,i)){l=e}}));if(d.operator===a||d.operator===u){return false}if((!l.operator||l.operator===a)&&s(e,l.semver)){return false}else if(l.operator===u&&o(e,l.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e){if(e instanceof SemVer){return e}if(typeof e!=="string"){return null}var t=e.match(o[R]);if(t==null){return null}return parse(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},7032:(e,t,r)=>{"use strict";var i=r(2638);e.exports=function(e){var t=e.match(i);if(!t){return null}var r=t[0].replace(/#! ?/,"").split(" ");var n=r[0].split("/").pop();var s=r[1];return n==="env"?s:n+(s?" "+s:"")}},2638:e=>{"use strict";e.exports=/^#!.*/},4931:(e,t,r)=>{var i=r(2357);var n=r(3710);var s=r(8614);if(typeof s!=="function"){s=s.EventEmitter}var o;if(process.__signal_exit_emitter__){o=process.__signal_exit_emitter__}else{o=process.__signal_exit_emitter__=new s;o.count=0;o.emitted={}}if(!o.infinite){o.setMaxListeners(Infinity);o.infinite=true}e.exports=function(e,t){i.equal(typeof e,"function","a callback must be provided for exit handler");if(u===false){load()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var remove=function(){o.removeListener(r,e);if(o.listeners("exit").length===0&&o.listeners("afterexit").length===0){unload()}};o.on(r,e);return remove};e.exports.unload=unload;function unload(){if(!u){return}u=false;n.forEach((function(e){try{process.removeListener(e,a[e])}catch(e){}}));process.emit=c;process.reallyExit=p;o.count-=1}function emit(e,t,r){if(o.emitted[e]){return}o.emitted[e]=true;o.emit(e,t,r)}var a={};n.forEach((function(e){a[e]=function listener(){var t=process.listeners(e);if(t.length===o.count){unload();emit("exit",null,e);emit("afterexit",null,e);process.kill(process.pid,e)}}}));e.exports.signals=function(){return n};e.exports.load=load;var u=false;function load(){if(u){return}u=true;o.count+=1;n=n.filter((function(e){try{process.on(e,a[e]);return true}catch(e){return false}}));process.emit=processEmit;process.reallyExit=processReallyExit}var p=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);p.call(process,process.exitCode)}var c=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var r=c.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return r}else{return c.apply(this,arguments)}}},3710: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")}},5515:e=>{"use strict";e.exports=function(e){var t=typeof e==="string"?"\n":"\n".charCodeAt();var r=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===r){e=e.slice(0,e.length-1)}return e}},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var i=r(1631);var n=r(4016);var s=r(8605);var o=r(7211);var a=r(8614);var u=r(2357);var p=r(1669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,i,n){var s=toOptions(r,i,n);for(var o=0,a=t.requests.length;o=this.maxSockets){n.requests.push(s);return}n.createSocket(s,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){n.emit("free",t,s)}function onCloseOrRemove(e){n.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var i={};r.sockets.push(i);var n=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){n.localAddress=e.localAddress}if(n.proxyAuth){n.headers=n.headers||{};n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")}c("making CONNECT request");var s=r.request(n);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(n,o,a){s.removeAllListeners();o.removeAllListeners();if(n.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",n.statusCode);o.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+n.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(i);return}if(a.length>0){c("got illegal response body from proxy");o.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(i);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(i)]=o;return t(o)}function onError(t){s.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var n=new Error("tunneling socket could not be established, "+"cause="+t.message);n.code="ECONNRESET";e.request.emit("error",n);r.removeSocket(i)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(i){var s=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:i,servername:s?s.replace(/:.*$/,""):e.host});var a=n.connect(0,o);r.sockets[r.sockets.indexOf(i)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var i=_interopDefault(r(4824));function getUserAgent(){try{return`Node.js/${process.version.substr(1)} (${i()}; ${process.arch})`}catch(e){if(/wmic os get Caption/.test(e.message)){return"Windows "}throw e}}t.getUserAgent=getUserAgent},4207:(e,t,r)=>{e.exports=which;which.sync=whichSync;var i=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var n=r(5622);var s=i?";":":";var o=r(7126);function getNotFoundError(e){var t=new Error("not found: "+e);t.code="ENOENT";return t}function getPathInfo(e,t){var r=t.colon||s;var n=t.path||process.env.PATH||"";var o=[""];n=n.split(r);var a="";if(i){n.unshift(process.cwd());a=t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";o=a.split(r);if(e.indexOf(".")!==-1&&o[0]!=="")o.unshift("")}if(e.match(/\//)||i&&e.match(/\\/))n=[""];return{env:n,ext:o,extExe:a}}function which(e,t,r){if(typeof t==="function"){r=t;t={}}var i=getPathInfo(e,t);var s=i.env;var a=i.ext;var u=i.extExe;var p=[];(function F(i,c){if(i===c){if(t.all&&p.length)return r(null,p);else return r(getNotFoundError(e))}var d=s[i];if(d.charAt(0)==='"'&&d.slice(-1)==='"')d=d.slice(1,-1);var l=n.join(d,e);if(!d&&/^\.[\\\/]/.test(e)){l=e.slice(0,2)+l}(function E(e,n){if(e===n)return F(i+1,c);var s=a[e];o(l+s,{pathExt:u},(function(i,o){if(!i&&o){if(t.all)p.push(l+s);else return r(null,l+s)}return E(e+1,n)}))})(0,a.length)})(0,s.length)}function whichSync(e,t){t=t||{};var r=getPathInfo(e,t);var i=r.env;var s=r.ext;var a=r.extExe;var u=[];for(var p=0,c=i.length;p{"use strict";const i=r(2087);const n=r(5447);const s=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 windowsRelease=e=>{const t=/\d+\.\d/.exec(e||i.release());if(e&&!t){throw new Error("`release` argument doesn't match `n.n`")}const r=(t||[])[0];if((!e||e===i.release())&&["6.1","6.2","6.3","10.0"].includes(r)){const e=n.sync("wmic",["os","get","Caption"]).stdout||"";const t=(e.match(/2008|2012|2016/)||[])[0];if(t){return`Server ${t}`}}return s.get(r)};e.exports=windowsRelease},2940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{const generateMutationQuery=(e,t,r,i,n)=>{const s=e.repository.projects.nodes||[];const o=e.repository.owner&&e.repository.owner.projects&&e.repository.owner.projects.nodes||[];const a=[...s,...o].filter((e=>e.name===t)).flatMap((e=>e)).filter((e=>{const t=e.columns.nodes.filter((e=>e.name===r));return t.length>0}));if(a.length===0){throw new Error(`Could not find the column "${r}" or project "${t}"`)}const u={};for(const e of a){u[e.id]={columnId:e.columns.nodes.filter((e=>e.name===r)).map((e=>e.id))[0]}}const p=e.projectCards.nodes.filter((e=>e.project.name===t));for(const e of p){u[e.project.id].cardId=e.id;u[e.project.id].isArchived=e.isArchived}const c=Object.keys(u).map((e=>{if(n==="update"){return u[e].cardId?`mutation {\n\t\t\t\t\tmoveProjectCard( input: {\n\t\t\t\t\t\tcardId: "${u[e].cardId}",\n\t\t\t\t\t\tcolumnId: "${u[e].columnId}"\n\t\t\t\t}) { clientMutationId } }`:`mutation {\n\t\t\t\t\taddProjectCard( input: {\n\t\t\t\t\t\tcontentId: "${i}",\n\t\t\t\t\t\tprojectColumnId: "${u[e].columnId}"\n\t\t\t\t}) { clientMutationId } }`}if(n==="delete"&&u[e].cardId){return`mutation {\n\t\t\t\t\t\tdeleteProjectCard( input: {\n\t\t\t\t\t\t\tcardId: "${u[e].cardId}"\n\t\t\t\t\t}) { clientMutationId } }`}if(n==="archive"&&!u[e].isArchived){return`mutation {\n\t\t\t\t\t\tupdateProjectCard(input: { \n\t\t\t\t\t\t\tprojectCardId: "${u[e].cardId}", \n\t\t\t\t\t\t\tisArchived: true \n\t\t\t\t\t}) { clientMutationId } }`}if(n==="add"&&!u[e].cardId){return`mutation {\n\t\t\t\t\taddProjectCard( input: {\n\t\t\t\t\t\tcontentId: "${i}",\n\t\t\t\t\t\tprojectColumnId: "${u[e].columnId}"\n\t\t\t\t}) { clientMutationId } }`}return undefined}));return c.filter((e=>e!==undefined))};e.exports=generateMutationQuery},8305:e=>{const projectQuery=(e,t,r)=>`query {\n\t\tresource( url: "${e}" ) {\n\t\t\t... on ${!t.pull_request&&!t.issue.pull_request?"Issue":"PullRequest"} {\n\t\t\t\tprojectCards {\n\t\t\t\t\tnodes {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tisArchived\n\t\t\t\t\t\tproject {\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trepository {\n\t\t\t\t\tprojects( search: "${r}", first: 10, states: [OPEN] ) {\n\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\tcolumns( first: 100 ) {\n\t\t\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\towner {\n\t\t\t\t\t\t... on ProjectOwner {\n\t\t\t\t\t\t\tprojects( search: "${r}", first: 10, states: [OPEN] ) {\n\t\t\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\tcolumns( first: 100 ) {\n\t\t\t\t\t\t\t\t\t\tnodes {\n\t\t\t\t\t\t\t\t\t\t\tid\n\t\t\t\t\t\t\t\t\t\t\tname\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}`;e.exports=projectQuery},3751:e=>{const t=new Set(["pull_request","pull_request_target","pull_request_review","issues","issue_comment"]);const getActionData=e=>{const{eventName:r,payload:i}=e;if(!t.has(r)){throw new Error(`Only pull requests, reviews, issues, or comments allowed. Received:\n${r}`)}const n=r==="issues"||r==="issue_comment"?i.issue:i.pull_request;return{eventName:r,action:i.action,nodeId:n.node_id,url:n.html_url}};e.exports=getActionData},2877:module=>{module.exports=eval("require")("encoding")},2357:e=>{"use strict";e.exports=require("assert")},3129:e=>{"use strict";e.exports=require("child_process")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},2413:e=>{"use strict";e.exports=require("stream")},4016:e=>{"use strict";e.exports=require("tls")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},8761:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var i=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);i=false}finally{if(i)delete __webpack_module_cache__[e]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{const e=__nccwpck_require__(2186);const t=__nccwpck_require__(5438);const r=__nccwpck_require__(3751);const i=__nccwpck_require__(8305);const n=__nccwpck_require__(4683);(async()=>{try{const s=e.getInput("repo-token");const o=e.getInput("project");const a=e.getInput("column");const u=e.getInput("action")||"update";const{eventName:p,nodeId:c,url:d}=r(t.context);const l=new t.GitHub(s);const g=i(d,t.context.payload,o);e.debug(g);const{resource:m}=await l.graphql(g);e.debug(JSON.stringify(m));const h=n(m,o,a,c,u);if((u==="delete"||u==="archive"||u==="add")&&h.length===0){console.log("✅ There is nothing to do with card");return}e.debug(h.join("\n"));await Promise.all(h.map((e=>l.graphql(e))));if(h.length>1){console.log(`✅ Card materialised into to ${a} in ${h.length} projects called ${o}`)}else{console.log(`✅ Card materialised into ${a} in ${o}`)}}catch(t){e.setFailed(t.message)}})()})();module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/src/generate-project-query.js b/src/generate-project-query.js index 93f8a98..5b58963 100644 --- a/src/generate-project-query.js +++ b/src/generate-project-query.js @@ -2,13 +2,13 @@ * GraphQl query to get project and column information * * @param {string} url - Issue or Pull request url - * @param {string} is_pr - Whether the event is a Pull Request (false if it's an Issue) + * @param {string} payload - The event payload * @param {string} project - The project to find */ -const projectQuery = (url, is_pr, project) => +const projectQuery = (url, payload, project) => `query { resource( url: "${url}" ) { - ... on ${!is_pr ? 'Issue' : 'PullRequest'} { + ... on ${!payload.pull_request && !payload.issue.pull_request ? 'Issue' : 'PullRequest'} { projectCards { nodes { id diff --git a/src/get-action-data.js b/src/get-action-data.js index b6f60b9..dfd934f 100644 --- a/src/get-action-data.js +++ b/src/get-action-data.js @@ -25,8 +25,7 @@ const getActionData = githubContext => { eventName, action: payload.action, nodeId: githubData.node_id, - url: githubData.html_url, - is_pr: !!payload.pull_request || !!payload.issue.pull_request + url: githubData.html_url } }; diff --git a/src/index.js b/src/index.js index e99a18c..e6f5c5c 100644 --- a/src/index.js +++ b/src/index.js @@ -13,13 +13,13 @@ const generateMutationQuery = require('./generate-mutation-query'); const action = core.getInput('action') || 'update'; // Get data from the current action - const {eventName, nodeId, url, is_pr} = getActionData(github.context); + const {eventName, nodeId, url} = getActionData(github.context); // Create a method to query GitHub const octokit = new github.GitHub(token); // Get the column ID from searching for the project and card Id if it exists - const projectQuery = generateProjectQuery(url, is_pr, project); + const projectQuery = generateProjectQuery(url, github.context.payload, project); core.debug(projectQuery);