orionis 0.157.0__py3-none-any.whl → 0.158.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/contracts/foundation/providers/service_providers_bootstrapper.py +6 -19
- orionis/luminate/contracts/providers/service_provider.py +0 -13
- orionis/luminate/foundation/providers/service_providers_bootstrapper.py +10 -9
- {orionis-0.157.0.dist-info → orionis-0.158.0.dist-info}/METADATA +1 -1
- {orionis-0.157.0.dist-info → orionis-0.158.0.dist-info}/RECORD +10 -10
- {orionis-0.157.0.dist-info → orionis-0.158.0.dist-info}/LICENCE +0 -0
- {orionis-0.157.0.dist-info → orionis-0.158.0.dist-info}/WHEEL +0 -0
- {orionis-0.157.0.dist-info → orionis-0.158.0.dist-info}/entry_points.txt +0 -0
- {orionis-0.157.0.dist-info → orionis-0.158.0.dist-info}/top_level.txt +0 -0
orionis/framework.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
from abc import ABC, abstractmethod
|
2
2
|
from typing import List, Type
|
3
|
+
from orionis.luminate.contracts.providers.service_provider import IServiceProvider
|
3
4
|
from orionis.luminate.providers.service_provider import ServiceProvider
|
4
5
|
|
5
6
|
class IServiceProvidersBootstrapper(ABC):
|
@@ -20,7 +21,7 @@ class IServiceProvidersBootstrapper(ABC):
|
|
20
21
|
pass
|
21
22
|
|
22
23
|
@abstractmethod
|
23
|
-
def _register(self, concrete: Type[
|
24
|
+
def _register(self, concrete: Type[IServiceProvider]) -> None:
|
24
25
|
"""
|
25
26
|
Validates and registers a service provider class.
|
26
27
|
|
@@ -36,25 +37,11 @@ class IServiceProvidersBootstrapper(ABC):
|
|
36
37
|
pass
|
37
38
|
|
38
39
|
@abstractmethod
|
39
|
-
def
|
40
|
+
def get(self) -> List[Type[IServiceProvider]]:
|
40
41
|
"""
|
41
|
-
Retrieve the registered service providers.
|
42
|
+
Retrieve the registered service providers that should run before bootstrapping.
|
42
43
|
|
43
|
-
Returns
|
44
|
-
|
45
|
-
list
|
46
|
-
A list of registered service providers
|
47
|
-
"""
|
48
|
-
pass
|
49
|
-
|
50
|
-
@abstractmethod
|
51
|
-
def getAfterServiceProviders(self) -> List[Type[ServiceProvider]]:
|
52
|
-
"""
|
53
|
-
Retrieve the registered service providers.
|
54
|
-
|
55
|
-
Returns
|
56
|
-
-------
|
57
|
-
list
|
58
|
-
A list of registered service providers
|
44
|
+
Returns:
|
45
|
+
List[Type[IServiceProvider]]: A list of service providers to run before bootstrapping.
|
59
46
|
"""
|
60
47
|
pass
|
@@ -11,17 +11,4 @@ class IServiceProvider(ABC):
|
|
11
11
|
Args:
|
12
12
|
container (Container): The container to register services or bindings into.
|
13
13
|
"""
|
14
|
-
pass
|
15
|
-
|
16
|
-
@abstractmethod
|
17
|
-
def boot(self, container: Container) -> None:
|
18
|
-
"""
|
19
|
-
Boot the service provider.
|
20
|
-
|
21
|
-
This method is intended to be overridden by subclasses to perform
|
22
|
-
any necessary bootstrapping or initialization tasks.
|
23
|
-
|
24
|
-
Args:
|
25
|
-
container (Container): The service container instance.
|
26
|
-
"""
|
27
14
|
pass
|
@@ -3,6 +3,7 @@ import inspect
|
|
3
3
|
import pathlib
|
4
4
|
from typing import List, Type
|
5
5
|
from orionis.luminate.contracts.foundation.providers.service_providers_bootstrapper import IServiceProvidersBootstrapper
|
6
|
+
from orionis.luminate.contracts.providers.service_provider import IServiceProvider
|
6
7
|
from orionis.luminate.foundation.exceptions.exception_bootstrapper import BootstrapRuntimeError
|
7
8
|
from orionis.luminate.providers.service_provider import ServiceProvider
|
8
9
|
|
@@ -14,14 +15,14 @@ class ServiceProvidersBootstrapper(IServiceProvidersBootstrapper):
|
|
14
15
|
and registering them in the container.
|
15
16
|
"""
|
16
17
|
|
17
|
-
def __init__(self, custom_providers: List[Type[
|
18
|
+
def __init__(self, custom_providers: List[Type[IServiceProvider]] = None) -> None:
|
18
19
|
"""
|
19
20
|
Initializes the ServiceProvidersBootstrapper.
|
20
21
|
|
21
22
|
Args:
|
22
|
-
providers (List[Type[
|
23
|
+
providers (List[Type[IServiceProvider]]): A list of service provider classes to register manually.
|
23
24
|
"""
|
24
|
-
self._service_providers: List[Type[
|
25
|
+
self._service_providers: List[Type[IServiceProvider]] = []
|
25
26
|
self._custom_providers = custom_providers or []
|
26
27
|
self._autoload()
|
27
28
|
|
@@ -30,7 +31,7 @@ class ServiceProvidersBootstrapper(IServiceProvidersBootstrapper):
|
|
30
31
|
Scans the provider directories and loads provider classes.
|
31
32
|
|
32
33
|
This method searches for Python files in the specified directories, imports them,
|
33
|
-
and registers any class that inherits from `
|
34
|
+
and registers any class that inherits from `IServiceProvider`.
|
34
35
|
|
35
36
|
Raises:
|
36
37
|
BootstrapRuntimeError: If there is an error loading a module.
|
@@ -78,15 +79,15 @@ class ServiceProvidersBootstrapper(IServiceProvidersBootstrapper):
|
|
78
79
|
except Exception as e:
|
79
80
|
raise BootstrapRuntimeError(f"Error loading provider classes: {str(e)}") from e
|
80
81
|
|
81
|
-
def _register(self, concrete: Type[
|
82
|
+
def _register(self, concrete: Type[IServiceProvider]) -> None:
|
82
83
|
"""
|
83
84
|
Validates and registers a service provider class.
|
84
85
|
|
85
|
-
This method ensures that the provided class is valid (inherits from `
|
86
|
+
This method ensures that the provided class is valid (inherits from `IServiceProvider`,
|
86
87
|
has a `register` and `boot` method) and registers it in the appropriate list.
|
87
88
|
|
88
89
|
Args:
|
89
|
-
concrete (Type[
|
90
|
+
concrete (Type[IServiceProvider]): The service provider class to register.
|
90
91
|
|
91
92
|
Raises:
|
92
93
|
BootstrapRuntimeError: If the provider class is invalid.
|
@@ -96,11 +97,11 @@ class ServiceProvidersBootstrapper(IServiceProvidersBootstrapper):
|
|
96
97
|
|
97
98
|
self._service_providers.append(concrete)
|
98
99
|
|
99
|
-
def get(self) -> List[Type[
|
100
|
+
def get(self) -> List[Type[IServiceProvider]]:
|
100
101
|
"""
|
101
102
|
Retrieve the registered service providers that should run before bootstrapping.
|
102
103
|
|
103
104
|
Returns:
|
104
|
-
List[Type[
|
105
|
+
List[Type[IServiceProvider]]: A list of service providers to run before bootstrapping.
|
105
106
|
"""
|
106
107
|
return self._service_providers
|
@@ -1,6 +1,6 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/cli_manager.py,sha256=oXY5UYvtalP996h7z5iaEc7z5b1hyFWXrLPrvtoxWcU,1368
|
3
|
-
orionis/framework.py,sha256=
|
3
|
+
orionis/framework.py,sha256=4NaWnOPJpo9vftKxSlUjjN8IW-ShhZZ_IsADnsM6_qo,1387
|
4
4
|
orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
orionis/installer/manager.py,sha256=SiypGJ2YiFeWyK_4drkheHUd42oS2CH63PNuxiw6Cps,3139
|
6
6
|
orionis/installer/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -89,9 +89,9 @@ orionis/luminate/contracts/foundation/console/command_bootstrapper.py,sha256=cfp
|
|
89
89
|
orionis/luminate/contracts/foundation/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
90
|
orionis/luminate/contracts/foundation/environment/environment_bootstrapper.py,sha256=MEeZmh0XWvzvWHFB5ZOp5SKY89F1IHsIXJvdjmEncJU,1076
|
91
91
|
orionis/luminate/contracts/foundation/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
|
-
orionis/luminate/contracts/foundation/providers/service_providers_bootstrapper.py,sha256=
|
92
|
+
orionis/luminate/contracts/foundation/providers/service_providers_bootstrapper.py,sha256=DTXjjZ8RfpLZrSMe6bNlEAHUPepTtS3odgas51w3ZKw,1567
|
93
93
|
orionis/luminate/contracts/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
94
|
-
orionis/luminate/contracts/providers/service_provider.py,sha256=
|
94
|
+
orionis/luminate/contracts/providers/service_provider.py,sha256=UTnLexdDMxRq5fFqKNpq_wUmefersOUdkdoO_2qD0ww,417
|
95
95
|
orionis/luminate/contracts/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
96
96
|
orionis/luminate/contracts/services/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
97
97
|
orionis/luminate/contracts/services/commands/reactor_commands_service.py,sha256=msIOfwOYASFNuS4shhwsnukPH5_XnuxNBHW9f6q-Lqo,795
|
@@ -133,7 +133,7 @@ orionis/luminate/foundation/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JC
|
|
133
133
|
orionis/luminate/foundation/exceptions/exception_bootstrapper.py,sha256=wDKfEW295c7-bavr7YUHK2CLYcTSZgjT9ZRSBne6GOE,1356
|
134
134
|
orionis/luminate/foundation/exceptions/exception_providers.py,sha256=VxrzuDRKXn8b73xKINPb-FxBusUz8ITXCu0KZh7Pm2o,1329
|
135
135
|
orionis/luminate/foundation/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
136
|
-
orionis/luminate/foundation/providers/service_providers_bootstrapper.py,sha256=
|
136
|
+
orionis/luminate/foundation/providers/service_providers_bootstrapper.py,sha256=lFlg9U2TIg165Nq9VdDnjVJ9eGDMbU8HST0NJb9YbCY,4590
|
137
137
|
orionis/luminate/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
138
138
|
orionis/luminate/patterns/singleton.py,sha256=b3U0nubKSQWyal5wTXADVPtOztkaTk-M8Zwy-bje1L0,1425
|
139
139
|
orionis/luminate/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -181,9 +181,9 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
181
181
|
tests/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
182
182
|
tests/tools/class_example.py,sha256=dIPD997Y15n6WmKhWoOFSwEldRm9MdOHTZZ49eF1p3c,1056
|
183
183
|
tests/tools/test_reflection.py,sha256=bhLQ7VGVod4B8sv-rW9AjnOumvaBVsoxieA3sdoM2yM,5244
|
184
|
-
orionis-0.
|
185
|
-
orionis-0.
|
186
|
-
orionis-0.
|
187
|
-
orionis-0.
|
188
|
-
orionis-0.
|
189
|
-
orionis-0.
|
184
|
+
orionis-0.158.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
185
|
+
orionis-0.158.0.dist-info/METADATA,sha256=0NvLJZbORTN_q5QOjDDQc-H2_CBbyFEiGFOaGEBFWBA,2970
|
186
|
+
orionis-0.158.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
187
|
+
orionis-0.158.0.dist-info/entry_points.txt,sha256=eef1_CVewfokKjrGBynXa06KabSJYo7LlDKKIKvs1cM,53
|
188
|
+
orionis-0.158.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
189
|
+
orionis-0.158.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|