cloudcc-cli 2.3.4 → 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/.claude/settings.json +22 -1
- package/.cursor/skills/cloudcc-cli-dev/SKILL.md +175 -0
- package/.cursor/skills/cloudcc-dev-skill/SKILL.md +71 -0
- package/README.md +81 -6
- package/bin/cc.js +106 -28
- package/bin/index.js +54 -55
- package/mcp/cliRunner.js +11 -4
- package/mcp/index.js +12 -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 +2 -2
- 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/JSP Migrator/handler.js +46 -0
- 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 -3
- 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 +169 -0
- package/src/button/delete.js +35 -0
- package/src/button/doc.js +36 -0
- package/src/button/docs/devguide.md +133 -0
- package/src/button/docs/introduction.md +60 -0
- package/src/button/get.js +60 -0
- package/src/button/index.js +20 -0
- 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/docs/introduction.md +0 -20
- 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 +78 -0
- package/src/identityProvider/delete.js +61 -0
- package/src/identityProvider/doc.js +46 -0
- package/src/identityProvider/docs/devguide.md +107 -0
- package/src/identityProvider/docs/introduction.md +31 -0
- package/src/identityProvider/download.js +105 -0
- package/src/identityProvider/get.js +70 -0
- package/src/identityProvider/index.js +12 -0
- 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 +164 -0
- package/src/permission/assign.js +84 -0
- package/src/permission/docs/devguide.md +238 -0
- package/src/permission/docs/introduction.md +200 -0
- package/src/permission/get.js +107 -0
- package/src/permission/index.js +10 -0
- package/src/permission/remove.js +145 -0
- 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 +9 -8
- 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 +61 -0
- package/src/singleSignOn/doc.js +46 -0
- package/src/singleSignOn/docs/devguide.md +61 -0
- package/src/singleSignOn/docs/introduction.md +3 -0
- package/src/singleSignOn/get.js +70 -0
- package/src/singleSignOn/index.js +10 -0
- 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/docs/introduction.md +44 -1
- 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 +7 -7
- 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 +25 -0
- package/src/version/docs.js +26 -0
- package/src/version/doctor.js +25 -0
- package/src/version/get.js +1 -1
- package/src/version/help.js +48 -0
- package/src/version/index.js +9 -2
- package/src/version/initHelp.js +13 -0
- package/src/version/listModuleCommands.js +241 -0
- package/src/version/stats.js +44 -0
- package/src/version/uninstall.js +30 -0
- package/src/version/update.js +13 -0
- 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 +27 -2
- package/utils/commandStats.js +94 -0
- package/utils/formatReleaseNotes.js +312 -0
- package/utils/readmeReleases.js +69 -0
- package/.cloudcc-cache.json +0 -54
- package/.cursor/skills/cloudcc-cli-dev.zip +0 -0
- package/.cursor/skills/cloudcc-dev-usage/SKILL.md +0 -68
- package/build/component-cc-cc-dd.common.js +0 -831
- package/build/component-cc-cc-dd.common.js.map +0 -1
- package/build/component-cc-cc-dd.css +0 -1
- package/build/component-cc-cc-dd.umd.js +0 -874
- package/build/component-cc-cc-dd.umd.js.map +0 -1
- package/build/component-cc-cc-dd.umd.min.js +0 -8
- package/build/component-cc-cc-dd.umd.min.js.map +0 -1
- package/build/demo.html +0 -1
- package/plugins/cc-cc-dd/cc-cc-dd.vue +0 -32
- package/plugins/cc-cc-dd/components/HelloWorld.vue +0 -11
- package/plugins/cc-cc-dd/config.json +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CloudCC 自定义设置操作指南
|
|
2
2
|
|
|
3
|
-
直接查看 CLI 文档:`
|
|
3
|
+
直接查看 CLI 文档:`cloudcc doc customSetting`
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
#### 1) 查询自定义设置列表
|
|
63
63
|
命令:
|
|
64
64
|
```bash
|
|
65
|
-
|
|
65
|
+
cloudcc get customSetting <projectPath> [encodedCondJson]
|
|
66
66
|
```
|
|
67
67
|
请求参数:
|
|
68
68
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -72,7 +72,7 @@ cc get customSetting <projectPath> [encodedCondJson]
|
|
|
72
72
|
#### 2) 查询自定义设置详情(含字段列表)
|
|
73
73
|
命令:
|
|
74
74
|
```bash
|
|
75
|
-
|
|
75
|
+
cloudcc detail customSetting <projectPath> <settingId>
|
|
76
76
|
```
|
|
77
77
|
请求参数:
|
|
78
78
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -82,7 +82,7 @@ cc detail customSetting <projectPath> <settingId>
|
|
|
82
82
|
#### 3) 新建/更新自定义设置主对象
|
|
83
83
|
命令:
|
|
84
84
|
```bash
|
|
85
|
-
|
|
85
|
+
cloudcc create customSetting <projectPath> <encodedBodyJson>
|
|
86
86
|
```
|
|
87
87
|
请求参数:
|
|
88
88
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -101,7 +101,7 @@ cc create customSetting <projectPath> <encodedBodyJson>
|
|
|
101
101
|
#### 4) 编辑前回显主对象表单数据
|
|
102
102
|
命令:
|
|
103
103
|
```bash
|
|
104
|
-
|
|
104
|
+
cloudcc modify customSetting <projectPath> <settingId>
|
|
105
105
|
```
|
|
106
106
|
请求参数:
|
|
107
107
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -111,7 +111,7 @@ cc modify customSetting <projectPath> <settingId>
|
|
|
111
111
|
#### 5) 删除自定义设置主对象
|
|
112
112
|
命令:
|
|
113
113
|
```bash
|
|
114
|
-
|
|
114
|
+
cloudcc delete customSetting <projectPath> <settingId>
|
|
115
115
|
```
|
|
116
116
|
请求参数:
|
|
117
117
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -123,7 +123,7 @@ cc delete customSetting <projectPath> <settingId>
|
|
|
123
123
|
#### 6) 进入字段编辑(取字段编辑所需数据)
|
|
124
124
|
命令:
|
|
125
125
|
```bash
|
|
126
|
-
|
|
126
|
+
cloudcc editCustomSettingField customSetting <projectPath> <queryrecordid>
|
|
127
127
|
```
|
|
128
128
|
请求参数:
|
|
129
129
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -133,7 +133,7 @@ cc editCustomSettingField customSetting <projectPath> <queryrecordid>
|
|
|
133
133
|
#### 7) 保存字段(新增/编辑字段)
|
|
134
134
|
命令:
|
|
135
135
|
```bash
|
|
136
|
-
|
|
136
|
+
cloudcc saveCustomSettingField customSetting <projectPath> <encodedBodyJson>
|
|
137
137
|
```
|
|
138
138
|
请求参数:
|
|
139
139
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -160,7 +160,7 @@ cc saveCustomSettingField customSetting <projectPath> <encodedBodyJson>
|
|
|
160
160
|
#### 8) 删除自定义字段
|
|
161
161
|
命令:
|
|
162
162
|
```bash
|
|
163
|
-
|
|
163
|
+
cloudcc deleteCustomSettingField customSetting <projectPath> <fieldId> <settingId>
|
|
164
164
|
```
|
|
165
165
|
请求参数:
|
|
166
166
|
| 参数名称 | 类型 | 是否必须 | 默认值 | 备注 |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 自定义设置字段 - 进入字段编辑(取字段编辑所需数据)
|
|
3
3
|
* API: POST {setupSvc}/api/customsetting/editfile
|
|
4
|
-
* CLI:
|
|
4
|
+
* CLI: cloudcc editCustomSettingField customSetting <projectPath> <queryrecordid>
|
|
5
5
|
* 参数说明:
|
|
6
6
|
* - projectPath: 项目根目录
|
|
7
7
|
* - queryrecordid: 字段行 id
|
package/src/customSetting/get.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 自定义设置 - 查询列表
|
|
3
3
|
* API: POST {setupSvc}/api/customsetting/list
|
|
4
|
-
* CLI:
|
|
4
|
+
* CLI: cloudcc get customSetting <projectPath> [encodedCondJson]
|
|
5
5
|
* 参数说明:
|
|
6
6
|
* - projectPath: 项目根目录
|
|
7
7
|
* - encodedCondJson(可选): encodeURI(JSON.stringify(body))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 自定义设置 - 编辑前回显(主对象)
|
|
3
3
|
* API: POST {setupSvc}/api/customsetting/modify
|
|
4
|
-
* CLI:
|
|
4
|
+
* CLI: cloudcc modify customSetting <projectPath> <settingId>
|
|
5
5
|
* 参数说明:
|
|
6
6
|
* - projectPath: 项目根目录
|
|
7
7
|
* - objid(命令参数名 settingId): 自定义设置 id
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 自定义设置字段 - 保存字段(新增/编辑)
|
|
3
3
|
* API: POST {setupSvc}/api/customsetting/saveField
|
|
4
|
-
* CLI:
|
|
4
|
+
* CLI: cloudcc saveCustomSettingField customSetting <projectPath> <encodedBodyJson>
|
|
5
5
|
* 参数说明:
|
|
6
6
|
* - projectPath: 项目根目录
|
|
7
7
|
* - encodedBodyJson: encodeURI(JSON.stringify(body))
|
package/src/fields/delete.js
CHANGED
|
@@ -4,7 +4,7 @@ const { getPackageJson } = require("../../utils/config");
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 删除字段(彻底删除)
|
|
7
|
-
* 用法:
|
|
7
|
+
* 用法:cloudcc delete fields <projectPath> <fieldId> <objid>
|
|
8
8
|
*/
|
|
9
9
|
async function remove(argvs) {
|
|
10
10
|
const projectPath = argvs[2] || process.cwd();
|
|
@@ -14,7 +14,7 @@ async function remove(argvs) {
|
|
|
14
14
|
if (!id || !objid) {
|
|
15
15
|
console.error();
|
|
16
16
|
console.error(chalk.red("Error: fieldId and objid are required"));
|
|
17
|
-
console.error(chalk.yellow("Usage:
|
|
17
|
+
console.error(chalk.yellow("Usage: cloudcc delete fields <projectPath> <fieldId> <objid>"));
|
|
18
18
|
console.error();
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
可通过以下命令读取文档:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
cloudcc doc fields introduction
|
|
11
|
+
cloudcc doc fields devguide
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
---
|
|
@@ -16,9 +16,9 @@ cc doc fields devguide
|
|
|
16
16
|
## 2. 当前支持的命令
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
cloudcc get fields <projectPath> <objPrefix>
|
|
20
|
+
cloudcc create fields <projectPath> <fieldType> <objid> <fieldLabel> [extraArg]
|
|
21
|
+
cloudcc delete fields <projectPath> <fieldId> <objid>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
说明:
|
|
@@ -43,7 +43,7 @@ cc delete fields <projectPath> <fieldId> <objid>
|
|
|
43
43
|
### 3.1 基本命令
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
46
|
+
cloudcc get fields <projectPath> <objPrefix>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
返回结果包含:
|
|
@@ -66,7 +66,7 @@ cc get fields <projectPath> <objPrefix>
|
|
|
66
66
|
### 4.1 基本命令
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
|
|
69
|
+
cloudcc create fields <projectPath> <fieldType> <objid> <fieldLabel> [extraArg]
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
建议:
|
|
@@ -119,8 +119,8 @@ cc create fields <projectPath> <fieldType> <objid> <fieldLabel> [extraArg]
|
|
|
119
119
|
这两类字段创建时都需要额外的选项值参数:
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
cloudcc create fields <projectPath> L <objid> <fieldLabel> <ptext>
|
|
123
|
+
cloudcc create fields <projectPath> Q <objid> <fieldLabel> <ptext>
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
其中 `ptext` 表示选项内容,通常用于传入候选值集合。
|
|
@@ -144,9 +144,9 @@ cc create fields <projectPath> Q <objid> <fieldLabel> <ptext>
|
|
|
144
144
|
这三类字段创建时都需要额外传入目标对象参数:
|
|
145
145
|
|
|
146
146
|
```bash
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
cloudcc create fields <projectPath> Y <objid> <fieldLabel> <lookupObj>
|
|
148
|
+
cloudcc create fields <projectPath> MR <objid> <fieldLabel> <lookupObj>
|
|
149
|
+
cloudcc create fields <projectPath> M <objid> <fieldLabel> <lookupObj>
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
其中 `lookupObj` 表示被关联对象。
|
|
@@ -196,7 +196,7 @@ cc create fields <projectPath> M <objid> <fieldLabel> <lookupObj>
|
|
|
196
196
|
### 5.1 基本命令
|
|
197
197
|
|
|
198
198
|
```bash
|
|
199
|
-
|
|
199
|
+
cloudcc delete fields <projectPath> <fieldId> <objid>
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
删除前建议:
|
|
@@ -209,7 +209,7 @@ cc delete fields <projectPath> <fieldId> <objid>
|
|
|
209
209
|
|
|
210
210
|
## 6. 开发前检查
|
|
211
211
|
|
|
212
|
-
- 已完成 `
|
|
212
|
+
- 已完成 `cloudcc doc project devguide` 中的环境准备
|
|
213
213
|
- 项目根目录存在可用的 `cloudcc-cli.config.js`
|
|
214
214
|
- 当前环境密钥配置正确
|
|
215
215
|
- 已确认对象 API 名称、字段类型和命名规则
|
|
@@ -46,8 +46,8 @@ CloudCC 对象上的字段通常分为两类:
|
|
|
46
46
|
可通过以下命令读取文档:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
cloudcc doc fields introduction
|
|
50
|
+
cloudcc doc fields devguide
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
---
|
|
@@ -129,7 +129,7 @@ cc doc fields devguide
|
|
|
129
129
|
- CloudCC 平台支持的完整字段能力
|
|
130
130
|
- 当前 CLI 已实现的字段创建能力
|
|
131
131
|
|
|
132
|
-
命令开发与自动化脚本,应以 `
|
|
132
|
+
命令开发与自动化脚本,应以 `cloudcc doc fields devguide` 中列出的“当前 CLI
|
|
133
133
|
支持字段类型”为准。
|
|
134
134
|
|
|
135
135
|
---
|
|
@@ -3,7 +3,7 @@ const { getPackageJson } = require("../../utils/config");
|
|
|
3
3
|
const { postClass } = require("../../utils/http");
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* cloudcc create globalSelectList [projectPath] [encodedBodyJson]
|
|
7
7
|
*
|
|
8
8
|
* encodedBodyJson 示例(URI 编码前):
|
|
9
9
|
* {
|
|
@@ -3,7 +3,7 @@ const { getPackageJson } = require("../../utils/config");
|
|
|
3
3
|
const { postClass } = require("../../utils/http");
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* cloudcc delete globalSelectList [projectPath] [id]
|
|
7
7
|
*
|
|
8
8
|
* 删除逻辑:
|
|
9
9
|
* 1. 先以 deleteFromDisk=false 执行软删除
|
|
@@ -27,14 +27,14 @@ function getDevGuideDoc() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* cloudcc doc globalSelectList <introduction|devguide>
|
|
31
31
|
* @param {string[]} argvs [doc, type, introduction|devguide, ...]
|
|
32
32
|
*/
|
|
33
33
|
function doc(argvs) {
|
|
34
34
|
const subType = argvs[2];
|
|
35
35
|
const key = String(subType || "").trim().toLowerCase();
|
|
36
36
|
if (!key) {
|
|
37
|
-
throw new Error("
|
|
37
|
+
throw new Error("cloudcc doc globalSelectList 需要子命令:introduction 或 devguide");
|
|
38
38
|
}
|
|
39
39
|
if (key === "introduction") {
|
|
40
40
|
const content = getIntroductionDoc();
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
参数使用 `encodeURI` 编码后传入(保留 `"` 和 `:` 等 JSON 必要字符):
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
|
|
38
|
+
cloudcc create globalSelectList . '%7B%22label%22:%22%E5%AE%A2%E6%88%B7%E7%AD%89%E7%BA%A7%22,%22name%22:%22customer_level%22,%22description%22:%22%E5%AE%A2%E6%88%B7%E7%AD%89%E7%BA%A7%E5%88%86%E7%B1%BB%22,%22ptext%22:%22%E6%99%AE%E9%80%9A%5Cr%5Cn%E9%93%B6%E7%89%8C%5Cr%5Cn%E9%87%91%E7%89%8C%22,%22isPicklistSorted%22:%220%22,%22isFirstDefault%22:%220%22%7D'
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
原始 JSON(`encodeURI` 编码前):
|
|
@@ -59,10 +59,10 @@ cc create globalSelectList . '%7B%22label%22:%22%E5%AE%A2%E6%88%B7%E7%AD%89%E7%B
|
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
61
|
# 获取全部列表(默认分页 pageSize=10000)
|
|
62
|
-
|
|
62
|
+
cloudcc get globalSelectList
|
|
63
63
|
|
|
64
64
|
# 指定项目路径
|
|
65
|
-
|
|
65
|
+
cloudcc get globalSelectList /path/to/project
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
返回结果为 `globalSelectList` 数组,每条记录包含:
|
|
@@ -85,7 +85,7 @@ cc get globalSelectList /path/to/project
|
|
|
85
85
|
## 4. 查看详情
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
|
|
88
|
+
cloudcc detail globalSelectList . <id>
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
- `<id>`:全局选项列表的 ID,可从列表接口返回值中获取
|
|
@@ -129,7 +129,7 @@ cc detail globalSelectList . <id>
|
|
|
129
129
|
## 5. 删除全局选项列表
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
|
-
|
|
132
|
+
cloudcc delete globalSelectList . <id>
|
|
133
133
|
```
|
|
134
134
|
|
|
135
135
|
删除逻辑分两步自动处理:
|
|
@@ -144,10 +144,10 @@ cc delete globalSelectList . <id>
|
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
146
|
# 查看能力介绍
|
|
147
|
-
|
|
147
|
+
cloudcc doc globalSelectList introduction
|
|
148
148
|
|
|
149
149
|
# 查看操作指南(本文)
|
|
150
|
-
|
|
150
|
+
cloudcc doc globalSelectList devguide
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
|
|
@@ -2,7 +2,7 @@ const { getPackageJson } = require("../../utils/config");
|
|
|
2
2
|
const { postClass } = require("../../utils/http");
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* cloudcc get globalSelectList [projectPath] [encodedCondJson]
|
|
6
6
|
* @param {string} projectPath
|
|
7
7
|
* @param {string} encodedCondJson
|
|
8
8
|
* @param {boolean} isMcp
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const chalk = require("chalk");
|
|
2
|
+
const { postClass } = require("../../utils/http");
|
|
3
|
+
const { getPackageJson } = require("../../utils/config");
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 创建身份提供商
|
|
7
|
+
* 接口: /samlSp/save
|
|
8
|
+
* 用法:cloudcc create identityProvider <path> <entityid> <acsurl>
|
|
9
|
+
*/
|
|
10
|
+
async function create(argvs) {
|
|
11
|
+
try {
|
|
12
|
+
const projectPath = argvs[2] || process.cwd();
|
|
13
|
+
const entityid = argvs[3];
|
|
14
|
+
const acsurl = argvs[4];
|
|
15
|
+
|
|
16
|
+
if (!entityid || !acsurl) {
|
|
17
|
+
console.error();
|
|
18
|
+
console.error(chalk.red("Error: 缺少必需参数"));
|
|
19
|
+
console.error(chalk.yellow("用法: cloudcc create identityProvider <path> <entityid> <acsurl>"));
|
|
20
|
+
console.error(chalk.yellow("示例: cloudcc create identityProvider . 'http://testdev.cloudcc.cn/ccdomaingateway/apisvc' 'http://testdev.cloudcc.cn/ccdomaingateway/apisvc/saml2/sp/sso/acs'"));
|
|
21
|
+
console.error();
|
|
22
|
+
throw new Error("缺少必需参数: entityid 和 acsurl");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const config = await getPackageJson(projectPath);
|
|
26
|
+
if (!config || !config.accessToken) {
|
|
27
|
+
console.error();
|
|
28
|
+
console.error(chalk.red("Error: 配置未找到或 accessToken 缺失"));
|
|
29
|
+
console.error();
|
|
30
|
+
throw new Error("配置未找到或 accessToken 缺失");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
console.error();
|
|
34
|
+
console.error(chalk.green(`Creating identity provider, please wait...`));
|
|
35
|
+
console.error();
|
|
36
|
+
|
|
37
|
+
// 构建请求参数
|
|
38
|
+
const body = {
|
|
39
|
+
entityid: entityid,
|
|
40
|
+
acsurl: acsurl,
|
|
41
|
+
issuername: "",
|
|
42
|
+
nameidtype: "FederationId",
|
|
43
|
+
nameidformat: "1",
|
|
44
|
+
enablelogout: false,
|
|
45
|
+
logouturl: "",
|
|
46
|
+
custattrname: "",
|
|
47
|
+
id: ""
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const res = await postClass(
|
|
51
|
+
config.setupSvc + "/api/samlSp/save",
|
|
52
|
+
body,
|
|
53
|
+
config.accessToken
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
if (res && res.result) {
|
|
57
|
+
console.error();
|
|
58
|
+
console.error(chalk.green("Success! Identity provider created."));
|
|
59
|
+
if (res.data) {
|
|
60
|
+
console.error(chalk.gray(`Response: ${JSON.stringify(res.data, null, 2)}`));
|
|
61
|
+
}
|
|
62
|
+
console.error();
|
|
63
|
+
return res;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const msg = res && (res.returnInfo || res.message) ? (res.returnInfo || res.message) : "Unknown error";
|
|
67
|
+
console.error();
|
|
68
|
+
console.error(chalk.red("Error: " + msg));
|
|
69
|
+
console.error();
|
|
70
|
+
throw new Error("Create IdentityProvider Failed: " + msg);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
console.error();
|
|
73
|
+
console.error(chalk.red("身份提供商创建失败:"), error.message || error);
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
module.exports = create;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const chalk = require("chalk");
|
|
2
|
+
const { postClass } = require("../../utils/http");
|
|
3
|
+
const { getPackageJson } = require("../../utils/config");
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 删除身份提供商
|
|
7
|
+
* 接口: /samlSp/delete
|
|
8
|
+
* 用法:cloudcc delete identityProvider <projectPath> <appId>
|
|
9
|
+
*/
|
|
10
|
+
async function remove(argvs) {
|
|
11
|
+
try {
|
|
12
|
+
const projectPath = argvs[2] || process.cwd();
|
|
13
|
+
const appId = argvs[3];
|
|
14
|
+
|
|
15
|
+
if (!appId) {
|
|
16
|
+
console.error();
|
|
17
|
+
console.error(chalk.red("Error: 缺少身份提供商 app ID"));
|
|
18
|
+
console.error(chalk.yellow("用法: cloudcc delete identityProvider <projectPath> <appId>"));
|
|
19
|
+
console.error(chalk.yellow("示例: cloudcc delete identityProvider . QbjH30d9Oy"));
|
|
20
|
+
console.error();
|
|
21
|
+
throw new Error("缺少必需参数: appId");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const config = await getPackageJson(projectPath);
|
|
25
|
+
if (!config || !config.accessToken) {
|
|
26
|
+
console.error();
|
|
27
|
+
console.error(chalk.red("Error: 配置未找到或 accessToken 缺失"));
|
|
28
|
+
console.error();
|
|
29
|
+
throw new Error("配置未找到或 accessToken 缺失");
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
console.error();
|
|
33
|
+
console.error(chalk.green(`Deleting identity provider (${appId}), please wait...`));
|
|
34
|
+
console.error();
|
|
35
|
+
|
|
36
|
+
const result = await postClass(
|
|
37
|
+
config.setupSvc + "/api/samlSp/delete",
|
|
38
|
+
{ app: appId },
|
|
39
|
+
config.accessToken
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
if (result && result.result) {
|
|
43
|
+
console.error();
|
|
44
|
+
console.error(chalk.green("Success! Identity provider deleted."));
|
|
45
|
+
console.error();
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const msg = result && (result.returnInfo || result.message) ? (result.returnInfo || result.message) : "Unknown error";
|
|
50
|
+
console.error();
|
|
51
|
+
console.error(chalk.red("Error: " + msg));
|
|
52
|
+
console.error();
|
|
53
|
+
throw new Error("Delete IdentityProvider Failed: " + msg);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
console.error();
|
|
56
|
+
console.error(chalk.red("身份提供商删除失败:"), error);
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = remove;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* identityProvider 文档入口:正文均在 `docs/` 目录。
|
|
3
|
+
*/
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
|
|
7
|
+
const DOCS_DIR = path.join(__dirname, "docs");
|
|
8
|
+
|
|
9
|
+
function readDocFile(basename) {
|
|
10
|
+
return fs.readFileSync(path.join(DOCS_DIR, `${basename}.md`), "utf8");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** 介绍文档:身份提供商能力、类型与入口 */
|
|
14
|
+
function getIntroductionDoc() {
|
|
15
|
+
return readDocFile("introduction");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** 开发指导:CLI 创建/查询/删除等 */
|
|
19
|
+
function getDevGuideDoc() {
|
|
20
|
+
return readDocFile("devguide");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* cloudcc doc identityProvider <introduction|devguide>
|
|
25
|
+
* @param {string[]} argvs [doc, type, introduction|devguide, ...]
|
|
26
|
+
*/
|
|
27
|
+
function doc(argvs) {
|
|
28
|
+
const subType = argvs[2];
|
|
29
|
+
const key = String(subType || "").trim().toLowerCase();
|
|
30
|
+
if (!key) {
|
|
31
|
+
throw new Error("cloudcc doc identityProvider 需要子命令:introduction 或 devguide");
|
|
32
|
+
}
|
|
33
|
+
if (key === "introduction") {
|
|
34
|
+
const content = getIntroductionDoc();
|
|
35
|
+
console.log(content);
|
|
36
|
+
return content;
|
|
37
|
+
}
|
|
38
|
+
if (key === "devguide") {
|
|
39
|
+
const content = getDevGuideDoc();
|
|
40
|
+
console.log(content);
|
|
41
|
+
return content;
|
|
42
|
+
}
|
|
43
|
+
throw new Error(`doc 不支持的子命令: ${subType},请使用 introduction 或 devguide`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
module.exports = doc;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# CloudCC 身份提供商 CLI 命令说明
|
|
2
|
+
|
|
3
|
+
## 支持的命令
|
|
4
|
+
|
|
5
|
+
| 操作 | 说明 |
|
|
6
|
+
|------|------|
|
|
7
|
+
| `create` | 创建新身份提供商 |
|
|
8
|
+
| `get` | 查询身份提供商列表 |
|
|
9
|
+
| `delete` | 删除身份提供商 |
|
|
10
|
+
| `download` | 下载身份提供商证书 |
|
|
11
|
+
|
|
12
|
+
## CLI 命令详解
|
|
13
|
+
|
|
14
|
+
### 创建身份提供商
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
cloudcc create identityProvider <path> <entityid> <acsurl>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**参数说明:**
|
|
21
|
+
|
|
22
|
+
| 参数 | 必填 | 说明 |
|
|
23
|
+
|------|------|------|
|
|
24
|
+
| `path` | 是 | 项目路径,`.` 表示当前目录 |
|
|
25
|
+
| `entityid` | 是 | 实体 ID(Service Provider Entity ID)|
|
|
26
|
+
| `acsurl` | 是 | ACS URL(Assertion Consumer Service URL)|
|
|
27
|
+
|
|
28
|
+
**示例:**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 创建身份提供商
|
|
32
|
+
cloudcc create identityProvider . "http://testdev.cloudcc.cn/ccdomaingateway/apisvc" "http://testdev.cloudcc.cn/ccdomaingateway/apisvc/saml2/sp/sso/acs"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 查询身份提供商列表
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cloudcc get identityProvider <projectPath> [encodedCondJson]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**参数说明:**
|
|
42
|
+
|
|
43
|
+
| 参数 | 必填 | 说明 |
|
|
44
|
+
|------|------|------|
|
|
45
|
+
| `projectPath` | 否 | 项目路径,默认当前目录 |
|
|
46
|
+
| `encodedCondJson` | 否 | URI 编码后的查询条件 JSON |
|
|
47
|
+
|
|
48
|
+
**查询条件参数:**
|
|
49
|
+
|
|
50
|
+
| 参数名 | 类型 | 说明 |
|
|
51
|
+
|--------|------|------|
|
|
52
|
+
| `start` | number | 起始位置,默认 0 |
|
|
53
|
+
| `limit` | number | 每页条数,默认 30 |
|
|
54
|
+
| `keyword` | string | 搜索关键词 |
|
|
55
|
+
|
|
56
|
+
**示例:**
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# 获取所有身份提供商
|
|
60
|
+
cloudcc get identityProvider .
|
|
61
|
+
|
|
62
|
+
# 带查询条件(搜索关键词)
|
|
63
|
+
cloudcc get identityProvider . '%7B%22keyword%22%3A%22test%22%2C%22limit%22%3A50%7D'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 删除身份提供商
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
cloudcc delete identityProvider <projectPath> <appId>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**参数说明:**
|
|
73
|
+
|
|
74
|
+
| 参数 | 必填 | 说明 |
|
|
75
|
+
|------|------|------|
|
|
76
|
+
| `projectPath` | 否 | 项目路径,默认当前目录 |
|
|
77
|
+
| `appId` | 是 | 身份提供商的 app 字段值(从列表接口获取)|
|
|
78
|
+
|
|
79
|
+
**示例:**
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# 删除身份提供商
|
|
83
|
+
cloudcc delete identityProvider . QbjH30d9Oy
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 下载身份提供商证书
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
cloudcc download identityProvider <projectPath> [savePath]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**参数说明:**
|
|
93
|
+
|
|
94
|
+
| 参数 | 必填 | 说明 |
|
|
95
|
+
|------|------|------|
|
|
96
|
+
| `projectPath` | 否 | 项目路径,默认当前目录 |
|
|
97
|
+
| `savePath` | 否 | 证书保存路径,默认当前目录 |
|
|
98
|
+
|
|
99
|
+
**示例:**
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# 下载证书到当前目录
|
|
103
|
+
cloudcc download identityProvider .
|
|
104
|
+
|
|
105
|
+
# 下载证书到指定路径
|
|
106
|
+
cloudcc download identityProvider . ./certificates
|
|
107
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 身份提供商介绍
|
|
2
|
+
|
|
3
|
+
## 功能概述
|
|
4
|
+
|
|
5
|
+
身份提供商(Identity Provider)模块用于管理 CloudCC 平台的 SAML 身份提供商配置,支持以下功能:
|
|
6
|
+
|
|
7
|
+
- **查看身份提供商列表**:查询已配置的所有 SAML 身份提供商
|
|
8
|
+
- **新建身份提供商**:创建新的 SAML 身份提供商配置
|
|
9
|
+
- **删除身份提供商**:删除已配置的 SAML 身份提供商
|
|
10
|
+
- **下载证书**:下载身份提供商的 SAML 证书
|
|
11
|
+
|
|
12
|
+
## 适用场景
|
|
13
|
+
|
|
14
|
+
- 企业单点登录(SSO)集成
|
|
15
|
+
- SAML 2.0 身份提供商配置
|
|
16
|
+
- 多身份提供商管理
|
|
17
|
+
|
|
18
|
+
## 字段说明
|
|
19
|
+
|
|
20
|
+
### 身份提供商字段
|
|
21
|
+
|
|
22
|
+
| 字段名 | 说明 | 默认值 |
|
|
23
|
+
|--------|------|--------|
|
|
24
|
+
| `entityid` | Service Provider Entity ID | 用户输入 |
|
|
25
|
+
| `acsurl` | Assertion Consumer Service URL | 用户输入 |
|
|
26
|
+
| `issuername` | 签发者名称 | 空字符串 |
|
|
27
|
+
| `nameidtype` | Name ID 类型 | FederationId |
|
|
28
|
+
| `nameidformat` | Name ID 格式 | 1 |
|
|
29
|
+
| `enablelogout` | 启用注销 | false |
|
|
30
|
+
| `logouturl` | 注销 URL | 空字符串 |
|
|
31
|
+
| `custattrname` | 自定义属性名称 | 空字符串 |
|