@dnax/core 0.63.13 → 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 +12 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.63.13",
3
+ "version": "0.64.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/types/index.ts CHANGED
@@ -17,9 +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";
28
+ import { serveStatic } from "hono/bun";
23
29
  export type Socket = {
24
30
  enabled: boolean;
25
31
  exec: (ctx: { rest: useRest; io: socketIoType }) => void;
@@ -623,24 +629,21 @@ export type routeOption = {
623
629
  io: socketIoType;
624
630
  router: {
625
631
  post: (path: string, clb: (c: Context) => void) => {};
626
- get: (path: string, clb: (c: Context | serveStatic) => void) => {};
632
+ get: (path: string, clb: (c: Context) => void) => {};
627
633
  };
628
634
  }) => any;
629
635
  };
630
636
 
631
- export type serveStatic = (cf: { root: string }) => any;
637
+ type clbContext = (c:Context)=>any;
632
638
  export type endpointCtx = {
633
639
  enabled: boolean;
634
640
  handler: (ctx: {
635
- serveStatic: 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: (
641
- path: string,
642
- clb: (c: Context, serveStatic: serveStatic) => any
643
- ) => {};
646
+ get: (path: string, clb: MiddlewareHandler|clbContext) => {};
644
647
  };
645
648
  }) => any;
646
649
  };
@@ -652,7 +655,7 @@ export type routeCtx = {
652
655
  io: socketIoType;
653
656
  router: {
654
657
  post: (path: string, clb: (c: Context) => void) => {};
655
- get: (path: string, clb: (c: Context) => void) => {};
658
+ get: (path: string, clb: (c: Context) => void) => {};;
656
659
  };
657
660
  }) => any;
658
661
  };