falyx 0.1.45__tar.gz → 0.1.47__tar.gz
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-0.1.45 → falyx-0.1.47}/PKG-INFO +1 -1
- {falyx-0.1.45 → falyx-0.1.47}/falyx/__main__.py +1 -1
- {falyx-0.1.45 → falyx-0.1.47}/falyx/command.py +2 -2
- {falyx-0.1.45 → falyx-0.1.47}/falyx/config.py +1 -1
- {falyx-0.1.45 → falyx-0.1.47}/falyx/falyx.py +16 -5
- {falyx-0.1.45 → falyx-0.1.47}/falyx/parsers/argparse.py +5 -5
- falyx-0.1.47/falyx/version.py +1 -0
- {falyx-0.1.45 → falyx-0.1.47}/pyproject.toml +1 -1
- falyx-0.1.45/falyx/version.py +0 -1
- {falyx-0.1.45 → falyx-0.1.47}/LICENSE +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/README.md +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/.pytyped +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/__init__.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/.pytyped +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/__init__.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/action_factory.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/action_group.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/base.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/chained_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/fallback_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/http_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/io_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/literal_input_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/menu_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/mixins.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/process_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/process_pool_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/prompt_menu_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/select_file_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/selection_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/signal_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/types.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/action/user_input_action.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/bottom_bar.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/context.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/debug.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/exceptions.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/execution_registry.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/hook_manager.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/hooks.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/init.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/logger.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/menu.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/options_manager.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/parsers/.pytyped +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/parsers/__init__.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/parsers/parsers.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/parsers/signature.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/parsers/utils.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/prompt_utils.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/protocols.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/retry.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/retry_utils.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/selection.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/signals.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/tagged_table.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/themes/__init__.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/themes/colors.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/utils.py +0 -0
- {falyx-0.1.45 → falyx-0.1.47}/falyx/validators.py +0 -0
@@ -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",
|
@@ -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():
|
@@ -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
|
@@ -83,11 +83,20 @@ class CommandValidator(Validator):
|
|
83
83
|
self.falyx = falyx
|
84
84
|
self.error_message = error_message
|
85
85
|
|
86
|
-
def validate(self,
|
87
|
-
|
86
|
+
def validate(self, document) -> None:
|
87
|
+
if not document.text:
|
88
|
+
raise ValidationError(
|
89
|
+
message=self.error_message,
|
90
|
+
cursor_position=len(document.text),
|
91
|
+
)
|
88
92
|
|
89
93
|
async def validate_async(self, document) -> None:
|
90
94
|
text = document.text
|
95
|
+
if not text:
|
96
|
+
raise ValidationError(
|
97
|
+
message=self.error_message,
|
98
|
+
cursor_position=len(text),
|
99
|
+
)
|
91
100
|
is_preview, choice, _, __ = await self.falyx.get_command(text, from_validate=True)
|
92
101
|
if is_preview:
|
93
102
|
return None
|
@@ -157,6 +166,7 @@ class Falyx:
|
|
157
166
|
description: str | None = "Falyx CLI - Run structured async command workflows.",
|
158
167
|
epilog: str | None = None,
|
159
168
|
version: str = __version__,
|
169
|
+
version_style: str = OneColors.BLUE_b,
|
160
170
|
prompt: str | AnyFormattedText = "> ",
|
161
171
|
columns: int = 3,
|
162
172
|
bottom_bar: BottomBar | str | Callable[[], Any] | None = None,
|
@@ -180,6 +190,7 @@ class Falyx:
|
|
180
190
|
self.description: str | None = description
|
181
191
|
self.epilog: str | None = epilog
|
182
192
|
self.version: str = version
|
193
|
+
self.version_style: str = version_style
|
183
194
|
self.prompt: str | AnyFormattedText = prompt
|
184
195
|
self.columns: int = columns
|
185
196
|
self.commands: dict[str, Command] = CaseInsensitiveDict()
|
@@ -615,7 +626,7 @@ class Falyx:
|
|
615
626
|
hidden: bool = False,
|
616
627
|
aliases: list[str] | None = None,
|
617
628
|
help_text: str = "",
|
618
|
-
|
629
|
+
help_epilog: str = "",
|
619
630
|
style: str = OneColors.WHITE,
|
620
631
|
confirm: bool = False,
|
621
632
|
confirm_message: str = "Are you sure?",
|
@@ -664,7 +675,7 @@ class Falyx:
|
|
664
675
|
hidden=hidden,
|
665
676
|
aliases=aliases if aliases else [],
|
666
677
|
help_text=help_text,
|
667
|
-
|
678
|
+
help_epilog=help_epilog,
|
668
679
|
style=style,
|
669
680
|
confirm=confirm,
|
670
681
|
confirm_message=confirm_message,
|
@@ -1088,7 +1099,7 @@ class Falyx:
|
|
1088
1099
|
sys.exit(0)
|
1089
1100
|
|
1090
1101
|
if self.cli_args.command == "version" or self.cli_args.version:
|
1091
|
-
self.console.print(f"[{
|
1102
|
+
self.console.print(f"[{self.version_style}]{self.program} v{__version__}[/]")
|
1092
1103
|
sys.exit(0)
|
1093
1104
|
|
1094
1105
|
if self.cli_args.command == "preview":
|
@@ -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):
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.47"
|
falyx-0.1.45/falyx/version.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.1.45"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|