cloudcc-cli 2.4.1 → 2.4.2

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.
Files changed (44) hide show
  1. package/README.md +42 -0
  2. package/bin/index.js +5 -0
  3. package/cloudcc-dev-skill/SKILL.md +6 -12
  4. package/cloudcc-dev-skill/config.json +2 -2
  5. package/package.json +2 -2
  6. package/src/classes/create.js +1 -1
  7. package/src/config/use.js +20 -5
  8. package/src/dupeCatcher/create.js +76 -0
  9. package/src/dupeCatcher/delete.js +69 -0
  10. package/src/dupeCatcher/detail.js +57 -0
  11. package/src/dupeCatcher/doc.js +11 -0
  12. package/src/dupeCatcher/docs/devguide.md +125 -0
  13. package/src/dupeCatcher/docs/introduction.md +21 -0
  14. package/src/dupeCatcher/get.js +88 -0
  15. package/src/dupeCatcher/index.js +14 -0
  16. package/src/html/doc.js +35 -0
  17. package/src/html/docs/devguide.md +67 -0
  18. package/src/html/docs/introduction.md +4 -0
  19. package/src/html/index.js +11 -0
  20. package/src/openapi/cloudcc-openapi-sdk.js +1085 -0
  21. package/src/openapi/doc.js +30 -0
  22. package/src/openapi/docs/devguide.md +65 -0
  23. package/src/openapi/docs/introduction.md +43 -0
  24. package/src/openapi/get.js +45 -0
  25. package/src/openapi/index.js +12 -0
  26. package/src/plugin/publish1.js +1 -1
  27. package/src/plugin/pull.js +2 -2
  28. package/src/sharingRule/doc.js +46 -0
  29. package/src/sharingRule/docs/devguide.md +28 -0
  30. package/src/sharingRule/docs/introduction.md +7 -0
  31. package/src/sharingRule/get.js +48 -0
  32. package/src/sharingRule/index.js +9 -0
  33. package/src/site/doc.js +35 -0
  34. package/src/site/docs/devguide.md +209 -0
  35. package/src/site/docs/introduction.md +4 -0
  36. package/src/site/index.js +11 -0
  37. package/src/triggers/docs/devguide.md +1 -2
  38. package/src/triggers/get.js +1 -2
  39. package/src/version/doctor.js +11 -4
  40. package/src/version/listModuleCommands.js +20 -0
  41. package/template/index.js +2 -2
  42. package/utils/config.js +129 -21
  43. package/cloudcc-dev-skill/cloudcc-dev-html.md +0 -42
  44. package/template/cloudcc-cli.configjs +0 -7
@@ -0,0 +1,30 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ const DOCS_DIR = path.join(__dirname, "docs");
5
+
6
+ function readDoc(fileName) {
7
+ return fs.readFileSync(path.join(DOCS_DIR, fileName), "utf8");
8
+ }
9
+
10
+ function doc(argvs) {
11
+ const subType = String(argvs[2] || "").trim().toLowerCase();
12
+ if (!subType) {
13
+ throw new Error("cloudcc doc openapi 需要子命令:introduction 或 devguide");
14
+ }
15
+
16
+ if (subType === "introduction") {
17
+ const content = readDoc("introduction.md");
18
+ console.log(content);
19
+ return content;
20
+ }
21
+ if (subType === "devguide") {
22
+ const content = readDoc("devguide.md");
23
+ console.log(content);
24
+ return content;
25
+ }
26
+
27
+ throw new Error(`doc 不支持的子命令: ${subType},请使用 introduction 或 devguide`);
28
+ }
29
+
30
+ module.exports = doc;
@@ -0,0 +1,65 @@
1
+ # OpenAPI SDK 开发指南
2
+
3
+ ## 命令说明
4
+
5
+ ### 复制 SDK 到站点目录
6
+
7
+ ```bash
8
+ cloudcc get openapi [targetDir] [outputFileName]
9
+ ```
10
+
11
+ - `targetDir`:可选,目标目录;默认当前目录。
12
+ - `outputFileName`:可选,输出文件名;默认 `cloudcc-openapi-sdk.js`。
13
+
14
+ 示例:
15
+
16
+ ```bash
17
+ # 复制到当前目录
18
+ cloudcc get openapi
19
+
20
+ # 复制到指定目录
21
+ cloudcc get openapi ./public/assets/js
22
+
23
+ # 复制到指定目录并重命名
24
+ cloudcc get openapi ./public/assets/js cc-openapi.js
25
+ ```
26
+
27
+ ## 页面集成步骤
28
+
29
+ 1. 在 `index.html` 按顺序引入依赖与 SDK:
30
+
31
+ ```html
32
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js"></script>
33
+ <script src="https://cdn.jsdelivr.net/npm/jsencrypt@3.3.2/bin/jsencrypt.min.js"></script>
34
+ <script src="/assets/js/cloudcc-openapi-sdk.js"></script>
35
+ ```
36
+
37
+ 2. 创建实例并登录:
38
+
39
+ ```javascript
40
+ const api = new CloudCCOpenAPI({
41
+ ClientId: "你的ClientId",
42
+ SecretKey: "你的SecretKey",
43
+ loginsvcurl: "https://global.apis.cloudcc.cn/login"
44
+ });
45
+
46
+ await api.login("crm账号", "crm密码");
47
+ ```
48
+
49
+ 3. 调用对象接口(示例为查询):
50
+
51
+ ```javascript
52
+ const result = await api.cquery({
53
+ objectApiName: "Account",
54
+ fields: "id,name,createdOn",
55
+ filter: "",
56
+ pageNo: 1,
57
+ pageSize: 20
58
+ });
59
+ ```
60
+
61
+ ## 注意事项
62
+
63
+ - 该 SDK 运行于浏览器环境,请确保页面可访问 `CryptoJS` 与 `JSEncrypt`。
64
+ - 不建议在公开站点暴露高权限账号;请按业务场景配置最小权限账号。
65
+ - 若你已有构建系统(Vite/Webpack),也可将 SDK 作为静态资源进行托管后再按 URL 引入。
@@ -0,0 +1,43 @@
1
+ # OpenAPI SDK 简介
2
+
3
+ `cloudcc-openapi-sdk.js` 是面向浏览器场景的 CloudCC OpenAPI 调用 SDK,支持:
4
+
5
+ - 使用 CRM 账号 + 密码登录;
6
+ - 自动换取访问令牌;
7
+ - 调用对象查询等 OpenAPI 接口。
8
+
9
+ 该 SDK 适用于独立站点(如自建前端页面),通过在 `index.html` 中引入脚本即可使用。
10
+
11
+ ## 快速开始
12
+
13
+ 1. 复制 SDK 到你的站点目录:
14
+
15
+ ```bash
16
+ cloudcc get openapi <你的站点目录>
17
+ ```
18
+
19
+ 2. 在 `index.html` 中引入依赖与 SDK:
20
+
21
+ ```html
22
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js"></script>
23
+ <script src="https://cdn.jsdelivr.net/npm/jsencrypt@3.3.2/bin/jsencrypt.min.js"></script>
24
+ <script src="./cloudcc-openapi-sdk.js"></script>
25
+ ```
26
+
27
+ 3. 初始化并登录:
28
+
29
+ ```javascript
30
+ const api = new CloudCCOpenAPI({ ClientId, SecretKey, loginsvcurl });
31
+ await api.login("crm账号", "crm密码");
32
+ ```
33
+
34
+ 4. 调用接口读取对象数据:
35
+
36
+ ```javascript
37
+ const res = await api.cquery({
38
+ objectApiName: "Account",
39
+ fields: "id,name",
40
+ pageNo: 1,
41
+ pageSize: 20
42
+ });
43
+ ```
@@ -0,0 +1,45 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ const SDK_FILE_NAME = "cloudcc-openapi-sdk.js";
5
+ const SOURCE_FILE = path.join(__dirname, SDK_FILE_NAME);
6
+
7
+ function printUsage(targetFilePath) {
8
+ const relativeTarget = path.relative(process.cwd(), targetFilePath) || SDK_FILE_NAME;
9
+ console.log("");
10
+ console.log("OpenAPI SDK 已复制成功。");
11
+ console.log(`文件路径: ${targetFilePath}`);
12
+ console.log("");
13
+ console.log("请在你的 index.html 中引入以下脚本:");
14
+ console.log('<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.2.0/crypto-js.min.js"></script>');
15
+ console.log('<script src="https://cdn.jsdelivr.net/npm/jsencrypt@3.3.2/bin/jsencrypt.min.js"></script>');
16
+ console.log(`<script src="${relativeTarget}"></script>`);
17
+ console.log("");
18
+ console.log("示例:");
19
+ console.log("const api = new CloudCCOpenAPI({ ClientId, SecretKey, loginsvcurl });");
20
+ console.log("await api.login('账号', '密码');");
21
+ console.log("const res = await api.cquery({ objectApiName: 'Account', fields: 'id,name', pageSize: 20, pageNo: 1 });");
22
+ }
23
+
24
+ function get(argvs) {
25
+ const targetDirArg = argvs[2];
26
+ const outputNameArg = argvs[3];
27
+
28
+ const targetDir = targetDirArg ? path.resolve(process.cwd(), targetDirArg) : process.cwd();
29
+ if (!fs.existsSync(targetDir)) {
30
+ throw new Error(`目标目录不存在: ${targetDir}`);
31
+ }
32
+ const stat = fs.statSync(targetDir);
33
+ if (!stat.isDirectory()) {
34
+ throw new Error(`目标路径不是目录: ${targetDir}`);
35
+ }
36
+
37
+ const outputName = outputNameArg || SDK_FILE_NAME;
38
+ const targetFilePath = path.join(targetDir, outputName);
39
+ fs.copyFileSync(SOURCE_FILE, targetFilePath);
40
+
41
+ printUsage(targetFilePath);
42
+ return targetFilePath;
43
+ }
44
+
45
+ module.exports = get;
@@ -0,0 +1,12 @@
1
+ const cc = {};
2
+ cc.get = require("./get");
3
+ cc.doc = require("./doc");
4
+
5
+ async function main(action, argvs) {
6
+ if (!cc[action]) {
7
+ throw new Error(`openapi 不支持的动作: ${action}`);
8
+ }
9
+ return cc[action](argvs);
10
+ }
11
+
12
+ module.exports = main;
@@ -196,7 +196,7 @@ class Builder {
196
196
  const allDependencies = collectDependenciesWithTree(entryFile, rootDir);
197
197
 
198
198
  // 收集根目录下的配置文件
199
- const configFiles = ['package.json', 'cloudcc-cli.config.js'];
199
+ const configFiles = ['package.json', 'cloudcc-cli.config.js', 'cloudcc-cli.config.json'];
200
200
 
201
201
  for (const configFile of configFiles) {
202
202
  const configPath = path.join(rootDir, configFile);
@@ -149,14 +149,14 @@ async function pullById(pluginId, projectPath) {
149
149
  // 确保目录存在(recursive: true 会自动处理已存在的情况)
150
150
  fs.mkdirSync(pluginPath, { recursive: true });
151
151
 
152
- // 处理 compContentVue:解析 JSON 并保存所有文件(排除 package.json cloudcc-cli.config.js)
152
+ // 处理 compContentVue:解析 JSON 并保存所有文件(排除 package.json cloudcc-cli 配置文件)
153
153
  if (pluginData.compContentVue) {
154
154
  try {
155
155
  // 解析 compContentVue JSON 字符串
156
156
  const contentMap = JSON.parse(pluginData.compContentVue);
157
157
 
158
158
  // 需要排除的文件
159
- const excludedFiles = ['package.json', 'cloudcc-cli.config.js'];
159
+ const excludedFiles = ['package.json', 'cloudcc-cli.config.js', 'cloudcc-cli.config.json'];
160
160
 
161
161
  // 遍历所有文件并保存
162
162
  Object.entries(contentMap).forEach(([filePath, content]) => {
@@ -0,0 +1,46 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ const DOCS_DIR = path.join(__dirname, "docs");
5
+ const INTRODUCTION = path.join(DOCS_DIR, "introduction.md");
6
+ const DEVGUIDE = path.join(DOCS_DIR, "devguide.md");
7
+
8
+ function readDocOrFallback(filePath, fallback) {
9
+ try {
10
+ return fs.readFileSync(filePath, "utf8").trim();
11
+ } catch (e) {
12
+ return fallback;
13
+ }
14
+ }
15
+
16
+ function getIntroductionDoc() {
17
+ return readDocOrFallback(
18
+ INTRODUCTION,
19
+ `# CloudCC 共享规则介绍\n\n(未找到文件:${INTRODUCTION})\n`
20
+ );
21
+ }
22
+
23
+ function getDevGuideDoc() {
24
+ return readDocOrFallback(
25
+ DEVGUIDE,
26
+ `# CloudCC 共享规则开发指南\n\n(未找到文件:${DEVGUIDE})\n`
27
+ );
28
+ }
29
+
30
+ function doc(projectPath, subType) {
31
+ const key = String(subType || "").trim().toLowerCase();
32
+ if (!key || key === "devguide") {
33
+ const content = getDevGuideDoc();
34
+ console.log(content);
35
+ return content;
36
+ }
37
+ if (key === "introduction") {
38
+ const content = getIntroductionDoc();
39
+ console.log(content);
40
+ return content;
41
+ }
42
+ throw new Error(`doc 不支持的子命令: ${subType},请使用 introduction 或 devguide`);
43
+ }
44
+
45
+ module.exports = doc;
46
+
@@ -0,0 +1,28 @@
1
+ # CloudCC 共享规则 CLI 命令说明
2
+
3
+ > 对应 one-setup-web 接口:`{setupSvc}/api/sharingSettings/queryRule`
4
+
5
+ ## 1. 支持命令
6
+
7
+ ```bash
8
+ # 按对象查询共享规则
9
+ cloudcc get sharingRule <objid> [projectPath]
10
+ ```
11
+
12
+ ## 2. 参数说明
13
+
14
+ ### 2.1 查询:`cloudcc get sharingRule <objid> [projectPath]`
15
+
16
+ | 参数 | 必填 | 说明 |
17
+ | :--- | :--- | :--- |
18
+ | `objid` | 是 | 对象 id |
19
+ | `projectPath` | 否 | 项目根目录,默认当前目录(可传 `.`) |
20
+
21
+ ## 3. 示例
22
+
23
+ ### 3.1 按对象查询规则
24
+
25
+ ```bash
26
+ cloudcc get sharingRule account .
27
+ ```
28
+
@@ -0,0 +1,7 @@
1
+ # CloudCC 共享规则介绍
2
+
3
+ 当前模块只提供“按对象查询共享规则”能力。
4
+
5
+ 接口:`POST /api/sharingSettings/queryRule`
6
+ 请求体:`{ "objid": "<对象id>" }`
7
+
@@ -0,0 +1,48 @@
1
+ /**
2
+ * 共享规则(对象维度)- 查询规则
3
+ * API: POST {setupSvc}/api/sharingSettings/queryRule
4
+ * CLI: cloudcc get sharingRule <objid> [projectPath]
5
+ */
6
+ const { getPackageJson } = require("../../utils/config");
7
+ const { postClass } = require("../../utils/http");
8
+
9
+ function isPathLikeToken(v) {
10
+ if (typeof v !== "string" || !v) return false;
11
+ return v === "." || v === ".." || /[\\/]/.test(v) || /:/.test(v);
12
+ }
13
+
14
+ async function get(objidOrProjectPath = process.cwd(), maybeProjectPath, isMcp = false) {
15
+ let objid = objidOrProjectPath;
16
+ let projectPath = process.cwd();
17
+
18
+ // 支持: cloudcc get sharingRule . <objid>
19
+ if (isPathLikeToken(objidOrProjectPath)) {
20
+ projectPath = objidOrProjectPath;
21
+ objid = maybeProjectPath;
22
+ } else if (isPathLikeToken(maybeProjectPath)) {
23
+ // 支持: cloudcc get sharingRule <objid> .
24
+ projectPath = maybeProjectPath;
25
+ }
26
+
27
+ if (!objid) {
28
+ throw new Error("Query sharing rule failed: objid is required. Usage: cloudcc get sharingRule <objid> [projectPath]");
29
+ }
30
+
31
+ const config = await getPackageJson(projectPath);
32
+ const res = await postClass(
33
+ config.setupSvc + "/api/sharingSettings/queryRule",
34
+ { objid },
35
+ config.accessToken
36
+ );
37
+ if (res && res.result) {
38
+ const data = res?.data || {};
39
+ if (!isMcp) {
40
+ console.log(JSON.stringify(data));
41
+ }
42
+ return data;
43
+ }
44
+ throw new Error("Query Sharing Rule Failed: " + (res?.returnInfo || res?.message || "Unknown error"));
45
+ }
46
+
47
+ module.exports = get;
48
+
@@ -0,0 +1,9 @@
1
+ const cc = {};
2
+ cc.get = require("./get");
3
+
4
+ function SharingRule(action, argvs) {
5
+ cc[action](argvs[2], argvs[3]);
6
+ }
7
+
8
+ module.exports = SharingRule;
9
+
@@ -0,0 +1,35 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ const DOCS_DIR = path.join(__dirname, "docs");
5
+
6
+ function getIntroductionDoc() {
7
+ return fs.readFileSync(path.join(DOCS_DIR, "introduction.md"), "utf8");
8
+ }
9
+
10
+ function getDevGuideDoc() {
11
+ return fs.readFileSync(path.join(DOCS_DIR, "devguide.md"), "utf8");
12
+ }
13
+
14
+ function doc(argvs) {
15
+ const subType = argvs[2];
16
+ const key = String(subType || "").trim().toLowerCase();
17
+ if (!key) {
18
+ throw new Error("cloudcc doc site 需要子命令:introduction 或 devguide");
19
+ }
20
+ if (key === "introduction") {
21
+ const content = getIntroductionDoc();
22
+ console.log(content);
23
+ return content;
24
+ }
25
+ if (key === "devguide") {
26
+ const content = getDevGuideDoc();
27
+ console.log(content);
28
+ return content;
29
+ }
30
+ throw new Error(
31
+ `doc 不支持的子命令: ${subType},请使用 introduction 或 devguide`
32
+ );
33
+ }
34
+
35
+ module.exports = doc;
@@ -0,0 +1,209 @@
1
+ # CloudCC Site 开发规范
2
+
3
+ ## 1. 目标与定位
4
+
5
+ 本规范用于 CloudCC Site(完整站点)开发,目标是交付可上线、可维护、可扩展的前端应用,而不是仅可演示的页面。
6
+
7
+ ## 2. 技术栈(强制)
8
+
9
+ Site 开发技术栈统一为:
10
+
11
+ - React
12
+ - TypeScript
13
+ - Vite
14
+ - Tailwind CSS
15
+ - shadcn/ui
16
+ - TanStack Query
17
+
18
+ 不允许替换为其他同类主栈(如 Next.js、Vue、Ant Design、SWR)作为默认方案;如有特殊场景需先评审。
19
+
20
+ ## 3. 设计与体验规范
21
+
22
+ ### 3.1 先定设计方向,再写代码
23
+
24
+ 在开始开发前,必须先明确:
25
+
26
+ - 业务目的:页面解决什么问题、服务谁。
27
+ - 视觉调性:明确选择一种风格方向(如极简、编辑感、工业感、科技感等),避免“默认模板风”。
28
+ - 差异化记忆点:必须至少有 1 个可感知的视觉或交互亮点。
29
+
30
+ ### 3.1.1 设计产出标准(强制)
31
+
32
+ Site 方案必须满足以下产出标准:
33
+
34
+ - 有明确且大胆的视觉方向,不接受“通用后台模板风”。
35
+ - 字体与配色有辨识度,不能只用默认系统组合。
36
+ - 存在至少一处高质量视觉细节或动效亮点,且不影响性能与可用性。
37
+ - 实现必须结合业务上下文(目标用户、行业语境、场景约束),不做脱离场景的通用拼装。
38
+
39
+ ### 3.2 视觉系统约束
40
+
41
+ - 字体、颜色、圆角、阴影、间距必须抽象为设计令牌(Design Tokens),统一在主题层管理。
42
+ - 不允许全站散落硬编码色值和随意字号。
43
+ - 页面布局要有层级和节奏,避免纯列表堆砌。
44
+
45
+ ### 3.3 动效与交互
46
+
47
+ - 动效服务于信息表达,不做无意义炫技。
48
+ - 首屏允许有一处高质量入场动效;其余交互采用轻量微动效(hover/focus/loading/empty/success/error)。
49
+ - 必须保证动效可降级:低性能设备和弱网下不影响可用性。
50
+
51
+ ## 4. 工程规范
52
+
53
+ ### 4.1 React + TypeScript
54
+
55
+ - 全量 TypeScript,禁止新增 `any`(确有必要时需注释说明)。
56
+ - 组件职责单一,避免超大组件;通用能力沉淀到 `components`、`hooks`、`lib`。
57
+ - 组件对外 API(props)需稳定、可复用、可测试。
58
+
59
+ ### 4.2 Vite
60
+
61
+ - 使用 Vite React + TS 模板初始化。
62
+ - 保持构建配置最小化,优先约定优于配置。
63
+ - 生产构建必须无报错、无阻塞警告。
64
+
65
+ ### 4.3 Tailwind CSS
66
+
67
+ - 统一使用 Tailwind 工具类,不混用第二套原子样式方案。
68
+ - 禁止页面中大量重复长类名,公共模式需抽象为组件或样式变量。
69
+ - 主题色、间距、断点统一在 Tailwind 配置层维护。
70
+
71
+ ### 4.4 shadcn/ui
72
+
73
+ - 基础 UI 组件优先复用 shadcn/ui,减少重复造轮子。
74
+ - 二次封装时保留可访问性语义(aria、键盘可达、焦点管理)。
75
+ - 不允许直接复制粘贴第三方组件后长期不维护。
76
+
77
+ ### 4.5 TanStack Query
78
+
79
+ - 所有服务端状态统一由 TanStack Query 管理(查询、缓存、失效、重试)。
80
+ - 查询 key 必须稳定、可推导,禁止随意拼接导致缓存失效。
81
+ - 变更操作(mutation)后必须明确刷新策略(invalidate/update optimistic)。
82
+
83
+ ## 5. 数据与资源规范
84
+
85
+ - JS、CSS、图片、字体等资源可上传 CloudCC 静态资源并通过静态资源 URL 引用。
86
+ - 静态资源命名需可读可追踪(模块名-用途-版本),禁止随机命名。
87
+ - 线上资源必须可回滚,禁止直接覆盖不可追溯文件。
88
+
89
+ ## 6. 可用性与质量基线
90
+
91
+ - 必须覆盖加载态、空态、错误态、无权限态。
92
+ - 必须支持基础响应式(至少桌面端 + 常见移动宽度)。
93
+ - 关键交互需可键盘操作,表单项需有明确标签与错误提示。
94
+ - 首屏和关键列表页必须可观测(错误日志、请求失败可定位)。
95
+
96
+ ## 7. 禁止项
97
+
98
+ - 禁止“脚手架默认样式”直接上线。
99
+ - 禁止在业务代码中散落 mock 常量且无清理。
100
+ - 禁止出现不可解释的魔法数字与硬编码接口路径。
101
+ - 禁止把组件文档与实现长期脱节。
102
+
103
+ ## 8. 交付验收清单(上线前)
104
+
105
+ - 技术栈符合:React + TS + Vite + Tailwind + shadcn/ui + TanStack Query。
106
+ - 页面与组件通过基础自测:加载、空、错、权限、提交成功/失败。
107
+ - 构建通过且无阻塞问题。
108
+ - 静态资源路径、命名、版本可追溯。
109
+ - 关键页面视觉风格统一,存在明确记忆点,不是通用模板感。
110
+
111
+ ## 9. 需求输入模板(给研发/AI)
112
+
113
+ 为保证实现质量,需求描述至少包含以下信息:
114
+
115
+ - 页面类型:如仪表盘、落地页、设置页、数据管理页。
116
+ - 目标用户与业务目标:谁在用、要解决什么问题。
117
+ - 风格方向:如极简、科技感、工业感、杂志感等(必须明确一种主方向)。
118
+ - 技术约束:是否必须支持移动端、是否有性能预算、是否有无障碍要求。
119
+
120
+ 示例:
121
+
122
+ - “创建一个面向销售团队的业绩仪表盘,风格偏科技感,桌面优先,首屏加载 2 秒内,必须支持键盘操作与错误态展示。”
123
+
124
+ ## 10. AI 执行规范(强制)
125
+ - 不允许只基于文字规范给出“模板化”方案;必须结合示例图片中的风格特征给出可落地实现。
126
+ - 若当前环境无法读取图片,必须明确说明阻塞点,并先给出最短可执行替代路径(如让用户补齐图片或指定可访问路径)。
127
+
128
+ ## 11. 附录:Frontend Aesthetics 可执行规范(内嵌版)
129
+
130
+ ### 11.1 核心目标
131
+
132
+ - 默认生成容易趋向保守和模板化,需要通过明确提示引导出更有辨识度的页面。
133
+ - 目标不是“看起来像 AI 自动生成”,而是“可上线、可识别、有设计判断”的真实产品界面。
134
+
135
+ ### 11.2 三个稳定有效的提示策略
136
+
137
+ 1. 明确约束设计维度(字体、色彩、动效、背景)
138
+ 2. 提供风格灵感来源(主题方向,不要过度限制)
139
+ 3. 显式禁止默认套路(常见字体、配色、布局)
140
+
141
+ ### 11.3 全量美学提示词(推荐基线)
142
+
143
+ ```text
144
+ <frontend_aesthetics>
145
+ You tend to converge toward generic, "on distribution" outputs. In frontend design, this creates what users call the "AI slop" aesthetic. Avoid this: make creative, distinctive frontends that surprise and delight. Focus on:
146
+
147
+ Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics.
148
+
149
+ Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw from IDE themes and cultural aesthetics for inspiration.
150
+
151
+ Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
152
+
153
+ Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer CSS gradients, use geometric patterns, or add contextual effects that match the overall aesthetic.
154
+
155
+ Avoid generic AI-generated aesthetics:
156
+ - Overused font families (Inter, Roboto, Arial, system fonts)
157
+ - Clichéd color schemes (particularly purple gradients on white backgrounds)
158
+ - Predictable layouts and component patterns
159
+ - Cookie-cutter design that lacks context-specific character
160
+
161
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. You still tend to converge on common choices (Space Grotesk, for example) across generations. Avoid this: it is critical that you think outside the box!
162
+ </frontend_aesthetics>
163
+ ```
164
+
165
+
166
+ #### A) Typography Only
167
+
168
+ ```text
169
+ <use_interesting_fonts>
170
+ Typography instantly signals quality. Avoid using boring, generic fonts.
171
+
172
+ Never use: Inter, Roboto, Open Sans, Lato, default system fonts
173
+
174
+ Impact choices:
175
+ - Code aesthetic: JetBrains Mono, Fira Code, Space Grotesk
176
+ - Editorial: Playfair Display, Crimson Pro, Fraunces
177
+ - Startup: Clash Display, Satoshi, Cabinet Grotesk
178
+ - Technical: IBM Plex family, Source Sans 3
179
+ - Distinctive: Bricolage Grotesque, Obviously, Newsreader
180
+
181
+ Pairing principle: High contrast = interesting. Display + monospace, serif + geometric sans, variable font across weights.
182
+
183
+ Use extremes: 100/200 weight vs 800/900, not 400 vs 600. Size jumps of 3x+, not 1.5x.
184
+
185
+ Pick one distinctive font, use it decisively.
186
+ </use_interesting_fonts>
187
+ ```
188
+
189
+ #### B) Theme Constraint(示例:Solarpunk)
190
+
191
+ ```text
192
+ <always_use_solarpunk_theme>
193
+ Always design with Solarpunk aesthetic:
194
+ - Warm, optimistic color palettes (greens, golds, earth tones)
195
+ - Organic shapes mixed with technical elements
196
+ - Nature-inspired patterns and textures
197
+ - Bright, hopeful atmosphere
198
+ - Retro-futuristic typography
199
+ </always_use_solarpunk_theme>
200
+ ```
201
+
202
+ ### 11.6 标准执行顺序(强制)
203
+
204
+ 1. 先定义页面目标、受众、主风格、记忆点
205
+ 2. 选用“全量美学提示词”或“隔离提示词”
206
+ 3. 按 React+TS+Vite+Tailwind+shadcn/ui+TanStack Query 落地
207
+ 4. 补全状态页与可访问性
208
+ 5. 对照验收清单做上线前检查
209
+ 6. 不要使用暗色风格,使用清新自然的风格
@@ -0,0 +1,4 @@
1
+ # CloudCC Site 开发简介
2
+
3
+ - Site 开发用于构建完整前端站点。
4
+ - 技术栈统一为 React + TypeScript + Vite + Tailwind CSS + shadcn/ui + TanStack Query。
@@ -0,0 +1,11 @@
1
+ const cc = {};
2
+ cc.doc = require("./doc");
3
+
4
+ async function main(action, argvs) {
5
+ if (!cc[action]) {
6
+ throw new Error(`site 不支持的动作: ${action}`);
7
+ }
8
+ return cc[action](argvs);
9
+ }
10
+
11
+ module.exports = main;
@@ -110,7 +110,6 @@ cloudcc get triggers <listQueryJson> [projectPath]
110
110
  {
111
111
  "shownum": 2000,
112
112
  "showpage": 1,
113
- "fid": "",
114
113
  "sname": "",
115
114
  "rptcond": "",
116
115
  "rptorder": "",
@@ -125,7 +124,7 @@ cloudcc get triggers <listQueryJson> [projectPath]
125
124
  | `shownum` | 每页条数 | `number | string` | 推荐 |
126
125
  | `showpage` | 页码 | `number | string` | 推荐 |
127
126
  | `sname` | 触发器名字 | `string` | 可选 | 按名称模糊筛选,模糊查询 |
128
- | `objId` | 触发器作用对象 ID | `string` | 可选 | 对象id |
127
+ | `objId` | 触发器作用对象 ID | `string` | 可选 | 对象id(对象筛选优先用该字段) |
129
128
 
130
129
  #### 5) 查看触发器详情
131
130
 
@@ -7,8 +7,7 @@ const { postClass } = require("../../utils/http")
7
7
  * - shownum: 每页条数
8
8
  * - showpage: 页码
9
9
  * - sname: 触发器名字
10
- * - fid: 触发器作用对象 ID(兼容字段)
11
- * - objId: 触发器作用对象 ID(会自动映射到 fid)
10
+ * - objId: 触发器作用对象 ID(对象筛选请优先使用此字段)
12
11
  * - rptcond: 额外筛选条件
13
12
  * - rptorder: 排序条件
14
13
  * @param {string[]} argvs