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
Is there an existing issue that is already proposing this?
I have searched the existing issues
Is your feature request related to a problem? Please describe it
I'd like to have the ability to apply some logic before a few commands, as well as to have the current context & user input
Describe the solution you'd like
Apply Middlewares by a decorator, which could be the Command decorator as an option OR a decorator that would be placed over the Command.
It will allow us to apply middlewares just like NestJS guards.
@Command({name: 'install',description: 'Install MacOS setup with Multi-Selection',options: {isDefault: false},middlewares: [CheckUpdatesMiddleware,IsAuthorized],})
OR
@Middleware([CheckUpdatesMiddleware,IsAuthorized])
@Command({name: 'install',description: 'Install MacOS setup with Multi-Selection',options: {isDefault: false},})
What is the motivation / use case for changing the behavior?
Reduce painful logics that injects services & applies the logic over the run function,
as well as the need to create a context out of the run function.
The text was updated successfully, but these errors were encountered:
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
I'd like to have the ability to apply some logic before a few commands, as well as to have the current context & user input
Describe the solution you'd like
Apply Middlewares by a decorator, which could be the Command decorator as an option OR a decorator that would be placed over the Command.
It will allow us to apply middlewares just like NestJS guards.
OR
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
Reduce painful logics that injects services & applies the logic over the run function,
as well as the need to create a context out of the run function.
The text was updated successfully, but these errors were encountered: