@@ -35,6 +35,7 @@ import xhrGetResponseBody from '../templates/core/xhr/getResponseBody.hbs';
35
35
import xhrGetResponseHeader from '../templates/core/xhr/getResponseHeader.hbs' ;
36
36
import xhrRequest from '../templates/core/xhr/request.hbs' ;
37
37
import xhrSendRequest from '../templates/core/xhr/sendRequest.hbs' ;
38
+ import templateExportController from '../templates/exportController.hbs' ;
38
39
import templateExportModel from '../templates/exportModel.hbs' ;
39
40
import templateExportSchema from '../templates/exportSchema.hbs' ;
40
41
import templateExportService from '../templates/exportService.hbs' ;
@@ -74,6 +75,7 @@ export interface Templates {
74
75
model : Handlebars . TemplateDelegate ;
75
76
schema : Handlebars . TemplateDelegate ;
76
77
service : Handlebars . TemplateDelegate ;
78
+ controllers : Handlebars . TemplateDelegate ;
77
79
} ;
78
80
core : {
79
81
settings : Handlebars . TemplateDelegate ;
@@ -98,6 +100,7 @@ export function registerHandlebarTemplates(root: { httpClient: HttpClient; useOp
98
100
model : Handlebars . template ( templateExportModel ) ,
99
101
schema : Handlebars . template ( templateExportSchema ) ,
100
102
service : Handlebars . template ( templateExportService ) ,
103
+ controllers : Handlebars . template ( templateExportController ) ,
101
104
} ,
102
105
core : {
103
106
settings : Handlebars . template ( templateCoreSettings ) ,
@@ -108,6 +111,16 @@ export function registerHandlebarTemplates(root: { httpClient: HttpClient; useOp
108
111
} ,
109
112
} ;
110
113
114
+ d ( ) ;
115
+ c ( ) ;
116
+ b ( ) ;
117
+ a ( ) ;
118
+ register_node_client ( ) ;
119
+
120
+ return templates ;
121
+ }
122
+
123
+ function d ( ) {
111
124
// Partials for the generations of the models, services, etc.
112
125
Handlebars . registerPartial ( 'exportEnum' , Handlebars . template ( partialExportEnum ) ) ;
113
126
Handlebars . registerPartial ( 'exportInterface' , Handlebars . template ( partialExportInterface ) ) ;
@@ -136,7 +149,9 @@ export function registerHandlebarTemplates(root: { httpClient: HttpClient; useOp
136
149
Handlebars . registerPartial ( 'typeUnion' , Handlebars . template ( partialTypeUnion ) ) ;
137
150
Handlebars . registerPartial ( 'typeIntersection' , Handlebars . template ( partialTypeIntersection ) ) ;
138
151
Handlebars . registerPartial ( 'base' , Handlebars . template ( partialBase ) ) ;
152
+ }
139
153
154
+ function c ( ) {
140
155
// Generic functions used in 'request' file @see src/templates/core/request.hbs for more info
141
156
Handlebars . registerPartial ( 'functions/catchErrors' , Handlebars . template ( functionCatchErrors ) ) ;
142
157
Handlebars . registerPartial ( 'functions/getFormData' , Handlebars . template ( functionGetFormData ) ) ;
@@ -149,30 +164,39 @@ export function registerHandlebarTemplates(root: { httpClient: HttpClient; useOp
149
164
Handlebars . registerPartial ( 'functions/isStringWithValue' , Handlebars . template ( functionIsStringWithValue ) ) ;
150
165
Handlebars . registerPartial ( 'functions/isSuccess' , Handlebars . template ( functionIsSuccess ) ) ;
151
166
Handlebars . registerPartial ( 'functions/resolve' , Handlebars . template ( functionResolve ) ) ;
167
+ }
152
168
169
+ function b ( ) {
153
170
// Specific files for the fetch client implementation
171
+
154
172
Handlebars . registerPartial ( 'fetch/getHeaders' , Handlebars . template ( fetchGetHeaders ) ) ;
155
173
Handlebars . registerPartial ( 'fetch/getRequestBody' , Handlebars . template ( fetchGetRequestBody ) ) ;
156
174
Handlebars . registerPartial ( 'fetch/getResponseBody' , Handlebars . template ( fetchGetResponseBody ) ) ;
157
175
Handlebars . registerPartial ( 'fetch/getResponseHeader' , Handlebars . template ( fetchGetResponseHeader ) ) ;
158
176
Handlebars . registerPartial ( 'fetch/sendRequest' , Handlebars . template ( fetchSendRequest ) ) ;
159
177
Handlebars . registerPartial ( 'fetch/request' , Handlebars . template ( fetchRequest ) ) ;
160
178
179
+
180
+ }
181
+
182
+ function a ( ) {
161
183
// Specific files for the xhr client implementation
162
184
Handlebars . registerPartial ( 'xhr/getHeaders' , Handlebars . template ( xhrGetHeaders ) ) ;
163
185
Handlebars . registerPartial ( 'xhr/getRequestBody' , Handlebars . template ( xhrGetRequestBody ) ) ;
164
186
Handlebars . registerPartial ( 'xhr/getResponseBody' , Handlebars . template ( xhrGetResponseBody ) ) ;
165
187
Handlebars . registerPartial ( 'xhr/getResponseHeader' , Handlebars . template ( xhrGetResponseHeader ) ) ;
166
188
Handlebars . registerPartial ( 'xhr/sendRequest' , Handlebars . template ( xhrSendRequest ) ) ;
167
189
Handlebars . registerPartial ( 'xhr/request' , Handlebars . template ( xhrRequest ) ) ;
190
+ }
168
191
169
- // Specific files for the node client implementation
192
+ /**
193
+ * Specific files for the node client implementation
194
+ */
195
+ function register_node_client ( ) {
170
196
Handlebars . registerPartial ( 'node/getHeaders' , Handlebars . template ( nodeGetHeaders ) ) ;
171
197
Handlebars . registerPartial ( 'node/getRequestBody' , Handlebars . template ( nodeGetRequestBody ) ) ;
172
198
Handlebars . registerPartial ( 'node/getResponseBody' , Handlebars . template ( nodeGetResponseBody ) ) ;
173
199
Handlebars . registerPartial ( 'node/getResponseHeader' , Handlebars . template ( nodeGetResponseHeader ) ) ;
174
200
Handlebars . registerPartial ( 'node/sendRequest' , Handlebars . template ( nodeSendRequest ) ) ;
175
201
Handlebars . registerPartial ( 'node/request' , Handlebars . template ( nodeRequest ) ) ;
176
-
177
- return templates ;
178
202
}
0 commit comments