@dnax/core 0.63.15 → 0.64.0

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/package.json +1 -1
  2. package/types/index.ts +11 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.63.15",
3
+ "version": "0.64.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/types/index.ts CHANGED
@@ -17,10 +17,15 @@ import type {
17
17
  findParam,
18
18
  updateParams,
19
19
  } from "../driver/mongo/@types";
20
- import type { HandlerResponse, RouterRoute } from "hono/types";
20
+ import type {
21
+ HandlerResponse,
22
+ MiddlewareHandler,
23
+ RouterRoute,
24
+ MiddlewareHandlerInterface
25
+ } from "hono/types";
21
26
  import type { MongoClientOptions } from "mongodb";
22
27
  import type { SearchParams } from "meilisearch";
23
- import type { serveStatic } from "hono/serve-static";
28
+ import { serveStatic } from "hono/bun";
24
29
  export type Socket = {
25
30
  enabled: boolean;
26
31
  exec: (ctx: { rest: useRest; io: socketIoType }) => void;
@@ -629,15 +634,16 @@ export type routeOption = {
629
634
  }) => any;
630
635
  };
631
636
 
637
+ type clbContext = (c:Context)=>any;
632
638
  export type endpointCtx = {
633
639
  enabled: boolean;
634
640
  handler: (ctx: {
635
- serveStatic: typeof serveStatic;
641
+ serveStatic:typeof serveStatic ;
636
642
  rest: InstanceType<typeof useRest>;
637
643
  io: socketIoType;
638
644
  router: {
639
645
  post: (path: string, clb: (c: Context) => any) => {};
640
- get: (path: string, clb: (c: Context) => any) => {};
646
+ get: (path: string, clb: MiddlewareHandler|clbContext) => {};
641
647
  };
642
648
  }) => any;
643
649
  };
@@ -649,7 +655,7 @@ export type routeCtx = {
649
655
  io: socketIoType;
650
656
  router: {
651
657
  post: (path: string, clb: (c: Context) => void) => {};
652
- get: (path: string, clb: (c: Context | typeof serveStatic) => void) => {};
658
+ get: (path: string, clb: (c: Context) => void) => {};;
653
659
  };
654
660
  }) => any;
655
661
  };