przucidlo / electron-broker

Simple and seamless messaging for Electron with built-in inter-process communication protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2.0 TODOs

przucidlo opened this issue · comments

commented

About

As I implemented the first major version of the library, I will now proceed to work on the version 2.0.
Which will include more "quality of life" features and expose some of the library internal API.

TODOs

  • Use decorators to access the Request data in controller methods and subscriber function.
// Right now the request body gets injected automatically to controller method
// e.g

@injectable()
class Controller {
  @MessagePattern('test')
  public test(requestBody: {test: string}) {
    someServiceMethod(requestBody.test);
  }
}

// After the this feature will be implemented, accessing of the request body will look like this
// e.g

@injectable()
class Controller {
  @MessagePattern('test')
  public test(@Body() requestBody: {test: string}) {
    someServiceMethod(requestBody.test);
  }
}
  • Rebuild and expose middleware feature to high-level API.
  • Support middleware in DoveClient class.
  • Built-in class-transformer support, to convert controller params to classes provided by user.
  • Write unit-tests for core classes of the library.
  • Various refractors/improvements to the already existing codebase.