File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ export const connect = (
1717 const metadata = metalsmith . metadata ( ) as Metadata
1818 const { blueprint } = metadata
1919
20+ const rootRouteKey = `${ rootPath } /seam-http.js`
21+ files [ rootRouteKey ] = { contents : Buffer . from ( '\n' ) }
22+ const rootRouteFile = files [ rootRouteKey ] as unknown as File
23+ rootRouteFile . layout = 'route.hbs'
24+ setRootRouteLayoutContext ( rootRouteFile , blueprint )
25+
2026 for ( const route of Object . values ( blueprint . routes ?? { } ) ) {
2127 const k = `${ rootPath } /${ route . path
2228 . slice ( 1 )
@@ -38,6 +44,16 @@ interface RouteLayoutContext {
3844 needsActionAttempts : boolean
3945}
4046
47+ const setRootRouteLayoutContext = (
48+ file : Partial < RouteLayoutContext > ,
49+ _blueprint : Blueprint ,
50+ ) : void => {
51+ file . className = 'SeamHttp'
52+ file . needsActionAttempts = false
53+ file . isClientSessionRoute = false
54+ file . isActionAttemptsRoute = false
55+ }
56+
4157const setRouteLayoutContext = (
4258 file : Partial < RouteLayoutContext > ,
4359 route : Route ,
You can’t perform that action at this time.
0 commit comments