* feat: multiple apps plugin * feat: multipleAppManager in Application * stage * fix: export error * test: multiple app * application model * feat: create application with plugins * load and install after sub application created * create subApp database beforeInstall * sub apps listen to main app start & stop events * refactor: getPluginName as package name * feat: load apps on mainApp starts * fix: test * feat: beforeGetApplication event * fix: test * fix: test with sqlite memory database * test: lazyLoad application * fix: test with sqlite memory * chore: clone database collection & promise.all
15 lines
316 B
TypeScript
15 lines
316 B
TypeScript
import path from 'path';
|
|
import { Plugin } from '@nocobase/server';
|
|
|
|
export default class PluginNotifications extends Plugin {
|
|
async load() {
|
|
await this.app.db.import({
|
|
directory: path.resolve(__dirname, 'collections'),
|
|
});
|
|
}
|
|
|
|
getName(): string {
|
|
return this.getPackageName(__dirname);
|
|
}
|
|
}
|