2021-03-23 04:43:49 +00: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#"}')},6011:function(e,n,f){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});const l=f(6832);const s=r(f(8527));const v=r(f(3406));const c=r(f(9282));const p=r(f(6866));const g=r(f(2726));async function main(){const e=s.default();const n=l.getState("is_post");if(n==="true")return g.default(e);l.saveState("is_post","true");await c.default(e);console.log("Installation Completed!");v.default(e);p.default(e)}main().catch(e=>{console.error(e);l.setFailed(e)})},8527:function(e,n,f){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.getInputs=void 0;const l=f(6832);const s=r(f(4010));const v=f(986);const c={required:true};const p=e=>s.default(l.getInput(e,c));const g=()=>({version:l.getInput("version",c),dest:p("dest"),binDest:p("bin_dest"),registry:l.getInput("registry",c),runInstall:v.parseRunInstall("run_install")});n.getInputs=g;n.default=n.getInputs},986:function(e,n,f){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.parseRunInstall=void 0;const l=r(f(1765));const s=f(9520);const v=r(f(8469));const c=f(6832);const p=r(f(2492));const g={required:true};function parseRunInstall(e){const n=s.load(c.getInput(e,g));const f=new v.default({allErrors:true});const r=f.compile(p.default);if(!r(n)){for(const e of r.errors){c.error(`with.run_install${e.dataPath}: ${e.message}`)}return l.default.exit(1)}if(!n)return[];if(n===true)return[{recursive:true}];if(Array.isArray(n))return n;return[n]}n.parseRunInstall=parseRunInstall},9282:function(e,n,f){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:true});n.install=n.runSelfInstaller=void 0;const l=f(6832);const s=r(f(7388));n.runSelfInstaller=s.default;async function install(e){l.startGroup("Running self-installer...");const n=await s.default(e);l.endGroup();if(n){return l.setFailed(`Something does wrong, self-installer exits with code ${n}`)}}n.install=install;n.default=install},7388:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.runSelfInstaller=void 0;const r=f(3129);const l=f(1765);const s=f(3189);async function runSelfInstaller(e){const n=r.spawn(l.execPath,{env:{PNPM_VERSION:e.version,PNPM_DEST:e.dest,PNPM_BIN_DEST:e.binDest,PNPM_REGISTRY:e.registry},stdio:["pipe","inherit","inherit"]});const f=await s.downloadSelfInstaller();f.body.pipe(n.stdin);return new Promise((e,f)=>{n.on("error",f);n.on("close",e)})}n.runSelfInstaller=runSelfInstaller;n.default=runSelfInstaller},3406:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.setOutputs=void 0;const r=f(6832);function setOutputs(e){r.addPath(e.binDest);r.setOutput("dest",e.dest);r.setOutput("bin_dest",e.binDest)}n.setOutputs=setOutputs;n.default=setOutputs},6866:(e,n,f)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});n.runPnpmInstall=void 0;const r=f(3129);const l=f(6832);const s=f(1630);function runPnpmInstall(e){const n=s.patchPnpmEnv(e);for(const f of e.runInstall){const e=["install"];if(f.recursive)e.unshift("recursive");if(f.args)e.push(...f.args);const s=["pnpm",...e].join(" ");l.startGroup(`Running ${s}...`);const{error:v,status:c}=r.spawnSync("pnpm",e,{stdio:"inherit",cwd:f.cwd,shell:true,env:n});l.endGroup();if(v){l.setFailed(v);continue}if(c){l.setFailed(`Command ${s} (cwd: ${f.cwd}) exits with status ${c}`);continue}}}n.runPnpmInstall
|