1.1.9 • Published 7 years ago

seneca-utils v1.1.9

Weekly downloads
3
License
ISC
Repository
-
Last release
7 years ago

seneca-utils

Build Status Code Climate Test Coverage Dependency Status

Seneca Service Loader to help you easily buiild seneca service

Change logs

v1.1.9

  • Add jsonic config to help easier to trace log the services

v1.1.8

  • 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;
    }
};

v1.1.7

  • Fix bug SenecaLoaderService throw exception because load fire-and-forget 2 times

v1.1.5

  • Fix bug: get clientAsync got no response because the seneca queue still full

v1.1.1

  • Fix bug: when you dont listen but you spaw a client, your client never get promisify

v1.1.0

  • Fix bug: register seneca command without the server listen pin config.

v1.0.6

  • 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;

v1.0.5

  • Update dtobase to 1.0.1

v1.0.4

  • 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
1.1.9

7 years ago

1.1.7

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago