@lark-project/cli
Version:
飞书项目插件开发工具
32 lines (31 loc) • 1.29 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.addStartCommand = void 0;
// ⚠️ 改命令名 / flag / alias 时,同步 grep `lpm` skills/ .claude/skills/ 修文档引用
const path_1 = __importDefault(require("path"));
const run_script_1 = __importDefault(require("../../utils/run-script"));
const types_1 = require("../../types");
function addStartCommand(program) {
program
.command('start')
.alias('dev')
.description('Start the development server for developing.')
.option('--source-type <source-type>', 'Config source: local or remote')
.option('--auto', 'Auto open debugging page in browser after server starts')
.action(async (options) => {
const { sourceType, auto } = options;
(0, run_script_1.default)(path_1.default.join(__dirname, '../dispatcher'), [
'--command',
types_1.ECommandName.start,
'--payload',
JSON.stringify({
source_type: sourceType,
auto: Boolean(auto),
}),
]);
});
}
exports.addStartCommand = addStartCommand;