FlapDirective

flitter-flap/FlapDirective~ FlapDirective

./flitter directive for interacting with flitter-flap

Constructor

new FlapDirective()

Source:

Extends

Methods

(static) help() → {string}

Source:

Get the usage text for this directive.

Returns:
Type
string

(static) name() → {string}

Source:

Get the name of the command for this directive. This is what is used by ./flitter.

Returns:

"flap"

Type
string

(async) do_migration(app, target, dry, direction) → {Promise.<void>}

Source:

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.

Parameters:
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.

Returns:
Type
Promise.<void>

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

Source:
Overrides:

Handle an invocation of this command. Interprets the CLI arguments and handles them accordingly.

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

the Flitter app

argv Object

command line arguments passed in from ./flitter

Returns:
Type
Promise.<void>
Source:

Get the ASCII-text flap logo.

Returns:
Type
string

usage() → {string}

Source:

Get the usage information string for flap.

Returns:
Type
string