DeployDirective

flitter-cli/directives/DeployDirective~ DeployDirective

Directive to run one-time deployment functions provided by the units.


Constructor

new DeployDirective()

Extends

Members

(private) _di_allow_defer :boolean

If true, the injector will defer the class if the class requests any services that the container is missing. These services are filled in later and added to the prototype and any instances. True by default.

Type:
  • boolean

(private) _di_deferred_instances :Array.<module:flitter-di/src/Injectable~Injectable>

Collection of instances of this class that need to have the deferred service instances injected into them when the deferred services are finally provided.

(private) _di_deferred_services :Array.<string>

List of services that were deferred and not provided at the time of injection.

Type:
  • Array.<string>

(private) _options :Object

Mapping of option names to option values for the current invocation.

Type:
  • Object

Methods

(static) help() → {string}

Get the usage information for the directive.

Returns:
Type
string

(static) name() → {string}

Get the name of the directive.

Returns:

"deploy"

Type
string

(static) options() → {Array.<module:flitter-cli/options/Option~Option>}

Get the CLI flag options for this directive.

error(message)

Outputs an [ERROR] message to the console.

Parameters:
Name Type Description
message string

(async) handle(app, argv) → {Promise.<void>}

Handle an invocation of this directive. Runs the deployment associated with the specified unit.

Parameters:
Name Type Description
app module:libflitter/app/FlitterApp~FlitterApp

the Flitter app

argv Array

the CLI arguments after the directive

Returns:
Type
Promise.<void>

info(message)

Outputs an [INFO] message to the console.

Parameters:
Name Type Description
message string

option(name) → {string}

Gets the value of the option with the specified name for the current invocation.

Parameters:
Name Type Description
name string
Returns:
Type
string

success(message)

Outputs a [SUCCESS] message to the console.

Parameters:
Name Type Description
message string

warning(message)

Outputs a [WARNING] message to the console.

Parameters:
Name Type Description
message string