orionis 0.626.0__py3-none-any.whl → 0.628.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.
@@ -4,7 +4,25 @@ from orionis.console.exceptions import CLIOrionisRuntimeError
4
4
 
5
5
  class CacheClearCommand(BaseCommand):
6
6
  """
7
- Command class to display usage information for the Orionis CLI.
7
+ Command to clear Python bytecode cache files (.pyc) and __pycache__ directories in the Orionis application.
8
+
9
+ This command helps maintain a clean development environment by removing all Python cache artifacts
10
+ from the current working directory, preventing issues related to stale or invalid bytecode.
11
+
12
+ Attributes
13
+ ----------
14
+ timestamps : bool
15
+ Whether to display timestamps in the command output.
16
+ signature : str
17
+ The CLI signature to invoke this command.
18
+ description : str
19
+ A brief summary of the command's functionality.
20
+
21
+ Methods
22
+ -------
23
+ handle() -> bool
24
+ Executes the cache clearing process using the `pyclean .` utility. Returns True if successful,
25
+ otherwise raises CLIOrionisRuntimeError on failure.
8
26
  """
9
27
 
10
28
  # Indicates whether timestamps will be shown in the command output
@@ -6,7 +6,23 @@ from rich.panel import Panel
6
6
 
7
7
  class HelpCommand(BaseCommand):
8
8
  """
9
- Command class to display usage information for the Orionis CLI.
9
+ Provides usage instructions and lists all available commands for the Orionis CLI.
10
+
11
+ This command displays a formatted help message including usage examples, a summary of all registered commands, and their descriptions. It is intended to guide users in understanding the available CLI functionality and command syntax.
12
+
13
+ Attributes
14
+ ----------
15
+ timestamps : bool
16
+ Indicates whether timestamps will be shown in the command output.
17
+ signature : str
18
+ Command signature.
19
+ description : str
20
+ Command description.
21
+
22
+ Methods
23
+ -------
24
+ handle(reactor, console)
25
+ Displays usage information and a list of available commands.
10
26
  """
11
27
 
12
28
  # Indicates whether timestamps will be shown in the command output
@@ -0,0 +1,142 @@
1
+ from pathlib import Path
2
+ import re
3
+ from typing import List
4
+ from orionis.console.args.argument import CLIArgument
5
+ from orionis.console.base.command import BaseCommand
6
+ from orionis.console.contracts.reactor import IReactor
7
+ from orionis.console.exceptions import CLIOrionisRuntimeError
8
+ from rich.console import Console
9
+ from rich.panel import Panel
10
+
11
+ from orionis.foundation.contracts.application import IApplication
12
+
13
+ class MakeCommand(BaseCommand):
14
+ """
15
+ Generates a new custom console command scaffold for the Orionis CLI.
16
+
17
+ This command automates the creation of a Python file for a new CLI command, using a template stub.
18
+ It ensures the generated command follows naming conventions and includes the specified signature.
19
+
20
+ Attributes
21
+ ----------
22
+ timestamps : bool
23
+ Indicates whether timestamps will be shown in the command output.
24
+ signature : str
25
+ The command signature.
26
+ description : str
27
+ The command description.
28
+ """
29
+
30
+ # Indicates whether timestamps will be shown in the command output
31
+ timestamps: bool = False
32
+
33
+ # Command signature and description
34
+ signature: str = "make:command"
35
+
36
+ # Command description
37
+ description: str = "Creates a new custom console command for the Orionis CLI."
38
+
39
+ async def options(self) -> List[CLIArgument]:
40
+ """
41
+ Defines the command-line options available for the `make:command` command.
42
+
43
+ This method specifies the arguments that can be passed to the command when it is invoked
44
+ from the CLI. It includes both required and optional arguments, each represented as a
45
+ `CLIArgument` instance.
46
+
47
+ Returns
48
+ -------
49
+ List[CLIArgument]
50
+ A list of `CLIArgument` objects representing the available command-line options.
51
+ """
52
+
53
+ return [
54
+ CLIArgument(
55
+ flags=["name"],
56
+ type=str,
57
+ required=True,
58
+ help="The filename where the new command will be created."
59
+ ),
60
+ CLIArgument(
61
+ flags=["--signature", "-s"],
62
+ type=str,
63
+ required=False,
64
+ help="The signature for the new command."
65
+ ),
66
+ ]
67
+
68
+ def handle(self, app: IApplication) -> dict:
69
+ """
70
+ Handles the creation of a new custom console command file.
71
+
72
+ This method processes the user-provided arguments, validates them, loads a command stub template,
73
+ replaces placeholders with the appropriate values, and writes the resulting code to a new file
74
+ in the commands directory. It also ensures that the file does not already exist and provides
75
+ feedback to the user regarding the operation's success or failure.
76
+
77
+ Parameters
78
+ ----------
79
+ app : IApplication
80
+ The application instance used to resolve paths and interact with the application environment.
81
+
82
+ Returns
83
+ -------
84
+ dict
85
+ An empty dictionary. The method's primary purpose is side effects (file creation and user feedback).
86
+ """
87
+
88
+ try:
89
+
90
+ # Print a new line to separate output
91
+ self.newLine()
92
+
93
+ # Retrieve the 'name' argument (required) and 'signature' argument (optional, with default)
94
+ name: str = self.argument("name")
95
+ signature: str = self.argument("signature", "custom:command")
96
+
97
+ # Validate that the name argument is provided
98
+ if not name:
99
+ self.error("The 'name' argument is required.")
100
+
101
+ # Validate that the file name starts with a lowercase letter and contains only lowercase letters, numbers, or underscores
102
+ if not re.match(r'^[a-z][a-z0-9_]*$', name):
103
+ self.error("The 'name' argument must start with a lowercase letter and contain only lowercase letters, numbers, and underscores (_).")
104
+
105
+ # Validate the command signature: must start with a lowercase letter, can contain lowercase letters, numbers (not at the start), and the special characters ':' and '_'
106
+ if not re.match(r'^[a-z][a-z0-9_:]*$', signature):
107
+ self.error("The 'signature' argument must start with a lowercase letter and can only contain lowercase letters, numbers (not at the start), and the special characters ':' and '_'.")
108
+
109
+ # Load the command stub template from the stubs directory
110
+ stub_path = Path(__file__).parent.parent / "stubs" / "command.stub"
111
+ with open(stub_path, "r", encoding="utf-8") as file:
112
+ stub = file.read()
113
+
114
+ # Generate the class name by capitalizing each word and appending 'Command'
115
+ class_name = ''.join(word.capitalize() for word in name.split('_')) + "Command"
116
+ # Replace placeholders in the stub with the actual class name and signature
117
+ stub = stub.replace("{{class_name}}", class_name)
118
+ stub = stub.replace("{{signature}}", signature)
119
+
120
+ # Ensure the commands directory exists
121
+ commands_dir = app.path('console') / "commands"
122
+ commands_dir.mkdir(parents=True, exist_ok=True)
123
+ file_path = commands_dir / f"{name}.py"
124
+
125
+ # Check if the file already exists to prevent overwriting
126
+ if file_path.exists():
127
+ file_path = file_path.relative_to(app.path('root'))
128
+ self.error(f"The file [{file_path}] already exists. Please choose another name.")
129
+ else:
130
+ # Write the generated command code to the new file
131
+ with open(file_path, "w", encoding="utf-8") as file:
132
+ file.write(stub)
133
+ file_path = file_path.relative_to(app.path('root'))
134
+ self.info(f"Console command [{file_path}] created successfully.")
135
+
136
+ # Print a new line to separate output
137
+ self.newLine()
138
+
139
+ except Exception as e:
140
+
141
+ # Catch any unexpected exceptions and raise a CLI-specific runtime error
142
+ raise CLIOrionisRuntimeError(f"An unexpected error occurred: {e}") from e
@@ -15,11 +15,11 @@ from orionis.metadata.framework import VERSION
15
15
 
16
16
  class PublisherCommand(BaseCommand):
17
17
  """
18
- PublisherCommand is a console command for automating the process of publishing a Python package to the Orionis repository (PyPI).
18
+ Automates the process of testing, versioning, building, and publishing a Python package to the Orionis (PyPI) repository.
19
19
 
20
- This command performs the following steps:
21
- 1. Runs the project's test suite and aborts if there are any test failures or errors.
22
- 2. Bumps the minor version number in the file where the VERSION constant is defined.
20
+ This command performs the following workflow:
21
+ 1. Executes the project's test suite and aborts if any tests fail or error.
22
+ 2. Increments the minor version number in the file where the VERSION constant is defined.
23
23
  3. Commits and pushes changes to the Git repository if there are modifications.
24
24
  4. Builds the package distributions (source and wheel) using `setup.py`.
25
25
  5. Publishes the built distributions to PyPI using Twine and a token from environment variables.
@@ -30,7 +30,7 @@ class PublisherCommand(BaseCommand):
30
30
  timestamps : bool
31
31
  Indicates whether timestamps will be shown in the command output.
32
32
  signature : str
33
- Command signature ("publisher").
33
+ Command signature for invocation.
34
34
  description : str
35
35
  Command description.
36
36
 
@@ -9,13 +9,12 @@ from orionis.foundation.contracts.application import IApplication
9
9
 
10
10
  class ScheduleListCommand(BaseCommand):
11
11
  """
12
- Command class to display a list of scheduled tasks defined in the Orionis application.
12
+ Displays a list of all scheduled jobs registered in the Orionis application.
13
13
 
14
- Methods
15
- -------
16
- handle(app: IApplication, console: Console) -> bool
17
- Lists all scheduled jobs configured in the application by retrieving them from the
18
- ISchedule service and displaying them in a formatted table using the rich library.
14
+ This command retrieves scheduled tasks from the ISchedule service and presents them
15
+ in a formatted table using the rich library. It provides details such as signature,
16
+ arguments, purpose, random delay, start and end dates, and additional details for
17
+ each scheduled job.
19
18
 
20
19
  Attributes
21
20
  ----------
@@ -25,7 +24,6 @@ class ScheduleListCommand(BaseCommand):
25
24
  Command signature for invocation.
26
25
  description : str
27
26
  Description of the command.
28
-
29
27
  """
30
28
 
31
29
  # Indicates whether timestamps will be shown in the command output
@@ -9,30 +9,28 @@ from orionis.services.introspection.instances.reflection import ReflectionInstan
9
9
 
10
10
  class ScheduleWorkCommand(BaseCommand):
11
11
  """
12
- Executes the scheduled tasks defined in the application's scheduler.
12
+ Runs the application's scheduled tasks worker.
13
13
 
14
- This command dynamically loads the scheduler module specified in the application's configuration,
15
- retrieves the `Scheduler` class and its `tasks` method, registers the scheduled tasks with the
16
- ISchedule service, and starts the scheduler worker. It provides user feedback via the console and
17
- handles errors by raising CLIOrionisRuntimeError exceptions.
14
+ This command initializes and starts the scheduler worker, which executes all tasks registered in the application's scheduler. It ensures the scheduler is properly configured, registers event listeners if available, and provides feedback to the user via the console. Errors during initialization or execution are reported as CLIOrionisRuntimeError.
18
15
 
19
- Parameters
16
+ Attributes
20
17
  ----------
21
- orionis : IApplication
22
- The application instance providing configuration and service resolution.
23
- console : Console
24
- The Rich console instance used for displaying output to the user.
18
+ timestamps : bool
19
+ Indicates whether timestamps will be shown in the command output.
20
+ signature : str
21
+ Command signature for invocation.
22
+ description : str
23
+ Brief description of the command.
25
24
 
26
25
  Returns
27
26
  -------
28
27
  bool
29
- Returns True if the scheduler worker starts successfully. If an error occurs during the process,
30
- a CLIOrionisRuntimeError is raised.
28
+ True if the scheduler worker starts successfully.
31
29
 
32
30
  Raises
33
31
  ------
34
32
  CLIOrionisRuntimeError
35
- If the scheduler module, class, or tasks method cannot be found, or if any unexpected error occurs.
33
+ If the scheduler is not properly defined or an unexpected error occurs.
36
34
  """
37
35
 
38
36
  # Indicates whether timestamps will be shown in the command output
@@ -5,7 +5,7 @@ from orionis.test.contracts.kernel import ITestKernel
5
5
 
6
6
  class TestCommand(BaseCommand):
7
7
  """
8
- Command class to display usage information for the Orionis CLI.
8
+ Command class to execute all automated tests using the configured test kernel for the Orionis application.
9
9
 
10
10
  Attributes
11
11
  ----------
@@ -6,16 +6,19 @@ from orionis.metadata import framework
6
6
 
7
7
  class VersionCommand(BaseCommand):
8
8
  """
9
- VersionCommand is a console command that displays the current version and metadata of the Orionis framework.
9
+ Displays the current version and metadata of the Orionis framework.
10
+
11
+ This command outputs the framework's version, author, Python requirements, documentation, and repository links
12
+ in a formatted panel for the user.
10
13
 
11
14
  Attributes
12
15
  ----------
13
16
  timestamps : bool
14
- Indicates whether timestamps should be included (default: False).
17
+ Indicates whether timestamps will be shown in the command output.
15
18
  signature : str
16
- The command signature used to invoke this command ("version").
19
+ Command signature used to invoke this command ("version").
17
20
  description : str
18
- A brief description of what the command does.
21
+ Description of the command's purpose.
19
22
  """
20
23
 
21
24
  # Indicates whether timestamps will be shown in the command output
@@ -6,7 +6,19 @@ from rich.panel import Panel
6
6
 
7
7
  class WorkFlowGithubCommand(BaseCommand):
8
8
  """
9
- Command class to display usage information for the Orionis CLI.
9
+ Runs the test suite and displays the results in the Orionis CLI workflow.
10
+
11
+ This command executes the project's test suite using the provided reactor. If any tests fail or errors occur,
12
+ it displays a summary panel and prevents further workflow actions by raising an exception.
13
+
14
+ Attributes
15
+ ----------
16
+ timestamps : bool
17
+ Indicates whether timestamps will be shown in the command output.
18
+ signature : str
19
+ Command signature for invocation.
20
+ description : str
21
+ Brief description of the command's purpose.
10
22
  """
11
23
 
12
24
  # Indicates whether timestamps will be shown in the command output
@@ -288,6 +288,7 @@ class Reactor(IReactor):
288
288
  from orionis.console.commands.cache import CacheClearCommand
289
289
  from orionis.console.commands.scheduler_work import ScheduleWorkCommand
290
290
  from orionis.console.commands.scheduler_list import ScheduleListCommand
291
+ from orionis.console.commands.make_command import MakeCommand
291
292
 
292
293
  # List of core command classes to load (extend this list as more core commands are added)
293
294
  core_commands = [
@@ -299,6 +300,7 @@ class Reactor(IReactor):
299
300
  CacheClearCommand,
300
301
  ScheduleWorkCommand,
301
302
  ScheduleListCommand,
303
+ MakeCommand
302
304
  ]
303
305
 
304
306
  # Iterate through the core command classes and register them
@@ -0,0 +1,31 @@
1
+ from orionis.console.base.command import BaseCommand
2
+ from orionis.console.args.argument import CLIArgument
3
+ from typing import List
4
+
5
+ class {{class_name}}(BaseCommand):
6
+ """
7
+ [Command objective]
8
+ """
9
+
10
+ # Command signature
11
+ signature: str = "{{signature}}"
12
+
13
+ # Command description
14
+ description: str = "[Command description]"
15
+
16
+ def options(cls) -> List[CLIArgument]:
17
+ """
18
+ Define the command's arguments and options.
19
+ Returns a list of CLIArgument instances.
20
+ """
21
+ return []
22
+
23
+ async def handle(self) -> None:
24
+ """
25
+ Implement the command logic here.
26
+ You can access arguments using self.argument("name").
27
+ """
28
+ try:
29
+ pass
30
+ except Exception as e:
31
+ raise e
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.626.0"
8
+ VERSION = "0.628.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.626.0
3
+ Version: 0.628.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -8,14 +8,15 @@ orionis/console/base/command.py,sha256=tAO_EVy1aNWneNSKYYMAf9yDTfbvHAqSJnZZ6pOR4
8
8
  orionis/console/base/scheduler.py,sha256=IKNhpI_lPbI8H3YruD9z7eNdjuqNYceaclx_Hr5BHfY,8065
9
9
  orionis/console/base/scheduler_event_listener.py,sha256=X2mZBAYLBCtLOH7QSrCEaLeJ5m8Hq5UtGxaWRRvWbfo,4421
10
10
  orionis/console/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- orionis/console/commands/cache.py,sha256=d-J6Qu5Xpp9z0BU4OOb--gp9zWfUZOWm_LEBKIO8k-o,2321
12
- orionis/console/commands/help.py,sha256=0VQLw_8ghyMIbWH9L6S2I5umwa_rniK1lzDdX0qYS_U,3118
13
- orionis/console/commands/publisher.py,sha256=m-4RGDI3gc3-ED7Pl0rASLcoZP694q9jNKq0vRMM9uA,21380
14
- orionis/console/commands/scheduler_list.py,sha256=OU9qOjZNZRRElxwpg-E8nVefJToeiWu2E2l8P17NZtI,4759
15
- orionis/console/commands/scheduler_work.py,sha256=YYKqGLI5crJKuyVjCVwO1ZY_ZxlTWFr1eoz0bQUvyXU,5919
16
- orionis/console/commands/test.py,sha256=-EmQwFwMBuby3OI9HwqMIwuJzd2CGbWbOqmwrR25sOE,2402
17
- orionis/console/commands/version.py,sha256=u2f7SetqEX__ufG6c37Ga-CylT4FGvy6wgld6RPBZGc,3589
18
- orionis/console/commands/workflow.py,sha256=NYOmjTSvm2o6AE4h9LSTZMFSYPQreNmEJtronyOxaYk,2451
11
+ orionis/console/commands/cache.py,sha256=WU4VX4u1CoqHeY6ob2peCRzCKypRA7bpqUApo5_z1wU,3054
12
+ orionis/console/commands/help.py,sha256=VFIn3UqQm4pxwjfSQohVwKNpc7F-6XRcwSZQwDSLEaU,3739
13
+ orionis/console/commands/make_command.py,sha256=NEdCW43-W_W9h1G4i5zEglhEIdvt_GWUBZFIGOCbPrY,6238
14
+ orionis/console/commands/publisher.py,sha256=xVFMVU4xrhmLK_ztou5UWJ2ONpzPc1fjjJufxnetej4,21371
15
+ orionis/console/commands/scheduler_list.py,sha256=Wtjy73fpcjI6GGsJg6BHWVUXItzHbY1QLEhryXpCLcs,4770
16
+ orionis/console/commands/scheduler_work.py,sha256=iPTgP7gOmTPr__TltYQWiqbDXbCP2njuO_2fCzwmMuc,5778
17
+ orionis/console/commands/test.py,sha256=LXtl918TmYhg0sjBiCfbsvaXUmCLqwCXTazmy7AJhlE,2445
18
+ orionis/console/commands/version.py,sha256=0EEFOzzUMzH7DOULKmkHkDLt4D8k938FIkkV3iBQ-t8,3694
19
+ orionis/console/commands/workflow.py,sha256=uaesN9HotrgwuOYMCDeN_nzHr9CVZx4_sLTshISSbtU,2946
19
20
  orionis/console/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
21
  orionis/console/contracts/base_command.py,sha256=UlDN41Ts0ulxM-B2kgeKNr9_gNv_0LCth_pon1os-8U,7617
21
22
  orionis/console/contracts/base_scheduler.py,sha256=RSxEW57MoMU3pXfliIrQw9WuMk95p-xHXi1yACp1qsU,7728
@@ -31,7 +32,7 @@ orionis/console/contracts/reactor.py,sha256=iT6ShoCutAWEeJzOf_PK7CGXi9TgrOD5tewH
31
32
  orionis/console/contracts/schedule.py,sha256=xtXgp4BPhvhg3YSM4mrIdbyoBdr4OJBi1gBM_kJN5UQ,13694
32
33
  orionis/console/contracts/schedule_event_listener.py,sha256=h06qsBxuEMD3KLSyu0JXdUDHlQW19BX9lA09Qrh2QXg,3818
33
34
  orionis/console/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- orionis/console/core/reactor.py,sha256=FZAtTaozJntnfdluLJjacdG40kPW91SY5AVc4vyyYcI,43718
35
+ orionis/console/core/reactor.py,sha256=pnjL2MdqNLhhlfpVYC9tCGWO4ZjlrIS4ixNGk9PY7DU,43814
35
36
  orionis/console/dumper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
37
  orionis/console/dumper/debug.py,sha256=p8uflSXeDJDrVM9mZY4JMYEus73Z6TsLnQQtgP0QUak,22427
37
38
  orionis/console/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -60,8 +61,8 @@ orionis/console/output/console.py,sha256=EtSDWRBW8wk0iJdPfB1mzU49krLJBaSAUdVdVOz
60
61
  orionis/console/output/executor.py,sha256=uQjFPOlyZLFj9pcyYPugCqxwJog0AJgK1OcmQH2ELbw,7314
61
62
  orionis/console/request/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
63
  orionis/console/request/cli_request.py,sha256=lO7088xlVK1VP-NhCIgAo7qXGzCW3nXVOJag43fUv20,13207
63
- orionis/console/stub/command.stub,sha256=IfQ0bTrpataVFcT1ZdHyyiYNZ67D5Aox_QvgVJLeJnI,1240
64
- orionis/console/stub/listener.stub,sha256=DbX-ghx2-vb73kzQ6L20lyg5vSKn58jSLTwFuwNQU9k,4331
64
+ orionis/console/stubs/command.stub,sha256=ABQ2eFxJ0u0DvTfmoO_DdECkBy-rie-woG62G2Gxw8Y,805
65
+ orionis/console/stubs/listener.stub,sha256=DbX-ghx2-vb73kzQ6L20lyg5vSKn58jSLTwFuwNQU9k,4331
65
66
  orionis/console/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
67
  orionis/console/tasks/schedule.py,sha256=ZeeuQ9Tbu5KNowKC5oIk7yWeJXzlDQiQ278mWEgoCXc,87989
67
68
  orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -215,7 +216,7 @@ orionis/foundation/providers/scheduler_provider.py,sha256=IrPQJwvQVLRm5Qnz0Cxon4
215
216
  orionis/foundation/providers/testing_provider.py,sha256=eI1p2lUlxl25b5Z487O4nmqLE31CTDb4c3Q21xFadkE,1615
216
217
  orionis/foundation/providers/workers_provider.py,sha256=GdHENYV_yGyqmHJHn0DCyWmWId5xWjD48e6Zq2PGCWY,1674
217
218
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
218
- orionis/metadata/framework.py,sha256=i4jrnDSSLC6BEPmQ8yzywmJQgvaRt1HrYNiG-AHy61c,4089
219
+ orionis/metadata/framework.py,sha256=05Fw-_4h2Lp3_YusH4BZ1NmBkFOVn7Fiko6ZLp24VDU,4089
219
220
  orionis/metadata/package.py,sha256=k7Yriyp5aUcR-iR8SK2ec_lf0_Cyc-C7JczgXa-I67w,16039
220
221
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
221
222
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -402,8 +403,8 @@ orionis/test/validators/workers.py,sha256=rWcdRexINNEmGaO7mnc1MKUxkHKxrTsVuHgbnI
402
403
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
403
404
  orionis/test/view/render.py,sha256=R55ykeRs0wDKcdTf4O1YZ8GDHTFmJ0IK6VQkbJkYUvo,5571
404
405
  orionis/test/view/report.stub,sha256=QLqqCdRoENr3ECiritRB3DO_MOjRQvgBh5jxZ3Hs1r0,28189
405
- orionis-0.626.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
406
- orionis-0.626.0.dist-info/METADATA,sha256=Qe2e7AyJ5-WNPxefR_Ad19tLs4aJaC0n_f9Udl5elRA,4772
407
- orionis-0.626.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
408
- orionis-0.626.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
409
- orionis-0.626.0.dist-info/RECORD,,
406
+ orionis-0.628.0.dist-info/licenses/LICENCE,sha256=JhC-z_9mbpUrCfPjcl3DhDA8trNDMzb57cvRSam1avc,1463
407
+ orionis-0.628.0.dist-info/METADATA,sha256=wJ8c-tfN4CxayXADrc8S4glVqUKN2YtJc7DuCEkG4QA,4772
408
+ orionis-0.628.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
409
+ orionis-0.628.0.dist-info/top_level.txt,sha256=lyXi6jArpqJ-0zzNqd_uwsH-z9TCEBVBL-pC3Ekv7hU,8
410
+ orionis-0.628.0.dist-info/RECORD,,
@@ -1,42 +0,0 @@
1
- from orionis.console.base.command import BaseCommand
2
- from orionis.console.args.argument import CLIArgument
3
- from orionis.console.exceptions import CLIOrionisRuntimeError
4
-
5
- class {{class_name}}(BaseCommand):
6
- """
7
- Command: {{signature}}
8
- {{description}}
9
- """
10
-
11
- # Enable timestamps
12
- timestamps: bool = True
13
-
14
- # Command signature
15
- signature: str = "{{signature}}"
16
-
17
- # Command description
18
- description: str = "{{description}}"
19
-
20
- # Arguments (edit as needed)
21
- arguments = [
22
- CLIArgument(
23
- flags=["--example", "-e"],
24
- type=str,
25
- help="Example argument for {{class_name}}",
26
- default=None,
27
- required=False,
28
- metavar="EXAMPLE",
29
- dest="example",
30
- action="store",
31
- ),
32
- ]
33
-
34
- async def handle(self, *args, **kwargs) -> None:
35
- try:
36
- self.textSuccessBold("{{class_name}} executed successfully!")
37
- example_value = self.argument("example")
38
- if example_value:
39
- self.info(f"Received argument: {example_value}")
40
-
41
- except Exception as e:
42
- raise CLIOrionisRuntimeError(f"An error occurred: {str(e)}") from e
File without changes