@orkestrel/server 0.0.17 → 0.0.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/README.md +15 -11
- package/dist/src/server/index.cjs +595 -441
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +778 -531
- package/dist/src/server/index.d.ts +778 -531
- package/dist/src/server/index.js +587 -435
- package/dist/src/server/index.js.map +1 -1
- package/package.json +18 -20
package/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# @orkestrel/server
|
|
2
2
|
|
|
3
|
-
A typed HTTP server for the `@orkestrel` line
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
> A typed HTTP server for the `@orkestrel` line: a node-bound `Server` lifecycle entity
|
|
4
|
+
> that composes a middleware onion around a consumed `@orkestrel/router` dispatcher,
|
|
5
|
+
> beside the `HTTPError` vocabulary and a shared substrate for cookies, WebCrypto
|
|
6
|
+
> tokens, content negotiation, ETag and Range, security headers, Server-Sent Events,
|
|
7
|
+
> and the body pipeline.
|
|
8
|
+
|
|
9
|
+
Hand `createServer` a dispatcher and a per-request state factory, call `start()`, and
|
|
10
|
+
call `stop()` when the process winds down. Built to sit beside `@orkestrel/router`
|
|
11
|
+
(routing, matching, and dispatch), `@orkestrel/contract` (validation),
|
|
12
|
+
`@orkestrel/emitter` (observable lifecycle), and `@orkestrel/abort` (cancellation).
|
|
13
|
+
Part of the `@orkestrel` line.
|
|
10
14
|
|
|
11
15
|
## Install
|
|
12
16
|
|
|
@@ -16,8 +20,8 @@ npm install @orkestrel/server
|
|
|
16
20
|
|
|
17
21
|
## Requirements
|
|
18
22
|
|
|
19
|
-
- Node.js >=
|
|
20
|
-
- ESM
|
|
23
|
+
- Node.js >= 22.12.0, matching the `engines` field in `package.json`
|
|
24
|
+
- ESM and CommonJS builds
|
|
21
25
|
|
|
22
26
|
## Usage
|
|
23
27
|
|
|
@@ -58,14 +62,14 @@ composed onion terminates in the dispatcher, so there is no second plumbing
|
|
|
58
62
|
layer between the middleware seam and the router. The package also exports
|
|
59
63
|
`HTTPError` and its subclasses, the `compose` middleware primitive,
|
|
60
64
|
cookie/token/body helpers, `Negotiator` for content negotiation, and
|
|
61
|
-
`
|
|
65
|
+
`createStream` for Server-Sent Events.
|
|
62
66
|
|
|
63
67
|
## Guide
|
|
64
68
|
|
|
65
69
|
For the full surface — the middleware seam, `HTTPError` vocabulary, shared
|
|
66
70
|
substrate (cookies, tokens, negotiation, ETag/Range, security headers, SSE,
|
|
67
71
|
body pipeline), and the `Server` lifecycle entity — see
|
|
68
|
-
[`guides/
|
|
72
|
+
[`guides/server.md`](guides/server.md).
|
|
69
73
|
|
|
70
74
|
## Package
|
|
71
75
|
|