@nocobase/cli 2.1.0-beta.9 → 2.1.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/bin/run.cmd +3 -0
  2. package/bin/run.js +145 -0
  3. package/bin/session-env.js +39 -0
  4. package/dist/commands/api/resource/create.js +15 -0
  5. package/dist/commands/api/resource/destroy.js +15 -0
  6. package/dist/commands/api/resource/get.js +15 -0
  7. package/dist/commands/api/resource/index.js +20 -0
  8. package/dist/commands/api/resource/list.js +16 -0
  9. package/dist/commands/api/resource/query.js +15 -0
  10. package/dist/commands/api/resource/update.js +15 -0
  11. package/dist/commands/app/autostart/disable.js +55 -0
  12. package/dist/commands/app/autostart/enable.js +55 -0
  13. package/dist/commands/app/autostart/list.js +37 -0
  14. package/dist/commands/app/autostart/run.js +84 -0
  15. package/dist/commands/app/autostart/shared.js +49 -0
  16. package/dist/commands/app/destroy.js +234 -0
  17. package/dist/commands/app/down.js +71 -0
  18. package/dist/commands/app/logs.js +115 -0
  19. package/dist/commands/app/restart.js +229 -0
  20. package/dist/commands/app/shared.js +123 -0
  21. package/dist/commands/app/start.js +416 -0
  22. package/dist/commands/app/stop.js +183 -0
  23. package/dist/commands/app/upgrade.js +523 -0
  24. package/dist/commands/backup/create.js +147 -0
  25. package/dist/commands/backup/index.js +20 -0
  26. package/dist/commands/backup/restore.js +105 -0
  27. package/{src/cli.js → dist/commands/build.js} +4 -11
  28. package/dist/commands/config/delete.js +42 -0
  29. package/dist/commands/config/get.js +39 -0
  30. package/dist/commands/config/index.js +20 -0
  31. package/dist/commands/config/list.js +29 -0
  32. package/dist/commands/config/set.js +49 -0
  33. package/dist/commands/db/check.js +240 -0
  34. package/dist/commands/db/logs.js +85 -0
  35. package/dist/commands/db/ps.js +47 -0
  36. package/dist/commands/db/shared.js +96 -0
  37. package/dist/commands/db/start.js +86 -0
  38. package/dist/commands/db/stop.js +71 -0
  39. package/{templates/plugin/src/client/models/index.ts → dist/commands/dev.js} +4 -4
  40. package/{src/commands/locale/react-js-cron/index.js → dist/commands/down.js} +3 -8
  41. package/dist/commands/download.js +13 -0
  42. package/dist/commands/env/add.js +406 -0
  43. package/dist/commands/env/auth.js +189 -0
  44. package/dist/commands/env/current.js +21 -0
  45. package/dist/commands/env/info.js +202 -0
  46. package/dist/commands/env/list.js +43 -0
  47. package/dist/commands/env/remove.js +174 -0
  48. package/dist/commands/env/shared.js +204 -0
  49. package/dist/commands/env/status.js +93 -0
  50. package/dist/commands/env/update.js +448 -0
  51. package/dist/commands/env/use.js +38 -0
  52. package/dist/commands/examples/prompts-stages.js +150 -0
  53. package/dist/commands/examples/prompts-test.js +181 -0
  54. package/dist/commands/init.js +1390 -0
  55. package/dist/commands/install.js +2609 -0
  56. package/dist/commands/license/activate.js +179 -0
  57. package/dist/commands/license/env.js +94 -0
  58. package/dist/commands/license/generate-id.js +108 -0
  59. package/dist/commands/license/id.js +70 -0
  60. package/dist/commands/license/index.js +20 -0
  61. package/dist/commands/license/plugins/clean.js +115 -0
  62. package/dist/commands/license/plugins/index.js +20 -0
  63. package/dist/commands/license/plugins/list.js +64 -0
  64. package/dist/commands/license/plugins/shared.js +382 -0
  65. package/dist/commands/license/plugins/sync.js +314 -0
  66. package/dist/commands/license/shared.js +423 -0
  67. package/dist/commands/license/status.js +64 -0
  68. package/dist/commands/logs.js +12 -0
  69. package/dist/commands/plugin/disable.js +86 -0
  70. package/dist/commands/plugin/enable.js +86 -0
  71. package/dist/commands/plugin/import.js +108 -0
  72. package/dist/commands/plugin/list.js +82 -0
  73. package/dist/commands/pm/disable.js +12 -0
  74. package/dist/commands/pm/enable.js +12 -0
  75. package/dist/commands/pm/list.js +12 -0
  76. package/dist/commands/proxy/caddy/current.js +17 -0
  77. package/dist/commands/proxy/caddy/generate.js +69 -0
  78. package/dist/commands/proxy/caddy/index.js +28 -0
  79. package/dist/commands/proxy/caddy/info.js +31 -0
  80. package/dist/commands/proxy/caddy/reload.js +30 -0
  81. package/dist/commands/proxy/caddy/restart.js +28 -0
  82. package/dist/commands/proxy/caddy/start.js +30 -0
  83. package/dist/commands/proxy/caddy/status.js +19 -0
  84. package/dist/commands/proxy/caddy/stop.js +30 -0
  85. package/dist/commands/proxy/caddy/use.js +26 -0
  86. package/dist/commands/proxy/index.js +28 -0
  87. package/dist/commands/proxy/nginx/current.js +18 -0
  88. package/dist/commands/proxy/nginx/generate.js +68 -0
  89. package/dist/commands/proxy/nginx/index.js +28 -0
  90. package/dist/commands/proxy/nginx/info.js +34 -0
  91. package/dist/commands/proxy/nginx/reload.js +30 -0
  92. package/dist/commands/proxy/nginx/restart.js +28 -0
  93. package/dist/commands/proxy/nginx/start.js +30 -0
  94. package/dist/commands/proxy/nginx/status.js +19 -0
  95. package/dist/commands/proxy/nginx/stop.js +30 -0
  96. package/dist/commands/proxy/nginx/use.js +31 -0
  97. package/dist/commands/restart.js +12 -0
  98. package/dist/commands/revision/create.js +118 -0
  99. package/dist/commands/scaffold/migration.js +38 -0
  100. package/dist/commands/scaffold/plugin.js +37 -0
  101. package/dist/commands/self/check.js +71 -0
  102. package/dist/commands/self/index.js +20 -0
  103. package/dist/commands/self/update.js +152 -0
  104. package/dist/commands/session/id.js +24 -0
  105. package/dist/commands/session/remove.js +57 -0
  106. package/dist/commands/session/setup.js +62 -0
  107. package/dist/commands/skills/check.js +69 -0
  108. package/dist/commands/skills/index.js +20 -0
  109. package/dist/commands/skills/install.js +80 -0
  110. package/dist/commands/skills/remove.js +80 -0
  111. package/dist/commands/skills/update.js +87 -0
  112. package/dist/commands/source/build.js +58 -0
  113. package/dist/commands/source/dev.js +182 -0
  114. package/dist/commands/source/download.js +883 -0
  115. package/dist/commands/source/publish.js +109 -0
  116. package/dist/commands/source/registry/logs.js +70 -0
  117. package/dist/commands/source/registry/start.js +57 -0
  118. package/dist/commands/source/registry/status.js +33 -0
  119. package/dist/commands/source/registry/stop.js +48 -0
  120. package/dist/commands/source/test.js +476 -0
  121. package/dist/commands/start.js +12 -0
  122. package/dist/commands/stop.js +12 -0
  123. package/dist/commands/test.js +12 -0
  124. package/dist/commands/upgrade.js +12 -0
  125. package/dist/commands/v1.js +210 -0
  126. package/dist/generated/command-registry.js +134 -0
  127. package/dist/help/runtime-help.js +23 -0
  128. package/dist/lib/api-client.js +335 -0
  129. package/dist/lib/api-command-compat.js +641 -0
  130. package/dist/lib/app-health.js +139 -0
  131. package/dist/lib/app-managed-resources.js +337 -0
  132. package/dist/lib/app-public-path.js +80 -0
  133. package/dist/lib/app-runtime.js +189 -0
  134. package/dist/lib/auth-store.js +528 -0
  135. package/dist/lib/backup.js +171 -0
  136. package/dist/lib/bootstrap.js +409 -0
  137. package/dist/lib/build-config.js +18 -0
  138. package/dist/lib/builtin-db.js +86 -0
  139. package/dist/lib/cli-config.js +569 -0
  140. package/dist/lib/cli-entry-error.js +52 -0
  141. package/dist/lib/cli-home.js +47 -0
  142. package/dist/lib/cli-locale.js +141 -0
  143. package/dist/lib/command-discovery.js +39 -0
  144. package/dist/lib/command-log.js +284 -0
  145. package/dist/lib/db-connection-check.js +219 -0
  146. package/dist/lib/docker-env-file.js +60 -0
  147. package/dist/lib/docker-image.js +37 -0
  148. package/dist/lib/docker-log-stream.js +45 -0
  149. package/dist/lib/env-auth.js +963 -0
  150. package/dist/lib/env-command-config.js +45 -0
  151. package/dist/lib/env-config.js +108 -0
  152. package/dist/lib/env-guard.js +61 -0
  153. package/dist/lib/env-paths.js +101 -0
  154. package/dist/lib/env-proxy.js +1325 -0
  155. package/dist/lib/generated-command.js +203 -0
  156. package/dist/lib/http-request.js +49 -0
  157. package/dist/lib/inquirer-theme.js +17 -0
  158. package/dist/lib/inquirer.js +243 -0
  159. package/dist/lib/managed-env-file.js +101 -0
  160. package/dist/lib/managed-init-env.js +32 -0
  161. package/dist/lib/naming.js +70 -0
  162. package/dist/lib/object-utils.js +76 -0
  163. package/dist/lib/openapi.js +62 -0
  164. package/dist/lib/plugin-import.js +279 -0
  165. package/dist/lib/plugin-storage.js +64 -0
  166. package/dist/lib/post-processors.js +23 -0
  167. package/dist/lib/prompt-catalog-core.js +186 -0
  168. package/dist/lib/prompt-catalog-terminal.js +374 -0
  169. package/{src/index.js → dist/lib/prompt-catalog.js} +2 -6
  170. package/dist/lib/prompt-validators.js +278 -0
  171. package/dist/lib/prompt-web-ui.js +2234 -0
  172. package/dist/lib/proxy-caddy.js +274 -0
  173. package/dist/lib/proxy-nginx.js +330 -0
  174. package/dist/lib/resource-command.js +357 -0
  175. package/dist/lib/resource-request.js +104 -0
  176. package/dist/lib/run-npm.js +429 -0
  177. package/dist/lib/runtime-env-vars.js +32 -0
  178. package/dist/lib/runtime-generator.js +498 -0
  179. package/dist/lib/runtime-store.js +56 -0
  180. package/dist/lib/self-manager.js +301 -0
  181. package/dist/lib/session-id.js +17 -0
  182. package/dist/lib/session-integration.js +703 -0
  183. package/dist/lib/session-store.js +118 -0
  184. package/dist/lib/skills-manager.js +438 -0
  185. package/dist/lib/source-publish.js +326 -0
  186. package/dist/lib/source-registry.js +188 -0
  187. package/dist/lib/startup-update.js +309 -0
  188. package/dist/lib/ui.js +159 -0
  189. package/dist/locale/en-US.json +526 -0
  190. package/dist/locale/zh-CN.json +526 -0
  191. package/dist/post-processors/data-modeling.js +84 -0
  192. package/dist/post-processors/data-source-manager.js +138 -0
  193. package/dist/post-processors/index.js +19 -0
  194. package/nocobase-ctl.config.json +388 -0
  195. package/package.json +133 -25
  196. package/bin/index.js +0 -39
  197. package/nocobase.conf.tpl +0 -95
  198. package/src/commands/benchmark.js +0 -73
  199. package/src/commands/build.js +0 -49
  200. package/src/commands/clean.js +0 -30
  201. package/src/commands/client.js +0 -166
  202. package/src/commands/create-nginx-conf.js +0 -37
  203. package/src/commands/create-plugin.js +0 -33
  204. package/src/commands/dev.js +0 -200
  205. package/src/commands/doc.js +0 -76
  206. package/src/commands/e2e.js +0 -265
  207. package/src/commands/global.js +0 -43
  208. package/src/commands/index.js +0 -45
  209. package/src/commands/instance-id.js +0 -47
  210. package/src/commands/locale/cronstrue.js +0 -122
  211. package/src/commands/locale/react-js-cron/en-US.json +0 -75
  212. package/src/commands/locale/react-js-cron/zh-CN.json +0 -33
  213. package/src/commands/locale/react-js-cron/zh-TW.json +0 -33
  214. package/src/commands/locale.js +0 -81
  215. package/src/commands/p-test.js +0 -88
  216. package/src/commands/perf.js +0 -63
  217. package/src/commands/pkg.js +0 -321
  218. package/src/commands/pm2.js +0 -37
  219. package/src/commands/postinstall.js +0 -88
  220. package/src/commands/start.js +0 -148
  221. package/src/commands/tar.js +0 -36
  222. package/src/commands/test-coverage.js +0 -55
  223. package/src/commands/test.js +0 -107
  224. package/src/commands/umi.js +0 -33
  225. package/src/commands/update-deps.js +0 -72
  226. package/src/commands/upgrade.js +0 -47
  227. package/src/commands/view-license-key.js +0 -44
  228. package/src/license.js +0 -76
  229. package/src/logger.js +0 -75
  230. package/src/plugin-generator.js +0 -80
  231. package/src/util.js +0 -517
  232. package/templates/bundle-status.html +0 -338
  233. package/templates/create-app-package.json +0 -39
  234. package/templates/plugin/.npmignore.tpl +0 -2
  235. package/templates/plugin/README.md.tpl +0 -1
  236. package/templates/plugin/client.d.ts +0 -2
  237. package/templates/plugin/client.js +0 -1
  238. package/templates/plugin/package.json.tpl +0 -11
  239. package/templates/plugin/server.d.ts +0 -2
  240. package/templates/plugin/server.js +0 -1
  241. package/templates/plugin/src/client/client.d.ts +0 -249
  242. package/templates/plugin/src/client/index.tsx.tpl +0 -1
  243. package/templates/plugin/src/client/locale.ts +0 -21
  244. package/templates/plugin/src/client/plugin.tsx.tpl +0 -10
  245. package/templates/plugin/src/index.ts +0 -2
  246. package/templates/plugin/src/locale/en-US.json +0 -1
  247. package/templates/plugin/src/locale/zh-CN.json +0 -1
  248. package/templates/plugin/src/server/collections/.gitkeep +0 -0
  249. package/templates/plugin/src/server/index.ts.tpl +0 -1
  250. package/templates/plugin/src/server/plugin.ts.tpl +0 -19
@@ -0,0 +1,138 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { postProcessorRegistry } from '../lib/post-processors.js';
10
+ function toArray(value) {
11
+ if (Array.isArray(value)) {
12
+ return value;
13
+ }
14
+ if (Array.isArray(value?.data)) {
15
+ return value.data;
16
+ }
17
+ return [];
18
+ }
19
+ function parseAssociatedIndex(value) {
20
+ if (typeof value !== 'string') {
21
+ return {};
22
+ }
23
+ const separatorIndex = value.indexOf('.');
24
+ if (separatorIndex === -1) {
25
+ return {};
26
+ }
27
+ return {
28
+ dataSourceKey: value.slice(0, separatorIndex),
29
+ collectionName: value.slice(separatorIndex + 1),
30
+ };
31
+ }
32
+ function pickCollectionSummary(item) {
33
+ return {
34
+ name: item?.name,
35
+ title: item?.title ?? item?.options?.title ?? item?.displayName,
36
+ description: item?.description ?? item?.options?.description,
37
+ dataSourceKey: item?.dataSourceKey,
38
+ };
39
+ }
40
+ function pickFieldSummary(item) {
41
+ return {
42
+ name: item?.name,
43
+ type: item?.type,
44
+ interface: item?.interface,
45
+ title: item?.uiSchema?.title,
46
+ description: item?.description,
47
+ dataSourceKey: item?.dataSourceKey,
48
+ collectionName: item?.collectionName,
49
+ target: item?.target,
50
+ foreignKey: item?.foreignKey,
51
+ sourceKey: item?.sourceKey,
52
+ targetKey: item?.targetKey,
53
+ through: item?.through,
54
+ otherKey: item?.otherKey,
55
+ };
56
+ }
57
+ function pickRemoteFieldSummary(item, defaults) {
58
+ return {
59
+ name: item?.name,
60
+ type: item?.type,
61
+ interface: item?.interface,
62
+ title: item?.uiSchema?.title,
63
+ description: item?.description,
64
+ dataSourceKey: item?.dataSourceKey,
65
+ collectionName: item?.collectionName,
66
+ target: item?.target,
67
+ foreignKey: item?.foreignKey,
68
+ sourceKey: item?.sourceKey,
69
+ targetKey: item?.targetKey,
70
+ through: item?.through,
71
+ otherKey: item?.otherKey,
72
+ ...defaults,
73
+ };
74
+ }
75
+ function pickDataSourceSummary(item) {
76
+ const summary = {
77
+ displayName: item?.displayName,
78
+ key: item?.key,
79
+ type: item?.type,
80
+ status: item?.status,
81
+ };
82
+ if (Array.isArray(item?.collections)) {
83
+ summary.collections = item.collections.map((collection) => {
84
+ const nextCollection = pickCollectionSummary({
85
+ ...collection,
86
+ dataSourceKey: collection?.dataSourceKey ?? item?.key,
87
+ });
88
+ if (Array.isArray(collection?.fields)) {
89
+ nextCollection.fields = collection.fields.map((field) => pickRemoteFieldSummary(field, {
90
+ dataSourceKey: collection?.dataSourceKey ?? item?.key,
91
+ collectionName: collection?.name,
92
+ }));
93
+ }
94
+ return nextCollection;
95
+ });
96
+ }
97
+ return summary;
98
+ }
99
+ export function simplifyDataSourceListResult(result) {
100
+ const items = toArray(result);
101
+ return {
102
+ data: items.map((item) => pickDataSourceSummary(item)),
103
+ meta: result?.meta,
104
+ };
105
+ }
106
+ export function simplifyDataSourceCollectionsListResult(result) {
107
+ const items = toArray(result);
108
+ return {
109
+ data: items.map((item) => pickCollectionSummary(item)),
110
+ meta: result?.meta,
111
+ };
112
+ }
113
+ export function simplifyDataSourceFieldsListResult(result, options) {
114
+ const items = toArray(result);
115
+ const defaults = parseAssociatedIndex(options?.flags?.['associated-index']);
116
+ return {
117
+ data: items.map((item) => item?.dataSourceKey || item?.collectionName ? pickFieldSummary(item) : pickRemoteFieldSummary(item, defaults)),
118
+ meta: result?.meta,
119
+ };
120
+ }
121
+ function unwrapActionData(result) {
122
+ return result?.data?.data !== undefined ? result.data : result;
123
+ }
124
+ export function registerDataSourceManagerPostProcessors() {
125
+ postProcessorRegistry.register('data-sources', 'list', simplifyDataSourceListResult);
126
+ postProcessorRegistry.register('data-sources', 'list-enabled', simplifyDataSourceListResult);
127
+ postProcessorRegistry.register('data-sources.collections', 'list', simplifyDataSourceCollectionsListResult);
128
+ postProcessorRegistry.register('data-sources-collections.fields', 'list', (result, context) => simplifyDataSourceFieldsListResult(result, {
129
+ flags: context.flags,
130
+ }));
131
+ postProcessorRegistry.register('data-sources-collections.fields', 'apply', (result, context) => {
132
+ const payload = unwrapActionData(result);
133
+ const defaults = parseAssociatedIndex(context.flags?.['associated-index']);
134
+ return {
135
+ data: pickRemoteFieldSummary(payload?.data || {}, defaults),
136
+ };
137
+ });
138
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { registerDataModelingPostProcessors } from './data-modeling.js';
10
+ import { registerDataSourceManagerPostProcessors } from './data-source-manager.js';
11
+ let initialized = false;
12
+ export function registerPostProcessors() {
13
+ if (initialized) {
14
+ return;
15
+ }
16
+ registerDataModelingPostProcessors();
17
+ registerDataSourceManagerPostProcessors();
18
+ initialized = true;
19
+ }
@@ -0,0 +1,388 @@
1
+ {
2
+ "moduleGroups": [
3
+ {
4
+ "match": ["workflow*", "@nocobase/plugin-workflow*"],
5
+ "module": "workflow"
6
+ },
7
+ {
8
+ "match": ["@nocobase/plugin-data-source-main", "@nocobase/plugin-data-source-manager"],
9
+ "module": "data-modeling"
10
+ }
11
+ ],
12
+ "modules": {
13
+ "core": {
14
+ "name": "core",
15
+ "description": "NocoBase core resource APIs.",
16
+ "include": true,
17
+ "resources": {
18
+ "includes": ["app", "pm"],
19
+ "excludes": [],
20
+ "overrides": {
21
+ "app": {
22
+ "name": "app",
23
+ "description": "Application management commands.",
24
+ "topLevel": true
25
+ },
26
+ "pm": {
27
+ "name": "pm",
28
+ "description": "Plugin manager commands.",
29
+ "topLevel": true
30
+ }
31
+ }
32
+ }
33
+ },
34
+ "acl": {
35
+ "name": "acl",
36
+ "description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
37
+ "include": true,
38
+ "resources": {
39
+ "includes": ["availableActions", "dataSources", "roles", "rolesResourcesScopes", "desktopRoutes"],
40
+ "excludes": [],
41
+ "overrides": {
42
+ "availableActions": {
43
+ "name": "available-actions",
44
+ "description": "List and inspect configurable ACL actions.",
45
+ "topLevel": false
46
+ },
47
+ "dataSources": {
48
+ "name": "data-sources",
49
+ "description": "Manage ACL strategies for data sources.",
50
+ "topLevel": false
51
+ },
52
+ "roles": {
53
+ "name": "roles",
54
+ "description": "Manage roles and role-level ACL settings.",
55
+ "topLevel": false
56
+ },
57
+ "rolesResourcesScopes": {
58
+ "name": "roles-resources-scopes",
59
+ "description": "Manage role resource scopes and permissions.",
60
+ "topLevel": false
61
+ },
62
+ "desktopRoutes": {
63
+ "name": "desktop-routes",
64
+ "description": "Manage desktop route permissions and visibility.",
65
+ "topLevel": false,
66
+ "operations": {
67
+ "includes": ["desktopRoutes:listAccessible"]
68
+ }
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "api-keys": {
74
+ "name": "api-keys",
75
+ "description": "Allow users to access the HTTP API with API keys.",
76
+ "include": true,
77
+ "resources": {
78
+ "includes": ["apiKeys"],
79
+ "excludes": [],
80
+ "overrides": {
81
+ "apiKeys": {
82
+ "name": "api-keys",
83
+ "description": "Manage API keys.",
84
+ "topLevel": false
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "auth": {
90
+ "name": "authenticators",
91
+ "description": "User authentication management, including password auth, SMS auth, SSO protocols, and extensible providers.",
92
+ "include": true,
93
+ "resources": {
94
+ "includes": ["authenticators"],
95
+ "excludes": [],
96
+ "overrides": {
97
+ "auth": {
98
+ "name": "auth",
99
+ "description": "Authenticate users and manage auth sessions.",
100
+ "topLevel": false
101
+ },
102
+ "authenticators": {
103
+ "name": "authenticators",
104
+ "description": "Manage authentication providers and authenticators.",
105
+ "topLevel": false
106
+ }
107
+ }
108
+ }
109
+ },
110
+ "client": {
111
+ "name": "client",
112
+ "description": "Provide the web client interface for the NocoBase server.",
113
+ "include": true,
114
+ "resources": {
115
+ "includes": ["desktopRoutes"],
116
+ "excludes": [],
117
+ "overrides": {
118
+ "desktopRoutes": {
119
+ "name": "desktop-routes",
120
+ "description": "Manage desktop route permissions and visibility.",
121
+ "topLevel": true,
122
+ "operations": {
123
+ "excludes": ["desktopRoutes:listAccessible"]
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "data-modeling": {
130
+ "name": "data-modeling",
131
+ "description": "Manage data sources, collections, and database modeling resources.",
132
+ "include": true,
133
+ "resources": {
134
+ "includes": ["collections", "fields", "dataSources", "dataSourcesCollections", "dbViews"],
135
+ "excludes": [],
136
+ "overrides": {
137
+ "collections": {
138
+ "name": "collections",
139
+ "description": "Manage collections and collection metadata.",
140
+ "topLevel": false,
141
+ "operations": {
142
+ "includes": [
143
+ "apply",
144
+ "collections:list",
145
+ "collections:get",
146
+ "collections:destroy",
147
+ "collections/{collectionName}/fields:list"
148
+ ]
149
+ }
150
+ },
151
+ "fields": {
152
+ "name": "fields",
153
+ "description": "Manage fields with the compact high-level modeling interface.",
154
+ "topLevel": false,
155
+ "operations": {
156
+ "includes": ["apply"]
157
+ }
158
+ },
159
+ "dataSources": {
160
+ "name": "data-sources",
161
+ "description": "Inspect external data sources and their loaded collection metadata.",
162
+ "topLevel": false,
163
+ "operations": {
164
+ "includes": ["dataSources:listEnabled", "dataSources/{associatedIndex}/collections:list"]
165
+ }
166
+ },
167
+ "dataSourcesCollections": {
168
+ "name": "data-sources-collections",
169
+ "description": "Manage external data source collection field metadata.",
170
+ "topLevel": false,
171
+ "operations": {
172
+ "includes": [
173
+ "dataSourcesCollections/{associatedIndex}/fields:list",
174
+ "dataSourcesCollections/{associatedIndex}/fields:apply"
175
+ ]
176
+ }
177
+ },
178
+ "dbViews": {
179
+ "name": "db-views",
180
+ "description": "Inspect and query database views.",
181
+ "topLevel": false,
182
+ "operations": {
183
+ "includes": ["dbViews:list", "dbViews:get"]
184
+ }
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "file-manager": {
190
+ "name": "file-manager",
191
+ "description": "Provide file storage services, file collections, and attachment fields.",
192
+ "include": true,
193
+ "resources": {
194
+ "includes": ["storages"],
195
+ "excludes": [],
196
+ "overrides": {
197
+ "storages": {
198
+ "name": "storages",
199
+ "description": "Manage storage backends and file storage settings.",
200
+ "topLevel": false
201
+ }
202
+ }
203
+ }
204
+ },
205
+ "flow-engine": {
206
+ "name": "flow-engine",
207
+ "description": "Manage flow surface composition, configuration, layout, and mutation APIs.",
208
+ "include": true,
209
+ "resources": {
210
+ "includes": ["flowSurfaces"],
211
+ "excludes": [],
212
+ "overrides": {
213
+ "flowSurfaces": {
214
+ "name": "flow-surfaces",
215
+ "description": "Compose and mutate page, tab, block, field, and action surfaces.",
216
+ "topLevel": true
217
+ }
218
+ }
219
+ }
220
+ },
221
+ "map": {
222
+ "name": "map",
223
+ "description": "Map blocks with support for AMap, Google Maps, and extensible providers.",
224
+ "include": true,
225
+ "resources": {
226
+ "includes": ["map-configuration"],
227
+ "excludes": [],
228
+ "overrides": {
229
+ "map-configuration": {
230
+ "name": "map-configuration",
231
+ "description": "Manage map provider configuration.",
232
+ "topLevel": false
233
+ }
234
+ }
235
+ }
236
+ },
237
+ "backup": {
238
+ "name": "backup",
239
+ "description": "Create, inspect, download, remove, and restore NocoBase backups.",
240
+ "include": true,
241
+ "resources": {
242
+ "includes": ["backup"],
243
+ "excludes": [],
244
+ "overrides": {
245
+ "backup": {
246
+ "name": "backup",
247
+ "description": "Manage backup and restore files.",
248
+ "topLevel": true,
249
+ "operations": {
250
+ "includes": [
251
+ "backup:list",
252
+ "backup:create",
253
+ "backup:status",
254
+ "backup:download",
255
+ "backup:remove",
256
+ "backup:restore",
257
+ "backup:restoreUpload",
258
+ "backup:restoreStatus"
259
+ ]
260
+ }
261
+ }
262
+ }
263
+ }
264
+ },
265
+ "migration": {
266
+ "name": "migration",
267
+ "description": "Create, check, execute, and inspect migration packages.",
268
+ "include": true,
269
+ "resources": {
270
+ "includes": ["migration", "migrationLog", "migrationRule", "migrationRules"],
271
+ "excludes": [],
272
+ "overrides": {
273
+ "migration": {
274
+ "name": "migration",
275
+ "description": "Manage migration files and executions.",
276
+ "topLevel": true,
277
+ "operations": {
278
+ "includes": [
279
+ "migration:list",
280
+ "migration:get",
281
+ "migration:create",
282
+ "migration:download",
283
+ "migration:remove",
284
+ "migration:check",
285
+ "migration:execute"
286
+ ]
287
+ }
288
+ },
289
+ "migrationRule": {
290
+ "name": "migration rules",
291
+ "segments": ["migration", "rules"],
292
+ "description": "Create migration rules with global user/system policies.",
293
+ "topLevel": true,
294
+ "operations": {
295
+ "includes": ["migrationRule:create"]
296
+ }
297
+ },
298
+ "migrationRules": {
299
+ "name": "migration rules",
300
+ "segments": ["migration", "rules"],
301
+ "description": "List and inspect migration rules.",
302
+ "topLevel": true,
303
+ "operations": {
304
+ "includes": ["migrationRules:list", "migrationRules:get"]
305
+ }
306
+ },
307
+ "migrationLog": {
308
+ "name": "migration logs",
309
+ "segments": ["migration", "logs"],
310
+ "description": "List, inspect, and download migration logs.",
311
+ "topLevel": true,
312
+ "operations": {
313
+ "includes": ["migrationLog:list", "migrationLog:get", "migrationLog:download"]
314
+ }
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "system-settings": {
320
+ "name": "system-settings",
321
+ "description": "Adjust system title, logo, language, and other global settings.",
322
+ "include": true,
323
+ "resources": {
324
+ "includes": ["systemSettings"],
325
+ "excludes": [],
326
+ "overrides": {
327
+ "systemSettings": {
328
+ "name": "system-settings",
329
+ "description": "Manage global system settings.",
330
+ "topLevel": false
331
+ }
332
+ }
333
+ }
334
+ },
335
+ "theme-editor": {
336
+ "name": "theme-editor",
337
+ "description": "Customize UI colors and dimensions, save themes, and switch between them.",
338
+ "include": true,
339
+ "resources": {
340
+ "includes": ["themeConfig"],
341
+ "excludes": [],
342
+ "overrides": {
343
+ "themeConfig": {
344
+ "name": "theme-config",
345
+ "description": "Manage theme configuration.",
346
+ "topLevel": false
347
+ }
348
+ }
349
+ }
350
+ },
351
+ "workflow": {
352
+ "name": "workflow",
353
+ "description": "A powerful BPM tool that provides the foundation for business automation and extensible triggers and nodes.",
354
+ "include": true,
355
+ "resources": {
356
+ "includes": ["executions", "flow_nodes", "jobs", "userWorkflowTasks", "workflows"],
357
+ "excludes": [],
358
+ "overrides": {
359
+ "executions": {
360
+ "name": "executions",
361
+ "description": "Manage workflow execution records.",
362
+ "topLevel": false
363
+ },
364
+ "flow_nodes": {
365
+ "name": "flow-nodes",
366
+ "description": "Manage workflow nodes.",
367
+ "topLevel": false
368
+ },
369
+ "jobs": {
370
+ "name": "jobs",
371
+ "description": "Manage workflow jobs.",
372
+ "topLevel": false
373
+ },
374
+ "userWorkflowTasks": {
375
+ "name": "user-workflow-tasks",
376
+ "description": "Query current user workflow tasks.",
377
+ "topLevel": false
378
+ },
379
+ "workflows": {
380
+ "name": "workflows",
381
+ "description": "Manage workflows and workflow revisions.",
382
+ "topLevel": false
383
+ }
384
+ }
385
+ }
386
+ }
387
+ }
388
+ }