plain.dev 0.20.1__tar.gz → 0.21.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.20.1 → plain_dev-0.21.0}/PKG-INFO +3 -3
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/README.md +2 -2
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/mkcert.py +12 -3
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/precommit/cli.py +3 -3
- {plain_dev-0.20.1 → plain_dev-0.21.0}/pyproject.toml +1 -1
- {plain_dev-0.20.1 → plain_dev-0.21.0}/.gitignore +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/LICENSE +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/README.md +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/__init__.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/cli.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/contribute/README.md +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/contribute/__init__.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/contribute/cli.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/debug.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/default_settings.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/entrypoints.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/gunicorn_logging.json +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/pdb.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/pid.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/poncho/__init__.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/poncho/color.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/poncho/compat.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/poncho/manager.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/poncho/printer.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/poncho/process.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/precommit/__init__.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/requests.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/services.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/templates/dev/requests.html +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/urls.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/utils.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/plain/dev/views.py +0 -0
- {plain_dev-0.20.1 → plain_dev-0.21.0}/tests/settings.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: plain.dev
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.21.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
|
@@ -38,7 +38,7 @@ The `plain dev` command does several things:
|
|
38
38
|
- Runs `plain preflight` to check for any issues
|
39
39
|
- Executes any pending model migrations
|
40
40
|
- Starts `gunicorn` with `--reload`
|
41
|
-
- Runs `plain tailwind
|
41
|
+
- Runs `plain tailwind build --watch`, if `plain.tailwind` is installed
|
42
42
|
- Any custom process defined in `pyproject.toml` at `tool.plain.dev.run`
|
43
43
|
- Necessary services (ex. Postgres) defined in `pyproject.toml` at `tool.plain.dev.services`
|
44
44
|
|
@@ -80,7 +80,7 @@ Runs:
|
|
80
80
|
- `plain preflight --database default`
|
81
81
|
- `plain migrate --check`
|
82
82
|
- `plain makemigrations --dry-run --check`
|
83
|
-
- `plain
|
83
|
+
- `plain build`
|
84
84
|
- `plain test`
|
85
85
|
|
86
86
|
## VS Code debugging
|
@@ -20,7 +20,7 @@ The `plain dev` command does several things:
|
|
20
20
|
- Runs `plain preflight` to check for any issues
|
21
21
|
- Executes any pending model migrations
|
22
22
|
- Starts `gunicorn` with `--reload`
|
23
|
-
- Runs `plain tailwind
|
23
|
+
- Runs `plain tailwind build --watch`, if `plain.tailwind` is installed
|
24
24
|
- Any custom process defined in `pyproject.toml` at `tool.plain.dev.run`
|
25
25
|
- Necessary services (ex. Postgres) defined in `pyproject.toml` at `tool.plain.dev.services`
|
26
26
|
|
@@ -62,7 +62,7 @@ Runs:
|
|
62
62
|
- `plain preflight --database default`
|
63
63
|
- `plain migrate --check`
|
64
64
|
- `plain makemigrations --dry-run --check`
|
65
|
-
- `plain
|
65
|
+
- `plain build`
|
66
66
|
- `plain test`
|
67
67
|
|
68
68
|
## VS Code debugging
|
@@ -2,6 +2,7 @@ import platform
|
|
2
2
|
import shutil
|
3
3
|
import subprocess
|
4
4
|
import sys
|
5
|
+
import time
|
5
6
|
import urllib.request
|
6
7
|
|
7
8
|
import click
|
@@ -73,13 +74,17 @@ class MkcertManager:
|
|
73
74
|
def generate_certs(self, domain, storage_path):
|
74
75
|
cert_path = storage_path / f"{domain}-cert.pem"
|
75
76
|
key_path = storage_path / f"{domain}-key.pem"
|
77
|
+
timestamp_path = storage_path / f"{domain}.timestamp"
|
78
|
+
update_interval = 60 * 24 * 3600 # 60 days in seconds
|
76
79
|
|
77
|
-
if
|
78
|
-
|
80
|
+
# Check if the certs exist and if the timestamp is recent enough
|
81
|
+
if cert_path.exists() and key_path.exists() and timestamp_path.exists():
|
82
|
+
last_updated = timestamp_path.stat().st_mtime
|
83
|
+
if time.time() - last_updated < update_interval:
|
84
|
+
return cert_path, key_path
|
79
85
|
|
80
86
|
storage_path.mkdir(parents=True, exist_ok=True)
|
81
87
|
|
82
|
-
# Generate SSL certificates using mkcert
|
83
88
|
click.secho(f"Generating SSL certificates for {domain}...", bold=True)
|
84
89
|
subprocess.run(
|
85
90
|
[
|
@@ -93,4 +98,8 @@ class MkcertManager:
|
|
93
98
|
check=True,
|
94
99
|
)
|
95
100
|
|
101
|
+
# Update the timestamp file to the current time
|
102
|
+
with open(timestamp_path, "w") as f:
|
103
|
+
f.write(str(time.time()))
|
104
|
+
|
96
105
|
return cert_path, key_path
|
@@ -57,7 +57,7 @@ def cli(install):
|
|
57
57
|
check_short("Running plain code checks", "plain", "code", "check")
|
58
58
|
|
59
59
|
if Path("uv.lock").exists():
|
60
|
-
check_short("Checking uv.lock", "uv", "lock", "--
|
60
|
+
check_short("Checking uv.lock", "uv", "lock", "--check")
|
61
61
|
|
62
62
|
if plain_db_connected():
|
63
63
|
check_short(
|
@@ -79,8 +79,8 @@ def cli(install):
|
|
79
79
|
check_short("Running Plain checks (without database)", "plain", "preflight")
|
80
80
|
click.secho("--> Skipping migration checks", bold=True, fg="yellow")
|
81
81
|
|
82
|
-
print_event("Running plain
|
83
|
-
result = subprocess.run(["plain", "
|
82
|
+
print_event("Running plain build")
|
83
|
+
result = subprocess.run(["plain", "build"])
|
84
84
|
if result.returncode != 0:
|
85
85
|
sys.exit(result.returncode)
|
86
86
|
|
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
|