From 7c1bebd0f533403bce037c7a9b78009be6396b3b Mon Sep 17 00:00:00 2001 From: ssw Date: Thu, 25 Jun 2026 15:24:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(v0.11+):=20dict=20index.ts=20=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=204=20=E4=B8=AA=20NEW-CMD=20(typeUpdate/typeDelete/da?= =?UTF-8?q?taUpdate/dataDelete)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前 commit d31fa51 只加 4 个文件但未注册到 index.ts 本 commit 注册到 dict 父命令, 累计 dict 8 子命令 (从 4 → 8) Co-Authored-By: Claude --- src/commands/dict/index.ts | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/commands/dict/index.ts b/src/commands/dict/index.ts index 11b9083..7cf7c61 100644 --- a/src/commands/dict/index.ts +++ b/src/commands/dict/index.ts @@ -1,17 +1,35 @@ /** * commands/dict/index.ts — dict 父命令 + * + * v0.11+ Phase 2: 8 子命令 (闭环 CRUD) + * typeList 字典类型列表 + * typeCreate 字典类型创建 + * typeUpdate 字典类型修改 (P0 v0.11+) + * typeDelete 字典类型删除 (P0 v0.11+) + * dataList 字典项列表 + * dataCreate 字典项创建 + * dataUpdate 字典项修改 (P0 v0.11+) + * dataDelete 字典项删除 (P0 v0.11+) */ import { Command } from 'commander' import { buildDictTypeListCommand } from './typelist.ts' -import { buildDictDataListCommand } from './datalist.ts' import { buildDictTypeCreateCommand } from './typecreate.ts' +import { buildDictTypeUpdateCommand } from './typeupdate.ts' +import { buildDictTypeDeleteCommand } from './typedelete.ts' +import { buildDictDataListCommand } from './datalist.ts' import { buildDictDataCreateCommand } from './datacreate.ts' +import { buildDictDataUpdateCommand } from './dataupdate.ts' +import { buildDictDataDeleteCommand } from './datadelete.ts' export function buildDictCommand(): Command { - const cmd = new Command('dict').description('字典管理 (类型 + 数据)') + const cmd = new Command('dict').description('字典管理 (类型 + 数据, 闭环 CRUD)') cmd.addCommand(buildDictTypeListCommand()) - cmd.addCommand(buildDictDataListCommand()) cmd.addCommand(buildDictTypeCreateCommand()) + cmd.addCommand(buildDictTypeUpdateCommand()) + cmd.addCommand(buildDictTypeDeleteCommand()) + cmd.addCommand(buildDictDataListCommand()) cmd.addCommand(buildDictDataCreateCommand()) + cmd.addCommand(buildDictDataUpdateCommand()) + cmd.addCommand(buildDictDataDeleteCommand()) return cmd }