devnomads-cli 0.3.0__py3-none-any.whl → 0.4.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.
- {devnomads_cli-0.3.0.dist-info → devnomads_cli-0.4.0.dist-info}/METADATA +4 -7
- devnomads_cli-0.4.0.dist-info/RECORD +7 -0
- dncli.py +12 -10
- devnomads_cli-0.3.0.dist-info/RECORD +0 -7
- {devnomads_cli-0.3.0.dist-info → devnomads_cli-0.4.0.dist-info}/WHEEL +0 -0
- {devnomads_cli-0.3.0.dist-info → devnomads_cli-0.4.0.dist-info}/entry_points.txt +0 -0
- {devnomads_cli-0.3.0.dist-info → devnomads_cli-0.4.0.dist-info}/licenses/LICENSE +0 -0
- {devnomads_cli-0.3.0.dist-info → devnomads_cli-0.4.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: devnomads-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Manage your DevNomads services from the command line
|
|
5
5
|
Author-email: DevNomads <support@devnomads.nl>
|
|
6
6
|
License: MIT
|
|
@@ -11,9 +11,7 @@ Requires-Dist: typer>=0.12
|
|
|
11
11
|
Requires-Dist: httpx>=0.27
|
|
12
12
|
Requires-Dist: rich>=13
|
|
13
13
|
Requires-Dist: cryptography>=42
|
|
14
|
-
Requires-Dist: devnomads>=0.1
|
|
15
|
-
Provides-Extra: cert
|
|
16
|
-
Requires-Dist: devnomads[acme]>=0.1; extra == "cert"
|
|
14
|
+
Requires-Dist: devnomads[acme]>=0.2.1
|
|
17
15
|
Dynamic: license-file
|
|
18
16
|
|
|
19
17
|
# dncli
|
|
@@ -56,7 +54,7 @@ Sleutels**, then store it:
|
|
|
56
54
|
dncli configure
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
The key is written to `~/.config/
|
|
57
|
+
The key is written to `~/.config/dncli/credentials`, readable only
|
|
60
58
|
by you. From here every command works:
|
|
61
59
|
|
|
62
60
|
```sh
|
|
@@ -128,10 +126,9 @@ dncli services list | jq -r '.[].entity'
|
|
|
128
126
|
|
|
129
127
|
## Certificates
|
|
130
128
|
|
|
131
|
-
|
|
129
|
+
`dncli` issues Let's Encrypt certificates over DNS-01 and HTTP-01:
|
|
132
130
|
|
|
133
131
|
```sh
|
|
134
|
-
uv tool install "devnomads-cli[cert]"
|
|
135
132
|
dncli cert issue example.com -d "*.example.com"
|
|
136
133
|
```
|
|
137
134
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
dncli.py,sha256=uwTUA1kcAoDFblv7-HtXwntttGw4jS80EH4GVI1Rrtk,108784
|
|
2
|
+
devnomads_cli-0.4.0.dist-info/licenses/LICENSE,sha256=WPXQ_lmpr3tVzTD9Z6VTiBgFnFey-cEwEYoG4HlmbxY,1066
|
|
3
|
+
devnomads_cli-0.4.0.dist-info/METADATA,sha256=q-fIn2EWeUs7b93gVlP8yywoTImm6XCBds8gLQ0s1-4,3690
|
|
4
|
+
devnomads_cli-0.4.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
5
|
+
devnomads_cli-0.4.0.dist-info/entry_points.txt,sha256=irLaKiGtIzEKi87exmXAg0srUmoDK31fL0SlqJasAEU,69
|
|
6
|
+
devnomads_cli-0.4.0.dist-info/top_level.txt,sha256=rFWIJDQgL3jA2q6b2GAqZgCknDED4WLxNcHTktuWS1I,6
|
|
7
|
+
devnomads_cli-0.4.0.dist-info/RECORD,,
|
dncli.py
CHANGED
|
@@ -44,6 +44,7 @@ from devnomads.api import DevNomadsError
|
|
|
44
44
|
from devnomads.api.client import _unwrap as _lib_unwrap
|
|
45
45
|
from devnomads.dns import Dns, challenge_name
|
|
46
46
|
from rich.console import Console
|
|
47
|
+
from rich.markup import escape
|
|
47
48
|
from rich.table import Table
|
|
48
49
|
from typer.core import TyperGroup
|
|
49
50
|
|
|
@@ -71,7 +72,7 @@ class CliError(typer.Exit):
|
|
|
71
72
|
|
|
72
73
|
def __init__(self, message: str) -> None:
|
|
73
74
|
# soft_wrap keeps the error a single grep-able line
|
|
74
|
-
err_console.print(f"[red]error:[/] {message}", soft_wrap=True)
|
|
75
|
+
err_console.print(f"[red]error:[/] {escape(message)}", soft_wrap=True)
|
|
75
76
|
self.message = message
|
|
76
77
|
super().__init__(code=1)
|
|
77
78
|
|
|
@@ -85,7 +86,7 @@ def config_dir() -> Path:
|
|
|
85
86
|
return Path(env_dir)
|
|
86
87
|
xdg = os.environ.get("XDG_CONFIG_HOME")
|
|
87
88
|
base = Path(xdg) if xdg else Path.home() / ".config"
|
|
88
|
-
return base / "
|
|
89
|
+
return base / "dncli"
|
|
89
90
|
|
|
90
91
|
|
|
91
92
|
def credentials_path() -> Path:
|
|
@@ -1275,10 +1276,12 @@ def _hook_dispatch(dns: Dns, operation: str, args: list[str]) -> int:
|
|
|
1275
1276
|
else:
|
|
1276
1277
|
dns.unset_txt(record, token_value)
|
|
1277
1278
|
except (AuthError, ApiError) as exc:
|
|
1278
|
-
err_console.print(
|
|
1279
|
+
err_console.print(
|
|
1280
|
+
f"[red]error:[/] {escape(_error_message(exc.status, exc.detail))}"
|
|
1281
|
+
)
|
|
1279
1282
|
return 1
|
|
1280
1283
|
except DevNomadsError as exc:
|
|
1281
|
-
err_console.print(f"[red]error:[/] {exc}")
|
|
1284
|
+
err_console.print(f"[red]error:[/] {escape(str(exc))}")
|
|
1282
1285
|
return 1
|
|
1283
1286
|
return 0
|
|
1284
1287
|
|
|
@@ -1306,7 +1309,7 @@ def hook_main(argv: list[str] | None = None) -> int:
|
|
|
1306
1309
|
try:
|
|
1307
1310
|
client = ApiClient.from_environment()
|
|
1308
1311
|
except DevNomadsError as exc:
|
|
1309
|
-
err_console.print(f"[red]error:[/] {exc}")
|
|
1312
|
+
err_console.print(f"[red]error:[/] {escape(str(exc))}")
|
|
1310
1313
|
return 1
|
|
1311
1314
|
try:
|
|
1312
1315
|
return _hook_dispatch(Dns(client), operation, argv[2:])
|
|
@@ -1360,16 +1363,15 @@ CERT_RENEW_WINDOW_DAYS = 30
|
|
|
1360
1363
|
|
|
1361
1364
|
|
|
1362
1365
|
def _load_acme() -> Any:
|
|
1363
|
-
"""Import devnomads.acme lazily,
|
|
1364
|
-
|
|
1366
|
+
"""Import devnomads.acme lazily, so non-cert commands skip the ACME
|
|
1367
|
+
stack at startup."""
|
|
1365
1368
|
|
|
1366
1369
|
try:
|
|
1367
1370
|
import devnomads.acme as acme
|
|
1368
1371
|
except ImportError as exc:
|
|
1369
1372
|
raise CliError(
|
|
1370
|
-
"
|
|
1371
|
-
'pip install "devnomads-cli
|
|
1372
|
-
'(or: uv tool install "devnomads-cli[cert]")'
|
|
1373
|
+
"could not import devnomads.acme; the install looks broken - "
|
|
1374
|
+
'reinstall with: pip install --force-reinstall "devnomads-cli"'
|
|
1373
1375
|
) from exc
|
|
1374
1376
|
return acme
|
|
1375
1377
|
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
dncli.py,sha256=ko7wnAVzPtKB5SqOSPcDi3KnlAYUkVHxWBoeBzEVuhg,108715
|
|
2
|
-
devnomads_cli-0.3.0.dist-info/licenses/LICENSE,sha256=WPXQ_lmpr3tVzTD9Z6VTiBgFnFey-cEwEYoG4HlmbxY,1066
|
|
3
|
-
devnomads_cli-0.3.0.dist-info/METADATA,sha256=1FCMVmmB4zdSQkXFIODUkmz8BD3DyKQu0G_JoJdtizI,3797
|
|
4
|
-
devnomads_cli-0.3.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
5
|
-
devnomads_cli-0.3.0.dist-info/entry_points.txt,sha256=irLaKiGtIzEKi87exmXAg0srUmoDK31fL0SlqJasAEU,69
|
|
6
|
-
devnomads_cli-0.3.0.dist-info/top_level.txt,sha256=rFWIJDQgL3jA2q6b2GAqZgCknDED4WLxNcHTktuWS1I,6
|
|
7
|
-
devnomads_cli-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|