Documentation
    Preparing search index...

    The base command to create custom ace commands. The AdonisJS base commands receives the application instance

    Hierarchy (View Summary)

    Implemented by

    Index

    Constructors

    Properties

    options: CommandOptions = {}

    Configuration options accepted by the command

    kernel: Kernel

    Accessors

    Methods

    • The prepare template method is used to prepare the state for the command. This is the first method executed on a given command instance.

      Parameters

      • ..._: any[]

      Returns any

    • The interact template method is used to display the prompts to the user. The method is called after the prepare method.

      Parameters

      • ..._: any[]

      Returns any

    • The completed method is the method invoked after the command finishes or results in an error.

      You can access the command error using the this.error property. Returning true from completed method supresses the error reporting to the kernel layer.

      Parameters

      • ..._: any[]

      Returns any

    • Executes the lifecycle hooks and the run method from the command

      Returns Promise<any>

    • Terminate the app. A command should prefer calling this method over the "app.terminate", because this method only triggers app termination when the current command is in the charge of the process.

      Returns Promise<void>