Skip to content

Seneca Utilities to support promisify, amqp, exception handler and better command implementation

Notifications You must be signed in to change notification settings

siyong/seneca-utils

This branch is 1 commit behind immanuel192/seneca-utils:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
siyong
Aug 3, 2017
cd92e10 · Aug 3, 2017

History

31 Commits
May 30, 2017
Aug 3, 2017
Jun 13, 2017
May 13, 2017
Aug 3, 2017
May 13, 2017
May 14, 2017
Jun 30, 2017
Jun 30, 2017
May 13, 2017
May 13, 2017
Jun 30, 2017

Repository files navigation

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

About

Seneca Utilities to support promisify, amqp, exception handler and better command implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%