mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
c3ed7cbdef
- Adds an order for the message processing pipeline to ensure that parsing occurs first - Adds JSONARRAYType - Other misc updates
14 lines
339 B
JavaScript
14 lines
339 B
JavaScript
const fs = require('fs')
|
|
|
|
const processors = fs.readdirSync(__dirname)
|
|
.filter((file) => file !== 'index.js')
|
|
.map((file) => {
|
|
const {processMessage, order} = require(`./${file}`)
|
|
return {
|
|
order,
|
|
processMessage: processMessage || (msg) => msg,
|
|
}
|
|
})
|
|
.sort(({order: o1}, {order: o2}) => o1 - o2)
|
|
|
|
module.exports = {processors}
|