diff --git a/dist/index.js b/dist/index.js index 5149cd7..ba2ca00 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var e={276:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});const r=t(9093);const n=s(t(1784));const i=s(t(2960));const o=s(t(7650));const a=s(t(9462));const c=s(t(8307));async function main(){const e=(0,n.default)();const A=(0,r.getState)("is_post");if(A==="true")return(0,c.default)(e);(0,r.saveState)("is_post","true");await(0,i.default)(e);console.log("Installation Completed!");(0,o.default)(e);(0,a.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},1784:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.getInputs=void 0;const r=t(9093);const n=s(t(1791));const i=t(7090);const o={required:true};const parseInputPath=e=>(0,n.default)((0,r.getInput)(e,o));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,i.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});A.getInputs=getInputs;A["default"]=A.getInputs},7090:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.parseRunInstall=void 0;const s=t(9093);const r=t(2825);const n={required:true};function parseRunInstall(e){const A=(0,r.parse)((0,s.getInput)(e,n));if(!A)return[];if(A===true)return[{recursive:true}];validateRunInstallInput(A);if(Array.isArray(A))return A;return A}A.parseRunInstall=parseRunInstall;function validateRunInstallInput(e){if(Array.isArray(e)){for(const A of e){validateRunInstallEntry(A)}}else{validateRunInstallEntry(e)}}function validateRunInstallEntry(e){if(typeof e!=="object"){throw new Error("Invalid input for run_install")}if(e.recursive!==undefined&&typeof e.recursive!=="boolean"){throw new Error("Invalid input for run_install.recursive")}if(e.cwd!==undefined&&typeof e.cwd!=="string"){throw new Error("Invalid input for run_install.cwd")}if(e.args!==undefined&&!Array.isArray(e.args)){throw new Error("Invalid input for run_install.args")}}},2960:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.install=A.runSelfInstaller=void 0;const r=t(9093);const n=s(t(9530));A.runSelfInstaller=n.default;async function install(e){(0,r.startGroup)("Running self-installer...");const A=await(0,n.default)(e);(0,r.endGroup)();if(A){return(0,r.setFailed)(`Something went wrong, self-installer exits with code ${A}`)}}A.install=install;A["default"]=install},9530:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.runSelfInstaller=void 0;const r=t(9093);const n=t(2081);const i=t(3175);const o=s(t(1017));const a=t(7282);async function runSelfInstaller(e){const{version:A,dest:t,packageJsonFile:s,standalone:c}=e;await(0,i.remove)(t);const l=o.default.join(t,"package.json");await(0,i.ensureFile)(l);await(0,i.writeFile)(l,JSON.stringify({private:true}));const g=await readTarget({version:A,packageJsonFile:s,standalone:c});const E=(0,n.spawn)(a.execPath,[o.default.join(__dirname,"pnpm.cjs"),"install",g,"--no-lockfile"],{cwd:t,stdio:["pipe","inherit","inherit"]});const u=await new Promise(((e,A)=>{E.on("error",A);E.on("close",e)}));if(u===0){const e=o.default.join(t,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return u}A.runSelfInstaller=runSelfInstaller;async function readTarget(e){const{version:A,packageJsonFile:t,standalone:s}=e;if(A)return`${s?"@pnpm/exe":"pnpm"}@${A}`;const{GITHUB_WORKSPACE:r}=process.env;if(!r){throw new Error(`No workspace is found.\nIf you're intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,\nplease run the actions/checkout before pnpm/action-setup.\nOtherwise, please specify the pnpm version in the action configuration.`)}const{packageManager:n}=JSON.parse(await(0,i.readFile)(o.default.join(r,t),"utf8"));if(typeof n!=="string"){throw new Error(`No pnpm version is specified.\nPlease specify it by one of the following ways:\n - in the GitHub Action config with the key "version"\n - in the package.json with the key "packageManager"`)}if(!n.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(s){return n.replace("pnpm@","@pnpm/exe@")}return n}A["default"]=runSelfInstaller},7650:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.setOutputs=void 0;const s=t(9093);const r=t(1616);function setOutputs(e){const A=(0,r.getBinDest)(e);(0,s.addPath)(A);(0,s.setOutput)("dest",e.dest);(0,s.setOutput)("bin_dest",A)}A.setOutputs=setOutputs;A["default"]=setOutputs},9462:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.runPnpmInstall=void 0;const s=t(9093);const r=t(2081);const n=t(1616);function runPnpmInstall(e){const A=(0,n.patchPnpmEnv)(e);for(const t of e.runInstall){const e=["install"];if(t.recursive)e.unshift("recursive");if(t.args)e.push(...t.args);const n=["pnpm",...e].join(" ");(0,s.startGroup)(`Running ${n}...`);const{error:i,status:o}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:t.cwd,shell:true,env:A});(0,s.endGroup)();if(i){(0,s.setFailed)(i);continue}if(o){(0,s.setFailed)(`Command ${n} (cwd: ${t.cwd}) exits with status ${o}`);continue}}}A.runPnpmInstall=runPnpmInstall;A["default"]=runPnpmInstall},8307:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.pruneStore=void 0;const s=t(9093);const r=t(2081);const n=t(1616);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,s.startGroup)("Running pnpm store prune...");const{error:A,status:t}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,n.patchPnpmEnv)(e)});(0,s.endGroup)();if(A){(0,s.warning)(A);return}if(t){(0,s.warning)(`command pnpm store prune exits with code ${t}`);return}}A.pruneStore=pruneStore;A["default"]=pruneStore},1616:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.patchPnpmEnv=A.getBinDest=void 0;const r=s(t(1017));const n=s(t(7282));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");A.getBinDest=getBinDest;const patchPnpmEnv=e=>({...n.default.env,PATH:(0,A.getBinDest)(e)+r.default.delimiter+n.default.env.PATH});A.patchPnpmEnv=patchPnpmEnv},1513:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};Object.defineProperty(A,"__esModule",{value:true});A.issue=A.issueCommand=void 0;const i=n(t(2037));const o=t(1120);function issueCommand(e,A,t){const s=new Command(e,A,t);process.stdout.write(s.toString()+i.EOL)}A.issueCommand=issueCommand;function issue(e,A=""){issueCommand(e,{},A)}A.issue=issue;const a="::";class Command{constructor(e,A,t){if(!e){e="missing.command"}this.command=e;this.properties=A;this.message=t}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let A=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const s=this.properties[t];if(s){if(A){A=false}else{e+=","}e+=`${t}=${escapeProperty(s)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9093:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};var i=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.getIDToken=A.getState=A.saveState=A.group=A.endGroup=A.startGroup=A.info=A.notice=A.warning=A.error=A.debug=A.isDebug=A.setFailed=A.setCommandEcho=A.setOutput=A.getBooleanInput=A.getMultilineInput=A.getInput=A.addPath=A.setSecret=A.exportVariable=A.ExitCode=void 0;const o=t(1513);const a=t(9017);const c=t(1120);const l=n(t(2037));const g=n(t(1017));const E=t(9141);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=A.ExitCode||(A.ExitCode={}));function exportVariable(e,A){const t=c.toCommandValue(A);process.env[e]=t;const s=process.env["GITHUB_ENV"]||"";if(s){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(e,A))}o.issueCommand("set-env",{name:e},t)}A.exportVariable=exportVariable;function setSecret(e){o.issueCommand("add-mask",{},e)}A.setSecret=setSecret;function addPath(e){const A=process.env["GITHUB_PATH"]||"";if(A){a.issueFileCommand("PATH",e)}else{o.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${g.delimiter}${process.env["PATH"]}`}A.addPath=addPath;function getInput(e,A){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(A&&A.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}if(A&&A.trimWhitespace===false){return t}return t.trim()}A.getInput=getInput;function getMultilineInput(e,A){const t=getInput(e,A).split("\n").filter((e=>e!==""));if(A&&A.trimWhitespace===false){return t}return t.map((e=>e.trim()))}A.getMultilineInput=getMultilineInput;function getBooleanInput(e,A){const t=["true","True","TRUE"];const s=["false","False","FALSE"];const r=getInput(e,A);if(t.includes(r))return true;if(s.includes(r))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\``)}A.getBooleanInput=getBooleanInput;function setOutput(e,A){const t=process.env["GITHUB_OUTPUT"]||"";if(t){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(e,A))}process.stdout.write(l.EOL);o.issueCommand("set-output",{name:e},c.toCommandValue(A))}A.setOutput=setOutput;function setCommandEcho(e){o.issue("echo",e?"on":"off")}A.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}A.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}A.isDebug=isDebug;function debug(e){o.issueCommand("debug",{},e)}A.debug=debug;function error(e,A={}){o.issueCommand("error",c.toCommandProperties(A),e instanceof Error?e.toString():e)}A.error=error;function warning(e,A={}){o.issueCommand("warning",c.toCommandProperties(A),e instanceof Error?e.toString():e)}A.warning=warning;function notice(e,A={}){o.issueCommand("notice",c.toCommandProperties(A),e instanceof Error?e.toString():e)}A.notice=notice;function info(e){process.stdout.write(e+l.EOL)}A.info=info;function startGroup(e){o.issue("group",e)}A.startGroup=startGroup;function endGroup(){o.issue("endgroup")}A.endGroup=endGroup;function group(e,A){return i(this,void 0,void 0,(function*(){startGroup(e);let t;try{t=yield A()}finally{endGroup()}return t}))}A.group=group;function saveState(e,A){const t=process.env["GITHUB_STATE"]||"";if(t){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(e,A))}o.issueCommand("save-state",{name:e},c.toCommandValue(A))}A.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}A.getState=getState;function getIDToken(e){return i(this,void 0,void 0,(function*(){return yield E.OidcClient.getIDToken(e)}))}A.getIDToken=getIDToken;var h=t(5276);Object.defineProperty(A,"summary",{enumerable:true,get:function(){return h.summary}});var Q=t(5276);Object.defineProperty(A,"markdownSummary",{enumerable:true,get:function(){return Q.markdownSummary}});var C=t(670);Object.defineProperty(A,"toPosixPath",{enumerable:true,get:function(){return C.toPosixPath}});Object.defineProperty(A,"toWin32Path",{enumerable:true,get:function(){return C.toWin32Path}});Object.defineProperty(A,"toPlatformPath",{enumerable:true,get:function(){return C.toPlatformPath}})},9017:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};Object.defineProperty(A,"__esModule",{value:true});A.prepareKeyValueMessage=A.issueFileCommand=void 0;const i=n(t(7147));const o=n(t(2037));const a=t(7338);const c=t(1120);function issueFileCommand(e,A){const t=process.env[`GITHUB_${e}`];if(!t){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(t)){throw new Error(`Missing file at path: ${t}`)}i.appendFileSync(t,`${c.toCommandValue(A)}${o.EOL}`,{encoding:"utf8"})}A.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,A){const t=`ghadelimiter_${a.v4()}`;const s=c.toCommandValue(A);if(e.includes(t)){throw new Error(`Unexpected input: name should not contain the delimiter "${t}"`)}if(s.includes(t)){throw new Error(`Unexpected input: value should not contain the delimiter "${t}"`)}return`${e}<<${t}${o.EOL}${s}${o.EOL}${t}`}A.prepareKeyValueMessage=prepareKeyValueMessage},9141:function(e,A,t){"use strict";var s=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.OidcClient=void 0;const r=t(1759);const n=t(1366);const i=t(9093);class OidcClient{static createHttpClient(e=true,A=10){const t={allowRetries:e,maxRetries:A};return new r.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(OidcClient.getRequestToken())],t)}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 A;return s(this,void 0,void 0,(function*(){const t=OidcClient.createHttpClient();const s=yield t.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 r=(A=s.result)===null||A===void 0?void 0:A.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let A=OidcClient.getIDTokenUrl();if(e){const t=encodeURIComponent(e);A=`${A}&audience=${t}`}i.debug(`ID token url is ${A}`);const t=yield OidcClient.getCall(A);i.setSecret(t);return t}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}A.OidcClient=OidcClient},670:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};Object.defineProperty(A,"__esModule",{value:true});A.toPlatformPath=A.toWin32Path=A.toPosixPath=void 0;const i=n(t(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}A.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}A.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,i.sep)}A.toPlatformPath=toPlatformPath},5276:function(e,A,t){"use strict";var s=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.summary=A.markdownSummary=A.SUMMARY_DOCS_URL=A.SUMMARY_ENV_VAR=void 0;const r=t(2037);const n=t(7147);const{access:i,appendFile:o,writeFile:a}=n.promises;A.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";A.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 s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[A.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${A.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield i(e,n.constants.R_OK|n.constants.W_OK)}catch(A){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,A,t={}){const s=Object.entries(t).map((([e,A])=>` ${e}="${A}"`)).join("");if(!A){return`<${e}${s}>`}return`<${e}${s}>${A}`}write(e){return s(this,void 0,void 0,(function*(){const A=!!(e===null||e===void 0?void 0:e.overwrite);const t=yield this.filePath();const s=A?a:o;yield s(t,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(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,A=false){this._buffer+=e;return A?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(e,A){const t=Object.assign({},A&&{lang:A});const s=this.wrap("pre",this.wrap("code",e),t);return this.addRaw(s).addEOL()}addList(e,A=false){const t=A?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(t,s);return this.addRaw(r).addEOL()}addTable(e){const A=e.map((e=>{const A=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:A,data:t,colspan:s,rowspan:r}=e;const n=A?"th":"td";const i=Object.assign(Object.assign({},s&&{colspan:s}),r&&{rowspan:r});return this.wrap(n,t,i)})).join("");return this.wrap("tr",A)})).join("");const t=this.wrap("table",A);return this.addRaw(t).addEOL()}addDetails(e,A){const t=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(t).addEOL()}addImage(e,A,t){const{width:s,height:r}=t||{};const n=Object.assign(Object.assign({},s&&{width:s}),r&&{height:r});const i=this.wrap("img",null,Object.assign({src:e,alt:A},n));return this.addRaw(i).addEOL()}addHeading(e,A){const t=`h${A}`;const s=["h1","h2","h3","h4","h5","h6"].includes(t)?t:"h1";const r=this.wrap(s,e);return this.addRaw(r).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,A){const t=Object.assign({},A&&{cite:A});const s=this.wrap("blockquote",e,t);return this.addRaw(s).addEOL()}addLink(e,A){const t=this.wrap("a",e,{href:A});return this.addRaw(t).addEOL()}}const c=new Summary;A.markdownSummary=c;A.summary=c},1120:(e,A)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.toCommandProperties=A.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)}A.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}}A.toCommandProperties=toCommandProperties},1366:function(e,A){"use strict";var t=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.PersonalAccessTokenCredentialHandler=A.BearerCredentialHandler=A.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,A){this.username=e;this.password=A}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 t(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}A.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 t(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}A.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 t(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}A.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},1759:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;var r=Object.getOwnPropertyDescriptor(A,t);if(!r||("get"in r?!A.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return A[t]}}}Object.defineProperty(e,s,r)}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};var i=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.HttpClient=A.isHttps=A.HttpClientResponse=A.HttpClientError=A.getProxyUrl=A.MediaTypes=A.Headers=A.HttpCodes=void 0;const o=n(t(3685));const a=n(t(5687));const c=n(t(9379));const l=n(t(4225));const g=t(4737);var E;(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"})(E||(A.HttpCodes=E={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u||(A.Headers=u={}));var h;(function(e){e["ApplicationJson"]="application/json"})(h||(A.MediaTypes=h={}));function getProxyUrl(e){const A=c.getProxyUrl(new URL(e));return A?A.href:""}A.getProxyUrl=getProxyUrl;const Q=[E.MovedPermanently,E.ResourceMoved,E.SeeOther,E.TemporaryRedirect,E.PermanentRedirect];const C=[E.BadGateway,E.ServiceUnavailable,E.GatewayTimeout];const B=["OPTIONS","GET","DELETE","HEAD"];const I=10;const f=5;class HttpClientError extends Error{constructor(e,A){super(e);this.name="HttpClientError";this.statusCode=A;Object.setPrototypeOf(this,HttpClientError.prototype)}}A.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return i(this,void 0,void 0,(function*(){return new Promise((e=>i(this,void 0,void 0,(function*(){let A=Buffer.alloc(0);this.message.on("data",(e=>{A=Buffer.concat([A,e])}));this.message.on("end",(()=>{e(A.toString())}))}))))}))}readBodyBuffer(){return i(this,void 0,void 0,(function*(){return new Promise((e=>i(this,void 0,void 0,(function*(){const A=[];this.message.on("data",(e=>{A.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(A))}))}))))}))}}A.HttpClientResponse=HttpClientResponse;function isHttps(e){const A=new URL(e);return A.protocol==="https:"}A.isHttps=isHttps;class HttpClient{constructor(e,A,t){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=A||[];this.requestOptions=t;if(t){if(t.ignoreSslError!=null){this._ignoreSslError=t.ignoreSslError}this._socketTimeout=t.socketTimeout;if(t.allowRedirects!=null){this._allowRedirects=t.allowRedirects}if(t.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=t.allowRedirectDowngrade}if(t.maxRedirects!=null){this._maxRedirects=Math.max(t.maxRedirects,0)}if(t.keepAlive!=null){this._keepAlive=t.keepAlive}if(t.allowRetries!=null){this._allowRetries=t.allowRetries}if(t.maxRetries!=null){this._maxRetries=t.maxRetries}}}options(e,A){return i(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,A||{})}))}get(e,A){return i(this,void 0,void 0,(function*(){return this.request("GET",e,null,A||{})}))}del(e,A){return i(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,A||{})}))}post(e,A,t){return i(this,void 0,void 0,(function*(){return this.request("POST",e,A,t||{})}))}patch(e,A,t){return i(this,void 0,void 0,(function*(){return this.request("PATCH",e,A,t||{})}))}put(e,A,t){return i(this,void 0,void 0,(function*(){return this.request("PUT",e,A,t||{})}))}head(e,A){return i(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,A||{})}))}sendStream(e,A,t,s){return i(this,void 0,void 0,(function*(){return this.request(e,A,t,s)}))}getJson(e,A={}){return i(this,void 0,void 0,(function*(){A[u.Accept]=this._getExistingOrDefaultHeader(A,u.Accept,h.ApplicationJson);const t=yield this.get(e,A);return this._processResponse(t,this.requestOptions)}))}postJson(e,A,t={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(A,null,2);t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,h.ApplicationJson);t[u.ContentType]=this._getExistingOrDefaultHeader(t,u.ContentType,h.ApplicationJson);const r=yield this.post(e,s,t);return this._processResponse(r,this.requestOptions)}))}putJson(e,A,t={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(A,null,2);t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,h.ApplicationJson);t[u.ContentType]=this._getExistingOrDefaultHeader(t,u.ContentType,h.ApplicationJson);const r=yield this.put(e,s,t);return this._processResponse(r,this.requestOptions)}))}patchJson(e,A,t={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(A,null,2);t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,h.ApplicationJson);t[u.ContentType]=this._getExistingOrDefaultHeader(t,u.ContentType,h.ApplicationJson);const r=yield this.patch(e,s,t);return this._processResponse(r,this.requestOptions)}))}request(e,A,t,s){return i(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(A);let n=this._prepareRequest(e,r,s);const i=this._allowRetries&&B.includes(e)?this._maxRetries+1:1;let o=0;let a;do{a=yield this.requestRaw(n,t);if(a&&a.message&&a.message.statusCode===E.Unauthorized){let e;for(const A of this.handlers){if(A.canHandleAuthentication(a)){e=A;break}}if(e){return e.handleAuthentication(this,n,t)}else{return a}}let A=this._maxRedirects;while(a.message.statusCode&&Q.includes(a.message.statusCode)&&this._allowRedirects&&A>0){const i=a.message.headers["location"];if(!i){break}const o=new URL(i);if(r.protocol==="https:"&&r.protocol!==o.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 a.readBody();if(o.hostname!==r.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}n=this._prepareRequest(e,o,s);a=yield this.requestRaw(n,t);A--}if(!a.message.statusCode||!C.includes(a.message.statusCode)){return a}o+=1;if(o{function callbackForResult(e,A){if(e){s(e)}else if(!A){s(new Error("Unknown error"))}else{t(A)}}this.requestRawWithCallback(e,A,callbackForResult)}))}))}requestRawWithCallback(e,A,t){if(typeof A==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(A,"utf8")}let s=false;function handleResult(e,A){if(!s){s=true;t(e,A)}}const r=e.httpModule.request(e.options,(e=>{const A=new HttpClientResponse(e);handleResult(undefined,A)}));let n;r.on("socket",(e=>{n=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(A&&typeof A==="string"){r.write(A,"utf8")}if(A&&typeof A!=="string"){A.on("close",(function(){r.end()}));A.pipe(r)}else{r.end()}}getAgent(e){const A=new URL(e);return this._getAgent(A)}getAgentDispatcher(e){const A=new URL(e);const t=c.getProxyUrl(A);const s=t&&t.hostname;if(!s){return}return this._getProxyAgentDispatcher(A,t)}_prepareRequest(e,A,t){const s={};s.parsedUrl=A;const r=s.parsedUrl.protocol==="https:";s.httpModule=r?a:o;const n=r?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):n;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(t);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,A,t){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[A]}return e[A]||s||t}_getAgent(e){let A;const t=c.getProxyUrl(e);const s=t&&t.hostname;if(this._keepAlive&&s){A=this._proxyAgent}if(this._keepAlive&&!s){A=this._agent}if(A){return A}const r=e.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(t&&t.hostname){const e={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(t.username||t.password)&&{proxyAuth:`${t.username}:${t.password}`}),{host:t.hostname,port:t.port})};let s;const i=t.protocol==="https:";if(r){s=i?l.httpsOverHttps:l.httpsOverHttp}else{s=i?l.httpOverHttps:l.httpOverHttp}A=s(e);this._proxyAgent=A}if(this._keepAlive&&!A){const e={keepAlive:this._keepAlive,maxSockets:n};A=r?new a.Agent(e):new o.Agent(e);this._agent=A}if(!A){A=r?a.globalAgent:o.globalAgent}if(r&&this._ignoreSslError){A.options=Object.assign(A.options||{},{rejectUnauthorized:false})}return A}_getProxyAgentDispatcher(e,A){let t;if(this._keepAlive){t=this._proxyAgentDispatcher}if(t){return t}const s=e.protocol==="https:";t=new g.ProxyAgent(Object.assign({uri:A.href,pipelining:!this._keepAlive?0:1},(A.username||A.password)&&{token:`${A.username}:${A.password}`}));this._proxyAgentDispatcher=t;if(s&&this._ignoreSslError){t.options=Object.assign(t.options.requestTls||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return i(this,void 0,void 0,(function*(){e=Math.min(I,e);const A=f*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),A)))}))}_processResponse(e,A){return i(this,void 0,void 0,(function*(){return new Promise(((t,s)=>i(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const n={statusCode:r,result:null,headers:{}};if(r===E.NotFound){t(n)}function dateTimeDeserializer(e,A){if(typeof A==="string"){const e=new Date(A);if(!isNaN(e.valueOf())){return e}}return A}let i;let o;try{o=yield e.readBody();if(o&&o.length>0){if(A&&A.deserializeDates){i=JSON.parse(o,dateTimeDeserializer)}else{i=JSON.parse(o)}n.result=i}n.headers=e.message.headers}catch(e){}if(r>299){let e;if(i&&i.message){e=i.message}else if(o&&o.length>0){e=o}else{e=`Failed request: (${r})`}const A=new HttpClientError(e,r);A.result=n.result;s(A)}else{t(n)}}))))}))}}A.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((A,t)=>(A[t.toLowerCase()]=e[t],A)),{})},9379:(e,A)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.checkBypass=A.getProxyUrl=void 0;function getProxyUrl(e){const A=e.protocol==="https:";if(checkBypass(e)){return undefined}const t=(()=>{if(A){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(t){try{return new URL(t)}catch(e){if(!t.startsWith("http://")&&!t.startsWith("https://"))return new URL(`http://${t}`)}}else{return undefined}}A.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const A=e.hostname;if(isLoopbackAddress(A)){return true}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const r=[e.hostname.toUpperCase()];if(typeof s==="number"){r.push(`${r[0]}:${s}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.some((A=>A===e||A.endsWith(`.${e}`)||e.startsWith(".")&&A.endsWith(`${e}`)))){return true}}return false}A.checkBypass=checkBypass;function isLoopbackAddress(e){const A=e.toLowerCase();return A==="localhost"||A.startsWith("127.")||A.startsWith("[::1]")||A.startsWith("[0:0:0:0:0:0:0:1]")}},1791:(e,A,t)=>{ +(()=>{var e={276:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});const r=t(9093);const n=s(t(1784));const i=s(t(2960));const o=s(t(7650));const a=s(t(9462));const c=s(t(8307));async function main(){const e=(0,n.default)();const A=(0,r.getState)("is_post");if(A==="true")return(0,c.default)(e);(0,r.saveState)("is_post","true");await(0,i.default)(e);console.log("Installation Completed!");(0,o.default)(e);(0,a.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},1784:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.getInputs=void 0;const r=t(9093);const n=s(t(1791));const i=t(7090);const o={required:true};const parseInputPath=e=>(0,n.default)((0,r.getInput)(e,o));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,i.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});A.getInputs=getInputs;A["default"]=A.getInputs},7090:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.parseRunInstall=void 0;const s=t(9093);const r=t(2825);const n={required:true};function parseRunInstall(e){const A=(0,r.parse)((0,s.getInput)(e,n));if(!A)return[];if(A===true)return[{recursive:true}];if(!isInputValid(A))process.exit(1);return Array.isArray(A)?A:[A]}A.parseRunInstall=parseRunInstall;function isInputValid(e){if(Array.isArray(e)){return e.every(isEntryValid)}else{return isEntryValid(e)}}function isEntryValid(e){if(typeof e!=="object"){(0,s.error)(`Invalid input for run_install. Expected object, but got ${typeof e}`);return false}if(e.recursive!==undefined&&typeof e.recursive!=="boolean"){(0,s.error)(`Invalid input for run_install.recursive. Expected boolean, but got ${typeof e.recursive}`);return false}if(e.cwd!==undefined&&typeof e.cwd!=="string"){(0,s.error)(`Invalid input for run_install.cwd. Expected string, but got ${typeof e.cwd}`);return false}if(e.args!==undefined&&!Array.isArray(e.args)){(0,s.error)(`Invalid input for run_install.args. Expected array, but got ${typeof e.args}`);return false}const A=e.args.filter((e=>typeof e!=="string"));if(e.args!==undefined&&A.length>0){const e=A.map((e=>typeof e)).join(", ");(0,s.error)(`Invalid input for run_install.args. Expected array of strings, but got ${e}`);return false}return true}},2960:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.install=A.runSelfInstaller=void 0;const r=t(9093);const n=s(t(9530));A.runSelfInstaller=n.default;async function install(e){(0,r.startGroup)("Running self-installer...");const A=await(0,n.default)(e);(0,r.endGroup)();if(A){return(0,r.setFailed)(`Something went wrong, self-installer exits with code ${A}`)}}A.install=install;A["default"]=install},9530:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.runSelfInstaller=void 0;const r=t(9093);const n=t(2081);const i=t(3175);const o=s(t(1017));const a=t(7282);async function runSelfInstaller(e){const{version:A,dest:t,packageJsonFile:s,standalone:c}=e;await(0,i.remove)(t);const l=o.default.join(t,"package.json");await(0,i.ensureFile)(l);await(0,i.writeFile)(l,JSON.stringify({private:true}));const g=await readTarget({version:A,packageJsonFile:s,standalone:c});const E=(0,n.spawn)(a.execPath,[o.default.join(__dirname,"pnpm.cjs"),"install",g,"--no-lockfile"],{cwd:t,stdio:["pipe","inherit","inherit"]});const u=await new Promise(((e,A)=>{E.on("error",A);E.on("close",e)}));if(u===0){const e=o.default.join(t,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return u}A.runSelfInstaller=runSelfInstaller;async function readTarget(e){const{version:A,packageJsonFile:t,standalone:s}=e;if(A)return`${s?"@pnpm/exe":"pnpm"}@${A}`;const{GITHUB_WORKSPACE:r}=process.env;if(!r){throw new Error(`No workspace is found.\nIf you're intended to let pnpm/action-setup read preferred pnpm version from the "packageManager" field in the package.json file,\nplease run the actions/checkout before pnpm/action-setup.\nOtherwise, please specify the pnpm version in the action configuration.`)}const{packageManager:n}=JSON.parse(await(0,i.readFile)(o.default.join(r,t),"utf8"));if(typeof n!=="string"){throw new Error(`No pnpm version is specified.\nPlease specify it by one of the following ways:\n - in the GitHub Action config with the key "version"\n - in the package.json with the key "packageManager"`)}if(!n.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(s){return n.replace("pnpm@","@pnpm/exe@")}return n}A["default"]=runSelfInstaller},7650:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.setOutputs=void 0;const s=t(9093);const r=t(1616);function setOutputs(e){const A=(0,r.getBinDest)(e);(0,s.addPath)(A);(0,s.setOutput)("dest",e.dest);(0,s.setOutput)("bin_dest",A)}A.setOutputs=setOutputs;A["default"]=setOutputs},9462:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.runPnpmInstall=void 0;const s=t(9093);const r=t(2081);const n=t(1616);function runPnpmInstall(e){const A=(0,n.patchPnpmEnv)(e);for(const t of e.runInstall){const e=["install"];if(t.recursive)e.unshift("recursive");if(t.args)e.push(...t.args);const n=["pnpm",...e].join(" ");(0,s.startGroup)(`Running ${n}...`);const{error:i,status:o}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:t.cwd,shell:true,env:A});(0,s.endGroup)();if(i){(0,s.setFailed)(i);continue}if(o){(0,s.setFailed)(`Command ${n} (cwd: ${t.cwd}) exits with status ${o}`);continue}}}A.runPnpmInstall=runPnpmInstall;A["default"]=runPnpmInstall},8307:(e,A,t)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.pruneStore=void 0;const s=t(9093);const r=t(2081);const n=t(1616);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,s.startGroup)("Running pnpm store prune...");const{error:A,status:t}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,n.patchPnpmEnv)(e)});(0,s.endGroup)();if(A){(0,s.warning)(A);return}if(t){(0,s.warning)(`command pnpm store prune exits with code ${t}`);return}}A.pruneStore=pruneStore;A["default"]=pruneStore},1616:function(e,A,t){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:true});A.patchPnpmEnv=A.getBinDest=void 0;const r=s(t(1017));const n=s(t(7282));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");A.getBinDest=getBinDest;const patchPnpmEnv=e=>({...n.default.env,PATH:(0,A.getBinDest)(e)+r.default.delimiter+n.default.env.PATH});A.patchPnpmEnv=patchPnpmEnv},1513:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};Object.defineProperty(A,"__esModule",{value:true});A.issue=A.issueCommand=void 0;const i=n(t(2037));const o=t(1120);function issueCommand(e,A,t){const s=new Command(e,A,t);process.stdout.write(s.toString()+i.EOL)}A.issueCommand=issueCommand;function issue(e,A=""){issueCommand(e,{},A)}A.issue=issue;const a="::";class Command{constructor(e,A,t){if(!e){e="missing.command"}this.command=e;this.properties=A;this.message=t}toString(){let e=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let A=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const s=this.properties[t];if(s){if(A){A=false}else{e+=","}e+=`${t}=${escapeProperty(s)}`}}}}e+=`${a}${escapeData(this.message)}`;return e}}function escapeData(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9093:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};var i=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.getIDToken=A.getState=A.saveState=A.group=A.endGroup=A.startGroup=A.info=A.notice=A.warning=A.error=A.debug=A.isDebug=A.setFailed=A.setCommandEcho=A.setOutput=A.getBooleanInput=A.getMultilineInput=A.getInput=A.addPath=A.setSecret=A.exportVariable=A.ExitCode=void 0;const o=t(1513);const a=t(9017);const c=t(1120);const l=n(t(2037));const g=n(t(1017));const E=t(9141);var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=A.ExitCode||(A.ExitCode={}));function exportVariable(e,A){const t=c.toCommandValue(A);process.env[e]=t;const s=process.env["GITHUB_ENV"]||"";if(s){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(e,A))}o.issueCommand("set-env",{name:e},t)}A.exportVariable=exportVariable;function setSecret(e){o.issueCommand("add-mask",{},e)}A.setSecret=setSecret;function addPath(e){const A=process.env["GITHUB_PATH"]||"";if(A){a.issueFileCommand("PATH",e)}else{o.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${g.delimiter}${process.env["PATH"]}`}A.addPath=addPath;function getInput(e,A){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(A&&A.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}if(A&&A.trimWhitespace===false){return t}return t.trim()}A.getInput=getInput;function getMultilineInput(e,A){const t=getInput(e,A).split("\n").filter((e=>e!==""));if(A&&A.trimWhitespace===false){return t}return t.map((e=>e.trim()))}A.getMultilineInput=getMultilineInput;function getBooleanInput(e,A){const t=["true","True","TRUE"];const s=["false","False","FALSE"];const r=getInput(e,A);if(t.includes(r))return true;if(s.includes(r))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\``)}A.getBooleanInput=getBooleanInput;function setOutput(e,A){const t=process.env["GITHUB_OUTPUT"]||"";if(t){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(e,A))}process.stdout.write(l.EOL);o.issueCommand("set-output",{name:e},c.toCommandValue(A))}A.setOutput=setOutput;function setCommandEcho(e){o.issue("echo",e?"on":"off")}A.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}A.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}A.isDebug=isDebug;function debug(e){o.issueCommand("debug",{},e)}A.debug=debug;function error(e,A={}){o.issueCommand("error",c.toCommandProperties(A),e instanceof Error?e.toString():e)}A.error=error;function warning(e,A={}){o.issueCommand("warning",c.toCommandProperties(A),e instanceof Error?e.toString():e)}A.warning=warning;function notice(e,A={}){o.issueCommand("notice",c.toCommandProperties(A),e instanceof Error?e.toString():e)}A.notice=notice;function info(e){process.stdout.write(e+l.EOL)}A.info=info;function startGroup(e){o.issue("group",e)}A.startGroup=startGroup;function endGroup(){o.issue("endgroup")}A.endGroup=endGroup;function group(e,A){return i(this,void 0,void 0,(function*(){startGroup(e);let t;try{t=yield A()}finally{endGroup()}return t}))}A.group=group;function saveState(e,A){const t=process.env["GITHUB_STATE"]||"";if(t){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(e,A))}o.issueCommand("save-state",{name:e},c.toCommandValue(A))}A.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}A.getState=getState;function getIDToken(e){return i(this,void 0,void 0,(function*(){return yield E.OidcClient.getIDToken(e)}))}A.getIDToken=getIDToken;var h=t(5276);Object.defineProperty(A,"summary",{enumerable:true,get:function(){return h.summary}});var Q=t(5276);Object.defineProperty(A,"markdownSummary",{enumerable:true,get:function(){return Q.markdownSummary}});var C=t(670);Object.defineProperty(A,"toPosixPath",{enumerable:true,get:function(){return C.toPosixPath}});Object.defineProperty(A,"toWin32Path",{enumerable:true,get:function(){return C.toWin32Path}});Object.defineProperty(A,"toPlatformPath",{enumerable:true,get:function(){return C.toPlatformPath}})},9017:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};Object.defineProperty(A,"__esModule",{value:true});A.prepareKeyValueMessage=A.issueFileCommand=void 0;const i=n(t(7147));const o=n(t(2037));const a=t(7338);const c=t(1120);function issueFileCommand(e,A){const t=process.env[`GITHUB_${e}`];if(!t){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(t)){throw new Error(`Missing file at path: ${t}`)}i.appendFileSync(t,`${c.toCommandValue(A)}${o.EOL}`,{encoding:"utf8"})}A.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,A){const t=`ghadelimiter_${a.v4()}`;const s=c.toCommandValue(A);if(e.includes(t)){throw new Error(`Unexpected input: name should not contain the delimiter "${t}"`)}if(s.includes(t)){throw new Error(`Unexpected input: value should not contain the delimiter "${t}"`)}return`${e}<<${t}${o.EOL}${s}${o.EOL}${t}`}A.prepareKeyValueMessage=prepareKeyValueMessage},9141:function(e,A,t){"use strict";var s=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.OidcClient=void 0;const r=t(1759);const n=t(1366);const i=t(9093);class OidcClient{static createHttpClient(e=true,A=10){const t={allowRetries:e,maxRetries:A};return new r.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(OidcClient.getRequestToken())],t)}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 A;return s(this,void 0,void 0,(function*(){const t=OidcClient.createHttpClient();const s=yield t.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 r=(A=s.result)===null||A===void 0?void 0:A.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return s(this,void 0,void 0,(function*(){try{let A=OidcClient.getIDTokenUrl();if(e){const t=encodeURIComponent(e);A=`${A}&audience=${t}`}i.debug(`ID token url is ${A}`);const t=yield OidcClient.getCall(A);i.setSecret(t);return t}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}A.OidcClient=OidcClient},670:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;Object.defineProperty(e,s,{enumerable:true,get:function(){return A[t]}})}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};Object.defineProperty(A,"__esModule",{value:true});A.toPlatformPath=A.toWin32Path=A.toPosixPath=void 0;const i=n(t(1017));function toPosixPath(e){return e.replace(/[\\]/g,"/")}A.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}A.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,i.sep)}A.toPlatformPath=toPlatformPath},5276:function(e,A,t){"use strict";var s=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.summary=A.markdownSummary=A.SUMMARY_DOCS_URL=A.SUMMARY_ENV_VAR=void 0;const r=t(2037);const n=t(7147);const{access:i,appendFile:o,writeFile:a}=n.promises;A.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";A.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 s(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[A.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${A.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield i(e,n.constants.R_OK|n.constants.W_OK)}catch(A){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,A,t={}){const s=Object.entries(t).map((([e,A])=>` ${e}="${A}"`)).join("");if(!A){return`<${e}${s}>`}return`<${e}${s}>${A}`}write(e){return s(this,void 0,void 0,(function*(){const A=!!(e===null||e===void 0?void 0:e.overwrite);const t=yield this.filePath();const s=A?a:o;yield s(t,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return s(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,A=false){this._buffer+=e;return A?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(e,A){const t=Object.assign({},A&&{lang:A});const s=this.wrap("pre",this.wrap("code",e),t);return this.addRaw(s).addEOL()}addList(e,A=false){const t=A?"ol":"ul";const s=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(t,s);return this.addRaw(r).addEOL()}addTable(e){const A=e.map((e=>{const A=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:A,data:t,colspan:s,rowspan:r}=e;const n=A?"th":"td";const i=Object.assign(Object.assign({},s&&{colspan:s}),r&&{rowspan:r});return this.wrap(n,t,i)})).join("");return this.wrap("tr",A)})).join("");const t=this.wrap("table",A);return this.addRaw(t).addEOL()}addDetails(e,A){const t=this.wrap("details",this.wrap("summary",e)+A);return this.addRaw(t).addEOL()}addImage(e,A,t){const{width:s,height:r}=t||{};const n=Object.assign(Object.assign({},s&&{width:s}),r&&{height:r});const i=this.wrap("img",null,Object.assign({src:e,alt:A},n));return this.addRaw(i).addEOL()}addHeading(e,A){const t=`h${A}`;const s=["h1","h2","h3","h4","h5","h6"].includes(t)?t:"h1";const r=this.wrap(s,e);return this.addRaw(r).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,A){const t=Object.assign({},A&&{cite:A});const s=this.wrap("blockquote",e,t);return this.addRaw(s).addEOL()}addLink(e,A){const t=this.wrap("a",e,{href:A});return this.addRaw(t).addEOL()}}const c=new Summary;A.markdownSummary=c;A.summary=c},1120:(e,A)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.toCommandProperties=A.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)}A.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}}A.toCommandProperties=toCommandProperties},1366:function(e,A){"use strict";var t=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.PersonalAccessTokenCredentialHandler=A.BearerCredentialHandler=A.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,A){this.username=e;this.password=A}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 t(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}A.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 t(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}A.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 t(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}A.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},1759:function(e,A,t){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,A,t,s){if(s===undefined)s=t;var r=Object.getOwnPropertyDescriptor(A,t);if(!r||("get"in r?!A.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return A[t]}}}Object.defineProperty(e,s,r)}:function(e,A,t,s){if(s===undefined)s=t;e[s]=A[t]});var r=this&&this.__setModuleDefault||(Object.create?function(e,A){Object.defineProperty(e,"default",{enumerable:true,value:A})}:function(e,A){e["default"]=A});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var A={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))s(A,e,t);r(A,e);return A};var i=this&&this.__awaiter||function(e,A,t,s){function adopt(e){return e instanceof t?e:new t((function(A){A(e)}))}return new(t||(t=Promise))((function(t,r){function fulfilled(e){try{step(s.next(e))}catch(e){r(e)}}function rejected(e){try{step(s["throw"](e))}catch(e){r(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((s=s.apply(e,A||[])).next())}))};Object.defineProperty(A,"__esModule",{value:true});A.HttpClient=A.isHttps=A.HttpClientResponse=A.HttpClientError=A.getProxyUrl=A.MediaTypes=A.Headers=A.HttpCodes=void 0;const o=n(t(3685));const a=n(t(5687));const c=n(t(9379));const l=n(t(4225));const g=t(4737);var E;(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"})(E||(A.HttpCodes=E={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u||(A.Headers=u={}));var h;(function(e){e["ApplicationJson"]="application/json"})(h||(A.MediaTypes=h={}));function getProxyUrl(e){const A=c.getProxyUrl(new URL(e));return A?A.href:""}A.getProxyUrl=getProxyUrl;const Q=[E.MovedPermanently,E.ResourceMoved,E.SeeOther,E.TemporaryRedirect,E.PermanentRedirect];const C=[E.BadGateway,E.ServiceUnavailable,E.GatewayTimeout];const B=["OPTIONS","GET","DELETE","HEAD"];const I=10;const f=5;class HttpClientError extends Error{constructor(e,A){super(e);this.name="HttpClientError";this.statusCode=A;Object.setPrototypeOf(this,HttpClientError.prototype)}}A.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return i(this,void 0,void 0,(function*(){return new Promise((e=>i(this,void 0,void 0,(function*(){let A=Buffer.alloc(0);this.message.on("data",(e=>{A=Buffer.concat([A,e])}));this.message.on("end",(()=>{e(A.toString())}))}))))}))}readBodyBuffer(){return i(this,void 0,void 0,(function*(){return new Promise((e=>i(this,void 0,void 0,(function*(){const A=[];this.message.on("data",(e=>{A.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(A))}))}))))}))}}A.HttpClientResponse=HttpClientResponse;function isHttps(e){const A=new URL(e);return A.protocol==="https:"}A.isHttps=isHttps;class HttpClient{constructor(e,A,t){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=A||[];this.requestOptions=t;if(t){if(t.ignoreSslError!=null){this._ignoreSslError=t.ignoreSslError}this._socketTimeout=t.socketTimeout;if(t.allowRedirects!=null){this._allowRedirects=t.allowRedirects}if(t.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=t.allowRedirectDowngrade}if(t.maxRedirects!=null){this._maxRedirects=Math.max(t.maxRedirects,0)}if(t.keepAlive!=null){this._keepAlive=t.keepAlive}if(t.allowRetries!=null){this._allowRetries=t.allowRetries}if(t.maxRetries!=null){this._maxRetries=t.maxRetries}}}options(e,A){return i(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,A||{})}))}get(e,A){return i(this,void 0,void 0,(function*(){return this.request("GET",e,null,A||{})}))}del(e,A){return i(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,A||{})}))}post(e,A,t){return i(this,void 0,void 0,(function*(){return this.request("POST",e,A,t||{})}))}patch(e,A,t){return i(this,void 0,void 0,(function*(){return this.request("PATCH",e,A,t||{})}))}put(e,A,t){return i(this,void 0,void 0,(function*(){return this.request("PUT",e,A,t||{})}))}head(e,A){return i(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,A||{})}))}sendStream(e,A,t,s){return i(this,void 0,void 0,(function*(){return this.request(e,A,t,s)}))}getJson(e,A={}){return i(this,void 0,void 0,(function*(){A[u.Accept]=this._getExistingOrDefaultHeader(A,u.Accept,h.ApplicationJson);const t=yield this.get(e,A);return this._processResponse(t,this.requestOptions)}))}postJson(e,A,t={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(A,null,2);t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,h.ApplicationJson);t[u.ContentType]=this._getExistingOrDefaultHeader(t,u.ContentType,h.ApplicationJson);const r=yield this.post(e,s,t);return this._processResponse(r,this.requestOptions)}))}putJson(e,A,t={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(A,null,2);t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,h.ApplicationJson);t[u.ContentType]=this._getExistingOrDefaultHeader(t,u.ContentType,h.ApplicationJson);const r=yield this.put(e,s,t);return this._processResponse(r,this.requestOptions)}))}patchJson(e,A,t={}){return i(this,void 0,void 0,(function*(){const s=JSON.stringify(A,null,2);t[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,h.ApplicationJson);t[u.ContentType]=this._getExistingOrDefaultHeader(t,u.ContentType,h.ApplicationJson);const r=yield this.patch(e,s,t);return this._processResponse(r,this.requestOptions)}))}request(e,A,t,s){return i(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(A);let n=this._prepareRequest(e,r,s);const i=this._allowRetries&&B.includes(e)?this._maxRetries+1:1;let o=0;let a;do{a=yield this.requestRaw(n,t);if(a&&a.message&&a.message.statusCode===E.Unauthorized){let e;for(const A of this.handlers){if(A.canHandleAuthentication(a)){e=A;break}}if(e){return e.handleAuthentication(this,n,t)}else{return a}}let A=this._maxRedirects;while(a.message.statusCode&&Q.includes(a.message.statusCode)&&this._allowRedirects&&A>0){const i=a.message.headers["location"];if(!i){break}const o=new URL(i);if(r.protocol==="https:"&&r.protocol!==o.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 a.readBody();if(o.hostname!==r.hostname){for(const e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}n=this._prepareRequest(e,o,s);a=yield this.requestRaw(n,t);A--}if(!a.message.statusCode||!C.includes(a.message.statusCode)){return a}o+=1;if(o{function callbackForResult(e,A){if(e){s(e)}else if(!A){s(new Error("Unknown error"))}else{t(A)}}this.requestRawWithCallback(e,A,callbackForResult)}))}))}requestRawWithCallback(e,A,t){if(typeof A==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(A,"utf8")}let s=false;function handleResult(e,A){if(!s){s=true;t(e,A)}}const r=e.httpModule.request(e.options,(e=>{const A=new HttpClientResponse(e);handleResult(undefined,A)}));let n;r.on("socket",(e=>{n=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(A&&typeof A==="string"){r.write(A,"utf8")}if(A&&typeof A!=="string"){A.on("close",(function(){r.end()}));A.pipe(r)}else{r.end()}}getAgent(e){const A=new URL(e);return this._getAgent(A)}getAgentDispatcher(e){const A=new URL(e);const t=c.getProxyUrl(A);const s=t&&t.hostname;if(!s){return}return this._getProxyAgentDispatcher(A,t)}_prepareRequest(e,A,t){const s={};s.parsedUrl=A;const r=s.parsedUrl.protocol==="https:";s.httpModule=r?a:o;const n=r?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):n;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(t);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(s.options)}}return s}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,A,t){let s;if(this.requestOptions&&this.requestOptions.headers){s=lowercaseKeys(this.requestOptions.headers)[A]}return e[A]||s||t}_getAgent(e){let A;const t=c.getProxyUrl(e);const s=t&&t.hostname;if(this._keepAlive&&s){A=this._proxyAgent}if(this._keepAlive&&!s){A=this._agent}if(A){return A}const r=e.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(t&&t.hostname){const e={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(t.username||t.password)&&{proxyAuth:`${t.username}:${t.password}`}),{host:t.hostname,port:t.port})};let s;const i=t.protocol==="https:";if(r){s=i?l.httpsOverHttps:l.httpsOverHttp}else{s=i?l.httpOverHttps:l.httpOverHttp}A=s(e);this._proxyAgent=A}if(this._keepAlive&&!A){const e={keepAlive:this._keepAlive,maxSockets:n};A=r?new a.Agent(e):new o.Agent(e);this._agent=A}if(!A){A=r?a.globalAgent:o.globalAgent}if(r&&this._ignoreSslError){A.options=Object.assign(A.options||{},{rejectUnauthorized:false})}return A}_getProxyAgentDispatcher(e,A){let t;if(this._keepAlive){t=this._proxyAgentDispatcher}if(t){return t}const s=e.protocol==="https:";t=new g.ProxyAgent(Object.assign({uri:A.href,pipelining:!this._keepAlive?0:1},(A.username||A.password)&&{token:`${A.username}:${A.password}`}));this._proxyAgentDispatcher=t;if(s&&this._ignoreSslError){t.options=Object.assign(t.options.requestTls||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return i(this,void 0,void 0,(function*(){e=Math.min(I,e);const A=f*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),A)))}))}_processResponse(e,A){return i(this,void 0,void 0,(function*(){return new Promise(((t,s)=>i(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const n={statusCode:r,result:null,headers:{}};if(r===E.NotFound){t(n)}function dateTimeDeserializer(e,A){if(typeof A==="string"){const e=new Date(A);if(!isNaN(e.valueOf())){return e}}return A}let i;let o;try{o=yield e.readBody();if(o&&o.length>0){if(A&&A.deserializeDates){i=JSON.parse(o,dateTimeDeserializer)}else{i=JSON.parse(o)}n.result=i}n.headers=e.message.headers}catch(e){}if(r>299){let e;if(i&&i.message){e=i.message}else if(o&&o.length>0){e=o}else{e=`Failed request: (${r})`}const A=new HttpClientError(e,r);A.result=n.result;s(A)}else{t(n)}}))))}))}}A.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((A,t)=>(A[t.toLowerCase()]=e[t],A)),{})},9379:(e,A)=>{"use strict";Object.defineProperty(A,"__esModule",{value:true});A.checkBypass=A.getProxyUrl=void 0;function getProxyUrl(e){const A=e.protocol==="https:";if(checkBypass(e)){return undefined}const t=(()=>{if(A){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(t){try{return new URL(t)}catch(e){if(!t.startsWith("http://")&&!t.startsWith("https://"))return new URL(`http://${t}`)}}else{return undefined}}A.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const A=e.hostname;if(isLoopbackAddress(A)){return true}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let s;if(e.port){s=Number(e.port)}else if(e.protocol==="http:"){s=80}else if(e.protocol==="https:"){s=443}const r=[e.hostname.toUpperCase()];if(typeof s==="number"){r.push(`${r[0]}:${s}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.some((A=>A===e||A.endsWith(`.${e}`)||e.startsWith(".")&&A.endsWith(`${e}`)))){return true}}return false}A.checkBypass=checkBypass;function isLoopbackAddress(e){const A=e.toLowerCase();return A==="localhost"||A.startsWith("127.")||A.startsWith("[::1]")||A.startsWith("[0:0:0:0:0:0:0:1]")}},1791:(e,A,t)=>{ /*! * expand-tilde * diff --git a/src/inputs/run-install.ts b/src/inputs/run-install.ts index 01e9eb8..dcd273a 100644 --- a/src/inputs/run-install.ts +++ b/src/inputs/run-install.ts @@ -1,4 +1,4 @@ -import { getInput,InputOptions } from '@actions/core' +import { getInput, InputOptions, error } from '@actions/core' import { parse } from 'yaml' export interface RunInstall { @@ -23,35 +23,46 @@ export function parseRunInstall(name: string): RunInstall[] { if (!input) return [] if (input === true) return [{ recursive: true }] - validateRunInstallInput(input) + if (!isInputValid(input)) process.exit(1); return Array.isArray(input) ? input : [input] } -function validateRunInstallInput(input: any) { +function isInputValid(input: any) { if (Array.isArray(input)) { - for (const entry of input) { - validateRunInstallEntry(entry) - } + return input.every(isEntryValid) } else { - validateRunInstallEntry(input) + return isEntryValid(input) } } -function validateRunInstallEntry(input: any) { +function isEntryValid(input: any): boolean { if (typeof input !== 'object') { - throw new Error('Invalid input for run_install') + error(`Invalid input for run_install. Expected object, but got ${typeof input}`) + return false; } if (input.recursive !== undefined && typeof input.recursive !== 'boolean') { - throw new Error('Invalid input for run_install.recursive') + error(`Invalid input for run_install.recursive. Expected boolean, but got ${typeof input.recursive}`) + return false; } if (input.cwd !== undefined && typeof input.cwd !== 'string') { - throw new Error('Invalid input for run_install.cwd') + error(`Invalid input for run_install.cwd. Expected string, but got ${typeof input.cwd}`) + return false; } if (input.args !== undefined && !Array.isArray(input.args)) { - throw new Error('Invalid input for run_install.args') + error(`Invalid input for run_install.args. Expected array, but got ${typeof input.args}`) + return false; } + + const invalidArgs: any[] = input.args.filter((arg: any) => typeof arg !== 'string'); + if (input.args !== undefined && invalidArgs.length > 0) { + const invalidArgsMessage = invalidArgs.map((arg: any) => typeof arg).join(', '); + error(`Invalid input for run_install.args. Expected array of strings, but got ${invalidArgsMessage}`) + return false; + } + + return true; }