senecajs / seneca

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

Exports from Seneca async plugins do not get exported #890

Closed lilsweetcaligula closed 2 years ago

lilsweetcaligula commented 2 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'
  })