@apiratorjs/di-container
Version:
A lightweight dependency injection container for JavaScript and TypeScript with powerful features: modular organization with DiModule.create, lazy initialization, automatic circular dependency detection, and multiple service lifecycles (singleton with bot
68 lines (67 loc) • 1.87 kB
JSON
{
"name": "@apiratorjs/di-container",
"version": "1.4.1",
"description": "A lightweight dependency injection container for JavaScript and TypeScript with powerful features: modular organization with DiModule.create, lazy initialization, automatic circular dependency detection, and multiple service lifecycles (singleton with both in-place and lazy initialization, request-scoped, transient). Includes built-in async context management, lifecycle hooks (onConstruct/onDispose), and remains completely framework-agnostic for flexible application architecture.",
"author": {
"name": "Oleksii Zaitsev",
"url": "https://oleksiizaitsev.com"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/apiratorjs/di-container.git"
},
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"files": [
"dist/src",
"README.md"
],
"publishConfig": {
"access": "public"
},
"keywords": [
"dependency injection",
"di",
"di-container",
"container",
"di-modules",
"modules",
"asynchronous",
"async",
"lazy initialization",
"lazy loading",
"circular dependency detection",
"singleton",
"scoped",
"transient",
"typescript",
"typescript di",
"nodejs",
"framework-agnostic",
"async-context",
"lifecycle",
"dependency management",
"inversion of control",
"ioc"
],
"type": "commonjs",
"scripts": {
"build": "rm -rf dist && tsc",
"watch": "tsc --watch",
"test": "npm run build && node --test dist/test",
"prepublishOnly": "npm test"
},
"engines": {
"node": ">=16.4.0"
},
"devDependencies": {
"@types/node": "^22.13.1",
"tsx": "^4.19.2",
"typescript": "^5.7.3"
},
"dependencies": {
"@apiratorjs/async-context": "^1.1.5",
"@apiratorjs/locking": "^4.0.1"
}
}