vestauth 0.19.0 → 0.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/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- [Unreleased](https://github.com/vestauth/vestauth/compare/v0.19.0...main)
5
+ [Unreleased](https://github.com/vestauth/vestauth/compare/v0.20.0...main)
6
+
7
+ ## [0.20.0](https://github.com/vestauth/vestauth/compare/v0.19.0...v0.20.0) (2026-02-24)
8
+
9
+ ### Added
10
+
11
+ * Add server logs ([#37](https://github.com/vestauth/vestauth/pull/37))
6
12
 
7
13
  ## [0.19.0](https://github.com/vestauth/vestauth/compare/v0.18.2...v0.19.0) (2026-02-24)
8
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vestauth",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "auth for agents–from the creator of dotenvx",
5
5
  "keywords": [
6
6
  "vestauth",
@@ -22,6 +22,22 @@ let HOSTNAME = null
22
22
 
23
23
  const app = express()
24
24
  app.use(express.json())
25
+ app.use((req, res, next) => {
26
+ const startedAt = Date.now()
27
+
28
+ res.on('finish', () => {
29
+ const durationMs = Date.now() - startedAt
30
+ const host = req.get('host') || '-'
31
+ const contentLength = res.getHeader('content-length') || '-'
32
+
33
+ logger.info(
34
+ `at=info method=${req.method} path="${req.originalUrl}" status=${res.statusCode} ` +
35
+ `host="${host}" duration_ms=${durationMs} bytes=${contentLength}`
36
+ )
37
+ })
38
+
39
+ next()
40
+ })
25
41
 
26
42
  app.use((req, res, next) => {
27
43
  const hostNoPort = (req.headers.host || '').split(':')[0].toLowerCase()