jax-hono 1.0.5 → 1.0.6

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.
Files changed (2) hide show
  1. package/helpers/crud.ts +5 -1
  2. package/package.json +1 -1
package/helpers/crud.ts CHANGED
@@ -10,7 +10,11 @@ export type JaxCrudController = {
10
10
  destroy?: Handler;
11
11
  };
12
12
 
13
- export function registerCrudRoutes(app: Hono, path: string, controller: JaxCrudController) {
13
+ export function registerCrudRoutes<TApp extends Hono>(
14
+ app: TApp,
15
+ path: string,
16
+ controller: JaxCrudController
17
+ ): TApp {
14
18
  const basePath = normalizeRoutePath(path);
15
19
  const detailPath = basePath === '/' ? '/:id' : `${basePath}/:id`;
16
20
  const deleteHandler = controller.delete ?? controller.destroy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jax-hono",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Lightweight framework layer on top of Hono, built for Bun",
5
5
  "type": "module",
6
6
  "main": "./index.ts",