|
5 | 5 |
|
6 | 6 | import typer |
7 | 7 |
|
8 | | -from tiled.config import Authentication, parse_configs |
9 | | - |
10 | 8 | serve_app = typer.Typer(no_args_is_help=True) |
11 | 9 |
|
12 | 10 | SQLITE_CATALOG_FILENAME = "catalog.db" |
@@ -140,6 +138,7 @@ def serve_directory( |
140 | 138 | stamp_head(ALEMBIC_INI_TEMPLATE_PATH, ALEMBIC_DIR, database) |
141 | 139 |
|
142 | 140 | from ..catalog import from_uri as catalog_from_uri |
| 141 | + from ..config import Authentication |
143 | 142 | from ..server.app import build_app, print_server_info |
144 | 143 |
|
145 | 144 | if keep_ext: |
@@ -377,6 +376,7 @@ def serve_catalog( |
377 | 376 | import urllib.parse |
378 | 377 |
|
379 | 378 | from ..catalog import from_uri |
| 379 | + from ..config import Authentication |
380 | 380 | from ..server.app import build_app, print_server_info |
381 | 381 |
|
382 | 382 | parsed_database = urllib.parse.urlparse(database) |
@@ -560,6 +560,7 @@ def serve_pyobject( |
560 | 560 | ), |
561 | 561 | ): |
562 | 562 | "Serve a Tree instance from a Python module." |
| 563 | + from ..config import Authentication |
563 | 564 | from ..server.app import build_app, print_server_info |
564 | 565 | from ..utils import import_object |
565 | 566 |
|
@@ -593,6 +594,7 @@ def serve_demo( |
593 | 594 | port: int = typer.Option(8000, help="Bind to a socket with this port."), |
594 | 595 | ): |
595 | 596 | "Start a public server with example data." |
| 597 | + from ..config import Authentication |
596 | 598 | from ..server.app import build_app, print_server_info |
597 | 599 | from ..utils import import_object |
598 | 600 |
|
@@ -661,6 +663,8 @@ def serve_config( |
661 | 663 | "Serve a Tree as specified in configuration file(s)." |
662 | 664 | import os |
663 | 665 |
|
| 666 | + from ..config import parse_configs |
| 667 | + |
664 | 668 | config_path = config_path or Path(os.getenv("TILED_CONFIG", "config.yml")) |
665 | 669 | try: |
666 | 670 | parsed_config = parse_configs(config_path) |
|
0 commit comments