openyida 2026.11.17 → 2026.11.19
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 +8 -0
- package/bin/yida.js +6 -0
- package/lib/app/app-list.js +2 -1
- package/lib/app/datav-designer.js +179 -0
- package/lib/app/datav.js +228 -0
- package/lib/core/command-manifest.js +102 -0
- package/lib/core/locales/en.js +11 -0
- package/lib/core/locales/zh.js +11 -0
- package/lib/design-plan/confirmation.js +31 -4
- package/lib/design-plan/patch.js +1 -0
- package/package.json +1 -1
- package/yida-skills/SKILL.md +7 -1
- package/yida-skills/skills/yida-app/SKILL.md +4 -2
- package/yida-skills/skills/yida-app/workflow/fast-build.md +9 -3
- package/yida-skills/skills/yida-app/workflow/plan/step-4-deliver.md +3 -3
- package/yida-skills/skills/yida-app/workflow/plan/workflow.md +1 -1
- package/yida-skills/skills/yida-app/workflow/step-6-main-page.md +2 -0
- package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +2 -0
- package/yida-skills/skills/yida-dashboard/SKILL.md +9 -2
- package/yida-skills/skills/yida-dashboard/references/theme-presets.md +8 -0
- package/yida-skills/skills/yida-datav/SKILL.md +81 -0
- package/yida-skills/skills/yida-datav/references/components-and-configuration.md +187 -0
- package/yida-skills/skills/yida-design/references/ask-human-interaction-contract.md +37 -9
- package/yida-skills/skills/yida-design/references/theme-selection.md +12 -0
- package/yida-skills/skills/yida-rechart/SKILL.md +19 -11
- package/yida-skills/skills-index.json +37 -1
package/README.md
CHANGED
|
@@ -554,6 +554,14 @@ When preparing a PR that needs a personal Fork, or when you ask how to support t
|
|
|
554
554
|
| `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
|
|
555
555
|
| `openyida create-page <appType> "<name>" [--mode dashboard] [--hide-nav] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom page |
|
|
556
556
|
| `openyida create-portal <appType> "<name>" [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a native YiDA portal |
|
|
557
|
+
| `openyida datav templates <appType> [--page <value>] [--page-size <value>] [--json]` | List native DataV screen templates |
|
|
558
|
+
| `openyida datav create <appType> <name> [--template <value>] [--locale <value>] [--wait-seconds <value>] [--json]` | Create a native YiDA DataV screen |
|
|
559
|
+
| `openyida datav inspect <appType> <formUuid> [--json]` | Inspect native DataV status and URLs |
|
|
560
|
+
| `openyida datav components <appType> <formUuid> [--component <value>] [--category <value>] [--search <value>] [--json]` | List DataV components and parameter definitions |
|
|
561
|
+
| `openyida datav config <appType> <formUuid> [--component <value>] [--json]` | Read DataV canvas and layer configuration |
|
|
562
|
+
| `openyida datav copy <appType> <formUuid> <name> [--locale <value>] [--wait-seconds <value>] [--json]` | Copy a native DataV screen |
|
|
563
|
+
| `openyida datav rename <appType> <formUuid> <name> [--locale <value>] [--json]` | Rename a native DataV screen |
|
|
564
|
+
| `openyida datav publish <appType> <formUuid> --confirm [--json]` | Publish and enable a native DataV screen |
|
|
557
565
|
| `openyida portal catalog [componentName] [--json]` | List configurable native portal components and theme options |
|
|
558
566
|
| `openyida portal inspect <appType> <formUuid> [--editable] [--json]` | Inspect native portal tiles and revision |
|
|
559
567
|
| `openyida portal configure <appType> <formUuid> <file> [--expected-revision <revision>] [--dry-run] [--json]` | Configure native portal tiles and layout |
|
package/bin/yida.js
CHANGED
|
@@ -860,6 +860,12 @@ async function dispatchCommand() {
|
|
|
860
860
|
break;
|
|
861
861
|
}
|
|
862
862
|
|
|
863
|
+
case 'datav': {
|
|
864
|
+
const { run } = require('../lib/app/datav');
|
|
865
|
+
await run(args);
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
|
|
863
869
|
case 'portal': {
|
|
864
870
|
const { run } = require('../lib/app/portal');
|
|
865
871
|
await run(args);
|
package/lib/app/app-list.js
CHANGED
|
@@ -36,8 +36,9 @@ function fetchAppListPage(auth, pageIndex, pageSize, isAdmin) {
|
|
|
36
36
|
_mock: 'false',
|
|
37
37
|
pageIndex,
|
|
38
38
|
pageSize,
|
|
39
|
-
creator: ref.userId,
|
|
40
39
|
isAdmin,
|
|
40
|
+
// 管理权限与创建人是独立条件;仅“我创建的”附加创建人筛选。
|
|
41
|
+
...(isAdmin ? {} : { creator: ref.userId }),
|
|
41
42
|
_stamp: Date.now(),
|
|
42
43
|
}));
|
|
43
44
|
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const https = require('node:https');
|
|
4
|
+
const { CliError } = require('../core/cli-error');
|
|
5
|
+
|
|
6
|
+
const ORIGIN = 'https://datav.aliyun.com';
|
|
7
|
+
|
|
8
|
+
function failure(code = 'DATAV_DESIGNER_UNAVAILABLE') {
|
|
9
|
+
const messages = {
|
|
10
|
+
DATAV_CONFIG_INVALID: 'The saved DataV configuration format is not supported.',
|
|
11
|
+
DATAV_CATALOGUE_INVALID: 'The DataV component catalogue returned an unsupported response.',
|
|
12
|
+
DATAV_COMPONENT_NOT_FOUND: 'No component matches the requested catalogue name or layer ID.',
|
|
13
|
+
};
|
|
14
|
+
return new CliError(messages[code] || 'DataV designer access could not be verified. Open the YiDA designer and check access before retrying.', { code });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Only the observed YiDA DataV integration origin may receive its temporary ticket. */
|
|
18
|
+
function allowedUrl(value) {
|
|
19
|
+
let url;
|
|
20
|
+
try {url = new URL(value, ORIGIN);} catch {throw failure();}
|
|
21
|
+
if (url.origin !== ORIGIN || url.username || url.password || url.hash) {throw failure();}
|
|
22
|
+
return url;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** A short-lived, memory-only DataV session. YiDA OAuth headers never cross origins. */
|
|
26
|
+
function session(request = https.request) {
|
|
27
|
+
const cookies = new Map();
|
|
28
|
+
async function get(value, redirects = 0) {
|
|
29
|
+
const url = allowedUrl(value);
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
const req = request(url, { method: 'GET', headers: {
|
|
32
|
+
Accept: '*/*', 'Accept-Encoding': 'identity', 'from-app': 'yida',
|
|
33
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
34
|
+
...(cookies.size ? { Cookie: [...cookies].map(([key, val]) => key + '=' + val).join('; ') } : {}),
|
|
35
|
+
} }, response => {
|
|
36
|
+
for (const entry of response.headers['set-cookie'] || []) {
|
|
37
|
+
const domain = /;\s*domain=([^;]+)/i.exec(entry);
|
|
38
|
+
if (domain && !['datav.aliyun.com', '.datav.aliyun.com'].includes(domain[1].toLowerCase())) {continue;}
|
|
39
|
+
const pair = /^([^=;\s]+)=([^;]*)/.exec(entry);
|
|
40
|
+
if (pair) {cookies.set(pair[1], pair[2]);}
|
|
41
|
+
}
|
|
42
|
+
if ([301, 302, 303, 307, 308].includes(response.statusCode)) {
|
|
43
|
+
response.resume();
|
|
44
|
+
try {
|
|
45
|
+
if (redirects >= 3 || !response.headers.location) {throw failure();}
|
|
46
|
+
resolve(get(allowedUrl(new URL(response.headers.location, url).href).href, redirects + 1));
|
|
47
|
+
} catch {reject(failure());}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (response.statusCode !== 200) {response.resume(); reject(failure()); return;}
|
|
51
|
+
let bytes = 0;
|
|
52
|
+
const chunks = [];
|
|
53
|
+
response.on('data', chunk => {
|
|
54
|
+
bytes += chunk.length;
|
|
55
|
+
if (bytes > 8 * 1024 * 1024) {req.destroy(); reject(failure()); return;}
|
|
56
|
+
chunks.push(chunk);
|
|
57
|
+
});
|
|
58
|
+
response.on('error', () => reject(failure()));
|
|
59
|
+
response.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')));
|
|
60
|
+
});
|
|
61
|
+
req.setTimeout(30000, () => {req.destroy(); reject(failure());});
|
|
62
|
+
req.on('error', () => reject(failure()));
|
|
63
|
+
req.end();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return { get };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Parse the JSON payload in Cube's known config envelope without evaluating script. */
|
|
70
|
+
function parseConfig(text, id) {
|
|
71
|
+
const prefix = `Cube("main:/admin/v3/screen/${id}/config.js", [], function (module, exports, require, load, __dirname, __filename) {module.exports = `;
|
|
72
|
+
const suffix = ';\nreturn module.exports;});';
|
|
73
|
+
if (!text.startsWith(prefix) || !text.trimEnd().endsWith(suffix)) {throw failure('DATAV_CONFIG_INVALID');}
|
|
74
|
+
let result;
|
|
75
|
+
try {result = JSON.parse(text.trimEnd().slice(prefix.length, -suffix.length));} catch {throw failure('DATAV_CONFIG_INVALID');}
|
|
76
|
+
if (!result || !Array.isArray(result.scenes) || !result.config || typeof result.config !== 'object') {throw failure('DATAV_CONFIG_INVALID');}
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function connect(client, metadata) {
|
|
81
|
+
const html = await client.get('/alibaba/web/' + metadata.appType + '/datav/vigoDesigner.html',
|
|
82
|
+
{ formUuid: metadata.formUuid }, { responseType: 'text', silentStatus: true });
|
|
83
|
+
const match = typeof html === 'string' && /datavScreenEdit:\s*"([^"\r\n]+)"/.exec(html);
|
|
84
|
+
if (!match) {throw failure();}
|
|
85
|
+
const url = allowedUrl(match[1].replace(/&/g, '&'));
|
|
86
|
+
if (url.pathname !== '/admin/screen/' + metadata.datavId || !url.searchParams.has('x-datav-login-ticket')) {throw failure();}
|
|
87
|
+
const remote = session();
|
|
88
|
+
const editor = await remote.get(url.href);
|
|
89
|
+
if (!editor.includes('configJSPath')) {throw failure();}
|
|
90
|
+
return remote;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Redact credentials in saved style URLs and bindings; never return share settings. */
|
|
94
|
+
function redact(value) {
|
|
95
|
+
if (Array.isArray(value)) {return value.map(redact);}
|
|
96
|
+
if (value && typeof value === 'object') {
|
|
97
|
+
return Object.fromEntries(Object.entries(value).map(([key, val]) =>
|
|
98
|
+
[key, /token|password|secret|cookie|authorization|credential|ticket|signature|access.?key|api.?key/i.test(key) ? '[redacted]' : redact(val)]));
|
|
99
|
+
}
|
|
100
|
+
if (typeof value === 'string') {
|
|
101
|
+
return value.replace(/([?&](?:[^=&\s]*(?:token|secret|password|ticket|signature|credential|authorization|access.?key|api.?key)[^=&\s]*)=)[^&#\s]*/gi, '$1[redacted]')
|
|
102
|
+
.replace(/(https?:\/\/)[^/\s:@]+:[^/\s@]+@/gi, '$1[redacted]@');
|
|
103
|
+
}
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function screenView(config, component) {
|
|
108
|
+
const scenes = config.scenes.map((scene, index) => ({ index, name: scene.name,
|
|
109
|
+
layers: Object.entries(scene.layers || {}).filter(([id]) => !component || component === id).map(([id, layer]) => ({
|
|
110
|
+
id, comName: layer.comName, version: layer.version, type: layer.type, comType: layer.comType,
|
|
111
|
+
parent: layer.parent, children: layer.children, attr: layer.attr, config: layer.config,
|
|
112
|
+
// Values and remote data-source credentials stay in the native designer.
|
|
113
|
+
dataInterfaces: Object.keys(layer.data || {}),
|
|
114
|
+
})),
|
|
115
|
+
}));
|
|
116
|
+
if (component && !scenes.some(scene => scene.layers.length)) {throw failure('DATAV_COMPONENT_NOT_FOUND');}
|
|
117
|
+
const { width, height, grid, display, backgroundColor, backgroundImage } = config.config;
|
|
118
|
+
return redact({ page: { width, height, grid, display, backgroundColor, backgroundImage }, scenes,
|
|
119
|
+
dataValuesIncluded: false, shareSettingsIncluded: false, writable: false });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function categories(entry) {
|
|
123
|
+
const types = [entry.type, entry.config?.type || []].flat().join(',');
|
|
124
|
+
const values = [];
|
|
125
|
+
if (/map|geo|datavgl|guston/.test(types) || /map2d|datavmap|xiongan_blockdata/.test(entry.name || '')) {values.push('map');}
|
|
126
|
+
if (/regular/.test(types)) {values.push('chart');}
|
|
127
|
+
if (/interact|control/.test(types)) {values.push('control');}
|
|
128
|
+
if (/figure|text|:info/.test(types)) {values.push('info');}
|
|
129
|
+
if (/table|list|:table/.test(types)) {values.push('table');}
|
|
130
|
+
if (/media|decorate/.test(types)) {values.push('media');}
|
|
131
|
+
if (/:analysis/.test(types)) {values.push('analysis');}
|
|
132
|
+
return values.length ? values : ['other'];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function parameters(fields, prefix = '') {
|
|
136
|
+
return Object.entries(fields || {}).flatMap(([key, field]) => {
|
|
137
|
+
if (!field || typeof field !== 'object') {return [];}
|
|
138
|
+
const path = prefix ? prefix + '.' + key : key;
|
|
139
|
+
const { name, type, description, default: initial, min, max, range, options, show, showInPanel, step, suffix } = field;
|
|
140
|
+
return [{ path, name, type, description, default: initial, min, max, range, options, show, showInPanel, step, suffix },
|
|
141
|
+
...parameters(field.children, path), ...parameters(field.template?.children, path + '[]')];
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function catalogueView(entries, args) {
|
|
146
|
+
if (!Array.isArray(entries)) {throw failure('DATAV_CATALOGUE_INVALID');}
|
|
147
|
+
const normalized = entries.map(entry => {
|
|
148
|
+
if (!entry || typeof entry !== 'object') {return {};}
|
|
149
|
+
let config = entry.config;
|
|
150
|
+
if (typeof config === 'string') {
|
|
151
|
+
try {config = JSON.parse(config);} catch {throw failure('DATAV_CATALOGUE_INVALID');}
|
|
152
|
+
}
|
|
153
|
+
return { ...entry, config };
|
|
154
|
+
});
|
|
155
|
+
const selected = normalized.filter(entry => typeof entry.name === 'string' &&
|
|
156
|
+
(!args.category || categories(entry).includes(args.category)) &&
|
|
157
|
+
(!args.component || entry.name === args.component) &&
|
|
158
|
+
(!args.search || (entry.name + ' ' + entry.cn_name).toLowerCase().includes(args.search.toLowerCase())));
|
|
159
|
+
if (args.component && !selected.length) {throw failure('DATAV_COMPONENT_NOT_FOUND');}
|
|
160
|
+
return { source: 'datav_component_catalogue', entitlementVerified: false, installedPackagesIncluded: false,
|
|
161
|
+
total: selected.length, components: selected.map(entry => ({ name: entry.name, title: entry.cn_name || entry.config?.cn_name || entry.name,
|
|
162
|
+
version: entry.version, categories: categories(entry), type: entry.type, level: entry.level,
|
|
163
|
+
dataInterfaces: Object.keys(entry.config?.apis || {}),
|
|
164
|
+
...(args.component ? { parameterDefinitions: parameters(entry.config?.config), definition: entry.config } : {}),
|
|
165
|
+
})) };
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
async function read(client, metadata, args) {
|
|
169
|
+
const remote = await connect(client, metadata);
|
|
170
|
+
if (args.action === 'config') {
|
|
171
|
+
return screenView(parseConfig(await remote.get('/api/admin/v3/screen/' + metadata.datavId + '/config.js?x-datav-from-app=yida&m=1'), metadata.datavId), args.component);
|
|
172
|
+
}
|
|
173
|
+
let entries;
|
|
174
|
+
const detail = args.component ? '' : '&withoutConfig=true';
|
|
175
|
+
try {entries = JSON.parse(await remote.get('/cube/modules?i18n=zh_CN&x-datav-from-app=yida' + detail));} catch {throw failure('DATAV_CATALOGUE_INVALID');}
|
|
176
|
+
return redact(catalogueView(entries, args));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
module.exports = { read, allowedUrl, session, parseConfig, screenView, catalogueView };
|
package/lib/app/datav.js
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { parseArgs } = require('node:util');
|
|
4
|
+
const { CliError } = require('../core/cli-error');
|
|
5
|
+
const { createYidaClient, unwrapYidaResponse } = require('../core/yida-client');
|
|
6
|
+
const { buildYidaTitleI18n, normalizeYidaLocale } = require('../core/yida-i18n');
|
|
7
|
+
const { fetchFormSchemaInfo } = require('./get-form-config');
|
|
8
|
+
|
|
9
|
+
const ACTIONS = new Set(['templates', 'create', 'inspect', 'copy', 'rename', 'publish', 'components', 'config']);
|
|
10
|
+
// Native resources use DATAV- IDs; FORM- targets still require a server datav type check.
|
|
11
|
+
const DATAV_RESOURCE_ID = /^(?:DATAV|FORM)-[A-Za-z0-9]+$/;
|
|
12
|
+
const USAGE = 'datav templates <appType> [--page <n>] [--page-size <n>]; datav create <appType> <name> [--template <id>] [--locale <locale>]; datav inspect|publish|config|components <appType> <formUuid>; datav copy|rename <appType> <formUuid> <name>';
|
|
13
|
+
|
|
14
|
+
/** Parse action-specific options before authentication or remote writes. */
|
|
15
|
+
function parse(input) {
|
|
16
|
+
const { positionals, values } = parseArgs({ args: input, allowPositionals: true, options: {
|
|
17
|
+
json: { type: 'boolean' }, confirm: { type: 'boolean' }, template: { type: 'string' }, locale: { type: 'string' },
|
|
18
|
+
page: { type: 'string' }, 'page-size': { type: 'string' }, 'wait-seconds': { type: 'string' },
|
|
19
|
+
component: { type: 'string' }, category: { type: 'string' }, search: { type: 'string' },
|
|
20
|
+
} });
|
|
21
|
+
const [action, appType, formOrName, name] = positionals;
|
|
22
|
+
const length = ['templates'].includes(action) ? 2 : ['copy', 'rename'].includes(action) ? 4 : 3;
|
|
23
|
+
if (!ACTIONS.has(action) || positionals.length !== length || !/^APP_[A-Za-z0-9]+$/.test(appType || '')) {
|
|
24
|
+
throw new CliError(USAGE, { code: 'DATAV_USAGE' });
|
|
25
|
+
}
|
|
26
|
+
const allowed = {
|
|
27
|
+
templates: ['page', 'page-size'], create: ['template', 'locale', 'wait-seconds'],
|
|
28
|
+
copy: ['locale', 'wait-seconds'], rename: ['locale'], inspect: [], publish: ['confirm'],
|
|
29
|
+
components: ['component', 'category', 'search'], config: ['component'],
|
|
30
|
+
}[action];
|
|
31
|
+
if (Object.keys(values).some(key => key !== 'json' && !allowed.includes(key))) {
|
|
32
|
+
throw new CliError(USAGE, { code: 'DATAV_USAGE' });
|
|
33
|
+
}
|
|
34
|
+
const needsForm = !['templates', 'create'].includes(action);
|
|
35
|
+
if (needsForm && !DATAV_RESOURCE_ID.test(formOrName || '')) {
|
|
36
|
+
throw new CliError('A native DataV formUuid is required.', { code: 'DATAV_USAGE' });
|
|
37
|
+
}
|
|
38
|
+
if (action === 'publish' && values.confirm !== true) {
|
|
39
|
+
throw new CliError('Publishing enables the DataV screen. Pass --confirm only when publication is requested.', { code: 'DATAV_PUBLISH_CONFIRM_REQUIRED' });
|
|
40
|
+
}
|
|
41
|
+
const title = action === 'create' ? formOrName : name;
|
|
42
|
+
if (title !== undefined && (!title.trim() || title.length > 150)) {
|
|
43
|
+
throw new CliError('The screen name must contain 1–150 characters.', { code: 'DATAV_USAGE' });
|
|
44
|
+
}
|
|
45
|
+
const locale = values.locale ? normalizeYidaLocale(values.locale) : 'zh_CN';
|
|
46
|
+
if (!locale) {throw new CliError('Unsupported content locale.', { code: 'DATAV_USAGE' });}
|
|
47
|
+
if (values.template !== undefined && !/^\d+$/.test(values.template)) {
|
|
48
|
+
throw new CliError('Use a templateId returned by datav templates.', { code: 'DATAV_USAGE' });
|
|
49
|
+
}
|
|
50
|
+
if (values.category !== undefined && !['chart', 'analysis', 'map', 'info', 'table', 'control', 'media', 'other'].includes(values.category)) {
|
|
51
|
+
throw new CliError('Use category chart|analysis|map|info|table|control|media|other.', { code: 'DATAV_USAGE' });
|
|
52
|
+
}
|
|
53
|
+
if (['component', 'search'].some(key => values[key] !== undefined && (!values[key].trim() || values[key].length > 200))) {
|
|
54
|
+
throw new CliError('Component and search values must contain 1–200 characters.', { code: 'DATAV_USAGE' });
|
|
55
|
+
}
|
|
56
|
+
const integer = (key, fallback, max) => {
|
|
57
|
+
const raw = values[key] === undefined ? String(fallback) : values[key];
|
|
58
|
+
if (!/^\d+$/.test(raw) || Number(raw) > max || (key !== 'wait-seconds' && Number(raw) < 1)) {
|
|
59
|
+
throw new CliError('Invalid --' + key, { code: 'DATAV_USAGE' });
|
|
60
|
+
}
|
|
61
|
+
return Number(raw);
|
|
62
|
+
};
|
|
63
|
+
return { action, appType, formUuid: needsForm ? formOrName : undefined, title, locale,
|
|
64
|
+
template: values.template, page: integer('page', 1, 1000000), pageSize: integer('page-size', 10, 100),
|
|
65
|
+
waitSeconds: integer('wait-seconds', 15, 60), component: values.component, category: values.category, search: values.search };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Return YiDA-hosted DataV routes; never expose the embedded DataV share token. */
|
|
69
|
+
function urls(client, appType, formUuid) {
|
|
70
|
+
const base = client.getAuthRef().baseUrl.replace(/\/$/, '') + '/alibaba/web/' + appType + '/datav/';
|
|
71
|
+
return { designerUrl: base + 'vigoDesigner.html?formUuid=' + formUuid,
|
|
72
|
+
previewUrl: base + 'preview.html?formUuid=' + formUuid };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Preserve business error codes, including missing DataV entitlement or quota. */
|
|
76
|
+
function unwrap(response, action) {
|
|
77
|
+
let envelope = response;
|
|
78
|
+
for (let depth = 0; depth < 3; depth++) {
|
|
79
|
+
// DataV's ServiceResult uses result for rename/publish and content for create;
|
|
80
|
+
// MVC may add a second success/content envelope around that ServiceResult.
|
|
81
|
+
const normalized = envelope && (envelope.content === null || envelope.content === undefined) && envelope.result !== undefined
|
|
82
|
+
? { ...envelope, content: envelope.result } : envelope;
|
|
83
|
+
let value;
|
|
84
|
+
try {value = unwrapYidaResponse(normalized, { action });} catch (error) {
|
|
85
|
+
throw new CliError(error.message, { code: 'DATAV_REQUEST_FAILED',
|
|
86
|
+
details: { platformErrorCode: envelope && envelope.errorCode } });
|
|
87
|
+
}
|
|
88
|
+
if (!value || typeof value !== 'object' || typeof value.success !== 'boolean' || value === envelope) {return value;}
|
|
89
|
+
envelope = value;
|
|
90
|
+
}
|
|
91
|
+
throw new CliError('Unsupported DataV response envelope.', { code: 'DATAV_RESPONSE_INVALID' });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Read metadata and async readiness for an existing DataV resource only. */
|
|
95
|
+
async function inspect(client, appType, formUuid) {
|
|
96
|
+
const metadata = unwrap(await fetchFormSchemaInfo(client.getAuthRef(), appType, formUuid), 'Read DataV metadata');
|
|
97
|
+
if (metadata.formType !== 'datav' || (metadata.formUuid && metadata.formUuid !== formUuid) ||
|
|
98
|
+
(metadata.appType && metadata.appType !== appType)) {
|
|
99
|
+
throw new CliError('The selected resource must belong to this app and have formType datav.', { code: 'DATAV_TYPE_REQUIRED' });
|
|
100
|
+
}
|
|
101
|
+
const value = unwrap(await client.get('/alibaba/web/' + appType + '/query/datavscreen/getCreateDatavResult.json', { formUuid }), 'Read DataV creation status');
|
|
102
|
+
const ready = /^\d+$/.test(String(value)) && Number.isSafeInteger(Number(value)) && Number(value) > 0;
|
|
103
|
+
return { appType, formUuid, formType: 'datav', title: metadata.title,
|
|
104
|
+
state: ready ? 'ready' : 'pending', datavId: ready ? Number(value) : null, ...urls(client, appType, formUuid) };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Write once; transport failures carry recovery details instead of replaying a mutation. */
|
|
108
|
+
async function write(client, appType, endpoint, body, target) {
|
|
109
|
+
let response;
|
|
110
|
+
try {
|
|
111
|
+
response = await client.postFormOnce('/alibaba/web/' + appType + '/query/datavscreen/' + endpoint + '.json',
|
|
112
|
+
ref => ({ _csrf_token: ref.csrfToken, ...body }));
|
|
113
|
+
} catch (error) {
|
|
114
|
+
throw new CliError(error.message, { code: 'DATAV_WRITE_UNCERTAIN', details: {
|
|
115
|
+
...target, sideEffectState: 'unknown', retrySafe: false,
|
|
116
|
+
recovery: target.formUuid ? ['datav', 'inspect', appType, target.formUuid, '--json'] : ['list-forms', appType],
|
|
117
|
+
} });
|
|
118
|
+
}
|
|
119
|
+
return unwrap(response, endpoint);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Create/copy asynchronously, retaining the resource identity if readiness cannot be verified. */
|
|
123
|
+
async function create(client, args) {
|
|
124
|
+
const { appType, action, title, locale, template, waitSeconds } = args;
|
|
125
|
+
if (action === 'copy') {
|
|
126
|
+
const source = await inspect(client, appType, args.formUuid);
|
|
127
|
+
if (source.state !== 'ready') {throw new CliError('The source DataV screen is not ready.', { code: 'DATAV_NOT_READY' });}
|
|
128
|
+
}
|
|
129
|
+
const titleValue = JSON.stringify(buildYidaTitleI18n(title, { [locale]: title }));
|
|
130
|
+
const body = action === 'copy' ? { formUuid: args.formUuid, appKey: appType, title: titleValue } : {
|
|
131
|
+
formType: 'datav', title: titleValue, parentNavUuid: '', relateFormType: '', relateFormUuid: '',
|
|
132
|
+
...(template === undefined ? {} : { templateUuid: template }),
|
|
133
|
+
};
|
|
134
|
+
const content = await write(client, appType, action === 'copy' ? 'copyDatavScreen' : 'createDatavScreenInfo', body, { appType });
|
|
135
|
+
const formUuid = typeof content === 'string' ? content : content && (content.formUuid || content.result);
|
|
136
|
+
if (!DATAV_RESOURCE_ID.test(formUuid || '')) {
|
|
137
|
+
throw new CliError('Creation was accepted without a usable formUuid. List existing app pages before retrying.', {
|
|
138
|
+
code: 'DATAV_CREATE_UNVERIFIED', details: { appType, sideEffectState: 'unknown', retrySafe: false, recovery: ['list-forms', appType] },
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
const deadline = Date.now() + waitSeconds * 1000;
|
|
142
|
+
try {
|
|
143
|
+
let first = true;
|
|
144
|
+
while (first || Date.now() < deadline) {
|
|
145
|
+
first = false;
|
|
146
|
+
const result = await inspect(client, appType, formUuid);
|
|
147
|
+
if (result.state === 'ready') {return { ...result, created: true, readbackVerified: true };}
|
|
148
|
+
if (Date.now() >= deadline) {break;}
|
|
149
|
+
await new Promise(resolve => setTimeout(resolve, Math.min(1500, deadline - Date.now())));
|
|
150
|
+
}
|
|
151
|
+
} catch (error) {
|
|
152
|
+
throw new CliError(error.message, { code: 'DATAV_CREATE_UNVERIFIED', details: {
|
|
153
|
+
appType, formUuid, created: true, sideEffectState: 'applied', retrySafe: false,
|
|
154
|
+
recovery: ['datav', 'inspect', appType, formUuid, '--json'],
|
|
155
|
+
} });
|
|
156
|
+
}
|
|
157
|
+
throw new CliError('The screen was created but is not ready. Inspect this same formUuid; do not create it again.', {
|
|
158
|
+
code: 'DATAV_CREATE_PENDING', details: { appType, formUuid, created: true, retrySafe: false,
|
|
159
|
+
...urls(client, appType, formUuid), recovery: ['datav', 'inspect', appType, formUuid, '--json'] },
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** Execute source-backed DataV lifecycle operations. Layout editing remains in its native designer. */
|
|
164
|
+
async function run(input) {
|
|
165
|
+
if (input.includes('--help') || input.includes('-h')) {
|
|
166
|
+
const action = input.find(value => !value.startsWith('-'));
|
|
167
|
+
const { COMMAND_GROUPS } = require('../core/command-manifest');
|
|
168
|
+
for (const command of COMMAND_GROUPS.flatMap(group => group.commands)) {
|
|
169
|
+
if (command.path[0] === 'datav' && (!action || action === command.path[1])) {
|
|
170
|
+
process.stdout.write('openyida ' + command.usage + '\n');
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const args = parse(input);
|
|
176
|
+
const client = createYidaClient();
|
|
177
|
+
const { action, appType, formUuid } = args;
|
|
178
|
+
let result;
|
|
179
|
+
if (action === 'templates') {
|
|
180
|
+
result = { appType, page: args.page, pageSize: args.pageSize,
|
|
181
|
+
templates: unwrap(await client.get('/alibaba/web/' + appType + '/datavtemplate/getTemplateList.json',
|
|
182
|
+
{ pageIndex: args.page, pageSize: args.pageSize }), 'List DataV templates') };
|
|
183
|
+
} else if (['create', 'copy'].includes(action)) {
|
|
184
|
+
result = await create(client, args);
|
|
185
|
+
} else {
|
|
186
|
+
result = await inspect(client, appType, formUuid);
|
|
187
|
+
if (['config', 'components'].includes(action)) {
|
|
188
|
+
if (result.state !== 'ready') {throw new CliError('The DataV screen is not ready.', { code: 'DATAV_NOT_READY' });}
|
|
189
|
+
const configuration = await require('./datav-designer').read(client, result, args);
|
|
190
|
+
console.log(JSON.stringify({ success: true, pageType: 'datav', ...result, ...configuration }, null, 2));
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (action !== 'inspect') {
|
|
194
|
+
if (result.state !== 'ready') {throw new CliError('The DataV screen is not ready.', { code: 'DATAV_NOT_READY', details: result });}
|
|
195
|
+
let title;
|
|
196
|
+
if (action === 'rename') {
|
|
197
|
+
title = typeof result.title === 'object' && result.title !== null ? { ...result.title } : buildYidaTitleI18n(String(result.title || ''));
|
|
198
|
+
title[args.locale] = args.title;
|
|
199
|
+
// The platform validates zh_CN and uses it to rename the DataV backing screen.
|
|
200
|
+
title.zh_CN = args.title;
|
|
201
|
+
}
|
|
202
|
+
const value = await write(client, appType, action === 'rename' ? 'modifyScreen' : 'saveScreen',
|
|
203
|
+
action === 'rename' ? { formUuid, datavId: result.datavId, screenTitle: JSON.stringify(title) } : { formUuid }, result);
|
|
204
|
+
if (value !== true) {
|
|
205
|
+
throw new CliError('The DataV write result was not confirmed. Inspect before retrying.', {
|
|
206
|
+
code: 'DATAV_WRITE_UNCERTAIN', details: { appType, formUuid, retrySafe: false },
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
const before = result;
|
|
210
|
+
try {
|
|
211
|
+
result = await inspect(client, appType, formUuid);
|
|
212
|
+
if (result.state !== 'ready' || before.datavId !== result.datavId ||
|
|
213
|
+
(title && (result.title[args.locale] !== args.title || result.title.zh_CN !== args.title))) {
|
|
214
|
+
throw new Error('DataV readback does not match the requested change.');
|
|
215
|
+
}
|
|
216
|
+
} catch (error) {
|
|
217
|
+
throw new CliError(error.message, { code: 'DATAV_READBACK_UNVERIFIED', details: {
|
|
218
|
+
appType, formUuid, sideEffectState: 'applied', retrySafe: false, recovery: ['datav', 'inspect', appType, formUuid, '--json'],
|
|
219
|
+
} });
|
|
220
|
+
}
|
|
221
|
+
result = { ...result, operation: action, readbackVerified: action === 'rename',
|
|
222
|
+
...(action === 'publish' ? { publishAccepted: true, enableRequested: true, layoutVerified: false } : {}) };
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
console.log(JSON.stringify({ success: true, pageType: 'datav', ...result }, null, 2));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
module.exports = { run, parse };
|
|
@@ -473,6 +473,10 @@ const COMMAND_SIDE_EFFECTS = new Map([
|
|
|
473
473
|
'process.fields',
|
|
474
474
|
'read-dingtalk-tingji',
|
|
475
475
|
'portal.inspect',
|
|
476
|
+
'datav.templates',
|
|
477
|
+
'datav.inspect',
|
|
478
|
+
'datav.components',
|
|
479
|
+
'datav.config',
|
|
476
480
|
'report.inspect',
|
|
477
481
|
'verify-short-url',
|
|
478
482
|
], sideEffect('remote_read')),
|
|
@@ -532,6 +536,10 @@ const COMMAND_SIDE_EFFECTS = new Map([
|
|
|
532
536
|
'create-form.validation',
|
|
533
537
|
'create-page',
|
|
534
538
|
'create-portal',
|
|
539
|
+
'datav.create',
|
|
540
|
+
'datav.copy',
|
|
541
|
+
'datav.rename',
|
|
542
|
+
'datav.publish',
|
|
535
543
|
'create-process',
|
|
536
544
|
'create-report',
|
|
537
545
|
'externalize-form',
|
|
@@ -757,6 +765,10 @@ const COMMAND_PERMISSIONS = new Map([
|
|
|
757
765
|
'read-dingtalk-tingji',
|
|
758
766
|
'portal.catalog',
|
|
759
767
|
'portal.inspect',
|
|
768
|
+
'datav.templates',
|
|
769
|
+
'datav.inspect',
|
|
770
|
+
'datav.components',
|
|
771
|
+
'datav.config',
|
|
760
772
|
'report.inspect',
|
|
761
773
|
'verify-short-url',
|
|
762
774
|
], permission('allow', 'read', {
|
|
@@ -805,6 +817,10 @@ const COMMAND_PERMISSIONS = new Map([
|
|
|
805
817
|
'create-form.validation',
|
|
806
818
|
'create-page',
|
|
807
819
|
'create-portal',
|
|
820
|
+
'datav.create',
|
|
821
|
+
'datav.copy',
|
|
822
|
+
'datav.rename',
|
|
823
|
+
'datav.publish',
|
|
808
824
|
'create-process',
|
|
809
825
|
'create-report',
|
|
810
826
|
'design-plan.init',
|
|
@@ -1783,6 +1799,92 @@ const COMMAND_GROUPS = [
|
|
|
1783
1799
|
],
|
|
1784
1800
|
notes: ['Use only when users explicitly request a native YiDA portal or explicitly rule out custom pages for that portal. General portal, homepage and workbench requests use create-page and Canvas. On CREATE_PAGE_PORTAL_NOT_VERIFIED, use recovery.command and recovery.args to verify the created page before retrying.'],
|
|
1785
1801
|
}),
|
|
1802
|
+
command('datav.templates', ['datav', 'templates'], 'datav templates <appType> [--page <value>] [--page-size <value>] [--json]', 'help.cmd_datav_templates', {
|
|
1803
|
+
managedRun: { scope: 'app', appPosition: 1 }, output: 'json',
|
|
1804
|
+
args: [
|
|
1805
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1806
|
+
{ name: 'page', type: 'string', source: 'option', builder_options: ['--page'] },
|
|
1807
|
+
{ name: 'page-size', type: 'string', source: 'option', builder_options: ['--page-size'] },
|
|
1808
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1809
|
+
],
|
|
1810
|
+
notes: ['Returns one page of DataV templates; templateId is passed to create --template. Does not authorize DataV data access.'],
|
|
1811
|
+
}),
|
|
1812
|
+
command('datav.create', ['datav', 'create'], 'datav create <appType> <name> [--template <value>] [--locale <value>] [--wait-seconds <value>] [--json]', 'help.cmd_datav_create', {
|
|
1813
|
+
managedRun: { scope: 'app', appPosition: 1, mutation: { operation: 'create_page' } }, output: 'json',
|
|
1814
|
+
args: [
|
|
1815
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1816
|
+
{ name: 'name', type: 'string', source: 'positional', position: 1, required: true },
|
|
1817
|
+
{ name: 'template', type: 'string', source: 'option', builder_options: ['--template'] },
|
|
1818
|
+
{ name: 'locale', type: 'string', source: 'option', builder_options: ['--locale'] },
|
|
1819
|
+
{ name: 'wait-seconds', type: 'string', source: 'option', builder_options: ['--wait-seconds'] },
|
|
1820
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1821
|
+
],
|
|
1822
|
+
notes: ['Explicit native DataV requests only. A pending or unverified create returns the existing formUuid and an inspect recovery command. Do not repeat creation. Default wait is 15 seconds, maximum 60. No implicit entitlement changes or authorization.'],
|
|
1823
|
+
}),
|
|
1824
|
+
command('datav.inspect', ['datav', 'inspect'], 'datav inspect <appType> <formUuid> [--json]', 'help.cmd_datav_inspect', {
|
|
1825
|
+
managedRun: { scope: 'app', appPosition: 1 }, output: 'json',
|
|
1826
|
+
args: [
|
|
1827
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1828
|
+
{ name: 'formUuid', type: 'string', source: 'positional', position: 1, required: true },
|
|
1829
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1830
|
+
],
|
|
1831
|
+
notes: ['Verifies formType datav and reads asynchronous creation readiness; returns YiDA-hosted designer and preview URLs without DataV share tokens.'],
|
|
1832
|
+
}),
|
|
1833
|
+
command('datav.components', ['datav', 'components'], 'datav components <appType> <formUuid> [--component <value>] [--category <value>] [--search <value>] [--json]', 'help.cmd_datav_components', {
|
|
1834
|
+
managedRun: { scope: 'app', appPosition: 1 }, output: 'json',
|
|
1835
|
+
args: [
|
|
1836
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1837
|
+
{ name: 'formUuid', type: 'string', source: 'positional', position: 1, required: true },
|
|
1838
|
+
{ name: 'component', type: 'string', source: 'option', builder_options: ['--component'] },
|
|
1839
|
+
{ name: 'category', type: 'string', source: 'option', builder_options: ['--category'] },
|
|
1840
|
+
{ name: 'search', type: 'string', source: 'option', builder_options: ['--search'] },
|
|
1841
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1842
|
+
],
|
|
1843
|
+
notes: ['Reads the DataV catalogue through the selected YiDA screen. --component uses a catalogue name and returns its configuration/data/event definitions. Catalogue presence does not verify entitlements or installed commercial packages. Categories: chart, analysis, map, info, table, control, media, other. No mutation or publication.'],
|
|
1844
|
+
}),
|
|
1845
|
+
command('datav.config', ['datav', 'config'], 'datav config <appType> <formUuid> [--component <value>] [--json]', 'help.cmd_datav_config', {
|
|
1846
|
+
managedRun: { scope: 'app', appPosition: 1 }, output: 'json',
|
|
1847
|
+
args: [
|
|
1848
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1849
|
+
{ name: 'formUuid', type: 'string', source: 'positional', position: 1, required: true },
|
|
1850
|
+
{ name: 'component', type: 'string', source: 'option', builder_options: ['--component'] },
|
|
1851
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1852
|
+
],
|
|
1853
|
+
notes: ['Reads saved canvas and layer styles; --component uses a real layer ID. Excludes data values and share settings and redacts credentials. No script evaluation. Read-only: not a complete import/backup format.'],
|
|
1854
|
+
}),
|
|
1855
|
+
command('datav.copy', ['datav', 'copy'], 'datav copy <appType> <formUuid> <name> [--locale <value>] [--wait-seconds <value>] [--json]', 'help.cmd_datav_copy', {
|
|
1856
|
+
managedRun: { scope: 'app', appPosition: 1, mutation: { operation: 'create_page' } }, output: 'json',
|
|
1857
|
+
args: [
|
|
1858
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1859
|
+
{ name: 'formUuid', type: 'string', source: 'positional', position: 1, required: true },
|
|
1860
|
+
{ name: 'name', type: 'string', source: 'positional', position: 2, required: true },
|
|
1861
|
+
{ name: 'locale', type: 'string', source: 'option', builder_options: ['--locale'] },
|
|
1862
|
+
{ name: 'wait-seconds', type: 'string', source: 'option', builder_options: ['--wait-seconds'] },
|
|
1863
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1864
|
+
],
|
|
1865
|
+
notes: ['Copies a ready native DataV screen within the same app. Pending creation retains the new formUuid for inspect recovery. No automatic replay on uncertain writes.'],
|
|
1866
|
+
}),
|
|
1867
|
+
command('datav.rename', ['datav', 'rename'], 'datav rename <appType> <formUuid> <name> [--locale <value>] [--json]', 'help.cmd_datav_rename', {
|
|
1868
|
+
managedRun: { scope: 'app', appPosition: 1, mutation: { operation: 'update_page', formUuidPosition: 2 } }, output: 'json',
|
|
1869
|
+
args: [
|
|
1870
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1871
|
+
{ name: 'formUuid', type: 'string', source: 'positional', position: 1, required: true },
|
|
1872
|
+
{ name: 'name', type: 'string', source: 'positional', position: 2, required: true },
|
|
1873
|
+
{ name: 'locale', type: 'string', source: 'option', builder_options: ['--locale'] },
|
|
1874
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1875
|
+
],
|
|
1876
|
+
notes: ['Renames a ready screen and verifies the title readback; preserves other language titles except zh_CN, which the platform requires for the DataV backing name.'],
|
|
1877
|
+
}),
|
|
1878
|
+
command('datav.publish', ['datav', 'publish'], 'datav publish <appType> <formUuid> --confirm [--json]', 'help.cmd_datav_publish', {
|
|
1879
|
+
managedRun: { scope: 'app', appPosition: 1, mutation: { operation: 'publish_page', formUuidPosition: 2, requiredFlags: ['--confirm'] } }, output: 'json',
|
|
1880
|
+
args: [
|
|
1881
|
+
{ name: 'appType', type: 'string', source: 'positional', position: 0, required: true },
|
|
1882
|
+
{ name: 'formUuid', type: 'string', source: 'positional', position: 1, required: true },
|
|
1883
|
+
{ name: 'confirm', type: 'boolean', source: 'option', required: true, builder_options: ['--confirm'] },
|
|
1884
|
+
{ name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] },
|
|
1885
|
+
],
|
|
1886
|
+
notes: ['Requires an explicit publication request and --confirm. The platform saveScreen endpoint publishes and enables the DataV screen with token-protected access. Does not accept layout JSON. publishAccepted and enableRequested report the accepted operation; preview verification of layout and data remains required.'],
|
|
1887
|
+
}),
|
|
1786
1888
|
command('portal.catalog', ['portal', 'catalog'], 'portal catalog [componentName] [--json]', 'help.cmd_portal_catalog', {
|
|
1787
1889
|
managedRun: { scope: 'local' }, requiresLogin: false, output: 'json',
|
|
1788
1890
|
args: [{ name: 'componentName', type: 'string', source: 'positional', position: 0 }, { name: 'json', type: 'boolean', source: 'option', builder_options: ['--json'] }],
|
package/lib/core/locales/en.js
CHANGED
|
@@ -212,6 +212,9 @@ module.exports = {
|
|
|
212
212
|
page_offline: 'Menu data cannot confirm page {0} is live. If its published URL opens, pass the full URL with --frontend.',
|
|
213
213
|
},
|
|
214
214
|
design_plan: {
|
|
215
|
+
confirmation_header: 'Build plan',
|
|
216
|
+
confirmation_build_description: 'Create the application, forms, workflows and pages from this plan.',
|
|
217
|
+
confirmation_edit_description: 'Refine this plan before confirming the build.',
|
|
215
218
|
confirmation_required: 'Confirmation requires the current plan snapshot and revision. Materialize the plan first.',
|
|
216
219
|
rebase_required: 'Before first materialization, repair the matching facts in business.json/visual.json and preserve the source baseline. If the source changed, add --rebase-parts to the original materialize command to reconcile against the saved baseline. Do not invent a digest, delete drafts, or run init again.',
|
|
217
220
|
baseline_missing: 'No trusted baseline matches these parts. Preserve the plan and facts; restore .build-plan-base.json from the original workspace. If unavailable, report the blocker instead of inventing a digest or rebuilding.',
|
|
@@ -295,6 +298,14 @@ module.exports = {
|
|
|
295
298
|
cmd_check_prd_completeness: 'Check resources, navigation visibility and application theme',
|
|
296
299
|
cmd_er: 'Export app entity relationship diagram',
|
|
297
300
|
cmd_create_page: 'Create a custom page',
|
|
301
|
+
cmd_datav_templates: 'List native DataV screen templates',
|
|
302
|
+
cmd_datav_create: 'Create a native YiDA DataV screen',
|
|
303
|
+
cmd_datav_inspect: 'Inspect native DataV status and URLs',
|
|
304
|
+
cmd_datav_components: 'List DataV components and parameter definitions',
|
|
305
|
+
cmd_datav_config: 'Read DataV canvas and layer configuration',
|
|
306
|
+
cmd_datav_copy: 'Copy a native DataV screen',
|
|
307
|
+
cmd_datav_rename: 'Rename a native DataV screen',
|
|
308
|
+
cmd_datav_publish: 'Publish and enable a native DataV screen',
|
|
298
309
|
cmd_portal_create: 'Create a native YiDA portal',
|
|
299
310
|
cmd_portal_catalog: 'List configurable native portal components and theme options',
|
|
300
311
|
cmd_portal_inspect: 'Inspect native portal tiles and revision',
|
package/lib/core/locales/zh.js
CHANGED
|
@@ -212,6 +212,9 @@ module.exports = {
|
|
|
212
212
|
page_offline: '菜单数据无法确认前台页 {0} 已上线。如已发布且实测可访问,请用 --frontend 传完整地址。',
|
|
213
213
|
},
|
|
214
214
|
design_plan: {
|
|
215
|
+
confirmation_header: '搭建方案',
|
|
216
|
+
confirmation_build_description: '按当前方案创建应用、表单、流程和页面。',
|
|
217
|
+
confirmation_edit_description: '继续完善当前方案,确认后再开始搭建。',
|
|
215
218
|
confirmation_required: '确认需要当前方案快照和版本,请先生成方案。',
|
|
216
219
|
rebase_required: '首次物化前请修正 business.json/visual.json 中的对应 facts,保留主计划基线。如果主计划已改变,在原 materialize 命令加 --rebase-parts,CLI 会根据保存的基线核对差异;不要手填 digest、删除草稿或重新 init。',
|
|
217
220
|
baseline_missing: '未找到与片段匹配的可信原始基线。保留当前计划与 facts;从原工作区恢复 .build-plan-base.json 后重试。无法恢复时明确告知用户阻塞,不伪造摘要或自动重建。',
|
|
@@ -295,6 +298,14 @@ module.exports = {
|
|
|
295
298
|
cmd_check_prd_completeness: '检查资源、导航显隐及应用主题',
|
|
296
299
|
cmd_er: '导出应用实体关系图',
|
|
297
300
|
cmd_create_page: '创建自定义页面',
|
|
301
|
+
cmd_datav_templates: '查询原生大屏模板',
|
|
302
|
+
cmd_datav_create: '创建宜搭原生大屏',
|
|
303
|
+
cmd_datav_inspect: '回读原生大屏状态与入口',
|
|
304
|
+
cmd_datav_components: '查询大屏组件目录与参数定义',
|
|
305
|
+
cmd_datav_config: '读取大屏画布与图层配置',
|
|
306
|
+
cmd_datav_copy: '复制宜搭原生大屏',
|
|
307
|
+
cmd_datav_rename: '修改原生大屏名称',
|
|
308
|
+
cmd_datav_publish: '发布并启用原生 DataV 大屏',
|
|
298
309
|
cmd_portal_create: '创建宜搭原生门户',
|
|
299
310
|
cmd_portal_catalog: '查看原生门户可配置的组件和主题',
|
|
300
311
|
cmd_portal_inspect: '查看原生门户磁贴与版本',
|