@@ -90,15 +90,15 @@ class TemplateLoader {
9090 // add model files
9191 Logger . debug ( method , 'Adding model files to model manager' ) ;
9292 const mm = template . getModelManager ( ) ;
93- ctoModelFiles . forEach ( ( mf , index ) => {
93+ ctoModelFiles . forEach ( ( mf , index ) => {
9494 mm . addCTOModel ( mf , ctoModelFileNames [ index ] , true ) ;
9595 } ) ;
9696
97- if ( options && options . offline ) {
97+ if ( options && options . offline ) {
9898 mm . validateModelFiles ( ) ;
9999 }
100100 else {
101- mm . updateExternalModels ( ) ;
101+ await mm . updateExternalModels ( ) ;
102102 }
103103
104104 Logger . debug ( method , 'Setting grammar' ) ;
@@ -193,7 +193,7 @@ class TemplateLoader {
193193 const mm = template . getModelManager ( ) ;
194194 mm . addModelFiles ( modelFiles , modelFileNames , true ) ;
195195
196- if ( options && options . offline ) {
196+ if ( options && options . offline ) {
197197 mm . validateModelFiles ( ) ;
198198 }
199199 else {
@@ -202,7 +202,7 @@ class TemplateLoader {
202202
203203 if ( ! options || ! options . offline ) {
204204 mm . getModelFiles ( ) . forEach ( mf => {
205- if ( mf . isExternal ( ) ) {
205+ if ( mf . isExternal ( ) ) {
206206 fs . writeFileSync ( path + '/model/' + mf . getName ( ) , mf . getDefinitions ( ) ) ;
207207 }
208208 } ) ;
@@ -223,7 +223,7 @@ class TemplateLoader {
223223 tsFiles . forEach ( ( file ) => {
224224 const resolvedPath = slash ( fsPath . resolve ( path ) ) ;
225225 const resolvedFilePath = slash ( fsPath . resolve ( file . name ) ) ;
226- const truncatedPath = resolvedFilePath . replace ( resolvedPath + '/' , '' ) ;
226+ const truncatedPath = resolvedFilePath . replace ( resolvedPath + '/' , '' ) ;
227227 template . getLogicManager ( ) . addLogicFile ( file . contents , truncatedPath ) ;
228228 Logger . debug ( method , `Loaded ${ truncatedPath } ` , file . contents ) ;
229229 } ) ;
0 commit comments