@dnax/core 0.63.9 → 0.63.11

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/app/hono.ts CHANGED
@@ -902,6 +902,7 @@ function HonoInstance(): typeof app {
902
902
  io: Cfg.io,
903
903
  router: app,
904
904
  rest: new useRest({ tenant_id: e?.tenant_id }),
905
+ serveStatic: serveStatic,
905
906
  });
906
907
  }
907
908
  });
package/index.ts CHANGED
@@ -37,5 +37,4 @@ export {
37
37
  $,
38
38
  contextStorage,
39
39
  Adapter,
40
- serveStatic,
41
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.63.9",
3
+ "version": "0.63.11",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/types/index.ts CHANGED
@@ -17,7 +17,7 @@ import type {
17
17
  findParam,
18
18
  updateParams,
19
19
  } from "../driver/mongo/@types";
20
- import type { RouterRoute } from "hono/types";
20
+ import type { HandlerResponse, RouterRoute } from "hono/types";
21
21
  import type { MongoClientOptions } from "mongodb";
22
22
  import type { SearchParams } from "meilisearch";
23
23
  export type Socket = {
@@ -623,19 +623,24 @@ export type routeOption = {
623
623
  io: socketIoType;
624
624
  router: {
625
625
  post: (path: string, clb: (c: Context) => void) => {};
626
- get: (path: string, clb: (c: Context) => void) => {};
626
+ get: (path: string, clb: (c: Context | serveStatic) => void) => {};
627
627
  };
628
628
  }) => any;
629
629
  };
630
630
 
631
+ export type serveStatic = (cf: { root: string }) => void;
631
632
  export type endpointCtx = {
632
633
  enabled: boolean;
633
634
  handler: (ctx: {
635
+ serveStatic: serveStatic;
634
636
  rest: InstanceType<typeof useRest>;
635
637
  io: socketIoType;
636
638
  router: {
637
639
  post: (path: string, clb: (c: Context) => void) => {};
638
- get: (path: string, clb: (c: Context) => void) => {};
640
+ get: (
641
+ path: string,
642
+ clb: (c: Context, serveStatic: serveStatic) => void
643
+ ) => {};
639
644
  };
640
645
  }) => any;
641
646
  };