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QAAQ,QAAU","file":"/npm/@ray-core/cli@0.4.12/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@ray-core/cli@0.4.12/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    var desc = Object.getOwnPropertyDescriptor(m, k);\n    if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n      desc = { enumerable: true, get: function() { return m[k]; } };\n    }\n    Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n    var t = {};\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n        t[p] = s[p];\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n                t[p[i]] = s[p[i]];\n        }\n    return t;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n    return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildMiniComponent = void 0;\nconst yargs_1 = __importDefault(require(\"yargs\"));\nconst build_1 = require(\"./build\");\nObject.defineProperty(exports, \"buildMiniComponent\", { enumerable: true, get: function () { return build_1.buildMiniComponent; } });\nconst getConfig_1 = __importDefault(require(\"./getConfig\"));\nconst API_1 = __importDefault(require(\"./API\"));\nconst blend_1 = __importDefault(require(\"./plugins/BlendedApp/blend\"));\n__exportStar(require(\"./legacyExport\"), exports);\nclass RemaxCLI {\n    run(args, callback) {\n        var _a;\n        const argv = require('yargs-parser')(args);\n        process.env.REMAX_PLATFORM = argv.t || argv.target || 'ali';\n        this.options = (0, getConfig_1.default)();\n        this.options.compressTemplate = (_a = this.options.compressTemplate) !== null && _a !== void 0 ? _a : argv.minimize;\n        this.api = new API_1.default();\n        const cli = this.initCLI();\n        this.api.registerPlugins(this.options.plugins);\n        this.api.extendCLI(cli);\n        if (args.length === 0) {\n            cli.showHelp();\n        }\n        return cli.parse(args, callback);\n    }\n    initCLI() {\n        return yargs_1.default\n            .scriptName('remax')\n            .usage('Usage: $0 <command> [options]')\n            .command('build', '编译项目', y => {\n            y.option('watch', {\n                describe: '监听文件变化',\n                alias: 'w',\n                type: 'boolean',\n                default: false,\n            })\n                .option('target', {\n                describe: '目标平台',\n                alias: 't',\n                type: 'string',\n            })\n                .option('output', {\n                describe: '输出目录',\n                alias: 'o',\n                type: 'string',\n            })\n                .option('notify', {\n                describe: '编译错误提醒',\n                alias: 'n',\n                type: 'boolean',\n                default: false,\n            })\n                .option('port', {\n                describe: '指定端口号',\n                alias: 'p',\n                type: 'number',\n            })\n                .option('minimize', {\n                describe: '最小化文件',\n                alias: 'm',\n                type: 'boolean',\n                default: false,\n            })\n                .option('analyze', {\n                describe: '编译分析',\n                alias: 'a',\n                type: 'boolean',\n                default: false,\n            })\n                // .option('devtools', {\n                //   describe: '启动 react-devtools 调试',\n                //   alias: 'd',\n                //   type: 'boolean',\n                //   default: true,\n                // })\n                .option('loglevel', {\n                describe: '展示日志级别',\n                type: 'string',\n                default: 'verbose',\n            });\n        }, (argv) => {\n            (0, build_1.internalBuildApp)(Object.assign(Object.assign({}, this.options), argv), this.api);\n        })\n            .command('mini-plugin', '插件相关命令', y => {\n            y.command('build', '编译插件', y => {\n                y.option('watch', {\n                    describe: '监听文件变化',\n                    alias: 'w',\n                    type: 'boolean',\n                    default: false,\n                })\n                    .option('target', {\n                    describe: '目标平台',\n                    alias: 't',\n                    type: 'string',\n                })\n                    .option('output', {\n                    describe: '输出目录',\n                    alias: 'o',\n                    type: 'string',\n                });\n            }, (argv) => {\n                (0, build_1.buildMiniPlugin)(Object.assign(Object.assign({}, this.options), argv));\n            });\n        })\n            .command('mini-component', '组件相关命令', y => {\n            y.command('build', '编译组件', y => {\n                y.option('watch', {\n                    describe: '监听文件变化',\n                    alias: 'w',\n                    type: 'boolean',\n                    default: false,\n                })\n                    .option('type', {\n                    type: 'string',\n                    alias: 't',\n                    default: 'esm',\n                    description: '编译类型',\n                    choices: ['esm', 'ali', 'wechat'],\n                })\n                    .option('output', {\n                    describe: '输出目录',\n                    alias: 'o',\n                    type: 'string',\n                })\n                    .option('input', {\n                    type: 'string',\n                    alias: 'i',\n                    array: true,\n                    description: '指定入口文件',\n                    demandOption: true,\n                });\n            }, (_a) => {\n                var { type } = _a, argv = __rest(_a, [\"type\"]);\n                (0, build_1.buildMiniComponent)(Object.assign(Object.assign(Object.assign({}, this.options), { target: type }), argv));\n            });\n        })\n            .command('blend', '将小程序混合到其他小程序中', y => {\n            y.option('from', {\n                describe: '将[from]混合[to]中',\n                type: 'string'\n            })\n                .option('to', {\n                describe: '将[from]混合入[to]中',\n                type: 'string',\n            })\n                .option('output', {\n                describe: '混入到[to]的[output]目录',\n                type: 'string',\n            })\n                .option('independent', {\n                describe: '是否独立分包',\n                type: 'boolean',\n                default: true,\n            });\n        }, (argv) => {\n            (0, blend_1.default)(argv);\n        })\n            .help();\n    }\n}\nexports.default = RemaxCLI;\n"]}