Flexible mediator pattern implementation for TypeScript.
When application grows in size it becomes more and more complicated to control dataflow between objects / modules. Modifying one of them may lead to unwanted "shotgun surgery" resulting in breaking other features of the application.
Other problem are extra intermediate actions like logging or caching moved directly to eg. business parts of code effectively preventing us from easily unplugging any of the middle actions from application.
Nodiator aims to address this problem by providing configurable mediator object serving as a communication hub.
- Core - project implementation for vanilla typescript
- Logger - extension supporting explicit logging
- Nest - nestjs integration
Project uses yarn workspaces in combination with lerna. To initialize the project run
yarn
As project uses typescript for the package to be seen as other packages dependency they need to be built first.
yarn build
yarn lint:staged # linting staged files
yarn test # running unit tests for packages changed since HEAD
yarn test:cov # running unit tests for whole repo with coverage report
yarn test:e2e # running e2e tests for packages changed since HEAD with packages dependent on them
yarn test:all # combining test and test:e2e
The project follows Conventional Commits standard. To conveniently create commit message use commitizen by typing
yarn cz
Mateusz Fonfara
See also the full list of contributors.
This project is licensed under the MIT License - see the LICENSE file for details.