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.
@@ -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 with the specified methods, path, handler, and middlewares.
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
- * Adds a new API resource route to the router for the specified base path and controller, with
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 with the specified path, handler, and optional middlewares.
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 with the specified path, handler, and optional middlewares.
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 with the specified path, handler, and optional middlewares.
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 with the specified path, handler, and optional middlewares.
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 with the specified path, handler, and optional middlewares.
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 with the specified path, handler, and optional middlewares.
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 with the specified path, handler, and optional middlewares.
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 and optional middlewares, allowing for better
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clear-router",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
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",