plain.dev 0.20.0__tar.gz → 0.20.2__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 (65) hide show
  1. {plain_dev-0.20.0 → plain_dev-0.20.2}/PKG-INFO +1 -1
  2. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/mkcert.py +12 -3
  3. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/precommit/cli.py +1 -1
  4. {plain_dev-0.20.0 → plain_dev-0.20.2}/pyproject.toml +1 -1
  5. {plain_dev-0.20.0 → plain_dev-0.20.2}/.gitignore +0 -0
  6. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/.gitignore +0 -0
  7. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/.ninja_log +0 -0
  8. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/build.ninja +0 -0
  9. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/default.pyi +0 -0
  10. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.__init__.imports +0 -0
  11. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.cli.imports +0 -0
  12. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.contribute.__init__.imports +0 -0
  13. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.contribute.cli.imports +0 -0
  14. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.db.__init__.imports +0 -0
  15. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.db.cli.imports +0 -0
  16. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.db.container.imports +0 -0
  17. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.debug.imports +0 -0
  18. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.default_settings.imports +0 -0
  19. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.entrypoints.imports +0 -0
  20. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.mkcert.imports +0 -0
  21. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.pdb.imports +0 -0
  22. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.pid.imports +0 -0
  23. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.poncho.__init__.imports +0 -0
  24. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.poncho.color.imports +0 -0
  25. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.poncho.compat.imports +0 -0
  26. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.poncho.manager.imports +0 -0
  27. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.poncho.printer.imports +0 -0
  28. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.poncho.process.imports +0 -0
  29. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.precommit.__init__.imports +0 -0
  30. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.precommit.cli.imports +0 -0
  31. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.requests.imports +0 -0
  32. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.services.imports +0 -0
  33. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.urls.imports +0 -0
  34. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.utils.imports +0 -0
  35. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/imports/dev.views.imports +0 -0
  36. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/pyi/dev/poncho/compat.pyi +0 -0
  37. {plain_dev-0.20.0 → plain_dev-0.20.2}/.pytype/pyi/dev/poncho/printer.pyi +0 -0
  38. {plain_dev-0.20.0 → plain_dev-0.20.2}/LICENSE +0 -0
  39. {plain_dev-0.20.0 → plain_dev-0.20.2}/README.md +0 -0
  40. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/README.md +0 -0
  41. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/__init__.py +0 -0
  42. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/cli.py +0 -0
  43. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/contribute/README.md +0 -0
  44. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/contribute/__init__.py +0 -0
  45. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/contribute/cli.py +0 -0
  46. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/debug.py +0 -0
  47. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/default_settings.py +0 -0
  48. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/entrypoints.py +0 -0
  49. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/gunicorn_logging.json +0 -0
  50. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/pdb.py +0 -0
  51. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/pid.py +0 -0
  52. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/poncho/__init__.py +0 -0
  53. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/poncho/color.py +0 -0
  54. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/poncho/compat.py +0 -0
  55. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/poncho/manager.py +0 -0
  56. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/poncho/printer.py +0 -0
  57. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/poncho/process.py +0 -0
  58. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/precommit/__init__.py +0 -0
  59. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/requests.py +0 -0
  60. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/services.py +0 -0
  61. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/templates/dev/requests.html +0 -0
  62. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/urls.py +0 -0
  63. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/utils.py +0 -0
  64. {plain_dev-0.20.0 → plain_dev-0.20.2}/plain/dev/views.py +0 -0
  65. {plain_dev-0.20.0 → plain_dev-0.20.2}/tests/settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.dev
3
- Version: 0.20.0
3
+ Version: 0.20.2
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
@@ -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(
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plain.dev"
3
- version = "0.20.0"
3
+ version = "0.20.2"
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"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes