Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pagedip/util-logger

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pagedip/util-logger - npm Package Compare versions

Comparing version 2.2.3 to 2.2.4

11

CHANGELOG.md

@@ -0,1 +1,12 @@

## [2.2.4](https://github.com/pagedip/pagedip-framework/tree/release/102/util/logger) - Apr 3, 2019
### Dependencies
- [@pagedip/util-prop-helpers](https://github.com/pagedip/pagedip-framework/tree/release/102/util/prop-helpers): `^1.2.5` → `^1.2.6`
- @babel/cli: `^7.2.3` → `^7.4.3`
### Commits
[`b598d737..2c04b76d`](https://github.com/pagedip/pagedip-framework/compare/b598d7371ad921fcb10ee26200222d1e24b3a83a..2c04b76d1ecc71949e8c3336a675a85e89d0c6b7)
- [`e2e4efa7`](https://github.com/pagedip/pagedip-framework/commit/e2e4efa7f8b47ea32baf6c2ed8a8d51b7ca75def) update deps
## [2.2.3](https://github.com/pagedip/pagedip-framework/tree/release/99/util/logger) - Mar 30, 2019

@@ -2,0 +13,0 @@

12

lib/index.js

@@ -9,3 +9,3 @@ /* eslint-disable */

enumerable: true,
get: function get() {
get: function () {
return _logger.default;

@@ -16,3 +16,3 @@ }

enumerable: true,
get: function get() {
get: function () {
return _progress.default;

@@ -29,7 +29,7 @@ }

var log = new _logger.default();
const log = new _logger.default();
var _default = log; // the default level of the built-in instance
exports.default = _default;
var globalLevel; // check localStorage first as the user may have directly set this and wants to
let globalLevel; // check localStorage first as the user may have directly set this and wants to
// override the built in value

@@ -63,3 +63,3 @@

var stderr = process && process.stderr;
const stderr = process && process.stderr;
log.use((0, _progress.default)({

@@ -69,2 +69,2 @@ enabled: Boolean(stderr && stderr.isTTY),

}));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdL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VtIGRlZmF1bHRcbmlmICghZ2xvYmFsTGV2ZWwgJiYgcHJvY2VzcyAmJiBwcm9jZXNzLmVudikge1xuICBnbG9iYWxMZXZlbCA9IHByb2Nlc3MuZW52LlBBR0VESVBfTE9HTEVWRUw7XG59XG5cbi8vIGFic29sdXRlIGRlZmF1bHQgaXMgaW5mb1xuaWYgKCFnbG9iYWxMZXZlbCkge1xuICBnbG9iYWxMZXZlbCA9IFwiaW5mb1wiO1xufVxuXG4vLyBzZXQgdGhlIGxvZyBsZXZlbFxudHJ5IHtcbiAgbG9nLmxldmVsID0gZ2xvYmFsTGV2ZWw7XG59IGNhdGNoKGUpIHtcbiAgbG9nLndhcm4oXCJsb2dnZXJcIiwgXCJ1bmtub3duIGxvZ2xldmVsICclcydcIiwgZ2xvYmFsTGV2ZWwpO1xufVxuXG4vLyBhZGQgcHJvZ3Jlc3MgcGx1Z2luXG5jb25zdCBzdGRlcnIgPSBwcm9jZXNzICYmIHByb2Nlc3Muc3RkZXJyO1xubG9nLnVzZShwcm9ncmVzcyh7XG4gIGVuYWJsZWQ6IEJvb2xlYW4oc3RkZXJyICYmIHN0ZGVyci5pc1RUWSksXG4gIHN0cmVhbTogc3RkZXJyXG59KSk7XG4iXX0=

@@ -23,40 +23,14 @@ /* eslint-disable */

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Logger =
/*#__PURE__*/
function (_EventEmitter) {
_inherits(Logger, _EventEmitter);
class Logger extends _events.EventEmitter {
constructor(opts) {
super();
function Logger(opts) {
var _this;
_defineProperty(this, "levels", {});
_classCallCheck(this, Logger);
_defineProperty(this, "priorities", []);
_this = _possibleConstructorReturn(this, _getPrototypeOf(Logger).call(this));
_defineProperty(_assertThisInitialized(_this), "levels", {});
_defineProperty(_assertThisInitialized(_this), "priorities", []);
opts = _this.options = Object.assign({}, Logger.defaults, opts);
(0, _utilPropHelpers.hidden)(_assertThisInitialized(_this), {
opts = this.options = Object.assign({}, Logger.defaults, opts);
(0, _utilPropHelpers.hidden)(this, {
_priority: 0

@@ -66,305 +40,249 @@ });

if (typeof opts.write === "function") {
_this.write = opts.write;
this.write = opts.write;
}
_this.color = new _chalk.default.constructor({
this.color = new _chalk.default.constructor({
enabled: opts.colors != null ? opts.colors : !!_supportsColor.default.stderr,
level: _supportsColor.default.stderr ? _supportsColor.default.stderr.level : 0
});
this.addLevel(opts.levels);
_this.addLevel(opts.levels);
if (isValidPriority(opts.priority)) {
_this.priority = opts.priority;
this.priority = opts.priority;
} else if (opts.level) {
_this.level = opts.level;
this.level = opts.level;
} else {
_this.priority = Logger.defaultPriority;
this.priority = Logger.defaultPriority;
}
}
return _this;
get __pagedip_logger__() {
return true;
}
_createClass(Logger, [{
key: "use",
value: function use(fn) {
var _this2 = this;
static isLogger(v) {
return Boolean(v && v["__pagedip_logger__"]);
}
if (Array.isArray(fn)) {
fn.forEach(function (f) {
return _this2.use(f);
});
} else if (typeof fn === "function") {
fn.call(this, this);
}
use(fn) {
if (Array.isArray(fn)) {
fn.forEach(f => this.use(f));
} else if (typeof fn === "function") {
fn.call(this, this);
}
return this;
return this;
}
get priority() {
return this._priority;
}
set priority(priority) {
if (typeof priority !== "number" || isNaN(priority)) {
throw new Error("Expecting number for priority");
}
}, {
key: "addLevel",
value: function addLevel(name, spec) {
var _this3 = this;
if (_typeof(name) === "object" && name != null) {
Object.keys(name).forEach(function (n) {
return _this3.addLevel(n, name[n]);
});
return this;
}
this._priority = priority;
}
if (typeof name !== "string") {
throw new Error("Expecting string for level name.");
}
get level() {
return this.priorityToLevel(this.priority);
}
if (name === "silent" || name === "all") {
throw new Error("Invalid level name.");
}
set level(level) {
const priority = this.levelToPriority(level);
spec = spec || {};
this.levels[name] = spec;
if (priority == null) {
throw new Error("Expecting a valid level name.");
}
if (isValidPriority(spec.priority)) {
var index = (0, _lodash.sortedIndexBy)(this.priorities, name, function (n) {
var lspec = _this3.levels[n];
return lspec && isValidPriority(lspec.priority) ? lspec.priority : Infinity;
});
this.priorities.splice(index, 0, name);
}
this.priority = priority;
}
[name].concat(spec.alias).forEach(function (m) {
if (m && typeof _this3[m] === "undefined") {
(0, _utilPropHelpers.hidden)(_this3, m, function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _this3.printf.apply(_this3, [name].concat(args));
});
}
});
addLevel(name, spec) {
if (typeof name === "object" && name != null) {
Object.keys(name).forEach(n => this.addLevel(n, name[n]));
return this;
}
}, {
key: "priorityToLevel",
value: function priorityToLevel(priority) {
if (!isValidPriority(priority)) {
throw new Error("Expecting valid priority.");
}
for (var i = 0; i < this.priorities.length; i++) {
var level = this.priorities[i];
var spec = this.levels[level];
if (typeof name !== "string") {
throw new Error("Expecting string for level name.");
}
if (spec && isValidPriority(spec.priority) && priority <= spec.priority) {
return level;
}
}
if (name === "silent" || name === "all") {
throw new Error("Invalid level name.");
}
}, {
key: "levelToPriority",
value: function levelToPriority(level) {
var _this4 = this;
// very special levels that aren't actually levels
if (level === "silent") return Infinity;else if (level === "all") return -Infinity;
var spec = this.levels[level];
spec = spec || {};
this.levels[name] = spec;
if (!spec) {
Object.keys(this.levels).some(function (l) {
var ls = _this4.levels[l];
if (isValidPriority(spec.priority)) {
const index = (0, _lodash.sortedIndexBy)(this.priorities, name, n => {
const lspec = this.levels[n];
return lspec && isValidPriority(lspec.priority) ? lspec.priority : Infinity;
});
this.priorities.splice(index, 0, name);
}
if (ls && ls.alias && [].concat(ls.alias).includes(level)) {
spec = ls;
return true;
}
[name].concat(spec.alias).forEach(m => {
if (m && typeof this[m] === "undefined") {
(0, _utilPropHelpers.hidden)(this, m, (...args) => {
return this.printf(name, ...args);
});
}
});
return this;
}
if (spec && isValidPriority(spec.priority)) {
return spec.priority;
}
priorityToLevel(priority) {
if (!isValidPriority(priority)) {
throw new Error("Expecting valid priority.");
}
}, {
key: "toLevel",
value: function toLevel(v) {
if (typeof v === "string") {
var spec = this.levels[v];
if (spec != null) return v;
} else if (isValidPriority(v)) {
return this.priorityToLevel(v);
for (let i = 0; i < this.priorities.length; i++) {
const level = this.priorities[i];
const spec = this.levels[level];
if (spec && isValidPriority(spec.priority) && priority <= spec.priority) {
return level;
}
}
}, {
key: "toPriority",
value: function toPriority(v) {
if (typeof v === "string") {
return this.levelToPriority(v);
} else if (isValidPriority(v)) {
return v;
}
}
}, {
key: "hasPriority",
value: function hasPriority(priority) {
if (typeof priority === "string") {
var level = priority;
priority = this.levelToPriority(level); // if the level exists but has no priority, then this passes
}
if (!isValidPriority(priority) && this.levels[level]) {
levelToPriority(level) {
// very special levels that aren't actually levels
if (level === "silent") return Infinity;else if (level === "all") return -Infinity;
let spec = this.levels[level];
if (!spec) {
Object.keys(this.levels).some(l => {
const ls = this.levels[l];
if (ls && ls.alias && [].concat(ls.alias).includes(level)) {
spec = ls;
return true;
}
}
});
}
if (!isValidPriority(priority)) {
throw new Error("Expecting valid priority or level name.");
}
if (spec && isValidPriority(spec.priority)) {
return spec.priority;
}
}
return priority >= this.priority;
toLevel(v) {
if (typeof v === "string") {
const spec = this.levels[v];
if (spec != null) return v;
} else if (isValidPriority(v)) {
return this.priorityToLevel(v);
}
}, {
key: "write",
value: function write() {// base write is a noop
}
toPriority(v) {
if (typeof v === "string") {
return this.levelToPriority(v);
} else if (isValidPriority(v)) {
return v;
}
}, {
key: "format",
value: function format(type) {
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
}
var method = (0, _lodash.get)(this.options, "format." + type);
hasPriority(priority) {
if (typeof priority === "string") {
const level = priority;
priority = this.levelToPriority(level); // if the level exists but has no priority, then this passes
if (args.length === 1 && typeof args[0] === "function") {
var a = args[0].call(this);
args = Array.isArray(a) ? a : [a];
if (!isValidPriority(priority) && this.levels[level]) {
return true;
}
}
if (typeof method === "function") {
return method.apply(this, args);
} else {
return args.join(" ");
}
if (!isValidPriority(priority)) {
throw new Error("Expecting valid priority or level name.");
}
}, {
key: "printf",
value: function printf(level, prefix) {
for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
args[_key3 - 2] = arguments[_key3];
}
var log = this.sprintf.apply(this, [level, prefix].concat(args));
return priority >= this.priority;
}
if (this.hasPriority(level)) {
this.write(log);
}
write() {// base write is a noop
}
return this;
format(type, ...args) {
const method = (0, _lodash.get)(this.options, "format." + type);
if (args.length === 1 && typeof args[0] === "function") {
const a = args[0].call(this);
args = Array.isArray(a) ? a : [a];
}
}, {
key: "sprintf",
value: function sprintf(level, prefix) {
var parts = [];
if (this.options.heading) {
parts.push(this.format("heading", this.options.heading));
}
if (typeof method === "function") {
return method.apply(this, args);
} else {
return args.join(" ");
}
}
var spec = this.levels[this.toLevel(level)];
printf(level, prefix, ...args) {
const log = this.sprintf(level, prefix, ...args);
if (spec && spec.display) {
parts.push(this.format("level", spec.display));
}
if (this.hasPriority(level)) {
this.write(log);
}
if (prefix) {
parts.push(this.format("prefix", prefix));
}
return this;
}
for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
args[_key4 - 2] = arguments[_key4];
}
sprintf(level, prefix, ...args) {
const parts = [];
parts.push(this.format.apply(this, ["log"].concat(args)));
var log = parts.filter(Boolean).join(" ");
this.emit("log", log, level, prefix);
this.emit("log:" + level, log, level, prefix);
if (prefix) this.emit(prefix, log, level, prefix);
return log;
if (this.options.heading) {
parts.push(this.format("heading", this.options.heading));
}
}, {
key: "prefix",
value: function prefix(_prefix) {
var _this5 = this;
var self = this;
const spec = this.levels[this.toLevel(level)];
function printf(level) {
for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
args[_key5 - 1] = arguments[_key5];
}
if (spec && spec.display) {
parts.push(this.format("level", spec.display));
}
self.printf.apply(self, [level, _prefix].concat(args));
return printf;
}
if (prefix) {
parts.push(this.format("prefix", prefix));
}
Object.keys(this.levels).forEach(function (k) {
var spec = _this5.levels[k];
if (!spec) return;
[k].concat(spec.alias).forEach(function (m) {
if (!m) return;
parts.push(this.format("log", ...args));
const log = parts.filter(Boolean).join(" ");
this.emit("log", log, level, prefix);
this.emit("log:" + level, log, level, prefix);
if (prefix) this.emit(prefix, log, level, prefix);
return log;
}
printf[m] = function () {
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
args[_key6] = arguments[_key6];
}
prefix(prefix) {
const self = this;
return printf.apply(void 0, [k].concat(args));
};
});
});
printf.prefixed = _prefix;
printf.logger = this;
this.emit("prefix", printf);
function printf(level, ...args) {
self.printf(level, prefix, ...args);
return printf;
}
}, {
key: "__pagedip_logger__",
get: function get() {
return true;
}
}, {
key: "priority",
get: function get() {
return this._priority;
},
set: function set(priority) {
if (typeof priority !== "number" || isNaN(priority)) {
throw new Error("Expecting number for priority");
}
this._priority = priority;
}
}, {
key: "level",
get: function get() {
return this.priorityToLevel(this.priority);
},
set: function set(level) {
var priority = this.levelToPriority(level);
Object.keys(this.levels).forEach(k => {
const spec = this.levels[k];
if (!spec) return;
[k].concat(spec.alias).forEach(m => {
if (!m) return;
if (priority == null) {
throw new Error("Expecting a valid level name.");
}
printf[m] = function (...args) {
return printf(k, ...args);
};
});
});
printf.prefixed = prefix;
printf.logger = this;
this.emit("prefix", printf);
return printf;
}
this.priority = priority;
}
}], [{
key: "isLogger",
value: function isLogger(v) {
return Boolean(v && v["__pagedip_logger__"]);
}
}]);
}
return Logger;
}(_events.EventEmitter);
exports.default = Logger;

@@ -376,11 +294,13 @@

error: {
display: function display() {
display() {
return this.color.bgBlack.red("ERR!");
},
priority: 6000
},
warn: {
display: function display() {
display() {
return this.color.bgYellow.black("WARN");
},
priority: 5000

@@ -393,17 +313,20 @@ },

debug: {
display: function display() {
display() {
return this.color.bgCyan.black("DBUG");
},
priority: 3000
},
verbose: {
display: function display() {
display() {
return this.color.bgBlack.cyan("VERB");
},
priority: 2000
},
silly: {
display: function display() {
display() {
return this.color.inverse("SILL");
},
priority: 1000

@@ -417,23 +340,19 @@ }

format: {
prefix: function prefix(_prefix2) {
var show = typeof this.options.displayPrefix === "boolean" ? this.options.displayPrefix : this.hasPriority("verbose");
return show ? this.color.magenta(_prefix2) : null;
prefix(prefix) {
const show = typeof this.options.displayPrefix === "boolean" ? this.options.displayPrefix : this.hasPriority("verbose");
return show ? this.color.magenta(prefix) : null;
},
heading: function heading(_heading) {
return this.color.bgBlack.white(_heading);
heading(heading) {
return this.color.bgBlack.white(heading);
},
log: function log() {
var _this6 = this;
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
args[_key7] = arguments[_key7];
}
log(...args) {
args = args.slice(0);
if (args.length) {
var msg = args.shift();
let msg = args.shift();
if (msg instanceof Error) {
var showStack = typeof this.options.traceErrors === "boolean" ? this.options.traceErrors : this.hasPriority("debug");
const showStack = typeof this.options.traceErrors === "boolean" ? this.options.traceErrors : this.hasPriority("debug");

@@ -450,7 +369,7 @@ if (showStack && msg.stack) {

return _util.format.apply(null, args.map(function (a) {
return _util.format.apply(null, args.map(a => {
if (typeof a !== "string") {
a = (0, _util.inspect)(a, {
colors: _this6.color.enabled,
depth: typeof _this6.options.inspectDepth === "number" ? _this6.options.inspectDepth : 5
colors: this.color.enabled,
depth: typeof this.options.inspectDepth === "number" ? this.options.inspectDepth : 5
});

@@ -462,4 +381,6 @@ }

}
},
write: function write(log) {
write(log) {
if (process.stderr && process.stderr.write) {

@@ -471,2 +392,3 @@ process.stderr.write(log + "\n");

}
});

@@ -479,2 +401,2 @@

module.exports = exports.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9sb2dnZXIuanMiXSwibmFtZXMiOlsiTG9nZ2VyIiwib3B0cyIsIm9wdGlvbnMiLCJPYmplY3QiLCJhc3NpZ24iLCJkZWZhdWx0cyIsIl9wcmlvcml0eSIsIndyaXRlIiwiY29sb3IiLCJjaGFsayIsImNvbnN0cnVjdG9yIiwiZW5hYmxlZCIsImNvbG9ycyIsInN1cHBvcnRzQ29sb3I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kaXNwbGF5UHJlZml4IDpcbiAgICAgICAgICB0aGlzLmhhc1ByaW9yaXR5KFwidmVyYm9zZVwiKTtcblxuICAgICAgICByZXR1cm4gc2hvdyA/IHRoaXMuY29sb3IubWFnZW50YShwcmVmaXgpIDogbnVsbDtcbiAgICAgIH0sXG4gICAgICBoZWFkaW5nKGhlYWRpbmcpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29sb3IuYmdCbGFjay53aGl0ZShoZWFkaW5nKTtcbiAgICAgIH0sXG4gICAgICBsb2coLi4uYXJncykge1xuICAgICAgICBhcmdzID0gYXJncy5zbGljZSgwKTtcblxuICAgICAgICBpZiAoYXJncy5sZW5ndGgpIHtcbiAgICAgICAgICBsZXQgbXNnID0gYXJncy5zaGlmdCgpO1xuXG4gICAgICAgICAgaWYgKG1zZyBpbnN0YW5jZW9mIEVycm9yKSB7XG4gICAgICAgICAgICBjb25zdCBzaG93U3RhY2sgPSB0eXBlb2YgdGhpcy5vcHRpb25zLnRyYWNlRXJyb3JzID09PSBcImJvb2xlYW5cIiA/XG4gICAgICAgICAgICAgIHRoaXMub3B0aW9ucy50cmFjZUVycm9ycyA6XG4gICAgICAgICAgICAgIHRoaXMuaGFzUHJpb3JpdHkoXCJkZWJ1Z1wiKTtcblxuICAgICAgICAgICAgaWYgKHNob3dTdGFjayAmJiBtc2cuc3RhY2spIHtcbiAgICAgICAgICAgICAgbXNnID0gbXNnLnN0YWNrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbXNnID0gbXNnLnRvU3RyaW5nID8gbXNnLnRvU3RyaW5nKCkgOiBtc2cubWVzc2FnZSB8fCBtc2c7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYXJncy51bnNoaWZ0KG1zZyk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZm9ybWF0LmFwcGx5KG51bGwsIGFyZ3MubWFwKGEgPT4ge1xuICAgICAgICAgIGlmICh0eXB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ycyA6XG4gICAgICAgICAgICAgIHRoaXMuaGFzUHJpb3JpdHkoXCJkZWJ1Z1wiKTtcblxuICAgICAgICAgICAgaWYgKHNob3dTdGFjayAmJiBtc2cuc3RhY2spIHtcbiAgICAgICAgICAgICAgbXNnID0gbXNnLnN0YWNrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbXNnID0gbXNnLnRvU3RyaW5nID8gbXNnLnRvU3RyaW5nKCkgOiBtc2cubWVzc2FnZSB8fCBtc2c7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYXJncy51bnNoaWZ0KG1zZyk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZm9ybWF0LmFwcGx5KG51bGwsIGFyZ3MubWFwKGEgPT4ge1xuICAgICAgICAgIGlmICh0eXBlb2YgYSAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgYSA9IGluc3BlY3QoYSwge1xuICAgICAgICAgICAgICBjb2xvcnM6IHRoaXMuY29sb3IuZW5hYmxlZCxcbiAgICAgICAgICAgICAgZGVwdGg6IHR5cGVvZiB0aGlzLm9wdGlvbnMuaW5zcGVjdERlcHRoID09PSBcIm51bWJlclwiID9cbiAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMuaW5zcGVjdERlcHRoIDogNVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGE7XG4gICAgICAgIH0pKTtcbiAgICAgIH0sXG4gICAgfSxcbiAgICB3cml0ZShsb2cpIHtcbiAgICAgIGlmIChwcm9jZXNzLnN0ZGVyciAmJiBwcm9jZXNzLnN0ZGVyci53cml0ZSkge1xuICAgICAgICBwcm9jZXNzLnN0ZGVyci53cml0ZShsb2cgKyBcIlxcblwiKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbnNvbGUubG9nKGxvZyk7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgbGV2Z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B0aGlzLmxldmVsc1trXTtcbiAgICAgIGlmICghc3BlYykgcmV0dXJuO1xuXG4gICAgICBba10uY29uY2F0KHNwZWMuYWxpYXMpLmZvckVhY2gobSA9PiB7XG4gICAgICAgIGlmICghbSkgcmV0dXJuO1xuICAgICAgICBwcmludGZbbV0gPSBmdW5jdGlvbiguLi5hcmdzKSB7XG4gICAgICAgICAgcmV0dXJuIHByaW50ZihrLCAuLi5hcmdzKTtcbiAgICAgICAgfTtcbiAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgcHJpbnRmLnByZWZpeGVkID0gcHJlZml4O1xuICAgIHByaW50Zi5sb2dnZXIgPSB0aGlzO1xuICAgIHRoaXMuZW1pdChcInByZWZpeFwiLCBwcmludGYpO1xuXG4gICAgcmV0dXJuIHByaW50ZjtcbiAgfVxufVxuXG5mdW5jdGlvbiBpc1ZhbGlkUHJpb3JpdHkocHJpb3JpdHkpIHtcbiAgcmV0dXJuIHR5cGVvZiBwcmlvcml0eSA9PT0gXCJudW1iZXJcIiAmJiAhaXNOYU4ocHJpb3JpdHkpO1xufVxuIl19

@@ -19,4 +19,4 @@ /* eslint-disable */

options = options || {};
var methods = {
enableProgress: function enableProgress(stream) {
const methods = {
enableProgress(stream) {
this.disableProgress();

@@ -26,7 +26,7 @@ stream = stream || options.stream;

if (!stream) {
throw new Error("Expecting writeable stream to attach progress bar too");
throw new Error(`Expecting writeable stream to attach progress bar too`);
}
if (typeof _gauge.default !== "function") {
this.warn("logger", "attempted to attach progress bar in an incompatible environment");
this.warn("logger", `attempted to attach progress bar in an incompatible environment`);
} else {

@@ -42,3 +42,4 @@ this.gauge = new _gauge.default(stream, _objectSpread({

},
disableProgress: function disableProgress() {
disableProgress() {
this.endProgress();

@@ -48,3 +49,4 @@ delete this.gauge;

},
startProgress: function startProgress() {
startProgress() {
if (this.gauge) {

@@ -57,3 +59,4 @@ this.gauge.enable();

},
progress: function progress(prefix, section, completed) {
progress(prefix, section, completed) {
prefix = this.format("prefix", prefix);

@@ -64,15 +67,14 @@ section = [prefix, section].filter(Boolean).join(" ");

},
pulse: function pulse() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var msg = this.format.apply(this, ["log"].concat(args));
pulse(...args) {
const msg = this.format("log", ...args);
if (this.gauge) this.gauge.pulse(msg);
return this;
},
endProgress: function endProgress() {
endProgress() {
if (this.gauge) this.gauge.disable();
return this;
}
};

@@ -82,7 +84,7 @@ return function (logger) {

var write = logger.write;
const write = logger.write;
logger.write = function () {
if (this.gauge) this.gauge.hide();
var result = write.apply(this, arguments);
const result = write.apply(this, arguments);
if (this.gauge) this.gauge.show();

@@ -92,13 +94,7 @@ return result;

logger.on("prefix", function (printf) {
Object.keys(methods).forEach(function (k) {
logger.on("prefix", printf => {
Object.keys(methods).forEach(k => {
if (k === "progress") {
printf[k] = function () {
var _printf$logger;
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return (_printf$logger = printf.logger)[k].apply(_printf$logger, [printf.prefixed].concat(args));
printf[k] = function (...args) {
return printf.logger[k](printf.prefixed, ...args);
};

@@ -120,2 +116,2 @@ } else {

module.exports = exports.default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9wcm9ncmVzcy5qcyJdLCJuYW1lcyI6WyJvcHRpb25zIiwibWV0aG9kcyIsImVuYWJsZVByb2dyZXNzIiwic3RyZWFtIiwiZGlzYWJsZVByb2dyZXNzIiwiRXJyb3IiLCJHYXVnZSIsIndhcm4iLCJnYXVnZSIsInVwZGF0ZUludGVydmFsIiwiZW5hYmxlZCIsImVuZFByb2dyZXNzIiwic3RhcnRQcm9ncmVzcyIsImVuYWJsZSIsImhpZGUiLCJwcm9ncmVzcyIsInByZWZpeCIsInNlY3Rpb24iLCJjb21wbGV0ZWQiLCJmb3JtYXQiLCJmaWx0Z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E9iamVjdC5rZXlzKG1ldGhvZHMpLmZvckVhY2goayA9PiB7XG4gICAgICAgIGlmIChrID09PSBcInByb2dyZXNzXCIpIHtcbiAgICAgICAgICBwcmludGZba10gPSBmdW5jdGlvbiguLi5hcmdzKSB7XG4gICAgICAgICAgICByZXR1cm4gcHJpbnRmLmxvZ2dlcltrXShwcmludGYucHJlZml4ZWQsIC4uLmFyZ3MpO1xuICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcHJpbnRmW2tdID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICByZXR1cm4gcHJpbnRmLmxvZ2dlcltrXS5hcHBseShwcmludGYubG9nZ2VyLCBhcmd1bWVudHMpO1xuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgaWYgKG9wdGlvbnMuZW5hYmxlZCkge1xuICAgICAgbG9nZ2VyLmVuYWJsZVByb2dyZXNzKCk7XG4gICAgfVxuICB9O1xufVxuIl19
{
"name": "@pagedip/util-logger",
"version": "2.2.3",
"version": "2.2.4",
"repository": {

@@ -20,3 +20,3 @@ "type": "git",

"dependencies": {
"@pagedip/util-prop-helpers": "^1.2.5",
"@pagedip/util-prop-helpers": "^1.2.6",
"chalk": "^2.4.2",

@@ -28,3 +28,3 @@ "gauge": "^2.7.4",

"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/cli": "^7.4.3",
"npm-run-all": "^4.1.5",

@@ -38,3 +38,3 @@ "shx": "^0.3.2",

],
"gitHead": "b598d7371ad921fcb10ee26200222d1e24b3a83a"
"gitHead": "aa11326ab94d776dfbe019641955b4dc77e29e98"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc