fujin-cli 0.9.1__py3-none-any.whl → 0.10.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.

Potentially problematic release.


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

fujin/commands/prune.py CHANGED
@@ -8,7 +8,7 @@ from fujin.commands import BaseCommand
8
8
 
9
9
 
10
10
  @cappa.command(
11
- help="Prune old version artifacts, keeping only the specified number of recent versions"
11
+ help="Prune old artifacts, keeping only the specified number of recent versions"
12
12
  )
13
13
  @dataclass
14
14
  class Prune(BaseCommand):
fujin/config.py CHANGED
@@ -55,6 +55,7 @@ The secret management service to use. Available options:
55
55
 
56
56
  - ``bitwarden``
57
57
  - ``1password``
58
+ - ``doppler``
58
59
 
59
60
  password_env
60
61
  ~~~~~~~~~~~~
@@ -221,6 +222,7 @@ class InstallationMode(StrEnum):
221
222
  class SecretAdapter(StrEnum):
222
223
  BITWARDEN = "bitwarden"
223
224
  ONE_PASSWORD = "1password"
225
+ DOPPLER = "doppler"
224
226
 
225
227
 
226
228
  class SecretConfig(msgspec.Struct):
fujin/secrets/__init__.py CHANGED
@@ -10,6 +10,7 @@ from dotenv import dotenv_values
10
10
  from fujin.config import SecretAdapter
11
11
  from fujin.config import SecretConfig
12
12
  from .bitwarden import bitwarden
13
+ from .dopppler import doppler
13
14
  from .onepassword import one_password
14
15
 
15
16
  secret_reader = Callable[[str], str]
@@ -18,6 +19,7 @@ secret_adapter_context = Callable[[SecretConfig], ContextManager[secret_reader]]
18
19
  adapter_to_context: dict[SecretAdapter, secret_adapter_context] = {
19
20
  SecretAdapter.BITWARDEN: bitwarden,
20
21
  SecretAdapter.ONE_PASSWORD: one_password,
22
+ SecretAdapter.DOPPLER: doppler,
21
23
  }
22
24
 
23
25
 
@@ -0,0 +1,31 @@
1
+ from __future__ import annotations
2
+
3
+ import subprocess
4
+ from contextlib import contextmanager
5
+ from typing import Generator
6
+ from typing import TYPE_CHECKING
7
+
8
+ import cappa
9
+
10
+ from fujin.config import SecretConfig
11
+
12
+ if TYPE_CHECKING:
13
+ from . import secret_reader
14
+
15
+
16
+ @contextmanager
17
+ def doppler(_: SecretConfig) -> Generator[secret_reader, None, None]:
18
+ def read_secret(name: str) -> str:
19
+ result = subprocess.run(
20
+ ["doppler", "run", "--command", f"echo ${name}"],
21
+ capture_output=True,
22
+ text=True,
23
+ )
24
+ if result.returncode != 0:
25
+ raise cappa.Exit(result.stderr)
26
+ return result.stdout.strip()
27
+
28
+ try:
29
+ yield read_secret
30
+ finally:
31
+ pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fujin-cli
3
- Version: 0.9.1
3
+ Version: 0.10.0
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,6 +1,6 @@
1
1
  fujin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  fujin/__main__.py,sha256=VJMBzuQuxkQaAKNEySktGnms944bkRsrIAjj-XeaWR8,1813
3
- fujin/config.py,sha256=jE5iAu1ouHgv2eTut6CRBiKIzK-vxJqVtZuOr6NICEM,11365
3
+ fujin/config.py,sha256=xh7yAStKcCx2bcIgzK0-ocLMtiqsgUtar9xqpqKQKww,11403
4
4
  fujin/connection.py,sha256=LL7LhX9p0X9FmiGdlSroD3Ht216QY0Kd51xkSrXmM3s,2479
5
5
  fujin/errors.py,sha256=74Rh-Sgql1YspPdR_akQ2G3xZ48zecyafYCptpaFo1A,73
6
6
  fujin/hooks.py,sha256=EDVYNozlDJ5kc1xHtZrXgtuKplUMEMPTp65TLMP02Ek,1449
@@ -15,7 +15,7 @@ fujin/commands/down.py,sha256=aw_mxl_TMC66plKTXwlYP1W2XQBmHeROltQqOpQssyE,1577
15
15
  fujin/commands/init.py,sha256=AHAZeYkSk-zShF288Zs4rCfVwalCUqeMXWR6GTks2v0,4046
16
16
  fujin/commands/printenv.py,sha256=bS2mIgk7zd_w3yDhZLTa1PkHIzuSbBWjnYyM8CUjX0k,523
17
17
  fujin/commands/proxy.py,sha256=ajXwboS0gDDiMWW7b9rtWU6WPF1h7JYYeycDyU-hQfg,3053
18
- fujin/commands/prune.py,sha256=C2aAN6AUS84jgRg1eiCroyiuZyaZDmf5yvGAQY9xkcg,1517
18
+ fujin/commands/prune.py,sha256=3Y0ZpgoI8eb_FVD6XMmZK9lEp2delKUeJdK09kv9_08,1509
19
19
  fujin/commands/redeploy.py,sha256=491Mzz0qiaHqcI7BFUtZq-M34WQkiBd2ZgQbLRLp8T8,2355
20
20
  fujin/commands/rollback.py,sha256=JsocJzQcdQelSnYD94klhjBh8UKkkdiRD9shfUfo4FI,2032
21
21
  fujin/commands/server.py,sha256=-3-PyBNR0fGm-RYE3fz50kP-LSDYGU9BzUxrbGZEghc,3312
@@ -24,14 +24,15 @@ fujin/proxies/__init__.py,sha256=UuWYU175tkdaz1WWRCDDpQgGfFVYYNR9PBxA3lTCNr0,695
24
24
  fujin/proxies/caddy.py,sha256=H52D7cGEEGcxDaXxvClnny9lAat_h1G9dYlIlf6gwKo,7933
25
25
  fujin/proxies/dummy.py,sha256=qBKSn8XNEA9SVwB7GzRNX2l9Iw6tUjo2CFqZjWi0FjY,465
26
26
  fujin/proxies/nginx.py,sha256=BNJNLxLLRVAmBIGVCk8pb16iiSJsOI9jXOZhdSQGtX8,4151
27
- fujin/secrets/__init__.py,sha256=hiNZIBtOwM0WQbvAF3GhuMMCsQCjXjiSr5gTLAGN-VI,1375
27
+ fujin/secrets/__init__.py,sha256=WkdCtnBXjB7y_HHUWySf53LEe15Z7CZbE3cfDGxZiA8,1441
28
28
  fujin/secrets/bitwarden.py,sha256=01GZL5hYwZzL6yXy5ab3L3kgBFBeOT8i3Yg9GC8YwFU,2008
29
+ fujin/secrets/dopppler.py,sha256=t5SGfyuA0RxsD9uvrAu4cG2TBDIUgB5gb6XYXPrd61Y,724
29
30
  fujin/secrets/onepassword.py,sha256=6Xj3XWttKfcjMbcoMZvXVpJW1KHxlD785DysmX_mqvk,654
30
31
  fujin/templates/simple.service,sha256=-lyKjmSyfHGucP4O_vRQE1NNaHq0Qjsc0twdwoRLgI0,321
31
32
  fujin/templates/web.service,sha256=NZ7ZeaFvV_MZTBn8QqRQeu8PIrWHf3aWYWNzjOQeqCw,685
32
33
  fujin/templates/web.socket,sha256=2lJsiOHlMJL0YlN7YBLLnr5zqsytPEt81yP34nk0dmc,173
33
- fujin_cli-0.9.1.dist-info/METADATA,sha256=5mtskwHoka7b0M4fs897ic7prKs3NgTBrdeMSWlfKBk,4576
34
- fujin_cli-0.9.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
35
- fujin_cli-0.9.1.dist-info/entry_points.txt,sha256=Y_TBtKt3j11qhwquMexZR5yqnDEqOBDACtresqQFE-s,46
36
- fujin_cli-0.9.1.dist-info/licenses/LICENSE.txt,sha256=0QF8XfuH0zkIHhSet6teXfiCze6JSdr8inRkmLLTDyo,1099
37
- fujin_cli-0.9.1.dist-info/RECORD,,
34
+ fujin_cli-0.10.0.dist-info/METADATA,sha256=MBl9vT2C2Iq8pxVkuC9vgfmV7lhWBoZxjKxRf854QkQ,4577
35
+ fujin_cli-0.10.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
36
+ fujin_cli-0.10.0.dist-info/entry_points.txt,sha256=Y_TBtKt3j11qhwquMexZR5yqnDEqOBDACtresqQFE-s,46
37
+ fujin_cli-0.10.0.dist-info/licenses/LICENSE.txt,sha256=0QF8XfuH0zkIHhSet6teXfiCze6JSdr8inRkmLLTDyo,1099
38
+ fujin_cli-0.10.0.dist-info/RECORD,,