clear-router 2.7.3 → 2.7.4
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/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.mts +2 -2
- package/dist/decorators/setup.d.mts +1 -0
- package/dist/express/index.d.cts +1 -1
- package/dist/express/index.d.mts +1 -1
- package/dist/fastify/index.d.cts +1 -1
- package/dist/fastify/index.d.mts +1 -1
- package/dist/h3/index.d.cts +1 -1
- package/dist/h3/index.d.mts +1 -1
- package/dist/hono/index.d.cts +1 -1
- package/dist/hono/index.d.mts +1 -1
- package/dist/index.d.cts +56 -50
- package/dist/index.d.mts +55 -49
- package/dist/koa/index.d.cts +1 -1
- package/dist/koa/index.d.mts +1 -1
- package/dist/types/basic.d.mts +1 -5
- package/dist/types/express.d.mts +2 -2
- package/dist/types/fastify.d.mts +2 -2
- package/dist/types/h3.d.mts +2 -2
- package/dist/types/hono.d.mts +2 -2
- package/dist/types/koa.d.mts +2 -2
- package/dist/{router-BxQ2xVPM.d.mts → types-1JoEn1DP.d.mts} +7 -5
- package/dist/{router-TAQWO9Tt.d.cts → types-CWEND0si.d.cts} +7 -5
- package/dist/{Request-DNXqFcES.d.mts → types-D6JAxrWo.d.mts} +7 -1
- package/package.json +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
|
|
1
|
+
import { F as Response, a as ClearRouterPluginContext, c as PluginArgumentsResolver, d as PluginBindValue, f as PluginSetupResult, i as ClearRouterPluginArgumentsContext, l as PluginBind, m as Request, n as CoreRouter, o as ClearRouterPluginInput, p as definePlugin, r as ClearRouterPlugin, s as ClearRouterPluginRequestContext, t as ClearHttpContext, u as PluginBindFactory } from "../types-CWEND0si.cjs";
|
|
2
|
+
export { ClearHttpContext, ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
|
|
1
|
+
import { F as Response, a as ClearRouterPluginContext, c as PluginArgumentsResolver, d as PluginBindValue, f as PluginSetupResult, i as ClearRouterPluginArgumentsContext, l as PluginBind, m as Request, n as CoreRouter, o as ClearRouterPluginInput, p as definePlugin, r as ClearRouterPlugin, s as ClearRouterPluginRequestContext, t as ClearHttpContext, u as PluginBindFactory } from "../types-1JoEn1DP.mjs";
|
|
2
|
+
export { ClearHttpContext, ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
|
package/dist/express/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as ApiResourceMiddleware, L as ControllerAction, M as Handler, N as HttpContext, P as Middleware, R as HttpMethod, h as Route, n as CoreRouter } from "../types-CWEND0si.cjs";
|
|
2
2
|
import { Router as Router$1 } from "express";
|
|
3
3
|
|
|
4
4
|
//#region src/express/router.d.ts
|
package/dist/express/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as ApiResourceMiddleware, L as ControllerAction, M as Handler, N as HttpContext, P as Middleware, R as HttpMethod, h as Route, n as CoreRouter } from "../types-1JoEn1DP.mjs";
|
|
2
2
|
import { Router as Router$1 } from "express";
|
|
3
3
|
|
|
4
4
|
//#region src/express/router.d.ts
|
package/dist/fastify/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as HttpContext, I as ApiResourceMiddleware, L as ControllerAction, O as FastifyApp, R as HttpMethod, h as Route, j as Middleware, k as Handler, n as CoreRouter } from "../types-CWEND0si.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/fastify/router.d.ts
|
|
4
4
|
/**
|
package/dist/fastify/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as HttpContext, I as ApiResourceMiddleware, L as ControllerAction, O as FastifyApp, R as HttpMethod, h as Route, j as Middleware, k as Handler, n as CoreRouter } from "../types-1JoEn1DP.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/fastify/router.d.ts
|
|
4
4
|
/**
|
package/dist/h3/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as Middleware, E as HttpContext, I as ApiResourceMiddleware, L as ControllerAction, R as HttpMethod, T as Handler, h as Route, n as CoreRouter, w as H3App } from "../types-CWEND0si.cjs";
|
|
2
2
|
import { H3 } from "h3";
|
|
3
3
|
|
|
4
4
|
//#region src/h3/router.d.ts
|
package/dist/h3/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as Middleware, E as HttpContext, I as ApiResourceMiddleware, L as ControllerAction, R as HttpMethod, T as Handler, h as Route, n as CoreRouter, w as H3App } from "../types-1JoEn1DP.mjs";
|
|
2
2
|
import { H3 } from "h3";
|
|
3
3
|
|
|
4
4
|
//#region src/h3/router.d.ts
|
package/dist/hono/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as Middleware, I as ApiResourceMiddleware, L as ControllerAction, R as HttpMethod, S as HttpContext, b as Handler, h as Route, n as CoreRouter, x as HonoApp } from "../types-CWEND0si.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/hono/router.d.ts
|
|
4
4
|
/**
|
package/dist/hono/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as Middleware, I as ApiResourceMiddleware, L as ControllerAction, R as HttpMethod, S as HttpContext, b as Handler, h as Route, n as CoreRouter, x as HonoApp } from "../types-1JoEn1DP.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/hono/router.d.ts
|
|
4
4
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { NextFunction, Request as Request$1, Response as Response$2 } from "express";
|
|
2
2
|
import { Middleware as Middleware$4 } from "h3";
|
|
3
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
4
|
import { FastifyReply, FastifyRequest } from "fastify";
|
|
4
5
|
import { MiddlewareHandler } from "hono";
|
|
5
6
|
import Koa from "koa";
|
|
6
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
|
|
8
8
|
//#region src/types/basic.d.ts
|
|
9
9
|
/**
|
|
@@ -119,54 +119,6 @@ declare class Request<X = any, M = any> extends ClearRequest<X, M> {
|
|
|
119
119
|
is(method: HttpMethod | string): boolean;
|
|
120
120
|
}
|
|
121
121
|
//#endregion
|
|
122
|
-
//#region src/types/express.d.ts
|
|
123
|
-
/**
|
|
124
|
-
* Middleware function type
|
|
125
|
-
*/
|
|
126
|
-
type Middleware$3 = (req: Request$1, res: Response$2, next: NextFunction) => any | Promise<any>;
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/types/fastify.d.ts
|
|
129
|
-
interface RequestWithGetBody extends FastifyRequest {
|
|
130
|
-
getBody: () => Record<string, any>;
|
|
131
|
-
}
|
|
132
|
-
type NextFunction$1 = (err?: Error) => void;
|
|
133
|
-
type Middleware$2 = (req: RequestWithGetBody, reply: FastifyReply, next: NextFunction$1) => any | Promise<any>;
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region src/types/hono.d.ts
|
|
136
|
-
type Middleware$1 = MiddlewareHandler;
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region src/types/koa.d.ts
|
|
139
|
-
type Middleware = Koa.Middleware<any, any>;
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region src/ClearRequest.d.ts
|
|
142
|
-
declare class ClearRequest<X = any, M = Middleware$4 | Middleware$3 | Middleware$2 | Middleware$1 | Middleware> {
|
|
143
|
-
[key: string]: any;
|
|
144
|
-
/**
|
|
145
|
-
* @param body - Parsed request body
|
|
146
|
-
*/
|
|
147
|
-
body: RequestData;
|
|
148
|
-
/**
|
|
149
|
-
* @param query - Parsed query parameters
|
|
150
|
-
*/
|
|
151
|
-
query: RequestData;
|
|
152
|
-
/**
|
|
153
|
-
* @param params - Parsed route parameters
|
|
154
|
-
*/
|
|
155
|
-
params: RequestData;
|
|
156
|
-
route: Route<X, M>;
|
|
157
|
-
constructor(init?: Partial<ClearRequest>);
|
|
158
|
-
}
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/Controller.d.ts
|
|
161
|
-
declare abstract class Controller<X = any> {
|
|
162
|
-
[x: string]: any;
|
|
163
|
-
ctx: X;
|
|
164
|
-
body: RequestData;
|
|
165
|
-
query: RequestData;
|
|
166
|
-
params: RequestData;
|
|
167
|
-
clearRequest: ClearRequest;
|
|
168
|
-
}
|
|
169
|
-
//#endregion
|
|
170
122
|
//#region src/core/bindings.d.ts
|
|
171
123
|
type BindToken<T = any> = abstract new (...args: any[]) => T;
|
|
172
124
|
type BindFactory<T = any> = (ctx: any) => T | Promise<T>;
|
|
@@ -289,6 +241,16 @@ type ClearRouterPluginInput<Options = any, HttpContext = any> = ClearRouterPlugi
|
|
|
289
241
|
*/
|
|
290
242
|
declare function definePlugin<Options = any, HttpContext = any>(plugin: ClearRouterPlugin<Options, HttpContext>): ClearRouterPlugin<Options, HttpContext>;
|
|
291
243
|
//#endregion
|
|
244
|
+
//#region src/Controller.d.ts
|
|
245
|
+
declare abstract class Controller<X = any> {
|
|
246
|
+
[x: string]: any;
|
|
247
|
+
ctx: X;
|
|
248
|
+
body: RequestData;
|
|
249
|
+
query: RequestData;
|
|
250
|
+
params: RequestData;
|
|
251
|
+
clearRequest: ClearRequest;
|
|
252
|
+
}
|
|
253
|
+
//#endregion
|
|
292
254
|
//#region src/core/router.d.ts
|
|
293
255
|
/**
|
|
294
256
|
* @class clear-router CoreRouter
|
|
@@ -554,4 +516,48 @@ declare abstract class CoreRouter {
|
|
|
554
516
|
}): void;
|
|
555
517
|
}
|
|
556
518
|
//#endregion
|
|
557
|
-
|
|
519
|
+
//#region src/core/types.d.ts
|
|
520
|
+
/**
|
|
521
|
+
* HTTP context passed to route handlers
|
|
522
|
+
*/
|
|
523
|
+
interface ClearHttpContext {}
|
|
524
|
+
//#endregion
|
|
525
|
+
//#region src/types/express.d.ts
|
|
526
|
+
/**
|
|
527
|
+
* Middleware function type
|
|
528
|
+
*/
|
|
529
|
+
type Middleware$3 = (req: Request$1, res: Response$2, next: NextFunction) => any | Promise<any>;
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region src/types/fastify.d.ts
|
|
532
|
+
interface RequestWithGetBody extends FastifyRequest {
|
|
533
|
+
getBody: () => Record<string, any>;
|
|
534
|
+
}
|
|
535
|
+
type NextFunction$1 = (err?: Error) => void;
|
|
536
|
+
type Middleware$2 = (req: RequestWithGetBody, reply: FastifyReply, next: NextFunction$1) => any | Promise<any>;
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region src/types/hono.d.ts
|
|
539
|
+
type Middleware$1 = MiddlewareHandler;
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region src/types/koa.d.ts
|
|
542
|
+
type Middleware = Koa.Middleware<any, any>;
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region src/ClearRequest.d.ts
|
|
545
|
+
declare class ClearRequest<X = any, M = Middleware$4 | Middleware$3 | Middleware$2 | Middleware$1 | Middleware> {
|
|
546
|
+
[key: string]: any;
|
|
547
|
+
/**
|
|
548
|
+
* @param body - Parsed request body
|
|
549
|
+
*/
|
|
550
|
+
body: RequestData;
|
|
551
|
+
/**
|
|
552
|
+
* @param query - Parsed query parameters
|
|
553
|
+
*/
|
|
554
|
+
query: RequestData;
|
|
555
|
+
/**
|
|
556
|
+
* @param params - Parsed route parameters
|
|
557
|
+
*/
|
|
558
|
+
params: RequestData;
|
|
559
|
+
route: Route<X, M>;
|
|
560
|
+
constructor(init?: Partial<ClearRequest>);
|
|
561
|
+
}
|
|
562
|
+
//#endregion
|
|
563
|
+
export { ClearHttpContext, ClearRequest, ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, Controller, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response$1 as Response, Route, RouteParameter, definePlugin };
|
package/dist/index.d.mts
CHANGED
|
@@ -119,54 +119,6 @@ declare class Request<X = any, M = any> extends ClearRequest<X, M> {
|
|
|
119
119
|
is(method: HttpMethod | string): boolean;
|
|
120
120
|
}
|
|
121
121
|
//#endregion
|
|
122
|
-
//#region src/types/express.d.ts
|
|
123
|
-
/**
|
|
124
|
-
* Middleware function type
|
|
125
|
-
*/
|
|
126
|
-
type Middleware$3 = (req: Request$1, res: Response$2, next: NextFunction) => any | Promise<any>;
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/types/fastify.d.ts
|
|
129
|
-
interface RequestWithGetBody extends FastifyRequest {
|
|
130
|
-
getBody: () => Record<string, any>;
|
|
131
|
-
}
|
|
132
|
-
type NextFunction$1 = (err?: Error) => void;
|
|
133
|
-
type Middleware$2 = (req: RequestWithGetBody, reply: FastifyReply, next: NextFunction$1) => any | Promise<any>;
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region src/types/hono.d.ts
|
|
136
|
-
type Middleware$1 = MiddlewareHandler;
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region src/types/koa.d.ts
|
|
139
|
-
type Middleware = Koa.Middleware<any, any>;
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region src/ClearRequest.d.ts
|
|
142
|
-
declare class ClearRequest<X = any, M = Middleware$4 | Middleware$3 | Middleware$2 | Middleware$1 | Middleware> {
|
|
143
|
-
[key: string]: any;
|
|
144
|
-
/**
|
|
145
|
-
* @param body - Parsed request body
|
|
146
|
-
*/
|
|
147
|
-
body: RequestData;
|
|
148
|
-
/**
|
|
149
|
-
* @param query - Parsed query parameters
|
|
150
|
-
*/
|
|
151
|
-
query: RequestData;
|
|
152
|
-
/**
|
|
153
|
-
* @param params - Parsed route parameters
|
|
154
|
-
*/
|
|
155
|
-
params: RequestData;
|
|
156
|
-
route: Route<X, M>;
|
|
157
|
-
constructor(init?: Partial<ClearRequest>);
|
|
158
|
-
}
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/Controller.d.ts
|
|
161
|
-
declare abstract class Controller<X = any> {
|
|
162
|
-
[x: string]: any;
|
|
163
|
-
ctx: X;
|
|
164
|
-
body: RequestData;
|
|
165
|
-
query: RequestData;
|
|
166
|
-
params: RequestData;
|
|
167
|
-
clearRequest: ClearRequest;
|
|
168
|
-
}
|
|
169
|
-
//#endregion
|
|
170
122
|
//#region src/core/bindings.d.ts
|
|
171
123
|
type BindToken<T = any> = abstract new (...args: any[]) => T;
|
|
172
124
|
type BindFactory<T = any> = (ctx: any) => T | Promise<T>;
|
|
@@ -289,6 +241,16 @@ type ClearRouterPluginInput<Options = any, HttpContext = any> = ClearRouterPlugi
|
|
|
289
241
|
*/
|
|
290
242
|
declare function definePlugin<Options = any, HttpContext = any>(plugin: ClearRouterPlugin<Options, HttpContext>): ClearRouterPlugin<Options, HttpContext>;
|
|
291
243
|
//#endregion
|
|
244
|
+
//#region src/Controller.d.ts
|
|
245
|
+
declare abstract class Controller<X = any> {
|
|
246
|
+
[x: string]: any;
|
|
247
|
+
ctx: X;
|
|
248
|
+
body: RequestData;
|
|
249
|
+
query: RequestData;
|
|
250
|
+
params: RequestData;
|
|
251
|
+
clearRequest: ClearRequest;
|
|
252
|
+
}
|
|
253
|
+
//#endregion
|
|
292
254
|
//#region src/core/router.d.ts
|
|
293
255
|
/**
|
|
294
256
|
* @class clear-router CoreRouter
|
|
@@ -554,4 +516,48 @@ declare abstract class CoreRouter {
|
|
|
554
516
|
}): void;
|
|
555
517
|
}
|
|
556
518
|
//#endregion
|
|
557
|
-
|
|
519
|
+
//#region src/core/types.d.ts
|
|
520
|
+
/**
|
|
521
|
+
* HTTP context passed to route handlers
|
|
522
|
+
*/
|
|
523
|
+
interface ClearHttpContext {}
|
|
524
|
+
//#endregion
|
|
525
|
+
//#region src/types/express.d.ts
|
|
526
|
+
/**
|
|
527
|
+
* Middleware function type
|
|
528
|
+
*/
|
|
529
|
+
type Middleware$3 = (req: Request$1, res: Response$2, next: NextFunction) => any | Promise<any>;
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region src/types/fastify.d.ts
|
|
532
|
+
interface RequestWithGetBody extends FastifyRequest {
|
|
533
|
+
getBody: () => Record<string, any>;
|
|
534
|
+
}
|
|
535
|
+
type NextFunction$1 = (err?: Error) => void;
|
|
536
|
+
type Middleware$2 = (req: RequestWithGetBody, reply: FastifyReply, next: NextFunction$1) => any | Promise<any>;
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region src/types/hono.d.ts
|
|
539
|
+
type Middleware$1 = MiddlewareHandler;
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region src/types/koa.d.ts
|
|
542
|
+
type Middleware = Koa.Middleware<any, any>;
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region src/ClearRequest.d.ts
|
|
545
|
+
declare class ClearRequest<X = any, M = Middleware$4 | Middleware$3 | Middleware$2 | Middleware$1 | Middleware> {
|
|
546
|
+
[key: string]: any;
|
|
547
|
+
/**
|
|
548
|
+
* @param body - Parsed request body
|
|
549
|
+
*/
|
|
550
|
+
body: RequestData;
|
|
551
|
+
/**
|
|
552
|
+
* @param query - Parsed query parameters
|
|
553
|
+
*/
|
|
554
|
+
query: RequestData;
|
|
555
|
+
/**
|
|
556
|
+
* @param params - Parsed route parameters
|
|
557
|
+
*/
|
|
558
|
+
params: RequestData;
|
|
559
|
+
route: Route<X, M>;
|
|
560
|
+
constructor(init?: Partial<ClearRequest>);
|
|
561
|
+
}
|
|
562
|
+
//#endregion
|
|
563
|
+
export { ClearHttpContext, ClearRequest, ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, Controller, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response$1 as Response, Route, RouteParameter, definePlugin };
|
package/dist/koa/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as ApiResourceMiddleware, L as ControllerAction, R as HttpMethod, _ as HttpContext, g as Handler, h as Route, n as CoreRouter, v as KoaRouterApp, y as Middleware } from "../types-CWEND0si.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/koa/router.d.ts
|
|
4
4
|
/**
|
package/dist/koa/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as ApiResourceMiddleware, L as ControllerAction, R as HttpMethod, _ as HttpContext, g as Handler, h as Route, n as CoreRouter, v as KoaRouterApp, y as Middleware } from "../types-1JoEn1DP.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/koa/router.d.ts
|
|
4
4
|
/**
|
package/dist/types/basic.d.mts
CHANGED
|
@@ -16,10 +16,6 @@ type ControllerAction = 'index' | 'show' | 'create' | 'update' | 'destroy';
|
|
|
16
16
|
*/
|
|
17
17
|
type RequestData = Record<string, any>;
|
|
18
18
|
type ApiResourceMiddleware<M = any> = M | M[] | { [K in ControllerAction]?: M | M[] };
|
|
19
|
-
/**
|
|
20
|
-
* HTTP context passed to route handlers
|
|
21
|
-
*/
|
|
22
|
-
interface ClearHttpContext {}
|
|
23
19
|
interface RouterConfig {
|
|
24
20
|
/**
|
|
25
21
|
* When enabled, API param name will be infered from the route path.
|
|
@@ -44,4 +40,4 @@ interface RouterConfig {
|
|
|
44
40
|
};
|
|
45
41
|
}
|
|
46
42
|
//#endregion
|
|
47
|
-
export { ApiResourceMiddleware,
|
|
43
|
+
export { ApiResourceMiddleware, ControllerAction, ControllerHandler, HttpMethod, RequestData, RouterConfig };
|
package/dist/types/express.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Request$1, r as Response$1, t as ClearHttpContext } from "../types-D6JAxrWo.mjs";
|
|
3
3
|
import { NextFunction, Request, Response } from "express";
|
|
4
4
|
|
|
5
5
|
//#region src/types/express.d.ts
|
package/dist/types/fastify.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as Response, t as
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Request, r as Response, t as ClearHttpContext } from "../types-D6JAxrWo.mjs";
|
|
3
3
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
4
4
|
|
|
5
5
|
//#region src/types/fastify.d.ts
|
package/dist/types/h3.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as Response$1, t as
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Request, r as Response$1, t as ClearHttpContext } from "../types-D6JAxrWo.mjs";
|
|
3
3
|
import { EventHandlerRequest, H3, H3Event, Middleware, TypedServerRequest } from "h3";
|
|
4
4
|
|
|
5
5
|
//#region src/types/h3.d.ts
|
package/dist/types/hono.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as Response, t as
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Request, r as Response, t as ClearHttpContext } from "../types-D6JAxrWo.mjs";
|
|
3
3
|
import { Context, HonoRequest, MiddlewareHandler } from "hono";
|
|
4
4
|
|
|
5
5
|
//#region src/types/hono.d.ts
|
package/dist/types/koa.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as Response, t as
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Request, r as Response, t as ClearHttpContext } from "../types-D6JAxrWo.mjs";
|
|
3
3
|
import Koa from "koa";
|
|
4
4
|
import Router from "@koa/router";
|
|
5
5
|
|
|
@@ -25,10 +25,6 @@ type ControllerAction = 'index' | 'show' | 'create' | 'update' | 'destroy';
|
|
|
25
25
|
*/
|
|
26
26
|
type RequestData = Record<string, any>;
|
|
27
27
|
type ApiResourceMiddleware<M = any> = M | M[] | { [K in ControllerAction]?: M | M[] };
|
|
28
|
-
/**
|
|
29
|
-
* HTTP context passed to route handlers
|
|
30
|
-
*/
|
|
31
|
-
interface ClearHttpContext {}
|
|
32
28
|
interface RouterConfig {
|
|
33
29
|
/**
|
|
34
30
|
* When enabled, API param name will be infered from the route path.
|
|
@@ -647,4 +643,10 @@ declare abstract class CoreRouter {
|
|
|
647
643
|
}): void;
|
|
648
644
|
}
|
|
649
645
|
//#endregion
|
|
650
|
-
|
|
646
|
+
//#region src/core/types.d.ts
|
|
647
|
+
/**
|
|
648
|
+
* HTTP context passed to route handlers
|
|
649
|
+
*/
|
|
650
|
+
interface ClearHttpContext {}
|
|
651
|
+
//#endregion
|
|
652
|
+
export { HttpContext$3 as A, Middleware$1 as C, Middleware$2 as D, HttpContext$2 as E, Response$2 as F, ApiResourceMiddleware as I, ControllerAction as L, Handler$4 as M, HttpContext$4 as N, FastifyApp as O, Middleware$4 as P, HttpMethod as R, HttpContext$1 as S, Handler$2 as T, HttpContext as _, ClearRouterPluginContext as a, Handler$1 as b, PluginArgumentsResolver as c, PluginBindValue as d, PluginSetupResult as f, Handler as g, Route as h, ClearRouterPluginArgumentsContext as i, Middleware$3 as j, Handler$3 as k, PluginBind as l, Request$1 as m, CoreRouter as n, ClearRouterPluginInput as o, definePlugin as p, ClearRouterPlugin as r, ClearRouterPluginRequestContext as s, ClearHttpContext as t, PluginBindFactory as u, KoaRouterApp as v, H3App as w, HonoApp as x, Middleware as y };
|
|
@@ -25,10 +25,6 @@ type ControllerAction = 'index' | 'show' | 'create' | 'update' | 'destroy';
|
|
|
25
25
|
*/
|
|
26
26
|
type RequestData = Record<string, any>;
|
|
27
27
|
type ApiResourceMiddleware<M = any> = M | M[] | { [K in ControllerAction]?: M | M[] };
|
|
28
|
-
/**
|
|
29
|
-
* HTTP context passed to route handlers
|
|
30
|
-
*/
|
|
31
|
-
interface ClearHttpContext {}
|
|
32
28
|
interface RouterConfig {
|
|
33
29
|
/**
|
|
34
30
|
* When enabled, API param name will be infered from the route path.
|
|
@@ -647,4 +643,10 @@ declare abstract class CoreRouter {
|
|
|
647
643
|
}): void;
|
|
648
644
|
}
|
|
649
645
|
//#endregion
|
|
650
|
-
|
|
646
|
+
//#region src/core/types.d.ts
|
|
647
|
+
/**
|
|
648
|
+
* HTTP context passed to route handlers
|
|
649
|
+
*/
|
|
650
|
+
interface ClearHttpContext {}
|
|
651
|
+
//#endregion
|
|
652
|
+
export { HttpContext$3 as A, Middleware$1 as C, Middleware$2 as D, HttpContext$2 as E, Response$2 as F, ApiResourceMiddleware as I, ControllerAction as L, Handler$4 as M, HttpContext$4 as N, FastifyApp as O, Middleware$4 as P, HttpMethod as R, HttpContext$1 as S, Handler$2 as T, HttpContext as _, ClearRouterPluginContext as a, Handler$1 as b, PluginArgumentsResolver as c, PluginBindValue as d, PluginSetupResult as f, Handler as g, Route as h, ClearRouterPluginArgumentsContext as i, Middleware$3 as j, Handler$3 as k, PluginBind as l, Request$1 as m, CoreRouter as n, ClearRouterPluginInput as o, definePlugin as p, ClearRouterPlugin as r, ClearRouterPluginRequestContext as s, ClearHttpContext as t, PluginBindFactory as u, KoaRouterApp as v, H3App as w, HonoApp as x, Middleware as y };
|
|
@@ -100,4 +100,10 @@ declare class Request<X = any, M = any> extends ClearRequest<X, M> {
|
|
|
100
100
|
is(method: HttpMethod | string): boolean;
|
|
101
101
|
}
|
|
102
102
|
//#endregion
|
|
103
|
-
|
|
103
|
+
//#region src/core/types.d.ts
|
|
104
|
+
/**
|
|
105
|
+
* HTTP context passed to route handlers
|
|
106
|
+
*/
|
|
107
|
+
interface ClearHttpContext {}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { Request as n, Response as r, ClearHttpContext as t };
|
package/package.json
CHANGED