plain.code 0.7.1__tar.gz → 0.8.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.
- {plain_code-0.7.1 → plain_code-0.8.1}/PKG-INFO +1 -1
- {plain_code-0.7.1 → plain_code-0.8.1}/plain/code/biome.py +6 -0
- {plain_code-0.7.1 → plain_code-0.8.1}/plain/code/biome_defaults.json +1 -1
- {plain_code-0.7.1 → plain_code-0.8.1}/plain/code/cli.py +17 -9
- {plain_code-0.7.1 → plain_code-0.8.1}/pyproject.toml +1 -1
- {plain_code-0.7.1 → plain_code-0.8.1}/.gitignore +0 -0
- {plain_code-0.7.1 → plain_code-0.8.1}/LICENSE +0 -0
- {plain_code-0.7.1 → plain_code-0.8.1}/README.md +0 -0
- {plain_code-0.7.1 → plain_code-0.8.1}/plain/code/README.md +0 -0
- {plain_code-0.7.1 → plain_code-0.8.1}/plain/code/__init__.py +0 -0
- {plain_code-0.7.1 → plain_code-0.8.1}/plain/code/entrypoints.py +0 -0
- {plain_code-0.7.1 → plain_code-0.8.1}/plain/code/ruff_defaults.toml +0 -0
|
@@ -105,6 +105,12 @@ class Biome:
|
|
|
105
105
|
)
|
|
106
106
|
resp = requests.get(url, stream=True)
|
|
107
107
|
resp.raise_for_status()
|
|
108
|
+
|
|
109
|
+
# Make sure the target directory exists
|
|
110
|
+
td = self.target_directory
|
|
111
|
+
if not os.path.isdir(td):
|
|
112
|
+
os.makedirs(td, exist_ok=True)
|
|
113
|
+
|
|
108
114
|
with open(self.standalone_path, "wb") as f:
|
|
109
115
|
for chunk in resp.iter_content(chunk_size=8192):
|
|
110
116
|
f.write(chunk)
|
|
@@ -21,18 +21,26 @@ def cli():
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
@cli.command()
|
|
24
|
+
@click.option("--force", is_flag=True, help="Reinstall even if up to date")
|
|
24
25
|
@click.pass_context
|
|
25
|
-
def install(ctx):
|
|
26
|
+
def install(ctx, force):
|
|
26
27
|
"""Install or update the Biome standalone per configuration."""
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
biome = Biome()
|
|
29
|
+
|
|
30
|
+
if force or not biome.is_installed() or biome.needs_update():
|
|
31
|
+
version_to_install = get_code_config().get("biome", {}).get("version", "")
|
|
32
|
+
if version_to_install:
|
|
33
|
+
click.secho(
|
|
34
|
+
f"Installing Biome standalone version {version_to_install}...",
|
|
35
|
+
bold=True,
|
|
36
|
+
nl=False,
|
|
37
|
+
)
|
|
38
|
+
installed = biome.install(version_to_install)
|
|
39
|
+
click.secho(f"Biome {installed} installed", fg="green")
|
|
40
|
+
else:
|
|
41
|
+
ctx.invoke(update)
|
|
34
42
|
else:
|
|
35
|
-
|
|
43
|
+
click.secho("Biome already installed", fg="green")
|
|
36
44
|
|
|
37
45
|
|
|
38
46
|
@cli.command()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|