File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{{ methodName }} (
22 {{ requestFormat }} {{ #if isOptionalParamsOk }} ?{{ /if }} : {{ requestTypeName }} ,
3- {{ #if hasOptions }} options: {{ optionsTypeName }} ,{{ /if }}
3+ {{ #if hasOptions }} options: {{ optionsTypeName }} = {} ,{{ /if }}
44 ): SeamHttpRequest<{{ #if returnsVoid}}void, undefined{{ else }} {{ responseTypeName }} , ' {{ responseKey }} ' {{ /if }} >
55{
66 return new SeamHttpRequest(this, {
77 pathname: '{{ path }} ',
8- method: {{ method }} ,
8+ method: ' {{ method }} ' ,
99 {{ requestFormat }} ,
1010 responseKey: {{ #if returnsVoid }} undefined{{ else }} '{{ responseKey }} '{{ /if }} ,
1111 {{ #if hasOptions }} options,{{ /if }}
Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ import {
3838import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
3939import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
4040
41- {{ #unless isClientSessionRoute }}
42- import { SeamHttpClientSessions } from './ client-sessions.js'
43- {{ /unless }}
41+ {{ #if skipClientSessionImport }}
42+ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/ client-sessions/index .js'
43+ {{ /if }}
4444
4545{{ #each subroutes }}
4646import { {{ className }} } from './{{ fileName }} '
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ interface RouteLayoutContext {
8484 className : string
8585 endpoints : EndpointLayoutContext [ ]
8686 subroutes : SubrouteLayoutContext [ ]
87- isClientSessionRoute : boolean
87+ skipClientSessionImport : boolean
8888}
8989
9090interface EndpointLayoutContext {
@@ -118,7 +118,8 @@ const setRouteLayoutContext = (
118118 blueprint : Blueprint ,
119119) : void => {
120120 file . className = getClassName ( node ?. path ?? null )
121- file . isClientSessionRoute = node ?. name === '/client_sessions'
121+ file . skipClientSessionImport =
122+ node ?. path === '/client_sessions' || node ?. path === '/'
122123
123124 file . endpoints = [ ]
124125 if ( node != null && 'endpoints' in node ) {
@@ -140,7 +141,7 @@ const getSubrouteLayoutContext = (
140141 route : Pick < Route , 'path' | 'name' > ,
141142) : SubrouteLayoutContext => {
142143 return {
143- fileName : `${ kebabCase ( route . name ) } .js` ,
144+ fileName : `${ kebabCase ( route . name ) } /index .js` ,
144145 methodName : camelCase ( route . name ) ,
145146 className : getClassName ( route . path ) ,
146147 }
You can’t perform that action at this time.
0 commit comments