@hono/zod-openapi 0.17.1 → 0.18.1
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/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -27,9 +27,9 @@ type HasUndefined<T> = undefined extends T ? true : false;
|
|
|
27
27
|
type InputTypeBase<R extends RouteConfig, Part extends string, Type extends keyof ValidationTargets> = R['request'] extends RequestTypes ? RequestPart<R, Part> extends ZodType ? {
|
|
28
28
|
in: {
|
|
29
29
|
[K in Type]: HasUndefined<ValidationTargets[K]> extends true ? {
|
|
30
|
-
[K2 in keyof z.input<RequestPart<R, Part>>]?:
|
|
30
|
+
[K2 in keyof z.input<RequestPart<R, Part>>]?: z.input<RequestPart<R, Part>>[K2];
|
|
31
31
|
} : {
|
|
32
|
-
[K2 in keyof z.input<RequestPart<R, Part>>]:
|
|
32
|
+
[K2 in keyof z.input<RequestPart<R, Part>>]: z.input<RequestPart<R, Part>>[K2];
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
out: {
|
|
@@ -93,7 +93,7 @@ type AsArray<T> = T extends undefined ? [] : T extends any[] ? T : [T];
|
|
|
93
93
|
* Like simplify but recursive
|
|
94
94
|
*/
|
|
95
95
|
type DeepSimplify<T> = {
|
|
96
|
-
[KeyType in keyof T]: T[KeyType] extends
|
|
96
|
+
[KeyType in keyof T]: T[KeyType] extends Record<string, unknown> ? DeepSimplify<T[KeyType]> : T[KeyType];
|
|
97
97
|
} & {};
|
|
98
98
|
/**
|
|
99
99
|
* Helper to infer generics from {@link MiddlewareHandler}
|
package/dist/index.d.ts
CHANGED
|
@@ -27,9 +27,9 @@ type HasUndefined<T> = undefined extends T ? true : false;
|
|
|
27
27
|
type InputTypeBase<R extends RouteConfig, Part extends string, Type extends keyof ValidationTargets> = R['request'] extends RequestTypes ? RequestPart<R, Part> extends ZodType ? {
|
|
28
28
|
in: {
|
|
29
29
|
[K in Type]: HasUndefined<ValidationTargets[K]> extends true ? {
|
|
30
|
-
[K2 in keyof z.input<RequestPart<R, Part>>]?:
|
|
30
|
+
[K2 in keyof z.input<RequestPart<R, Part>>]?: z.input<RequestPart<R, Part>>[K2];
|
|
31
31
|
} : {
|
|
32
|
-
[K2 in keyof z.input<RequestPart<R, Part>>]:
|
|
32
|
+
[K2 in keyof z.input<RequestPart<R, Part>>]: z.input<RequestPart<R, Part>>[K2];
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
out: {
|
|
@@ -93,7 +93,7 @@ type AsArray<T> = T extends undefined ? [] : T extends any[] ? T : [T];
|
|
|
93
93
|
* Like simplify but recursive
|
|
94
94
|
*/
|
|
95
95
|
type DeepSimplify<T> = {
|
|
96
|
-
[KeyType in keyof T]: T[KeyType] extends
|
|
96
|
+
[KeyType in keyof T]: T[KeyType] extends Record<string, unknown> ? DeepSimplify<T[KeyType]> : T[KeyType];
|
|
97
97
|
} & {};
|
|
98
98
|
/**
|
|
99
99
|
* Helper to infer generics from {@link MiddlewareHandler}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hono/zod-openapi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "A wrapper class of Hono which supports OpenAPI.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@cloudflare/workers-types": "^4.20240117.0",
|
|
45
|
-
"hono": "^4.
|
|
45
|
+
"hono": "^4.6.10",
|
|
46
46
|
"jest": "^29.7.0",
|
|
47
47
|
"tsup": "^8.0.1",
|
|
48
48
|
"typescript": "^5.4.4",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@asteasolutions/zod-to-openapi": "^7.1.0",
|
|
55
|
-
"@hono/zod-validator": "0.
|
|
55
|
+
"@hono/zod-validator": "^0.4.1"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=16.0.0"
|