@primate/core 0.9.0 → 0.9.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.
|
@@ -5,18 +5,18 @@ import type RouteHandler from "#route/Handler";
|
|
|
5
5
|
import hook from "#route/hook";
|
|
6
6
|
import type RouteOptions from "#route/Options";
|
|
7
7
|
import type { Unpack } from "@rcompat/type";
|
|
8
|
-
type
|
|
9
|
-
|
|
10
|
-
} ?
|
|
8
|
+
type InputSchema<S> = S extends {
|
|
9
|
+
input: infer I;
|
|
10
|
+
} ? I : never;
|
|
11
11
|
type Body<O extends RouteOptions> = O extends {
|
|
12
12
|
contentType: infer _CT extends keyof ContentTypeMap;
|
|
13
13
|
body: infer S;
|
|
14
|
-
} ? Unpack<
|
|
14
|
+
} ? Unpack<InputSchema<S>> : O extends {
|
|
15
15
|
contentType: infer CT extends keyof ContentTypeMap;
|
|
16
16
|
} ? ContentTypeMap[CT] : never;
|
|
17
17
|
type Path<O extends RouteOptions> = O extends {
|
|
18
18
|
path: infer S;
|
|
19
|
-
} ? Unpack<
|
|
19
|
+
} ? Unpack<InputSchema<S>> : never;
|
|
20
20
|
type MethodMeta = {
|
|
21
21
|
contentType?: string;
|
|
22
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primate/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "The universal web framework",
|
|
5
5
|
"homepage": "https://primate.run",
|
|
6
6
|
"bugs": "https://github.com/primate-run/primate/issues",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@rcompat/symbol": "^0.3.0",
|
|
36
36
|
"@rcompat/type": "^0.18.0",
|
|
37
37
|
"esbuild": "^0.28.1",
|
|
38
|
-
"pema": "^0.9.
|
|
38
|
+
"pema": "^0.9.1"
|
|
39
39
|
},
|
|
40
40
|
"imports": {
|
|
41
41
|
"#i18n/config": {
|