orionis 0.85.0__py3-none-any.whl → 0.88.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.
- orionis/framework.py +1 -1
- orionis/luminate/app.py +0 -1
- orionis/luminate/app_context.py +27 -50
- orionis/luminate/services/commands/reactor_commands_service.py +3 -0
- {orionis-0.85.0.dist-info → orionis-0.88.0.dist-info}/METADATA +1 -1
- {orionis-0.85.0.dist-info → orionis-0.88.0.dist-info}/RECORD +10 -10
- {orionis-0.85.0.dist-info → orionis-0.88.0.dist-info}/LICENCE +0 -0
- {orionis-0.85.0.dist-info → orionis-0.88.0.dist-info}/WHEEL +0 -0
- {orionis-0.85.0.dist-info → orionis-0.88.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.85.0.dist-info → orionis-0.88.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
orionis/luminate/app.py
CHANGED
@@ -8,7 +8,6 @@ from orionis.luminate.providers.commands.reactor_commands_service_provider impor
|
|
8
8
|
from orionis.luminate.providers.environment.environment__service_provider import EnvironmentServiceProvider
|
9
9
|
from orionis.luminate.providers.config.config_service_provider import ConfigServiceProvider
|
10
10
|
from orionis.luminate.providers.log.log_service_provider import LogServiceProvider
|
11
|
-
from orionis.luminate.facades.commands.commands_facade import Command
|
12
11
|
|
13
12
|
class Application(metaclass=SingletonMeta):
|
14
13
|
"""
|
orionis/luminate/app_context.py
CHANGED
@@ -1,58 +1,35 @@
|
|
1
|
+
from contextlib import contextmanager
|
1
2
|
from orionis.luminate.app import Application
|
3
|
+
from orionis.luminate.container.container import Container
|
2
4
|
|
3
|
-
|
5
|
+
@contextmanager
|
6
|
+
def app_context():
|
4
7
|
"""
|
5
8
|
Context manager for resolving dependencies within a valid Orionis application context.
|
6
9
|
|
7
|
-
This
|
10
|
+
This function ensures that Orionis is properly initialized before resolving dependencies,
|
8
11
|
similar to how Laravel’s `app()` helper works.
|
9
12
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
__exit__(exc_type, exc_val, exc_tb)
|
15
|
-
Ensures exceptions propagate naturally.
|
16
|
-
"""
|
17
|
-
|
18
|
-
def __enter__(self):
|
19
|
-
"""
|
20
|
-
Validates that the Orionis application is booted before allowing access to the container.
|
21
|
-
|
22
|
-
Returns
|
23
|
-
-------
|
24
|
-
Container
|
25
|
-
The application’s IoC container instance.
|
26
|
-
|
27
|
-
Raises
|
28
|
-
------
|
29
|
-
RuntimeError
|
30
|
-
If the application has not been properly initialized.
|
31
|
-
"""
|
32
|
-
app = Application()
|
33
|
-
if not app.isBooted():
|
34
|
-
raise RuntimeError(
|
35
|
-
"Error: Not running within a valid Orionis Framework context. "
|
36
|
-
"Ensure that the Orionis application is correctly initialized."
|
37
|
-
)
|
38
|
-
return app
|
13
|
+
Yields
|
14
|
+
------
|
15
|
+
Application
|
16
|
+
The initialized Orionis application instance.
|
39
17
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
return False
|
18
|
+
Raises
|
19
|
+
------
|
20
|
+
RuntimeError
|
21
|
+
If the application has not been properly initialized.
|
22
|
+
"""
|
23
|
+
container = Container()
|
24
|
+
app = Application(container)
|
25
|
+
|
26
|
+
if not app.isBooted():
|
27
|
+
raise RuntimeError(
|
28
|
+
"Error: Not running within a valid Orionis Framework context. "
|
29
|
+
"Ensure that the Orionis application is correctly initialized."
|
30
|
+
)
|
31
|
+
|
32
|
+
try:
|
33
|
+
yield app
|
34
|
+
finally:
|
35
|
+
pass
|
@@ -145,6 +145,7 @@ class ReactorCommandsService(IReactorCommandsService):
|
|
145
145
|
self.console_output.error(message=f"Value Error: {e}")
|
146
146
|
elapsed_time = round(time.perf_counter() - start_time, 2)
|
147
147
|
self.console_executor.fail(program=signature or "Unknown", time=f"{elapsed_time}s")
|
148
|
+
self.console_output.exception(e)
|
148
149
|
|
149
150
|
except Exception as e:
|
150
151
|
# Handle unexpected execution errors
|
@@ -153,3 +154,5 @@ class ReactorCommandsService(IReactorCommandsService):
|
|
153
154
|
self.console_output.error(message=f"Execution Error: {e}")
|
154
155
|
elapsed_time = round(time.perf_counter() - start_time, 2)
|
155
156
|
self.console_executor.fail(program=signature or "Unknown", time=f"{elapsed_time}s")
|
157
|
+
self.console_output.exception(e)
|
158
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/cli_manager.py,sha256=0bM-hABXJSoPGuvEgnqeaj9qcLP8VjTQ3z9Mb0TSEUI,1381
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=a9eWuorQr78aX8JHinJUO2TF-bC220XSF_KZA10CM8w,1386
|
4
4
|
orionis/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
orionis/contracts/bootstrap/i_command_bootstrapper.py,sha256=cfpYWSlNhOY1q_C9o0H7F381OoM0Oh0qaeqP-c85nzk,2457
|
6
6
|
orionis/contracts/bootstrap/i_config_bootstrapper.py,sha256=d2TXT74H2fCBbzWgrt9-ZG11S_H_YPQOEcJoIOrsgb0,4462
|
@@ -60,8 +60,8 @@ orionis/installer/installer_manager.py,sha256=Hb6T0bmSl39T30maY-nUWkrLhG77JdrKe4
|
|
60
60
|
orionis/installer/installer_output.py,sha256=LeKxzuXpnHOKbKpUtx3tMGkCi2bGcPV1VNnfBxwfxUU,7161
|
61
61
|
orionis/installer/installer_setup.py,sha256=c2HtVklSa-2_-YVonc7fwtoK-RTDqBS2Ybvbekgfqtc,6970
|
62
62
|
orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
63
|
-
orionis/luminate/app.py,sha256=
|
64
|
-
orionis/luminate/app_context.py,sha256=
|
63
|
+
orionis/luminate/app.py,sha256=8jgfMgcf01PsGBV1YaIUR8axKXkX7MtHNKJI0YEKWWc,11629
|
64
|
+
orionis/luminate/app_context.py,sha256=se2xpsGoy_drcuOROC7OHaIAN5Yd0kbm5V1zzsxxyQc,996
|
65
65
|
orionis/luminate/bootstrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
66
66
|
orionis/luminate/bootstrap/command_bootstrapper.py,sha256=JJkWWOS2R2Zg7mC7-VMtZ0wAgxlegMkdnqudpbAjxwk,6925
|
67
67
|
orionis/luminate/bootstrap/config_bootstrapper.py,sha256=Gw83UtPAOggwzqmz062JfJcpIfmZvmIQyZJfgVFiIcQ,7474
|
@@ -131,7 +131,7 @@ orionis/luminate/providers/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
131
131
|
orionis/luminate/providers/log/log_service_provider.py,sha256=tcWDEI-fubi1mWSS-IKiRReuc0pRMHpxvbvuDgs2Uy0,654
|
132
132
|
orionis/luminate/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
133
133
|
orionis/luminate/services/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
134
|
-
orionis/luminate/services/commands/reactor_commands_service.py,sha256=
|
134
|
+
orionis/luminate/services/commands/reactor_commands_service.py,sha256=2kydqQak61enzzoBxQOghWSco1hv2ZFwANJf7d_p9zQ,6441
|
135
135
|
orionis/luminate/services/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
136
136
|
orionis/luminate/services/config/config_service.py,sha256=sVqX3UBxZA5whjiVFgfo5fzAb8QxD0NT0OYYlgZUK0g,2223
|
137
137
|
orionis/luminate/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -160,9 +160,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
160
160
|
tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
161
161
|
tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
|
162
162
|
tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
|
163
|
-
orionis-0.
|
164
|
-
orionis-0.
|
165
|
-
orionis-0.
|
166
|
-
orionis-0.
|
167
|
-
orionis-0.
|
168
|
-
orionis-0.
|
163
|
+
orionis-0.88.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
164
|
+
orionis-0.88.0.dist-info/METADATA,sha256=fTPzvmseNnV5r5QaHFAFsxB0Mpj85nn7u5Ko5L_o5h4,2978
|
165
|
+
orionis-0.88.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
166
|
+
orionis-0.88.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
167
|
+
orionis-0.88.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
168
|
+
orionis-0.88.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|