plain.dev 0.15.0__tar.gz → 0.17.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plain_dev-0.15.0 → plain_dev-0.17.0}/PKG-INFO +1 -1
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/cli.py +35 -3
- plain_dev-0.17.0/plain/dev/entrypoints.py +9 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/pyproject.toml +1 -1
- {plain_dev-0.15.0 → plain_dev-0.17.0}/uv.lock +1 -1
- plain_dev-0.15.0/plain/dev/entrypoints.py +0 -5
- {plain_dev-0.15.0 → plain_dev-0.17.0}/.gitignore +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/LICENSE +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/README.md +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/README.md +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/__init__.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/contribute/__init__.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/contribute/cli.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/db/__init__.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/db/cli.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/db/container.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/debug.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/default_settings.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/gunicorn_logging.json +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/mkcert.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/pid.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/__init__.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/color.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/compat.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/manager.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/printer.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/process.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/precommit/__init__.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/precommit/cli.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/requests.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/services.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/templates/dev/requests.html +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/urls.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/utils.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/views.py +0 -0
- {plain_dev-0.15.0 → plain_dev-0.17.0}/tests/settings.py +0 -0
@@ -10,7 +10,9 @@ from importlib.util import find_spec
|
|
10
10
|
from pathlib import Path
|
11
11
|
|
12
12
|
import click
|
13
|
+
from rich.columns import Columns
|
13
14
|
from rich.console import Console
|
15
|
+
from rich.text import Text
|
14
16
|
|
15
17
|
from plain.runtime import APP_PATH, settings
|
16
18
|
|
@@ -75,7 +77,7 @@ def services():
|
|
75
77
|
)
|
76
78
|
@click.argument("entrypoint", required=False)
|
77
79
|
def entrypoint(show_list, entrypoint):
|
78
|
-
|
80
|
+
"""Entrypoints registered under plain.dev"""
|
79
81
|
if not show_list and not entrypoint:
|
80
82
|
click.secho("Please provide an entrypoint name or use --list", fg="red")
|
81
83
|
sys.exit(1)
|
@@ -97,6 +99,7 @@ class Dev:
|
|
97
99
|
self.ssl_cert_path = None
|
98
100
|
|
99
101
|
self.url = f"https://{self.hostname}:{self.port}"
|
102
|
+
self.tunnel_url = os.environ.get("PLAIN_DEV_TUNNEL_URL", "")
|
100
103
|
|
101
104
|
self.plain_env = {
|
102
105
|
"PYTHONUNBUFFERED": "true",
|
@@ -136,9 +139,38 @@ class Dev:
|
|
136
139
|
self.add_pyproject_run()
|
137
140
|
self.add_services()
|
138
141
|
|
139
|
-
click.secho("\nStarting
|
142
|
+
click.secho("\nStarting dev...", italic=True, dim=True)
|
143
|
+
|
144
|
+
if self.tunnel_url:
|
145
|
+
status_bar = Columns(
|
146
|
+
[
|
147
|
+
Text.from_markup(
|
148
|
+
f"[bold]Tunnel URL[/bold] [underline][link={self.tunnel_url}]{self.tunnel_url}[/link][/underline]"
|
149
|
+
),
|
150
|
+
Text.from_markup(
|
151
|
+
f"[dim][bold]Localhost URL[/bold] [link={self.url}]{self.url}[/link][/dim]"
|
152
|
+
),
|
153
|
+
Text.from_markup(
|
154
|
+
"[dim]Press [bold]Ctrl+C[/bold] to stop[/dim]",
|
155
|
+
justify="right",
|
156
|
+
),
|
157
|
+
],
|
158
|
+
expand=True,
|
159
|
+
)
|
160
|
+
else:
|
161
|
+
status_bar = Columns(
|
162
|
+
[
|
163
|
+
Text.from_markup(
|
164
|
+
f"[bold]Localhost URL[/bold] [underline][link={self.url}]{self.url}[/link][/underline]"
|
165
|
+
),
|
166
|
+
Text.from_markup(
|
167
|
+
"[dim][bold]Ctrl+C[/bold] to stop[/dim]", justify="right"
|
168
|
+
),
|
169
|
+
],
|
170
|
+
expand=True,
|
171
|
+
)
|
140
172
|
|
141
|
-
with self.console.status(
|
173
|
+
with self.console.status(status_bar):
|
142
174
|
self.poncho.loop()
|
143
175
|
|
144
176
|
return self.poncho.returncode
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|