@nocobase/preset-nocobase 0.9.2-alpha.2 → 0.9.2-alpha.3

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.
Files changed (3) hide show
  1. package/lib/index.js +25 -35
  2. package/package.json +33 -33
  3. package/src/index.ts +2 -2
package/lib/index.js CHANGED
@@ -77,45 +77,35 @@ class PresetNocoBase extends _server().Plugin {
77
77
  return _ref.apply(this, arguments);
78
78
  };
79
79
  }());
80
- this.app.on('beforeUpgrade', /*#__PURE__*/function () {
81
- var _ref2 = _asyncToGenerator(function* (options) {
82
- const result = yield _this2.app.version.satisfies('<0.8.0-alpha.1');
83
- if (result) {
84
- console.log(`Initialize all built-in plugins beforeUpgrade`);
85
- yield _this2.addBuiltInPlugins({
86
- method: 'upgrade'
87
- });
88
- }
89
- const builtInPlugins = _this2.getBuiltInPlugins();
90
- const plugins = yield _this2.app.db.getRepository('applicationPlugins').find();
91
- const pluginNames = plugins.map(p => p.name);
92
- yield _this2.app.pm.add(builtInPlugins.filter(plugin => !pluginNames.includes(plugin)), {
93
- enabled: true,
94
- builtIn: true,
95
- installed: true
96
- });
97
- const localPlugins = _this2.getLocalPlugins();
98
- yield _this2.app.pm.add(localPlugins.filter(plugin => !pluginNames.includes(plugin)), {});
99
- yield _this2.app.reload({
80
+ this.app.on('beforeUpgrade', /*#__PURE__*/_asyncToGenerator(function* () {
81
+ const result = yield _this2.app.version.satisfies('<0.8.0-alpha.1');
82
+ if (result) {
83
+ console.log(`Initialize all built-in plugins beforeUpgrade`);
84
+ yield _this2.addBuiltInPlugins({
100
85
  method: 'upgrade'
101
86
  });
102
- yield _this2.app.db.sync();
87
+ }
88
+ const builtInPlugins = _this2.getBuiltInPlugins();
89
+ const plugins = yield _this2.app.db.getRepository('applicationPlugins').find();
90
+ const pluginNames = plugins.map(p => p.name);
91
+ yield _this2.app.pm.add(builtInPlugins.filter(plugin => !pluginNames.includes(plugin)), {
92
+ enabled: true,
93
+ builtIn: true,
94
+ installed: true
103
95
  });
104
- return function (_x3) {
105
- return _ref2.apply(this, arguments);
106
- };
107
- }());
108
- this.app.on('beforeInstall', /*#__PURE__*/function () {
109
- var _ref3 = _asyncToGenerator(function* (options) {
110
- console.log(`Initialize all built-in plugins beforeInstall in ${_this2.app.name}`);
111
- yield _this2.addBuiltInPlugins({
112
- method: 'install'
113
- });
96
+ const localPlugins = _this2.getLocalPlugins();
97
+ yield _this2.app.pm.add(localPlugins.filter(plugin => !pluginNames.includes(plugin)), {});
98
+ yield _this2.app.reload({
99
+ method: 'upgrade'
114
100
  });
115
- return function (_x4) {
116
- return _ref3.apply(this, arguments);
117
- };
118
- }());
101
+ yield _this2.app.db.sync();
102
+ }));
103
+ this.app.on('beforeInstall', /*#__PURE__*/_asyncToGenerator(function* () {
104
+ console.log(`Initialize all built-in plugins beforeInstall in ${_this2.app.name}`);
105
+ yield _this2.addBuiltInPlugins({
106
+ method: 'install'
107
+ });
108
+ }));
119
109
  }
120
110
  beforeLoad() {
121
111
  this.db.addMigrations({
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
2
  "name": "@nocobase/preset-nocobase",
3
- "version": "0.9.2-alpha.2",
3
+ "version": "0.9.2-alpha.3",
4
4
  "license": "AGPL-3.0",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "dependencies": {
8
- "@nocobase/plugin-acl": "0.9.2-alpha.2",
9
- "@nocobase/plugin-audit-logs": "0.9.2-alpha.2",
10
- "@nocobase/plugin-charts": "0.9.2-alpha.2",
11
- "@nocobase/plugin-china-region": "0.9.2-alpha.2",
12
- "@nocobase/plugin-client": "0.9.2-alpha.2",
13
- "@nocobase/plugin-collection-manager": "0.9.2-alpha.2",
14
- "@nocobase/plugin-duplicator": "0.9.2-alpha.2",
15
- "@nocobase/plugin-error-handler": "0.9.2-alpha.2",
16
- "@nocobase/plugin-excel-formula-field": "0.9.2-alpha.2",
17
- "@nocobase/plugin-export": "0.9.2-alpha.2",
18
- "@nocobase/plugin-file-manager": "0.9.2-alpha.2",
19
- "@nocobase/plugin-formula-field": "0.9.2-alpha.2",
20
- "@nocobase/plugin-graph-collection-manager": "0.9.2-alpha.2",
21
- "@nocobase/plugin-iframe-block": "0.9.2-alpha.2",
22
- "@nocobase/plugin-import": "0.9.2-alpha.2",
23
- "@nocobase/plugin-map": "0.9.2-alpha.2",
24
- "@nocobase/plugin-math-formula-field": "0.9.2-alpha.2",
25
- "@nocobase/plugin-multi-app-manager": "0.9.2-alpha.2",
26
- "@nocobase/plugin-multi-app-share-collection": "0.9.2-alpha.2",
27
- "@nocobase/plugin-oidc": "0.9.2-alpha.2",
28
- "@nocobase/plugin-saml": "0.9.2-alpha.2",
29
- "@nocobase/plugin-sample-hello": "0.9.2-alpha.2",
30
- "@nocobase/plugin-sequence-field": "0.9.2-alpha.2",
31
- "@nocobase/plugin-snapshot-field": "0.9.2-alpha.2",
32
- "@nocobase/plugin-system-settings": "0.9.2-alpha.2",
33
- "@nocobase/plugin-ui-routes-storage": "0.9.2-alpha.2",
34
- "@nocobase/plugin-ui-schema-storage": "0.9.2-alpha.2",
35
- "@nocobase/plugin-users": "0.9.2-alpha.2",
36
- "@nocobase/plugin-verification": "0.9.2-alpha.2",
37
- "@nocobase/plugin-workflow": "0.9.2-alpha.2",
38
- "@nocobase/server": "0.9.2-alpha.2"
8
+ "@nocobase/plugin-acl": "0.9.2-alpha.3",
9
+ "@nocobase/plugin-audit-logs": "0.9.2-alpha.3",
10
+ "@nocobase/plugin-charts": "0.9.2-alpha.3",
11
+ "@nocobase/plugin-china-region": "0.9.2-alpha.3",
12
+ "@nocobase/plugin-client": "0.9.2-alpha.3",
13
+ "@nocobase/plugin-collection-manager": "0.9.2-alpha.3",
14
+ "@nocobase/plugin-duplicator": "0.9.2-alpha.3",
15
+ "@nocobase/plugin-error-handler": "0.9.2-alpha.3",
16
+ "@nocobase/plugin-excel-formula-field": "0.9.2-alpha.3",
17
+ "@nocobase/plugin-export": "0.9.2-alpha.3",
18
+ "@nocobase/plugin-file-manager": "0.9.2-alpha.3",
19
+ "@nocobase/plugin-formula-field": "0.9.2-alpha.3",
20
+ "@nocobase/plugin-graph-collection-manager": "0.9.2-alpha.3",
21
+ "@nocobase/plugin-iframe-block": "0.9.2-alpha.3",
22
+ "@nocobase/plugin-import": "0.9.2-alpha.3",
23
+ "@nocobase/plugin-map": "0.9.2-alpha.3",
24
+ "@nocobase/plugin-math-formula-field": "0.9.2-alpha.3",
25
+ "@nocobase/plugin-multi-app-manager": "0.9.2-alpha.3",
26
+ "@nocobase/plugin-multi-app-share-collection": "0.9.2-alpha.3",
27
+ "@nocobase/plugin-oidc": "0.9.2-alpha.3",
28
+ "@nocobase/plugin-saml": "0.9.2-alpha.3",
29
+ "@nocobase/plugin-sample-hello": "0.9.2-alpha.3",
30
+ "@nocobase/plugin-sequence-field": "0.9.2-alpha.3",
31
+ "@nocobase/plugin-snapshot-field": "0.9.2-alpha.3",
32
+ "@nocobase/plugin-system-settings": "0.9.2-alpha.3",
33
+ "@nocobase/plugin-ui-routes-storage": "0.9.2-alpha.3",
34
+ "@nocobase/plugin-ui-schema-storage": "0.9.2-alpha.3",
35
+ "@nocobase/plugin-users": "0.9.2-alpha.3",
36
+ "@nocobase/plugin-verification": "0.9.2-alpha.3",
37
+ "@nocobase/plugin-workflow": "0.9.2-alpha.3",
38
+ "@nocobase/server": "0.9.2-alpha.3"
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
42
42
  "url": "git+https://github.com/nocobase/nocobase.git",
43
43
  "directory": "packages/presets/nocobase"
44
44
  },
45
- "gitHead": "1a0de6908b2b1854bdf434fcafa8909cb65bb8a3"
45
+ "gitHead": "b6b5f9372202d942c97d2d90a4197e060db05124"
46
46
  }
package/src/index.ts CHANGED
@@ -76,7 +76,7 @@ export class PresetNocoBase extends Plugin {
76
76
  console.log(`The version number before upgrade is ${version}`);
77
77
  });
78
78
 
79
- this.app.on('beforeUpgrade', async (options) => {
79
+ this.app.on('beforeUpgrade', async () => {
80
80
  const result = await this.app.version.satisfies('<0.8.0-alpha.1');
81
81
 
82
82
  if (result) {
@@ -104,7 +104,7 @@ export class PresetNocoBase extends Plugin {
104
104
  await this.app.db.sync();
105
105
  });
106
106
 
107
- this.app.on('beforeInstall', async (options) => {
107
+ this.app.on('beforeInstall', async () => {
108
108
  console.log(`Initialize all built-in plugins beforeInstall in ${this.app.name}`);
109
109
  await this.addBuiltInPlugins({ method: 'install' });
110
110
  });