mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-08 06:59:26 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
120eac6a7c
@ -13,7 +13,6 @@ import { getConfig } from './config';
|
|||||||
async function initializeGateway() {
|
async function initializeGateway() {
|
||||||
await runPluginStaticImports();
|
await runPluginStaticImports();
|
||||||
const config = await getConfig();
|
const config = await getConfig();
|
||||||
|
|
||||||
await Gateway.getInstance().run({
|
await Gateway.getInstance().run({
|
||||||
mainAppOptions: config,
|
mainAppOptions: config,
|
||||||
});
|
});
|
||||||
|
@ -394,10 +394,15 @@ export class PluginManager {
|
|||||||
const packageNames: string[] = items.map((item) => item.packageName);
|
const packageNames: string[] = items.map((item) => item.packageName);
|
||||||
const source = [];
|
const source = [];
|
||||||
for (const packageName of packageNames) {
|
for (const packageName of packageNames) {
|
||||||
const dirname = await getPluginBasePath(packageName);
|
try {
|
||||||
const directory = join(dirname, 'server/commands/*.' + (basename(dirname) === 'src' ? '{ts,js}' : 'js'));
|
const dirname = await getPluginBasePath(packageName);
|
||||||
|
const directory = join(dirname, 'server/commands/*.' + (basename(dirname) === 'src' ? '{ts,js}' : 'js'));
|
||||||
|
|
||||||
source.push(directory.replaceAll(sep, '/'));
|
source.push(directory.replaceAll(sep, '/'));
|
||||||
|
} catch (error) {
|
||||||
|
this.app.log.error(error);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (const plugin of this.options.plugins || []) {
|
for (const plugin of this.options.plugins || []) {
|
||||||
if (typeof plugin === 'string') {
|
if (typeof plugin === 'string') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user