@jini-ai/http-kit 0.7.3-next.3 → 0.7.4

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,5 +1,12 @@
1
1
  # @jini-ai/http-kit
2
2
 
3
+ ## 0.7.4
4
+
5
+ ### Changes
6
+
7
+ - Add request-context, reply, raw-route, and error-reporter support for reusable JSON route specifications.
8
+ - Merge Vary headers across middleware and route responses and omit bodies for 204, 205, and 304 responses.
9
+
3
10
  ## 0.7.2
4
11
 
5
12
  ### Patch Changes
@@ -16,7 +16,7 @@ const REFUSAL_BY_PARSER_TYPE = {
16
16
  };
17
17
  /** The neutral refusal for a parser error; `too-large` carries the parser's own byte limit. @complexity O(1). */
18
18
  function refusalFor({ error, limit }) {
19
- const { type, limit: parserLimit } = (error ?? {});
19
+ const { type, limit: parserLimit } = error;
20
20
  if (type === 'entity.too.large')
21
21
  return { reason: 'too-large', limit: typeof parserLimit === 'number' ? parserLimit : limit };
22
22
  return { reason: (typeof type === 'string' ? REFUSAL_BY_PARSER_TYPE[type] : undefined) ?? 'unreadable' };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/http-kit",
3
- "version": "0.7.3-next.3",
3
+ "version": "0.7.4",
4
4
  "description": "Generic Express transport primitives, request parsing, response serialization, origin guards and route-pack mounting.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -101,12 +101,12 @@
101
101
  "@types/express": "^4.17.21",
102
102
  "@vitest/coverage-v8": "^3.2.6",
103
103
  "express": "^4.21.0",
104
- "@jini-ai/core": "0.7.3-next.3",
105
- "@jini-ai/protocol": "0.7.3-next.3"
104
+ "@jini-ai/protocol": "0.7.4",
105
+ "@jini-ai/core": "0.7.4"
106
106
  },
107
107
  "dependencies": {
108
- "@jini-ai/protocol": "^0.7.3-next.3",
109
- "@jini-ai/core": "^0.7.3-next.3"
108
+ "@jini-ai/protocol": "^0.7.4",
109
+ "@jini-ai/core": "^0.7.4"
110
110
  },
111
111
  "scripts": {
112
112
  "build": "tsc -p tsconfig.json",