8
8
// You should NOT make any changes in this file as it will be overwritten.
9
9
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10
10
11
- import { createServerRootRoute } from '@tanstack/react-start/server'
12
-
13
11
import { Route as rootRouteImport } from './routes/__root'
14
12
import { Route as LoginRouteImport } from './routes/login'
15
13
import { Route as AuthenticatedRouteImport } from './routes/_authenticated'
16
14
import { Route as AuthenticatedIndexRouteImport } from './routes/_authenticated/index'
15
+ import { Route as ApiAuthRouteImport } from './routes/api/auth'
16
+ import { Route as ApiTrpcSplatRouteImport } from './routes/api/trpc/$'
17
17
import { Route as AuthenticatedProjectProjectIdRouteImport } from './routes/_authenticated/project/$projectId'
18
- import { ServerRoute as ApiAuthServerRouteImport } from './routes/api/auth'
19
- import { ServerRoute as ApiTrpcSplatServerRouteImport } from './routes/api/trpc/$'
20
-
21
- const rootServerRouteImport = createServerRootRoute ( )
22
18
23
19
const LoginRoute = LoginRouteImport . update ( {
24
20
id : '/login' ,
@@ -34,81 +30,71 @@ const AuthenticatedIndexRoute = AuthenticatedIndexRouteImport.update({
34
30
path : '/' ,
35
31
getParentRoute : ( ) => AuthenticatedRoute ,
36
32
} as any )
37
- const AuthenticatedProjectProjectIdRoute =
38
- AuthenticatedProjectProjectIdRouteImport . update ( {
39
- id : '/project/$projectId' ,
40
- path : '/project/$projectId' ,
41
- getParentRoute : ( ) => AuthenticatedRoute ,
42
- } as any )
43
- const ApiAuthServerRoute = ApiAuthServerRouteImport . update ( {
33
+ const ApiAuthRoute = ApiAuthRouteImport . update ( {
44
34
id : '/api/auth' ,
45
35
path : '/api/auth' ,
46
- getParentRoute : ( ) => rootServerRouteImport ,
36
+ getParentRoute : ( ) => rootRouteImport ,
47
37
} as any )
48
- const ApiTrpcSplatServerRoute = ApiTrpcSplatServerRouteImport . update ( {
38
+ const ApiTrpcSplatRoute = ApiTrpcSplatRouteImport . update ( {
49
39
id : '/api/trpc/$' ,
50
40
path : '/api/trpc/$' ,
51
- getParentRoute : ( ) => rootServerRouteImport ,
41
+ getParentRoute : ( ) => rootRouteImport ,
52
42
} as any )
43
+ const AuthenticatedProjectProjectIdRoute =
44
+ AuthenticatedProjectProjectIdRouteImport . update ( {
45
+ id : '/project/$projectId' ,
46
+ path : '/project/$projectId' ,
47
+ getParentRoute : ( ) => AuthenticatedRoute ,
48
+ } as any )
53
49
54
50
export interface FileRoutesByFullPath {
55
51
'/login' : typeof LoginRoute
52
+ '/api/auth' : typeof ApiAuthRoute
56
53
'/' : typeof AuthenticatedIndexRoute
57
54
'/project/$projectId' : typeof AuthenticatedProjectProjectIdRoute
55
+ '/api/trpc/$' : typeof ApiTrpcSplatRoute
58
56
}
59
57
export interface FileRoutesByTo {
60
58
'/login' : typeof LoginRoute
59
+ '/api/auth' : typeof ApiAuthRoute
61
60
'/' : typeof AuthenticatedIndexRoute
62
61
'/project/$projectId' : typeof AuthenticatedProjectProjectIdRoute
62
+ '/api/trpc/$' : typeof ApiTrpcSplatRoute
63
63
}
64
64
export interface FileRoutesById {
65
65
__root__ : typeof rootRouteImport
66
66
'/_authenticated' : typeof AuthenticatedRouteWithChildren
67
67
'/login' : typeof LoginRoute
68
+ '/api/auth' : typeof ApiAuthRoute
68
69
'/_authenticated/' : typeof AuthenticatedIndexRoute
69
70
'/_authenticated/project/$projectId' : typeof AuthenticatedProjectProjectIdRoute
71
+ '/api/trpc/$' : typeof ApiTrpcSplatRoute
70
72
}
71
73
export interface FileRouteTypes {
72
74
fileRoutesByFullPath : FileRoutesByFullPath
73
- fullPaths : '/login' | '/' | '/project/$projectId'
75
+ fullPaths :
76
+ | '/login'
77
+ | '/api/auth'
78
+ | '/'
79
+ | '/project/$projectId'
80
+ | '/api/trpc/$'
74
81
fileRoutesByTo : FileRoutesByTo
75
- to : '/login' | '/' | '/project/$projectId'
82
+ to : '/login' | '/api/auth ' | '/' | '/ project/$projectId' | '/api/trpc/$ '
76
83
id :
77
84
| '__root__'
78
85
| '/_authenticated'
79
86
| '/login'
87
+ | '/api/auth'
80
88
| '/_authenticated/'
81
89
| '/_authenticated/project/$projectId'
90
+ | '/api/trpc/$'
82
91
fileRoutesById : FileRoutesById
83
92
}
84
93
export interface RootRouteChildren {
85
94
AuthenticatedRoute : typeof AuthenticatedRouteWithChildren
86
95
LoginRoute : typeof LoginRoute
87
- }
88
- export interface FileServerRoutesByFullPath {
89
- '/api/auth' : typeof ApiAuthServerRoute
90
- '/api/trpc/$' : typeof ApiTrpcSplatServerRoute
91
- }
92
- export interface FileServerRoutesByTo {
93
- '/api/auth' : typeof ApiAuthServerRoute
94
- '/api/trpc/$' : typeof ApiTrpcSplatServerRoute
95
- }
96
- export interface FileServerRoutesById {
97
- __root__ : typeof rootServerRouteImport
98
- '/api/auth' : typeof ApiAuthServerRoute
99
- '/api/trpc/$' : typeof ApiTrpcSplatServerRoute
100
- }
101
- export interface FileServerRouteTypes {
102
- fileServerRoutesByFullPath : FileServerRoutesByFullPath
103
- fullPaths : '/api/auth' | '/api/trpc/$'
104
- fileServerRoutesByTo : FileServerRoutesByTo
105
- to : '/api/auth' | '/api/trpc/$'
106
- id : '__root__' | '/api/auth' | '/api/trpc/$'
107
- fileServerRoutesById : FileServerRoutesById
108
- }
109
- export interface RootServerRouteChildren {
110
- ApiAuthServerRoute : typeof ApiAuthServerRoute
111
- ApiTrpcSplatServerRoute : typeof ApiTrpcSplatServerRoute
96
+ ApiAuthRoute : typeof ApiAuthRoute
97
+ ApiTrpcSplatRoute : typeof ApiTrpcSplatRoute
112
98
}
113
99
114
100
declare module '@tanstack/react-router' {
@@ -134,30 +120,26 @@ declare module '@tanstack/react-router' {
134
120
preLoaderRoute : typeof AuthenticatedIndexRouteImport
135
121
parentRoute : typeof AuthenticatedRoute
136
122
}
137
- '/_authenticated/project/$projectId' : {
138
- id : '/_authenticated/project/$projectId'
139
- path : '/project/$projectId'
140
- fullPath : '/project/$projectId'
141
- preLoaderRoute : typeof AuthenticatedProjectProjectIdRouteImport
142
- parentRoute : typeof AuthenticatedRoute
143
- }
144
- }
145
- }
146
- declare module '@tanstack/react-start/server' {
147
- interface ServerFileRoutesByPath {
148
123
'/api/auth' : {
149
124
id : '/api/auth'
150
125
path : '/api/auth'
151
126
fullPath : '/api/auth'
152
- preLoaderRoute : typeof ApiAuthServerRouteImport
153
- parentRoute : typeof rootServerRouteImport
127
+ preLoaderRoute : typeof ApiAuthRouteImport
128
+ parentRoute : typeof rootRouteImport
154
129
}
155
130
'/api/trpc/$' : {
156
131
id : '/api/trpc/$'
157
132
path : '/api/trpc/$'
158
133
fullPath : '/api/trpc/$'
159
- preLoaderRoute : typeof ApiTrpcSplatServerRouteImport
160
- parentRoute : typeof rootServerRouteImport
134
+ preLoaderRoute : typeof ApiTrpcSplatRouteImport
135
+ parentRoute : typeof rootRouteImport
136
+ }
137
+ '/_authenticated/project/$projectId' : {
138
+ id : '/_authenticated/project/$projectId'
139
+ path : '/project/$projectId'
140
+ fullPath : '/project/$projectId'
141
+ preLoaderRoute : typeof AuthenticatedProjectProjectIdRouteImport
142
+ parentRoute : typeof AuthenticatedRoute
161
143
}
162
144
}
163
145
}
@@ -179,14 +161,19 @@ const AuthenticatedRouteWithChildren = AuthenticatedRoute._addFileChildren(
179
161
const rootRouteChildren : RootRouteChildren = {
180
162
AuthenticatedRoute : AuthenticatedRouteWithChildren ,
181
163
LoginRoute : LoginRoute ,
164
+ ApiAuthRoute : ApiAuthRoute ,
165
+ ApiTrpcSplatRoute : ApiTrpcSplatRoute ,
182
166
}
183
167
export const routeTree = rootRouteImport
184
168
. _addFileChildren ( rootRouteChildren )
185
169
. _addFileTypes < FileRouteTypes > ( )
186
- const rootServerRouteChildren : RootServerRouteChildren = {
187
- ApiAuthServerRoute : ApiAuthServerRoute ,
188
- ApiTrpcSplatServerRoute : ApiTrpcSplatServerRoute ,
170
+
171
+ import type { getRouter } from './router.tsx'
172
+ import type { startInstance } from './start.tsx'
173
+ declare module '@tanstack/react-start' {
174
+ interface Register {
175
+ ssr : true
176
+ router : Awaited < ReturnType < typeof getRouter > >
177
+ config : Awaited < ReturnType < typeof startInstance . getOptions > >
178
+ }
189
179
}
190
- export const serverRouteTree = rootServerRouteImport
191
- . _addFileChildren ( rootServerRouteChildren )
192
- . _addFileTypes < FileServerRouteTypes > ( )
0 commit comments