cypress-aws-secrets-manager
Version:
Cypress Plugin | Integrate the power of AWS Secrets Manager seamlessly into your Cypress tests with the cypress-aws-secrets-manager plugin. This lightweight yet powerful plugin facilitates the secure loading of secrets stored in AWS Secrets Manager direct
28 lines (22 loc) • 590 B
JavaScript
// logger.js
const { getSilentMode } = require('./config')
const chalk = require('chalk')
function log(...args) {
// sempre visibile, bypassa silentMode
console.log(...args)
}
function info(...args) {
// anche in silentMode vogliamo vedere warning
if (!getSilentMode()) {
console.log(...args)
}
}
function warn(...args) {
// anche in silentMode vogliamo vedere warning
console.warn(chalk.yellow(...args))
}
function error(...args) {
// anche in silentMode vogliamo vedere gli errori
console.error(chalk.red(...args))
}
module.exports = { log, info, warn, error }