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.
Files changed (36) hide show
  1. {plain_dev-0.15.0 → plain_dev-0.17.0}/PKG-INFO +1 -1
  2. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/cli.py +35 -3
  3. plain_dev-0.17.0/plain/dev/entrypoints.py +9 -0
  4. {plain_dev-0.15.0 → plain_dev-0.17.0}/pyproject.toml +1 -1
  5. {plain_dev-0.15.0 → plain_dev-0.17.0}/uv.lock +1 -1
  6. plain_dev-0.15.0/plain/dev/entrypoints.py +0 -5
  7. {plain_dev-0.15.0 → plain_dev-0.17.0}/.gitignore +0 -0
  8. {plain_dev-0.15.0 → plain_dev-0.17.0}/LICENSE +0 -0
  9. {plain_dev-0.15.0 → plain_dev-0.17.0}/README.md +0 -0
  10. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/README.md +0 -0
  11. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/__init__.py +0 -0
  12. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/contribute/__init__.py +0 -0
  13. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/contribute/cli.py +0 -0
  14. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/db/__init__.py +0 -0
  15. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/db/cli.py +0 -0
  16. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/db/container.py +0 -0
  17. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/debug.py +0 -0
  18. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/default_settings.py +0 -0
  19. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/gunicorn_logging.json +0 -0
  20. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/mkcert.py +0 -0
  21. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/pid.py +0 -0
  22. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/__init__.py +0 -0
  23. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/color.py +0 -0
  24. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/compat.py +0 -0
  25. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/manager.py +0 -0
  26. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/printer.py +0 -0
  27. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/poncho/process.py +0 -0
  28. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/precommit/__init__.py +0 -0
  29. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/precommit/cli.py +0 -0
  30. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/requests.py +0 -0
  31. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/services.py +0 -0
  32. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/templates/dev/requests.html +0 -0
  33. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/urls.py +0 -0
  34. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/utils.py +0 -0
  35. {plain_dev-0.15.0 → plain_dev-0.17.0}/plain/dev/views.py +0 -0
  36. {plain_dev-0.15.0 → plain_dev-0.17.0}/tests/settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.dev
3
- Version: 0.15.0
3
+ Version: 0.17.0
4
4
  Summary: Local development tools for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
@@ -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
- f"""Entrypoints registered under {ENTRYPOINT_GROUP}"""
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 services (Ctrl+C to stop):", italic=True, dim=True)
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(self.url):
173
+ with self.console.status(status_bar):
142
174
  self.poncho.loop()
143
175
 
144
176
  return self.poncho.returncode
@@ -0,0 +1,9 @@
1
+ from dotenv import load_dotenv
2
+
3
+
4
+ def load_dotenv_file():
5
+ loaded = load_dotenv(".env")
6
+ if not loaded:
7
+ # In CI-like environments, we may have .env.test committed
8
+ # but not .env, so we can help out by loading it here.
9
+ load_dotenv(".env.test")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plain.dev"
3
- version = "0.15.0"
3
+ version = "0.17.0"
4
4
  description = "Local development tools for Plain."
5
5
  authors = [{name = "Dave Gaeddert", email = "dave.gaeddert@dropseed.dev"}]
6
6
  license = "BSD-3-Clause"
@@ -214,7 +214,7 @@ wheels = [
214
214
 
215
215
  [[package]]
216
216
  name = "plain-dev"
217
- version = "0.15.0"
217
+ version = "0.17.0"
218
218
  source = { editable = "." }
219
219
  dependencies = [
220
220
  { name = "click" },
@@ -1,5 +0,0 @@
1
- from dotenv import load_dotenv
2
-
3
-
4
- def load_dotenv_file():
5
- load_dotenv(".env")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes