@ooneex/container 0.0.18 → 1.0.0
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.
- package/README.md +8 -24
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
# @ooneex/container
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Dependency injection container built on Inversify -- manages service lifecycle with singleton, transient, and request-scoped registrations and automatic dependency resolution.
|
|
4
4
|
|
|
5
5
|

|
|
6
|
-

|
|
7
|
-

|
|
8
6
|

|
|
9
7
|

|
|
10
8
|
|
|
@@ -12,40 +10,26 @@ A lightweight dependency injection container built on Inversify for managing ser
|
|
|
12
10
|
|
|
13
11
|
✅ **Dependency Injection** - Full DI container with automatic dependency resolution
|
|
14
12
|
|
|
15
|
-
✅ **Multiple Scopes** - Support for Singleton, Transient, and Request scopes
|
|
13
|
+
✅ **Multiple Scopes** - Support for Singleton, Transient, and Request scopes via EContainerScope
|
|
16
14
|
|
|
17
15
|
✅ **Service Aliases** - Register services with string aliases for flexible resolution
|
|
18
16
|
|
|
19
|
-
✅ **Constant Values** - Store and retrieve constant values
|
|
17
|
+
✅ **Constant Values** - Store and retrieve constant values with string or symbol identifiers
|
|
20
18
|
|
|
21
|
-
✅ **Type-Safe** - Full TypeScript support with
|
|
19
|
+
✅ **Type-Safe** - Full TypeScript support with generic type parameters on get and getConstant
|
|
22
20
|
|
|
23
|
-
✅ **Inversify Based** - Built on the
|
|
21
|
+
✅ **Inversify Based** - Built on the Inversify library with a shared singleton DI instance
|
|
24
22
|
|
|
25
|
-
✅ **Shared Instance** -
|
|
23
|
+
✅ **Shared Instance** - Pre-configured global container instance exported for convenience
|
|
24
|
+
|
|
25
|
+
✅ **Service Lifecycle** - Add, get, has, and remove services and constants programmatically
|
|
26
26
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
|
-
### Bun
|
|
30
29
|
```bash
|
|
31
30
|
bun add @ooneex/container
|
|
32
31
|
```
|
|
33
32
|
|
|
34
|
-
### pnpm
|
|
35
|
-
```bash
|
|
36
|
-
pnpm add @ooneex/container
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Yarn
|
|
40
|
-
```bash
|
|
41
|
-
yarn add @ooneex/container
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### npm
|
|
45
|
-
```bash
|
|
46
|
-
npm install @ooneex/container
|
|
47
|
-
```
|
|
48
|
-
|
|
49
33
|
## Usage
|
|
50
34
|
|
|
51
35
|
### Basic Usage
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/container",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.0
|
|
3
|
+
"description": "Dependency injection container built on Inversify — manages service lifecycle with singleton, transient, and request-scoped registrations and automatic dependency resolution",
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"npm:publish": "bun publish --tolerate-republish --access public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@ooneex/exception": "0.0.
|
|
32
|
-
"@ooneex/http-status": "0.0.
|
|
31
|
+
"@ooneex/exception": "0.0.18",
|
|
32
|
+
"@ooneex/http-status": "0.0.18",
|
|
33
33
|
"inversify": "^7.10.4"
|
|
34
34
|
},
|
|
35
35
|
"keywords": [
|