@owlmeans/server-api 0.1.18-rc.19 → 0.1.18-rc.20

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  # @owlmeans/server-api
2
2
 
3
- Fastify-based HTTP/WebSocket server with handler wrappers for the OwlMeans entrypoint system.
3
+ Fastify-based HTTP/WebSocket server with typed handler factories for the OwlMeans entrypoint system.
4
4
 
5
5
  ## Overview
6
6
 
7
- - `handleBody`, `handleParams`, `handleRequest` wrap business logic with context injection and error handling
7
+ - `handlers<Context>()` creates protocol-bound `body()`, `params()`, `request()` and upload handlers
8
8
  - Built on [Fastify](https://fastify.dev/) — registered entrypoints become Fastify routes automatically
9
9
  - `createApiServer` / `appendApiServer` initialize the HTTP server in a context
10
10
  - Not typically used directly — import handlers from `@owlmeans/server-app`
@@ -17,54 +17,52 @@ bun add @owlmeans/server-api@^0.1.18-rc.16
17
17
 
18
18
  ## Usage
19
19
 
20
- Handler functions attached with `elevate()`:
20
+ Handlers are derived from the shared protocol and attached with `bind()`:
21
21
 
22
22
  ```typescript
23
- import { handleBody, handleParams, handleRequest } from '@owlmeans/server-app'
23
+ import { handlers } from '@owlmeans/server-api'
24
+ import { bind } from '@owlmeans/server-entrypoint'
25
+ import { projectEntrypoints } from 'project-common/entrypoints'
26
+
27
+ const api = handlers<Context>()
24
28
 
25
29
  // Body handler: receives parsed + validated body as first arg
26
- export const create = handleBody<CreateProject>(async (payload, context, req) => {
30
+ const create = api.body(projectEntrypoints.create, async (payload, context, req) => {
27
31
  const ctx = context as Context
28
32
  return await ctx.project().create({ ...payload, entityId: req.entity!.id })
29
33
  })
30
34
 
31
35
  // Params handler: receives validated URL params as first arg
32
- export const get = handleParams<{ id: string }>(async (params, context, req) => {
36
+ const get = api.params(projectEntrypoints.get, async (params, context, req) => {
33
37
  return await (context as Context).project().get(params.id)
34
38
  })
35
39
 
36
40
  // Request handler: receives the full AbstractRequest
37
- export const health = handleRequest(async (req, context) => {
41
+ const health = api.request(projectEntrypoints.health, async (req, context) => {
38
42
  return { status: 'ok' }
39
43
  })
40
- ```
41
-
42
- ## API
43
-
44
- ### `handleBody<T>(handler): RefedEntrypointHandler`
45
44
 
46
- Wraps a handler that receives the validated request body as the first argument.
47
- ```typescript
48
- handler: (payload: T, ctx: Context, req: AbstractRequest) => Promise<any>
45
+ export const entrypoints = [
46
+ bind(projectEntrypoints.create, create),
47
+ bind(projectEntrypoints.get, get),
48
+ bind(projectEntrypoints.health, health),
49
+ ]
49
50
  ```
50
51
 
51
- ### `handleParams<T>(handler): RefedEntrypointHandler`
52
-
53
- Wraps a handler that receives the validated URL params as the first argument.
54
- ```typescript
55
- handler: (payload: T, ctx: Context, req: AbstractRequest) => Promise<any>
56
- ```
52
+ ## API
57
53
 
58
- ### `handleRequest(handler): RefedEntrypointHandler`
54
+ ### `handlers<Context>()`
59
55
 
60
- Wraps a handler that receives the full request object.
56
+ Creates factories whose first argument is the protocol declaration, coupling the callback to its
57
+ request and response contract.
61
58
  ```typescript
62
- handler: (req: AbstractRequest, ctx: Context, res?: AbstractResponse) => Promise<any>
59
+ handlers<Context>().body(protocol, handler)
60
+ handlers<Context>().params(protocol, handler)
61
+ handlers<Context>().request(protocol, handler)
63
62
  ```
64
63
 
65
- ### `handleIntermediate(handler): RefedEntrypointHandler`
66
-
67
- Wraps middleware-layer handlers that do not return a final response.
64
+ Each callback returns the response value; thrown `ResilientError` subclasses are mapped by the
65
+ server. `uploadedFile(request)` remains the multipart boundary.
68
66
 
69
67
  ### `extractUploadedFile(req, fieldName): UploadedFile | null`
70
68
 
@@ -72,9 +70,9 @@ Extract a multipart-uploaded file from the request.
72
70
 
73
71
  ## Related Packages
74
72
 
75
- - [`@owlmeans/server-app`](../server-app) — re-exports all handlers; preferred import point
76
- - [`@owlmeans/server-entrypoint`](../server-entrypoint) — `elevate()` attaches handlers to entrypoints
77
- - [`@owlmeans/server-socket`](../server-socket) — WebSocket `handleConnection` counterpart
73
+ - [`@owlmeans/server-app`](../server-app) — application bootstrap and convenience re-exports
74
+ - [`@owlmeans/server-entrypoint`](../server-entrypoint) — `bind()` attaches handlers to protocols
75
+ - [`@owlmeans/server-socket`](../server-socket) — WebSocket `connection` counterpart
78
76
 
79
77
  <!-- owlmeans:agent-guidance:start -->
80
78
  ## Agent guidance
@@ -84,7 +82,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
84
82
  your project's skill store (`.agents/skills/`):
85
83
 
86
84
  ```sh
87
- npx @owlmeans/agent-skills@^0.1.18-rc.14
85
+ npx @owlmeans/agent-skills@^0.1.18-rc.15
88
86
  ```
89
87
 
90
88
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/server-api",
4
- "version": "0.1.18-rc.19",
5
- "generatedAt": "2026-09-10T23:12:07.499Z",
4
+ "version": "0.1.18-rc.20",
5
+ "generatedAt": "2026-09-12T08:39:52.711Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,225 +1,43 @@
1
1
  ---
2
2
  name: server-api
3
- description: How to use @owlmeans/server-api — typed protocol handlers, the Fastify-based API server factory, request pipeline, validation, holdApiPort() boot window, and error-to-status mapping. Auto-invoked when importing server-api types, writing protocol handlers, extending the middleware stack, or working out why a request answered the status it did.
3
+ description: Implement HTTP entrypoint protocols with @owlmeans/server-api handlers<Context>().body(), params(), request(), and uploadedFile(). Load before writing an API handler.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
7
7
 
8
8
  # @owlmeans/server-api
9
9
 
10
- **Layer:** Server
11
- **Install:** `"@owlmeans/server-api": "^0.1.18-rc.19"` in `dependencies`
10
+ Make handlers from the protocol declaration so input and output types stay coupled to the shared
11
+ contract:
12
12
 
13
- ## Key Exports
13
+ ```ts
14
+ const api = handlers<AppContext>()
14
15
 
15
- | Export | Description |
16
- |--------|-------------|
17
- | `handlers<Context>()` | Build `body`, `params`, and `request` handlers inferred from an immutable protocol |
18
- | `uploadedFile(request)` | Read Fastify multipart through the typed handler boundary |
19
- | `createApiServer(alias)` | Factory for the Fastify-based API server |
20
- | `appendApiServer(ctx, alias?)` | Register it and expose `ctx.getApiServer()` |
21
- | `handleRequest` / `handleBody` / `handleParams` / `handleIntermediate` | Wrap an async function as an entrypoint handler |
22
- | `extractUploadedFile(req)` | The multipart file behind a request, as `UploadedFile` |
23
- | `holdApiPort(cfg, opts?)` | Own the app's port during boot; the caller awaits `hold.release()` before `listen()` |
24
- | `ApiServer`, `ApiServerAppend`, `Request`, `Response`, `Config`, `Context` | Runtime and context shapes |
25
- | `ApiPortHold`, `ApiPortHoldOptions` | The hold handle and its `{ okPath?, payload? }` options |
26
- | `AuthFailedError` | Raised by the request pipeline when no guard matched or the matching guard refused — the only one of this package's own two errors the pipeline raises |
27
- | `AccessError` | Its 403 counterpart, for a guard, gate or handler to throw when an established identity lacks the permission; the pipeline never raises it |
28
- | `NoFileError` | For a handler to throw when `extractUploadedFile` finds no file; the pipeline never raises it |
29
- | Constants | `DEFAULT_ALIAS` (`api-server`), `PORT` (`80`), `CLOSED_HOST` (`127.0.0.1`), `OPENED_HOST` (`0.0.0.0`) |
16
+ const create = api.body(projectEntrypoints.create, async (body, context, request) =>
17
+ context.projects.create(body, request.auth)
18
+ )
30
19
 
31
- ## Subpath Exports
20
+ const get = api.params(projectEntrypoints.get, async ({ id }, context) =>
21
+ context.projects.get(id)
22
+ )
32
23
 
33
- - `./utils` — `handleError`, `authorize`, `provideRequest`, `executeResponse`, `populateContext`, `extractContext`, `canServeModule`, `createServerHandler`, `fixFormatDates`
24
+ const search = api.request(projectEntrypoints.search, async (request, context) =>
25
+ context.projects.search(request.query)
26
+ )
34
27
 
35
- ## Usage
36
-
37
- The server is normally constructed transparently by `@owlmeans/server-app#main()`. Use `server-api`
38
- directly only when you need to register raw Fastify plugins or customize transport:
39
-
40
- ```typescript
41
- import { appendApiServer } from '@owlmeans/server-api'
42
- appendApiServer(context)
43
- ```
44
-
45
- ## Writing handlers
46
-
47
- For a typed protocol, pass the declaration once and let `handlers<Context>()` infer every request
48
- section and the response. `body` and `params` are available only when the protocol contract
49
- declares that section; `request` receives the complete typed request plus alias/auth/entity/path
50
- metadata.
51
-
52
- ```typescript
53
- const handle = handlers<Context>()
54
-
55
- export const create = handle.body(item.create, async (payload, context, request) => {
56
- const owner = request.entity?.id
57
- return await context.resource<ItemResource>('item').create({ ...payload, owner })
58
- })
59
- ```
60
-
61
- The result is a protocol-bound implementation consumed by `bind(protocol, implementation)` from
62
- `@owlmeans/server-entrypoint` (both exports are available from `@owlmeans/server-app`). Throwing is
63
- still the failure path; the wrapper resolves successful returns with `EntrypointOutcome.Ok`.
64
- Use `uploadedFile(request)` when the protocol handler needs the Fastify multipart object.
65
-
66
- For a legacy entrypoint, `handleRequest(fn)` gives the whole request, `handleBody<T>(fn)` the
67
- validated body, `handleParams<T>(fn)` the validated URL params, and `handleIntermediate(fn)` a
68
- function that returns a context (or `null` to leave the chain unchanged) instead of a value.
69
-
70
- All handler forms resolve the handler's context the same
71
- way: from the request when it arrived over HTTP, and from the entrypoint's own context otherwise —
72
- the same handler runs unchanged when a queued job or a socket frame reaches it, and only the way it
73
- was reached differs.
74
-
75
- Throwing is the way to fail. A handler owns no status table; see the mapping below.
76
-
77
- ## What this server mounts
78
-
79
- `canServeModule` mounts a backend entrypoint only when the route's type is `Backend`, the route
80
- belongs to this service, its protocol is one HTTP carries, and the declaration has been elevated —
81
- the last test is `isIntermediate` on the route model, which only a server route model has. `SOCKET`
82
- and `QUEUE` are excluded: a socket is upgraded elsewhere and a queued job is taken off the broker by
83
- the worker, so mounting either here would answer the same call twice. Adding a protocol means
84
- excluding it here as well as binding its transport.
85
-
86
- ## Where a route is bound
87
-
88
- Every route is registered at `entrypoint.mount()` — `base` plus every ancestor's segment, then this
89
- one. A declaration states only the segment it contributes, so the full address takes the context the
90
- entrypoint is registered in, and the table can therefore only be built once the context has resolved.
91
- Intermediates are not bound as routes: they run in a `preHandler` hook, each testing
92
- `entrypoint.route.match(request, entrypoint.mount())` against the same mounted path and passing the
93
- context it produced down the chain. Once one of them has answered, the rest are skipped.
94
-
95
- A route is bound only when its entrypoint carries a `handle`. Guards and gates come from
96
- `getGuards()` / `getGates()`, which include everything the ancestors declared, and they run before
97
- the handler — a handler that re-checks them is duplicating an enforced rule.
98
-
99
- ## Guards, and the organization entity they resolve
100
-
101
- `authorize` (`./utils`) runs the guard chain: each alias from `getGuards()` is asked to `match()`,
102
- the first that does is asked to `handle()`, and a chain where none matches or the matching one
103
- refuses raises `AuthFailedError`. The admitted `Auth` is hung on the raw request as `_auth`, which
104
- `provideRequest` surfaces to the handler as `req.auth`.
105
-
106
- Immediately after that, and only when the entrypoint has guards, `authorize` calls `attachEntity`
107
- from `@owlmeans/auth-common`: the token names the organization by `entitySlug`, which is renameable,
108
- so the entity is resolved once here rather than in every handler. The resolution is hung on the raw
109
- request as `_entity` and reaches the handler as `req.entity` (`{ id, slug, iamKey }`), and
110
- `attachEntity` also rewrites `req.auth.entitySlug` to the entity's current slug, so a request that
111
- arrived under a retired name continues under the live one. It is a no-op where no entity resolver
112
- service is registered, and it raises `AuthenFailed` when the token names an organization that does
113
- not resolve.
114
-
115
- Two consequences a handler has to work by: there is **no id on the token** — `req.auth` carries the
116
- slug and nothing else about the organization, so `req.entity?.id` (or `entityKeyOf(req)` /
117
- `requireEntityKey(req)` from `@owlmeans/auth-common`) is the value to key records by; and an
118
- unguarded entrypoint gets neither `req.auth` nor `req.entity`, because the whole block is skipped
119
- when `getGuards()` is empty.
120
-
121
- ## Request validation
122
-
123
- The route schema is built from the entrypoint's `filter`: `querystring`, `params` and `headers`
124
- always, `body` only for `POST`, `PATCH` and `PUT`, and `response` as declared. Bodies are consumed
125
- as JSON, form-urlencoded or multipart.
126
-
127
- Ajv is configured with `coerceTypes`, `useDefaults` and `removeAdditional` — so a query string
128
- arrives typed, declared defaults are filled in, and **an undeclared property is dropped rather than
129
- rejected**: a field missing in a handler is usually a field missing from the filter. `fixFormatDates`
130
- rewrites `date-time` properties declared as objects into strings before compiling, so a schema
131
- generated from a record type validates the JSON that actually arrives.
132
-
133
- ## The plugins the server registers
134
-
135
- Registered on init, in this order — CORS, multipart, Helmet, raw body, middie — and worth knowing
136
- because they set limits an app cannot see from its handler:
137
-
138
- - **CORS** — `origin: '*'`, the full framework method set declared explicitly plus `HEAD` and
139
- `OPTIONS`, and the `auth-token-refresh` header exposed so a browser client can read a rotated
140
- token. The method list must stay explicit: a narrower default makes the browser reject every
141
- `PUT`/`PATCH`/`DELETE` at preflight while server-to-server callers keep working.
142
- - **Multipart** — fields attached to the body as key/values, at most 5 files of 5 MB each, over-size
143
- uploads throwing rather than truncating.
144
- - **Helmet**.
145
- - **Raw body** on the `rawBody` request field, captured before anything else (`runFirst`) — that is
146
- what a webhook signature check reads, since the parsed body cannot be re-serialized byte for byte.
147
- - **middie**, last, for connect-style middleware.
148
-
149
- The overall body limit is 20 MB.
150
-
151
- ## Listening
152
-
153
- `listen()` resolves the socket from the service's own declaration, `cfg.services[cfg.service]`:
154
- `internalPort ?? port ?? PORT`, and `OPENED_HOST` when `opened` is true, `CLOSED_HOST` otherwise. It
155
- also installs a `SIGTERM` handler that closes the server and exits 0. Initialization is re-entrant:
156
- an already-listening instance is closed and rebuilt, so re-initializing a context does not leave two
157
- servers on one port.
158
-
159
- ## Holding the port through the boot
160
-
161
- The server builds its route table from the entrypoints the context knows about, so it can only
162
- bind **after** `init()` resolves — and Fastify refuses new routes once it is listening. That
163
- leaves every way a boot can fail with nothing on the port: the edge answers a bare upstream
164
- connect error naming neither the app nor the reason.
165
-
166
- `holdApiPort` closes that window: a minimal Fastify instance binds the app's socket immediately —
167
- resolving port and host from the same `cfg.services[cfg.service]` declaration `listen()` uses —
168
- answers `okPath` with 200 and everything else with **503, not 404** (the real routes do not exist
169
- yet, and "no such route" would be a lie that outlives the boot), evaluating `payload()` per
170
- request so a changing boot phase is reported live.
171
-
172
- ```typescript
173
- const hold = await holdApiPort(ctx.cfg, { okPath: '/healtz', payload: bootPayload })
174
- try { await initialize() } catch (e) { recordFailure(e); return } // hold keeps answering
175
- await hold.release() // awaited — listen() binds on the next line
176
- await ctx.getApiServer().listen()
28
+ export const entrypoints = [
29
+ bind(projectEntrypoints.create, create),
30
+ bind(projectEntrypoints.get, get),
31
+ bind(projectEntrypoints.search, search),
32
+ ]
177
33
  ```
178
34
 
179
- `release()` awaits the actual close and force-closes keep-alive connections, so a supervisor's own
180
- poller cannot hold the handover open.
181
-
182
- Two rules the caller owns: a **bind failure is fatal and loud** — name it (EADDRINUSE above all)
183
- and `process.exit(1)`, because carrying on ends the boot with nothing listening and nothing
184
- holding the event loop, a clean exit 0 while a stale predecessor keeps serving; and a **failed
185
- init returns without exiting** — the hold keeps the loop open and is the only thing that can say
186
- why.
187
-
188
- ## Error → HTTP status
189
-
190
- `handleError` (`./utils`) is the single mapping from a thrown error to a status. Handlers own no
191
- status table: they throw, and this decides. Two families are recognised — this package's own
192
- `AuthFailedError` and `AccessError`, of which only `AuthFailedError` is raised by the pipeline, and
193
- `AuthForbidden` / `AuthorizationError` from `@owlmeans/auth`, which is what guards and gates throw.
194
-
195
- | Thrown | Status | Meaning |
196
- |--------|--------|---------|
197
- | `AuthForbidden`, `AccessError` | `403` | An established identity that lacks the permission — re-authenticating changes nothing |
198
- | `AuthorizationError`, `AuthFailedError` | `401` | No usable credential: absent, expired, revoked, or naming a session this server does not hold |
199
- | anything else | `500` | |
200
-
201
- **Order matters.** `AuthForbidden extends AuthorizationError`, so the 403 branch is tested first —
202
- otherwise every refusal of a permission is reported as a failure to authenticate. And an
203
- unrecognised refusal answering 500 reports a refused request as a crashed server: the client cannot
204
- tell "sign in again" from "the service is broken", and a consumer watching statuses concludes the
205
- application fell over.
206
-
207
- `AuthenFailed` — the error `attachEntity` raises inside this same pipeline when the token names an
208
- organization that does not resolve — belongs to neither family: it extends `AuthManagerError`, not
209
- `AuthorizationError`. It therefore falls through to **500**, not 401. Treat a 500 on a guarded
210
- entrypoint as a candidate unresolvable organization entity, and give a gate or handler that wants a
211
- 401 there one of the two recognised families to throw.
212
-
213
- The body is always `ResilientError.marshal(ResilientError.ensure(error)).message`, and nothing is
214
- written when the reply was already sent. An entrypoint that names a `fixer` gets that service
215
- instead — it renders the error onto the reply itself and `handleError` never runs.
216
-
217
- ## Depends On
35
+ `body` and `params` are available only for a protocol declaring that section. `request` works for
36
+ any protocol and receives all its typed sections plus request metadata. A successful callback
37
+ return resolves the entrypoint with `EntrypointOutcome.Ok`; a thrown error rejects it.
218
38
 
219
- - `@owlmeans/context`, `@owlmeans/entrypoint`, `@owlmeans/route`, `@owlmeans/server-context`, `@owlmeans/server-entrypoint`
220
- - `@owlmeans/auth` (the error family the guards throw), `@owlmeans/auth-common`, `@owlmeans/error`, `@owlmeans/api` (status constants)
221
- - `fastify` (runtime) with `@fastify/cors`, `@fastify/helmet`, `@fastify/middie`, `@fastify/multipart`, `fastify-raw-body`, `ajv-errors`
39
+ `uploadedFile(request)` is the Fastify multipart boundary. Keep raw Fastify access there rather
40
+ than reaching through `request.original` in application code.
222
41
 
223
- `ajv` and `ajv-formats` are **peer** dependencies, not runtime ones — the validator compiler is
224
- built from them, so installing this package without also depending on both leaves unmet peers and a
225
- server that cannot compile a route schema. Declare them alongside `@owlmeans/server-api`.
42
+ Do not use unbound compatibility handler wrappers. For a WebSocket route use
43
+ `@owlmeans/server-socket`'s `connection(protocol, callback)`.
package/build/server.js CHANGED
@@ -106,7 +106,7 @@ export const createApiServer = (alias) => {
106
106
  if (responded || reply.sent) {
107
107
  return context;
108
108
  }
109
- // Actually intermediate module can be created without handler by elevate function
109
+ // An intermediate route can be created without a handler by the binding layer.
110
110
  if (module.route.match(request, module.mount()) && module.handle != null) {
111
111
  const response = provideResponse(reply);
112
112
  const currentRequest = provideRequest(module.alias, request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AC,CAAA;QAEJ,OAAO,CAAC,WAAW,GAAG,IAAI,CAAA;IAC5B,CAAC,CAAC,CAAA;IAEF,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,GAAM,EAAE,KAAK,GAAW,aAAa,EAChB,EAAE;IACvB,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IACtC,MAAM,OAAO,GAAG,GAA0B,CAAA;IAE1C,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IAEhC,IAAI,OAAO,CAAC,YAAY,IAAI,IAAI,EAAE,CAAC;QACjC,OAAO,CAAC,YAAY,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACzD,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/server-api",
3
- "version": "0.1.18-rc.19",
3
+ "version": "0.1.18-rc.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -32,15 +32,15 @@
32
32
  "@fastify/helmet": "^13.1.0",
33
33
  "@fastify/middie": "^9.0.2",
34
34
  "@fastify/multipart": "^9.0.1",
35
- "@owlmeans/api": "^0.1.18-rc.15",
36
- "@owlmeans/auth": "^0.1.18-rc.11",
37
- "@owlmeans/auth-common": "^0.1.18-rc.15",
38
- "@owlmeans/context": "^0.1.18-rc.10",
39
- "@owlmeans/error": "^0.1.18-rc.10",
40
- "@owlmeans/entrypoint": "^0.1.18-rc.13",
41
- "@owlmeans/route": "^0.1.18-rc.11",
42
- "@owlmeans/server-context": "^0.1.18-rc.14",
43
- "@owlmeans/server-entrypoint": "^0.1.18-rc.13",
35
+ "@owlmeans/api": "^0.1.18-rc.16",
36
+ "@owlmeans/auth": "^0.1.18-rc.12",
37
+ "@owlmeans/auth-common": "^0.1.18-rc.16",
38
+ "@owlmeans/context": "^0.1.18-rc.11",
39
+ "@owlmeans/error": "^0.1.18-rc.11",
40
+ "@owlmeans/entrypoint": "^0.1.18-rc.14",
41
+ "@owlmeans/route": "^0.1.18-rc.12",
42
+ "@owlmeans/server-context": "^0.1.18-rc.15",
43
+ "@owlmeans/server-entrypoint": "^0.1.18-rc.14",
44
44
  "ajv-errors": "^3.0.0",
45
45
  "fastify": "^5.0.0",
46
46
  "fastify-raw-body": "^5.0.0",
package/src/server.ts CHANGED
@@ -131,7 +131,7 @@ export const createApiServer = (alias: string): ApiServer => {
131
131
  return context
132
132
  }
133
133
 
134
- // Actually intermediate module can be created without handler by elevate function
134
+ // An intermediate route can be created without a handler by the binding layer.
135
135
  if (module.route.match(request, module.mount()) && module.handle != null) {
136
136
  const response = provideResponse(reply)
137
137
  const currentRequest = provideRequest(module.alias, request, true)
@@ -200,4 +200,3 @@ export const appendApiServer = <C extends Config, T extends ServerContext<C>>(
200
200
  return context
201
201
  }
202
202
 
203
-