File tree Expand file tree Collapse file tree 4 files changed +24
-9
lines changed
Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @blitzjs/generator " : patch
3+ ---
4+
5+ fix: Pages router blitz rpc api not generated in the correct format
Original file line number Diff line number Diff line change @@ -68,18 +68,28 @@ export class AppGenerator extends Generator<AppGeneratorOptions> {
6868 this . destinationPath ( "package.json" ) ,
6969 )
7070
71- const rpcEndpointPath = `src/app/api/rpc/blitzrpcroute/route.${
71+ const appRpcEndpointPath = `src/app/api/rpc/blitzrpcroute/route.${
7272 this . options . useTs ? "ts" : "js"
7373 } `
74- if ( this . fs . exists ( rpcEndpointPath ) ) {
74+ if ( this . fs . exists ( appRpcEndpointPath ) ) {
7575 this . fs . move (
76- this . destinationPath ( rpcEndpointPath ) ,
76+ this . destinationPath ( appRpcEndpointPath ) ,
7777 this . destinationPath (
7878 `src/app/api/rpc/[[...blitz]]/route.${ this . options . useTs ? "ts" : "js" } ` ,
7979 ) ,
8080 )
8181 }
8282
83+ const pagesRpcEndpointPath = `src/pages/api/rpc/blitzrpcroute.${
84+ this . options . useTs ? "ts" : "js"
85+ } `
86+ if ( this . fs . exists ( pagesRpcEndpointPath ) ) {
87+ this . fs . move (
88+ this . destinationPath ( pagesRpcEndpointPath ) ,
89+ this . destinationPath ( `src/pages/api/rpc/[[...blitz]].${ this . options . useTs ? "ts" : "js" } ` ) ,
90+ )
91+ }
92+
8393 if ( this . options . template . path === "app" ) {
8494 const pathsToMove = [
8595 "src/app/auth/components/LoginForm.tsx" ,
Original file line number Diff line number Diff line change 2727 "@blitzjs/rpc" : " latest" ,
2828 "@prisma/client" : " 6.1.0" ,
2929 "blitz" : " latest" ,
30- "next" : " 14.2.15 " ,
30+ "next" : " 15.0.1 " ,
3131 "prisma" : " 6.1.0" ,
32- "react" : " 18.2 .0" ,
33- "react-dom" : " 18.2 .0" ,
32+ "react" : " 19.0 .0" ,
33+ "react-dom" : " 19.0 .0" ,
3434 "secure-password" : " 4.0.0" ,
3535 "zod" : " 3.23.8"
3636 },
Original file line number Diff line number Diff line change 2727 "@blitzjs/rpc" : " latest" ,
2828 "@prisma/client" : " 6.1.0" ,
2929 "blitz" : " latest" ,
30- "next" : " 14.2.15 " ,
30+ "next" : " 15.0.1 " ,
3131 "prisma" : " 6.1.0" ,
32- "react" : " 18.2 .0" ,
33- "react-dom" : " 18.2 .0" ,
32+ "react" : " 19.0 .0" ,
33+ "react-dom" : " 19.0 .0" ,
3434 "secure-password" : " 4.0.0" ,
3535 "zod" : " 3.23.8"
3636 },
You can’t perform that action at this time.
0 commit comments