-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NX commands interceptor/middleware #4927
Comments
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
I know it may not be the smallest or simplest change, but I think it deserves conversation. It would add a lot of personalisation capabilities to the workspace. In the future even stuff like |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Keep alive. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Description
It would be amazing if you could introduce workspace wide interceptor for all commands run.
In
workspace.json
we would add fieldThen
print-args
file would be something like:Input
would beOptions
, plus builder/executor/generator/schematic identificator (should also say if it is builder, executor, generator or schematic).Output
would probably be{ success: boolean }
.Calling
next
invokes next interceptor or actual builder/executor/generator/schematic if there are none left. It would be very similar to Angular's HttpInterceptor but for all NX commands.Motivation
Ability to modify parameters and output of various commands would be very useful to make workspace more suited for individual teams. Our use case is that we have parameter
alias
which we use to setup different environments on AWS, frontend builders etc. This parameter needs to be of a specific format, no longer than 10 character, only alpha numeric values etc. Right now, for each builder we use I have to write elaborate modification that parses this param if needed. It would be great to have onealias-interceptor
which would listen for that param and modify it if needed for every builder/executor.Suggested Implementation
I haven't worked on that yet, I would like to hear your opinion first.
Alternate Implementations
Same.
The text was updated successfully, but these errors were encountered: