senecajs / seneca

A microservices toolkit for Node.js.
http://senecajs.org
MIT License
3.96k stars 311 forks source link

Exports from Seneca async plugins do not get exported #890

Closed lilsweetcaligula closed 3 years ago

lilsweetcaligula commented 3 years ago
async function async_plugin() {
  return { exports: { message: 'async' } }
}

function plugin() {
  return { exports: { message: 'sync' } }
}

Seneca()
  .use(plugin)
  .use(async_plugin)
  .ready(function () {
    const seneca = this

    console.log(Object.keys(seneca.private$.exports))
    // has 'plugin/message'
    // does not have 'async_plugin/message'
  })