falyx 0.1.45__py3-none-any.whl → 0.1.46__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.
- falyx/__main__.py +1 -1
- falyx/command.py +2 -2
- falyx/config.py +1 -1
- falyx/falyx.py +10 -3
- falyx/parsers/argparse.py +5 -5
- falyx/version.py +1 -1
- {falyx-0.1.45.dist-info → falyx-0.1.46.dist-info}/METADATA +1 -1
- {falyx-0.1.45.dist-info → falyx-0.1.46.dist-info}/RECORD +11 -11
- {falyx-0.1.45.dist-info → falyx-0.1.46.dist-info}/LICENSE +0 -0
- {falyx-0.1.45.dist-info → falyx-0.1.46.dist-info}/WHEEL +0 -0
- {falyx-0.1.45.dist-info → falyx-0.1.46.dist-info}/entry_points.txt +0 -0
falyx/__main__.py
CHANGED
@@ -97,7 +97,7 @@ def main() -> Any:
|
|
97
97
|
init_project,
|
98
98
|
aliases=["init"],
|
99
99
|
argument_config=init_config,
|
100
|
-
|
100
|
+
help_epilog="If no name is provided, the current directory will be used.",
|
101
101
|
)
|
102
102
|
flx.add_command(
|
103
103
|
"G",
|
falyx/command.py
CHANGED
@@ -111,7 +111,7 @@ class Command(BaseModel):
|
|
111
111
|
hidden: bool = False
|
112
112
|
aliases: list[str] = Field(default_factory=list)
|
113
113
|
help_text: str = ""
|
114
|
-
|
114
|
+
help_epilog: str = ""
|
115
115
|
style: str = OneColors.WHITE
|
116
116
|
confirm: bool = False
|
117
117
|
confirm_message: str = "Are you sure?"
|
@@ -233,7 +233,7 @@ class Command(BaseModel):
|
|
233
233
|
command_description=self.description,
|
234
234
|
command_style=self.style,
|
235
235
|
help_text=self.help_text,
|
236
|
-
|
236
|
+
help_epilog=self.help_epilog,
|
237
237
|
aliases=self.aliases,
|
238
238
|
)
|
239
239
|
for arg_def in self.get_argument_definitions():
|
falyx/config.py
CHANGED
@@ -102,7 +102,7 @@ class RawCommand(BaseModel):
|
|
102
102
|
retry_policy: RetryPolicy = Field(default_factory=RetryPolicy)
|
103
103
|
hidden: bool = False
|
104
104
|
help_text: str = ""
|
105
|
-
|
105
|
+
help_epilog: str = ""
|
106
106
|
|
107
107
|
@field_validator("retry_policy")
|
108
108
|
@classmethod
|
falyx/falyx.py
CHANGED
@@ -88,6 +88,11 @@ class CommandValidator(Validator):
|
|
88
88
|
|
89
89
|
async def validate_async(self, document) -> None:
|
90
90
|
text = document.text
|
91
|
+
if not text:
|
92
|
+
raise ValidationError(
|
93
|
+
message=self.error_message,
|
94
|
+
cursor_position=len(text),
|
95
|
+
)
|
91
96
|
is_preview, choice, _, __ = await self.falyx.get_command(text, from_validate=True)
|
92
97
|
if is_preview:
|
93
98
|
return None
|
@@ -157,6 +162,7 @@ class Falyx:
|
|
157
162
|
description: str | None = "Falyx CLI - Run structured async command workflows.",
|
158
163
|
epilog: str | None = None,
|
159
164
|
version: str = __version__,
|
165
|
+
version_style: str = OneColors.BLUE_b,
|
160
166
|
prompt: str | AnyFormattedText = "> ",
|
161
167
|
columns: int = 3,
|
162
168
|
bottom_bar: BottomBar | str | Callable[[], Any] | None = None,
|
@@ -180,6 +186,7 @@ class Falyx:
|
|
180
186
|
self.description: str | None = description
|
181
187
|
self.epilog: str | None = epilog
|
182
188
|
self.version: str = version
|
189
|
+
self.version_style: str = version_style
|
183
190
|
self.prompt: str | AnyFormattedText = prompt
|
184
191
|
self.columns: int = columns
|
185
192
|
self.commands: dict[str, Command] = CaseInsensitiveDict()
|
@@ -615,7 +622,7 @@ class Falyx:
|
|
615
622
|
hidden: bool = False,
|
616
623
|
aliases: list[str] | None = None,
|
617
624
|
help_text: str = "",
|
618
|
-
|
625
|
+
help_epilog: str = "",
|
619
626
|
style: str = OneColors.WHITE,
|
620
627
|
confirm: bool = False,
|
621
628
|
confirm_message: str = "Are you sure?",
|
@@ -664,7 +671,7 @@ class Falyx:
|
|
664
671
|
hidden=hidden,
|
665
672
|
aliases=aliases if aliases else [],
|
666
673
|
help_text=help_text,
|
667
|
-
|
674
|
+
help_epilog=help_epilog,
|
668
675
|
style=style,
|
669
676
|
confirm=confirm,
|
670
677
|
confirm_message=confirm_message,
|
@@ -1088,7 +1095,7 @@ class Falyx:
|
|
1088
1095
|
sys.exit(0)
|
1089
1096
|
|
1090
1097
|
if self.cli_args.command == "version" or self.cli_args.version:
|
1091
|
-
self.console.print(f"[{
|
1098
|
+
self.console.print(f"[{self.version_style}]{self.program} v{__version__}[/]")
|
1092
1099
|
sys.exit(0)
|
1093
1100
|
|
1094
1101
|
if self.cli_args.command == "preview":
|
falyx/parsers/argparse.py
CHANGED
@@ -155,7 +155,7 @@ class CommandArgumentParser:
|
|
155
155
|
command_description: str = "",
|
156
156
|
command_style: str = "bold",
|
157
157
|
help_text: str = "",
|
158
|
-
|
158
|
+
help_epilog: str = "",
|
159
159
|
aliases: list[str] | None = None,
|
160
160
|
) -> None:
|
161
161
|
"""Initialize the CommandArgumentParser."""
|
@@ -164,7 +164,7 @@ class CommandArgumentParser:
|
|
164
164
|
self.command_description: str = command_description
|
165
165
|
self.command_style: str = command_style
|
166
166
|
self.help_text: str = help_text
|
167
|
-
self.
|
167
|
+
self.help_epilog: str = help_epilog
|
168
168
|
self.aliases: list[str] = aliases or []
|
169
169
|
self._arguments: list[Argument] = []
|
170
170
|
self._positional: dict[str, Argument] = {}
|
@@ -917,9 +917,9 @@ class CommandArgumentParser:
|
|
917
917
|
arg_line.append(help_text)
|
918
918
|
self.console.print(arg_line)
|
919
919
|
|
920
|
-
#
|
921
|
-
if self.
|
922
|
-
self.console.print("\n" + self.
|
920
|
+
# Epilog
|
921
|
+
if self.help_epilog:
|
922
|
+
self.console.print("\n" + self.help_epilog, style="dim")
|
923
923
|
|
924
924
|
def __eq__(self, other: object) -> bool:
|
925
925
|
if not isinstance(other, CommandArgumentParser):
|
falyx/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.1.
|
1
|
+
__version__ = "0.1.46"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
falyx/.pytyped,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
falyx/__init__.py,sha256=Gh88lQ5pbD7xbGWrBgslE2kSTZKY9TkvKSa53rZ3l8U,305
|
3
|
-
falyx/__main__.py,sha256=
|
3
|
+
falyx/__main__.py,sha256=186MGZUMtx-hCH7QsBqcN-68hYg747LOSk3rlc_23_c,3421
|
4
4
|
falyx/action/.pytyped,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
falyx/action/__init__.py,sha256=4E3Rb0GgGcmggrPJh0YFiwbVgN_PQjIzL06-Z3qMReo,1247
|
6
6
|
falyx/action/action.py,sha256=w6xDbsB1SlMPSvpo2Dh0e11lRGP6a4E3K6AdfjlEqGY,5759
|
@@ -23,13 +23,13 @@ falyx/action/signal_action.py,sha256=5UMqvzy7fBnLANGwYUWoe1VRhrr7e-yOVeLdOnCBiJo
|
|
23
23
|
falyx/action/types.py,sha256=NfZz1ufZuvCgp-he2JIItbnjX7LjOUadjtKbjpRlSIY,1399
|
24
24
|
falyx/action/user_input_action.py,sha256=7kL5G7L0j2LuLvHu-CMwOaHyEisagE7O_2G2EhqWRr8,3483
|
25
25
|
falyx/bottom_bar.py,sha256=iWxgOKWgn5YmREeZBuGA50FzqzEfz1-Vnqm0V_fhldc,7383
|
26
|
-
falyx/command.py,sha256=
|
27
|
-
falyx/config.py,sha256=
|
26
|
+
falyx/command.py,sha256=cfML3Bc6Fg1GNQReLzonR5OtA7oZaeJtWwjLI8utr7w,16414
|
27
|
+
falyx/config.py,sha256=WCjL8TheQ6OjwxhsnvuKnJHcIAT2XVEPaw0zxqYNTCU,9701
|
28
28
|
falyx/context.py,sha256=NfBpxzFzn-dYP6I3wrtGFucqm__UZo4SSBLmM8yYayE,10330
|
29
29
|
falyx/debug.py,sha256=IRpYtdH8yeXJEsfP5rASALmBQb2U_EwrTudF2GIDdZY,1545
|
30
30
|
falyx/exceptions.py,sha256=kK9k1v7LVNjJSwYztRa9Krhr3ZOI-6Htq2ZjlYICPKg,922
|
31
31
|
falyx/execution_registry.py,sha256=rctsz0mrIHPToLZqylblVjDdKWdq1x_JBc8GwMP5sJ8,4710
|
32
|
-
falyx/falyx.py,sha256=
|
32
|
+
falyx/falyx.py,sha256=59Dqh8U7sR4MZcklmNoJJVEOGcpUULWiEcy-uGZeQ0U,48002
|
33
33
|
falyx/hook_manager.py,sha256=TFuHQnAncS_rk6vuw-VSx8bnAppLuHfrZCrzLwqcO9o,2979
|
34
34
|
falyx/hooks.py,sha256=xMfQROib0BNsaQF4AXJpmCiGePoE1f1xpcdibgnVZWM,2913
|
35
35
|
falyx/init.py,sha256=VZ3rYMxo7g01EraYATdl_pRN4ZqrsVueo2ZFx54gojo,3326
|
@@ -38,7 +38,7 @@ falyx/menu.py,sha256=E580qZsx08bnWcqRVjJuD2Fy8Zh_1zIexp5f0lC7L2c,3745
|
|
38
38
|
falyx/options_manager.py,sha256=dFAnQw543tQ6Xupvh1PwBrhiSWlSACHw8K-sHP_lUh4,2842
|
39
39
|
falyx/parsers/.pytyped,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
40
|
falyx/parsers/__init__.py,sha256=ZfPmbtEUechDvgl99-lWhTXmFnXS_FMXJ_xb8KGEJLo,448
|
41
|
-
falyx/parsers/argparse.py,sha256=
|
41
|
+
falyx/parsers/argparse.py,sha256=lXhGvumL2XRHhJzE0anVnTy23XZLikCn7nZAkMf8ZdE,37301
|
42
42
|
falyx/parsers/parsers.py,sha256=MXWC8OQ3apDaeKfY0O4J8NnkxofWVOCRnKatC00lGm0,8796
|
43
43
|
falyx/parsers/signature.py,sha256=PfDe432PYcJDhDXguNzumFqWjDLk13s6jhZF33r__AM,2326
|
44
44
|
falyx/parsers/utils.py,sha256=w_UzvvP62EDKXWSf3jslEsJfd45usGyFqXKNziQhLRI,2893
|
@@ -53,9 +53,9 @@ falyx/themes/__init__.py,sha256=1CZhEUCin9cUk8IGYBUFkVvdHRNNJBEFXccHwpUKZCA,284
|
|
53
53
|
falyx/themes/colors.py,sha256=4aaeAHJetmeNInI0Zytg4E3YqKfPFelpf04vtjSvsS8,19776
|
54
54
|
falyx/utils.py,sha256=U45xnZFUdoFC4xiji_9S1jHS5V7MvxSDtufP8EgB0SM,6732
|
55
55
|
falyx/validators.py,sha256=t5iyzVpY8tdC4rfhr4isEfWpD5gNTzjeX_Hbi_Uq6sA,1328
|
56
|
-
falyx/version.py,sha256=
|
57
|
-
falyx-0.1.
|
58
|
-
falyx-0.1.
|
59
|
-
falyx-0.1.
|
60
|
-
falyx-0.1.
|
61
|
-
falyx-0.1.
|
56
|
+
falyx/version.py,sha256=X3e_85I7oZGwZD8nW9SBKEUbQU7-_3W9FXuicrfxHjc,23
|
57
|
+
falyx-0.1.46.dist-info/LICENSE,sha256=B0yqgaHuSdhN7T3OBmgQSiDTy8HqT5Oe_dLypRe4Ra4,1073
|
58
|
+
falyx-0.1.46.dist-info/METADATA,sha256=sKgexNI7YEsZiUNO2LTxZSmlJheEm_nj0WnVkZsZXhI,5561
|
59
|
+
falyx-0.1.46.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
60
|
+
falyx-0.1.46.dist-info/entry_points.txt,sha256=j8owOSl2j1Ss8DtGMnKfgehKaolqnIPhVFHaUBLUnMs,45
|
61
|
+
falyx-0.1.46.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|