openyida 2026.8.4 → 2026.8.11
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 +12 -16
- package/bin/yida.js +13 -6
- package/docs/capabilities.md +2 -3
- package/lib/app/app-lifecycle.js +128 -0
- package/lib/app/canvas-compile.js +237 -0
- package/lib/app/create-form.js +14 -228
- package/lib/app/form-detail-link-guard.js +200 -0
- package/lib/app/form-detail-style.js +476 -0
- package/lib/app/form-open-guard.js +222 -0
- package/lib/app/form-theme-action.js +439 -0
- package/lib/app/get-schema.js +123 -2
- package/lib/app/jsx-text-guard.js +69 -0
- package/lib/app/page-linter.js +69 -5
- package/lib/app/page-richness-guard.js +108 -0
- package/lib/app/services/canvas-page-schema-builder.js +82 -2
- package/lib/app/services/form-compiler.js +11 -0
- package/lib/core/agent-capabilities.js +35 -35
- package/lib/core/command-manifest.js +27 -15
- package/lib/core/locales/en.js +28 -6
- package/lib/core/locales/zh.js +29 -7
- package/lib/core/sample.js +3 -34
- package/lib/integration/integration-process-builder.js +1 -1
- package/lib/integration/integration-spec-builder.js +2 -2
- package/lib/integration/integration-view-builder.js +1 -1
- package/lib/samples/yida-create-app/ipd-app-template.js +1 -1
- package/package.json +1 -1
- package/scripts/build-skills-package.js +16 -34
- package/scripts/postinstall.js +13 -12
- package/yida-skills/SKILL.md +33 -30
- package/yida-skills/references/development-rules.md +5 -4
- package/yida-skills/references/field-and-url-reference.md +5 -3
- package/yida-skills/references/task-retrospective.md +28 -28
- package/yida-skills/skills/yida-app/SKILL.md +113 -108
- package/yida-skills/skills/yida-app/references/app-build-contract.md +61 -179
- package/yida-skills/skills/yida-app-lifecycle/SKILL.md +56 -0
- package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +40 -102
- package/yida-skills/skills/yida-canvas-custom-page/references/canvas-authoring-examples.md +4 -3
- package/yida-skills/skills/yida-canvas-custom-page/references/canvas-style-implementation-guide.md +421 -0
- package/yida-skills/skills/yida-canvas-custom-page/references/component-library-guide.md +37 -18
- package/yida-skills/skills/yida-canvas-custom-page/references/data-bridge-guide.md +29 -11
- package/yida-skills/skills/yida-canvas-custom-page/references/dependencies-and-cdn.md +1 -0
- package/yida-skills/skills/yida-canvas-custom-page/references/native-components-bridge.md +2 -11
- package/yida-skills/skills/yida-canvas-custom-page/references/navigation-and-entry-guide.md +166 -13
- package/yida-skills/skills/yida-canvas-custom-page/references/page-generation-guide.md +114 -43
- package/yida-skills/skills/yida-canvas-custom-page/references/theme-runtime-helpers.md +177 -0
- package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +52 -46
- package/yida-skills/skills/yida-canvas-table-form/SKILL.md +5 -6
- package/yida-skills/skills/yida-canvas-upgrade/SKILL.md +1 -1
- package/yida-skills/skills/yida-chart/SKILL.md +2 -2
- package/yida-skills/skills/yida-chart/references/echarts-code-template.md +1 -1
- package/yida-skills/skills/yida-create-app/SKILL.md +13 -20
- package/yida-skills/skills/yida-create-form-page/SKILL.md +15 -7
- package/yida-skills/skills/yida-create-form-page/references/form-field-properties.md +3 -3
- package/yida-skills/skills/yida-create-page/SKILL.md +2 -2
- package/yida-skills/skills/yida-custom-page/SKILL.md +28 -35
- package/yida-skills/skills/yida-custom-page/references/assets-guide.md +6 -22
- package/yida-skills/skills/yida-custom-page/references/attachment-upload-guide.md +1 -1
- package/yida-skills/skills/yida-custom-page/references/coding-guide.md +55 -4
- package/yida-skills/skills/yida-custom-page/references/design-system.md +22 -38
- package/yida-skills/skills/yida-dashboard/SKILL.md +10 -13
- package/yida-skills/skills/yida-dashboard/references/structure-and-layout.md +2 -2
- package/yida-skills/skills/yida-dashboard/references/theme-presets.md +1 -1
- package/yida-skills/skills/yida-data-management/SKILL.md +16 -6
- package/yida-skills/skills/yida-density/SKILL.md +2 -2
- package/yida-skills/skills/yida-design/SKILL.md +98 -0
- package/yida-skills/skills/yida-design/references/app/blueprint.md +61 -0
- package/yida-skills/skills/{yida-page-uiux → yida-design}/references/asset-workflow.md +16 -16
- package/yida-skills/skills/yida-design/references/page-quality-gates.md +125 -0
- package/yida-skills/skills/yida-design/references/style-design-selection.md +118 -0
- package/yida-skills/skills/yida-design/references/style-designs/_design-md-template.md +185 -0
- package/yida-skills/skills/yida-design/references/style-designs/aqua-service-progress-dashboard.md +242 -0
- package/yida-skills/skills/yida-design/references/style-designs/blue-insight-operations-dashboard.md +243 -0
- package/yida-skills/skills/yida-design/references/style-designs/blue-productivity-insight-workbench.md +242 -0
- package/yida-skills/skills/yida-design/references/style-designs/command-filter-card-console.md +304 -0
- package/yida-skills/skills/yida-design/references/style-designs/contrast-command-analytics-workbench.md +261 -0
- package/yida-skills/skills/yida-design/references/style-designs/dark-stage-analytic-dashboard.md +369 -0
- package/yida-skills/skills/yida-design/references/style-designs/filterable-card-catalog.md +354 -0
- package/yida-skills/skills/yida-design/references/style-designs/green-timeline-progress-workbench.md +250 -0
- package/yida-skills/skills/yida-design/references/style-designs/registry.md +91 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-analytic-workbench.md +348 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-blue-grid-analytic-dashboard.md +658 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-bordered-analytic-workbench.md +385 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-curated-filter-gallery.md +300 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-modular-analytic-workbench.md +404 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-progress-analytics-workbench.md +382 -0
- package/yida-skills/skills/yida-design/references/style-designs/soft-timeline-analytics-workbench.md +367 -0
- package/yida-skills/skills/yida-design/references/style-designs/teal-rail-analytics-workbench.md +341 -0
- package/yida-skills/skills/yida-design/references/theme/theme-token-presets.md +394 -0
- package/yida-skills/skills/{yida-page-uiux → yida-design}/references/visual-decision-engine.md +7 -7
- package/yida-skills/skills/yida-design/references/visual-scaffold-recipes.md +191 -0
- package/yida-skills/skills/yida-design/sub_skill/page-design/SKILL.md +57 -0
- package/yida-skills/skills/yida-design/workflow/output-design.md +391 -0
- package/yida-skills/skills/yida-design/workflow/output-prd.md +178 -0
- package/yida-skills/skills/yida-design/workflow/step-1-positioning.md +58 -0
- package/yida-skills/skills/yida-design/workflow/step-2-theme-system.md +111 -0
- package/yida-skills/skills/yida-design/workflow/step-3-information-architecture.md +70 -0
- package/yida-skills/skills/yida-design/workflow/step-4-wireframe-interaction.md +52 -0
- package/yida-skills/skills/yida-design/workflow/step-5-visual-states.md +118 -0
- package/yida-skills/skills/yida-design/workflow/step-6-handoff.md +62 -0
- package/yida-skills/skills/yida-flash-note-to-prd/SKILL.md +8 -8
- package/yida-skills/skills/yida-flash-note-to-prd/references/flash-note-prd-template.md +1 -1
- package/yida-skills/skills/yida-form-detail/SKILL.md +35 -36
- package/yida-skills/skills/yida-form-detail/references/injection-guide.md +43 -121
- package/yida-skills/skills/yida-get-schema/SKILL.md +1 -1
- package/yida-skills/skills/yida-integration/references/integration-node-schemas.md +1 -1
- package/yida-skills/skills/yida-nav-group/SKILL.md +5 -4
- package/yida-skills/skills/yida-nav-shell/SKILL.md +2 -2
- package/yida-skills/skills/yida-nav-shell/references/nav-shell-patterns.md +3 -3
- package/yida-skills/skills/yida-ppt-slider/references/dark-tech-theme.md +1 -1
- package/yida-skills/skills/yida-process-rule/references/examples.md +6 -6
- package/yida-skills/skills/yida-process-rule/references/process-ai-rules.md +3 -3
- package/yida-skills/skills/yida-publish-page/SKILL.md +2 -2
- package/yida-skills/skills/yida-rechart/SKILL.md +5 -8
- package/yida-skills/skills/yida-report/SKILL.md +6 -6
- package/yida-skills/skills/yida-table-form/SKILL.md +2 -15
- package/yida-skills/skills-index.json +144 -97
- package/lib/app/generate-page.js +0 -819
- package/lib/app/page-ir.js +0 -1680
- package/lib/samples/yida-canvas-custom-page/business-list.canvas.jsx +0 -741
- package/lib/samples/yida-canvas-custom-page/dashboard-overview.canvas.jsx +0 -782
- package/lib/samples/yida-canvas-custom-page/dashboard-starter.canvas.jsx +0 -389
- package/lib/samples/yida-canvas-custom-page/data-management.canvas.jsx +0 -1397
- package/lib/samples/yida-canvas-custom-page/data-screen.canvas.jsx +0 -1117
- package/lib/samples/yida-canvas-custom-page/detail-profile.canvas.jsx +0 -421
- package/lib/samples/yida-canvas-custom-page/native-components-smoke.canvas.jsx +0 -786
- package/lib/samples/yida-canvas-custom-page/official-homepage.canvas.jsx +0 -936
- package/lib/samples/yida-canvas-custom-page/portal-native-components.canvas.jsx +0 -1273
- package/lib/samples/yida-canvas-custom-page/portal-shell-home.canvas.jsx +0 -489
- package/lib/samples/yida-canvas-custom-page/product-homepage.canvas.jsx +0 -777
- package/lib/samples/yida-canvas-custom-page/split-pane-detail.canvas.jsx +0 -616
- package/lib/samples/yida-canvas-custom-page/todo-mvc.canvas.jsx +0 -614
- package/lib/samples/yida-canvas-custom-page/workbench-home.canvas.jsx +0 -692
- package/lib/samples/yida-custom-page/business-list.oyd.jsx +0 -443
- package/lib/samples/yida-custom-page/custom-page-template.js +0 -842
- package/lib/samples/yida-custom-page/dashboard-overview.oyd.jsx +0 -327
- package/lib/samples/yida-custom-page/data-management.oyd.jsx +0 -274
- package/lib/samples/yida-custom-page/data-screen.oyd.jsx +0 -348
- package/lib/samples/yida-custom-page/design-tokens.js +0 -262
- package/lib/samples/yida-custom-page/detail-profile.oyd.jsx +0 -241
- package/lib/samples/yida-custom-page/official-homepage.oyd.jsx +0 -218
- package/lib/samples/yida-custom-page/portal-shell-home.oyd.jsx +0 -268
- package/lib/samples/yida-custom-page/product-homepage.jsx +0 -752
- package/lib/samples/yida-custom-page/split-pane-detail.oyd.jsx +0 -245
- package/lib/samples/yida-custom-page/todo-mvc.oyd.jsx +0 -901
- package/lib/samples/yida-custom-page/workbench-home.oyd.jsx +0 -707
- package/project/prd/demo-birthday-game.md +0 -48
- package/project/prd/demo-crm.md +0 -463
- package/project/prd/demo-dingtalk-ai-solution-center.md +0 -425
- package/project/prd/demo-future-vision-2026.md +0 -78
- package/project/prd/demo-salary-calculator.md +0 -101
- package/yida-skills/skills/yida-app/references/ui-guidance-by-mode.md +0 -77
- package/yida-skills/skills/yida-app-uiux/SKILL.md +0 -97
- package/yida-skills/skills/yida-canvas-custom-page/references/canvas-design-system.md +0 -276
- package/yida-skills/skills/yida-page-uiux/SKILL.md +0 -154
- package/yida-skills/skills/yida-page-uiux/references/app/blueprint.md +0 -20
- package/yida-skills/skills/yida-page-uiux/references/dashboard/app-blueprint.md +0 -18
- package/yida-skills/skills/yida-page-uiux/references/dashboard/chart-contracts.md +0 -17
- package/yida-skills/skills/yida-page-uiux/references/dashboard/component-contracts.md +0 -18
- package/yida-skills/skills/yida-page-uiux/references/dashboard/layout-patterns.md +0 -31
- package/yida-skills/skills/yida-page-uiux/references/dashboard/theme-recipes.md +0 -23
- package/yida-skills/skills/yida-page-uiux/references/detail/object-narrative.md +0 -18
- package/yida-skills/skills/yida-page-uiux/references/detail/section-patterns.md +0 -15
- package/yida-skills/skills/yida-page-uiux/references/detail/timeline-and-related.md +0 -17
- package/yida-skills/skills/yida-page-uiux/references/landing/assets-workflow.md +0 -25
- package/yida-skills/skills/yida-page-uiux/references/landing/industry-playbooks.md +0 -25
- package/yida-skills/skills/yida-page-uiux/references/landing/realistic-brand-homepage.md +0 -82
- package/yida-skills/skills/yida-page-uiux/references/landing/research-levels.md +0 -10
- package/yida-skills/skills/yida-page-uiux/references/landing/section-patterns.md +0 -16
- package/yida-skills/skills/yida-page-uiux/references/list/drawer-detail.md +0 -18
- package/yida-skills/skills/yida-page-uiux/references/list/empty-loading-error.md +0 -17
- package/yida-skills/skills/yida-page-uiux/references/list/filter-patterns.md +0 -15
- package/yida-skills/skills/yida-page-uiux/references/list/table-patterns.md +0 -13
- package/yida-skills/skills/yida-page-uiux/references/scenes/dashboard.md +0 -128
- package/yida-skills/skills/yida-page-uiux/references/scenes/detail.md +0 -79
- package/yida-skills/skills/yida-page-uiux/references/scenes/landing.md +0 -112
- package/yida-skills/skills/yida-page-uiux/references/scenes/list.md +0 -78
- package/yida-skills/skills/yida-page-uiux/references/scenes/screen.md +0 -36
- package/yida-skills/skills/yida-page-uiux/references/scenes/workbench.md +0 -77
- package/yida-skills/skills/yida-page-uiux/references/workbench/entry-patterns.md +0 -20
- package/yida-skills/skills/yida-page-uiux/references/workbench/portal-layouts.md +0 -19
- package/yida-skills/skills/yida-page-uiux/references/workbench/task-feed.md +0 -20
- package/yida-skills/skills/yida-page-uiux/workflow/output-decision-block.md +0 -111
- package/yida-skills/skills/yida-page-uiux/workflow/step-0-nav-shape.md +0 -43
- package/yida-skills/skills/yida-page-uiux/workflow/step-1-page-type.md +0 -42
- package/yida-skills/skills/yida-page-uiux/workflow/step-2-intent-decode.md +0 -25
- package/yida-skills/skills/yida-page-uiux/workflow/step-3-scene-routing.md +0 -49
- package/yida-skills/skills/yida-page-uiux/workflow/step-4-visual-decision.md +0 -56
- package/yida-skills/skills/yida-page-uiux/workflow/step-5-icon-and-assets.md +0 -36
- package/yida-skills/skills/yida-page-uiux/workflow/step-6-deai-selfcheck.md +0 -40
- package/yida-skills/skills/yida-theme/SKILL.md +0 -232
- package/yida-skills/skills/yida-theme/references/theme-token-presets.md +0 -135
- /package/yida-skills/skills/{yida-page-uiux → yida-design}/references/app/navigation-patterns.md +0 -0
- /package/yida-skills/skills/{yida-page-uiux → yida-design}/references/app/role-journey.md +0 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
OpenYida connects AI coding agents with Yida's low-code platform, so developers can create apps, forms, workflows, custom pages, reports, integrations, and deployment configuration from a normal chat-driven development workflow.
|
|
10
10
|
|
|
11
|
-
[Quick Start](#quick-start) · [Help Center](https://xmtrf1.aliwork.com/o/openyida/help) · [Capabilities](#capabilities) · [Full Capability List](./docs/capabilities.md) · [CLI Reference](#cli-reference) · [Examples](#examples) · [Contributing](./CONTRIBUTING.md) · [Changelog](./CHANGELOG.md)
|
|
11
|
+
[Quick Start](#quick-start) · [Help Center](https://xmtrf1.aliwork.com/o/openyida/help?lang=en) · [Capabilities](#capabilities) · [Full Capability List](./docs/capabilities.md) · [CLI Reference](#cli-reference) · [Examples](#examples) · [Contributing](./CONTRIBUTING.md) · [Changelog](./CHANGELOG.md)
|
|
12
12
|
|
|
13
13
|
[](https://www.npmjs.com/package/openyida)
|
|
14
14
|
[](https://www.npmjs.com/package/openyida)
|
|
@@ -16,7 +16,7 @@ OpenYida connects AI coding agents with Yida's low-code platform, so developers
|
|
|
16
16
|
[](./LICENSE)
|
|
17
17
|
[](https://nodejs.org)
|
|
18
18
|
|
|
19
|
-
**Help Center:** [
|
|
19
|
+
**Help Center:** [简体中文](https://xmtrf1.aliwork.com/o/openyida/help?lang=zh) · [繁體中文(中國台灣)](https://xmtrf1.aliwork.com/o/openyida/help?lang=zh-Hant) · [繁體中文(中國香港)](https://xmtrf1.aliwork.com/o/openyida/help?lang=zh-HK) · [English](https://xmtrf1.aliwork.com/o/openyida/help?lang=en) · [日本語](https://xmtrf1.aliwork.com/o/openyida/help?lang=ja) · [한국어](https://xmtrf1.aliwork.com/o/openyida/help?lang=ko) · [Tiếng Việt](https://xmtrf1.aliwork.com/o/openyida/help?lang=vi) · [ไทย](https://xmtrf1.aliwork.com/o/openyida/help?lang=th) · [Bahasa Indonesia](https://xmtrf1.aliwork.com/o/openyida/help?lang=id) · [Bahasa Melayu](https://xmtrf1.aliwork.com/o/openyida/help?lang=ms) · [Français](https://xmtrf1.aliwork.com/o/openyida/help?lang=fr) · [Português](https://xmtrf1.aliwork.com/o/openyida/help?lang=pt) · [Türkçe](https://xmtrf1.aliwork.com/o/openyida/help?lang=tr) · [Español](https://xmtrf1.aliwork.com/o/openyida/help?lang=es) · [Русский](https://xmtrf1.aliwork.com/o/openyida/help?lang=ru)
|
|
20
20
|
|
|
21
21
|
[English README](./README.md) · [简体中文 README](./README_zhCN.md)
|
|
22
22
|
|
|
@@ -155,7 +155,7 @@ openyida/
|
|
|
155
155
|
│ ├── core/ # Environment detection, i18n, diagnostics, data commands
|
|
156
156
|
│ ├── process/ # Process form creation, configuration, preview
|
|
157
157
|
│ ├── report/ # Yida report and chart generation
|
|
158
|
-
│ └── samples/ #
|
|
158
|
+
│ └── samples/ # Sample skeletons emitted by openyida sample
|
|
159
159
|
├── project/ # Default workspace template for generated Yida projects
|
|
160
160
|
├── yida-skills/ # Source skill docs and Yida API references
|
|
161
161
|
└── scripts/ # CI, packaging, and installation helpers
|
|
@@ -185,22 +185,14 @@ Form definitions support 19 business field types plus verified presentation/layo
|
|
|
185
185
|
|
|
186
186
|
```bash
|
|
187
187
|
openyida create-page APP_XXX "Dashboard" --mode dashboard
|
|
188
|
-
openyida
|
|
189
|
-
openyida
|
|
190
|
-
openyida generate-page data-screen --theme-profile yida-app-theme --output pages/src/data-screen.canvas.jsx --compile
|
|
191
|
-
openyida generate-page split-pane-detail --theme-profile yida-app-theme --output pages/src/split-pane-detail.canvas.jsx --compile
|
|
192
|
-
openyida generate-page portal-shell-home --theme-profile yida-app-theme --output pages/src/portal-shell-home.canvas.jsx --compile
|
|
193
|
-
openyida sample yida-canvas-custom-page dashboard-starter --output pages/src/dashboard-starter.canvas.jsx
|
|
194
|
-
openyida sample yida-canvas-custom-page native-components-smoke --output pages/src/native-components-smoke.canvas.jsx
|
|
195
|
-
openyida sample yida-canvas-custom-page portal-native-components --output pages/src/portal-native-components.canvas.jsx
|
|
196
|
-
openyida generate-page todo-mvc --output pages/src/todo-mvc.canvas.jsx --compile
|
|
188
|
+
openyida check-page pages/src/home.canvas.jsx --json
|
|
189
|
+
openyida compile pages/src/home.canvas.jsx
|
|
197
190
|
openyida publish pages/src/home.canvas.jsx APP_XXX FORM_XXX
|
|
198
191
|
```
|
|
199
192
|
|
|
200
|
-
|
|
201
|
-
Built-in templates currently include `official-homepage` for brand/law-firm/product official sites, `data-screen` for immersive monitoring screens, `dashboard-overview` for business dashboards, `workbench-home` for task/entry workbenches, `business-list` for list management pages, `detail-profile` for single-object detail pages, `split-pane-detail` for left-list/right-detail processing consoles, `portal-shell-home` for in-page portal shells, `native-components-smoke` for runtime probing existing Yida host components through `window.Deep` / `window.DeepYida`, `portal-native-components` for runtime-bridged portal, member, department, and upload components, `product-homepage` for legacy workbench-style pages, and `todo-mvc` for a full interaction smoke page covering events, custom state, list rendering, editing, filtering, and localStorage persistence.
|
|
193
|
+
Custom page source is authored directly from PRD and design guidance. Code Canvas is the default output (`.canvas.jsx`); use `.oyd.jsx` only when the page must use the 普通自定义页面 JSX/Jsx 组件链路.
|
|
202
194
|
|
|
203
|
-
For member, department, attachment, and image upload components, choose the page chain first. Code Canvas pages should
|
|
195
|
+
For member, department, attachment, and image upload components, choose the page chain first. Code Canvas pages should follow `yida-canvas-custom-page/references/native-components-bridge.md` for feature detection, fallback, and value normalization. 普通自定义页面 JSX/Jsx pages should use `.oyd.jsx`, read `yida-custom-page/references/component-jsx-guide.md`, and read `attachment-upload-guide.md` when upload fields are involved.
|
|
204
196
|
|
|
205
197
|
### Workflow, Data, and Permissions
|
|
206
198
|
|
|
@@ -377,6 +369,8 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
377
369
|
| `openyida corp-efficiency [overview\|details\|detail\|groups\|notify] [options] [--open\|--no-open]` | Query enterprise efficiency overview and detail reports |
|
|
378
370
|
| `openyida create-app "<name>"\|--name <name> [options] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a Yida app |
|
|
379
371
|
| `openyida update-app <appType> [--name "..."] [--layout slide\|ver] [--theme deepBlue]` | Update app info |
|
|
372
|
+
| `openyida app-online <appType> [--to-ding-app-center] [--show-app-center]` | Enable a Yida app |
|
|
373
|
+
| `openyida app-offline <appType> [--to-ding-app-center] [--show-app-center]` | Disable a Yida app |
|
|
380
374
|
| `openyida nav-group <list\|create\|rename\|delete\|move\|order\|auto-order\|hide\|show> <appType> ...` | Manage app sidebar navigation groups |
|
|
381
375
|
| `openyida app-permission <get\|set\|add\|remove\|search-user> ...` | Manage app primary, data, and developer admins |
|
|
382
376
|
| `openyida i18n <overview\|config\|languages\|list\|upsert\|delete\|translate\|translate-all\|upgrade> <appType> ...` | Manage app multilingual copy and language config |
|
|
@@ -401,13 +395,15 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
401
395
|
| `openyida get-schema <appType> <formUuid\|--all> [--summary-json\|--field-map-json]` | Get one form Schema or all form Schemas |
|
|
402
396
|
| `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
|
|
403
397
|
| `openyida create-page <appType> "<name>" [--mode dashboard] [--hide-nav] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom display page |
|
|
404
|
-
| `openyida generate-page <template>` | Generate page from curated template |
|
|
405
398
|
| `openyida build-page <sourceFile> [--output file\|--write]` | Build Yida-compatible page source |
|
|
406
399
|
| `openyida check-page <src> [--compat]` | Check custom page standards |
|
|
407
400
|
| `openyida compile <src>` | Compile custom page locally |
|
|
408
401
|
| `openyida publish <src> <appType> <formUuid> [--health-check] [--force] [--canvas] [--auto-nav-order] [--open\|--no-open]` | Compile and publish custom page |
|
|
409
402
|
| `openyida update-form-config <appType> ...` | Update form configuration |
|
|
410
403
|
| `openyida get-form-config <appType> <formUuid> [--json]` | Query form configuration |
|
|
404
|
+
| `openyida form-detail-style apply <appType> <formUuid> [--css file\|--preset clean-card] [--json]` | Manage form detail page style |
|
|
405
|
+
| `openyida form-detail-style remove <appType> <formUuid> [--json]` | Manage form detail page style |
|
|
406
|
+
| `openyida form-detail-style check <appType> <formUuid> [--json]` | Manage form detail page style |
|
|
411
407
|
|
|
412
408
|
### Data & Permissions
|
|
413
409
|
|
package/bin/yida.js
CHANGED
|
@@ -750,12 +750,6 @@ async function main() {
|
|
|
750
750
|
break;
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
-
case 'generate-page': {
|
|
754
|
-
const { run } = require('../lib/app/generate-page');
|
|
755
|
-
await run(args);
|
|
756
|
-
break;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
753
|
case 'build-page': {
|
|
760
754
|
const { run } = require('../lib/app/build-page');
|
|
761
755
|
await run(args);
|
|
@@ -832,6 +826,12 @@ async function main() {
|
|
|
832
826
|
break;
|
|
833
827
|
}
|
|
834
828
|
|
|
829
|
+
case 'form-detail-style': {
|
|
830
|
+
const { run: runFormDetailStyle } = require('../lib/app/form-detail-style');
|
|
831
|
+
await runFormDetailStyle(args);
|
|
832
|
+
break;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
835
|
case 'update-app': {
|
|
836
836
|
if (args.length < 2) {
|
|
837
837
|
throwCliUsage(t('cli.update_app_usage'), t('cli.update_app_example'));
|
|
@@ -841,6 +841,13 @@ async function main() {
|
|
|
841
841
|
break;
|
|
842
842
|
}
|
|
843
843
|
|
|
844
|
+
case 'app-online':
|
|
845
|
+
case 'app-offline': {
|
|
846
|
+
const { run: runAppLifecycle } = require('../lib/app/app-lifecycle');
|
|
847
|
+
await runAppLifecycle(command === 'app-online' ? 'online' : 'offline', args);
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
|
|
844
851
|
case 'nav-group':
|
|
845
852
|
case 'group': {
|
|
846
853
|
const { run: runNavGroup } = require('../lib/app/nav-group');
|
package/docs/capabilities.md
CHANGED
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
|---|---|
|
|
63
63
|
| 创建自定义页面 | `openyida create-page <appType> "<页面名称>"` |
|
|
64
64
|
| 创建看板页 | `openyida create-page <appType> "<页面名称>" --mode dashboard` |
|
|
65
|
-
| 从模板生成页面源码 | `openyida generate-page <template>` |
|
|
66
65
|
| 构建宜搭兼容页面源码 | `openyida build-page <sourceFile> [--output file\|--write]` |
|
|
67
66
|
| 检查普通自定义页面 JSX 规范 | `openyida check-page <src> [--compat]` |
|
|
68
67
|
| 本地编译普通自定义页面 JSX | `openyida compile <src>` |
|
|
@@ -73,8 +72,8 @@
|
|
|
73
72
|
| 更新页面/表单配置 | `openyida update-form-config <appType> ...` |
|
|
74
73
|
| 查询页面/表单配置 | `openyida get-form-config <appType> <formUuid> [--json]` |
|
|
75
74
|
| 开发高级自定义页面、看板、图表或幻灯片 | 默认优先使用 Code Canvas 链路;明确要求普通自定义页面 JSX/Jsx,或强依赖普通自定义页实例桥时使用 `.oyd.jsx` + `check-page` / `compile` / `publish` |
|
|
76
|
-
| Code Canvas 页面使用成员/部门/上传等宜搭运行态组件 | `
|
|
77
|
-
| Code Canvas 门户 +
|
|
75
|
+
| Code Canvas 页面使用成员/部门/上传等宜搭运行态组件 | 使用 `yida-canvas-custom-page`,参考 `yida-canvas-custom-page/references/native-components-bridge.md` 做运行态组件探测、fallback 和值归一化 |
|
|
76
|
+
| Code Canvas 门户 + 成员/部门/上传组件 | 使用 `yida-canvas-custom-page`,按业务页面结构接入运行态组件桥 |
|
|
78
77
|
| 普通自定义页面 JSX/Jsx 使用成员/部门组件 | 使用 `.oyd.jsx`,参考 `yida-custom-page/references/component-jsx-guide.md` |
|
|
79
78
|
| 普通自定义页面 JSX/Jsx 使用附件/图片上传 | 使用 `.oyd.jsx`,参考 `yida-custom-page/references/attachment-upload-guide.md` |
|
|
80
79
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* app-lifecycle.js - 启用或停用宜搭应用
|
|
3
|
+
*
|
|
4
|
+
* 用法:
|
|
5
|
+
* openyida app-online <appType> [--to-ding-app-center] [--show-app-center]
|
|
6
|
+
* openyida app-offline <appType> [--to-ding-app-center] [--show-app-center]
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
const querystring = require('querystring');
|
|
12
|
+
const { httpPost, requestWithAutoLogin } = require('../core/utils');
|
|
13
|
+
const { createAuthRef } = require('../core/yida-client');
|
|
14
|
+
const { t } = require('../core/i18n');
|
|
15
|
+
const { throwCommandError, throwUsage } = require('../core/command-errors');
|
|
16
|
+
|
|
17
|
+
const ACTIONS = Object.freeze({
|
|
18
|
+
online: Object.freeze({ endpoint: 'onlineApp', api: 'App.goOnline' }),
|
|
19
|
+
offline: Object.freeze({ endpoint: 'offlineApp', api: 'App.goOffline' }),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
function parseArgs(args = []) {
|
|
23
|
+
const params = {
|
|
24
|
+
appType: null,
|
|
25
|
+
toDingAppCenter: false,
|
|
26
|
+
showAppCenter: false,
|
|
27
|
+
help: false,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
for (const arg of args) {
|
|
31
|
+
if (arg === '--help' || arg === '-h') {
|
|
32
|
+
params.help = true;
|
|
33
|
+
} else if (arg === '--to-ding-app-center') {
|
|
34
|
+
params.toDingAppCenter = true;
|
|
35
|
+
} else if (arg === '--show-app-center') {
|
|
36
|
+
params.showAppCenter = true;
|
|
37
|
+
} else if (!arg.startsWith('-') && !params.appType) {
|
|
38
|
+
params.appType = arg;
|
|
39
|
+
} else {
|
|
40
|
+
throwUsage(t('app_lifecycle.invalid_argument', arg));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return params;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function buildRequestPath(action, appType, stamp = Date.now()) {
|
|
48
|
+
const config = ACTIONS[action];
|
|
49
|
+
if (!config) {
|
|
50
|
+
throw new Error(t('app_lifecycle.invalid_action', action));
|
|
51
|
+
}
|
|
52
|
+
return `/dingtalk/web/${encodeURIComponent(appType)}/query/app/${config.endpoint}.json` +
|
|
53
|
+
`?_api=${encodeURIComponent(config.api)}&_mock=false&_stamp=${stamp}`;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function buildPostData(params, authRef) {
|
|
57
|
+
return querystring.stringify({
|
|
58
|
+
_csrf_token: authRef.csrfToken || '',
|
|
59
|
+
_locale_time_zone_offset: '28800000',
|
|
60
|
+
isToDingAppCenter: params.toDingAppCenter ? 'y' : 'n',
|
|
61
|
+
showAppCenter: params.showAppCenter ? 'y' : 'n',
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async function changeAppLifecycle(action, params, authRef = createAuthRef()) {
|
|
66
|
+
const response = await requestWithAutoLogin((auth) => httpPost(
|
|
67
|
+
auth.baseUrl,
|
|
68
|
+
buildRequestPath(action, params.appType),
|
|
69
|
+
buildPostData(params, auth),
|
|
70
|
+
auth.cookies
|
|
71
|
+
), authRef);
|
|
72
|
+
|
|
73
|
+
if (!response || response.success !== true || response.content !== true) {
|
|
74
|
+
const errorMsg = response && (response.errorMsg || response.message || response.errorCode);
|
|
75
|
+
throwCommandError(errorMsg || t('app_lifecycle.request_failed'), {
|
|
76
|
+
code: action === 'online' ? 'APP_ONLINE_FAILED' : 'APP_OFFLINE_FAILED',
|
|
77
|
+
details: { action, appType: params.appType },
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
success: true,
|
|
83
|
+
action,
|
|
84
|
+
appType: params.appType,
|
|
85
|
+
isToDingAppCenter: params.toDingAppCenter,
|
|
86
|
+
showAppCenter: params.showAppCenter,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function printUsage(action) {
|
|
91
|
+
const { usage } = require('../core/chalk');
|
|
92
|
+
usage(t(`app_lifecycle.${action}_usage`), t(`app_lifecycle.${action}_example`));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function run(action, args = []) {
|
|
96
|
+
if (!ACTIONS[action]) {
|
|
97
|
+
throwCommandError(t('app_lifecycle.invalid_action', action), {
|
|
98
|
+
code: 'APP_LIFECYCLE_INVALID_ACTION',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const params = parseArgs(args);
|
|
103
|
+
if (params.help) {
|
|
104
|
+
printUsage(action);
|
|
105
|
+
return { success: true, help: true };
|
|
106
|
+
}
|
|
107
|
+
if (!params.appType) {
|
|
108
|
+
printUsage(action);
|
|
109
|
+
throwUsage(t('app_lifecycle.missing_app_type'), t(`app_lifecycle.${action}_usage`), {
|
|
110
|
+
code: 'APP_LIFECYCLE_USAGE',
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const output = await changeAppLifecycle(action, params);
|
|
115
|
+
const { result } = require('../core/chalk');
|
|
116
|
+
result(true, t(`app_lifecycle.${action}_success`), [['appType', params.appType]]);
|
|
117
|
+
console.log(JSON.stringify(output));
|
|
118
|
+
return output;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
module.exports = {
|
|
122
|
+
ACTIONS,
|
|
123
|
+
buildPostData,
|
|
124
|
+
buildRequestPath,
|
|
125
|
+
changeAppLifecycle,
|
|
126
|
+
parseArgs,
|
|
127
|
+
run,
|
|
128
|
+
};
|
|
@@ -34,6 +34,22 @@ const {
|
|
|
34
34
|
assertNoEmojiInText,
|
|
35
35
|
} = require('../core/no-emoji-guard');
|
|
36
36
|
const { CliError, isCliError } = require('../core/cli-error');
|
|
37
|
+
const {
|
|
38
|
+
findBareCjkJsxTextIdentifiers,
|
|
39
|
+
formatBareCjkJsxTextMessage,
|
|
40
|
+
} = require('./jsx-text-guard');
|
|
41
|
+
const {
|
|
42
|
+
findDirectFormOpenIssues,
|
|
43
|
+
formatDirectFormOpenMessage,
|
|
44
|
+
} = require('./form-open-guard');
|
|
45
|
+
const {
|
|
46
|
+
findFormDetailLinkIssues,
|
|
47
|
+
formatFormDetailLinkMessage,
|
|
48
|
+
} = require('./form-detail-link-guard');
|
|
49
|
+
const {
|
|
50
|
+
findPageRichnessIssues,
|
|
51
|
+
formatPageRichnessMessage,
|
|
52
|
+
} = require('./page-richness-guard');
|
|
37
53
|
|
|
38
54
|
/**
|
|
39
55
|
* 依赖 → window 别名白名单,用于把 import 改写到运行时全局对象。
|
|
@@ -58,6 +74,68 @@ const MODULE_ALIAS_MAP = {
|
|
|
58
74
|
'framer-motion': 'FramerMotion',
|
|
59
75
|
};
|
|
60
76
|
|
|
77
|
+
const MANUAL_DEPENDENCY_GLOBALS = Object.freeze({
|
|
78
|
+
React: 'react',
|
|
79
|
+
antd: 'antd',
|
|
80
|
+
icons: '@ant-design/icons',
|
|
81
|
+
ahooks: 'ahooks',
|
|
82
|
+
d3: 'd3',
|
|
83
|
+
dayjs: 'dayjs',
|
|
84
|
+
Recharts: 'recharts',
|
|
85
|
+
Radix: '@radix-ui/themes',
|
|
86
|
+
DynamicIcon: 'lucide-react',
|
|
87
|
+
LucideReact: 'lucide-react',
|
|
88
|
+
FramerMotion: 'framer-motion',
|
|
89
|
+
YidaMarkdown: 'yida-plugin-markdown',
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const BARE_DEPENDENCY_GLOBALS = Object.freeze({
|
|
93
|
+
antd: {
|
|
94
|
+
packageName: 'antd',
|
|
95
|
+
importExample: "import { Button, Drawer, ConfigProvider } from 'antd';",
|
|
96
|
+
},
|
|
97
|
+
icons: {
|
|
98
|
+
packageName: '@ant-design/icons',
|
|
99
|
+
importExample: "import { SearchOutlined, PlusOutlined } from '@ant-design/icons';",
|
|
100
|
+
},
|
|
101
|
+
lucideReact: {
|
|
102
|
+
packageName: 'lucide-react',
|
|
103
|
+
importExample: "import { Search, Plus, RefreshCw } from 'lucide-react';",
|
|
104
|
+
},
|
|
105
|
+
LucideReact: {
|
|
106
|
+
packageName: 'lucide-react',
|
|
107
|
+
importExample: "import { Search, Plus, RefreshCw } from 'lucide-react';",
|
|
108
|
+
},
|
|
109
|
+
DynamicIcon: {
|
|
110
|
+
packageName: 'lucide-react',
|
|
111
|
+
importExample: "import { DynamicIcon, Search } from 'lucide-react';",
|
|
112
|
+
},
|
|
113
|
+
ahooks: {
|
|
114
|
+
packageName: 'ahooks',
|
|
115
|
+
importExample: "import { useMemoizedFn } from 'ahooks';",
|
|
116
|
+
},
|
|
117
|
+
dayjs: {
|
|
118
|
+
packageName: 'dayjs',
|
|
119
|
+
importExample: "import dayjs from 'dayjs';",
|
|
120
|
+
},
|
|
121
|
+
Recharts: {
|
|
122
|
+
packageName: 'recharts',
|
|
123
|
+
importExample: "import { LineChart, Line } from 'recharts';",
|
|
124
|
+
},
|
|
125
|
+
FramerMotion: {
|
|
126
|
+
packageName: 'framer-motion',
|
|
127
|
+
importExample: "import { motion } from 'framer-motion';",
|
|
128
|
+
},
|
|
129
|
+
Radix: {
|
|
130
|
+
packageName: '@radix-ui/themes',
|
|
131
|
+
importExample: "import { Button } from '@radix-ui/themes';",
|
|
132
|
+
},
|
|
133
|
+
YidaMarkdown: {
|
|
134
|
+
packageName: 'yida-plugin-markdown',
|
|
135
|
+
importExample: "import Markdown from 'yida-plugin-markdown';",
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
61
139
|
const LUCIDE_REACT_PACKAGE = 'lucide-react';
|
|
62
140
|
const LUCIDE_DYNAMIC_ICON_ALIAS = 'DynamicIcon';
|
|
63
141
|
const LUCIDE_MODULE_ALIAS = 'LucideReact';
|
|
@@ -91,6 +169,108 @@ function stripJsComments(code) {
|
|
|
91
169
|
.replace(/(^|[^:])\/\/.*$/gm, '$1');
|
|
92
170
|
}
|
|
93
171
|
|
|
172
|
+
function assertNoManualDependencyGlobals(source, options = {}) {
|
|
173
|
+
const stripped = stripJsComments(source);
|
|
174
|
+
const globals = Object.keys(MANUAL_DEPENDENCY_GLOBALS);
|
|
175
|
+
const pattern = new RegExp(`\\bwindow\\.(${globals.join('|')})\\b`);
|
|
176
|
+
const match = pattern.exec(stripped);
|
|
177
|
+
if (!match) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const globalName = match[1];
|
|
181
|
+
const pkg = MANUAL_DEPENDENCY_GLOBALS[globalName];
|
|
182
|
+
throw new CliError(
|
|
183
|
+
`Code Canvas 源码不能直接读取 window.${globalName}。请使用标准 import 从 "${pkg}" 引入,`
|
|
184
|
+
+ '让编译器把依赖写入 importedModules;否则运行时不会加载该资源,页面会出现 window 依赖 undefined。',
|
|
185
|
+
{
|
|
186
|
+
code: 'OPENYIDA_CANVAS_MANUAL_DEPENDENCY_GLOBAL',
|
|
187
|
+
details: {
|
|
188
|
+
stage: 'canvas_compile',
|
|
189
|
+
sourcePath: options.sourcePath,
|
|
190
|
+
globalName,
|
|
191
|
+
packageName: pkg,
|
|
192
|
+
},
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function findBareDependencyGlobalIssues(source) {
|
|
198
|
+
const issues = [];
|
|
199
|
+
const names = new Set(Object.keys(BARE_DEPENDENCY_GLOBALS));
|
|
200
|
+
|
|
201
|
+
const guardPlugin = ({ types: t }) => ({
|
|
202
|
+
name: 'yida-bare-dependency-global-guard',
|
|
203
|
+
visitor: {
|
|
204
|
+
ReferencedIdentifier(path) {
|
|
205
|
+
const name = path.node.name;
|
|
206
|
+
if (!names.has(name)) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (path.scope.hasBinding(name)) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (
|
|
213
|
+
path.parentPath &&
|
|
214
|
+
path.parentPath.isMemberExpression() &&
|
|
215
|
+
path.parent.object === path.node &&
|
|
216
|
+
t.isIdentifier(path.parent.property, { name: 'then' })
|
|
217
|
+
) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
const config = BARE_DEPENDENCY_GLOBALS[name];
|
|
221
|
+
issues.push({
|
|
222
|
+
name,
|
|
223
|
+
packageName: config.packageName,
|
|
224
|
+
importExample: config.importExample,
|
|
225
|
+
line: path.node.loc && path.node.loc.start ? path.node.loc.start.line : 0,
|
|
226
|
+
column: path.node.loc && path.node.loc.start ? path.node.loc.start.column : 0,
|
|
227
|
+
});
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
Babel.transform(source, {
|
|
233
|
+
filename: 'canvas.tsx',
|
|
234
|
+
presets: [
|
|
235
|
+
['typescript', { allExtensions: true, isTSX: true, allowDeclareFields: true }],
|
|
236
|
+
['react', { runtime: 'classic' }],
|
|
237
|
+
],
|
|
238
|
+
plugins: [guardPlugin],
|
|
239
|
+
sourceType: 'module',
|
|
240
|
+
compact: false,
|
|
241
|
+
babelrc: false,
|
|
242
|
+
configFile: false,
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
return issues;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function formatBareDependencyGlobalMessage(issue) {
|
|
249
|
+
return `Code Canvas 源码不能直接使用未声明的依赖全局变量 ${issue.name}。`
|
|
250
|
+
+ `请改用标准 import 从 "${issue.packageName}" 引入,例如:${issue.importExample} `
|
|
251
|
+
+ '编译器会自动写入 importedModules 并映射到正确运行时资源;否则线上会出现 '
|
|
252
|
+
+ `${issue.name} is not defined。`;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function assertNoBareDependencyGlobals(source, options = {}) {
|
|
256
|
+
const issues = findBareDependencyGlobalIssues(source);
|
|
257
|
+
if (issues.length === 0) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
const firstIssue = issues[0];
|
|
261
|
+
throw new CliError(formatBareDependencyGlobalMessage(firstIssue), {
|
|
262
|
+
code: 'OPENYIDA_CANVAS_BARE_DEPENDENCY_GLOBAL',
|
|
263
|
+
details: {
|
|
264
|
+
stage: 'canvas_compile',
|
|
265
|
+
sourcePath: options.sourcePath || '',
|
|
266
|
+
line: firstIssue.line,
|
|
267
|
+
column: firstIssue.column,
|
|
268
|
+
globalName: firstIssue.name,
|
|
269
|
+
packageName: firstIssue.packageName,
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
94
274
|
/**
|
|
95
275
|
* 从源码里正则抽取裸包名(过滤相对/绝对路径),去重排序。
|
|
96
276
|
* 对齐画布运行时的依赖抽取行为。
|
|
@@ -402,6 +582,62 @@ function compileCanvasLocal(source, options = {}) {
|
|
|
402
582
|
artifact: options.sourcePath || 'Code Canvas source',
|
|
403
583
|
code: 'OPENYIDA_CANVAS_SOURCE_EMOJI_FORBIDDEN',
|
|
404
584
|
});
|
|
585
|
+
const jsxTextIssues = findBareCjkJsxTextIdentifiers(source);
|
|
586
|
+
if (jsxTextIssues.length > 0) {
|
|
587
|
+
const firstIssue = jsxTextIssues[0];
|
|
588
|
+
throw new CliError(formatBareCjkJsxTextMessage(firstIssue.name), {
|
|
589
|
+
code: 'OPENYIDA_CANVAS_JSX_TEXT_IDENTIFIER',
|
|
590
|
+
details: {
|
|
591
|
+
stage: 'canvas_compile',
|
|
592
|
+
sourcePath: options.sourcePath || '',
|
|
593
|
+
line: firstIssue.line,
|
|
594
|
+
identifier: firstIssue.name,
|
|
595
|
+
},
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
const directFormOpenIssues = findDirectFormOpenIssues(source);
|
|
599
|
+
if (directFormOpenIssues.length > 0) {
|
|
600
|
+
const firstIssue = directFormOpenIssues[0];
|
|
601
|
+
throw new CliError(formatDirectFormOpenMessage(), {
|
|
602
|
+
code: 'OPENYIDA_CANVAS_FORM_OPEN_CONTAINER_REQUIRED',
|
|
603
|
+
details: {
|
|
604
|
+
stage: 'canvas_compile',
|
|
605
|
+
sourcePath: options.sourcePath || '',
|
|
606
|
+
line: firstIssue.line,
|
|
607
|
+
callee: firstIssue.callee,
|
|
608
|
+
},
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
const formDetailLinkIssues = findFormDetailLinkIssues(source);
|
|
612
|
+
if (formDetailLinkIssues.length > 0) {
|
|
613
|
+
const firstIssue = formDetailLinkIssues[0];
|
|
614
|
+
throw new CliError(formatFormDetailLinkMessage(firstIssue), {
|
|
615
|
+
code: 'OPENYIDA_CANVAS_FORM_DETAIL_LINK_INVALID',
|
|
616
|
+
details: {
|
|
617
|
+
stage: 'canvas_compile',
|
|
618
|
+
sourcePath: options.sourcePath || '',
|
|
619
|
+
line: firstIssue.line,
|
|
620
|
+
issueType: firstIssue.type,
|
|
621
|
+
},
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
const richnessIssues = findPageRichnessIssues(source);
|
|
625
|
+
if (richnessIssues.length > 0) {
|
|
626
|
+
const firstIssue = richnessIssues[0];
|
|
627
|
+
throw new CliError(formatPageRichnessMessage(firstIssue), {
|
|
628
|
+
code: 'OPENYIDA_CANVAS_CONTENT_BLOCKS_TOO_FEW',
|
|
629
|
+
details: {
|
|
630
|
+
stage: 'canvas_compile',
|
|
631
|
+
sourcePath: options.sourcePath || '',
|
|
632
|
+
line: firstIssue.line,
|
|
633
|
+
scene: firstIssue.scene,
|
|
634
|
+
count: firstIssue.count,
|
|
635
|
+
min: firstIssue.min,
|
|
636
|
+
},
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
assertNoBareDependencyGlobals(source, options);
|
|
640
|
+
assertNoManualDependencyGlobals(source, options);
|
|
405
641
|
|
|
406
642
|
const importedModules = extractImportedModules(source);
|
|
407
643
|
|
|
@@ -517,5 +753,6 @@ module.exports = {
|
|
|
517
753
|
resolveWindowAlias,
|
|
518
754
|
shouldAllowUnsupportedBareImports,
|
|
519
755
|
assertCanvasRuntimeParseable,
|
|
756
|
+
findBareDependencyGlobalIssues,
|
|
520
757
|
MODULE_ALIAS_MAP,
|
|
521
758
|
};
|