@ditojs/server 1.5.4 → 1.6.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.
Files changed (2) hide show
  1. package/package.json +17 -19
  2. package/src/cli/index.js +4 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/server",
3
- "version": "1.5.4",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "description": "Dito.js Server – Dito.js is a declarative and modern web framework, based on Objection.js, Koa.js and Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/server",
@@ -21,23 +21,23 @@
21
21
  "node >= 16"
22
22
  ],
23
23
  "dependencies": {
24
- "@ditojs/admin": "^1.5.0",
25
- "@ditojs/build": "^1.5.0",
26
- "@ditojs/router": "^1.5.0",
27
- "@ditojs/utils": "^1.5.0",
24
+ "@ditojs/admin": "^1.6.0",
25
+ "@ditojs/build": "^1.5.5",
26
+ "@ditojs/router": "^1.6.0",
27
+ "@ditojs/utils": "^1.6.0",
28
28
  "@koa/cors": "^3.3.0",
29
29
  "@koa/multer": "^3.0.0",
30
30
  "@originjs/vite-plugin-commonjs": "^1.0.3",
31
31
  "ajv": "^8.11.0",
32
32
  "ajv-formats": "^2.1.1",
33
- "aws-sdk": "^2.1108.0",
34
- "axios": "^0.26.1",
33
+ "aws-sdk": "^2.1135.0",
34
+ "axios": "^0.27.2",
35
35
  "bcryptjs": "^2.4.3",
36
36
  "bytes": "^3.1.2",
37
37
  "data-uri-to-buffer": "^4.0.0",
38
38
  "eventemitter2": "^6.4.5",
39
39
  "file-type": "^17.1.1",
40
- "fs-extra": "^10.0.1",
40
+ "fs-extra": "^10.1.0",
41
41
  "image-size": "^1.0.1",
42
42
  "is-svg": "^4.3.2",
43
43
  "koa": "^2.13.4",
@@ -55,31 +55,29 @@
55
55
  "mime-types": "^2.1.35",
56
56
  "multer": "^1.4.4",
57
57
  "multer-s3": "^2.10.0",
58
- "nanoid": "^3.3.2",
58
+ "nanoid": "^3.3.4",
59
59
  "parse-duration": "^1.0.2",
60
60
  "passport-local": "^1.0.0",
61
61
  "passthrough-counter": "^1.0.0",
62
62
  "picocolors": "^1.0.0",
63
63
  "picomatch": "^2.3.1",
64
- "pino": "^7.9.2",
65
- "pino-pretty": "^7.6.0",
64
+ "pino": "^7.11.0",
65
+ "pino-pretty": "^7.6.1",
66
66
  "pluralize": "^8.0.0",
67
67
  "repl": "^0.1.3",
68
68
  "uuid": "^8.3.2",
69
- "vite": "^2.9.1",
70
- "vite-plugin-vue2": "^1.9.3",
69
+ "vite": "^2.9.9",
70
+ "vite-plugin-vue2": "^2.0.0",
71
71
  "vue": "^2.6.14",
72
72
  "vue-template-compiler": "^2.6.14"
73
73
  },
74
74
  "peerDependencies": {
75
- "knex": "^1.0.4",
75
+ "knex": "^1.0.5",
76
76
  "objection": "^3.0.1"
77
77
  },
78
78
  "devDependencies": {
79
- "knex": "^1.0.5",
80
- "objection": "^3.0.1",
81
- "pg": "^8.7.3",
82
- "sqlite3": "^5.0.2"
79
+ "knex": "^2.0.0",
80
+ "objection": "^3.0.1"
83
81
  },
84
- "gitHead": "fa4ff0e996e9d043a226d54c5e9ab263ccf1ad5f"
82
+ "gitHead": "a442b0e47237fef8aeb65793fa3f5bc6621442ce"
85
83
  }
package/src/cli/index.js CHANGED
@@ -8,10 +8,6 @@ import { isPlainObject, isFunction, camelize } from '@ditojs/utils'
8
8
  import * as db from './db/index.js'
9
9
  import startConsole from './console.js'
10
10
 
11
- // Tell Knex to use ESM. TODO: Fix this properly in Knex itself, so it works
12
- // with Yarn too.
13
- process.env.npm_package_type = 'module'
14
-
15
11
  const commands = { db, console: startConsole }
16
12
 
17
13
  function getCommand(commands, parts) {
@@ -44,7 +40,10 @@ async function execute() {
44
40
  }
45
41
  if (isFunction(arg)) {
46
42
  arg = await arg()
47
- } else if (isPlainObject(arg) && arg.knex) {
43
+ }
44
+ if (isPlainObject(arg) && arg.knex) {
45
+ // A config object with a knex field was passed in, create a knex object
46
+ // from it to pass on to the execute function.
48
47
  arg = Knex(arg.knex)
49
48
  }
50
49
  const res = await execute(arg, ...args)