You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(commands): definition providers, multi providers and preconditions
A command definition and a Command() meta may carry `providers`, merged
into each invocation's child injector next to the context, so a command
declares what it needs instead of setting it up by hand.
The injector gains `multi: true`: every multi provider for a token
contributes to an array, in registration order, a token is either multi
or single, and a child's entries shadow the parent's array.
COMMAND_PRECONDITIONS is the first multi token: each entry is a check on
the environment a command runs in, run when the invocation opens, before
setup and before the arguments policy, in the invocation's injection
context. A throw fails the invocation, so being outside a project is
what a bad invocation reports first. canExecute keeps judging the
arguments.
0 commit comments