sui-domain-dev-tools
v1.2.0
Published
A proof of concept of a sui domain dev tools tracker
Downloads
4
Readme
SUI DOMAIN DEV TOOLS
This is a proof of concept developed on the schibsted lab day. Is a domain logger and you should use it under your own responsibility.
How it works?
The domain tracker can log several steps of our use-case-calling process.
- Domain
- Service
- Repository
How can i use it?
$ npm install sui-domain-dev-tools
To use it you only need to put the decorator that match with the step that you want to track in the factory.
For example, let's supose that I want to track all the service calls.
import { servicesLogger } from 'sui-domain-dev-tools'
@servicesLogger()
export default class UserServicesFactory {
// .......
If you want to track the UseCases calls you can adding the domainLogger on your domain class definition, for example:
import { domainLogger } from 'sui-domain-dev-tools'
@domainLogger()
class Vibbo {
// .......
And thats it, each time that your app call a service method the sui-dev-tools will logg it and show you the call and the possible output.
Next steps:
- [ ] Refactor the code to make it consistent and logic
- [ ] Improve UI of the console using group
- [ ] Try to develop is as an extension
- [ ] Automatize the decorator call code.