@@ -1115,31 +1115,33 @@ def validate_ui_build(self):
11151115 try :
11161116 self .console .print ("[bold cyan]🔍 VALIDATING UI build[/bold cyan]" )
11171117 ui_dir = "src/ui"
1118-
1118+
11191119 if not os .path .exists (ui_dir ):
1120- self .console .print ("[yellow]No UI directory found, skipping UI validation[/yellow]" )
1120+ self .console .print (
1121+ "[yellow]No UI directory found, skipping UI validation[/yellow]"
1122+ )
11211123 return
1122-
1124+
11231125 # Run npm install first
11241126 self .log_verbose ("Running npm install for UI dependencies..." )
11251127 success , result = self .run_subprocess_with_logging (
11261128 ["npm" , "install" ], "UI npm install" , ui_dir
11271129 )
1128-
1130+
11291131 if not success :
11301132 raise Exception ("npm install failed" )
1131-
1133+
11321134 # Run npm run build to validate ESLint/Prettier
11331135 self .log_verbose ("Running npm run build for UI validation..." )
11341136 success , result = self .run_subprocess_with_logging (
11351137 ["npm" , "run" , "build" ], "UI build validation" , ui_dir
11361138 )
1137-
1139+
11381140 if not success :
11391141 raise Exception ("UI build validation failed" )
1140-
1142+
11411143 self .console .print ("[green]✅ UI build validation passed[/green]" )
1142-
1144+
11431145 except Exception as e :
11441146 self .console .print ("[red]❌ UI build validation failed:[/red]" )
11451147 self .console .print (str (e ), style = "red" , markup = False )
@@ -1257,10 +1259,10 @@ def build_main_template(self, webui_zipfile, components_needing_rebuild):
12571259 # Main template needs rebuilding, if any component needs rebuilding
12581260 if components_needing_rebuild :
12591261 self .console .print ("[yellow]Main template needs rebuilding[/yellow]" )
1260-
1262+
12611263 # Validate UI build before rebuilding
12621264 self .validate_ui_build ()
1263-
1265+
12641266 # Validate Python syntax in src directory before building
12651267 if not self ._validate_python_syntax ("src" ):
12661268 raise Exception ("Python syntax validation failed" )
0 commit comments