plain.dev 0.21.0__tar.gz → 0.22.1__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 (33) hide show
  1. {plain_dev-0.21.0 → plain_dev-0.22.1}/PKG-INFO +1 -1
  2. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/cli.py +8 -3
  3. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/contribute/cli.py +20 -2
  4. {plain_dev-0.21.0 → plain_dev-0.22.1}/pyproject.toml +1 -1
  5. {plain_dev-0.21.0 → plain_dev-0.22.1}/.gitignore +0 -0
  6. {plain_dev-0.21.0 → plain_dev-0.22.1}/LICENSE +0 -0
  7. {plain_dev-0.21.0 → plain_dev-0.22.1}/README.md +0 -0
  8. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/README.md +0 -0
  9. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/__init__.py +0 -0
  10. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/contribute/README.md +0 -0
  11. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/contribute/__init__.py +0 -0
  12. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/debug.py +0 -0
  13. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/default_settings.py +0 -0
  14. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/entrypoints.py +0 -0
  15. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/gunicorn_logging.json +0 -0
  16. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/mkcert.py +0 -0
  17. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/pdb.py +0 -0
  18. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/pid.py +0 -0
  19. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/poncho/__init__.py +0 -0
  20. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/poncho/color.py +0 -0
  21. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/poncho/compat.py +0 -0
  22. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/poncho/manager.py +0 -0
  23. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/poncho/printer.py +0 -0
  24. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/poncho/process.py +0 -0
  25. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/precommit/__init__.py +0 -0
  26. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/precommit/cli.py +0 -0
  27. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/requests.py +0 -0
  28. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/services.py +0 -0
  29. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/templates/dev/requests.html +0 -0
  30. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/urls.py +0 -0
  31. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/utils.py +0 -0
  32. {plain_dev-0.21.0 → plain_dev-0.22.1}/plain/dev/views.py +0 -0
  33. {plain_dev-0.21.0 → plain_dev-0.22.1}/tests/settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.dev
3
- Version: 0.21.0
3
+ Version: 0.22.1
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
@@ -219,9 +219,14 @@ class Dev:
219
219
  ).parent.parent
220
220
  if not settings.PLAIN_TEMP_PATH.exists():
221
221
  settings.PLAIN_TEMP_PATH.mkdir()
222
- src_path = settings.PLAIN_TEMP_PATH / "src"
223
- if plain_path.exists() and not src_path.exists():
224
- src_path.symlink_to(plain_path)
222
+ symlink_path = settings.PLAIN_TEMP_PATH / "src"
223
+
224
+ # Remove a broken symlink if it changed
225
+ if symlink_path.is_symlink() and not symlink_path.exists():
226
+ symlink_path.unlink()
227
+
228
+ if plain_path.exists() and not symlink_path.exists():
229
+ symlink_path.symlink_to(plain_path)
225
230
 
226
231
  def modify_hosts_file(self):
227
232
  """Modify the hosts file to map the custom domain to 127.0.0.1."""
@@ -10,8 +10,11 @@ import click
10
10
  @click.option(
11
11
  "--reset", is_flag=True, help="Undo any changes to pyproject.toml and uv.lock"
12
12
  )
13
+ @click.option(
14
+ "--all", "all_packages", is_flag=True, help="Link all installed plain packages"
15
+ )
13
16
  @click.argument("packages", nargs=-1)
14
- def cli(packages, repo, reset):
17
+ def cli(packages, repo, reset, all_packages):
15
18
  """Contribute to plain by linking packages locally."""
16
19
 
17
20
  if reset:
@@ -22,7 +25,7 @@ def cli(packages, repo, reset):
22
25
  sys.exit(result.returncode)
23
26
 
24
27
  click.secho("Running uv sync", bold=True)
25
- result = subprocess.run(["uv", "sync"])
28
+ result = subprocess.run(["uv", "sync", "--reinstall"])
26
29
  if result.returncode:
27
30
  click.secho("Failed to sync", fg="red")
28
31
  sys.exit(result.returncode)
@@ -52,6 +55,21 @@ def cli(packages, repo, reset):
52
55
  plain_packages = []
53
56
  plainx_packages = []
54
57
 
58
+ if all_packages:
59
+ # get all installed plain packages
60
+ output = subprocess.check_output(["uv", "pip", "freeze"])
61
+
62
+ installed_packages = output.decode()
63
+ if not installed_packages:
64
+ click.secho("No installed packages found", fg="red")
65
+ sys.exit(1)
66
+
67
+ packages = [
68
+ line.split("==")[0]
69
+ for line in installed_packages.splitlines()
70
+ if line.startswith("plain")
71
+ ]
72
+
55
73
  for package in packages:
56
74
  package = package.replace(".", "-")
57
75
  click.secho(f"Linking {package} to {repo}", bold=True)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "plain.dev"
3
- version = "0.21.0"
3
+ version = "0.22.1"
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