Skip to content

Commit

Permalink
refactor: Configure promise returning functions as async (#10309)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdanyalkhan committed Dec 6, 2021
1 parent 1f58760 commit 4d4f863
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/plugins/aws/utils/credentials.js
Expand Up @@ -44,7 +44,7 @@ const parseFileProfiles = (content) => {
return profiles;
};

const writeCredentialsContent = (content) =>
const writeCredentialsContent = async (content) =>
new BbPromise((resolve, reject) =>
writeFile(
credentialsFilePath,
Expand Down Expand Up @@ -72,7 +72,7 @@ const writeCredentialsContent = (content) =>
);

module.exports = {
resolveFileProfiles() {
async resolveFileProfiles() {
return new BbPromise((resolve, reject) => {
if (!credentialsFilePath) {
resolve(new Map());
Expand Down Expand Up @@ -100,7 +100,7 @@ module.exports = {
};
},

saveFileProfiles(profiles) {
async saveFileProfiles(profiles) {
return new BbPromise((resolve) => {
if (!credentialsFilePath) {
throw new ServerlessError(
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/aws/utils/resolveCfImportValue.js
Expand Up @@ -2,7 +2,7 @@

const ServerlessError = require('../../../serverless-error');

function resolveCfImportValue(provider, name, sdkParams = {}) {
async function resolveCfImportValue(provider, name, sdkParams = {}) {
return provider.request('CloudFormation', 'listExports', sdkParams).then((result) => {
const targetExportMeta = result.Exports.find((exportMeta) => exportMeta.Name === name);
if (targetExportMeta) return targetExportMeta.Value;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/aws/utils/resolveCfRefValue.js
Expand Up @@ -2,7 +2,7 @@

const ServerlessError = require('../../../serverless-error');

function resolveCfRefValue(provider, resourceLogicalId, sdkParams = {}) {
async function resolveCfRefValue(provider, resourceLogicalId, sdkParams = {}) {
return provider
.request(
'CloudFormation',
Expand Down

0 comments on commit 4d4f863

Please sign in to comment.