2021-09-04 06:53:31 +08:00
|
|
|
module.exports=(()=>{var __webpack_modules__={2492:e=>{"use strict";e.exports=JSON.parse('{"anyOf":[{"$ref":"#/definitions/RunInstall"},{"type":"array","items":{"$ref":"#/definitions/RunInstall"}},{"type":["null","boolean"]}],"definitions":{"RunInstall":{"type":"object","properties":{"recursive":{"type":"boolean"},"cwd":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}}}},"$schema":"http://json-schema.org/draft-07/schema#"}')},6152:function(e,r,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});const i=n(2743);const o=s(n(539));const l=s(n(7701));const f=s(n(9875));const c=s(n(4882));async function main(){const e=(0,o.default)();const r=await(0,f.default)(e);console.log("Installation Completed!");(0,l.default)(r);(0,c.default)(e,r)}main().catch(e=>{console.error(e);(0,i.setFailed)(e)})},539:function(e,r,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.getInputs=void 0;const i=n(2743);const o=s(n(9413));const l=n(4019);function getInputs(){const e=(0,o.default)((0,i.getInput)("dest"));let r=(0,i.getInput)("version");if(r==="")r=undefined;const n=(0,l.parseRunInstall)((0,i.getInput)("run_install"));return{version:r,dest:e,runInstall:n}}r.getInputs=getInputs;r.default=getInputs},4019:function(e,r,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:true});r.parseRunInstall=void 0;const i=s(n(1765));const o=n(6070);const l=s(n(6562));const f=n(2743);const c=s(n(2492));function parseRunInstall(e){const r=(0,f.getInput)(e,{required:false});if(r==="")return[];const n=(0,o.load)(r);const s=new l.default({allErrors:true});const a=s.compile(c.default);if(!a(n)){for(const e of a.errors){(0,f.error)(`with.run_install${e.dataPath}: ${e.message}`)}return i.default.exit(1)}if(!n)return[];if(n===true)return[{recursive:true}];if(Array.isArray(n))return n;return[n]}r.parseRunInstall=parseRunInstall},8171:function(e,r,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,r,n,s){if(s===undefined)s=n;Object.defineProperty(e,s,{enumerable:true,get:function(){return r[n]}})}:function(e,r,n,s){if(s===undefined)s=n;e[s]=r[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))s(r,e,n);i(r,e);return r};Object.defineProperty(r,"__esModule",{value:true});r.installFromGithubRelease=void 0;const l=o(n(4986));const f=n(2743);const c=n(9633);const a=o(n(7308));const t=o(n(5747));const p=o(n(1669));const d=p.promisify(t.chmod);async function installFromGithubRelease(e){let r;let n;let s=false;if(process.platform==="win32"){r="pnpm-win-x64.exe";n="pnpm.exe"}else if(process.platform==="darwin"){r="pnpm-macos-x64";n="pnpm"}else{r="pnpm-linux-x64";n="pnpm";s=true}let i;let o;if(e.version&&a.valid(e.version)){i=a.clean(e.version);o=`https://github.com/pnpm/pnpm/releases/download/v${i}/${r}`}else{const n=new c.Octokit;const s=await n.repos.listReleases({owner:"pnpm",repo:"pnpm"});const l=s.data.filter(r=>{if(e.version){const n=a.parse(r.tag_name);return n&&a.satisfies(n,e.version)}else{return a.valid(r.tag_name)&&!r.prerelease&&!r.draft}});if(l.length===0){throw new Error(`Unable to find any pnpm releases matching ${e.version}`)}const f=l.reduce((e,r)=>a.gt(e.tag_name,r.tag_name)?e:r);i=a.clean(f.tag_name);o=f.assets.find(e=>e.name===r).browser_download_url}const t=l.find("pnpm",i);if(!t){(0,f.info)("Downloading "+o);const e=await l.downloadTool(o);if(s){await d(e,493)}return await l.cacheFile(e,n,"pnpm",i)}else{(0,f.info)("Loading from tool cache");return t}}r.installFromGithubRelease=installFromGithubRelease},9875:function(e,r,n){"use strict";var s=this&&thi
|