clear-router 2.5.0 → 2.5.1
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 +10 -5
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/express/index.cjs +11 -13
- package/dist/express/index.d.cts +11 -13
- package/dist/express/index.d.mts +11 -13
- package/dist/express/index.mjs +11 -13
- package/dist/fastify/index.cjs +1 -1
- package/dist/fastify/index.d.cts +1 -1
- package/dist/fastify/index.d.mts +1 -1
- package/dist/fastify/index.mjs +1 -1
- package/dist/h3/index.cjs +5 -7
- package/dist/h3/index.d.cts +5 -7
- package/dist/h3/index.d.mts +5 -7
- package/dist/h3/index.mjs +5 -7
- package/dist/hono/index.cjs +3 -3
- package/dist/hono/index.d.cts +3 -3
- package/dist/hono/index.d.mts +3 -3
- package/dist/hono/index.mjs +3 -3
- package/dist/index.cjs +10 -12
- package/dist/index.d.cts +10 -12
- package/dist/index.d.mts +10 -12
- package/dist/index.mjs +10 -12
- package/dist/koa/index.cjs +79 -4
- package/dist/koa/index.d.cts +88 -4
- package/dist/koa/index.d.mts +88 -4
- package/dist/koa/index.mjs +79 -4
- package/dist/{router-Dxc8FQOl.mjs → router-BReOXz-F.mjs} +10 -12
- package/dist/{router-Cxi21bzi.cjs → router-CHg0pZUO.cjs} +10 -12
- package/dist/{router-A-9JuZPi.d.cts → router-CS_2XQ7I.d.cts} +10 -12
- package/dist/{router-CVeqd7Ro.d.mts → router-_w2VzMQF.d.mts} +10 -12
- package/package.json +1 -1
|
@@ -211,7 +211,7 @@ declare abstract class CoreRouter {
|
|
|
211
211
|
static configure(this: any, options?: RouterConfig): void;
|
|
212
212
|
protected static resolveMethodOverride(this: any, method: string, headers: Headers | Record<string, any>, body: unknown): HttpMethod | null;
|
|
213
213
|
/**
|
|
214
|
-
* Adds a new route to the router
|
|
214
|
+
* Adds a new route to the router.
|
|
215
215
|
*
|
|
216
216
|
* @param this
|
|
217
217
|
* @param methods
|
|
@@ -221,8 +221,7 @@ declare abstract class CoreRouter {
|
|
|
221
221
|
*/
|
|
222
222
|
static add(this: any, methods: HttpMethod | HttpMethod[], path: string, handler: any, middlewares?: any[] | any): void;
|
|
223
223
|
/**
|
|
224
|
-
*
|
|
225
|
-
* options to include/exclude specific actions and apply middlewares.
|
|
224
|
+
* Define a resourceful API controller with standard CRUD routes.
|
|
226
225
|
*
|
|
227
226
|
* @param this
|
|
228
227
|
* @param basePath
|
|
@@ -235,7 +234,7 @@ declare abstract class CoreRouter {
|
|
|
235
234
|
middlewares?: ApiResourceMiddleware<any>;
|
|
236
235
|
}): void;
|
|
237
236
|
/**
|
|
238
|
-
* Adds a new GET route to the router
|
|
237
|
+
* Adds a new GET route to the router.
|
|
239
238
|
*
|
|
240
239
|
* @param this The router instance.
|
|
241
240
|
* @param path The path for the GET route.
|
|
@@ -244,7 +243,7 @@ declare abstract class CoreRouter {
|
|
|
244
243
|
*/
|
|
245
244
|
static get(this: any, path: string, handler: any, middlewares?: any[] | any): void;
|
|
246
245
|
/**
|
|
247
|
-
* Adds a new POST route to the router
|
|
246
|
+
* Adds a new POST route to the router.
|
|
248
247
|
*
|
|
249
248
|
* @param this
|
|
250
249
|
* @param path
|
|
@@ -253,7 +252,7 @@ declare abstract class CoreRouter {
|
|
|
253
252
|
*/
|
|
254
253
|
static post(this: any, path: string, handler: any, middlewares?: any[] | any): void;
|
|
255
254
|
/**
|
|
256
|
-
* Adds a new PUT route to the router
|
|
255
|
+
* Adds a new PUT route to the router.
|
|
257
256
|
*
|
|
258
257
|
* @param this
|
|
259
258
|
* @param path
|
|
@@ -262,7 +261,7 @@ declare abstract class CoreRouter {
|
|
|
262
261
|
*/
|
|
263
262
|
static put(this: any, path: string, handler: any, middlewares?: any[] | any): void;
|
|
264
263
|
/**
|
|
265
|
-
* Adds a new DELETE route to the router
|
|
264
|
+
* Adds a new DELETE route to the router.
|
|
266
265
|
*
|
|
267
266
|
* @param this
|
|
268
267
|
* @param path
|
|
@@ -271,7 +270,7 @@ declare abstract class CoreRouter {
|
|
|
271
270
|
*/
|
|
272
271
|
static delete(this: any, path: string, handler: any, middlewares?: any[] | any): void;
|
|
273
272
|
/**
|
|
274
|
-
* Adds a new PATCH route to the router
|
|
273
|
+
* Adds a new PATCH route to the router.
|
|
275
274
|
*
|
|
276
275
|
* @param this
|
|
277
276
|
* @param path
|
|
@@ -280,7 +279,7 @@ declare abstract class CoreRouter {
|
|
|
280
279
|
*/
|
|
281
280
|
static patch(this: any, path: string, handler: any, middlewares?: any[] | any): void;
|
|
282
281
|
/**
|
|
283
|
-
* Adds a new OPTIONS route to the router
|
|
282
|
+
* Adds a new OPTIONS route to the router.
|
|
284
283
|
*
|
|
285
284
|
* @param this
|
|
286
285
|
* @param path
|
|
@@ -289,7 +288,7 @@ declare abstract class CoreRouter {
|
|
|
289
288
|
*/
|
|
290
289
|
static options(this: any, path: string, handler: any, middlewares?: any[] | any): void;
|
|
291
290
|
/**
|
|
292
|
-
* Adds a new HEAD route to the router
|
|
291
|
+
* Adds a new HEAD route to the router.
|
|
293
292
|
*
|
|
294
293
|
* @param this
|
|
295
294
|
* @param path
|
|
@@ -298,8 +297,7 @@ declare abstract class CoreRouter {
|
|
|
298
297
|
*/
|
|
299
298
|
static head(this: any, path: string, handler: any, middlewares?: any[] | any): void;
|
|
300
299
|
/**
|
|
301
|
-
* Defines a group of routes with a common prefix
|
|
302
|
-
* organization and reuse of route configurations.
|
|
300
|
+
* Defines a group of routes with a common prefix.
|
|
303
301
|
*
|
|
304
302
|
* @param this
|
|
305
303
|
* @param prefix
|
package/package.json
CHANGED