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> {
68
68
this . destinationPath ( "package.json" ) ,
69
69
)
70
70
71
- const rpcEndpointPath = `src/app/api/rpc/blitzrpcroute/route.${
71
+ const appRpcEndpointPath = `src/app/api/rpc/blitzrpcroute/route.${
72
72
this . options . useTs ? "ts" : "js"
73
73
} `
74
- if ( this . fs . exists ( rpcEndpointPath ) ) {
74
+ if ( this . fs . exists ( appRpcEndpointPath ) ) {
75
75
this . fs . move (
76
- this . destinationPath ( rpcEndpointPath ) ,
76
+ this . destinationPath ( appRpcEndpointPath ) ,
77
77
this . destinationPath (
78
78
`src/app/api/rpc/[[...blitz]]/route.${ this . options . useTs ? "ts" : "js" } ` ,
79
79
) ,
80
80
)
81
81
}
82
82
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
+
83
93
if ( this . options . template . path === "app" ) {
84
94
const pathsToMove = [
85
95
"src/app/auth/components/LoginForm.tsx" ,
Original file line number Diff line number Diff line change 27
27
"@blitzjs/rpc" : " latest" ,
28
28
"@prisma/client" : " 6.1.0" ,
29
29
"blitz" : " latest" ,
30
- "next" : " 14.2.15 " ,
30
+ "next" : " 15.0.1 " ,
31
31
"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" ,
34
34
"secure-password" : " 4.0.0" ,
35
35
"zod" : " 3.23.8"
36
36
},
Original file line number Diff line number Diff line change 27
27
"@blitzjs/rpc" : " latest" ,
28
28
"@prisma/client" : " 6.1.0" ,
29
29
"blitz" : " latest" ,
30
- "next" : " 14.2.15 " ,
30
+ "next" : " 15.0.1 " ,
31
31
"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" ,
34
34
"secure-password" : " 4.0.0" ,
35
35
"zod" : " 3.23.8"
36
36
},
You can’t perform that action at this time.
0 commit comments