plain.dev 0.20.2__py3-none-any.whl → 0.22.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/cli.py CHANGED
@@ -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:
@@ -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)
@@ -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.2
3
+ Version: 0.22.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,6 +1,6 @@
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
- plain/dev/cli.py,sha256=DkuMpWpfP0FxSFyl4jI7iXkChDWs7cfv_u4RM34rwH4,12911
3
+ plain/dev/cli.py,sha256=op9FTibH2RbM9QXo5lG6P_Ur5Inn1bhPQ9CJtzV_Kf4,13075
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
@@ -15,7 +15,7 @@ plain/dev/utils.py,sha256=4wMzpvj1Is_c0QxhsTu34_P9wAYlzw4glNPfVtZr_0A,123
15
15
  plain/dev/views.py,sha256=r2Ivk7OXytpRhXq4DZpsb7FXNP9vzmEE3D5kLajYG4w,1073
16
16
  plain/dev/contribute/README.md,sha256=v9Ympugu2wvDEe_045WJnF1dmC4ZH7v_Bnxkpfaf_rM,329
17
17
  plain/dev/contribute/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
18
- plain/dev/contribute/cli.py,sha256=mIK4u1rhee8iMovUpuHTNjfWolqNgS24_gTb8ZaSY-8,2432
18
+ plain/dev/contribute/cli.py,sha256=bjwOaLyYbKh-loaVlqivobXu7bBTi2h4hP9vTPsVQ8o,3008
19
19
  plain/dev/poncho/__init__.py,sha256=MDOk2rhhoR3V-I-rg6tMHFeX60vTGJuQ14RI-_N6tQY,97
20
20
  plain/dev/poncho/color.py,sha256=Dk77inPR9qNc9vCaZOGk8W9skXfRgoUlxp_E6mhPNns,610
21
21
  plain/dev/poncho/compat.py,sha256=l66WZLR7kRpO8P8DI5-aUsbNlohPaXEurQ5xXESQYDs,1276
@@ -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=3HP9I47HP_ekNz8z65yuMBO1-UKAMBbxNHSHp7VlCOM,3382
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.2.dist-info/METADATA,sha256=hrKWR26cSHCzuTIKbgkiN6qfUEC9eA_vfqveH53yh0g,4167
29
- plain_dev-0.20.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
- plain_dev-0.20.2.dist-info/entry_points.txt,sha256=UtjUbxI-2TMZJGCfRTeU-YGr48XLwnc_pMuzDGD9uTg,219
31
- plain_dev-0.20.2.dist-info/licenses/LICENSE,sha256=Cx4Dq9yR2fLHthf8Ke36B8QJvE1bZFXVzDIGE8wGzsY,4132
32
- plain_dev-0.20.2.dist-info/RECORD,,
28
+ plain_dev-0.22.0.dist-info/METADATA,sha256=_7kEioOgpeIk-NSLmXuk-kcWNM83XUMz78MRy0kBzec,4163
29
+ plain_dev-0.22.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
+ plain_dev-0.22.0.dist-info/entry_points.txt,sha256=UtjUbxI-2TMZJGCfRTeU-YGr48XLwnc_pMuzDGD9uTg,219
31
+ plain_dev-0.22.0.dist-info/licenses/LICENSE,sha256=Cx4Dq9yR2fLHthf8Ke36B8QJvE1bZFXVzDIGE8wGzsY,4132
32
+ plain_dev-0.22.0.dist-info/RECORD,,