mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-24 20:51:06 +07:00
7f1cfc01ec
Update Node.js dependencies Migrate eslint config to a mjs file Fix imports in tests Bump to Node.js 20.x in workflows
1 line
90 KiB
JavaScript
1 line
90 KiB
JavaScript
(()=>{var e={472:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.addINIValuesUnix=addINIValuesUnix;t.addINIValuesWindows=addINIValuesWindows;t.addINIValues=addINIValues;const o=s(r(277));async function addINIValuesUnix(e){const t=await o.CSVArray(e);let r="";await o.asyncForEach(t,(async function(e){r+="\n"+await o.addLog("$tick",e,"Added to php.ini","linux")}));return'echo "'+t.join("\n")+'" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1'+r}async function addINIValuesWindows(e){const t=await o.CSVArray(e);let r="\n";await o.asyncForEach(t,(async function(e){r+=await o.addLog("$tick",e,"Added to php.ini","win32")+"\n"}));return'Add-Content "$php_dir\\php.ini" "'+t.join("\n")+'"'+r}async function addINIValues(e,t,r=false){let n="\n";switch(r){case true:n+=await o.stepLog("Add php.ini values",t)+await o.suppressOutput(t)+"\n";break;case false:default:n+=await o.stepLog("Add php.ini values",t)+"\n";break}switch(t){case"win32":return n+await addINIValuesWindows(e);case"darwin":case"linux":return n+await addINIValuesUnix(e);default:return await o.log("Platform "+t+" is not supported",t,"error")}}},524:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.checkXdebugError=checkXdebugError;t.addCoverageXdebug=addCoverageXdebug;t.addCoveragePCOV=addCoveragePCOV;t.disableCoverage=disableCoverage;t.addCoverage=addCoverage;const o=s(r(277));const a=s(r(252));const c=s(r(472));async function checkXdebugError(e,t){if(/^5\.[3-6]$|^7\.[0-1]$/.test(t)&&e=="xdebug3"||/^8\.[0-9]$/.test(t)&&e=="xdebug2"){return e+" is not supported on PHP "+t}return""}async function addCoverageXdebug(e,t,r,n){let i="\n";const s=await checkXdebugError(e,t);if(!s){i+=await a.addExtension(":pcov:false",t,r,true)+n;e=e=="xdebug3"?"xdebug":e;i+=await a.addExtension(e,t,r,true)+n;i+=await o.setVariable("xdebug_version","php -r \"echo phpversion('xdebug');\"",r);i+=await o.getCommand(r,"extension_log")+'xdebug "Xdebug $xdebug_version enabled as coverage driver"'}else{i+=await o.addLog("$cross",e,s,r)}return i}async function addCoveragePCOV(e,t,r){let n="\n";switch(true){default:n+=await a.addExtension(":xdebug:false",e,t,true)+r;n+=await a.addExtension("pcov",e,t,true)+r;n+=await c.addINIValues("pcov.enabled=1",t,true)+"\n";n+=await o.setVariable("pcov_version","php -r \"echo phpversion('pcov');\"",t);n+=await o.getCommand(t,"extension_log")+'pcov "PCOV $pcov_version enabled as coverage driver"';break;case/5\.[3-6]|7\.0/.test(e):n+=await o.addLog("$cross","pcov","PHP 7.1 or newer is required",t);break}return n}async function disableCoverage(e,t,r){let n="\n";n+=await a.addExtension(":pcov:false",e,t,true)+r;n+=await a.addExtension(":xdebug:false",e,t,true)+r;n+=await o.addLog("$tick","none","Disabled Xdebug and PCOV",t);return n}async function addCoverage(e,t,r){e=e.toLowerCase();const n="\n"+await o.stepLog("Setup Coverage",r);const i=await o.suppressOutput(r)+"\n";switch(e){case"pcov":return n+await addCoveragePCOV(t,r,i);case"xdebug":case"xdebug2":case"xdebug3":return n+await addCoverageXdebug(e,t,r,i);case"none":return n+await disableCoverage(t,r,i);default:return""}}},252:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.addExtensionDarwin=addExtensionDarwin;t.addExtensionWindows=addExtensionWindows;t.addExtensionLinux=addExtensionLinux;t.addExtension=addExtension;const o=s(r(277));async function addExtensionDarwin(e,t){const r=await o.extensionArray(e);let n="\n";let i="";await o.asyncForEach(r,(async function(e){const r=t+e;const[s,a]=e.split("-");const c=await o.getExtensionPrefix(s);switch(true){case/^:/.test(s):i+="\ndisable_extension"+s.replace(/:/g," ");return;case/^none$/.test(s):n+="\ndisable_all_shared";return;case/.+-.+\/.+@.+/.test(e):n+=await o.parseExtensionSource(e,c);return;case/^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(r):case/^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(r):case/^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(e):case/^(5\.[3-6]|7\.[0-4]|8\.[0-2])ioncube$/.test(r):case/(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-3])phalcon5?/.test(r):case/(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(r):case/^(7\.[0-4]|8\.[0-3])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(r):n+=await o.customPackage(s,"extensions",e,"darwin");return;case/.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(e):n+=await o.joins("\nadd_unstable_extension",s,a,c);return;case/.+-\d+(\.\d+\.\d+.*)?/.test(e):n+=await o.joins("\nadd_pecl_extension",s,a,c);return;case/(5\.[3-6]|7\.0)pcov/.test(r):n+=await o.getUnsupportedLog("pcov",t,"darwin");return;case/(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|snmp|ssh2|swoole|uuid|vld|xdebug|xdebug2|yaml|zmq)/.test(r):case/(?<!5\.[3-6])(ds|v8js)/.test(r):case/(5\.6|7\.[0-4])(propro|lua)/.test(r):case/(?<!5\.[3-6]|7\.0)pcov/.test(r):case/(?<!5\.[3-6])(ast|vips|xlswriter)/.test(r):n+=await o.joins("\nadd_brew_extension",s,c);return;case/^sqlite$/.test(e):e="sqlite3";break;default:break}n+=await o.joins("\nadd_extension",e,c)}));return n+i}async function addExtensionWindows(e,t){const r=await o.extensionArray(e);let n="\n";let i="";await o.asyncForEach(r,(async function(e){const[r,s]=e.split("-");const a=t+e;let c;switch(true){case/^:/.test(r):i+="\nDisable-Extension"+r.replace(/:/g," ");break;case/^none$/.test(r):n+="\nDisable-AllShared";break;case/^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(a):case/^pdo_oci$|^oci8$|^pdo_firebird$/.test(e):case/^(5\.[3-6]|7\.[0-4]|8\.[0-2])ioncube$/.test(a):case/^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-3])phalcon5?$/.test(a):case/^(7\.[1-4]|8\.1)(pecl_)?http/.test(a):case/(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(a):case/^(7\.[0-4]|8\.[0-3])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(a):n+=await o.customPackage(r,"extensions",e,"win32");return;case/.+-(stable|beta|alpha|devel|snapshot)/.test(e):n+=await o.joins("\nAdd-Extension",r,s.replace("stable",""));break;case/.+-.+\/.+@.+/.test(e):n+=await o.getUnsupportedLog(e,t,"win32");break;case/.+-\d+\.\d+\.\d+[a-zA-Z]+\d*/.test(e):c=/.+-(\d+\.\d+\.\d+)([a-zA-Z]+)\d*/.exec(a);n+=await o.joins("\nAdd-Extension",r,c[2].replace("preview","devel"),c[1]);break;case/.+-\d+(\.\d+\.\d+.*)?/.test(e):n+=await o.joins("\nAdd-Extension",r,"stable",s);break;case/7\.[2-4]xdebug2/.test(a):n+="\nAdd-Extension xdebug stable 2.9.8";break;case/(5\.[3-6]|7\.0)pcov/.test(a):n+=await o.getUnsupportedLog("pcov",t,"win32");break;case/^5\.[3-6](?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(a):n+="\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd";break;case/(?<!5\.[3-6])(?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(a):n+="\nAdd-Extension mysqli\nAdd-Extension mysqlnd";break;case/^sqlite$/.test(e):e="sqlite3";n+=await o.joins("\nAdd-Extension",e);break;default:n+="\nAdd-Extension "+e;break}}));return n+i}async function addExtensionLinux(e,t){const r=await o.extensionArray(e);let n="\n";let i="";await o.asyncForEach(r,(async function(e){const r=t+e;const[s,a]=e.split(/-(.+)/).filter(Boolean);const c=await o.getExtensionPrefix(s);switch(true){case/^:/.test(s):i+="\ndisable_extension"+s.replace(/:/g," ");return;case/^none$/.test(s):n+="\ndisable_all_shared";return;case/.+-.+\/.+@.+/.test(e):n+=await o.parseExtensionSource(e,c);return;case/^(7\.4|8\.[0-3])relay(-v?\d+\.\d+\.\d+)?$/.test(r):case/^(5\.[3-6]|7\.[0-4]|8\.[0-3])blackfire(-\d+\.\d+\.\d+)?$/.test(r):case/^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(r):case/^couchbase|^event|^gearman$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(e):case/(?<!5\.[3-5])intl-\d+\.\d+$/.test(r):case/^(5\.[3-6]|7\.[0-4]|8\.[0-2])ioncube$/.test(r):case/^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-3])phalcon5?$/.test(r):case/(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(r):case/^(7\.[0-4]|8\.[0-3])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(r):n+=await o.customPackage(s,"extensions",e,"linux");return;case/.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(e):n+=await o.joins("\nadd_unstable_extension",s,a,c);return;case/.+-\d+(\.\d+\.\d+.*)?/.test(e):n+=await o.joins("\nadd_pecl_extension",s,a,c);return;case/(5\.[3-6]|7\.0)pcov/.test(r):n+=await o.getUnsupportedLog("pcov",t,"linux");return;case/^7\.[2-4]xdebug2$/.test(r):n+=await o.joins("\nadd_pecl_extension","xdebug","2.9.8",c);return;case/^pdo[_-].+/.test(e):e=e.replace(/pdo[_-]|3/,"");n+="\nadd_pdo_extension "+e;return;case/^sqlite$/.test(e):e="sqlite3";break;default:break}n+=await o.joins("\nadd_extension",e,c)}));return n+i}async function addExtension(e,t,r,n=false){const i=await o.stepLog("Setup Extensions",r);let s="\n";switch(n){case true:s+=i+await o.suppressOutput(r);break;case false:default:s+=i;break}switch(r){case"win32":return s+await addExtensionWindows(e,t);case"darwin":return s+await addExtensionDarwin(e,t);case"linux":return s+await addExtensionLinux(e,t);default:return await o.log("Platform "+r+" is not supported",r,"error")}}},356:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.fetch=fetch;const o=s(r(692));const a=s(r(16));async function fetch(e,t,r=5){const n=new Promise((n=>{const i=new a.URL(e);const s={"User-Agent":`Mozilla/5.0 (${process.platform} ${process.arch}) setup-php`};if(t){s.authorization="Bearer "+t}const c={hostname:i.hostname,path:i.pathname,headers:s,agent:new o.Agent({keepAlive:false})};const u=o.get(c,(e=>{if(e.statusCode===200){let t="";e.setEncoding("utf8");e.on("data",(e=>t+=e));e.on("end",(()=>n({data:`${t}`})))}else if([301,302,303,307,308].includes(e.statusCode)){if(r>0&&e.headers.location){fetch(e.headers.location,t,r--).then(n)}else{n({error:`${e.statusCode}: Redirect error`})}}else{n({error:`${e.statusCode}: ${e.statusMessage}`})}}));u.end()}));return await n}},755:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getScript=getScript;t.run=run;const a=o(r(928));const c=o(r(896));const u=r(236);const d=s(r(484));const l=s(r(472));const f=s(r(524));const p=s(r(252));const h=s(r(159));const m=s(r(277));async function getScript(e){const t="https://setup-php.com/sponsor";const r=e+await m.scriptExtension(e);const n=a.default.join(__dirname,"../src/scripts",r);const i=n.replace(e,"run");process.env["fail_fast"]=await m.getInput("fail-fast",false);const s=await m.getInput("extensions",false);const o=await m.getInput("ini-values",false);const u=await m.getInput("coverage",false);const d=await m.getInput("tools",false);const v=await m.parseVersion(await m.readPHPVersion());const g=await m.parseIniFile(await m.getInput("ini-file",false));let w=await m.joins(".",n,v,g);if(s){w+=await p.addExtension(s,v,e)}w+=await h.addTools(d,v,e);if(u){w+=await f.addCoverage(u,v,e)}if(o){w+=await l.addINIValues(o,e)}w+="\n"+await m.stepLog(`Sponsor setup-php`,e);w+="\n"+await m.addLog("$tick","setup-php",t,e);c.default.writeFileSync(i,w,{mode:493});return i}async function run(){const e=process.platform;const t=await m.scriptTool(e);const r=await getScript(e);await(0,u.exec)(t+r)}(async()=>{await run()})().catch((e=>{d.setFailed(e.message)}))},75:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.search=search;const o=s(r(26));const a=s(r(356));async function search(e,t){const r=await a.fetch(`https://repo.packagist.org/p2/${e}.json`);if(r.error||r.data==="[]"){return null}const n=JSON.parse(r["data"]);if(n&&n.packages){const r=n.packages[e];r.sort(((e,t)=>o.compareVersions(t.version,e.version)));const i=r.find((e=>{if(e?.require?.php){return e?.require?.php.split("|").some((e=>e&&o.satisfies(t+".0",e)))}return false}));return i?i.version:null}return null}},159:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.functionRecord=void 0;t.getSemverVersion=getSemverVersion;t.getLatestVersion=getLatestVersion;t.getVersion=getVersion;t.getRelease=getRelease;t.filterList=filterList;t.getUrl=getUrl;t.getPharUrl=getPharUrl;t.addArchive=addArchive;t.addPackage=addPackage;t.addBlackfirePlayer=addBlackfirePlayer;t.addCastor=addCastor;t.addComposer=addComposer;t.addDeployer=addDeployer;t.addDevTools=addDevTools;t.addPECL=addPECL;t.addPhing=addPhing;t.addPhive=addPhive;t.addPHPUnitTools=addPHPUnitTools;t.addWPCLI=addWPCLI;t.getData=getData;t.addTools=addTools;const a=o(r(928));const c=o(r(896));const u=s(r(356));const d=s(r(75));const l=s(r(277));async function getSemverVersion(e){const t=e["version_prefix"]+e["version"];const r=`https://api.github.com/repos/${e["repository"]}/git/matching-refs/tags%2F${t}.`;const n=await l.readEnv("GITHUB_TOKEN")||await l.readEnv("COMPOSER_TOKEN");const i=await u.fetch(r,n);if(i.error||i.data==="[]"){e["error"]=i.error??`No version found with prefix ${t}.`;return e["version"]}else{const e=JSON.parse(i["data"]).reverse();const t=e.find((e=>/.*\d+.\d+.\d+$/.test(e["ref"])));const r=(t||e[0])["ref"].split("/").pop();return r.replace(/^v(\d)/,"$1")}}async function getLatestVersion(e){if(!e["version"]&&e["fetch_latest"]==="false"){return"latest"}const t=await u.fetch(`${e["github"]}/${e["repository"]}/releases.atom`);if(t["data"]){const e=[...t["data"].matchAll(/releases\/tag\/([a-zA-Z]*)?(\d+.\d+.\d+)"/g)].map((e=>e[2]));return e.sort(((e,t)=>e.localeCompare(t,undefined,{numeric:true}))).pop()||"latest"}return"latest"}async function getVersion(e,t){const r=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;const n=/^composer:(stable|preview|snapshot|[1|2])$/;const i=/[><=^~]+.*/;const s=/^\d+(\.\d+)?$/;t["version"]=e.replace(/v?(\d)/,"$1").replace(/\.x/,"");switch(true){case n.test(t["release"]):case r.test(t["version"]):case i.test(t["version"])&&t["type"]==="composer":return t["version"];case s.test(t["version"])&&t["type"]==="composer":t["release"]=`${t["tool"]}:${t["version"]}.*`;return`${t["version"]}.*`;case t["repository"]&&s.test(t["version"]):return await getSemverVersion(t);default:return t["version"].replace(/[><=^~]*/,"")}}async function getRelease(e,t){e=e.includes("/")?e.split("/")[1]:e;return e.includes(":")?[t["tool"],e.split(":")[1]].join(":"):t["tool"]}async function filterList(e){const t=/^composer($|:.*)/;const r=/^composer:?($|preview$|snapshot$|v?\d+(\.\d+)?$|v?\d+\.\d+\.\d+[\w-]*$)/;const n=e.filter((e=>r.test(e)));let i="composer";e=e.filter((e=>!t.test(e)));switch(true){case n[0]==undefined:break;default:i=n[n.length-1].replace(/v(\d\S*)/,"$1");break}e.unshift(i);return e}async function getUrl(e){if(e["version"]==="latest"){return[e["domain"],e["repository"],e["prefix"],e["version"],e["verb"],e["tool"]+e["extension"]].filter(Boolean).join("/")}else{return[e["domain"],e["repository"],e["prefix"],e["verb"],e["version_prefix"]+e["version"],e["tool"]+e["extension"]].filter(Boolean).join("/")}}async function getPharUrl(e){if(e["version"]==="latest"){return e["domain"]+"/"+e["tool"]+".phar"}else{return e["domain"]+"/"+e["tool"]+"-"+e["version_prefix"]+e["version"]+".phar"}}async function addArchive(e){return await l.getCommand(e["os"],"tool")+await l.joins(e["url"],e["tool"],e["version_parameter"])}async function addPackage(e){const t=await l.getCommand(e["os"],"composer_tool");const r=e["repository"].split("/");const n=await l.joins(r[1],e["release"],r[0]+"/",e["scope"]);return t+n}async function addBlackfirePlayer(e){switch(e["os"]){case"win32":return await l.addLog("$cross",e["tool"],e["tool"]+" is not a windows tool","win32");default:if(e["version"]=="latest"){if(/5\.[5-6]|7\.0/.test(e["php_version"])){e["version"]="1.9.3"}else if(/7\.[1-4]|8\.0/.test(e["php_version"])){e["version"]="1.22.0"}}e["url"]=await getPharUrl(e);return addArchive(e)}}async function addCastor(e){e["tool"]="castor."+e["os"].replace("win32","windows")+"-amd64";e["url"]=await getUrl(e);e["tool"]="castor";e["version_parameter"]=c.default.existsSync("castor.php")?e["version_parameter"]:"";return await addArchive(e)}async function addComposer(e){const t=e["version"].replace("latest","stable");const r=e["github"];const n=e["domain"];const i="https://dl.cloudsmith.io";const s=`composer-${e["php_version"]}-${t}.phar`;const o=`${r}/shivammathur/composer-cache/releases/latest/download/${s}`;const a=`${i}/public/shivammathur/composer-cache/raw/files/${s}`;const c=`${n}/download/latest-2.2.x/composer.phar`;const u=/^5\.[3-6]$|^7\.[0-1]$/.test(e["php_version"]);const d=`${n}/composer-${t}.phar`;let f=`${o},${a}`;let p=`${n}/composer.phar`;switch(true){case/^snapshot$/.test(t):p=u?c:p;break;case/^preview$|^2$/.test(t):p=u?c:d;break;case/^1$/.test(t):p=d;break;case/^\d+\.\d+\.\d+[\w-]*$/.test(e["version"]):f=`${r}/${e["repository"]}/releases/download/${e["version"]}/composer.phar`;p=d;break;default:p=u?c:d}const h=await l.readEnv("NO_TOOLS_CACHE")!=="true";e["url"]=h?`${f},${p}`:p;e["version_parameter"]=e["version"];return await addArchive(e)}async function addDeployer(e){if(e["version"]==="latest"){e["url"]=e["domain"]+"/deployer.phar"}else{const t=await u.fetch("https://deployer.org/manifest.json");const r=JSON.parse(t.data);const n=Object.keys(r).find((t=>r[t]["version"]===e["version"]));if(n){e["url"]=r[n]["url"]}else{return await l.addLog("$cross","deployer","Version missing in deployer manifest",e["os"])}}return await addArchive(e)}async function addDevTools(e){switch(e["os"]){case"linux":case"darwin":return"add_devtools "+e["tool"];case"win32":return await l.addLog("$tick",e["tool"],e["tool"]+" is not a windows tool","win32");default:return await l.log("Platform "+e["os"]+" is not supported",e["os"],"error")}}async function addPECL(e){return await l.getCommand(e["os"],"pecl")}async function addPhing(e){e["url"]=e["domain"]+"/get/phing-"+e["version"]+e["extension"];if(e["version"]!="latest"){[e["prefix"],e["verb"]]=["releases","download"];e["domain"]=e["github"];e["extension"]="-"+e["version"]+e["extension"];e["url"]+=","+await getUrl(e)}return await addArchive(e)}async function addPhive(e){switch(true){case/5\.[3-5]/.test(e["php_version"]):return await l.addLog("$cross","phive","Phive is not supported on PHP "+e["php_version"],e["os"]);case/5\.6|7\.0/.test(e["php_version"]):e["version"]="0.12.1";break;case/7\.1/.test(e["php_version"]):e["version"]="0.13.5";break;case/7\.2/.test(e["php_version"]):e["version"]="0.14.5";break;case/^latest$/.test(e["version"]):e["version"]=await getLatestVersion(e);break}e["extension"]="-"+e["version"]+e["extension"];e["url"]=await getUrl(e);return await addArchive(e)}async function addPHPUnitTools(e){if(e["version"]==="latest"){e["version"]=await d.search(e["packagist"],e["php_version"])??"latest"}e["url"]=await getPharUrl(e);return await addArchive(e)}async function addWPCLI(e){if(e["version"]==="latest"){e["uri"]="wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true";e["url"]=[e["domain"],e["uri"]].join("/")}else{e["extension"]="-"+e["version"]+e["extension"];e["url"]=await getUrl(e)}return await addArchive(e)}async function getData(e,t,r){const n=a.default.join(__dirname,"../src/configs/tools.json");const i=c.default.readFileSync(n,"utf8");const s=JSON.parse(i);e=e.replace(/\s+/g,"");const o=e.split(":");const u=o[0];const d=o[1];let l;if(Object.keys(s).includes(u)){l=s[u];l["tool"]=u}else{const e=Object.keys(s).find((e=>s[e]["alias"]==u));if(e){l=s[e];l["tool"]=e}else{l={tool:u.split("/")[1],repository:u,type:"composer"};l=!u.includes("/")?{tool:u}:l}}l["github"]="https://github.com";l["domain"]??=l["github"];l["extension"]??=".phar";l["os"]=r;l["php_version"]=t;l["packagist"]??=l["repository"];l["prefix"]=l["github"]===l["domain"]?"releases":"";l["verb"]=l["github"]===l["domain"]?"download":"";l["fetch_latest"]??="false";l["scope"]??="global";l["version_parameter"]=JSON.stringify(l["version_parameter"])||"";l["version_prefix"]??="";l["release"]=await getRelease(e,l);l["version"]=d?await getVersion(d,l):await getLatestVersion(l);return l}t.functionRecord={castor:addCastor,composer:addComposer,deployer:addDeployer,dev_tools:addDevTools,phive:addPhive,blackfire_player:addBlackfirePlayer,pecl:addPECL,phing:addPhing,phpunit:addPHPUnitTools,phpcpd:addPHPUnitTools,wp_cli:addWPCLI};async function addTools(e,r,n){let i="\n";if(e==="none"){return""}else{i+=await l.stepLog("Setup Tools",n)}const s=await filterList(await l.CSVArray(e));await l.asyncForEach(s,(async function(e){const s=await getData(e,r,n);i+="\n";switch(true){case s["error"]!==undefined:i+=await l.addLog("$cross",s["tool"],s["error"],s["os"]);break;case"phar"===s["type"]:s["url"]=await getUrl(s);i+=await addArchive(s);break;case"composer"===s["type"]:i+=await addPackage(s);break;case"custom-package"===s["type"]:i+=await l.customPackage(s["tool"].split("-")[0],"tools",s["version"],s["os"]);break;case"custom-function"===s["type"]:i+=await t.functionRecord[s["function"]](s);break;case/^none$/.test(s["tool"]):break;default:i+=await l.addLog("$cross",s["tool"],"Tool "+s["tool"]+" is not supported",s["os"]);break}}));return i}},277:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.readEnv=readEnv;t.getInput=getInput;t.getManifestURL=getManifestURL;t.parseVersion=parseVersion;t.parseIniFile=parseIniFile;t.asyncForEach=asyncForEach;t.color=color;t.log=log;t.stepLog=stepLog;t.addLog=addLog;t.extensionArray=extensionArray;t.CSVArray=CSVArray;t.getExtensionPrefix=getExtensionPrefix;t.suppressOutput=suppressOutput;t.getUnsupportedLog=getUnsupportedLog;t.getCommand=getCommand;t.joins=joins;t.scriptExtension=scriptExtension;t.scriptTool=scriptTool;t.customPackage=customPackage;t.parseExtensionSource=parseExtensionSource;t.readPHPVersion=readPHPVersion;t.setVariable=setVariable;const a=o(r(896));const c=s(r(928));const u=s(r(484));const d=s(r(356));async function readEnv(e){const t=e.toLowerCase();const r=e.toUpperCase();return process.env[e]||process.env[t]||process.env[r]||process.env[t.replace("_","-")]||process.env[r.replace("_","-")]||""}async function getInput(e,t){const r=u.getInput(e);const n=await readEnv(e);switch(true){case r!="":return r;case r==""&&n!="":return n;case r==""&&n==""&&t:throw new Error(`Input required and not supplied: ${e}`);default:return""}}async function getManifestURL(){return"https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json"}async function parseVersion(e){switch(true){case/^(latest|lowest|highest|nightly|\d+\.x)$/.test(e):return JSON.parse((await d.fetch(await getManifestURL()))["data"])[e];default:switch(true){case e.length>1:return e.slice(0,3);default:return e+".0"}}}async function parseIniFile(e){switch(true){case/^(production|development|none)$/.test(e):return e;case/php\.ini-(production|development)$/.test(e):return e.split("-")[1];default:return"production"}}async function asyncForEach(e,t){for(let r=0;r<e.length;r++){await t(e[r],r,e)}}async function color(e){switch(e){case"error":return"31";default:case"success":return"32";case"warning":return"33"}}async function log(e,t,r){switch(t){case"win32":return'printf "\\033['+await color(r)+";1m"+e+' \\033[0m"';case"linux":case"darwin":default:return'echo "\\033['+await color(r)+";1m"+e+'\\033[0m"'}}async function stepLog(e,t){switch(t){case"win32":return'Step-Log "'+e+'"';case"linux":case"darwin":return'step_log "'+e+'"';default:return await log("Platform "+t+" is not supported",t,"error")}}async function addLog(e,t,r,n){switch(n){case"win32":return'Add-Log "'+e+'" "'+t+'" "'+r+'"';case"linux":case"darwin":return'add_log "'+e+'" "'+t+'" "'+r+'"';default:return await log("Platform "+n+" is not supported",n,"error")}}async function extensionArray(e){switch(e){case"":case" ":return[];default:return[e.match(/(^|,\s?)none(\s?,|$)/)?"none":"",...e.split(",").map((function(e){if(/.+-.+\/.+@.+/.test(e)){return e}return e.trim().toLowerCase().replace(/^(:)?(php[-_]|none|zend )|(-[^-]*)-/,"$1$3")}))].filter(Boolean)}}async function CSVArray(e){switch(e){case"":case" ":return[];default:return e.split(/,(?=(?:(?:[^"']*["']){2})*[^"']*$)/).map((function(e){return e.trim().replace(/^["']|["']$|(?<==)["']/g,"").replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/,"='$1'").replace(/=(.*?)(=.*)/,"='$1$2'").replace(/:\s*["'](.*?)/g,":$1")})).filter(Boolean)}}async function getExtensionPrefix(e){switch(true){default:return"extension";case/xdebug([2-3])?$|opcache|ioncube|eaccelerator/.test(e):return"zend_extension"}}async function suppressOutput(e){switch(e){case"win32":return" >$null 2>&1";case"linux":case"darwin":return" >/dev/null 2>&1";default:return await log("Platform "+e+" is not supported",e,"error")}}async function getUnsupportedLog(e,t,r){return"\n"+await addLog("$cross",e,[e,"is not supported on PHP",t].join(" "),r)+"\n"}async function getCommand(e,t){switch(e){case"linux":case"darwin":return"add_"+t+" ";case"win32":return"Add-"+t.split("_").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join("")+" ";default:return await log("Platform "+e+" is not supported",e,"error")}}async function joins(...e){return[...e].join(" ")}async function scriptExtension(e){switch(e){case"win32":return".ps1";case"linux":case"darwin":return".sh";default:return await log("Platform "+e+" is not supported",e,"error")}}async function scriptTool(e){switch(e){case"win32":return"pwsh ";case"linux":case"darwin":return"bash ";default:return await log("Platform "+e+" is not supported",e,"error")}}async function customPackage(e,t,r,n){const i=e.replace(/\d+|(pdo|pecl)[_-]/,"");const s=await scriptExtension(n);const o=c.join(__dirname,"../src/scripts/"+t+"/"+i+s);const a=await getCommand(n,i);return"\n. "+o+"\n"+a+r}async function parseExtensionSource(e,t){const r=/(\w+)-(\w+:\/\/.{1,253}(?:[.:][^:/\s]{2,63})+\/)?([\w.-]+)\/([\w.-]+)@(.+)/;const n=r.exec(e);n[2]=n[2]?n[2].slice(0,-1):"https://github.com";return await joins("\nadd_extension_from_source",...n.splice(1,n.length),t)}async function readPHPVersion(){const e=await getInput("php-version",false);if(e){return e}const t=await getInput("php-version-file",false)||".php-version";if(a.default.existsSync(t)){return a.default.readFileSync(t,"utf8").replace(/[\r\n]/g,"")}else if(t!==".php-version"){throw new Error(`Could not find '${t}' file.`)}const r="composer.lock";if(a.default.existsSync(r)){const e=JSON.parse(a.default.readFileSync(r,"utf8"));if(e["platform-overrides"]&&e["platform-overrides"]["php"]){return e["platform-overrides"]["php"]}}const n="composer.json";if(a.default.existsSync(n)){const e=JSON.parse(a.default.readFileSync(n,"utf8"));if(e["config"]&&e["config"]["platform"]&&e["config"]["platform"]["php"]){return e["config"]["platform"]["php"]}}return"latest"}async function setVariable(e,t,r){switch(r){case"win32":return"\n$"+e+" = "+t+"\n";case"linux":case"darwin":default:return"\n"+e+'="$('+t+')"\n'}}},914:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=s(r(857));const a=r(302);function issueCommand(e,t,r){const n=new Command(e,t,r);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,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${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")}},484:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.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=r(914);const c=r(753);const u=r(302);const d=s(r(857));const l=s(r(928));const f=r(306);var p;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(p||(t.ExitCode=p={}));function exportVariable(e,t){const r=(0,u.toCommandValue)(t);process.env[e]=r;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},r)}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}${l.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const i=getInput(e,t);if(r.includes(i))return true;if(n.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return(0,c.issueFileCommand)("OUTPUT",(0,c.prepareKeyValueMessage)(e,t))}process.stdout.write(d.EOL);(0,a.issueCommand)("set-output",{name:e},(0,u.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,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,a.issueCommand)("warning",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,a.issueCommand)("notice",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+d.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 r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return(0,c.issueFileCommand)("STATE",(0,c.prepareKeyValueMessage)(e,t))}(0,a.issueCommand)("save-state",{name:e},(0,u.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=r(847);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return h.summary}});var m=r(847);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return m.markdownSummary}});var v=r(976);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return v.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return v.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return v.toPlatformPath}});t.platform=s(r(968))},753:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const o=s(r(982));const a=s(r(896));const c=s(r(857));const u=r(302);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!a.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}a.appendFileSync(r,`${(0,u.toCommandValue)(t)}${c.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${o.randomUUID()}`;const n=(0,u.toCommandValue)(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(n.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${c.EOL}${n}${c.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},306:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const i=r(844);const s=r(552);const o=r(484);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new s.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const i=(t=n.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}(0,o.debug)(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);(0,o.setSecret)(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},976:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const o=s(r(928));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},968:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const c=a(r(857));const u=s(r(236));const getWindowsInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield u.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield u.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,r,n;const{stdout:i}=yield u.getExecOutput("sw_vers",undefined,{silent:true});const s=(t=(e=i.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const o=(n=(r=i.match(/ProductName:\s*(.+)/))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:"";return{name:o,version:s}}));const getLinuxInfo=()=>o(void 0,void 0,void 0,(function*(){const{stdout:e}=yield u.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,r]=e.trim().split("\n");return{name:t,version:r}}));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},847:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const i=r(857);const s=r(896);const{access:o,appendFile:a,writeFile:c}=s.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,s.constants.R_OK|s.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${n}>`}return`<${e}${n}>${t}</${e}>`}write(e){return n(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const n=t?c:a;yield n(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return n(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(i.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const i=this.wrap(r,n);return this.addRaw(i).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:n,rowspan:i}=e;const s=t?"th":"td";const o=Object.assign(Object.assign({},n&&{colspan:n}),i&&{rowspan:i});return this.wrap(s,r,o)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:i}=r||{};const s=Object.assign(Object.assign({},n&&{width:n}),i&&{height:i});const o=this.wrap("img",null,Object.assign({src:e,alt:t},s));return this.addRaw(o).addEOL()}addHeading(e,t){const r=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const i=this.wrap(n,e);return this.addRaw(i).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const u=new Summary;t.markdownSummary=u;t.summary=u},302:(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},236:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const a=r(193);const c=s(r(665));function exec(e,t,r){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 i=n[0];t=n.slice(1).concat(t||[]);const s=new c.ToolRunner(i,t,r);return s.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var n,i;return o(this,void 0,void 0,(function*(){let s="";let o="";const c=new a.StringDecoder("utf8");const u=new a.StringDecoder("utf8");const d=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stdout;const l=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stderr;const stdErrListener=e=>{o+=u.write(e);if(l){l(e)}};const stdOutListener=e=>{s+=c.write(e);if(d){d(e)}};const f=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const p=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:f}));s+=c.end();o+=u.end();return{exitCode:p,stdout:s,stderr:o}}))}t.getExecOutput=getExecOutput},665:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const a=s(r(857));const c=s(r(434));const u=s(r(317));const d=s(r(928));const l=s(r(994));const f=s(r(207));const p=r(557);const h=process.platform==="win32";class ToolRunner extends c.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(h){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(h){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(h){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some((e=>e===n))){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return o(this,void 0,void 0,(function*(){if(!f.isRooted(this.toolPath)&&(this.toolPath.includes("/")||h&&this.toolPath.includes("\\"))){this.toolPath=d.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield l.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 r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+a.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield f.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const i=this._getSpawnFileName();const s=u.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));let o="";if(s.stdout){s.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(s.stderr){s.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}s.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));s.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));s.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((r,n)=>{if(o.length>0){this.emit("stdline",o)}if(c.length>0){this.emit("errline",c)}s.removeAllListeners();if(r){t(r)}else{e(n)}}));if(this.options.input){if(!s.stdin){throw new Error("child process missing stdin")}s.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let s=0;s<e.length;s++){const o=e.charAt(s);if(o==='"'){if(!n){r=!r}else{append(o)}continue}if(o==="\\"&&n){append(o);continue}if(o==="\\"&&r){n=true;continue}if(o===" "&&!r){if(i.length>0){t.push(i);i=""}continue}append(o)}if(i.length>0){t.push(i.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()}}},552:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},844:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const a=s(r(611));const c=s(r(692));const u=s(r(988));const d=s(r(770));var l;(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"})(l=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=u.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const h=[l.MovedPermanently,l.ResourceMoved,l.SeeOther,l.TemporaryRedirect,l.PermanentRedirect];const m=[l.BadGateway,l.ServiceUnavailable,l.GatewayTimeout];const v=["OPTIONS","GET","DELETE","HEAD"];const g=10;const w=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,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return 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,r){return o(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return o(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return o(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return o(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,n){return o(this,void 0,void 0,(function*(){return this.request(e,t,r,n)}))}getJson(e,t={}){return o(this,void 0,void 0,(function*(){t[f.Accept]=this._getExistingOrDefaultHeader(t,f.Accept,p.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const i=yield this.post(e,n,r);return this._processResponse(i,this.requestOptions)}))}putJson(e,t,r={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const i=yield this.put(e,n,r);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t,r={}){return o(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[f.Accept]=this._getExistingOrDefaultHeader(r,f.Accept,p.ApplicationJson);r[f.ContentType]=this._getExistingOrDefaultHeader(r,f.ContentType,p.ApplicationJson);const i=yield this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}))}request(e,t,r,n){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let s=this._prepareRequest(e,i,n);const o=this._allowRetries&&v.includes(e)?this._maxRetries+1:1;let a=0;let c;do{c=yield this.requestRaw(s,r);if(c&&c.message&&c.message.statusCode===l.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(c)){e=t;break}}if(e){return e.handleAuthentication(this,s,r)}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(i.protocol==="https:"&&i.protocol!==a.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield c.readBody();if(a.hostname!==i.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}s=this._prepareRequest(e,a,n);c=yield this.requestRaw(s,r);t--}if(!c.message.statusCode||!m.includes(c.message.statusCode)){return c}a+=1;if(a<o){yield c.readBody();yield this._performExponentialBackoff(a)}}while(a<o);return c}))}dispose(){if(this._agent){this._agent.destroy()}this._disposed=true}requestRaw(e,t){return o(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let n=false;function handleResult(e,t){if(!n){n=true;r(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let s;i.on("socket",(e=>{s=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(s){s.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const i=n.parsedUrl.protocol==="https:";n.httpModule=i?c:a;const s=i?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):s;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(n.options)}}return n}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;const r=u.getProxyUrl(e);const n=r&&r.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(this._keepAlive&&!n){t=this._agent}if(t){return t}const i=e.protocol==="https:";let s=100;if(this.requestOptions){s=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:s,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let n;const o=r.protocol==="https:";if(i){n=o?d.httpsOverHttps:d.httpsOverHttp}else{n=o?d.httpOverHttps:d.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:s};t=i?new c.Agent(e):new a.Agent(e);this._agent=t}if(!t){t=i?c.globalAgent:a.globalAgent}if(i&&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=w*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(((r,n)=>o(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const s={statusCode:i,result:null,headers:{}};if(i===l.NotFound){r(s)}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)}s.result=o}s.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(a&&a.length>0){e=a}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=s.result;n(t)}else{r(s)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){return new URL(r)}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}const n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(const e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(n.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},207:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var a;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const c=s(r(896));const u=s(r(928));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,r=false){return o(this,void 0,void 0,(function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return 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=u.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const s of r){e=i+s;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=u.dirname(e);const n=u.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=u.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},994:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const a=r(613);const c=s(r(928));const u=s(r(207));function cp(e,t,r={}){return o(this,void 0,void 0,(function*(){const{force:n,recursive:i,copySourceDirectory:s}=readCopyOptions(r);const o=(yield u.exists(t))?yield u.stat(t):null;if(o&&o.isFile()&&!n){return}const a=o&&o.isDirectory()&&s?c.join(t,c.basename(e)):t;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const d=yield u.stat(e);if(d.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,a,0,n)}}else{if(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,r={}){return o(this,void 0,void 0,(function*(){if(yield u.exists(t)){let n=true;if(yield u.isDirectory(t)){t=c.join(t,c.basename(e));n=yield u.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(c.dirname(t));yield u.rename(e,t)}))}t.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(u.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield u.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 u.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(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(u.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(u.isRooted(e)){const r=yield u.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(c.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){r.push(e)}}}const n=[];for(const i of r){const r=yield u.tryGetExecutablePath(c.join(i,e),t);if(r){n.push(r)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function cpDirRecursive(e,t,r,n){return o(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const i=yield u.readdir(e);for(const s of i){const i=`${e}/${s}`;const o=`${t}/${s}`;const a=yield u.lstat(i);if(a.isDirectory()){yield cpDirRecursive(i,o,r,n)}else{yield copyFile(i,o,n)}}yield u.chmod(t,(yield u.stat(e)).mode)}))}function copyFile(e,t,r){return o(this,void 0,void 0,(function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(t);yield u.unlink(t)}catch(e){if(e.code==="EPERM"){yield u.chmod(t,"0666");yield u.unlink(t)}}const r=yield u.readlink(e);yield u.symlink(r,t,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(t))||r){yield u.copyFile(e,t)}}))}},26:function(e,t){(function(e,r){true?r(t):0})(this,(function(e){"use strict";const t=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;const validateAndParse=e=>{if(typeof e!=="string"){throw new TypeError("Invalid argument expected string")}const r=e.match(t);if(!r){throw new Error(`Invalid argument not valid semver ('${e}' received)`)}r.shift();return r};const isWildcard=e=>e==="*"||e==="x"||e==="X";const tryParse=e=>{const t=parseInt(e,10);return isNaN(t)?e:t};const forceType=(e,t)=>typeof e!==typeof t?[String(e),String(t)]:[e,t];const compareStrings=(e,t)=>{if(isWildcard(e)||isWildcard(t))return 0;const[r,n]=forceType(tryParse(e),tryParse(t));if(r>n)return 1;if(r<n)return-1;return 0};const compareSegments=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=compareStrings(e[r]||"0",t[r]||"0");if(n!==0)return n}return 0};const compareVersions=(e,t)=>{const r=validateAndParse(e);const n=validateAndParse(t);const i=r.pop();const s=n.pop();const o=compareSegments(r,n);if(o!==0)return o;if(i&&s){return compareSegments(i.split("."),s.split("."))}else if(i||s){return i?-1:1}return 0};const compare=(e,t,n)=>{assertValidOperator(n);const i=compareVersions(e,t);return r[n].includes(i)};const r={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};const n=Object.keys(r);const assertValidOperator=e=>{if(typeof e!=="string"){throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`)}if(n.indexOf(e)===-1){throw new Error(`Invalid operator, expected one of ${n.join("|")}`)}};const satisfies=(e,t)=>{t=t.replace(/([><=]+)\s+/g,"$1");if(t.includes("||")){return t.split("||").some((t=>satisfies(e,t)))}else if(t.includes(" - ")){const[r,n]=t.split(" - ",2);return satisfies(e,`>=${r} <=${n}`)}else if(t.includes(" ")){return t.trim().replace(/\s{2,}/g," ").split(" ").every((t=>satisfies(e,t)))}const r=t.match(/^([<>=~^]+)/);const n=r?r[1]:"=";if(n!=="^"&&n!=="~")return compare(e,t,n);const[i,s,o,,a]=validateAndParse(e);const[c,u,d,,l]=validateAndParse(t);const f=[i,s,o];const p=[c,u!==null&&u!==void 0?u:"x",d!==null&&d!==void 0?d:"x"];if(l){if(!a)return false;if(compareSegments(f,p)!==0)return false;if(compareSegments(a.split("."),l.split("."))===-1)return false}const h=p.findIndex((e=>e!=="0"))+1;const m=n==="~"?2:h>1?h:1;if(compareSegments(f.slice(0,m),p.slice(0,m))!==0)return false;if(compareSegments(f.slice(m),p.slice(m))===-1)return false;return true};const validate=e=>typeof e==="string"&&/^[v\d]/.test(e)&&t.test(e);const validateStrict=e=>typeof e==="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(e);e.compare=compare;e.compareVersions=compareVersions;e.satisfies=satisfies;e.validate=validate;e.validateStrict=validateStrict}))},770:(e,t,r)=>{e.exports=r(218)},218:(e,t,r)=>{"use strict";var n=r(278);var i=r(756);var s=r(611);var o=r(692);var a=r(434);var c=r(613);var u=r(23);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,i){var s=toOptions(r,n,i);for(var o=0,a=t.requests.length;o<a;++o){var c=t.requests[o];if(c.host===s.host&&c.port===s.port){t.requests.splice(o,1);c.request.onSocket(e);return}}e.destroy();t.removeSocket(e)}))}u.inherits(TunnelingAgent,a.EventEmitter);TunnelingAgent.prototype.addRequest=function addRequest(e,t,r,n){var i=this;var s=mergeOptions({request:e},i.options,toOptions(t,r,n));if(i.sockets.length>=this.maxSockets){i.requests.push(s);return}i.createSocket(s,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,s)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}d("making CONNECT request");var s=r.request(i);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(i,o,a){s.removeAllListeners();o.removeAllListeners();if(i.statusCode!==200){d("tunneling socket could not be established, statusCode=%d",i.statusCode);o.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(n);return}if(a.length>0){d("got illegal response body from proxy");o.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(n);return}d("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=o;return t(o)}function onError(t){s.removeAllListeners();d("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(n){var s=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):e.host});var a=i.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t<r;++t){var n=arguments[t];if(typeof n==="object"){var i=Object.keys(n);for(var s=0,o=i.length;s<o;++s){var a=i[s];if(n[a]!==undefined){e[a]=n[a]}}}}return e}var d;if(process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)){d=function(){var e=Array.prototype.slice.call(arguments);if(typeof e[0]==="string"){e[0]="TUNNEL: "+e[0]}else{e.unshift("TUNNEL:")}console.error.apply(console,e)}}else{d=function(){}}t.debug=d},613:e=>{"use strict";e.exports=require("assert")},317:e=>{"use strict";e.exports=require("child_process")},982:e=>{"use strict";e.exports=require("crypto")},434:e=>{"use strict";e.exports=require("events")},896:e=>{"use strict";e.exports=require("fs")},611:e=>{"use strict";e.exports=require("http")},692:e=>{"use strict";e.exports=require("https")},278:e=>{"use strict";e.exports=require("net")},857:e=>{"use strict";e.exports=require("os")},928:e=>{"use strict";e.exports=require("path")},193:e=>{"use strict";e.exports=require("string_decoder")},557:e=>{"use strict";e.exports=require("timers")},756:e=>{"use strict";e.exports=require("tls")},16:e=>{"use strict";e.exports=require("url")},23:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(755);module.exports=r})(); |