clear-router 2.5.8 → 2.5.9
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/{bindings-CV1e5jho.d.mts → bindings-B5ttDy47.d.cts} +1 -0
- package/dist/{bindings-NV0CdqGl.d.cts → bindings-BWMHQe9i.d.mts} +1 -0
- package/dist/{bindings-DJDdQv1q.mjs → bindings-CYpdvTjf.mjs} +3 -0
- package/dist/{bindings-T0FKpWyi.cjs → bindings-CoxxSopM.cjs} +3 -0
- package/dist/core/index.cjs +2 -2
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.mjs +2 -2
- package/dist/decorators/index.cjs +1 -1
- package/dist/decorators/index.d.cts +1 -1
- package/dist/decorators/index.d.mts +1 -1
- package/dist/decorators/index.mjs +1 -1
- package/dist/decorators/setup.cjs +2 -2
- package/dist/decorators/setup.d.cts +1 -1
- package/dist/decorators/setup.d.mts +2 -1
- package/dist/decorators/setup.mjs +2 -2
- package/dist/express/index.cjs +3 -3
- package/dist/express/index.d.cts +1 -1
- package/dist/express/index.d.mts +1 -1
- package/dist/express/index.mjs +3 -3
- package/dist/fastify/index.cjs +3 -3
- package/dist/fastify/index.d.cts +1 -1
- package/dist/fastify/index.d.mts +1 -1
- package/dist/fastify/index.mjs +3 -3
- package/dist/h3/index.cjs +3 -3
- package/dist/h3/index.d.cts +1 -1
- package/dist/h3/index.d.mts +1 -1
- package/dist/h3/index.mjs +3 -3
- package/dist/hono/index.cjs +3 -3
- package/dist/hono/index.d.cts +1 -1
- package/dist/hono/index.d.mts +1 -1
- package/dist/hono/index.mjs +3 -3
- package/dist/index.cjs +4 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +4 -0
- package/dist/koa/index.cjs +3 -3
- package/dist/koa/index.d.cts +1 -1
- package/dist/koa/index.d.mts +1 -1
- package/dist/koa/index.mjs +3 -3
- package/dist/{responses-CfCmLLo9.cjs → responses-B7G02ibg.cjs} +1 -1
- package/dist/{responses-B184V5nj.mjs → responses-DUFly0RZ.mjs} +1 -1
- package/dist/{router-we2Hw9nA.mjs → router-B_ouWc5s.mjs} +2 -1
- package/dist/{router-DbPFGTYG.cjs → router-Cmua21-t.cjs} +2 -1
- package/dist/{router-B8l8jerS.d.mts → router-DMFeflRM.d.mts} +2 -1
- package/dist/{router-CiGcLUZD.d.cts → router-SAdZ7fgy.d.cts} +2 -1
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ declare class Container {
|
|
|
12
12
|
static unbind<T>(token: BindToken<T>): void;
|
|
13
13
|
static clear(): void;
|
|
14
14
|
static has<T>(token: BindToken<T>): boolean;
|
|
15
|
+
static bindings<V = any>(): Record<string, BindValue<V>>;
|
|
15
16
|
static resolve<T>(token: BindToken<T>, ctx: any, autoDiscover?: boolean): Promise<T | undefined>;
|
|
16
17
|
private static resolveBinding;
|
|
17
18
|
}
|
|
@@ -12,6 +12,7 @@ declare class Container {
|
|
|
12
12
|
static unbind<T>(token: BindToken<T>): void;
|
|
13
13
|
static clear(): void;
|
|
14
14
|
static has<T>(token: BindToken<T>): boolean;
|
|
15
|
+
static bindings<V = any>(): Record<string, BindValue<V>>;
|
|
15
16
|
static resolve<T>(token: BindToken<T>, ctx: any, autoDiscover?: boolean): Promise<T | undefined>;
|
|
16
17
|
private static resolveBinding;
|
|
17
18
|
}
|
|
@@ -118,6 +118,9 @@ var Container = class {
|
|
|
118
118
|
static has(token) {
|
|
119
119
|
return this.registry.has(token);
|
|
120
120
|
}
|
|
121
|
+
static bindings() {
|
|
122
|
+
return Object.fromEntries(this.registry.entries());
|
|
123
|
+
}
|
|
121
124
|
static async resolve(token, ctx, autoDiscover = false) {
|
|
122
125
|
if (token === Request) return ctx.clearRequest;
|
|
123
126
|
if (token === Response) return ctx.clearResponse;
|
|
@@ -119,6 +119,9 @@ var Container = class {
|
|
|
119
119
|
static has(token) {
|
|
120
120
|
return this.registry.has(token);
|
|
121
121
|
}
|
|
122
|
+
static bindings() {
|
|
123
|
+
return Object.fromEntries(this.registry.entries());
|
|
124
|
+
}
|
|
122
125
|
static async resolve(token, ctx, autoDiscover = false) {
|
|
123
126
|
if (token === Request) return ctx.clearRequest;
|
|
124
127
|
if (token === Response) return ctx.clearResponse;
|
package/dist/core/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_bindings = require('../bindings-
|
|
3
|
-
const require_router = require('../router-
|
|
2
|
+
const require_bindings = require('../bindings-CoxxSopM.cjs');
|
|
3
|
+
const require_router = require('../router-Cmua21-t.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/core/plugins.ts
|
|
6
6
|
function definePlugin(plugin) {
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ClearRouterPluginRequestContext, c as PluginBindValue, d as Request, i as ClearRouterPluginInput, l as PluginSetupResult, n as ClearRouterPlugin, o as PluginBind, r as ClearRouterPluginContext, s as PluginBindFactory, t as CoreRouter, u as definePlugin, w as Response } from "../router-
|
|
1
|
+
import { a as ClearRouterPluginRequestContext, c as PluginBindValue, d as Request, i as ClearRouterPluginInput, l as PluginSetupResult, n as ClearRouterPlugin, o as PluginBind, r as ClearRouterPluginContext, s as PluginBindFactory, t as CoreRouter, u as definePlugin, w as Response } from "../router-SAdZ7fgy.cjs";
|
|
2
2
|
export { ClearRouterPlugin, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ClearRouterPluginRequestContext, c as PluginBindValue, d as Request, i as ClearRouterPluginInput, l as PluginSetupResult, n as ClearRouterPlugin, o as PluginBind, r as ClearRouterPluginContext, s as PluginBindFactory, t as CoreRouter, u as definePlugin, w as Response } from "../router-
|
|
1
|
+
import { a as ClearRouterPluginRequestContext, c as PluginBindValue, d as Request, i as ClearRouterPluginInput, l as PluginSetupResult, n as ClearRouterPlugin, o as PluginBind, r as ClearRouterPluginContext, s as PluginBindFactory, t as CoreRouter, u as definePlugin, w as Response } from "../router-DMFeflRM.mjs";
|
|
2
2
|
export { ClearRouterPlugin, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, CoreRouter, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, Request, Response, definePlugin };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as Request, s as Response } from "../bindings-
|
|
2
|
-
import { t as CoreRouter } from "../router-
|
|
1
|
+
import { c as Request, s as Response } from "../bindings-CYpdvTjf.mjs";
|
|
2
|
+
import { t as CoreRouter } from "../router-B_ouWc5s.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/core/plugins.ts
|
|
5
5
|
function definePlugin(plugin) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_bindings = require('../bindings-
|
|
2
|
+
const require_bindings = require('../bindings-CoxxSopM.cjs');
|
|
3
3
|
|
|
4
4
|
exports.Bind = require_bindings.Bind;
|
|
5
5
|
exports.Container = require_bindings.Container;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-
|
|
1
|
+
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-B5ttDy47.cjs";
|
|
2
2
|
export { Bind, type BindDecorator, type BindFactory, type BindToken, type BindValue, Container };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-
|
|
1
|
+
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-BWMHQe9i.mjs";
|
|
2
2
|
export { Bind, type BindDecorator, type BindFactory, type BindToken, type BindValue, Container };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_bindings = require('../bindings-
|
|
3
|
-
const require_router = require('../router-
|
|
2
|
+
const require_bindings = require('../bindings-CoxxSopM.cjs');
|
|
3
|
+
const require_router = require('../router-Cmua21-t.cjs');
|
|
4
4
|
require('./index.cjs');
|
|
5
5
|
require("reflect-metadata");
|
|
6
6
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-
|
|
1
|
+
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-B5ttDy47.cjs";
|
|
2
2
|
export { Bind, BindDecorator, BindFactory, BindToken, BindValue, Container };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-
|
|
1
|
+
import { a as BindValue, i as BindToken, n as BindDecorator, o as Container, r as BindFactory, t as Bind } from "../bindings-BWMHQe9i.mjs";
|
|
2
|
+
import "reflect-metadata";
|
|
2
3
|
export { Bind, BindDecorator, BindFactory, BindToken, BindValue, Container };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Container, t as Bind } from "../bindings-
|
|
2
|
-
import { t as CoreRouter } from "../router-
|
|
1
|
+
import { n as Container, t as Bind } from "../bindings-CYpdvTjf.mjs";
|
|
2
|
+
import { t as CoreRouter } from "../router-B_ouWc5s.mjs";
|
|
3
3
|
import "./index.mjs";
|
|
4
4
|
import "reflect-metadata";
|
|
5
5
|
|
package/dist/express/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
require('../bindings-
|
|
3
|
-
const require_router = require('../router-
|
|
4
|
-
const require_responses = require('../responses-
|
|
2
|
+
require('../bindings-CoxxSopM.cjs');
|
|
3
|
+
const require_router = require('../router-Cmua21-t.cjs');
|
|
4
|
+
const require_responses = require('../responses-B7G02ibg.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/express/router.ts
|
|
7
7
|
/**
|
package/dist/express/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, _ as Handler, b as ApiResourceMiddleware, f as Route, t as CoreRouter, v as HttpContext, x as ControllerAction, y as Middleware } from "../router-
|
|
1
|
+
import { C as HttpMethod, _ as Handler, b as ApiResourceMiddleware, f as Route, t as CoreRouter, v as HttpContext, x as ControllerAction, y as Middleware } from "../router-SAdZ7fgy.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 { C as HttpMethod, _ as Handler, b as ApiResourceMiddleware, f as Route, t as CoreRouter, v as HttpContext, x as ControllerAction, y as Middleware } from "../router-
|
|
1
|
+
import { C as HttpMethod, _ as Handler, b as ApiResourceMiddleware, f as Route, t as CoreRouter, v as HttpContext, x as ControllerAction, y as Middleware } from "../router-DMFeflRM.mjs";
|
|
2
2
|
import { Router as Router$1 } from "express";
|
|
3
3
|
|
|
4
4
|
//#region src/express/router.d.ts
|
package/dist/express/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../bindings-
|
|
2
|
-
import { t as CoreRouter } from "../router-
|
|
3
|
-
import { n as resolveResponseMeta, r as responseWasSent, t as isFetchResponse } from "../responses-
|
|
1
|
+
import "../bindings-CYpdvTjf.mjs";
|
|
2
|
+
import { t as CoreRouter } from "../router-B_ouWc5s.mjs";
|
|
3
|
+
import { n as resolveResponseMeta, r as responseWasSent, t as isFetchResponse } from "../responses-DUFly0RZ.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/express/router.ts
|
|
6
6
|
/**
|
package/dist/fastify/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
require('../bindings-
|
|
3
|
-
const require_router = require('../router-
|
|
4
|
-
const require_responses = require('../responses-
|
|
2
|
+
require('../bindings-CoxxSopM.cjs');
|
|
3
|
+
const require_router = require('../router-Cmua21-t.cjs');
|
|
4
|
+
const require_responses = require('../responses-B7G02ibg.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/fastify/router.ts
|
|
7
7
|
/**
|
package/dist/fastify/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-SAdZ7fgy.cjs";
|
|
2
2
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
3
3
|
|
|
4
4
|
//#region types/fastify.d.ts
|
package/dist/fastify/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-DMFeflRM.mjs";
|
|
2
2
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
3
3
|
|
|
4
4
|
//#region types/fastify.d.ts
|
package/dist/fastify/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../bindings-
|
|
2
|
-
import { t as CoreRouter } from "../router-
|
|
3
|
-
import { n as resolveResponseMeta, r as responseWasSent, t as isFetchResponse } from "../responses-
|
|
1
|
+
import "../bindings-CYpdvTjf.mjs";
|
|
2
|
+
import { t as CoreRouter } from "../router-B_ouWc5s.mjs";
|
|
3
|
+
import { n as resolveResponseMeta, r as responseWasSent, t as isFetchResponse } from "../responses-DUFly0RZ.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/fastify/router.ts
|
|
6
6
|
/**
|
package/dist/h3/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
require('../bindings-
|
|
3
|
-
const require_router = require('../router-
|
|
4
|
-
const require_responses = require('../responses-
|
|
2
|
+
require('../bindings-CoxxSopM.cjs');
|
|
3
|
+
const require_router = require('../router-Cmua21-t.cjs');
|
|
4
|
+
const require_responses = require('../responses-B7G02ibg.cjs');
|
|
5
5
|
let h3 = require("h3");
|
|
6
6
|
|
|
7
7
|
//#region src/h3/router.ts
|
package/dist/h3/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, b as ApiResourceMiddleware, f as Route, g as Middleware, h as HttpContext, m as Handler, p as H3App, t as CoreRouter, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, b as ApiResourceMiddleware, f as Route, g as Middleware, h as HttpContext, m as Handler, p as H3App, t as CoreRouter, x as ControllerAction } from "../router-SAdZ7fgy.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 HttpMethod, b as ApiResourceMiddleware, f as Route, g as Middleware, h as HttpContext, m as Handler, p as H3App, t as CoreRouter, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, b as ApiResourceMiddleware, f as Route, g as Middleware, h as HttpContext, m as Handler, p as H3App, t as CoreRouter, x as ControllerAction } from "../router-DMFeflRM.mjs";
|
|
2
2
|
import { H3 } from "h3";
|
|
3
3
|
|
|
4
4
|
//#region src/h3/router.d.ts
|
package/dist/h3/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../bindings-
|
|
2
|
-
import { t as CoreRouter } from "../router-
|
|
3
|
-
import { n as resolveResponseMeta } from "../responses-
|
|
1
|
+
import "../bindings-CYpdvTjf.mjs";
|
|
2
|
+
import { t as CoreRouter } from "../router-B_ouWc5s.mjs";
|
|
3
|
+
import { n as resolveResponseMeta } from "../responses-DUFly0RZ.mjs";
|
|
4
4
|
import { HTTPResponse, getQuery, getRouterParams, readBody } from "h3";
|
|
5
5
|
|
|
6
6
|
//#region src/h3/router.ts
|
package/dist/hono/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
require('../bindings-
|
|
3
|
-
const require_router = require('../router-
|
|
4
|
-
const require_responses = require('../responses-
|
|
2
|
+
require('../bindings-CoxxSopM.cjs');
|
|
3
|
+
const require_router = require('../router-Cmua21-t.cjs');
|
|
4
|
+
const require_responses = require('../responses-B7G02ibg.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/hono/router.ts
|
|
7
7
|
/**
|
package/dist/hono/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-SAdZ7fgy.cjs";
|
|
2
2
|
import { Context, HonoRequest, MiddlewareHandler } from "hono";
|
|
3
3
|
|
|
4
4
|
//#region types/hono.d.ts
|
package/dist/hono/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-DMFeflRM.mjs";
|
|
2
2
|
import { Context, HonoRequest, MiddlewareHandler } from "hono";
|
|
3
3
|
|
|
4
4
|
//#region types/hono.d.ts
|
package/dist/hono/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../bindings-
|
|
2
|
-
import { t as CoreRouter } from "../router-
|
|
3
|
-
import { n as resolveResponseMeta } from "../responses-
|
|
1
|
+
import "../bindings-CYpdvTjf.mjs";
|
|
2
|
+
import { t as CoreRouter } from "../router-B_ouWc5s.mjs";
|
|
3
|
+
import { n as resolveResponseMeta } from "../responses-DUFly0RZ.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/hono/router.ts
|
|
6
6
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -165,6 +165,9 @@ var Container = class {
|
|
|
165
165
|
static has(token) {
|
|
166
166
|
return this.registry.has(token);
|
|
167
167
|
}
|
|
168
|
+
static bindings() {
|
|
169
|
+
return Object.fromEntries(this.registry.entries());
|
|
170
|
+
}
|
|
168
171
|
static async resolve(token, ctx, autoDiscover = false) {
|
|
169
172
|
if (token === Request) return ctx.clearRequest;
|
|
170
173
|
if (token === Response) return ctx.clearResponse;
|
|
@@ -385,6 +388,7 @@ var CoreRouter = class {
|
|
|
385
388
|
const ctx = {
|
|
386
389
|
container: Container,
|
|
387
390
|
bind: this.createPluginBind(),
|
|
391
|
+
bindings: Container.bindings(),
|
|
388
392
|
configure: this.configure.bind(this),
|
|
389
393
|
configureDefaults: this.configureDefaults.bind(this),
|
|
390
394
|
get request() {
|
package/dist/index.d.cts
CHANGED
|
@@ -138,6 +138,7 @@ declare class Container {
|
|
|
138
138
|
static unbind<T>(token: BindToken<T>): void;
|
|
139
139
|
static clear(): void;
|
|
140
140
|
static has<T>(token: BindToken<T>): boolean;
|
|
141
|
+
static bindings<V = any>(): Record<string, BindValue<V>>;
|
|
141
142
|
static resolve<T>(token: BindToken<T>, ctx: any, autoDiscover?: boolean): Promise<T | undefined>;
|
|
142
143
|
private static resolveBinding;
|
|
143
144
|
}
|
|
@@ -156,6 +157,7 @@ type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
|
|
|
156
157
|
interface ClearRouterPluginContext<Options = any> {
|
|
157
158
|
container: typeof Container;
|
|
158
159
|
bind: PluginBind;
|
|
160
|
+
bindings: Record<string, BindValue>;
|
|
159
161
|
configure: (options: RouterConfig) => void;
|
|
160
162
|
configureDefaults: (options: RouterConfig) => void;
|
|
161
163
|
readonly request?: Request;
|
package/dist/index.d.mts
CHANGED
|
@@ -138,6 +138,7 @@ declare class Container {
|
|
|
138
138
|
static unbind<T>(token: BindToken<T>): void;
|
|
139
139
|
static clear(): void;
|
|
140
140
|
static has<T>(token: BindToken<T>): boolean;
|
|
141
|
+
static bindings<V = any>(): Record<string, BindValue<V>>;
|
|
141
142
|
static resolve<T>(token: BindToken<T>, ctx: any, autoDiscover?: boolean): Promise<T | undefined>;
|
|
142
143
|
private static resolveBinding;
|
|
143
144
|
}
|
|
@@ -156,6 +157,7 @@ type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
|
|
|
156
157
|
interface ClearRouterPluginContext<Options = any> {
|
|
157
158
|
container: typeof Container;
|
|
158
159
|
bind: PluginBind;
|
|
160
|
+
bindings: Record<string, BindValue>;
|
|
159
161
|
configure: (options: RouterConfig) => void;
|
|
160
162
|
configureDefaults: (options: RouterConfig) => void;
|
|
161
163
|
readonly request?: Request;
|
package/dist/index.mjs
CHANGED
|
@@ -164,6 +164,9 @@ var Container = class {
|
|
|
164
164
|
static has(token) {
|
|
165
165
|
return this.registry.has(token);
|
|
166
166
|
}
|
|
167
|
+
static bindings() {
|
|
168
|
+
return Object.fromEntries(this.registry.entries());
|
|
169
|
+
}
|
|
167
170
|
static async resolve(token, ctx, autoDiscover = false) {
|
|
168
171
|
if (token === Request) return ctx.clearRequest;
|
|
169
172
|
if (token === Response) return ctx.clearResponse;
|
|
@@ -384,6 +387,7 @@ var CoreRouter = class {
|
|
|
384
387
|
const ctx = {
|
|
385
388
|
container: Container,
|
|
386
389
|
bind: this.createPluginBind(),
|
|
390
|
+
bindings: Container.bindings(),
|
|
387
391
|
configure: this.configure.bind(this),
|
|
388
392
|
configureDefaults: this.configureDefaults.bind(this),
|
|
389
393
|
get request() {
|
package/dist/koa/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
require('../bindings-
|
|
3
|
-
const require_router = require('../router-
|
|
4
|
-
const require_responses = require('../responses-
|
|
2
|
+
require('../bindings-CoxxSopM.cjs');
|
|
3
|
+
const require_router = require('../router-Cmua21-t.cjs');
|
|
4
|
+
const require_responses = require('../responses-B7G02ibg.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/koa/router.ts
|
|
7
7
|
/**
|
package/dist/koa/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-SAdZ7fgy.cjs";
|
|
2
2
|
import Koa from "koa";
|
|
3
3
|
import Router$1 from "@koa/router";
|
|
4
4
|
|
package/dist/koa/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-
|
|
1
|
+
import { C as HttpMethod, S as ControllerHandler, b as ApiResourceMiddleware, d as Request, f as Route, t as CoreRouter, w as Response, x as ControllerAction } from "../router-DMFeflRM.mjs";
|
|
2
2
|
import Koa from "koa";
|
|
3
3
|
import Router$1 from "@koa/router";
|
|
4
4
|
|
package/dist/koa/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../bindings-
|
|
2
|
-
import { t as CoreRouter } from "../router-
|
|
3
|
-
import { n as resolveResponseMeta, t as isFetchResponse } from "../responses-
|
|
1
|
+
import "../bindings-CYpdvTjf.mjs";
|
|
2
|
+
import { t as CoreRouter } from "../router-B_ouWc5s.mjs";
|
|
3
|
+
import { n as resolveResponseMeta, t as isFetchResponse } from "../responses-DUFly0RZ.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/koa/router.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getStandardMetadata, c as Request, i as getDesignParamTypes, n as Container, o as isClass, r as getBindingMetadataFromTargets, s as Response } from "./bindings-
|
|
1
|
+
import { a as getStandardMetadata, c as Request, i as getDesignParamTypes, n as Container, o as isClass, r as getBindingMetadataFromTargets, s as Response } from "./bindings-CYpdvTjf.mjs";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
|
|
4
4
|
//#region src/Route.ts
|
|
@@ -208,6 +208,7 @@ var CoreRouter = class {
|
|
|
208
208
|
const ctx = {
|
|
209
209
|
container: Container,
|
|
210
210
|
bind: this.createPluginBind(),
|
|
211
|
+
bindings: Container.bindings(),
|
|
211
212
|
configure: this.configure.bind(this),
|
|
212
213
|
configureDefaults: this.configureDefaults.bind(this),
|
|
213
214
|
get request() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_bindings = require('./bindings-
|
|
1
|
+
const require_bindings = require('./bindings-CoxxSopM.cjs');
|
|
2
2
|
let node_async_hooks = require("node:async_hooks");
|
|
3
3
|
|
|
4
4
|
//#region src/Route.ts
|
|
@@ -208,6 +208,7 @@ var CoreRouter = class {
|
|
|
208
208
|
const ctx = {
|
|
209
209
|
container: require_bindings.Container,
|
|
210
210
|
bind: this.createPluginBind(),
|
|
211
|
+
bindings: require_bindings.Container.bindings(),
|
|
211
212
|
configure: this.configure.bind(this),
|
|
212
213
|
configureDefaults: this.configureDefaults.bind(this),
|
|
213
214
|
get request() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BindValue, i as BindToken, o as Container } from "./bindings-
|
|
1
|
+
import { a as BindValue, i as BindToken, o as Container } from "./bindings-BWMHQe9i.mjs";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { EventHandlerRequest, H3, H3Event, Middleware, TypedServerRequest } from "h3";
|
|
4
4
|
import { NextFunction, Request, Response as Response$1 } from "express";
|
|
@@ -203,6 +203,7 @@ type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
|
|
|
203
203
|
interface ClearRouterPluginContext<Options = any> {
|
|
204
204
|
container: typeof Container;
|
|
205
205
|
bind: PluginBind;
|
|
206
|
+
bindings: Record<string, BindValue>;
|
|
206
207
|
configure: (options: RouterConfig) => void;
|
|
207
208
|
configureDefaults: (options: RouterConfig) => void;
|
|
208
209
|
readonly request?: Request$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BindValue, i as BindToken, o as Container } from "./bindings-
|
|
1
|
+
import { a as BindValue, i as BindToken, o as Container } from "./bindings-B5ttDy47.cjs";
|
|
2
2
|
import { NextFunction, Request, Response as Response$1 } from "express";
|
|
3
3
|
import { EventHandlerRequest, H3, H3Event, Middleware, TypedServerRequest } from "h3";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -203,6 +203,7 @@ type PluginBind = <T>(token: BindToken<T>, value: PluginBindValue<T>) => void;
|
|
|
203
203
|
interface ClearRouterPluginContext<Options = any> {
|
|
204
204
|
container: typeof Container;
|
|
205
205
|
bind: PluginBind;
|
|
206
|
+
bindings: Record<string, BindValue>;
|
|
206
207
|
configure: (options: RouterConfig) => void;
|
|
207
208
|
configureDefaults: (options: RouterConfig) => void;
|
|
208
209
|
readonly request?: Request$1;
|
package/package.json
CHANGED