@nocobase/cli 2.1.0-alpha.16 → 2.1.0-alpha.18
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 +134 -63
- package/bin/run.cmd +3 -0
- package/bin/run.js +87 -0
- package/dist/commands/api/index.js +8 -0
- package/dist/commands/env/add.js +53 -0
- package/dist/commands/env/auth.js +36 -0
- package/dist/commands/env/index.js +27 -0
- package/dist/commands/env/list.js +31 -0
- package/dist/commands/env/remove.js +54 -0
- package/dist/commands/env/update.js +58 -0
- package/dist/commands/env/use.js +26 -0
- package/dist/commands/resource/create.js +15 -0
- package/dist/commands/resource/destroy.js +15 -0
- package/dist/commands/resource/get.js +15 -0
- package/dist/commands/resource/index.js +7 -0
- package/dist/commands/resource/list.js +16 -0
- package/dist/commands/resource/query.js +15 -0
- package/dist/commands/resource/update.js +15 -0
- package/dist/generated/command-registry.js +88 -0
- package/dist/lib/api-client.js +199 -0
- package/dist/lib/auth-store.js +155 -0
- package/dist/lib/bootstrap.js +349 -0
- package/dist/lib/build-config.js +10 -0
- package/dist/lib/cli-home.js +30 -0
- package/dist/lib/env-auth.js +405 -0
- package/dist/lib/generated-command.js +142 -0
- package/dist/lib/naming.js +70 -0
- package/dist/lib/openapi.js +254 -0
- package/dist/lib/post-processors.js +23 -0
- package/dist/lib/resource-command.js +335 -0
- package/dist/lib/resource-request.js +104 -0
- package/dist/lib/runtime-generator.js +408 -0
- package/dist/lib/runtime-store.js +56 -0
- package/dist/lib/ui.js +169 -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 +327 -0
- package/package.json +50 -25
- package/LICENSE +0 -201
- package/bin/index.js +0 -39
- package/nocobase.conf.tpl +0 -184
- package/src/cli.js +0 -28
- package/src/commands/benchmark.js +0 -73
- package/src/commands/build.js +0 -81
- package/src/commands/clean.js +0 -30
- package/src/commands/client.js +0 -168
- package/src/commands/create-nginx-conf.js +0 -53
- package/src/commands/create-plugin.js +0 -33
- package/src/commands/dev.js +0 -290
- 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 -607
- 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-v2.d.ts +0 -2
- package/templates/plugin/client-v2.js +0 -1
- package/templates/plugin/client.d.ts +0 -2
- package/templates/plugin/client.js +0 -1
- package/templates/plugin/package.json.tpl +0 -12
- 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/client-v2/client.d.ts +0 -103
- package/templates/plugin/src/client-v2/index.tsx.tpl +0 -1
- package/templates/plugin/src/client-v2/plugin.tsx.tpl +0 -7
- 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
package/dist/lib/ui.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import readline from 'node:readline/promises';
|
|
2
|
+
import { stdin as input, stdout as output } from 'node:process';
|
|
3
|
+
import ora from 'ora';
|
|
4
|
+
import pc from 'picocolors';
|
|
5
|
+
let activeSpinner;
|
|
6
|
+
let verboseMode = false;
|
|
7
|
+
function stringWidth(value) {
|
|
8
|
+
return Array.from(value).length;
|
|
9
|
+
}
|
|
10
|
+
function pad(value, width) {
|
|
11
|
+
const padding = Math.max(0, width - stringWidth(value));
|
|
12
|
+
return `${value}${' '.repeat(padding)}`;
|
|
13
|
+
}
|
|
14
|
+
export function isInteractiveTerminal() {
|
|
15
|
+
return Boolean(input.isTTY && output.isTTY);
|
|
16
|
+
}
|
|
17
|
+
export function setVerboseMode(value) {
|
|
18
|
+
verboseMode = value;
|
|
19
|
+
}
|
|
20
|
+
export function isVerboseMode() {
|
|
21
|
+
return verboseMode;
|
|
22
|
+
}
|
|
23
|
+
export async function promptText(message, options) {
|
|
24
|
+
if (!isInteractiveTerminal()) {
|
|
25
|
+
return options?.defaultValue ?? '';
|
|
26
|
+
}
|
|
27
|
+
const rl = readline.createInterface({
|
|
28
|
+
input,
|
|
29
|
+
output,
|
|
30
|
+
terminal: true,
|
|
31
|
+
});
|
|
32
|
+
try {
|
|
33
|
+
const suffix = options?.defaultValue ? ` (${options.defaultValue})` : '';
|
|
34
|
+
const hint = options?.secret ? ' [input visible]' : '';
|
|
35
|
+
const prompt = `${message}${suffix}${hint}: `;
|
|
36
|
+
const answer = await rl.question(prompt);
|
|
37
|
+
return answer.trim() || options?.defaultValue || '';
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
rl.close();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export async function confirmAction(message, options) {
|
|
44
|
+
if (!isInteractiveTerminal()) {
|
|
45
|
+
return Boolean(options?.defaultValue);
|
|
46
|
+
}
|
|
47
|
+
stopTask();
|
|
48
|
+
const rl = readline.createInterface({
|
|
49
|
+
input,
|
|
50
|
+
output,
|
|
51
|
+
terminal: true,
|
|
52
|
+
});
|
|
53
|
+
try {
|
|
54
|
+
const suffix = options?.defaultValue ? pc.dim('[Y/n]') : pc.dim('[y/N]');
|
|
55
|
+
const prompt = `${pc.yellow('?')} ${pc.bold(message)} ${suffix} `;
|
|
56
|
+
const answer = await rl.question(prompt);
|
|
57
|
+
const normalized = answer.trim().toLowerCase();
|
|
58
|
+
if (!normalized) {
|
|
59
|
+
return Boolean(options?.defaultValue);
|
|
60
|
+
}
|
|
61
|
+
return normalized === 'y' || normalized === 'yes';
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
rl.close();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export function printSection(title) {
|
|
68
|
+
console.log(pc.bold(title));
|
|
69
|
+
}
|
|
70
|
+
export function printInfo(message) {
|
|
71
|
+
if (activeSpinner) {
|
|
72
|
+
if (!isInteractiveTerminal()) {
|
|
73
|
+
activeSpinner = undefined;
|
|
74
|
+
console.log(pc.cyan(message));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
activeSpinner.info(pc.cyan(message));
|
|
78
|
+
activeSpinner = undefined;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
console.log(pc.cyan(message));
|
|
82
|
+
}
|
|
83
|
+
export function printVerbose(message) {
|
|
84
|
+
if (!verboseMode) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
printInfo(message);
|
|
88
|
+
}
|
|
89
|
+
export function printSuccess(message) {
|
|
90
|
+
if (activeSpinner) {
|
|
91
|
+
if (!isInteractiveTerminal()) {
|
|
92
|
+
activeSpinner = undefined;
|
|
93
|
+
console.log(pc.green(message));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
activeSpinner.succeed(pc.green(message));
|
|
97
|
+
activeSpinner = undefined;
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
console.log(pc.green(message));
|
|
101
|
+
}
|
|
102
|
+
export function printWarning(message) {
|
|
103
|
+
if (activeSpinner) {
|
|
104
|
+
if (!isInteractiveTerminal()) {
|
|
105
|
+
activeSpinner = undefined;
|
|
106
|
+
console.log(pc.yellow(message));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
activeSpinner.warn(pc.yellow(message));
|
|
110
|
+
activeSpinner = undefined;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
console.log(pc.yellow(message));
|
|
114
|
+
}
|
|
115
|
+
export function printVerboseWarning(message) {
|
|
116
|
+
if (!verboseMode) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
printWarning(message);
|
|
120
|
+
}
|
|
121
|
+
export function startTask(message) {
|
|
122
|
+
if (activeSpinner) {
|
|
123
|
+
activeSpinner.stop();
|
|
124
|
+
}
|
|
125
|
+
activeSpinner = ora({
|
|
126
|
+
text: pc.cyan(message),
|
|
127
|
+
isSilent: !isInteractiveTerminal(),
|
|
128
|
+
}).start();
|
|
129
|
+
if (!isInteractiveTerminal()) {
|
|
130
|
+
console.log(pc.cyan(message));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export function updateTask(message) {
|
|
134
|
+
if (!activeSpinner) {
|
|
135
|
+
startTask(message);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
activeSpinner.text = pc.cyan(message);
|
|
139
|
+
}
|
|
140
|
+
export function succeedTask(message) {
|
|
141
|
+
if (activeSpinner) {
|
|
142
|
+
activeSpinner.succeed(pc.green(message));
|
|
143
|
+
activeSpinner = undefined;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
console.log(pc.green(message));
|
|
147
|
+
}
|
|
148
|
+
export function failTask(message) {
|
|
149
|
+
if (activeSpinner) {
|
|
150
|
+
activeSpinner.fail(pc.red(message));
|
|
151
|
+
activeSpinner = undefined;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
console.error(pc.red(message));
|
|
155
|
+
}
|
|
156
|
+
export function stopTask() {
|
|
157
|
+
if (activeSpinner) {
|
|
158
|
+
activeSpinner.stop();
|
|
159
|
+
activeSpinner = undefined;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
export function renderTable(headers, rows) {
|
|
163
|
+
const widths = headers.map((header, index) => {
|
|
164
|
+
return rows.reduce((max, row) => Math.max(max, stringWidth(row[index] ?? '')), stringWidth(header));
|
|
165
|
+
});
|
|
166
|
+
const renderRow = (row) => row.map((cell, index) => pad(cell ?? '', widths[index])).join(' ').trimEnd();
|
|
167
|
+
const divider = widths.map((width) => '-'.repeat(width)).join(' ');
|
|
168
|
+
return [renderRow(headers), divider, ...rows.map(renderRow)].join('\n');
|
|
169
|
+
}
|
|
@@ -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,327 @@
|
|
|
1
|
+
{
|
|
2
|
+
"moduleGroups": [
|
|
3
|
+
{
|
|
4
|
+
"match": [
|
|
5
|
+
"workflow*",
|
|
6
|
+
"@nocobase/plugin-workflow*"
|
|
7
|
+
],
|
|
8
|
+
"module": "workflow"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"match": [
|
|
12
|
+
"@nocobase/plugin-data-source-main",
|
|
13
|
+
"@nocobase/plugin-data-source-manager"
|
|
14
|
+
],
|
|
15
|
+
"module": "data-modeling"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"modules": {
|
|
19
|
+
"core": {
|
|
20
|
+
"name": "core",
|
|
21
|
+
"description": "NocoBase core resource APIs.",
|
|
22
|
+
"include": true,
|
|
23
|
+
"resources": {
|
|
24
|
+
"includes": [
|
|
25
|
+
"app",
|
|
26
|
+
"pm"
|
|
27
|
+
],
|
|
28
|
+
"excludes": [],
|
|
29
|
+
"overrides": {
|
|
30
|
+
"app": {
|
|
31
|
+
"name": "app",
|
|
32
|
+
"description": "Application management commands.",
|
|
33
|
+
"topLevel": true
|
|
34
|
+
},
|
|
35
|
+
"pm": {
|
|
36
|
+
"name": "pm",
|
|
37
|
+
"description": "Plugin manager commands.",
|
|
38
|
+
"topLevel": true
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"acl": {
|
|
44
|
+
"name": "acl",
|
|
45
|
+
"description": "Based on roles, resources, and actions, access control can precisely manage interface configuration permissions, data operation permissions, menu access permissions, and plugin permissions.",
|
|
46
|
+
"include": true,
|
|
47
|
+
"resources": {
|
|
48
|
+
"includes": [
|
|
49
|
+
"availableActions",
|
|
50
|
+
"dataSources",
|
|
51
|
+
"roles",
|
|
52
|
+
"rolesResourcesScopes"
|
|
53
|
+
],
|
|
54
|
+
"excludes": [],
|
|
55
|
+
"overrides": {
|
|
56
|
+
"availableActions": {
|
|
57
|
+
"name": "available-actions",
|
|
58
|
+
"description": "List and inspect configurable ACL actions.",
|
|
59
|
+
"topLevel": false
|
|
60
|
+
},
|
|
61
|
+
"dataSources": {
|
|
62
|
+
"name": "data-sources",
|
|
63
|
+
"description": "Manage ACL strategies for data sources.",
|
|
64
|
+
"topLevel": false
|
|
65
|
+
},
|
|
66
|
+
"roles": {
|
|
67
|
+
"name": "roles",
|
|
68
|
+
"description": "Manage roles and role-level ACL settings.",
|
|
69
|
+
"topLevel": false
|
|
70
|
+
},
|
|
71
|
+
"rolesResourcesScopes": {
|
|
72
|
+
"name": "roles-resources-scopes",
|
|
73
|
+
"description": "Manage role resource scopes and permissions.",
|
|
74
|
+
"topLevel": false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"api-keys": {
|
|
80
|
+
"name": "api-keys",
|
|
81
|
+
"description": "Allow users to access the HTTP API with API keys.",
|
|
82
|
+
"include": true,
|
|
83
|
+
"resources": {
|
|
84
|
+
"includes": [
|
|
85
|
+
"apiKeys"
|
|
86
|
+
],
|
|
87
|
+
"excludes": [],
|
|
88
|
+
"overrides": {
|
|
89
|
+
"apiKeys": {
|
|
90
|
+
"name": "api-keys",
|
|
91
|
+
"description": "Manage API keys.",
|
|
92
|
+
"topLevel": false
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"auth": {
|
|
98
|
+
"name": "authenticators",
|
|
99
|
+
"description": "User authentication management, including password auth, SMS auth, SSO protocols, and extensible providers.",
|
|
100
|
+
"include": true,
|
|
101
|
+
"resources": {
|
|
102
|
+
"includes": [
|
|
103
|
+
"authenticators"
|
|
104
|
+
],
|
|
105
|
+
"excludes": [],
|
|
106
|
+
"overrides": {
|
|
107
|
+
"auth": {
|
|
108
|
+
"name": "auth",
|
|
109
|
+
"description": "Authenticate users and manage auth sessions.",
|
|
110
|
+
"topLevel": false
|
|
111
|
+
},
|
|
112
|
+
"authenticators": {
|
|
113
|
+
"name": "authenticators",
|
|
114
|
+
"description": "Manage authentication providers and authenticators.",
|
|
115
|
+
"topLevel": false
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"client": {
|
|
121
|
+
"name": "client",
|
|
122
|
+
"description": "Provide the web client interface for the NocoBase server.",
|
|
123
|
+
"include": true,
|
|
124
|
+
"resources": {
|
|
125
|
+
"includes": [
|
|
126
|
+
"desktopRoutes",
|
|
127
|
+
"roles"
|
|
128
|
+
],
|
|
129
|
+
"excludes": [],
|
|
130
|
+
"overrides": {
|
|
131
|
+
"desktopRoutes": {
|
|
132
|
+
"name": "desktop-routes",
|
|
133
|
+
"description": "Manage desktop route permissions and visibility.",
|
|
134
|
+
"topLevel": true
|
|
135
|
+
},
|
|
136
|
+
"roles": {
|
|
137
|
+
"name": "roles",
|
|
138
|
+
"description": "Manage client permissions scoped by role.",
|
|
139
|
+
"topLevel": false
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"data-modeling": {
|
|
145
|
+
"name": "data-modeling",
|
|
146
|
+
"description": "Manage data sources, collections, and database modeling resources.",
|
|
147
|
+
"include": true,
|
|
148
|
+
"resources": {
|
|
149
|
+
"includes": [
|
|
150
|
+
"collections",
|
|
151
|
+
"fields",
|
|
152
|
+
"dbViews"
|
|
153
|
+
],
|
|
154
|
+
"excludes": [],
|
|
155
|
+
"overrides": {
|
|
156
|
+
"collections": {
|
|
157
|
+
"name": "collections",
|
|
158
|
+
"description": "Manage collections and collection metadata.",
|
|
159
|
+
"topLevel": false,
|
|
160
|
+
"operations": {
|
|
161
|
+
"includes": [
|
|
162
|
+
"apply",
|
|
163
|
+
"collections:list",
|
|
164
|
+
"collections:get",
|
|
165
|
+
"collections:destroy",
|
|
166
|
+
"collections/{collectionName}/fields:list"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"fields": {
|
|
171
|
+
"name": "fields",
|
|
172
|
+
"description": "Manage fields with the compact high-level modeling interface.",
|
|
173
|
+
"topLevel": false,
|
|
174
|
+
"operations": {
|
|
175
|
+
"includes": [
|
|
176
|
+
"apply"
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"dbViews": {
|
|
181
|
+
"name": "db-views",
|
|
182
|
+
"description": "Inspect and query database views.",
|
|
183
|
+
"topLevel": false,
|
|
184
|
+
"operations": {
|
|
185
|
+
"includes": [
|
|
186
|
+
"dbViews:list",
|
|
187
|
+
"dbViews:get"
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"file-manager": {
|
|
195
|
+
"name": "file-manager",
|
|
196
|
+
"description": "Provide file storage services, file collections, and attachment fields.",
|
|
197
|
+
"include": true,
|
|
198
|
+
"resources": {
|
|
199
|
+
"includes": [
|
|
200
|
+
"storages"
|
|
201
|
+
],
|
|
202
|
+
"excludes": [],
|
|
203
|
+
"overrides": {
|
|
204
|
+
"storages": {
|
|
205
|
+
"name": "storages",
|
|
206
|
+
"description": "Manage storage backends and file storage settings.",
|
|
207
|
+
"topLevel": false
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"flow-engine": {
|
|
213
|
+
"name": "flow-engine",
|
|
214
|
+
"description": "Manage flow surface composition, configuration, layout, and mutation APIs.",
|
|
215
|
+
"include": true,
|
|
216
|
+
"resources": {
|
|
217
|
+
"includes": [
|
|
218
|
+
"flowSurfaces"
|
|
219
|
+
],
|
|
220
|
+
"excludes": [],
|
|
221
|
+
"overrides": {
|
|
222
|
+
"flowSurfaces": {
|
|
223
|
+
"name": "flow-surfaces",
|
|
224
|
+
"description": "Compose and mutate page, tab, block, field, and action surfaces.",
|
|
225
|
+
"topLevel": true
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"map": {
|
|
231
|
+
"name": "map",
|
|
232
|
+
"description": "Map blocks with support for AMap, Google Maps, and extensible providers.",
|
|
233
|
+
"include": true,
|
|
234
|
+
"resources": {
|
|
235
|
+
"includes": [
|
|
236
|
+
"map-configuration"
|
|
237
|
+
],
|
|
238
|
+
"excludes": [],
|
|
239
|
+
"overrides": {
|
|
240
|
+
"map-configuration": {
|
|
241
|
+
"name": "map-configuration",
|
|
242
|
+
"description": "Manage map provider configuration.",
|
|
243
|
+
"topLevel": false
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"system-settings": {
|
|
249
|
+
"name": "system-settings",
|
|
250
|
+
"description": "Adjust system title, logo, language, and other global settings.",
|
|
251
|
+
"include": true,
|
|
252
|
+
"resources": {
|
|
253
|
+
"includes": [
|
|
254
|
+
"systemSettings"
|
|
255
|
+
],
|
|
256
|
+
"excludes": [],
|
|
257
|
+
"overrides": {
|
|
258
|
+
"systemSettings": {
|
|
259
|
+
"name": "system-settings",
|
|
260
|
+
"description": "Manage global system settings.",
|
|
261
|
+
"topLevel": false
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"theme-editor": {
|
|
267
|
+
"name": "theme-editor",
|
|
268
|
+
"description": "Customize UI colors and dimensions, save themes, and switch between them.",
|
|
269
|
+
"include": true,
|
|
270
|
+
"resources": {
|
|
271
|
+
"includes": [
|
|
272
|
+
"themeConfig"
|
|
273
|
+
],
|
|
274
|
+
"excludes": [],
|
|
275
|
+
"overrides": {
|
|
276
|
+
"themeConfig": {
|
|
277
|
+
"name": "theme-config",
|
|
278
|
+
"description": "Manage theme configuration.",
|
|
279
|
+
"topLevel": false
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"workflow": {
|
|
285
|
+
"name": "workflow",
|
|
286
|
+
"description": "A powerful BPM tool that provides the foundation for business automation and extensible triggers and nodes.",
|
|
287
|
+
"include": true,
|
|
288
|
+
"resources": {
|
|
289
|
+
"includes": [
|
|
290
|
+
"executions",
|
|
291
|
+
"flow_nodes",
|
|
292
|
+
"jobs",
|
|
293
|
+
"userWorkflowTasks",
|
|
294
|
+
"workflows"
|
|
295
|
+
],
|
|
296
|
+
"excludes": [],
|
|
297
|
+
"overrides": {
|
|
298
|
+
"executions": {
|
|
299
|
+
"name": "executions",
|
|
300
|
+
"description": "Manage workflow execution records.",
|
|
301
|
+
"topLevel": false
|
|
302
|
+
},
|
|
303
|
+
"flow_nodes": {
|
|
304
|
+
"name": "flow-nodes",
|
|
305
|
+
"description": "Manage workflow nodes.",
|
|
306
|
+
"topLevel": false
|
|
307
|
+
},
|
|
308
|
+
"jobs": {
|
|
309
|
+
"name": "jobs",
|
|
310
|
+
"description": "Manage workflow jobs.",
|
|
311
|
+
"topLevel": false
|
|
312
|
+
},
|
|
313
|
+
"userWorkflowTasks": {
|
|
314
|
+
"name": "user-workflow-tasks",
|
|
315
|
+
"description": "Query current user workflow tasks.",
|
|
316
|
+
"topLevel": false
|
|
317
|
+
},
|
|
318
|
+
"workflows": {
|
|
319
|
+
"name": "workflows",
|
|
320
|
+
"description": "Manage workflows and workflow revisions.",
|
|
321
|
+
"topLevel": false
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|