@black-flag/core • Docs
@black-flag/core / index / ConfigureExecutionPrologue
ConfigureExecutionPrologue<
CustomContext
>: (rootPrograms
,context
) =>Promisable
<void
>
This function is called once towards the end of the execution of
configureProgram
, after all commands have been discovered but before any
have been executed, and should apply any final configurations to the programs
that constitute the command line interface.
All commands and sub-commands known to Black Flag are available in the
ExecutionContext.commands map, which can be accessed from the
context
parameter or from the Arguments object returned by
Program::parseAsync
et al.
This function is the complement of ConfigureExecutionEpilogue.
Note that any errors thrown this early in the initialization process will be thrown as-is and will NOT trigger ConfigureErrorHandlingEpilogue.
• CustomContext extends ExecutionContext
= ExecutionContext
• rootPrograms: Programs
• context: CustomContext
Promisable
<void
>