Parcourir la source

Pass export function with more args to hosting CLI (#2254)

Martin Xu il y a 1 an
Parent
commit
0fff63a52e
3 fichiers modifiés avec 12 ajouts et 11 suppressions
  1. 6 5
      poetry.lock
  2. 1 1
      pyproject.toml
  3. 5 5
      reflex/reflex.py

+ 6 - 5
poetry.lock

@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
 
 [[package]]
 name = "alembic"
@@ -1541,18 +1541,19 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)"
 
 [[package]]
 name = "reflex-hosting-cli"
-version = "0.1.0"
+version = "0.1.2"
 description = "Reflex Hosting CLI"
 optional = false
 python-versions = ">=3.8,<4.0"
 files = [
-    {file = "reflex_hosting_cli-0.1.0-py3-none-any.whl", hash = "sha256:0853a8cbd0ba77a0b419aafccf2af1bdbdddada9aee5235c335444036f63999a"},
-    {file = "reflex_hosting_cli-0.1.0.tar.gz", hash = "sha256:53e895f952aedbd9af48e4244cd2d9ad17ac684327097df5784e63b149608e62"},
+    {file = "reflex_hosting_cli-0.1.2-py3-none-any.whl", hash = "sha256:efce77ab8e58aa18482fc8c102a9e466b7a219fd0bb5f4755267d368b15b2ba0"},
+    {file = "reflex_hosting_cli-0.1.2.tar.gz", hash = "sha256:98ed39185a395f19386b1158e5a45d0317a05e30f504f9558478965ee6a30867"},
 ]
 
 [package.dependencies]
 coverage = ">=7.3.2,<8.0.0"
 httpx = ">=0.24.0,<0.25.0"
+pipdeptree = ">=2.13.1,<3.0.0"
 platformdirs = ">=3.10.0,<4.0.0"
 pydantic = ">=1.10.2,<2.0.0"
 rich = ">=13.0.0,<14.0.0"
@@ -2312,4 +2313,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
 [metadata]
 lock-version = "2.0"
 python-versions = "^3.8"
-content-hash = "20b29357fd945cdc767a86204ac24d2e363bb75801c039e0820f4030e8c243d1"
+content-hash = "1803c47b0662ca990cbb9af6e1ea385847fe6fa5e820a21dd430bbb3329b8863"

+ 1 - 1
pyproject.toml

@@ -57,7 +57,7 @@ wrapt = [
 ]
 packaging = "^23.1"
 pipdeptree = "^2.13.0"
-reflex-hosting-cli = ">=0.1.0"
+reflex-hosting-cli = ">=0.1.2"
 
 [tool.poetry.group.dev.dependencies]
 pytest = "^7.1.2"

+ 5 - 5
reflex/reflex.py

@@ -451,7 +451,7 @@ def deploy(
         help="The hostname of the frontend.",
         hidden=True,
     ),
-    interactive: Optional[bool] = typer.Option(
+    interactive: bool = typer.Option(
         True,
         help="Whether to list configuration options and ask for confirmation.",
     ),
@@ -490,13 +490,13 @@ def deploy(
 
     hosting_cli.deploy(
         app_name=app_name,
-        export_fn=lambda zip_dest_dir, api_url, deploy_url: export_utils.export(
+        export_fn=lambda zip_dest_dir, api_url, deploy_url, frontend, backend, zipping: export_utils.export(
             zip_dest_dir=zip_dest_dir,
             api_url=api_url,
             deploy_url=deploy_url,
-            frontend=True,
-            backend=True,
-            zipping=True,
+            frontend=frontend,
+            backend=backend,
+            zipping=zipping,
             loglevel=loglevel,
             upload_db_file=upload_db_file,
         ),