All 3rd Party Libraries are now updated
npm install iros-commonAll 3rd Party Libraries are now updated
#### Use with caution. not all features were tested after the update
- dropping workers
- dropping momentjs and replacing it by date-fns (moment is no longer developed)
- dropping joy and replacing it by yup (yup is more compatible with Typescript)
- dropping request & request-promise and replacing it by axios (request is deprecated)
#### Mongoose
- dropping support fot ssl connection and certs for mongo (use encrypted tunnels instead)
- dropping bluebird (Native Promises have been stable in Node.js and browsers for around 6 years now, and they have been
fast for around 3)
Everything is now migrated to Typescript.
Breaking changes:
- workers now use delays instead of timeouts
User service now requires api key in .env
User service now requires app sections to be defined in .env. It takes a comma delimited string
- USER_SECTIONS=all,quotes
1. Replace in all joi schemas .allow([val1,val2]) by .valid(val1,val2)
2. Validate schemas directly, without joi - replace joi.validate(data,schema) to schema.validate(data)
3. Any custom errors needs to be defined as messages, not language -
e.g. .messages({'any.required': 'This is required'}),. Find out more about all the types
here: https://github.com/sideway/joi/blob/master/API.md#types