Constructs an instance of this command. This constructor initializes a logger instance with the scope and {@link name} of the command.
The arguments passed to the command. Typically, this holds required parameters of commands.
The internal dApp configuration object. This object is used to configure key functionalities such as the name of a dApp and the enabled scopes of the backend runtime.
The internal dApp network configuration object. This object is used to configure the access to the underlying blockchain network.
The command scope. This is the scope that must be enabled
through the configuration files for this command to be
available.
Child classes must overwrite the value of this property.
Requires state information of the module. This object is typically populated upon first execution and updated any time later.
This method must return a command name. Note that
it should use only characters of: A-Za-z0-9:-_.
e.g. "scope:name"
This method must return a command signature that
contains hints on the command name and its required
and optional arguments.
e.g. "command
Getter for the discovery state identifier, e.g.
"discovery.accounts", "discovery.transactions",
"payout.outputs" etc.
This method is an implementation necessary because
of the extensions of StatefulModule.
This method uses the logger to print debug messages.
This method uses the logger to print error messages.
Optionally, a stack
can be passed to print a stack trace.
This helper method should return the latest execution state
such that it can be saved.
Execution states refer to one module's required state data,
potentially necessary during execution, and which is fetched
in run before execution and updated in run
after execution (using the name
as an identifier).
Creates a state query for this discovery service. Each discovery service shall set its own stateIdentifier which is considered the identifier of the discovery module's state document.
This method uses the logger to print info messages.
This method is the entry point of any command line
executed command. nest-commander
implements a flow
where this method is called with parameters that are
respectively the raw arguments and the parsed arguments
to this command call.
This method uses the stateService to fetch the
current execution and also uses it to update the state.
Note that the runWithOptions method is called inside
a try-catch block to force the error handling process.
This method must implement the scheduler logic of
the underlying command. Additionally, the method
implementation should use the Cron
decoration to
register the command execution and configure dates.
Note that schedulers do not accept any options.
This method must implement the actual business logic
of the command being developed. Classes that extend
this command base class must implement this method
as it represents the entry point of command line
executed commands.
Note that with each command comes their own command
line arguments, these must be correctly typed and
must augment the BaseCommandOptions interface.
The parsed runtime arguments passed to the command.
This method prints usage information to the command line
and is used by nest-commander
to print a correctly formatted
help message.
Note that usage methods can be overwritten but must always
print a standard command line signature.
Generated using TypeDoc
The abstract definition of a command line script that the backend runtime can execute as a cronjob background process(es).
v0.2.0