clear-router 2.8.5 → 2.8.7
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 +11 -11
- package/dist/ClearRequest.d.cts +1 -1
- package/dist/ClearRequest.d.mts +1 -1
- package/dist/Controller.d.cts +1 -1
- package/dist/Controller.d.mts +1 -1
- package/dist/ResourceRoutes.cjs +1 -1
- package/dist/ResourceRoutes.d.cts +2 -2
- package/dist/ResourceRoutes.d.mts +2 -2
- package/dist/ResourceRoutes.mjs +1 -1
- package/dist/Route.cjs +1 -1
- package/dist/Route.d.cts +2 -2
- package/dist/Route.d.mts +2 -2
- package/dist/Route.mjs +1 -1
- package/dist/RouteGroup.cjs +1 -1
- package/dist/RouteGroup.d.cts +5 -5
- package/dist/RouteGroup.d.mts +5 -5
- package/dist/RouteGroup.mjs +1 -1
- package/dist/core/CoreRouter.cjs +1 -1
- package/dist/core/CoreRouter.d.cts +3 -3
- package/dist/core/CoreRouter.d.mts +3 -3
- package/dist/core/CoreRouter.mjs +1 -1
- package/dist/core/Request.d.cts +2 -2
- package/dist/core/Request.d.mts +2 -2
- package/dist/core/helpers.d.cts +1 -1
- package/dist/core/helpers.d.mts +1 -1
- package/dist/core/plugins.d.cts +1 -1
- package/dist/core/plugins.d.mts +1 -1
- package/dist/express/router.cjs +1 -1
- package/dist/express/router.d.cts +3 -3
- package/dist/express/router.d.mts +3 -3
- package/dist/express/router.mjs +1 -1
- package/dist/fastify/router.cjs +1 -1
- package/dist/fastify/router.d.cts +3 -3
- package/dist/fastify/router.d.mts +3 -3
- package/dist/fastify/router.mjs +1 -1
- package/dist/h3/router.cjs +1 -1
- package/dist/h3/router.d.cts +3 -3
- package/dist/h3/router.d.mts +3 -3
- package/dist/h3/router.mjs +1 -1
- package/dist/hono/router.cjs +1 -1
- package/dist/hono/router.d.cts +3 -3
- package/dist/hono/router.d.mts +3 -3
- package/dist/hono/router.mjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/koa/router.cjs +1 -1
- package/dist/koa/router.d.cts +3 -3
- package/dist/koa/router.d.mts +3 -3
- package/dist/koa/router.mjs +1 -1
- package/dist/types/basic.d.cts +7 -5
- package/dist/types/basic.d.mts +7 -5
- package/dist/types/express.d.cts +1 -1
- package/dist/types/express.d.mts +1 -1
- package/dist/types/fastify.d.cts +1 -1
- package/dist/types/fastify.d.mts +1 -1
- package/dist/types/h3.d.cts +1 -1
- package/dist/types/h3.d.mts +1 -1
- package/dist/types/hono.d.cts +1 -1
- package/dist/types/hono.d.mts +1 -1
- package/dist/types/koa.d.cts +1 -1
- package/dist/types/koa.d.mts +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/clear-router)
|
|
4
4
|
[](https://www.npmjs.com/package/clear-router)
|
|
5
|
-
[](https://github.com/arkstack-
|
|
6
|
-
[](https://github.com/arkstack-hq/clear-router/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/arkstack-hq/clear-router/actions/workflows/npm-publish.yml)
|
|
7
|
+
[](https://github.com/arkstack-hq/clear-router/actions/workflows/ci.yml)
|
|
8
8
|
|
|
9
9
|
Laravel-style routing for Node.js with support for Express, H3, Fastify, Hono, and Koa, including CommonJS, ESM, and TypeScript support.
|
|
10
10
|
|
|
@@ -70,27 +70,27 @@ yarn add clear-router express
|
|
|
70
70
|
|
|
71
71
|
### Express JS
|
|
72
72
|
|
|
73
|
-
See the [Express JS documentation](https://arkstack-
|
|
73
|
+
See the [Express JS documentation](https://arkstack-hq.github.io/clear-router/guide/express) for details.
|
|
74
74
|
|
|
75
75
|
### H3
|
|
76
76
|
|
|
77
|
-
See the [H3 documentation](https://arkstack-
|
|
77
|
+
See the [H3 documentation](https://arkstack-hq.github.io/clear-router/guide/h3) for details.
|
|
78
78
|
|
|
79
79
|
### Fastify
|
|
80
80
|
|
|
81
|
-
See the [Fastify documentation](https://arkstack-
|
|
81
|
+
See the [Fastify documentation](https://arkstack-hq.github.io/clear-router/guide/fastify) for details.
|
|
82
82
|
|
|
83
83
|
### Hono
|
|
84
84
|
|
|
85
|
-
See the [Hono documentation](https://arkstack-
|
|
85
|
+
See the [Hono documentation](https://arkstack-hq.github.io/clear-router/guide/hono) for details.
|
|
86
86
|
|
|
87
87
|
### Koa
|
|
88
88
|
|
|
89
|
-
See the [Koa documentation](https://arkstack-
|
|
89
|
+
See the [Koa documentation](https://arkstack-hq.github.io/clear-router/guide/koa) for details.
|
|
90
90
|
|
|
91
91
|
## API Reference
|
|
92
92
|
|
|
93
|
-
See [API.md](https://arkstack-
|
|
93
|
+
See [API.md](https://arkstack-hq.github.io/clear-router/api) for complete API documentation.
|
|
94
94
|
|
|
95
95
|
## Middleware Execution Order
|
|
96
96
|
|
|
@@ -115,7 +115,7 @@ npm run test:esm # Test ESM
|
|
|
115
115
|
npm run test:ts # Test TypeScript
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
See [TESTING.md](https://arkstack-
|
|
118
|
+
See [TESTING.md](https://arkstack-hq.github.io/clear-router/testing) for a detailed testing guide.
|
|
119
119
|
|
|
120
120
|
## Examples
|
|
121
121
|
|
|
@@ -146,4 +146,4 @@ MIT License © 2026 ToneFlix Technologies Limited
|
|
|
146
146
|
|
|
147
147
|
## Repository
|
|
148
148
|
|
|
149
|
-
https://github.com/arkstack-
|
|
149
|
+
https://github.com/arkstack-hq/clear-router
|
package/dist/ClearRequest.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RequestData } from "./types/basic.cjs";
|
|
2
1
|
import { Middleware } from "./types/express.cjs";
|
|
3
2
|
import { Middleware as Middleware$1 } from "./types/fastify.cjs";
|
|
4
3
|
import { Middleware as Middleware$2 } from "./types/h3.cjs";
|
|
5
4
|
import { Middleware as Middleware$3 } from "./types/hono.cjs";
|
|
6
5
|
import { Middleware as Middleware$4 } from "./types/koa.cjs";
|
|
7
6
|
import { Route } from "./Route.cjs";
|
|
7
|
+
import { RequestData } from "./types/basic.cjs";
|
|
8
8
|
|
|
9
9
|
//#region src/ClearRequest.d.ts
|
|
10
10
|
declare class ClearRequest<X = any, M = Middleware$2 | Middleware | Middleware$1 | Middleware$3 | Middleware$4> {
|
package/dist/ClearRequest.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RequestData } from "./types/basic.mjs";
|
|
2
1
|
import { Middleware } from "./types/express.mjs";
|
|
3
2
|
import { Middleware as Middleware$1 } from "./types/fastify.mjs";
|
|
4
3
|
import { Middleware as Middleware$2 } from "./types/h3.mjs";
|
|
5
4
|
import { Middleware as Middleware$3 } from "./types/hono.mjs";
|
|
6
5
|
import { Middleware as Middleware$4 } from "./types/koa.mjs";
|
|
7
6
|
import { Route } from "./Route.mjs";
|
|
7
|
+
import { RequestData } from "./types/basic.mjs";
|
|
8
8
|
|
|
9
9
|
//#region src/ClearRequest.d.ts
|
|
10
10
|
declare class ClearRequest<X = any, M = Middleware$2 | Middleware | Middleware$1 | Middleware$3 | Middleware$4> {
|
package/dist/Controller.d.cts
CHANGED
package/dist/Controller.d.mts
CHANGED
package/dist/ResourceRoutes.cjs
CHANGED
|
@@ -7,7 +7,7 @@ require('./core/index.cjs');
|
|
|
7
7
|
* @class clear-router ResourceRoutes
|
|
8
8
|
* @description A ResourceRoutes creates a collection of resourceful routes in a single call
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var ResourceRoutes = class ResourceRoutes {
|
|
13
13
|
static actions = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions } from "./types/basic.cjs";
|
|
2
1
|
import { Middleware } from "./types/express.cjs";
|
|
3
2
|
import { Middleware as Middleware$1 } from "./types/h3.cjs";
|
|
4
3
|
import { Route } from "./Route.cjs";
|
|
4
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions } from "./types/basic.cjs";
|
|
5
5
|
import { ResourceRouteSelection } from "./ResourceRouteSelection.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/ResourceRoutes.d.ts
|
|
@@ -9,7 +9,7 @@ import { ResourceRouteSelection } from "./ResourceRouteSelection.cjs";
|
|
|
9
9
|
* @class clear-router ResourceRoutes
|
|
10
10
|
* @description A ResourceRoutes creates a collection of resourceful routes in a single call
|
|
11
11
|
* @author 3m1n3nc3
|
|
12
|
-
* @repository https://github.com/arkstack-
|
|
12
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
13
13
|
*/
|
|
14
14
|
declare class ResourceRoutes<X = any, M = Middleware$1 | Middleware, H = any> {
|
|
15
15
|
readonly basePath: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions } from "./types/basic.mjs";
|
|
2
1
|
import { Middleware } from "./types/express.mjs";
|
|
3
2
|
import { Middleware as Middleware$1 } from "./types/h3.mjs";
|
|
4
3
|
import { Route } from "./Route.mjs";
|
|
4
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions } from "./types/basic.mjs";
|
|
5
5
|
import { ResourceRouteSelection } from "./ResourceRouteSelection.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/ResourceRoutes.d.ts
|
|
@@ -9,7 +9,7 @@ import { ResourceRouteSelection } from "./ResourceRouteSelection.mjs";
|
|
|
9
9
|
* @class clear-router ResourceRoutes
|
|
10
10
|
* @description A ResourceRoutes creates a collection of resourceful routes in a single call
|
|
11
11
|
* @author 3m1n3nc3
|
|
12
|
-
* @repository https://github.com/arkstack-
|
|
12
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
13
13
|
*/
|
|
14
14
|
declare class ResourceRoutes<X = any, M = Middleware$1 | Middleware, H = any> {
|
|
15
15
|
readonly basePath: string;
|
package/dist/ResourceRoutes.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import "./core/index.mjs";
|
|
|
7
7
|
* @class clear-router ResourceRoutes
|
|
8
8
|
* @description A ResourceRoutes creates a collection of resourceful routes in a single call
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var ResourceRoutes = class ResourceRoutes {
|
|
13
13
|
static actions = {
|
package/dist/Route.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @class clear-router Route
|
|
5
5
|
* @description A route describes a single enpoint on clear-router
|
|
6
6
|
* @author 3m1n3nc3
|
|
7
|
-
* @repository https://github.com/arkstack-
|
|
7
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
8
8
|
*/
|
|
9
9
|
var Route = class {
|
|
10
10
|
ctx;
|
package/dist/Route.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { HttpMethod, RequestData } from "./types/basic.cjs";
|
|
2
1
|
import { RouteParameter } from "./Contracts.cjs";
|
|
3
2
|
import { Middleware } from "./types/express.cjs";
|
|
4
3
|
import { Middleware as Middleware$1 } from "./types/h3.cjs";
|
|
5
4
|
import { ClearRequest } from "./ClearRequest.cjs";
|
|
5
|
+
import { HttpMethod, RequestData } from "./types/basic.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/Route.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* @class clear-router Route
|
|
10
10
|
* @description A route describes a single enpoint on clear-router
|
|
11
11
|
* @author 3m1n3nc3
|
|
12
|
-
* @repository https://github.com/arkstack-
|
|
12
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
13
13
|
*/
|
|
14
14
|
declare class Route<X = any, M = Middleware$1 | Middleware, H = any> {
|
|
15
15
|
ctx: X;
|
package/dist/Route.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { HttpMethod, RequestData } from "./types/basic.mjs";
|
|
2
1
|
import { RouteParameter } from "./Contracts.mjs";
|
|
3
2
|
import { Middleware } from "./types/express.mjs";
|
|
4
3
|
import { Middleware as Middleware$1 } from "./types/h3.mjs";
|
|
5
4
|
import { ClearRequest } from "./ClearRequest.mjs";
|
|
5
|
+
import { HttpMethod, RequestData } from "./types/basic.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/Route.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* @class clear-router Route
|
|
10
10
|
* @description A route describes a single enpoint on clear-router
|
|
11
11
|
* @author 3m1n3nc3
|
|
12
|
-
* @repository https://github.com/arkstack-
|
|
12
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
13
13
|
*/
|
|
14
14
|
declare class Route<X = any, M = Middleware$1 | Middleware, H = any> {
|
|
15
15
|
ctx: X;
|
package/dist/Route.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @class clear-router Route
|
|
4
4
|
* @description A route describes a single enpoint on clear-router
|
|
5
5
|
* @author 3m1n3nc3
|
|
6
|
-
* @repository https://github.com/arkstack-
|
|
6
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
7
7
|
*/
|
|
8
8
|
var Route = class {
|
|
9
9
|
ctx;
|
package/dist/RouteGroup.cjs
CHANGED
|
@@ -7,7 +7,7 @@ let node_fs_promises = require("node:fs/promises");
|
|
|
7
7
|
* @class clear-router RouteGroup
|
|
8
8
|
* @description A route group describes a collection of routes on clear-router
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var RouteGroup = class {
|
|
13
13
|
checks = [];
|
package/dist/RouteGroup.d.cts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { RouteGroupCondition, RouteGroupOptions } from "./types/basic.cjs";
|
|
2
1
|
import { Middleware } from "./types/express.cjs";
|
|
3
2
|
import { Middleware as Middleware$1 } from "./types/h3.cjs";
|
|
3
|
+
import { RouteGroupCondition, RouteGroupOptions, RouteGroupSource } from "./types/basic.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/RouteGroup.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* @class clear-router RouteGroup
|
|
8
8
|
* @description A route group describes a collection of routes on clear-router
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
|
-
declare class RouteGroup<X = any, M = Middleware$1 | Middleware, H = any> implements PromiseLike<void> {
|
|
12
|
+
declare class RouteGroup<X = any, M = Middleware$1 | Middleware, H = any, S extends RouteGroupSource = RouteGroupSource> implements PromiseLike<void> {
|
|
13
13
|
private readonly options;
|
|
14
14
|
private readonly checks;
|
|
15
15
|
private readonly conditions;
|
|
16
16
|
private readonly registration;
|
|
17
17
|
private readonly routes;
|
|
18
18
|
private readonly unfilteredSources;
|
|
19
|
-
constructor(options: RouteGroupOptions);
|
|
19
|
+
constructor(options: RouteGroupOptions<S>);
|
|
20
20
|
/**
|
|
21
21
|
* Returning a falsy value will stop route group registration
|
|
22
22
|
*
|
|
23
23
|
* @param condition
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
|
-
when(condition: RouteGroupCondition): this;
|
|
26
|
+
when(condition: RouteGroupCondition<S>): this;
|
|
27
27
|
/**
|
|
28
28
|
* Register one or more middleware that will be executed before every route in the group.
|
|
29
29
|
*
|
package/dist/RouteGroup.d.mts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { RouteGroupCondition, RouteGroupOptions } from "./types/basic.mjs";
|
|
2
1
|
import { Middleware } from "./types/express.mjs";
|
|
3
2
|
import { Middleware as Middleware$1 } from "./types/h3.mjs";
|
|
3
|
+
import { RouteGroupCondition, RouteGroupOptions, RouteGroupSource } from "./types/basic.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/RouteGroup.d.ts
|
|
6
6
|
/**
|
|
7
7
|
* @class clear-router RouteGroup
|
|
8
8
|
* @description A route group describes a collection of routes on clear-router
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
|
-
declare class RouteGroup<X = any, M = Middleware$1 | Middleware, H = any> implements PromiseLike<void> {
|
|
12
|
+
declare class RouteGroup<X = any, M = Middleware$1 | Middleware, H = any, S extends RouteGroupSource = RouteGroupSource> implements PromiseLike<void> {
|
|
13
13
|
private readonly options;
|
|
14
14
|
private readonly checks;
|
|
15
15
|
private readonly conditions;
|
|
16
16
|
private readonly registration;
|
|
17
17
|
private readonly routes;
|
|
18
18
|
private readonly unfilteredSources;
|
|
19
|
-
constructor(options: RouteGroupOptions);
|
|
19
|
+
constructor(options: RouteGroupOptions<S>);
|
|
20
20
|
/**
|
|
21
21
|
* Returning a falsy value will stop route group registration
|
|
22
22
|
*
|
|
23
23
|
* @param condition
|
|
24
24
|
* @returns
|
|
25
25
|
*/
|
|
26
|
-
when(condition: RouteGroupCondition): this;
|
|
26
|
+
when(condition: RouteGroupCondition<S>): this;
|
|
27
27
|
/**
|
|
28
28
|
* Register one or more middleware that will be executed before every route in the group.
|
|
29
29
|
*
|
package/dist/RouteGroup.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { readdir, stat } from "node:fs/promises";
|
|
|
7
7
|
* @class clear-router RouteGroup
|
|
8
8
|
* @description A route group describes a collection of routes on clear-router
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var RouteGroup = class {
|
|
13
13
|
checks = [];
|
package/dist/core/CoreRouter.cjs
CHANGED
|
@@ -12,7 +12,7 @@ let node_module = require("node:module");
|
|
|
12
12
|
* @class clear-router CoreRouter
|
|
13
13
|
* @description Core routing logic for clear-router, shared between all supported adapters (Express.js, H3, etc.)
|
|
14
14
|
* @author 3m1n3nc3
|
|
15
|
-
* @repository https://github.com/arkstack-
|
|
15
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
16
16
|
*/
|
|
17
17
|
var CoreRouter = class {
|
|
18
18
|
static routerStateNamespace = "clear-router:core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupContext, RouteGroupSource, RouterConfig } from "../types/basic.cjs";
|
|
2
1
|
import { Response } from "./Response.cjs";
|
|
3
2
|
import { Route } from "../Route.cjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupContext, RouteGroupSource, RouterConfig } from "../types/basic.cjs";
|
|
4
4
|
import { Request } from "./Request.cjs";
|
|
5
5
|
import { ClearRouterPluginArgumentsContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind } from "./plugins.cjs";
|
|
6
6
|
import { Controller } from "../Controller.cjs";
|
|
@@ -13,7 +13,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
13
13
|
* @class clear-router CoreRouter
|
|
14
14
|
* @description Core routing logic for clear-router, shared between all supported adapters (Express.js, H3, etc.)
|
|
15
15
|
* @author 3m1n3nc3
|
|
16
|
-
* @repository https://github.com/arkstack-
|
|
16
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
17
17
|
*/
|
|
18
18
|
declare abstract class CoreRouter {
|
|
19
19
|
protected static routerStateNamespace: string;
|
|
@@ -214,7 +214,7 @@ declare abstract class CoreRouter {
|
|
|
214
214
|
* @param callback
|
|
215
215
|
* @param middlewares
|
|
216
216
|
*/
|
|
217
|
-
static group(prefix: string, source:
|
|
217
|
+
static group<S extends RouteGroupSource>(prefix: string, source: S, middlewares?: any[]): RouteGroup<any, any, any, S>;
|
|
218
218
|
/**
|
|
219
219
|
* Adds global middlewares to the router, which will be applied to all routes.
|
|
220
220
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupContext, RouteGroupSource, RouterConfig } from "../types/basic.mjs";
|
|
2
1
|
import { Response } from "./Response.mjs";
|
|
3
2
|
import { Route } from "../Route.mjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupContext, RouteGroupSource, RouterConfig } from "../types/basic.mjs";
|
|
4
4
|
import { Request } from "./Request.mjs";
|
|
5
5
|
import { ClearRouterPluginArgumentsContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind } from "./plugins.mjs";
|
|
6
6
|
import { Controller } from "../Controller.mjs";
|
|
@@ -13,7 +13,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
13
13
|
* @class clear-router CoreRouter
|
|
14
14
|
* @description Core routing logic for clear-router, shared between all supported adapters (Express.js, H3, etc.)
|
|
15
15
|
* @author 3m1n3nc3
|
|
16
|
-
* @repository https://github.com/arkstack-
|
|
16
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
17
17
|
*/
|
|
18
18
|
declare abstract class CoreRouter {
|
|
19
19
|
protected static routerStateNamespace: string;
|
|
@@ -214,7 +214,7 @@ declare abstract class CoreRouter {
|
|
|
214
214
|
* @param callback
|
|
215
215
|
* @param middlewares
|
|
216
216
|
*/
|
|
217
|
-
static group(prefix: string, source:
|
|
217
|
+
static group<S extends RouteGroupSource>(prefix: string, source: S, middlewares?: any[]): RouteGroup<any, any, any, S>;
|
|
218
218
|
/**
|
|
219
219
|
* Adds global middlewares to the router, which will be applied to all routes.
|
|
220
220
|
*
|
package/dist/core/CoreRouter.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
12
12
|
* @class clear-router CoreRouter
|
|
13
13
|
* @description Core routing logic for clear-router, shared between all supported adapters (Express.js, H3, etc.)
|
|
14
14
|
* @author 3m1n3nc3
|
|
15
|
-
* @repository https://github.com/arkstack-
|
|
15
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
16
16
|
*/
|
|
17
17
|
var CoreRouter = class {
|
|
18
18
|
static routerStateNamespace = "clear-router:core";
|
package/dist/core/Request.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpMethod, RequestData } from "../types/basic.cjs";
|
|
2
|
-
import { Route } from "../Route.cjs";
|
|
3
1
|
import { ClearRequest } from "../ClearRequest.cjs";
|
|
2
|
+
import { Route } from "../Route.cjs";
|
|
3
|
+
import { HttpMethod, RequestData } from "../types/basic.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/core/Request.d.ts
|
|
6
6
|
declare class Request<X = any, M = any> extends ClearRequest<X, M> {
|
package/dist/core/Request.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpMethod, RequestData } from "../types/basic.mjs";
|
|
2
|
-
import { Route } from "../Route.mjs";
|
|
3
1
|
import { ClearRequest } from "../ClearRequest.mjs";
|
|
2
|
+
import { Route } from "../Route.mjs";
|
|
3
|
+
import { HttpMethod, RequestData } from "../types/basic.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/core/Request.d.ts
|
|
6
6
|
declare class Request<X = any, M = any> extends ClearRequest<X, M> {
|
package/dist/core/helpers.d.cts
CHANGED
package/dist/core/helpers.d.mts
CHANGED
package/dist/core/plugins.d.cts
CHANGED
package/dist/core/plugins.d.mts
CHANGED
package/dist/express/router.cjs
CHANGED
|
@@ -7,7 +7,7 @@ const require_responses = require('../core/responses.cjs');
|
|
|
7
7
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
8
8
|
* @author Refkinscallv
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var Router = class Router extends require_CoreRouter.CoreRouter {
|
|
13
13
|
static routerStateNamespace = "clear-router:express";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
2
1
|
import { Handler, HttpContext, Middleware } from "../types/express.cjs";
|
|
3
2
|
import { Route } from "../Route.cjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.cjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.cjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
@@ -12,7 +12,7 @@ import { Router } from "express";
|
|
|
12
12
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
13
13
|
* @author Refkinscallv
|
|
14
14
|
* @author 3m1n3nc3
|
|
15
|
-
* @repository https://github.com/arkstack-
|
|
15
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
16
16
|
*/
|
|
17
17
|
declare class Router$1 extends CoreRouter {
|
|
18
18
|
protected static routerStateNamespace: string;
|
|
@@ -102,7 +102,7 @@ declare class Router$1 extends CoreRouter {
|
|
|
102
102
|
* @param callback
|
|
103
103
|
* @param middlewares
|
|
104
104
|
*/
|
|
105
|
-
static group<T = any>(prefix: string, source:
|
|
105
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
106
106
|
/**
|
|
107
107
|
* Adds global middlewares to the router, which will be applied to all routes.
|
|
108
108
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
2
1
|
import { Handler, HttpContext, Middleware } from "../types/express.mjs";
|
|
3
2
|
import { Route } from "../Route.mjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.mjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.mjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
@@ -12,7 +12,7 @@ import { Router } from "express";
|
|
|
12
12
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
13
13
|
* @author Refkinscallv
|
|
14
14
|
* @author 3m1n3nc3
|
|
15
|
-
* @repository https://github.com/arkstack-
|
|
15
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
16
16
|
*/
|
|
17
17
|
declare class Router$1 extends CoreRouter {
|
|
18
18
|
protected static routerStateNamespace: string;
|
|
@@ -102,7 +102,7 @@ declare class Router$1 extends CoreRouter {
|
|
|
102
102
|
* @param callback
|
|
103
103
|
* @param middlewares
|
|
104
104
|
*/
|
|
105
|
-
static group<T = any>(prefix: string, source:
|
|
105
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
106
106
|
/**
|
|
107
107
|
* Adds global middlewares to the router, which will be applied to all routes.
|
|
108
108
|
*
|
package/dist/express/router.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { isFetchResponse, resolveResponseMeta, responseWasSent } from "../core/r
|
|
|
7
7
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
8
8
|
* @author Refkinscallv
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var Router = class Router extends CoreRouter {
|
|
13
13
|
static routerStateNamespace = "clear-router:express";
|
package/dist/fastify/router.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const require_responses = require('../core/responses.cjs');
|
|
|
6
6
|
* @class clear-router Fastify Router
|
|
7
7
|
* @description Laravel-style routing system for Fastify using shared clear-router core
|
|
8
8
|
* @author 3m1n3nc3
|
|
9
|
-
* @repository https://github.com/arkstack-
|
|
9
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
10
10
|
*/
|
|
11
11
|
var Router = class Router extends require_CoreRouter.CoreRouter {
|
|
12
12
|
static routerStateNamespace = "clear-router:fastify";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
2
1
|
import { FastifyApp, Handler, HttpContext, Middleware } from "../types/fastify.cjs";
|
|
3
2
|
import { Route } from "../Route.cjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.cjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.cjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
@@ -10,7 +10,7 @@ import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
|
10
10
|
* @class clear-router Fastify Router
|
|
11
11
|
* @description Laravel-style routing system for Fastify using shared clear-router core
|
|
12
12
|
* @author 3m1n3nc3
|
|
13
|
-
* @repository https://github.com/arkstack-
|
|
13
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
14
14
|
*/
|
|
15
15
|
declare class Router extends CoreRouter {
|
|
16
16
|
protected static routerStateNamespace: string;
|
|
@@ -100,7 +100,7 @@ declare class Router extends CoreRouter {
|
|
|
100
100
|
* @param callback
|
|
101
101
|
* @param middlewares
|
|
102
102
|
*/
|
|
103
|
-
static group<T = any>(prefix: string, source:
|
|
103
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
104
104
|
/**
|
|
105
105
|
* Apply middlewares to a group of routes defined within the callback
|
|
106
106
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
2
1
|
import { FastifyApp, Handler, HttpContext, Middleware } from "../types/fastify.mjs";
|
|
3
2
|
import { Route } from "../Route.mjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.mjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.mjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
@@ -10,7 +10,7 @@ import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
|
10
10
|
* @class clear-router Fastify Router
|
|
11
11
|
* @description Laravel-style routing system for Fastify using shared clear-router core
|
|
12
12
|
* @author 3m1n3nc3
|
|
13
|
-
* @repository https://github.com/arkstack-
|
|
13
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
14
14
|
*/
|
|
15
15
|
declare class Router extends CoreRouter {
|
|
16
16
|
protected static routerStateNamespace: string;
|
|
@@ -100,7 +100,7 @@ declare class Router extends CoreRouter {
|
|
|
100
100
|
* @param callback
|
|
101
101
|
* @param middlewares
|
|
102
102
|
*/
|
|
103
|
-
static group<T = any>(prefix: string, source:
|
|
103
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
104
104
|
/**
|
|
105
105
|
* Apply middlewares to a group of routes defined within the callback
|
|
106
106
|
*
|
package/dist/fastify/router.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { isFetchResponse, resolveResponseMeta, responseWasSent } from "../core/r
|
|
|
6
6
|
* @class clear-router Fastify Router
|
|
7
7
|
* @description Laravel-style routing system for Fastify using shared clear-router core
|
|
8
8
|
* @author 3m1n3nc3
|
|
9
|
-
* @repository https://github.com/arkstack-
|
|
9
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
10
10
|
*/
|
|
11
11
|
var Router = class Router extends CoreRouter {
|
|
12
12
|
static routerStateNamespace = "clear-router:fastify";
|
package/dist/h3/router.cjs
CHANGED
|
@@ -7,7 +7,7 @@ let h3 = require("h3");
|
|
|
7
7
|
* @class clear-router H3 Router
|
|
8
8
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var Router = class Router extends require_CoreRouter.CoreRouter {
|
|
13
13
|
static routerStateNamespace = "clear-router:h3";
|
package/dist/h3/router.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
2
1
|
import { H3App, Handler, HttpContext, Middleware as Middleware$1 } from "../types/h3.cjs";
|
|
3
2
|
import { Route } from "../Route.cjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.cjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.cjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
@@ -11,7 +11,7 @@ import { H3 } from "h3";
|
|
|
11
11
|
* @class clear-router H3 Router
|
|
12
12
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
13
13
|
* @author 3m1n3nc3
|
|
14
|
-
* @repository https://github.com/arkstack-
|
|
14
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
15
15
|
*/
|
|
16
16
|
declare class Router extends CoreRouter {
|
|
17
17
|
protected static routerStateNamespace: string;
|
|
@@ -102,7 +102,7 @@ declare class Router extends CoreRouter {
|
|
|
102
102
|
* @param callback
|
|
103
103
|
* @param middlewares
|
|
104
104
|
*/
|
|
105
|
-
static group<T = any>(prefix: string, source:
|
|
105
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware$1[]): RouteGroup<HttpContext, Middleware$1, Handler<T>, S>;
|
|
106
106
|
/**
|
|
107
107
|
* Adds global middlewares to the router, which will be applied to all routes.
|
|
108
108
|
*
|
package/dist/h3/router.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
2
1
|
import { H3App, Handler, HttpContext, Middleware as Middleware$1 } from "../types/h3.mjs";
|
|
3
2
|
import { Route } from "../Route.mjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.mjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.mjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
@@ -11,7 +11,7 @@ import { H3 } from "h3";
|
|
|
11
11
|
* @class clear-router H3 Router
|
|
12
12
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
13
13
|
* @author 3m1n3nc3
|
|
14
|
-
* @repository https://github.com/arkstack-
|
|
14
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
15
15
|
*/
|
|
16
16
|
declare class Router extends CoreRouter {
|
|
17
17
|
protected static routerStateNamespace: string;
|
|
@@ -102,7 +102,7 @@ declare class Router extends CoreRouter {
|
|
|
102
102
|
* @param callback
|
|
103
103
|
* @param middlewares
|
|
104
104
|
*/
|
|
105
|
-
static group<T = any>(prefix: string, source:
|
|
105
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware$1[]): RouteGroup<HttpContext, Middleware$1, Handler<T>, S>;
|
|
106
106
|
/**
|
|
107
107
|
* Adds global middlewares to the router, which will be applied to all routes.
|
|
108
108
|
*
|
package/dist/h3/router.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { HTTPResponse, getQuery, getRouterParams, readBody } from "h3";
|
|
|
7
7
|
* @class clear-router H3 Router
|
|
8
8
|
* @description Laravel-style routing system for Express.js and H3 with support for CommonJS, ESM, and TypeScript
|
|
9
9
|
* @author 3m1n3nc3
|
|
10
|
-
* @repository https://github.com/arkstack-
|
|
10
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
11
11
|
*/
|
|
12
12
|
var Router = class Router extends CoreRouter {
|
|
13
13
|
static routerStateNamespace = "clear-router:h3";
|
package/dist/hono/router.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const require_responses = require('../core/responses.cjs');
|
|
|
6
6
|
* @class clear-router Hono Router
|
|
7
7
|
* @description Laravel-style routing system for Hono using shared clear-router core
|
|
8
8
|
* @author 3m1n3nc3
|
|
9
|
-
* @repository https://github.com/arkstack-
|
|
9
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
10
10
|
*/
|
|
11
11
|
var Router = class Router extends require_CoreRouter.CoreRouter {
|
|
12
12
|
static routerStateNamespace = "clear-router:hono";
|
package/dist/hono/router.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
2
1
|
import { Handler, HonoApp, HttpContext, Middleware } from "../types/hono.cjs";
|
|
3
2
|
import { Route } from "../Route.cjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.cjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.cjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
@@ -10,7 +10,7 @@ import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
|
10
10
|
* @class clear-router Hono Router
|
|
11
11
|
* @description Laravel-style routing system for Hono using shared clear-router core
|
|
12
12
|
* @author 3m1n3nc3
|
|
13
|
-
* @repository https://github.com/arkstack-
|
|
13
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
14
14
|
*/
|
|
15
15
|
declare class Router extends CoreRouter {
|
|
16
16
|
protected static routerStateNamespace: string;
|
|
@@ -102,7 +102,7 @@ declare class Router extends CoreRouter {
|
|
|
102
102
|
* @param callback
|
|
103
103
|
* @param middlewares
|
|
104
104
|
*/
|
|
105
|
-
static group<T = any>(prefix: string, source:
|
|
105
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
106
106
|
/**
|
|
107
107
|
* Apply middlewares to a group of routes defined within the callback
|
|
108
108
|
*
|
package/dist/hono/router.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
2
1
|
import { Handler, HonoApp, HttpContext, Middleware } from "../types/hono.mjs";
|
|
3
2
|
import { Route } from "../Route.mjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.mjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.mjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
@@ -10,7 +10,7 @@ import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
|
10
10
|
* @class clear-router Hono Router
|
|
11
11
|
* @description Laravel-style routing system for Hono using shared clear-router core
|
|
12
12
|
* @author 3m1n3nc3
|
|
13
|
-
* @repository https://github.com/arkstack-
|
|
13
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
14
14
|
*/
|
|
15
15
|
declare class Router extends CoreRouter {
|
|
16
16
|
protected static routerStateNamespace: string;
|
|
@@ -102,7 +102,7 @@ declare class Router extends CoreRouter {
|
|
|
102
102
|
* @param callback
|
|
103
103
|
* @param middlewares
|
|
104
104
|
*/
|
|
105
|
-
static group<T = any>(prefix: string, source:
|
|
105
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
106
106
|
/**
|
|
107
107
|
* Apply middlewares to a group of routes defined within the callback
|
|
108
108
|
*
|
package/dist/hono/router.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { resolveResponseMeta } from "../core/responses.mjs";
|
|
|
6
6
|
* @class clear-router Hono Router
|
|
7
7
|
* @description Laravel-style routing system for Hono using shared clear-router core
|
|
8
8
|
* @author 3m1n3nc3
|
|
9
|
-
* @repository https://github.com/arkstack-
|
|
9
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
10
10
|
*/
|
|
11
11
|
var Router = class Router extends CoreRouter {
|
|
12
12
|
static routerStateNamespace = "clear-router:hono";
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClearHttpContext, RouteParameter } from "./Contracts.cjs";
|
|
2
2
|
import { Response } from "./core/Response.cjs";
|
|
3
|
-
import { Route } from "./Route.cjs";
|
|
4
3
|
import { ClearRequest } from "./ClearRequest.cjs";
|
|
4
|
+
import { Route } from "./Route.cjs";
|
|
5
5
|
import { Request } from "./core/Request.cjs";
|
|
6
6
|
import { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, definePlugin } from "./core/plugins.cjs";
|
|
7
7
|
import { Controller } from "./Controller.cjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClearHttpContext, RouteParameter } from "./Contracts.mjs";
|
|
2
2
|
import { Response } from "./core/Response.mjs";
|
|
3
|
-
import { Route } from "./Route.mjs";
|
|
4
3
|
import { ClearRequest } from "./ClearRequest.mjs";
|
|
4
|
+
import { Route } from "./Route.mjs";
|
|
5
5
|
import { Request } from "./core/Request.mjs";
|
|
6
6
|
import { ClearRouterPlugin, ClearRouterPluginArgumentsContext, ClearRouterPluginContext, ClearRouterPluginInput, ClearRouterPluginRequestContext, PluginArgumentsResolver, PluginBind, PluginBindFactory, PluginBindValue, PluginSetupResult, definePlugin } from "./core/plugins.mjs";
|
|
7
7
|
import { Controller } from "./Controller.mjs";
|
package/dist/koa/router.cjs
CHANGED
|
@@ -6,7 +6,7 @@ const require_responses = require('../core/responses.cjs');
|
|
|
6
6
|
* @class clear-router Koa Router
|
|
7
7
|
* @description Laravel-style routing system for Koa using @koa/router and shared clear-router core
|
|
8
8
|
* @author 3m1n3nc3
|
|
9
|
-
* @repository https://github.com/arkstack-
|
|
9
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
10
10
|
*/
|
|
11
11
|
var Router = class Router extends require_CoreRouter.CoreRouter {
|
|
12
12
|
static routerStateNamespace = "clear-router:koa";
|
package/dist/koa/router.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
2
1
|
import { Handler, HttpContext, KoaRouterApp, Middleware } from "../types/koa.cjs";
|
|
3
2
|
import { Route } from "../Route.cjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.cjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.cjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.cjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
@@ -10,7 +10,7 @@ import { CoreRouter } from "../core/CoreRouter.cjs";
|
|
|
10
10
|
* @class clear-router Koa Router
|
|
11
11
|
* @description Laravel-style routing system for Koa using @koa/router and shared clear-router core
|
|
12
12
|
* @author 3m1n3nc3
|
|
13
|
-
* @repository https://github.com/arkstack-
|
|
13
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
14
14
|
*/
|
|
15
15
|
declare class Router extends CoreRouter {
|
|
16
16
|
protected static routerStateNamespace: string;
|
|
@@ -103,7 +103,7 @@ declare class Router extends CoreRouter {
|
|
|
103
103
|
* @param callback
|
|
104
104
|
* @param middlewares
|
|
105
105
|
*/
|
|
106
|
-
static group<T = any>(prefix: string, source:
|
|
106
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
107
107
|
/**
|
|
108
108
|
* Apply middlewares to a group of routes defined within the callback
|
|
109
109
|
*
|
package/dist/koa/router.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
2
1
|
import { Handler, HttpContext, KoaRouterApp, Middleware } from "../types/koa.mjs";
|
|
3
2
|
import { Route } from "../Route.mjs";
|
|
3
|
+
import { ApiResourceMiddleware, HttpMethod, ResourceAction, RouteGroupSource } from "../types/basic.mjs";
|
|
4
4
|
import { ResourceRoutes } from "../ResourceRoutes.mjs";
|
|
5
5
|
import { RouteGroup } from "../RouteGroup.mjs";
|
|
6
6
|
import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
@@ -10,7 +10,7 @@ import { CoreRouter } from "../core/CoreRouter.mjs";
|
|
|
10
10
|
* @class clear-router Koa Router
|
|
11
11
|
* @description Laravel-style routing system for Koa using @koa/router and shared clear-router core
|
|
12
12
|
* @author 3m1n3nc3
|
|
13
|
-
* @repository https://github.com/arkstack-
|
|
13
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
14
14
|
*/
|
|
15
15
|
declare class Router extends CoreRouter {
|
|
16
16
|
protected static routerStateNamespace: string;
|
|
@@ -103,7 +103,7 @@ declare class Router extends CoreRouter {
|
|
|
103
103
|
* @param callback
|
|
104
104
|
* @param middlewares
|
|
105
105
|
*/
|
|
106
|
-
static group<T = any>(prefix: string, source:
|
|
106
|
+
static group<T = any, S extends RouteGroupSource = RouteGroupSource>(prefix: string, source: S, middlewares?: Middleware[]): RouteGroup<HttpContext, Middleware, Handler<T>, S>;
|
|
107
107
|
/**
|
|
108
108
|
* Apply middlewares to a group of routes defined within the callback
|
|
109
109
|
*
|
package/dist/koa/router.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { isFetchResponse, resolveResponseMeta } from "../core/responses.mjs";
|
|
|
6
6
|
* @class clear-router Koa Router
|
|
7
7
|
* @description Laravel-style routing system for Koa using @koa/router and shared clear-router core
|
|
8
8
|
* @author 3m1n3nc3
|
|
9
|
-
* @repository https://github.com/arkstack-
|
|
9
|
+
* @repository https://github.com/arkstack-hq/clear-router
|
|
10
10
|
*/
|
|
11
11
|
var Router = class Router extends CoreRouter {
|
|
12
12
|
static routerStateNamespace = "clear-router:koa";
|
package/dist/types/basic.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Route } from "../Route.cjs";
|
|
1
2
|
import { JitiOptions, JitiResolveOptions } from "jiti";
|
|
2
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
|
-
import { Route } from "src/Route";
|
|
4
4
|
|
|
5
5
|
//#region src/types/basic.d.ts
|
|
6
6
|
type OwnStatics<T> = Omit<T, keyof Function | 'prototype'>;
|
|
@@ -12,6 +12,8 @@ type MaybePromise<T = any> = T | Promise<T>;
|
|
|
12
12
|
type RouteGroupCallback = () => MaybePromise<any>;
|
|
13
13
|
type RouteGroupEntry = RouteGroupCallback | string;
|
|
14
14
|
type RouteGroupSource = RouteGroupEntry | RouteGroupEntry[];
|
|
15
|
+
type RouteGroupConditionEntry<S extends RouteGroupEntry> = S extends string ? string : S;
|
|
16
|
+
type RouteGroupConditionSource<S extends RouteGroupSource> = RouteGroupConditionEntry<S extends RouteGroupEntry[] ? S[number] : Extract<S, RouteGroupEntry>>;
|
|
15
17
|
type MiddlewareHandle<Args extends any[] = any[], Return = any> = (...args: Args) => MaybePromise<Return>;
|
|
16
18
|
type MiddlewareClass<M extends MiddlewareHandle = MiddlewareHandle> = new () => {
|
|
17
19
|
handle: M;
|
|
@@ -79,9 +81,9 @@ interface RouteGroupContext {
|
|
|
79
81
|
groupMiddlewares: any[];
|
|
80
82
|
routeCollectors?: Array<Set<Route<any, any, any>>>;
|
|
81
83
|
}
|
|
82
|
-
interface RouteGroupOptions {
|
|
84
|
+
interface RouteGroupOptions<S extends RouteGroupSource = RouteGroupSource> {
|
|
83
85
|
prefix: string;
|
|
84
|
-
source:
|
|
86
|
+
source: S;
|
|
85
87
|
middlewares?: any[];
|
|
86
88
|
context: AsyncLocalStorage<RouteGroupContext>;
|
|
87
89
|
defaultPrefix: string;
|
|
@@ -89,7 +91,7 @@ interface RouteGroupOptions {
|
|
|
89
91
|
normalizePath: (path: string) => string;
|
|
90
92
|
removeRoute: (route: Route<any, any, any>) => void;
|
|
91
93
|
}
|
|
92
|
-
type RouteGroupCondition = (source:
|
|
94
|
+
type RouteGroupCondition<S extends RouteGroupSource = RouteGroupSource> = (source: RouteGroupConditionSource<S>) => MaybePromise<unknown>;
|
|
93
95
|
interface FileImporter {
|
|
94
96
|
<T = unknown>(filePath: string): Promise<T>;
|
|
95
97
|
<T = unknown>(filePath: string, userOptions?: JitiOptions | undefined): Promise<T>;
|
|
@@ -98,4 +100,4 @@ interface FileImporter {
|
|
|
98
100
|
})): Promise<T>;
|
|
99
101
|
}
|
|
100
102
|
//#endregion
|
|
101
|
-
export { ApiResourceMiddleware, ClassMiddleware, ControllerHandler, FileImporter, HttpMethod, MaybePromise, MiddlewareClass, MiddlewareHandle, MiddlewareInstance, RequestData, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions, RouteGroupCallback, RouteGroupCondition, RouteGroupContext, RouteGroupEntry, RouteGroupOptions, RouteGroupSource, RouterConfig };
|
|
103
|
+
export { ApiResourceMiddleware, ClassMiddleware, ControllerHandler, FileImporter, HttpMethod, MaybePromise, MiddlewareClass, MiddlewareHandle, MiddlewareInstance, RequestData, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions, RouteGroupCallback, RouteGroupCondition, RouteGroupConditionEntry, RouteGroupConditionSource, RouteGroupContext, RouteGroupEntry, RouteGroupOptions, RouteGroupSource, RouterConfig };
|
package/dist/types/basic.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Route } from "../Route.mjs";
|
|
1
2
|
import { JitiOptions, JitiResolveOptions } from "jiti";
|
|
2
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
|
-
import { Route } from "src/Route";
|
|
4
4
|
|
|
5
5
|
//#region src/types/basic.d.ts
|
|
6
6
|
type OwnStatics<T> = Omit<T, keyof Function | 'prototype'>;
|
|
@@ -12,6 +12,8 @@ type MaybePromise<T = any> = T | Promise<T>;
|
|
|
12
12
|
type RouteGroupCallback = () => MaybePromise<any>;
|
|
13
13
|
type RouteGroupEntry = RouteGroupCallback | string;
|
|
14
14
|
type RouteGroupSource = RouteGroupEntry | RouteGroupEntry[];
|
|
15
|
+
type RouteGroupConditionEntry<S extends RouteGroupEntry> = S extends string ? string : S;
|
|
16
|
+
type RouteGroupConditionSource<S extends RouteGroupSource> = RouteGroupConditionEntry<S extends RouteGroupEntry[] ? S[number] : Extract<S, RouteGroupEntry>>;
|
|
15
17
|
type MiddlewareHandle<Args extends any[] = any[], Return = any> = (...args: Args) => MaybePromise<Return>;
|
|
16
18
|
type MiddlewareClass<M extends MiddlewareHandle = MiddlewareHandle> = new () => {
|
|
17
19
|
handle: M;
|
|
@@ -79,9 +81,9 @@ interface RouteGroupContext {
|
|
|
79
81
|
groupMiddlewares: any[];
|
|
80
82
|
routeCollectors?: Array<Set<Route<any, any, any>>>;
|
|
81
83
|
}
|
|
82
|
-
interface RouteGroupOptions {
|
|
84
|
+
interface RouteGroupOptions<S extends RouteGroupSource = RouteGroupSource> {
|
|
83
85
|
prefix: string;
|
|
84
|
-
source:
|
|
86
|
+
source: S;
|
|
85
87
|
middlewares?: any[];
|
|
86
88
|
context: AsyncLocalStorage<RouteGroupContext>;
|
|
87
89
|
defaultPrefix: string;
|
|
@@ -89,7 +91,7 @@ interface RouteGroupOptions {
|
|
|
89
91
|
normalizePath: (path: string) => string;
|
|
90
92
|
removeRoute: (route: Route<any, any, any>) => void;
|
|
91
93
|
}
|
|
92
|
-
type RouteGroupCondition = (source:
|
|
94
|
+
type RouteGroupCondition<S extends RouteGroupSource = RouteGroupSource> = (source: RouteGroupConditionSource<S>) => MaybePromise<unknown>;
|
|
93
95
|
interface FileImporter {
|
|
94
96
|
<T = unknown>(filePath: string): Promise<T>;
|
|
95
97
|
<T = unknown>(filePath: string, userOptions?: JitiOptions | undefined): Promise<T>;
|
|
@@ -98,4 +100,4 @@ interface FileImporter {
|
|
|
98
100
|
})): Promise<T>;
|
|
99
101
|
}
|
|
100
102
|
//#endregion
|
|
101
|
-
export { ApiResourceMiddleware, ClassMiddleware, ControllerHandler, FileImporter, HttpMethod, MaybePromise, MiddlewareClass, MiddlewareHandle, MiddlewareInstance, RequestData, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions, RouteGroupCallback, RouteGroupCondition, RouteGroupContext, RouteGroupEntry, RouteGroupOptions, RouteGroupSource, RouterConfig };
|
|
103
|
+
export { ApiResourceMiddleware, ClassMiddleware, ControllerHandler, FileImporter, HttpMethod, MaybePromise, MiddlewareClass, MiddlewareHandle, MiddlewareInstance, RequestData, ResourceAction, ResourceRouteDefinition, ResourceRouteRegistrar, ResourceRouteRemover, ResourceRoutesOptions, RouteGroupCallback, RouteGroupCondition, RouteGroupConditionEntry, RouteGroupConditionSource, RouteGroupContext, RouteGroupEntry, RouteGroupOptions, RouteGroupSource, RouterConfig };
|
package/dist/types/express.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.cjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.cjs";
|
|
3
2
|
import { Response as Response$1 } from "../core/Response.cjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.cjs";
|
|
4
4
|
import { Request as Request$1 } from "../core/Request.cjs";
|
|
5
5
|
import { NextFunction, Request, Response } from "express";
|
|
6
6
|
|
package/dist/types/express.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.mjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.mjs";
|
|
3
2
|
import { Response as Response$1 } from "../core/Response.mjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.mjs";
|
|
4
4
|
import { Request as Request$1 } from "../core/Request.mjs";
|
|
5
5
|
import { NextFunction, Request, Response } from "express";
|
|
6
6
|
|
package/dist/types/fastify.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.cjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.cjs";
|
|
3
2
|
import { Response } from "../core/Response.cjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.cjs";
|
|
4
4
|
import { Request } from "../core/Request.cjs";
|
|
5
5
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
6
6
|
|
package/dist/types/fastify.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.mjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.mjs";
|
|
3
2
|
import { Response } from "../core/Response.mjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler, MiddlewareHandle } from "./basic.mjs";
|
|
4
4
|
import { Request } from "../core/Request.mjs";
|
|
5
5
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
6
6
|
|
package/dist/types/h3.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler } from "./basic.cjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.cjs";
|
|
3
2
|
import { Response as Response$1 } from "../core/Response.cjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler } from "./basic.cjs";
|
|
4
4
|
import { Request } from "../core/Request.cjs";
|
|
5
5
|
import { EventHandlerRequest, H3, H3Event, Middleware as Middleware$1, TypedServerRequest } from "h3";
|
|
6
6
|
|
package/dist/types/h3.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler } from "./basic.mjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.mjs";
|
|
3
2
|
import { Response as Response$1 } from "../core/Response.mjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler } from "./basic.mjs";
|
|
4
4
|
import { Request } from "../core/Request.mjs";
|
|
5
5
|
import { EventHandlerRequest, H3, H3Event, Middleware as Middleware$1, TypedServerRequest } from "h3";
|
|
6
6
|
|
package/dist/types/hono.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler } from "./basic.cjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.cjs";
|
|
3
2
|
import { Response } from "../core/Response.cjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler } from "./basic.cjs";
|
|
4
4
|
import { Request } from "../core/Request.cjs";
|
|
5
5
|
import { Context, HonoRequest, MiddlewareHandler } from "hono";
|
|
6
6
|
|
package/dist/types/hono.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler } from "./basic.mjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.mjs";
|
|
3
2
|
import { Response } from "../core/Response.mjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler } from "./basic.mjs";
|
|
4
4
|
import { Request } from "../core/Request.mjs";
|
|
5
5
|
import { Context, HonoRequest, MiddlewareHandler } from "hono";
|
|
6
6
|
|
package/dist/types/koa.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler } from "./basic.cjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.cjs";
|
|
3
2
|
import { Response } from "../core/Response.cjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler } from "./basic.cjs";
|
|
4
4
|
import { Request } from "../core/Request.cjs";
|
|
5
5
|
import Koa from "koa";
|
|
6
6
|
import Router from "@koa/router";
|
package/dist/types/koa.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClassMiddleware, ControllerHandler } from "./basic.mjs";
|
|
2
1
|
import { ClearHttpContext } from "../Contracts.mjs";
|
|
3
2
|
import { Response } from "../core/Response.mjs";
|
|
3
|
+
import { ClassMiddleware, ControllerHandler } from "./basic.mjs";
|
|
4
4
|
import { Request } from "../core/Request.mjs";
|
|
5
5
|
import Koa from "koa";
|
|
6
6
|
import Router from "@koa/router";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clear-router",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.7",
|
|
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",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"commonjs",
|
|
18
18
|
"h3ravel"
|
|
19
19
|
],
|
|
20
|
-
"homepage": "https://arkstack-
|
|
20
|
+
"homepage": "https://arkstack-hq.github.io/clear-router",
|
|
21
21
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/arkstack-
|
|
22
|
+
"url": "https://github.com/arkstack-hq/clear-router/issues"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/arkstack-
|
|
26
|
+
"url": "git+https://github.com/arkstack-hq/clear-router.git"
|
|
27
27
|
},
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"author": "3m1n1nce <3m1n1nce@toneflix.net>",
|