@nocobase/server 0.7.2-alpha.4 → 0.7.2-alpha.7
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/application.js
CHANGED
|
@@ -158,7 +158,12 @@ class ApplicationVersion {
|
|
|
158
158
|
return _asyncToGenerator(function* () {
|
|
159
159
|
if (yield _this3.app.db.collectionExistsInDb('applicationVersion')) {
|
|
160
160
|
const model = yield _this3.collection.model.findOne();
|
|
161
|
-
const version = model.
|
|
161
|
+
const version = model === null || model === void 0 ? void 0 : model.value;
|
|
162
|
+
|
|
163
|
+
if (!version) {
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
|
|
162
167
|
return _semver().default.satisfies(version, range);
|
|
163
168
|
}
|
|
164
169
|
|
|
@@ -415,6 +420,7 @@ class Application extends _koa().default {
|
|
|
415
420
|
var _this10 = this;
|
|
416
421
|
|
|
417
422
|
return _asyncToGenerator(function* () {
|
|
423
|
+
yield _this10.emitAsync('beforeUpgrade', _this10, options);
|
|
418
424
|
const force = false;
|
|
419
425
|
yield _this10.db.migrator.up();
|
|
420
426
|
yield _this10.db.sync({
|
|
@@ -424,6 +430,7 @@ class Application extends _koa().default {
|
|
|
424
430
|
}
|
|
425
431
|
});
|
|
426
432
|
yield _this10.version.update();
|
|
433
|
+
yield _this10.emitAsync('afterUpgrade', _this10, options);
|
|
427
434
|
})();
|
|
428
435
|
}
|
|
429
436
|
|
package/lib/commands/db-sync.js
CHANGED
|
@@ -13,8 +13,8 @@ var _default = app => {
|
|
|
13
13
|
app.command('db:sync').action( /*#__PURE__*/_asyncToGenerator(function* (...cliArgs) {
|
|
14
14
|
const opts = cliArgs[0];
|
|
15
15
|
console.log('db sync...');
|
|
16
|
+
yield app.emitAsync('cli.beforeDbSync', ...cliArgs);
|
|
16
17
|
const force = false;
|
|
17
|
-
yield app.start();
|
|
18
18
|
yield app.db.sync({
|
|
19
19
|
force,
|
|
20
20
|
alter: {
|
package/lib/commands/migrator.js
CHANGED
|
@@ -12,8 +12,8 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
12
12
|
var _default = app => {
|
|
13
13
|
app.command('migrator').action( /*#__PURE__*/function () {
|
|
14
14
|
var _ref = _asyncToGenerator(function* (opts) {
|
|
15
|
-
yield app.start();
|
|
16
15
|
console.log('migrating...');
|
|
16
|
+
yield app.emitAsync('cli.beforeMigrator', opts);
|
|
17
17
|
yield app.db.migrator.runAsCLI(process.argv.slice(3));
|
|
18
18
|
yield app.stop();
|
|
19
19
|
});
|
package/lib/commands/upgrade.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/server",
|
|
3
|
-
"version": "0.7.2-alpha.
|
|
3
|
+
"version": "0.7.2-alpha.7",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@koa/cors": "^3.1.0",
|
|
15
15
|
"@koa/router": "^9.4.0",
|
|
16
|
-
"@nocobase/acl": "0.7.2-alpha.
|
|
17
|
-
"@nocobase/actions": "0.7.2-alpha.
|
|
18
|
-
"@nocobase/database": "0.7.2-alpha.
|
|
19
|
-
"@nocobase/resourcer": "0.7.2-alpha.
|
|
16
|
+
"@nocobase/acl": "0.7.2-alpha.7",
|
|
17
|
+
"@nocobase/actions": "0.7.2-alpha.7",
|
|
18
|
+
"@nocobase/database": "0.7.2-alpha.7",
|
|
19
|
+
"@nocobase/resourcer": "0.7.2-alpha.7",
|
|
20
20
|
"chalk": "^4.1.1",
|
|
21
21
|
"commander": "^9.2.0",
|
|
22
22
|
"find-package-json": "^1.2.0",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/semver": "^7.3.9"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "c34194ae51395346b7cf1d1b6b5e127597d956ab"
|
|
34
34
|
}
|