2022-02-08 20:50:57 +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,p,d){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:true});const n=d(6105);const l=a(d(539));const r=a(d(7701));const i=a(d(9875));const s=a(d(4882));const m=a(d(4424));async function main(){const e=(0,l.default)();const p=(0,n.getState)("is_post");if(p==="true")return(0,m.default)(e);(0,n.saveState)("is_post","true");await(0,i.default)(e);console.log("Installation Completed!");(0,r.default)(e);(0,s.default)(e)}main().catch(e=>{console.error(e);(0,n.setFailed)(e)})},539:function(e,p,d){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:true});p.getInputs=void 0;const n=d(6105);const l=a(d(9413));const r=d(4019);const i={required:true};const s=e=>(0,l.default)((0,n.getInput)(e,i));const m=()=>({version:(0,n.getInput)("version",i),dest:s("dest"),runInstall:(0,r.parseRunInstall)("run_install")});p.getInputs=m;p.default=p.getInputs},4019:function(e,p,d){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:true});p.parseRunInstall=void 0;const n=a(d(1765));const l=d(6070);const r=a(d(6562));const i=d(6105);const s=a(d(2492));const m={required:true};function parseRunInstall(e){const p=(0,l.load)((0,i.getInput)(e,m));const d=new r.default({allErrors:true});const a=d.compile(s.default);if(!a(p)){for(const e of a.errors){(0,i.error)(`with.run_install${e.dataPath}: ${e.message}`)}return n.default.exit(1)}if(!p)return[];if(p===true)return[{recursive:true}];if(Array.isArray(p))return p;return[p]}p.parseRunInstall=parseRunInstall},9875:function(e,p,d){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:true});p.install=p.runSelfInstaller=void 0;const n=d(6105);const l=a(d(7529));p.runSelfInstaller=l.default;async function install(e){(0,n.startGroup)("Running self-installer...");const p=await(0,l.default)(e);(0,n.endGroup)();if(p){return(0,n.setFailed)(`Something went wrong, self-installer exits with code ${p}`)}}p.install=install;p.default=install},7529:function(e,p,d){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(p,"__esModule",{value:true});p.runSelfInstaller=void 0;const n=d(6105);const l=d(3129);const r=d(1765);const i=a(d(5622));const s=d(4982);const m=a(d(6015));async function runSelfInstaller(e){const{version:p,dest:d}=e;const a=p?`pnpm@${p}`:"pnpm";const f=i.default.join(d,"package.json");await(0,s.remove)(d);await(0,s.ensureFile)(f);await(0,s.writeFile)(f,JSON.stringify({private:true}));const v=(0,l.spawn)(r.execPath,["-","install",a,"--no-lockfile"],{cwd:d,stdio:["pipe","inherit","inherit"]});const c=await(0,m.default)("https://pnpm.io/pnpm.js");c.body.pipe(v.stdin);const o=await new Promise((e,p)=>{v.on("error",p);v.on("close",e)});if(o===0){const e=i.default.join(d,"node_modules/.bin");(0,n.addPath)(e);(0,n.exportVariable)("PNPM_HOME",e)}return o}p.runSelfInstaller=runSelfInstaller;p.default=runSelfInstaller},7701:(e,p,d)=>{"use strict";Object.defineProperty(p,"__esModule",{value:true});p.setOutputs=void 0;const a=d(6105);const n=d(6656);function setOutputs(e){const p=(0,n.getBinDest)(e);(0,a.addPath)(p);(0,a.setOutput)("dest",e.dest);(0,a.setOutput)("bin_dest",p)}p.setOutputs=setOutputs;p.default=setOutputs},4882:(e,p,d)=>{"use strict";Object.defineProperty(p,"__esModule",{value:true});p.runPnpmInstall=void 0;const a=d(3129);const n=d(610
|