feat(schematics): list schematics from extended collections #2096
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The CLI lists available schematics from custom collections by parsing the
collection.json
file directly. This list does not include schematics that may be available via anextends
key in thecollection.json
. It also looks forcollection.json
in a fixed location, rather than supporting theschematics
key ofpackage.json
.Issue Number: N/A
What is the new behavior?
The CLI lists all available schematics (with
extends
support) and locates thecollection.json
using theschematics
key ofpackage.json
. Additionally, schematic names and aliases are deduped and merged to better reflect the actual configuration that will be used by@angular-devkit/schematics
: Collections usingextends
can overwrite extended collection schematics and re-map aliases. An alias may also override a schematic name, causing it to be effectively excluded from the collection.Does this PR introduce a breaking change?
Other information
Has allowing multiple schematic aliases in nest-cli been considered? I think it would make it more clear what is going on with how
@angular-devkit/schematics
merges schematic names and aliases. Right now there are hidden aliases defined by the schematics that can be used but not listed by the CLI.