Skip to content

Releases: malijs/mali

0.9.0

01 Aug 00:20
Compare
Choose a tag to compare

Changes

  • Throw when we fail to bind on a port when already taken
  • Update dependencies

All changes: 0.8.2...0.9.0

0.7.1

26 Jan 21:51
Compare
Choose a tag to compare

Changes

  • properly support passing multiple functions as middleware

All changes: 0.7.0...0.7.1

0.7.0

21 Jan 01:40
Compare
Choose a tag to compare

Changes

  • Add support for explicitly setting response to an Error and sending it to client.

Example:

async function hello (ctx) {
  ctx.res = new Error('boom!')
}

This will send the error to the client but circumvent application error logging regardless of app.silent setting.

All changes: 0.6.1...0.7.0

0.6.1

21 Jan 01:37
Compare
Choose a tag to compare

Changes

  • update grpc-inspect to add support for nested package names.

All changes: 0.6.0...0.6.1

0.6.0

29 Dec 15:42
Compare
Choose a tag to compare

Changes

Change grpc to be a peer dependency

  • Application package.json will have to include grpc as a dependency along with mali. This way clients can control grpc version.

Add support for multi proto servers

  • Added support for creating a Mali app instance from multiple protocol buffer definitions
  • Renamed init() to addService(). This is not the same as grpc.server.addService()

Example:

helloworld.proto

syntax = "proto3";

package helloworld;

service Greeter {
  rpc SayHello (HelloRequest) returns (HelloReply) {}
}

message HelloRequest {
  string name = 1;
}

message HelloReply {
  string message = 1;
}

argservice.proto

syntax = "proto3";

package argservice;

service ArgService {
  rpc DoSomething (ArgRequest) returns (ArgReply) {}
}

message ArgRequest {
  string message = 1;
}

message ArgReply {
  string message = 1;
}
const proto1 = path.resolve(__dirname, './protos/helloworld.proto')
const proto2 = path.resolve(__dirname, './protos/argservice.proto')

function sayHello (ctx) {
  ctx.res = { message: 'Hello ' + ctx.req.name }
}

function doSomething (ctx) {
  ctx.res = { message: ctx.req.message.toUppercase() }
}

const app = new Mali()
app.addService(proto1)
app.addService(proto2)

app.use({ sayHello })
app.use({ doSomething })

app.start()

All changes: 0.5.0...0.6.0

0.5.0

29 Dec 15:35
Compare
Choose a tag to compare

Changes

  • Add support for dynamic OS-assigned ports

All changes: 0.4.1...0.5.0

0.4.1

24 Nov 01:27
Compare
Choose a tag to compare

Changes

  • Add support for multi package protos
  • Update dependencies

All changes: 0.4.0...0.4.1

0.4.0

12 Nov 19:28
Compare
Choose a tag to compare

Changes

  • Add Request and Response to Context and support for metadata (#15):
  • Add Request class and request object to context
  • Add Response class and response object to context
  • Delegate most properties and functions from context to request and response
  • Add metadata properties and functions to request and response
  • Changes are backwards compatible
  • Update dependencies

All changes: 0.3.3...0.4.0

0.2.4

28 Mar 12:10
Compare
Choose a tag to compare

Changes

  • Added proper catching for errors within stream (#8):

All changes: 0.2.3...0.2.4

0.2.3

11 Mar 18:23
Compare
Choose a tag to compare

Changes

  • Added the following to properties to context:
    • {String} fullName - the full name of the call. ex '/helloworld.Greeter/SayHello'
    • {String} service - the service name of the call. ex 'Greeter
    • {String} package - the package name of the call. ex 'helloworld
  • Various minor improvements

All changes: 0.2.2...0.2.3