@@ -131,6 +131,7 @@ class Colors:
131
131
DOCS = "📚" if sys .platform != "win32" else "?"
132
132
BULB = "💡" if sys .platform != "win32" else "i"
133
133
SEARCH = "🔍" if sys .platform != "win32" else "@"
134
+ SPARKLE = "✨" if sys .platform != "win32" else "*"
134
135
ZAP = "⚡" if sys .platform != "win32" else "!"
135
136
136
137
@@ -303,15 +304,18 @@ def createSecurityContent(
303
304
)
304
305
305
306
if len (validation_errors ) > 0 :
307
+ if sys .platform == "win32" :
308
+ sys .stdout .reconfigure (encoding = "utf-8" )
309
+
306
310
print ("\n " ) # Clean separation
307
311
print (f"{ Colors .BOLD } { Colors .BRIGHT_MAGENTA } ╔{ '═' * 60 } ╗{ Colors .END } " )
308
312
print (
309
- f"{ Colors .BOLD } { Colors .BRIGHT_MAGENTA } ║{ Colors .BLUE } { f'{ Colors .SEARCH } Content Validation Summary' :^60 } { Colors .BRIGHT_MAGENTA } ║{ Colors .END } "
313
+ f"{ Colors .BOLD } { Colors .BRIGHT_MAGENTA } ║{ Colors .BLUE } { f'{ Colors .SEARCH } Content Validation Summary' :^59 } { Colors .BRIGHT_MAGENTA } ║{ Colors .END } "
310
314
)
311
315
print (f"{ Colors .BOLD } { Colors .BRIGHT_MAGENTA } ╚{ '═' * 60 } ╝{ Colors .END } \n " )
312
316
313
317
print (
314
- f"{ Colors .BOLD } { Colors .GREEN } ✨ Validation Completed{ Colors .END } – Issues detected in { Colors .RED } { Colors .BOLD } { len (validation_errors )} { Colors .END } files.\n "
318
+ f"{ Colors .BOLD } { Colors .GREEN } { Colors . SPARKLE } Validation Completed{ Colors .END } – Issues detected in { Colors .RED } { Colors .BOLD } { len (validation_errors )} { Colors .END } files.\n "
315
319
)
316
320
317
321
for index , entry in enumerate (validation_errors , 1 ):
@@ -322,7 +326,7 @@ def createSecurityContent(
322
326
number_emoji = f"{ index } ️⃣"
323
327
print (f"{ Colors .YELLOW } ┏{ '━' * width } ┓{ Colors .END } " )
324
328
print (
325
- f"{ Colors .YELLOW } ┃{ Colors .BOLD } { number_emoji } File: { Colors .CYAN } { file_path } { Colors .END } { ' ' * (width - len (str (file_path )) - 12 )} { Colors .YELLOW } ┃{ Colors .END } "
329
+ f"{ Colors .YELLOW } ┃{ Colors .BOLD } { number_emoji } File: { Colors .CYAN } { file_path } { Colors .END } { ' ' * (width - len (str (file_path )) - 9 )} { Colors .YELLOW } ┃{ Colors .END } "
326
330
)
327
331
print (f"{ Colors .YELLOW } ┗{ '━' * width } ┛{ Colors .END } " )
328
332
@@ -351,23 +355,25 @@ def createSecurityContent(
351
355
)
352
356
elif "Extra inputs" in error_msg :
353
357
print (
354
- f" { Colors .BLUE } ❌ Unexpected Field: { err .get ('loc' , ['' ])[0 ]} { Colors .END } "
358
+ f" { Colors .BLUE } { Colors . ERROR } Unexpected Field: { err .get ('loc' , ['' ])[0 ]} { Colors .END } "
355
359
)
356
360
elif "Failed to find" in error_msg :
357
361
print (
358
- f" { Colors .RED } 🔍 Missing Reference: { error_msg } { Colors .END } "
362
+ f" { Colors .RED } { Colors . SEARCH } Missing Reference: { error_msg } { Colors .END } "
359
363
)
360
364
else :
361
- print (f" { Colors .RED } ❌ { error_msg } { Colors .END } " )
365
+ print (
366
+ f" { Colors .RED } { Colors .ERROR } { error_msg } { Colors .END } "
367
+ )
362
368
else :
363
- print (f" { Colors .RED } ❌ { str (error )} { Colors .END } " )
369
+ print (f" { Colors .RED } { Colors . ERROR } { str (error )} { Colors .END } " )
364
370
print ("" )
365
371
366
372
# Clean footer with next steps
367
373
max_width = max (60 , max (len (str (e [0 ])) + 15 for e in validation_errors ))
368
374
print (f"{ Colors .BOLD } { Colors .CYAN } ╔{ '═' * max_width } ╗{ Colors .END } " )
369
375
print (
370
- f"{ Colors .BOLD } { Colors .CYAN } ║{ Colors .BLUE } { '🎯 Next Steps' :^{max_width }} { Colors .CYAN } ║{ Colors .END } "
376
+ f"{ Colors .BOLD } { Colors .CYAN } ║{ Colors .BLUE } { Colors . ARROW + ' Next Steps' :^{max_width - 1 }} { Colors .CYAN } ║{ Colors .END } "
371
377
)
372
378
print (f"{ Colors .BOLD } { Colors .CYAN } ╚{ '═' * max_width } ╝{ Colors .END } \n " )
373
379
0 commit comments