clear-router 2.7.1 → 2.7.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.
@@ -1,2 +1,2 @@
1
- import { L 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-C7oMjml0.cjs";
1
+ import { L 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-CY1BZ3Af.cjs";
2
2
  export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
@@ -1,2 +1,2 @@
1
- import { L 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-B86hTwHL.mjs";
1
+ import { L 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-7xO6qBQZ.mjs";
2
2
  export { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
@@ -1,2 +1,3 @@
1
1
  import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-CNL7bpz5.mjs";
2
+ import "reflect-metadata";
2
3
  export { Bind, BindDecorator, BindFactory, BindToken, BindValue, Container };
@@ -1,4 +1,4 @@
1
- import { F as ControllerAction, I as HttpMethod, M as HttpContext, N as Middleware, P as ApiResourceMiddleware, j as Handler, m as Route, t as CoreRouter } from "../router-C7oMjml0.cjs";
1
+ import { F as ControllerAction, I as HttpMethod, M as HttpContext, N as Middleware, P as ApiResourceMiddleware, j as Handler, m as Route, t as CoreRouter } from "../router-CY1BZ3Af.cjs";
2
2
  import { Router as Router$1 } from "express";
3
3
 
4
4
  //#region src/express/router.d.ts
@@ -1,4 +1,4 @@
1
- import { F as ControllerAction, I as HttpMethod, M as HttpContext, N as Middleware, P as ApiResourceMiddleware, j as Handler, m as Route, t as CoreRouter } from "../router-B86hTwHL.mjs";
1
+ import { F as ControllerAction, I as HttpMethod, M as HttpContext, N as Middleware, P as ApiResourceMiddleware, j as Handler, m as Route, t as CoreRouter } from "../router-7xO6qBQZ.mjs";
2
2
  import { Router as Router$1 } from "express";
3
3
 
4
4
  //#region src/express/router.d.ts
@@ -1,4 +1,4 @@
1
- import { A as Middleware, D as FastifyApp, F as ControllerAction, I as HttpMethod, O as Handler, P as ApiResourceMiddleware, k as HttpContext, m as Route, t as CoreRouter } from "../router-C7oMjml0.cjs";
1
+ import { A as Middleware, D as FastifyApp, F as ControllerAction, I as HttpMethod, O as Handler, P as ApiResourceMiddleware, k as HttpContext, m as Route, t as CoreRouter } from "../router-CY1BZ3Af.cjs";
2
2
 
3
3
  //#region src/fastify/router.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { A as Middleware, D as FastifyApp, F as ControllerAction, I as HttpMethod, O as Handler, P as ApiResourceMiddleware, k as HttpContext, m as Route, t as CoreRouter } from "../router-B86hTwHL.mjs";
1
+ import { A as Middleware, D as FastifyApp, F as ControllerAction, I as HttpMethod, O as Handler, P as ApiResourceMiddleware, k as HttpContext, m as Route, t as CoreRouter } from "../router-7xO6qBQZ.mjs";
2
2
 
3
3
  //#region src/fastify/router.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as H3App, E as Middleware, F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-C7oMjml0.cjs";
1
+ import { C as H3App, E as Middleware, F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-CY1BZ3Af.cjs";
2
2
  import { H3 } from "h3";
3
3
 
4
4
  //#region src/h3/router.d.ts
@@ -1,4 +1,4 @@
1
- import { C as H3App, E as Middleware, F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-B86hTwHL.mjs";
1
+ import { C as H3App, E as Middleware, F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, T as HttpContext, m as Route, t as CoreRouter, w as Handler } from "../router-7xO6qBQZ.mjs";
2
2
  import { H3 } from "h3";
3
3
 
4
4
  //#region src/h3/router.d.ts
@@ -1,4 +1,4 @@
1
- import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-C7oMjml0.cjs";
1
+ import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-CY1BZ3Af.cjs";
2
2
 
3
3
  //#region src/hono/router.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-B86hTwHL.mjs";
1
+ import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, S as Middleware, b as HonoApp, m as Route, t as CoreRouter, x as HttpContext, y as Handler } from "../router-7xO6qBQZ.mjs";
2
2
 
3
3
  //#region src/hono/router.d.ts
4
4
  /**
package/dist/index.d.cts CHANGED
@@ -203,9 +203,9 @@ interface ClearRouterPluginArgumentsContext<X = any> extends ClearRouterPluginRe
203
203
  tokens: BindToken[];
204
204
  designTokens: BindToken[];
205
205
  }
206
- type PluginBindFactory<T = any> = (ctx: ClearRouterPluginRequestContext) => T | Promise<T>;
207
- type PluginBindValue<T = any> = BindValue<T> | PluginBindFactory<T>;
208
- type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
206
+ type PluginBindFactory<T = any, X = any> = (ctx: ClearRouterPluginRequestContext<X>) => T | Promise<T>;
207
+ type PluginBindValue<T = any, X = any> = BindValue<T> | PluginBindFactory<T, X>;
208
+ type PluginBind<X = any> = <T>(token: BindToken<T>, value: PluginBindValue<T, X>) => void;
209
209
  type PluginArgumentsResolver<HttpContext = any> = (ctx: ClearRouterPluginArgumentsContext<HttpContext>) => any[] | undefined | Promise<any[] | undefined>;
210
210
  interface ClearRouterPluginContext<Options = any, HttpContext = any> {
211
211
  /**
@@ -215,7 +215,7 @@ interface ClearRouterPluginContext<Options = any, HttpContext = any> {
215
215
  /**
216
216
  * Register service container bindings
217
217
  */
218
- bind: PluginBind;
218
+ bind: PluginBind<HttpContext>;
219
219
  /**
220
220
  * Replace all controller method arguments
221
221
  * @param resolver
package/dist/index.d.mts CHANGED
@@ -203,9 +203,9 @@ interface ClearRouterPluginArgumentsContext<X = any> extends ClearRouterPluginRe
203
203
  tokens: BindToken[];
204
204
  designTokens: BindToken[];
205
205
  }
206
- type PluginBindFactory<T = any> = (ctx: ClearRouterPluginRequestContext) => T | Promise<T>;
207
- type PluginBindValue<T = any> = BindValue<T> | PluginBindFactory<T>;
208
- type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
206
+ type PluginBindFactory<T = any, X = any> = (ctx: ClearRouterPluginRequestContext<X>) => T | Promise<T>;
207
+ type PluginBindValue<T = any, X = any> = BindValue<T> | PluginBindFactory<T, X>;
208
+ type PluginBind<X = any> = <T>(token: BindToken<T>, value: PluginBindValue<T, X>) => void;
209
209
  type PluginArgumentsResolver<HttpContext = any> = (ctx: ClearRouterPluginArgumentsContext<HttpContext>) => any[] | undefined | Promise<any[] | undefined>;
210
210
  interface ClearRouterPluginContext<Options = any, HttpContext = any> {
211
211
  /**
@@ -215,7 +215,7 @@ interface ClearRouterPluginContext<Options = any, HttpContext = any> {
215
215
  /**
216
216
  * Register service container bindings
217
217
  */
218
- bind: PluginBind;
218
+ bind: PluginBind<HttpContext>;
219
219
  /**
220
220
  * Replace all controller method arguments
221
221
  * @param resolver
@@ -1,4 +1,4 @@
1
- import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-C7oMjml0.cjs";
1
+ import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-CY1BZ3Af.cjs";
2
2
 
3
3
  //#region src/koa/router.d.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-B86hTwHL.mjs";
1
+ import { F as ControllerAction, I as HttpMethod, P as ApiResourceMiddleware, _ as KoaRouterApp, g as HttpContext, h as Handler, m as Route, t as CoreRouter, v as Middleware } from "../router-7xO6qBQZ.mjs";
2
2
 
3
3
  //#region src/koa/router.d.ts
4
4
  /**
@@ -280,9 +280,9 @@ interface ClearRouterPluginArgumentsContext<X = any> extends ClearRouterPluginRe
280
280
  tokens: BindToken[];
281
281
  designTokens: BindToken[];
282
282
  }
283
- type PluginBindFactory<T = any> = (ctx: ClearRouterPluginRequestContext) => T | Promise<T>;
284
- type PluginBindValue<T = any> = BindValue<T> | PluginBindFactory<T>;
285
- type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
283
+ type PluginBindFactory<T = any, X = any> = (ctx: ClearRouterPluginRequestContext<X>) => T | Promise<T>;
284
+ type PluginBindValue<T = any, X = any> = BindValue<T> | PluginBindFactory<T, X>;
285
+ type PluginBind<X = any> = <T>(token: BindToken<T>, value: PluginBindValue<T, X>) => void;
286
286
  type PluginArgumentsResolver<HttpContext = any> = (ctx: ClearRouterPluginArgumentsContext<HttpContext>) => any[] | undefined | Promise<any[] | undefined>;
287
287
  interface ClearRouterPluginContext<Options = any, HttpContext = any> {
288
288
  /**
@@ -292,7 +292,7 @@ interface ClearRouterPluginContext<Options = any, HttpContext = any> {
292
292
  /**
293
293
  * Register service container bindings
294
294
  */
295
- bind: PluginBind;
295
+ bind: PluginBind<HttpContext>;
296
296
  /**
297
297
  * Replace all controller method arguments
298
298
  * @param resolver
@@ -280,9 +280,9 @@ interface ClearRouterPluginArgumentsContext<X = any> extends ClearRouterPluginRe
280
280
  tokens: BindToken[];
281
281
  designTokens: BindToken[];
282
282
  }
283
- type PluginBindFactory<T = any> = (ctx: ClearRouterPluginRequestContext) => T | Promise<T>;
284
- type PluginBindValue<T = any> = BindValue<T> | PluginBindFactory<T>;
285
- type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
283
+ type PluginBindFactory<T = any, X = any> = (ctx: ClearRouterPluginRequestContext<X>) => T | Promise<T>;
284
+ type PluginBindValue<T = any, X = any> = BindValue<T> | PluginBindFactory<T, X>;
285
+ type PluginBind<X = any> = <T>(token: BindToken<T>, value: PluginBindValue<T, X>) => void;
286
286
  type PluginArgumentsResolver<HttpContext = any> = (ctx: ClearRouterPluginArgumentsContext<HttpContext>) => any[] | undefined | Promise<any[] | undefined>;
287
287
  interface ClearRouterPluginContext<Options = any, HttpContext = any> {
288
288
  /**
@@ -292,7 +292,7 @@ interface ClearRouterPluginContext<Options = any, HttpContext = any> {
292
292
  /**
293
293
  * Register service container bindings
294
294
  */
295
- bind: PluginBind;
295
+ bind: PluginBind<HttpContext>;
296
296
  /**
297
297
  * Replace all controller method arguments
298
298
  * @param resolver
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clear-router",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Laravel-style routing for Node.js with support for Express, H3, Fastify, Hono, and Koa, including CommonJS, ESM, and TypeScript support.",
5
5
  "keywords": [
6
6
  "h3",