mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
refactor: Configure main progress titles through command schema
This commit is contained in:
parent
fd68f9e803
commit
9e308bdf04
@ -45,6 +45,15 @@ commands.set('deploy', {
|
||||
'deploy',
|
||||
'finalize',
|
||||
],
|
||||
mainProgressTitles: new Map([
|
||||
['before:package:cleanup', 'Packaging'],
|
||||
['before:aws:deploy:deploy:createStack', 'Retrieving CloudFormation stack info'],
|
||||
['before:aws:deploy:deploy:checkForChanges', 'Retrieving CloudFormation stack info'],
|
||||
['before:aws:deploy:deploy:uploadArtifacts', 'Uploading'],
|
||||
['before:aws:deploy:deploy:validateTemplate', 'Updating CloudFormation stack'],
|
||||
['before:aws:info:validate', 'Retrieving CloudFormation stack info'],
|
||||
['after:deploy:deploy', 'Updating'],
|
||||
]),
|
||||
});
|
||||
|
||||
commands.set('deploy function', {
|
||||
|
||||
@ -25,6 +25,7 @@ commands.set('package', {
|
||||
'compileEvents',
|
||||
'finalize',
|
||||
],
|
||||
mainProgressTitles: new Map([['before:package:cleanup', 'Packaging']]),
|
||||
});
|
||||
|
||||
commands.set('plugin install', {
|
||||
|
||||
@ -11,7 +11,7 @@ const validateTemplate = require('./lib/validateTemplate');
|
||||
const updateStack = require('../lib/updateStack');
|
||||
const existsDeploymentBucket = require('./lib/existsDeploymentBucket');
|
||||
const path = require('path');
|
||||
const { style, log, progress, writeText } = require('@serverless/utils/log');
|
||||
const { style, log, writeText } = require('@serverless/utils/log');
|
||||
const memoize = require('memoizee');
|
||||
|
||||
class AwsDeploy {
|
||||
@ -124,7 +124,6 @@ class AwsDeploy {
|
||||
// Deploy finalize inner lifecycle
|
||||
'aws:deploy:finalize:cleanup': async () => {
|
||||
if (this.serverless.service.provider.shouldNotDeploy) return;
|
||||
progress.get('main').notice('Updating');
|
||||
log.info('Updating');
|
||||
await this.cleanupS3Bucket();
|
||||
if (this.options.package || this.serverless.service.package.path) {
|
||||
|
||||
@ -74,7 +74,6 @@ module.exports = {
|
||||
const templateUrl = `https://${s3Endpoint}/${this.bucketName}/${this.serverless.service.package.artifactDirectoryName}/${compiledTemplateFileName}`;
|
||||
|
||||
legacy.log('Updating Stack...');
|
||||
progress.get('main').notice('Updating CloudFormation stack');
|
||||
log.info('Updating CloudFormation stack');
|
||||
const stackName = this.provider.naming.getStackName();
|
||||
let stackTags = { STAGE: this.provider.getStage() };
|
||||
|
||||
@ -7,7 +7,7 @@ const _ = require('lodash');
|
||||
const micromatch = require('micromatch');
|
||||
const ServerlessError = require('../../../serverless-error');
|
||||
const parseS3URI = require('../../aws/utils/parse-s3-uri');
|
||||
const { legacy, progress, log } = require('@serverless/utils/log');
|
||||
const { legacy, log } = require('@serverless/utils/log');
|
||||
|
||||
module.exports = {
|
||||
defaultExcludes: [
|
||||
@ -68,7 +68,6 @@ module.exports = {
|
||||
|
||||
async packageService() {
|
||||
legacy.log('Packaging service...');
|
||||
progress.get('main').notice('Packaging');
|
||||
log.info();
|
||||
log.info('Packaging');
|
||||
let shouldPackageService = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user