gruntwork-io / boilerplate

A tool for generating files and folders ("boilerplate") from a set of templates
https://www.gruntwork.io
Mozilla Public License 2.0
157 stars 12 forks source link

Implement validation system and user prompt enhancements #102

Closed zackproser closed 2 years ago

zackproser commented 2 years ago

Description

These changes introduce a few enhancements that we're planning to work into an updated gruntwork CLI experience. Namely:

Validations - users can specify a limited subset of known validations in their boilerplate.yml to have those validations run in real-time against their inputs when boilerplate prompts the end user for an input.

boilerplate-validations

Enum types now present multi-select prompts to the user with the specified options boilerplate-enum

Documentation

TODOs

Please ensure all of these TODOs are completed before asking for a review.

Related Issues

zackproser commented 2 years ago

I'm going to close this PR out in favor of smaller PRs that add in the changes we know we want, namely that ENUMs should present selection prompts and that simple string vars should use the default survey prompt.

I'll open separate issues and PRs for the follow-ups. I'm thinking it's possible that, given the limited time and scope we can support right now, it might make sense to have a branch of boilerplate that instruments only the validations we need in the hacky way I demonstrated here - with the understanding that we'll be using this patched version of the gruntwork cli only until we have whatever is next.

yorinasub17 commented 2 years ago

I'll open separate issues and PRs for the follow-ups. I'm thinking it's possible that, given the limited time and scope we can support right now, it might make sense to have a branch of boilerplate that instruments only the validations we need in the hacky way I demonstrated here - with the understanding that we'll be using this patched version of the gruntwork cli only until we have whatever is next.

Makes a lot of sense!

brikis98 commented 2 years ago

Oh, ignore me, I just realized this PR was closed and #105 is now open. Sorry for the noise!