@ontrails/hono 1.0.0-beta.15 → 1.0.0-beta.16

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,48 @@
1
1
  # @ontrails/hono
2
2
 
3
+ ## 1.0.0-beta.16
4
+
5
+ ### Patch Changes
6
+
7
+ - f5c6777: Move adapter package workspaces from `connectors/*` to `adapters/*` as part of
8
+ the package-boundary taxonomy cutover. Package names and public APIs are
9
+ unchanged.
10
+ - 6300f70: Refresh source comments and test labels for retired connector terminology as adapter guardrails become strict.
11
+ - 20d7a5c: Enforce the shared safe error projection policy for public error bodies, diagnostics, serialized payloads, and CLI stderr.
12
+ - 95bf132: Wire HTTP permit resolution through the Hono adapter, including request headers for Bearer Authorization handling.
13
+ - 729f957: Harden the Hono surface by capping JSON request bodies at 1 MiB by default and
14
+ redacting generic internal errors while preserving server-side diagnostics.
15
+ - 49c2e7d: Refresh published package README taxonomy to use adapter language instead of retired connector vocabulary.
16
+ - df9a7d0: Add project-aware public export-map governance for @ontrails workspace docs,
17
+ imports, root barrels, and bin-only package surfaces.
18
+ - Updated dependencies [73622ae]
19
+ - Updated dependencies [6300f70]
20
+ - Updated dependencies [d172013]
21
+ - Updated dependencies [c3fc5c3]
22
+ - Updated dependencies [20d7a5c]
23
+ - Updated dependencies [be5fb46]
24
+ - Updated dependencies [95bf132]
25
+ - Updated dependencies [e898cc4]
26
+ - Updated dependencies [2bf239e]
27
+ - Updated dependencies [3395234]
28
+ - Updated dependencies [bcdc484]
29
+ - Updated dependencies [49c2e7d]
30
+ - Updated dependencies [331e3a9]
31
+ - Updated dependencies [4399fdb]
32
+ - Updated dependencies [4b8d13b]
33
+ - Updated dependencies [112b9f2]
34
+ - Updated dependencies [893025e]
35
+ - Updated dependencies [eec5e9d]
36
+ - Updated dependencies [ebd4434]
37
+ - Updated dependencies [863d473]
38
+ - Updated dependencies [344f2f7]
39
+ - Updated dependencies [26f9ffd]
40
+ - Updated dependencies [10eae9a]
41
+ - Updated dependencies [22c6c06]
42
+ - Updated dependencies [df9a7d0]
43
+ - @ontrails/core@1.0.0-beta.16
44
+ - @ontrails/http@1.0.0-beta.16
45
+
3
46
  ## 1.0.0-beta.15
4
47
 
5
48
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @ontrails/hono
2
2
 
3
- Hono surface connector for Trails. Use this package when you want to serve a topo over HTTP with Hono while keeping `@ontrails/http` focused on framework-agnostic route building.
3
+ Hono surface adapter for Trails. Use this package when you want to serve a topo over HTTP with Hono while keeping `@ontrails/http` focused on framework-agnostic route building.
4
4
 
5
5
  ## Usage
6
6
 
@@ -11,6 +11,27 @@ import { graph } from './app';
11
11
  await surface(graph, { port: 3000 });
12
12
  ```
13
13
 
14
+ JSON request bodies are capped at 1 MiB by default. Override the cap with
15
+ `maxJsonBodyBytes` when a surface intentionally accepts larger JSON payloads:
16
+
17
+ ```typescript
18
+ await surface(graph, {
19
+ maxJsonBodyBytes: 2 * 1024 * 1024,
20
+ port: 3000,
21
+ });
22
+ ```
23
+
24
+ Pass `resolvePermit` to resolve HTTP `Authorization: Bearer ...` credentials
25
+ into `ctx.permit` before protected trails execute. The adapter forwards request
26
+ headers to the framework-agnostic HTTP route executor, so malformed
27
+ Authorization headers return `401` and resolved permits with insufficient scopes
28
+ return `403`.
29
+
30
+ Generic non-TrailsError failures return a redacted 500 response while a
31
+ redacted diagnostic projection is written to server diagnostics. `TrailsError`
32
+ responses keep their taxonomy category and class name but redact sensitive
33
+ message fragments before writing the public body.
34
+
14
35
  For custom HTTP integrations or route inspection, keep using `deriveHttpRoutes()` from `@ontrails/http`.
15
36
 
16
37
  ## Installation
@@ -21,7 +42,9 @@ bun add @ontrails/http @ontrails/hono
21
42
 
22
43
  ## Migration
23
44
 
45
+ <!-- warden-ignore-next-line -->
24
46
  This package replaces the old `@ontrails/http/hono` subpath.
25
47
 
48
+ <!-- warden-ignore-next-line -->
26
49
  - Before: `import { trailhead } from '@ontrails/http/hono'`
27
50
  - After: `import { surface } from '@ontrails/hono'`
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "@ontrails/hono",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.16",
4
+ "files": [
5
+ "src/**/*.ts",
6
+ "!src/**/__tests__/**",
7
+ "!src/**/*.test.ts",
8
+ "!src/**/*.test-d.ts",
9
+ "README.md",
10
+ "CHANGELOG.md"
11
+ ],
4
12
  "type": "module",
5
13
  "exports": {
6
14
  ".": "./src/index.ts",
@@ -14,11 +22,11 @@
14
22
  "clean": "rm -rf dist *.tsbuildinfo"
15
23
  },
16
24
  "dependencies": {
17
- "@ontrails/core": "^1.0.0-beta.14",
25
+ "@ontrails/core": "^1.0.0-beta.15",
18
26
  "hono": "^4.7.0"
19
27
  },
20
28
  "peerDependencies": {
21
- "@ontrails/http": "^1.0.0-beta.14",
29
+ "@ontrails/http": "^1.0.0-beta.15",
22
30
  "zod": "^4.3.5"
23
31
  }
24
32
  }