plain.dev 0.20.1__py3-none-any.whl → 0.21.0__py3-none-any.whl

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/README.md CHANGED
@@ -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 compile --watch`, if `plain.tailwind` is installed
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 compile`
65
+ - `plain build`
66
66
  - `plain test`
67
67
 
68
68
  ## VS Code debugging
plain/dev/mkcert.py CHANGED
@@ -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 cert_path.exists() and key_path.exists():
78
- return cert_path, key_path
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", "--locked")
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 compile")
83
- result = subprocess.run(["plain", "compile"])
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.dev
3
- Version: 0.20.1
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 compile --watch`, if `plain.tailwind` is installed
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 compile`
83
+ - `plain build`
84
84
  - `plain test`
85
85
 
86
86
  ## VS Code debugging
@@ -1,11 +1,11 @@
1
- plain/dev/README.md,sha256=-yR4qzwEP7vDVvCAHJ22aaQHQ7rXVW9uy0KEZjCzmz4,3662
1
+ plain/dev/README.md,sha256=r_sONnN4zVlDdQrst_51iScrm3PlrcoPNmX9yX3MKXo,3658
2
2
  plain/dev/__init__.py,sha256=nRX1B0Br8gmqhJLqo5Z9PqzReDahBtbmwH6C-7hzuls,103
3
3
  plain/dev/cli.py,sha256=DkuMpWpfP0FxSFyl4jI7iXkChDWs7cfv_u4RM34rwH4,12911
4
4
  plain/dev/debug.py,sha256=Ka84K8zUdF0kMYNyqiLYDrdzU1jU8LSOkts3hcw_Gok,1005
5
5
  plain/dev/default_settings.py,sha256=uXWYORWP_aRDwXIFXdu5kHyiBFUZzARIJdhPeFaX35c,75
6
6
  plain/dev/entrypoints.py,sha256=TCjX9aCLQag_0UjWE6PU5MnuaNWHAqsZQh7opSjr8zM,386
7
7
  plain/dev/gunicorn_logging.json,sha256=yU23jzs5G4YGdDWBNiyAc3KypR4HirR6afIkD7w6DhU,1113
8
- plain/dev/mkcert.py,sha256=u284XXQeTgwSkKKh0gMrYpnNGdd9OOUJKLQAXcvGnr4,3459
8
+ plain/dev/mkcert.py,sha256=fm1U_UTGPREso6ZaP79WqEvd9uvA4lYWFo6fKhNglMM,3911
9
9
  plain/dev/pdb.py,sha256=4ru3rlIIyuYVXteyI7v42i4MmdBIjpJP0IJemBpf83A,3742
10
10
  plain/dev/pid.py,sha256=gRMBf7aGndrra1TnmKtPghTijnd0i0Xeo63mzfPWp7M,436
11
11
  plain/dev/requests.py,sha256=D1NX0qC8ADtf_zwsGMTp9aiE6Sh9QmoxFJCU_V8Wers,6839
@@ -23,10 +23,10 @@ plain/dev/poncho/manager.py,sha256=xT8ur72ZaVrWYWtg5FnBSiZsENWKUHP7eG_A_ZUP-40,6
23
23
  plain/dev/poncho/printer.py,sha256=wt1ioaGcPnVyrPy-UjvdsR9zfcr4DTTycmapW1MIdSU,1785
24
24
  plain/dev/poncho/process.py,sha256=JJOKy-C6vMCg7-6JMCtu6C649h7HmOBSJqDP_hnX49I,2637
25
25
  plain/dev/precommit/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
26
- plain/dev/precommit/cli.py,sha256=divzCT1LY_aH89nJuzdFqFHhyA4R7jEcV_R6uZsu4bo,3383
26
+ plain/dev/precommit/cli.py,sha256=Zh-lCIbAH0LYwmFtH2wP2UzTiHKf2kIid2sO8p1wu2k,3378
27
27
  plain/dev/templates/dev/requests.html,sha256=kQKJZq5L77juuL_t8UjcAehEU61U4RXNnKaAET-wAm8,7627
28
- plain_dev-0.20.1.dist-info/METADATA,sha256=nsxwDZjhrdCwNaVasMolQgnroyHjIg-GdHL5kAGl27s,4167
29
- plain_dev-0.20.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
- plain_dev-0.20.1.dist-info/entry_points.txt,sha256=UtjUbxI-2TMZJGCfRTeU-YGr48XLwnc_pMuzDGD9uTg,219
31
- plain_dev-0.20.1.dist-info/licenses/LICENSE,sha256=Cx4Dq9yR2fLHthf8Ke36B8QJvE1bZFXVzDIGE8wGzsY,4132
32
- plain_dev-0.20.1.dist-info/RECORD,,
28
+ plain_dev-0.21.0.dist-info/METADATA,sha256=ALn8-6e0A_67cXxcsr80Xp1TKuvH-DfZIdwLXJQweEw,4163
29
+ plain_dev-0.21.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
+ plain_dev-0.21.0.dist-info/entry_points.txt,sha256=UtjUbxI-2TMZJGCfRTeU-YGr48XLwnc_pMuzDGD9uTg,219
31
+ plain_dev-0.21.0.dist-info/licenses/LICENSE,sha256=Cx4Dq9yR2fLHthf8Ke36B8QJvE1bZFXVzDIGE8wGzsY,4132
32
+ plain_dev-0.21.0.dist-info/RECORD,,