Skip to content

Commit

Permalink
refactor(CLI): Simplify CF deploy progress
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 8, 2021
1 parent 05f937f commit be60ed4
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions lib/plugins/aws/lib/monitorStack.js
Expand Up @@ -5,7 +5,7 @@ const chalk = require('chalk');
const wait = require('timers-ext/promise/sleep');
const identity = require('ext/function/identity');
const ServerlessError = require('../../../serverless-error');
const { log, legacy, progress, style } = require('@serverless/utils/log');
const { log, legacy, style } = require('@serverless/utils/log');

const validStatuses = new Set(['CREATE_COMPLETE', 'UPDATE_COMPLETE', 'DELETE_COMPLETE']);

Expand Down Expand Up @@ -91,20 +91,6 @@ module.exports = {
legacy.write(chalk.yellow('.'));
}

if (action !== 'create' && event.ResourceType !== 'AWS::CloudFormation::Stack') {
if (eventStatus && eventStatus.endsWith('PROGRESS')) {
progress
.get(`cf-deploy-${event.LogicalResourceId}`)
.notice(
style.aside(
` ${eventStatus} - ${event.ResourceType} - ${event.LogicalResourceId}`
)
);
} else if (eventStatus && eventStatus.endsWith('COMPLETE')) {
progress.get(`cf-deploy-${event.LogicalResourceId}`).remove();
}
}

// Prepare for next monitoring action
loggedEventIds.add(event.EventId);
});
Expand Down

0 comments on commit be60ed4

Please sign in to comment.