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
which doesn't take in count the collection option from nest-cli.json config file
Expected behavior
nest generate --help should list the schematics available in the loaded collection
But I see three problems here:
can we fetch all schematics available of a collection programmatically?
the config file must be parsed every time someone uses --help, to retrieve the collection name. Which I think will degraded DX (without thinking of caching things around)
I don't think we can load the value of --collection option on GenerateCommand#buildDescription method
So, looks like listing the right set of schematics is not possible.
Then what we could do is indicate that the table lists schematics from the collection @nestjs/schematics, not just "Available schematics". This should avoid misusages of NestJS's CLI. Maybe "Schematics available on @nestjs/schematics collection" will be enough?
Package version
8.1.5
NestJS version
8.2.3
The text was updated successfully, but these errors were encountered:
Then what we could do is indicate that the table lists schematics from the collection @nestjs/schematics, not just "Available schematics". This should avoid misusages of NestJS's CLI. Maybe "Schematics available on @nestjs/schematics collection" will be enough?
Sounds good! Would you like to create a PR for this issue?
Is there an existing issue for this?
Current behavior
nest generate --help
always outputs this:(a list of available schematics) even when the schematics from
@nestjs/schematics
aren't available. For instance, using a custom collectionthen we can't run, for instance,
nest generate application
basically this is due to the following:
nest-cli/commands/generate.command.ts
Lines 77 to 83 in 35df7f8
nest-cli/commands/generate.command.ts
Line 100 in 35df7f8
nest-cli/lib/schematics/nest.collection.ts
Lines 124 to 128 in 35df7f8
which doesn't take in count the
collection
option fromnest-cli.json
config fileExpected behavior
nest generate --help
should list the schematics available in the loaded collectionBut I see three problems here:
--help
, to retrieve the collection name. Which I think will degraded DX (without thinking of caching things around)--collection
option onGenerateCommand#buildDescription
methodSo, looks like listing the right set of schematics is not possible.
Then what we could do is indicate that the table lists schematics from the collection
@nestjs/schematics
, not just "Available schematics". This should avoid misusages of NestJS's CLI. Maybe "Schematics available on @nestjs/schematics collection" will be enough?Package version
8.1.5
NestJS version
8.2.3
The text was updated successfully, but these errors were encountered: