Extends
Members
(static) services
Defines the services required by this directive.
- Source:
(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.
- boolean
- Inherited From:
- Source:
(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.
- Source:
(private) _di_deferred_services :Array.<string>
List of services that were deferred and not provided at the time of injection.
- Array.<string>
- Source:
(private) _options :Object
Mapping of option names to option values for the current invocation.
- Object
- Inherited From:
- Source:
Methods
(static) help() → {string}
Get the usage text for this directive.
- Source:
- Type
- string
(static) name() → {string}
Get the name of the command for this directive. This is what is used by ./flitter.
- Source:
"flap"
- Type
- string
(static) options() → {boolean}
Get the options provided by this directive. False to disable parsing.
- Source:
- Type
- boolean
(async) do_migration(app, target, dry, direction) → {Promise.<void>}
Apply migrations for the target unit in the specified direction. This uses the the migration tracking file specified in module:flitter-flap/FlapUnit~FlapUnit#file. If dry mode is specified, then a temporary copy of this file will be created and deleted, and the migrations will be provided a set of FlapHelper tools with dry mode enabled.
Name | Type | Default | Description |
---|---|---|---|
app |
module:libflitter/app/FlitterApp~FlitterApp | the Flitter app |
|
target |
string | name of the unit from which migrations should be applied. This unit's migration directory is looked up from the list created in module:flitter-flap/FlapUnit~FlapUnit#go. |
|
dry |
boolean | If true, then the FlapHelper functions provided to the migrations will be run in dry mode. This specifies that files should not be modified. |
|
direction |
"up" | "down" | up | Direction in which migrations should be applied. |
- Source:
- Type
- Promise.<void>
error(message)
Outputs an [ERROR] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Inherited From:
- Source:
(async) handle(app, argv) → {Promise.<void>}
Handle an invocation of this command. Interprets the CLI arguments and handles them accordingly.
Name | Type | Description |
---|---|---|
app |
module:libflitter/app/FlitterApp~FlitterApp | the Flitter app |
argv |
Object | command line arguments passed in from ./flitter |
- Source:
- Type
- Promise.<void>
info(message)
Outputs an [INFO] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Inherited From:
- Source:
logo() → {string}
Get the ASCII-text flap logo.
- Source:
- Type
- string
option(name) → {string}
Gets the value of the option with the specified name for the current invocation.
Name | Type | Description |
---|---|---|
name |
string |
- Inherited From:
- Source:
- Type
- string
success(message)
Outputs a [SUCCESS] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Inherited From:
- Source:
usage() → {string}
Get the usage information string for flap.
- Source:
- Type
- string
warning(message)
Outputs a [WARNING] message to the console.
Name | Type | Description |
---|---|---|
message |
string |
- Inherited From:
- Source: