@dnax/core 0.74.4 → 0.74.5

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
@@ -16,6 +16,7 @@ import { consola } from "consola";
16
16
  import { cors } from "hono/cors";
17
17
  import { asyncLocalStorage, sessionStorage } from "../lib/asyncLocalStorage";
18
18
  import { crypt } from "../lib/crypto";
19
+ import { plugins } from "../lib/plugins";
19
20
  import {
20
21
  cleanPath,
21
22
  ContextError,
@@ -904,6 +905,9 @@ function HonoInstance(): typeof app {
904
905
 
905
906
  app.onError((err, c) => {
906
907
  // console.error(err?.message);
908
+ if (plugins?.sentry) {
909
+ plugins?.sentry?.captureException(err) ?? null;
910
+ }
907
911
  c.status(500);
908
912
  return c.json({ message: err?.message });
909
913
  });
package/index.ts CHANGED
@@ -9,6 +9,7 @@ import * as utils from "./utils";
9
9
  import { app } from "./app/hono";
10
10
  import { FilesystemSftpAdapter, MinioAdapter } from "./lib/media";
11
11
  import { crypt } from "./lib/crypto";
12
+ import { plugins } from "./lib/plugins";
12
13
  import { contextStorage } from "./lib/asyncLocalStorage";
13
14
  import { Cron as Task } from "croner";
14
15
  import { serveStatic } from "hono/bun";
@@ -22,7 +23,7 @@ const Adapter = {
22
23
  };
23
24
 
24
25
  export {
25
- app,
26
+ plugins,
26
27
  runApp,
27
28
  define,
28
29
  utils,
package/lib/plugins.ts ADDED
@@ -0,0 +1,7 @@
1
+ type plugins = {
2
+ [key: string]: any;
3
+ sentry?: any;
4
+ };
5
+ const plugins: plugins = {};
6
+
7
+ export { plugins };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.74.4",
3
+ "version": "0.74.5",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},