@rexeus/typeweaver-hono 0.6.3 → 0.6.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.
@@ -24,7 +24,7 @@ import type { BlankEnv, BlankSchema, Env, Schema } from "hono/types";
24
24
  * @param context - The Hono context for the current request
25
25
  * @returns The HTTP response to send to the client
26
26
  */
27
- export type HttpResponseErrorHandler = (
27
+ export type HonoHttpResponseErrorHandler = (
28
28
  error: HttpResponse,
29
29
  context: Context
30
30
  ) => Promise<IHttpResponse> | IHttpResponse;
@@ -35,7 +35,7 @@ export type HttpResponseErrorHandler = (
35
35
  * @param context - The Hono context for the current request
36
36
  * @returns The HTTP response to send to the client
37
37
  */
38
- export type ValidationErrorHandler = (
38
+ export type HonoValidationErrorHandler = (
39
39
  error: RequestValidationError,
40
40
  context: Context
41
41
  ) => Promise<IHttpResponse> | IHttpResponse;
@@ -46,7 +46,7 @@ export type ValidationErrorHandler = (
46
46
  * @param context - The Hono context for the current request
47
47
  * @returns The HTTP response to send to the client
48
48
  */
49
- export type UnknownErrorHandler = (
49
+ export type HonoUnknownErrorHandler = (
50
50
  error: unknown,
51
51
  context: Context
52
52
  ) => Promise<IHttpResponse> | IHttpResponse;
@@ -80,7 +80,7 @@ export type TypeweaverHonoOptions<
80
80
  * - `function`: Use custom error handler
81
81
  * @default true
82
82
  */
83
- handleHttpResponseErrors?: HttpResponseErrorHandler | boolean;
83
+ handleHttpResponseErrors?: HonoHttpResponseErrorHandler | boolean;
84
84
 
85
85
  /**
86
86
  * Configure handling of request validation errors.
@@ -89,7 +89,7 @@ export type TypeweaverHonoOptions<
89
89
  * - `function`: Use custom error handler
90
90
  * @default true
91
91
  */
92
- handleValidationErrors?: ValidationErrorHandler | boolean;
92
+ handleValidationErrors?: HonoValidationErrorHandler | boolean;
93
93
 
94
94
  /**
95
95
  * Configure handling of unknown errors.
@@ -98,7 +98,7 @@ export type TypeweaverHonoOptions<
98
98
  * - `function`: Use custom error handler
99
99
  * @default true
100
100
  */
101
- handleUnknownErrors?: UnknownErrorHandler | boolean;
101
+ handleUnknownErrors?: HonoUnknownErrorHandler | boolean;
102
102
  };
103
103
 
104
104
  /**
@@ -136,9 +136,9 @@ export abstract class TypeweaverHono<
136
136
  private readonly config: {
137
137
  validateRequests: boolean;
138
138
  errorHandlers: {
139
- validation: ValidationErrorHandler | undefined;
140
- httpResponse: HttpResponseErrorHandler | undefined;
141
- unknown: UnknownErrorHandler | undefined;
139
+ validation: HonoValidationErrorHandler | undefined;
140
+ httpResponse: HonoHttpResponseErrorHandler | undefined;
141
+ unknown: HonoUnknownErrorHandler | undefined;
142
142
  };
143
143
  };
144
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rexeus/typeweaver-hono",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Generates Hono routers and handlers straight from your API definitions. Powered by Typeweaver 🧵✨",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -47,14 +47,14 @@
47
47
  "homepage": "https://github.com/rexeus/typeweaver#readme",
48
48
  "peerDependencies": {
49
49
  "hono": "^4.11.0",
50
- "@rexeus/typeweaver-gen": "^0.6.3",
51
- "@rexeus/typeweaver-core": "^0.6.3"
50
+ "@rexeus/typeweaver-core": "^0.6.5",
51
+ "@rexeus/typeweaver-gen": "^0.6.5"
52
52
  },
53
53
  "devDependencies": {
54
54
  "hono": "^4.11.3",
55
55
  "test-utils": "file:../test-utils",
56
- "@rexeus/typeweaver-core": "^0.6.3",
57
- "@rexeus/typeweaver-gen": "^0.6.3"
56
+ "@rexeus/typeweaver-core": "^0.6.5",
57
+ "@rexeus/typeweaver-gen": "^0.6.5"
58
58
  },
59
59
  "dependencies": {
60
60
  "case": "^1.6.3"