nextmv 1.0.0.dev3__py3-none-any.whl → 1.0.0.dev4__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.
- nextmv/__about__.py +1 -1
- nextmv/cli/CONTRIBUTING.md +81 -29
- nextmv/cli/cloud/acceptance/create.py +20 -22
- nextmv/cli/cloud/acceptance/delete.py +7 -8
- nextmv/cli/cloud/acceptance/get.py +9 -10
- nextmv/cli/cloud/acceptance/list.py +3 -3
- nextmv/cli/cloud/acceptance/update.py +6 -6
- nextmv/cli/cloud/account/__init__.py +3 -3
- nextmv/cli/cloud/account/create.py +11 -11
- nextmv/cli/cloud/account/delete.py +6 -7
- nextmv/cli/cloud/account/get.py +3 -3
- nextmv/cli/cloud/account/update.py +5 -5
- nextmv/cli/cloud/app/create.py +25 -26
- nextmv/cli/cloud/app/delete.py +5 -6
- nextmv/cli/cloud/app/exists.py +2 -2
- nextmv/cli/cloud/app/get.py +2 -2
- nextmv/cli/cloud/app/list.py +3 -3
- nextmv/cli/cloud/app/push.py +269 -45
- nextmv/cli/cloud/app/update.py +12 -12
- nextmv/cli/cloud/batch/create.py +26 -28
- nextmv/cli/cloud/batch/delete.py +5 -6
- nextmv/cli/cloud/batch/get.py +8 -8
- nextmv/cli/cloud/batch/list.py +3 -3
- nextmv/cli/cloud/batch/metadata.py +4 -4
- nextmv/cli/cloud/batch/update.py +6 -6
- nextmv/cli/cloud/data/__init__.py +1 -1
- nextmv/cli/cloud/data/upload.py +15 -15
- nextmv/cli/cloud/ensemble/__init__.py +2 -0
- nextmv/cli/cloud/ensemble/create.py +21 -22
- nextmv/cli/cloud/ensemble/delete.py +5 -6
- nextmv/cli/cloud/ensemble/get.py +4 -4
- nextmv/cli/cloud/ensemble/list.py +63 -0
- nextmv/cli/cloud/ensemble/update.py +9 -9
- nextmv/cli/cloud/input_set/create.py +20 -22
- nextmv/cli/cloud/input_set/get.py +3 -3
- nextmv/cli/cloud/input_set/list.py +3 -3
- nextmv/cli/cloud/input_set/update.py +24 -24
- nextmv/cli/cloud/instance/create.py +14 -15
- nextmv/cli/cloud/instance/delete.py +5 -6
- nextmv/cli/cloud/instance/exists.py +2 -2
- nextmv/cli/cloud/instance/get.py +2 -2
- nextmv/cli/cloud/instance/list.py +3 -3
- nextmv/cli/cloud/instance/update.py +14 -14
- nextmv/cli/cloud/managed_input/create.py +14 -16
- nextmv/cli/cloud/managed_input/delete.py +6 -7
- nextmv/cli/cloud/managed_input/get.py +3 -3
- nextmv/cli/cloud/managed_input/list.py +3 -3
- nextmv/cli/cloud/managed_input/update.py +9 -9
- nextmv/cli/cloud/run/cancel.py +2 -2
- nextmv/cli/cloud/run/create.py +32 -33
- nextmv/cli/cloud/run/get.py +8 -8
- nextmv/cli/cloud/run/input.py +4 -4
- nextmv/cli/cloud/run/list.py +6 -6
- nextmv/cli/cloud/run/logs.py +9 -10
- nextmv/cli/cloud/run/metadata.py +4 -4
- nextmv/cli/cloud/run/track.py +32 -33
- nextmv/cli/cloud/scenario/create.py +21 -21
- nextmv/cli/cloud/scenario/delete.py +5 -6
- nextmv/cli/cloud/scenario/get.py +8 -8
- nextmv/cli/cloud/scenario/list.py +3 -3
- nextmv/cli/cloud/scenario/metadata.py +4 -4
- nextmv/cli/cloud/scenario/update.py +6 -6
- nextmv/cli/cloud/secrets/create.py +17 -17
- nextmv/cli/cloud/secrets/delete.py +5 -6
- nextmv/cli/cloud/secrets/get.py +4 -4
- nextmv/cli/cloud/secrets/list.py +3 -3
- nextmv/cli/cloud/secrets/update.py +17 -20
- nextmv/cli/cloud/shadow/create.py +31 -31
- nextmv/cli/cloud/shadow/delete.py +5 -6
- nextmv/cli/cloud/shadow/get.py +2 -2
- nextmv/cli/cloud/shadow/list.py +3 -3
- nextmv/cli/cloud/shadow/metadata.py +4 -4
- nextmv/cli/cloud/shadow/start.py +3 -3
- nextmv/cli/cloud/shadow/stop.py +4 -6
- nextmv/cli/cloud/shadow/update.py +6 -6
- nextmv/cli/cloud/switchback/create.py +19 -15
- nextmv/cli/cloud/switchback/delete.py +5 -6
- nextmv/cli/cloud/switchback/get.py +3 -3
- nextmv/cli/cloud/switchback/list.py +3 -3
- nextmv/cli/cloud/switchback/metadata.py +6 -6
- nextmv/cli/cloud/switchback/start.py +4 -4
- nextmv/cli/cloud/switchback/stop.py +4 -6
- nextmv/cli/cloud/switchback/update.py +6 -6
- nextmv/cli/cloud/upload/create.py +2 -2
- nextmv/cli/cloud/version/create.py +9 -10
- nextmv/cli/cloud/version/delete.py +5 -6
- nextmv/cli/cloud/version/exists.py +2 -2
- nextmv/cli/cloud/version/get.py +2 -2
- nextmv/cli/cloud/version/list.py +3 -3
- nextmv/cli/cloud/version/update.py +8 -8
- nextmv/cli/community/clone.py +12 -10
- nextmv/cli/community/list.py +9 -9
- nextmv/cli/configuration/config.py +43 -10
- nextmv/cli/configuration/create.py +3 -3
- nextmv/cli/configuration/delete.py +7 -7
- nextmv/cli/configuration/list.py +3 -3
- nextmv/cli/confirm.py +32 -0
- nextmv/cli/main.py +27 -36
- nextmv/cli/message.py +2 -2
- nextmv/cli/version.py +1 -1
- nextmv/cloud/application/__init__.py +190 -54
- nextmv/cloud/application/_batch_scenario.py +2 -2
- nextmv/cloud/application/_instance.py +2 -2
- nextmv/cloud/application/_managed_input.py +1 -1
- nextmv/cloud/application/_shadow.py +1 -1
- nextmv/cloud/application/_switchback.py +11 -3
- nextmv/cloud/application/_version.py +3 -2
- nextmv/cloud/shadow.py +43 -4
- nextmv/cloud/switchback.py +46 -9
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/METADATA +1 -1
- nextmv-1.0.0.dev4.dist-info/RECORD +183 -0
- nextmv-1.0.0.dev3.dist-info/RECORD +0 -181
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/WHEEL +0 -0
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/entry_points.txt +0 -0
- {nextmv-1.0.0.dev3.dist-info → nextmv-1.0.0.dev4.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,7 +7,8 @@ from typing import Any
|
|
|
7
7
|
|
|
8
8
|
import yaml
|
|
9
9
|
|
|
10
|
-
from nextmv.cli.
|
|
10
|
+
from nextmv.cli.confirm import get_confirmation
|
|
11
|
+
from nextmv.cli.message import error, success, warning
|
|
11
12
|
from nextmv.cloud.account import Account
|
|
12
13
|
from nextmv.cloud.application import Application
|
|
13
14
|
from nextmv.cloud.client import Client
|
|
@@ -59,6 +60,18 @@ def save_config(config: dict[str, Any]) -> None:
|
|
|
59
60
|
yaml.safe_dump(config, file)
|
|
60
61
|
|
|
61
62
|
|
|
63
|
+
def non_profile_keys() -> set[str]:
|
|
64
|
+
"""
|
|
65
|
+
Returns the set of keys that are not profile names in the configuration.
|
|
66
|
+
|
|
67
|
+
Returns
|
|
68
|
+
-------
|
|
69
|
+
set[str]
|
|
70
|
+
The set of non-profile keys.
|
|
71
|
+
"""
|
|
72
|
+
return {API_KEY_KEY, ENDPOINT_KEY}
|
|
73
|
+
|
|
74
|
+
|
|
62
75
|
def build_client(profile: str | None = None) -> Client:
|
|
63
76
|
"""
|
|
64
77
|
Builds a `cloud.Client` using the API key and endpoint for the given
|
|
@@ -91,23 +104,35 @@ def build_client(profile: str | None = None) -> Client:
|
|
|
91
104
|
|
|
92
105
|
if profile is not None:
|
|
93
106
|
if profile not in config:
|
|
94
|
-
error(
|
|
107
|
+
error(
|
|
108
|
+
f"Profile [magenta]{profile}[/magenta] does not exist. "
|
|
109
|
+
"Create it using [code]nextmv configuration create[/code] with the --profile option."
|
|
110
|
+
)
|
|
95
111
|
|
|
96
112
|
api_key = config[profile].get(API_KEY_KEY)
|
|
97
113
|
if api_key is None or api_key == "":
|
|
98
|
-
error(
|
|
114
|
+
error(
|
|
115
|
+
f"API key for profile [magenta]{profile}[/magenta] is not set or is empty. "
|
|
116
|
+
"Set it using [code]nextmv configuration create[/code] with the --profile and --api-key options."
|
|
117
|
+
)
|
|
99
118
|
|
|
100
119
|
endpoint = config[profile].get(ENDPOINT_KEY)
|
|
101
120
|
if endpoint is None or endpoint == "":
|
|
102
|
-
error(
|
|
121
|
+
error(
|
|
122
|
+
f"Endpoint for profile [magenta]{profile}[/magenta] is not set or is empty. "
|
|
123
|
+
"Please run [code]nextmv configuration create[/code]."
|
|
124
|
+
)
|
|
103
125
|
else:
|
|
104
126
|
api_key = config.get(API_KEY_KEY)
|
|
105
127
|
if api_key is None or api_key == "":
|
|
106
|
-
error(
|
|
128
|
+
error(
|
|
129
|
+
"Default API key is not set or is empty. "
|
|
130
|
+
"Please run [code]nextmv configuration create[/code] with the --api-key option."
|
|
131
|
+
)
|
|
107
132
|
|
|
108
133
|
endpoint = config.get(ENDPOINT_KEY)
|
|
109
134
|
if endpoint is None or endpoint == "":
|
|
110
|
-
error("Default endpoint is not set or is empty.")
|
|
135
|
+
error("Default endpoint is not set or is empty. Please run [code]nextmv configuration create[/code].")
|
|
111
136
|
|
|
112
137
|
return Client(api_key=api_key, url=f"https://{endpoint}")
|
|
113
138
|
|
|
@@ -137,13 +162,21 @@ def build_app(app_id: str, profile: str | None = None) -> Application:
|
|
|
137
162
|
"""
|
|
138
163
|
client = build_client(profile)
|
|
139
164
|
exists = Application.exists(client=client, id=app_id)
|
|
140
|
-
if
|
|
165
|
+
if exists:
|
|
166
|
+
return Application(client=client, id=app_id)
|
|
167
|
+
|
|
168
|
+
warning(f"Application with ID [magenta]{app_id}[/magenta] does not exist.")
|
|
169
|
+
should_create = get_confirmation(f"Do you want to create a new application with ID [magenta]{app_id}[/magenta]?")
|
|
170
|
+
if not should_create:
|
|
141
171
|
error(
|
|
142
|
-
f"Application with ID [magenta]{app_id}[/magenta] does not exist. "
|
|
143
|
-
"Use [code]nextmv cloud app create[/code] to create a new
|
|
172
|
+
f"Application with ID [magenta]{app_id}[/magenta] was not created and does not exist. "
|
|
173
|
+
"Use [code]nextmv cloud app create[/code] to create a new app."
|
|
144
174
|
)
|
|
145
175
|
|
|
146
|
-
|
|
176
|
+
app = Application.new(client=client, id=app_id, name=app_id)
|
|
177
|
+
success(f"Application with ID and name [magenta]{app_id}[/magenta] created successfully.")
|
|
178
|
+
|
|
179
|
+
return app
|
|
147
180
|
|
|
148
181
|
|
|
149
182
|
def build_account(account_id: str | None = None, profile: str | None = None) -> Account:
|
|
@@ -58,14 +58,14 @@ def create(
|
|
|
58
58
|
[bold][underline]Examples[/underline][/bold]
|
|
59
59
|
|
|
60
60
|
- Default configuration.
|
|
61
|
-
$ [
|
|
61
|
+
$ [dim]nextmv configuration create --api-key NEXTMV_API_KEY[/dim]
|
|
62
62
|
|
|
63
63
|
- Configure a profile named [magenta]hare[/magenta].
|
|
64
|
-
$ [
|
|
64
|
+
$ [dim]nextmv configuration create --api-key NEXTMV_API_KEY --profile hare[/dim]
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
67
|
if profile is not None and profile.strip().lower() == "default":
|
|
68
|
-
error("[
|
|
68
|
+
error("[magenta]default[/magenta] is a reserved profile name.")
|
|
69
69
|
|
|
70
70
|
endpoint = str(endpoint)
|
|
71
71
|
if endpoint.startswith("https://"):
|
|
@@ -5,9 +5,9 @@ This module defines the configuration delete command for the Nextmv CLI.
|
|
|
5
5
|
from typing import Annotated
|
|
6
6
|
|
|
7
7
|
import typer
|
|
8
|
-
from rich.prompt import Confirm
|
|
9
8
|
|
|
10
9
|
from nextmv.cli.configuration.config import load_config, save_config
|
|
10
|
+
from nextmv.cli.confirm import get_confirmation
|
|
11
11
|
from nextmv.cli.message import error, info, success
|
|
12
12
|
|
|
13
13
|
# Set up subcommand application.
|
|
@@ -36,25 +36,25 @@ def delete(
|
|
|
36
36
|
] = False,
|
|
37
37
|
) -> None:
|
|
38
38
|
"""
|
|
39
|
-
Delete a profile from the configuration.
|
|
40
|
-
|
|
39
|
+
Delete a profile from the configuration.
|
|
40
|
+
|
|
41
|
+
Use the --yes flag to skip the confirmation prompt.
|
|
41
42
|
|
|
42
43
|
[bold][underline]Examples[/underline][/bold]
|
|
43
44
|
|
|
44
45
|
- Delete a profile named [magenta]hare[/magenta].
|
|
45
|
-
$ [
|
|
46
|
+
$ [dim]nextmv configuration delete --profile hare[/dim]
|
|
46
47
|
|
|
47
48
|
- Delete a profile named [magenta]hare[/magenta] without confirmation prompt.
|
|
48
|
-
$ [
|
|
49
|
+
$ [dim]nextmv configuration delete --profile hare --yes[/dim]
|
|
49
50
|
"""
|
|
50
51
|
config = load_config()
|
|
51
52
|
if profile not in config:
|
|
52
53
|
error(f"Profile [magenta]{profile}[/magenta] does not exist.")
|
|
53
54
|
|
|
54
55
|
if not yes:
|
|
55
|
-
confirm =
|
|
56
|
+
confirm = get_confirmation(
|
|
56
57
|
f"Are you sure you want to delete profile [magenta]{profile}[/magenta]? This action cannot be undone.",
|
|
57
|
-
default=False,
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
if not confirm:
|
nextmv/cli/configuration/list.py
CHANGED
|
@@ -6,7 +6,7 @@ import typer
|
|
|
6
6
|
from rich.console import Console
|
|
7
7
|
from rich.table import Table
|
|
8
8
|
|
|
9
|
-
from nextmv.cli.configuration.config import API_KEY_KEY, ENDPOINT_KEY, load_config, obscure_api_key
|
|
9
|
+
from nextmv.cli.configuration.config import API_KEY_KEY, ENDPOINT_KEY, load_config, non_profile_keys, obscure_api_key
|
|
10
10
|
from nextmv.cli.message import error
|
|
11
11
|
|
|
12
12
|
# Set up subcommand application.
|
|
@@ -22,7 +22,7 @@ def list() -> None:
|
|
|
22
22
|
[bold][underline]Examples[/underline][/bold]
|
|
23
23
|
|
|
24
24
|
- Show current configuration and all profiles.
|
|
25
|
-
$ [
|
|
25
|
+
$ [dim]nextmv configuration list[/dim]
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
28
|
config = load_config()
|
|
@@ -38,7 +38,7 @@ def list() -> None:
|
|
|
38
38
|
|
|
39
39
|
for k, v in config.items():
|
|
40
40
|
# Skip default configuration.
|
|
41
|
-
if k in
|
|
41
|
+
if k in non_profile_keys():
|
|
42
42
|
continue
|
|
43
43
|
|
|
44
44
|
profile = {
|
nextmv/cli/confirm.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from rich.prompt import Confirm
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def get_confirmation(msg: str) -> bool:
|
|
7
|
+
"""
|
|
8
|
+
Method to get a yes/no confirmation from the user.
|
|
9
|
+
|
|
10
|
+
Parameters
|
|
11
|
+
----------
|
|
12
|
+
msg : str
|
|
13
|
+
The message to display to the user.
|
|
14
|
+
|
|
15
|
+
Returns
|
|
16
|
+
-------
|
|
17
|
+
bool
|
|
18
|
+
True if the user confirmed, False otherwise.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
# If this is not an interactive terminal, do not ask for confirmation, to
|
|
22
|
+
# avoid hanging indefinitely waiting for a user response.
|
|
23
|
+
if not sys.stdin.isatty():
|
|
24
|
+
return False
|
|
25
|
+
|
|
26
|
+
return Confirm.ask(
|
|
27
|
+
msg,
|
|
28
|
+
default=False,
|
|
29
|
+
case_sensitive=False,
|
|
30
|
+
show_default=True,
|
|
31
|
+
show_choices=True,
|
|
32
|
+
)
|
nextmv/cli/main.py
CHANGED
|
@@ -13,22 +13,25 @@ about the features used here. An example of Rich markup can be found in the
|
|
|
13
13
|
epilog of the Typer application defined below.
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
-
import os
|
|
17
16
|
import sys
|
|
18
17
|
from typing import Annotated
|
|
19
18
|
|
|
20
19
|
import rich
|
|
21
20
|
import typer
|
|
22
|
-
from
|
|
21
|
+
from typer import rich_utils
|
|
23
22
|
|
|
24
23
|
from nextmv.cli.cloud import app as cloud_app
|
|
25
24
|
from nextmv.cli.community import app as community_app
|
|
26
25
|
from nextmv.cli.configuration import app as configuration_app
|
|
27
26
|
from nextmv.cli.configuration.config import CONFIG_DIR, GO_CLI_PATH, load_config
|
|
27
|
+
from nextmv.cli.confirm import get_confirmation
|
|
28
28
|
from nextmv.cli.message import error, info, success, warning
|
|
29
29
|
from nextmv.cli.version import app as version_app
|
|
30
30
|
from nextmv.cli.version import version_callback
|
|
31
31
|
|
|
32
|
+
# Disable dim text for the extended help of commands.
|
|
33
|
+
rich_utils.STYLE_HELPTEXT = ""
|
|
34
|
+
|
|
32
35
|
# Main CLI application.
|
|
33
36
|
app = typer.Typer(
|
|
34
37
|
help="The Nextmv Command Line Interface (CLI).",
|
|
@@ -66,6 +69,15 @@ def callback(
|
|
|
66
69
|
environment.
|
|
67
70
|
"""
|
|
68
71
|
|
|
72
|
+
# Skip checks for help commands.
|
|
73
|
+
if "--help" in sys.argv or "-h" in sys.argv:
|
|
74
|
+
return
|
|
75
|
+
|
|
76
|
+
# Skip checks for certain commands.
|
|
77
|
+
ignored_commands = {"configuration", "version"}
|
|
78
|
+
if ctx.invoked_subcommand in ignored_commands:
|
|
79
|
+
return
|
|
80
|
+
|
|
69
81
|
handle_go_cli()
|
|
70
82
|
handle_config_existence(ctx)
|
|
71
83
|
|
|
@@ -80,19 +92,21 @@ def handle_go_cli() -> None:
|
|
|
80
92
|
|
|
81
93
|
exists = go_cli_exists()
|
|
82
94
|
if exists:
|
|
83
|
-
delete =
|
|
95
|
+
delete = get_confirmation(
|
|
84
96
|
"Do you want to delete the [italic red]deprecated[/italic red] Nextmv CLI "
|
|
85
|
-
f"at [magenta]{GO_CLI_PATH}[/magenta] now?"
|
|
86
|
-
default=False,
|
|
97
|
+
f"at [magenta]{GO_CLI_PATH}[/magenta] now?"
|
|
87
98
|
)
|
|
88
99
|
if delete:
|
|
89
100
|
remove_go_cli()
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
101
|
+
return
|
|
102
|
+
|
|
103
|
+
info(
|
|
104
|
+
msg="You can delete the [italic red]deprecated[/italic red] Nextmv CLI later by removing "
|
|
105
|
+
f"[magenta]{GO_CLI_PATH}[/magenta]. "
|
|
106
|
+
"Make sure you also clean up your [code]PATH[/code], "
|
|
107
|
+
f"by removing references to [magenta]{CONFIG_DIR}[/magenta] from it.",
|
|
108
|
+
emoji=":bulb:",
|
|
109
|
+
)
|
|
96
110
|
|
|
97
111
|
|
|
98
112
|
def handle_config_existence(ctx: typer.Context) -> None:
|
|
@@ -105,10 +119,6 @@ def handle_config_existence(ctx: typer.Context) -> None:
|
|
|
105
119
|
The Typer context object.
|
|
106
120
|
"""
|
|
107
121
|
|
|
108
|
-
ignored_commands = {"configuration", "version"}
|
|
109
|
-
if ctx.invoked_subcommand in ignored_commands:
|
|
110
|
-
return
|
|
111
|
-
|
|
112
122
|
config = load_config()
|
|
113
123
|
if config == {}:
|
|
114
124
|
error("No configuration found. Please run [code]nextmv configuration create[/code].")
|
|
@@ -130,11 +140,9 @@ def go_cli_exists() -> bool:
|
|
|
130
140
|
if exists:
|
|
131
141
|
warning(
|
|
132
142
|
"A [italic red]deprecated[/italic red] Nextmv CLI is installed at "
|
|
133
|
-
f"[magenta]{GO_CLI_PATH}[/magenta]. You
|
|
143
|
+
f"[magenta]{GO_CLI_PATH}[/magenta]. You should delete it to avoid conflicts."
|
|
134
144
|
)
|
|
135
145
|
|
|
136
|
-
check_config_in_path()
|
|
137
|
-
|
|
138
146
|
return exists
|
|
139
147
|
|
|
140
148
|
|
|
@@ -145,24 +153,7 @@ def remove_go_cli() -> None:
|
|
|
145
153
|
|
|
146
154
|
if GO_CLI_PATH.exists():
|
|
147
155
|
GO_CLI_PATH.unlink()
|
|
148
|
-
success(f"Deleted deprecated [magenta]{GO_CLI_PATH}[/magenta].")
|
|
149
|
-
|
|
150
|
-
check_config_in_path()
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
def check_config_in_path() -> None:
|
|
154
|
-
"""
|
|
155
|
-
Check if the configuration directory is in the PATH and notify the user.
|
|
156
|
-
"""
|
|
157
|
-
|
|
158
|
-
path_dirs = os.environ.get("PATH", "").split(os.pathsep)
|
|
159
|
-
config_dir_str = str(CONFIG_DIR)
|
|
160
|
-
|
|
161
|
-
if config_dir_str in path_dirs:
|
|
162
|
-
warning(
|
|
163
|
-
f"[magenta]{CONFIG_DIR}[/magenta] was found in your [code]PATH[/code]. "
|
|
164
|
-
f"You should remove any entries related to [magenta]{CONFIG_DIR}[/magenta] from your [code]PATH[/code]."
|
|
165
|
-
)
|
|
156
|
+
success(f"Deleted [italic red]deprecated[/italic red] [magenta]{GO_CLI_PATH}[/magenta].")
|
|
166
157
|
|
|
167
158
|
|
|
168
159
|
def main() -> None:
|
nextmv/cli/message.py
CHANGED
|
@@ -31,7 +31,7 @@ def error(msg: str) -> None:
|
|
|
31
31
|
if not msg.endswith("."):
|
|
32
32
|
msg += "."
|
|
33
33
|
|
|
34
|
-
rich.print(f"[red]Error:[/red] {msg}", file=sys.stderr)
|
|
34
|
+
rich.print(f":x: [red]Error:[/red] {msg}", file=sys.stderr)
|
|
35
35
|
|
|
36
36
|
raise typer.Exit(code=1)
|
|
37
37
|
|
|
@@ -67,7 +67,7 @@ def warning(msg: str) -> None:
|
|
|
67
67
|
if not msg.endswith("."):
|
|
68
68
|
msg += "."
|
|
69
69
|
|
|
70
|
-
rich.print(f":construction: {msg}", file=sys.stderr)
|
|
70
|
+
rich.print(f":construction: [yellow] Warning:[/yellow] {msg}", file=sys.stderr)
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
def info(msg: str, emoji: str | None = None) -> None:
|