invalidPluginWithoutId.js 409 B

12345678910111213141516171819
  1. const { UIPlugin } = require('../../packages/@uppy/core')
  2. module.exports = class InvalidPluginWithoutName extends UIPlugin {
  3. constructor (uppy, opts) {
  4. super(uppy, opts)
  5. this.type = 'acquirer'
  6. this.name = this.constructor.name
  7. }
  8. run (results) {
  9. this.uppy.log({
  10. class: this.constructor.name,
  11. method: 'run',
  12. results,
  13. })
  14. return Promise.resolve('success')
  15. }
  16. }