@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.
Files changed (2) hide show
  1. package/README.md +8 -24
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # @ooneex/container
2
2
 
3
- A lightweight dependency injection container built on Inversify for managing services, their lifecycle, and dependencies. This package provides a simple yet powerful API for registering, resolving, and managing service instances with support for singletons, transients, and request-scoped dependencies.
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
  ![Bun](https://img.shields.io/badge/Bun-Compatible-orange?style=flat-square&logo=bun)
6
- ![Deno](https://img.shields.io/badge/Deno-Compatible-blue?style=flat-square&logo=deno)
7
- ![Node.js](https://img.shields.io/badge/Node.js-Compatible-green?style=flat-square&logo=node.js)
8
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue?style=flat-square&logo=typescript)
9
7
  ![MIT License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)
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 across your application
17
+ ✅ **Constant Values** - Store and retrieve constant values with string or symbol identifiers
20
18
 
21
- ✅ **Type-Safe** - Full TypeScript support with proper type definitions
19
+ ✅ **Type-Safe** - Full TypeScript support with generic type parameters on get and getConstant
22
20
 
23
- ✅ **Inversify Based** - Built on the battle-tested Inversify library
21
+ ✅ **Inversify Based** - Built on the Inversify library with a shared singleton DI instance
24
22
 
25
- ✅ **Shared Instance** - Global container instance for easy access across modules
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": "Lightweight dependency injection container built on Inversify for managing services and their lifecycle",
4
- "version": "0.0.18",
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.16",
32
- "@ooneex/http-status": "0.0.16",
31
+ "@ooneex/exception": "0.0.18",
32
+ "@ooneex/http-status": "0.0.18",
33
33
  "inversify": "^7.10.4"
34
34
  },
35
35
  "keywords": [