Documentation
    Preparing search index...

    Make a new VineJS validator

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    commandName: string = 'make:validator'

    The command name one can type to run the command

    description: string = 'Create a new file to define VineJS validators'

    The command description

    options: CommandOptions = ...

    Configuration options accepted by the command

    name: string
    resource: boolean
    kernel: Kernel

    Accessors

    • get staysAlive(): undefined | boolean

      Returns undefined | boolean

    • get startApp(): undefined | boolean

      Returns undefined | boolean

    Methods

    • The run method should include the implementation for the command.

      Returns Promise<void>

      async run() {
      this.logger.info('Running my command')
      return 'Command completed'
      }
    • 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

    • 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>