feat: add local template support with --from-path option#763
Conversation
iankhou
left a comment
There was a problem hiding this comment.
I left some comments about code efficiency and validations.
Also, about option exclusivity for the --from-path option.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #763 +/- ##
==========================================
+ Coverage 80.88% 82.60% +1.72%
==========================================
Files 63 64 +1
Lines 8599 9465 +866
Branches 1028 1107 +79
==========================================
+ Hits 6955 7819 +864
+ Misses 1614 1612 -2
- Partials 30 34 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
iankhou
left a comment
There was a problem hiding this comment.
Let's handle flag conflicts at yargs, more details in comments. Some questions about error-handling, other minor corrections.
95ce3ec to
dd5139e
Compare
c882bc2 to
54e20f1
Compare
Signed-off-by: github-actions <[email protected]>
…guage specified, and fixed post-install for CDK languages
Signed-off-by: github-actions <[email protected]>
iankhou
left a comment
There was a problem hiding this comment.
Let's add a test for cdk init --language=[language], since we are adjusting logic surrounding that behavior.
ex. Currently, when I run cdk init --language=typescript, I get an initialization of the typescript CDK app.
This PR adds local template support through the new
--from-pathCLI option. Users can initialize CDK projects from local custom templates, copying the template as is without placeholder processing.The feature includes language auto-detection when templates contain a single language option and error handling for invalid paths. 3 new test cases covering basic local template functionality, language auto-detection, and error handling scenarios were added.
Fixes #
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license