@zeroxsolutions/server 0.5.0 → 0.5.1
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
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.5.1 (2026-09-29)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **server:** name accept in vary on every negotiated response ([9978fd6](https://github.com/zeroxsolutions/zeroxsolutions/commit/9978fd6))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Claude Opus 5.5 (1M context)
|
|
10
|
+
- Lương Văn Tú
|
|
11
|
+
|
|
1
12
|
## 0.5.0 (2026-09-29)
|
|
2
13
|
|
|
3
14
|
### 🩹 Fixes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-negotiation.d.ts","sourceRoot":"","sources":["../src/content-negotiation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,GAAG;IAAE,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACvE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"content-negotiation.d.ts","sourceRoot":"","sources":["../src/content-negotiation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,iBAAiB,GAAG;IAAE,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACvE,iBAAiB,CAcnB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOxB,CAAC"}
|
|
@@ -20,6 +20,9 @@ import { errorResponse, JSON_API_MEDIA_TYPE } from '@zeroxsolutions/response';
|
|
|
20
20
|
export function jsonApiContentNegotiation(options) {
|
|
21
21
|
const supported = new Set(options.supportedExtensions ?? []);
|
|
22
22
|
return async (c, next) => {
|
|
23
|
+
// JSON:API v1.1: a server supporting the ext or profile parameters SHOULD name Accept in Vary. It is set
|
|
24
|
+
// before the decision so a refusal, which the error handler answers, carries it too.
|
|
25
|
+
c.header('Vary', 'Accept', { append: true });
|
|
23
26
|
const error = negotiateJsonApi(c.req.header('Content-Type'), c.req.header('Accept'), options.namespace, supported);
|
|
24
27
|
if (error)
|
|
25
28
|
throw error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeroxsolutions/server",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"tslib": "^2.3.0",
|
|
24
|
+
"@zeroxsolutions/query": "0.7.1",
|
|
24
25
|
"@zeroxsolutions/jsonapi": "0.13.0",
|
|
25
|
-
"@zeroxsolutions/response": "0.14.2"
|
|
26
|
-
"@zeroxsolutions/query": "0.7.1"
|
|
26
|
+
"@zeroxsolutions/response": "0.14.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@hono/zod-openapi": "^1.0.0",
|