Skip to content

Commit d9ab3a0

Browse files
author
simon
committed
Revert "add v1 support"
This reverts commit c216eea.
1 parent c216eea commit d9ab3a0

File tree

1 file changed

+6
-112
lines changed

1 file changed

+6
-112
lines changed

reflex/reflex.py

+6-112
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import typer
1111
import typer.core
1212
from reflex_cli.deployments import deployments_cli
13-
from reflex_cli.v2.deployments import hosting_cli
1413
from reflex_cli.utils import dependency
1514

1615
from reflex import constants
@@ -384,13 +383,6 @@ def login(
384383
_login()
385384

386385

387-
@cli.command()
388-
def loginv2(loglevel: constants.LogLevel = typer.Option(config.loglevel)):
389-
from reflex_cli.v2 import cli as hosting_cli
390-
391-
hosting_cli.login()
392-
393-
394386
@cli.command()
395387
def logout(
396388
loglevel: constants.LogLevel = typer.Option(
@@ -577,7 +569,12 @@ def deploy(
577569

578570
hosting_cli.deploy(
579571
app_name=app_name,
580-
export_fn=lambda zip_dest_dir, api_url, deploy_url, frontend, backend, zipping: export_utils.export(
572+
export_fn=lambda zip_dest_dir,
573+
api_url,
574+
deploy_url,
575+
frontend,
576+
backend,
577+
zipping: export_utils.export(
581578
zip_dest_dir=zip_dest_dir,
582579
api_url=api_url,
583580
deploy_url=deploy_url,
@@ -602,116 +599,13 @@ def deploy(
602599
)
603600

604601

605-
@cli.command()
606-
def deployv2(
607-
app_name: str = typer.Option(
608-
config.app_name,
609-
"--app-name",
610-
help="The name of the App to deploy under.",
611-
hidden=True,
612-
),
613-
regions: List[str] = typer.Option(
614-
list(),
615-
"-r",
616-
"--region",
617-
help="The regions to deploy to. For multiple envs, repeat this option, e.g. --region sjc --region iad",
618-
),
619-
envs: List[str] = typer.Option(
620-
list(),
621-
"--env",
622-
help="The environment variables to set: <key>=<value>. For multiple envs, repeat this option, e.g. --env k1=v2 --env k2=v2.",
623-
),
624-
vmtype: Optional[str] = typer.Option(
625-
None,
626-
"--vmtype",
627-
help="Vm type id. Run reflex apps vmtypes list to get options.",
628-
),
629-
hostname: Optional[str] = typer.Option(
630-
None,
631-
"--hostname",
632-
help="The hostname of the frontend.",
633-
hidden=True,
634-
),
635-
interactive: bool = typer.Option(
636-
True,
637-
help="Whether to list configuration options and ask for confirmation.",
638-
),
639-
envfile: Optional[str] = typer.Option(
640-
None,
641-
"--envfile",
642-
help="The path to an env file to use. Will override any envs set manually.",
643-
hidden=True,
644-
),
645-
loglevel: constants.LogLevel = typer.Option(
646-
config.loglevel, help="The log level to use."
647-
),
648-
project: Optional[str] = typer.Option(
649-
None,
650-
"--project",
651-
help="project to deploy to",
652-
hidden=True,
653-
),
654-
token: Optional[str] = typer.Option(
655-
None,
656-
"--token",
657-
help="token to use for auth",
658-
hidden=True,
659-
),
660-
):
661-
"""Deploy the app to the Reflex hosting service."""
662-
from reflex_cli.v2 import cli as hosting_cli
663-
664-
from reflex.utils import prerequisites
665-
from reflex.utils import export as export_utils
666-
from reflex_cli.v2.utils import dependency
667-
668-
# Set the log level.
669-
console.set_log_level(loglevel)
670-
671-
# Only check requirements if interactive. There is user interaction for requirements update.
672-
if interactive:
673-
dependency.check_requirements()
674-
675-
# Check if we are set up.
676-
if prerequisites.needs_reinit(frontend=True):
677-
_init(name=config.app_name, loglevel=loglevel)
678-
prerequisites.check_latest_package_version(constants.ReflexHostingCLI.MODULE_NAME)
679-
680-
hosting_cli.deploy(
681-
app_name=app_name,
682-
export_fn=lambda zip_dest_dir, api_url, deploy_url, frontend, backend, zipping: export_utils.export(
683-
zip_dest_dir=zip_dest_dir,
684-
api_url=api_url,
685-
deploy_url=deploy_url,
686-
frontend=frontend,
687-
backend=backend,
688-
zipping=zipping,
689-
loglevel=loglevel.subprocess_level(),
690-
),
691-
regions=regions,
692-
envs=envs,
693-
vmtype=vmtype,
694-
envfile=envfile,
695-
hostname=hostname,
696-
interactive=interactive,
697-
loglevel=loglevel.subprocess_level(),
698-
token=token,
699-
project=project,
700-
)
701-
702-
703602
cli.add_typer(db_cli, name="db", help="Subcommands for managing the database schema.")
704603
cli.add_typer(script_cli, name="script", help="Subcommands running helper scripts.")
705604
cli.add_typer(
706605
deployments_cli,
707606
name="deployments",
708607
help="Subcommands for managing the Deployments.",
709608
)
710-
cli.add_typer(
711-
hosting_cli,
712-
name="apps",
713-
help="Subcommands for managing the Deployments.",
714-
)
715609
cli.add_typer(
716610
custom_components_cli,
717611
name="component",

0 commit comments

Comments
 (0)