ioc-manifest
v2.3.6
Published
Build-time factory discovery and codegen: generates a typed Awilix (PROXY) registration manifest from TypeScript sources with ioc.config as the single policy surface.
Maintainers
Readme
ioc-manifest
Convention-based dependency discovery and codegen for Awilix. Write factory functions, run the generator, get a fully typed IoC container — no manual registrations. Compose containers across packages in a monorepo with first-class support.
npm install ioc-manifestDocumentation
Full documentation lives at reharik.github.io/ioc-manifest.
- Introduction — the problem, what this does, library vs app mode
- Quick start — factories → config → generate → bootstrap
- Core concepts — conventions, lifetimes, groups
ioc.config.tsreference — the single policy surface- Cross-package composition — monorepo app mode
- CLI · Error handling · Pitfalls
What you get
- Auto-discovery — export
buildUserService, it's registered asuserServicereturningUserService - Typed end-to-end —
container.resolve("userService")returnsUserService, notany - Plural collections — multiple implementations of a contract get a
ReadonlyArraykey automatically - Cross-package composition — compose manifests across a monorepo with compile-time externals checks
- Lifetime-inversion safety — generation fails when a longer-lived service would freeze a shorter-lived dependency
- No runtime scanning — output is plain Awilix with static imports; zero lock-in, works in dev and bundled prod
Contributing to the docs
The docs are a VitePress site under docs/.
npm run docs:dev # local dev server with hot reload
npm run docs:build # production build
npm run docs:preview # preview the production buildPushing changes under docs/ to main deploys to GitHub Pages via .github/workflows/deploy-docs.yml.
License
MIT — see LICENSE.
