UNPKG

@lark-project/cli

Version:

飞书项目插件开发工具

35 lines (34 loc) 1.62 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.addUpdateCommand = void 0; // ⚠️ 改命令名 / flag / alias 时,同步 grep `lpm` skills/ .claude/skills/ 修文档引用 const path_1 = __importDefault(require("path")); const types_1 = require("../../types"); const run_script_1 = __importDefault(require("../../utils/run-script")); function addUpdateCommand(program) { program .command('update') .description('Update the added plugin features') .option('--source-type <source-type>', 'Config source: local or remote') .option('--allow-delete', 'Confirm deletion of remote points the local config omits (skips the pre-push deletion gate)', false) .option('--save-snapshot', 'Save backend-format snapshot for eval comparison (requires --case-id)') .option('--case-id <case-id>', 'Eval case ID used to name the snapshot file') .action(options => { const { sourceType, allowDelete, saveSnapshot, caseId } = options; (0, run_script_1.default)(path_1.default.join(__dirname, '../dispatcher'), [ '--command', types_1.ECommandName.update, '--payload', JSON.stringify({ source_type: sourceType, allow_delete: Boolean(allowDelete), save_snapshot: saveSnapshot, case_id: caseId, }), ]); }); } exports.addUpdateCommand = addUpdateCommand;