rouzer 1.1.0 → 1.2.0
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/server/router.d.ts +1 -1
- package/dist/types.d.ts +8 -8
- package/package.json +2 -2
package/dist/server/router.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export interface Router<T extends MiddlewareTypes = any> extends HattipHandler<T
|
|
|
46
46
|
*
|
|
47
47
|
* @returns a new `Router` instance.
|
|
48
48
|
*/
|
|
49
|
-
use<const TMiddleware extends ExtractMiddleware<this>>(middleware: TMiddleware): Router<ApplyMiddleware<this, TMiddleware>>;
|
|
49
|
+
use<const TMiddleware extends ExtractMiddleware<this>>(middleware: TMiddleware | null): Router<ApplyMiddleware<this, TMiddleware>>;
|
|
50
50
|
/**
|
|
51
51
|
* Clone this router and add the given routes and handlers to the chain.
|
|
52
52
|
*
|
package/dist/types.d.ts
CHANGED
|
@@ -46,27 +46,27 @@ declare class Any {
|
|
|
46
46
|
type PathArgs<T, P extends string> = T extends {
|
|
47
47
|
path: infer TPath;
|
|
48
48
|
} ? {} extends z.infer<TPath> ? {
|
|
49
|
-
path?: z.infer<TPath>;
|
|
49
|
+
[K in keyof T as 'path']?: z.infer<TPath>;
|
|
50
50
|
} : {
|
|
51
|
-
path: z.infer<TPath>;
|
|
51
|
+
[K in keyof T as 'path']: z.infer<TPath>;
|
|
52
52
|
} : Params<P> extends infer TParams ? {} extends TParams ? {
|
|
53
|
-
path?: TParams;
|
|
53
|
+
[K in keyof T as 'path']?: TParams;
|
|
54
54
|
} : {
|
|
55
|
-
path: TParams;
|
|
55
|
+
[K in keyof T as 'path']: TParams;
|
|
56
56
|
} : unknown;
|
|
57
57
|
type QueryArgs<T> = T extends QueryRouteSchema & {
|
|
58
58
|
query: infer TQuery;
|
|
59
59
|
} ? {} extends z.infer<TQuery> ? {
|
|
60
|
-
query?: z.infer<TQuery>;
|
|
60
|
+
[K in keyof T as 'query']?: z.infer<TQuery>;
|
|
61
61
|
} : {
|
|
62
|
-
query: z.infer<TQuery>;
|
|
62
|
+
[K in keyof T as 'query']: z.infer<TQuery>;
|
|
63
63
|
} : unknown;
|
|
64
64
|
type MutationArgs<T> = T extends MutationRouteSchema ? T extends {
|
|
65
65
|
body: infer TBody;
|
|
66
66
|
} ? {} extends z.infer<TBody> ? {
|
|
67
|
-
body?: z.infer<TBody>;
|
|
67
|
+
[K in keyof T as 'body']?: z.infer<TBody>;
|
|
68
68
|
} : {
|
|
69
|
-
body: z.infer<TBody>;
|
|
69
|
+
[K in keyof T as 'body']: z.infer<TBody>;
|
|
70
70
|
} : {
|
|
71
71
|
body?: unknown;
|
|
72
72
|
} : unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rouzer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@hattip/core": "^0.0.49",
|
|
29
29
|
"@remix-run/route-pattern": "^0.15.3",
|
|
30
|
-
"alien-middleware": "^0.11.
|
|
30
|
+
"alien-middleware": "^0.11.4"
|
|
31
31
|
},
|
|
32
32
|
"prettier": "@alloc/prettier-config",
|
|
33
33
|
"license": "MIT",
|