UNPKG

cloudfront-ip-ranges

Version:

Get Cloudfront IPs for use in trust proxy configurations

33 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Logger = void 0; const chalk_1 = require("chalk"); const debug = require("debug"); const colours = { debug: chalk_1.cyan, info: chalk_1.bold.cyan, warn: chalk_1.red, error: chalk_1.bold.red, }; class Logger { constructor(namespace) { this._info = debug(`cloudfront-ip-range:${namespace}:info`); this._debug = debug(`cloudfront-ip-range:${namespace}:debug`); this._error = debug(`cloudfront-ip-range:${namespace}:error`); this._warn = debug(`cloudfront-ip-range:${namespace}:warn`); } info(...args) { this._info(colours.info(args[0]), ...args.splice(1)); } debug(...args) { this._debug(colours.debug(args[0]), ...args.splice(1)); } warn(...args) { this._warn(colours.warn(args[0]), ...args.splice(1)); } error(...args) { this._error(colours.error(args[0]), ...args.splice(1)); } } exports.Logger = Logger; //# sourceMappingURL=logger.js.map