File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ #### [ v1.1.0] ( https://github.com/BemiHQ/bemi-prisma/compare/v1.0.0...v1.1.0 ) - 2025-05-27
4+
5+ - Add ` bemiTRPCMiddleware ` for setting up Bemi context in tRPC apps
6+
37#### [ v1.0.0] ( https://github.com/BemiHQ/bemi-prisma/compare/v0.9.0...v1.0.0 ) - 2025-05-26
48
59- ** Breaking change** : Use ` new PrismaPg() ` & ` withBemiExtension() ` explicitly instead of ` withPgAdapter() `
Original file line number Diff line number Diff line change 11{
22 "name" : " @bemi-db/prisma" ,
3- "version" : " 1.0 .0" ,
3+ "version" : " 1.1 .0" ,
44 "description" : " Automatic data change tracking for Prisma" ,
55 "main" : " dist/index.js" ,
66 "module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -101,3 +101,13 @@ export const BemiApolloServerPlugin = (callback: (requestContext: any) => any) =
101101 } ,
102102 }
103103}
104+
105+ // T3 Stack
106+ export const bemiTRPCMiddleware = ( t : any , callback : ( opts : any ) => any ) => {
107+ return t . middleware ( ( opts : any ) => {
108+ const context = callback ( opts ) ;
109+ return ASYNC_LOCAL_STORAGE . run ( context , ( ) => {
110+ return opts . next ( ) ;
111+ } ) ;
112+ } )
113+ }
You can’t perform that action at this time.
0 commit comments