Skip to content
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

fix: display custom schematics in help #1911

Merged

Conversation

daniel-samson
Copy link
Contributor

@daniel-samson daniel-samson commented Feb 2, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[x] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Related:
Issue Number: #1433
PR: #1434

Currently, when you run nest generate --help, it will only display schematics from the @nestjs/schematics package. If you have a custom collection configured in nest-cl.json, it doesn't display the schematics from your custom package.

Example:

Screenshot 2023-02-02 at 22 05 56

What is the new behavior?

Example:

Screenshot 2023-02-02 at 20 35 20

After this change, you can see which collection is being selected and a table of schematics from that collection

Does this PR introduce a breaking change?

[ ] Yes
[X] No **

**It changes the commander to load async, and the getSchematics is no longer static, so sort of...

Other information

I have manually tested the local command and the global command, and it seems to work. This change is important to me, as it allows me to easily train my team to use the custom schematics i have made.

I am on the discord (verbing#6551)

Daniel Samson added 2 commits February 2, 2023 21:46
Signed-off-by: Daniel Samson <daniel.samson@finacial-cloud.com>
daniel-samson and others added 2 commits February 3, 2023 00:22
Co-authored-by: Micael Levi L. Cavalcante <mllc@icomp.ufam.edu.br>
Co-authored-by: Micael Levi L. Cavalcante <mllc@icomp.ufam.edu.br>
@daniel-samson
Copy link
Contributor Author

@micalevisk Thank you for the comments. They were very helpful. I have made the change you have asked for. Let me know if you need me to make any more changes.

@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec merged commit 019fa8a into nestjs:master Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants