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

Refactor the CLI #176

Closed
RomainMuller opened this issue Jun 25, 2018 · 2 comments
Closed

Refactor the CLI #176

RomainMuller opened this issue Jun 25, 2018 · 2 comments
Labels
feature-request A feature should be added or improved.

Comments

@RomainMuller
Copy link
Contributor

The current CLI code is mostly untested and consists in a large monolith that handles different commands. The output of cdk --help also makes incorrect claims (for example that --app is unconditionally mandatory, when it is only for certain commands).

The proposal is to re-factor using yarg's commandDir directive, and introducing unit tests as we are migrating commands from the current state to the new paradigm.

We should also consider whether it makes sense to interactively collect additional information from the user instead of bailing out, for scenarios where that makes sense (no default region defined, ...).

RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jun 25, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
@eladb
Copy link
Contributor

eladb commented Jun 28, 2018

Something that came up that we should consider is: does it make sense to rewrite the CDK CLI into the AWS CLI?

@RomainMuller
Copy link
Contributor Author

It might make sense in the future, yes. That is a direction we are definitely looking forward to, possibly at some point next year.

RomainMuller added a commit that referenced this issue Jul 3, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
RomainMuller added a commit that referenced this issue Jul 3, 2018
Breaking down the monolithic CLI infrastructure by using `yarg`'s
`commandDir` directive (see #176). This allows modelling each command in
a separate module for a cleaner interface.

Migrated the `docs` command, and created a prototype of a `doctor`
command (see #154). The new commands also have basic unit tests that
verify the handlers honor their promises.
@srchase srchase added feature-request A feature should be added or improved. and removed enhancement labels Jan 3, 2019
@eladb eladb closed this as completed Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

3 participants