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.
- fujin/commands/__init__.py +0 -1
- fujin/commands/_base.py +2 -1
- fujin/commands/deploy.py +2 -1
- fujin/commands/init.py +2 -1
- fujin/commands/printenv.py +4 -2
- fujin/commands/redeploy.py +1 -1
- fujin/commands/rollback.py +2 -1
- fujin/commands/up.py +1 -1
- fujin/connection.py +3 -5
- fujin/hooks.py +2 -1
- fujin/secrets/__init__.py +4 -2
- fujin/secrets/bitwarden.py +16 -5
- fujin/secrets/onepassword.py +6 -5
- {fujin_cli-0.7.0.dist-info → fujin_cli-0.7.1.dist-info}/METADATA +1 -1
- {fujin_cli-0.7.0.dist-info → fujin_cli-0.7.1.dist-info}/RECORD +18 -18
- {fujin_cli-0.7.0.dist-info → fujin_cli-0.7.1.dist-info}/WHEEL +0 -0
- {fujin_cli-0.7.0.dist-info → fujin_cli-0.7.1.dist-info}/entry_points.txt +0 -0
- {fujin_cli-0.7.0.dist-info → fujin_cli-0.7.1.dist-info}/licenses/LICENSE.txt +0 -0
fujin/commands/__init__.py
CHANGED
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
|
|
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
|
|
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")
|
fujin/commands/printenv.py
CHANGED
|
@@ -5,12 +5,14 @@ from fujin.secrets import resolve_secrets
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
@cappa.command(
|
|
8
|
-
help="
|
|
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(
|
|
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)
|
fujin/commands/redeploy.py
CHANGED
fujin/commands/rollback.py
CHANGED
fujin/commands/up.py
CHANGED
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
|
-
|
|
13
|
-
|
|
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
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]
|
fujin/secrets/bitwarden.py
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
|
|
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
|
-
[
|
|
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
|
)
|
fujin/secrets/onepassword.py
CHANGED
|
@@ -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
|
|
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.
|
|
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=
|
|
4
|
+
fujin/connection.py,sha256=LL7LhX9p0X9FmiGdlSroD3Ht216QY0Kd51xkSrXmM3s,2479
|
|
5
5
|
fujin/errors.py,sha256=74Rh-Sgql1YspPdR_akQ2G3xZ48zecyafYCptpaFo1A,73
|
|
6
|
-
fujin/hooks.py,sha256=
|
|
7
|
-
fujin/commands/__init__.py,sha256=
|
|
8
|
-
fujin/commands/_base.py,sha256=
|
|
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=
|
|
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=
|
|
15
|
-
fujin/commands/printenv.py,sha256=
|
|
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=
|
|
19
|
-
fujin/commands/rollback.py,sha256=
|
|
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=
|
|
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=
|
|
29
|
-
fujin/secrets/bitwarden.py,sha256=
|
|
30
|
-
fujin/secrets/onepassword.py,sha256=
|
|
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.
|
|
35
|
-
fujin_cli-0.7.
|
|
36
|
-
fujin_cli-0.7.
|
|
37
|
-
fujin_cli-0.7.
|
|
38
|
-
fujin_cli-0.7.
|
|
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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|