fujin-cli 0.7.0__py3-none-any.whl → 0.7.1__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.

Potentially problematic release.


This version of fujin-cli might be problematic. Click here for more details.

@@ -1,2 +1 @@
1
1
  from ._base import BaseCommand # noqa
2
- from ._base import BaseCommand # noqa
fujin/commands/_base.py CHANGED
@@ -6,7 +6,8 @@ from functools import cached_property
6
6
  import cappa
7
7
 
8
8
  from fujin.config import Config
9
- from fujin.connection import host_connection, Connection
9
+ from fujin.connection import Connection
10
+ from fujin.connection import host_connection
10
11
  from fujin.errors import ImproperlyConfiguredError
11
12
  from fujin.hooks import HookManager
12
13
  from fujin.process_managers import ProcessManager
fujin/commands/deploy.py CHANGED
@@ -7,8 +7,8 @@ import cappa
7
7
 
8
8
  from fujin.commands import BaseCommand
9
9
  from fujin.config import InstallationMode
10
- from fujin.secrets import resolve_secrets
11
10
  from fujin.connection import Connection
11
+ from fujin.secrets import resolve_secrets
12
12
 
13
13
 
14
14
  @cappa.command(
@@ -100,6 +100,7 @@ export PATH=".venv/bin:$PATH"
100
100
  conn.run(f"echo '{appenv.strip()}' > {self.app_dir}/.appenv")
101
101
  versioned_assets_dir = f"{self.app_dir}/v{version}"
102
102
  if not skip_setup:
103
+ conn.run("rm -rf .venv")
103
104
  conn.run("uv venv")
104
105
  if self.config.requirements:
105
106
  conn.run(f"uv pip install -r {versioned_assets_dir}/requirements.txt")
fujin/commands/init.py CHANGED
@@ -8,7 +8,8 @@ import cappa
8
8
  import tomli_w
9
9
 
10
10
  from fujin.commands import BaseCommand
11
- from fujin.config import tomllib, InstallationMode
11
+ from fujin.config import InstallationMode
12
+ from fujin.config import tomllib
12
13
 
13
14
 
14
15
  @cappa.command(help="Generate a sample configuration file")
@@ -5,12 +5,14 @@ from fujin.secrets import resolve_secrets
5
5
 
6
6
 
7
7
  @cappa.command(
8
- help="Print the content of the envfile with extracted secrets (for debugging)"
8
+ help="Display the contents of the envfile with resolved secrets (for debugging purposes)"
9
9
  )
10
10
  class Printenv(BaseCommand):
11
11
  def __call__(self):
12
12
  if self.config.secret_config:
13
- result = resolve_secrets(self.config.host.envfile, self.config.secret_config)
13
+ result = resolve_secrets(
14
+ self.config.host.envfile, self.config.secret_config
15
+ )
14
16
  else:
15
17
  result = self.config.host.envfile.read_text()
16
18
  self.stdout.output(result)
@@ -5,8 +5,8 @@ from pathlib import Path
5
5
 
6
6
  import cappa
7
7
 
8
- from fujin.commands import BaseCommand
9
8
  from .deploy import Deploy
9
+ from fujin.commands import BaseCommand
10
10
  from fujin.config import InstallationMode
11
11
  from fujin.connection import Connection
12
12
 
@@ -1,7 +1,8 @@
1
1
  from dataclasses import dataclass
2
2
 
3
3
  import cappa
4
- from rich.prompt import Prompt, Confirm
4
+ from rich.prompt import Confirm
5
+ from rich.prompt import Prompt
5
6
 
6
7
  from fujin.commands import BaseCommand
7
8
  from fujin.commands.deploy import Deploy
fujin/commands/up.py CHANGED
@@ -1,8 +1,8 @@
1
1
  import cappa
2
- from fujin.commands import BaseCommand
3
2
 
4
3
  from .deploy import Deploy
5
4
  from .server import Server
5
+ from fujin.commands import BaseCommand
6
6
 
7
7
 
8
8
  @cappa.command(help="Run everything required to deploy an application to a fresh host.")
fujin/connection.py CHANGED
@@ -8,11 +8,9 @@ import cappa
8
8
  from fabric import Connection
9
9
  from invoke import Responder
10
10
  from invoke.exceptions import UnexpectedExit
11
- from paramiko.ssh_exception import (
12
- AuthenticationException,
13
- NoValidConnectionsError,
14
- SSHException,
15
- )
11
+ from paramiko.ssh_exception import AuthenticationException
12
+ from paramiko.ssh_exception import NoValidConnectionsError
13
+ from paramiko.ssh_exception import SSHException
16
14
 
17
15
  if TYPE_CHECKING:
18
16
  from fujin.config import HostConfig
fujin/hooks.py CHANGED
@@ -1,8 +1,9 @@
1
1
  from dataclasses import dataclass
2
2
 
3
- from fujin.connection import Connection
4
3
  from rich import print as rich_print
5
4
 
5
+ from fujin.connection import Connection
6
+
6
7
  try:
7
8
  from enum import StrEnum
8
9
  except ImportError:
fujin/secrets/__init__.py CHANGED
@@ -1,13 +1,15 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from pathlib import Path
4
+ from typing import Callable
5
+
4
6
  import gevent
5
7
  from dotenv import dotenv_values
6
- from typing import Callable
7
8
 
8
- from fujin.config import SecretConfig, SecretAdapter
9
9
  from .bitwarden import bitwarden
10
10
  from .onepassword import one_password
11
+ from fujin.config import SecretAdapter
12
+ from fujin.config import SecretConfig
11
13
 
12
14
 
13
15
  secret_reader = Callable[[str], str]
@@ -1,12 +1,14 @@
1
1
  from __future__ import annotations
2
- import cappa
2
+
3
3
  import os
4
+ import subprocess
5
+ from contextlib import contextmanager
6
+ from typing import Generator
7
+ from typing import TYPE_CHECKING
4
8
 
9
+ import cappa
5
10
 
6
11
  from fujin.config import SecretConfig
7
- import subprocess
8
- from contextlib import contextmanager
9
- from typing import Generator, TYPE_CHECKING
10
12
 
11
13
  if TYPE_CHECKING:
12
14
  from . import secret_reader
@@ -25,7 +27,16 @@ def bitwarden(secret_config: SecretConfig) -> Generator[secret_reader, None, Non
25
27
 
26
28
  def read_secret(name: str) -> str:
27
29
  result = subprocess.run(
28
- ["bw", "get", "password", name, "--raw", "--session", session, "--nointeraction"],
30
+ [
31
+ "bw",
32
+ "get",
33
+ "password",
34
+ name,
35
+ "--raw",
36
+ "--session",
37
+ session,
38
+ "--nointeraction",
39
+ ],
29
40
  capture_output=True,
30
41
  text=True,
31
42
  )
@@ -1,12 +1,13 @@
1
1
  from __future__ import annotations
2
- import cappa
3
-
4
2
 
5
- from fujin.config import SecretConfig
6
3
  import subprocess
7
-
8
4
  from contextlib import contextmanager
9
- from typing import Generator, TYPE_CHECKING
5
+ from typing import Generator
6
+ from typing import TYPE_CHECKING
7
+
8
+ import cappa
9
+
10
+ from fujin.config import SecretConfig
10
11
 
11
12
  if TYPE_CHECKING:
12
13
  from . import secret_reader
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fujin-cli
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Get your project up and running in a few minutes on your own vps.
5
5
  Project-URL: Documentation, https://github.com/falcopackages/fujin#readme
6
6
  Project-URL: Issues, https://github.com/falcopackages/fujin/issues
@@ -1,38 +1,38 @@
1
1
  fujin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  fujin/__main__.py,sha256=VJMBzuQuxkQaAKNEySktGnms944bkRsrIAjj-XeaWR8,1813
3
3
  fujin/config.py,sha256=pdWK4fM3BITpz0MAv_ydCXRcQbgC3eLz--APdOpehiQ,10412
4
- fujin/connection.py,sha256=ZkYaNykRFj9Yr-K-vOrZtVVGUDurDm6W7OQrgct71CA,2428
4
+ fujin/connection.py,sha256=LL7LhX9p0X9FmiGdlSroD3Ht216QY0Kd51xkSrXmM3s,2479
5
5
  fujin/errors.py,sha256=74Rh-Sgql1YspPdR_akQ2G3xZ48zecyafYCptpaFo1A,73
6
- fujin/hooks.py,sha256=QHIqxLxujG2U70UkN1BpUplE6tTqn7pFJP5oHde1tUQ,1350
7
- fujin/commands/__init__.py,sha256=uIGGXt8YofL5RZn8KIy153ioWGoCl32ffHtqOhB-6ZM,78
8
- fujin/commands/_base.py,sha256=o3R4-c3XeFWTIW3stiUdrcCPwdjzfjUVIpZy2L1-gZ4,2525
6
+ fujin/hooks.py,sha256=nTn2PHpFuKbl_iAXUxagkrGcuwT2Exx8zIq4YfleX8A,1351
7
+ fujin/commands/__init__.py,sha256=g0b13vzidPUbxne_Zo_Wv5jpEmwCiSK4AokCinH9uo4,39
8
+ fujin/commands/_base.py,sha256=NfBdRBx_l7tYnVg0L8A3tPFC_XmtuHq-toU66KT5CiE,2553
9
9
  fujin/commands/app.py,sha256=mazb4dCTdR5juh79bL3a9b68Nd6O8u_nR9IgYqQlqWE,5279
10
10
  fujin/commands/config.py,sha256=xdfd1OZLxw2YZldiAbW5rq5EBXEaXbUC-I7FKLRfzIQ,2387
11
- fujin/commands/deploy.py,sha256=SUI_aMqTmaWHVtyX03rjrbWMYESoysAykcvILsEtsWk,5897
11
+ fujin/commands/deploy.py,sha256=PfEdLS-rkdF12BfjtLEyqbnn1K4dEYRh7h6CFtWb2zs,5934
12
12
  fujin/commands/docs.py,sha256=b5FZ8AgoAfn4q4BueEQvM2w5HCuh8-rwBqv_CRFVU8E,349
13
13
  fujin/commands/down.py,sha256=v1lAq70ApktjeHRB_1sCzjmKH8t6EXqyL4RTt7OE-f0,1716
14
- fujin/commands/init.py,sha256=t8uwwOi4SBqHjV8px_SkTHAeZIiIUJnFN-lf7DK6HhE,3959
15
- fujin/commands/printenv.py,sha256=1xz80UCKpz64wsR9rYStro0K6pkKndNoNQvusEMYRuQ,486
14
+ fujin/commands/init.py,sha256=zREfkIQyC6etqqQ6hgvDqpNNWQT4bk_8IOPBBT5-YUE,3983
15
+ fujin/commands/printenv.py,sha256=bpGmOfc1t_dKWb8gy7EILYtwEyI9pIwhKg2XPKyJ9cQ,527
16
16
  fujin/commands/proxy.py,sha256=ajXwboS0gDDiMWW7b9rtWU6WPF1h7JYYeycDyU-hQfg,3053
17
17
  fujin/commands/prune.py,sha256=C2aAN6AUS84jgRg1eiCroyiuZyaZDmf5yvGAQY9xkcg,1517
18
- fujin/commands/redeploy.py,sha256=qYPM_Klj_2G1Up4ICu-8rklcqIbU-uohddmAzAA5sy0,2378
19
- fujin/commands/rollback.py,sha256=BN9vOTEBcSSpFIfck9nzWvMVO7asVC20lQbcNrxRchg,2009
18
+ fujin/commands/redeploy.py,sha256=z1giY9SpINdJt8UagPlvUkJu30c8fgqapNqOxG4Jfuo,2378
19
+ fujin/commands/rollback.py,sha256=JsocJzQcdQelSnYD94klhjBh8UKkkdiRD9shfUfo4FI,2032
20
20
  fujin/commands/server.py,sha256=0N_P_Luj31t56riZ8GfgRqW3vRHiw0cDrlp3PFoyWn8,3453
21
- fujin/commands/up.py,sha256=DgDN-1mc_mMHJRCIvcB947Cd5a7phunu9NpXloGK0UU,419
21
+ fujin/commands/up.py,sha256=OEK_n-6-mnnIUffFpR7QtVunr1V1F04pxlAAS1U62BY,419
22
22
  fujin/process_managers/__init__.py,sha256=MhhfTBhm64zWRAKgjvsZRIToOUJus60vGScbAjqpQ6Y,994
23
23
  fujin/process_managers/systemd.py,sha256=qG_4Ew8SEWtaTFOAW_XZXsMO2WjFWZ4dp5nBwAPBObk,5603
24
24
  fujin/proxies/__init__.py,sha256=UuWYU175tkdaz1WWRCDDpQgGfFVYYNR9PBxA3lTCNr0,695
25
25
  fujin/proxies/caddy.py,sha256=dzLD8s664_kIK-1hCE3y50JIwBd8kK9yS1LynUDRVSE,7908
26
26
  fujin/proxies/dummy.py,sha256=qBKSn8XNEA9SVwB7GzRNX2l9Iw6tUjo2CFqZjWi0FjY,465
27
27
  fujin/proxies/nginx.py,sha256=BNJNLxLLRVAmBIGVCk8pb16iiSJsOI9jXOZhdSQGtX8,4151
28
- fujin/secrets/__init__.py,sha256=WFFe81fB6R3dzdvYsdPT9x-fE2LwpyrfF0nCuWrQNRw,1192
29
- fujin/secrets/bitwarden.py,sha256=rJ_n7CQT02TwwqN9lHQkh56g5BETKhZBtjWi3bOA8rQ,1846
30
- fujin/secrets/onepassword.py,sha256=2ySDY7fNW_sOqH-I89rfz3uMiBu0mJRHot4yKlTRbrE,636
28
+ fujin/secrets/__init__.py,sha256=p4rY4J7yRoEEz6OXkomJ_Ov2AaaQ37-Zd_TJGpUDPgQ,1217
29
+ fujin/secrets/bitwarden.py,sha256=01GZL5hYwZzL6yXy5ab3L3kgBFBeOT8i3Yg9GC8YwFU,2008
30
+ fujin/secrets/onepassword.py,sha256=6Xj3XWttKfcjMbcoMZvXVpJW1KHxlD785DysmX_mqvk,654
31
31
  fujin/templates/simple.service,sha256=-lyKjmSyfHGucP4O_vRQE1NNaHq0Qjsc0twdwoRLgI0,321
32
32
  fujin/templates/web.service,sha256=NZ7ZeaFvV_MZTBn8QqRQeu8PIrWHf3aWYWNzjOQeqCw,685
33
33
  fujin/templates/web.socket,sha256=2lJsiOHlMJL0YlN7YBLLnr5zqsytPEt81yP34nk0dmc,173
34
- fujin_cli-0.7.0.dist-info/METADATA,sha256=0H7E8Re_jONc6BsoAdATLKM3r8QIrA_lT1oRgG3gWIw,4576
35
- fujin_cli-0.7.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
36
- fujin_cli-0.7.0.dist-info/entry_points.txt,sha256=Y_TBtKt3j11qhwquMexZR5yqnDEqOBDACtresqQFE-s,46
37
- fujin_cli-0.7.0.dist-info/licenses/LICENSE.txt,sha256=0QF8XfuH0zkIHhSet6teXfiCze6JSdr8inRkmLLTDyo,1099
38
- fujin_cli-0.7.0.dist-info/RECORD,,
34
+ fujin_cli-0.7.1.dist-info/METADATA,sha256=kqTIyfQ_EtbpdoaSkBmrF5Wy6y838HLaqLJHbLko3L4,4576
35
+ fujin_cli-0.7.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
36
+ fujin_cli-0.7.1.dist-info/entry_points.txt,sha256=Y_TBtKt3j11qhwquMexZR5yqnDEqOBDACtresqQFE-s,46
37
+ fujin_cli-0.7.1.dist-info/licenses/LICENSE.txt,sha256=0QF8XfuH0zkIHhSet6teXfiCze6JSdr8inRkmLLTDyo,1099
38
+ fujin_cli-0.7.1.dist-info/RECORD,,