Seneca Service Loader to help you easily buiild seneca service
- Add jsonic config to help easier to trace log the services
- Add the Dto / Viewmodel apply for the result in order to filter your result
const FakeCommand2 = class {
static get pin() {
return 'cmd:myCommand2';
}
static get name() {
return 'myCommand2';
}
static get dtoType() {
return 'MyDto';
}
static get dtoSubType() {
return '';
}
static get dtoResultType(){
return 'YourViewModel';
}
static get dtoResultSubType(){
return 'YourViewModel';
}
func() {
return null;
}
};
- Fix bug SenecaLoaderService throw exception because load fire-and-forget 2 times
- Fix bug: get clientAsync got no response because the seneca queue still full
- Fix bug: when you dont listen but you spaw a client, your client never get promisify
- Fix bug: register seneca command without the server listen pin config.
- Add new way to declare the command
const FakeCommand2 = class {
static get pin() {
return 'cmd:myCommand2';
}
static get name() {
return 'myCommand2';
}
static get dtoType() {
return 'MyDto';
}
static get dtoSubType() {
return '';
}
func() {
return null;
}
};
module.exports = FakeCommand2;
- Update dtobase to 1.0.1
- Add Dto support. Now when exporting your command, add dto type and subtype. Both are optional
class MyCommand {
constructor() {
this.SampleLogic = kv.resolve('SampleLogic');
this.logger = kv.resolve('logger');
}
get dtoType() {
return 'MyDto';
}
get dtoSubType() {
return '';
}
func(inp) {
return this.SampleLogic.doSomething(inp);
}
}
module.exports = {
pin: 'cmd:myCommand',
Func: MyCommand,
name: 'myCommand'
};
- Throw exception when can not detect the Dto registered