From 3cec5320c953b15901aea082fbeddb59f204772f Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 00:26:18 +0100 Subject: [PATCH 1/8] Run pruning as part of main action, not in post The post action will execute too late to actually improve any caching. By pruning directly after running pnpm install(s), we make sure the store is as clean as possible before continuing. This means any attempt to cache the pnpm store will be caching a pruned store --- action.yml | 1 - dist/index.js | 2 +- src/index.ts | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 831ced00..e3ec7cb6 100644 --- a/action.yml +++ b/action.yml @@ -31,4 +31,3 @@ outputs: runs: using: node20 main: dist/index.js - post: dist/index.js diff --git a/dist/index.js b/dist/index.js index 425614ad..c61ceab1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();const t=(0,r.getState)("is_post");if(t==="true")return(0,l.default)(e);(0,r.saveState)("is_post","true");await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ +(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ /*! * expand-tilde * diff --git a/src/index.ts b/src/index.ts index 7ae741b0..ad0b7adc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import { setFailed, saveState, getState } from '@actions/core' +import { setFailed } from '@actions/core' import getInputs from './inputs' import installPnpm from './install-pnpm' import setOutputs from './outputs' @@ -7,13 +7,11 @@ import pruneStore from './pnpm-store-prune' async function main() { const inputs = getInputs() - const isPost = getState('is_post') - if (isPost === 'true') return pruneStore(inputs) - saveState('is_post', 'true') await installPnpm(inputs) console.log('Installation Completed!') setOutputs(inputs) pnpmInstall(inputs) + pruneStore(inputs) } main().catch(error => { From 37f0218d6228fa0775bc406e611df15dff6400a2 Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 00:29:18 +0100 Subject: [PATCH 2/8] Make the message when not pruning more helpful The original message made it sound like it checked the store and decided there was nothing to prune, in reality pruning just did not run if run_install was not set. --- dist/index.js | 2 +- src/pnpm-store-prune/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index c61ceab1..1e543bdc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(e.runInstall.length===0){console.log("Pruning is unnecessary.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ +(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(e.runInstall.length===0){console.log("No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ /*! * expand-tilde * diff --git a/src/pnpm-store-prune/index.ts b/src/pnpm-store-prune/index.ts index 5b1a2ddc..1e1d6de8 100644 --- a/src/pnpm-store-prune/index.ts +++ b/src/pnpm-store-prune/index.ts @@ -5,7 +5,7 @@ import { patchPnpmEnv } from '../utils' export function pruneStore(inputs: Inputs) { if (inputs.runInstall.length === 0) { - console.log('Pruning is unnecessary.') + console.log('No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.') return } From 82352014bcd428e272cb17c42f2ba9ef22bd1d1e Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 00:35:57 +0100 Subject: [PATCH 3/8] Add option to disable automatic pruning of store --- README.md | 4 ++++ action.yml | 4 ++++ dist/index.js | 2 +- src/inputs/index.ts | 2 ++ src/pnpm-store-prune/index.ts | 5 +++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 73212a4c..87f4080d 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ If `run_install` is a YAML string representation of either an object or an array **Optional** (_type:_ `string[]`) Additional arguments after `pnpm [recursive] install`, e.g. `[--ignore-scripts, --strict-peer-dependencies]`. +#### `store_prune` + +**Optional** (_type:_ `boolean`, _default:_ `true`) Whether to run `pnpm store prune` after installation. + ### `package_json_file` **Optional** (_type:_ `string`, _default:_ `package.json`) File path to the `package.json`/[`package.yaml`](https://github.com/pnpm/pnpm/pull/1799) to read "packageManager" configuration. diff --git a/action.yml b/action.yml index e3ec7cb6..92f0885f 100644 --- a/action.yml +++ b/action.yml @@ -15,6 +15,10 @@ inputs: description: If specified, run `pnpm install` required: false default: 'null' + store_prune: + description: Enable store pruning after installation. Set to false to disable. + required: false + default: 'true' package_json_file: description: File path to the package.json to read "packageManager" configuration required: false diff --git a/dist/index.js b/dist/index.js index 1e543bdc..c71dedaa 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(e.runInstall.length===0){console.log("No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ +(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),storePrune:(0,r.getBooleanInput)("store_prune"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(!e.storePrune){console.log("Store pruning is disabled, skipping pnpm store prune.");return}if(e.runInstall.length===0){console.log("No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ /*! * expand-tilde * diff --git a/src/inputs/index.ts b/src/inputs/index.ts index a9b705a4..9b42f16b 100644 --- a/src/inputs/index.ts +++ b/src/inputs/index.ts @@ -6,6 +6,7 @@ export interface Inputs { readonly version?: string readonly dest: string readonly runInstall: RunInstall[] + readonly storePrune: boolean readonly packageJsonFile: string readonly standalone: boolean } @@ -20,6 +21,7 @@ export const getInputs = (): Inputs => ({ version: getInput('version'), dest: parseInputPath('dest'), runInstall: parseRunInstall('run_install'), + storePrune: getBooleanInput('store_prune'), packageJsonFile: parseInputPath('package_json_file'), standalone: getBooleanInput('standalone'), }) diff --git a/src/pnpm-store-prune/index.ts b/src/pnpm-store-prune/index.ts index 1e1d6de8..1c3a85f8 100644 --- a/src/pnpm-store-prune/index.ts +++ b/src/pnpm-store-prune/index.ts @@ -4,6 +4,11 @@ import { Inputs } from '../inputs' import { patchPnpmEnv } from '../utils' export function pruneStore(inputs: Inputs) { + if (!inputs.storePrune) { + console.log('Store pruning is disabled, skipping pnpm store prune.') + return + } + if (inputs.runInstall.length === 0) { console.log('No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.') return From 6a5147c614790bb77c5a74ad0040934c19a6d16f Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 00:40:50 +0100 Subject: [PATCH 4/8] Update documentation about pnpm store prune --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 87f4080d..6020ffdb 100644 --- a/README.md +++ b/README.md @@ -156,9 +156,12 @@ jobs: - name: Install dependencies run: pnpm install + + - name: Prune pnpm store + run: pnpm store prune ``` -**Note:** You don't need to run `pnpm store prune` at the end; post-action has already taken care of that. +**Note:** If you you opt to run install on your own (`run_install: false`), it's recommended to run [`pnpm store prune`](https://pnpm.io/cli/store#prune) after installation to make sure the store that will be cached is pruned. ## Notes From 14f23f26991b5ca210b31ebe440174df35362932 Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 00:44:29 +0100 Subject: [PATCH 5/8] Add more documentation regarding caching, pruning and the run_install and store_prune options --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6020ffdb..4d8b944d 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ If `run_install` is `true`, pnpm will install dependencies recursively. If `run_install` is a YAML string representation of either an object or an array, pnpm will execute every install commands. +If any `run_install` is not falsy, and `store_prune` is not set to `false`, `pnpm store prune` will be executed after all install commands have been executed. This is to ensure the pnpm store is pruned before caching. + #### `run_install.recursive` **Optional** (_type:_ `boolean`, _default:_ `false`) Whether to use `pnpm recursive install`. @@ -44,7 +46,7 @@ If `run_install` is a YAML string representation of either an object or an array #### `store_prune` -**Optional** (_type:_ `boolean`, _default:_ `true`) Whether to run `pnpm store prune` after installation. +**Optional** (_type:_ `boolean`, _default:_ `true`) Whether to run `pnpm store prune` after installation. If `run_install` is falsy, this option will be ignored. If you run `pnpm install` on your own, and intend to cache the pnpm store, it's recommended to run `pnpm store prune` yourself to make sure the store that will be cached is pruned. ### `package_json_file` From 40fbc12c16b1a4a62526eec722b8829b6f122c35 Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 00:45:12 +0100 Subject: [PATCH 6/8] Actually check for run_install before store_prune, to match documentation --- dist/index.js | 2 +- src/pnpm-store-prune/index.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index c71dedaa..98ad5297 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),storePrune:(0,r.getBooleanInput)("store_prune"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(!e.storePrune){console.log("Store pruning is disabled, skipping pnpm store prune.");return}if(e.runInstall.length===0){console.log("No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ +(()=>{var e={1046:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const r=s(9999);const i=n(s(6414));const o=n(s(3144));const a=n(s(7215));const c=n(s(4728));const l=n(s(6879));async function main(){const e=(0,i.default)();await(0,o.default)(e);console.log("Installation Completed!");(0,a.default)(e);(0,c.default)(e);(0,l.default)(e)}main().catch((e=>{console.error(e);(0,r.setFailed)(e)}))},6414:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getInputs=void 0;const r=s(9999);const i=n(s(6746));const o=s(9065);const a={required:true};const parseInputPath=e=>(0,i.default)((0,r.getInput)(e,a));const getInputs=()=>({version:(0,r.getInput)("version"),dest:parseInputPath("dest"),runInstall:(0,o.parseRunInstall)("run_install"),storePrune:(0,r.getBooleanInput)("store_prune"),packageJsonFile:parseInputPath("package_json_file"),standalone:(0,r.getBooleanInput)("standalone")});t.getInputs=getInputs;t["default"]=t.getInputs},9065:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s))t[t.length]=s;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s=ownKeys(e),i=0;i{h.on("error",t);h.on("close",e)}));if(m===0){const e=c.default.join(s,"node_modules/.bin");(0,r.addPath)(e);(0,r.exportVariable)("PNPM_HOME",e)}return m}async function readTarget(e){const{version:t,packageJsonFile:s,standalone:n}=e;const{GITHUB_WORKSPACE:r}=process.env;let i;if(r){try{const e=(0,a.readFileSync)(c.default.join(r,s),"utf8");({packageManager:i}=s.endsWith(".yaml")?d.default.parse(e,{merge:true}):JSON.parse(e))}catch(e){if(!u.default.types.isNativeError(e)||!("code"in e)||e.code!=="ENOENT")throw e}}if(t){if(typeof i==="string"&&i.startsWith("pnpm@")&&i.replace("pnpm@","")!==t){throw new Error(`Multiple versions of pnpm specified:\n - version ${t} in the GitHub Action config with the key "version"\n - version ${i} in the package.json with the key "packageManager"\nRemove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)}return`${n?"@pnpm/exe":"pnpm"}@${t}`}if(!r){throw new Error(`No workspace is found.\nIf you've 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.`)}if(typeof i!=="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(!i.startsWith("pnpm@")){throw new Error("Invalid packageManager field in package.json")}if(n){return i.replace("pnpm@","@pnpm/exe@")}return i}t["default"]=runSelfInstaller},7215:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.setOutputs=setOutputs;const n=s(9999);const r=s(3872);function setOutputs(e){const t=(0,r.getBinDest)(e);(0,n.addPath)(t);(0,n.setOutput)("dest",e.dest);(0,n.setOutput)("bin_dest",t)}t["default"]=setOutputs},4728:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.runPnpmInstall=runPnpmInstall;const n=s(9999);const r=s(5317);const i=s(3872);function runPnpmInstall(e){const t=(0,i.patchPnpmEnv)(e);for(const s of e.runInstall){const e=["install"];if(s.recursive)e.unshift("recursive");if(s.args)e.push(...s.args);const i=["pnpm",...e].join(" ");(0,n.startGroup)(`Running ${i}...`);const{error:o,status:a}=(0,r.spawnSync)("pnpm",e,{stdio:"inherit",cwd:s.cwd,shell:true,env:t});(0,n.endGroup)();if(o){(0,n.setFailed)(o);continue}if(a){(0,n.setFailed)(`Command ${i} (cwd: ${s.cwd}) exits with status ${a}`);continue}}}t["default"]=runPnpmInstall},6879:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pruneStore=pruneStore;const n=s(9999);const r=s(5317);const i=s(3872);function pruneStore(e){if(e.runInstall.length===0){console.log("No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.");return}if(!e.storePrune){console.log("Store pruning is disabled, skipping pnpm store prune.");return}(0,n.startGroup)("Running pnpm store prune...");const{error:t,status:s}=(0,r.spawnSync)("pnpm",["store","prune"],{stdio:"inherit",shell:true,env:(0,i.patchPnpmEnv)(e)});(0,n.endGroup)();if(t){(0,n.warning)(t);return}if(s){(0,n.warning)(`command pnpm store prune exits with code ${s}`);return}}t["default"]=pruneStore},3872:function(e,t,s){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.patchPnpmEnv=t.getBinDest=void 0;const r=n(s(6928));const i=n(s(932));const getBinDest=e=>r.default.join(e.dest,"node_modules",".bin");t.getBinDest=getBinDest;const patchPnpmEnv=e=>({...i.default.env,PATH:(0,t.getBinDest)(e)+r.default.delimiter+i.default.env.PATH});t.patchPnpmEnv=patchPnpmEnv},3191:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=i(s(857));const a=s(6283);function issueCommand(e,t,s){const n=new Command(e,t,s);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,s){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=s}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const n=this.properties[s];if(n){if(t){t=false}else{e+=","}e+=`${s}=${escapeProperty(n)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,a.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},9999:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=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=s(3191);const c=s(9058);const l=s(6283);const u=i(s(857));const d=i(s(6928));const f=s(3549);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const s=(0,l.toCommandValue)(t);process.env[e]=s;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,c.issueFileCommand)("ENV",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("set-env",{name:e},s)}t.exportVariable=exportVariable;function setSecret(e){(0,a.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,c.issueFileCommand)("PATH",e)}else{(0,a.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const s=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!s){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return s}return s.trim()}t.getInput=getInput;function getMultilineInput(e,t){const s=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return s}return s.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const s=["true","True","TRUE"];const n=["false","False","FALSE"];const r=getInput(e,t);if(s.includes(r))return true;if(n.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\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(u.EOL);(0,a.issueCommand)("set-output",{name:e},(0,l.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,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){(0,a.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,a.issueCommand)("error",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,l.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){(0,a.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,a.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return o(this,void 0,void 0,(function*(){startGroup(e);let s;try{s=yield t()}finally{endGroup()}return s}))}t.group=group;function saveState(e,t){const s=process.env["GITHUB_STATE"]||"";if(s){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,l.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var h=s(1638);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=s(1638);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var y=s(539);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}});t.platform=i(s(2563))},9058:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=i(s(6982));const a=i(s(9896));const c=i(s(857));const l=s(6283);function issueFileCommand(e,t){const s=process.env[`GITHUB_${e}`];if(!s){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}a.appendFileSync(s,`${(0,l.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const s=`ghadelimiter_${o.randomUUID()}`;const n=(0,l.toCommandValue)(t);if(e.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(n.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${e}<<${s}${c.EOL}${n}${c.EOL}${s}`}t.prepareKeyValueMessage=prepareKeyValueMessage},3549:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(5359);const i=s(6165);const o=s(9999);class OidcClient{static createHttpClient(e=true,t=10){const s={allowRetries:e,maxRetries:t};return new r.HttpClient("actions/oidc-client",[new i.BearerCredentialHandler(OidcClient.getRequestToken())],s)}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 s=OidcClient.createHttpClient();const n=yield s.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=(t=n.result)===null||t===void 0?void 0:t.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const s=encodeURIComponent(e);t=`${t}&audience=${s}`}(0,o.debug)(`ID token url is ${t}`);const s=yield OidcClient.getCall(t);(0,o.setSecret)(s);return s}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},539:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=i(s(6928));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,o.sep)}t.toPlatformPath=toPlatformPath},2563:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;var r=Object.getOwnPropertyDescriptor(t,s);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return t[s]}}}Object.defineProperty(e,n,r)}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(s(857));const l=i(s(8872));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield l.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>o(void 0,void 0,void 0,(function*(){var e,t,s,n;const{stdout:r}=yield l.getExecOutput("sw_vers",undefined,{silent:true});const i=(t=(e=r.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(s=r.match(/ProductName:\s*(.+)/))===null||s===void 0?void 0:s[1])!==null&&n!==void 0?n:"";return{name:o,version:i}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield l.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,s]=e.trim().split("\n");return{name:t,version:s}}));t.platform=c.default.platform();t.arch=c.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1638:function(e,t,s){"use strict";var n=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 r=s(857);const i=s(9896);const{access:o,appendFile:a,writeFile:c}=i.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 o(e,i.constants.R_OK|i.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,s={}){const n=Object.entries(s).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 s=yield this.filePath();const n=t?c:a;yield n(s,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(r.EOL)}addCodeBlock(e,t){const s=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),s);return this.addRaw(n).addEOL()}addList(e,t=false){const s=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const r=this.wrap(s,n);return this.addRaw(r).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:s,colspan:n,rowspan:r}=e;const i=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),r&&{rowspan:r});return this.wrap(i,s,o)})).join("");return this.wrap("tr",t)})).join("");const s=this.wrap("table",t);return this.addRaw(s).addEOL()}addDetails(e,t){const s=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(s).addEOL()}addImage(e,t,s){const{width:n,height:r}=s||{};const i=Object.assign(Object.assign({},n&&{width:n}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:e,alt:t},i));return this.addRaw(o).addEOL()}addHeading(e,t){const s=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(n,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,t){const s=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,s);return this.addRaw(n).addEOL()}addLink(e,t){const s=this.wrap("a",e,{href:t});return this.addRaw(s).addEOL()}}const l=new Summary;t.markdownSummary=l;t.summary=l},6283:(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},8872:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(3193);const c=i(s(3725));function exec(e,t,s){return o(this,void 0,void 0,(function*(){const n=c.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const r=n[0];t=n.slice(1).concat(t||[]);const i=new c.ToolRunner(r,t,s);return i.exec()}))}t.exec=exec;function getExecOutput(e,t,s){var n,r;return o(this,void 0,void 0,(function*(){let i="";let o="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=s===null||s===void 0?void 0:s.listeners)===null||n===void 0?void 0:n.stdout;const d=(r=s===null||s===void 0?void 0:s.listeners)===null||r===void 0?void 0:r.stderr;const stdErrListener=e=>{o+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{i+=c.write(e);if(u){u(e)}};const f=Object.assign(Object.assign({},s===null||s===void 0?void 0:s.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},s),{listeners:f}));i+=c.end();o+=l.end();return{exitCode:p,stdout:i,stderr:o}}))}t.getExecOutput=getExecOutput},3725:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(857));const c=i(s(4434));const l=i(s(5317));const u=i(s(6928));const d=i(s(3357));const f=i(s(2746));const p=s(3557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,s){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=s||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const s=this._getSpawnFileName();const n=this._getSpawnArgs(e);let r=t?"":"[command]";if(h){if(this._isCmdFile()){r+=s;for(const e of n){r+=` ${e}`}}else if(e.windowsVerbatimArguments){r+=`"${s}"`;for(const e of n){r+=` ${e}`}}else{r+=this._windowsQuoteCmdArg(s);for(const e of n){r+=` ${this._windowsQuoteCmdArg(e)}`}}}else{r+=s;for(const e of n){r+=` ${e}`}}return r}_processLineBuffer(e,t,s){try{let n=t+e.toString();let r=n.indexOf(a.EOL);while(r>-1){const e=n.substring(0,r);s(e);n=n.substring(r+a.EOL.length);r=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 s of this.args){t+=" ";t+=e.windowsVerbatimArguments?s:this._windowsQuoteCmdArg(s)}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 s=false;for(const n of e){if(t.some((e=>e===n))){s=true;break}}if(!s){return e}let n='"';let r=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(r&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){r=true;n+='"'}else{r=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 s=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(s&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){s=true;t+="\\"}else{s=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 s={};s.cwd=e.cwd;s.env=e.env;s["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){s.argv0=`"${t}"`}return s}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>o(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 s=this._cloneExecOptions(this.options);if(!s.silent&&s.outStream){s.outStream.write(this._getCommandString(s)+a.EOL)}const n=new ExecState(s,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const r=this._getSpawnFileName();const i=l.spawn(r,this._getSpawnArgs(s),this._getSpawnOptions(this.options,r));let o="";if(i.stdout){i.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!s.silent&&s.outStream){s.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(i.stderr){i.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!s.silent&&s.errStream&&s.outStream){const t=s.failOnStdErr?s.errStream:s.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}i.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));i.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));i.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",((s,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}i.removeAllListeners();if(s){t(s)}else{e(n)}}));if(this.options.input){if(!i.stdin){throw new Error("child process missing stdin")}i.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let s=false;let n=false;let r="";function append(e){if(n&&e!=='"'){r+="\\"}r+=e;n=false}for(let i=0;i0){t.push(r);r=""}continue}append(o)}if(r.length>0){t.push(r.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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()}}},6165:function(e,t){"use strict";var s=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 s(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 s(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 s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},5359:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=i(s(8611));const c=i(s(5692));const l=i(s(5819));const u=i(s(6124));var d;(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"})(d=t.HttpCodes||(t.HttpCodes={}));var f;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(f=t.Headers||(t.Headers={}));var p;(function(e){e["ApplicationJson"]="application/json"})(p=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){const t=l.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const g=10;const v=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 o(this,void 0,void 0,(function*(){return new Promise((e=>o(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,s){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=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(e,t){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return o(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return o(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,s||{})}))}patch(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,s||{})}))}put(e,t,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,s||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,s,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,s,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const s=yield this.get(e,t);return this._processResponse(s,this.requestOptions)}))}postJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.post(e,n,s);return this._processResponse(r,this.requestOptions)}))}putJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.put(e,n,s);return this._processResponse(r,this.requestOptions)}))}patchJson(e,t,s={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,p.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,p.ApplicationJson);const r=yield this.patch(e,n,s);return this._processResponse(r,this.requestOptions)}))}request(e,t,s,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(t);let i=this._prepareRequest(e,r,n);const o=this._allowRetries&&y.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(i,s);if(c&&c.message&&c.message.statusCode===d.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,i,s)}else{return c}}let t=this._maxRedirects;while(c.message.statusCode&&h.includes(c.message.statusCode)&&this._allowRedirects&&t>0){const o=c.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.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 c.readBody();if(a.hostname!==r.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}i=this._prepareRequest(e,a,n);c=yield this.requestRaw(i,s);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{s(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,s){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;s(e,t)}}const r=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let i;r.on("socket",(e=>{i=e}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));r.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){r.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){r.end()}));t.pipe(r)}else{r.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,s){const n={};n.parsedUrl=t;const r=n.parsedUrl.protocol==="https:";n.httpModule=r?c:a;const i=r?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(s);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,s){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||s}_getAgent(e){let t;const s=l.getProxyUrl(e);const n=s&&s.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const r=e.protocol==="https:";let i=100;if(this.requestOptions){i=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let n;const o=s.protocol==="https:";if(r){n=o?u.httpsOverHttps:u.httpsOverHttp}else{n=o?u.httpOverHttps:u.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=r?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=r?c.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){return o(this,void 0,void 0,(function*(){e=Math.min(g,e);const t=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((s,n)=>o(this,void 0,void 0,(function*(){const r=e.message.statusCode||0;const i={statusCode:r,result:null,headers:{}};if(r===d.NotFound){s(i)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let o;let a;try{a=yield e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}i.result=o}i.headers=e.message.headers}catch(e){}if(r>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${r})`}const t=new HttpClientError(e,r);t.result=i.result;n(t)}else{s(i)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,s)=>(t[s.toLowerCase()]=e[s],t)),{})},5819:(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 s=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const s=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!s){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 r=[e.hostname.toUpperCase()];if(typeof n==="number"){r.push(`${r[0]}:${n}`)}for(const e of s.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||r.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]")}},2746:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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 c=i(s(9896));const l=i(s(6928));a=c.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=c.constants.O_RDONLY;function exists(e){return o(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,s=false){return o(this,void 0,void 0,(function*(){const n=s?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,s){return o(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=l.extname(e).toUpperCase();if(s.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const r=e;for(const i of s){e=r+i;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 s=l.dirname(e);const n=l.basename(e).toUpperCase();for(const r of yield t.readdir(s)){if(n===r.toUpperCase()){e=l.join(s,r);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},3357:function(e,t,s){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){if(n===undefined)n=s;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[s]}})}:function(e,t,s,n){if(n===undefined)n=s;e[n]=t[s]});var r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)if(s!=="default"&&Object.hasOwnProperty.call(e,s))n(t,e,s);r(t,e);return t};var o=this&&this.__awaiter||function(e,t,s,n){function adopt(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(e){try{step(n.next(e))}catch(e){r(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){r(e)}}function step(e){e.done?s(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=s(2613);const c=i(s(6928));const l=i(s(2746));function cp(e,t,s={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:r,copySourceDirectory:i}=readCopyOptions(s);const o=(yield l.exists(t))?yield l.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&i?c.join(t,c.basename(e)):t;if(!(yield l.exists(e))){throw new Error(`no such file or directory: ${e}`)}const u=yield l.stat(e);if(u.isDirectory()){if(!r){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(c.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,s={}){return o(this,void 0,void 0,(function*(){if(yield l.exists(t)){let n=true;if(yield l.isDirectory(t)){t=c.join(t,c.basename(e));n=yield l.exists(t)}if(n){if(s.force==null||s.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield l.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(l.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield l.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 o(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield l.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return o(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(l.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 s=yield findInPath(e);if(s&&s.length>0){return s[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(l.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(l.isRooted(e)){const s=yield l.tryGetExecutablePath(e,t);if(s){return[s]}return[]}if(e.includes(c.sep)){return[]}const s=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){s.push(e)}}}const n=[];for(const r of s){const s=yield l.tryGetExecutablePath(c.join(r,e),t);if(s){n.push(s)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const s=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:s,copySourceDirectory:n}}function cpDirRecursive(e,t,s,n){return o(this,void 0,void 0,(function*(){if(s>=255)return;s++;yield mkdirP(t);const r=yield l.readdir(e);for(const i of r){const r=`${e}/${i}`;const o=`${t}/${i}`;const a=yield l.lstat(r);if(a.isDirectory()){yield cpDirRecursive(r,o,s,n)}else{yield copyFile(r,o,n)}}yield l.chmod(t,(yield l.stat(e)).mode)}))}function copyFile(e,t,s){return o(this,void 0,void 0,(function*(){if((yield l.lstat(e)).isSymbolicLink()){try{yield l.lstat(t);yield l.unlink(t)}catch(e){if(e.code==="EPERM"){yield l.chmod(t,"0666");yield l.unlink(t)}}const s=yield l.readlink(e);yield l.symlink(s,t,l.IS_WINDOWS?"junction":null)}else if(!(yield l.exists(t))||s){yield l.copyFile(e,t)}}))}},6746:(e,t,s)=>{ /*! * expand-tilde * diff --git a/src/pnpm-store-prune/index.ts b/src/pnpm-store-prune/index.ts index 1c3a85f8..51814eab 100644 --- a/src/pnpm-store-prune/index.ts +++ b/src/pnpm-store-prune/index.ts @@ -4,13 +4,13 @@ import { Inputs } from '../inputs' import { patchPnpmEnv } from '../utils' export function pruneStore(inputs: Inputs) { - if (!inputs.storePrune) { - console.log('Store pruning is disabled, skipping pnpm store prune.') + if (inputs.runInstall.length === 0) { + console.log('No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.') return } - if (inputs.runInstall.length === 0) { - console.log('No install commands were run, skipping pnpm store prune, remember to run it after pnpm install if caching the store.') + if (!inputs.storePrune) { + console.log('Store pruning is disabled, skipping pnpm store prune.') return } From 4f04570f829deef78be28dfeb22477f13d0a6a56 Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 00:58:09 +0100 Subject: [PATCH 7/8] Add store_prune to tests --- .github/workflows/test.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 07bd9ba0..ea93c4e4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -158,6 +158,9 @@ jobs: - --global-dir=./pnpm-global - npm - yarn + store_prune: + - 'true' + - 'false' steps: - uses: actions/checkout@v4 @@ -167,6 +170,7 @@ jobs: with: version: 9.15.5 run_install: ${{ matrix.run_install.value }} + store_prune: ${{ matrix.store_prune }} - name: 'Test: which' run: which pnpm; which pnpx From 35353b8037eed71ddeceabf57d8fbac0b11f8efe Mon Sep 17 00:00:00 2001 From: Oscar Busk Date: Tue, 28 Oct 2025 01:06:40 +0100 Subject: [PATCH 8/8] Add store_prune to run name --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ea93c4e4..deaf12dd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -121,7 +121,7 @@ jobs: fi test_run_install: - name: 'Test with run_install (${{ matrix.run_install.name }}, ${{ matrix.os }})' + name: 'Test with run_install (${{ matrix.run_install.name }}, prune=${{matrix.store_prune}}, ${{ matrix.os }})' runs-on: ${{ matrix.os }}