@peac/middleware-express 0.10.13 → 0.11.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/README.md +5 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -66,16 +66,16 @@ Type guard checking if the request has PEAC context attached.
|
|
|
66
66
|
|
|
67
67
|
## Configuration Options
|
|
68
68
|
|
|
69
|
-
- **`skip
|
|
70
|
-
- **`audienceExtractor
|
|
71
|
-
- **`subjectExtractor
|
|
72
|
-
- **`onError
|
|
69
|
+
- **`skip`**: Skip receipt generation for certain routes (e.g., health checks)
|
|
70
|
+
- **`audienceExtractor`**: Custom audience extraction from request (default: request origin)
|
|
71
|
+
- **`subjectExtractor`**: Custom subject extraction from request
|
|
72
|
+
- **`onError`**: Error handler for receipt generation failures (failures never break the response)
|
|
73
73
|
|
|
74
74
|
All options from `@peac/middleware-core` `MiddlewareConfig` are also supported (issuer, signingKey, keyId, expiresIn, transport, maxHeaderSize).
|
|
75
75
|
|
|
76
76
|
## Error Handling
|
|
77
77
|
|
|
78
|
-
Receipt generation failures are isolated
|
|
78
|
+
Receipt generation failures are isolated: they never break the HTTP response. By default, errors are logged to console. Provide an `onError` callback for custom handling.
|
|
79
79
|
|
|
80
80
|
## License
|
|
81
81
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peac/middleware-express",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Express.js middleware for automatic PEAC receipt issuance",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -33,21 +33,21 @@
|
|
|
33
33
|
"provenance": true
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@peac/middleware-core": "0.
|
|
36
|
+
"@peac/middleware-core": "0.11.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"express": "^4.18.0 || ^5.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/express": "^4.17.21",
|
|
43
|
-
"@types/node": "^
|
|
43
|
+
"@types/node": "^22.19.11",
|
|
44
44
|
"express": "^4.18.2",
|
|
45
45
|
"supertest": "^6.3.3",
|
|
46
46
|
"@types/supertest": "^6.0.2",
|
|
47
47
|
"typescript": "^5.3.3",
|
|
48
48
|
"vitest": "^4.0.0",
|
|
49
49
|
"tsup": "^8.0.0",
|
|
50
|
-
"@peac/crypto": "0.
|
|
50
|
+
"@peac/crypto": "0.11.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"prebuild": "rm -rf dist tsconfig.tsbuildinfo",
|