Calling .then here creates a new promise. One that is not returned and generating a rejection within that promise can lead to unhandledRejection events being inappropriately raised.
As such, don't declare unneeded variables.
Add a "PromiseTracker" to the Variables class. It provides tracking and reporting of pending variable resolutions during service populations.
Decompose populateObject and populateProperty into smaller pieces that are easier to understand.
Additionally, remove the immediate recursive resolution of variables, recursing only at the Object or Property entry point (when changes have been made). This avoids a problem where the resolved value, prior to being replaced in the containing object or value refers to itself and thereby is waiting on its own resolution before it will resolve itself.
Return the given value in warnIfNotFound so that it can chain.
Delete bucket was still using them
Hopefully all :)
Further test fixes.
.... worked too long yesterday
Fixed Variable tests
Remove not used parameters from request() and add options with warning
Increase name consistency
Improve names to be-what-they-are
Reduce cyclomatic complexity
Include overrides population fix
Add variable methods documentation
Add more tests around significant variable patterns/risky cases
Make sure that requests are throttled. Use a queue for the requests.
Added new expected parameter to request() call in variables test
Added request cache tests
Check that request is indeed called 1000 times
Cache promises, not values
Use request cache for AWS variable requests
Use fromCallback instead of "new Promise" anti-pattern.
Added request cache to AWS provider
Check for the expected error message in the case the SSM parameter
does not exist and return `undefined`. Any other (unexpected) error
message still throws an exception.
Adds support for specifying SSM parameters as serverless variables.
Basic syntax is `${ssm:<foo>}`. To support decryption of SecureString
parameters, the extended syntax is `${ssm:<foo>~true|false}`. The `~`
is a delimiter; `true|false` is evaluated and passed to the
`WithDecryption` option of the SSM API.
When we define a cf variable in serverless.yml and that variable wasn't output from the Cloudformation Outputs
a useless error was throw:
> Cannot read property 'OutputValue' of undefined
Now the error give more information:
> Trying to request a non variable from Cloudformation.
> Stack name: "some-stack" Requested variable: "DoestNotExist"