Skip to content

chore(cli): aliased commands can be converted to cli args#32806

Merged
kaizencc merged 3 commits intomainfrom
conroy/aliases
Jan 9, 2025
Merged

chore(cli): aliased commands can be converted to cli args#32806
kaizencc merged 3 commits intomainfrom
conroy/aliases

Conversation

@kaizencc
Copy link
Copy Markdown
Contributor

@kaizencc kaizencc commented Jan 9, 2025

This PR does not currently change CLI functionality. The function convertToCliArgs is 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 ack instead of cdk acknowledge would 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 --exclusively would not store the exclusively flag in the ensuing CliArguments object because synth is an alias.

Now we do. This is an additional step forward to being able to use CliArguments in cli.ts


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@kaizencc kaizencc requested a review from a team as a code owner January 9, 2025 04:32
@kaizencc kaizencc added the pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested label Jan 9, 2025
@github-actions github-actions bot added the p2 label Jan 9, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 9, 2025 04:32
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 9, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 9, 2025
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 9, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 9, 2025

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-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 34339c1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 9, 2025

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).

@kaizencc kaizencc merged commit d6013a7 into main Jan 9, 2025
1 of 2 checks passed
@kaizencc kaizencc deleted the conroy/aliases branch January 9, 2025 22:04
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 9, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr-linter/cli-integ-tested Assert that any CLI changes have been integ tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants