From 1bc666955e37474717f2f642e703162730617789 Mon Sep 17 00:00:00 2001 From: Mark Abspoel Date: Mon, 9 Oct 2023 15:50:12 +0200 Subject: [PATCH] Customize and add hash pinning --- .github/workflows/compile.yml | 6 +- dist/index.js | 1 - package-lock.json | 334 ++++++++++++++++++---------------- package.json | 18 +- src/index.ts | 14 +- 5 files changed, 200 insertions(+), 173 deletions(-) delete mode 100644 dist/index.js diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index e213fa0..bd47bb8 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -21,7 +21,7 @@ jobs: run: npm install - name: Compile with ncc - run: npx @zeit/ncc build src/index.ts --minify + run: npx @vercel/ncc build src/index.ts --minify - name: Commit & Push changes uses: actions-js/push@v1.3 @@ -29,6 +29,6 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} branch: main message: 'Auto-compile dist code' - author_name: 'Jeroen Thora' - author_email: '1374857+acrobat@users.noreply.github.com' + author_name: 'splitsh automation' + author_email: 'splitsh@rosemanlabs.com' diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index db759c4..0000000 --- a/dist/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports=function(e,p){"use strict";var a={};function __webpack_require__(p){if(a[p]){return a[p].exports}var d=a[p]={i:p,l:false,exports:{}};var t=true;try{e[p].call(d.exports,d,d.exports,__webpack_require__);t=false}finally{if(t)delete a[p]}d.l=true;return d.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(707)}p(__webpack_require__);return startup()}({16:function(e){e.exports=require("tls")},25:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var d=_interopDefault(a(413));var t=_interopDefault(a(605));var i=_interopDefault(a(835));var r=_interopDefault(a(815));var s=_interopDefault(a(211));var o=_interopDefault(a(761));const n=d.Readable;const l=Symbol("buffer");const m=Symbol("type");class Blob{constructor(){this[m]="";const e=arguments[0];const p=arguments[1];const a=[];let d=0;if(e){const p=e;const t=Number(p.length);for(let e=0;e1&&arguments[1]!==undefined?arguments[1]:{},t=a.size;let i=t===undefined?0:t;var r=a.timeout;let s=r===undefined?0:r;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 d) ;else{e=Buffer.from(String(e))}this[c]={body:e,disturbed:false,error:null};this.size=i;this.timeout=s;if(e instanceof d){e.on("error",function(e){const a=e.name==="AbortError"?e:new FetchError(`Invalid response body while trying to fetch ${p.url}: ${e.message}`,"system",e);p[c].error=a})}}Body.prototype={get body(){return this[c].body},get bodyUsed(){return this[c].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(p){return Object.assign(new Blob([],{type:e.toLowerCase()}),{[l]:p})})},json(){var e=this;return consumeBody.call(this).then(function(p){try{return JSON.parse(p.toString())}catch(p){return Body.Promise.reject(new FetchError(`invalid json response body at ${e.url} reason: ${p.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(p){return convertBody(p,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 p of Object.getOwnPropertyNames(Body.prototype)){if(!(p in e)){const a=Object.getOwnPropertyDescriptor(Body.prototype,p);Object.defineProperty(e,p,a)}}};function consumeBody(){var e=this;if(this[c].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[c].disturbed=true;if(this[c].error){return Body.Promise.reject(this[c].error)}let p=this.body;if(p===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(p)){p=p.stream()}if(Buffer.isBuffer(p)){return Body.Promise.resolve(p)}if(!(p instanceof d)){return Body.Promise.resolve(Buffer.alloc(0))}let a=[];let t=0;let i=false;return new Body.Promise(function(d,r){let s;if(e.timeout){s=setTimeout(function(){i=true;r(new FetchError(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))},e.timeout)}p.on("error",function(p){if(p.name==="AbortError"){i=true;r(p)}else{r(new FetchError(`Invalid response body while trying to fetch ${e.url}: ${p.message}`,"system",p))}});p.on("data",function(p){if(i||p===null){return}if(e.size&&t+p.length>e.size){i=true;r(new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}t+=p.length;a.push(p)});p.on("end",function(){if(i){return}clearTimeout(s);try{d(Buffer.concat(a,t))}catch(p){r(new FetchError(`Could not create Buffer from response body for ${e.url}: ${p.message}`,"system",p))}})})}function convertBody(e,p){if(typeof u!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const a=p.get("content-type");let d="utf-8";let t,i;if(a){t=/charset=([^;]*)/i.exec(a)}i=e.slice(0,1024).toString();if(!t&&i){t=/0&&arguments[0]!==undefined?arguments[0]:undefined;this[w]=Object.create(null);if(e instanceof Headers){const p=e.raw();const a=Object.keys(p);for(const e of a){for(const a of p[e]){this.append(e,a)}}return}if(e==null) ;else if(typeof e==="object"){const p=e[Symbol.iterator];if(p!=null){if(typeof p!=="function"){throw new TypeError("Header pairs must be iterable")}const a=[];for(const p of e){if(typeof p!=="object"||typeof p[Symbol.iterator]!=="function"){throw new TypeError("Each header pair must be iterable")}a.push(Array.from(p))}for(const e of a){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 p of Object.keys(e)){const a=e[p];this.append(p,a)}}}else{throw new TypeError("Provided initializer must be an object")}}get(e){e=`${e}`;validateName(e);const p=find(this[w],e);if(p===undefined){return null}return this[w][p].join(", ")}forEach(e){let p=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined;let a=getHeaders(this);let d=0;while(d1&&arguments[1]!==undefined?arguments[1]:"key+value";const a=Object.keys(e[w]).sort();return a.map(p==="key"?function(e){return e.toLowerCase()}:p==="value"?function(p){return e[w][p].join(", ")}:function(p){return[p.toLowerCase(),e[w][p].join(", ")]})}const g=Symbol("internal");function createHeadersIterator(e,p){const a=Object.create(_);a[g]={target:e,kind:p,index:0};return a}const _=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==_){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[g];const p=e.target,a=e.kind,d=e.index;const t=getHeaders(p,a);const i=t.length;if(d>=i){return{value:undefined,done:true}}this[g].index=d+1;return{value:t[d],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(_,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const p=Object.assign({__proto__:null},e[w]);const a=find(e[w],"Host");if(a!==undefined){p[a]=p[a][0]}return p}function createHeadersLenient(e){const p=new Headers;for(const a of Object.keys(e)){if(h.test(a)){continue}if(Array.isArray(e[a])){for(const d of e[a]){if(v.test(d)){continue}if(p[w][a]===undefined){p[w][a]=[d]}else{p[w][a].push(d)}}}else if(!v.test(e[a])){p[w][a]=[e[a]]}}return p}const T=Symbol("Response internals");const E=t.STATUS_CODES;class Response{constructor(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let p=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Body.call(this,e,p);const a=p.status||200;const d=new Headers(p.headers);if(e!=null&&!d.has("Content-Type")){const p=extractContentType(e);if(p){d.append("Content-Type",p)}}this[T]={url:p.url,status:a,statusText:p.statusText||E[a],headers:d,counter:p.counter}}get url(){return this[T].url||""}get status(){return this[T].status}get ok(){return this[T].status>=200&&this[T].status<300}get redirected(){return this[T].counter>0}get statusText(){return this[T].statusText}get headers(){return this[T].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 b=Symbol("Request internals");const y=i.URL||r.URL;const S=i.parse;const D=i.format;function parseURL(e){if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)){e=new y(e).toString()}return S(e)}const O="destroy"in d.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[b]==="object"}function isAbortSignal(e){const p=e&&typeof e==="object"&&Object.getPrototypeOf(e);return!!(p&&p.constructor.name==="AbortSignal")}class Request{constructor(e){let p=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let a;if(!isRequest(e)){if(e&&e.href){a=parseURL(e.href)}else{a=parseURL(`${e}`)}e={}}else{a=parseURL(e.url)}let d=p.method||e.method||"GET";d=d.toUpperCase();if((p.body!=null||isRequest(e)&&e.body!==null)&&(d==="GET"||d==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}let t=p.body!=null?p.body:isRequest(e)&&e.body!==null?clone(e):null;Body.call(this,t,{timeout:p.timeout||e.timeout||0,size:p.size||e.size||0});const i=new Headers(p.headers||e.headers||{});if(t!=null&&!i.has("Content-Type")){const e=extractContentType(t);if(e){i.append("Content-Type",e)}}let r=isRequest(e)?e.signal:null;if("signal"in p)r=p.signal;if(r!=null&&!isAbortSignal(r)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[b]={method:d,redirect:p.redirect||e.redirect||"follow",headers:i,parsedURL:a,signal:r};this.follow=p.follow!==undefined?p.follow:e.follow!==undefined?e.follow:20;this.compress=p.compress!==undefined?p.compress:e.compress!==undefined?e.compress:true;this.counter=p.counter||e.counter||0;this.agent=p.agent||e.agent}get method(){return this[b].method}get url(){return D(this[b].parsedURL)}get headers(){return this[b].headers}get redirect(){return this[b].redirect}get signal(){return this[b].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 p=e[b].parsedURL;const a=new Headers(e[b].headers);if(!a.has("Accept")){a.set("Accept","*/*")}if(!p.protocol||!p.hostname){throw new TypeError("Only absolute URLs are supported")}if(!/^https?:$/.test(p.protocol)){throw new TypeError("Only HTTP(S) protocols are supported")}if(e.signal&&e.body instanceof d.Readable&&!O){throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8")}let t=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)){t="0"}if(e.body!=null){const p=getTotalBytes(e);if(typeof p==="number"){t=String(p)}}if(t){a.set("Content-Length",t)}if(!a.has("User-Agent")){a.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)")}if(e.compress&&!a.has("Accept-Encoding")){a.set("Accept-Encoding","gzip,deflate")}let i=e.agent;if(typeof i==="function"){i=i(p)}if(!a.has("Connection")&&!i){a.set("Connection","close")}return Object.assign({},p,{method:e.method,headers:exportNodeCompatibleHeaders(a),agent:i})}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 N=i.URL||r.URL;const A=d.PassThrough;const P=function isDomainOrSubdomain(e,p){const a=new N(p).hostname;const d=new N(e).hostname;return a===d||a[a.length-d.length-1]==="."&&a.endsWith(d)};function fetch(e,p){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(a,i){const r=new Request(e,p);const n=getNodeRequestOptions(r);const l=(n.protocol==="https:"?s:t).request;const m=r.signal;let u=null;const c=function abort(){let e=new AbortError("The user aborted a request.");i(e);if(r.body&&r.body instanceof d.Readable){r.body.destroy(e)}if(!u||!u.body)return;u.body.emit("error",e)};if(m&&m.aborted){c();return}const f=function abortAndFinalize(){c();finalize()};const h=l(n);let v;if(m){m.addEventListener("abort",f)}function finalize(){h.abort();if(m)m.removeEventListener("abort",f);clearTimeout(v)}if(r.timeout){h.once("socket",function(e){v=setTimeout(function(){i(new FetchError(`network timeout at: ${r.url}`,"request-timeout"));finalize()},r.timeout)})}h.on("error",function(e){i(new FetchError(`request to ${r.url} failed, reason: ${e.message}`,"system",e));finalize()});h.on("response",function(e){clearTimeout(v);const p=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const d=p.get("Location");let t=null;try{t=d===null?null:new N(d,r.url).toString()}catch(e){if(r.redirect!=="manual"){i(new FetchError(`uri requested responds with an invalid redirect URL: ${d}`,"invalid-redirect"));finalize();return}}switch(r.redirect){case"error":i(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${r.url}`,"no-redirect"));finalize();return;case"manual":if(t!==null){try{p.set("Location",t)}catch(e){i(e)}}break;case"follow":if(t===null){break}if(r.counter>=r.follow){i(new FetchError(`maximum redirect reached at: ${r.url}`,"max-redirect"));finalize();return}const d={headers:new Headers(r.headers),follow:r.follow,counter:r.counter+1,agent:r.agent,compress:r.compress,method:r.method,body:r.body,signal:r.signal,timeout:r.timeout,size:r.size};if(!P(r.url,t)){for(const e of["authorization","www-authenticate","cookie","cookie2"]){d.headers.delete(e)}}if(e.statusCode!==303&&r.body&&getTotalBytes(r)===null){i(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)&&r.method==="POST"){d.method="GET";d.body=undefined;d.headers.delete("content-length")}a(fetch(new Request(t,d)));finalize();return}}e.once("end",function(){if(m)m.removeEventListener("abort",f)});let d=e.pipe(new A);const t={url:r.url,status:e.statusCode,statusText:e.statusMessage,headers:p,size:r.size,timeout:r.timeout,counter:r.counter};const s=p.get("Content-Encoding");if(!r.compress||r.method==="HEAD"||s===null||e.statusCode===204||e.statusCode===304){u=new Response(d,t);a(u);return}const n={flush:o.Z_SYNC_FLUSH,finishFlush:o.Z_SYNC_FLUSH};if(s=="gzip"||s=="x-gzip"){d=d.pipe(o.createGunzip(n));u=new Response(d,t);a(u);return}if(s=="deflate"||s=="x-deflate"){const p=e.pipe(new A);p.once("data",function(e){if((e[0]&15)===8){d=d.pipe(o.createInflate())}else{d=d.pipe(o.createInflateRaw())}u=new Response(d,t);a(u)});return}if(s=="br"&&typeof o.createBrotliDecompress==="function"){d=d.pipe(o.createBrotliDecompress());u=new Response(d,t);a(u);return}u=new Response(d,t);a(u)});writeToStream(h,r)})}fetch.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};fetch.Promise=global.Promise;e.exports=p=fetch;Object.defineProperty(p,"__esModule",{value:true});p.default=p;p.Headers=Headers;p.Request=Request;p.Response=Response;p.FetchError=FetchError},26:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var d=a(446);var t=_interopDefault(a(416));const i=t(e=>console.warn(e));const r=t(e=>console.warn(e));class RequestError extends Error{constructor(e,p,a){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.status=p;let t;if("headers"in a&&typeof a.headers!=="undefined"){t=a.headers}if("response"in a){this.response=a.response;t=a.response.headers}const s=Object.assign({},a.request);if(a.request.headers.authorization){s.headers=Object.assign({},a.request.headers,{authorization:a.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}s.url=s.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=s;Object.defineProperty(this,"code",{get(){i(new d.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return p}});Object.defineProperty(this,"headers",{get(){r(new d.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));return t||{}}})}}p.RequestError=RequestError},47:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var d=_interopRequireDefault(a(999));var t=_interopRequireDefault(a(594));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,p,a){e=e||{};const i=e.random||(e.rng||d.default)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(p){a=a||0;for(let e=0;e<16;++e){p[a+e]=i[e]}return p}return(0,t.default)(i)}var i=v4;p.default=i},48:function(e,p,a){"use strict";var d=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};Object.defineProperty(p,"__esModule",{value:true});p.summary=p.markdownSummary=p.SUMMARY_DOCS_URL=p.SUMMARY_ENV_VAR=void 0;const t=a(87);const i=a(747);const{access:r,appendFile:s,writeFile:o}=i.promises;p.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";p.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return d(this,void 0,void 0,function*(){if(this._filePath){return this._filePath}const e=process.env[p.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${p.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield r(e,i.constants.R_OK|i.constants.W_OK)}catch(p){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath})}wrap(e,p,a={}){const d=Object.entries(a).map(([e,p])=>` ${e}="${p}"`).join("");if(!p){return`<${e}${d}>`}return`<${e}${d}>${p}`}write(e){return d(this,void 0,void 0,function*(){const p=!!(e===null||e===void 0?void 0:e.overwrite);const a=yield this.filePath();const d=p?o:s;yield d(a,this._buffer,{encoding:"utf8"});return this.emptyBuffer()})}clear(){return d(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:true})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,p=false){this._buffer+=e;return p?this.addEOL():this}addEOL(){return this.addRaw(t.EOL)}addCodeBlock(e,p){const a=Object.assign({},p&&{lang:p});const d=this.wrap("pre",this.wrap("code",e),a);return this.addRaw(d).addEOL()}addList(e,p=false){const a=p?"ol":"ul";const d=e.map(e=>this.wrap("li",e)).join("");const t=this.wrap(a,d);return this.addRaw(t).addEOL()}addTable(e){const p=e.map(e=>{const p=e.map(e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:p,data:a,colspan:d,rowspan:t}=e;const i=p?"th":"td";const r=Object.assign(Object.assign({},d&&{colspan:d}),t&&{rowspan:t});return this.wrap(i,a,r)}).join("");return this.wrap("tr",p)}).join("");const a=this.wrap("table",p);return this.addRaw(a).addEOL()}addDetails(e,p){const a=this.wrap("details",this.wrap("summary",e)+p);return this.addRaw(a).addEOL()}addImage(e,p,a){const{width:d,height:t}=a||{};const i=Object.assign(Object.assign({},d&&{width:d}),t&&{height:t});const r=this.wrap("img",null,Object.assign({src:e,alt:p},i));return this.addRaw(r).addEOL()}addHeading(e,p){const a=`h${p}`;const d=["h1","h2","h3","h4","h5","h6"].includes(a)?a:"h1";const t=this.wrap(d,e);return this.addRaw(t).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,p){const a=Object.assign({},p&&{cite:p});const d=this.wrap("blockquote",e,a);return this.addRaw(d).addEOL()}addLink(e,p){const a=this.wrap("a",e,{href:p});return this.addRaw(a).addEOL()}}const n=new Summary;p.markdownSummary=n;p.summary=n},70:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});Object.defineProperty(p,"v1",{enumerable:true,get:function(){return d.default}});Object.defineProperty(p,"v3",{enumerable:true,get:function(){return t.default}});Object.defineProperty(p,"v4",{enumerable:true,get:function(){return i.default}});Object.defineProperty(p,"v5",{enumerable:true,get:function(){return r.default}});Object.defineProperty(p,"NIL",{enumerable:true,get:function(){return s.default}});Object.defineProperty(p,"version",{enumerable:true,get:function(){return o.default}});Object.defineProperty(p,"validate",{enumerable:true,get:function(){return n.default}});Object.defineProperty(p,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(p,"parse",{enumerable:true,get:function(){return m.default}});var d=_interopRequireDefault(a(278));var t=_interopRequireDefault(a(259));var i=_interopRequireDefault(a(47));var r=_interopRequireDefault(a(629));var s=_interopRequireDefault(a(234));var o=_interopRequireDefault(a(370));var n=_interopRequireDefault(a(616));var l=_interopRequireDefault(a(594));var m=_interopRequireDefault(a(201));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},72:function(e,p,a){"use strict";const d=a(213);const t=a(906);const i={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443};const r=Symbol("failure");function countSymbols(e){return d.ucs2.decode(e).length}function at(e,p){const a=e[p];return isNaN(a)?undefined:String.fromCodePoint(a)}function isASCIIDigit(e){return e>=48&&e<=57}function isASCIIAlpha(e){return e>=65&&e<=90||e>=97&&e<=122}function isASCIIAlphanumeric(e){return isASCIIAlpha(e)||isASCIIDigit(e)}function isASCIIHex(e){return isASCIIDigit(e)||e>=65&&e<=70||e>=97&&e<=102}function isSingleDot(e){return e==="."||e.toLowerCase()==="%2e"}function isDoubleDot(e){e=e.toLowerCase();return e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"}function isWindowsDriveLetterCodePoints(e,p){return isASCIIAlpha(e)&&(p===58||p===124)}function isWindowsDriveLetterString(e){return e.length===2&&isASCIIAlpha(e.codePointAt(0))&&(e[1]===":"||e[1]==="|")}function isNormalizedWindowsDriveLetterString(e){return e.length===2&&isASCIIAlpha(e.codePointAt(0))&&e[1]===":"}function containsForbiddenHostCodePoint(e){return e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/)!==-1}function containsForbiddenHostCodePointExcludingPercent(e){return e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/)!==-1}function isSpecialScheme(e){return i[e]!==undefined}function isSpecial(e){return isSpecialScheme(e.scheme)}function defaultPort(e){return i[e]}function percentEncode(e){let p=e.toString(16).toUpperCase();if(p.length===1){p="0"+p}return"%"+p}function utf8PercentEncode(e){const p=new Buffer(e);let a="";for(let e=0;e126}const s=new Set([32,34,35,60,62,63,96,123,125]);function isPathPercentEncode(e){return isC0ControlPercentEncode(e)||s.has(e)}const o=new Set([47,58,59,61,64,91,92,93,94,124]);function isUserinfoPercentEncode(e){return isPathPercentEncode(e)||o.has(e)}function percentEncodeChar(e,p){const a=String.fromCodePoint(e);if(p(e)){return utf8PercentEncode(a)}return a}function parseIPv4Number(e){let p=10;if(e.length>=2&&e.charAt(0)==="0"&&e.charAt(1).toLowerCase()==="x"){e=e.substring(2);p=16}else if(e.length>=2&&e.charAt(0)==="0"){e=e.substring(1);p=8}if(e===""){return 0}const a=p===10?/[^0-9]/:p===16?/[^0-9A-Fa-f]/:/[^0-7]/;if(a.test(e)){return r}return parseInt(e,p)}function parseIPv4(e){const p=e.split(".");if(p[p.length-1]===""){if(p.length>1){p.pop()}}if(p.length>4){return e}const a=[];for(const d of p){if(d===""){return e}const p=parseIPv4Number(d);if(p===r){return e}a.push(p)}for(let e=0;e255){return r}}if(a[a.length-1]>=Math.pow(256,5-a.length)){return r}let d=a.pop();let t=0;for(const e of a){d+=e*Math.pow(256,3-t);++t}return d}function serializeIPv4(e){let p="";let a=e;for(let e=1;e<=4;++e){p=String(a%256)+p;if(e!==4){p="."+p}a=Math.floor(a/256)}return p}function parseIPv6(e){const p=[0,0,0,0,0,0,0,0];let a=0;let t=null;let i=0;e=d.ucs2.decode(e);if(e[i]===58){if(e[i+1]!==58){return r}i+=2;++a;t=a}while(i6){return r}let d=0;while(e[i]!==undefined){let t=null;if(d>0){if(e[i]===46&&d<4){++i}else{return r}}if(!isASCIIDigit(e[i])){return r}while(isASCIIDigit(e[i])){const p=parseInt(at(e,i));if(t===null){t=p}else if(t===0){return r}else{t=t*10+p}if(t>255){return r}++i}p[a]=p[a]*256+t;++d;if(d===2||d===4){++a}}if(d!==4){return r}break}else if(e[i]===58){++i;if(e[i]===undefined){return r}}else if(e[i]!==undefined){return r}p[a]=d;++a}if(t!==null){let e=a-t;a=7;while(a!==0&&e>0){const d=p[t+e-1];p[t+e-1]=p[a];p[a]=d;--a;--e}}else if(t===null&&a!==8){return r}return p}function serializeIPv6(e){let p="";const a=findLongestZeroSequence(e);const d=a.idx;let t=false;for(let a=0;a<=7;++a){if(t&&e[a]===0){continue}else if(t){t=false}if(d===a){const e=a===0?"::":":";p+=e;t=true;continue}p+=e[a].toString(16);if(a!==7){p+=":"}}return p}function parseHost(e,p){if(e[0]==="["){if(e[e.length-1]!=="]"){return r}return parseIPv6(e.substring(1,e.length-1))}if(!p){return parseOpaqueHost(e)}const a=utf8PercentDecode(e);const d=t.toASCII(a,false,t.PROCESSING_OPTIONS.NONTRANSITIONAL,false);if(d===null){return r}if(containsForbiddenHostCodePoint(d)){return r}const i=parseIPv4(d);if(typeof i==="number"||i===r){return i}return d}function parseOpaqueHost(e){if(containsForbiddenHostCodePointExcludingPercent(e)){return r}let p="";const a=d.ucs2.decode(e);for(let e=0;ea){p=d;a=t}d=null;t=0}else{if(d===null){d=i}++t}}if(t>a){p=d;a=t}return{idx:p,len:a}}function serializeHost(e){if(typeof e==="number"){return serializeIPv4(e)}if(e instanceof Array){return"["+serializeIPv6(e)+"]"}return e}function trimControlChars(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}function trimTabAndNewline(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}function shortenPath(e){const p=e.path;if(p.length===0){return}if(e.scheme==="file"&&p.length===1&&isNormalizedWindowsDriveLetter(p[0])){return}p.pop()}function includesCredentials(e){return e.username!==""||e.password!==""}function cannotHaveAUsernamePasswordPort(e){return e.host===null||e.host===""||e.cannotBeABaseURL||e.scheme==="file"}function isNormalizedWindowsDriveLetter(e){return/^[A-Za-z]:$/.test(e)}function URLStateMachine(e,p,a,t,i){this.pointer=0;this.input=e;this.base=p||null;this.encodingOverride=a||"utf-8";this.stateOverride=i;this.url=t;this.failure=false;this.parseError=false;if(!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:false};const e=trimControlChars(this.input);if(e!==this.input){this.parseError=true}this.input=e}const s=trimTabAndNewline(this.input);if(s!==this.input){this.parseError=true}this.input=s;this.state=i||"scheme start";this.buffer="";this.atFlag=false;this.arrFlag=false;this.passwordTokenSeenFlag=false;this.input=d.ucs2.decode(this.input);for(;this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer];const p=isNaN(e)?undefined:String.fromCodePoint(e);const a=this["parse "+this.state](e,p);if(!a){break}else if(a===r){this.failure=true;break}}}URLStateMachine.prototype["parse scheme start"]=function parseSchemeStart(e,p){if(isASCIIAlpha(e)){this.buffer+=p.toLowerCase();this.state="scheme"}else if(!this.stateOverride){this.state="no scheme";--this.pointer}else{this.parseError=true;return r}return true};URLStateMachine.prototype["parse scheme"]=function parseScheme(e,p){if(isASCIIAlphanumeric(e)||e===43||e===45||e===46){this.buffer+=p.toLowerCase()}else if(e===58){if(this.stateOverride){if(isSpecial(this.url)&&!isSpecialScheme(this.buffer)){return false}if(!isSpecial(this.url)&&isSpecialScheme(this.buffer)){return false}if((includesCredentials(this.url)||this.url.port!==null)&&this.buffer==="file"){return false}if(this.url.scheme==="file"&&(this.url.host===""||this.url.host===null)){return false}}this.url.scheme=this.buffer;this.buffer="";if(this.stateOverride){return false}if(this.url.scheme==="file"){if(this.input[this.pointer+1]!==47||this.input[this.pointer+2]!==47){this.parseError=true}this.state="file"}else if(isSpecial(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme){this.state="special relative or authority"}else if(isSpecial(this.url)){this.state="special authority slashes"}else if(this.input[this.pointer+1]===47){this.state="path or authority";++this.pointer}else{this.url.cannotBeABaseURL=true;this.url.path.push("");this.state="cannot-be-a-base-URL path"}}else if(!this.stateOverride){this.buffer="";this.state="no scheme";this.pointer=-1}else{this.parseError=true;return r}return true};URLStateMachine.prototype["parse no scheme"]=function parseNoScheme(e){if(this.base===null||this.base.cannotBeABaseURL&&e!==35){return r}else if(this.base.cannotBeABaseURL&&e===35){this.url.scheme=this.base.scheme;this.url.path=this.base.path.slice();this.url.query=this.base.query;this.url.fragment="";this.url.cannotBeABaseURL=true;this.state="fragment"}else if(this.base.scheme==="file"){this.state="file";--this.pointer}else{this.state="relative";--this.pointer}return true};URLStateMachine.prototype["parse special relative or authority"]=function parseSpecialRelativeOrAuthority(e){if(e===47&&this.input[this.pointer+1]===47){this.state="special authority ignore slashes";++this.pointer}else{this.parseError=true;this.state="relative";--this.pointer}return true};URLStateMachine.prototype["parse path or authority"]=function parsePathOrAuthority(e){if(e===47){this.state="authority"}else{this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse relative"]=function parseRelative(e){this.url.scheme=this.base.scheme;if(isNaN(e)){this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice();this.url.query=this.base.query}else if(e===47){this.state="relative slash"}else if(e===63){this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice();this.url.query="";this.state="query"}else if(e===35){this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice();this.url.query=this.base.query;this.url.fragment="";this.state="fragment"}else if(isSpecial(this.url)&&e===92){this.parseError=true;this.state="relative slash"}else{this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice(0,this.base.path.length-1);this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse relative slash"]=function parseRelativeSlash(e){if(isSpecial(this.url)&&(e===47||e===92)){if(e===92){this.parseError=true}this.state="special authority ignore slashes"}else if(e===47){this.state="authority"}else{this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse special authority slashes"]=function parseSpecialAuthoritySlashes(e){if(e===47&&this.input[this.pointer+1]===47){this.state="special authority ignore slashes";++this.pointer}else{this.parseError=true;this.state="special authority ignore slashes";--this.pointer}return true};URLStateMachine.prototype["parse special authority ignore slashes"]=function parseSpecialAuthorityIgnoreSlashes(e){if(e!==47&&e!==92){this.state="authority";--this.pointer}else{this.parseError=true}return true};URLStateMachine.prototype["parse authority"]=function parseAuthority(e,p){if(e===64){this.parseError=true;if(this.atFlag){this.buffer="%40"+this.buffer}this.atFlag=true;const e=countSymbols(this.buffer);for(let p=0;pMath.pow(2,16)-1){this.parseError=true;return r}this.url.port=e===defaultPort(this.url.scheme)?null:e;this.buffer=""}if(this.stateOverride){return false}this.state="path start";--this.pointer}else{this.parseError=true;return r}return true};const n=new Set([47,92,63,35]);URLStateMachine.prototype["parse file"]=function parseFile(e){this.url.scheme="file";if(e===47||e===92){if(e===92){this.parseError=true}this.state="file slash"}else if(this.base!==null&&this.base.scheme==="file"){if(isNaN(e)){this.url.host=this.base.host;this.url.path=this.base.path.slice();this.url.query=this.base.query}else if(e===63){this.url.host=this.base.host;this.url.path=this.base.path.slice();this.url.query="";this.state="query"}else if(e===35){this.url.host=this.base.host;this.url.path=this.base.path.slice();this.url.query=this.base.query;this.url.fragment="";this.state="fragment"}else{if(this.input.length-this.pointer-1===0||!isWindowsDriveLetterCodePoints(e,this.input[this.pointer+1])||this.input.length-this.pointer-1>=2&&!n.has(this.input[this.pointer+2])){this.url.host=this.base.host;this.url.path=this.base.path.slice();shortenPath(this.url)}else{this.parseError=true}this.state="path";--this.pointer}}else{this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse file slash"]=function parseFileSlash(e){if(e===47||e===92){if(e===92){this.parseError=true}this.state="file host"}else{if(this.base!==null&&this.base.scheme==="file"){if(isNormalizedWindowsDriveLetterString(this.base.path[0])){this.url.path.push(this.base.path[0])}else{this.url.host=this.base.host}}this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse file host"]=function parseFileHost(e,p){if(isNaN(e)||e===47||e===92||e===63||e===35){--this.pointer;if(!this.stateOverride&&isWindowsDriveLetterString(this.buffer)){this.parseError=true;this.state="path"}else if(this.buffer===""){this.url.host="";if(this.stateOverride){return false}this.state="path start"}else{let e=parseHost(this.buffer,isSpecial(this.url));if(e===r){return r}if(e==="localhost"){e=""}this.url.host=e;if(this.stateOverride){return false}this.buffer="";this.state="path start"}}else{this.buffer+=p}return true};URLStateMachine.prototype["parse path start"]=function parsePathStart(e){if(isSpecial(this.url)){if(e===92){this.parseError=true}this.state="path";if(e!==47&&e!==92){--this.pointer}}else if(!this.stateOverride&&e===63){this.url.query="";this.state="query"}else if(!this.stateOverride&&e===35){this.url.fragment="";this.state="fragment"}else if(e!==undefined){this.state="path";if(e!==47){--this.pointer}}return true};URLStateMachine.prototype["parse path"]=function parsePath(e){if(isNaN(e)||e===47||isSpecial(this.url)&&e===92||!this.stateOverride&&(e===63||e===35)){if(isSpecial(this.url)&&e===92){this.parseError=true}if(isDoubleDot(this.buffer)){shortenPath(this.url);if(e!==47&&!(isSpecial(this.url)&&e===92)){this.url.path.push("")}}else if(isSingleDot(this.buffer)&&e!==47&&!(isSpecial(this.url)&&e===92)){this.url.path.push("")}else if(!isSingleDot(this.buffer)){if(this.url.scheme==="file"&&this.url.path.length===0&&isWindowsDriveLetterString(this.buffer)){if(this.url.host!==""&&this.url.host!==null){this.parseError=true;this.url.host=""}this.buffer=this.buffer[0]+":"}this.url.path.push(this.buffer)}this.buffer="";if(this.url.scheme==="file"&&(e===undefined||e===63||e===35)){while(this.url.path.length>1&&this.url.path[0]===""){this.parseError=true;this.url.path.shift()}}if(e===63){this.url.query="";this.state="query"}if(e===35){this.url.fragment="";this.state="fragment"}}else{if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}this.buffer+=percentEncodeChar(e,isPathPercentEncode)}return true};URLStateMachine.prototype["parse cannot-be-a-base-URL path"]=function parseCannotBeABaseURLPath(e){if(e===63){this.url.query="";this.state="query"}else if(e===35){this.url.fragment="";this.state="fragment"}else{if(!isNaN(e)&&e!==37){this.parseError=true}if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}if(!isNaN(e)){this.url.path[0]=this.url.path[0]+percentEncodeChar(e,isC0ControlPercentEncode)}}return true};URLStateMachine.prototype["parse query"]=function parseQuery(e,p){if(isNaN(e)||!this.stateOverride&&e===35){if(!isSpecial(this.url)||this.url.scheme==="ws"||this.url.scheme==="wss"){this.encodingOverride="utf-8"}const p=new Buffer(this.buffer);for(let e=0;e126||p[e]===34||p[e]===35||p[e]===60||p[e]===62){this.url.query+=percentEncode(p[e])}else{this.url.query+=String.fromCodePoint(p[e])}}this.buffer="";if(e===35){this.url.fragment="";this.state="fragment"}}else{if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}this.buffer+=p}return true};URLStateMachine.prototype["parse fragment"]=function parseFragment(e){if(isNaN(e)){}else if(e===0){this.parseError=true}else{if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}this.url.fragment+=percentEncodeChar(e,isC0ControlPercentEncode)}return true};function serializeURL(e,p){let a=e.scheme+":";if(e.host!==null){a+="//";if(e.username!==""||e.password!==""){a+=e.username;if(e.password!==""){a+=":"+e.password}a+="@"}a+=serializeHost(e.host);if(e.port!==null){a+=":"+e.port}}else if(e.host===null&&e.scheme==="file"){a+="//"}if(e.cannotBeABaseURL){a+=e.path[0]}else{for(const p of e.path){a+="/"+p}}if(e.query!==null){a+="?"+e.query}if(!p&&e.fragment!==null){a+="#"+e.fragment}return a}function serializeOrigin(e){let p=e.scheme+"://";p+=serializeHost(e.host);if(e.port!==null){p+=":"+e.port}return p}e.exports.serializeURL=serializeURL;e.exports.serializeURLOrigin=function(p){switch(p.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(p.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return serializeOrigin({scheme:p.scheme,host:p.host,port:p.port});case"file":return"file://";default:return"null"}};e.exports.basicURLParse=function(e,p){if(p===undefined){p={}}const a=new URLStateMachine(e,p.baseURL,p.encodingOverride,p.url,p.stateOverride);if(a.failure){return"failure"}return a.url};e.exports.setTheUsername=function(e,p){e.username="";const a=d.ucs2.decode(p);for(let p=0;p{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)});const t=(p=d.result)===null||p===void 0?void 0:p.value;if(!t){throw new Error("Response json body do not have ID Token field")}return t})}static getIDToken(e){return d(this,void 0,void 0,function*(){try{let p=OidcClient.getIDTokenUrl();if(e){const a=encodeURIComponent(e);p=`${p}&audience=${a}`}r.debug(`ID token url is ${p}`);const a=yield OidcClient.getCall(p);r.setSecret(a);return a}catch(e){throw new Error(`Error message: ${e.message}`)}})}}p.OidcClient=OidcClient},129:function(e){e.exports=require("child_process")},151:function(e){e.exports=register;function register(e,p,a,d){if(typeof a!=="function"){throw new Error("method for before hook must be a function")}if(!d){d={}}if(Array.isArray(p)){return p.reverse().reduce(function(p,a){return register.bind(null,e,a,p,d)},a)()}return Promise.resolve().then(function(){if(!e.registry[p]){return a(d)}return e.registry[p].reduce(function(e,p){return p.hook.bind(null,e,d)},a)()})}},201:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var d=_interopRequireDefault(a(616));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,d.default)(e)){throw TypeError("Invalid UUID")}let p;const a=new Uint8Array(16);a[0]=(p=parseInt(e.slice(0,8),16))>>>24;a[1]=p>>>16&255;a[2]=p>>>8&255;a[3]=p&255;a[4]=(p=parseInt(e.slice(9,13),16))>>>8;a[5]=p&255;a[6]=(p=parseInt(e.slice(14,18),16))>>>8;a[7]=p&255;a[8]=(p=parseInt(e.slice(19,23),16))>>>8;a[9]=p&255;a[10]=(p=parseInt(e.slice(24,36),16))/1099511627776&255;a[11]=p/4294967296&255;a[12]=p>>>24&255;a[13]=p>>>16&255;a[14]=p>>>8&255;a[15]=p&255;return a}var t=parse;p.default=t},211:function(e){e.exports=require("https")},213:function(e){e.exports=require("punycode")},234:function(e,p){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var a="00000000-0000-0000-0000-000000000000";p.default=a},240:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))d(p,e,a);t(p,e);return p};var r=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};Object.defineProperty(p,"__esModule",{value:true});p.findInPath=p.which=p.mkdirP=p.rmRF=p.mv=p.cp=void 0;const s=a(357);const o=i(a(129));const n=i(a(622));const l=a(669);const m=i(a(926));const u=l.promisify(o.exec);const c=l.promisify(o.execFile);function cp(e,p,a={}){return r(this,void 0,void 0,function*(){const{force:d,recursive:t,copySourceDirectory:i}=readCopyOptions(a);const r=(yield m.exists(p))?yield m.stat(p):null;if(r&&r.isFile()&&!d){return}const s=r&&r.isDirectory()&&i?n.join(p,n.basename(e)):p;if(!(yield m.exists(e))){throw new Error(`no such file or directory: ${e}`)}const o=yield m.stat(e);if(o.isDirectory()){if(!t){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,d)}}else{if(n.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,d)}})}p.cp=cp;function mv(e,p,a={}){return r(this,void 0,void 0,function*(){if(yield m.exists(p)){let d=true;if(yield m.isDirectory(p)){p=n.join(p,n.basename(e));d=yield m.exists(p)}if(d){if(a.force==null||a.force){yield rmRF(p)}else{throw new Error("Destination already exists")}}}yield mkdirP(n.dirname(p));yield m.rename(e,p)})}p.mv=mv;function rmRF(e){return r(this,void 0,void 0,function*(){if(m.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const p=m.getCmdPath();if(yield m.isDirectory(e,true)){yield u(`${p} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield u(`${p} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield m.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let p=false;try{p=yield m.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(p){yield c(`rm`,[`-rf`,`${e}`])}else{yield m.unlink(e)}}})}p.rmRF=rmRF;function mkdirP(e){return r(this,void 0,void 0,function*(){s.ok(e,"a path argument must be provided");yield m.mkdir(e,{recursive:true})})}p.mkdirP=mkdirP;function which(e,p){return r(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(p){const p=yield which(e,false);if(!p){if(m.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return p}const a=yield findInPath(e);if(a&&a.length>0){return a[0]}return""})}p.which=which;function findInPath(e){return r(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}const p=[];if(m.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(n.delimiter)){if(e){p.push(e)}}}if(m.isRooted(e)){const a=yield m.tryGetExecutablePath(e,p);if(a){return[a]}return[]}if(e.includes(n.sep)){return[]}const a=[];if(process.env.PATH){for(const e of process.env.PATH.split(n.delimiter)){if(e){a.push(e)}}}const d=[];for(const t of a){const a=yield m.tryGetExecutablePath(n.join(t,e),p);if(a){d.push(a)}}return d})}p.findInPath=findInPath;function readCopyOptions(e){const p=e.force==null?true:e.force;const a=Boolean(e.recursive);const d=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:p,recursive:a,copySourceDirectory:d}}function cpDirRecursive(e,p,a,d){return r(this,void 0,void 0,function*(){if(a>=255)return;a++;yield mkdirP(p);const t=yield m.readdir(e);for(const i of t){const t=`${e}/${i}`;const r=`${p}/${i}`;const s=yield m.lstat(t);if(s.isDirectory()){yield cpDirRecursive(t,r,a,d)}else{yield copyFile(t,r,d)}}yield m.chmod(p,(yield m.stat(e)).mode)})}function copyFile(e,p,a){return r(this,void 0,void 0,function*(){if((yield m.lstat(e)).isSymbolicLink()){try{yield m.lstat(p);yield m.unlink(p)}catch(e){if(e.code==="EPERM"){yield m.chmod(p,"0666");yield m.unlink(p)}}const a=yield m.readlink(e);yield m.symlink(a,p,m.IS_WINDOWS?"junction":null)}else if(!(yield m.exists(p))||a){yield m.copyFile(e,p)}})}},244:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))d(p,e,a);t(p,e);return p};var r=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};Object.defineProperty(p,"__esModule",{value:true});p.getExecOutput=p.exec=void 0;const s=a(304);const o=i(a(534));function exec(e,p,a){return r(this,void 0,void 0,function*(){const d=o.argStringToArray(e);if(d.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const t=d[0];p=d.slice(1).concat(p||[]);const i=new o.ToolRunner(t,p,a);return i.exec()})}p.exec=exec;function getExecOutput(e,p,a){var d,t;return r(this,void 0,void 0,function*(){let i="";let r="";const o=new s.StringDecoder("utf8");const n=new s.StringDecoder("utf8");const l=(d=a===null||a===void 0?void 0:a.listeners)===null||d===void 0?void 0:d.stdout;const m=(t=a===null||a===void 0?void 0:a.listeners)===null||t===void 0?void 0:t.stderr;const u=e=>{r+=n.write(e);if(m){m(e)}};const c=e=>{i+=o.write(e);if(l){l(e)}};const f=Object.assign(Object.assign({},a===null||a===void 0?void 0:a.listeners),{stdout:c,stderr:u});const h=yield exec(e,p,Object.assign(Object.assign({},a),{listeners:f}));i+=o.end();r+=n.end();return{exitCode:h,stdout:i,stderr:r}})}p.getExecOutput=getExecOutput},246:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});var d=a(314);var t=a(615);var i=a(715);var r=a(356);var s=a(797);function _objectWithoutPropertiesLoose(e,p){if(e==null)return{};var a={};var d=Object.keys(e);var t,i;for(i=0;i=0)continue;a[t]=e[t]}return a}function _objectWithoutProperties(e,p){if(e==null)return{};var a=_objectWithoutPropertiesLoose(e,p);var d,t;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,d))continue;a[d]=e[d]}}return a}const o="3.5.1";const n=["authStrategy"];class Octokit{constructor(e={}){const p=new t.Collection;const a={baseUrl:i.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:p.bind(null,"request")}),mediaType:{previews:[],format:""}};a.headers["user-agent"]=[e.userAgent,`octokit-core.js/${o} ${d.getUserAgent()}`].filter(Boolean).join(" ");if(e.baseUrl){a.baseUrl=e.baseUrl}if(e.previews){a.mediaType.previews=e.previews}if(e.timeZone){a.headers["time-zone"]=e.timeZone}this.request=i.request.defaults(a);this.graphql=r.withCustomRequest(this.request).defaults(a);this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log);this.hook=p;if(!e.authStrategy){if(!e.auth){this.auth=(async()=>({type:"unauthenticated"}))}else{const a=s.createTokenAuth(e.auth);p.wrap("request",a.hook);this.auth=a}}else{const{authStrategy:a}=e,d=_objectWithoutProperties(e,n);const t=a(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:d},e.auth));p.wrap("request",t.hook);this.auth=t}const l=this.constructor;l.plugins.forEach(p=>{Object.assign(this,p(this,e))})}static defaults(e){const p=class extends(this){constructor(...p){const a=p[0]||{};if(typeof e==="function"){super(e(a));return}super(Object.assign({},e,a,a.userAgent&&e.userAgent?{userAgent:`${a.userAgent} ${e.userAgent}`}:null))}};return p}static plugin(...e){var p;const a=this.plugins;const d=(p=class extends(this){},p.plugins=a.concat(e.filter(e=>!a.includes(e))),p);return d}}Octokit.VERSION=o;Octokit.plugins=[];p.Octokit=Octokit},247:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=_default;p.URL=p.DNS=void 0;var d=_interopRequireDefault(a(594));var t=_interopRequireDefault(a(201));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const p=[];for(let a=0;as)&&e.nsecs===undefined){f=0}if(f>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}s=c;o=f;r=u;c+=122192928e5;const v=((c&268435455)*1e4+f)%4294967296;l[n++]=v>>>24&255;l[n++]=v>>>16&255;l[n++]=v>>>8&255;l[n++]=v&255;const w=c/4294967296*1e4&268435455;l[n++]=w>>>8&255;l[n++]=w&255;l[n++]=w>>>24&15|16;l[n++]=w>>>16&255;l[n++]=u>>>8|128;l[n++]=u&255;for(let e=0;e<6;++e){l[n+e]=m[e]}return p||(0,t.default)(l)}var n=v1;p.default=n},302:function(e,p){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;p.default=a},303:function(module){module.exports=eval("require")("encoding")},304:function(e){e.exports=require("string_decoder")},314:function(e,p){"use strict";Object.defineProperty(p,"__esModule",{value:true});function getUserAgent(){if(typeof navigator==="object"&&"userAgent"in navigator){return navigator.userAgent}if(typeof process==="object"&&"version"in process){return`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`}return""}p.getUserAgent=getUserAgent},341:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});var d=a(694);var t=a(314);function lowercaseKeys(e){if(!e){return{}}return Object.keys(e).reduce((p,a)=>{p[a.toLowerCase()]=e[a];return p},{})}function mergeDeep(e,p){const a=Object.assign({},e);Object.keys(p).forEach(t=>{if(d.isPlainObject(p[t])){if(!(t in e))Object.assign(a,{[t]:p[t]});else a[t]=mergeDeep(e[t],p[t])}else{Object.assign(a,{[t]:p[t]})}});return a}function removeUndefinedProperties(e){for(const p in e){if(e[p]===undefined){delete e[p]}}return e}function merge(e,p,a){if(typeof p==="string"){let[e,d]=p.split(" ");a=Object.assign(d?{method:e,url:d}:{url:e},a)}else{a=Object.assign({},p)}a.headers=lowercaseKeys(a.headers);removeUndefinedProperties(a);removeUndefinedProperties(a.headers);const d=mergeDeep(e||{},a);if(e&&e.mediaType.previews.length){d.mediaType.previews=e.mediaType.previews.filter(e=>!d.mediaType.previews.includes(e)).concat(d.mediaType.previews)}d.mediaType.previews=d.mediaType.previews.map(e=>e.replace(/-preview/,""));return d}function addQueryParameters(e,p){const a=/\?/.test(e)?"&":"?";const d=Object.keys(p);if(d.length===0){return e}return e+a+d.map(e=>{if(e==="q"){return"q="+p.q.split("+").map(encodeURIComponent).join("+")}return`${e}=${encodeURIComponent(p[e])}`}).join("&")}const i=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const p=e.match(i);if(!p){return[]}return p.map(removeNonChars).reduce((e,p)=>e.concat(p),[])}function omit(e,p){return Object.keys(e).filter(e=>!p.includes(e)).reduce((p,a)=>{p[a]=e[a];return p},{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){if(!/%[0-9A-Fa-f]/.test(e)){e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")}return e}).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function encodeValue(e,p,a){p=e==="+"||e==="#"?encodeReserved(p):encodeUnreserved(p);if(a){return encodeUnreserved(a)+"="+p}else{return p}}function isDefined(e){return e!==undefined&&e!==null}function isKeyOperator(e){return e===";"||e==="&"||e==="?"}function getValues(e,p,a,d){var t=e[a],i=[];if(isDefined(t)&&t!==""){if(typeof t==="string"||typeof t==="number"||typeof t==="boolean"){t=t.toString();if(d&&d!=="*"){t=t.substring(0,parseInt(d,10))}i.push(encodeValue(p,t,isKeyOperator(p)?a:""))}else{if(d==="*"){if(Array.isArray(t)){t.filter(isDefined).forEach(function(e){i.push(encodeValue(p,e,isKeyOperator(p)?a:""))})}else{Object.keys(t).forEach(function(e){if(isDefined(t[e])){i.push(encodeValue(p,t[e],e))}})}}else{const e=[];if(Array.isArray(t)){t.filter(isDefined).forEach(function(a){e.push(encodeValue(p,a))})}else{Object.keys(t).forEach(function(a){if(isDefined(t[a])){e.push(encodeUnreserved(a));e.push(encodeValue(p,t[a].toString()))}})}if(isKeyOperator(p)){i.push(encodeUnreserved(a)+"="+e.join(","))}else if(e.length!==0){i.push(e.join(","))}}}}else{if(p===";"){if(isDefined(t)){i.push(encodeUnreserved(a))}}else if(t===""&&(p==="&"||p==="?")){i.push(encodeUnreserved(a)+"=")}else if(t===""){i.push("")}}return i}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,p){var a=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(e,d,t){if(d){let e="";const t=[];if(a.indexOf(d.charAt(0))!==-1){e=d.charAt(0);d=d.substr(1)}d.split(/,/g).forEach(function(a){var d=/([^:\*]*)(?::(\d+)|(\*))?/.exec(a);t.push(getValues(p,e,d[1],d[2]||d[3]))});if(e&&e!=="+"){var i=",";if(e==="?"){i="&"}else if(e!=="#"){i=e}return(t.length!==0?e:"")+t.join(i)}else{return t.join(",")}}else{return encodeReserved(t)}})}function parse(e){let p=e.method.toUpperCase();let a=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}");let d=Object.assign({},e.headers);let t;let i=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const r=extractUrlVariableNames(a);a=parseUrl(a).expand(i);if(!/^http/.test(a)){a=e.baseUrl+a}const s=Object.keys(e).filter(e=>r.includes(e)).concat("baseUrl");const o=omit(i,s);const n=/application\/octet-stream/i.test(d.accept);if(!n){if(e.mediaType.format){d.accept=d.accept.split(/,/).map(p=>p.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`)).join(",")}if(e.mediaType.previews.length){const p=d.accept.match(/[\w-]+(?=-preview)/g)||[];d.accept=p.concat(e.mediaType.previews).map(p=>{const a=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${p}-preview${a}`}).join(",")}}if(["GET","HEAD"].includes(p)){a=addQueryParameters(a,o)}else{if("data"in o){t=o.data}else{if(Object.keys(o).length){t=o}else{d["content-length"]=0}}}if(!d["content-type"]&&typeof t!=="undefined"){d["content-type"]="application/json; charset=utf-8"}if(["PATCH","PUT"].includes(p)&&typeof t==="undefined"){t=""}return Object.assign({method:p,url:a,headers:d},typeof t!=="undefined"?{body:t}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,p,a){return parse(merge(e,p,a))}function withDefaults(e,p){const a=merge(e,p);const d=endpointWithDefaults.bind(null,a);return Object.assign(d,{DEFAULTS:a,defaults:withDefaults.bind(null,a),merge:merge.bind(null,a),parse:parse})}const r="6.0.12";const s=`octokit-endpoint.js/${r} ${t.getUserAgent()}`;const o={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":s},mediaType:{format:"",previews:[]}};const n=withDefaults(null,o);p.endpoint=n},343:function(e){e.exports=require("timers")},356:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});var d=a(715);var t=a(314);const i="4.6.4";class GraphqlError extends Error{constructor(e,p){const a=p.data.errors[0].message;super(a);Object.assign(this,p.data);Object.assign(this,{headers:p.headers});this.name="GraphqlError";this.request=e;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}const r=["method","baseUrl","url","headers","request","query","mediaType"];const s=["query","method","url"];const o=/\/api\/v3\/?$/;function graphql(e,p,a){if(a){if(typeof p==="string"&&"query"in a){return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`))}for(const e in a){if(!s.includes(e))continue;return Promise.reject(new Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}}const d=typeof p==="string"?Object.assign({query:p},a):p;const t=Object.keys(d).reduce((e,p)=>{if(r.includes(p)){e[p]=d[p];return e}if(!e.variables){e.variables={}}e.variables[p]=d[p];return e},{});const i=d.baseUrl||e.endpoint.DEFAULTS.baseUrl;if(o.test(i)){t.url=i.replace(o,"/api/graphql")}return e(t).then(e=>{if(e.data.errors){const p={};for(const a of Object.keys(e.headers)){p[a]=e.headers[a]}throw new GraphqlError(t,{headers:p,data:e.data})}return e.data.data})}function withDefaults(e,p){const a=e.defaults(p);const t=(e,p)=>{return graphql(a,e,p)};return Object.assign(t,{defaults:withDefaults.bind(null,a),endpoint:d.request.endpoint})}const n=withDefaults(d.request,{headers:{"user-agent":`octokit-graphql.js/${i} ${t.getUserAgent()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults(e,{method:"POST",url:"/graphql"})}p.graphql=n;p.withCustomRequest=withCustomRequest},357:function(e){e.exports=require("assert")},360:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))d(p,e,a);t(p,e);return p};Object.defineProperty(p,"__esModule",{value:true});p.issue=p.issueCommand=void 0;const r=i(a(87));const s=a(981);function issueCommand(e,p,a){const d=new Command(e,p,a);process.stdout.write(d.toString()+r.EOL)}p.issueCommand=issueCommand;function issue(e,p=""){issueCommand(e,{},p)}p.issue=issue;const o="::";class Command{constructor(e,p,a){if(!e){e="missing.command"}this.command=e;this.properties=p;this.message=a}toString(){let e=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let p=true;for(const a in this.properties){if(this.properties.hasOwnProperty(a)){const d=this.properties[a];if(d){if(p){p=false}else{e+=","}e+=`${a}=${escapeProperty(d)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},366:function(e,p){"use strict";Object.defineProperty(p,"__esModule",{value:true});const a="2.15.1";function ownKeys(e,p){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);if(p){d=d.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})}a.push.apply(a,d)}return a}function _objectSpread2(e){for(var p=1;p({async next(){if(!s)return{done:true};try{const e=await t({method:i,url:s,headers:r});const p=normalizePaginatedListResponse(e);s=((p.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:p}}catch(e){if(e.status!==409)throw e;s="";return{value:{status:200,headers:{},data:[]}}}}})}}function paginate(e,p,a,d){if(typeof a==="function"){d=a;a=undefined}return gather(e,[],iterator(e,p,a)[Symbol.asyncIterator](),d)}function gather(e,p,a,d){return a.next().then(t=>{if(t.done){return p}let i=false;function done(){i=true}p=p.concat(d?d(t.value,done):t.value.data);if(i){return p}return gather(e,p,a,d)})}const d=Object.assign(paginate,{iterator:iterator});const t=["GET /app/hook/deliveries","GET /app/installations","GET /applications/grants","GET /authorizations","GET /enterprises/{enterprise}/actions/permissions/organizations","GET /enterprises/{enterprise}/actions/runner-groups","GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations","GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners","GET /enterprises/{enterprise}/actions/runners","GET /enterprises/{enterprise}/actions/runners/downloads","GET /events","GET /gists","GET /gists/public","GET /gists/starred","GET /gists/{gist_id}/comments","GET /gists/{gist_id}/commits","GET /gists/{gist_id}/forks","GET /installation/repositories","GET /issues","GET /marketplace_listing/plans","GET /marketplace_listing/plans/{plan_id}/accounts","GET /marketplace_listing/stubbed/plans","GET /marketplace_listing/stubbed/plans/{plan_id}/accounts","GET /networks/{owner}/{repo}/events","GET /notifications","GET /organizations","GET /orgs/{org}/actions/permissions/repositories","GET /orgs/{org}/actions/runner-groups","GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories","GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners","GET /orgs/{org}/actions/runners","GET /orgs/{org}/actions/runners/downloads","GET /orgs/{org}/actions/secrets","GET /orgs/{org}/actions/secrets/{secret_name}/repositories","GET /orgs/{org}/blocks","GET /orgs/{org}/credential-authorizations","GET /orgs/{org}/events","GET /orgs/{org}/failed_invitations","GET /orgs/{org}/hooks","GET /orgs/{org}/hooks/{hook_id}/deliveries","GET /orgs/{org}/installations","GET /orgs/{org}/invitations","GET /orgs/{org}/invitations/{invitation_id}/teams","GET /orgs/{org}/issues","GET /orgs/{org}/members","GET /orgs/{org}/migrations","GET /orgs/{org}/migrations/{migration_id}/repositories","GET /orgs/{org}/outside_collaborators","GET /orgs/{org}/projects","GET /orgs/{org}/public_members","GET /orgs/{org}/repos","GET /orgs/{org}/team-sync/groups","GET /orgs/{org}/teams","GET /orgs/{org}/teams/{team_slug}/discussions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions","GET /orgs/{org}/teams/{team_slug}/invitations","GET /orgs/{org}/teams/{team_slug}/members","GET /orgs/{org}/teams/{team_slug}/projects","GET /orgs/{org}/teams/{team_slug}/repos","GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings","GET /orgs/{org}/teams/{team_slug}/teams","GET /projects/columns/{column_id}/cards","GET /projects/{project_id}/collaborators","GET /projects/{project_id}/columns","GET /repos/{owner}/{repo}/actions/artifacts","GET /repos/{owner}/{repo}/actions/runners","GET /repos/{owner}/{repo}/actions/runners/downloads","GET /repos/{owner}/{repo}/actions/runs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts","GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs","GET /repos/{owner}/{repo}/actions/secrets","GET /repos/{owner}/{repo}/actions/workflows","GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs","GET /repos/{owner}/{repo}/assignees","GET /repos/{owner}/{repo}/autolinks","GET /repos/{owner}/{repo}/branches","GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations","GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs","GET /repos/{owner}/{repo}/code-scanning/alerts","GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances","GET /repos/{owner}/{repo}/code-scanning/analyses","GET /repos/{owner}/{repo}/collaborators","GET /repos/{owner}/{repo}/comments","GET /repos/{owner}/{repo}/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/commits","GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head","GET /repos/{owner}/{repo}/commits/{commit_sha}/comments","GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls","GET /repos/{owner}/{repo}/commits/{ref}/check-runs","GET /repos/{owner}/{repo}/commits/{ref}/check-suites","GET /repos/{owner}/{repo}/commits/{ref}/statuses","GET /repos/{owner}/{repo}/contributors","GET /repos/{owner}/{repo}/deployments","GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses","GET /repos/{owner}/{repo}/events","GET /repos/{owner}/{repo}/forks","GET /repos/{owner}/{repo}/git/matching-refs/{ref}","GET /repos/{owner}/{repo}/hooks","GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries","GET /repos/{owner}/{repo}/invitations","GET /repos/{owner}/{repo}/issues","GET /repos/{owner}/{repo}/issues/comments","GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/issues/events","GET /repos/{owner}/{repo}/issues/{issue_number}/comments","GET /repos/{owner}/{repo}/issues/{issue_number}/events","GET /repos/{owner}/{repo}/issues/{issue_number}/labels","GET /repos/{owner}/{repo}/issues/{issue_number}/reactions","GET /repos/{owner}/{repo}/issues/{issue_number}/timeline","GET /repos/{owner}/{repo}/keys","GET /repos/{owner}/{repo}/labels","GET /repos/{owner}/{repo}/milestones","GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels","GET /repos/{owner}/{repo}/notifications","GET /repos/{owner}/{repo}/pages/builds","GET /repos/{owner}/{repo}/projects","GET /repos/{owner}/{repo}/pulls","GET /repos/{owner}/{repo}/pulls/comments","GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/pulls/{pull_number}/comments","GET /repos/{owner}/{repo}/pulls/{pull_number}/commits","GET /repos/{owner}/{repo}/pulls/{pull_number}/files","GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments","GET /repos/{owner}/{repo}/releases","GET /repos/{owner}/{repo}/releases/{release_id}/assets","GET /repos/{owner}/{repo}/secret-scanning/alerts","GET /repos/{owner}/{repo}/stargazers","GET /repos/{owner}/{repo}/subscribers","GET /repos/{owner}/{repo}/tags","GET /repos/{owner}/{repo}/teams","GET /repositories","GET /repositories/{repository_id}/environments/{environment_name}/secrets","GET /scim/v2/enterprises/{enterprise}/Groups","GET /scim/v2/enterprises/{enterprise}/Users","GET /scim/v2/organizations/{org}/Users","GET /search/code","GET /search/commits","GET /search/issues","GET /search/labels","GET /search/repositories","GET /search/topics","GET /search/users","GET /teams/{team_id}/discussions","GET /teams/{team_id}/discussions/{discussion_number}/comments","GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /teams/{team_id}/discussions/{discussion_number}/reactions","GET /teams/{team_id}/invitations","GET /teams/{team_id}/members","GET /teams/{team_id}/projects","GET /teams/{team_id}/repos","GET /teams/{team_id}/team-sync/group-mappings","GET /teams/{team_id}/teams","GET /user/blocks","GET /user/emails","GET /user/followers","GET /user/following","GET /user/gpg_keys","GET /user/installations","GET /user/installations/{installation_id}/repositories","GET /user/issues","GET /user/keys","GET /user/marketplace_purchases","GET /user/marketplace_purchases/stubbed","GET /user/memberships/orgs","GET /user/migrations","GET /user/migrations/{migration_id}/repositories","GET /user/orgs","GET /user/public_emails","GET /user/repos","GET /user/repository_invitations","GET /user/starred","GET /user/subscriptions","GET /user/teams","GET /users","GET /users/{username}/events","GET /users/{username}/events/orgs/{org}","GET /users/{username}/events/public","GET /users/{username}/followers","GET /users/{username}/following","GET /users/{username}/gists","GET /users/{username}/gpg_keys","GET /users/{username}/keys","GET /users/{username}/orgs","GET /users/{username}/projects","GET /users/{username}/received_events","GET /users/{username}/received_events/public","GET /users/{username}/repos","GET /users/{username}/starred","GET /users/{username}/subscriptions"];function isPaginatingEndpoint(e){if(typeof e==="string"){return t.includes(e)}else{return false}}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=a;p.composePaginateRest=d;p.isPaginatingEndpoint=isPaginatingEndpoint;p.paginateRest=paginateRest;p.paginatingEndpoints=t},370:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var d=_interopRequireDefault(a(616));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,d.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var t=version;p.default=t},399:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});const d=a(605);const t=a(211);const i=a(824);let r;var s;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(s=p.HttpCodes||(p.HttpCodes={}));var o;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(o=p.Headers||(p.Headers={}));var n;(function(e){e["ApplicationJson"]="application/json"})(n=p.MediaTypes||(p.MediaTypes={}));function getProxyUrl(e){let p=i.getProxyUrl(new URL(e));return p?p.href:""}p.getProxyUrl=getProxyUrl;const l=[s.MovedPermanently,s.ResourceMoved,s.SeeOther,s.TemporaryRedirect,s.PermanentRedirect];const m=[s.BadGateway,s.ServiceUnavailable,s.GatewayTimeout];const u=["OPTIONS","GET","DELETE","HEAD"];const c=10;const f=5;class HttpClientError extends Error{constructor(e,p){super(e);this.name="HttpClientError";this.statusCode=p;Object.setPrototypeOf(this,HttpClientError.prototype)}}p.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise(async(e,p)=>{let a=Buffer.alloc(0);this.message.on("data",e=>{a=Buffer.concat([a,e])});this.message.on("end",()=>{e(a.toString())})})}}p.HttpClientResponse=HttpClientResponse;function isHttps(e){let p=new URL(e);return p.protocol==="https:"}p.isHttps=isHttps;class HttpClient{constructor(e,p,a){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=p||[];this.requestOptions=a;if(a){if(a.ignoreSslError!=null){this._ignoreSslError=a.ignoreSslError}this._socketTimeout=a.socketTimeout;if(a.allowRedirects!=null){this._allowRedirects=a.allowRedirects}if(a.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=a.allowRedirectDowngrade}if(a.maxRedirects!=null){this._maxRedirects=Math.max(a.maxRedirects,0)}if(a.keepAlive!=null){this._keepAlive=a.keepAlive}if(a.allowRetries!=null){this._allowRetries=a.allowRetries}if(a.maxRetries!=null){this._maxRetries=a.maxRetries}}}options(e,p){return this.request("OPTIONS",e,null,p||{})}get(e,p){return this.request("GET",e,null,p||{})}del(e,p){return this.request("DELETE",e,null,p||{})}post(e,p,a){return this.request("POST",e,p,a||{})}patch(e,p,a){return this.request("PATCH",e,p,a||{})}put(e,p,a){return this.request("PUT",e,p,a||{})}head(e,p){return this.request("HEAD",e,null,p||{})}sendStream(e,p,a,d){return this.request(e,p,a,d)}async getJson(e,p={}){p[o.Accept]=this._getExistingOrDefaultHeader(p,o.Accept,n.ApplicationJson);let a=await this.get(e,p);return this._processResponse(a,this.requestOptions)}async postJson(e,p,a={}){let d=JSON.stringify(p,null,2);a[o.Accept]=this._getExistingOrDefaultHeader(a,o.Accept,n.ApplicationJson);a[o.ContentType]=this._getExistingOrDefaultHeader(a,o.ContentType,n.ApplicationJson);let t=await this.post(e,d,a);return this._processResponse(t,this.requestOptions)}async putJson(e,p,a={}){let d=JSON.stringify(p,null,2);a[o.Accept]=this._getExistingOrDefaultHeader(a,o.Accept,n.ApplicationJson);a[o.ContentType]=this._getExistingOrDefaultHeader(a,o.ContentType,n.ApplicationJson);let t=await this.put(e,d,a);return this._processResponse(t,this.requestOptions)}async patchJson(e,p,a={}){let d=JSON.stringify(p,null,2);a[o.Accept]=this._getExistingOrDefaultHeader(a,o.Accept,n.ApplicationJson);a[o.ContentType]=this._getExistingOrDefaultHeader(a,o.ContentType,n.ApplicationJson);let t=await this.patch(e,d,a);return this._processResponse(t,this.requestOptions)}async request(e,p,a,d){if(this._disposed){throw new Error("Client has already been disposed.")}let t=new URL(p);let i=this._prepareRequest(e,t,d);let r=this._allowRetries&&u.indexOf(e)!=-1?this._maxRetries+1:1;let o=0;let n;while(o0){const r=n.message.headers["location"];if(!r){break}let s=new URL(r);if(t.protocol=="https:"&&t.protocol!=s.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await n.readBody();if(s.hostname!==t.hostname){for(let e in d){if(e.toLowerCase()==="authorization"){delete d[e]}}}i=this._prepareRequest(e,s,d);n=await this.requestRaw(i,a);p--}if(m.indexOf(n.message.statusCode)==-1){return n}o+=1;if(o{let t=function(e,p){if(e){d(e)}a(p)};this.requestRawWithCallback(e,p,t)})}requestRawWithCallback(e,p,a){let d;if(typeof p==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(p,"utf8")}let t=false;let i=(e,p)=>{if(!t){t=true;a(e,p)}};let r=e.httpModule.request(e.options,e=>{let p=new HttpClientResponse(e);i(null,p)});r.on("socket",e=>{d=e});r.setTimeout(this._socketTimeout||3*6e4,()=>{if(d){d.end()}i(new Error("Request timeout: "+e.options.path),null)});r.on("error",function(e){i(e,null)});if(p&&typeof p==="string"){r.write(p,"utf8")}if(p&&typeof p!=="string"){p.on("close",function(){r.end()});p.pipe(r)}else{r.end()}}getAgent(e){let p=new URL(e);return this._getAgent(p)}_prepareRequest(e,p,a){const i={};i.parsedUrl=p;const r=i.parsedUrl.protocol==="https:";i.httpModule=r?t:d;const s=r?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):s;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=e;i.options.headers=this._mergeHeaders(a);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(i.options)})}return i}_mergeHeaders(e){const p=e=>Object.keys(e).reduce((p,a)=>(p[a.toLowerCase()]=e[a],p),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},p(this.requestOptions.headers),p(e))}return p(e||{})}_getExistingOrDefaultHeader(e,p,a){const d=e=>Object.keys(e).reduce((p,a)=>(p[a.toLowerCase()]=e[a],p),{});let t;if(this.requestOptions&&this.requestOptions.headers){t=d(this.requestOptions.headers)[p]}return e[p]||t||a}_getAgent(e){let p;let s=i.getProxyUrl(e);let o=s&&s.hostname;if(this._keepAlive&&o){p=this._proxyAgent}if(this._keepAlive&&!o){p=this._agent}if(!!p){return p}const n=e.protocol==="https:";let l=100;if(!!this.requestOptions){l=this.requestOptions.maxSockets||d.globalAgent.maxSockets}if(o){if(!r){r=a(777)}const e={maxSockets:l,keepAlive:this._keepAlive,proxy:{...(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`},host:s.hostname,port:s.port}};let d;const t=s.protocol==="https:";if(n){d=t?r.httpsOverHttps:r.httpsOverHttp}else{d=t?r.httpOverHttps:r.httpOverHttp}p=d(e);this._proxyAgent=p}if(this._keepAlive&&!p){const e={keepAlive:this._keepAlive,maxSockets:l};p=n?new t.Agent(e):new d.Agent(e);this._agent=p}if(!p){p=n?t.globalAgent:d.globalAgent}if(n&&this._ignoreSslError){p.options=Object.assign(p.options||{},{rejectUnauthorized:false})}return p}_performExponentialBackoff(e){e=Math.min(c,e);const p=f*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),p))}static dateTimeDeserializer(e,p){if(typeof p==="string"){let e=new Date(p);if(!isNaN(e.valueOf())){return e}}return p}async _processResponse(e,p){return new Promise(async(a,d)=>{const t=e.message.statusCode;const i={statusCode:t,result:null,headers:{}};if(t==s.NotFound){a(i)}let r;let o;try{o=await e.readBody();if(o&&o.length>0){if(p&&p.deserializeDates){r=JSON.parse(o,HttpClient.dateTimeDeserializer)}else{r=JSON.parse(o)}i.result=r}i.headers=e.message.headers}catch(e){}if(t>299){let e;if(r&&r.message){e=r.message}else if(o&&o.length>0){e=o}else{e="Failed request: ("+t+")"}let p=new HttpClientError(e,t);p.result=i.result;d(p)}else{a(i)}})}}p.HttpClient=HttpClient},413:function(e){e.exports=require("stream")},416:function(e,p,a){var d=a(445);e.exports=d(once);e.exports.strict=d(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 p=function(){if(p.called)return p.value;p.called=true;return p.value=e.apply(this,arguments)};p.called=false;return p}function onceStrict(e){var p=function(){if(p.called)throw new Error(p.onceError);p.called=true;return p.value=e.apply(this,arguments)};var a=e.name||"Function wrapped with `once`";p.onceError=a+" shouldn't be called more than once";p.called=false;return p}},417:function(e){e.exports=require("crypto")},445:function(e){e.exports=wrappy;function wrappy(e,p){if(e&&p)return wrappy(e)(p);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(p){wrapper[p]=e[p]});return wrapper;function wrapper(){var p=new Array(arguments.length);for(var a=0;ar(this,void 0,void 0,function*(){let p=Buffer.alloc(0);this.message.on("data",e=>{p=Buffer.concat([p,e])});this.message.on("end",()=>{e(p.toString())})}))})}}p.HttpClientResponse=HttpClientResponse;function isHttps(e){const p=new URL(e);return p.protocol==="https:"}p.isHttps=isHttps;class HttpClient{constructor(e,p,a){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=p||[];this.requestOptions=a;if(a){if(a.ignoreSslError!=null){this._ignoreSslError=a.ignoreSslError}this._socketTimeout=a.socketTimeout;if(a.allowRedirects!=null){this._allowRedirects=a.allowRedirects}if(a.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=a.allowRedirectDowngrade}if(a.maxRedirects!=null){this._maxRedirects=Math.max(a.maxRedirects,0)}if(a.keepAlive!=null){this._keepAlive=a.keepAlive}if(a.allowRetries!=null){this._allowRetries=a.allowRetries}if(a.maxRetries!=null){this._maxRetries=a.maxRetries}}}options(e,p){return r(this,void 0,void 0,function*(){return this.request("OPTIONS",e,null,p||{})})}get(e,p){return r(this,void 0,void 0,function*(){return this.request("GET",e,null,p||{})})}del(e,p){return r(this,void 0,void 0,function*(){return this.request("DELETE",e,null,p||{})})}post(e,p,a){return r(this,void 0,void 0,function*(){return this.request("POST",e,p,a||{})})}patch(e,p,a){return r(this,void 0,void 0,function*(){return this.request("PATCH",e,p,a||{})})}put(e,p,a){return r(this,void 0,void 0,function*(){return this.request("PUT",e,p,a||{})})}head(e,p){return r(this,void 0,void 0,function*(){return this.request("HEAD",e,null,p||{})})}sendStream(e,p,a,d){return r(this,void 0,void 0,function*(){return this.request(e,p,a,d)})}getJson(e,p={}){return r(this,void 0,void 0,function*(){p[u.Accept]=this._getExistingOrDefaultHeader(p,u.Accept,c.ApplicationJson);const a=yield this.get(e,p);return this._processResponse(a,this.requestOptions)})}postJson(e,p,a={}){return r(this,void 0,void 0,function*(){const d=JSON.stringify(p,null,2);a[u.Accept]=this._getExistingOrDefaultHeader(a,u.Accept,c.ApplicationJson);a[u.ContentType]=this._getExistingOrDefaultHeader(a,u.ContentType,c.ApplicationJson);const t=yield this.post(e,d,a);return this._processResponse(t,this.requestOptions)})}putJson(e,p,a={}){return r(this,void 0,void 0,function*(){const d=JSON.stringify(p,null,2);a[u.Accept]=this._getExistingOrDefaultHeader(a,u.Accept,c.ApplicationJson);a[u.ContentType]=this._getExistingOrDefaultHeader(a,u.ContentType,c.ApplicationJson);const t=yield this.put(e,d,a);return this._processResponse(t,this.requestOptions)})}patchJson(e,p,a={}){return r(this,void 0,void 0,function*(){const d=JSON.stringify(p,null,2);a[u.Accept]=this._getExistingOrDefaultHeader(a,u.Accept,c.ApplicationJson);a[u.ContentType]=this._getExistingOrDefaultHeader(a,u.ContentType,c.ApplicationJson);const t=yield this.patch(e,d,a);return this._processResponse(t,this.requestOptions)})}request(e,p,a,d){return r(this,void 0,void 0,function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const t=new URL(p);let i=this._prepareRequest(e,t,d);const r=this._allowRetries&&v.includes(e)?this._maxRetries+1:1;let s=0;let o;do{o=yield this.requestRaw(i,a);if(o&&o.message&&o.message.statusCode===m.Unauthorized){let e;for(const p of this.handlers){if(p.canHandleAuthentication(o)){e=p;break}}if(e){return e.handleAuthentication(this,i,a)}else{return o}}let p=this._maxRedirects;while(o.message.statusCode&&f.includes(o.message.statusCode)&&this._allowRedirects&&p>0){const r=o.message.headers["location"];if(!r){break}const s=new URL(r);if(t.protocol==="https:"&&t.protocol!==s.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield o.readBody();if(s.hostname!==t.hostname){for(const e in d){if(e.toLowerCase()==="authorization"){delete d[e]}}}i=this._prepareRequest(e,s,d);o=yield this.requestRaw(i,a);p--}if(!o.message.statusCode||!h.includes(o.message.statusCode)){return o}s+=1;if(s{function callbackForResult(e,p){if(e){d(e)}else if(!p){d(new Error("Unknown error"))}else{a(p)}}this.requestRawWithCallback(e,p,callbackForResult)})})}requestRawWithCallback(e,p,a){if(typeof p==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(p,"utf8")}let d=false;function handleResult(e,p){if(!d){d=true;a(e,p)}}const t=e.httpModule.request(e.options,e=>{const p=new HttpClientResponse(e);handleResult(undefined,p)});let i;t.on("socket",e=>{i=e});t.setTimeout(this._socketTimeout||3*6e4,()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))});t.on("error",function(e){handleResult(e)});if(p&&typeof p==="string"){t.write(p,"utf8")}if(p&&typeof p!=="string"){p.on("close",function(){t.end()});p.pipe(t)}else{t.end()}}getAgent(e){const p=new URL(e);return this._getAgent(p)}_prepareRequest(e,p,a){const d={};d.parsedUrl=p;const t=d.parsedUrl.protocol==="https:";d.httpModule=t?o:s;const i=t?443:80;d.options={};d.options.host=d.parsedUrl.hostname;d.options.port=d.parsedUrl.port?parseInt(d.parsedUrl.port):i;d.options.path=(d.parsedUrl.pathname||"")+(d.parsedUrl.search||"");d.options.method=e;d.options.headers=this._mergeHeaders(a);if(this.userAgent!=null){d.options.headers["user-agent"]=this.userAgent}d.options.agent=this._getAgent(d.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(d.options)}}return d}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},_(this.requestOptions.headers),_(e||{}))}return _(e||{})}_getExistingOrDefaultHeader(e,p,a){let d;if(this.requestOptions&&this.requestOptions.headers){d=_(this.requestOptions.headers)[p]}return e[p]||d||a}_getAgent(e){let p;const a=n.getProxyUrl(e);const d=a&&a.hostname;if(this._keepAlive&&d){p=this._proxyAgent}if(this._keepAlive&&!d){p=this._agent}if(p){return p}const t=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(a&&a.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`}),{host:a.hostname,port:a.port})};let d;const r=a.protocol==="https:";if(t){d=r?l.httpsOverHttps:l.httpsOverHttp}else{d=r?l.httpOverHttps:l.httpOverHttp}p=d(e);this._proxyAgent=p}if(this._keepAlive&&!p){const e={keepAlive:this._keepAlive,maxSockets:i};p=t?new o.Agent(e):new s.Agent(e);this._agent=p}if(!p){p=t?o.globalAgent:s.globalAgent}if(t&&this._ignoreSslError){p.options=Object.assign(p.options||{},{rejectUnauthorized:false})}return p}_performExponentialBackoff(e){return r(this,void 0,void 0,function*(){e=Math.min(w,e);const p=g*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),p))})}_processResponse(e,p){return r(this,void 0,void 0,function*(){return new Promise((a,d)=>r(this,void 0,void 0,function*(){const t=e.message.statusCode||0;const i={statusCode:t,result:null,headers:{}};if(t===m.NotFound){a(i)}function dateTimeDeserializer(e,p){if(typeof p==="string"){const e=new Date(p);if(!isNaN(e.valueOf())){return e}}return p}let r;let s;try{s=yield e.readBody();if(s&&s.length>0){if(p&&p.deserializeDates){r=JSON.parse(s,dateTimeDeserializer)}else{r=JSON.parse(s)}i.result=r}i.headers=e.message.headers}catch(e){}if(t>299){let e;if(r&&r.message){e=r.message}else if(s&&s.length>0){e=s}else{e=`Failed request: (${t})`}const p=new HttpClientError(e,t);p.result=i.result;d(p)}else{a(i)}}))})}}p.HttpClient=HttpClient;const _=e=>Object.keys(e).reduce((p,a)=>(p[a.toLowerCase()]=e[a],p),{})},512:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))d(p,e,a);t(p,e);return p};var r=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};Object.defineProperty(p,"__esModule",{value:true});p.getIDToken=p.getState=p.saveState=p.group=p.endGroup=p.startGroup=p.info=p.notice=p.warning=p.error=p.debug=p.isDebug=p.setFailed=p.setCommandEcho=p.setOutput=p.getBooleanInput=p.getMultilineInput=p.getInput=p.addPath=p.setSecret=p.exportVariable=p.ExitCode=void 0;const s=a(360);const o=a(482);const n=a(981);const l=i(a(87));const m=i(a(622));const u=a(70);const c=a(112);var f;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(f=p.ExitCode||(p.ExitCode={}));function exportVariable(e,p){const a=n.toCommandValue(p);process.env[e]=a;const d=process.env["GITHUB_ENV"]||"";if(d){const p=`ghadelimiter_${u.v4()}`;if(e.includes(p)){throw new Error(`Unexpected input: name should not contain the delimiter "${p}"`)}if(a.includes(p)){throw new Error(`Unexpected input: value should not contain the delimiter "${p}"`)}const d=`${e}<<${p}${l.EOL}${a}${l.EOL}${p}`;o.issueCommand("ENV",d)}else{s.issueCommand("set-env",{name:e},a)}}p.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}p.setSecret=setSecret;function addPath(e){const p=process.env["GITHUB_PATH"]||"";if(p){o.issueCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${m.delimiter}${process.env["PATH"]}`}p.addPath=addPath;function getInput(e,p){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(p&&p.required&&!a){throw new Error(`Input required and not supplied: ${e}`)}if(p&&p.trimWhitespace===false){return a}return a.trim()}p.getInput=getInput;function getMultilineInput(e,p){const a=getInput(e,p).split("\n").filter(e=>e!=="");return a}p.getMultilineInput=getMultilineInput;function getBooleanInput(e,p){const a=["true","True","TRUE"];const d=["false","False","FALSE"];const t=getInput(e,p);if(a.includes(t))return true;if(d.includes(t))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}p.getBooleanInput=getBooleanInput;function setOutput(e,p){process.stdout.write(l.EOL);s.issueCommand("set-output",{name:e},p)}p.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}p.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=f.Failure;error(e)}p.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}p.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}p.debug=debug;function error(e,p={}){s.issueCommand("error",n.toCommandProperties(p),e instanceof Error?e.toString():e)}p.error=error;function warning(e,p={}){s.issueCommand("warning",n.toCommandProperties(p),e instanceof Error?e.toString():e)}p.warning=warning;function notice(e,p={}){s.issueCommand("notice",n.toCommandProperties(p),e instanceof Error?e.toString():e)}p.notice=notice;function info(e){process.stdout.write(e+l.EOL)}p.info=info;function startGroup(e){s.issue("group",e)}p.startGroup=startGroup;function endGroup(){s.issue("endgroup")}p.endGroup=endGroup;function group(e,p){return r(this,void 0,void 0,function*(){startGroup(e);let a;try{a=yield p()}finally{endGroup()}return a})}p.group=group;function saveState(e,p){s.issueCommand("save-state",{name:e},p)}p.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}p.getState=getState;function getIDToken(e){return r(this,void 0,void 0,function*(){return yield c.OidcClient.getIDToken(e)})}p.getIDToken=getIDToken;var h=a(48);Object.defineProperty(p,"summary",{enumerable:true,get:function(){return h.summary}});var v=a(48);Object.defineProperty(p,"markdownSummary",{enumerable:true,get:function(){return v.markdownSummary}});var w=a(667);Object.defineProperty(p,"toPosixPath",{enumerable:true,get:function(){return w.toPosixPath}});Object.defineProperty(p,"toWin32Path",{enumerable:true,get:function(){return w.toWin32Path}});Object.defineProperty(p,"toPlatformPath",{enumerable:true,get:function(){return w.toPlatformPath}})},534:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))d(p,e,a);t(p,e);return p};var r=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};Object.defineProperty(p,"__esModule",{value:true});p.argStringToArray=p.ToolRunner=void 0;const s=i(a(87));const o=i(a(614));const n=i(a(129));const l=i(a(622));const m=i(a(240));const u=i(a(926));const c=a(343);const f=process.platform==="win32";class ToolRunner extends o.EventEmitter{constructor(e,p,a){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=p||[];this.options=a||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,p){const a=this._getSpawnFileName();const d=this._getSpawnArgs(e);let t=p?"":"[command]";if(f){if(this._isCmdFile()){t+=a;for(const e of d){t+=` ${e}`}}else if(e.windowsVerbatimArguments){t+=`"${a}"`;for(const e of d){t+=` ${e}`}}else{t+=this._windowsQuoteCmdArg(a);for(const e of d){t+=` ${this._windowsQuoteCmdArg(e)}`}}}else{t+=a;for(const e of d){t+=` ${e}`}}return t}_processLineBuffer(e,p,a){try{let d=p+e.toString();let t=d.indexOf(s.EOL);while(t>-1){const e=d.substring(0,t);a(e);d=d.substring(t+s.EOL.length);t=d.indexOf(s.EOL)}return d}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let p=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const a of this.args){p+=" ";p+=e.windowsVerbatimArguments?a:this._windowsQuoteCmdArg(a)}p+='"';return[p]}}return this.args}_endsWith(e,p){return e.endsWith(p)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const p=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let a=false;for(const d of e){if(p.some(e=>e===d)){a=true;break}}if(!a){return e}let d='"';let t=true;for(let p=e.length;p>0;p--){d+=e[p-1];if(t&&e[p-1]==="\\"){d+="\\"}else if(e[p-1]==='"'){t=true;d+='"'}else{t=false}}d+='"';return d.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let p='"';let a=true;for(let d=e.length;d>0;d--){p+=e[d-1];if(a&&e[d-1]==="\\"){p+="\\"}else if(e[d-1]==='"'){a=true;p+="\\"}else{a=false}}p+='"';return p.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const p={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};p.outStream=e.outStream||process.stdout;p.errStream=e.errStream||process.stderr;return p}_getSpawnOptions(e,p){e=e||{};const a={};a.cwd=e.cwd;a.env=e.env;a["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){a.argv0=`"${p}"`}return a}exec(){return r(this,void 0,void 0,function*(){if(!u.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield m.which(this.toolPath,true);return new Promise((e,p)=>r(this,void 0,void 0,function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const a=this._cloneExecOptions(this.options);if(!a.silent&&a.outStream){a.outStream.write(this._getCommandString(a)+s.EOL)}const d=new ExecState(a,this.toolPath);d.on("debug",e=>{this._debug(e)});if(this.options.cwd&&!(yield u.exists(this.options.cwd))){return p(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const t=this._getSpawnFileName();const i=n.spawn(t,this._getSpawnArgs(a),this._getSpawnOptions(this.options,t));let r="";if(i.stdout){i.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!a.silent&&a.outStream){a.outStream.write(e)}r=this._processLineBuffer(e,r,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}let o="";if(i.stderr){i.stderr.on("data",e=>{d.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!a.silent&&a.errStream&&a.outStream){const p=a.failOnStdErr?a.errStream:a.outStream;p.write(e)}o=this._processLineBuffer(e,o,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}i.on("error",e=>{d.processError=e.message;d.processExited=true;d.processClosed=true;d.CheckComplete()});i.on("exit",e=>{d.processExitCode=e;d.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);d.CheckComplete()});i.on("close",e=>{d.processExitCode=e;d.processExited=true;d.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);d.CheckComplete()});d.on("done",(a,d)=>{if(r.length>0){this.emit("stdline",r)}if(o.length>0){this.emit("errline",o)}i.removeAllListeners();if(a){p(a)}else{e(d)}});if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))})}}p.ToolRunner=ToolRunner;function argStringToArray(e){const p=[];let a=false;let d=false;let t="";function append(e){if(d&&e!=='"'){t+="\\"}t+=e;d=false}for(let i=0;i0){p.push(t);t=""}continue}append(r)}if(t.length>0){p.push(t.trim())}return p}p.argStringToArray=argStringToArray;class ExecState extends o.EventEmitter{constructor(e,p){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!p){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=p;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=c.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const p=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(p)}e._setResult()}}},538:function(e,p){"use strict";var a=this&&this.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};Object.defineProperty(p,"__esModule",{value:true});p.PersonalAccessTokenCredentialHandler=p.BearerCredentialHandler=p.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,p){this.username=e;this.password=p}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return a(this,void 0,void 0,function*(){throw new Error("not implemented")})}}p.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return a(this,void 0,void 0,function*(){throw new Error("not implemented")})}}p.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return a(this,void 0,void 0,function*(){throw new Error("not implemented")})}}p.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},546:function(e){e.exports=addHook;function addHook(e,p,a,d){var t=d;if(!e.registry[a]){e.registry[a]=[]}if(p==="before"){d=function(e,p){return Promise.resolve().then(t.bind(null,p)).then(e.bind(null,p))}}if(p==="after"){d=function(e,p){var a;return Promise.resolve().then(e.bind(null,p)).then(function(e){a=e;return t(a,p)}).then(function(){return a})}}if(p==="error"){d=function(e,p){return Promise.resolve().then(e.bind(null,p)).catch(function(e){return t(e,p)})}}e.registry[a].push({hook:d,orig:t})}},547:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))d(p,e,a);t(p,e);return p};Object.defineProperty(p,"__esModule",{value:true});p.getApiBaseUrl=p.getProxyAgent=p.getAuthString=void 0;const r=i(a(399));function getAuthString(e,p){if(!e&&!p.auth){throw new Error("Parameter token or opts.auth is required")}else if(e&&p.auth){throw new Error("Parameters token and opts.auth may not both be specified")}return typeof p.auth==="string"?p.auth:`token ${e}`}p.getAuthString=getAuthString;function getProxyAgent(e){const p=new r.HttpClient;return p.getAgent(e)}p.getProxyAgent=getProxyAgent;function getApiBaseUrl(){return process.env["GITHUB_API_URL"]||"https://api.github.com"}p.getApiBaseUrl=getApiBaseUrl},594:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var d=_interopRequireDefault(a(616));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const t=[];for(let e=0;e<256;++e){t.push((e+256).toString(16).substr(1))}function stringify(e,p=0){const a=(t[e[p+0]]+t[e[p+1]]+t[e[p+2]]+t[e[p+3]]+"-"+t[e[p+4]]+t[e[p+5]]+"-"+t[e[p+6]]+t[e[p+7]]+"-"+t[e[p+8]]+t[e[p+9]]+"-"+t[e[p+10]]+t[e[p+11]]+t[e[p+12]]+t[e[p+13]]+t[e[p+14]]+t[e[p+15]]).toLowerCase();if(!(0,d.default)(a)){throw TypeError("Stringified UUID is invalid")}return a}var i=stringify;p.default=i},605:function(e){e.exports=require("http")},614:function(e){e.exports=require("events")},615:function(e,p,a){var d=a(151);var t=a(546);var i=a(856);var r=Function.bind;var s=r.bind(r);function bindApi(e,p,a){var d=s(i,null).apply(null,a?[p,a]:[p]);e.api={remove:d};e.remove=d;["before","error","after","wrap"].forEach(function(d){var i=a?[p,d,a]:[p,d];e[d]=e.api[d]=s(t,null).apply(null,i)})}function HookSingular(){var e="h";var p={registry:{}};var a=d.bind(null,p,e);bindApi(a,p,e);return a}function HookCollection(){var e={registry:{}};var p=d.bind(null,e);bindApi(p,e);return p}var o=false;function Hook(){if(!o){console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');o=true}return HookCollection()}Hook.Singular=HookSingular.bind();Hook.Collection=HookCollection.bind();e.exports=Hook;e.exports.Hook=Hook;e.exports.Singular=Hook.Singular;e.exports.Collection=Hook.Collection},616:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var d=_interopRequireDefault(a(302));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&d.default.test(e)}var t=validate;p.default=t},622:function(e){e.exports=require("path")},629:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.default=void 0;var d=_interopRequireDefault(a(247));var t=_interopRequireDefault(a(478));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=(0,d.default)("v5",80,t.default);var r=i;p.default=r},631:function(e){e.exports=require("net")},646:function(e){"use strict";var p={};e.exports=p;function sign(e){return e<0?-1:1}function evenRound(e){if(e%1===.5&&(e&1)===0){return Math.floor(e)}else{return Math.round(e)}}function createNumberConversion(e,p){if(!p.unsigned){--e}const a=p.unsigned?0:-Math.pow(2,e);const d=Math.pow(2,e)-1;const t=p.moduloBitLength?Math.pow(2,p.moduloBitLength):Math.pow(2,e);const i=p.moduloBitLength?Math.pow(2,p.moduloBitLength-1):Math.pow(2,e-1);return function(e,r){if(!r)r={};let s=+e;if(r.enforceRange){if(!Number.isFinite(s)){throw new TypeError("Argument is not a finite number")}s=sign(s)*Math.floor(Math.abs(s));if(sd){throw new TypeError("Argument is not in byte range")}return s}if(!isNaN(s)&&r.clamp){s=evenRound(s);if(sd)s=d;return s}if(!Number.isFinite(s)||s===0){return 0}s=sign(s)*Math.floor(Math.abs(s));s=s%t;if(!p.unsigned&&s>=i){return s-t}else if(p.unsigned){if(s<0){s+=t}else if(s===-0){return 0}}return s}}p["void"]=function(){return undefined};p["boolean"]=function(e){return!!e};p["byte"]=createNumberConversion(8,{unsigned:false});p["octet"]=createNumberConversion(8,{unsigned:true});p["short"]=createNumberConversion(16,{unsigned:false});p["unsigned short"]=createNumberConversion(16,{unsigned:true});p["long"]=createNumberConversion(32,{unsigned:false});p["unsigned long"]=createNumberConversion(32,{unsigned:true});p["long long"]=createNumberConversion(32,{unsigned:false,moduloBitLength:64});p["unsigned long long"]=createNumberConversion(32,{unsigned:true,moduloBitLength:64});p["double"]=function(e){const p=+e;if(!Number.isFinite(p)){throw new TypeError("Argument is not a finite floating-point value")}return p};p["unrestricted double"]=function(e){const p=+e;if(isNaN(p)){throw new TypeError("Argument is NaN")}return p};p["float"]=p["double"];p["unrestricted float"]=p["unrestricted double"];p["DOMString"]=function(e,p){if(!p)p={};if(p.treatNullAsEmptyString&&e===null){return""}return String(e)};p["ByteString"]=function(e,p){const a=String(e);let d=undefined;for(let e=0;(d=a.codePointAt(e))!==undefined;++e){if(d>255){throw new TypeError("Argument is not a valid bytestring")}}return a};p["USVString"]=function(e){const p=String(e);const a=p.length;const d=[];for(let e=0;e57343){d.push(String.fromCodePoint(t))}else if(56320<=t&&t<=57343){d.push(String.fromCodePoint(65533))}else{if(e===a-1){d.push(String.fromCodePoint(65533))}else{const a=p.charCodeAt(e+1);if(56320<=a&&a<=57343){const p=t&1023;const i=a&1023;d.push(String.fromCodePoint((2<<15)+(2<<9)*p+i));++e}else{d.push(String.fromCodePoint(65533))}}}}return d.join("")};p["Date"]=function(e,p){if(!(e instanceof Date)){throw new TypeError("Argument is not a Date object")}if(isNaN(e)){return undefined}return e};p["RegExp"]=function(e,p){if(!(e instanceof RegExp)){e=new RegExp(e)}return e}},667:function(e,p,a){"use strict";var d=this&&this.__createBinding||(Object.create?function(e,p,a,d){if(d===undefined)d=a;Object.defineProperty(e,d,{enumerable:true,get:function(){return p[a]}})}:function(e,p,a,d){if(d===undefined)d=a;e[d]=p[a]});var t=this&&this.__setModuleDefault||(Object.create?function(e,p){Object.defineProperty(e,"default",{enumerable:true,value:p})}:function(e,p){e["default"]=p});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var p={};if(e!=null)for(var a in e)if(a!=="default"&&Object.hasOwnProperty.call(e,a))d(p,e,a);t(p,e);return p};Object.defineProperty(p,"__esModule",{value:true});p.toPlatformPath=p.toWin32Path=p.toPosixPath=void 0;const r=i(a(622));function toPosixPath(e){return e.replace(/[\\]/g,"/")}p.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}p.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,r.sep)}p.toPlatformPath=toPlatformPath},669:function(e){e.exports=require("util")},694:function(e,p){"use strict";Object.defineProperty(p,"__esModule",{value:true});function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var p,a;if(isObject(e)===false)return false;p=e.constructor;if(p===undefined)return true;a=p.prototype;if(isObject(a)===false)return false;if(a.hasOwnProperty("isPrototypeOf")===false){return false}return true}p.isPlainObject=isPlainObject},707:function(e,p,a){"use strict";a.r(p);var d=a(512);var t=a(803);var i=a(244);var r=a(747);function dirExists(e){try{Object(r.mkdirSync)(e)}catch(e){if(e.code!=="EEXIST"){throw e}}}function removeDir(e){try{Object(r.rmdirSync)(e,{recursive:true})}catch(e){if(e.code!=="ENOENT"){throw e}}}function removeFile(e){try{Object(r.unlinkSync)(e)}catch(e){if(e.code!=="ENOENT"){throw e}}}var s=undefined&&undefined.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};function getExecOutput(e,p,a){return s(this,void 0,void 0,function*(){let d="";a=a||{};yield Object(i.exec)(e,p,Object.assign({listeners:{stdout:e=>{d+=e.toString()}}},a));return d.trim()})}var o=undefined&&undefined.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};function ensureRemoteExists(e,p){return o(this,void 0,void 0,function*(){try{yield Object(i.exec)("git",["remote","add",e,p])}catch(e){if(!e.message.match(/failed with exit code 3$/g)){throw e}}})}function tagExists(e,p){return o(this,void 0,void 0,function*(){try{let a=yield Object(i.exec)("git",["show-ref","--tags","--quiet","--verify","--",`refs/tags/${e}`],{cwd:p});return a===0}catch(e){return false}})}function publishSubSplit(e,p,a,d,t){return o(this,void 0,void 0,function*(){let d=yield getExecOutput(e,[`--prefix=${t}`,`--origin=origin/${a}`]);yield Object(i.exec)("git",["push",p,`${d.trim()}:refs/heads/${a}`,"-f"])})}function commitHashHasTag(e,p){return o(this,void 0,void 0,function*(){let a=yield getExecOutput("git",["tag","--points-at",e],{cwd:p});Object(d.info)(`${e} points-at ${a}`);return a!==""})}var n=a(622);var l=undefined&&undefined.__awaiter||function(e,p,a,d){function adopt(e){return e instanceof a?e:new a(function(p){p(e)})}return new(a||(a=Promise))(function(a,t){function fulfilled(e){try{step(d.next(e))}catch(e){t(e)}}function rejected(e){try{step(d["throw"](e))}catch(e){t(e)}}function step(e){e.done?a(e.value):adopt(e.value).then(fulfilled,rejected)}step((d=d.apply(e,p||[])).next())})};const m="./splitsh";function downloadSplitsh(){return l(this,void 0,void 0,function*(){let e=Object(n.dirname)(m);let p="/tmp/splitsh/";dirExists(e);removeFile(m);removeDir(p);Object(r.mkdirSync)(p);let a=`${p}split-lite.tar.gz`;let t=process.platform==="darwin"?"lite_darwin_amd64":"lite_linux_amd64";Object(d.debug)(`Downloading splitsh for "${t}"`);let s=`https://github.com/splitsh/lite/releases/download/v1.0.1/${t}.tar.gz`;yield Object(i.exec)(`wget -O ${a} ${s}`);yield Object(i.exec)(`tar -zxpf ${a} --directory ${p}`);yield Object(i.exec)(`chmod +x ${p}splitsh-lite`);yield Object(i.exec)(`mv ${p}splitsh-lite ${m}`);removeDir(p)})}function promiseAllInBatches(e,p,a){return l(this,void 0,void 0,function*(){let t=0;while(ta(e)));t+=p}})}(()=>l(void 0,void 0,void 0,function*(){const e=t.context;const p=Object(d.getInput)("config-path");const a=Object(d.getInput)("batch-size");const s=isNaN(parseInt(a))?1:parseInt(a);if(!Object(r.existsSync)(m)){yield downloadSplitsh()}let o=JSON.parse(Object(r.readFileSync)(p).toString());let n=o["subtree-splits"];console.table(n);for(let e of n){yield ensureRemoteExists(e.name,e.target)}if(e.eventName==="push"){if(!e.ref.includes("refs/heads")){Object(d.info)("Push event was for a tag, skipping...");return}const p=e.ref.split("/").pop();if(typeof p=="undefined"){Object(d.error)('Unable to get branch name from event data. Got ref "'+e.ref+'"');return}yield promiseAllInBatches(n,s,e=>l(void 0,void 0,void 0,function*(){yield publishSubSplit(m,e.name,p,e.name,e.directory)}))}else if(e.eventName==="create"){let p=e.payload;let a=p.ref;if(p.ref_type!=="tag"){Object(d.info)("No tag was created, skipping...");return}yield promiseAllInBatches(n,s,e=>l(void 0,void 0,void 0,function*(){let p=yield getExecOutput(m,[`--prefix=${e.directory}`,`--origin=tags/${a}`]);let d=`./.repositories/${e.name}/`;Object(r.mkdirSync)(d,{recursive:true});yield Object(i.exec)("git",["clone",e.target,"."],{cwd:d});if(!(yield tagExists(a,d))){yield Object(i.exec)("git",["tag","-a",a,p,"-m",`"Tag ${a}"`],{cwd:d})}yield Object(i.exec)("git",["push","--tags"],{cwd:d})}))}else if(e.eventName==="delete"){let p=e.payload;let a=p.ref;if(p.ref_type!=="tag"){Object(d.info)("No tag was deleted, skipping...");return}yield promiseAllInBatches(n,s,e=>l(void 0,void 0,void 0,function*(){let p=`./.repositories/${e.name}/`;Object(r.mkdirSync)(p,{recursive:true});yield Object(i.exec)("git",["clone",e.target,"."],{cwd:p});if(yield tagExists(a,p)){yield Object(i.exec)("git",["push","--delete","origin",a],{cwd:p})}}))}}))().catch(e=>{Object(d.setFailed)(e)})},715:function(e,p,a){"use strict";Object.defineProperty(p,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var d=a(341);var t=a(314);var i=a(694);var r=_interopDefault(a(25));var s=a(26);const o="5.6.1";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){const p=e.request&&e.request.log?e.request.log:console;if(i.isPlainObject(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let a={};let d;let t;const o=e.request&&e.request.fetch||r;return o(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then(async i=>{t=i.url;d=i.status;for(const e of i.headers){a[e[0]]=e[1]}if("deprecation"in a){const d=a.link&&a.link.match(/<([^>]+)>; rel="deprecation"/);const t=d&&d.pop();p.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${a.sunset}${t?`. See ${t}`:""}`)}if(d===204||d===205){return}if(e.method==="HEAD"){if(d<400){return}throw new s.RequestError(i.statusText,d,{response:{url:t,status:d,headers:a,data:undefined},request:e})}if(d===304){throw new s.RequestError("Not modified",d,{response:{url:t,status:d,headers:a,data:await getResponseData(i)},request:e})}if(d>=400){const p=await getResponseData(i);const r=new s.RequestError(toErrorMessage(p),d,{response:{url:t,status:d,headers:a,data:p},request:e});throw r}return getResponseData(i)}).then(e=>{return{status:d,url:t,headers:a,data:e}}).catch(p=>{if(p instanceof s.RequestError)throw p;throw new s.RequestError(p.message,500,{request:e})})}async function getResponseData(e){const p=e.headers.get("content-type");if(/application\/json/.test(p)){return e.json()}if(!p||/^text\/|charset=utf-8$/.test(p)){return e.text()}return getBufferResponse(e)}function toErrorMessage(e){if(typeof e==="string")return e;if("message"in e){if(Array.isArray(e.errors)){return`${e.message}: ${e.errors.map(JSON.stringify).join(", ")}`}return e.message}return`Unknown error: ${JSON.stringify(e)}`}function withDefaults(e,p){const a=e.defaults(p);const d=function(e,p){const d=a.merge(e,p);if(!d.request||!d.request.hook){return fetchWrapper(a.parse(d))}const t=(e,p)=>{return fetchWrapper(a.parse(a.merge(e,p)))};Object.assign(t,{endpoint:a,defaults:withDefaults.bind(null,a)});return d.request.hook(t,d)};return Object.assign(d,{endpoint:a,defaults:withDefaults.bind(null,a)})}const n=withDefaults(d.endpoint,{headers:{"user-agent":`octokit-request.js/${o} ${t.getUserAgent()}`}});p.request=n},718:function(e,p,a){"use strict";const d=a(646);const t=a(769);const i=a(80);const r=t.implSymbol;function URL(p){if(!this||this[r]||!(this instanceof URL)){throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.")}if(arguments.length<1){throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.")}const a=[];for(let e=0;ee.trim().toUpperCase()).filter(e=>e)){if(d.some(p=>p===e)){return true}}return false}p.checkBypass=checkBypass},835:function(e){e.exports=require("url")},847:function(e,p){"use strict";Object.defineProperty(p,"__esModule",{value:true});p.checkBypass=p.getProxyUrl=void 0;function getProxyUrl(e){const p=e.protocol==="https:";if(checkBypass(e)){return undefined}const a=(()=>{if(p){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(a){return new URL(a)}else{return undefined}}p.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const p=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!p){return false}let a;if(e.port){a=Number(e.port)}else if(e.protocol==="http:"){a=80}else if(e.protocol==="https:"){a=443}const d=[e.hostname.toUpperCase()];if(typeof a==="number"){d.push(`${d[0]}:${a}`)}for(const e of p.split(",").map(e=>e.trim().toUpperCase()).filter(e=>e)){if(d.some(p=>p===e)){return true}}return false}p.checkBypass=checkBypass},856:function(e){e.exports=removeHook;function removeHook(e,p,a){if(!e.registry[p]){return}var d=e.registry[p].map(function(e){return e.orig}).indexOf(a);if(d===-1){return}e.registry[p].splice(d,1)}},906:function(e,p,a){"use strict";var d=a(213);var t=a(799);var i={TRANSITIONAL:0,NONTRANSITIONAL:1};function normalize(e){return e.split("\0").map(function(e){return e.normalize("NFC")}).join("\0")}function findStatus(e){var p=0;var a=t.length-1;while(p<=a){var d=Math.floor((p+a)/2);var i=t[d];if(i[0][0]<=e&&i[0][1]>=e){return i}else if(i[0][0]>e){a=d-1}else{p=d+1}}return null}var r=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function countSymbols(e){return e.replace(r,"_").length}function mapChars(e,p,a){var d=false;var t="";var r=countSymbols(e);for(var s=0;s253||s.length===0){i.error=true}for(var o=0;o63||r.length===0){i.error=true;break}}}if(i.error)return null;return r.join(".")};e.exports.toUnicode=function(e,p){var a=processing(e,p,i.NONTRANSITIONAL);return{domain:a.string,error:a.error}};e.exports.PROCESSING_OPTIONS=i},908:function(e,p){"use strict";Object.defineProperty(p,"__esModule",{value:true});function ownKeys(e,p){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);if(p){d=d.filter(function(p){return Object.getOwnPropertyDescriptor(e,p).enumerable})}a.push.apply(a,d)}return a}function _objectSpread2(e){for(var p=1;pe.toUpperCase()===p)){return e}}else{if(isUnixExecutable(d)){return e}}}const t=e;for(const i of a){e=t+i;d=undefined;try{d=yield p.stat(e)}catch(p){if(p.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${p}`)}}if(d&&d.isFile()){if(p.IS_WINDOWS){try{const a=n.dirname(e);const d=n.basename(e).toUpperCase();for(const t of yield p.readdir(a)){if(d===t.toUpperCase()){e=n.join(a,t);break}}}catch(p){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${p}`)}return e}else{if(isUnixExecutable(d)){return e}}}}return""})}p.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(p.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}p.getCmdPath=getCmdPath},958:function(e,p,a){"use strict";var d=a(631);var t=a(16);var i=a(605);var r=a(211);var s=a(614);var o=a(357);var n=a(669);p.httpOverHttp=httpOverHttp;p.httpsOverHttp=httpsOverHttp;p.httpOverHttps=httpOverHttps;p.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var p=new TunnelingAgent(e);p.request=i.request;return p}function httpsOverHttp(e){var p=new TunnelingAgent(e);p.request=i.request;p.createSocket=createSecureSocket;p.defaultPort=443;return p}function httpOverHttps(e){var p=new TunnelingAgent(e);p.request=r.request;return p}function httpsOverHttps(e){var p=new TunnelingAgent(e);p.request=r.request;p.createSocket=createSecureSocket;p.defaultPort=443;return p}function TunnelingAgent(e){var p=this;p.options=e||{};p.proxyOptions=p.options.proxy||{};p.maxSockets=p.options.maxSockets||i.Agent.defaultMaxSockets;p.requests=[];p.sockets=[];p.on("free",function onFree(e,a,d,t){var i=toOptions(a,d,t);for(var r=0,s=p.requests.length;r=this.maxSockets){t.requests.push(i);return}t.createSocket(i,function(p){p.on("free",onFree);p.on("close",onCloseOrRemove);p.on("agentRemove",onCloseOrRemove);e.onSocket(p);function onFree(){t.emit("free",p,i)}function onCloseOrRemove(e){t.removeSocket(p);p.removeListener("free",onFree);p.removeListener("close",onCloseOrRemove);p.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(e,p){var a=this;var d={};a.sockets.push(d);var t=mergeOptions({},a.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){t.localAddress=e.localAddress}if(t.proxyAuth){t.headers=t.headers||{};t.headers["Proxy-Authorization"]="Basic "+new Buffer(t.proxyAuth).toString("base64")}l("making CONNECT request");var i=a.request(t);i.useChunkedEncodingByDefault=false;i.once("response",onResponse);i.once("upgrade",onUpgrade);i.once("connect",onConnect);i.once("error",onError);i.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,p,a){process.nextTick(function(){onConnect(e,p,a)})}function onConnect(t,r,s){i.removeAllListeners();r.removeAllListeners();if(t.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",t.statusCode);r.destroy();var o=new Error("tunneling socket could not be established, "+"statusCode="+t.statusCode);o.code="ECONNRESET";e.request.emit("error",o);a.removeSocket(d);return}if(s.length>0){l("got illegal response body from proxy");r.destroy();var o=new Error("got illegal response body from proxy");o.code="ECONNRESET";e.request.emit("error",o);a.removeSocket(d);return}l("tunneling connection has established");a.sockets[a.sockets.indexOf(d)]=r;return p(r)}function onError(p){i.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",p.message,p.stack);var t=new Error("tunneling socket could not be established, "+"cause="+p.message);t.code="ECONNRESET";e.request.emit("error",t);a.removeSocket(d)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var p=this.sockets.indexOf(e);if(p===-1){return}this.sockets.splice(p,1);var a=this.requests.shift();if(a){this.createSocket(a,function(e){a.request.onSocket(e)})}};function createSecureSocket(e,p){var a=this;TunnelingAgent.prototype.createSocket.call(a,e,function(d){var i=e.request.getHeader("host");var r=mergeOptions({},a.options,{socket:d,servername:i?i.replace(/:.*$/,""):e.host});var s=t.connect(0,r);a.sockets[a.sockets.indexOf(d)]=s;p(s)})}function toOptions(e,p,a){if(typeof e==="string"){return{host:e,port:p,localAddress:a}}return e}function mergeOptions(e){for(var p=1,a=arguments.length;pt.length-16){d.default.randomFillSync(t);i=0}return t.slice(i,i+=16)}}},function(e){"use strict";!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){var p=Object.prototype.hasOwnProperty;e.d=function(e,a,d){if(!p.call(e,a)){Object.defineProperty(e,a,{enumerable:true,get:d})}}}();!function(){e.t=function(p,a){if(a&1)p=this(p);if(a&8)return p;if(a&4&&typeof p==="object"&&p&&p.__esModule)return p;var d=Object.create(null);e.r(d);Object.defineProperty(d,"default",{enumerable:true,value:p});if(a&2&&typeof p!="string")for(var t in p)e.d(d,t,function(e){return p[e]}.bind(null,t));return d}}();!function(){e.n=function(p){var a=p&&p.__esModule?function getDefault(){return p["default"]}:function getModuleExports(){return p};e.d(a,"a",a);return a}}()}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index bd44732..df34ad7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,64 +5,57 @@ "packages": { "": { "name": "subtree-splitter", - "license": "MIT", + "license": "Do not publish", "dependencies": { - "@actions/core": "^1.9.1", - "@actions/exec": "^1.1.0", - "@actions/github": "^5.0.0", - "@octokit/webhooks-types": "^4.3.0" + "@actions/core": "^1.10.1", + "@actions/exec": "^1.1.1", + "@actions/github": "^5.1.1", + "@octokit/webhooks-types": "^7.3.1" }, "devDependencies": { - "@types/node": "^16.6.1", - "@vercel/ncc": "^0.29.1", - "typescript": "^4.3.5" + "@types/node": "^20.8.3", + "@vercel/ncc": "^0.38.0", + "typescript": "^5.2.2" }, "engines": { "node": "12" } }, "node_modules/@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, - "node_modules/@actions/core/node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", - "dependencies": { - "tunnel": "^0.0.6" - } - }, "node_modules/@actions/exec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.0.tgz", - "integrity": "sha512-LImpN9AY0J1R1mEYJjVJfSZWU4zYOlEcwSTgPve1rFQqK5AwrEs6uWW5Rv70gbDIQIAUwI86z6B+9mPK4w9Sbg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", "dependencies": { "@actions/io": "^1.0.1" } }, "node_modules/@actions/github": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz", - "integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz", + "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==", "dependencies": { - "@actions/http-client": "^1.0.11", - "@octokit/core": "^3.4.0", - "@octokit/plugin-paginate-rest": "^2.13.3", - "@octokit/plugin-rest-endpoint-methods": "^5.1.1" + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" } }, "node_modules/@actions/http-client": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", - "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", + "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", "dependencies": { - "tunnel": "0.0.6" + "tunnel": "^0.0.6", + "undici": "^5.25.4" } }, "node_modules/@actions/io": { @@ -70,22 +63,30 @@ "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz", "integrity": "sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA==" }, + "node_modules/@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", + "engines": { + "node": ">=14" + } + }, "node_modules/@octokit/auth-token": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", - "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", "dependencies": { "@octokit/types": "^6.0.3" } }, "node_modules/@octokit/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz", - "integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", "dependencies": { "@octokit/auth-token": "^2.4.4", "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.0", + "@octokit/request": "^5.6.3", "@octokit/request-error": "^2.0.5", "@octokit/types": "^6.0.3", "before-after-hook": "^2.2.0", @@ -103,9 +104,9 @@ } }, "node_modules/@octokit/graphql": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.4.tgz", - "integrity": "sha512-SWTdXsVheRmlotWNjKzPOb6Js6tjSqA2a8z9+glDJng0Aqjzti8MEWOtuT8ZSu6wHnci7LZNuarE87+WJBG4vg==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", "dependencies": { "@octokit/request": "^5.6.0", "@octokit/types": "^6.0.3", @@ -113,27 +114,27 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-9.7.0.tgz", - "integrity": "sha512-TUJ16DJU8mekne6+KVcMV5g6g/rJlrnIKn7aALG9QrNpnEipFc1xjoarh0PKaAWf2Hf+HwthRKYt+9mCm5RsRg==" + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.15.1.tgz", - "integrity": "sha512-47r52KkhQDkmvUKZqXzA1lKvcyJEfYh3TKAIe5+EzMeyDM3d+/s5v11i2gTk8/n6No6DPi3k5Ind6wtDbo/AEg==", + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", "dependencies": { - "@octokit/types": "^6.24.0" + "@octokit/types": "^6.40.0" }, "peerDependencies": { "@octokit/core": ">=2" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.8.0.tgz", - "integrity": "sha512-qeLZZLotNkoq+it6F+xahydkkbnvSK0iDjlXFo3jNTB+Ss0qIbYQb9V/soKLMkgGw8Q2sHjY5YEXiA47IVPp4A==", + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", "dependencies": { - "@octokit/types": "^6.25.0", + "@octokit/types": "^6.39.0", "deprecation": "^2.3.1" }, "peerDependencies": { @@ -141,15 +142,15 @@ } }, "node_modules/@octokit/request": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.1.tgz", - "integrity": "sha512-Ls2cfs1OfXaOKzkcxnqw5MR6drMA/zWX/LIS/p8Yjdz7QKTPQLMsB3R+OvoxE6XnXeXEE2X7xe4G4l4X0gRiKQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", "dependencies": { "@octokit/endpoint": "^6.0.1", "@octokit/request-error": "^2.1.0", "@octokit/types": "^6.16.1", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.1", + "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" } }, @@ -164,37 +165,37 @@ } }, "node_modules/@octokit/types": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.25.0.tgz", - "integrity": "sha512-bNvyQKfngvAd/08COlYIN54nRgxskmejgywodizQNyiKoXmWRAjKup2/LYwm+T9V0gsKH6tuld1gM0PzmOiB4Q==", + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", "dependencies": { - "@octokit/openapi-types": "^9.5.0" + "@octokit/openapi-types": "^12.11.0" } }, "node_modules/@octokit/webhooks-types": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-4.3.0.tgz", - "integrity": "sha512-Hp2o49WSiLHLwp8a9aQD9qK+uoa45Q/gnJG7a+EEZ4rLk5oDVCzlMbtsezxUPXG7/eLj05GciCzdzgJWANugEA==" + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-7.3.1.tgz", + "integrity": "sha512-u6355ZsZnHwmxen30SrqnYb1pXieBFkYgkNzt+Ed4Ao5tupN1OErHfzwiV6hq6duGkDAYASbq7/uVJQ69PjLEg==" }, "node_modules/@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.3.tgz", + "integrity": "sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==", "dev": true }, "node_modules/@vercel/ncc": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.29.1.tgz", - "integrity": "sha512-92d2AApJtkpampMqKgfqWbYkuFvqRFs8kPkKLTbesSB9RVwWfiI3i6mgBxtZgMV9iRuLPVZ+OBNocKHXZSRj6Q==", + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.0.tgz", + "integrity": "sha512-B4YKZMm/EqMptKSFyAq4q2SlgJe+VCmEH6Y8gf/E1pTlWbsUJpuH1ymik2Ex3aYO5mCWwV1kaSYHSQOT8+4vHA==", "dev": true, "bin": { "ncc": "dist/ncc/cli.js" } }, "node_modules/before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, "node_modules/deprecation": { "version": "2.3.1", @@ -210,9 +211,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -231,7 +232,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": { "wrappy": "1" } @@ -250,16 +251,27 @@ } }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" + } + }, + "node_modules/undici": { + "version": "5.25.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz", + "integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" } }, "node_modules/universal-user-agent": { @@ -292,54 +304,45 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" } }, "dependencies": { "@actions/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", - "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", "requires": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" - }, - "dependencies": { - "@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", - "requires": { - "tunnel": "^0.0.6" - } - } } }, "@actions/exec": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.0.tgz", - "integrity": "sha512-LImpN9AY0J1R1mEYJjVJfSZWU4zYOlEcwSTgPve1rFQqK5AwrEs6uWW5Rv70gbDIQIAUwI86z6B+9mPK4w9Sbg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", "requires": { "@actions/io": "^1.0.1" } }, "@actions/github": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz", - "integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz", + "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==", "requires": { - "@actions/http-client": "^1.0.11", - "@octokit/core": "^3.4.0", - "@octokit/plugin-paginate-rest": "^2.13.3", - "@octokit/plugin-rest-endpoint-methods": "^5.1.1" + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" } }, "@actions/http-client": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", - "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz", + "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==", "requires": { - "tunnel": "0.0.6" + "tunnel": "^0.0.6", + "undici": "^5.25.4" } }, "@actions/io": { @@ -347,22 +350,27 @@ "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz", "integrity": "sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA==" }, + "@fastify/busboy": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", + "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==" + }, "@octokit/auth-token": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", - "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", "requires": { "@octokit/types": "^6.0.3" } }, "@octokit/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz", - "integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", "requires": { "@octokit/auth-token": "^2.4.4", "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.0", + "@octokit/request": "^5.6.3", "@octokit/request-error": "^2.0.5", "@octokit/types": "^6.0.3", "before-after-hook": "^2.2.0", @@ -380,9 +388,9 @@ } }, "@octokit/graphql": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.4.tgz", - "integrity": "sha512-SWTdXsVheRmlotWNjKzPOb6Js6tjSqA2a8z9+glDJng0Aqjzti8MEWOtuT8ZSu6wHnci7LZNuarE87+WJBG4vg==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", "requires": { "@octokit/request": "^5.6.0", "@octokit/types": "^6.0.3", @@ -390,37 +398,37 @@ } }, "@octokit/openapi-types": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-9.7.0.tgz", - "integrity": "sha512-TUJ16DJU8mekne6+KVcMV5g6g/rJlrnIKn7aALG9QrNpnEipFc1xjoarh0PKaAWf2Hf+HwthRKYt+9mCm5RsRg==" + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" }, "@octokit/plugin-paginate-rest": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.15.1.tgz", - "integrity": "sha512-47r52KkhQDkmvUKZqXzA1lKvcyJEfYh3TKAIe5+EzMeyDM3d+/s5v11i2gTk8/n6No6DPi3k5Ind6wtDbo/AEg==", + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", "requires": { - "@octokit/types": "^6.24.0" + "@octokit/types": "^6.40.0" } }, "@octokit/plugin-rest-endpoint-methods": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.8.0.tgz", - "integrity": "sha512-qeLZZLotNkoq+it6F+xahydkkbnvSK0iDjlXFo3jNTB+Ss0qIbYQb9V/soKLMkgGw8Q2sHjY5YEXiA47IVPp4A==", + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", "requires": { - "@octokit/types": "^6.25.0", + "@octokit/types": "^6.39.0", "deprecation": "^2.3.1" } }, "@octokit/request": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.1.tgz", - "integrity": "sha512-Ls2cfs1OfXaOKzkcxnqw5MR6drMA/zWX/LIS/p8Yjdz7QKTPQLMsB3R+OvoxE6XnXeXEE2X7xe4G4l4X0gRiKQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", "requires": { "@octokit/endpoint": "^6.0.1", "@octokit/request-error": "^2.1.0", "@octokit/types": "^6.16.1", "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.1", + "node-fetch": "^2.6.7", "universal-user-agent": "^6.0.0" } }, @@ -435,34 +443,34 @@ } }, "@octokit/types": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.25.0.tgz", - "integrity": "sha512-bNvyQKfngvAd/08COlYIN54nRgxskmejgywodizQNyiKoXmWRAjKup2/LYwm+T9V0gsKH6tuld1gM0PzmOiB4Q==", + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", "requires": { - "@octokit/openapi-types": "^9.5.0" + "@octokit/openapi-types": "^12.11.0" } }, "@octokit/webhooks-types": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-4.3.0.tgz", - "integrity": "sha512-Hp2o49WSiLHLwp8a9aQD9qK+uoa45Q/gnJG7a+EEZ4rLk5oDVCzlMbtsezxUPXG7/eLj05GciCzdzgJWANugEA==" + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-7.3.1.tgz", + "integrity": "sha512-u6355ZsZnHwmxen30SrqnYb1pXieBFkYgkNzt+Ed4Ao5tupN1OErHfzwiV6hq6duGkDAYASbq7/uVJQ69PjLEg==" }, "@types/node": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", - "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==", + "version": "20.8.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.3.tgz", + "integrity": "sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==", "dev": true }, "@vercel/ncc": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.29.1.tgz", - "integrity": "sha512-92d2AApJtkpampMqKgfqWbYkuFvqRFs8kPkKLTbesSB9RVwWfiI3i6mgBxtZgMV9iRuLPVZ+OBNocKHXZSRj6Q==", + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.0.tgz", + "integrity": "sha512-B4YKZMm/EqMptKSFyAq4q2SlgJe+VCmEH6Y8gf/E1pTlWbsUJpuH1ymik2Ex3aYO5mCWwV1kaSYHSQOT8+4vHA==", "dev": true }, "before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, "deprecation": { "version": "2.3.1", @@ -475,9 +483,9 @@ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "requires": { "whatwg-url": "^5.0.0" } @@ -485,7 +493,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "requires": { "wrappy": "1" } @@ -501,11 +509,19 @@ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, "typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, + "undici": { + "version": "5.25.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz", + "integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==", + "requires": { + "@fastify/busboy": "^2.0.0" + } + }, "universal-user-agent": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", @@ -533,7 +549,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" } } } diff --git a/package.json b/package.json index 613abe0..853ce7c 100644 --- a/package.json +++ b/package.json @@ -4,20 +4,20 @@ "engines": { "node": "12" }, - "author": "Jeroen Thora", - "license": "MIT", + "author": "Jeroen Thora and Roseman Labs", + "license": "Do not publish", "scripts": { "compile": "ncc build src/index.ts --minify" }, "dependencies": { - "@actions/core": "^1.9.1", - "@actions/exec": "^1.1.0", - "@actions/github": "^5.0.0", - "@octokit/webhooks-types": "^4.3.0" + "@actions/core": "^1.10.1", + "@actions/exec": "^1.1.1", + "@actions/github": "^5.1.1", + "@octokit/webhooks-types": "^7.3.1" }, "devDependencies": { - "@types/node": "^16.6.1", - "@vercel/ncc": "^0.29.1", - "typescript": "^4.3.5" + "@types/node": "^20.8.3", + "@vercel/ncc": "^0.38.0", + "typescript": "^5.2.2" } } diff --git a/src/index.ts b/src/index.ts index f6c43fc..994600b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,13 +22,25 @@ async function downloadSplitsh(): Promise { fs.mkdirSync(downloadDir); let downloadPath = `${downloadDir}split-lite.tar.gz`; - let platform = process.platform === 'darwin' ? 'lite_darwin_amd64' : 'lite_linux_amd64'; + + + if (process.platform === 'darwin') { + throw new Error("We do not support darwin runners"); + } + let platform = 'lite_linux_amd64'; + // let platform = process.platform === 'darwin' ? 'lite_darwin_amd64' : 'lite_linux_amd64'; core.debug(`Downloading splitsh for "${platform}"`); let url = `https://github.com/splitsh/lite/releases/download/v1.0.1/${platform}.tar.gz`; await exec(`wget -O ${downloadPath} ${url}`); + const output = await getExecOutput("sha256sum", [downloadPath]); + const hash = output.stdout.split(" ")[0]; + if (hash !== "2539301ce5e21d0ca44b689d0dd2c1b20d9f9e996c1fe6c462afb8af4e7141cc") { + throw new Error("Hash verification of downloaded splitsh failed"); + } + await exec(`tar -zxpf ${downloadPath} --directory ${downloadDir}`); await exec(`chmod +x ${downloadDir}splitsh-lite`); await exec(`mv ${downloadDir}splitsh-lite ${splitshPath}`);