-
Notifications
You must be signed in to change notification settings - Fork 4k
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
chore(cli): model positional arguments in CliArguments #32718
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32718 +/- ##
=======================================
Coverage 66.96% 66.96%
=======================================
Files 329 329
Lines 18667 18667
Branches 3260 3260
=======================================
Hits 12501 12501
Misses 5839 5839
Partials 327 327
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…to conroy/positional
@@ -232,7 +247,7 @@ export function convertToCliArgs(args: any): CliArguments { | |||
break; | |||
} | |||
const cliArguments: CliArguments = { | |||
_: args._, | |||
_: args._[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
irrelevant but I actually hate this _
syntax lol
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 change CLI functionality (yet)
This PR models positional arguments in
CliArguments
. Currently they are supposed to be modeled as part of the the default property_: [Command, ...string]
. This means that incli.ts
we mean to use it as so:args._[1]
instead ofargs.ID
. This is a downgrade, so I've updated the following:Positional arguments are now modeled in
CliArguments
so if thedeploy
command hasSTACKS
argument, it shows up as part of itsDeployOptions
. With this model we will replaceargs.ID
withargs.acknowledge.ID
which I believe to be acceptable.Now, the default property is modeled as
_: Command
so that we don't duplicate information.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license