How to use the @adonisjs/ace.addCommand function in @adonisjs/ace

To help you get started, we’ve selected a few @adonisjs/ace examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ahmadarif / adonis-swagger / test / swagger-provider.spec.js View on Github external
group.before(async () => {
    await registrar.providers([
      path.join(__dirname, '../providers/SwaggerProvider')
    ]).register()

    // call in boot SwaggerProvider
    ace.addCommand('Adonis/Commands/SwaggerExport')
    ace.addCommand('Adonis/Commands/SwaggerExportDocs')
    ace.addCommand('Adonis/Commands/SwaggerRemove')
    ace.addCommand('Adonis/Commands/SwaggerRemoveDocs')
  })
github adonisjs / adonis-lucid / test / functional / migration-rollback.spec.js View on Github external
test('log queries when asked to log', async (assert) => {
    ace.addCommand(MigrationRun)
    ace.addCommand(MigrationRollback)

    await fs.writeFile(path.join(__dirname, 'database/migrations/User.js'), `
      const Schema = use('Schema')
      class User extends Schema {
        up () {
          this.createTable('schema_users', (table) => {
            table.increments()
            table.string('username')
          })
        }

        down () {
          this.drop('schema_users')
        }
      }
github brainnit / adonisjs-scout / test / functional / import.spec.js View on Github external
it('import models', async () => {
    ace.addCommand(Import)

    jest.spyOn(console, 'log')

    const TestModel = require('../unit/fixtures/TestModel')
    TestModel._bootIfNotBooted()

    ioc.bind('App/Models/TestModel', () => TestModel)

    await ioc.use('Database').table('posts').insert([
      { title: 'foo' },
      { title: 'bar' },
      { title: 'foobar' }
    ])

    await ace.call('scout:import', { model: 'TestModel' })
github ahmadarif / adonis-swagger / providers / SwaggerProvider.js View on Github external
_addCommands () {
    const ace = require('@adonisjs/ace')
    ace.addCommand('Adonis/Commands/SwaggerExport')
    ace.addCommand('Adonis/Commands/SwaggerExportDocs')
    ace.addCommand('Adonis/Commands/SwaggerRemove')
    ace.addCommand('Adonis/Commands/SwaggerRemoveDocs')
  }
github nrempel / adonis-scheduler / providers / CommandsProvider.js View on Github external
boot () {
    const ace = require('@adonisjs/ace')
    ace.addCommand('Adonis/Commands/Run:Scheduler')
    ace.addCommand('Adonis/Commands/Make:Task')
  }
}
github adonisjs / adonis-lucid / providers / MigrationsProvider.js View on Github external
boot () {
    const ace = require('@adonisjs/ace')
    ace.addCommand('Adonis/Commands/Migration:Run')
    ace.addCommand('Adonis/Commands/Migration:Rollback')
    ace.addCommand('Adonis/Commands/Migration:Refresh')
    ace.addCommand('Adonis/Commands/Migration:Reset')
    ace.addCommand('Adonis/Commands/Migration:Status')
    ace.addCommand('Adonis/Commands/Seed')
  }
}
github stitchng / adonis-queue / providers / JobCommandsProvider.js View on Github external
boot () {
    const ace = require('@adonisjs/ace')
    ace.addCommand('Adonis/Commands/Make:Job')
  }
}
github APCOvernight / adonis-schema-builder / providers / BuilderProvider.js View on Github external
boot () {
    const ace = require('@adonisjs/ace')
    ace.addCommand('Adonis/Commands/Schema:Build')
  }
}
github brainnit / adonisjs-scout / providers / IndexKeeperProvider.js View on Github external
boot () {
    const ace = require('@adonisjs/ace')
    ace.addCommand('Adonis/Commands/Scout:IndexUp')
    ace.addCommand('Adonis/Commands/Scout:IndexDown')
    ace.addCommand('Adonis/Commands/Scout:Import')
    ace.addCommand('Adonis/Commands/Scout:Flush')
  }
}
github superchargejs / framework / console / index.js View on Github external
    _.forEach(Commands, Command => Ace.addCommand(Command))
  }