@xrystal/dto 26.6.27-v12
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 +724 -0
- package/dist/adapters/elysia.cjs +820 -0
- package/dist/adapters/elysia.d.ts +138 -0
- package/dist/adapters/elysia.js +816 -0
- package/dist/adapters/express.cjs +789 -0
- package/dist/adapters/express.d.ts +49 -0
- package/dist/adapters/express.js +785 -0
- package/dist/adapters/index.d.ts +7 -0
- package/dist/adapters/node.cjs +790 -0
- package/dist/adapters/node.d.ts +27 -0
- package/dist/adapters/node.js +786 -0
- package/dist/adapters/shared.d.ts +11 -0
- package/dist/adapters/socketio.cjs +767 -0
- package/dist/adapters/socketio.d.ts +31 -0
- package/dist/adapters/socketio.js +763 -0
- package/dist/adapters/websocket.cjs +759 -0
- package/dist/adapters/websocket.d.ts +31 -0
- package/dist/adapters/websocket.js +754 -0
- package/dist/core/assemble-log.d.ts +1 -0
- package/dist/core/assemble-queue.d.ts +1 -0
- package/dist/core/assemble.d.ts +9 -0
- package/dist/core/builder.d.ts +49 -0
- package/dist/core/config.d.ts +10 -0
- package/dist/core/context.d.ts +5 -0
- package/dist/core/hooks.d.ts +8 -0
- package/dist/core/index.cjs +1002 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.js +986 -0
- package/dist/core/log-dto.d.ts +1 -0
- package/dist/core/metadata.d.ts +6 -0
- package/dist/core/plugins.d.ts +10 -0
- package/dist/core/presets.d.ts +32 -0
- package/dist/core/queue-dto.d.ts +1 -0
- package/dist/core/response-dto.d.ts +1 -0
- package/dist/core/schema-utils.d.ts +1 -0
- package/dist/dto/index.cjs +909 -0
- package/dist/dto/index.d.ts +6 -0
- package/dist/dto/index.js +898 -0
- package/dist/dto/log/assemble.d.ts +3 -0
- package/dist/dto/log/builder.d.ts +41 -0
- package/dist/dto/log/index.cjs +152 -0
- package/dist/dto/log/index.d.ts +3 -0
- package/dist/dto/log/index.js +149 -0
- package/dist/dto/log/types.d.ts +26 -0
- package/dist/dto/queue/assemble.d.ts +2 -0
- package/dist/dto/queue/builder.d.ts +35 -0
- package/dist/dto/queue/index.cjs +154 -0
- package/dist/dto/queue/index.d.ts +3 -0
- package/dist/dto/queue/index.js +151 -0
- package/dist/dto/queue/types.d.ts +34 -0
- package/dist/dto/response/assemble.d.ts +1 -0
- package/dist/dto/response/dto.d.ts +39 -0
- package/dist/dto/response/index.cjs +179 -0
- package/dist/dto/response/index.d.ts +2 -0
- package/dist/dto/response/index.js +176 -0
- package/dist/dto/runtime/dto.cjs +1318 -0
- package/dist/dto/runtime/dto.d.ts +64 -0
- package/dist/dto/runtime/dto.js +1315 -0
- package/dist/dto/shared/base-dto.d.ts +12 -0
- package/dist/dto/shared/schema-utils.d.ts +1 -0
- package/dist/enums/node-env.d.ts +5 -0
- package/dist/errors/codes.d.ts +15 -0
- package/dist/errors/error.d.ts +32 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/index.cjs +1482 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +1433 -0
- package/dist/types/builder.d.ts +15 -0
- package/dist/types/codes.d.ts +7 -0
- package/dist/types/context.d.ts +16 -0
- package/dist/types/hooks.d.ts +7 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/log.d.ts +1 -0
- package/dist/types/metadata.d.ts +7 -0
- package/dist/types/options.d.ts +24 -0
- package/dist/types/plugin.d.ts +35 -0
- package/dist/types/queue.d.ts +1 -0
- package/dist/types/response.d.ts +43 -0
- package/dist/utils/constants/http.d.ts +2 -0
- package/dist/utils/constants/index.d.ts +3 -0
- package/dist/utils/constants/security-headers.d.ts +1 -0
- package/dist/utils/constants/status-codes.d.ts +35 -0
- package/dist/utils/helpers/index.d.ts +2 -0
- package/dist/utils/helpers/request-id.d.ts +3 -0
- package/dist/utils/helpers/uuid.d.ts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +130 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HeaderValue } from './codes.js';
|
|
2
|
+
import type { FinalResult, Payload, SchemaInput } from './response.js';
|
|
3
|
+
/** Minimal builder surface for plugins and attachable contexts — no runtime import from `core`. */
|
|
4
|
+
export interface BuilderRef<T = unknown> {
|
|
5
|
+
httpStatus(code: number): this;
|
|
6
|
+
code(code: number): this;
|
|
7
|
+
status(value: boolean): this;
|
|
8
|
+
message(msg: string): this;
|
|
9
|
+
data(data: T | undefined): this;
|
|
10
|
+
payload(partial: Payload<T>): this;
|
|
11
|
+
schema(input?: SchemaInput<T>): this;
|
|
12
|
+
setMeta(meta: Record<string, unknown>): this;
|
|
13
|
+
header(key: string, value: HeaderValue): this;
|
|
14
|
+
build(): FinalResult<T> | unknown;
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type HeaderValue = string | number | readonly string[];
|
|
2
|
+
export type CodeMap = Record<string, number>;
|
|
3
|
+
/**
|
|
4
|
+
* Add or override numeric codes at adapter construction.
|
|
5
|
+
* Keys you omit keep the built-in defaults (SUCCESS: 0, CLIENT: 1, …).
|
|
6
|
+
*/
|
|
7
|
+
export type CodeOverrides = Record<string, number>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BuilderRef } from './builder.js';
|
|
2
|
+
export interface RequestContext {
|
|
3
|
+
requestId: string;
|
|
4
|
+
startTime: number;
|
|
5
|
+
}
|
|
6
|
+
export interface IncomingHttpRequest {
|
|
7
|
+
headers?: Record<string, string | string[] | undefined>;
|
|
8
|
+
get?: (header: string) => string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface ContextFactoryOptions {
|
|
11
|
+
requestIdHeaders?: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
export interface BuilderAttachable<T = unknown> {
|
|
14
|
+
ctx?: RequestContext;
|
|
15
|
+
builder?: BuilderRef<T>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type HookEvent = 'before_build' | 'after_build' | 'before_dispatch' | 'after_dispatch' | 'error';
|
|
2
|
+
export type HookFn = (payload: unknown) => void;
|
|
3
|
+
export interface HookBus {
|
|
4
|
+
on(event: HookEvent, fn: HookFn): unknown;
|
|
5
|
+
hasListeners(event: HookEvent): boolean;
|
|
6
|
+
emit(event: HookEvent, payload: unknown): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { BuilderRef } from './builder.js';
|
|
2
|
+
export type { HeaderValue, CodeMap, CodeOverrides } from './codes.js';
|
|
3
|
+
export type { Payload, PayloadExtras, PaginationMeta, ResponseBody, SchemaInput, Cookie, FinalResult, } from './response.js';
|
|
4
|
+
export type { RequestContext, IncomingHttpRequest, ContextFactoryOptions, BuilderAttachable, } from './context.js';
|
|
5
|
+
export type { BuilderOptions, RuntimeOptions, DTOConfig } from './options.js';
|
|
6
|
+
export type { HookEvent, HookFn, HookBus } from './hooks.js';
|
|
7
|
+
export type { Dispatcher, PluginContext, Plugin } from './plugin.js';
|
|
8
|
+
export { definePlugin, mergePlugins } from './plugin.js';
|
|
9
|
+
export type { LogInput, LogBody, ILogDTO } from './log.js';
|
|
10
|
+
export type { QueueMetadata, QueueMessageInput, QueueMessage, IMetadata, IMessageInput, } from './queue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { LogInput, LogBody, LogSchemaInput, ILogDTO } from '../dto/log/types.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CodeOverrides } from './codes.js';
|
|
2
|
+
import type { HookBus } from './hooks.js';
|
|
3
|
+
export interface BuilderOptions {
|
|
4
|
+
/** When true, surfaces raw error messages/stacks. Default: false */
|
|
5
|
+
verbose?: boolean;
|
|
6
|
+
includeStack?: boolean;
|
|
7
|
+
withDefaultBody?: boolean;
|
|
8
|
+
codes?: CodeOverrides;
|
|
9
|
+
defaultHeaders?: Record<string, string>;
|
|
10
|
+
hooks?: HookBus;
|
|
11
|
+
plugins?: import('./plugin.js').Plugin<unknown>[];
|
|
12
|
+
}
|
|
13
|
+
export interface RuntimeOptions extends BuilderOptions {
|
|
14
|
+
withDefaultHeaders?: boolean;
|
|
15
|
+
requestIdHeaders?: readonly string[];
|
|
16
|
+
/** Socket.IO emit event. Prefer `DTOConfig.socket.event` on `new DTO()` */
|
|
17
|
+
event?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DTOConfig extends RuntimeOptions {
|
|
20
|
+
/** Socket.IO emit event name. Default: `response` */
|
|
21
|
+
socket?: {
|
|
22
|
+
event?: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BuilderRef } from './builder.js';
|
|
2
|
+
import type { CodeMap } from './codes.js';
|
|
3
|
+
import type { RequestContext } from './context.js';
|
|
4
|
+
import type { BuilderOptions } from './options.js';
|
|
5
|
+
import type { FinalResult } from './response.js';
|
|
6
|
+
export interface Dispatcher<T = unknown> {
|
|
7
|
+
dispatch(result: FinalResult<T>): FinalResult<T> | unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface PluginContext<T = unknown> {
|
|
10
|
+
builder: BuilderRef<T>;
|
|
11
|
+
context?: RequestContext;
|
|
12
|
+
options: BuilderOptions;
|
|
13
|
+
codes: CodeMap;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Response pipeline plugin — middleware-style hooks on the builder lifecycle.
|
|
17
|
+
*
|
|
18
|
+
* - `beforeBuild` — mutate the builder before the body is assembled (add meta, headers, …)
|
|
19
|
+
* - `afterBuild` / `beforeDispatch` — receive `FinalResult`, return a replacement or `void` to pass through
|
|
20
|
+
* - `afterDispatch` — side effects after the runtime sends (logging, metrics)
|
|
21
|
+
*
|
|
22
|
+
* Register on `new DTO()` via constructor `plugins` or `.use(plugin)`.
|
|
23
|
+
*/
|
|
24
|
+
export interface Plugin<T = unknown> {
|
|
25
|
+
readonly name: string;
|
|
26
|
+
/** Lower runs first. Default: `0` */
|
|
27
|
+
readonly priority?: number;
|
|
28
|
+
beforeBuild?(ctx: PluginContext<T>): void;
|
|
29
|
+
afterBuild?(result: FinalResult<T>, ctx: PluginContext<T>): FinalResult<T> | void;
|
|
30
|
+
beforeDispatch?(result: FinalResult<T>, ctx: PluginContext<T>): FinalResult<T> | void;
|
|
31
|
+
afterDispatch?(result: FinalResult<T>, ctx: PluginContext<T>): void;
|
|
32
|
+
}
|
|
33
|
+
/** Type-safe plugin factory — use when defining reusable plugins. */
|
|
34
|
+
export declare function definePlugin<T = unknown>(plugin: Plugin<T>): Plugin<T>;
|
|
35
|
+
export declare function mergePlugins(...groups: Array<Plugin<unknown>[] | undefined>): Plugin<unknown>[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { QueueMetadata, QueueMessageInput, QueueMessage, QueueSchemaInput, IMetadata, IMessageInput, } from '../dto/queue/types.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { HeaderValue } from './codes.js';
|
|
2
|
+
export interface Payload<T = unknown> {
|
|
3
|
+
data?: T;
|
|
4
|
+
meta?: Record<string, unknown>;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
pagination?: PaginationMeta;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
/** Payload fields except `data` — used as 3rd arg on `.as.ok(data, message, extras)` */
|
|
10
|
+
export type PayloadExtras = Omit<Payload, 'data'>;
|
|
11
|
+
export interface PaginationMeta {
|
|
12
|
+
total: number;
|
|
13
|
+
page: number;
|
|
14
|
+
limit: number;
|
|
15
|
+
totalPages: number;
|
|
16
|
+
hasNext: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Fixed field order: status → message → payload? → code */
|
|
19
|
+
export interface ResponseBody<T = unknown> {
|
|
20
|
+
status: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
payload?: Payload<T>;
|
|
23
|
+
code: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Input for `.schema()` on the builder chain — body fields only.
|
|
27
|
+
* Transport concerns (`.httpStatus()`, headers, cookies) stay on the chain before `.build()`.
|
|
28
|
+
* Last call wins: `.schema()` overrides prior body setters; later setters override `.schema()`.
|
|
29
|
+
* When `payload` is set, it replaces the entire payload (no merge with earlier chain calls).
|
|
30
|
+
* `status`, `message`, and `code` are always present in the output; defaults apply when omitted.
|
|
31
|
+
*/
|
|
32
|
+
export type SchemaInput<T = unknown> = Partial<Pick<ResponseBody<T>, 'status' | 'message' | 'code' | 'payload'>>;
|
|
33
|
+
export interface Cookie {
|
|
34
|
+
name: string;
|
|
35
|
+
value: string;
|
|
36
|
+
options?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
export interface FinalResult<T = unknown> {
|
|
39
|
+
body: ResponseBody<T>;
|
|
40
|
+
statusCode: number;
|
|
41
|
+
headers: Record<string, HeaderValue>;
|
|
42
|
+
cookies: Cookie[];
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_SECURITY_HEADERS: Record<string, string>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const StatusCodes: {
|
|
2
|
+
readonly SUCCESSFUL: {
|
|
3
|
+
readonly OK: 200;
|
|
4
|
+
readonly CREATED: 201;
|
|
5
|
+
readonly ACCEPTED: 202;
|
|
6
|
+
readonly NO_CONTENT: 204;
|
|
7
|
+
};
|
|
8
|
+
readonly REDIRECTION: {
|
|
9
|
+
readonly MOVED_PERMANENTLY: 301;
|
|
10
|
+
readonly FOUND: 302;
|
|
11
|
+
readonly NOT_MODIFIED: 304;
|
|
12
|
+
};
|
|
13
|
+
readonly CLIENT_ERROR: {
|
|
14
|
+
readonly BAD_REQUEST: 400;
|
|
15
|
+
readonly UNAUTHORIZED: 401;
|
|
16
|
+
readonly FORBIDDEN: 403;
|
|
17
|
+
readonly NOT_FOUND: 404;
|
|
18
|
+
readonly METHOD_NOT_ALLOWED: 405;
|
|
19
|
+
readonly CONFLICT: 409;
|
|
20
|
+
readonly GONE: 410;
|
|
21
|
+
readonly PAYLOAD_TOO_LARGE: 413;
|
|
22
|
+
readonly UNSUPPORTED_MEDIA_TYPE: 415;
|
|
23
|
+
readonly UNPROCESSABLE_ENTITY: 422;
|
|
24
|
+
readonly TOO_MANY_REQUESTS: 429;
|
|
25
|
+
};
|
|
26
|
+
readonly SERVER_ERROR: {
|
|
27
|
+
readonly INTERNAL_SERVER_ERROR: 500;
|
|
28
|
+
readonly NOT_IMPLEMENTED: 501;
|
|
29
|
+
readonly BAD_GATEWAY: 502;
|
|
30
|
+
readonly SERVICE_UNAVAILABLE: 503;
|
|
31
|
+
readonly GATEWAY_TIMEOUT: 504;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type StatusCodeCategory = keyof typeof StatusCodes;
|
|
35
|
+
export type StatusCodeType = (typeof StatusCodes)[StatusCodeCategory][keyof (typeof StatusCodes)[StatusCodeCategory]];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IncomingHttpRequest } from '../../types/context.js';
|
|
2
|
+
export declare const DEFAULT_REQUEST_ID_HEADERS: readonly ["x-request-id", "x-correlation-id", "traceparent"];
|
|
3
|
+
export declare function resolveRequestId(req: IncomingHttpRequest, headerNames?: readonly string[]): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { StatusCodes, type StatusCodeCategory, type StatusCodeType, DEFAULT_SECURITY_HEADERS, NO_BODY_STATUS_CODES, shouldSendResponseBody, } from './constants/index.js';
|
|
2
|
+
export { generateUUID, isValidUUID, DEFAULT_REQUEST_ID_HEADERS, resolveRequestId, } from './helpers/index.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xrystal/dto",
|
|
3
|
+
"version": "26.06.27-v12",
|
|
4
|
+
"description": "Framework-agnostic Data Transfer Object library for HTTP, WebSocket, and Socket.IO responses, logs, and queue messages.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/index.cjs",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./dto": {
|
|
19
|
+
"types": "./dist/dto/runtime/dto.d.ts",
|
|
20
|
+
"import": "./dist/dto/runtime/dto.js",
|
|
21
|
+
"require": "./dist/dto/runtime/dto.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./response": {
|
|
24
|
+
"types": "./dist/dto/response/index.d.ts",
|
|
25
|
+
"import": "./dist/dto/response/index.js",
|
|
26
|
+
"require": "./dist/dto/response/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./log": {
|
|
29
|
+
"types": "./dist/dto/log/index.d.ts",
|
|
30
|
+
"import": "./dist/dto/log/index.js",
|
|
31
|
+
"require": "./dist/dto/log/index.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./queue": {
|
|
34
|
+
"types": "./dist/dto/queue/index.d.ts",
|
|
35
|
+
"import": "./dist/dto/queue/index.js",
|
|
36
|
+
"require": "./dist/dto/queue/index.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./core": {
|
|
39
|
+
"types": "./dist/core/index.d.ts",
|
|
40
|
+
"import": "./dist/core/index.js",
|
|
41
|
+
"require": "./dist/core/index.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./express": {
|
|
44
|
+
"types": "./dist/adapters/express.d.ts",
|
|
45
|
+
"import": "./dist/adapters/express.js",
|
|
46
|
+
"require": "./dist/adapters/express.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./node": {
|
|
49
|
+
"types": "./dist/adapters/node.d.ts",
|
|
50
|
+
"import": "./dist/adapters/node.js",
|
|
51
|
+
"require": "./dist/adapters/node.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./elysia": {
|
|
54
|
+
"types": "./dist/adapters/elysia.d.ts",
|
|
55
|
+
"import": "./dist/adapters/elysia.js",
|
|
56
|
+
"require": "./dist/adapters/elysia.cjs"
|
|
57
|
+
},
|
|
58
|
+
"./websocket": {
|
|
59
|
+
"types": "./dist/adapters/websocket.d.ts",
|
|
60
|
+
"import": "./dist/adapters/websocket.js",
|
|
61
|
+
"require": "./dist/adapters/websocket.cjs"
|
|
62
|
+
},
|
|
63
|
+
"./socketio": {
|
|
64
|
+
"types": "./dist/adapters/socketio.d.ts",
|
|
65
|
+
"import": "./dist/adapters/socketio.js",
|
|
66
|
+
"require": "./dist/adapters/socketio.cjs"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"dist"
|
|
71
|
+
],
|
|
72
|
+
"scripts": {
|
|
73
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
74
|
+
"test:verbose": "node --experimental-vm-modules node_modules/jest/bin/jest.js --verbose",
|
|
75
|
+
"test:watch": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watch",
|
|
76
|
+
"build": "node src/utils/scripts/build.mjs",
|
|
77
|
+
"build:only": "tsup",
|
|
78
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
79
|
+
"build:release": "npm run build:only && npm run build:types",
|
|
80
|
+
"release": "node src/utils/scripts/release.mjs",
|
|
81
|
+
"tag": "node src/utils/scripts/tag.mjs",
|
|
82
|
+
"version:check": "node src/utils/scripts/version-check.mjs",
|
|
83
|
+
"lint": "tsc --noEmit -p tsconfig.json",
|
|
84
|
+
"prepublishOnly": "npm run lint && npm run test && npm run build:release"
|
|
85
|
+
},
|
|
86
|
+
"repository": {
|
|
87
|
+
"type": "git",
|
|
88
|
+
"url": "git+https://github.com/xdloper/x.git"
|
|
89
|
+
},
|
|
90
|
+
"keywords": [
|
|
91
|
+
"dto",
|
|
92
|
+
"data-transfer-object",
|
|
93
|
+
"api",
|
|
94
|
+
"response",
|
|
95
|
+
"builder",
|
|
96
|
+
"middleware",
|
|
97
|
+
"express",
|
|
98
|
+
"elysia",
|
|
99
|
+
"bun",
|
|
100
|
+
"nodejs",
|
|
101
|
+
"typescript"
|
|
102
|
+
],
|
|
103
|
+
"author": "xrystal",
|
|
104
|
+
"license": "MIT",
|
|
105
|
+
"peerDependencies": {
|
|
106
|
+
"elysia": ">=1.0.0",
|
|
107
|
+
"express": "^4.0.0 || ^5.0.0"
|
|
108
|
+
},
|
|
109
|
+
"peerDependenciesMeta": {
|
|
110
|
+
"express": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"elysia": {
|
|
114
|
+
"optional": true
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"devDependencies": {
|
|
118
|
+
"@types/express": "^5.0.6",
|
|
119
|
+
"@types/jest": "^29.5.14",
|
|
120
|
+
"@types/node": "^25.6.0",
|
|
121
|
+
"@types/supertest": "^7.2.0",
|
|
122
|
+
"elysia": "^1.3.0",
|
|
123
|
+
"express": "^5.2.1",
|
|
124
|
+
"jest": "^29.7.0",
|
|
125
|
+
"supertest": "^7.2.2",
|
|
126
|
+
"ts-jest": "^29.4.0",
|
|
127
|
+
"tsup": "^8.5.1",
|
|
128
|
+
"typescript": "^6.0.3"
|
|
129
|
+
}
|
|
130
|
+
}
|