Skip to content

Commit

Permalink
refactor(CLI): Improve modern info output
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 1, 2021
1 parent 8aa700d commit 2828a2c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/plugins/aws/info/index.js
@@ -1,7 +1,7 @@
'use strict';

const BbPromise = require('bluebird');
const { progress, writeText } = require('@serverless/utils/log');
const { progress, writeText, style } = require('@serverless/utils/log');
const writeServiceOutputs = require('../../../cli/write-service-outputs');
const validate = require('../lib/validate');
const getStackInfo = require('./getStackInfo');
Expand Down Expand Up @@ -75,7 +75,13 @@ class AwsInfo {
'finalize': () => {
if (this.serverless.processedInput.commands.join(' ') !== 'info') return;

writeText();
writeText(
null,
`${style.aside('service:')} ${this.serverless.service.service}`,
`${style.aside('stage:')} ${this.provider.getStage()}`,
`${style.aside('region:')} ${this.provider.getRegion()}`,
`${style.aside('stack:')} ${this.provider.naming.getStackName()}`
);
writeServiceOutputs(this.serverless.serviceOutputs);
},
};
Expand Down

0 comments on commit 2828a2c

Please sign in to comment.