feat(core): global forms support (#35106)

This commit is contained in:
Aiden Cline 2026-07-03 03:55:15 -05:00 committed by GitHub
commit c167bde6a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 209 additions and 30 deletions

View file

@ -19,11 +19,16 @@ type ClientApiShape = Api<
Context.Service.Shape<typeof LocationMiddleware>,
Context.Service.Identifier<typeof SessionLocationMiddleware>,
Context.Service.Shape<typeof SessionLocationMiddleware>,
Context.Service.Identifier<typeof SessionLocationMiddleware>,
Context.Service.Shape<typeof SessionLocationMiddleware>,
typeof EventGroup
>
export const ClientApi: ClientApiShape = makeDefaultApi({
locationMiddleware: LocationMiddleware,
// The real server uses a form-specific middleware with an undocumented `global` sentinel branch.
// The generated client only needs a middleware identity for API typing.
formLocationMiddleware: SessionLocationMiddleware,
sessionLocationMiddleware: SessionLocationMiddleware,
})