Releases: malijs/mali
0.22.0
- Merge pull request #218 from malijs/update_deps e0392bd
- update node.js version f6a1750
- update dependencies 597af95
- Merge pull request #196 from malijs/dependabot/npm_and_yarn/lodash-4.17.20 17ea4bb
- Merge pull request #207 from malijs/dependabot/npm_and_yarn/grpc-1.24.4 0757f6d
- Bump grpc from 1.24.3 to 1.24.4 9507fa6
- [Security] Bump lodash from 4.17.15 to 4.17.20 221eb29
0.21.0
- remove node 8 from nodejs flow 40212b9
- update p-map 90c4181
- update ava f29049d
- update dependencies 4357add
- Merge pull request #179 from malijs/dependabot/npm_and_yarn/handlebars-4.7.6 8a8589f
- Merge pull request #175 from malijs/dependabot/npm_and_yarn/coveralls-3.1.0 4191654
- Merge pull request #181 from malijs/dependabot/npm_and_yarn/standard-14.3.4 7414d6b
- Merge pull request #183 from malijs/dependabot/npm_and_yarn/google-protobuf-3.12.2 313cf4b
- Merge pull request #186 from malijs/dependabot/npm_and_yarn/grpc-1.24.3 88eb252
- Bump grpc from 1.24.2 to 1.24.3 fee04df
- Bump google-protobuf from 3.11.4 to 3.12.2 bd6fbe4
- Bump standard from 14.3.3 to 14.3.4 5c16932
- [Security] Bump handlebars from 4.5.3 to 4.7.6 08fac9a
- Bump coveralls from 3.0.9 to 3.1.0 cec01a1
- Merge pull request #168 from malijs/dependabot/npm_and_yarn/standard-14.3.3 a219ff5
- Bump standard from 14.3.1 to 14.3.3 436e22d
- Merge pull request #167 from malijs/dependabot/npm_and_yarn/acorn-7.1.1 df726c1
- [Security] Bump acorn from 7.1.0 to 7.1.1 ba6ff1d
- Merge pull request #163 from malijs/dependabot/npm_and_yarn/async-3.2.0 10df02b
- Merge pull request #162 from malijs/dependabot/npm_and_yarn/google-protobuf-3.11.4 14c79ed
- Bump async from 3.1.0 to 3.2.0 d0e8860
- Bump google-protobuf from 3.11.2 to 3.11.4 ad32a9c
- Update apidocs 5581d75
0.20.0
0.19.0
- Fix constructor type definitions. Fixes #126. Update dependencies 083f2af
- Merge pull request #124 from malijs/dependabot/npm_and_yarn/jsdoc-to-markdown-5.0.1 a2804c3
- Merge pull request #125 from malijs/dependabot/npm_and_yarn/standard-14.1.0 a65be11
- Bump standard from 14.0.2 to 14.1.0 88127f2
- Bump jsdoc-to-markdown from 5.0.0 to 5.0.1 5b76d0e
0.18.0
- Update dependencies f19c30e
- Merge pull request #120 from EduardoRFS/proto-loader c0ad82d
- Merge pull request #121 from malijs/dependabot/npm_and_yarn/ava-2.3.0 b4eef49
- Bump ava from 2.2.0 to 2.3.0 57e857a
- @grpc/proto-loader on demand 2ad8b00
- Merge pull request #119 from malijs/dependabot/npm_and_yarn/google-protobuf-3.9.1 371ae9f
- Merge pull request #118 from malijs/dependabot/npm_and_yarn/coveralls-3.0.6 166232d
- Bump google-protobuf from 3.9.0 to 3.9.1 5ec13bb
- Bump coveralls from 3.0.5 to 3.0.6 064cf2a
- Update FUNDING.yml b22fe01
0.17.0
- Update deps and standard. Set app.context type to object in type definitions 29859a5
- Merge pull request #116 from spearl/master f150e86
- Merge pull request #113 from malijs/dependabot/npm_and_yarn/p-map-3.0.0 3313fe8
- Merge pull request #112 from malijs/dependabot/npm_and_yarn/ava-2.2.0 0fc9c17
- Merge pull request #111 from malijs/dependabot/npm_and_yarn/coveralls-3.0.5 05a526b
- Merge pull request #110 from malijs/dependabot/npm_and_yarn/google-protobuf-3.9.0 4eae55d
- Merge pull request #109 from malijs/dependabot/npm_and_yarn/lodash-4.17.13 210b514
- Add context attribute mali class typing de93531
- Bump p-map from 2.1.0 to 3.0.0 118a9e8
- Bump ava from 2.1.0 to 2.2.0 11759d8
- Bump coveralls from 3.0.4 to 3.0.5 7842f9e
- Bump google-protobuf from 3.8.0 to 3.9.0 ff10f70
- [Security] Bump lodash from 4.17.11 to 4.17.13 96a2328
- Merge pull request #108 from malijs/dependabot/npm_and_yarn/lodash.merge-4.6.2 273861b
- [Security] Bump lodash.merge from 4.6.1 to 4.6.2 fde1614
- Merge pull request #106 from malijs/dependabot/npm_and_yarn/async-3.1.0 1d588b0
- Bump async from 3.0.1 to 3.1.0 0b00e4a
- Update travis e3f8a33
0.15.0
0.14.0
Improve use and the way we structure definitions. #81.
Breaking changes
Not a change in API but a potentially breaking change in Context
:
ctx.name
now returns the original name of the RPC call as defined in the proto file.
For example: SayHello
vs sayHello
previously.
Similarly, when using pre-compiled code, ctx.service
service name should also reflect what's in the proto file:
Greeter
vs GreeterService
previously.
Similarly ctx.fullName
should more closely and properly reflect proto file definition, especially when using pre-compiled code.
/helloworld.Greeter/SayHello
vs /helloworld.GreeterService/sayHello
previously.
Application.use()
improvements
Now Application.use()
should be a bit more robust and also allows for package names.
Example (Define handler for RPC function 'getUser' in first service we find that has that call name.)
app.use('getUser', getUser)
Example (Define handler with middleware for RPC function 'getUser' in first service we find that has that call name.)
app.use('getUser', mw1, mw2, getUser)
Example (Define handler with middleware for RPC function 'getUser' in service 'MyService'. We pick first service that matches the name.)
app.use('MyService', 'getUser', mw1, mw2, getUser)
Example (Define handler with middleware for rpc function 'getUser' in service 'MyService' with full package name.)
app.use('myorg.myapi.v1.MyService', 'getUser', mw1, mw2, getUser)
Example (Using destructuring define handlers for rpc functions 'getUser' and 'deleteUser'. Here we would match the first service that has a `getUser` RPC method.)
app.use({ getUser, deleteUser })
Example (Apply middleware to all handlers for a given service. We match first service that has the given name.)
app.use('MyService', mw1)
Example (Apply middleware to all handlers for a given service using full namespaced package name.)
app.use('myorg.myapi.v1.MyService', mw1)
Example (Using destructuring define handlers for RPC functions 'getUser' and 'deleteUser'. We match first service that has the given name.)
// deleteUser has middleware mw1 and mw2
app.use({ MyService: { getUser, deleteUser: [mw1, mw2, deleteUser] } })
Example (Using destructuring define handlers for RPC functions 'getUser' and 'deleteUser'.)
// deleteUser has middleware mw1 and mw2
app.use({ 'myorg.myapi.v1.MyService': { getUser, deleteUser: [mw1, mw2, deleteUser] } })
Example (Multiple services using object notation.)
app.use(mw1) // global for all services
app.use('MyService', mw2) // applies to first matched service named 'MyService'
app.use({
'myorg.myapi.v1.MyService': { // matches MyService
sayGoodbye: handler1, // has mw1, mw2
sayHello: [ mw3, handler2 ] // has mw1, mw2, mw3
},
'myorg.myapi.v1.MyOtherService': {
saySomething: handler3 // only has mw1
}
})
0.12.0
Changes
- Update dependencies
- Emit error on every error
- Update type definition
All changes: 0.11.0...0.12.0
0.11.0
Changes
- Update dependencies
Breaking Change
grpc@^1.11.0
now required as a peer dependency
All changes: 0.10.2...0.11.0