create-croissant 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/apps/web/src/components/app-sidebar.tsx +5 -5
- package/template/apps/web/src/routeTree.gen.ts +162 -162
- package/template/apps/web/src/routes/{account.tsx → (auth)/account.tsx} +1 -1
- package/template/apps/web/src/routes/{dashboard.tsx → (auth)/dashboard.tsx} +1 -1
- package/template/apps/web/src/routes/{index.tsx → (public)/index.tsx} +1 -1
- package/template/apps/web/src/routes/{login.tsx → (public)/login.tsx} +1 -1
- package/template/apps/web/src/routes/{signup.tsx → (public)/signup.tsx} +1 -1
- package/template/apps/web/src/routes/{client-orpc-auth.tsx → examples/client-orpc-auth.tsx} +2 -2
- package/template/apps/web/src/routes/{client-orpc.tsx → examples/client-orpc.tsx} +1 -1
- package/template/apps/web/src/routes/{isr.tsx → examples/isr.tsx} +1 -1
- package/template/apps/web/src/routes/{ssr-orpc-auth.tsx → examples/ssr-orpc-auth.tsx} +2 -2
- package/template/apps/web/src/routes/{ssr-orpc.tsx → examples/ssr-orpc.tsx} +1 -1
- package/template/apps/web/vite.config.ts +1 -1
package/package.json
CHANGED
|
@@ -26,23 +26,23 @@ const data = {
|
|
|
26
26
|
items: [
|
|
27
27
|
{
|
|
28
28
|
title: "SSR + oRPC",
|
|
29
|
-
url: "/ssr-orpc",
|
|
29
|
+
url: "/examples/ssr-orpc",
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
title: "SSR + oRPC (Auth)",
|
|
33
|
-
url: "/ssr-orpc-auth",
|
|
33
|
+
url: "/examples/ssr-orpc-auth",
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
title: "Client + oRPC",
|
|
37
|
-
url: "/client-orpc",
|
|
37
|
+
url: "/examples/client-orpc",
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
title: "Client + oRPC (Auth)",
|
|
41
|
-
url: "/client-orpc-auth",
|
|
41
|
+
url: "/examples/client-orpc-auth",
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
title: "ISR",
|
|
45
|
-
url: "/isr",
|
|
45
|
+
url: "/examples/isr",
|
|
46
46
|
},
|
|
47
47
|
],
|
|
48
48
|
},
|
|
@@ -9,67 +9,67 @@
|
|
|
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
11
|
import { Route as rootRouteImport } from './routes/__root'
|
|
12
|
-
import { Route as
|
|
13
|
-
import { Route as
|
|
14
|
-
import { Route as
|
|
15
|
-
import { Route as
|
|
16
|
-
import { Route as
|
|
17
|
-
import { Route as
|
|
18
|
-
import { Route as
|
|
19
|
-
import { Route as
|
|
20
|
-
import { Route as
|
|
21
|
-
import { Route as
|
|
12
|
+
import { Route as publicIndexRouteImport } from './routes/(public)/index'
|
|
13
|
+
import { Route as ExamplesSsrOrpcAuthRouteImport } from './routes/examples/ssr-orpc-auth'
|
|
14
|
+
import { Route as ExamplesSsrOrpcRouteImport } from './routes/examples/ssr-orpc'
|
|
15
|
+
import { Route as ExamplesIsrRouteImport } from './routes/examples/isr'
|
|
16
|
+
import { Route as ExamplesClientOrpcAuthRouteImport } from './routes/examples/client-orpc-auth'
|
|
17
|
+
import { Route as ExamplesClientOrpcRouteImport } from './routes/examples/client-orpc'
|
|
18
|
+
import { Route as publicSignupRouteImport } from './routes/(public)/signup'
|
|
19
|
+
import { Route as publicLoginRouteImport } from './routes/(public)/login'
|
|
20
|
+
import { Route as authDashboardRouteImport } from './routes/(auth)/dashboard'
|
|
21
|
+
import { Route as authAccountRouteImport } from './routes/(auth)/account'
|
|
22
22
|
import { Route as ApiRpcSplatRouteImport } from './routes/api/rpc.$'
|
|
23
23
|
import { Route as ApiAuthSplatRouteImport } from './routes/api/auth/$'
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
id: '/
|
|
27
|
-
path: '/
|
|
25
|
+
const publicIndexRoute = publicIndexRouteImport.update({
|
|
26
|
+
id: '/(public)/',
|
|
27
|
+
path: '/',
|
|
28
28
|
getParentRoute: () => rootRouteImport,
|
|
29
29
|
} as any)
|
|
30
|
-
const
|
|
31
|
-
id: '/ssr-orpc',
|
|
32
|
-
path: '/ssr-orpc',
|
|
30
|
+
const ExamplesSsrOrpcAuthRoute = ExamplesSsrOrpcAuthRouteImport.update({
|
|
31
|
+
id: '/examples/ssr-orpc-auth',
|
|
32
|
+
path: '/examples/ssr-orpc-auth',
|
|
33
33
|
getParentRoute: () => rootRouteImport,
|
|
34
34
|
} as any)
|
|
35
|
-
const
|
|
36
|
-
id: '/
|
|
37
|
-
path: '/
|
|
35
|
+
const ExamplesSsrOrpcRoute = ExamplesSsrOrpcRouteImport.update({
|
|
36
|
+
id: '/examples/ssr-orpc',
|
|
37
|
+
path: '/examples/ssr-orpc',
|
|
38
38
|
getParentRoute: () => rootRouteImport,
|
|
39
39
|
} as any)
|
|
40
|
-
const
|
|
41
|
-
id: '/
|
|
42
|
-
path: '/
|
|
40
|
+
const ExamplesIsrRoute = ExamplesIsrRouteImport.update({
|
|
41
|
+
id: '/examples/isr',
|
|
42
|
+
path: '/examples/isr',
|
|
43
43
|
getParentRoute: () => rootRouteImport,
|
|
44
44
|
} as any)
|
|
45
|
-
const
|
|
46
|
-
id: '/
|
|
47
|
-
path: '/
|
|
45
|
+
const ExamplesClientOrpcAuthRoute = ExamplesClientOrpcAuthRouteImport.update({
|
|
46
|
+
id: '/examples/client-orpc-auth',
|
|
47
|
+
path: '/examples/client-orpc-auth',
|
|
48
48
|
getParentRoute: () => rootRouteImport,
|
|
49
49
|
} as any)
|
|
50
|
-
const
|
|
51
|
-
id: '/
|
|
52
|
-
path: '/
|
|
50
|
+
const ExamplesClientOrpcRoute = ExamplesClientOrpcRouteImport.update({
|
|
51
|
+
id: '/examples/client-orpc',
|
|
52
|
+
path: '/examples/client-orpc',
|
|
53
53
|
getParentRoute: () => rootRouteImport,
|
|
54
54
|
} as any)
|
|
55
|
-
const
|
|
56
|
-
id: '/
|
|
57
|
-
path: '/
|
|
55
|
+
const publicSignupRoute = publicSignupRouteImport.update({
|
|
56
|
+
id: '/(public)/signup',
|
|
57
|
+
path: '/signup',
|
|
58
58
|
getParentRoute: () => rootRouteImport,
|
|
59
59
|
} as any)
|
|
60
|
-
const
|
|
61
|
-
id: '/
|
|
62
|
-
path: '/
|
|
60
|
+
const publicLoginRoute = publicLoginRouteImport.update({
|
|
61
|
+
id: '/(public)/login',
|
|
62
|
+
path: '/login',
|
|
63
63
|
getParentRoute: () => rootRouteImport,
|
|
64
64
|
} as any)
|
|
65
|
-
const
|
|
66
|
-
id: '/
|
|
67
|
-
path: '/
|
|
65
|
+
const authDashboardRoute = authDashboardRouteImport.update({
|
|
66
|
+
id: '/(auth)/dashboard',
|
|
67
|
+
path: '/dashboard',
|
|
68
68
|
getParentRoute: () => rootRouteImport,
|
|
69
69
|
} as any)
|
|
70
|
-
const
|
|
71
|
-
id: '/',
|
|
72
|
-
path: '/',
|
|
70
|
+
const authAccountRoute = authAccountRouteImport.update({
|
|
71
|
+
id: '/(auth)/account',
|
|
72
|
+
path: '/account',
|
|
73
73
|
getParentRoute: () => rootRouteImport,
|
|
74
74
|
} as any)
|
|
75
75
|
const ApiRpcSplatRoute = ApiRpcSplatRouteImport.update({
|
|
@@ -84,178 +84,178 @@ const ApiAuthSplatRoute = ApiAuthSplatRouteImport.update({
|
|
|
84
84
|
} as any)
|
|
85
85
|
|
|
86
86
|
export interface FileRoutesByFullPath {
|
|
87
|
-
'/': typeof
|
|
88
|
-
'/
|
|
89
|
-
'/
|
|
90
|
-
'/
|
|
91
|
-
'/
|
|
92
|
-
'/
|
|
93
|
-
'/
|
|
94
|
-
'/
|
|
95
|
-
'/ssr-orpc': typeof
|
|
96
|
-
'/
|
|
87
|
+
'/account': typeof authAccountRoute
|
|
88
|
+
'/dashboard': typeof authDashboardRoute
|
|
89
|
+
'/login': typeof publicLoginRoute
|
|
90
|
+
'/signup': typeof publicSignupRoute
|
|
91
|
+
'/examples/client-orpc': typeof ExamplesClientOrpcRoute
|
|
92
|
+
'/examples/client-orpc-auth': typeof ExamplesClientOrpcAuthRoute
|
|
93
|
+
'/examples/isr': typeof ExamplesIsrRoute
|
|
94
|
+
'/examples/ssr-orpc': typeof ExamplesSsrOrpcRoute
|
|
95
|
+
'/examples/ssr-orpc-auth': typeof ExamplesSsrOrpcAuthRoute
|
|
96
|
+
'/': typeof publicIndexRoute
|
|
97
97
|
'/api/auth/$': typeof ApiAuthSplatRoute
|
|
98
98
|
'/api/rpc/$': typeof ApiRpcSplatRoute
|
|
99
99
|
}
|
|
100
100
|
export interface FileRoutesByTo {
|
|
101
|
-
'/': typeof
|
|
102
|
-
'/
|
|
103
|
-
'/
|
|
104
|
-
'/
|
|
105
|
-
'/
|
|
106
|
-
'/
|
|
107
|
-
'/
|
|
108
|
-
'/
|
|
109
|
-
'/ssr-orpc': typeof
|
|
110
|
-
'/
|
|
101
|
+
'/account': typeof authAccountRoute
|
|
102
|
+
'/dashboard': typeof authDashboardRoute
|
|
103
|
+
'/login': typeof publicLoginRoute
|
|
104
|
+
'/signup': typeof publicSignupRoute
|
|
105
|
+
'/examples/client-orpc': typeof ExamplesClientOrpcRoute
|
|
106
|
+
'/examples/client-orpc-auth': typeof ExamplesClientOrpcAuthRoute
|
|
107
|
+
'/examples/isr': typeof ExamplesIsrRoute
|
|
108
|
+
'/examples/ssr-orpc': typeof ExamplesSsrOrpcRoute
|
|
109
|
+
'/examples/ssr-orpc-auth': typeof ExamplesSsrOrpcAuthRoute
|
|
110
|
+
'/': typeof publicIndexRoute
|
|
111
111
|
'/api/auth/$': typeof ApiAuthSplatRoute
|
|
112
112
|
'/api/rpc/$': typeof ApiRpcSplatRoute
|
|
113
113
|
}
|
|
114
114
|
export interface FileRoutesById {
|
|
115
115
|
__root__: typeof rootRouteImport
|
|
116
|
-
'/': typeof
|
|
117
|
-
'/
|
|
118
|
-
'/
|
|
119
|
-
'/
|
|
120
|
-
'/
|
|
121
|
-
'/
|
|
122
|
-
'/
|
|
123
|
-
'/
|
|
124
|
-
'/ssr-orpc': typeof
|
|
125
|
-
'/
|
|
116
|
+
'/(auth)/account': typeof authAccountRoute
|
|
117
|
+
'/(auth)/dashboard': typeof authDashboardRoute
|
|
118
|
+
'/(public)/login': typeof publicLoginRoute
|
|
119
|
+
'/(public)/signup': typeof publicSignupRoute
|
|
120
|
+
'/examples/client-orpc': typeof ExamplesClientOrpcRoute
|
|
121
|
+
'/examples/client-orpc-auth': typeof ExamplesClientOrpcAuthRoute
|
|
122
|
+
'/examples/isr': typeof ExamplesIsrRoute
|
|
123
|
+
'/examples/ssr-orpc': typeof ExamplesSsrOrpcRoute
|
|
124
|
+
'/examples/ssr-orpc-auth': typeof ExamplesSsrOrpcAuthRoute
|
|
125
|
+
'/(public)/': typeof publicIndexRoute
|
|
126
126
|
'/api/auth/$': typeof ApiAuthSplatRoute
|
|
127
127
|
'/api/rpc/$': typeof ApiRpcSplatRoute
|
|
128
128
|
}
|
|
129
129
|
export interface FileRouteTypes {
|
|
130
130
|
fileRoutesByFullPath: FileRoutesByFullPath
|
|
131
131
|
fullPaths:
|
|
132
|
-
| '/'
|
|
133
132
|
| '/account'
|
|
134
|
-
| '/client-orpc'
|
|
135
|
-
| '/client-orpc-auth'
|
|
136
133
|
| '/dashboard'
|
|
137
|
-
| '/isr'
|
|
138
134
|
| '/login'
|
|
139
135
|
| '/signup'
|
|
140
|
-
| '/
|
|
141
|
-
| '/
|
|
136
|
+
| '/examples/client-orpc'
|
|
137
|
+
| '/examples/client-orpc-auth'
|
|
138
|
+
| '/examples/isr'
|
|
139
|
+
| '/examples/ssr-orpc'
|
|
140
|
+
| '/examples/ssr-orpc-auth'
|
|
141
|
+
| '/'
|
|
142
142
|
| '/api/auth/$'
|
|
143
143
|
| '/api/rpc/$'
|
|
144
144
|
fileRoutesByTo: FileRoutesByTo
|
|
145
145
|
to:
|
|
146
|
-
| '/'
|
|
147
146
|
| '/account'
|
|
148
|
-
| '/client-orpc'
|
|
149
|
-
| '/client-orpc-auth'
|
|
150
147
|
| '/dashboard'
|
|
151
|
-
| '/isr'
|
|
152
148
|
| '/login'
|
|
153
149
|
| '/signup'
|
|
154
|
-
| '/
|
|
155
|
-
| '/
|
|
150
|
+
| '/examples/client-orpc'
|
|
151
|
+
| '/examples/client-orpc-auth'
|
|
152
|
+
| '/examples/isr'
|
|
153
|
+
| '/examples/ssr-orpc'
|
|
154
|
+
| '/examples/ssr-orpc-auth'
|
|
155
|
+
| '/'
|
|
156
156
|
| '/api/auth/$'
|
|
157
157
|
| '/api/rpc/$'
|
|
158
158
|
id:
|
|
159
159
|
| '__root__'
|
|
160
|
-
| '/'
|
|
161
|
-
| '/
|
|
162
|
-
| '/
|
|
163
|
-
| '/
|
|
164
|
-
| '/
|
|
165
|
-
| '/
|
|
166
|
-
| '/
|
|
167
|
-
| '/
|
|
168
|
-
| '/ssr-orpc'
|
|
169
|
-
| '/
|
|
160
|
+
| '/(auth)/account'
|
|
161
|
+
| '/(auth)/dashboard'
|
|
162
|
+
| '/(public)/login'
|
|
163
|
+
| '/(public)/signup'
|
|
164
|
+
| '/examples/client-orpc'
|
|
165
|
+
| '/examples/client-orpc-auth'
|
|
166
|
+
| '/examples/isr'
|
|
167
|
+
| '/examples/ssr-orpc'
|
|
168
|
+
| '/examples/ssr-orpc-auth'
|
|
169
|
+
| '/(public)/'
|
|
170
170
|
| '/api/auth/$'
|
|
171
171
|
| '/api/rpc/$'
|
|
172
172
|
fileRoutesById: FileRoutesById
|
|
173
173
|
}
|
|
174
174
|
export interface RootRouteChildren {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
175
|
+
authAccountRoute: typeof authAccountRoute
|
|
176
|
+
authDashboardRoute: typeof authDashboardRoute
|
|
177
|
+
publicLoginRoute: typeof publicLoginRoute
|
|
178
|
+
publicSignupRoute: typeof publicSignupRoute
|
|
179
|
+
ExamplesClientOrpcRoute: typeof ExamplesClientOrpcRoute
|
|
180
|
+
ExamplesClientOrpcAuthRoute: typeof ExamplesClientOrpcAuthRoute
|
|
181
|
+
ExamplesIsrRoute: typeof ExamplesIsrRoute
|
|
182
|
+
ExamplesSsrOrpcRoute: typeof ExamplesSsrOrpcRoute
|
|
183
|
+
ExamplesSsrOrpcAuthRoute: typeof ExamplesSsrOrpcAuthRoute
|
|
184
|
+
publicIndexRoute: typeof publicIndexRoute
|
|
185
185
|
ApiAuthSplatRoute: typeof ApiAuthSplatRoute
|
|
186
186
|
ApiRpcSplatRoute: typeof ApiRpcSplatRoute
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
declare module '@tanstack/react-router' {
|
|
190
190
|
interface FileRoutesByPath {
|
|
191
|
-
'/
|
|
192
|
-
id: '/
|
|
193
|
-
path: '/
|
|
194
|
-
fullPath: '/
|
|
195
|
-
preLoaderRoute: typeof
|
|
191
|
+
'/(public)/': {
|
|
192
|
+
id: '/(public)/'
|
|
193
|
+
path: '/'
|
|
194
|
+
fullPath: '/'
|
|
195
|
+
preLoaderRoute: typeof publicIndexRouteImport
|
|
196
196
|
parentRoute: typeof rootRouteImport
|
|
197
197
|
}
|
|
198
|
-
'/ssr-orpc': {
|
|
199
|
-
id: '/ssr-orpc'
|
|
200
|
-
path: '/ssr-orpc'
|
|
201
|
-
fullPath: '/ssr-orpc'
|
|
202
|
-
preLoaderRoute: typeof
|
|
198
|
+
'/examples/ssr-orpc-auth': {
|
|
199
|
+
id: '/examples/ssr-orpc-auth'
|
|
200
|
+
path: '/examples/ssr-orpc-auth'
|
|
201
|
+
fullPath: '/examples/ssr-orpc-auth'
|
|
202
|
+
preLoaderRoute: typeof ExamplesSsrOrpcAuthRouteImport
|
|
203
203
|
parentRoute: typeof rootRouteImport
|
|
204
204
|
}
|
|
205
|
-
'/
|
|
206
|
-
id: '/
|
|
207
|
-
path: '/
|
|
208
|
-
fullPath: '/
|
|
209
|
-
preLoaderRoute: typeof
|
|
205
|
+
'/examples/ssr-orpc': {
|
|
206
|
+
id: '/examples/ssr-orpc'
|
|
207
|
+
path: '/examples/ssr-orpc'
|
|
208
|
+
fullPath: '/examples/ssr-orpc'
|
|
209
|
+
preLoaderRoute: typeof ExamplesSsrOrpcRouteImport
|
|
210
210
|
parentRoute: typeof rootRouteImport
|
|
211
211
|
}
|
|
212
|
-
'/
|
|
213
|
-
id: '/
|
|
214
|
-
path: '/
|
|
215
|
-
fullPath: '/
|
|
216
|
-
preLoaderRoute: typeof
|
|
212
|
+
'/examples/isr': {
|
|
213
|
+
id: '/examples/isr'
|
|
214
|
+
path: '/examples/isr'
|
|
215
|
+
fullPath: '/examples/isr'
|
|
216
|
+
preLoaderRoute: typeof ExamplesIsrRouteImport
|
|
217
217
|
parentRoute: typeof rootRouteImport
|
|
218
218
|
}
|
|
219
|
-
'/
|
|
220
|
-
id: '/
|
|
221
|
-
path: '/
|
|
222
|
-
fullPath: '/
|
|
223
|
-
preLoaderRoute: typeof
|
|
219
|
+
'/examples/client-orpc-auth': {
|
|
220
|
+
id: '/examples/client-orpc-auth'
|
|
221
|
+
path: '/examples/client-orpc-auth'
|
|
222
|
+
fullPath: '/examples/client-orpc-auth'
|
|
223
|
+
preLoaderRoute: typeof ExamplesClientOrpcAuthRouteImport
|
|
224
224
|
parentRoute: typeof rootRouteImport
|
|
225
225
|
}
|
|
226
|
-
'/
|
|
227
|
-
id: '/
|
|
228
|
-
path: '/
|
|
229
|
-
fullPath: '/
|
|
230
|
-
preLoaderRoute: typeof
|
|
226
|
+
'/examples/client-orpc': {
|
|
227
|
+
id: '/examples/client-orpc'
|
|
228
|
+
path: '/examples/client-orpc'
|
|
229
|
+
fullPath: '/examples/client-orpc'
|
|
230
|
+
preLoaderRoute: typeof ExamplesClientOrpcRouteImport
|
|
231
231
|
parentRoute: typeof rootRouteImport
|
|
232
232
|
}
|
|
233
|
-
'/
|
|
234
|
-
id: '/
|
|
235
|
-
path: '/
|
|
236
|
-
fullPath: '/
|
|
237
|
-
preLoaderRoute: typeof
|
|
233
|
+
'/(public)/signup': {
|
|
234
|
+
id: '/(public)/signup'
|
|
235
|
+
path: '/signup'
|
|
236
|
+
fullPath: '/signup'
|
|
237
|
+
preLoaderRoute: typeof publicSignupRouteImport
|
|
238
238
|
parentRoute: typeof rootRouteImport
|
|
239
239
|
}
|
|
240
|
-
'/
|
|
241
|
-
id: '/
|
|
242
|
-
path: '/
|
|
243
|
-
fullPath: '/
|
|
244
|
-
preLoaderRoute: typeof
|
|
240
|
+
'/(public)/login': {
|
|
241
|
+
id: '/(public)/login'
|
|
242
|
+
path: '/login'
|
|
243
|
+
fullPath: '/login'
|
|
244
|
+
preLoaderRoute: typeof publicLoginRouteImport
|
|
245
245
|
parentRoute: typeof rootRouteImport
|
|
246
246
|
}
|
|
247
|
-
'/
|
|
248
|
-
id: '/
|
|
249
|
-
path: '/
|
|
250
|
-
fullPath: '/
|
|
251
|
-
preLoaderRoute: typeof
|
|
247
|
+
'/(auth)/dashboard': {
|
|
248
|
+
id: '/(auth)/dashboard'
|
|
249
|
+
path: '/dashboard'
|
|
250
|
+
fullPath: '/dashboard'
|
|
251
|
+
preLoaderRoute: typeof authDashboardRouteImport
|
|
252
252
|
parentRoute: typeof rootRouteImport
|
|
253
253
|
}
|
|
254
|
-
'/': {
|
|
255
|
-
id: '/'
|
|
256
|
-
path: '/'
|
|
257
|
-
fullPath: '/'
|
|
258
|
-
preLoaderRoute: typeof
|
|
254
|
+
'/(auth)/account': {
|
|
255
|
+
id: '/(auth)/account'
|
|
256
|
+
path: '/account'
|
|
257
|
+
fullPath: '/account'
|
|
258
|
+
preLoaderRoute: typeof authAccountRouteImport
|
|
259
259
|
parentRoute: typeof rootRouteImport
|
|
260
260
|
}
|
|
261
261
|
'/api/rpc/$': {
|
|
@@ -276,16 +276,16 @@ declare module '@tanstack/react-router' {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
const rootRouteChildren: RootRouteChildren = {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
279
|
+
authAccountRoute: authAccountRoute,
|
|
280
|
+
authDashboardRoute: authDashboardRoute,
|
|
281
|
+
publicLoginRoute: publicLoginRoute,
|
|
282
|
+
publicSignupRoute: publicSignupRoute,
|
|
283
|
+
ExamplesClientOrpcRoute: ExamplesClientOrpcRoute,
|
|
284
|
+
ExamplesClientOrpcAuthRoute: ExamplesClientOrpcAuthRoute,
|
|
285
|
+
ExamplesIsrRoute: ExamplesIsrRoute,
|
|
286
|
+
ExamplesSsrOrpcRoute: ExamplesSsrOrpcRoute,
|
|
287
|
+
ExamplesSsrOrpcAuthRoute: ExamplesSsrOrpcAuthRoute,
|
|
288
|
+
publicIndexRoute: publicIndexRoute,
|
|
289
289
|
ApiAuthSplatRoute: ApiAuthSplatRoute,
|
|
290
290
|
ApiRpcSplatRoute: ApiRpcSplatRoute,
|
|
291
291
|
}
|
|
@@ -28,7 +28,7 @@ const passwordSchema = z.object({
|
|
|
28
28
|
path: ["confirmPassword"],
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
-
export const Route = createFileRoute("/account")({
|
|
31
|
+
export const Route = createFileRoute("/(auth)/account")({
|
|
32
32
|
beforeLoad: async () => {
|
|
33
33
|
const session = await getSessionFn()
|
|
34
34
|
if (!session) {
|
|
@@ -3,7 +3,7 @@ import { getSessionFn } from "@/lib/auth-utils"
|
|
|
3
3
|
import { authClient } from "@/lib/auth-client"
|
|
4
4
|
import { orpc } from "@/lib/orpc"
|
|
5
5
|
|
|
6
|
-
export const Route = createFileRoute("/dashboard")({
|
|
6
|
+
export const Route = createFileRoute("/(auth)/dashboard")({
|
|
7
7
|
beforeLoad: async () => {
|
|
8
8
|
const session = await getSessionFn()
|
|
9
9
|
if (!session) {
|
|
@@ -7,7 +7,7 @@ import { orpc } from "@/lib/orpc"
|
|
|
7
7
|
type Outputs = InferRouterOutputs<typeof router>
|
|
8
8
|
type Planet = Outputs["planets"]["getPlanets"][number]
|
|
9
9
|
|
|
10
|
-
export const Route = createFileRoute("/")({
|
|
10
|
+
export const Route = createFileRoute("/(public)/")({
|
|
11
11
|
loader: async () => {
|
|
12
12
|
const [helloRes, planets] = await Promise.all([
|
|
13
13
|
orpc.hello({ name: "TanStack Start" }),
|
|
@@ -3,14 +3,14 @@ import { useQuery } from "@tanstack/react-query"
|
|
|
3
3
|
import { getSessionFn } from "@/lib/auth-utils"
|
|
4
4
|
import { orpc } from "@/lib/orpc"
|
|
5
5
|
|
|
6
|
-
export const Route = createFileRoute("/client-orpc-auth")({
|
|
6
|
+
export const Route = createFileRoute("/examples/client-orpc-auth")({
|
|
7
7
|
beforeLoad: async () => {
|
|
8
8
|
const session = await getSessionFn()
|
|
9
9
|
if (!session) {
|
|
10
10
|
throw redirect({
|
|
11
11
|
to: "/login",
|
|
12
12
|
search: {
|
|
13
|
-
redirect: "/client-orpc-auth",
|
|
13
|
+
redirect: "/examples/client-orpc-auth",
|
|
14
14
|
},
|
|
15
15
|
})
|
|
16
16
|
}
|
|
@@ -29,7 +29,7 @@ const planetSchema = z.object({
|
|
|
29
29
|
diameter: z.string().refine((val) => !isNaN(parseFloat(val)), "Must be a number"),
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
export const Route = createFileRoute("/client-orpc")({
|
|
32
|
+
export const Route = createFileRoute("/examples/client-orpc")({
|
|
33
33
|
component: ClientORPC,
|
|
34
34
|
})
|
|
35
35
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createFileRoute } from "@tanstack/react-router"
|
|
2
2
|
import { orpc } from "@/lib/orpc"
|
|
3
3
|
|
|
4
|
-
export const Route = createFileRoute("/isr")({
|
|
4
|
+
export const Route = createFileRoute("/examples/isr")({
|
|
5
5
|
loader: async () => {
|
|
6
6
|
// In a real ISR scenario, this would be cached on the server
|
|
7
7
|
// For this example, we'll fetch planets via oRPC
|
|
@@ -2,14 +2,14 @@ import { createFileRoute, redirect } from "@tanstack/react-router"
|
|
|
2
2
|
import { getSessionFn } from "@/lib/auth-utils"
|
|
3
3
|
import { orpc } from "@/lib/orpc"
|
|
4
4
|
|
|
5
|
-
export const Route = createFileRoute("/ssr-orpc-auth")({
|
|
5
|
+
export const Route = createFileRoute("/examples/ssr-orpc-auth")({
|
|
6
6
|
beforeLoad: async () => {
|
|
7
7
|
const session = await getSessionFn()
|
|
8
8
|
if (!session) {
|
|
9
9
|
throw redirect({
|
|
10
10
|
to: "/login",
|
|
11
11
|
search: {
|
|
12
|
-
redirect: "/ssr-orpc-auth",
|
|
12
|
+
redirect: "/examples/ssr-orpc-auth",
|
|
13
13
|
},
|
|
14
14
|
})
|
|
15
15
|
}
|
|
@@ -27,7 +27,7 @@ const planetSchema = z.object({
|
|
|
27
27
|
diameter: z.string().refine((val) => !isNaN(parseFloat(val)), "Must be a number"),
|
|
28
28
|
})
|
|
29
29
|
|
|
30
|
-
export const Route = createFileRoute("/ssr-orpc")({
|
|
30
|
+
export const Route = createFileRoute("/examples/ssr-orpc")({
|
|
31
31
|
loader: async () => {
|
|
32
32
|
const planets = await orpc.planets.getPlanets()
|
|
33
33
|
return { planets }
|