openxiangda 1.0.0

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 (121) hide show
  1. package/README.md +58 -0
  2. package/bin/openxiangda.js +11 -0
  3. package/lib/cli.js +2423 -0
  4. package/lib/config.js +121 -0
  5. package/lib/http.js +47 -0
  6. package/lib/skills.js +371 -0
  7. package/lib/utils.js +87 -0
  8. package/lib/workspace-init.js +139 -0
  9. package/openxiangda-skills/SKILL.md +128 -0
  10. package/openxiangda-skills/references/architecture-patterns.md +242 -0
  11. package/openxiangda-skills/references/automation-v3.md +129 -0
  12. package/openxiangda-skills/references/component-guide.md +198 -0
  13. package/openxiangda-skills/references/forms/component-registry.md +53 -0
  14. package/openxiangda-skills/references/forms/form-schema.md +109 -0
  15. package/openxiangda-skills/references/forms/layout-and-rules.md +24 -0
  16. package/openxiangda-skills/references/openxiangda-api.md +466 -0
  17. package/openxiangda-skills/references/pages/page-sdk.md +13 -0
  18. package/openxiangda-skills/references/pages/publish-flow.md +36 -0
  19. package/openxiangda-skills/references/pages/workspace-structure.md +38 -0
  20. package/openxiangda-skills/references/permissions-settings.md +147 -0
  21. package/openxiangda-skills/references/platform-data-model.md +305 -0
  22. package/openxiangda-skills/references/style-system.md +492 -0
  23. package/openxiangda-skills/references/troubleshooting.md +246 -0
  24. package/openxiangda-skills/references/workflow-v3.md +105 -0
  25. package/openxiangda-skills/references/workspace-state.md +45 -0
  26. package/openxiangda-skills/skills/openxiangda-app/SKILL.md +64 -0
  27. package/openxiangda-skills/skills/openxiangda-core/SKILL.md +143 -0
  28. package/openxiangda-skills/skills/openxiangda-form/SKILL.md +76 -0
  29. package/openxiangda-skills/skills/openxiangda-inspect/SKILL.md +40 -0
  30. package/openxiangda-skills/skills/openxiangda-page/SKILL.md +62 -0
  31. package/openxiangda-skills/skills/openxiangda-permission-settings/SKILL.md +95 -0
  32. package/openxiangda-skills/skills/openxiangda-workflow-automation/SKILL.md +97 -0
  33. package/package.json +126 -0
  34. package/packages/sdk/bin/lowcode-workspace.mjs +4 -0
  35. package/packages/sdk/dist/build/index.cjs +33 -0
  36. package/packages/sdk/dist/build/index.cjs.map +1 -0
  37. package/packages/sdk/dist/build/index.d.mts +40 -0
  38. package/packages/sdk/dist/build/index.d.ts +40 -0
  39. package/packages/sdk/dist/build/index.mjs +8 -0
  40. package/packages/sdk/dist/build/index.mjs.map +1 -0
  41. package/packages/sdk/dist/components/index.cjs +18700 -0
  42. package/packages/sdk/dist/components/index.cjs.map +1 -0
  43. package/packages/sdk/dist/components/index.d.mts +2094 -0
  44. package/packages/sdk/dist/components/index.d.ts +2094 -0
  45. package/packages/sdk/dist/components/index.mjs +18649 -0
  46. package/packages/sdk/dist/components/index.mjs.map +1 -0
  47. package/packages/sdk/dist/runtime/index.cjs +1469 -0
  48. package/packages/sdk/dist/runtime/index.cjs.map +1 -0
  49. package/packages/sdk/dist/runtime/index.d.mts +831 -0
  50. package/packages/sdk/dist/runtime/index.d.ts +831 -0
  51. package/packages/sdk/dist/runtime/index.mjs +1420 -0
  52. package/packages/sdk/dist/runtime/index.mjs.map +1 -0
  53. package/packages/sdk/dist/styles/antd-theme.cjs +60 -0
  54. package/packages/sdk/dist/styles/antd-theme.cjs.map +1 -0
  55. package/packages/sdk/dist/styles/antd-theme.d.mts +5 -0
  56. package/packages/sdk/dist/styles/antd-theme.d.ts +5 -0
  57. package/packages/sdk/dist/styles/antd-theme.mjs +35 -0
  58. package/packages/sdk/dist/styles/antd-theme.mjs.map +1 -0
  59. package/packages/sdk/dist/styles/tailwind-preset.cjs +2641 -0
  60. package/packages/sdk/dist/styles/tailwind-preset.cjs.map +1 -0
  61. package/packages/sdk/dist/styles/tailwind-preset.d.mts +75 -0
  62. package/packages/sdk/dist/styles/tailwind-preset.d.ts +75 -0
  63. package/packages/sdk/dist/styles/tailwind-preset.mjs +2618 -0
  64. package/packages/sdk/dist/styles/tailwind-preset.mjs.map +1 -0
  65. package/packages/sdk/dist/styles/tokens.css +73 -0
  66. package/packages/sdk/src/build-source/README.md +9 -0
  67. package/packages/sdk/src/build-source/bin/lowcode-workspace.mjs +7 -0
  68. package/packages/sdk/src/build-source/package.json +34 -0
  69. package/packages/sdk/src/build-source/scripts/build-forms.mjs +824 -0
  70. package/packages/sdk/src/build-source/scripts/build-forms.runtime-entry.test.ts +18 -0
  71. package/packages/sdk/src/build-source/scripts/build-pages.mjs +793 -0
  72. package/packages/sdk/src/build-source/scripts/build-workspace.mjs +64 -0
  73. package/packages/sdk/src/build-source/scripts/publish-all.mjs +127 -0
  74. package/packages/sdk/src/build-source/scripts/publish-oss.mjs +149 -0
  75. package/packages/sdk/src/build-source/scripts/register-bundle.mjs +1 -0
  76. package/packages/sdk/src/build-source/scripts/register.mjs +329 -0
  77. package/packages/sdk/src/build-source/scripts/sync-schema.mjs +301 -0
  78. package/packages/sdk/src/build-source/scripts/utils/form-api.mjs +639 -0
  79. package/packages/sdk/src/build-source/scripts/utils/form-api.test.ts +244 -0
  80. package/packages/sdk/src/build-source/scripts/utils/form-runtime-assets.mjs +57 -0
  81. package/packages/sdk/src/build-source/scripts/utils/form-runtime-assets.test.ts +135 -0
  82. package/packages/sdk/src/build-source/scripts/utils/incremental.mjs +210 -0
  83. package/packages/sdk/src/build-source/scripts/utils/load-config.mjs +257 -0
  84. package/packages/sdk/src/build-source/scripts/utils/load-config.test.ts +44 -0
  85. package/packages/sdk/src/build-source/scripts/utils/mime-types.mjs +70 -0
  86. package/packages/sdk/src/build-source/scripts/utils/namespace-css.mjs +61 -0
  87. package/packages/sdk/src/build-source/scripts/utils/oss-client.mjs +128 -0
  88. package/packages/sdk/src/build-source/scripts/utils/pages.mjs +80 -0
  89. package/packages/sdk/src/build-source/scripts/utils/progress.mjs +57 -0
  90. package/packages/sdk/src/build-source/scripts/utils/register-payload.mjs +89 -0
  91. package/packages/sdk/src/build-source/scripts/utils/register-payload.test.ts +76 -0
  92. package/packages/sdk/src/build-source/scripts/utils/runtime-css-check.mjs +44 -0
  93. package/packages/sdk/src/build-source/scripts/utils/runtime-css-check.test.ts +54 -0
  94. package/packages/sdk/src/build-source/scripts/utils/schema-transform.mjs +130 -0
  95. package/packages/sdk/src/build-source/scripts/utils/schema-transform.test.ts +141 -0
  96. package/packages/sdk/src/build-source/scripts/utils/tailwind-config.mjs +227 -0
  97. package/packages/sdk/src/build-source/scripts/utils/tailwind-config.test.ts +187 -0
  98. package/packages/sdk/src/build-source/src/cli.mjs +679 -0
  99. package/templates/sy-lowcode-app-workspace/app-workspace.config.ts +34 -0
  100. package/templates/sy-lowcode-app-workspace/examples/forms/customer/page.tsx +1 -0
  101. package/templates/sy-lowcode-app-workspace/examples/forms/customer/schema.ts +35 -0
  102. package/templates/sy-lowcode-app-workspace/index.html +12 -0
  103. package/templates/sy-lowcode-app-workspace/package.json +49 -0
  104. package/templates/sy-lowcode-app-workspace/postcss.config.cjs +6 -0
  105. package/templates/sy-lowcode-app-workspace/scripts/build-js-code.mjs +100 -0
  106. package/templates/sy-lowcode-app-workspace/src/dev/App.tsx +26 -0
  107. package/templates/sy-lowcode-app-workspace/src/forms/.gitkeep +1 -0
  108. package/templates/sy-lowcode-app-workspace/src/forms/README.md +48 -0
  109. package/templates/sy-lowcode-app-workspace/src/index.css +28 -0
  110. package/templates/sy-lowcode-app-workspace/src/js-code-nodes/.gitkeep +1 -0
  111. package/templates/sy-lowcode-app-workspace/src/js-code-nodes/types.d.ts +3 -0
  112. package/templates/sy-lowcode-app-workspace/src/main.tsx +36 -0
  113. package/templates/sy-lowcode-app-workspace/src/pages/.gitkeep +1 -0
  114. package/templates/sy-lowcode-app-workspace/src/shared/form-schema.ts +128 -0
  115. package/templates/sy-lowcode-app-workspace/src/types/app-workspace.types.ts +31 -0
  116. package/templates/sy-lowcode-app-workspace/tailwind.config.cjs +30 -0
  117. package/templates/sy-lowcode-app-workspace/tsconfig.app.json +24 -0
  118. package/templates/sy-lowcode-app-workspace/tsconfig.js-code-nodes.json +15 -0
  119. package/templates/sy-lowcode-app-workspace/tsconfig.json +7 -0
  120. package/templates/sy-lowcode-app-workspace/tsconfig.node.json +10 -0
  121. package/templates/sy-lowcode-app-workspace/vite.config.ts +32 -0
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: openxiangda-inspect
3
+ description: Read-only OpenXiangda diagnosis for app snapshots, forms, workflows, automations, and permissions using the logged-in profile token.
4
+ ---
5
+
6
+ # OpenXiangda Inspect
7
+
8
+ Use this skill when the user asks to diagnose, compare, verify, or inspect an OpenXiangda app or resource. This skill is read-only.
9
+
10
+ ## Commands
11
+
12
+ Inspect the bound app:
13
+
14
+ ```bash
15
+ openxiangda inspect app --profile dev --json
16
+ ```
17
+
18
+ Inspect a specific resource:
19
+
20
+ ```bash
21
+ openxiangda inspect form customer --profile dev --json
22
+ openxiangda inspect workflow customer_approval --profile dev --json
23
+ openxiangda inspect automation notify_on_submit --profile dev --json
24
+ openxiangda inspect permissions customer --profile dev --json
25
+ ```
26
+
27
+ Use logical local codes first. If a code is missing from `.openxiangda/state.json`, pass the live ID explicitly for the current profile only.
28
+
29
+ ## Rules
30
+
31
+ - Do not write, publish, or mutate resources from this skill.
32
+ - Use `app snapshot` or `inspect app` before modifying an existing app.
33
+ - Never use IDs copied from another profile as evidence. Check `openxiangda env --profile <name>` first.
34
+ - For remediation, switch to the relevant app/form/page/workflow/permission skill after inspection.
35
+
36
+ ## References
37
+
38
+ - `../../references/platform-data-model.md` — how each field type is persisted on the platform (JSONB, `{label, value}` for option fields, attachment shape, etc.). Consult this when a snapshot value looks unexpected so you can tell broken data from normal storage format.
39
+ - `../../references/troubleshooting.md` — catalog of known failure modes (missing styles, `options` runtime errors, mismatched option labels, etc.). Cross-check inspection findings against this list before reporting an issue or proposing a fix.
40
+
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: openxiangda-page
3
+ description: Build and publish OpenXiangda code pages in sy-lowcode-app-workspace using React, Ant Design, openxiangda/runtime, profile-isolated page IDs, and token-based openxiangda page commands.
4
+ ---
5
+
6
+ # OpenXiangda Page
7
+
8
+ Use this when the user asks to create, update, inspect, or publish a custom code page. Normal form pages and workflow form pages also live in `sy-lowcode-app-workspace`, but under `src/forms/`; this skill covers `src/pages/`.
9
+
10
+ ## CLI Flow
11
+
12
+ ```bash
13
+ openxiangda env --profile <name>
14
+ openxiangda page list --profile <name>
15
+ cd /path/to/sy-lowcode-app-workspace
16
+ openxiangda workspace publish --profile <name>
17
+ ```
18
+
19
+ If the workspace does not exist yet, initialize it first:
20
+
21
+ ```bash
22
+ openxiangda workspace init ./my-app-workspace --profile <name> --app-type APP_XXX
23
+ cd ./my-app-workspace
24
+ pnpm install
25
+ ```
26
+
27
+ Direct publish is only for already built assets or targeted repair:
28
+
29
+ ```bash
30
+ openxiangda page publish dashboard \
31
+ --entry-url https://cdn.example.com/dashboard/index.js \
32
+ --css-urls https://cdn.example.com/dashboard/style.css \
33
+ --version 1.0.0 \
34
+ --build-id 20260521120000 \
35
+ --profile <name>
36
+ ```
37
+
38
+ ## Development Rules
39
+
40
+ Read these references only when editing page code:
41
+
42
+ - `../../references/pages/workspace-structure.md`
43
+ - `../../references/pages/page-sdk.md`
44
+ - `../../references/pages/publish-flow.md`
45
+ - `../../references/style-system.md` — three-layer style architecture, CSS namespace, and the no-hardcoded-color rule. Read before writing any page CSS or Tailwind class.
46
+ - `../../references/architecture-patterns.md` — CRUD data flow, `DataManagementList` pattern, and recommended `src/pages/<pageCode>/` layout. Read before scaffolding a new page or list view.
47
+ - `../../references/component-guide.md` — when to pick platform components, raw Ant Design, or custom components. Read before introducing a new component.
48
+ - `../../references/troubleshooting.md` — known failure modes (missing styles, `options` runtime errors, broken option rendering, etc.) and their fixes. Read when something does not behave as expected.
49
+
50
+ ## Rules
51
+
52
+ - Keep `pageCode` stable and use it as the local logical key.
53
+ - Store live `pageId`, `routeKey`, and `legacyFormUuid` under the current profile only.
54
+ - Use `openxiangda/runtime` for platform data access instead of hardcoding backend URLs in page code.
55
+ - Named imports from `@ant-design/icons` are supported by the `openxiangda` workspace build proxy, which enumerates icon module exports at runtime.
56
+ - Publish through `openxiangda workspace publish --profile <name>` unless there is a specific repair reason to call `page publish` directly.
57
+ - Do not create custom code pages by writing platform schema directly. The source is React workspace code plus `page.config.ts`.
58
+ - For prod, explicitly run with `--profile prod`; never rely on the current profile for release operations.
59
+ - Follow the style system in `../../references/style-system.md`: never hardcode colors, fonts, spacing, or radii — use the platform CSS variables and the page CSS namespace.
60
+ - For list / detail / CRUD pages, follow `../../references/architecture-patterns.md` (e.g. `DataManagementList`) before writing custom data-fetching loops.
61
+ - Pick components per `../../references/component-guide.md`: prefer the platform component, fall back to Ant Design, and only build a custom component when neither fits.
62
+ - When a page misbehaves (lost styles, `options is undefined`, option labels showing raw values, etc.), consult `../../references/troubleshooting.md` before patching symptoms.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: openxiangda-permission-settings
3
+ description: Manage OpenXiangda app roles, page permission groups, form permission groups, and lightweight form settings with profile-isolated IDs and ordinary user token permissions.
4
+ ---
5
+
6
+ # OpenXiangda Permission And Settings
7
+
8
+ Use this skill when the user asks for app roles, visible menus/pages, form submit/view permissions, field permissions, data scopes, or app/form settings.
9
+
10
+ ## Required Context
11
+
12
+ Before changing permissions:
13
+
14
+ ```bash
15
+ openxiangda env --profile dev
16
+ openxiangda auth status --profile dev
17
+ openxiangda workspace bind --profile dev --app-type APP_XXX
18
+ ```
19
+
20
+ The logged-in user must have the matching app permission. Do not use AK/SK or legacy `/dingtalk-api/v1.0`.
21
+
22
+ ## Roles
23
+
24
+ Create app roles first:
25
+
26
+ ```bash
27
+ openxiangda permission role-list --profile dev
28
+ openxiangda permission role-create sales --name "销售" --profile dev
29
+ ```
30
+
31
+ Use role codes in permission group JSON. Bind existing role IDs only inside the current profile:
32
+
33
+ ```bash
34
+ openxiangda permission role-bind sales --role-id <id> --profile dev
35
+ ```
36
+
37
+ ## Page Permission Groups
38
+
39
+ Page permission groups control menu/page visibility:
40
+
41
+ ```bash
42
+ openxiangda permission page-group-create sales_pages --name "销售页面" --roles sales --form-codes customer,orders --profile dev
43
+ ```
44
+
45
+ Empty `--form-codes` and `--menu-form-uuids` means all menus/pages are visible to matched roles.
46
+
47
+ ## Form Permission Groups
48
+
49
+ Form permission groups control submit/view permissions, data scope, operations, and fields:
50
+
51
+ ```bash
52
+ openxiangda permission form-group-create sales_view --form-code customer --name "销售查看" --type view --roles sales --operations view --profile dev
53
+ ```
54
+
55
+ For advanced field permissions and data permission conditions, pass JSON files:
56
+
57
+ ```bash
58
+ openxiangda permission form-group-create sales_limited \
59
+ --form-code customer \
60
+ --name "销售只看自己" \
61
+ --type view \
62
+ --roles sales \
63
+ --data-scope-json data-scope.json \
64
+ --field-permissions-json fields.json \
65
+ --data-permission-json data-permission.json \
66
+ --profile dev
67
+ ```
68
+
69
+ ## Inspection
70
+
71
+ ```bash
72
+ openxiangda permission form-summary --form-code customer --profile dev --json
73
+ openxiangda permission menu-permissions --profile dev --json
74
+ ```
75
+
76
+ ## Form Settings
77
+
78
+ Use settings commands for form runtime settings, field indexes, data management pages, and public access:
79
+
80
+ ```bash
81
+ openxiangda settings get customer --profile dev --json
82
+ openxiangda settings save customer --settings-json settings.json --profile dev
83
+ openxiangda settings indexes customer --profile dev --json
84
+ openxiangda settings indexes-save customer --indexes-json indexes.json --profile dev
85
+ openxiangda settings data-management-save customer --config-json data-management.json --profile dev
86
+ openxiangda settings public-access-save customer --public true --description "公开填报" --profile dev
87
+ ```
88
+
89
+ Do not store platform-specific public access IDs locally. The CLI resolves by `appType + formUuid` for the current profile.
90
+
91
+ ## References
92
+
93
+ - Permission model and examples: `../../references/permissions-settings.md`
94
+ - Profile-isolated IDs: `../../references/workspace-state.md`
95
+ - API fields: `../../references/openxiangda-api.md`
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: openxiangda-workflow-automation
3
+ description: Build, validate, publish, enable, and inspect OpenXiangda workflow definitions and automations with profile-isolated resource IDs and ordinary user token permissions.
4
+ ---
5
+
6
+ # OpenXiangda Workflow And Automation
7
+
8
+ Use this skill when the user asks for approval workflows, workflow forms, automation rules, scheduled jobs, form-event triggers, or process-triggered automation in OpenXiangda.
9
+
10
+ ## Required Context
11
+
12
+ Before any write:
13
+
14
+ ```bash
15
+ openxiangda env --profile dev
16
+ openxiangda auth status --profile dev
17
+ openxiangda workspace bind --profile dev --app-type APP_XXX
18
+ ```
19
+
20
+ Resolve logical form codes through `.openxiangda/state.json`:
21
+
22
+ ```bash
23
+ openxiangda form list --profile dev
24
+ openxiangda form bind customer --form-uuid FORM_XXX --profile dev
25
+ ```
26
+
27
+ ## Workflow Flow
28
+
29
+ 1. Create or update a workflow v3 JSON locally.
30
+ 2. Validate it:
31
+ ```bash
32
+ openxiangda workflow validate --definition-json workflow.json --publish --profile dev
33
+ ```
34
+ 3. Create and bind:
35
+ ```bash
36
+ openxiangda workflow create customer_approval --form-code customer --definition-json workflow.json --profile dev
37
+ ```
38
+ 4. Publish:
39
+ ```bash
40
+ openxiangda workflow publish customer_approval --profile dev
41
+ ```
42
+
43
+ Use `workflow pull` to inspect the live definition. Use logical workflow codes locally; never copy a workflow ID from one profile to another.
44
+
45
+ ## JS_CODE V2
46
+
47
+ For non-trivial logic, prefer JS_CODE V2 trusted Node scripts over large inline snippets. AI-authored JS_CODE source must be TypeScript:
48
+
49
+ 1. Put source in `sy-lowcode-app-workspace/src/js-code-nodes/<scriptCode>/index.ts`.
50
+ 2. Run `pnpm build-js-code --script <scriptCode>`. This command runs TypeScript validation first and only bundles after `tsc` passes.
51
+ 3. In workflow or automation JSON, use:
52
+ ```json
53
+ {
54
+ "id": "sync_customer",
55
+ "type": "js_code",
56
+ "data": {
57
+ "label": "同步客户",
58
+ "runtimeMode": "trusted_node",
59
+ "sourceType": "file_snapshot",
60
+ "scriptCode": "sync_customer",
61
+ "sourceFile": {
62
+ "localPath": "src/js-code-nodes/sync_customer/index.ts"
63
+ },
64
+ "timeout": 30000
65
+ }
66
+ }
67
+ ```
68
+
69
+ The CLI requires `sourceFile.localPath` to point to `src/js-code-nodes/<scriptCode>/index.ts`. During validate/create it runs `pnpm build-js-code --script <scriptCode>`, uploads the generated `dist/js-code-nodes/<scriptCode>/index.cjs` to `/file/js-code-snapshot/upload`, verifies the server snapshot metadata, and replaces it with `{ bucketName, objectName, sha256, ... }`.
70
+
71
+ Inside the TypeScript script, prefer `export default async function (ctx) {}` or `module.exports = async (ctx) => {}`. The runtime exposes Node `require`, `process`, `Buffer`, installed dependencies, arbitrary HTTP, legacy `methods.*`, and `platform.api` for `/openxiangda-api/v1`.
72
+
73
+ ## Automation Flow
74
+
75
+ 1. Create a trigger JSON and automation v3 definition JSON locally.
76
+ 2. Validate:
77
+ ```bash
78
+ openxiangda automation validate --trigger-json trigger.json --definition-json automation.json --strict --profile dev
79
+ ```
80
+ 3. Create and bind:
81
+ ```bash
82
+ openxiangda automation create notify_on_submit --name "提交后通知" --form-code customer --trigger-json trigger.json --definition-json automation.json --profile dev
83
+ ```
84
+ 4. Publish and enable:
85
+ ```bash
86
+ openxiangda automation publish notify_on_submit --profile dev
87
+ openxiangda automation enable notify_on_submit --profile dev
88
+ ```
89
+
90
+ Use `automation disable` before risky edits. Published automations create a draft version when updated.
91
+
92
+ ## References
93
+
94
+ - Workflow v3 JSON: `../../references/workflow-v3.md`
95
+ - Automation v3 JSON and triggers: `../../references/automation-v3.md`
96
+ - API fields: `../../references/openxiangda-api.md`
97
+ - Profile-isolated IDs: `../../references/workspace-state.md`
package/package.json ADDED
@@ -0,0 +1,126 @@
1
+ {
2
+ "name": "openxiangda",
3
+ "version": "1.0.0",
4
+ "description": "OpenXiangda CLI, workspace build tools, runtime SDK, and form components.",
5
+ "private": false,
6
+ "bin": {
7
+ "openxiangda": "bin/openxiangda.js",
8
+ "lowcode-workspace": "packages/sdk/bin/lowcode-workspace.mjs"
9
+ },
10
+ "main": "./packages/sdk/dist/components/index.cjs",
11
+ "module": "./packages/sdk/dist/components/index.mjs",
12
+ "types": "./packages/sdk/dist/components/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./packages/sdk/dist/components/index.d.ts",
16
+ "import": "./packages/sdk/dist/components/index.mjs",
17
+ "require": "./packages/sdk/dist/components/index.cjs"
18
+ },
19
+ "./runtime": {
20
+ "types": "./packages/sdk/dist/runtime/index.d.ts",
21
+ "import": "./packages/sdk/dist/runtime/index.mjs",
22
+ "require": "./packages/sdk/dist/runtime/index.cjs"
23
+ },
24
+ "./build": {
25
+ "types": "./packages/sdk/dist/build/index.d.ts",
26
+ "import": "./packages/sdk/dist/build/index.mjs",
27
+ "require": "./packages/sdk/dist/build/index.cjs"
28
+ },
29
+ "./tailwind-preset": {
30
+ "types": "./packages/sdk/dist/styles/tailwind-preset.d.ts",
31
+ "import": "./packages/sdk/dist/styles/tailwind-preset.mjs",
32
+ "require": "./packages/sdk/dist/styles/tailwind-preset.cjs"
33
+ },
34
+ "./antd-theme": {
35
+ "types": "./packages/sdk/dist/styles/antd-theme.d.ts",
36
+ "import": "./packages/sdk/dist/styles/antd-theme.mjs",
37
+ "require": "./packages/sdk/dist/styles/antd-theme.cjs"
38
+ },
39
+ "./styles/tokens.css": "./packages/sdk/dist/styles/tokens.css",
40
+ "./package.json": "./package.json"
41
+ },
42
+ "files": [
43
+ "bin/",
44
+ "lib/",
45
+ "openxiangda-skills/",
46
+ "templates/",
47
+ "packages/sdk/bin/",
48
+ "packages/sdk/dist/",
49
+ "packages/sdk/src/build-source/",
50
+ "README.md"
51
+ ],
52
+ "scripts": {
53
+ "build:sdk": "tsup --config packages/sdk/tsup.config.ts",
54
+ "check": "node --check bin/openxiangda.js && node --check lib/*.js && node --check packages/sdk/src/build-source/src/cli.mjs && node --check packages/sdk/src/build-source/scripts/*.mjs && node --check packages/sdk/src/build-source/scripts/utils/*.mjs",
55
+ "prepack": "npm run build:sdk",
56
+ "test:profile-isolation": "bash scripts/profile-isolation-smoke.sh",
57
+ "test:skill-install": "bash scripts/skill-install-smoke.sh",
58
+ "test:workspace-init": "bash scripts/workspace-init-smoke.sh"
59
+ },
60
+ "dependencies": {
61
+ "@ant-design/cssinjs": "^1.23.0",
62
+ "@ant-design/icons": "^6",
63
+ "@tiptap/core": "^3.24.0",
64
+ "@tiptap/extension-character-count": "^3.24.0",
65
+ "@tiptap/extension-code-block": "^3.24.0",
66
+ "@tiptap/extension-code-block-lowlight": "^3.24.0",
67
+ "@tiptap/extension-color": "^3.24.0",
68
+ "@tiptap/extension-font-family": "^3.24.0",
69
+ "@tiptap/extension-highlight": "^3.24.0",
70
+ "@tiptap/extension-image": "^3.24.0",
71
+ "@tiptap/extension-link": "^3.24.0",
72
+ "@tiptap/extension-list": "^3.24.0",
73
+ "@tiptap/extension-placeholder": "^3.24.0",
74
+ "@tiptap/extension-subscript": "^3.24.0",
75
+ "@tiptap/extension-superscript": "^3.24.0",
76
+ "@tiptap/extension-table": "^3.24.0",
77
+ "@tiptap/extension-table-cell": "^3.24.0",
78
+ "@tiptap/extension-table-header": "^3.24.0",
79
+ "@tiptap/extension-table-row": "^3.24.0",
80
+ "@tiptap/extension-task-item": "^3.24.0",
81
+ "@tiptap/extension-task-list": "^3.24.0",
82
+ "@tiptap/extension-text-align": "^3.24.0",
83
+ "@tiptap/extension-text-style": "^3.24.0",
84
+ "@tiptap/extension-underline": "^3.24.0",
85
+ "@tiptap/pm": "^3.24.0",
86
+ "@tiptap/react": "^3.24.0",
87
+ "@tiptap/starter-kit": "^3.24.0",
88
+ "@vitejs/plugin-react": "^4.3.0",
89
+ "ali-oss": "^6.23.0",
90
+ "antd": "^6.3.7",
91
+ "antd-mobile": "^5.37.0",
92
+ "autoprefixer": "^10.4.21",
93
+ "dayjs": "^1.11.20",
94
+ "dotenv": "^16.6.1",
95
+ "esbuild": "^0.25.0",
96
+ "glob": "^10.4.5",
97
+ "lowlight": "3.3.0",
98
+ "minimist": "^1.2.8",
99
+ "p-limit": "^5.0.0",
100
+ "qrcode-terminal": "^0.12.0",
101
+ "tailwindcss": "^3.4.17",
102
+ "tsx": "^4.20.0",
103
+ "vite": "^6.0.0"
104
+ },
105
+ "peerDependencies": {
106
+ "react": ">=18",
107
+ "react-dom": ">=18"
108
+ },
109
+ "devDependencies": {
110
+ "@types/node": "^22.0.0",
111
+ "@types/react": "^18.3.18",
112
+ "@types/react-dom": "^18.3.5",
113
+ "react": "18.3.1",
114
+ "react-dom": "18.3.1",
115
+ "tsup": "^8.3.0",
116
+ "typescript": "^5.7.0"
117
+ },
118
+ "engines": {
119
+ "node": ">=18"
120
+ },
121
+ "publishConfig": {
122
+ "access": "public",
123
+ "registry": "https://registry.npmjs.org/"
124
+ },
125
+ "license": "MIT"
126
+ }
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { main } from "../src/build-source/src/cli.mjs";
3
+
4
+ await main(process.argv.slice(2));
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/sdk/src/build/index.ts
21
+ var build_exports = {};
22
+ __export(build_exports, {
23
+ defineAppWorkspaceConfig: () => defineAppWorkspaceConfig
24
+ });
25
+ module.exports = __toCommonJS(build_exports);
26
+ function defineAppWorkspaceConfig(config) {
27
+ return config;
28
+ }
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ defineAppWorkspaceConfig
32
+ });
33
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/build/index.ts"],"sourcesContent":["export type CssIsolation = 'namespace' | 'shadow' | 'none';\n\nexport interface AppWorkspaceConfig {\n appType?: string;\n appName?: string;\n platformUrl?: string;\n servicePrefix?: string;\n appKey?: string;\n appSecret?: string;\n userId?: string;\n version?: string;\n buildId?: string;\n oss?: {\n region?: string;\n bucket?: string;\n accessKeyId?: string;\n accessKeySecret?: string;\n pathPrefix?: string;\n corsOrigins?: string[];\n skipCors?: boolean;\n };\n defaults?: {\n protocolVersion?: string;\n frameworkVersion?: string;\n cssIsolation?: CssIsolation;\n formMenuParentId?: string;\n formMenuIcon?: string;\n pageMenuParentId?: string;\n pageMenuIcon?: string;\n formBuilderVersion?: string;\n };\n forms?: { dir?: string };\n pages?: { dir?: string };\n}\n\nexport function defineAppWorkspaceConfig<T extends AppWorkspaceConfig>(config: T): T {\n return config;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmCO,SAAS,yBAAuD,QAAc;AACnF,SAAO;AACT;","names":[]}
@@ -0,0 +1,40 @@
1
+ type CssIsolation = 'namespace' | 'shadow' | 'none';
2
+ interface AppWorkspaceConfig {
3
+ appType?: string;
4
+ appName?: string;
5
+ platformUrl?: string;
6
+ servicePrefix?: string;
7
+ appKey?: string;
8
+ appSecret?: string;
9
+ userId?: string;
10
+ version?: string;
11
+ buildId?: string;
12
+ oss?: {
13
+ region?: string;
14
+ bucket?: string;
15
+ accessKeyId?: string;
16
+ accessKeySecret?: string;
17
+ pathPrefix?: string;
18
+ corsOrigins?: string[];
19
+ skipCors?: boolean;
20
+ };
21
+ defaults?: {
22
+ protocolVersion?: string;
23
+ frameworkVersion?: string;
24
+ cssIsolation?: CssIsolation;
25
+ formMenuParentId?: string;
26
+ formMenuIcon?: string;
27
+ pageMenuParentId?: string;
28
+ pageMenuIcon?: string;
29
+ formBuilderVersion?: string;
30
+ };
31
+ forms?: {
32
+ dir?: string;
33
+ };
34
+ pages?: {
35
+ dir?: string;
36
+ };
37
+ }
38
+ declare function defineAppWorkspaceConfig<T extends AppWorkspaceConfig>(config: T): T;
39
+
40
+ export { type AppWorkspaceConfig, type CssIsolation, defineAppWorkspaceConfig };
@@ -0,0 +1,40 @@
1
+ type CssIsolation = 'namespace' | 'shadow' | 'none';
2
+ interface AppWorkspaceConfig {
3
+ appType?: string;
4
+ appName?: string;
5
+ platformUrl?: string;
6
+ servicePrefix?: string;
7
+ appKey?: string;
8
+ appSecret?: string;
9
+ userId?: string;
10
+ version?: string;
11
+ buildId?: string;
12
+ oss?: {
13
+ region?: string;
14
+ bucket?: string;
15
+ accessKeyId?: string;
16
+ accessKeySecret?: string;
17
+ pathPrefix?: string;
18
+ corsOrigins?: string[];
19
+ skipCors?: boolean;
20
+ };
21
+ defaults?: {
22
+ protocolVersion?: string;
23
+ frameworkVersion?: string;
24
+ cssIsolation?: CssIsolation;
25
+ formMenuParentId?: string;
26
+ formMenuIcon?: string;
27
+ pageMenuParentId?: string;
28
+ pageMenuIcon?: string;
29
+ formBuilderVersion?: string;
30
+ };
31
+ forms?: {
32
+ dir?: string;
33
+ };
34
+ pages?: {
35
+ dir?: string;
36
+ };
37
+ }
38
+ declare function defineAppWorkspaceConfig<T extends AppWorkspaceConfig>(config: T): T;
39
+
40
+ export { type AppWorkspaceConfig, type CssIsolation, defineAppWorkspaceConfig };
@@ -0,0 +1,8 @@
1
+ // packages/sdk/src/build/index.ts
2
+ function defineAppWorkspaceConfig(config) {
3
+ return config;
4
+ }
5
+ export {
6
+ defineAppWorkspaceConfig
7
+ };
8
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/build/index.ts"],"sourcesContent":["export type CssIsolation = 'namespace' | 'shadow' | 'none';\n\nexport interface AppWorkspaceConfig {\n appType?: string;\n appName?: string;\n platformUrl?: string;\n servicePrefix?: string;\n appKey?: string;\n appSecret?: string;\n userId?: string;\n version?: string;\n buildId?: string;\n oss?: {\n region?: string;\n bucket?: string;\n accessKeyId?: string;\n accessKeySecret?: string;\n pathPrefix?: string;\n corsOrigins?: string[];\n skipCors?: boolean;\n };\n defaults?: {\n protocolVersion?: string;\n frameworkVersion?: string;\n cssIsolation?: CssIsolation;\n formMenuParentId?: string;\n formMenuIcon?: string;\n pageMenuParentId?: string;\n pageMenuIcon?: string;\n formBuilderVersion?: string;\n };\n forms?: { dir?: string };\n pages?: { dir?: string };\n}\n\nexport function defineAppWorkspaceConfig<T extends AppWorkspaceConfig>(config: T): T {\n return config;\n}\n"],"mappings":";AAmCO,SAAS,yBAAuD,QAAc;AACnF,SAAO;AACT;","names":[]}