openyida 2026.5.21 → 2026.5.25

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 (51) hide show
  1. package/README.md +5 -1
  2. package/bin/yida.js +7 -1
  3. package/lib/app/app-list.js +20 -1
  4. package/lib/app/check-page.js +2 -2
  5. package/lib/app/compile.js +3 -2
  6. package/lib/app/externalize-form.js +642 -0
  7. package/lib/app/import-app.js +39 -11
  8. package/lib/app/page-compat.js +258 -2
  9. package/lib/app/page-compiler.js +4 -1
  10. package/lib/app/page-linter.js +271 -0
  11. package/lib/app/publish.js +3 -2
  12. package/lib/auth/cdp-browser-login.js +7 -3
  13. package/lib/auth/login.js +2 -3
  14. package/lib/core/command-manifest.js +3 -0
  15. package/lib/core/copy.js +50 -8
  16. package/lib/core/env-manager.js +24 -16
  17. package/lib/core/locales/ar.js +7 -0
  18. package/lib/core/locales/de.js +7 -0
  19. package/lib/core/locales/en.js +7 -0
  20. package/lib/core/locales/es.js +7 -0
  21. package/lib/core/locales/fr.js +7 -0
  22. package/lib/core/locales/hi.js +7 -0
  23. package/lib/core/locales/ja.js +7 -0
  24. package/lib/core/locales/ko.js +7 -0
  25. package/lib/core/locales/pt.js +7 -0
  26. package/lib/core/locales/vi.js +7 -0
  27. package/lib/core/locales/zh-HK.js +7 -0
  28. package/lib/core/locales/zh.js +7 -0
  29. package/lib/core/utils.js +2 -2
  30. package/lib/process/configure-process.js +552 -20
  31. package/package.json +1 -1
  32. package/project/pages/src/demo-agent-chatbox.oyd.jsx +78 -3
  33. package/scripts/e2e-real/full-runner.js +257 -8
  34. package/scripts/e2e-real/skill-coverage.js +2 -2
  35. package/yida-skills/SKILL.md +1 -1
  36. package/yida-skills/skills/yida-chart/SKILL.md +1 -1
  37. package/yida-skills/skills/yida-create-process/SKILL.md +3 -2
  38. package/yida-skills/skills/yida-custom-page/SKILL.md +7 -2
  39. package/yida-skills/skills/yida-custom-page/examples/attachment-upload.js +14 -12
  40. package/yida-skills/skills/yida-custom-page/references/attachment-upload-guide.md +3 -1
  41. package/yida-skills/skills/yida-custom-page/references/coding-guide.md +4 -0
  42. package/yida-skills/skills/yida-custom-page/references/component-jsx-guide.md +31 -22
  43. package/yida-skills/skills/yida-dashboard/SKILL.md +10 -9
  44. package/yida-skills/skills/yida-dashboard/references/interaction-patterns.md +2 -0
  45. package/yida-skills/skills/yida-dashboard/references/pitfalls.md +13 -4
  46. package/yida-skills/skills/yida-dashboard/references/structure-and-layout.md +1 -1
  47. package/yida-skills/skills/yida-ppt-slider/SKILL.md +47 -37
  48. package/yida-skills/skills/yida-ppt-slider/references/examples.md +5 -4
  49. package/yida-skills/skills/yida-process-rule/SKILL.md +93 -3
  50. package/yida-skills/skills/yida-process-rule/references/official-component-nodes.md +93 -0
  51. package/yida-skills/skills/yida-publish-page/SKILL.md +6 -4
package/README.md CHANGED
@@ -228,12 +228,13 @@ Most checks should stay offline, but OpenYida also includes an explicit real-env
228
228
  ```bash
229
229
  OPENYIDA_E2E=1 npm run test:e2e:real
230
230
  OPENYIDA_E2E=1 npm run test:e2e:real:full
231
+ OPENYIDA_E2E=1 OPENYIDA_E2E_FULL_STAGES=auth,app,form,process npm run test:e2e:real:full
231
232
  npm run test:e2e:real:skills
232
233
  ```
233
234
 
234
235
  The runner creates a disposable app, form, and custom page with an `OY_E2E_*` prefix, then verifies login, app listing, schema fetch, data query, and page publish. It writes a registry to `project/.cache/e2e-real/` so created resources can be audited later. To inject CI cookies without relying on a local login cache, pass `OPENYIDA_E2E_COOKIES_BASE64` as a base64 encoded cookie array or `{ "cookies": [...] }` object.
235
236
 
236
- `test:e2e:real:full` extends the smoke path into a broad deterministic feature matrix: auth/env, app update, form update and option mutation, page build/compile/generate/publish, data create/get/update/query, permission read, page config and short URL check, report create/append, dashboard skill verification, export/import, batch, task-center, formula/doctor/sample/CDN config, and local connector parsing/template generation. AI-backed commands such as `flash-to-prd` are available as the optional `ai` stage because they depend on remote model availability.
237
+ `test:e2e:real:full` extends the smoke path into a broad deterministic feature matrix: auth/env, app update, form update and option mutation, page build/compile/generate/publish, data create/get/update/query, permission read, page config and short URL check, report create/append, dashboard skill verification, export/import, batch, task-center, formula/doctor/sample/CDN config, and local connector parsing/template generation. AI-backed commands such as `flash-to-prd` are available as the optional `ai` stage because they depend on remote model availability. Workflow mutation is available as the opt-in `process` stage; it creates and republishes a workflow on the disposable E2E form and records advanced official-node fixtures for review.
237
238
 
238
239
  `test:e2e:real:skills` enforces coverage for every directory under `yida-skills/skills/`. Each skill must be classified as real E2E, offline/unit, opt-in, or deprecated with an explicit reason. This prevents new skills from quietly bypassing the real-environment test plan.
239
240
 
@@ -340,6 +341,9 @@ For overseas apps, pass `--locale en_US` or `--locale ja_JP` on creation command
340
341
  | `openyida verify-short-url <appType> <formUuid> <url>` | Verify a short URL |
341
342
  | `openyida save-share-config <appType> <formUuid> <url> <isOpen> [openAuth]` | Save public access or sharing configuration |
342
343
  | `openyida get-page-config <appType> <formUuid>` | Query public access or sharing configuration |
344
+ | `openyida externalize-form <appType> <formUuid> [--schema-file file]` | Assess public-access blockers and generate external-safe mirror fields |
345
+
346
+ `openyida externalize-form` is useful when a form contains fields such as `AssociationFormField`, `EmployeeField`, or `DepartmentSelectField` that depend on internal organization permissions. It produces a report plus optional `--mirror-fields-output` JSON that can be used with `openyida create-form create` to build a separate public intake form while keeping the internal form and its association fields private.
343
347
 
344
348
  ### Workflow, Reports, and Integrations
345
349
 
package/bin/yida.js CHANGED
@@ -426,7 +426,7 @@ async function main() {
426
426
 
427
427
  case 'copy': {
428
428
  const { run } = require('../lib/core/copy');
429
- run();
429
+ run(args);
430
430
  break;
431
431
  }
432
432
 
@@ -717,6 +717,12 @@ async function main() {
717
717
  break;
718
718
  }
719
719
 
720
+ case 'externalize-form': {
721
+ const { run } = require('../lib/app/externalize-form');
722
+ await run(args);
723
+ break;
724
+ }
725
+
720
726
  case 'update-form-config': {
721
727
  if (args.length < 4) {
722
728
  warn(t('cli.form_config_usage'));
@@ -19,7 +19,6 @@ const {
19
19
  httpGet,
20
20
  requestWithAutoLogin,
21
21
  } = require('../core/utils');
22
- const { t } = require('../core/i18n');
23
22
 
24
23
  const API_PATH = '/query/app/getAppList.json';
25
24
 
@@ -90,11 +89,31 @@ function formatApp(app) {
90
89
  };
91
90
  }
92
91
 
92
+ function hasHelpFlag(args) {
93
+ return (args || []).includes('--help') || (args || []).includes('-h');
94
+ }
95
+
96
+ function printUsage() {
97
+ process.stderr.write([
98
+ 'Usage: openyida app-list [--size N]',
99
+ '',
100
+ 'Options:',
101
+ ' --size N Page size used when fetching apps, default: 20',
102
+ ' --help, -h Show this help',
103
+ '',
104
+ ].join('\n'));
105
+ }
106
+
93
107
  /**
94
108
  * app-list 命令主入口
95
109
  * @param {string[]} args
96
110
  */
97
111
  async function run(args) {
112
+ if (hasHelpFlag(args)) {
113
+ printUsage();
114
+ return;
115
+ }
116
+
98
117
  const pageSizeIndex = args.indexOf('--size');
99
118
  const pageSize = pageSizeIndex !== -1 && args[pageSizeIndex + 1]
100
119
  ? parseInt(args[pageSizeIndex + 1], 10)
@@ -3,7 +3,7 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { lintYidaSource, printLintResult } = require('./page-linter');
6
- const { buildPageSource, isAuthoringPath } = require('./page-compat');
6
+ const { buildPageSource, shouldBuildPageSource } = require('./page-compat');
7
7
  const { t } = require('../core/i18n');
8
8
  const { warn, error, hint } = require('../core/chalk');
9
9
 
@@ -30,7 +30,7 @@ async function run(args) {
30
30
  }
31
31
 
32
32
  const sourceCode = fs.readFileSync(sourcePath, 'utf-8');
33
- const shouldBuild = options.compat || isAuthoringPath(sourcePath);
33
+ const shouldBuild = shouldBuildPageSource(sourceCode, sourcePath, { modern: options.compat });
34
34
  const buildResult = shouldBuild
35
35
  ? buildPageSource(sourceCode, sourcePath, { modern: options.compat })
36
36
  : null;
@@ -4,7 +4,7 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { compileSource } = require('./page-compiler');
6
6
  const { runLintCheck } = require('./page-linter');
7
- const { buildPageFile, isAuthoringPath } = require('./page-compat');
7
+ const { buildPageFile, shouldBuildPageSource } = require('./page-compat');
8
8
  const { t } = require('../core/i18n');
9
9
  const { warn, error, info, step } = require('../core/chalk');
10
10
 
@@ -27,7 +27,8 @@ async function run(args) {
27
27
  error(t('publish.source_not_found', sourcePath));
28
28
  }
29
29
 
30
- if (compat || isAuthoringPath(sourcePath)) {
30
+ const initialSourceCode = fs.readFileSync(sourcePath, 'utf-8');
31
+ if (shouldBuildPageSource(initialSourceCode, sourcePath, { modern: compat })) {
31
32
  info(t('build_page.preparing'));
32
33
  const buildResult = buildPageFile(sourcePath, { modern: compat });
33
34
  if (!buildResult.ok) {