15 Commits

Author SHA1 Message Date
173b7cf66e Remove express module dependency from jsonrpc 2019-09-25 13:46:29 +07:00
50d36f268f Fix linting errors in packages/jsonrpc 2019-09-15 17:14:31 +07:00
195d7226e8 Rename jsonrpc types 2019-09-13 23:49:05 +07:00
0a1eabadd9 Add test for _-prefixed methods 2019-09-05 09:31:32 +07:00
1aa6cae0f3 Add ability to specify jsonrpc context asynchronously 2019-09-05 09:25:38 +07:00
0222455cd7 Breaking change: JSONRPC context is always 1st argument 2019-08-30 17:12:46 +07:00
9cc5a7affb Add ability to wrap method calls in jsonrpc 2019-08-30 13:19:13 +07:00
c7ab4fe387 Add ability to validate context via @ensure 2019-08-27 16:17:05 +07:00
cc2f5f58e2 Add ability to specify jsonrpc context as extra argument
In this case the interface does not define context, but the implementing
service may use it as an optional argument:

  interface IService {
    add(a: number, b: number): number
  }

  class Service implements IService {
    add(a: number, b: number, ctx?: IContext): number {
      return a + b + ctx!.userId
    }
  }
2019-08-06 20:10:38 +07:00
86e90d28bb Make express jsonrpc use a builder pattern 2019-08-05 21:07:46 +07:00
f3f6166aab Send 405 when GET request is not allowed 2019-08-05 21:07:46 +07:00
15d54639ab Move ILogger to @rondo/common 2019-08-04 13:15:33 +07:00
aeb208162f Refactor express#handleError 2019-08-04 13:02:01 +07:00
c273c1b914 Extract jsonrpc functionality into a separate file 2019-08-04 10:08:06 +07:00
166981fe3b Move jsonrpc back to single package 2019-08-01 12:26:23 +07:00