refactor(CLI): Improve log spacing

This commit is contained in:
Mariusz Nowak 2021-09-22 14:21:18 +02:00 committed by Mariusz Nowak
parent 54bb13b6a6
commit e0befa48bb
2 changed files with 8 additions and 5 deletions

View File

@ -78,7 +78,7 @@ class AwsDeploy {
.getProvider('aws')
.getStage()} ${style.aside(`(${this.serverless.getProvider('aws').getRegion()})`)}`
);
log.notice();
log.info(); // Ensure gap between verbose logging
}
},
@ -168,8 +168,9 @@ class AwsDeploy {
if (this.serverless.processedInput.commands.join(' ') !== 'deploy') return;
if (this.options.function) return;
if (this.serverless.service.provider.shouldNotDeploy) {
log.notice();
log.notice(
`\n${style.noticeSymbol('∅')} No changes to deploy. Deployment skipped. ${style.aside(
`${style.noticeSymbol('∅')} No changes to deploy. Deployment skipped. ${style.aside(
`(${Math.floor(
(Date.now() - this.serverless.pluginManager.commandRunStartTime) / 1000
)}s)`
@ -177,16 +178,18 @@ class AwsDeploy {
);
return;
}
log.notice();
log.notice(
`\n${style.noticeSymbol('✔')} Service deployed to stack ${this.serverless
`${style.noticeSymbol('✔')} Service deployed to stack ${this.serverless
.getProvider('aws')
.naming.getStackName()} ${style.aside(
`(${Math.floor(
(Date.now() - this.serverless.pluginManager.commandRunStartTime) / 1000
)}s)`
)}\n`
)}`
);
if (this.serverless.serviceOutputs) {
writeText();
for (const [section, entries] of this.serverless.serviceOutputs) {
if (typeof entries === 'string') {
writeText(`${style.aside(`${section}:`)} ${entries}`);

View File

@ -66,7 +66,7 @@ class AwsPackage {
.getProvider('aws')
.getStage()} ${style.aside(`(${this.serverless.getProvider('aws').getRegion()})`)}`
);
log.notice();
log.info(); // Ensure gap between verbose logging
}
},
'before:package:cleanup': () => mainProgress.notice('Packaging', { isMainEvent: true }),