@nocobase/server 0.7.0-alpha.56 → 0.7.0-alpha.59

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.
@@ -22,13 +22,13 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
22
22
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
23
23
 
24
24
  var _default = app => {
25
- app.command('install').option('-f, --force').option('-c, --clean').option('-s, --silent').action( /*#__PURE__*/_asyncToGenerator(function* (...cliArgs) {
25
+ app.command('install').option('-f, --force').option('-c, --clean').option('-s, --silent').option('-r, --repeat [repeat]').action( /*#__PURE__*/_asyncToGenerator(function* (...cliArgs) {
26
26
  let installed = false;
27
27
  const opts = cliArgs[0];
28
28
 
29
29
  try {
30
30
  yield app.db.auth({
31
- repeat: 1
31
+ repeat: opts.repeat || 1
32
32
  });
33
33
  } catch (error) {
34
34
  console.log(_chalk().default.red('Unable to connect to the database. Please check the database environment variables in the .env file.'));
@@ -35,12 +35,14 @@ function dataWrapping() {
35
35
  }
36
36
 
37
37
  if (!ctx.body) {
38
- ctx.body = {};
38
+ if (ctx.action.actionName == 'get') {
39
+ ctx.status = 404;
40
+ }
39
41
  }
40
42
 
41
- const _ctx$body = ctx.body,
42
- rows = _ctx$body.rows,
43
- meta = _objectWithoutProperties(_ctx$body, _excluded);
43
+ const _ref = ctx.body || {},
44
+ rows = _ref.rows,
45
+ meta = _objectWithoutProperties(_ref, _excluded);
44
46
 
45
47
  if (rows) {
46
48
  ctx.body = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "0.7.0-alpha.56",
3
+ "version": "0.7.0-alpha.59",
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.0-alpha.56",
17
- "@nocobase/actions": "0.7.0-alpha.56",
18
- "@nocobase/database": "0.7.0-alpha.56",
19
- "@nocobase/resourcer": "0.7.0-alpha.56",
16
+ "@nocobase/acl": "0.7.0-alpha.59",
17
+ "@nocobase/actions": "0.7.0-alpha.59",
18
+ "@nocobase/database": "0.7.0-alpha.59",
19
+ "@nocobase/resourcer": "0.7.0-alpha.59",
20
20
  "chalk": "^4.1.1",
21
21
  "commander": "^9.2.0",
22
22
  "find-package-json": "^1.2.0",
@@ -26,5 +26,5 @@
26
26
  "koa-static": "^5.0.0",
27
27
  "lodash": "^4.17.21"
28
28
  },
29
- "gitHead": "9a8c05e8fb26029f1d1ba68408a8bddac0e67a76"
29
+ "gitHead": "c90e5aee4c8257a3ab7ff492e69cb568cccff8b5"
30
30
  }