openyida 2026.4.14-beta.2 → 2026.4.14
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/bin/yida.js +3 -1
- package/lib/app/app-list.js +3 -4
- package/lib/core/chalk.js +25 -10
- package/lib/core/query-data.js +6 -6
- package/lib/core/utils.js +1 -0
- package/lib/report/append.js +1 -0
- package/lib/report/chart-builder.js +1 -0
- package/lib/report/create-report.js +1 -0
- package/lib/report/index.js +2 -0
- package/package.json +1 -1
- package/yida-skills/SKILL.md +1 -1
package/bin/yida.js
CHANGED
|
@@ -96,6 +96,7 @@ function printHelp() {
|
|
|
96
96
|
console.log('');
|
|
97
97
|
console.log(` ${BOLD}${CYAN}OpenYida${RESET} ${DIM}v${currentVersion}${RESET}`);
|
|
98
98
|
console.log(` ${DIM}${t('help.subtitle')}${RESET}`);
|
|
99
|
+
console.log(` ${DIM}"We are on the verge of the Singularity"${RESET}`);
|
|
99
100
|
console.log('');
|
|
100
101
|
console.log(` ${YELLOW}${t('help.usage')}${RESET} openyida <command> [args...]`);
|
|
101
102
|
console.log(` ${DIM}${t('help.alias')}${RESET} yida`);
|
|
@@ -187,8 +188,9 @@ function printHelp() {
|
|
|
187
188
|
console.log(` ${DIM}${RESET} openyida login`);
|
|
188
189
|
console.log(` ${DIM}${RESET} openyida create-app "${t('help.quickstart_app_name')}"`);
|
|
189
190
|
console.log(` ${DIM}${RESET} openyida create-form create APP_XXX "${t('help.quickstart_form_name')}" fields.json`);
|
|
191
|
+
console.log(` ${DIM}${RESET} openyida dws contact user search --keyword "张三"`);
|
|
190
192
|
console.log('');
|
|
191
|
-
console.log(` ${DIM}${t('help.docs')} https://github.com/openyida/openyida${RESET}`);
|
|
193
|
+
console.log(` ${DIM}${t('help.docs')} https://openyida.ai · https://github.com/openyida/openyida${RESET}`);
|
|
192
194
|
console.log('');
|
|
193
195
|
}
|
|
194
196
|
|
package/lib/app/app-list.js
CHANGED
|
@@ -109,13 +109,12 @@ async function run(args) {
|
|
|
109
109
|
authRef
|
|
110
110
|
);
|
|
111
111
|
} catch (err) {
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
console.error(`查询应用列表失败:${err.message}`);
|
|
113
|
+
process.exit(1);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
if (!apps || apps.length === 0) {
|
|
117
|
-
|
|
118
|
-
chalkWarn('暂无应用');
|
|
117
|
+
console.log('暂无应用');
|
|
119
118
|
return;
|
|
120
119
|
}
|
|
121
120
|
|
package/lib/core/chalk.js
CHANGED
|
@@ -122,8 +122,11 @@ function label(labelText, value, options = {}) {
|
|
|
122
122
|
* @param {boolean} [stderr=true]
|
|
123
123
|
*/
|
|
124
124
|
function success(message, stderr = true) {
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
if (stderr) {
|
|
126
|
+
console.error(` ${icon.success} ${message}`);
|
|
127
|
+
} else {
|
|
128
|
+
process.stdout.write(` ${icon.success} ${message}\n`);
|
|
129
|
+
}
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
/**
|
|
@@ -132,8 +135,11 @@ function success(message, stderr = true) {
|
|
|
132
135
|
* @param {boolean} [stderr=true]
|
|
133
136
|
*/
|
|
134
137
|
function fail(message, stderr = true) {
|
|
135
|
-
|
|
136
|
-
|
|
138
|
+
if (stderr) {
|
|
139
|
+
console.error(` ${icon.fail} ${c.red}${message}${c.reset}`);
|
|
140
|
+
} else {
|
|
141
|
+
process.stdout.write(` ${icon.fail} ${c.red}${message}${c.reset}\n`);
|
|
142
|
+
}
|
|
137
143
|
}
|
|
138
144
|
|
|
139
145
|
/**
|
|
@@ -142,8 +148,11 @@ function fail(message, stderr = true) {
|
|
|
142
148
|
* @param {boolean} [stderr=true]
|
|
143
149
|
*/
|
|
144
150
|
function warn(message, stderr = true) {
|
|
145
|
-
|
|
146
|
-
|
|
151
|
+
if (stderr) {
|
|
152
|
+
console.error(` ${icon.warn} ${c.yellow}${message}${c.reset}`);
|
|
153
|
+
} else {
|
|
154
|
+
process.stdout.write(` ${icon.warn} ${c.yellow}${message}${c.reset}\n`);
|
|
155
|
+
}
|
|
147
156
|
}
|
|
148
157
|
|
|
149
158
|
/**
|
|
@@ -152,8 +161,11 @@ function warn(message, stderr = true) {
|
|
|
152
161
|
* @param {boolean} [stderr=true]
|
|
153
162
|
*/
|
|
154
163
|
function info(message, stderr = true) {
|
|
155
|
-
|
|
156
|
-
|
|
164
|
+
if (stderr) {
|
|
165
|
+
console.error(` ${icon.info} ${message}`);
|
|
166
|
+
} else {
|
|
167
|
+
process.stdout.write(` ${icon.info} ${message}\n`);
|
|
168
|
+
}
|
|
157
169
|
}
|
|
158
170
|
|
|
159
171
|
/**
|
|
@@ -162,8 +174,11 @@ function info(message, stderr = true) {
|
|
|
162
174
|
* @param {boolean} [stderr=true]
|
|
163
175
|
*/
|
|
164
176
|
function hint(message, stderr = true) {
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
if (stderr) {
|
|
178
|
+
console.error(` ${c.dim}${message}${c.reset}`);
|
|
179
|
+
} else {
|
|
180
|
+
process.stdout.write(` ${c.dim}${message}${c.reset}\n`);
|
|
181
|
+
}
|
|
167
182
|
}
|
|
168
183
|
|
|
169
184
|
// ── Spinner 动画 ───────────────────────────────────────
|
package/lib/core/query-data.js
CHANGED
|
@@ -22,6 +22,8 @@ const {
|
|
|
22
22
|
requestWithAutoLogin,
|
|
23
23
|
} = require('./utils');
|
|
24
24
|
|
|
25
|
+
const { warn } = require('./chalk');
|
|
26
|
+
|
|
25
27
|
const USAGE = `openyida data - Unified Yida data CLI
|
|
26
28
|
|
|
27
29
|
Usage:
|
|
@@ -42,16 +44,14 @@ Usage:
|
|
|
42
44
|
`;
|
|
43
45
|
|
|
44
46
|
function fail(message) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
warn(USAGE);
|
|
47
|
+
console.error(message);
|
|
48
|
+
console.error(USAGE);
|
|
48
49
|
process.exit(1);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
function parseError(message) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
warn(USAGE);
|
|
53
|
+
console.error(`参数校验失败:${message}`);
|
|
54
|
+
console.error(USAGE);
|
|
55
55
|
process.exit(1);
|
|
56
56
|
}
|
|
57
57
|
|
package/lib/core/utils.js
CHANGED
package/lib/report/append.js
CHANGED
|
@@ -37,6 +37,7 @@ const {
|
|
|
37
37
|
getDefaultLayout,
|
|
38
38
|
} = require('./chart-builder');
|
|
39
39
|
const { genNodeId, genFieldId, randomId } = require('./constants');
|
|
40
|
+
const { warn } = require('../core/chalk');
|
|
40
41
|
|
|
41
42
|
// ── HTTP:获取已有报表 Schema ─────────────────────────
|
|
42
43
|
// GET 用 /alibaba/web/ 路径
|
package/lib/report/index.js
CHANGED
|
@@ -19,6 +19,8 @@ const {
|
|
|
19
19
|
buildDataSetModelMap,
|
|
20
20
|
} = require('./chart-builder');
|
|
21
21
|
const { genNodeId, genFieldId } = require('./constants');
|
|
22
|
+
|
|
23
|
+
const { warn } = require('../core/chalk');
|
|
22
24
|
const { createBlankReport, saveReportSchema } = require('./http');
|
|
23
25
|
|
|
24
26
|
// ── 参数解析 ──────────────────────────────────────────
|
package/package.json
CHANGED
package/yida-skills/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: yida-skills
|
|
3
3
|
description: "宜搭低代码平台 AI 开发助手。适用于一切业务数字化需求:创建登记表/申请表/信息收集表、设计审批流程、搭建数据报表/数据大屏、开发自定义页面、管理表单数据、闪记转PRD/会议纪要提取需求/需求文档生成、导出对话记录、编写公式/计算字段、配置连接器/外部API接入、设置权限/公开分享、集成自动化。当用户想要创建任何形式的表单、系统、页面、流程、报表,或提到员工管理、客户管理、费用报销、考勤打卡、项目管理等业务场景时触发。也适用于「宜搭」「yida」「低代码」「创建应用」「发布页面」「搭建系统」「PRD」「闪记」「会议记录」「对话导出」「公式」「连接器」「权限」「分享」「集成自动化」等关键词场景。"
|
|
4
4
|
metadata:
|
|
5
|
-
version: 2026.04.
|
|
5
|
+
version: 2026.04.14
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 宜搭 AI 应用开发指南
|