Skip to content
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

Serverless 2.0 support #203

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Serverless AWS alias plugin

**The plugin requires Serverless 1.12 or later!**
**The plugin requires Serverless 2.0 or later!**

This plugin enables use of AWS aliases on Lambda functions. The term alias must not
be mistaken as the stage. Aliases can be deployed to stages, e.g. if you work on
Expand Down
4 changes: 3 additions & 1 deletion lib/stackInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ module.exports = {
*/
aliasStackLoadAliasTemplates() {

return this.aliasStackGetAliasStackNames() // eslint-disable-line lodash/prefer-lodash-method
return BbPromise.bind(this).then(() => {
return this.aliasStackGetAliasStackNames();
})
.mapSeries(stack => BbPromise.join(BbPromise.resolve(stack), this.aliasStackLoadTemplate(stack)))
.map(stackInfo => ({ stack: stackInfo[0], template: stackInfo[1] }))
.catch(err => {
Expand Down
4 changes: 2 additions & 2 deletions lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ module.exports = {
validate() {

// Check required serverless version
if (SemVer.gt('1.12.0', this.serverless.getVersion())) {
return BbPromise.reject(new this.serverless.classes.Error('Serverless verion must be >= 1.12.0'));
if (SemVer.gt('2.0.0', this.serverless.getVersion())) {
return BbPromise.reject(new this.serverless.classes.Error('Serverless verion must be >= 2.0.0'));
}

// Set configuration
Expand Down
Loading