wexample-cli 1.3.2__tar.gz → 2.0.0__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.
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/PKG-INFO +8 -8
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/README.md +4 -4
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/pyproject.toml +4 -4
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/command/extended_command.py +3 -3
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/common/command_method_wrapper.py +1 -1
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/context/execution_context.py +2 -2
- {wexample_cli-1.3.2/tests/helpers → wexample_cli-2.0.0/tests/helper}/test_extra_args.py +4 -4
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/command/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/common/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/const/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/const/middleware.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/const/tags.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/const/types.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/context/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/alias.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/as_sudo.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/command.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/middleware.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/option.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/option_stop_on_failure.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/screenable.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/webhook.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/exception/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/exception/abstract_command_option_exception.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/exception/command_option_missing_exception.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/exception/command_option_validation_exception.py +0 -0
- {wexample_cli-1.3.2/src/wexample_cli/helpers → wexample_cli-2.0.0/src/wexample_cli/helper}/__init__.py +0 -0
- {wexample_cli-1.3.2/src/wexample_cli/helpers → wexample_cli-2.0.0/src/wexample_cli/helper}/extra_args.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/middleware/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/middleware/abstract_middleware.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/py.typed +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/testing/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/testing/kernel.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/tests/__init__.py +0 -0
- {wexample_cli-1.3.2/tests/helpers → wexample_cli-2.0.0/tests/helper}/__init__.py +0 -0
- {wexample_cli-1.3.2 → wexample_cli-2.0.0}/tests/unit/__init__.py +0 -0
- {wexample_cli-1.3.2/tests/unit/helpers → wexample_cli-2.0.0/tests/unit/helper}/__init__.py +0 -0
- {wexample_cli-1.3.2/tests/unit/helpers → wexample_cli-2.0.0/tests/unit/helper}/test_extra_args.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: wexample-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Reusable CLI primitives — command decorators, options, middlewares, and the enriched command runner — extracted from wex-core so any kernel built on wexample-app can opt in without depending on the full wex framework.
|
|
5
5
|
Author-Email: weeger <contact@wexample.com>
|
|
6
6
|
License: MIT
|
|
@@ -10,9 +10,9 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Project-URL: homepage, https://github.com/wexample/python-cli
|
|
11
11
|
Requires-Python: >=3.10
|
|
12
12
|
Requires-Dist: attrs>=23.1.0
|
|
13
|
-
Requires-Dist: wexample-app>=
|
|
14
|
-
Requires-Dist: wexample-helpers>=
|
|
15
|
-
Requires-Dist: wexample-prompt>=
|
|
13
|
+
Requires-Dist: wexample-app>=19.0.0
|
|
14
|
+
Requires-Dist: wexample-helpers>=19.0.0
|
|
15
|
+
Requires-Dist: wexample-prompt>=14.0.0
|
|
16
16
|
Provides-Extra: dev
|
|
17
17
|
Requires-Dist: pytest; extra == "dev"
|
|
18
18
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
@@ -20,7 +20,7 @@ Description-Content-Type: text/markdown
|
|
|
20
20
|
|
|
21
21
|
# cli
|
|
22
22
|
|
|
23
|
-
Version:
|
|
23
|
+
Version: 2.0.0
|
|
24
24
|
|
|
25
25
|
Reusable CLI primitives — command decorators, options, middlewares, and the enriched command runner — extracted from wex-core so any kernel built on wexample-app can opt in without depending on the full wex framework.
|
|
26
26
|
|
|
@@ -100,9 +100,9 @@ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the comp
|
|
|
100
100
|
## Dependencies
|
|
101
101
|
|
|
102
102
|
- attrs: >=23.1.0
|
|
103
|
-
- wexample-app: >=
|
|
104
|
-
- wexample-helpers: >=
|
|
105
|
-
- wexample-prompt: >=
|
|
103
|
+
- wexample-app: >=19.0.0
|
|
104
|
+
- wexample-helpers: >=19.0.0
|
|
105
|
+
- wexample-prompt: >=14.0.0
|
|
106
106
|
|
|
107
107
|
## Versioning & Compatibility Policy
|
|
108
108
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cli
|
|
2
2
|
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
|
|
5
5
|
Reusable CLI primitives — command decorators, options, middlewares, and the enriched command runner — extracted from wex-core so any kernel built on wexample-app can opt in without depending on the full wex framework.
|
|
6
6
|
|
|
@@ -80,9 +80,9 @@ Visit the [Wexample Suite documentation](https://docs.wexample.com) for the comp
|
|
|
80
80
|
## Dependencies
|
|
81
81
|
|
|
82
82
|
- attrs: >=23.1.0
|
|
83
|
-
- wexample-app: >=
|
|
84
|
-
- wexample-helpers: >=
|
|
85
|
-
- wexample-prompt: >=
|
|
83
|
+
- wexample-app: >=19.0.0
|
|
84
|
+
- wexample-helpers: >=19.0.0
|
|
85
|
+
- wexample-prompt: >=14.0.0
|
|
86
86
|
|
|
87
87
|
## Versioning & Compatibility Policy
|
|
88
88
|
|
|
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "wexample-cli"
|
|
9
|
-
version = "
|
|
9
|
+
version = "2.0.0"
|
|
10
10
|
description = "Reusable CLI primitives — command decorators, options, middlewares, and the enriched command runner — extracted from wex-core so any kernel built on wexample-app can opt in without depending on the full wex framework."
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "weeger", email = "contact@wexample.com" },
|
|
@@ -19,9 +19,9 @@ classifiers = [
|
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
21
|
"attrs>=23.1.0",
|
|
22
|
-
"wexample-app>=
|
|
23
|
-
"wexample-helpers>=
|
|
24
|
-
"wexample-prompt>=
|
|
22
|
+
"wexample-app>=19.0.0",
|
|
23
|
+
"wexample-helpers>=19.0.0",
|
|
24
|
+
"wexample-prompt>=14.0.0",
|
|
25
25
|
]
|
|
26
26
|
|
|
27
27
|
[project.readme]
|
|
@@ -150,7 +150,7 @@ class ExtendedCommand(Command):
|
|
|
150
150
|
def _execute_dispatch(
|
|
151
151
|
self, request: CommandRequest, function_kwargs: dict[str, Any]
|
|
152
152
|
) -> Any:
|
|
153
|
-
from wexample_app.
|
|
153
|
+
from wexample_app.helper.response import response_normalize
|
|
154
154
|
from wexample_app.response.failure_response import FailureResponse
|
|
155
155
|
from wexample_app.response.multiple_response import MultipleResponse
|
|
156
156
|
|
|
@@ -285,7 +285,7 @@ class ExtendedCommand(Command):
|
|
|
285
285
|
"""
|
|
286
286
|
from concurrent.futures import ThreadPoolExecutor
|
|
287
287
|
|
|
288
|
-
from wexample_app.
|
|
288
|
+
from wexample_app.helper.response import response_normalize
|
|
289
289
|
from wexample_app.response.abstract_response import AbstractResponse
|
|
290
290
|
|
|
291
291
|
# Create an executor for running CPU-bound functions in a thread pool
|
|
@@ -349,7 +349,7 @@ class ExtendedCommand(Command):
|
|
|
349
349
|
if isinstance(arguments, dict):
|
|
350
350
|
return arguments
|
|
351
351
|
|
|
352
|
-
from wexample_app.
|
|
352
|
+
from wexample_app.helper.argument import argument_parse_options
|
|
353
353
|
|
|
354
354
|
return argument_parse_options(
|
|
355
355
|
arguments=arguments,
|
|
@@ -93,7 +93,7 @@ class CommandMethodWrapper(BaseClass):
|
|
|
93
93
|
return None
|
|
94
94
|
|
|
95
95
|
def get_options_names(self) -> list[str]:
|
|
96
|
-
from wexample_helpers.
|
|
96
|
+
from wexample_helpers.helper.string import string_to_kebab_case
|
|
97
97
|
|
|
98
98
|
return [string_to_kebab_case(option.name) for option in self.options]
|
|
99
99
|
|
|
@@ -8,11 +8,11 @@ from wexample_helpers.classes.field import public_field
|
|
|
8
8
|
from wexample_helpers.classes.mixin.printable_mixin import PrintableMixin
|
|
9
9
|
from wexample_helpers.classes.private_field import private_field
|
|
10
10
|
from wexample_helpers.decorator.base_class import base_class
|
|
11
|
-
from wexample_prompt.
|
|
11
|
+
from wexample_prompt.mixin.with_io_manager import WithIoManager
|
|
12
12
|
|
|
13
13
|
if TYPE_CHECKING:
|
|
14
14
|
from wexample_app.common.command_request import CommandRequest
|
|
15
|
-
from wexample_app.common.
|
|
15
|
+
from wexample_app.common.mixin.command_runner_kernel import CommandRunnerKernel
|
|
16
16
|
from wexample_helpers.const.types import AnyCallable, Kwargs
|
|
17
17
|
from wexample_prompt.common.progress.progress_handle import ProgressHandle
|
|
18
18
|
|
|
@@ -4,7 +4,7 @@ import types
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
def test_resolve_shell_command_joins_extra_args_with_quoting() -> None:
|
|
7
|
-
from wexample_cli.
|
|
7
|
+
from wexample_cli.helper.extra_args import resolve_shell_command
|
|
8
8
|
|
|
9
9
|
result = resolve_shell_command(
|
|
10
10
|
context=None, command=None, extra_args=["echo", "hi there"]
|
|
@@ -13,14 +13,14 @@ def test_resolve_shell_command_joins_extra_args_with_quoting() -> None:
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def test_resolve_shell_command_returns_none_when_nothing_given() -> None:
|
|
16
|
-
from wexample_cli.
|
|
16
|
+
from wexample_cli.helper.extra_args import resolve_shell_command
|
|
17
17
|
|
|
18
18
|
result = resolve_shell_command(context=None, command=None, extra_args=None)
|
|
19
19
|
assert result is None
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
def test_resolve_shell_command_uses_command_when_no_extra_args() -> None:
|
|
23
|
-
from wexample_cli.
|
|
23
|
+
from wexample_cli.helper.extra_args import resolve_shell_command
|
|
24
24
|
|
|
25
25
|
result = resolve_shell_command(context=None, command="ls -la", extra_args=None)
|
|
26
26
|
assert result == "ls -la"
|
|
@@ -29,7 +29,7 @@ def test_resolve_shell_command_uses_command_when_no_extra_args() -> None:
|
|
|
29
29
|
def test_resolve_shell_command_warns_when_both_given() -> None:
|
|
30
30
|
from wexample_prompt.common.io_manager import IoManager
|
|
31
31
|
|
|
32
|
-
from wexample_cli.
|
|
32
|
+
from wexample_cli.helper.extra_args import resolve_shell_command
|
|
33
33
|
|
|
34
34
|
context = types.SimpleNamespace(io=IoManager())
|
|
35
35
|
result = resolve_shell_command(
|
|
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
|
{wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/decorator/option_stop_on_failure.py
RENAMED
|
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
|
{wexample_cli-1.3.2 → wexample_cli-2.0.0}/src/wexample_cli/middleware/abstract_middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wexample_cli-1.3.2/tests/unit/helpers → wexample_cli-2.0.0/tests/unit/helper}/test_extra_args.py
RENAMED
|
File without changes
|