10
10
import typer
11
11
import typer .core
12
12
from reflex_cli .deployments import deployments_cli
13
- from reflex_cli .v2 .deployments import hosting_cli
14
13
from reflex_cli .utils import dependency
15
14
16
15
from reflex import constants
@@ -384,13 +383,6 @@ def login(
384
383
_login ()
385
384
386
385
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
-
394
386
@cli .command ()
395
387
def logout (
396
388
loglevel : constants .LogLevel = typer .Option (
@@ -577,7 +569,12 @@ def deploy(
577
569
578
570
hosting_cli .deploy (
579
571
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 (
581
578
zip_dest_dir = zip_dest_dir ,
582
579
api_url = api_url ,
583
580
deploy_url = deploy_url ,
@@ -602,116 +599,13 @@ def deploy(
602
599
)
603
600
604
601
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
-
703
602
cli .add_typer (db_cli , name = "db" , help = "Subcommands for managing the database schema." )
704
603
cli .add_typer (script_cli , name = "script" , help = "Subcommands running helper scripts." )
705
604
cli .add_typer (
706
605
deployments_cli ,
707
606
name = "deployments" ,
708
607
help = "Subcommands for managing the Deployments." ,
709
608
)
710
- cli .add_typer (
711
- hosting_cli ,
712
- name = "apps" ,
713
- help = "Subcommands for managing the Deployments." ,
714
- )
715
609
cli .add_typer (
716
610
custom_components_cli ,
717
611
name = "component" ,
0 commit comments