Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2025-01-04 10:44:50 +00:00
commit 120eac6a7c
2 changed files with 8 additions and 4 deletions

View File

@ -13,7 +13,6 @@ import { getConfig } from './config';
async function initializeGateway() {
await runPluginStaticImports();
const config = await getConfig();
await Gateway.getInstance().run({
mainAppOptions: config,
});

View File

@ -394,10 +394,15 @@ export class PluginManager {
const packageNames: string[] = items.map((item) => item.packageName);
const source = [];
for (const packageName of packageNames) {
const dirname = await getPluginBasePath(packageName);
const directory = join(dirname, 'server/commands/*.' + (basename(dirname) === 'src' ? '{ts,js}' : 'js'));
try {
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 || []) {
if (typeof plugin === 'string') {