From 4087921e0e3699b1f13c39c5f02db9a9aa4998cf Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Mon, 21 Nov 2016 16:33:52 +0700 Subject: [PATCH 1/3] bring back probider.getStackName() --- lib/plugins/aws/provider/awsProvider.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js index af0dc9199..b7ead106f 100644 --- a/lib/plugins/aws/provider/awsProvider.js +++ b/lib/plugins/aws/provider/awsProvider.js @@ -12,6 +12,21 @@ const constants = { }; const impl = { + + /** + * Deprecated method. Moved to naming.js + * Kept here for backward compatibility + */ + getStackNmae(stage) { + const warningMessage = [ + 'Deprecation Notice: provider.getStackName() method is deprecated.', + ' Please reference the naming.js file instead: ', + ' ex. naming.getStackName();', + ].join(''); + + this.serverless.cli.log(warningMessage); + return `${this.serverless.service.service}-${stage}`; + }, /** * Add credentials, if present, from the given credentials configuration * @param credentials The credentials to add credentials configuration to From 632e86ec2e4cf06dafe1a86de9af63d32f6ddf34 Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Mon, 21 Nov 2016 16:42:38 +0700 Subject: [PATCH 2/3] fix typo --- lib/plugins/aws/provider/awsProvider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js index b7ead106f..dfd53a723 100644 --- a/lib/plugins/aws/provider/awsProvider.js +++ b/lib/plugins/aws/provider/awsProvider.js @@ -17,7 +17,7 @@ const impl = { * Deprecated method. Moved to naming.js * Kept here for backward compatibility */ - getStackNmae(stage) { + getStackName(stage) { const warningMessage = [ 'Deprecation Notice: provider.getStackName() method is deprecated.', ' Please reference the naming.js file instead: ', From 0519987cb85622ad99bf738a0f0a346e5fc4ccb9 Mon Sep 17 00:00:00 2001 From: "Eslam A. Hefnawy" Date: Mon, 21 Nov 2016 17:48:39 +0700 Subject: [PATCH 3/3] moved getStackName method into provider class --- lib/plugins/aws/provider/awsProvider.js | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/plugins/aws/provider/awsProvider.js b/lib/plugins/aws/provider/awsProvider.js index dfd53a723..1e0cd2e06 100644 --- a/lib/plugins/aws/provider/awsProvider.js +++ b/lib/plugins/aws/provider/awsProvider.js @@ -12,21 +12,6 @@ const constants = { }; const impl = { - - /** - * Deprecated method. Moved to naming.js - * Kept here for backward compatibility - */ - getStackName(stage) { - const warningMessage = [ - 'Deprecation Notice: provider.getStackName() method is deprecated.', - ' Please reference the naming.js file instead: ', - ' ex. naming.getStackName();', - ].join(''); - - this.serverless.cli.log(warningMessage); - return `${this.serverless.service.service}-${stage}`; - }, /** * Add credentials, if present, from the given credentials configuration * @param credentials The credentials to add credentials configuration to @@ -126,6 +111,21 @@ class AwsProvider { } } + /** + * Deprecated method. Moved to naming.js + * Kept here for backward compatibility + */ + getStackName(stage) { + const warningMessage = [ + 'Deprecation Notice: provider.getStackName() method is deprecated.', + ' Please reference the naming.js file instead: ', + ' ex. naming.getStackName();', + ].join(''); + + this.serverless.cli.log(warningMessage); + return `${this.serverless.service.service}-${stage}`; + } + request(service, method, params) { const that = this; const credentials = that.getCredentials();