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