mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
18 lines
537 B
JavaScript
18 lines
537 B
JavaScript
'use strict';
|
|
|
|
const chalk = require('chalk');
|
|
|
|
const processBackendNotificationRequest = require('@serverless/utils/process-backend-notification-request');
|
|
|
|
module.exports = notifications => {
|
|
const notification = processBackendNotificationRequest(notifications);
|
|
if (!notification) return;
|
|
|
|
const borderLength = 'Serverless: '.length + notification.message.length;
|
|
process.stdout.write(
|
|
`\n${'*'.repeat(borderLength)}\nServerless: ${chalk.yellow(notification.message)}\n${'*'.repeat(
|
|
borderLength
|
|
)}\n\n`
|
|
);
|
|
};
|