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
package/mcp/cliRunner.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
1
|
const { spawnSync } = require("child_process");
|
|
3
2
|
|
|
3
|
+
const CC_NOT_FOUND_HINT =
|
|
4
|
+
"未找到 cloudcc 命令。请将 cloudcc-cli 全局安装并确保 PATH 可用:npm install -g cloudcc-cli(与系统 C 编译器 cc 区分,请使用 cloudcc)";
|
|
5
|
+
|
|
4
6
|
function runCcCommand(args, options = {}) {
|
|
5
7
|
const { cwd = process.cwd(), timeoutMs = 120000 } = options;
|
|
6
|
-
const
|
|
8
|
+
const ccCommand = process.platform === "win32" ? "cloudcc.cmd" : "cloudcc";
|
|
7
9
|
|
|
8
|
-
const result = spawnSync(
|
|
10
|
+
const result = spawnSync(ccCommand, args, {
|
|
9
11
|
cwd,
|
|
10
12
|
encoding: "utf8",
|
|
11
13
|
timeout: timeoutMs,
|
|
@@ -17,12 +19,17 @@ function runCcCommand(args, options = {}) {
|
|
|
17
19
|
const hasError = Boolean(result.error);
|
|
18
20
|
const code = typeof result.status === "number" ? result.status : -1;
|
|
19
21
|
|
|
22
|
+
let errorMsg = hasError ? result.error.message : "";
|
|
23
|
+
if (result.error && result.error.code === "ENOENT") {
|
|
24
|
+
errorMsg = CC_NOT_FOUND_HINT;
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
return {
|
|
21
28
|
success: !hasError && code === 0,
|
|
22
29
|
code,
|
|
23
30
|
stdout,
|
|
24
31
|
stderr,
|
|
25
|
-
error:
|
|
32
|
+
error: errorMsg
|
|
26
33
|
};
|
|
27
34
|
}
|
|
28
35
|
|
package/mcp/index.js
CHANGED
|
@@ -662,11 +662,21 @@ mcpServer.registerTool(
|
|
|
662
662
|
cloudccOverviewHandler.getCloudCCDevelopmentOverview
|
|
663
663
|
);
|
|
664
664
|
|
|
665
|
+
// ==================== JSP 迁移规则(供 AI 编排批量迁移) ====================
|
|
666
|
+
mcpServer.registerTool(
|
|
667
|
+
'get_jsp_migration_rules',
|
|
668
|
+
{
|
|
669
|
+
description: '返回 JSP 迁移的固定规则:从 /controller.action?name= 定位 customize 下 JSP、批量迁移时如何循环调用其它 JSP 工具、以及 PageClsInvoker 调用约定。处理 JSP 迁移或批量迁移前应先调用本工具。',
|
|
670
|
+
inputSchema: z.object({})
|
|
671
|
+
},
|
|
672
|
+
jspMigratorHandler.getJspMigrationRules
|
|
673
|
+
);
|
|
674
|
+
|
|
665
675
|
// ==================== JSP Migration Analyzer 工具 ====================
|
|
666
676
|
mcpServer.registerTool(
|
|
667
677
|
'analyze_jsp_migration',
|
|
668
678
|
{
|
|
669
|
-
description: '分析旧 JSP 页面,提取 reason
|
|
679
|
+
description: '分析旧 JSP 页面,提取 reason 分支、对象依赖和迁移风险,输出迁移报告(不落地代码)。批量迁移前建议先调用 get_jsp_migration_rules。',
|
|
670
680
|
inputSchema: z.object({
|
|
671
681
|
jspPath: z.string().min(1).describe('JSP 文件路径(绝对路径或相对 projectPath)'),
|
|
672
682
|
helpDocPath: z.string().optional().describe('帮助文档路径(可选),如 jspTemp/帮助文档.md'),
|
|
@@ -684,7 +694,7 @@ mcpServer.registerTool(
|
|
|
684
694
|
mcpServer.registerTool(
|
|
685
695
|
'split_jsp_to_cloudcc',
|
|
686
696
|
{
|
|
687
|
-
description: '将旧 JSP 页面拆分为 CloudCC 自定义类和自定义组件,并生成迁移报告。支持 apply/dry-run
|
|
697
|
+
description: '将旧 JSP 页面拆分为 CloudCC 自定义类和自定义组件,并生成迁移报告。支持 apply/dry-run 两种模式。批量迁移前建议先调用 get_jsp_migration_rules。',
|
|
688
698
|
inputSchema: z.object({
|
|
689
699
|
jspPath: z.string().min(1).describe('JSP 文件路径(绝对路径或相对 projectPath)'),
|
|
690
700
|
helpDocPath: z.string().optional().describe('帮助文档路径(可选),如 jspTemp/帮助文档.md'),
|
|
@@ -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: [{
|
|
@@ -21,12 +21,12 @@ const { runCcCommand, buildRunDetail } = require('../../cliRunner');
|
|
|
21
21
|
*/
|
|
22
22
|
async function getCloudCCDevelopmentOverview({ }) {
|
|
23
23
|
try {
|
|
24
|
-
const run = runCcCommand(['doc', 'project'
|
|
24
|
+
const run = runCcCommand(['doc', 'project']);
|
|
25
25
|
if (!run.success) {
|
|
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) {
|
|
@@ -14,7 +14,7 @@ async function getDevEnvSetup(params = {}) {
|
|
|
14
14
|
try {
|
|
15
15
|
const run = runCcCommand(['doc', 'project', 'dev-env-validator', JSON.stringify(params || {})]);
|
|
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: run.stdout || '' }] };
|
|
20
20
|
} catch (error) {
|
|
@@ -827,6 +827,51 @@ async function runMigration({
|
|
|
827
827
|
}
|
|
828
828
|
}
|
|
829
829
|
|
|
830
|
+
/**
|
|
831
|
+
* 供 MCP 工具 get_jsp_migration_rules 返回的固定说明,便于 AI 在批量迁移前统一遵循。
|
|
832
|
+
*/
|
|
833
|
+
const JSP_MIGRATION_RULES_MARKDOWN = `# JSP 迁移处理规则(CloudCC)
|
|
834
|
+
|
|
835
|
+
## 1. 从旧系统 URL 定位 JSP 源文件
|
|
836
|
+
|
|
837
|
+
- 若页面或配置中出现形如 \`/controller.action?name=<name>\` 的地址(示例:\`name=wt_ly\`),应在**项目根目录下的 customize 目录**中查找对应 JSP。
|
|
838
|
+
- 常见约定:\`<projectPath>/customize/<name>.jsp\`(若实际仓库使用子目录或其它扩展名,以仓库为准)。
|
|
839
|
+
- 解析出真实路径后,再将其作为 \`jspPath\` 传入 \`analyze_jsp_migration\` 或 \`split_jsp_to_cloudcc\`(可相对 \`projectPath\`)。
|
|
840
|
+
|
|
841
|
+
## 2. 批量迁移时的建议流程
|
|
842
|
+
|
|
843
|
+
1. 先调用本说明(get_jsp_migration_rules)确认规则。
|
|
844
|
+
2. 在仓库中列举或搜索 \`customize\` 下需处理的 \`.jsp\`(或根据 URL 中的 \`name\` 逐个解析路径)。
|
|
845
|
+
3. 对每个 JSP 单独调用 \`analyze_jsp_migration\`(仅分析)或 \`split_jsp_to_cloudcc\`(生成类与组件);不要假设 MCP 会在服务端自动循环多个文件。
|
|
846
|
+
|
|
847
|
+
## 3. 自定义页面 / 自定义类中调用其它类(PageClsInvoker)
|
|
848
|
+
|
|
849
|
+
在服务端自定义类中,通过 \`PageClsInvoker\` 调用其它自定义类方法,典型形式如下:
|
|
850
|
+
|
|
851
|
+
\`\`\`java
|
|
852
|
+
// userInfo 为当前上下文的 UserInfo;类名、方法名为目标自定义类及其方法;最后一个参数为参数列表(如 List)
|
|
853
|
+
Object result = new PageClsInvoker(userInfo).invoker("TargetClassName", "targetMethodName", argList);
|
|
854
|
+
\`\`\`
|
|
855
|
+
|
|
856
|
+
示例(类名、方法名以实际平台为准):
|
|
857
|
+
|
|
858
|
+
\`\`\`java
|
|
859
|
+
Object result2 = new PageClsInvoker(userInfo).invoker("LabDingTalkProdlemMessage", "sendTextMessageByUserCodeList", arglist0);
|
|
860
|
+
\`\`\`
|
|
861
|
+
|
|
862
|
+
迁移 JSP 内出现的同类调用时,保持上述调用形态,并核对目标类、方法在平台中已存在且参数类型一致。
|
|
863
|
+
|
|
864
|
+
## 4. 与迁移工具的配合
|
|
865
|
+
|
|
866
|
+
- \`analyze_jsp_migration\` / \`split_jsp_to_cloudcc\` 会从 JSP 文本中识别 \`PageClsInvoker(userInfo).invoker("类名","方法名", ...)\` 形式的依赖,并写入迁移报告;具体业务实现需在生成后的自定义类中补全或调整。
|
|
867
|
+
`;
|
|
868
|
+
|
|
869
|
+
async function getJspMigrationRules() {
|
|
870
|
+
return {
|
|
871
|
+
content: [{ type: 'text', text: JSP_MIGRATION_RULES_MARKDOWN }]
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
|
|
830
875
|
async function analyzeJspMigration(params) {
|
|
831
876
|
return runMigration({ ...(params || {}), mode: 'dry-run' });
|
|
832
877
|
}
|
|
@@ -836,6 +881,7 @@ async function splitJspToCloudcc(params) {
|
|
|
836
881
|
}
|
|
837
882
|
|
|
838
883
|
module.exports = {
|
|
884
|
+
getJspMigrationRules,
|
|
839
885
|
analyzeJspMigration,
|
|
840
886
|
splitJspToCloudcc,
|
|
841
887
|
runMigrationForCli: runMigration
|
|
@@ -67,7 +67,7 @@ async function createMenuTool(params = {}) {
|
|
|
67
67
|
return {
|
|
68
68
|
content: [{
|
|
69
69
|
type: 'text',
|
|
70
|
-
text: `⚠ ${resourceTypeName}菜单创建遇到问题\n\n${buildRunDetail(runResult) || '
|
|
70
|
+
text: `⚠ ${resourceTypeName}菜单创建遇到问题\n\n${buildRunDetail(runResult) || 'cloudcc 命令执行失败'}\n\n请检查:\n1. 资源ID是否正确\n2. 标签名称是否符合规范\n3. CloudCC服务器连接是否正常\n4. 项目配置是否正确\n5. 是否有足够的权限创建菜单`
|
|
71
71
|
}]
|
|
72
72
|
};
|
|
73
73
|
}
|
|
@@ -24,7 +24,7 @@ async function createCustomObject(params = {}) {
|
|
|
24
24
|
return {
|
|
25
25
|
content: [{
|
|
26
26
|
type: 'text',
|
|
27
|
-
text: `✗ 自定义对象创建失败: ${detail || '
|
|
27
|
+
text: `✗ 自定义对象创建失败: ${detail || 'cloudcc 命令执行失败'}`
|
|
28
28
|
}]
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -32,7 +32,7 @@ async function createCustomObject(params = {}) {
|
|
|
32
32
|
return {
|
|
33
33
|
content: [{
|
|
34
34
|
type: 'text',
|
|
35
|
-
text: `✓ 自定义对象创建成功!\n\n调用命令:
|
|
35
|
+
text: `✓ 自定义对象创建成功!\n\n调用命令: cloudcc create object ${resolvedPath} ${label}\n项目目录: ${resolvedPath}\n对象标签: ${label}\n\n创建过程:\n1. 生成对象的 schema 文件\n2. 配置对象权限\n3. 部署到 CloudCC 系统`
|
|
36
36
|
}]
|
|
37
37
|
};
|
|
38
38
|
}
|
|
@@ -44,7 +44,7 @@ async function createObjectField(params = {}) {
|
|
|
44
44
|
return {
|
|
45
45
|
content: [{
|
|
46
46
|
type: 'text',
|
|
47
|
-
text: `⚠ 字段创建遇到问题\n\n${buildRunDetail(runResult) || '
|
|
47
|
+
text: `⚠ 字段创建遇到问题\n\n${buildRunDetail(runResult) || 'cloudcc 命令执行失败'}\n\n请检查:\n1. 对象ID是否正确\n2. 字段名称是否符合规范\n3. CloudCC服务器连接是否正常\n4. 项目配置是否正确`
|
|
48
48
|
}]
|
|
49
49
|
};
|
|
50
50
|
}
|
|
@@ -23,7 +23,7 @@ async function getFields(params = {}) {
|
|
|
23
23
|
|
|
24
24
|
const run = runCcJsonCommand(['get', 'fields', resolvedPath, objprefix], { cwd: resolvedPath });
|
|
25
25
|
if (!run.success) {
|
|
26
|
-
return { content: [{ type: 'text', text: `✗ 查询失败: ${run.detail || '
|
|
26
|
+
return { content: [{ type: 'text', text: `✗ 查询失败: ${run.detail || 'cloudcc 命令执行失败'}` }] };
|
|
27
27
|
}
|
|
28
28
|
const res = run.data;
|
|
29
29
|
|
|
@@ -19,7 +19,7 @@ async function listObjects(params = {}) {
|
|
|
19
19
|
}
|
|
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
|
const objList = run.data || [];
|
|
25
25
|
if (!objList || objList.length === 0) {
|
|
@@ -14,7 +14,7 @@ async function createSchedule({ scheduleName, projectPath = process.cwd() }) {
|
|
|
14
14
|
const resolvedPath = path.resolve(projectPath);
|
|
15
15
|
const run = runCcCommand(['create', 'schedule', scheduleName], { 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
|
const schedulePath = path.resolve(projectPath, `schedule/${scheduleName}`);
|
|
20
20
|
return {
|
|
@@ -18,7 +18,7 @@ async function getScheduleDetail({ scheduleName, scheduleId, projectPath = proce
|
|
|
18
18
|
const resolvedPath = path.resolve(projectPath);
|
|
19
19
|
const run = runCcJsonCommand(['detail', 'schedule', scheduleName || '', scheduleId || ''], { cwd: resolvedPath });
|
|
20
20
|
if (!run.success) {
|
|
21
|
-
return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || '
|
|
21
|
+
return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || 'cloudcc 命令执行失败'}` }] };
|
|
22
22
|
}
|
|
23
23
|
return { content: [{ type: 'text', text: JSON.stringify(run.data, null, 2) }] };
|
|
24
24
|
} catch (error) {
|
|
@@ -14,7 +14,7 @@ async function listSchedules({ projectPath = process.cwd() }) {
|
|
|
14
14
|
const resolvedPath = path.resolve(projectPath);
|
|
15
15
|
const run = runCcJsonCommand(['get', 'schedule'], { 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 result = run.data || [];
|
|
20
20
|
if (!result.length) {
|
|
@@ -14,7 +14,7 @@ async function publishSchedule({ scheduleName, projectPath = process.cwd() }) {
|
|
|
14
14
|
const resolvedPath = path.resolve(projectPath);
|
|
15
15
|
const run = runCcCommand(['publish', 'schedule', scheduleName], { 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: `✓ 发布成功!定时类 ${scheduleName} 已发布到服务器` }] };
|
|
20
20
|
} catch (error) {
|
|
@@ -14,7 +14,7 @@ async function pullSchedule({ scheduleName, projectPath = process.cwd() }) {
|
|
|
14
14
|
const resolvedPath = path.resolve(projectPath);
|
|
15
15
|
const run = runCcCommand(['pull', 'schedule', scheduleName], { 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: `✓ 拉取成功!本地文件已更新: schedule/${scheduleName}/${scheduleName}.java` }] };
|
|
20
20
|
} catch (error) {
|
|
@@ -26,7 +26,7 @@ async function createTrigger({ triggerName, objectName, targetObjectId, triggerT
|
|
|
26
26
|
const resolvedPath = path.resolve(projectPath);
|
|
27
27
|
const run = runCcCommand(['create', 'triggers', encodeURI(JSON.stringify(body))], { cwd: resolvedPath });
|
|
28
28
|
if (!run.success) {
|
|
29
|
-
return { content: [{ type: 'text', text: `✗ 创建失败: ${buildRunDetail(run) || '
|
|
29
|
+
return { content: [{ type: 'text', text: `✗ 创建失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
30
30
|
}
|
|
31
31
|
const triggerPath = path.resolve(projectPath, `triggers/${objectName.toLowerCase()}/${triggerName}`);
|
|
32
32
|
return {
|
|
@@ -18,7 +18,7 @@ async function getTriggerDetail({ triggerPath, triggerId, projectPath = process.
|
|
|
18
18
|
const resolvedPath = path.resolve(projectPath);
|
|
19
19
|
const run = runCcJsonCommand(['detail', 'triggers', triggerPath || '', triggerId || ''], { cwd: resolvedPath });
|
|
20
20
|
if (!run.success) {
|
|
21
|
-
return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || '
|
|
21
|
+
return { content: [{ type: 'text', text: `✗ 获取失败: ${run.detail || 'cloudcc 命令执行失败'}` }] };
|
|
22
22
|
}
|
|
23
23
|
return { content: [{ type: 'text', text: JSON.stringify(run.data, null, 2) }] };
|
|
24
24
|
} catch (error) {
|
|
@@ -21,7 +21,7 @@ async function editTrigger({ topic = 'devguide' }) {
|
|
|
21
21
|
try {
|
|
22
22
|
const run = runCcCommand(['doc', 'triggers', normalizeDocTopic(topic)]);
|
|
23
23
|
if (!run.success) {
|
|
24
|
-
return { content: [{ type: 'text', text: `✗ 获取触发器编辑指南失败: ${buildRunDetail(run) || '
|
|
24
|
+
return { content: [{ type: 'text', text: `✗ 获取触发器编辑指南失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
25
25
|
}
|
|
26
26
|
return {
|
|
27
27
|
content: [{
|
|
@@ -30,7 +30,7 @@ async function listTriggers({ triggerName = '', targetObjectId = '', projectPath
|
|
|
30
30
|
if (!run.success) {
|
|
31
31
|
return {
|
|
32
32
|
content: [
|
|
33
|
-
{ type: 'text', text: `获取触发器列表失败: ${run.detail || '
|
|
33
|
+
{ type: 'text', text: `获取触发器列表失败: ${run.detail || 'cloudcc 命令执行失败'}` }
|
|
34
34
|
]
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -17,7 +17,7 @@ async function publishTrigger({ triggerPath, projectPath = process.cwd() }) {
|
|
|
17
17
|
const resolvedPath = path.resolve(projectPath);
|
|
18
18
|
const run = runCcCommand(['publish', 'triggers', triggerPath], { cwd: resolvedPath });
|
|
19
19
|
if (!run.success) {
|
|
20
|
-
return { content: [{ type: 'text', text: `✗ 发布失败: ${buildRunDetail(run) || '
|
|
20
|
+
return { content: [{ type: 'text', text: `✗ 发布失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
21
21
|
}
|
|
22
22
|
const triggerName = triggerPath.split("/")[1];
|
|
23
23
|
return { content: [{ type: 'text', text: `✓ 发布成功!触发器 ${triggerName} 已发布到服务器` }] };
|
|
@@ -17,7 +17,7 @@ async function pullTrigger({ id, projectPath = process.cwd() }) {
|
|
|
17
17
|
const resolvedPath = path.resolve(projectPath);
|
|
18
18
|
const run = runCcCommand(['pullList', 'triggers', id, resolvedPath], { cwd: resolvedPath });
|
|
19
19
|
if (!run.success) {
|
|
20
|
-
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || '
|
|
20
|
+
return { content: [{ type: 'text', text: `✗ 拉取失败: ${buildRunDetail(run) || 'cloudcc 命令执行失败'}` }] };
|
|
21
21
|
}
|
|
22
22
|
return {
|
|
23
23
|
content: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcc-cli",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
4
4
|
"description": "cloudcc-cli",
|
|
5
5
|
"author": "cloudcc",
|
|
6
6
|
"license": "ISC",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"cloudccCreate": "bin/project.js",
|
|
14
14
|
"cloudccBuild": "bin/plugin.js",
|
|
15
15
|
"cc": "bin/cc.js",
|
|
16
|
-
"
|
|
16
|
+
"cloudcc": "bin/cc.js"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"test-cli-one": "node --test test/globalSelectList.cli.test.js",
|
|
20
20
|
"test-cli-all": "node --test ",
|
|
21
21
|
"cc-pull": "git fetch --tags -f && git pull",
|
|
22
|
-
"npm-login": "npm login --registry https://registry.
|
|
22
|
+
"npm-login": "npm login --registry https://registry.npmjs.com",
|
|
23
23
|
"npm-publish": "npm publish --registry https://registry.npmjs.org && git add . && git commit -m 'update' && git push && curl https://npmmirror.com/sync/cloudcc-cli",
|
|
24
24
|
"package-jar": "mvn clean && mvn package",
|
|
25
25
|
"fetch-dev-env": "node src/mcp/tools/dev-env/fetcher.js",
|