openyida 2026.8.30 → 2026.8.31-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 (36) hide show
  1. package/README.md +3 -3
  2. package/bin/yida.js +9 -2
  3. package/lib/app/build-page.js +26 -4
  4. package/lib/app/check-page.js +27 -7
  5. package/lib/app/create-form/field-normalizers.js +1 -0
  6. package/lib/app/create-form.js +334 -66
  7. package/lib/app/form-action-binding.js +185 -0
  8. package/lib/app/page-compat.js +19 -0
  9. package/lib/app/publish.js +22 -1
  10. package/lib/app/schema-semantic-analysis.js +56 -14
  11. package/lib/app/services/form-validation.js +1 -0
  12. package/lib/auth/token-store.js +2 -2
  13. package/lib/core/cli-error.js +46 -0
  14. package/lib/core/command-manifest.js +4 -3
  15. package/lib/core/copy.js +57 -0
  16. package/lib/core/locales/en.js +15 -0
  17. package/lib/core/locales/zh.js +15 -0
  18. package/lib/core/query-data.js +282 -5
  19. package/lib/report/append.js +28 -14
  20. package/lib/report/contract.js +35 -5
  21. package/lib/report/create-report.js +1 -1
  22. package/lib/report/index.js +33 -24
  23. package/lib/report/schema-template.js +0 -28
  24. package/package.json +1 -1
  25. package/yida-skills/references/yida-api.md +10 -0
  26. package/yida-skills/skills/yida-app/SKILL.md +2 -1
  27. package/yida-skills/skills/yida-app/workflow/step-4-forms-processes.md +14 -2
  28. package/yida-skills/skills/yida-create-form-page/SKILL.md +4 -2
  29. package/yida-skills/skills/yida-create-form-page/references/advanced-form-modes.md +35 -2
  30. package/yida-skills/skills/yida-data-management/SKILL.md +25 -2
  31. package/yida-skills/skills/yida-design/SKILL.md +1 -1
  32. package/yida-skills/skills/yida-design/workflow/output-prd.md +6 -4
  33. package/yida-skills/skills/yida-design/workflow/step-3-information-architecture.md +5 -2
  34. package/yida-skills/skills/yida-report/SKILL.md +26 -3
  35. package/yida-skills/skills/yida-report/references/examples.md +1 -1
  36. package/yida-skills/skills-index.json +6 -4
package/README.md CHANGED
@@ -430,7 +430,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
430
430
 
431
431
  | Command | Description |
432
432
  |---------|-------------|
433
- | `openyida data <query\|get\|create\|update\|delete> <form\|process\|subform\|tasks\|operation-records\|task> [args]` | Unified data management (form/process/task/subform) |
433
+ | `openyida data <query\|get\|create\|update> <resource> ... \| delete form <appType> <formUuid> --inst-id <id> --confirm [--json]` | Unified data management (form/process/task/subform) |
434
434
  | `openyida task-center <type> [options]` | Global task center (todo/processed/cc etc.) |
435
435
  | `openyida basic-info <overview\|commodity\|grant\|capacity\|quota\|abs-path\|dataflow\|i18n\|domain>` | Query organization basic info, capacity, quotas, and domain settings |
436
436
  | `openyida read-dingtalk-doc <docUrl> [--output <file>] [--json]` | Fetch Markdown content from a DingTalk document |
@@ -462,8 +462,8 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
462
462
 
463
463
  | Command | Description |
464
464
  |---------|-------------|
465
- | `openyida create-report <appType> "<name>" ... [--open\|--no-open]` | Create a Yida report |
466
- | `openyida append-chart <appType> <reportId> ... [--open\|--no-open]` | Append chart to existing report |
465
+ | `openyida create-report <appType> "<name>" ... [--json] [--open\|--no-open]` | Create a Yida report |
466
+ | `openyida append-chart <appType> <reportId> ... [--json] [--open\|--no-open]` | Append chart to existing report |
467
467
  | `openyida report inspect <appType> <reportId> --json` | Inspect report runtime bindings (read-only) |
468
468
 
469
469
  ### Connectors
package/bin/yida.js CHANGED
@@ -13,7 +13,12 @@
13
13
  const { version: currentVersion } = require('../package.json');
14
14
  const { t } = require('../lib/core/i18n');
15
15
  const { warn } = require('../lib/core/chalk');
16
- const { CliError, isCliError, toErrorPayload } = require('../lib/core/cli-error');
16
+ const {
17
+ CliError,
18
+ isCliError,
19
+ shouldUseStructuredErrorOutput,
20
+ toErrorPayload,
21
+ } = require('../lib/core/cli-error');
17
22
  const { COMMAND_GROUPS, buildCommandManifest, findCommandSuggestion } = require('../lib/core/command-manifest');
18
23
 
19
24
  const command = process.argv[2];
@@ -492,11 +497,13 @@ const MANIFEST_HELP_PATHS = Object.freeze({
492
497
  report: ['report'],
493
498
  'create-process': ['create-process'],
494
499
  'create-report': ['create-report'],
500
+ 'append-chart': ['append-chart'],
495
501
  'save-share-config': ['save-share-config'],
496
502
  'verify-short-url': ['verify-short-url'],
497
503
  'integration-create': ['integration', 'create'],
498
504
  'save-permission': ['save-permission'],
499
505
  'get-permission': ['get-permission'],
506
+ copy: ['copy'],
500
507
  });
501
508
 
502
509
  function printManifestCommandHelp(commandName) {
@@ -1261,7 +1268,7 @@ async function main() {
1261
1268
 
1262
1269
  main()
1263
1270
  .catch((err) => {
1264
- if (isCliError(err) && args.includes('--json')) {
1271
+ if (shouldUseStructuredErrorOutput(err, args)) {
1265
1272
  console.error(JSON.stringify(toErrorPayload(err), null, 2));
1266
1273
  } else if (isCliError(err)) {
1267
1274
  warn(t('cli.exec_failed', err.message));
@@ -65,6 +65,31 @@ async function run(args) {
65
65
  modern: options.modern,
66
66
  });
67
67
 
68
+ const throwBuildFailure = () => {
69
+ const matchedPrimaryIssue = buildResult.errors.find(issue => issue.code === 'UNSUPPORTED_HOOK') || buildResult.errors[0];
70
+ const primaryIssue = matchedPrimaryIssue ? JSON.parse(JSON.stringify(matchedPrimaryIssue)) : undefined;
71
+ throwCommandError(t('build_page.failed'), {
72
+ code: 'BUILD_PAGE_FAILED',
73
+ details: {
74
+ errors: buildResult.errors,
75
+ primaryIssue,
76
+ retryable: false,
77
+ retrySafe: true,
78
+ sideEffectState: 'none',
79
+ sourceRepairable: buildResult.errors.length > 0,
80
+ nextAction: {
81
+ type: 'edit_source_then_recheck',
82
+ commandId: 'check-page',
83
+ args: { sourcePath },
84
+ },
85
+ },
86
+ });
87
+ };
88
+
89
+ if (!buildResult.ok && options.json) {
90
+ throwBuildFailure();
91
+ }
92
+
68
93
  if (options.json) {
69
94
  console.log(JSON.stringify({
70
95
  ok: buildResult.ok,
@@ -92,10 +117,7 @@ async function run(args) {
92
117
  }
93
118
 
94
119
  if (!buildResult.ok) {
95
- throwCommandError(t('build_page.failed'), {
96
- code: 'BUILD_PAGE_FAILED',
97
- details: { errors: buildResult.errors },
98
- });
120
+ throwBuildFailure();
99
121
  }
100
122
 
101
123
  if (!options.json) {
@@ -44,6 +44,32 @@ async function run(args) {
44
44
  const buildErrors = buildResult && buildResult.errors ? buildResult.errors : [];
45
45
  const ok = buildErrors.length === 0 && lintResult.errors.length === 0;
46
46
 
47
+ const throwCheckFailure = () => {
48
+ const matchedPrimaryIssue = buildErrors.find(issue => issue.code === 'UNSUPPORTED_HOOK') || buildErrors[0] || lintResult.errors[0];
49
+ const primaryIssue = matchedPrimaryIssue ? JSON.parse(JSON.stringify(matchedPrimaryIssue)) : undefined;
50
+ throwCommandError(t('check_page.failed'), {
51
+ code: 'CHECK_PAGE_FAILED',
52
+ details: {
53
+ errors: lintResult.errors,
54
+ buildErrors,
55
+ primaryIssue,
56
+ retryable: false,
57
+ retrySafe: true,
58
+ sideEffectState: 'none',
59
+ sourceRepairable: buildErrors.length > 0,
60
+ nextAction: buildErrors.length > 0 ? {
61
+ type: 'edit_source_then_recheck',
62
+ commandId: 'check-page',
63
+ args: { sourcePath },
64
+ } : undefined,
65
+ },
66
+ });
67
+ };
68
+
69
+ if (!ok && options.json) {
70
+ throwCheckFailure();
71
+ }
72
+
47
73
  if (options.json) {
48
74
  console.log(JSON.stringify({
49
75
  ok,
@@ -67,13 +93,7 @@ async function run(args) {
67
93
  }
68
94
 
69
95
  if (!ok) {
70
- throwCommandError(t('check_page.failed'), {
71
- code: 'CHECK_PAGE_FAILED',
72
- details: {
73
- errors: lintResult.errors,
74
- buildErrors,
75
- },
76
- });
96
+ throwCheckFailure();
77
97
  }
78
98
  }
79
99
 
@@ -352,6 +352,7 @@ function createFieldNormalizers(deps) {
352
352
  'mac',
353
353
  'chineseID',
354
354
  'customValidate',
355
+ 'regex',
355
356
  ].indexOf(rule.type) !== -1;
356
357
  }
357
358