@ditojs/server 2.18.0 → 2.20.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/server",
3
- "version": "2.18.0",
3
+ "version": "2.20.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",
@@ -22,15 +22,15 @@
22
22
  "node >= 18"
23
23
  ],
24
24
  "dependencies": {
25
- "@ditojs/admin": "^2.18.0",
26
- "@ditojs/build": "^2.18.0",
27
- "@ditojs/router": "^2.18.0",
28
- "@ditojs/utils": "^2.18.0",
25
+ "@ditojs/admin": "^2.20.0",
26
+ "@ditojs/build": "^2.20.0",
27
+ "@ditojs/router": "^2.20.0",
28
+ "@ditojs/utils": "^2.20.0",
29
29
  "@koa/cors": "^5.0.0",
30
30
  "@koa/multer": "^3.0.2",
31
31
  "@originjs/vite-plugin-commonjs": "^1.0.3",
32
32
  "@vitejs/plugin-vue": "^4.5.2",
33
- "@vue/compiler-sfc": "^3.3.11",
33
+ "@vue/compiler-sfc": "~3.3.13",
34
34
  "ajv": "^8.12.0",
35
35
  "ajv-formats": "^2.1.1",
36
36
  "bcryptjs": "^2.4.3",
@@ -38,7 +38,7 @@
38
38
  "data-uri-to-buffer": "^6.0.1",
39
39
  "eventemitter2": "^6.4.9",
40
40
  "file-type": "^18.7.0",
41
- "koa": "^2.14.2",
41
+ "koa": "^2.15.0",
42
42
  "koa-bodyparser": "^4.4.1",
43
43
  "koa-compose": "^4.1.0",
44
44
  "koa-compress": "^5.1.1",
@@ -60,14 +60,14 @@
60
60
  "passthrough-counter": "^1.0.0",
61
61
  "picocolors": "^1.0.0",
62
62
  "picomatch": "^3.0.1",
63
- "pino": "^8.16.2",
64
- "pino-pretty": "^10.2.3",
63
+ "pino": "^8.17.2",
64
+ "pino-pretty": "^10.3.1",
65
65
  "pluralize": "^8.0.0",
66
66
  "repl": "^0.1.3",
67
- "type-fest": "^4.8.3",
67
+ "type-fest": "^4.9.0",
68
68
  "uuid": "^9.0.1",
69
- "vite": "^5.0.8",
70
- "vue": "^3.3.11"
69
+ "vite": "^5.0.10",
70
+ "vue": "~3.3.13"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@aws-sdk/client-s3": "^3.0.0",
@@ -81,14 +81,14 @@
81
81
  "@types/koa-response-time": "^2.1.5",
82
82
  "@types/koa-session": "^6.4.5",
83
83
  "@types/koa-static": "^4.0.4",
84
- "@types/koa__cors": "^4.0.3",
85
- "@types/node": "^20.10.4",
84
+ "@types/koa__cors": "^5.0.0",
85
+ "@types/node": "^20.10.6",
86
86
  "knex": "^3.1.0",
87
87
  "objection": "^3.1.3",
88
88
  "typescript": "^5.3.3"
89
89
  },
90
90
  "types": "types",
91
- "gitHead": "a19a3a9b1378a2da1edd05e88d383f48b2932f75",
91
+ "gitHead": "0b20aaa0bcc4e3f2ea740a44d17a53e1f3bca577",
92
92
  "scripts": {
93
93
  "types": "tsc --noEmit --esModuleInterop ./types/index.d.ts"
94
94
  },
@@ -11,7 +11,7 @@ export function logRequests({ ignoreUrlPattern } = {}) {
11
11
  return next()
12
12
  }
13
13
  // request
14
- const start = Date.now()
14
+ const start = performance.now()
15
15
 
16
16
  logRequest(ctx)
17
17
 
@@ -108,8 +108,10 @@ function logResponse({ ctx, start, length, err }) {
108
108
  }
109
109
 
110
110
  function formatTime(start) {
111
- const delta = Date.now() - start
112
- return delta < 10000 ? delta + 'ms' : Math.round(delta / 1000) + 's'
111
+ const delta = performance.now() - start
112
+ return delta < 10000
113
+ ? +delta.toFixed(2) + 'ms'
114
+ : +(delta / 1000).toFixed(2) + 's'
113
115
  }
114
116
 
115
117
  const colorCodes = {