@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.
- package/lib/index.js +25 -35
- package/package.json +33 -33
- 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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
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
|
-
|
|
105
|
-
|
|
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
|
-
|
|
116
|
-
|
|
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.
|
|
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.
|
|
9
|
-
"@nocobase/plugin-audit-logs": "0.9.2-alpha.
|
|
10
|
-
"@nocobase/plugin-charts": "0.9.2-alpha.
|
|
11
|
-
"@nocobase/plugin-china-region": "0.9.2-alpha.
|
|
12
|
-
"@nocobase/plugin-client": "0.9.2-alpha.
|
|
13
|
-
"@nocobase/plugin-collection-manager": "0.9.2-alpha.
|
|
14
|
-
"@nocobase/plugin-duplicator": "0.9.2-alpha.
|
|
15
|
-
"@nocobase/plugin-error-handler": "0.9.2-alpha.
|
|
16
|
-
"@nocobase/plugin-excel-formula-field": "0.9.2-alpha.
|
|
17
|
-
"@nocobase/plugin-export": "0.9.2-alpha.
|
|
18
|
-
"@nocobase/plugin-file-manager": "0.9.2-alpha.
|
|
19
|
-
"@nocobase/plugin-formula-field": "0.9.2-alpha.
|
|
20
|
-
"@nocobase/plugin-graph-collection-manager": "0.9.2-alpha.
|
|
21
|
-
"@nocobase/plugin-iframe-block": "0.9.2-alpha.
|
|
22
|
-
"@nocobase/plugin-import": "0.9.2-alpha.
|
|
23
|
-
"@nocobase/plugin-map": "0.9.2-alpha.
|
|
24
|
-
"@nocobase/plugin-math-formula-field": "0.9.2-alpha.
|
|
25
|
-
"@nocobase/plugin-multi-app-manager": "0.9.2-alpha.
|
|
26
|
-
"@nocobase/plugin-multi-app-share-collection": "0.9.2-alpha.
|
|
27
|
-
"@nocobase/plugin-oidc": "0.9.2-alpha.
|
|
28
|
-
"@nocobase/plugin-saml": "0.9.2-alpha.
|
|
29
|
-
"@nocobase/plugin-sample-hello": "0.9.2-alpha.
|
|
30
|
-
"@nocobase/plugin-sequence-field": "0.9.2-alpha.
|
|
31
|
-
"@nocobase/plugin-snapshot-field": "0.9.2-alpha.
|
|
32
|
-
"@nocobase/plugin-system-settings": "0.9.2-alpha.
|
|
33
|
-
"@nocobase/plugin-ui-routes-storage": "0.9.2-alpha.
|
|
34
|
-
"@nocobase/plugin-ui-schema-storage": "0.9.2-alpha.
|
|
35
|
-
"@nocobase/plugin-users": "0.9.2-alpha.
|
|
36
|
-
"@nocobase/plugin-verification": "0.9.2-alpha.
|
|
37
|
-
"@nocobase/plugin-workflow": "0.9.2-alpha.
|
|
38
|
-
"@nocobase/server": "0.9.2-alpha.
|
|
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": "
|
|
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 (
|
|
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 (
|
|
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
|
});
|