@aminya/dotenv-vault
Version:
A secrets manager for .env files – from the same people that pioneered dotenv.
42 lines (41 loc) • 1.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogService = void 0;
const tslib_1 = require("tslib");
const chalk_1 = tslib_1.__importDefault(require("chalk"));
class LogService {
constructor(attrs = {}) {
this.cmd = attrs.cmd;
}
get pretextLocal() {
return 'local: ';
}
get pretextRemote() {
return 'remote: ';
}
deprecated(msg) {
if (msg === undefined) {
msg = '';
}
this.cmd.log(`${chalk_1.default.red('[DEPRECATED] Please switch to dotenvx (github.com/dotenvx/dotenvx) for all local commands. example: [dotenvx encrypt]')}${msg}`);
}
plain(msg) {
if (msg === undefined) {
msg = '';
}
this.cmd.log(msg);
}
local(msg) {
if (msg === undefined) {
msg = '';
}
this.cmd.log(`${chalk_1.default.dim(this.pretextLocal)}${msg}`);
}
remote(msg) {
if (msg === undefined) {
msg = '';
}
this.cmd.log(`${chalk_1.default.dim(this.pretextRemote)}${msg}`);
}
}
exports.LogService = LogService;