From a6093de4afdc6808decc865a4f4a12cbd136f20c Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 10 Jun 2024 13:36:17 -0400 Subject: [PATCH] fix: write content to launcher binary --- .github/workflows/build.yml | 13 +++++++++++++ README.md | 3 +++ dist/index.js | 2 +- src/__snapshots__/utils.test.ts.snap | 2 -- src/index.test.ts | 27 ++++++++++++--------------- src/index.ts | 11 ++--------- src/utils.test.ts | 24 +++++++++++++++++++----- src/utils.ts | 23 +++++++++++++++++------ 8 files changed, 67 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83322ef..9f65109 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,12 @@ jobs: command -v renpy-cli command -v renpy-launcher + - name: Show launcher + if: matrix.os != 'windows-latest' + run: | + ls $(command -v renpy-launcher) + cat $(command -v renpy-launcher) + - name: Check version if: matrix.os != 'windows-latest' run: | @@ -100,6 +106,7 @@ jobs: run: renpy-cli --help - name: Set projects directory + if: matrix.os != 'windows-latest' run: renpy-launcher set_projects_directory .. - name: Set project @@ -107,3 +114,9 @@ jobs: - name: Check web support run: ls ${{ steps.renpy.outputs.launcher}}/../web/index.html + + - name: Build web + if: matrix.os != 'windows-latest' + run: | + renpy-launcher web_build ${{ steps.renpy.outputs.launcher }}/../the_question --destination dist + ls dist dist.zip diff --git a/README.md b/README.md index 62873c0..2c877ff 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,9 @@ This is a shorthand command for: - run: renpy-cli ${{ steps.renpy.outputs.launcher }} ``` +> [!NOTE] +> The launcher CLI is only available in Linux and macOS. + ### `rapt` **Optional**: Android Support (RAPT). Defaults to `false`: diff --git a/dist/index.js b/dist/index.js index a1af045..74942dc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -(()=>{var e={7351:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=o(r(2037));const a=r(5278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const u="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=u+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${u}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const u=r(717);const c=r(5278);const l=o(r(2037));const f=o(r(1017));const d=r(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=c.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){return u.issueFileCommand("ENV",u.prepareKeyValueMessage(e,t))}a.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){u.issueFileCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${f.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const i=getInput(e,t);if(r.includes(i))return true;if(n.includes(i))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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t))}process.stdout.write(l.EOL);a.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return s(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t))}a.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return s(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=r(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=r(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var v=r(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return v.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return v.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return v.toPlatformPath}})},717:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const s=o(r(7147));const a=o(r(2037));const u=r(5840);const c=r(5278);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!s.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}s.appendFileSync(r,`${c.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${u.v4()}`;const n=c.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(n.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${a.EOL}${n}${a.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=r(6255);const o=r(5526);const s=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=n.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}s.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);s.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const s=o(r(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,s.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=r(2037);const o=r(7147);const{access:s,appendFile:a,writeFile:u}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.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 n(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield s(e,o.constants.R_OK|o.constants.W_OK)}catch(t){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,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${n}>`}return`<${e}${n}>${t}`}write(e){return n(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const n=t?u:a;yield n(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return n(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,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(r,n);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:n,rowspan:i}=e;const o=t?"th":"td";const s=Object.assign(Object.assign({},n&&{colspan:n}),i&&{rowspan:i});return this.wrap(o,r,s)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:i}=r||{};const o=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i});const s=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(s).addEOL()}addHeading(e,t){const r=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const i=this.wrap(n,e);return this.addRaw(i).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,t){const r=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},1514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const a=r(1576);const u=o(r(8159));function exec(e,t,r){return s(this,void 0,void 0,(function*(){const n=u.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];t=n.slice(1).concat(t||[]);const o=new u.ToolRunner(i,t,r);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var n,i;return s(this,void 0,void 0,(function*(){let o="";let s="";const u=new a.StringDecoder("utf8");const c=new a.StringDecoder("utf8");const l=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stdout;const f=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stderr;const stdErrListener=e=>{s+=c.write(e);if(f){f(e)}};const stdOutListener=e=>{o+=u.write(e);if(l){l(e)}};const d=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:d}));o+=u.end();s+=c.end();return{exitCode:p,stdout:o,stderr:s}}))}t.getExecOutput=getExecOutput},8159:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const a=o(r(2037));const u=o(r(2361));const c=o(r(2081));const l=o(r(1017));const f=o(r(7436));const d=o(r(1962));const p=r(9512);const h=process.platform==="win32";class ToolRunner extends u.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(h){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(h){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(h){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_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 t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some((e=>e===n))){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.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 t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={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};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return s(this,void 0,void 0,(function*(){if(!d.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield f.which(this.toolPath,true);return new Promise(((e,t)=>s(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 r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+a.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield d.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const i=this._getSpawnFileName();const o=c.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));let s="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let u="";if(o.stderr){o.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}u=this._processLineBuffer(e,u,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));o.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));o.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((r,n)=>{if(s.length>0){this.emit("stdline",s)}if(u.length>0){this.emit("errline",u)}o.removeAllListeners();if(r){t(r)}else{e(n)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let o=0;o0){t.push(i);i=""}continue}append(s)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends u.EventEmitter{constructor(e,t){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(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=p.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 t=`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(t)}e._setResult()}}},5526:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}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 r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.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 r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.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 r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const a=o(r(3685));const u=o(r(5687));const c=o(r(9835));const l=o(r(4294));var f;(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"})(f=t.HttpCodes||(t.HttpCodes={}));var d;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(d=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[f.MovedPermanently,f.ResourceMoved,f.SeeOther,f.TemporaryRedirect,f.PermanentRedirect];const m=[f.BadGateway,f.ServiceUnavailable,f.GatewayTimeout];const v=["OPTIONS","GET","DELETE","HEAD"];const g=10;const E=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return s(this,void 0,void 0,(function*(){return new Promise((e=>s(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){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=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return s(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return s(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return s(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return s(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,n){return s(this,void 0,void 0,(function*(){return this.request(e,t,r,n)}))}getJson(e,t={}){return s(this,void 0,void 0,(function*(){t[d.Accept]=this._getExistingOrDefaultHeader(t,d.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const i=yield this.post(e,n,r);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const i=yield this.put(e,n,r);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const i=yield this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}))}request(e,t,r,n){return s(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let o=this._prepareRequest(e,i,n);const s=this._allowRetries&&v.includes(e)?this._maxRetries+1:1;let a=0;let u;do{u=yield this.requestRaw(o,r);if(u&&u.message&&u.message.statusCode===f.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(u)){e=t;break}}if(e){return e.handleAuthentication(this,o,r)}else{return u}}let t=this._maxRedirects;while(u.message.statusCode&&h.includes(u.message.statusCode)&&this._allowRedirects&&t>0){const s=u.message.headers["location"];if(!s){break}const a=new URL(s);if(i.protocol==="https:"&&i.protocol!==a.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 u.readBody();if(a.hostname!==i.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}o=this._prepareRequest(e,a,n);u=yield this.requestRaw(o,r);t--}if(!u.message.statusCode||!m.includes(u.message.statusCode)){return u}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let n=false;function handleResult(e,t){if(!n){n=true;r(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;i.on("socket",(e=>{o=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const i=n.parsedUrl.protocol==="https:";n.httpModule=i?u:a;const o=i?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):o;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(n.options)}}return n}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;const r=c.getProxyUrl(e);const n=r&&r.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const i=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let n;const s=r.protocol==="https:";if(i){n=s?l.httpsOverHttps:l.httpsOverHttp}else{n=s?l.httpOverHttps:l.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=i?new u.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=i?u.globalAgent:a.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return s(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=E*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>s(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const o={statusCode:i,result:null,headers:{}};if(i===f.NotFound){r(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let s;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){s=JSON.parse(a,dateTimeDeserializer)}else{s=JSON.parse(a)}o.result=s}o.headers=e.message.headers}catch(e){}if(i>299){let e;if(s&&s.message){e=s.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=o.result;n(t)}else{r(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){return new URL(r)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let n;if(e.port){n=Number(e.port)}else if(e.protocol==="http:"){n=80}else if(e.protocol==="https:"){n=443}const i=[e.hostname.toUpperCase()];if(typeof n==="number"){i.push(`${i[0]}:${n}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},1962:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var a;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const u=o(r(7147));const c=o(r(1017));a=u.promises,t.chmod=a.chmod,t.copyFile=a.copyFile,t.lstat=a.lstat,t.mkdir=a.mkdir,t.open=a.open,t.readdir=a.readdir,t.readlink=a.readlink,t.rename=a.rename,t.rm=a.rm,t.rmdir=a.rmdir,t.stat=a.stat,t.symlink=a.symlink,t.unlink=a.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=u.constants.O_RDONLY;function exists(e){return s(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return s(this,void 0,void 0,(function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return s(this,void 0,void 0,(function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=c.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of r){e=i+o;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=c.dirname(e);const n=c.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=c.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.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`}t.getCmdPath=getCmdPath},7436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const a=r(9491);const u=o(r(1017));const c=o(r(1962));function cp(e,t,r={}){return s(this,void 0,void 0,(function*(){const{force:n,recursive:i,copySourceDirectory:o}=readCopyOptions(r);const s=(yield c.exists(t))?yield c.stat(t):null;if(s&&s.isFile()&&!n){return}const a=s&&s.isDirectory()&&o?u.join(t,u.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const l=yield c.stat(e);if(l.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,a,0,n)}}else{if(u.relative(e,a)===""){throw new Error(`'${a}' and '${e}' are the same file`)}yield copyFile(e,a,n)}}))}t.cp=cp;function mv(e,t,r={}){return s(this,void 0,void 0,(function*(){if(yield c.exists(t)){let n=true;if(yield c.isDirectory(t)){t=u.join(t,u.basename(e));n=yield c.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(u.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return s(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield c.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return s(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.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 t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(u.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const r=yield c.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(u.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(u.delimiter)){if(e){r.push(e)}}}const n=[];for(const i of r){const r=yield c.tryGetExecutablePath(u.join(i,e),t);if(r){n.push(r)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function cpDirRecursive(e,t,r,n){return s(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const i=yield c.readdir(e);for(const o of i){const i=`${e}/${o}`;const s=`${t}/${o}`;const a=yield c.lstat(i);if(a.isDirectory()){yield cpDirRecursive(i,s,r,n)}else{yield copyFile(i,s,n)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,r){return s(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const r=yield c.readlink(e);yield c.symlink(r,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||r){yield c.copyFile(e,t)}}))}},2473:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const a=o(r(562));const u=r(2186);const c=r(2037);const l=r(2081);const f=r(7147);function _findMatch(t,r,n,i){return s(this,void 0,void 0,(function*(){const o=c.platform();let s;let l;let f;for(const s of n){const n=s.version;u.debug(`check ${n} satisfies ${t}`);if(a.satisfies(n,t)&&(!r||s.stable===r)){f=s.files.find((t=>{u.debug(`${t.arch}===${i} && ${t.platform}===${o}`);let r=t.arch===i&&t.platform===o;if(r&&t.platform_version){const n=e.exports._getOsVersion();if(n===t.platform_version){r=true}else{r=a.satisfies(n,t.platform_version)}}return r}));if(f){u.debug(`matched ${s.version}`);l=s;break}}}if(l&&f){s=Object.assign({},l);s.files=[f]}return s}))}t._findMatch=_findMatch;function _getOsVersion(){const t=c.platform();let r="";if(t==="darwin"){r=l.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let r="";if(f.existsSync(e)){r=f.readFileSync(e).toString()}else if(f.existsSync(t)){r=f.readFileSync(t).toString()}return r}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const a=o(r(2186));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return s(this,void 0,void 0,(function*(){let r=1;while(rsetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const u=o(r(2186));const c=o(r(7436));const l=o(r(7147));const f=o(r(2473));const d=o(r(2037));const p=o(r(1017));const h=o(r(6255));const m=o(r(562));const v=o(r(2781));const g=o(r(3837));const E=r(9491);const y=a(r(7468));const _=r(1514);const w=r(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const O=process.platform==="win32";const R=process.platform==="darwin";const b="actions/tool-cache";function downloadTool(e,t,r,n){return s(this,void 0,void 0,(function*(){t=t||p.join(_getTempDirectory(),y.default());yield c.mkdirP(p.dirname(t));u.debug(`Downloading ${e}`);u.debug(`Destination ${t}`);const i=3;const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const a=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const l=new w.RetryHelper(i,o,a);return yield l.execute((()=>s(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",r,n)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r,n){return s(this,void 0,void 0,(function*(){if(l.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const i=new h.HttpClient(b,[],{allowRetries:false});if(r){u.debug("set auth");if(n===undefined){n={}}n.authorization=r}const o=yield i.get(e,n);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);u.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const s=g.promisify(v.pipeline);const a=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message));const f=a();let d=false;try{yield s(f,l.createWriteStream(t));u.debug("download complete");d=true;return t}finally{if(!d){u.debug("download failed");try{yield c.rmRF(t)}catch(e){u.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,r){return s(this,void 0,void 0,(function*(){E.ok(O,"extract7z() not supported on current OS");E.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const n=process.cwd();process.chdir(t);if(r){try{const t=u.isDebug()?"-bb1":"-bb0";const n=["x",t,"-bd","-sccUTF-8",e];const i={silent:true};yield _.exec(`"${r}"`,n,i)}finally{process.chdir(n)}}else{const r=p.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const s=`& '${r}' -Source '${i}' -Target '${o}'`;const a=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",s];const u={silent:true};try{const e=yield c.which("powershell",true);yield _.exec(`"${e}"`,a,u)}finally{process.chdir(n)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);u.debug("Checking tar --version");let n="";yield _.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}});u.debug(n.trim());const i=n.toUpperCase().includes("GNU TAR");let o;if(r instanceof Array){o=r}else{o=[r]}if(u.isDebug()&&!r.includes("v")){o.push("-v")}let s=t;let a=e;if(O&&i){o.push("--force-local");s=t.replace(/\\/g,"/");a=e.replace(/\\/g,"/")}if(i){o.push("--warning=no-unknown-keyword");o.push("--overwrite")}o.push("-C",s,"-f",a);yield _.exec(`tar`,o);return t}))}t.extractTar=extractTar;function extractXar(e,t,r=[]){return s(this,void 0,void 0,(function*(){E.ok(R,"extractXar() not supported on current OS");E.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let n;if(r instanceof Array){n=r}else{n=[r]}n.push("-x","-C",t,"-f",e);if(u.isDebug()){n.push("-v")}const i=yield c.which("xar",true);yield _.exec(`"${i}"`,_unique(n));return t}))}t.extractXar=extractXar;function extractZip(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(O){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return s(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=yield c.which("pwsh",false);if(i){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];u.debug(`Using pwsh at path: ${i}`);yield _.exec(`"${i}"`,t)}else{const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const i=yield c.which("powershell",true);u.debug(`Using powershell at path: ${i}`);yield _.exec(`"${i}"`,t)}}))}function extractZipNix(e,t){return s(this,void 0,void 0,(function*(){const r=yield c.which("unzip",true);const n=[e];if(!u.isDebug()){n.unshift("-q")}n.unshift("-o");yield _.exec(`"${r}"`,n,{cwd:t})}))}function cacheDir(e,t,r,n){return s(this,void 0,void 0,(function*(){r=m.clean(r)||r;n=n||d.arch();u.debug(`Caching tool ${t} ${r} ${n}`);u.debug(`source dir: ${e}`);if(!l.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const i=yield _createToolPath(t,r,n);for(const t of l.readdirSync(e)){const r=p.join(e,t);yield c.cp(r,i,{recursive:true})}_completeToolPath(t,r,n);return i}))}t.cacheDir=cacheDir;function cacheFile(e,t,r,n,i){return s(this,void 0,void 0,(function*(){n=m.clean(n)||n;i=i||d.arch();u.debug(`Caching tool ${r} ${n} ${i}`);u.debug(`source file: ${e}`);if(!l.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const o=yield _createToolPath(r,n,i);const s=p.join(o,t);u.debug(`destination file ${s}`);yield c.cp(e,s);_completeToolPath(r,n,i);return o}))}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||d.arch();if(!isExplicitVersion(t)){const n=findAllVersions(e,r);const i=evaluateVersions(n,t);t=i}let n="";if(t){t=m.clean(t)||"";const i=p.join(_getCacheDirectory(),e,t,r);u.debug(`checking cache: ${i}`);if(l.existsSync(i)&&l.existsSync(`${i}.complete`)){u.debug(`Found tool in cache ${e} ${t} ${r}`);n=i}else{u.debug("not found")}}return n}t.find=find;function findAllVersions(e,t){const r=[];t=t||d.arch();const n=p.join(_getCacheDirectory(),e);if(l.existsSync(n)){const e=l.readdirSync(n);for(const i of e){if(isExplicitVersion(i)){const e=p.join(n,i,t||"");if(l.existsSync(e)&&l.existsSync(`${e}.complete`)){r.push(i)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,n="master"){return s(this,void 0,void 0,(function*(){let i=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`;const s=new h.HttpClient("tool-cache");const a={};if(r){u.debug("set auth");a.authorization=r}const c=yield s.getJson(o,a);if(!c.result){return i}let l="";for(const e of c.result.tree){if(e.path==="versions-manifest.json"){l=e.url;break}}a["accept"]="application/vnd.github.VERSION.raw";let f=yield(yield s.get(l,a)).readBody();if(f){f=f.replace(/^\uFEFF/,"");try{i=JSON.parse(f)}catch(e){u.debug("Invalid json")}}return i}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,n=d.arch()){return s(this,void 0,void 0,(function*(){const i=yield f._findMatch(e,t,r,n);return i}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return s(this,void 0,void 0,(function*(){if(!e){e=p.join(_getTempDirectory(),y.default())}yield c.mkdirP(e);return e}))}function _createToolPath(e,t,r){return s(this,void 0,void 0,(function*(){const n=p.join(_getCacheDirectory(),e,m.clean(t)||t,r||"");u.debug(`destination ${n}`);const i=`${n}.complete`;yield c.rmRF(n);yield c.rmRF(i);yield c.mkdirP(n);return n}))}function _completeToolPath(e,t,r){const n=p.join(_getCacheDirectory(),e,m.clean(t)||t,r||"");const i=`${n}.complete`;l.writeFileSync(i,"");u.debug("finished caching tool")}function isExplicitVersion(e){const t=m.clean(e)||"";u.debug(`isExplicit: ${t}`);const r=m.valid(t)!=null;u.debug(`explicit? ${r}`);return r}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let r="";u.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(m.gt(e,t)){return 1}return-1}));for(let n=e.length-1;n>=0;n--){const i=e[n];const o=m.satisfies(i,t);if(o){r=i;break}}if(r){u.debug(`matched: ${r}`)}else{u.debug("match not found")}return r}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";E.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";E.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}function _unique(e){return Array.from(new Set(e))}},562:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var n=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var o=16;var s=n-6;var a=t.re=[];var u=t.safeRe=[];var c=t.src=[];var l=t.tokens={};var f=0;function tok(e){l[e]=f++}var d="[a-zA-Z0-9-]";var p=[["\\s",1],["\\d",n],[d,s]];function makeSafeRe(e){for(var t=0;t)?=?)";tok("XRANGEIDENTIFIERLOOSE");c[l.XRANGEIDENTIFIERLOOSE]=c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");c[l.XRANGEIDENTIFIER]=c[l.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");c[l.XRANGEPLAIN]="[v=\\s]*("+c[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIER]+")"+"(?:"+c[l.PRERELEASE]+")?"+c[l.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");c[l.XRANGEPLAINLOOSE]="[v=\\s]*("+c[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+c[l.PRERELEASELOOSE]+")?"+c[l.BUILD]+"?"+")?)?";tok("XRANGE");c[l.XRANGE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAIN]+"$";tok("XRANGELOOSE");c[l.XRANGELOOSE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAINLOOSE]+"$";tok("COERCE");c[l.COERCE]="(^|[^\\d])"+"(\\d{1,"+o+"})"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");a[l.COERCERTL]=new RegExp(c[l.COERCE],"g");u[l.COERCERTL]=new RegExp(makeSafeRe(c[l.COERCE]),"g");tok("LONETILDE");c[l.LONETILDE]="(?:~>?)";tok("TILDETRIM");c[l.TILDETRIM]="(\\s*)"+c[l.LONETILDE]+"\\s+";a[l.TILDETRIM]=new RegExp(c[l.TILDETRIM],"g");u[l.TILDETRIM]=new RegExp(makeSafeRe(c[l.TILDETRIM]),"g");var h="$1~";tok("TILDE");c[l.TILDE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAIN]+"$";tok("TILDELOOSE");c[l.TILDELOOSE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAINLOOSE]+"$";tok("LONECARET");c[l.LONECARET]="(?:\\^)";tok("CARETTRIM");c[l.CARETTRIM]="(\\s*)"+c[l.LONECARET]+"\\s+";a[l.CARETTRIM]=new RegExp(c[l.CARETTRIM],"g");u[l.CARETTRIM]=new RegExp(makeSafeRe(c[l.CARETTRIM]),"g");var m="$1^";tok("CARET");c[l.CARET]="^"+c[l.LONECARET]+c[l.XRANGEPLAIN]+"$";tok("CARETLOOSE");c[l.CARETLOOSE]="^"+c[l.LONECARET]+c[l.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");c[l.COMPARATORLOOSE]="^"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");c[l.COMPARATOR]="^"+c[l.GTLT]+"\\s*("+c[l.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");c[l.COMPARATORTRIM]="(\\s*)"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+"|"+c[l.XRANGEPLAIN]+")";a[l.COMPARATORTRIM]=new RegExp(c[l.COMPARATORTRIM],"g");u[l.COMPARATORTRIM]=new RegExp(makeSafeRe(c[l.COMPARATORTRIM]),"g");var v="$1$2$3";tok("HYPHENRANGE");c[l.HYPHENRANGE]="^\\s*("+c[l.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+c[l.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");c[l.HYPHENRANGELOOSE]="^\\s*("+c[l.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+c[l.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");c[l.STAR]="(<|>)?=?\\s*\\*";for(var g=0;gn){return null}var r=t.loose?u[l.LOOSE]:u[l.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var o=e.trim().match(t.loose?u[l.LOOSE]:u[l.FULL]);if(!o){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+o[1];this.minor=+o[2];this.patch=+o[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!o[4]){this.prerelease=[]}else{this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,n){if(typeof r==="string"){n=r;r=undefined}try{return new SemVer(e,r).inc(t,n).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var n=parse(t);var i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r){if(s==="major"||s==="minor"||s==="patch"){if(r[s]!==n[s]){return i+s}}}return o}}t.compareIdentifiers=compareIdentifiers;var E=/^[0-9]+$/;function compareIdentifiers(e,t){var r=E.test(e);var n=E.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,n){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,n);case"!=":return neq(e,r,n);case">":return gt(e,r,n);case">=":return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}e=e.trim().split(/\s+/).join(" ");r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===y){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var y={};Comparator.prototype.parse=function(e){var t=this.options.loose?u[l.COMPARATORLOOSE]:u[l.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=y}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===y||e===y){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var o=this.semver.version===e.semver.version;var s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var u=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return n||i||o&&s||a||u};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length}));if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+this.raw)}this.format()}Range.prototype.format=function(){this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;var n=t?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(n,hyphenReplace);r("hyphen replace",e);e=e.replace(u[l.COMPARATORTRIM],v);r("comparator trim",e,u[l.COMPARATORTRIM]);e=e.replace(u[l.TILDETRIM],h);e=e.replace(u[l.CARETTRIM],m);e=e.split(/\s+/).join(" ");var i=t?u[l.COMPARATORLOOSE]:u[l.COMPARATOR];var o=e.split(" ").map((function(e){return parseComparator(e,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){o=o.filter((function(e){return!!e.match(i)}))}o=o.map((function(e){return new Comparator(e,this.options)}),this);return o};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(r){return isSatisfiable(r,t)&&e.set.some((function(e){return isSatisfiable(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))};function isSatisfiable(e,t){var r=true;var n=e.slice();var i=n.pop();while(r&&n.length){r=n.every((function(e){return i.intersects(e,t)}));i=n.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map((function(e){return replaceTilde(e,t)})).join(" ")}function replaceTilde(e,t){var n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,(function(t,n,i,o,s){r("tilde",e,t,n,i,o,s);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else if(s){r("replaceTilde pr",s);a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}r("tilde return",a);return a}))}function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,t)})).join(" ")}function replaceCaret(e,t){r("caret",e,t);var n=t.loose?u[l.CARETLOOSE]:u[l.CARET];return e.replace(n,(function(t,n,i,o,s){r("caret",e,t,n,i,o,s);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){if(n==="0"){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+".0 <"+(+n+1)+".0.0"}}else if(s){r("replaceCaret pr",s);if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1)}else{a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"}}else{r("no pr");if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1)}else{a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"}}r("caret return",a);return a}))}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map((function(e){return replaceXRange(e,t)})).join(" ")}function replaceXRange(e,t){e=e.trim();var n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,(function(n,i,o,s,a,u){r("xRange",e,n,i,o,s,a,u);var c=isX(o);var l=c||isX(s);var f=l||isX(a);var d=f;if(i==="="&&d){i=""}u=t.includePrerelease?"-0":"";if(c){if(i===">"||i==="<"){n="<0.0.0-0"}else{n="*"}}else if(i&&d){if(l){s=0}a=0;if(i===">"){i=">=";if(l){o=+o+1;s=0;a=0}else{s=+s+1;a=0}}else if(i==="<="){i="<";if(l){o=+o+1}else{s=+s+1}}n=i+o+"."+s+"."+a+u}else if(l){n=">="+o+".0.0"+u+" <"+(+o+1)+".0.0"+u}else if(f){n=">="+o+"."+s+".0"+u+" <"+o+"."+(+s+1)+".0"+u}r("xRange return",n);return n}))}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(u[l.STAR],"")}function hyphenReplace(e,t,r,n,i,o,s,a,u,c,l,f,d){if(isX(r)){t=""}else if(isX(n)){t=">="+r+".0.0"}else if(isX(i)){t=">="+r+"."+n+".0"}else{t=">="+t}if(isX(u)){a=""}else if(isX(c)){a="<"+(+u+1)+".0.0"}else if(isX(l)){a="<"+u+"."+(+c+1)+".0"}else if(f){a="<="+u+"."+c+"."+l+"-"+f}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(o.test(e)){if(!n||i.compare(e)===-1){n=e;i=new SemVer(n,r)}}}));return n}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(o.test(e)){if(!n||i.compare(e)===1){n=e;i=new SemVer(n,r)}}}));return n}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var n=0;n":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,n){e=new SemVer(e,n);t=new Range(t,n);var i,o,s,a,u;switch(r){case">":i=gt;o=lte;s=lt;a=">";u=">=";break;case"<":i=lt;o=gte;s=gt;a="<";u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n)){return false}for(var c=0;c=0.0.0")}f=f||e;d=d||e;if(i(e.semver,f.semver,n)){f=e}else if(s(e.semver,d.semver,n)){d=e}}));if(f.operator===a||f.operator===u){return false}if((!d.operator||d.operator===a)&&o(e,d.semver)){return false}else if(d.operator===u&&s(e,d.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(u[l.COERCE])}else{var n;while((n=u[l.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||n.index+n[0].length!==r.index+r[0].length){r=n}u[l.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}u[l.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},7701:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var n=r||0;var i=t;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}e.exports=bytesToUuid},7269:(e,t,r)=>{var n=r(6113);e.exports=function nodeRNG(){return n.randomBytes(16)}},7468:(e,t,r)=>{var n=r(7269);var i=r(7701);function v4(e,t,r){var o=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var s=e.random||(e.rng||n)();s[6]=s[6]&15|64;s[8]=s[8]&63|128;if(t){for(var a=0;a<16;++a){t[o+a]=s[a]}}return t||i(s)}e.exports=v4},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var n=r(1808);var i=r(4404);var o=r(3685);var s=r(5687);var a=r(2361);var u=r(9491);var c=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,i){var o=toOptions(r,n,i);for(var s=0,a=t.requests.length;s=this.maxSockets){i.requests.push(o);return}i.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,o)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}l("making CONNECT request");var o=r.request(i);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(i,s,a){o.removeAllListeners();s.removeAllListeners();if(i.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",i.statusCode);s.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(a.length>0){l("got illegal response body from proxy");s.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=s;return t(s)}function onError(t){o.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host");var s=mergeOptions({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host});var a=i.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return f.default}});var n=_interopRequireDefault(r(8628));var i=_interopRequireDefault(r(6409));var o=_interopRequireDefault(r(5122));var s=_interopRequireDefault(r(9120));var a=_interopRequireDefault(r(5332));var u=_interopRequireDefault(r(1595));var c=_interopRequireDefault(r(6900));var l=_interopRequireDefault(r(8950));var f=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},4569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return n.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},2746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var i=parse;t["default"]=i},814:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[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;t["default"]=r},807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var n=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let o=i.length;function rng(){if(o>i.length-16){n.default.randomFillSync(i);o=0}return i.slice(o,o+=16)}},5274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return n.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},8950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase();if(!(0,n.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var o=stringify;t["default"]=o},8628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(807));var i=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let s;let a=0;let u=0;function v1(e,t,r){let c=t&&r||0;const l=t||new Array(16);e=e||{};let f=e.node||o;let d=e.clockseq!==undefined?e.clockseq:s;if(f==null||d==null){const t=e.random||(e.rng||n.default)();if(f==null){f=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=s=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let h=e.nsecs!==undefined?e.nsecs:u+1;const m=p-a+(h-u)/1e4;if(m<0&&e.clockseq===undefined){d=d+1&16383}if((m<0||p>a)&&e.nsecs===undefined){h=0}if(h>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=p;u=h;s=d;p+=122192928e5;const v=((p&268435455)*1e4+h)%4294967296;l[c++]=v>>>24&255;l[c++]=v>>>16&255;l[c++]=v>>>8&255;l[c++]=v&255;const g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255;l[c++]=g&255;l[c++]=g>>>24&15|16;l[c++]=g>>>16&255;l[c++]=d>>>8|128;l[c++]=d&255;for(let e=0;e<6;++e){l[c+e]=f[e]}return t||(0,i.default)(l)}var c=v1;t["default"]=c},6409:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(5998));var i=_interopRequireDefault(r(4569));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,n.default)("v3",48,i.default);var s=o;t["default"]=s},5998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var n=_interopRequireDefault(r(8950));var i=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(807));var i=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const o=e.random||(e.rng||n.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=o[e]}return t}return(0,i.default)(o)}var o=v4;t["default"]=o},9120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(5998));var i=_interopRequireDefault(r(5274));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,n.default)("v5",80,i.default);var s=o;t["default"]=s},6900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(814));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&n.default.test(e)}var i=validate;t["default"]=i},1595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var i=version;t["default"]=i},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},9512:e=>{"use strict";e.exports=require("timers")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var o=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return i.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";__nccwpck_require__.r(r);__nccwpck_require__.d(r,{run:()=>run});var e=__nccwpck_require__(2186);var t=__nccwpck_require__(1514);var n=__nccwpck_require__(7784);var i=__nccwpck_require__(2037);var o=__nccwpck_require__(1017);function getDownloadObject(e){return{sdk:`https://www.renpy.org/dl/${e}/renpy-${e}-sdk${(0,i.arch)().includes("arm")?"arm.tar.bz2":".zip"}`,rapt:`https://www.renpy.org/dl/${e}/renpy-${e}-rapt.zip`,renios:`https://www.renpy.org/dl/${e}/renpy-${e}-renios.zip`,web:`https://www.renpy.org/dl/${e}/renpy-${e}-web.zip`}}function getBinaryPath(e,t){return(0,o.join)(e,t+((0,i.platform)()==="win32"?".exe":".sh"))}function getBinaryDirectory(e,t){return(0,o.join)(e,`renpy-${t}-sdk${(0,i.arch)().includes("arm")?"arm":""}`)}function getLauncherDirectory(e){return(0,o.join)(e,"launcher")}function getLauncherPath(e,t){return(0,o.join)(e,t)}async function run(){try{const r=(0,e.getInput)("cli-version");const i=(0,e.getInput)("cli-name");const o=(0,e.getInput)("launcher-name");const s=getDownloadObject(r);const a=await(0,n.downloadTool)(s.sdk);const u=s.sdk.endsWith(".zip")?n.extractZip:n.extractTar;const c=getBinaryDirectory(await u(a),r);const l=getBinaryPath(c,i).replace(".sh","");await(0,t.exec)("mv",[getBinaryPath(c,"renpy"),l]);const f=["rapt","renios","web"].filter((t=>(0,e.getInput)(t)==="true"));await Promise.all(f.map((e=>(0,n.downloadTool)(s[e]).then((e=>(0,n.extractZip)(e,c))))));const d=getLauncherDirectory(c);(0,e.setOutput)("launcher",d);const p=getLauncherPath(c,o);await(0,t.exec)("touch",[p]);await(0,t.exec)("echo",[`${l} ${d} "$@"`,">",p]);await(0,t.exec)("chmod",["+x",p]);(0,e.addPath)(c);await(0,n.cacheDir)(c,[i,...f].join("_"),r)}catch(t){if(t instanceof Error){(0,e.setFailed)(t.message)}}}run()})();module.exports=r})(); \ No newline at end of file +(()=>{var e={7351:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=o(r(2037));const a=r(5278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const u="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=u+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${u}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const u=r(717);const c=r(5278);const l=o(r(2037));const f=o(r(1017));const d=r(8041);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=c.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){return u.issueFileCommand("ENV",u.prepareKeyValueMessage(e,t))}a.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){u.issueFileCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${f.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const i=getInput(e,t);if(r.includes(i))return true;if(n.includes(i))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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t))}process.stdout.write(l.EOL);a.issueCommand("set-output",{name:e},c.toCommandValue(t))}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=p.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",c.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return s(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t))}a.issueCommand("save-state",{name:e},c.toCommandValue(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return s(this,void 0,void 0,(function*(){return yield d.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=r(1327);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=r(1327);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var v=r(2981);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return v.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return v.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return v.toPlatformPath}})},717:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const s=o(r(7147));const a=o(r(2037));const u=r(5840);const c=r(5278);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!s.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}s.appendFileSync(r,`${c.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${u.v4()}`;const n=c.toCommandValue(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(n.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${a.EOL}${n}${a.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=r(6255);const o=r(5526);const s=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=n.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}s.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);s.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},2981:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const s=o(r(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,s.sep)}t.toPlatformPath=toPlatformPath},1327:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=r(2037);const o=r(7147);const{access:s,appendFile:a,writeFile:u}=o.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.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 n(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield s(e,o.constants.R_OK|o.constants.W_OK)}catch(t){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,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${n}>`}return`<${e}${n}>${t}`}write(e){return n(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const n=t?u:a;yield n(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return n(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,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(r,n);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:n,rowspan:i}=e;const o=t?"th":"td";const s=Object.assign(Object.assign({},n&&{colspan:n}),i&&{rowspan:i});return this.wrap(o,r,s)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:i}=r||{};const o=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i});const s=this.wrap("img",null,Object.assign({src:e,alt:t},o));return this.addRaw(s).addEOL()}addHeading(e,t){const r=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const i=this.wrap(n,e);return this.addRaw(i).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,t){const r=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const c=new Summary;t.markdownSummary=c;t.summary=c},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},1514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const a=r(1576);const u=o(r(8159));function exec(e,t,r){return s(this,void 0,void 0,(function*(){const n=u.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];t=n.slice(1).concat(t||[]);const o=new u.ToolRunner(i,t,r);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var n,i;return s(this,void 0,void 0,(function*(){let o="";let s="";const u=new a.StringDecoder("utf8");const c=new a.StringDecoder("utf8");const l=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stdout;const f=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stderr;const stdErrListener=e=>{s+=c.write(e);if(f){f(e)}};const stdOutListener=e=>{o+=u.write(e);if(l){l(e)}};const d=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:d}));o+=u.end();s+=c.end();return{exitCode:p,stdout:o,stderr:s}}))}t.getExecOutput=getExecOutput},8159:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const a=o(r(2037));const u=o(r(2361));const c=o(r(2081));const l=o(r(1017));const f=o(r(7436));const d=o(r(1962));const p=r(9512);const h=process.platform==="win32";class ToolRunner extends u.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(h){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(h){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(h){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_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 t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some((e=>e===n))){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.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 t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={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};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return s(this,void 0,void 0,(function*(){if(!d.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield f.which(this.toolPath,true);return new Promise(((e,t)=>s(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 r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+a.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield d.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const i=this._getSpawnFileName();const o=c.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));let s="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let u="";if(o.stderr){o.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}u=this._processLineBuffer(e,u,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));o.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));o.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((r,n)=>{if(s.length>0){this.emit("stdline",s)}if(u.length>0){this.emit("errline",u)}o.removeAllListeners();if(r){t(r)}else{e(n)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let o=0;o0){t.push(i);i=""}continue}append(s)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends u.EventEmitter{constructor(e,t){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(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=p.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 t=`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(t)}e._setResult()}}},5526:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}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 r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.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 r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.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 r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const a=o(r(3685));const u=o(r(5687));const c=o(r(9835));const l=o(r(4294));var f;(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"})(f=t.HttpCodes||(t.HttpCodes={}));var d;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(d=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=c.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[f.MovedPermanently,f.ResourceMoved,f.SeeOther,f.TemporaryRedirect,f.PermanentRedirect];const m=[f.BadGateway,f.ServiceUnavailable,f.GatewayTimeout];const v=["OPTIONS","GET","DELETE","HEAD"];const g=10;const E=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return s(this,void 0,void 0,(function*(){return new Promise((e=>s(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){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=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return s(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return s(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return s(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return s(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return s(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,n){return s(this,void 0,void 0,(function*(){return this.request(e,t,r,n)}))}getJson(e,t={}){return s(this,void 0,void 0,(function*(){t[d.Accept]=this._getExistingOrDefaultHeader(t,d.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const i=yield this.post(e,n,r);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const i=yield this.put(e,n,r);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,r={}){return s(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[d.Accept]=this._getExistingOrDefaultHeader(r,d.Accept,p.ApplicationJson);r[d.ContentType]=this._getExistingOrDefaultHeader(r,d.ContentType,p.ApplicationJson);const i=yield this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}))}request(e,t,r,n){return s(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let o=this._prepareRequest(e,i,n);const s=this._allowRetries&&v.includes(e)?this._maxRetries+1:1;let a=0;let u;do{u=yield this.requestRaw(o,r);if(u&&u.message&&u.message.statusCode===f.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(u)){e=t;break}}if(e){return e.handleAuthentication(this,o,r)}else{return u}}let t=this._maxRedirects;while(u.message.statusCode&&h.includes(u.message.statusCode)&&this._allowRedirects&&t>0){const s=u.message.headers["location"];if(!s){break}const a=new URL(s);if(i.protocol==="https:"&&i.protocol!==a.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 u.readBody();if(a.hostname!==i.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}o=this._prepareRequest(e,a,n);u=yield this.requestRaw(o,r);t--}if(!u.message.statusCode||!m.includes(u.message.statusCode)){return u}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let n=false;function handleResult(e,t){if(!n){n=true;r(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let o;i.on("socket",(e=>{o=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const i=n.parsedUrl.protocol==="https:";n.httpModule=i?u:a;const o=i?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):o;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(n.options)}}return n}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;const r=c.getProxyUrl(e);const n=r&&r.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const i=e.protocol==="https:";let o=100;if(this.requestOptions){o=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:o,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let n;const s=r.protocol==="https:";if(i){n=s?l.httpsOverHttps:l.httpsOverHttp}else{n=s?l.httpOverHttps:l.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:o};t=i?new u.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=i?u.globalAgent:a.globalAgent}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return s(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=E*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>s(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const o={statusCode:i,result:null,headers:{}};if(i===f.NotFound){r(o)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let s;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){s=JSON.parse(a,dateTimeDeserializer)}else{s=JSON.parse(a)}o.result=s}o.headers=e.message.headers}catch(e){}if(i>299){let e;if(s&&s.message){e=s.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=o.result;n(t)}else{r(o)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},9835:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){return new URL(r)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let n;if(e.port){n=Number(e.port)}else if(e.protocol==="http:"){n=80}else if(e.protocol==="https:"){n=443}const i=[e.hostname.toUpperCase()];if(typeof n==="number"){i.push(`${i[0]}:${n}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}},1962:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var a;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const u=o(r(7147));const c=o(r(1017));a=u.promises,t.chmod=a.chmod,t.copyFile=a.copyFile,t.lstat=a.lstat,t.mkdir=a.mkdir,t.open=a.open,t.readdir=a.readdir,t.readlink=a.readlink,t.rename=a.rename,t.rm=a.rm,t.rmdir=a.rmdir,t.stat=a.stat,t.symlink=a.symlink,t.unlink=a.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=u.constants.O_RDONLY;function exists(e){return s(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return s(this,void 0,void 0,(function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return s(this,void 0,void 0,(function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=c.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of r){e=i+o;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=c.dirname(e);const n=c.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=c.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.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`}t.getCmdPath=getCmdPath},7436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const a=r(9491);const u=o(r(1017));const c=o(r(1962));function cp(e,t,r={}){return s(this,void 0,void 0,(function*(){const{force:n,recursive:i,copySourceDirectory:o}=readCopyOptions(r);const s=(yield c.exists(t))?yield c.stat(t):null;if(s&&s.isFile()&&!n){return}const a=s&&s.isDirectory()&&o?u.join(t,u.basename(e)):t;if(!(yield c.exists(e))){throw new Error(`no such file or directory: ${e}`)}const l=yield c.stat(e);if(l.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,a,0,n)}}else{if(u.relative(e,a)===""){throw new Error(`'${a}' and '${e}' are the same file`)}yield copyFile(e,a,n)}}))}t.cp=cp;function mv(e,t,r={}){return s(this,void 0,void 0,(function*(){if(yield c.exists(t)){let n=true;if(yield c.isDirectory(t)){t=u.join(t,u.basename(e));n=yield c.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(u.dirname(t));yield c.rename(e,t)}))}t.mv=mv;function rmRF(e){return s(this,void 0,void 0,(function*(){if(c.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield c.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return s(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield c.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(c.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 t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(c.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(u.delimiter)){if(e){t.push(e)}}}if(c.isRooted(e)){const r=yield c.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(u.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(u.delimiter)){if(e){r.push(e)}}}const n=[];for(const i of r){const r=yield c.tryGetExecutablePath(u.join(i,e),t);if(r){n.push(r)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function cpDirRecursive(e,t,r,n){return s(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const i=yield c.readdir(e);for(const o of i){const i=`${e}/${o}`;const s=`${t}/${o}`;const a=yield c.lstat(i);if(a.isDirectory()){yield cpDirRecursive(i,s,r,n)}else{yield copyFile(i,s,n)}}yield c.chmod(t,(yield c.stat(e)).mode)}))}function copyFile(e,t,r){return s(this,void 0,void 0,(function*(){if((yield c.lstat(e)).isSymbolicLink()){try{yield c.lstat(t);yield c.unlink(t)}catch(e){if(e.code==="EPERM"){yield c.chmod(t,"0666");yield c.unlink(t)}}const r=yield c.readlink(e);yield c.symlink(r,t,c.IS_WINDOWS?"junction":null)}else if(!(yield c.exists(t))||r){yield c.copyFile(e,t)}}))}},2473:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t._readLinuxVersionFile=t._getOsVersion=t._findMatch=void 0;const a=o(r(562));const u=r(2186);const c=r(2037);const l=r(2081);const f=r(7147);function _findMatch(t,r,n,i){return s(this,void 0,void 0,(function*(){const o=c.platform();let s;let l;let f;for(const s of n){const n=s.version;u.debug(`check ${n} satisfies ${t}`);if(a.satisfies(n,t)&&(!r||s.stable===r)){f=s.files.find((t=>{u.debug(`${t.arch}===${i} && ${t.platform}===${o}`);let r=t.arch===i&&t.platform===o;if(r&&t.platform_version){const n=e.exports._getOsVersion();if(n===t.platform_version){r=true}else{r=a.satisfies(n,t.platform_version)}}return r}));if(f){u.debug(`matched ${s.version}`);l=s;break}}}if(l&&f){s=Object.assign({},l);s.files=[f]}return s}))}t._findMatch=_findMatch;function _getOsVersion(){const t=c.platform();let r="";if(t==="darwin"){r=l.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&(e[0].trim()==="VERSION_ID"||e[0].trim()==="DISTRIB_RELEASE")){r=e[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";const t="/etc/os-release";let r="";if(f.existsSync(e)){r=f.readFileSync(e).toString()}else if(f.existsSync(t)){r=f.readFileSync(t).toString()}return r}t._readLinuxVersionFile=_readLinuxVersionFile},8279:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.RetryHelper=void 0;const a=o(r(2186));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return s(this,void 0,void 0,(function*(){let r=1;while(rsetTimeout(t,e*1e3)))}))}}t.RetryHelper=RetryHelper},7784:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.evaluateVersions=t.isExplicitVersion=t.findFromManifest=t.getManifestFromRepo=t.findAllVersions=t.find=t.cacheFile=t.cacheDir=t.extractZip=t.extractXar=t.extractTar=t.extract7z=t.downloadTool=t.HTTPError=void 0;const u=o(r(2186));const c=o(r(7436));const l=o(r(7147));const f=o(r(2473));const d=o(r(2037));const p=o(r(1017));const h=o(r(6255));const m=o(r(562));const v=o(r(2781));const g=o(r(3837));const E=r(9491);const y=a(r(7468));const _=r(1514);const w=r(8279);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const O=process.platform==="win32";const R=process.platform==="darwin";const b="actions/tool-cache";function downloadTool(e,t,r,n){return s(this,void 0,void 0,(function*(){t=t||p.join(_getTempDirectory(),y.default());yield c.mkdirP(p.dirname(t));u.debug(`Downloading ${e}`);u.debug(`Destination ${t}`);const i=3;const o=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const a=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const l=new w.RetryHelper(i,o,a);return yield l.execute((()=>s(this,void 0,void 0,(function*(){return yield downloadToolAttempt(e,t||"",r,n)}))),(e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true}))}))}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r,n){return s(this,void 0,void 0,(function*(){if(l.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const i=new h.HttpClient(b,[],{allowRetries:false});if(r){u.debug("set auth");if(n===undefined){n={}}n.authorization=r}const o=yield i.get(e,n);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);u.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const s=g.promisify(v.pipeline);const a=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>o.message));const f=a();let d=false;try{yield s(f,l.createWriteStream(t));u.debug("download complete");d=true;return t}finally{if(!d){u.debug("download failed");try{yield c.rmRF(t)}catch(e){u.debug(`Failed to delete '${t}'. ${e.message}`)}}}}))}function extract7z(e,t,r){return s(this,void 0,void 0,(function*(){E.ok(O,"extract7z() not supported on current OS");E.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const n=process.cwd();process.chdir(t);if(r){try{const t=u.isDebug()?"-bb1":"-bb0";const n=["x",t,"-bd","-sccUTF-8",e];const i={silent:true};yield _.exec(`"${r}"`,n,i)}finally{process.chdir(n)}}else{const r=p.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const s=`& '${r}' -Source '${i}' -Target '${o}'`;const a=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",s];const u={silent:true};try{const e=yield c.which("powershell",true);yield _.exec(`"${e}"`,a,u)}finally{process.chdir(n)}}return t}))}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);u.debug("Checking tar --version");let n="";yield _.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}});u.debug(n.trim());const i=n.toUpperCase().includes("GNU TAR");let o;if(r instanceof Array){o=r}else{o=[r]}if(u.isDebug()&&!r.includes("v")){o.push("-v")}let s=t;let a=e;if(O&&i){o.push("--force-local");s=t.replace(/\\/g,"/");a=e.replace(/\\/g,"/")}if(i){o.push("--warning=no-unknown-keyword");o.push("--overwrite")}o.push("-C",s,"-f",a);yield _.exec(`tar`,o);return t}))}t.extractTar=extractTar;function extractXar(e,t,r=[]){return s(this,void 0,void 0,(function*(){E.ok(R,"extractXar() not supported on current OS");E.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let n;if(r instanceof Array){n=r}else{n=[r]}n.push("-x","-C",t,"-f",e);if(u.isDebug()){n.push("-v")}const i=yield c.which("xar",true);yield _.exec(`"${i}"`,_unique(n));return t}))}t.extractXar=extractXar;function extractZip(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(O){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t}))}t.extractZip=extractZip;function extractZipWin(e,t){return s(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=yield c.which("pwsh",false);if(i){const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ");const t=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];u.debug(`Using pwsh at path: ${i}`);yield _.exec(`"${i}"`,t)}else{const e=[`$ErrorActionPreference = 'Stop' ;`,`try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force }`,`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`].join(" ");const t=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",e];const i=yield c.which("powershell",true);u.debug(`Using powershell at path: ${i}`);yield _.exec(`"${i}"`,t)}}))}function extractZipNix(e,t){return s(this,void 0,void 0,(function*(){const r=yield c.which("unzip",true);const n=[e];if(!u.isDebug()){n.unshift("-q")}n.unshift("-o");yield _.exec(`"${r}"`,n,{cwd:t})}))}function cacheDir(e,t,r,n){return s(this,void 0,void 0,(function*(){r=m.clean(r)||r;n=n||d.arch();u.debug(`Caching tool ${t} ${r} ${n}`);u.debug(`source dir: ${e}`);if(!l.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const i=yield _createToolPath(t,r,n);for(const t of l.readdirSync(e)){const r=p.join(e,t);yield c.cp(r,i,{recursive:true})}_completeToolPath(t,r,n);return i}))}t.cacheDir=cacheDir;function cacheFile(e,t,r,n,i){return s(this,void 0,void 0,(function*(){n=m.clean(n)||n;i=i||d.arch();u.debug(`Caching tool ${r} ${n} ${i}`);u.debug(`source file: ${e}`);if(!l.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const o=yield _createToolPath(r,n,i);const s=p.join(o,t);u.debug(`destination file ${s}`);yield c.cp(e,s);_completeToolPath(r,n,i);return o}))}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||d.arch();if(!isExplicitVersion(t)){const n=findAllVersions(e,r);const i=evaluateVersions(n,t);t=i}let n="";if(t){t=m.clean(t)||"";const i=p.join(_getCacheDirectory(),e,t,r);u.debug(`checking cache: ${i}`);if(l.existsSync(i)&&l.existsSync(`${i}.complete`)){u.debug(`Found tool in cache ${e} ${t} ${r}`);n=i}else{u.debug("not found")}}return n}t.find=find;function findAllVersions(e,t){const r=[];t=t||d.arch();const n=p.join(_getCacheDirectory(),e);if(l.existsSync(n)){const e=l.readdirSync(n);for(const i of e){if(isExplicitVersion(i)){const e=p.join(n,i,t||"");if(l.existsSync(e)&&l.existsSync(`${e}.complete`)){r.push(i)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,n="master"){return s(this,void 0,void 0,(function*(){let i=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`;const s=new h.HttpClient("tool-cache");const a={};if(r){u.debug("set auth");a.authorization=r}const c=yield s.getJson(o,a);if(!c.result){return i}let l="";for(const e of c.result.tree){if(e.path==="versions-manifest.json"){l=e.url;break}}a["accept"]="application/vnd.github.VERSION.raw";let f=yield(yield s.get(l,a)).readBody();if(f){f=f.replace(/^\uFEFF/,"");try{i=JSON.parse(f)}catch(e){u.debug("Invalid json")}}return i}))}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,n=d.arch()){return s(this,void 0,void 0,(function*(){const i=yield f._findMatch(e,t,r,n);return i}))}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return s(this,void 0,void 0,(function*(){if(!e){e=p.join(_getTempDirectory(),y.default())}yield c.mkdirP(e);return e}))}function _createToolPath(e,t,r){return s(this,void 0,void 0,(function*(){const n=p.join(_getCacheDirectory(),e,m.clean(t)||t,r||"");u.debug(`destination ${n}`);const i=`${n}.complete`;yield c.rmRF(n);yield c.rmRF(i);yield c.mkdirP(n);return n}))}function _completeToolPath(e,t,r){const n=p.join(_getCacheDirectory(),e,m.clean(t)||t,r||"");const i=`${n}.complete`;l.writeFileSync(i,"");u.debug("finished caching tool")}function isExplicitVersion(e){const t=m.clean(e)||"";u.debug(`isExplicit: ${t}`);const r=m.valid(t)!=null;u.debug(`explicit? ${r}`);return r}t.isExplicitVersion=isExplicitVersion;function evaluateVersions(e,t){let r="";u.debug(`evaluating ${e.length} versions`);e=e.sort(((e,t)=>{if(m.gt(e,t)){return 1}return-1}));for(let n=e.length-1;n>=0;n--){const i=e[n];const o=m.satisfies(i,t);if(o){r=i;break}}if(r){u.debug(`matched: ${r}`)}else{u.debug("match not found")}return r}t.evaluateVersions=evaluateVersions;function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";E.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";E.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}function _unique(e){return Array.from(new Set(e))}},562:(e,t)=>{t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var n=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var o=16;var s=n-6;var a=t.re=[];var u=t.safeRe=[];var c=t.src=[];var l=t.tokens={};var f=0;function tok(e){l[e]=f++}var d="[a-zA-Z0-9-]";var p=[["\\s",1],["\\d",n],[d,s]];function makeSafeRe(e){for(var t=0;t)?=?)";tok("XRANGEIDENTIFIERLOOSE");c[l.XRANGEIDENTIFIERLOOSE]=c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");c[l.XRANGEIDENTIFIER]=c[l.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");c[l.XRANGEPLAIN]="[v=\\s]*("+c[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIER]+")"+"(?:"+c[l.PRERELEASE]+")?"+c[l.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");c[l.XRANGEPLAINLOOSE]="[v=\\s]*("+c[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+c[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+c[l.PRERELEASELOOSE]+")?"+c[l.BUILD]+"?"+")?)?";tok("XRANGE");c[l.XRANGE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAIN]+"$";tok("XRANGELOOSE");c[l.XRANGELOOSE]="^"+c[l.GTLT]+"\\s*"+c[l.XRANGEPLAINLOOSE]+"$";tok("COERCE");c[l.COERCE]="(^|[^\\d])"+"(\\d{1,"+o+"})"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");a[l.COERCERTL]=new RegExp(c[l.COERCE],"g");u[l.COERCERTL]=new RegExp(makeSafeRe(c[l.COERCE]),"g");tok("LONETILDE");c[l.LONETILDE]="(?:~>?)";tok("TILDETRIM");c[l.TILDETRIM]="(\\s*)"+c[l.LONETILDE]+"\\s+";a[l.TILDETRIM]=new RegExp(c[l.TILDETRIM],"g");u[l.TILDETRIM]=new RegExp(makeSafeRe(c[l.TILDETRIM]),"g");var h="$1~";tok("TILDE");c[l.TILDE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAIN]+"$";tok("TILDELOOSE");c[l.TILDELOOSE]="^"+c[l.LONETILDE]+c[l.XRANGEPLAINLOOSE]+"$";tok("LONECARET");c[l.LONECARET]="(?:\\^)";tok("CARETTRIM");c[l.CARETTRIM]="(\\s*)"+c[l.LONECARET]+"\\s+";a[l.CARETTRIM]=new RegExp(c[l.CARETTRIM],"g");u[l.CARETTRIM]=new RegExp(makeSafeRe(c[l.CARETTRIM]),"g");var m="$1^";tok("CARET");c[l.CARET]="^"+c[l.LONECARET]+c[l.XRANGEPLAIN]+"$";tok("CARETLOOSE");c[l.CARETLOOSE]="^"+c[l.LONECARET]+c[l.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");c[l.COMPARATORLOOSE]="^"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");c[l.COMPARATOR]="^"+c[l.GTLT]+"\\s*("+c[l.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");c[l.COMPARATORTRIM]="(\\s*)"+c[l.GTLT]+"\\s*("+c[l.LOOSEPLAIN]+"|"+c[l.XRANGEPLAIN]+")";a[l.COMPARATORTRIM]=new RegExp(c[l.COMPARATORTRIM],"g");u[l.COMPARATORTRIM]=new RegExp(makeSafeRe(c[l.COMPARATORTRIM]),"g");var v="$1$2$3";tok("HYPHENRANGE");c[l.HYPHENRANGE]="^\\s*("+c[l.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+c[l.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");c[l.HYPHENRANGELOOSE]="^\\s*("+c[l.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+c[l.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");c[l.STAR]="(<|>)?=?\\s*\\*";for(var g=0;gn){return null}var r=t.loose?u[l.LOOSE]:u[l.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var o=e.trim().match(t.loose?u[l.LOOSE]:u[l.FULL]);if(!o){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+o[1];this.minor=+o[2];this.patch=+o[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!o[4]){this.prerelease=[]}else{this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,n){if(typeof r==="string"){n=r;r=undefined}try{return new SemVer(e,r).inc(t,n).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var n=parse(t);var i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var s in r){if(s==="major"||s==="minor"||s==="patch"){if(r[s]!==n[s]){return i+s}}}return o}}t.compareIdentifiers=compareIdentifiers;var E=/^[0-9]+$/;function compareIdentifiers(e,t){var r=E.test(e);var n=E.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,n){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,n);case"!=":return neq(e,r,n);case">":return gt(e,r,n);case">=":return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}e=e.trim().split(/\s+/).join(" ");r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===y){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var y={};Comparator.prototype.parse=function(e){var t=this.options.loose?u[l.COMPARATORLOOSE]:u[l.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=y}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===y||e===y){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var o=this.semver.version===e.semver.version;var s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var u=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return n||i||o&&s||a||u};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length}));if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+this.raw)}this.format()}Range.prototype.format=function(){this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;var n=t?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(n,hyphenReplace);r("hyphen replace",e);e=e.replace(u[l.COMPARATORTRIM],v);r("comparator trim",e,u[l.COMPARATORTRIM]);e=e.replace(u[l.TILDETRIM],h);e=e.replace(u[l.CARETTRIM],m);e=e.split(/\s+/).join(" ");var i=t?u[l.COMPARATORLOOSE]:u[l.COMPARATOR];var o=e.split(" ").map((function(e){return parseComparator(e,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){o=o.filter((function(e){return!!e.match(i)}))}o=o.map((function(e){return new Comparator(e,this.options)}),this);return o};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(r){return isSatisfiable(r,t)&&e.set.some((function(e){return isSatisfiable(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))};function isSatisfiable(e,t){var r=true;var n=e.slice();var i=n.pop();while(r&&n.length){r=n.every((function(e){return i.intersects(e,t)}));i=n.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map((function(e){return replaceTilde(e,t)})).join(" ")}function replaceTilde(e,t){var n=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(n,(function(t,n,i,o,s){r("tilde",e,t,n,i,o,s);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else if(s){r("replaceTilde pr",s);a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}r("tilde return",a);return a}))}function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,t)})).join(" ")}function replaceCaret(e,t){r("caret",e,t);var n=t.loose?u[l.CARETLOOSE]:u[l.CARET];return e.replace(n,(function(t,n,i,o,s){r("caret",e,t,n,i,o,s);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){if(n==="0"){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+".0 <"+(+n+1)+".0.0"}}else if(s){r("replaceCaret pr",s);if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+i+"."+(+o+1)}else{a=">="+n+"."+i+"."+o+"-"+s+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+o+"-"+s+" <"+(+n+1)+".0.0"}}else{r("no pr");if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1)}else{a=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"}}r("caret return",a);return a}))}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map((function(e){return replaceXRange(e,t)})).join(" ")}function replaceXRange(e,t){e=e.trim();var n=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(n,(function(n,i,o,s,a,u){r("xRange",e,n,i,o,s,a,u);var c=isX(o);var l=c||isX(s);var f=l||isX(a);var d=f;if(i==="="&&d){i=""}u=t.includePrerelease?"-0":"";if(c){if(i===">"||i==="<"){n="<0.0.0-0"}else{n="*"}}else if(i&&d){if(l){s=0}a=0;if(i===">"){i=">=";if(l){o=+o+1;s=0;a=0}else{s=+s+1;a=0}}else if(i==="<="){i="<";if(l){o=+o+1}else{s=+s+1}}n=i+o+"."+s+"."+a+u}else if(l){n=">="+o+".0.0"+u+" <"+(+o+1)+".0.0"+u}else if(f){n=">="+o+"."+s+".0"+u+" <"+o+"."+(+s+1)+".0"+u}r("xRange return",n);return n}))}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(u[l.STAR],"")}function hyphenReplace(e,t,r,n,i,o,s,a,u,c,l,f,d){if(isX(r)){t=""}else if(isX(n)){t=">="+r+".0.0"}else if(isX(i)){t=">="+r+"."+n+".0"}else{t=">="+t}if(isX(u)){a=""}else if(isX(c)){a="<"+(+u+1)+".0.0"}else if(isX(l)){a="<"+u+"."+(+c+1)+".0"}else if(f){a="<="+u+"."+c+"."+l+"-"+f}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(o.test(e)){if(!n||i.compare(e)===-1){n=e;i=new SemVer(n,r)}}}));return n}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach((function(e){if(o.test(e)){if(!n||i.compare(e)===1){n=e;i=new SemVer(n,r)}}}));return n}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var n=0;n":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,n){e=new SemVer(e,n);t=new Range(t,n);var i,o,s,a,u;switch(r){case">":i=gt;o=lte;s=lt;a=">";u=">=";break;case"<":i=lt;o=gte;s=gt;a="<";u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n)){return false}for(var c=0;c=0.0.0")}f=f||e;d=d||e;if(i(e.semver,f.semver,n)){f=e}else if(s(e.semver,d.semver,n)){d=e}}));if(f.operator===a||f.operator===u){return false}if((!d.operator||d.operator===a)&&o(e,d.semver)){return false}else if(d.operator===u&&s(e,d.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(u[l.COERCE])}else{var n;while((n=u[l.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||n.index+n[0].length!==r.index+r[0].length){r=n}u[l.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}u[l.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},7701:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var n=r||0;var i=t;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}e.exports=bytesToUuid},7269:(e,t,r)=>{var n=r(6113);e.exports=function nodeRNG(){return n.randomBytes(16)}},7468:(e,t,r)=>{var n=r(7269);var i=r(7701);function v4(e,t,r){var o=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var s=e.random||(e.rng||n)();s[6]=s[6]&15|64;s[8]=s[8]&63|128;if(t){for(var a=0;a<16;++a){t[o+a]=s[a]}}return t||i(s)}e.exports=v4},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var n=r(1808);var i=r(4404);var o=r(3685);var s=r(5687);var a=r(2361);var u=r(9491);var c=r(3837);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,i){var o=toOptions(r,n,i);for(var s=0,a=t.requests.length;s=this.maxSockets){i.requests.push(o);return}i.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,o)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}l("making CONNECT request");var o=r.request(i);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(i,s,a){o.removeAllListeners();s.removeAllListeners();if(i.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",i.statusCode);s.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(a.length>0){l("got illegal response body from proxy");s.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=s;return t(s)}function onError(t){o.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host");var s=mergeOptions({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host});var a=i.connect(0,s);r.sockets[r.sockets.indexOf(n)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"v1",{enumerable:true,get:function(){return n.default}});Object.defineProperty(t,"v3",{enumerable:true,get:function(){return i.default}});Object.defineProperty(t,"v4",{enumerable:true,get:function(){return o.default}});Object.defineProperty(t,"v5",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(t,"version",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"validate",{enumerable:true,get:function(){return c.default}});Object.defineProperty(t,"stringify",{enumerable:true,get:function(){return l.default}});Object.defineProperty(t,"parse",{enumerable:true,get:function(){return f.default}});var n=_interopRequireDefault(r(8628));var i=_interopRequireDefault(r(6409));var o=_interopRequireDefault(r(5122));var s=_interopRequireDefault(r(9120));var a=_interopRequireDefault(r(5332));var u=_interopRequireDefault(r(1595));var c=_interopRequireDefault(r(6900));var l=_interopRequireDefault(r(8950));var f=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},4569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return n.default.createHash("md5").update(e).digest()}var i=md5;t["default"]=i},5332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r="00000000-0000-0000-0000-000000000000";t["default"]=r},2746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}let t;const r=new Uint8Array(16);r[0]=(t=parseInt(e.slice(0,8),16))>>>24;r[1]=t>>>16&255;r[2]=t>>>8&255;r[3]=t&255;r[4]=(t=parseInt(e.slice(9,13),16))>>>8;r[5]=t&255;r[6]=(t=parseInt(e.slice(14,18),16))>>>8;r[7]=t&255;r[8]=(t=parseInt(e.slice(19,23),16))>>>8;r[9]=t&255;r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255;r[11]=t/4294967296&255;r[12]=t>>>24&255;r[13]=t>>>16&255;r[14]=t>>>8&255;r[15]=t&255;return r}var i=parse;t["default"]=i},814:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r=/^(?:[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;t["default"]=r},807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=rng;var n=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=new Uint8Array(256);let o=i.length;function rng(){if(o>i.length-16){n.default.randomFillSync(i);o=0}return i.slice(o,o+=16)}},5274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6113));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return n.default.createHash("sha1").update(e).digest()}var i=sha1;t["default"]=i},8950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=[];for(let e=0;e<256;++e){i.push((e+256).toString(16).substr(1))}function stringify(e,t=0){const r=(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase();if(!(0,n.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}var o=stringify;t["default"]=o},8628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(807));var i=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let o;let s;let a=0;let u=0;function v1(e,t,r){let c=t&&r||0;const l=t||new Array(16);e=e||{};let f=e.node||o;let d=e.clockseq!==undefined?e.clockseq:s;if(f==null||d==null){const t=e.random||(e.rng||n.default)();if(f==null){f=o=[t[0]|1,t[1],t[2],t[3],t[4],t[5]]}if(d==null){d=s=(t[6]<<8|t[7])&16383}}let p=e.msecs!==undefined?e.msecs:Date.now();let h=e.nsecs!==undefined?e.nsecs:u+1;const m=p-a+(h-u)/1e4;if(m<0&&e.clockseq===undefined){d=d+1&16383}if((m<0||p>a)&&e.nsecs===undefined){h=0}if(h>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=p;u=h;s=d;p+=122192928e5;const v=((p&268435455)*1e4+h)%4294967296;l[c++]=v>>>24&255;l[c++]=v>>>16&255;l[c++]=v>>>8&255;l[c++]=v&255;const g=p/4294967296*1e4&268435455;l[c++]=g>>>8&255;l[c++]=g&255;l[c++]=g>>>24&15|16;l[c++]=g>>>16&255;l[c++]=d>>>8|128;l[c++]=d&255;for(let e=0;e<6;++e){l[c+e]=f[e]}return t||(0,i.default)(l)}var c=v1;t["default"]=c},6409:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(5998));var i=_interopRequireDefault(r(4569));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,n.default)("v3",48,i.default);var s=o;t["default"]=s},5998:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;t.URL=t.DNS=void 0;var n=_interopRequireDefault(r(8950));var i=_interopRequireDefault(r(2746));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(807));var i=_interopRequireDefault(r(8950));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function v4(e,t,r){e=e||{};const o=e.random||(e.rng||n.default)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){r=r||0;for(let e=0;e<16;++e){t[r+e]=o[e]}return t}return(0,i.default)(o)}var o=v4;t["default"]=o},9120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(5998));var i=_interopRequireDefault(r(5274));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const o=(0,n.default)("v5",80,i.default);var s=o;t["default"]=s},6900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(814));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function validate(e){return typeof e==="string"&&n.default.test(e)}var i=validate;t["default"]=i},1595:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var n=_interopRequireDefault(r(6900));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function version(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.substr(14,1),16)}var i=version;t["default"]=i},9491:e=>{"use strict";e.exports=require("assert")},2081:e=>{"use strict";e.exports=require("child_process")},6113:e=>{"use strict";e.exports=require("crypto")},2361:e=>{"use strict";e.exports=require("events")},7147:e=>{"use strict";e.exports=require("fs")},3685:e=>{"use strict";e.exports=require("http")},5687:e=>{"use strict";e.exports=require("https")},1808:e=>{"use strict";e.exports=require("net")},2037:e=>{"use strict";e.exports=require("os")},1017:e=>{"use strict";e.exports=require("path")},2781:e=>{"use strict";e.exports=require("stream")},1576:e=>{"use strict";e.exports=require("string_decoder")},9512:e=>{"use strict";e.exports=require("timers")},4404:e=>{"use strict";e.exports=require("tls")},3837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var o=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return i.exports}(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{"use strict";__nccwpck_require__.r(r);__nccwpck_require__.d(r,{run:()=>run});var e=__nccwpck_require__(2186);var t=__nccwpck_require__(1514);var n=__nccwpck_require__(7784);const i=require("fs/promises");var o=__nccwpck_require__(2037);var s=__nccwpck_require__(1017);function getDownloadObject(e){return{sdk:`https://www.renpy.org/dl/${e}/renpy-${e}-sdk${(0,o.arch)().includes("arm")?"arm.tar.bz2":".zip"}`,rapt:`https://www.renpy.org/dl/${e}/renpy-${e}-rapt.zip`,renios:`https://www.renpy.org/dl/${e}/renpy-${e}-renios.zip`,web:`https://www.renpy.org/dl/${e}/renpy-${e}-web.zip`}}function getBinaryPath(e,t){return(0,s.join)(e,t+((0,o.platform)()==="win32"?".exe":".sh"))}function getBinaryDirectory(e,t){return(0,s.join)(e,`renpy-${t}-sdk${(0,o.arch)().includes("arm")?"arm":""}`)}function getLauncherDirectory(e){return(0,s.join)(e,"launcher")}async function createLauncherBinary(e,r,n){const o=(0,s.join)(e,r);await(0,i.writeFile)(o,`${n} ${getLauncherDirectory(e)} "$@"`);await(0,t.exec)("chmod",["+x",o])}async function run(){try{const r=(0,e.getInput)("cli-version");const i=(0,e.getInput)("cli-name");const o=(0,e.getInput)("launcher-name");const s=getDownloadObject(r);const a=await(0,n.downloadTool)(s.sdk);const u=s.sdk.endsWith(".zip")?n.extractZip:n.extractTar;const c=getBinaryDirectory(await u(a),r);const l=getBinaryPath(c,i).replace(".sh","");await(0,t.exec)("mv",[getBinaryPath(c,"renpy"),l]);const f=["rapt","renios","web"].filter((t=>(0,e.getInput)(t)==="true"));await Promise.all(f.map((e=>(0,n.downloadTool)(s[e]).then((e=>(0,n.extractZip)(e,c))))));const d=getLauncherDirectory(c);(0,e.setOutput)("launcher",d);await createLauncherBinary(c,o,l);(0,e.addPath)(c);await(0,n.cacheDir)(c,[i,...f].join("_"),r)}catch(t){if(t instanceof Error){(0,e.setFailed)(t.message)}}}run()})();module.exports=r})(); \ No newline at end of file diff --git a/src/__snapshots__/utils.test.ts.snap b/src/__snapshots__/utils.test.ts.snap index 9cf502c..8a4e7cc 100644 --- a/src/__snapshots__/utils.test.ts.snap +++ b/src/__snapshots__/utils.test.ts.snap @@ -94,5 +94,3 @@ exports[`getDownloadObject when OS is "win32" and arch is "x64" gets download ob `; exports[`getLauncherDirectory returns launcher directory 1`] = `"directory/launcher"`; - -exports[`getLauncherPath returns launcher path 1`] = `"directory/name"`; diff --git a/src/index.test.ts b/src/index.test.ts index 868b2a5..1c25313 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -4,12 +4,18 @@ import * as tc from '@actions/tool-cache'; import os from 'os'; import { run } from '.'; +import { createLauncherBinary } from './utils'; jest.mock('@actions/core'); jest.mock('@actions/exec'); jest.mock('@actions/tool-cache'); jest.mock('os'); +jest.mock('./utils', () => ({ + ...jest.requireActual('./utils'), + createLauncherBinary: jest.fn(), +})); + const mockedCore = jest.mocked(core); const mockedExec = jest.mocked(exec); const mockedTc = jest.mocked(tc); @@ -67,23 +73,14 @@ describe.each([ expect.stringContaining(cliName), ]); - expect(mockedExec.exec).toHaveBeenCalledWith('touch', [ - expect.stringContaining(launcherName), - ]); - - expect(mockedExec.exec).toHaveBeenCalledWith('echo', [ - expect.stringMatching(/.+cli-name(.exe)? .+launcher .+[$@].+/), - '>', - expect.stringContaining(launcherName), - ]); - - expect(mockedExec.exec).toHaveBeenCalledWith('chmod', [ - '+x', - expect.stringContaining(launcherName), - ]); - const sdkDirectory = `${pathToCLI}/renpy-${version}-sdk${arch.includes('arm') ? 'arm' : ''}`; + expect(createLauncherBinary).toHaveBeenCalledWith( + sdkDirectory, + launcherName, + expect.stringContaining(cliName), + ); + expect(mockedTc.cacheDir).toHaveBeenCalledWith( sdkDirectory, cliName, diff --git a/src/index.ts b/src/index.ts index 3355762..912ec1d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,11 +8,11 @@ import { } from '@actions/tool-cache'; import { + createLauncherBinary, getBinaryDirectory, getBinaryPath, getDownloadObject, getLauncherDirectory, - getLauncherPath, } from './utils'; export async function run() { @@ -57,14 +57,7 @@ export async function run() { setOutput('launcher', launcherDirectory); // Create the launcher binary - const launcherPath = getLauncherPath(binaryDirectory, launcherName); - await exec('touch', [launcherPath]); - await exec('echo', [ - `${binaryPath} ${launcherDirectory} "$@"`, - '>', - launcherPath, - ]); - await exec('chmod', ['+x', launcherPath]); + await createLauncherBinary(binaryDirectory, launcherName, binaryPath); // Expose the SDK by adding it to the PATH addPath(binaryDirectory); diff --git a/src/utils.test.ts b/src/utils.test.ts index a6f2a6f..f2ab0a6 100644 --- a/src/utils.test.ts +++ b/src/utils.test.ts @@ -1,13 +1,21 @@ +import * as exec from '@actions/exec'; +import fs from 'fs/promises'; import os from 'os'; import { + createLauncherBinary, getBinaryDirectory, getBinaryPath, getDownloadObject, getLauncherDirectory, - getLauncherPath, } from './utils'; +jest.mock('@actions/exec'); +const mockedExec = jest.mocked(exec); + +jest.mock('fs/promises'); +const mockedFs = jest.mocked(fs); + jest.mock('os'); const mockedOs = jest.mocked(os); @@ -69,9 +77,15 @@ describe('getLauncherDirectory', () => { }); }); -describe('getLauncherPath', () => { - it('returns launcher path', () => { - const directory = 'directory'; - expect(getLauncherPath(directory, name)).toMatchSnapshot(); +describe('createLauncherBinary', () => { + it('creates launcher binary', async () => { + const cliPath = 'cliPath'; + const launcherPath = `${directory}/${name}`; + await createLauncherBinary(directory, name, cliPath); + expect(mockedFs.writeFile).toHaveBeenCalledWith( + launcherPath, + `${cliPath} ${directory}/launcher "$@"`, + ); + expect(mockedExec.exec).toHaveBeenCalledWith('chmod', ['+x', launcherPath]); }); }); diff --git a/src/utils.ts b/src/utils.ts index 44fddc7..2956294 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,3 +1,5 @@ +import { exec } from '@actions/exec'; +import { writeFile } from 'fs/promises'; import { arch, platform } from 'os'; import { join } from 'path'; @@ -54,12 +56,21 @@ export function getLauncherDirectory(directory: string) { } /** - * Gets launcher path. + * Creates launcher binary. * - * @param directory - Directory - * @param name - Binary name - * @returns - Launcher path + * @param directory - Binary directory + * @param name - Launcher name + * @param cliPath - Binary path */ -export function getLauncherPath(directory: string, name: string) { - return join(directory, name); +export async function createLauncherBinary( + directory: string, + name: string, + cliPath: string, +) { + const launcherPath = join(directory, name); + await writeFile( + launcherPath, + `${cliPath} ${getLauncherDirectory(directory)} "$@"`, + ); + await exec('chmod', ['+x', launcherPath]); }