mscifo / pressless

[NO LONGER MAINTAINED] A tool that migrates an existing Wordpress site into a fully functioning Serverless site, powered by AWS (Cloudfront, API Gateway, Lambda, S3).
MIT License
80 stars 14 forks source link

Incorrect use of promises in `setup` #8

Open mclark-newvistas opened 6 years ago

mclark-newvistas commented 6 years ago

Your code seems to assume that Promise-based code AWS calls will run in sequence, waiting for the previous to complete before continuing. This is not true (without async and then awaiting each one). As you require nodejs 6+, and async/await are in nodejs 8+, you'd have to do a required version bump to fix the Promises to work the way the code appears to assume they work...

How would you like to handle this? As is, the code would have to be restructured fairly severely to handle standard error checking properly, or a version bump - neither is a call I can make even with a GitHub Pull Request (especially restructuring all the Promise-based code :P ).