omar-dulaimi / prisma-trpc-generator

Prisma 2+ generator to emit fully implemented tRPC routers
MIT License
676 stars 34 forks source link

Add option to provide middleware file #73

Closed leifniem closed 1 year ago

leifniem commented 1 year ago

Description

To prevent having to rewrite the middleware after a regeneration the withMiddleware option also accepts a path to a file with a default export.

If the merged option does not float your boat i can split this into two options with a middleware key overriding the withMiddleware option if set and only accepting a path to the respective file.

P.S.: Sorry for the autoformatting, it seems VS Code did not register the .prettierrc.

omar-dulaimi commented 1 year ago

Released in https://github.com/omar-dulaimi/prisma-trpc-generator/releases/tag/1.3.0

Thanks for the contribution

leifniem commented 1 year ago

Thanks for your work :)