You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* nix
* chore: Refactor middleware and routing utilities for improved clarity and consistency
* refactor: Update middleware and routing types for improved type safety and clarity
* refactor: Simplify makeMiddleware function and enhance context handling in tests
* refactor: Update middleware implementation and adjust type parameters for improved clarity
* refactor: Enhance contextMaker documentation and rename DefaultContextMaker to EmptyContextMaker for clarity
* take messy types out of impl
* refactor: Improve comments for clarity in DynamicMiddleware
* refactor: Update type parameter naming in makeRpcEffect for clarity
* refactor: Rename type parameter 'R' to 'MiddlewareR' for clarity in RPCHandlerFactory and Middleware
* refactor: Improve comments for clarity in routing and dynamic middleware
* refactor: Handle potential undefined layers in makeRouter by using nullish coalescing
* refactor: Use nullish coalescing for layers and middleware dependencies in makeRouter
* hmmmm
* refactor: Update middleware creation to use makeMiddlewareContextual for improved type safety
* nvm
* one as any less
* add changeset
* example
* refactor: Clarify comments in Middleware interface for better understanding
* rpx example
* THIS
* Revert "THIS"
This reverts commit e19e123.
* improve names
* improve names
* crazy
* improve descriptions
* cleanup
* improve naming
* fix
* fixes
* refactor: only provide middleware dependencies to actual middleware (#274)
* workaround broken makeMiddleware
* fix: layer elimination bs
* improve: Middleware Dependencies should not be provided to anything else.
* cleanup deps
* fool around
* fix make layer once!
* fix makeMiddlewareContextual
* cleanup
* replace makeMiddleware
* add changeset
---------
Co-authored-by: Patrick Roza <contact@patrickroza.com>
// inverted: contextActivation is false => remove if explicitly set to true (like allowAnonymous: true disables auth and auth service and related errors)
48
48
&{
49
49
[
50
-
keyinkeyofCTXMapasCTXMap[key]["contextActivation"]extendstrue ? never
51
-
: keyextendskeyofT ? T[key]extendstrue ? never : CTXMap[key]["key"]
52
-
: CTXMap[key]["key"]
50
+
keyinkeyofRequestContextMapasRequestContextMap[key]["contextActivation"]extendstrue ? never
51
+
: keyextendskeyofT ? T[key]extendstrue ? never : RequestContextMap[key]["key"]
52
+
: RequestContextMap[key]["key"]
53
53
]: // TODO: or as an Optional available?
54
-
CTXMap[key]["service"]
54
+
RequestContextMap[key]["service"]
55
55
}
56
56
// normal: contextActivation is true => add if explicitly set to true
57
57
&{
58
58
[
59
-
keyinkeyofCTXMapasCTXMap[key]["contextActivation"]extendsfalse ? never
60
-
: keyextendskeyofT ? T[key]extendstrue ? CTXMap[key]["key"] : never
59
+
keyinkeyofRequestContextMapasRequestContextMap[key]["contextActivation"]extendsfalse ? never
60
+
: keyextendskeyofT ? T[key]extendstrue ? RequestContextMap[key]["key"] : never
// inverted: contextActivation is false => remove if explicitly set to true (like allowAnonymous: true disables auth and auth service and related errors)
69
69
&{
70
70
[
71
-
keyinkeyofCTXMapasCTXMap[key]["contextActivation"]extendstrue ? never
72
-
: keyextendskeyofT ? T[key]extendstrue ? never : CTXMap[key]["key"]
73
-
: CTXMap[key]["key"]
71
+
keyinkeyofRequestContextMapasRequestContextMap[key]["contextActivation"]extendstrue ? never
72
+
: keyextendskeyofT ? T[key]extendstrue ? never : RequestContextMap[key]["key"]
73
+
: RequestContextMap[key]["key"]
74
74
]: // TODO: or as an Optional available?
75
-
CTXMap[key]["error"]
75
+
RequestContextMap[key]["error"]
76
76
}
77
77
// normal: contextActivation is true => add if explicitly set to true
78
78
&{
79
79
[
80
-
keyinkeyofCTXMapasCTXMap[key]["contextActivation"]extendsfalse ? never
81
-
: keyextendskeyofT ? T[key]extendstrue ? CTXMap[key]["key"] : never
80
+
keyinkeyofRequestContextMapasRequestContextMap[key]["contextActivation"]extendsfalse ? never
81
+
: keyextendskeyofT ? T[key]extendstrue ? RequestContextMap[key]["key"] : never
0 commit comments