cloudcc-cli 2.3.9 → 2.4.1
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/README.md +48 -0
- package/bin/cc.js +2 -1
- package/bin/index.js +1 -0
- package/cloudcc-dev-skill/SKILL.md +31 -8
- package/cloudcc-dev-skill/cloudcc-dev-html.md +42 -0
- package/cloudcc-dev-skill/config.json +2 -2
- package/mcp/index.js +10 -4
- package/mcp/tools/JSP Migrator/handler.js +51 -866
- package/mcp/tools/Object Creator/handler.js +14 -4
- package/mcp/tools/Trigger List Retriever/handler.js +24 -8
- package/package.json +1 -1
- package/src/classes/docs/devguide.md +863 -356
- package/src/classes/docs/introduction.md +279 -143
- package/src/jsp/analyze.js +17 -0
- package/src/jsp/doc.js +18 -0
- package/src/jsp/docs/devguide.md +111 -0
- package/src/jsp/docs/introduction.md +50 -0
- package/src/jsp/docs.js +21 -0
- package/src/jsp/index.js +14 -0
- package/src/jsp/migration.js +871 -0
- package/src/jsp/split.js +17 -0
- package/src/object/create.js +36 -10
- package/src/object/docs/devguide.md +6 -3
- package/src/project/docs/devguide.md +1 -1
- package/src/script/docs/devguide.md +22 -2
- package/src/timer/docs/devguide.md +1038 -400
- package/src/timer/docs/introduction.md +343 -231
- package/src/triggers/docs/devguide.md +1027 -329
- package/src/triggers/docs/introduction.md +640 -369
- package/src/triggers/get.js +8 -0
- package/src/version/listModuleCommands.js +6 -0
- package/target/classes/com/cloudcc/core/BaseException.class +0 -0
- package/target/classes/com/cloudcc/core/BusiException.class +0 -0
- package/target/classes/com/cloudcc/core/CCObject.class +0 -0
- package/target/classes/com/cloudcc/core/CCSchedule.class +0 -0
- package/target/classes/com/cloudcc/core/CCService.class +0 -0
- package/target/classes/com/cloudcc/core/CCTrigger.class +0 -0
- package/target/classes/com/cloudcc/core/CCTriggerHandler.class +0 -0
- package/target/classes/com/cloudcc/core/DevLogger.class +0 -0
- package/target/classes/com/cloudcc/core/OperatationEnum.class +0 -0
- package/target/classes/com/cloudcc/core/PeakInterf.class +0 -0
- package/target/classes/com/cloudcc/core/SendEmail.class +0 -0
- package/target/classes/com/cloudcc/core/ServiceResult.class +0 -0
- package/target/classes/com/cloudcc/core/StringUtils.class +0 -0
- package/target/classes/com/cloudcc/core/TimeUtil.class +0 -0
- package/target/classes/com/cloudcc/core/Tool$1.class +0 -0
- package/target/classes/com/cloudcc/core/Tool.class +0 -0
- package/target/classes/com/cloudcc/core/TriggerInvoker.class +0 -0
- package/target/classes/com/cloudcc/core/TriggerMethod.class +0 -0
- package/target/classes/com/cloudcc/core/TriggerTimeEnum.class +0 -0
- package/target/classes/com/cloudcc/core/UserInfo.class +0 -0
- package/test/jsp.cli.test.js +70 -0
- package/test/object.cli.test.js +9 -1
|
@@ -8,16 +8,26 @@ const { runCcCommand } = require('../../cliRunner');
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* 创建自定义对象
|
|
11
|
-
* @param {{label: string, projectPath?: string}} params
|
|
11
|
+
* @param {{label: string, projectPath?: string, businessDescription: string}} params
|
|
12
12
|
*/
|
|
13
13
|
async function createCustomObject(params = {}) {
|
|
14
|
-
const { label, projectPath } = params;
|
|
14
|
+
const { label, projectPath, businessDescription } = params;
|
|
15
15
|
if (!label) {
|
|
16
16
|
return { content: [{ type: 'text', text: '✗ 参数缺失: label (对象标签) 必须提供' }] };
|
|
17
17
|
}
|
|
18
|
+
if (!businessDescription || !String(businessDescription).trim()) {
|
|
19
|
+
return { content: [{ type: 'text', text: '✗ 参数缺失: businessDescription(业务功能描述)必填' }] };
|
|
20
|
+
}
|
|
18
21
|
|
|
19
22
|
const resolvedPath = path.resolve(projectPath || '.');
|
|
20
|
-
const
|
|
23
|
+
const argv = [
|
|
24
|
+
'create',
|
|
25
|
+
'object',
|
|
26
|
+
resolvedPath,
|
|
27
|
+
label,
|
|
28
|
+
String(businessDescription).trim()
|
|
29
|
+
];
|
|
30
|
+
const runResult = runCcCommand(argv, { cwd: resolvedPath });
|
|
21
31
|
|
|
22
32
|
if (!runResult.success) {
|
|
23
33
|
const detail = [runResult.error, runResult.stderr, runResult.stdout].filter(Boolean).join('\n');
|
|
@@ -32,7 +42,7 @@ async function createCustomObject(params = {}) {
|
|
|
32
42
|
return {
|
|
33
43
|
content: [{
|
|
34
44
|
type: 'text',
|
|
35
|
-
text: `✓ 自定义对象创建成功!\n\n调用命令: cloudcc create object ${resolvedPath} ${label}\n项目目录: ${resolvedPath}\n对象标签: ${label}\n\n创建过程:\n1. 生成对象的 schema 文件\n2. 配置对象权限\n3. 部署到 CloudCC 系统`
|
|
45
|
+
text: `✓ 自定义对象创建成功!\n\n调用命令: cloudcc create object ${resolvedPath} ${label} "${String(businessDescription).trim()}"\n项目目录: ${resolvedPath}\n对象标签: ${label}\n\n创建过程:\n1. 生成对象的 schema 文件\n2. 配置对象权限\n3. 部署到 CloudCC 系统`
|
|
36
46
|
}]
|
|
37
47
|
};
|
|
38
48
|
}
|
|
@@ -9,20 +9,36 @@ const { runCcJsonCommand } = require('../../cliRunner');
|
|
|
9
9
|
/**
|
|
10
10
|
* 获取触发器列表
|
|
11
11
|
* @param {Object} params - 参数对象
|
|
12
|
-
* @param {string} params.triggerName -
|
|
13
|
-
* @param {string} params.targetObjectId - 可选,目标对象ID
|
|
12
|
+
* @param {string} params.triggerName - 可选,触发器名称(映射到 sname)
|
|
13
|
+
* @param {string} params.targetObjectId - 可选,目标对象ID(映射到 fid)
|
|
14
|
+
* @param {string} params.objId - 可选,目标对象ID(语义化别名,映射到 fid)
|
|
15
|
+
* @param {string|number} params.shownum - 可选,每页条数,默认 2000
|
|
16
|
+
* @param {string|number} params.showpage - 可选,页码,默认 1
|
|
17
|
+
* @param {string} params.rptcond - 可选,扩展过滤条件
|
|
18
|
+
* @param {string} params.rptorder - 可选,排序条件
|
|
14
19
|
* @param {string} params.projectPath - 项目路径(可选,默认为当前工作目录)
|
|
15
20
|
*/
|
|
16
|
-
async function listTriggers({
|
|
21
|
+
async function listTriggers({
|
|
22
|
+
triggerName = '',
|
|
23
|
+
targetObjectId = '',
|
|
24
|
+
objId = '',
|
|
25
|
+
shownum = '2000',
|
|
26
|
+
showpage = '1',
|
|
27
|
+
rptcond = '',
|
|
28
|
+
rptorder = '',
|
|
29
|
+
projectPath = process.cwd()
|
|
30
|
+
}) {
|
|
17
31
|
try {
|
|
18
32
|
// 构造查询条件
|
|
33
|
+
const objectId = targetObjectId || objId || "";
|
|
19
34
|
const queryBody = {
|
|
20
|
-
shownum:
|
|
21
|
-
showpage:
|
|
22
|
-
fid:
|
|
35
|
+
shownum: String(shownum),
|
|
36
|
+
showpage: String(showpage),
|
|
37
|
+
fid: objectId,
|
|
23
38
|
sname: triggerName || "",
|
|
24
|
-
rptcond: '',
|
|
25
|
-
rptorder: ''
|
|
39
|
+
rptcond: rptcond || '',
|
|
40
|
+
rptorder: rptorder || '',
|
|
41
|
+
objId: objectId
|
|
26
42
|
};
|
|
27
43
|
|
|
28
44
|
const resolvedPath = path.resolve(projectPath);
|