@@ -15,17 +15,17 @@ def main() -> int:
1515 args = parse_args ()
1616 bundle_dir = args .bundle .resolve ()
1717 validate_bundle (bundle_dir )
18- print (f"Bundle válido : { bundle_dir } " )
18+ print (f"Bundle valid : { bundle_dir } " )
1919 return 0
2020
2121
2222def parse_args () -> Namespace :
23- parser = ArgumentParser (description = "Valida o bundle installer-ready do Tailwind CSS Forge." )
23+ parser = ArgumentParser (description = "Validates the installer-ready bundle of Tailwind CSS Forge." )
2424 parser .add_argument (
2525 "--bundle" ,
2626 type = Path ,
2727 default = DEFAULT_BUNDLE ,
28- help = "Diretório do bundle staged para validar ." ,
28+ help = "Directory of the staged bundle to validate ." ,
2929 )
3030 return parser .parse_args ()
3131
@@ -54,14 +54,14 @@ def validate_bundle(bundle_dir: Path) -> None:
5454 missing = [str (path ) for path in required_files if not path .exists ()]
5555 if missing :
5656 missing_list = "\n " .join (f"- { path } " for path in missing )
57- raise SystemExit (f"Bundle incompleto. Arquivos ausentes :\n { missing_list } " )
57+ raise SystemExit (f"Incomplete bundle. Missing files :\n { missing_list } " )
5858
5959 manifest = json .loads ((bundle_dir / "installer-manifest.json" ).read_text (encoding = "utf-8" ))
6060 metadata = json .loads ((bundle_dir / "forge-product.json" ).read_text (encoding = "utf-8" ))
6161 if manifest .get ("app_name" ) != "Tailwind CSS Forge" :
62- raise SystemExit ("Manifesto inválido: app_name incorreto ." )
62+ raise SystemExit ("Invalid manifest: incorrect app_name ." )
6363 if manifest .get ("version" ) != metadata .get ("version" ):
64- raise SystemExit ("Manifesto inválido: versão divergente do metadata do produto ." )
64+ raise SystemExit ("Invalid manifest: version mismatch with product metadata ." )
6565
6666 forbidden_paths = [
6767 bundle_dir / "app" / "backend" / "tests" ,
@@ -73,7 +73,8 @@ def validate_bundle(bundle_dir: Path) -> None:
7373 ]
7474 forbidden_found = [str (path ) for path in forbidden_paths if path .exists ()]
7575 if forbidden_found :
76- raise SystemExit (f"Bundle contém conteúdo indevido: { forbidden_found } " )
76+ forbidden_list = "\n " .join (f"- { path } " for path in forbidden_found )
77+ raise SystemExit (f"Bundle contains unexpected content:\n { forbidden_list } " )
7778
7879 _validate_launcher_self_check (bundle_dir )
7980
@@ -95,15 +96,15 @@ def _validate_launcher_self_check(bundle_dir: Path) -> None:
9596 )
9697 if completed .returncode != 0 :
9798 raise SystemExit (
98- "Launcher self-check falhou : "
99+ "Launcher self-check failed : "
99100 f"{ completed .stderr .strip () or completed .stdout .strip ()} " ,
100101 )
101102
102103 report = json .loads (completed .stdout )
103104 if not report .get ("installed_layout" ):
104- raise SystemExit ("Launcher self-check inválido: o bundle staged não foi reconhecido como layout instalado ." )
105+ raise SystemExit ("Invalid launcher self-check: staged bundle was not recognized as an installed layout ." )
105106 if not report .get ("ready" ):
106- raise SystemExit ("Launcher self-check inválido: o bundle staged não foi marcado como pronto ." )
107+ raise SystemExit ("Invalid launcher self-check: staged bundle was not marked as ready ." )
107108
108109
109110if __name__ == "__main__" :
0 commit comments