@gadmin2n/schematics 0.0.152 → 0.0.154

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 (110) hide show
  1. package/dist/lib/application/files/gadmin2-game-angle-demo/.git-blame-ignore-revs +5 -0
  2. package/dist/lib/application/files/gadmin2-game-angle-demo/.nvmrc +1 -0
  3. package/dist/lib/application/files/gadmin2-game-angle-demo/CODEBUDDY.local.md +8 -0
  4. package/dist/lib/application/files/gadmin2-game-angle-demo/CODEBUDDY.md +4 -4
  5. package/dist/lib/application/files/gadmin2-game-angle-demo/Dockerfile.codegen +16 -9
  6. package/dist/lib/application/files/gadmin2-game-angle-demo/Dockerfile.server +21 -13
  7. package/dist/lib/application/files/gadmin2-game-angle-demo/Dockerfile.web +11 -11
  8. package/dist/lib/application/files/gadmin2-game-angle-demo/Jenkinsfile +1 -1
  9. package/dist/lib/application/files/gadmin2-game-angle-demo/PRODUCT.md +1 -1
  10. package/dist/lib/application/files/gadmin2-game-angle-demo/compose-ctl.sh +1 -1
  11. package/dist/lib/application/files/gadmin2-game-angle-demo/config/prisma/workflow.prisma +1 -0
  12. package/dist/lib/application/files/gadmin2-game-angle-demo/docker-compose.yml +4 -4
  13. package/dist/lib/application/files/gadmin2-game-angle-demo/readme.md +22 -22
  14. package/dist/lib/application/files/gadmin2-game-angle-demo/server/.oxfmtrc.json +13 -0
  15. package/dist/lib/application/files/gadmin2-game-angle-demo/server/.oxlintrc.json +17 -0
  16. package/dist/lib/application/files/gadmin2-game-angle-demo/server/.seed-timestamp +1 -0
  17. package/dist/lib/application/files/gadmin2-game-angle-demo/server/package.json +14 -13
  18. package/dist/lib/application/files/gadmin2-game-angle-demo/server/pnpm-workspace.yaml +23 -0
  19. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/index.ts +2 -1
  20. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/permission.seed.ts +23 -44
  21. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/workflow-node-types.ts +25 -4
  22. package/dist/lib/application/files/gadmin2-game-angle-demo/server/seed/workflow.seed.ts +74 -64
  23. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/auth.guard.ts +4 -1
  24. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/structured-all-exceptions.filter.ts +2 -2
  25. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/lib/tracing.ts +4 -6
  26. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/agenda/agenda.service.ts +2 -2
  27. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/audit/audit.controller.ts +1 -1
  28. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/codeRuntime/code-runtime.controller.ts +6 -6
  29. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/game/game.controller.ts +1 -1
  30. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.controller.ts +6 -6
  31. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/httpRequest/http-request-runtime.util.ts +4 -4
  32. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/approval-subject-source.util.ts +1 -1
  33. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/human-approval.service.ts +4 -4
  34. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/humanApproval/runtime/human-approval-runtime.controller.ts +1 -1
  35. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/integrationConnection/integration-connection.service.ts +2 -2
  36. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/pageResource/pageResource.controller.ts +1 -1
  37. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/permTransfer/page-transfer.service.ts +1 -1
  38. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/resource/resource.controller.ts +1 -1
  39. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/rolePages/rolePages.controller.ts +1 -1
  40. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/roleResource/roleResource.controller.ts +1 -1
  41. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/staffDirectory/staff-directory.service.spec.ts +1 -1
  42. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.errors.ts +4 -1
  43. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.registry.ts +4 -4
  44. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/subjectProvider/subject-provider.types.ts +4 -4
  45. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/user/user.controller.ts +1 -1
  46. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/user/user.service.ts +2 -2
  47. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/parameter-binding.ts +4 -4
  48. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/temporal.service.ts +0 -7
  49. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-cancellation.spec.ts +17 -0
  50. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-compiler.service.spec.ts +58 -3
  51. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-compiler.service.ts +66 -6
  52. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-data-edge.util.ts +5 -5
  53. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-execution-idempotency.spec.ts +61 -149
  54. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-execution.dto.ts +1 -1
  55. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-handle-validator.ts +2 -2
  56. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-lifecycle-runtime.controller.spec.ts +1 -1
  57. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-lifecycle-runtime.controller.ts +1 -1
  58. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow-lifecycle.service.spec.ts +2 -2
  59. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.controller.spec.ts +38 -0
  60. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.controller.ts +18 -7
  61. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.dto.ts +1 -0
  62. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflow/workflow.service.ts +142 -253
  63. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowConfig/subject-config-validator.service.ts +3 -1
  64. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeInstance/workflowNodeInstance.controller.ts +1 -1
  65. package/dist/lib/application/files/gadmin2-game-angle-demo/server/src/modules/workflowNodeType/workflowNodeType.controller.ts +1 -1
  66. package/dist/lib/application/files/gadmin2-game-angle-demo/server/start-prod.sh +4 -4
  67. package/dist/lib/application/files/gadmin2-game-angle-demo/web/.oxfmtrc.json +12 -0
  68. package/dist/lib/application/files/gadmin2-game-angle-demo/web/.oxlintrc.json +24 -0
  69. package/dist/lib/application/files/gadmin2-game-angle-demo/web/README.MD +2 -2
  70. package/dist/lib/application/files/gadmin2-game-angle-demo/web/nginx.conf +0 -4
  71. package/dist/lib/application/files/gadmin2-game-angle-demo/web/package.json +17 -17
  72. package/dist/lib/application/files/gadmin2-game-angle-demo/web/pnpm-workspace.yaml +13 -0
  73. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/VanillaJSONEditor/index.jsx +4 -4
  74. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/components/agentPanel/propPatcher.ts +36 -8
  75. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/config/routeRegistry.test.ts +7 -5
  76. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/config/routeRegistry.tsx +6 -36
  77. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/dev-shell/style.css +24 -7
  78. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/hooks/useDynamicResources.tsx +0 -4
  79. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/en/workflow.json +29 -7
  80. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/locales/zh_CN/workflow.json +29 -7
  81. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/plugins/devShellPlugin.ts +2 -2
  82. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/audit/components/action-cell.css +1 -1
  83. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/people-groups/index.tsx +20 -17
  84. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/person-directory/index.tsx +38 -35
  85. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/business-events/detail.tsx +6 -1
  86. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/business-events/index.tsx +24 -22
  87. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/EnhancedFlowRenderer.tsx +0 -11
  88. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/components/StatusCards.tsx +24 -0
  89. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/connections/index.tsx +20 -18
  90. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/index.tsx +7 -0
  91. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/instance-detail.tsx +28 -79
  92. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/instances.tsx +5 -0
  93. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/components/NodeInstanceForm.tsx +0 -1
  94. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/DbExecuteConfigEditor.tsx +227 -97
  95. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/node-instances/widgets/SimplifiedNodeEditors.test.tsx +62 -0
  96. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/settings/index.tsx +73 -0
  97. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/temporal-tenant/index.tsx +21 -46
  98. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/types.ts +2 -0
  99. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/routes/workflow/utils/newNodeConfig.ts +1 -0
  100. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/styles/index.css +1 -1
  101. package/dist/lib/application/files/gadmin2-game-angle-demo/web/src/test/setup.ts +1 -1
  102. package/dist/lib/application/files/gadmin2-game-angle-demo/web/vite.config.ts +53 -41
  103. package/dist/lib/application/files/gadmin2-game-angle-demo/web/vitest.config.ts +8 -2
  104. package/package.json +1 -1
  105. package/dist/lib/application/files/gadmin2-game-angle-demo/server/.eslintrc.js +0 -28
  106. package/dist/lib/application/files/gadmin2-game-angle-demo/server/.prettierignore +0 -7
  107. package/dist/lib/application/files/gadmin2-game-angle-demo/server/.prettierrc +0 -4
  108. package/dist/lib/application/files/gadmin2-game-angle-demo/web/.eslintrc.json +0 -38
  109. package/dist/lib/application/files/gadmin2-game-angle-demo/web/.prettierignore +0 -2
  110. package/dist/lib/application/files/gadmin2-game-angle-demo/web/.prettierrc +0 -4
@@ -135,7 +135,7 @@ export class WorkflowNodeTypeController {
135
135
  @Body() body: UpdateWorkflowNodeTypeDto,
136
136
  @ACAttrFilter() acAttrFilter,
137
137
  ) {
138
- /*
138
+ /*
139
139
  const origin = (await this.workflowNodeTypeService.findUnique(id, {
140
140
  id: true,
141
141
  // 这里需要根据实际情况填写
@@ -73,7 +73,7 @@ if [ "$DEPLOY_PREFIX_MATCH" -eq 1 ]; then
73
73
  echo "更新后的 DATABASE_URL: ${DATABASE_URL}"
74
74
  export DATABASE_URL="${DATABASE_URL}"
75
75
 
76
- yarn migrate:deploy || { echo "同步表结构失败"; exit 1; }
76
+ pnpm migrate:deploy || { echo "同步表结构失败"; exit 1; }
77
77
 
78
78
  # 设置迁移脚本的源和目标 schema
79
79
  # 源 schema 为 public(生产数据),目标 schema 为分支 schema
@@ -84,7 +84,7 @@ if [ "$DEPLOY_PREFIX_MATCH" -eq 1 ]; then
84
84
 
85
85
  # 临时环境每次启动都做一次 seed(幂等:upsert / skipDuplicates 风格,重复跑无害)
86
86
  echo "临时环境执行 seed ..."
87
- yarn seed || { echo "seed 失败"; exit 1; }
87
+ pnpm seed || { echo "seed 失败"; exit 1; }
88
88
  else
89
89
  echo "非临时环境,仅在权限表缺失或为空时同步表结构和数据"
90
90
  # 如果DATABASE_URL中已经包含了schema=xxx,则不添加,如果DATABASE_URL中没有schema=,则添加schema=public,如果DATABASE_URL中已经包含了schema=但没有具体值,则添加public
@@ -136,8 +136,8 @@ else
136
136
 
137
137
  if [ "$NEEDS_INIT" != "no" ]; then
138
138
  echo "权限表缺失或无数据(NEEDS_INIT=${NEEDS_INIT}),执行 migrate:deploy + seed ..."
139
- yarn migrate:deploy || { echo "同步表结构失败"; exit 1; }
140
- yarn seed || { echo "seed 失败"; exit 1; }
139
+ pnpm migrate:deploy || { echo "同步表结构失败"; exit 1; }
140
+ pnpm seed || { echo "seed 失败"; exit 1; }
141
141
  else
142
142
  echo "权限数据已就绪,跳过 migrate:deploy 与 seed"
143
143
  fi
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
+ "singleQuote": true,
4
+ "trailingComma": "all",
5
+ "printWidth": 80,
6
+ "sortPackageJson": false,
7
+ "ignorePatterns": [
8
+ "dist/**",
9
+ "node_modules/**",
10
+ "src/generated/**"
11
+ ]
12
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "plugins": ["typescript", "react", "react-hooks"],
4
+ "categories": {
5
+ "correctness": "warn"
6
+ },
7
+ "rules": {
8
+ "react/react-in-jsx-scope": "off",
9
+ "react/display-name": "off",
10
+ "typescript/no-explicit-any": "off",
11
+ "typescript/no-empty-object-type": "off",
12
+ "typescript/no-unsafe-function-type": "off",
13
+ "typescript/no-wrapper-object-types": "warn",
14
+ "typescript/no-unnecessary-type-constraint": "warn",
15
+ "typescript/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
16
+ "typescript/no-unused-expressions": "warn",
17
+ "react/no-unescaped-entities": "warn",
18
+ "react/jsx-key": "warn",
19
+ "react-hooks/rules-of-hooks": "warn",
20
+ "react-hooks/exhaustive-deps": "warn",
21
+ "no-prototype-builtins": "warn"
22
+ },
23
+ "ignorePatterns": ["dist/**", "node_modules/**", "src/generated/**"]
24
+ }
@@ -20,13 +20,13 @@ Refine offers lots of out-of-the box functionality for rapid development, withou
20
20
  ### Running the development server.
21
21
 
22
22
  ```bash
23
- $ yarn dev
23
+ $ pnpm dev
24
24
  ```
25
25
 
26
26
  ### Building for production.
27
27
 
28
28
  ```bash
29
- $ yarn build
29
+ $ pnpm build
30
30
  ```
31
31
 
32
32
  ## Learn More
@@ -50,10 +50,6 @@ http {
50
50
  autoindex off; # 关闭目录索引
51
51
  index index.html;
52
52
 
53
- location ~ \.(js|mjs)$ {
54
- add_header Content-Type application/javascript;
55
- }
56
-
57
53
  # --------------------------
58
54
  # SPA 路由处理 - 必须放在最后
59
55
  # --------------------------
@@ -25,6 +25,7 @@
25
25
  "ajv": "^8.16.0",
26
26
  "ajv-formats": "^2.1.1",
27
27
  "antd": "^5.24.6",
28
+ "axios": "^1.14.0",
28
29
  "class-validator": "^0.14.0",
29
30
  "dayjs": "^1.11.19",
30
31
  "echarts": "^5.6.0",
@@ -43,13 +44,14 @@
43
44
  "react-dom": "^18.2.0",
44
45
  "react-grid-layout": "^2.2.3",
45
46
  "react-i18next": "^15.4.1",
47
+ "react-resizable": "^3.1.3",
46
48
  "react-router-dom": "^7.9.4",
47
49
  "reflect-metadata": "^0.1.13",
48
50
  "sucrase": "^3.35.1",
49
51
  "vanilla-jsoneditor": "^0.23.7"
50
52
  },
51
53
  "devDependencies": {
52
- "@testing-library/jest-dom": "^5.16.4",
54
+ "@testing-library/jest-dom": "^6.10.0",
53
55
  "@testing-library/react": "^13.1.1",
54
56
  "@testing-library/user-event": "^14.1.1",
55
57
  "@types/jest": "^29.2.4",
@@ -59,28 +61,23 @@
59
61
  "@types/lodash.foreach": "^4.5.7",
60
62
  "@types/lodash.groupby": "^4.6.7",
61
63
  "@types/lodash.memoize": "^4.1.7",
62
- "@types/node": "^12.20.10",
64
+ "@types/node": "^22.20.3",
63
65
  "@types/react": "^18.0.15",
64
66
  "@types/react-dom": "^18.0.6",
65
67
  "@types/react-grid-layout": "^1.3.6",
66
- "@typescript-eslint/eslint-plugin": "^8.59.0",
67
- "@typescript-eslint/parser": "^8.59.0",
68
- "@vitejs/plugin-react": "^4.3.4",
68
+ "@vitejs/plugin-react": "^5.2.0",
69
69
  "autoprefixer": "^10.4.24",
70
70
  "dotenv": "^17.4.2",
71
- "eslint": "^8",
72
- "eslint-plugin-react": "^7.37.5",
73
- "eslint-plugin-react-hooks": "^4",
74
71
  "husky": "^8.0.0",
75
72
  "jsdom": "^26.1.0",
76
73
  "lint-staged": "^13.0.0",
74
+ "oxfmt": "^0.68.0",
75
+ "oxlint": "^1.83.0",
77
76
  "postcss": "^8.5.6",
78
77
  "postcss-nesting": "^14.0.0",
79
- "prettier": "^3.8.3",
80
78
  "typescript": "^5.4.2",
81
- "vite": "^6.2.0",
82
- "vite-tsconfig-paths": "^5.1.4",
83
- "vitest": "^3.2.4",
79
+ "vite": "^8.2.2",
80
+ "vitest": "^5.0.1",
84
81
  "xlsx": "^0.18.5"
85
82
  },
86
83
  "scripts": {
@@ -89,15 +86,18 @@
89
86
  "preview": "vite preview",
90
87
  "test": "vitest run",
91
88
  "typecheck": "tsc --noEmit",
92
- "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx}\"",
93
- "lint": "eslint \"src/**/*.{ts,tsx}\"",
89
+ "format": "oxfmt src",
90
+ "format:check": "oxfmt src --check",
91
+ "lint": "oxlint src",
92
+ "lint:fix": "oxlint src --fix",
94
93
  "prepare": "cd .. && husky install || true"
95
94
  },
96
95
  "lint-staged": {
97
- "**/*.{ts,tsx,js,jsx}": "prettier --write"
96
+ "**/*.{ts,tsx,js,jsx}": "oxfmt"
98
97
  },
99
98
  "type": "module",
100
- "resolutions": {
101
- "rc-util": "^5.44.4"
99
+ "packageManager": "pnpm@11.23.0",
100
+ "engines": {
101
+ "node": ">=22.13"
102
102
  }
103
103
  }
@@ -0,0 +1,13 @@
1
+ # pnpm 11 起,原先放在 package.json "pnpm" 字段的设置迁移至此文件。
2
+ # 本项目非 monorepo,此文件仅用于承载 pnpm 设置。
3
+
4
+ # yarn resolutions 的等价物:锁定 rc-util 版本
5
+ overrides:
6
+ rc-util: ^5.44.4
7
+
8
+ # 依赖的构建脚本默认被禁止执行(供应链安全考虑),需在此逐个放行。
9
+ allowBuilds:
10
+ # 必须放行:postinstall 负责下载对应平台的原生二进制,缺失则 vite 无法构建
11
+ # monaco-editor 依赖的文件监听原生模块,postinstall 负责定位/编译原生 binding
12
+ '@parcel/watcher': true
13
+ esbuild: true
@@ -1,6 +1,6 @@
1
- import { JSONEditor } from "vanilla-jsoneditor";
2
- import { useEffect, useRef } from "react";
3
- import "./index.css";
1
+ import { JSONEditor } from 'vanilla-jsoneditor';
2
+ import { useEffect, useRef } from 'react';
3
+ import './index.css';
4
4
 
5
5
  export default function SvelteJSONEditor(props) {
6
6
  const refContainer = useRef(null);
@@ -32,7 +32,7 @@ export default function SvelteJSONEditor(props) {
32
32
  ...props,
33
33
  content: {
34
34
  json: undefined,
35
- text: props.value || "",
35
+ text: props.value || '',
36
36
  },
37
37
  onChange: (content) => {
38
38
  if (content.text !== undefined) {
@@ -13,16 +13,26 @@
13
13
  * propName={'value'}
14
14
  * 如果 prop 不存在,在 /> 前追加。
15
15
  */
16
- export function patchStringProp(code: string, propName: string, newValue: string): string {
16
+ export function patchStringProp(
17
+ code: string,
18
+ propName: string,
19
+ newValue: string,
20
+ ): string {
17
21
  // 替换双引号格式: propName="old"
18
22
  const dqRegex = new RegExp(`(${propName}=)"([^"]*)"`, 'g');
19
23
  if (dqRegex.test(code)) {
20
- return code.replace(new RegExp(`(${propName}=)"([^"]*)"`, 'g'), `$1"${newValue}"`);
24
+ return code.replace(
25
+ new RegExp(`(${propName}=)"([^"]*)"`, 'g'),
26
+ `$1"${newValue}"`,
27
+ );
21
28
  }
22
29
  // 替换单引号花括号格式: propName={'old'}
23
30
  const sqRegex = new RegExp(`(${propName}=)\\{'([^']*)'\\}`, 'g');
24
31
  if (sqRegex.test(code)) {
25
- return code.replace(new RegExp(`(${propName}=)\\{'([^']*)'\\}`, 'g'), `$1"${newValue}"`);
32
+ return code.replace(
33
+ new RegExp(`(${propName}=)\\{'([^']*)'\\}`, 'g'),
34
+ `$1"${newValue}"`,
35
+ );
26
36
  }
27
37
  // prop 不存在:在 /> 前追加
28
38
  if (code.includes('/>')) {
@@ -36,7 +46,11 @@ export function patchStringProp(code: string, propName: string, newValue: string
36
46
  * 替换 JSX code 字符串中某个枚举类型 prop 的值(字符串格式)。
37
47
  * 与 patchStringProp 相同逻辑,单独命名便于语义区分。
38
48
  */
39
- export function patchEnumProp(code: string, propName: string, newValue: string): string {
49
+ export function patchEnumProp(
50
+ code: string,
51
+ propName: string,
52
+ newValue: string,
53
+ ): string {
40
54
  return patchStringProp(code, propName, newValue);
41
55
  }
42
56
 
@@ -48,7 +62,11 @@ export function patchEnumProp(code: string, propName: string, newValue: string):
48
62
  * legendShow → true(裸属性)
49
63
  * 不存在 → defaultValue
50
64
  */
51
- export function readBooleanProp(code: string, propName: string, defaultValue: boolean): boolean {
65
+ export function readBooleanProp(
66
+ code: string,
67
+ propName: string,
68
+ defaultValue: boolean,
69
+ ): boolean {
52
70
  const falseRegex = new RegExp(`${propName}=\\{false\\}`);
53
71
  if (falseRegex.test(code)) return false;
54
72
  const trueRegex = new RegExp(`${propName}=\\{true\\}|\\b${propName}\\b`);
@@ -64,17 +82,27 @@ export function readBooleanProp(code: string, propName: string, defaultValue: bo
64
82
  * legendShow(裸) → legendShow={false}
65
83
  * 不存在 → 追加 legendShow={true/false}
66
84
  */
67
- export function patchBooleanProp(code: string, propName: string, newValue: boolean): string {
85
+ export function patchBooleanProp(
86
+ code: string,
87
+ propName: string,
88
+ newValue: boolean,
89
+ ): string {
68
90
  const valueStr = `{${newValue}}`;
69
91
  // 替换 {true} 或 {false}
70
92
  const boolRegex = new RegExp(`(${propName})=\\{(true|false)\\}`, 'g');
71
93
  if (boolRegex.test(code)) {
72
- return code.replace(new RegExp(`(${propName})=\\{(true|false)\\}`, 'g'), `$1=${valueStr}`);
94
+ return code.replace(
95
+ new RegExp(`(${propName})=\\{(true|false)\\}`, 'g'),
96
+ `$1=${valueStr}`,
97
+ );
73
98
  }
74
99
  // 替换裸属性(propName 无值)
75
100
  const bareRegex = new RegExp(`\\b(${propName})\\b(?!=)`, 'g');
76
101
  if (bareRegex.test(code)) {
77
- return code.replace(new RegExp(`\\b(${propName})\\b(?!=)`, 'g'), `$1=${valueStr}`);
102
+ return code.replace(
103
+ new RegExp(`\\b(${propName})\\b(?!=)`, 'g'),
104
+ `$1=${valueStr}`,
105
+ );
78
106
  }
79
107
  // prop 不存在:追加
80
108
  if (code.includes('/>')) {
@@ -10,11 +10,13 @@ describe('workflow route placement', () => {
10
10
  });
11
11
 
12
12
  describe('person and access routes', () => {
13
- it('keeps people, groups and access authorization as separate pages', () => {
14
- expect(getRoutePath('person_directory')).toBe('/admin/permission/people');
15
- expect(getRoutePath('people_group')).toBe(
16
- '/admin/permission/people-groups',
17
- );
13
+ it('merges service/connection/people pages into workflow settings', () => {
14
+ expect(getRoutePath('workflow_settings')).toBe('/admin/workflow/settings');
15
+ expect(getRoutePath('person_directory')).toBeNull();
16
+ expect(getRoutePath('people_group')).toBeNull();
17
+ expect(getRoutePath('workflow_temporal_tenant')).toBeNull();
18
+ expect(getRoutePath('workflow_connections')).toBeNull();
19
+ expect(getRoutePath('workflow_event_catalog')).toBeNull();
18
20
  expect(getRoutePath('user')).toBe('/admin/permission/user');
19
21
  });
20
22
  });
@@ -191,31 +191,13 @@ export const routeRegistry: Record<string, RouteEntry> = {
191
191
  })),
192
192
  ),
193
193
  },
194
- // 人员目录 — code: person_directory
195
- person_directory: {
196
- path: 'people',
197
- component: lazyWithReload(() =>
198
- import('routes/person-directory').then((m) => ({
199
- default: m.default,
200
- })),
201
- ),
202
- },
203
- // 访问授权 — 保留 user code/path,兼容既有页面权限和链接
194
+ // 用户管理 — 保留 user code/path,兼容既有页面权限和链接
204
195
  user: {
205
196
  path: 'user',
206
197
  component: lazyWithReload(() =>
207
198
  import('routes/user').then((m) => ({ default: m.UserListPage })),
208
199
  ),
209
200
  },
210
- // 人员组 — code: people_group
211
- people_group: {
212
- path: 'people-groups',
213
- component: lazyWithReload(() =>
214
- import('routes/people-groups').then((m) => ({
215
- default: m.default,
216
- })),
217
- ),
218
- },
219
201
  // 角色管理
220
202
  role: {
221
203
  path: 'role-list',
@@ -379,24 +361,12 @@ export const routeRegistry: Record<string, RouteEntry> = {
379
361
  () => import('routes/workflow/node-instances/show'),
380
362
  ),
381
363
  },
382
- workflow_temporal_tenant: {
383
- path: 'temporal-tenant',
384
- component: lazyWithReload(
385
- () => import('routes/workflow/temporal-tenant'),
386
- ),
387
- },
388
- workflow_connections: {
389
- path: 'connections',
390
- component: lazyWithReload(
391
- () => import('routes/workflow/connections'),
392
- ),
393
- },
394
- workflow_event_catalog: {
395
- path: 'business-events',
396
- component: lazyWithReload(
397
- () => import('routes/workflow/business-events'),
398
- ),
364
+ // 功能设置 — 合并原服务注册/连接管理/人员目录/人员组四个页面
365
+ workflow_settings: {
366
+ path: 'settings',
367
+ component: lazyWithReload(() => import('routes/workflow/settings')),
399
368
  },
369
+ // 业务事件运行记录详情(列表已并入功能设置 tab,此路由保留详情深链)
400
370
  businessEventDetail: {
401
371
  path: 'business-events/show/:registrationCode',
402
372
  component: lazyWithReload(
@@ -69,7 +69,10 @@ body {
69
69
  align-items: center;
70
70
  justify-content: center;
71
71
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
72
- transition: right 0.3s, background 0.2s, color 0.2s;
72
+ transition:
73
+ right 0.3s,
74
+ background 0.2s,
75
+ color 0.2s;
73
76
  }
74
77
 
75
78
  #toggle-btn:hover {
@@ -101,7 +104,10 @@ body {
101
104
  align-items: center;
102
105
  justify-content: center;
103
106
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
104
- transition: right 0.3s, background 0.2s, color 0.2s;
107
+ transition:
108
+ right 0.3s,
109
+ background 0.2s,
110
+ color 0.2s;
105
111
  }
106
112
 
107
113
  #inspect-btn:hover {
@@ -184,7 +190,9 @@ body {
184
190
  font-size: 13px;
185
191
  color: #1a1a1a;
186
192
  cursor: pointer;
187
- transition: background 0.15s, color 0.15s;
193
+ transition:
194
+ background 0.15s,
195
+ color 0.15s;
188
196
  border-radius: 0;
189
197
  display: block;
190
198
  width: 100%;
@@ -351,7 +359,9 @@ div.chat-header {
351
359
  color: #595959;
352
360
  border-bottom: 2px solid transparent;
353
361
  margin-bottom: -1px;
354
- transition: color 0.15s, border-color 0.15s;
362
+ transition:
363
+ color 0.15s,
364
+ border-color 0.15s;
355
365
  }
356
366
 
357
367
  .add-data-modal-tab:hover {
@@ -604,7 +614,10 @@ div.chat-header {
604
614
  border-radius: 10px;
605
615
  background: #fff;
606
616
  cursor: pointer;
607
- transition: border-color 0.15s, background 0.15s, transform 0.1s;
617
+ transition:
618
+ border-color 0.15s,
619
+ background 0.15s,
620
+ transform 0.1s;
608
621
  }
609
622
 
610
623
  .add-page-type-card:hover {
@@ -681,7 +694,9 @@ div.chat-header {
681
694
  padding: 4px 10px;
682
695
  border: 1px solid #d9d9d9;
683
696
  border-radius: 20px;
684
- transition: border-color 0.15s, background 0.15s;
697
+ transition:
698
+ border-color 0.15s,
699
+ background 0.15s;
685
700
  }
686
701
 
687
702
  .add-page-role-checkbox:has(input:checked) {
@@ -890,7 +905,9 @@ div.chat-header {
890
905
  white-space: nowrap;
891
906
  pointer-events: none;
892
907
  opacity: 0;
893
- transition: opacity 0.15s ease, transform 0.15s ease;
908
+ transition:
909
+ opacity 0.15s ease,
910
+ transform 0.15s ease;
894
911
  z-index: 10000;
895
912
  }
896
913
 
@@ -6,8 +6,6 @@ import {
6
6
  BgColorsOutlined,
7
7
  ScheduleOutlined,
8
8
  ApartmentOutlined,
9
- TeamOutlined,
10
- UserOutlined,
11
9
  } from '@ant-design/icons';
12
10
  import { getRoutePath } from 'config/routeRegistry';
13
11
  import { useUserPageAccess } from './useUserPageAccess';
@@ -48,8 +46,6 @@ export const iconMapping: Record<string, React.ReactNode> = {
48
46
  canvas: <BgColorsOutlined />,
49
47
  agenda: <ScheduleOutlined />,
50
48
  workflow: <ApartmentOutlined />,
51
- person_directory: <UserOutlined />,
52
- people_group: <TeamOutlined />,
53
49
  };
54
50
 
55
51
  // Pages whose children are tabs (not separate menu items)
@@ -257,6 +257,15 @@
257
257
  "runOnceEach": "Run once for each item",
258
258
  "timeoutMilliseconds": "Timeout (milliseconds)"
259
259
  },
260
+ "settings": {
261
+ "title": "Feature Settings",
262
+ "subtitle": "Manage the service registration, connections, business events and people data that Workflow depends on.",
263
+ "tabTenant": "Service Registration",
264
+ "tabConnections": "Connections",
265
+ "tabEvents": "Business Events",
266
+ "tabPeople": "People Directory",
267
+ "tabGroups": "People Groups"
268
+ },
260
269
  "connection": {
261
270
  "title": "Connections",
262
271
  "subtitle": "Manage external system addresses and encrypted credentials for reuse by Workflow nodes.",
@@ -581,6 +590,9 @@
581
590
  }
582
591
  },
583
592
  "database": {
593
+ "mode": "Execution mode",
594
+ "functionMode": "Database Function",
595
+ "sqlMode": "Raw SQL",
584
596
  "function": "Database Function",
585
597
  "functionHint": "Only Functions in workflow_api in the current GAdmin database are shown.",
586
598
  "selectFunction": "Select a Function",
@@ -588,6 +600,17 @@
588
600
  "functionMissing": "This Function no longer exists. Select another Function.",
589
601
  "returnType": "Return type: {{type}}",
590
602
  "noArguments": "This Function has no arguments.",
603
+ "sql": "SQL statement",
604
+ "readOnly": "Read-only SQL",
605
+ "writeEnabled": "Writes enabled",
606
+ "allowWrite": "Allow writes",
607
+ "readOnlyDescription": "When off, this node can only query data.",
608
+ "readWriteDescription": "When on, this node can query, insert, update, or delete data.",
609
+ "parameters": "Parameter values",
610
+ "parameter": "Parameter",
611
+ "value": "Value",
612
+ "parametersHint": "Values are used by $1, $2, and so on in order.",
613
+ "addParameter": "Add parameter value",
591
614
  "timeout": "Timeout",
592
615
  "seconds": "seconds"
593
616
  },
@@ -999,6 +1022,7 @@
999
1022
  "total": "Total",
1000
1023
  "last24h": "24H",
1001
1024
  "running": "Running",
1025
+ "waitingRetry": "Waiting to retry",
1002
1026
  "pending": "Pending",
1003
1027
  "average24h": "Avg (24H)",
1004
1028
  "averageTotal": "Avg (Total)"
@@ -1030,6 +1054,7 @@
1030
1054
  "pending": "Pending",
1031
1055
  "completed": "Completed",
1032
1056
  "running": "Running",
1057
+ "waitingRetry": "Waiting to retry",
1033
1058
  "failed": "Failed",
1034
1059
  "cancelled": "Cancelled",
1035
1060
  "publishedStatus": "Published",
@@ -1071,6 +1096,7 @@
1071
1096
  "statuses": {
1072
1097
  "pending": "Pending",
1073
1098
  "running": "Running",
1099
+ "waiting_retry": "Waiting to retry",
1074
1100
  "completed": "Completed",
1075
1101
  "failed": "Failed",
1076
1102
  "cancelled": "Cancelled"
@@ -1093,15 +1119,11 @@
1093
1119
  "retryAllStarted": "The full Workflow retry has started",
1094
1120
  "retryFromNode": "Retry from here",
1095
1121
  "retryFromNodeConfirm": "Run again from “{{name}}”?",
1096
- "retryFromNodeDescription": "Successful earlier results will be reused and the failed run will be kept.",
1097
- "retryFromNodeStarted": "Retry started from the failed node",
1122
+ "retryFromNodeDescription": "The same run will retry this failed node, then continue with the remaining nodes.",
1123
+ "retryFromNodeStarted": "The failed node is retrying in the same run",
1098
1124
  "retryFromNodeFailed": "Unable to retry from this node",
1099
1125
  "viewRetryAttempt": "View retry #{{id}}",
1100
- "retrySource": "Resumed from",
1101
- "reusedResults": "Earlier results",
1102
- "reusedResultsCount": "Reused results from {{count}} successful nodes",
1103
- "reusedResult": "Reused earlier result",
1104
- "reusedResultDescription": "This node succeeded earlier, so its result was reused for this run."
1126
+ "retrySource": "Resumed from"
1105
1127
  },
1106
1128
  "nodeTypeBadge": "{{type}} node",
1107
1129
  "nodeCategories": {
@@ -257,6 +257,15 @@
257
257
  "runOnceEach": "对每一项分别运行",
258
258
  "timeoutMilliseconds": "超时时间(毫秒)"
259
259
  },
260
+ "settings": {
261
+ "title": "功能设置",
262
+ "subtitle": "统一管理 Workflow 运行依赖的服务注册、连接、业务事件与人员数据。",
263
+ "tabTenant": "服务注册",
264
+ "tabConnections": "连接管理",
265
+ "tabEvents": "业务事件",
266
+ "tabPeople": "人员目录",
267
+ "tabGroups": "人员组"
268
+ },
260
269
  "connection": {
261
270
  "title": "连接管理",
262
271
  "subtitle": "集中管理外部系统地址和加密凭据,供 Workflow 节点复用。",
@@ -581,6 +590,9 @@
581
590
  }
582
591
  },
583
592
  "database": {
593
+ "mode": "执行方式",
594
+ "functionMode": "数据库 Function",
595
+ "sqlMode": "Raw SQL",
584
596
  "function": "数据库 Function",
585
597
  "functionHint": "只显示当前 GAdmin 数据库 workflow_api 中的 Function。",
586
598
  "selectFunction": "选择 Function",
@@ -588,6 +600,17 @@
588
600
  "functionMissing": "当前 Function 已不存在,请重新选择。",
589
601
  "returnType": "返回类型:{{type}}",
590
602
  "noArguments": "这个 Function 不需要参数。",
603
+ "sql": "SQL 语句",
604
+ "readOnly": "只读 SQL",
605
+ "writeEnabled": "允许写入",
606
+ "allowWrite": "允许写入",
607
+ "readOnlyDescription": "关闭时只能查询数据。",
608
+ "readWriteDescription": "开启后可以查询、新增、更新或删除数据。",
609
+ "parameters": "参数值",
610
+ "parameter": "参数",
611
+ "value": "值",
612
+ "parametersHint": "SQL 中的 $1、$2… 会依次使用这里的值。",
613
+ "addParameter": "添加参数值",
591
614
  "timeout": "超时时间",
592
615
  "seconds": "秒"
593
616
  },
@@ -999,6 +1022,7 @@
999
1022
  "total": "总计",
1000
1023
  "last24h": "24 小时",
1001
1024
  "running": "运行中",
1025
+ "waitingRetry": "等待重试",
1002
1026
  "pending": "等待中",
1003
1027
  "average24h": "平均耗时(24 小时)",
1004
1028
  "averageTotal": "平均耗时(全部)"
@@ -1030,6 +1054,7 @@
1030
1054
  "pending": "等待中",
1031
1055
  "completed": "已完成",
1032
1056
  "running": "运行中",
1057
+ "waitingRetry": "等待重试",
1033
1058
  "failed": "失败",
1034
1059
  "cancelled": "已取消",
1035
1060
  "publishedStatus": "已发布",
@@ -1071,6 +1096,7 @@
1071
1096
  "statuses": {
1072
1097
  "pending": "等待中",
1073
1098
  "running": "运行中",
1099
+ "waiting_retry": "等待重试",
1074
1100
  "completed": "已完成",
1075
1101
  "failed": "失败",
1076
1102
  "cancelled": "已取消"
@@ -1093,15 +1119,11 @@
1093
1119
  "retryAllStarted": "已开始重新运行整个流程",
1094
1120
  "retryFromNode": "从这里重试",
1095
1121
  "retryFromNodeConfirm": "从“{{name}}”重新执行吗?",
1096
- "retryFromNodeDescription": "将复用此前成功节点的结果,原失败记录会保留。",
1097
- "retryFromNodeStarted": "已从失败节点开始重试",
1122
+ "retryFromNodeDescription": "将在当前运行中重试这个失败节点,成功后继续执行后续节点。",
1123
+ "retryFromNodeStarted": "已在当前运行中重试失败节点",
1098
1124
  "retryFromNodeFailed": "无法从该节点重试",
1099
1125
  "viewRetryAttempt": "查看重试 #{{id}}",
1100
- "retrySource": "恢复来源",
1101
- "reusedResults": "前序结果",
1102
- "reusedResultsCount": "已复用 {{count}} 个成功节点的结果",
1103
- "reusedResult": "复用前序结果",
1104
- "reusedResultDescription": "这个节点此前已成功,本次直接复用其结果。"
1126
+ "retrySource": "恢复来源"
1105
1127
  },
1106
1128
  "nodeTypeBadge": "{{type}}节点",
1107
1129
  "nodeCategories": {