cloudcc-cli 2.3.5 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/skills/cloudcc-cli-dev/SKILL.md +20 -20
- package/.cursor/skills/cloudcc-dev-skill/SKILL.md +26 -26
- package/README.md +38 -10
- package/bin/cc.js +6 -6
- package/mcp/cliRunner.js +2 -2
- package/mcp/tools/Application Creator/handler.js +1 -1
- package/mcp/tools/Approval/handler.js +3 -3
- package/mcp/tools/Class Creator/handler.js +2 -2
- package/mcp/tools/Class Detail Retriever/handler.js +1 -1
- package/mcp/tools/Class Editor Guide/handler.js +1 -1
- package/mcp/tools/Class List Retriever/handler.js +1 -1
- package/mcp/tools/Class Publisher/handler.js +1 -1
- package/mcp/tools/Class Puller/handler.js +1 -1
- package/mcp/tools/Client Script Detail Retriever/handler.js +1 -1
- package/mcp/tools/Client Script Editor Guide/handler.js +1 -1
- package/mcp/tools/Client Script List Retriever/handler.js +1 -1
- package/mcp/tools/Client Script Publisher/handler.js +1 -1
- package/mcp/tools/Client Script Puller/handler.js +2 -2
- package/mcp/tools/CloudCC Development Overview/handler.js +1 -1
- package/mcp/tools/Component Creator/handler.js +1 -1
- package/mcp/tools/Component Detail Retriever/handler.js +1 -1
- package/mcp/tools/Component Editor Guide/handler.js +1 -1
- package/mcp/tools/Component List Retriever/handler.js +1 -1
- package/mcp/tools/Component Publisher/handler.js +2 -2
- package/mcp/tools/Component Puller/handler.js +1 -1
- package/mcp/tools/Dev Environment Creator/handler.js +1 -1
- package/mcp/tools/Dev Environment Validator/handler.js +1 -1
- package/mcp/tools/Developer Key Setup Guide/handler.js +1 -1
- package/mcp/tools/Menu Creator/handler.js +1 -1
- package/mcp/tools/Object Creator/handler.js +2 -2
- package/mcp/tools/Object Fields Creator/handler.js +1 -1
- package/mcp/tools/Object Fields Retriever/handler.js +1 -1
- package/mcp/tools/Object List Retriever/handler.js +1 -1
- package/mcp/tools/Scheduled Class Creator/handler.js +1 -1
- package/mcp/tools/Scheduled Class Detail Retriever/handler.js +1 -1
- package/mcp/tools/Scheduled Class List Retriever/handler.js +1 -1
- package/mcp/tools/Scheduled Class Publisher/handler.js +1 -1
- package/mcp/tools/Scheduled Class Puller/handler.js +1 -1
- package/mcp/tools/Trigger Creator/handler.js +1 -1
- package/mcp/tools/Trigger Detail Retriever/handler.js +1 -1
- package/mcp/tools/Trigger Editor Guide/handler.js +1 -1
- package/mcp/tools/Trigger List Retriever/handler.js +1 -1
- package/mcp/tools/Trigger Publisher/handler.js +1 -1
- package/mcp/tools/Trigger Puller/handler.js +1 -1
- package/package.json +3 -2
- package/src/application/create.js +2 -2
- package/src/application/delete.js +2 -2
- package/src/application/doc.js +2 -2
- package/src/application/docs/devguide.md +25 -25
- package/src/application/docs/introduction.md +2 -2
- package/src/button/create.js +1 -1
- package/src/button/delete.js +1 -1
- package/src/button/doc.js +2 -2
- package/src/button/docs/devguide.md +11 -11
- package/src/button/get.js +1 -1
- package/src/button/index.js +1 -1
- package/src/classes/create.js +1 -1
- package/src/classes/delete.js +1 -1
- package/src/classes/detail.js +1 -1
- package/src/classes/doc.js +2 -2
- package/src/classes/docs/devguide.md +21 -21
- package/src/classes/get.js +1 -1
- package/src/classes/publish.js +1 -1
- package/src/classes/pull.js +1 -1
- package/src/classes/pullList.js +1 -1
- package/src/config/doc.js +2 -2
- package/src/config/docs/devguide.md +15 -15
- package/src/customPage/create.js +2 -2
- package/src/customPage/delete.js +2 -2
- package/src/customPage/doc.js +2 -2
- package/src/customPage/docs/devguide.md +27 -27
- package/src/customPage/get.js +1 -1
- package/src/customSetting/create.js +1 -1
- package/src/customSetting/delete.js +1 -1
- package/src/customSetting/deleteCustomSettingField.js +1 -1
- package/src/customSetting/detail.js +1 -1
- package/src/customSetting/docs/devguide.md +9 -9
- package/src/customSetting/editCustomSettingField.js +1 -1
- package/src/customSetting/get.js +1 -1
- package/src/customSetting/modify.js +1 -1
- package/src/customSetting/saveCustomSettingField.js +1 -1
- package/src/fields/delete.js +2 -2
- package/src/fields/docs/devguide.md +14 -14
- package/src/fields/docs/introduction.md +3 -3
- package/src/globalSelectList/create.js +1 -1
- package/src/globalSelectList/delete.js +1 -1
- package/src/globalSelectList/detail.js +1 -1
- package/src/globalSelectList/doc.js +2 -2
- package/src/globalSelectList/docs/devguide.md +7 -7
- package/src/globalSelectList/get.js +1 -1
- package/src/identityProvider/create.js +3 -3
- package/src/identityProvider/delete.js +3 -3
- package/src/identityProvider/doc.js +2 -2
- package/src/identityProvider/docs/devguide.md +10 -10
- package/src/identityProvider/download.js +1 -1
- package/src/identityProvider/get.js +1 -1
- package/src/menu/create-object.js +2 -2
- package/src/menu/create-page.js +2 -2
- package/src/menu/create-script.js +2 -2
- package/src/menu/create-site.js +2 -2
- package/src/menu/create.js +11 -11
- package/src/menu/delete.js +2 -2
- package/src/menu/doc.js +2 -2
- package/src/menu/docs/devguide.md +13 -13
- package/src/menu/docs/introduction.md +3 -3
- package/src/menu/get.js +1 -1
- package/src/object/create.js +2 -2
- package/src/object/delete.js +2 -2
- package/src/object/docs/devguide.md +11 -11
- package/src/pagelayout/create.js +6 -6
- package/src/pagelayout/delete.js +4 -4
- package/src/pagelayout/doc.js +2 -2
- package/src/pagelayout/docs/devguide.md +9 -9
- package/src/pagelayout/docs/introduction.md +1 -1
- package/src/pagelayout/get.js +4 -4
- package/src/permission/add.js +4 -4
- package/src/permission/assign.js +3 -3
- package/src/permission/docs/devguide.md +20 -20
- package/src/permission/docs/introduction.md +18 -18
- package/src/permission/get.js +1 -1
- package/src/permission/remove.js +4 -4
- package/src/plugin/delete.js +2 -2
- package/src/plugin/doc.js +2 -2
- package/src/plugin/docs/devguide.md +29 -29
- package/src/profile/create.js +5 -5
- package/src/profile/delete.js +2 -2
- package/src/profile/doc.js +2 -2
- package/src/profile/docs/devguide.md +8 -8
- package/src/profile/docs/introduction.md +12 -12
- package/src/profile/get.js +1 -1
- package/src/project/docs/devguide.md +2 -2
- package/src/recordType/create.js +1 -1
- package/src/recordType/delete.js +1 -1
- package/src/recordType/doc.js +2 -2
- package/src/recordType/docs/devguide.md +10 -10
- package/src/recordType/editInfo.js +1 -1
- package/src/recordType/editSave.js +1 -1
- package/src/recordType/getList.js +1 -1
- package/src/recordType/newInfo.js +1 -1
- package/src/recordType/validDelete.js +1 -1
- package/src/res.md +1 -1
- package/src/role/create.js +6 -6
- package/src/role/delete.js +2 -2
- package/src/role/doc.js +2 -2
- package/src/role/docs/devguide.md +9 -9
- package/src/role/docs/introduction.md +13 -13
- package/src/role/get.js +1 -1
- package/src/scheduleJob/doc.js +1 -1
- package/src/scheduleJob/docs/devguide.md +6 -6
- package/src/scheduleJob/docs/introduction.md +6 -6
- package/src/script/docs/devguide.md +18 -18
- package/src/singleSignOn/delete.js +3 -3
- package/src/singleSignOn/doc.js +2 -2
- package/src/singleSignOn/docs/devguide.md +5 -5
- package/src/singleSignOn/get.js +1 -1
- package/src/staticResource/count.js +1 -1
- package/src/staticResource/create.js +1 -1
- package/src/staticResource/delete.js +1 -1
- package/src/staticResource/detail.js +1 -1
- package/src/staticResource/docs/devguide.md +11 -11
- package/src/staticResource/get.js +1 -1
- package/src/timer/create.js +1 -1
- package/src/timer/delete.js +1 -1
- package/src/timer/detail.js +1 -1
- package/src/timer/doc.js +2 -2
- package/src/timer/docs/devguide.md +19 -19
- package/src/timer/get.js +1 -1
- package/src/timer/publish.js +1 -1
- package/src/timer/pull.js +1 -1
- package/src/timer/pullList.js +1 -1
- package/src/triggers/detail.js +1 -1
- package/src/triggers/doc.js +2 -2
- package/src/triggers/docs/devguide.md +23 -23
- package/src/triggers/get.js +1 -1
- package/src/triggers/pullList.js +1 -1
- package/src/user/create.js +2 -2
- package/src/user/delete.js +2 -2
- package/src/user/doc.js +2 -2
- package/src/user/docs/devguide.md +13 -13
- package/src/user/docs/introduction.md +12 -12
- package/src/user/get.js +1 -1
- package/src/user/update.js +3 -3
- package/src/user/view.js +2 -2
- package/src/validationRule/create.js +5 -5
- package/src/validationRule/delete.js +2 -2
- package/src/validationRule/doc.js +2 -2
- package/src/validationRule/docs/devguide.md +7 -7
- package/src/validationRule/docs/introduction.md +11 -11
- package/src/validationRule/get.js +1 -1
- package/src/version/actionHelp.js +3 -3
- package/src/version/doctor.js +1 -1
- package/src/version/get.js +0 -6
- package/src/version/help.js +15 -14
- package/src/version/initHelp.js +2 -2
- package/src/version/listModuleCommands.js +2 -2
- package/src/version/stats.js +1 -1
- package/test/application.cli.test.js +1 -1
- package/test/classes.cli.test.js +1 -1
- package/test/customSetting.cli.test.js +1 -1
- package/test/fields.cli.test.js +2 -2
- package/test/globalSelectList.cli.test.js +1 -1
- package/test/menu-script.cli.test.js +1 -1
- package/test/menu.cli.test.js +1 -1
- package/test/object.cli.test.js +1 -1
- package/test/plugin.cli.test.js +1 -1
- package/test/scheduleJob.cli.test.js +1 -1
- package/test/script.cli.test.js +1 -1
- package/test/staticResource.cli.test.js +1 -1
- package/test/timer.cli.test.js +1 -1
- package/test/trigger.cli.test.js +1 -1
- package/utils/checkVersion.js +9 -13
- package/utils/commandStats.js +7 -7
|
@@ -18,7 +18,7 @@ description: >-
|
|
|
18
18
|
全局约定:
|
|
19
19
|
|
|
20
20
|
```text
|
|
21
|
-
|
|
21
|
+
cloudcc <动作 action> <资源 resource> <其余参数 ...>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
- `argvs[0]` = 动作(如 `get`、`create`、`doc`、`assign` 等,随业务扩展)
|
|
@@ -27,11 +27,11 @@ cc <动作 action> <资源 resource> <其余参数 ...>
|
|
|
27
27
|
|
|
28
28
|
示例:
|
|
29
29
|
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
30
|
+
- `cloudcc get object …` → `modules.object('get', argvs)`
|
|
31
|
+
- `cloudcc assign permission …` → `modules.permission('assign', argvs)`
|
|
32
|
+
- `cloudcc doc menu …` → `modules.menu('doc', argvs)`
|
|
33
33
|
|
|
34
|
-
权限模块曾使用旧写法 `
|
|
34
|
+
权限模块曾使用旧写法 `cloudcc permission assign …`(资源不在第二位),已废弃,见下文「历史调整摘要」。
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
@@ -60,31 +60,31 @@ cc <动作 action> <资源 resource> <其余参数 ...>
|
|
|
60
60
|
| `uninstall`(且无第二参数) | `src/version/uninstall.js` 全局卸载 |
|
|
61
61
|
| `doctor`(且无第二参数) | `src/version/doctor.js` 环境自检(Node、配置、版本) |
|
|
62
62
|
| `docs`(且无第二参数) | `src/version/docs.js` 打开帮助中心浏览器页 |
|
|
63
|
-
| `init …` | **等价** `
|
|
63
|
+
| `init …` | **等价** `cloudcc create project …`(重写 `argvs` 后走主流程) |
|
|
64
64
|
| `init` + `-h` / `--help` | `src/version/initHelp.js` 简短说明 |
|
|
65
65
|
| 任意 `action` + 第二参数为 `-h` / `--help` | `src/version/actionHelp.js`:列出支持该 **action** 的 **resource**(数据来自 `listModuleCommands`) |
|
|
66
66
|
|
|
67
|
-
**无参 / 缺 resource**:仅输入 `cc` 时提示用法并指向 `
|
|
67
|
+
**无参 / 缺 resource**:仅输入 `cc` 时提示用法并指向 `cloudcc --help`;仅输入 `cloudcc <action>`(缺 `argvs[1]`)时提示补全 `resource`,并提示可用 `cloudcc <action> -h`。
|
|
68
68
|
|
|
69
|
-
**注意**:`doctor`、`docs`、`actionHelp`、`initHelp` **不要**挂到 `src/version/index.js` 的 `cc.*` 上,否则 `
|
|
69
|
+
**注意**:`doctor`、`docs`、`actionHelp`、`initHelp` **不要**挂到 `src/version/index.js` 的 `cc.*` 上,否则 `cloudcc --help` 里通过解析 `index.js` 会误出现 `cloudcc doctor version` 等行。它们由 `cc.js` **直接 `require`** 对应文件执行。
|
|
70
70
|
|
|
71
71
|
---
|
|
72
72
|
|
|
73
73
|
## `--help` 与模块清单(`src/version/`)
|
|
74
74
|
|
|
75
|
-
- **`help.js`**:打印 Usage、Global 区、**按模块罗列** `
|
|
75
|
+
- **`help.js`**:打印 Usage、Global 区、**按模块罗列** `cloudcc <action> <resource>`;模块与顺序与 `bin/index.js` 的 `modules` 一致(见 `listModuleCommands.js`)。
|
|
76
76
|
- **`listModuleCommands.js`**:
|
|
77
77
|
- 从各资源目录 `index.js` **正则解析** `cc.<action> =` 得到 action 列表(与实现同步)。
|
|
78
78
|
- **`MODULE_HINT`**:模块一句话说明;`schedule` / `timer` 合并为一组展示。
|
|
79
79
|
- **`describeActionLine(resource, action)`**:行尾中文说明(替代省略号)。
|
|
80
|
-
- **`getResourcesForAction(action)`**:供 `
|
|
80
|
+
- **`getResourcesForAction(action)`**:供 `cloudcc <action> -h` 列出 resource。
|
|
81
81
|
- 新增 **resource** 时:除改 `bin/index.js` 外,须在 `listModuleCommands.js` 中维护 **`MODULE_KEYS_ORDER`** 与 **`MODULE_FOLDER`**(及必要时 **`MODULE_HINT`**、**`RESOURCE_CN`**)。
|
|
82
82
|
|
|
83
83
|
---
|
|
84
84
|
|
|
85
85
|
## MCP 与 `package.json` bin
|
|
86
86
|
|
|
87
|
-
- **`package.json` 的 `bin`**
|
|
87
|
+
- **`package.json` 的 `bin`** 注册 **`cc`** 与 **`cloudcc`**(同一 `bin/cc.js`,Unix 上推荐 `cloudcc` 以免与系统 C 编译器 `cc` 冲突)、`cloudccCreate`、`cloudccBuild` 等,**不**注册 `cc-mcp`。
|
|
88
88
|
- MCP 启动使用 **`node`** + **`cloudcc-cli` 包内 `bin/mcp.js` 的绝对路径**(全局安装路径可用 `$(npm root -g)/cloudcc-cli/bin/mcp.js` 拼接)。详见仓库 `README.md` / `src/project/docs/devguide.md`。
|
|
89
89
|
|
|
90
90
|
---
|
|
@@ -113,7 +113,7 @@ cc <动作 action> <资源 resource> <其余参数 ...>
|
|
|
113
113
|
|
|
114
114
|
子文件(`get.js`、`create.js` …)从 **`argvs`** 解析路径与业务参数(通常从 `argvs[2]` 开始,依各命令文档)。
|
|
115
115
|
|
|
116
|
-
新增动作时:增加 `cc.<新动作> = require("./新文件")`,并保证与全局 `
|
|
116
|
+
新增动作时:增加 `cc.<新动作> = require("./新文件")`,并保证与全局 `cloudcc <动作> <资源>` 一致。
|
|
117
117
|
|
|
118
118
|
---
|
|
119
119
|
|
|
@@ -121,9 +121,9 @@ cc <动作 action> <资源 resource> <其余参数 ...>
|
|
|
121
121
|
|
|
122
122
|
1. 在 `bin/index.js` 的 **`modules`** 中注册资源(key = CLI 第二段单词)。
|
|
123
123
|
2. 新建或扩展 `src/<resource>/`,实现 `index.js` 及所需 `get`/`create`/… 子文件。
|
|
124
|
-
3. 若有 `doc`,在 `src/<resource>/doc.js` 与 `docs/` 中维护说明;通过 `
|
|
125
|
-
4. 更新 `src/version/listModuleCommands.js`:**`MODULE_KEYS_ORDER`**、**`MODULE_FOLDER`**,必要时 **`MODULE_HINT`**、**`RESOURCE_CN`**、**`describeActionLine`** 中的映射,保证 `
|
|
126
|
-
5. 自测:`node bin/cc.js <动作> <resource> …`、`
|
|
124
|
+
3. 若有 `doc`,在 `src/<resource>/doc.js` 与 `docs/` 中维护说明;通过 `cloudcc doc <resource>` 可读。
|
|
125
|
+
4. 更新 `src/version/listModuleCommands.js`:**`MODULE_KEYS_ORDER`**、**`MODULE_FOLDER`**,必要时 **`MODULE_HINT`**、**`RESOURCE_CN`**、**`describeActionLine`** 中的映射,保证 `cloudcc --help` 与 `cloudcc <action> -h` 正确。
|
|
126
|
+
5. 自测:`node bin/cc.js <动作> <resource> …`、`cloudcc --help` / `cloudcc --help`、`cloudcc <action> -h`;若 MCP 通过 `cliRunner` 调 **`cloudcc`**,确认参数顺序与文档一致。
|
|
127
127
|
|
|
128
128
|
---
|
|
129
129
|
|
|
@@ -134,12 +134,12 @@ cc <动作 action> <资源 resource> <其余参数 ...>
|
|
|
134
134
|
### 必须先确认:是否升级版本号
|
|
135
135
|
|
|
136
136
|
- **向用户询问**:本次是否需要**升级 `package.json` / `package-lock.json` 的版本号**(新一次发版)?
|
|
137
|
-
- **若不需要升版**:**不要**修改 `package.json` 与 `package-lock.json` 的 `version`;只在 **`README.md` 里与当前 `package.json.version` 一致**的那一节 `# ReleaseV…`(例如已是 `# ReleaseV2.3.
|
|
137
|
+
- **若不需要升版**:**不要**修改 `package.json` 与 `package-lock.json` 的 `version`;只在 **`README.md` 里与当前 `package.json.version` 一致**的那一节 `# ReleaseV…`(例如已是 `# ReleaseV2.3.6`)中**增补或修订** `#### Release Content`(及必要时同一节内的日期说明),把新变更写进**现有版本**的日志里。
|
|
138
138
|
- **若需要升版**:再执行下面的「升版 + 新节」流程。
|
|
139
139
|
|
|
140
140
|
### 升版 + 新 Release 节(仅在用户确认要发版时)
|
|
141
141
|
|
|
142
|
-
1. **版本号**(与 `
|
|
142
|
+
1. **版本号**(与 `cloudcc --version` / `package.json` 一致)
|
|
143
143
|
- 在 **`package.json`** 中将 **`version`** 升为下一号(通常 patch `x.y.(z+1)`;破坏性变更再升 minor/major)。
|
|
144
144
|
- 同步 **`package-lock.json`** 根包 **`""`** 的 **`version`**(以及文件最顶部 `name`/`version` 字段,若存在),避免锁文件与 `package.json` 不一致。
|
|
145
145
|
|
|
@@ -167,9 +167,9 @@ cc <动作 action> <资源 resource> <其余参数 ...>
|
|
|
167
167
|
|
|
168
168
|
1. **`bin/cc.js`**:业务命令仍统一为 `await cc[action](argvs)`(`cc` 来自 `./index`);**全局/帮助类**(`--help`、`doctor`、`init` 等)在加载 `./index` **之前**分支;旧版在入口为 `permission` 单独写 `if` 的方式已废弃。
|
|
169
169
|
2. **`bin/index.js`**:由「直接导出 `cc` 对象」改为 **`modules` + `Proxy`**,以支持以 **第一个单词为动作** 的路由;`doc` 对资源名做存在性校验。
|
|
170
|
-
3. **`permission` 命令语义**:由旧的 `
|
|
170
|
+
3. **`permission` 命令语义**:由旧的 `cloudcc permission assign|add|remove`(资源不在第二位)改为符合全局约定的 **`cloudcc assign permission`、`cloudcc add permission`、`cloudcc remove permission`**;`cloudcc get permission` 保持不变。
|
|
171
171
|
4. **`src/permission/index.js`**:与 `pagelayout` 等资源对齐,使用 **`cc` 子对象 + `main(action, argvs)`** 分发,去掉仅服务于旧写法的单参数 argv 分支。
|
|
172
|
-
5. **`.claude/settings.json`** 等:允许/bash 规则从 `
|
|
173
|
-
6. **`bin/cc.js` 全局能力**:`--help`/`help`、`doctor`、`docs`、`init`(别名 `create project`)、`
|
|
172
|
+
5. **`.claude/settings.json`** 等:允许/bash 规则从 `cloudcc permission:*` 调整为 `cloudcc assign permission:*` 等新模式(若仍使用 Claude 相关自动化)。
|
|
173
|
+
6. **`bin/cc.js` 全局能力**:`--help`/`help`、`doctor`、`docs`、`init`(别名 `create project`)、`cloudcc <action> -h`;`package.json` **不**注册 `cc-mcp`,MCP 用 `node` + `bin/mcp.js` 路径。
|
|
174
174
|
|
|
175
175
|
实现新功能时,**以本节与上文「命令行结构」为准**,勿再引入「首词为资源名」的并行体系。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cloudcc-dev-skill
|
|
3
|
-
description: CloudCC CRM 二次开发设计,实现工具 。用于在设计方案和实际开发时使用,优先通过各模块的 `
|
|
3
|
+
description: CloudCC CRM 二次开发设计,实现工具 。用于在设计方案和实际开发时使用,优先通过各模块的 `cloudcc doc <module> introduction` 与 `cloudcc doc <module> devguide` 获取文档。用户提到 CloudCC、cloudcc-cli、`cloudcc doc`、模块文档、设计方案、开发文档、项目初始化、开发环境、对象、字段、菜单、应用、类、定时类、触发器、自定义组件、自定义页面、自定义设置、客户端脚本、静态资源 时应优先使用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# CloudCC CLI skill
|
|
@@ -12,60 +12,60 @@ description: CloudCC CRM 二次开发设计,实现工具 。用于在设计方
|
|
|
12
12
|
|
|
13
13
|
### 基础与环境
|
|
14
14
|
|
|
15
|
-
- 开发环境设置:`
|
|
16
|
-
- 开发环境密钥配置:`
|
|
15
|
+
- 开发环境设置:`cloudcc doc project introduction`、`cloudcc doc project devguide`
|
|
16
|
+
- 开发环境密钥配置:`cloudcc doc config devguide`
|
|
17
17
|
|
|
18
18
|
### 元数据与模型设计
|
|
19
19
|
|
|
20
|
-
- 对象:`
|
|
21
|
-
- 对象字段:`
|
|
22
|
-
- 对象记录类型:`
|
|
23
|
-
- 全局选项列表:`
|
|
20
|
+
- 对象:`cloudcc doc object introduction`、`cloudcc doc object devguide`
|
|
21
|
+
- 对象字段:`cloudcc doc fields introduction`、`cloudcc doc fields devguide`
|
|
22
|
+
- 对象记录类型:`cloudcc doc recordType introduction`、`cloudcc doc recordType devguide`
|
|
23
|
+
- 全局选项列表:`cloudcc doc globalSelectList introduction`、`cloudcc doc globalSelectList devguide`
|
|
24
24
|
|
|
25
25
|
### 权限与组织管理
|
|
26
26
|
|
|
27
|
-
- 用户:`
|
|
28
|
-
- 角色:`
|
|
29
|
-
- 简档:`
|
|
27
|
+
- 用户:`cloudcc doc user introduction`、`cloudcc doc user devguide`
|
|
28
|
+
- 角色:`cloudcc doc role introduction`、`cloudcc doc role devguide`
|
|
29
|
+
- 简档:`cloudcc doc profile introduction`、`cloudcc doc profile devguide`
|
|
30
30
|
|
|
31
31
|
### 业务扩展(后端)
|
|
32
32
|
|
|
33
|
-
- 后端类:`
|
|
34
|
-
- 触发器:`
|
|
35
|
-
- 定时类:`
|
|
36
|
-
- 定时作业:`
|
|
33
|
+
- 后端类:`cloudcc doc classes introduction`、`cloudcc doc classes devguide`
|
|
34
|
+
- 触发器:`cloudcc doc triggers introduction`、`cloudcc doc triggers devguide`
|
|
35
|
+
- 定时类:`cloudcc doc timer introduction`、`cloudcc doc timer devguide`
|
|
36
|
+
- 定时作业:`cloudcc doc scheduleJob introduction`、`cloudcc doc scheduleJob devguide`
|
|
37
37
|
|
|
38
38
|
### 业务扩展(前端)
|
|
39
39
|
|
|
40
|
-
- 自定义组件:`
|
|
41
|
-
- 自定义页面:`
|
|
42
|
-
- 客户端脚本:`
|
|
43
|
-
- 静态资源:`
|
|
40
|
+
- 自定义组件:`cloudcc doc plugin introduction`、`cloudcc doc plugin devguide`
|
|
41
|
+
- 自定义页面:`cloudcc doc customPage introduction`、`cloudcc doc customPage devguide`
|
|
42
|
+
- 客户端脚本:`cloudcc doc script introduction`、`cloudcc doc script devguide`
|
|
43
|
+
- 静态资源:`cloudcc doc staticResource introduction`、`cloudcc doc staticResource devguide`
|
|
44
44
|
|
|
45
45
|
### 平台配置与导航
|
|
46
46
|
|
|
47
|
-
- 菜单:`
|
|
48
|
-
- 应用:`
|
|
49
|
-
- 自定义设置:`
|
|
47
|
+
- 菜单:`cloudcc doc menu introduction`、`cloudcc doc menu devguide`
|
|
48
|
+
- 应用:`cloudcc doc application introduction`、`cloudcc doc application devguide`
|
|
49
|
+
- 自定义设置:`cloudcc doc customSetting introduction`、`cloudcc doc customSetting devguide`
|
|
50
50
|
|
|
51
51
|
## 使用场景
|
|
52
52
|
|
|
53
53
|
### 1. 快速了解CloudCC CRM每个模块的定义信息
|
|
54
54
|
|
|
55
55
|
- 比如做方案设计、实现设计、模块选型时,优先调用每个模块的`introduction`文档。
|
|
56
|
-
- 命令格式:`
|
|
56
|
+
- 命令格式:`cloudcc doc <module> introduction`
|
|
57
57
|
- 目标:先理解模块定位、适用场景、能力边界。
|
|
58
58
|
|
|
59
59
|
### 2. 要了解某个CloudCC CRM 环境状态
|
|
60
60
|
|
|
61
|
-
- 先创建模版项目`
|
|
61
|
+
- 先创建模版项目`cloudcc create project demo`
|
|
62
62
|
- 配置开发者密钥
|
|
63
63
|
- 调用每个模块的 `devguide`
|
|
64
|
-
文档,命令格式:`
|
|
64
|
+
文档,命令格式:`cloudcc doc <module> devguide`,了解如何查询系统数据
|
|
65
65
|
|
|
66
66
|
### 3. 要进行二开实施
|
|
67
67
|
|
|
68
|
-
- 先创建模版项目`
|
|
68
|
+
- 先创建模版项目`cloudcc create project demo`
|
|
69
69
|
- 配置开发者密钥
|
|
70
70
|
- 调用每个模块的 `devguide`
|
|
71
|
-
文档,命令格式:`
|
|
71
|
+
文档,命令格式:`cloudcc doc <module> devguide`,了解如何创建,修改数据
|
package/README.md
CHANGED
|
@@ -10,20 +10,31 @@ npm i -g cloudcc-cli
|
|
|
10
10
|
sudo npm i -g cloudcc-cli
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Verify the install (recommended on macOS/Linux — use **`cloudcc`** so it is not confused with the system C compiler **`cc`**):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cloudcc --version
|
|
17
|
+
# or (same binary, alternate name)
|
|
18
|
+
cc --version
|
|
19
|
+
```
|
|
20
|
+
|
|
13
21
|
## CLI overview
|
|
14
22
|
|
|
15
|
-
The
|
|
23
|
+
The CLI ships two global command names for the same entry (`bin/cc.js`): **`cc`** and **`cloudcc`**. On macOS/Linux, **`cloudcc`** is recommended so it does not collide with the system C compiler (`/usr/bin/cc` is often clang/gcc). **`cc`** remains for backward compatibility.
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
2. **Business commands**: `cc <action> <resource> [...]` dispatched through `bin/index.js` (Proxy) to `src/<resource>/index.js`.
|
|
25
|
+
Both names expose two layers:
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
1. **Global / maintenance commands** (handled before the `action + resource` router): `--help` / `-h` / `cloudcc help`, `--version` / `-v`, `update`, `uninstall`, `doctor`, `docs`, `stats` (local command usage statistics), `init` (equivalent to `cloudcc create project`), and `cloudcc <action> -h` or `cloudcc <action> --help` to list **resources** that support the given **action**.
|
|
28
|
+
2. **Business commands**: `cloudcc <action> <resource> [...]` dispatched through `bin/index.js` (Proxy) to `src/<resource>/index.js`.
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
Run **`cloudcc --help`** or **`cc --help`** for the full command list: modules follow `bin/index.js` `modules` keys, with short module hints and per-line descriptions maintained in `src/version/listModuleCommands.js`. When you add a resource, update **`MODULE_KEYS_ORDER`** and **`MODULE_FOLDER`** (and optional **`MODULE_HINT`** / **`RESOURCE_CN`** / **`describeActionLine`**) so `--help` and `cloudcc <action> -h` stay accurate.
|
|
31
|
+
|
|
32
|
+
**Implementation note:** `doctor`, `docs`, `stats`, `actionHelp`, and `initHelp` are **not** attached to `src/version/index.js` as `cc.*` handlers; `cc.js` loads them directly so the generated help does not show misleading lines such as `cloudcc doctor version`.
|
|
23
33
|
|
|
24
34
|
## Version output and changelog
|
|
25
35
|
|
|
26
|
-
|
|
36
|
+
- **`cloudcc --version`** / **`-v`**: prints the installed version string only (no embedded release notes).
|
|
37
|
+
- **Registry version check** (`utils/checkVersion.js`, e.g. during **`cloudcc update`** or **`checkUpdate`** on pull/create flows): after comparing to npm, **only if a newer package exists** does the CLI print the relevant **`# ReleaseV…`** sections from **`README.md`** for versions **strictly after** the current install through **latest** (`utils/readmeReleases.js` → **`getReleasesBetween`**). If you are already up to date, no release block is printed (the panel still links to npm changelog). Rendering uses **`utils/formatReleaseNotes.js`**: terminal-width wrapping, aligned continuation lines, and safe inline `` `code` `` handling.
|
|
27
38
|
|
|
28
39
|
## MCP configuration
|
|
29
40
|
|
|
@@ -46,6 +57,24 @@ After a global install, resolve the script path on macOS/Linux with:
|
|
|
46
57
|
echo "$(npm root -g)/cloudcc-cli/bin/mcp.js"
|
|
47
58
|
```
|
|
48
59
|
|
|
60
|
+
# ReleaseV2.3.6
|
|
61
|
+
|
|
62
|
+
#### Release Date: 2026-4-1
|
|
63
|
+
|
|
64
|
+
#### Release Scope: Full
|
|
65
|
+
|
|
66
|
+
#### Release Content
|
|
67
|
+
|
|
68
|
+
- CLI
|
|
69
|
+
- **`cloudcc` bin** (same entry as `cc` / `bin/cc.js`): avoids clashing with the system C compiler on Unix; MCP **`mcp/cliRunner.js`** spawns **`cloudcc`** / **`cloudcc.cmd`**
|
|
70
|
+
- **Command usage statistics** (default on): records `cloudcc <action> <resource>`-style keys (e.g. `` `cloudcc doc classes` `` for `` `cloudcc doc classes devguide` ``) in `` `~/.cloudcc-cli/command-stats.json` `` via **`utils/commandStats.js`** and **`bin/cc.js`**; run **`cloudcc stats`** to view; set **`CLOUDCC_CLI_STATS=0`** / **`false`** / **`off`** to disable
|
|
71
|
+
- Terminal hints / **`cloudcc --help`** output: user-facing examples prefer **`cloudcc`**; **`cc`** remains an alias
|
|
72
|
+
- **Changelog in terminal**: README **`# ReleaseV…`** excerpts print **only when the registry reports a newer version** than the running install (`utils/checkVersion.js`); **`cloudcc --version`** no longer dumps the current release section
|
|
73
|
+
- Documentation
|
|
74
|
+
- README: post-install **`cloudcc --version`** / **`cc --version`** check; **`cloudcc --help`** vs **`cc --help`** wording; CLI overview and release log structure updates
|
|
75
|
+
- **`src/**/docs/*.md`** and inline CLI usage strings: examples use **`cloudcc`** where a shell command is shown (internal code patterns **`cc.*`** unchanged)
|
|
76
|
+
- Cursor skills (**`cloudcc-cli-dev`**, **`cloudcc-dev-skill`**) aligned with **`cloudcc`** / **`cc`** dual entry
|
|
77
|
+
|
|
49
78
|
# ReleaseV2.3.5
|
|
50
79
|
|
|
51
80
|
#### Release Date: 2026-4-1
|
|
@@ -55,12 +84,11 @@ echo "$(npm root -g)/cloudcc-cli/bin/mcp.js"
|
|
|
55
84
|
#### Release Content
|
|
56
85
|
|
|
57
86
|
- CLI
|
|
58
|
-
- Global commands: `doctor`, `docs`, `
|
|
59
|
-
- Richer `
|
|
87
|
+
- Global commands: `doctor`, `docs`, `cloudcc help`, `init` (alias for `cloudcc create project`), clearer empty-argv / missing-resource hints, and `cloudcc <action> -h` to list resources for an action
|
|
88
|
+
- Richer `cloudcc --help`: grouped modules, hints, and per-command descriptions via `src/version/listModuleCommands.js`
|
|
60
89
|
- Removed `cc-mcp` from `package.json` `bin`; MCP is documented to use `node` and `bin/mcp.js`
|
|
61
|
-
- Version checks
|
|
90
|
+
- Version checks compare to the registry; **`# ReleaseV…`** excerpts from **`README.md`** were shown together with that check (behavior refined in v2.3.6: notes only when an upgrade exists)
|
|
62
91
|
- Terminal-friendly release notes: width-aware wrapping, aligned continuation lines, **`utils/formatReleaseNotes.js`** styling, and safe handling of inline `` `code` `` when wrapping
|
|
63
|
-
- **Command usage statistics** (default on): records `cc <action> <resource>`-style keys (e.g. `` `cc doc classes` `` for `` `cc doc classes devguide` ``) in `` `~/.cloudcc-cli/command-stats.json` `` via **`utils/commandStats.js`** and **`bin/cc.js`**; run **`cc stats`** to view; set **`CLOUDCC_CLI_STATS=0`** / **`false`** / **`off`** to disable
|
|
64
92
|
- MCP
|
|
65
93
|
- New tool **`get_jsp_migration_rules`**: returns fixed JSP migration rules (resolve JSP under `customize` from `name=` URLs, suggested batch flow, **`PageClsInvoker`** invocation patterns); **`analyze_jsp_migration`** / **`split_jsp_to_cloudcc`** descriptions updated to recommend calling it before batch migration
|
|
66
94
|
- Documentation
|
package/bin/cc.js
CHANGED
|
@@ -21,16 +21,16 @@ function runVersion(subAction, argvSlice) {
|
|
|
21
21
|
|
|
22
22
|
function hintCcHelp() {
|
|
23
23
|
console.error()
|
|
24
|
-
console.error(chalk.yellow("用法:") + chalk.green("
|
|
25
|
-
console.error(chalk.gray("完整帮助:") + chalk.green("
|
|
24
|
+
console.error(chalk.yellow("用法:") + chalk.green(" cloudcc ") + chalk.gray("<action> <resource> [args...]"))
|
|
25
|
+
console.error(chalk.gray("完整帮助:") + chalk.green("cloudcc --help") + chalk.gray(" 或 ") + chalk.green("cloudcc -h") + chalk.gray(" 或 ") + chalk.green("cloudcc help"))
|
|
26
26
|
console.error()
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function hintMissingResource(act) {
|
|
30
30
|
console.error()
|
|
31
|
-
console.error(chalk.yellow("缺少 resource:") + chalk.green(`
|
|
32
|
-
console.error(chalk.gray("查看该 action 下可用的 resource:") + chalk.green(`
|
|
33
|
-
console.error(chalk.gray("查看全部命令:") + chalk.green("
|
|
31
|
+
console.error(chalk.yellow("缺少 resource:") + chalk.green(`cloudcc ${act} <resource> ...`))
|
|
32
|
+
console.error(chalk.gray("查看该 action 下可用的 resource:") + chalk.green(`cloudcc ${act} -h`))
|
|
33
|
+
console.error(chalk.gray("查看全部命令:") + chalk.green("cloudcc --help"))
|
|
34
34
|
console.error()
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -117,7 +117,7 @@ async function runWithArgvs(argv) {
|
|
|
117
117
|
await cc[act](argv)
|
|
118
118
|
} catch (e) {
|
|
119
119
|
console.error()
|
|
120
|
-
console.error(chalk.yellow("请查看帮助:
|
|
120
|
+
console.error(chalk.yellow("请查看帮助:cloudcc --help"), e)
|
|
121
121
|
console.error()
|
|
122
122
|
}
|
|
123
123
|
}
|
package/mcp/cliRunner.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const { spawnSync } = require("child_process");
|
|
2
2
|
|
|
3
3
|
const CC_NOT_FOUND_HINT =
|
|
4
|
-
"未找到
|
|
4
|
+
"未找到 cloudcc 命令。请将 cloudcc-cli 全局安装并确保 PATH 可用:npm install -g cloudcc-cli(与系统 C 编译器 cc 区分,请使用 cloudcc)";
|
|
5
5
|
|
|
6
6
|
function runCcCommand(args, options = {}) {
|
|
7
7
|
const { cwd = process.cwd(), timeoutMs = 120000 } = options;
|
|
8
|
-
const ccCommand = process.platform === "win32" ? "
|
|
8
|
+
const ccCommand = process.platform === "win32" ? "cloudcc.cmd" : "cloudcc";
|
|
9
9
|
|
|
10
10
|
const result = spawnSync(ccCommand, args, {
|
|
11
11
|
cwd,
|
|
@@ -59,7 +59,7 @@ async function createApplicationTool(params = {}) {
|
|
|
59
59
|
return {
|
|
60
60
|
content: [{
|
|
61
61
|
type: 'text',
|
|
62
|
-
text: `⚠ 应用创建遇到问题\n\n${buildRunDetail(runResult) || '
|
|
62
|
+
text: `⚠ 应用创建遇到问题\n\n${buildRunDetail(runResult) || 'cloudcc 命令执行失败'}\n\n请检查:\n1. 应用名称和应用代码是否符合规范\n2. CloudCC服务器连接是否正常\n3. 项目配置是否正确\n4. 是否有足够的权限创建应用\n5. 菜单ID是否正确`
|
|
63
63
|
}]
|
|
64
64
|
};
|
|
65
65
|
}
|
|
@@ -44,7 +44,7 @@ async function getPendingApprovals({
|
|
|
44
44
|
const run = runCcJsonCommand(['get', 'approval', process.cwd(), encoded]);
|
|
45
45
|
if (!run.success) {
|
|
46
46
|
return {
|
|
47
|
-
content: [{ type: 'text', text: `✗ 拉取待审批记录失败: ${run.detail || '
|
|
47
|
+
content: [{ type: 'text', text: `✗ 拉取待审批记录失败: ${run.detail || 'cloudcc 命令执行失败'}` }]
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
const result = run.data || {};
|
|
@@ -100,7 +100,7 @@ async function approveRecord({
|
|
|
100
100
|
const run = runCcJsonCommand(['approve', 'approval', process.cwd(), encoded]);
|
|
101
101
|
if (!run.success) {
|
|
102
102
|
return {
|
|
103
|
-
content: [{ type: 'text', text: `✗ 审批通过失败: ${run.detail || '
|
|
103
|
+
content: [{ type: 'text', text: `✗ 审批通过失败: ${run.detail || 'cloudcc 命令执行失败'}` }]
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
const result = run.data || { success: true };
|
|
@@ -153,7 +153,7 @@ async function rejectRecord({ confirm, objid, comment = '', workItemId, token =
|
|
|
153
153
|
const run = runCcJsonCommand(['reject', 'approval', process.cwd(), encoded]);
|
|
154
154
|
if (!run.success) {
|
|
155
155
|
return {
|
|
156
|
-
content: [{ type: 'text', text: `✗ 拒绝审批失败: ${run.detail || '
|
|
156
|
+
content: [{ type: 'text', text: `✗ 拒绝审批失败: ${run.detail || 'cloudcc 命令执行失败'}` }]
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
const result = run.data || { success: true };
|
|
@@ -20,14 +20,14 @@ async function createClass({ className, projectPath = process.cwd() }) {
|
|
|
20
20
|
|
|
21
21
|
if (!runResult.success) {
|
|
22
22
|
const detail = [runResult.error, runResult.stderr, runResult.stdout].filter(Boolean).join('\n');
|
|
23
|
-
return { content: [{ type: 'text', text: `✗ 创建失败: ${detail || '
|
|
23
|
+
return { content: [{ type: 'text', text: `✗ 创建失败: ${detail || 'cloudcc 命令执行失败'}` }] };
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const classPath = path.join(resolvedPath, `classes/${className}`);
|
|
27
27
|
return {
|
|
28
28
|
content: [{
|
|
29
29
|
type: 'text',
|
|
30
|
-
text: `✓ 创建成功!\n\n调用命令:
|
|
30
|
+
text: `✓ 创建成功!\n\n调用命令: cloudcc create classes ${className}\n执行目录: ${resolvedPath}\n类路径: ${classPath}\n生成的文件:\n - ${className}.java (主类文件)\n - ${className}Test.java (测试类文件)\n - config.json (配置文件)`
|
|
31
31
|
}]
|
|
32
32
|
};
|
|
33
33
|
} catch (error) {
|
|
@@ -19,7 +19,7 @@ async function getClassDetail({ className, classId, projectPath = process.cwd()
|
|
|
19
19
|
const args = ['detail', 'classes', className || '', classId || ''];
|
|
20
20
|
const run = runCcJsonCommand(args, { cwd: resolvedPath });
|
|
21
21
|
if (!run.success) {
|
|
22
|
-
return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || '
|
|
22
|
+
return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || 'cloudcc 命令执行失败'}` }] };
|
|
23
23
|
}
|
|
24
24
|
return { content: [{ type: 'text', text: JSON.stringify(run.data, null, 2) }] };
|
|
25
25
|
} catch (error) {
|
|
@@ -14,7 +14,7 @@ async function listClasses({ projectPath = process.cwd() }) {
|
|
|
14
14
|
const resolvedPath = path.resolve(projectPath);
|
|
15
15
|
const run = runCcJsonCommand(['get', 'classes'], { cwd: resolvedPath });
|
|
16
16
|
if (!run.success) {
|
|
17
|
-
return { content: [{ type: 'text', text: `✗ 查询失败: ${run.detail || '
|
|
17
|
+
return { content: [{ type: 'text', text: `✗ 查询失败: ${run.detail || 'cloudcc 命令执行失败'}` }] };
|
|
18
18
|
}
|
|
19
19
|
const classList = run.data || [];
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ async function publishClass({ className, projectPath = process.cwd() }) {
|
|
|
14
14
|
const resolvedPath = path.resolve(projectPath);
|
|
15
15
|
const run = runCcCommand(['publish', 'classes', className], { cwd: resolvedPath });
|
|
16
16
|
if (!run.success) {
|
|
17
|
-
return { content: [{ type: 'text', text: `✗ 发布失败: ${buildRunDetail(run) || '
|
|
17
|
+
return { content: [{ type: 'text', text: `✗ 发布失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
18
18
|
}
|
|
19
19
|
return { content: [{ type: 'text', text: `✓ 发布成功!类 ${className} 已发布到服务器` }] };
|
|
20
20
|
} catch (error) {
|
|
@@ -14,7 +14,7 @@ async function pullClass({ className, projectPath = process.cwd() }) {
|
|
|
14
14
|
const resolvedPath = path.resolve(projectPath);
|
|
15
15
|
const run = runCcCommand(['pull', 'classes', className], { cwd: resolvedPath });
|
|
16
16
|
if (!run.success) {
|
|
17
|
-
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || '
|
|
17
|
+
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
18
18
|
}
|
|
19
19
|
return { content: [{ type: 'text', text: `✓ 拉取成功!本地文件已更新: classes/${className}/${className}.java` }] };
|
|
20
20
|
} catch (error) {
|
|
@@ -30,7 +30,7 @@ async function listClientScripts({ projectPath = process.cwd(), condition = {} }
|
|
|
30
30
|
return {
|
|
31
31
|
content: [{
|
|
32
32
|
type: 'text',
|
|
33
|
-
text: `✗ 查询失败: ${run.detail || '
|
|
33
|
+
text: `✗ 查询失败: ${run.detail || 'cloudcc 命令执行失败'}\n\n可能的原因:\n- 项目路径不正确\n- 网络连接问题\n- 服务器API不可用`
|
|
34
34
|
}]
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -29,7 +29,7 @@ async function publishClientScript({ scriptPath, projectPath = process.cwd() })
|
|
|
29
29
|
return {
|
|
30
30
|
content: [{
|
|
31
31
|
type: 'text',
|
|
32
|
-
text: `✗ 发布失败: ${buildRunDetail(run) || '
|
|
32
|
+
text: `✗ 发布失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}\n\n可能的原因:\n- 脚本文件不存在\n- 脚本格式不正确(必须包含 function main($CCDK, obj) 函数)\n- 网络连接问题\n- 服务器API不可用`
|
|
33
33
|
}]
|
|
34
34
|
};
|
|
35
35
|
}
|
|
@@ -31,7 +31,7 @@ async function pullClientScript({ scriptPath, scriptId, projectPath = process.cw
|
|
|
31
31
|
if (scriptId) {
|
|
32
32
|
const run = runCcCommand(['pullList', 'script', scriptId, resolvedPath], { cwd: resolvedPath });
|
|
33
33
|
if (!run.success) {
|
|
34
|
-
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || '
|
|
34
|
+
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
35
35
|
}
|
|
36
36
|
return {
|
|
37
37
|
content: [{
|
|
@@ -42,7 +42,7 @@ async function pullClientScript({ scriptPath, scriptId, projectPath = process.cw
|
|
|
42
42
|
}
|
|
43
43
|
const run = runCcCommand(['pull', 'script', scriptPath], { cwd: resolvedPath });
|
|
44
44
|
if (!run.success) {
|
|
45
|
-
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || '
|
|
45
|
+
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
46
46
|
}
|
|
47
47
|
return {
|
|
48
48
|
content: [{
|
|
@@ -26,7 +26,7 @@ async function getCloudCCDevelopmentOverview({ }) {
|
|
|
26
26
|
return {
|
|
27
27
|
content: [{
|
|
28
28
|
type: 'text',
|
|
29
|
-
text: `✗ 获取 CloudCC 开发项目概要失败: ${buildRunDetail(run) || '
|
|
29
|
+
text: `✗ 获取 CloudCC 开发项目概要失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}`
|
|
30
30
|
}]
|
|
31
31
|
};
|
|
32
32
|
}
|
|
@@ -18,7 +18,7 @@ async function createCustomComponent({ pluginName, projectPath = process.cwd() }
|
|
|
18
18
|
return {
|
|
19
19
|
content: [{
|
|
20
20
|
type: 'text',
|
|
21
|
-
text: `✗ 创建失败: ${buildRunDetail(run) || '
|
|
21
|
+
text: `✗ 创建失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}`
|
|
22
22
|
}]
|
|
23
23
|
};
|
|
24
24
|
}
|
|
@@ -21,7 +21,7 @@ async function getCustomComponentDetail({ pluginName, pluginId, projectPath = pr
|
|
|
21
21
|
return {
|
|
22
22
|
content: [{
|
|
23
23
|
type: 'text',
|
|
24
|
-
text: `✗ 获取失败: ${run.detail || '
|
|
24
|
+
text: `✗ 获取失败: ${run.detail || 'cloudcc 命令执行失败'}\n\n可能的原因:\n- 组件不存在\n- 组件名称或ID不正确\n- 网络连接问题`
|
|
25
25
|
}]
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -17,7 +17,7 @@ async function listCustomComponents({ projectPath = process.cwd() }) {
|
|
|
17
17
|
return {
|
|
18
18
|
content: [{
|
|
19
19
|
type: 'text',
|
|
20
|
-
text: `✗ 查询失败: ${run.detail || '
|
|
20
|
+
text: `✗ 查询失败: ${run.detail || 'cloudcc 命令执行失败'}\n\n可能的原因:\n- 项目路径不正确\n- 网络连接问题\n- 服务器API不可用`
|
|
21
21
|
}]
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -22,7 +22,7 @@ async function publishCustomComponent({ componentName, projectPath = process.cwd
|
|
|
22
22
|
return {
|
|
23
23
|
content: [{
|
|
24
24
|
type: 'text',
|
|
25
|
-
text: `✗ 发布失败: ${detail || '
|
|
25
|
+
text: `✗ 发布失败: ${detail || 'cloudcc 命令执行失败'}`
|
|
26
26
|
}]
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -30,7 +30,7 @@ async function publishCustomComponent({ componentName, projectPath = process.cwd
|
|
|
30
30
|
return {
|
|
31
31
|
content: [{
|
|
32
32
|
type: 'text',
|
|
33
|
-
text: `✓ 自定义组件发布成功\n\n调用命令:
|
|
33
|
+
text: `✓ 自定义组件发布成功\n\n调用命令: cloudcc publish plugin ${componentName}\n执行目录: ${resolvedPath}\n组件名称: ${componentName}\n\n执行过程:\n1. 编译 Vue 组件\n2. 收集依赖文件\n3. 上传到 CloudCC 服务器`
|
|
34
34
|
}]
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -34,7 +34,7 @@ async function pullCustomComponent({ componentName, componentId, projectPath = p
|
|
|
34
34
|
return {
|
|
35
35
|
content: [{
|
|
36
36
|
type: 'text',
|
|
37
|
-
text: `✗ 拉取失败: ${buildRunDetail(run) || '
|
|
37
|
+
text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}`
|
|
38
38
|
}]
|
|
39
39
|
};
|
|
40
40
|
}
|
|
@@ -12,7 +12,7 @@ async function getDevEnvSetup(params = {}) {
|
|
|
12
12
|
try {
|
|
13
13
|
const run = runCcCommand(['doc', 'project', 'dev-env-creator', JSON.stringify(params || {})]);
|
|
14
14
|
if (!run.success) {
|
|
15
|
-
return { content: [{ type: 'text', text: `错误: ${buildRunDetail(run) || '
|
|
15
|
+
return { content: [{ type: 'text', text: `错误: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
16
16
|
}
|
|
17
17
|
return { content: [{ type: 'text', text: run.stdout || '' }] };
|
|
18
18
|
} catch (error) {
|