Move export checking logic to reflex CLI

This commit is contained in:
Masen Furer 2025-01-24 13:40:59 -08:00
parent a978684d70
commit c64ed43215
No known key found for this signature in database
GPG Key ID: B0008AD22B3B3A95
2 changed files with 8 additions and 7 deletions

View File

@ -328,6 +328,14 @@ def export(
if prerequisites.needs_reinit(frontend=True):
_init(name=config.app_name, loglevel=loglevel)
if frontend and not config.show_built_with_reflex:
# The sticky badge may be disabled on export for team/enterprise tiers.
prerequisites.check_config_option_in_tier(
option_name="show_built_with_reflex",
allowed_tiers=["team", "enterprise"],
fallback_value=False,
)
export_utils.export(
zipping=zipping,
frontend=frontend,

View File

@ -55,13 +55,6 @@ def export(
console.rule("[bold]Compiling production app and preparing for export.")
if frontend:
if not config.show_built_with_reflex:
# The sticky badge may be disabled on export for team/enterprise tiers.
prerequisites.check_config_option_in_tier(
option_name="show_built_with_reflex",
allowed_tiers=["team", "enterprise"],
fallback_value=False,
)
# Ensure module can be imported and app.compile() is called.
prerequisites.get_compiled_app(export=True)
# Set up .web directory and install frontend dependencies.