mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
chore: remove chalk (#12447)
This commit is contained in:
parent
5eeac2f717
commit
4ba2a3534b
@ -12,7 +12,6 @@ import deepSortObjectByKey from '../utils/deep-sort-object-by-key.js';
|
||||
import ensureString from 'type/string/ensure.js';
|
||||
import isObject from 'type/object/is.js';
|
||||
import wait from 'timers-ext/promise/sleep.js';
|
||||
import chalk from 'chalk';
|
||||
|
||||
const { log } = utils;
|
||||
|
||||
@ -200,7 +199,7 @@ async function awsRequest(service, method, ...args) {
|
||||
? [
|
||||
'AWS provider credentials not found.',
|
||||
' Learn how to set up AWS provider credentials',
|
||||
` in our docs here: <${chalk.green('http://slss.io/aws-creds-setup')}>.`,
|
||||
` in our docs here: http://slss.io/aws-creds-setup`,
|
||||
].join('')
|
||||
: bottomError.message;
|
||||
message = errorMessage;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import chalk from 'chalk';
|
||||
import utils from '@serverlessinc/sf-core/src/utils.js';
|
||||
|
||||
const { log } = utils;
|
||||
@ -20,15 +19,13 @@ class CLI {
|
||||
}
|
||||
|
||||
printDot() {
|
||||
process.stdout.write(chalk.yellow('.'));
|
||||
process.stdout.write('.');
|
||||
}
|
||||
|
||||
log(message, entity, opts) {
|
||||
const { underline = false, bold = false, color = null } = opts || {};
|
||||
|
||||
let print = chalk;
|
||||
|
||||
if (color) print = chalk.keyword(color);
|
||||
if (color) print = color
|
||||
if (underline) print = print.underline;
|
||||
if (bold) print = print.bold;
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ import validate from '../lib/validate.js';
|
||||
import ServerlessError from '../../../serverless-error.js';
|
||||
import LocalLambda from './local-lambda/index.js';
|
||||
import { fileURLToPath } from 'url';
|
||||
import chalk from 'chalk'
|
||||
|
||||
const { log, progress } = utils;
|
||||
const logger = log.get('sls:dev');
|
||||
@ -90,13 +89,6 @@ const logFunctionEvent = (functionName, event, isVerbose) => {
|
||||
const logFunctionResponse = (functionName, response, isVerbose) => {
|
||||
try {
|
||||
if (response) {
|
||||
if (response.statusCode) {
|
||||
let statusCodeColor = chalk.green;
|
||||
if (response.statusCode >= 400) statusCodeColor = chalk.red;
|
||||
|
||||
// logger.aside(`← λ ${functionName} ${statusCodeColor(` ${response.statusCode} `)}`);
|
||||
}
|
||||
|
||||
if (isVerbose) {
|
||||
logger.aside(`${util.inspect(response, { showHidden: true, depth: null, colors: true })}`);
|
||||
}
|
||||
@ -463,7 +455,7 @@ class AwsDev {
|
||||
});
|
||||
|
||||
device.on('connect', () => {
|
||||
logger.success(`Connected ${chalk.grey('(Ctrl+C to cancel)')}`);
|
||||
logger.success(`Connected (Ctrl+C to cancel)`);
|
||||
|
||||
setInterval(() => {
|
||||
device.publish(this.getTopicId('_heartbeat'), JSON.stringify({ connected: true }), {
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
"aws-sdk": "^2.1604.0",
|
||||
"bluebird": "^3.7.2",
|
||||
"cachedir": "^2.3.0",
|
||||
"chalk": "^4.1.2",
|
||||
"child-process-ext": "^2.1.1",
|
||||
"chokidar": "^3.6.0",
|
||||
"ci-info": "^3.8.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user