@ontrails/hono 1.0.0-beta.18 → 1.0.0-beta.19
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 +32 -0
- package/README.md +4 -12
- package/package.json +8 -3
- package/src/surface.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @ontrails/hono
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e41c382: Document beta-channel install guidance in package and adapter README install snippets so consumers use explicit `@beta` (or pinned `1.0.0-beta.N`) tags instead of accidental `latest` resolution during the prerelease line. Adds the policy doc at `docs/releases/beta-channel-policy.md`, prints both `latest` and `beta` dist-tags in `bun run publish:registry-check`, and aligns plugin/skill install snippets.
|
|
8
|
+
- ed5926b: Add missing TSDoc for public adapter and sink boundary types.
|
|
9
|
+
- 8105f53: Declare the Hono package as an extracted HTTP adapter and dogfood the shared
|
|
10
|
+
adapter authoring check path against its owner conformance test.
|
|
11
|
+
- Updated dependencies [e41c382]
|
|
12
|
+
- Updated dependencies [1eb5bdc]
|
|
13
|
+
- Updated dependencies [f8d80b9]
|
|
14
|
+
- Updated dependencies [94a8380]
|
|
15
|
+
- Updated dependencies [94a8380]
|
|
16
|
+
- Updated dependencies [846a597]
|
|
17
|
+
- Updated dependencies [223aaad]
|
|
18
|
+
- Updated dependencies [3125f4d]
|
|
19
|
+
- Updated dependencies [2494dc6]
|
|
20
|
+
- Updated dependencies [2d53717]
|
|
21
|
+
- Updated dependencies [16cb740]
|
|
22
|
+
- Updated dependencies [8894ecb]
|
|
23
|
+
- Updated dependencies [fdf7ec9]
|
|
24
|
+
- Updated dependencies [d76be13]
|
|
25
|
+
- Updated dependencies [84f56a5]
|
|
26
|
+
- Updated dependencies [431b04c]
|
|
27
|
+
- Updated dependencies [5d88104]
|
|
28
|
+
- Updated dependencies [f04a9ef]
|
|
29
|
+
- Updated dependencies [fc00aeb]
|
|
30
|
+
- Updated dependencies [ab1c77c]
|
|
31
|
+
- Updated dependencies [8ca5b85]
|
|
32
|
+
- @ontrails/core@1.0.0-beta.19
|
|
33
|
+
- @ontrails/http@1.0.0-beta.19
|
|
34
|
+
|
|
3
35
|
## 1.0.0-beta.18
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -11,8 +11,7 @@ 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:
|
|
14
|
+
JSON request bodies are capped at 1 MiB by default. Override the cap with `maxJsonBodyBytes` when a surface intentionally accepts larger JSON payloads:
|
|
16
15
|
|
|
17
16
|
```typescript
|
|
18
17
|
await surface(graph, {
|
|
@@ -21,23 +20,16 @@ await surface(graph, {
|
|
|
21
20
|
});
|
|
22
21
|
```
|
|
23
22
|
|
|
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`.
|
|
23
|
+
Pass `resolvePermit` to resolve HTTP `Authorization: Bearer ...` credentials into `ctx.permit` before protected trails execute. The adapter forwards request headers to the framework-agnostic HTTP route executor, so malformed Authorization headers return `401` and resolved permits with insufficient scopes return `403`.
|
|
29
24
|
|
|
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.
|
|
25
|
+
Generic non-TrailsError failures return a redacted 500 response while a redacted diagnostic projection is written to server diagnostics. `TrailsError` responses keep their taxonomy category and class name but redact sensitive message fragments before writing the public body.
|
|
34
26
|
|
|
35
27
|
For custom HTTP integrations or route inspection, keep using `deriveHttpRoutes()` from `@ontrails/http`. For a framework-neutral runtime handler, use `createRouteHandler()` or `createFetchHandler()` from `@ontrails/http/fetch`. For Bun-native serving without Hono, use `@ontrails/http/bun`.
|
|
36
28
|
|
|
37
29
|
## Installation
|
|
38
30
|
|
|
39
31
|
```bash
|
|
40
|
-
bun add @ontrails/http @ontrails/hono
|
|
32
|
+
bun add @ontrails/http@beta @ontrails/hono@beta
|
|
41
33
|
```
|
|
42
34
|
|
|
43
35
|
## Migration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ontrails/hono",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.19",
|
|
4
4
|
"files": [
|
|
5
5
|
"src/**/*.ts",
|
|
6
6
|
"!src/**/__tests__/**",
|
|
@@ -22,11 +22,16 @@
|
|
|
22
22
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ontrails/core": "^1.0.0-beta.
|
|
25
|
+
"@ontrails/core": "^1.0.0-beta.19",
|
|
26
26
|
"hono": "^4.7.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@ontrails/http": "^1.0.0-beta.
|
|
29
|
+
"@ontrails/http": "^1.0.0-beta.19",
|
|
30
30
|
"zod": "^4.3.5"
|
|
31
|
+
},
|
|
32
|
+
"trails": {
|
|
33
|
+
"adapter": {
|
|
34
|
+
"target": "http"
|
|
35
|
+
}
|
|
31
36
|
}
|
|
32
37
|
}
|
package/src/surface.ts
CHANGED
|
@@ -31,6 +31,9 @@ import { handleCaughtHonoError } from './caught-error.js';
|
|
|
31
31
|
// Options
|
|
32
32
|
// ---------------------------------------------------------------------------
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Options for building a Trails HTTP app on Hono.
|
|
36
|
+
*/
|
|
34
37
|
export interface CreateAppOptions extends BaseSurfaceOptions {
|
|
35
38
|
readonly basePath?: string | undefined;
|
|
36
39
|
readonly createContext?:
|
|
@@ -50,6 +53,9 @@ interface RuntimeOptions {
|
|
|
50
53
|
readonly maxJsonBodyBytes?: number | undefined;
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Runtime handle returned by the Hono surface.
|
|
58
|
+
*/
|
|
53
59
|
export interface SurfaceHttpResult {
|
|
54
60
|
readonly close: () => Promise<void>;
|
|
55
61
|
readonly url: string;
|