plugin-migration-manager 2.0.0

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.
@@ -0,0 +1,34 @@
1
+ import { Plugin } from '@nocobase/server';
2
+ // @ts-ignore
3
+ import { name } from '../../package.json';
4
+ import { MigrationController } from './controllers/migration';
5
+
6
+ export const namespace = name;
7
+
8
+ export class PluginMigrationManagerServer extends Plugin {
9
+ async afterAdd() {}
10
+ async beforeLoad() {}
11
+
12
+ async load() {
13
+ this.app.resource({
14
+ name: 'migration',
15
+ actions: {
16
+ export: MigrationController.export,
17
+ import: MigrationController.import,
18
+ list: MigrationController.list,
19
+ validate: MigrationController.validate,
20
+ apply: MigrationController.apply,
21
+ },
22
+ });
23
+
24
+ this.app.acl.allow('migration', '*', 'admin');
25
+ }
26
+
27
+ async install() {}
28
+ async afterEnable() {}
29
+ async afterDisable() {}
30
+ async remove() {}
31
+ }
32
+
33
+ export default PluginMigrationManagerServer;
34
+