Closed imsanchez closed 1 year ago
Hey @imsanchez
Thanks for the PR, I'll take a look very soon
Ready for your approval @omar-dulaimi
Released in https://github.com/omar-dulaimi/prisma-trpc-generator/releases/tag/1.4.0
Thank you @imsanchez Keep them coming!
This is https://github.com/omar-dulaimi/prisma-trpc-generator/pull/65 but addressing @omar-dulaimi's comments of consistency with
string | boolean
pattern.cc: @lottamus
Description
When
withShield
istrue
,We generate a boilerplate configuration using allow for all procedures and we overwrite this file on each generation.
It looks something like this:
This pull request updates the option
withShield
to allow a string path to your own tRPC Shield to use as the permission layer.Similarly to
withMiddleware
, this will extendwithShield
to allow either a boolean or a string path.When
withShield
is astring
path:The
routers/helpers/createRouter.ts
will use the path instead: