@daloyjs/core 0.7.5 → 0.8.2
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 +21 -10
- package/dist/adapters/bun.d.ts +26 -4
- package/dist/adapters/bun.d.ts.map +1 -1
- package/dist/adapters/bun.js +16 -4
- package/dist/adapters/bun.js.map +1 -1
- package/dist/adapters/cloudflare.d.ts +21 -4
- package/dist/adapters/cloudflare.d.ts.map +1 -1
- package/dist/adapters/cloudflare.js.map +1 -1
- package/dist/adapters/deno.d.ts +25 -2
- package/dist/adapters/deno.d.ts.map +1 -1
- package/dist/adapters/deno.js +39 -7
- package/dist/adapters/deno.js.map +1 -1
- package/dist/adapters/fastly.d.ts +23 -0
- package/dist/adapters/fastly.d.ts.map +1 -0
- package/dist/adapters/fastly.js +11 -0
- package/dist/adapters/fastly.js.map +1 -0
- package/dist/adapters/lambda.d.ts +67 -0
- package/dist/adapters/lambda.d.ts.map +1 -0
- package/dist/adapters/lambda.js +117 -0
- package/dist/adapters/lambda.js.map +1 -0
- package/dist/adapters/node.d.ts +7 -0
- package/dist/adapters/node.d.ts.map +1 -1
- package/dist/adapters/node.js +17 -4
- package/dist/adapters/node.js.map +1 -1
- package/dist/adapters/vercel.d.ts +35 -7
- package/dist/adapters/vercel.d.ts.map +1 -1
- package/dist/adapters/vercel.js +22 -1
- package/dist/adapters/vercel.js.map +1 -1
- package/dist/app.d.ts +235 -8
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +222 -8
- package/dist/app.js.map +1 -1
- package/dist/client.d.ts +27 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +27 -0
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +169 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +143 -0
- package/dist/errors.js.map +1 -1
- package/dist/logger.d.ts +26 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +26 -0
- package/dist/logger.js.map +1 -1
- package/dist/middleware.d.ts +143 -0
- package/dist/middleware.d.ts.map +1 -1
- package/dist/middleware.js +147 -4
- package/dist/middleware.js.map +1 -1
- package/dist/openapi.d.ts +32 -0
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +33 -2
- package/dist/openapi.js.map +1 -1
- package/dist/schema.d.ts +33 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +33 -2
- package/dist/schema.js.map +1 -1
- package/dist/security-schemes.d.ts +75 -5
- package/dist/security-schemes.d.ts.map +1 -1
- package/dist/security-schemes.js +75 -5
- package/dist/security-schemes.js.map +1 -1
- package/dist/security.d.ts +73 -4
- package/dist/security.d.ts.map +1 -1
- package/dist/security.js +73 -4
- package/dist/security.js.map +1 -1
- package/dist/types.d.ts +195 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,14 +1,67 @@
|
|
|
1
1
|
import type { StandardSchemaV1 } from "./schema.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Set of HTTP methods recognized by DaloyJS' router and OpenAPI generator.
|
|
4
|
+
* `HEAD` is automatically served from the matching `GET` route when no
|
|
5
|
+
* explicit `HEAD` handler is registered.
|
|
6
|
+
*
|
|
7
|
+
* @since 0.1.0
|
|
8
|
+
*/
|
|
3
9
|
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
|
|
4
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* A route path. Must start with `"/"`. Path parameters are written with a
|
|
12
|
+
* leading colon and are inferred into `ctx.params` at the type level.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const path: PathString = "/books/:id";
|
|
17
|
+
* // ParamsOf<"/books/:id"> => "id"
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @since 0.1.0
|
|
21
|
+
*/
|
|
5
22
|
export type PathString = `/${string}`;
|
|
6
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Extracts the union of path-parameter names from a route path at the
|
|
25
|
+
* type level. Used to derive `ctx.params` when no explicit `params` schema
|
|
26
|
+
* is supplied.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* type P = ParamsOf<"/orgs/:org/repos/:repo">; // "org" | "repo"
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @since 0.1.0
|
|
34
|
+
*/
|
|
7
35
|
export type ParamsOf<P extends string> = P extends `${string}:${infer Param}/${infer Rest}` ? Param | ParamsOf<`/${Rest}`> : P extends `${string}:${infer Param}` ? Param : never;
|
|
8
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Record of raw (string) path parameters keyed by their name in the path.
|
|
38
|
+
* The shape is computed from {@link ParamsOf}.
|
|
39
|
+
*
|
|
40
|
+
* @since 0.1.0
|
|
41
|
+
*/
|
|
9
42
|
export type PathParams<P extends string> = {
|
|
10
43
|
[K in ParamsOf<P>]: string;
|
|
11
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Bundle of validators for the four request inputs DaloyJS validates before
|
|
47
|
+
* calling your handler. Every field is optional — omitted parts pass through
|
|
48
|
+
* untyped (raw `Record<string, string>` for `query`/`headers`, `unknown` for
|
|
49
|
+
* `body`, and {@link PathParams} for `params`).
|
|
50
|
+
*
|
|
51
|
+
* Schemas may come from any Standard-Schema-compatible validator
|
|
52
|
+
* (Zod, Valibot, ArkType, TypeBox via adapter, ...).
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { z } from "zod";
|
|
57
|
+
* const request = {
|
|
58
|
+
* params: z.object({ id: z.uuid() }),
|
|
59
|
+
* body: z.object({ title: z.string().min(1) }),
|
|
60
|
+
* } satisfies RequestSchemas;
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @since 0.1.0
|
|
64
|
+
*/
|
|
12
65
|
export interface RequestSchemas {
|
|
13
66
|
params?: StandardSchemaV1;
|
|
14
67
|
query?: StandardSchemaV1;
|
|
@@ -16,6 +69,18 @@ export interface RequestSchemas {
|
|
|
16
69
|
body?: StandardSchemaV1;
|
|
17
70
|
}
|
|
18
71
|
export type InferOut<S> = S extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<S> : undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Computed type that infers the four pieces of validated request data from
|
|
74
|
+
* the route's `request` schemas. When a part has no schema, a permissive
|
|
75
|
+
* fallback is used:
|
|
76
|
+
*
|
|
77
|
+
* - `params` — `PathParams<P>` (all string)
|
|
78
|
+
* - `query` — `Record<string, string | string[] | undefined>`
|
|
79
|
+
* - `headers` — `Record<string, string | undefined>`
|
|
80
|
+
* - `body` — `unknown`
|
|
81
|
+
*
|
|
82
|
+
* @since 0.1.0
|
|
83
|
+
*/
|
|
19
84
|
export type InferRequest<R extends RequestSchemas | undefined, P extends string> = {
|
|
20
85
|
params: R extends {
|
|
21
86
|
params: StandardSchemaV1;
|
|
@@ -30,6 +95,19 @@ export type InferRequest<R extends RequestSchemas | undefined, P extends string>
|
|
|
30
95
|
body: StandardSchemaV1;
|
|
31
96
|
} ? InferOut<R["body"]> : unknown;
|
|
32
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* Describes a single HTTP response variant declared by a route.
|
|
100
|
+
*
|
|
101
|
+
* - `description` — surfaces in OpenAPI documentation. Required.
|
|
102
|
+
* - `body` — Standard-Schema validator for the response body; when
|
|
103
|
+
* present, DaloyJS validates the handler's return value against it
|
|
104
|
+
* (controlled by `AppOptions.validateResponses`).
|
|
105
|
+
* - `headers` — Documented response headers (also typed in OpenAPI).
|
|
106
|
+
* - `examples` — Example payloads emitted into the OpenAPI document and
|
|
107
|
+
* served by the framework when `AppOptions.mockMode` is enabled.
|
|
108
|
+
*
|
|
109
|
+
* @since 0.1.0
|
|
110
|
+
*/
|
|
33
111
|
export interface ResponseSpec {
|
|
34
112
|
description: string;
|
|
35
113
|
body?: StandardSchemaV1;
|
|
@@ -39,10 +117,32 @@ export interface ResponseSpec {
|
|
|
39
117
|
}>;
|
|
40
118
|
examples?: Record<string, unknown>;
|
|
41
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Map of HTTP status code → {@link ResponseSpec}. The keys drive the
|
|
122
|
+
* `responses` section of the generated OpenAPI document and the discriminated
|
|
123
|
+
* union returned by your handler.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* const responses = {
|
|
128
|
+
* 200: { description: "OK", body: z.object({ id: z.string() }) },
|
|
129
|
+
* 404: { description: "Not Found" },
|
|
130
|
+
* } satisfies ResponsesMap;
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* @since 0.1.0
|
|
134
|
+
*/
|
|
42
135
|
export type ResponsesMap = {
|
|
43
136
|
[Status in number]?: ResponseSpec;
|
|
44
137
|
};
|
|
45
138
|
export type StatusOf<R extends ResponsesMap> = Extract<keyof R, number>;
|
|
139
|
+
/**
|
|
140
|
+
* Discriminated union of legal return values for a handler. The status code
|
|
141
|
+
* is a literal type so TypeScript enforces that every returned response is
|
|
142
|
+
* declared in the route's `responses` map.
|
|
143
|
+
*
|
|
144
|
+
* @since 0.1.0
|
|
145
|
+
*/
|
|
46
146
|
export type HandlerReturn<R extends ResponsesMap> = {
|
|
47
147
|
[S in StatusOf<R>]: {
|
|
48
148
|
status: S;
|
|
@@ -52,6 +152,18 @@ export type HandlerReturn<R extends ResponsesMap> = {
|
|
|
52
152
|
headers?: Record<string, string>;
|
|
53
153
|
};
|
|
54
154
|
}[StatusOf<R>];
|
|
155
|
+
/**
|
|
156
|
+
* Declarative authentication requirement for a route. The `scheme` name must
|
|
157
|
+
* appear in `generateOpenAPI(app, { securitySchemes: { ... } })` so the
|
|
158
|
+
* generated spec resolves the security requirement correctly.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* auth: { scheme: "bearerAuth", scopes: ["orders:read"] }
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @since 0.1.0
|
|
166
|
+
*/
|
|
55
167
|
export interface AuthSpec {
|
|
56
168
|
/** Name referenced in OpenAPI components.securitySchemes */
|
|
57
169
|
scheme: string;
|
|
@@ -59,10 +171,41 @@ export interface AuthSpec {
|
|
|
59
171
|
scopes?: string[];
|
|
60
172
|
}
|
|
61
173
|
/**
|
|
62
|
-
*
|
|
174
|
+
* **Module-augmentation hook** for typing plugin-provided state.
|
|
175
|
+
*
|
|
176
|
+
* DaloyJS plugins (sessions, tracing, auth, ...) merge values into
|
|
177
|
+
* `ctx.state`. Augment this interface from your application code so those
|
|
178
|
+
* values become strongly typed everywhere `ctx.state` is used.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```ts
|
|
182
|
+
* // src/types.d.ts
|
|
183
|
+
* declare module "@daloyjs/core" {
|
|
184
|
+
* interface AppState {
|
|
185
|
+
* user: { id: string; roles: string[] };
|
|
186
|
+
* }
|
|
187
|
+
* }
|
|
188
|
+
*
|
|
189
|
+
* // Now ctx.state.user is typed in every handler.
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* @since 0.1.0
|
|
63
193
|
*/
|
|
64
194
|
export interface AppState {
|
|
65
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* The context object passed to every route handler and hook.
|
|
198
|
+
*
|
|
199
|
+
* Contains the original `Request`, the four pieces of validated request data
|
|
200
|
+
* (`params`, `query`, `headers`, `body`), a mutable `state` bag for
|
|
201
|
+
* cross-cutting plugins, and a `set` helper for adjusting outgoing
|
|
202
|
+
* status/headers without bypassing schema validation.
|
|
203
|
+
*
|
|
204
|
+
* The shape is computed from the route's path and `request` schemas so all
|
|
205
|
+
* inputs are strongly typed inside the handler with zero extra boilerplate.
|
|
206
|
+
*
|
|
207
|
+
* @since 0.1.0
|
|
208
|
+
*/
|
|
66
209
|
export interface BaseContext<P extends string, R extends RequestSchemas | undefined> {
|
|
67
210
|
request: Request;
|
|
68
211
|
/** Validated request data (or raw fallbacks if no schema). */
|
|
@@ -78,6 +221,25 @@ export interface BaseContext<P extends string, R extends RequestSchemas | undefi
|
|
|
78
221
|
headers: Headers;
|
|
79
222
|
};
|
|
80
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* Lifecycle hooks fired around request handling. Hooks compose pipeline-style
|
|
226
|
+
* — the global hooks (`AppOptions.hooks`) run first, then group hooks added
|
|
227
|
+
* with `app.use()`, then per-route hooks. Returning a `Response` from
|
|
228
|
+
* `beforeHandle` or `onSend` short-circuits/replaces the response.
|
|
229
|
+
*
|
|
230
|
+
* Ordering for a successful request:
|
|
231
|
+
* 1. `onRequest` — before any context is built (raw `Request`).
|
|
232
|
+
* 2. `beforeHandle` — with the built context; may short-circuit.
|
|
233
|
+
* 3. *handler runs*
|
|
234
|
+
* 4. `afterHandle` — may transform the handler return value.
|
|
235
|
+
* 5. *response is serialized + validated*
|
|
236
|
+
* 6. `onSend` — may mutate or replace the outgoing `Response`.
|
|
237
|
+
* 7. `onResponse` — fire-and-forget observer (cannot change anything).
|
|
238
|
+
*
|
|
239
|
+
* `onError` runs on the error path before serialization.
|
|
240
|
+
*
|
|
241
|
+
* @since 0.1.0
|
|
242
|
+
*/
|
|
81
243
|
export interface Hooks {
|
|
82
244
|
onRequest?: (req: Request) => void | Promise<void>;
|
|
83
245
|
beforeHandle?: (ctx: BaseContext<any, any>) => void | Response | Promise<void | Response>;
|
|
@@ -93,6 +255,34 @@ export interface Hooks {
|
|
|
93
255
|
onSend?: (res: Response, ctx: BaseContext<any, any> | undefined) => void | Response | Promise<void | Response>;
|
|
94
256
|
onResponse?: (res: Response) => void | Promise<void>;
|
|
95
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Declarative description of one HTTP endpoint. The single source of truth
|
|
260
|
+
* for routing, request validation, response validation, OpenAPI generation,
|
|
261
|
+
* and the typed client SDK.
|
|
262
|
+
*
|
|
263
|
+
* Pass instances to {@link App.route} to register them. Generic parameters
|
|
264
|
+
* are usually inferred and rarely need to be specified explicitly.
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```ts
|
|
268
|
+
* import { z } from "zod";
|
|
269
|
+
*
|
|
270
|
+
* app.route({
|
|
271
|
+
* method: "GET",
|
|
272
|
+
* path: "/books/:id",
|
|
273
|
+
* operationId: "getBook",
|
|
274
|
+
* summary: "Fetch a book by id",
|
|
275
|
+
* request: { params: z.object({ id: z.uuid() }) },
|
|
276
|
+
* responses: {
|
|
277
|
+
* 200: { description: "OK", body: z.object({ id: z.string(), title: z.string() }) },
|
|
278
|
+
* 404: { description: "Not Found" },
|
|
279
|
+
* },
|
|
280
|
+
* handler: ({ params }) => ({ status: 200, body: { id: params.id, title: "Dune" } }),
|
|
281
|
+
* });
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* @since 0.1.0
|
|
285
|
+
*/
|
|
96
286
|
export interface RouteDefinition<P extends PathString = PathString, M extends HttpMethod = HttpMethod, Req extends RequestSchemas | undefined = undefined, Res extends ResponsesMap = ResponsesMap> {
|
|
97
287
|
method: M;
|
|
98
288
|
path: P;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,MAAM,GACN,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,CAAC;AAEd;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,M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AC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;IAEf,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,OAAO,EAAE,CACP,GAAG,EAAE,WAAW,CAAC,CAAC,EAAE,GAAG,CAAC,KACrB,aAAa,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;CACvD;AAID;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,YAAY,CAAC;IACxB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CACrC,MAAM,EACN,iBAAiB,GAAG,iBAAiB,EAAE,CACxC,CAAC;AAEF,+CAA+C;AAC/C,MAAM,WAAW,WAAW;IAC1B,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAAC;CACpC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daloyjs/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "DaloyJS is a runtime-portable, contract-first TypeScript web framework with built-in OpenAPI (Hey API), typed client generation, large-scale maintainability, and security-first defaults. Hono-grade portability, Elysia-grade DX, FastAPI-grade docs, Fastify-grade ops — distributed via pnpm.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -65,6 +65,14 @@
|
|
|
65
65
|
"types": "./dist/adapters/vercel.d.ts",
|
|
66
66
|
"import": "./dist/adapters/vercel.js"
|
|
67
67
|
},
|
|
68
|
+
"./fastly": {
|
|
69
|
+
"types": "./dist/adapters/fastly.d.ts",
|
|
70
|
+
"import": "./dist/adapters/fastly.js"
|
|
71
|
+
},
|
|
72
|
+
"./lambda": {
|
|
73
|
+
"types": "./dist/adapters/lambda.d.ts",
|
|
74
|
+
"import": "./dist/adapters/lambda.js"
|
|
75
|
+
},
|
|
68
76
|
"./client": {
|
|
69
77
|
"types": "./dist/client.d.ts",
|
|
70
78
|
"import": "./dist/client.js"
|