@afora/express 0.0.0-stage → 0.0.11
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 +152 -2
- package/dist/index.d.ts +56 -0
- package/dist/index.js +143 -0
- package/package.json +59 -5
package/README.md
CHANGED
|
@@ -1,3 +1,153 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @afora/express
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An [Express](https://expressjs.com) sink for [`@afora/core`](../../README.md) outputs. It turns the operations of an output into an Express app: the route each use case declares, validated input (from the body, the query, the path, headers and cookies), the access each use case declares, the response with its status (sensitive values masked), RFC 9457 `application/problem+json` errors, and an OpenAPI document of the same routes.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun add @afora/core @afora/express express typebox
|
|
7
|
+
# or: npm install @afora/core @afora/express express typebox
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
`@afora/core`, `express` (`^5.3.0`) and TypeBox (`^1`) are peer dependencies. It runs wherever Express 5 does: Node >= 22 and Bun.
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import {
|
|
16
|
+
blueprintOf,
|
|
17
|
+
commandOf,
|
|
18
|
+
entityOf,
|
|
19
|
+
outputOf,
|
|
20
|
+
RepositoryEntityNotFound,
|
|
21
|
+
repositoryOf,
|
|
22
|
+
Route,
|
|
23
|
+
useCaseOf,
|
|
24
|
+
} from "@afora/core";
|
|
25
|
+
import { express } from "@afora/express";
|
|
26
|
+
|
|
27
|
+
class Post extends entityOf(
|
|
28
|
+
blueprintOf((ctx) => ({ title: ctx.text, slug: ctx.slug })),
|
|
29
|
+
) {}
|
|
30
|
+
const Posts = repositoryOf({ entity: Post, actions: ["findBySlug", "create"] });
|
|
31
|
+
|
|
32
|
+
@Route("GET", "/posts/{slug}")
|
|
33
|
+
class GetPost extends useCaseOf({
|
|
34
|
+
name: "GetPost",
|
|
35
|
+
blueprint: blueprintOf((ctx) => ({ slug: ctx.slug })),
|
|
36
|
+
response: blueprintOf(() => ({ post: Post })),
|
|
37
|
+
dependencies: { posts: Posts },
|
|
38
|
+
}) {
|
|
39
|
+
override async execute() {
|
|
40
|
+
const post = await this.dependencies.posts.findBySlug(this.input.slug);
|
|
41
|
+
if (!post) {
|
|
42
|
+
throw new RepositoryEntityNotFound({
|
|
43
|
+
source: "GetPost",
|
|
44
|
+
details: { id: this.input.slug },
|
|
45
|
+
}); // a 404
|
|
46
|
+
}
|
|
47
|
+
return { post };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const Blog = commandOf({ name: "Blog", useCases: { getPost: GetPost } });
|
|
52
|
+
|
|
53
|
+
const Api = outputOf({
|
|
54
|
+
name: "Api",
|
|
55
|
+
commands: [Blog],
|
|
56
|
+
pipe: [
|
|
57
|
+
express({
|
|
58
|
+
basePath: "/api",
|
|
59
|
+
docs: {
|
|
60
|
+
path: "/openapi.json",
|
|
61
|
+
info: { title: "Blog", version: "1.0.0" },
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
],
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const app = Api.build(); // an Express app
|
|
68
|
+
app.listen(3000);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
GET /api/posts/hello -> 200 { "post": { "slug": "hello", ... } }
|
|
73
|
+
GET /api/posts/Not%20A%20Slug -> 400 application/problem+json, with "issues"
|
|
74
|
+
GET /openapi.json -> the OpenAPI 3.1 document of the same routes
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Options
|
|
78
|
+
|
|
79
|
+
All options are JSON, so the stage can live in an `afora.json` (`{ "sink": "express", "options": { ... } }`). They are the options of every afora sink that serves HTTP, so moving an output from one server to another changes one import.
|
|
80
|
+
|
|
81
|
+
| Option | Meaning |
|
|
82
|
+
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
83
|
+
| `basePath` | Prefix of every route, e.g. `"/api"`. |
|
|
84
|
+
| `route` | `{ [operationId]: { method?, path?, status? } }`: overrides the route a use case declares, or the default `POST /{command}/{operation}`. |
|
|
85
|
+
| `responses` | `{ [operationId]: { headers: { name: value } } }`: static headers of the success responses, such as `cache-control`. |
|
|
86
|
+
| `requestId` | `true` (`x-request-id`) or a header name: every response of the sink carries the request's id, or a new one. |
|
|
87
|
+
| `security` | `{ schemes, operations?, default? }`: the security schemes of the OpenAPI document. |
|
|
88
|
+
| `docs` | `{ path, info: { title, version, description? }, servers? }`: serves the OpenAPI document of the same operations at `path` (not under `basePath`). |
|
|
89
|
+
| `debug` | `true` adds the `trace` to problems and the real `detail` to 5xx ones. Off by default. |
|
|
90
|
+
| `context` | `{ headers?: { [contextKey]: headerName }, variables?: { [contextKey]: name } }`: the context of an operation from request headers and from what a middleware set in `res.locals`, else on the request (`req.user`). |
|
|
91
|
+
| `auth` | `{ jwt: { secret: { env }, issuer?, audience?, algorithm?, header?, cookie? } }`: authenticates callers from a JSON Web Token. Experimental: see [Tokens and sessions](../../docs/auth.md#tokens-and-sessions). |
|
|
92
|
+
|
|
93
|
+
What JSON cannot hold goes in a second argument, the hooks: `express(options, { authenticator, middlewares, app })`. The type `ExpressHooks` is exported.
|
|
94
|
+
|
|
95
|
+
| Hook | Meaning |
|
|
96
|
+
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
97
|
+
| `authenticator` | `(request) => Principal \| null`: who calls, from the credentials of the request. `request` has `header(name)`, `cookie(name)`, the `operation` and `native`, the Express `Request`. |
|
|
98
|
+
| `middlewares` | Express middlewares: `(req, res, next) => ...`, run in order before the routes of the sink. |
|
|
99
|
+
| `app` | The Express app to add the routes to, instead of a new one. |
|
|
100
|
+
|
|
101
|
+
Invalid options throw `InvalidOutputStage` when the stage is made, and unknown operation ids in `route` or two operations on one method and path when the output is built.
|
|
102
|
+
|
|
103
|
+
## Behavior
|
|
104
|
+
|
|
105
|
+
The requests are handled by the route table of the core (`compileRoutes` of `@afora/core/adapters`), shared by every afora sink that serves HTTP, so they all answer the same way. This package only routes and sends. The behavior is described once, in [Outputs](../../docs/outputs.md); in short:
|
|
106
|
+
|
|
107
|
+
- **Input.** `post`, `put` and `patch` read a JSON body, `get` and `delete` the query string. Over it come the keys the [route of the use case](../../docs/use-cases.md#routes) places: `{name}` segments of the path, and the query keys, headers and cookies it declares. Text is converted to the numbers and booleans the input takes, and the blueprint of the use case validates it: a 400 problem with `issues`.
|
|
108
|
+
- **Access.** An operation whose use case declares an [`access`](../../docs/auth.md) asks the `authenticator` hook (or `auth`) who calls, and answers a 401 or a 403 problem before the input is validated. With neither, such an operation always answers 401.
|
|
109
|
+
- **Success.** The status of the route (`200` by default) with the response as JSON; records go through `toJSON`, so sensitive values are masked. A `204` has no body. The keys a route sends with `setCookie` leave the body and become `set-cookie` headers.
|
|
110
|
+
- **Errors.** `application/problem+json`, with the status of `statusOf`: the `statuses` of the output first, then 400, 401, 403, 404, 409, 422 for a declared error, else 500, whose detail is `"Internal error."` unless `debug` is on.
|
|
111
|
+
- **Unknown routes** are a 404 problem and anything thrown outside an operation is a problem too, unless you gave the `app`.
|
|
112
|
+
- **The body.** The body is read from the request as text and parsed by the route table, so the sink needs no `express.json()`. Behind one (on an `app` of yours), the body it parsed is used.
|
|
113
|
+
|
|
114
|
+
## Middlewares and your own app
|
|
115
|
+
|
|
116
|
+
<!-- docs:code skip: fragment: the second argument of the stage; cors is the cors package and tenantOf stands for your code -->
|
|
117
|
+
```ts
|
|
118
|
+
import cors from "cors";
|
|
119
|
+
|
|
120
|
+
express(
|
|
121
|
+
{ context: { variables: { tenant: "tenant" } } },
|
|
122
|
+
{
|
|
123
|
+
middlewares: [
|
|
124
|
+
cors(),
|
|
125
|
+
(req, res, next) => {
|
|
126
|
+
res.locals.tenant = tenantOf(req.hostname);
|
|
127
|
+
next();
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
A value a middleware sets reaches the use case through `context.variables`, for the operations whose `context` blueprint declares the key.
|
|
135
|
+
|
|
136
|
+
`app` takes an Express app you made. The sink then adds only its routes: no not found handler and no error handler, so add yours after building the output. The middlewares of `hooks.middlewares` run on the routes of the sink only.
|
|
137
|
+
|
|
138
|
+
## Catalog
|
|
139
|
+
|
|
140
|
+
`ExpressStages` is `stageCatalogOf(express)` (from `@afora/core/adapters`), and `stages` are the entries codegen reads to resolve `{ "sink": "express" }` in an `afora.json`:
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
// stages.ts
|
|
144
|
+
export { stages } from "@afora/express";
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
bunx afora-codegen generate --stages ./stages.ts
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Testing a sink
|
|
152
|
+
|
|
153
|
+
This package passes `httpProviderContract` of `@afora/core/testing`, the cases every afora sink that serves HTTP must pass. A sink for another server is tested the same way; see [Outputs](../../docs/outputs.md).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type Authenticator, type HttpOptions } from "@afora/core/adapters";
|
|
2
|
+
import { type Express, type RequestHandler } from "express";
|
|
3
|
+
/**
|
|
4
|
+
* The options of the `express` sink: those of every sink that serves HTTP
|
|
5
|
+
* (`basePath`, `route`, `responses`, `requestId`, `security`, `docs`,
|
|
6
|
+
* `debug`, `context`, `auth`). JSON, so the stage can live in an
|
|
7
|
+
* `afora.json`. The `variables` of `context` are what a middleware set in
|
|
8
|
+
* `res.locals`, else on the request (`req.user`).
|
|
9
|
+
*/
|
|
10
|
+
export type ExpressOptions = HttpOptions;
|
|
11
|
+
/**
|
|
12
|
+
* What the `express` sink takes that JSON cannot hold, as the second
|
|
13
|
+
* argument of `express(options, hooks)`.
|
|
14
|
+
*/
|
|
15
|
+
export interface ExpressHooks {
|
|
16
|
+
/**
|
|
17
|
+
* Who calls, from the credentials of a request (`request.native` is the
|
|
18
|
+
* Express `Request`). Asked for each operation with an `access` other
|
|
19
|
+
* than `public`; without it (and without `auth`) those operations answer
|
|
20
|
+
* 401.
|
|
21
|
+
*/
|
|
22
|
+
readonly authenticator?: Authenticator;
|
|
23
|
+
/** Express middlewares (`cors()`, `helmet()`, your own), run in order before every route of the sink. */
|
|
24
|
+
readonly middlewares?: readonly RequestHandler[];
|
|
25
|
+
/**
|
|
26
|
+
* The Express app to add the routes to, instead of a new one: its own
|
|
27
|
+
* middlewares and handlers are kept, and the sink adds no not found or
|
|
28
|
+
* error handler.
|
|
29
|
+
*/
|
|
30
|
+
readonly app?: Express;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* An Express app that serves the operations of an output: the route each use
|
|
34
|
+
* case declares (`route` or `@Route`), else
|
|
35
|
+
* `POST {basePath}/{command}/{operation}`. The requests are handled by the
|
|
36
|
+
* route table of the core (`compileRoutes`), as in every sink that serves
|
|
37
|
+
* HTTP: the input from the body, the query, the path, headers and cookies,
|
|
38
|
+
* the context, the access of each use case (401 and 403), statuses,
|
|
39
|
+
* `application/problem+json` errors, the request id and the OpenAPI document
|
|
40
|
+
* at `docs.path`.
|
|
41
|
+
*
|
|
42
|
+
* The body is read as text and parsed by the table, so it needs no
|
|
43
|
+
* `express.json()`; behind one, the parsed body is used. `hooks` (the second
|
|
44
|
+
* argument) holds what is not JSON: `authenticator`, `middlewares` and an
|
|
45
|
+
* `app` to add the routes to.
|
|
46
|
+
*/
|
|
47
|
+
export declare const express: import("@afora/core/adapters").SinkFactory<Express, HttpOptions, ExpressHooks>;
|
|
48
|
+
/** The runtime catalog of this package: the stage name `express` resolves to the sink. */
|
|
49
|
+
export declare const ExpressStages: import("../../../dist/index.js").IStageCatalog<Readonly<Record<string, import("../../../dist/index.js").StageFactory>>>;
|
|
50
|
+
/** The catalog entries codegen reads (`--stages`): `{ name, module, export, kind }`. */
|
|
51
|
+
export declare const stages: readonly [{
|
|
52
|
+
readonly name: "express";
|
|
53
|
+
readonly module: "@afora/express";
|
|
54
|
+
readonly export: "express";
|
|
55
|
+
readonly kind: "sink";
|
|
56
|
+
}];
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import {
|
|
3
|
+
compileRoutes,
|
|
4
|
+
HTTP_OPTION_KEYS,
|
|
5
|
+
httpOptionsIssue,
|
|
6
|
+
sinkOf,
|
|
7
|
+
stageCatalogOf
|
|
8
|
+
} from "@afora/core/adapters";
|
|
9
|
+
import createExpress from "express";
|
|
10
|
+
function validate(options) {
|
|
11
|
+
for (const key of Object.keys(options)) {
|
|
12
|
+
if (!HTTP_OPTION_KEYS.includes(key)) {
|
|
13
|
+
return `express has no option "${key}".`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return httpOptionsIssue(options, "express");
|
|
17
|
+
}
|
|
18
|
+
function first(value) {
|
|
19
|
+
if (Array.isArray(value))
|
|
20
|
+
return first(value[0]);
|
|
21
|
+
return typeof value === "string" ? value : undefined;
|
|
22
|
+
}
|
|
23
|
+
function textOf(request) {
|
|
24
|
+
const parsed = request.body;
|
|
25
|
+
if (typeof parsed === "string")
|
|
26
|
+
return parsed;
|
|
27
|
+
if (parsed instanceof Uint8Array)
|
|
28
|
+
return new TextDecoder().decode(parsed);
|
|
29
|
+
if (parsed !== undefined && parsed !== null && request.readableEnded) {
|
|
30
|
+
return JSON.stringify(parsed);
|
|
31
|
+
}
|
|
32
|
+
return new Promise((resolve, reject) => {
|
|
33
|
+
const chunks = [];
|
|
34
|
+
request.on("data", (chunk) => chunks.push(chunk));
|
|
35
|
+
request.on("end", () => {
|
|
36
|
+
let size = 0;
|
|
37
|
+
for (const chunk of chunks)
|
|
38
|
+
size += chunk.byteLength;
|
|
39
|
+
const bytes = new Uint8Array(size);
|
|
40
|
+
let at = 0;
|
|
41
|
+
for (const chunk of chunks) {
|
|
42
|
+
bytes.set(chunk, at);
|
|
43
|
+
at += chunk.byteLength;
|
|
44
|
+
}
|
|
45
|
+
resolve(new TextDecoder().decode(bytes));
|
|
46
|
+
});
|
|
47
|
+
request.on("error", reject);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
class ExpressHttpRequest {
|
|
52
|
+
native;
|
|
53
|
+
response;
|
|
54
|
+
constructor(native, response) {
|
|
55
|
+
this.native = native;
|
|
56
|
+
this.response = response;
|
|
57
|
+
}
|
|
58
|
+
param(name) {
|
|
59
|
+
return first(this.native.params[name]);
|
|
60
|
+
}
|
|
61
|
+
query() {
|
|
62
|
+
const query = {};
|
|
63
|
+
for (const [name, value] of Object.entries(this.native.query)) {
|
|
64
|
+
query[name] = first(value);
|
|
65
|
+
}
|
|
66
|
+
return query;
|
|
67
|
+
}
|
|
68
|
+
header(name) {
|
|
69
|
+
return first(this.native.headers[name]);
|
|
70
|
+
}
|
|
71
|
+
text() {
|
|
72
|
+
return textOf(this.native);
|
|
73
|
+
}
|
|
74
|
+
variable(name) {
|
|
75
|
+
return Object.hasOwn(this.response.locals, name) ? this.response.locals[name] : this.native[name];
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
var requestOf = (request, response) => new ExpressHttpRequest(request, response);
|
|
79
|
+
function send(response, result) {
|
|
80
|
+
response.status(result.status);
|
|
81
|
+
for (const [name, value] of Object.entries(result.headers)) {
|
|
82
|
+
response.setHeader(name, value);
|
|
83
|
+
}
|
|
84
|
+
if (result.cookies.length > 0) {
|
|
85
|
+
response.setHeader("set-cookie", [...result.cookies]);
|
|
86
|
+
}
|
|
87
|
+
if (result.body === null)
|
|
88
|
+
response.end();
|
|
89
|
+
else
|
|
90
|
+
response.end(result.body);
|
|
91
|
+
}
|
|
92
|
+
function expressPath(path) {
|
|
93
|
+
return path.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g, ":$1");
|
|
94
|
+
}
|
|
95
|
+
var express = sinkOf({
|
|
96
|
+
name: "express",
|
|
97
|
+
validate,
|
|
98
|
+
build: (operations, options, context, hooks) => {
|
|
99
|
+
const table = compileRoutes(operations, options, context, {
|
|
100
|
+
source: "express",
|
|
101
|
+
...hooks?.authenticator ? { authenticator: hooks.authenticator } : {}
|
|
102
|
+
});
|
|
103
|
+
const app = hooks?.app ?? createExpress();
|
|
104
|
+
if (!hooks?.app)
|
|
105
|
+
app.disable("x-powered-by");
|
|
106
|
+
const middlewares = hooks?.middlewares ?? [];
|
|
107
|
+
for (const route of table.routes) {
|
|
108
|
+
app[route.method](expressPath(route.path), ...middlewares, async (request, response) => {
|
|
109
|
+
send(response, await route.handle(requestOf(request, response)));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const docs = table.docs;
|
|
113
|
+
if (docs) {
|
|
114
|
+
app.get(docs.path, ...middlewares, (request, response) => {
|
|
115
|
+
send(response, docs.handle(requestOf(request, response)));
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (!hooks?.app) {
|
|
119
|
+
app.use((request, response) => {
|
|
120
|
+
send(response, table.notFound(requestOf(request, response)));
|
|
121
|
+
});
|
|
122
|
+
const failed = (error, request, response, _next) => {
|
|
123
|
+
send(response, table.failure(error, { request: requestOf(request, response) }));
|
|
124
|
+
};
|
|
125
|
+
app.use(failed);
|
|
126
|
+
}
|
|
127
|
+
return app;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
var ExpressStages = stageCatalogOf(express);
|
|
131
|
+
var stages = [
|
|
132
|
+
{
|
|
133
|
+
name: "express",
|
|
134
|
+
module: "@afora/express",
|
|
135
|
+
export: "express",
|
|
136
|
+
kind: "sink"
|
|
137
|
+
}
|
|
138
|
+
];
|
|
139
|
+
export {
|
|
140
|
+
ExpressStages,
|
|
141
|
+
express,
|
|
142
|
+
stages
|
|
143
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@afora/express",
|
|
3
|
+
"version": "0.0.11",
|
|
4
|
+
"description": "An Express sink for afora outputs: one route per operation, problem+json errors, sensitive data masked, declared access enforced and an optional OpenAPI document.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"afora",
|
|
7
|
+
"express",
|
|
8
|
+
"openapi",
|
|
9
|
+
"problem-json",
|
|
10
|
+
"http",
|
|
11
|
+
"api"
|
|
12
|
+
],
|
|
13
|
+
"author": "Alan Reis <alanreisanjo@gmail.com> (https://github.com/Hoyasumii)",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://github.com/afora-framework/core/tree/main/packages/express#readme",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/afora-framework/core.git",
|
|
19
|
+
"directory": "packages/express"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js",
|
|
29
|
+
"default": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"bun": ">=1.4.4",
|
|
38
|
+
"node": ">=22"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"provenance": true
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"typecheck": "bun check",
|
|
46
|
+
"build": "rm -rf dist && bun build ./src/index.ts --outdir ./dist --target node --format esm --packages external --tsconfig-override tsconfig.build.json && tsc -p tsconfig.build.json && bun ../../scripts/add-dts-extensions.ts dist",
|
|
47
|
+
"test": "bun test"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/bun": "^1.4.4",
|
|
51
|
+
"express": "^5.3.0",
|
|
52
|
+
"typebox": "^1.4.3",
|
|
53
|
+
"@types/express": "^5.0.6"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@afora/core": ">=0.0.9",
|
|
57
|
+
"express": "^5.3.0",
|
|
58
|
+
"typebox": "^1"
|
|
59
|
+
}
|
|
60
|
+
}
|