chore(cli): aliased commands can be converted to cli args#32806
chore(cli): aliased commands can be converted to cli args#32806
Conversation
mrgrain
left a comment
There was a problem hiding this comment.
Code looks good, but I think your PR description and inline code needs to be expanded. Explain why this wasn't a problem so far (i.e. why is this PR not a fix or even p0 regression) and what (future) problem you are solving by adding aliases.
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
This PR does not currently change CLI functionality. The function
convertToCliArgsis not used in the CLI yet which is why this PR is not fixing a regression. It will eventually be used to strongly-type cli arguments.Previously, aliased commands, like
cdk ackinstead ofcdk acknowledgewould fall through the cracks of the generated convert function. The switch statement was only switching on command names so we would not store any options associated with an aliased command. Specifically,cdk synth --exclusivelywould not store theexclusivelyflag in the ensuingCliArgumentsobject becausesynthis an alias.Now we do. This is an additional step forward to being able to use
CliArgumentsincli.tsBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license