clear-router 2.7.3 → 2.7.5
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/{Request-DNXqFcES.d.mts → Request-DKXwa_W0.d.mts} +7 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.mts +1 -1
- 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 +7 -1
- package/dist/index.d.mts +7 -1
- package/dist/koa/index.d.cts +1 -1
- package/dist/koa/index.d.mts +1 -1
- package/dist/{router-BxQ2xVPM.d.mts → router-CYBshGMl.d.mts} +6 -4
- package/dist/{router-TAQWO9Tt.d.cts → router-tpnSi_Y7.d.cts} +6 -4
- 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/package.json +1 -1
|
@@ -5,6 +5,12 @@ import { Middleware as Middleware$2 } from "./types/hono.mjs";
|
|
|
5
5
|
import { Middleware as Middleware$3 } from "./types/koa.mjs";
|
|
6
6
|
import { Middleware as Middleware$4 } from "./types/express.mjs";
|
|
7
7
|
|
|
8
|
+
//#region src/Contracts.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* HTTP context passed to route handlers
|
|
11
|
+
*/
|
|
12
|
+
interface ClearHttpContext {}
|
|
13
|
+
//#endregion
|
|
8
14
|
//#region src/core/Response.d.ts
|
|
9
15
|
declare class Response {
|
|
10
16
|
[key: string]: any;
|
|
@@ -100,4 +106,4 @@ declare class Request<X = any, M = any> extends ClearRequest<X, M> {
|
|
|
100
106
|
is(method: HttpMethod | string): boolean;
|
|
101
107
|
}
|
|
102
108
|
//#endregion
|
|
103
|
-
export { Response as n, Request as t };
|
|
109
|
+
export { Response as n, ClearHttpContext as r, Request as t };
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { P as Response, a as ClearRouterPluginInput, c as PluginBind, d as PluginSetupResult, f as definePlugin, i as ClearRouterPluginContext, l as PluginBindFactory, n as ClearRouterPlugin, o as ClearRouterPluginRequestContext, p as Request, r as ClearRouterPluginArgumentsContext, s as PluginArgumentsResolver, t as CoreRouter, u as PluginBindValue } from "../router-
|
|
1
|
+
import { P as Response, a as ClearRouterPluginInput, c as PluginBind, d as PluginSetupResult, f as definePlugin, i as ClearRouterPluginContext, l as PluginBindFactory, n as ClearRouterPlugin, o as ClearRouterPluginRequestContext, p as Request, r as ClearRouterPluginArgumentsContext, s as PluginArgumentsResolver, t as CoreRouter, u as PluginBindValue } from "../router-tpnSi_Y7.cjs";
|
|
2
2
|
export { 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 { P as Response, a as ClearRouterPluginInput, c as PluginBind, d as PluginSetupResult, f as definePlugin, i as ClearRouterPluginContext, l as PluginBindFactory, n as ClearRouterPlugin, o as ClearRouterPluginRequestContext, p as Request, r as ClearRouterPluginArgumentsContext, s as PluginArgumentsResolver, t as CoreRouter, u as PluginBindValue } from "../router-
|
|
1
|
+
import { P as Response, a as ClearRouterPluginInput, c as PluginBind, d as PluginSetupResult, f as definePlugin, i as ClearRouterPluginContext, l as PluginBindFactory, n as ClearRouterPlugin, o as ClearRouterPluginRequestContext, p as Request, r as ClearRouterPluginArgumentsContext, s as PluginArgumentsResolver, t as CoreRouter, u as PluginBindValue } from "../router-CYBshGMl.mjs";
|
|
2
2
|
export { 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 { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, M as HttpContext, N as Middleware, j as Handler, m as Route, t as CoreRouter } from "../router-
|
|
1
|
+
import { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, M as HttpContext, N as Middleware, j as Handler, m as Route, t as CoreRouter } from "../router-tpnSi_Y7.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 { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, M as HttpContext, N as Middleware, j as Handler, m as Route, t as CoreRouter } from "../router-
|
|
1
|
+
import { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, M as HttpContext, N as Middleware, j as Handler, m as Route, t as CoreRouter } from "../router-CYBshGMl.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 Middleware, D as FastifyApp, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, O as Handler, k as HttpContext, m as Route, t as CoreRouter } from "../router-
|
|
1
|
+
import { A as Middleware, D as FastifyApp, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, O as Handler, k as HttpContext, m as Route, t as CoreRouter } from "../router-tpnSi_Y7.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 Middleware, D as FastifyApp, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, O as Handler, k as HttpContext, m as Route, t as CoreRouter } from "../router-
|
|
1
|
+
import { A as Middleware, D as FastifyApp, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, O as Handler, k as HttpContext, m as Route, t as CoreRouter } from "../router-CYBshGMl.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 { C as H3App, E as Middleware, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-
|
|
1
|
+
import { C as H3App, E as Middleware, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-tpnSi_Y7.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 { C as H3App, E as Middleware, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-
|
|
1
|
+
import { C as H3App, E as Middleware, F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-CYBshGMl.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 { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-
|
|
1
|
+
import { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-tpnSi_Y7.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 { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-
|
|
1
|
+
import { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-CYBshGMl.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/hono/router.d.ts
|
|
4
4
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -5,6 +5,12 @@ import { MiddlewareHandler } from "hono";
|
|
|
5
5
|
import Koa from "koa";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
|
|
8
|
+
//#region src/Contracts.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* HTTP context passed to route handlers
|
|
11
|
+
*/
|
|
12
|
+
interface ClearHttpContext {}
|
|
13
|
+
//#endregion
|
|
8
14
|
//#region src/types/basic.d.ts
|
|
9
15
|
/**
|
|
10
16
|
* HTTP methods supported by the router
|
|
@@ -554,4 +560,4 @@ declare abstract class CoreRouter {
|
|
|
554
560
|
}): void;
|
|
555
561
|
}
|
|
556
562
|
//#endregion
|
|
557
|
-
export { ClearRequest, ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, Controller, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response$1 as Response, Route, RouteParameter, definePlugin };
|
|
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
|
@@ -5,6 +5,12 @@ import { FastifyReply, FastifyRequest } from "fastify";
|
|
|
5
5
|
import { MiddlewareHandler } from "hono";
|
|
6
6
|
import Koa from "koa";
|
|
7
7
|
|
|
8
|
+
//#region src/Contracts.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* HTTP context passed to route handlers
|
|
11
|
+
*/
|
|
12
|
+
interface ClearHttpContext {}
|
|
13
|
+
//#endregion
|
|
8
14
|
//#region src/types/basic.d.ts
|
|
9
15
|
/**
|
|
10
16
|
* HTTP methods supported by the router
|
|
@@ -554,4 +560,4 @@ declare abstract class CoreRouter {
|
|
|
554
560
|
}): void;
|
|
555
561
|
}
|
|
556
562
|
//#endregion
|
|
557
|
-
export { ClearRequest, ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, Controller, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response$1 as Response, Route, RouteParameter, definePlugin };
|
|
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 { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-
|
|
1
|
+
import { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-tpnSi_Y7.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 { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-
|
|
1
|
+
import { F as ApiResourceMiddleware, I as ControllerAction, L as HttpMethod, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-CYBshGMl.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/koa/router.d.ts
|
|
4
4
|
/**
|
|
@@ -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.
|
|
@@ -53,6 +49,12 @@ interface RouterConfig {
|
|
|
53
49
|
};
|
|
54
50
|
}
|
|
55
51
|
//#endregion
|
|
52
|
+
//#region src/Contracts.d.ts
|
|
53
|
+
/**
|
|
54
|
+
* HTTP context passed to route handlers
|
|
55
|
+
*/
|
|
56
|
+
interface ClearHttpContext {}
|
|
57
|
+
//#endregion
|
|
56
58
|
//#region src/core/Response.d.ts
|
|
57
59
|
declare class Response$2 {
|
|
58
60
|
[key: string]: any;
|
|
@@ -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.
|
|
@@ -53,6 +49,12 @@ interface RouterConfig {
|
|
|
53
49
|
};
|
|
54
50
|
}
|
|
55
51
|
//#endregion
|
|
52
|
+
//#region src/Contracts.d.ts
|
|
53
|
+
/**
|
|
54
|
+
* HTTP context passed to route handlers
|
|
55
|
+
*/
|
|
56
|
+
interface ClearHttpContext {}
|
|
57
|
+
//#endregion
|
|
56
58
|
//#region src/core/Response.d.ts
|
|
57
59
|
declare class Response$2 {
|
|
58
60
|
[key: string]: any;
|
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 Response$1, t as Request$1 } from "../Request-
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Response$1, r as ClearHttpContext, t as Request$1 } from "../Request-DKXwa_W0.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 Request } from "../Request-
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Response, r as ClearHttpContext, t as Request } from "../Request-DKXwa_W0.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 Request } from "../Request-
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Response$1, r as ClearHttpContext, t as Request } from "../Request-DKXwa_W0.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 Request } from "../Request-
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Response, r as ClearHttpContext, t as Request } from "../Request-DKXwa_W0.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 Request } from "../Request-
|
|
1
|
+
import { ControllerHandler } from "./basic.mjs";
|
|
2
|
+
import { n as Response, r as ClearHttpContext, t as Request } from "../Request-DKXwa_W0.mjs";
|
|
3
3
|
import Koa from "koa";
|
|
4
4
|
import Router from "@koa/router";
|
|
5
5
|
|
package/package.json
CHANGED