Moleculer v0.14.0-beta7 Release Notes
Release Date: 2020-01-09 // over 4 years ago-
Minimum Node version is 10
The Node version 8 LTS lifecycle has been ended on December 31, 2019, so the minimum required Node version is 10.
Event parameter validation
๐ Similar to action parameter validation, the event parameter validation is supported.
Like in action definition, you should defineparams
in even definition and the built-inValidator
validates the parameters in events.// mailer.service.jsmodule.exports = { name: "mailer", events: { "send.mail": { // Validation schema params: { from: "string|optional", to: "email", subject: "string" }, handler(ctx) { this.logger.info("Event received, parameters OK!", ctx.params); } } } };
The validation errors are not sent back to the caller, they are logged or you can catch them with the new global error handler.
๐ Other fixes