@nocobase/cli 2.1.0-beta.2 → 2.1.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +107 -0
- package/README.md +367 -19
- package/README.zh-CN.md +336 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +131 -0
- package/dist/commands/api/resource/create.js +15 -0
- package/dist/commands/api/resource/destroy.js +15 -0
- package/dist/commands/api/resource/get.js +15 -0
- package/dist/commands/api/resource/index.js +20 -0
- package/dist/commands/api/resource/list.js +16 -0
- package/dist/commands/api/resource/query.js +15 -0
- package/dist/commands/api/resource/update.js +15 -0
- package/dist/commands/build.js +57 -0
- package/dist/commands/db/logs.js +85 -0
- package/dist/commands/db/ps.js +60 -0
- package/dist/commands/db/shared.js +95 -0
- package/dist/commands/db/start.js +70 -0
- package/dist/commands/db/stop.js +70 -0
- package/dist/commands/dev.js +156 -0
- package/dist/commands/down.js +197 -0
- package/dist/commands/download.js +865 -0
- package/dist/commands/env/add.js +307 -0
- package/dist/commands/env/auth.js +55 -0
- package/dist/commands/env/list.js +36 -0
- package/dist/commands/env/remove.js +59 -0
- package/dist/commands/env/update.js +67 -0
- package/dist/commands/env/use.js +28 -0
- package/dist/commands/init.js +950 -0
- package/dist/commands/install.js +1927 -0
- package/dist/commands/logs.js +97 -0
- package/dist/commands/pm/disable.js +63 -0
- package/dist/commands/pm/enable.js +63 -0
- package/dist/commands/pm/list.js +61 -0
- package/dist/commands/prompts-stages.js +150 -0
- package/dist/commands/prompts-test.js +181 -0
- package/dist/commands/ps.js +119 -0
- package/dist/commands/restart.js +74 -0
- package/dist/commands/scaffold/migration.js +38 -0
- package/dist/commands/scaffold/plugin.js +37 -0
- package/dist/commands/self/check.js +71 -0
- package/dist/commands/self/index.js +20 -0
- package/dist/commands/self/update.js +86 -0
- package/dist/commands/skills/check.js +69 -0
- package/dist/commands/skills/index.js +20 -0
- package/dist/commands/skills/install.js +71 -0
- package/dist/commands/skills/update.js +71 -0
- package/dist/commands/start.js +218 -0
- package/dist/commands/stop.js +97 -0
- package/dist/commands/test.js +466 -0
- package/dist/commands/upgrade.js +594 -0
- package/dist/generated/command-registry.js +133 -0
- package/dist/help/runtime-help.js +20 -0
- package/dist/lib/api-client.js +244 -0
- package/dist/lib/app-runtime.js +153 -0
- package/dist/lib/auth-store.js +357 -0
- package/dist/lib/bootstrap.js +388 -0
- package/dist/lib/build-config.js +10 -0
- package/dist/lib/cli-home.js +61 -0
- package/dist/lib/cli-locale.js +115 -0
- package/dist/lib/command-discovery.js +39 -0
- package/dist/lib/env-auth.js +872 -0
- package/dist/lib/generated-command.js +150 -0
- package/dist/lib/http-request.js +49 -0
- package/dist/lib/naming.js +70 -0
- package/dist/lib/openapi.js +62 -0
- package/dist/lib/post-processors.js +23 -0
- package/dist/lib/prompt-catalog.js +581 -0
- package/dist/lib/prompt-validators.js +185 -0
- package/dist/lib/prompt-web-ui.js +2096 -0
- package/dist/lib/resource-command.js +343 -0
- package/dist/lib/resource-request.js +104 -0
- package/dist/lib/run-npm.js +197 -0
- package/dist/lib/runtime-generator.js +419 -0
- package/dist/lib/runtime-store.js +56 -0
- package/dist/lib/self-manager.js +246 -0
- package/dist/lib/skills-manager.js +269 -0
- package/dist/lib/startup-update.js +203 -0
- package/dist/lib/ui.js +175 -0
- package/dist/locale/en-US.json +336 -0
- package/dist/locale/zh-CN.json +336 -0
- package/dist/post-processors/data-modeling.js +66 -0
- package/dist/post-processors/data-source-manager.js +114 -0
- package/dist/post-processors/index.js +19 -0
- package/nocobase-ctl.config.json +287 -0
- package/package.json +60 -26
- package/LICENSE +0 -661
- package/bin/index.js +0 -39
- package/nocobase.conf.tpl +0 -95
- package/src/cli.js +0 -19
- package/src/commands/benchmark.js +0 -73
- package/src/commands/build.js +0 -49
- package/src/commands/clean.js +0 -30
- package/src/commands/client.js +0 -166
- package/src/commands/create-nginx-conf.js +0 -37
- package/src/commands/create-plugin.js +0 -33
- package/src/commands/dev.js +0 -200
- package/src/commands/doc.js +0 -76
- package/src/commands/e2e.js +0 -265
- package/src/commands/global.js +0 -43
- package/src/commands/index.js +0 -45
- package/src/commands/instance-id.js +0 -47
- package/src/commands/locale/cronstrue.js +0 -122
- package/src/commands/locale/react-js-cron/en-US.json +0 -75
- package/src/commands/locale/react-js-cron/index.js +0 -17
- package/src/commands/locale/react-js-cron/zh-CN.json +0 -33
- package/src/commands/locale/react-js-cron/zh-TW.json +0 -33
- package/src/commands/locale.js +0 -81
- package/src/commands/p-test.js +0 -88
- package/src/commands/perf.js +0 -63
- package/src/commands/pkg.js +0 -321
- package/src/commands/pm2.js +0 -37
- package/src/commands/postinstall.js +0 -88
- package/src/commands/start.js +0 -148
- package/src/commands/tar.js +0 -36
- package/src/commands/test-coverage.js +0 -55
- package/src/commands/test.js +0 -107
- package/src/commands/umi.js +0 -33
- package/src/commands/update-deps.js +0 -72
- package/src/commands/upgrade.js +0 -47
- package/src/commands/view-license-key.js +0 -44
- package/src/index.js +0 -14
- package/src/license.js +0 -76
- package/src/logger.js +0 -75
- package/src/plugin-generator.js +0 -80
- package/src/util.js +0 -517
- package/templates/bundle-status.html +0 -338
- package/templates/create-app-package.json +0 -39
- package/templates/plugin/.npmignore.tpl +0 -2
- package/templates/plugin/README.md.tpl +0 -1
- package/templates/plugin/client.d.ts +0 -2
- package/templates/plugin/client.js +0 -1
- package/templates/plugin/package.json.tpl +0 -11
- package/templates/plugin/server.d.ts +0 -2
- package/templates/plugin/server.js +0 -1
- package/templates/plugin/src/client/client.d.ts +0 -249
- package/templates/plugin/src/client/index.tsx.tpl +0 -1
- package/templates/plugin/src/client/locale.ts +0 -21
- package/templates/plugin/src/client/models/index.ts +0 -12
- package/templates/plugin/src/client/plugin.tsx.tpl +0 -10
- package/templates/plugin/src/index.ts +0 -2
- package/templates/plugin/src/locale/en-US.json +0 -1
- package/templates/plugin/src/locale/zh-CN.json +0 -1
- package/templates/plugin/src/server/collections/.gitkeep +0 -0
- package/templates/plugin/src/server/index.ts.tpl +0 -1
- package/templates/plugin/src/server/plugin.ts.tpl +0 -19
|
@@ -0,0 +1,66 @@
|
|
|
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 pickCollectionSummary(item) {
|
|
20
|
+
return {
|
|
21
|
+
key: item?.key,
|
|
22
|
+
name: item?.name,
|
|
23
|
+
title: item?.title,
|
|
24
|
+
description: item?.description,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function pickFieldSummary(item) {
|
|
28
|
+
return {
|
|
29
|
+
key: item?.key,
|
|
30
|
+
name: item?.name,
|
|
31
|
+
type: item?.type,
|
|
32
|
+
title: item?.uiSchema?.title,
|
|
33
|
+
description: item?.description,
|
|
34
|
+
collectionName: item?.collectionName,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function simplifyCollectionsListResult(result) {
|
|
38
|
+
const items = toArray(result);
|
|
39
|
+
return {
|
|
40
|
+
data: items.map((item) => pickCollectionSummary(item)),
|
|
41
|
+
meta: result?.meta,
|
|
42
|
+
nextActions: [
|
|
43
|
+
'Use collections:get with filterByTk=<collectionName> to inspect one collection in detail.',
|
|
44
|
+
'Use collections:apply with --verify when you need normalized verification in the same response.',
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function simplifyFieldsListResult(result) {
|
|
49
|
+
const items = toArray(result);
|
|
50
|
+
return {
|
|
51
|
+
data: items.map((item) => pickFieldSummary(item)),
|
|
52
|
+
meta: result?.meta,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export function registerDataModelingPostProcessors() {
|
|
56
|
+
postProcessorRegistry.register('collections', 'list', simplifyCollectionsListResult);
|
|
57
|
+
postProcessorRegistry.register('collections', 'apply', (result) => ({
|
|
58
|
+
data: pickCollectionSummary(result?.data || {}),
|
|
59
|
+
verify: result?.verify,
|
|
60
|
+
}));
|
|
61
|
+
postProcessorRegistry.register('collections', 'verify', (result) => result);
|
|
62
|
+
postProcessorRegistry.register('fields', 'apply', (result) => ({
|
|
63
|
+
data: pickFieldSummary(result?.data || {}),
|
|
64
|
+
}));
|
|
65
|
+
postProcessorRegistry.register('collections.fields', 'list', simplifyFieldsListResult);
|
|
66
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
title: item?.uiSchema?.title,
|
|
45
|
+
description: item?.description,
|
|
46
|
+
dataSourceKey: item?.dataSourceKey,
|
|
47
|
+
collectionName: item?.collectionName,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function pickRemoteFieldSummary(item, defaults) {
|
|
51
|
+
return {
|
|
52
|
+
name: item?.name,
|
|
53
|
+
type: item?.type,
|
|
54
|
+
title: item?.uiSchema?.title,
|
|
55
|
+
description: item?.description,
|
|
56
|
+
dataSourceKey: item?.dataSourceKey,
|
|
57
|
+
collectionName: item?.collectionName,
|
|
58
|
+
...defaults,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function pickDataSourceSummary(item) {
|
|
62
|
+
const summary = {
|
|
63
|
+
displayName: item?.displayName,
|
|
64
|
+
key: item?.key,
|
|
65
|
+
type: item?.type,
|
|
66
|
+
status: item?.status,
|
|
67
|
+
};
|
|
68
|
+
if (Array.isArray(item?.collections)) {
|
|
69
|
+
summary.collections = item.collections.map((collection) => {
|
|
70
|
+
const nextCollection = pickCollectionSummary({
|
|
71
|
+
...collection,
|
|
72
|
+
dataSourceKey: collection?.dataSourceKey ?? item?.key,
|
|
73
|
+
});
|
|
74
|
+
if (Array.isArray(collection?.fields)) {
|
|
75
|
+
nextCollection.fields = collection.fields.map((field) => pickRemoteFieldSummary(field, {
|
|
76
|
+
dataSourceKey: collection?.dataSourceKey ?? item?.key,
|
|
77
|
+
collectionName: collection?.name,
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
return nextCollection;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return summary;
|
|
84
|
+
}
|
|
85
|
+
export function simplifyDataSourceListResult(result) {
|
|
86
|
+
const items = toArray(result);
|
|
87
|
+
return {
|
|
88
|
+
data: items.map((item) => pickDataSourceSummary(item)),
|
|
89
|
+
meta: result?.meta,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export function simplifyDataSourceCollectionsListResult(result) {
|
|
93
|
+
const items = toArray(result);
|
|
94
|
+
return {
|
|
95
|
+
data: items.map((item) => pickCollectionSummary(item)),
|
|
96
|
+
meta: result?.meta,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export function simplifyDataSourceFieldsListResult(result, options) {
|
|
100
|
+
const items = toArray(result);
|
|
101
|
+
const defaults = parseAssociatedIndex(options?.flags?.['associated-index']);
|
|
102
|
+
return {
|
|
103
|
+
data: items.map((item) => item?.dataSourceKey || item?.collectionName ? pickFieldSummary(item) : pickRemoteFieldSummary(item, defaults)),
|
|
104
|
+
meta: result?.meta,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export function registerDataSourceManagerPostProcessors() {
|
|
108
|
+
postProcessorRegistry.register('data-sources', 'list', simplifyDataSourceListResult);
|
|
109
|
+
postProcessorRegistry.register('data-sources', 'list-enabled', simplifyDataSourceListResult);
|
|
110
|
+
postProcessorRegistry.register('data-sources.collections', 'list', simplifyDataSourceCollectionsListResult);
|
|
111
|
+
postProcessorRegistry.register('data-sources-collections.fields', 'list', (result, context) => simplifyDataSourceFieldsListResult(result, {
|
|
112
|
+
flags: context.flags,
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
@@ -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,287 @@
|
|
|
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", "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
|
+
"dbViews": {
|
|
160
|
+
"name": "db-views",
|
|
161
|
+
"description": "Inspect and query database views.",
|
|
162
|
+
"topLevel": false,
|
|
163
|
+
"operations": {
|
|
164
|
+
"includes": ["dbViews:list", "dbViews:get"]
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"file-manager": {
|
|
171
|
+
"name": "file-manager",
|
|
172
|
+
"description": "Provide file storage services, file collections, and attachment fields.",
|
|
173
|
+
"include": true,
|
|
174
|
+
"resources": {
|
|
175
|
+
"includes": ["storages"],
|
|
176
|
+
"excludes": [],
|
|
177
|
+
"overrides": {
|
|
178
|
+
"storages": {
|
|
179
|
+
"name": "storages",
|
|
180
|
+
"description": "Manage storage backends and file storage settings.",
|
|
181
|
+
"topLevel": false
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"flow-engine": {
|
|
187
|
+
"name": "flow-engine",
|
|
188
|
+
"description": "Manage flow surface composition, configuration, layout, and mutation APIs.",
|
|
189
|
+
"include": true,
|
|
190
|
+
"resources": {
|
|
191
|
+
"includes": ["flowSurfaces"],
|
|
192
|
+
"excludes": [],
|
|
193
|
+
"overrides": {
|
|
194
|
+
"flowSurfaces": {
|
|
195
|
+
"name": "flow-surfaces",
|
|
196
|
+
"description": "Compose and mutate page, tab, block, field, and action surfaces.",
|
|
197
|
+
"topLevel": true
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"map": {
|
|
203
|
+
"name": "map",
|
|
204
|
+
"description": "Map blocks with support for AMap, Google Maps, and extensible providers.",
|
|
205
|
+
"include": true,
|
|
206
|
+
"resources": {
|
|
207
|
+
"includes": ["map-configuration"],
|
|
208
|
+
"excludes": [],
|
|
209
|
+
"overrides": {
|
|
210
|
+
"map-configuration": {
|
|
211
|
+
"name": "map-configuration",
|
|
212
|
+
"description": "Manage map provider configuration.",
|
|
213
|
+
"topLevel": false
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"system-settings": {
|
|
219
|
+
"name": "system-settings",
|
|
220
|
+
"description": "Adjust system title, logo, language, and other global settings.",
|
|
221
|
+
"include": true,
|
|
222
|
+
"resources": {
|
|
223
|
+
"includes": ["systemSettings"],
|
|
224
|
+
"excludes": [],
|
|
225
|
+
"overrides": {
|
|
226
|
+
"systemSettings": {
|
|
227
|
+
"name": "system-settings",
|
|
228
|
+
"description": "Manage global system settings.",
|
|
229
|
+
"topLevel": false
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"theme-editor": {
|
|
235
|
+
"name": "theme-editor",
|
|
236
|
+
"description": "Customize UI colors and dimensions, save themes, and switch between them.",
|
|
237
|
+
"include": true,
|
|
238
|
+
"resources": {
|
|
239
|
+
"includes": ["themeConfig"],
|
|
240
|
+
"excludes": [],
|
|
241
|
+
"overrides": {
|
|
242
|
+
"themeConfig": {
|
|
243
|
+
"name": "theme-config",
|
|
244
|
+
"description": "Manage theme configuration.",
|
|
245
|
+
"topLevel": false
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"workflow": {
|
|
251
|
+
"name": "workflow",
|
|
252
|
+
"description": "A powerful BPM tool that provides the foundation for business automation and extensible triggers and nodes.",
|
|
253
|
+
"include": true,
|
|
254
|
+
"resources": {
|
|
255
|
+
"includes": ["executions", "flow_nodes", "jobs", "userWorkflowTasks", "workflows"],
|
|
256
|
+
"excludes": [],
|
|
257
|
+
"overrides": {
|
|
258
|
+
"executions": {
|
|
259
|
+
"name": "executions",
|
|
260
|
+
"description": "Manage workflow execution records.",
|
|
261
|
+
"topLevel": false
|
|
262
|
+
},
|
|
263
|
+
"flow_nodes": {
|
|
264
|
+
"name": "flow-nodes",
|
|
265
|
+
"description": "Manage workflow nodes.",
|
|
266
|
+
"topLevel": false
|
|
267
|
+
},
|
|
268
|
+
"jobs": {
|
|
269
|
+
"name": "jobs",
|
|
270
|
+
"description": "Manage workflow jobs.",
|
|
271
|
+
"topLevel": false
|
|
272
|
+
},
|
|
273
|
+
"userWorkflowTasks": {
|
|
274
|
+
"name": "user-workflow-tasks",
|
|
275
|
+
"description": "Query current user workflow tasks.",
|
|
276
|
+
"topLevel": false
|
|
277
|
+
},
|
|
278
|
+
"workflows": {
|
|
279
|
+
"name": "workflows",
|
|
280
|
+
"description": "Manage workflows and workflow revisions.",
|
|
281
|
+
"topLevel": false
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
package/package.json
CHANGED
|
@@ -1,38 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/cli",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
4
|
-
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"main": "
|
|
3
|
+
"version": "2.1.0-beta.21",
|
|
4
|
+
"description": "NocoBase Command Line Tool",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/generated/command-registry.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"clean": "node ./scripts/clean.mjs",
|
|
9
|
+
"build": "node ./scripts/build.mjs",
|
|
10
|
+
"test": "TEST_ENV=server-side yarn --cwd ../../.. vitest run packages/core/cli"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"files": [
|
|
16
|
+
"bin",
|
|
17
|
+
"dist",
|
|
18
|
+
"nocobase-ctl.config.json"
|
|
19
|
+
],
|
|
7
20
|
"bin": {
|
|
8
|
-
"
|
|
21
|
+
"nb": "./bin/run.js"
|
|
22
|
+
},
|
|
23
|
+
"oclif": {
|
|
24
|
+
"bin": "nb",
|
|
25
|
+
"helpOptions": {
|
|
26
|
+
"flagSortOrder": "none"
|
|
27
|
+
},
|
|
28
|
+
"additionalHelpFlags": [
|
|
29
|
+
"-h"
|
|
30
|
+
],
|
|
31
|
+
"helpClass": "./dist/help/runtime-help.js",
|
|
32
|
+
"commands": {
|
|
33
|
+
"strategy": "explicit",
|
|
34
|
+
"target": "./dist/generated/command-registry.js"
|
|
35
|
+
},
|
|
36
|
+
"dirname": "nb",
|
|
37
|
+
"topicSeparator": " ",
|
|
38
|
+
"topics": {
|
|
39
|
+
"env": {
|
|
40
|
+
"description": "Manage NocoBase project environments and update command runtimes."
|
|
41
|
+
},
|
|
42
|
+
"self": {
|
|
43
|
+
"description": "Inspect or update the NocoBase CLI itself."
|
|
44
|
+
},
|
|
45
|
+
"skills": {
|
|
46
|
+
"description": "Inspect or synchronize NocoBase AI coding skills for the current workspace."
|
|
47
|
+
},
|
|
48
|
+
"api": {
|
|
49
|
+
"description": "Work with NocoBase API."
|
|
50
|
+
}
|
|
51
|
+
}
|
|
9
52
|
},
|
|
10
53
|
"dependencies": {
|
|
11
|
-
"@
|
|
12
|
-
"@
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"dotenv": "^16.0.0",
|
|
19
|
-
"execa": "^5.1.1",
|
|
20
|
-
"fast-glob": "^3.3.1",
|
|
21
|
-
"fs-extra": "^11.1.1",
|
|
22
|
-
"p-all": "3.0.0",
|
|
23
|
-
"pm2": "^6.0.5",
|
|
24
|
-
"portfinder": "^1.0.28",
|
|
25
|
-
"tar": "^7.4.3",
|
|
26
|
-
"tree-kill": "^1.2.2",
|
|
27
|
-
"tsx": "^4.19.0"
|
|
54
|
+
"@clack/prompts": "^0.9.1",
|
|
55
|
+
"@oclif/core": "^4.10.4",
|
|
56
|
+
"cross-spawn": "^7.0.6",
|
|
57
|
+
"lodash": "^4.17.21",
|
|
58
|
+
"openapi-types": "^12.1.3",
|
|
59
|
+
"ora": "^8.2.0",
|
|
60
|
+
"picocolors": "^1.1.1"
|
|
28
61
|
},
|
|
29
62
|
"devDependencies": {
|
|
30
|
-
"@
|
|
63
|
+
"@types/node": "^18.19.130",
|
|
64
|
+
"tsx": "^4.20.6",
|
|
65
|
+
"typescript": "^6.0.2"
|
|
31
66
|
},
|
|
32
67
|
"repository": {
|
|
33
68
|
"type": "git",
|
|
34
|
-
"url": "git+https://github.com/nocobase/nocobase.git"
|
|
35
|
-
"directory": "packages/core/cli"
|
|
69
|
+
"url": "git+https://github.com/nocobase/nocobase.git"
|
|
36
70
|
},
|
|
37
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "324bd82f33fca58e98711688a17ceb65c186b65e"
|
|
38
72
|
}
|