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

@callstack/reassure-logger

Package Overview
Dependencies
Maintainers
10
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@callstack/reassure-logger - npm Package Compare versions

Comparing version 0.3.1 to 0.11.0

lib/commonjs/warn-once.js

3

lib/commonjs/colors.js

@@ -7,3 +7,3 @@ "use strict";

exports.colors = void 0;
const colors = {
const colors = exports.colors = {
brand: '#4FE89A',

@@ -14,3 +14,2 @@ error: '#E73A0E',

};
exports.colors = colors;
//# sourceMappingURL=colors.js.map

@@ -6,7 +6,24 @@ "use strict";

});
exports.logger = void 0;
var _logger = _interopRequireWildcard(require("./logger"));
exports.logger = _logger;
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var _exportNames = {
warnOnce: true
};
Object.defineProperty(exports, "warnOnce", {
enumerable: true,
get: function () {
return _warnOnce.warnOnce;
}
});
var _logger = require("./logger");
Object.keys(_logger).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _logger[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _logger[key];
}
});
});
var _warnOnce = require("./warn-once");
//# sourceMappingURL=index.js.map

@@ -11,2 +11,3 @@ "use strict";

exports.log = log;
exports.newLine = newLine;
exports.progress = progress;

@@ -38,24 +39,25 @@ exports.verbose = verbose;

const rawConsole = require('console');
function error() {
rawConsole.error(colorError(...arguments));
function error(message, ...args) {
rawConsole.error(colorError(message, ...args));
}
function warn() {
function warn(message, ...args) {
if (config.silent) return;
rawConsole.warn(colorWarn(...arguments));
rawConsole.warn(colorWarn(message, ...args));
}
function log() {
function log(message, ...args) {
if (config.silent) return;
rawConsole.log(...arguments);
rawConsole.log(message, ...args);
}
function verbose() {
function verbose(message, ...args) {
if (!config.verbose || config.silent) return;
rawConsole.log(colorVerbose(...arguments));
rawConsole.log(colorVerbose(message, ...args));
}
function color(color) {
function newLine() {
if (config.silent) return;
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return rawConsole.log(_chalk.default.hex(_colors.colors[color])(args));
rawConsole.log();
}
function color(color, ...args) {
if (config.silent) return;
return rawConsole.log(_chalk.default.hex(_colors.colors[color])(...args));
}

@@ -62,0 +64,0 @@ /** Log message that indicates progress of operation, does not output the trailing newline. */

@@ -1,3 +0,3 @@

import * as _logger from './logger';
export { _logger as logger };
export * from './logger';
export { warnOnce } from './warn-once';
//# sourceMappingURL=index.js.map

@@ -23,24 +23,25 @@ import readline from 'readline';

const rawConsole = require('console');
export function error() {
rawConsole.error(colorError(...arguments));
export function error(message, ...args) {
rawConsole.error(colorError(message, ...args));
}
export function warn() {
export function warn(message, ...args) {
if (config.silent) return;
rawConsole.warn(colorWarn(...arguments));
rawConsole.warn(colorWarn(message, ...args));
}
export function log() {
export function log(message, ...args) {
if (config.silent) return;
rawConsole.log(...arguments);
rawConsole.log(message, ...args);
}
export function verbose() {
export function verbose(message, ...args) {
if (!config.verbose || config.silent) return;
rawConsole.log(colorVerbose(...arguments));
rawConsole.log(colorVerbose(message, ...args));
}
export function color(color) {
export function newLine() {
if (config.silent) return;
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return rawConsole.log(chalk.hex(colors[color])(args));
rawConsole.log();
}
export function color(color, ...args) {
if (config.silent) return;
return rawConsole.log(chalk.hex(colors[color])(...args));
}

@@ -47,0 +48,0 @@ /** Log message that indicates progress of operation, does not output the trailing newline. */

@@ -1,2 +0,3 @@

export * as logger from './logger';
export * from './logger';
export { warnOnce } from './warn-once';
//# sourceMappingURL=index.d.ts.map

@@ -9,6 +9,7 @@ import { colors } from './colors';

export declare function configure(options: Partial<LoggerOptions>): void;
export declare function error(...args: unknown[]): void;
export declare function warn(...args: unknown[]): void;
export declare function log(...args: unknown[]): void;
export declare function verbose(...args: unknown[]): void;
export declare function error(message: string, ...args: unknown[]): void;
export declare function warn(message: string, ...args: unknown[]): void;
export declare function log(message: string, ...args: unknown[]): void;
export declare function verbose(message: string, ...args: unknown[]): void;
export declare function newLine(): void;
export declare function color(color: keyof typeof colors, ...args: unknown[]): void;

@@ -15,0 +16,0 @@ /** Log message that indicates progress of operation, does not output the trailing newline. */

{
"name": "@callstack/reassure-logger",
"version": "0.3.1",
"version": "0.11.0",
"description": "Logger for Reassure project",

@@ -46,3 +46,8 @@ "main": "lib/commonjs/index",

"module",
"typescript"
[
"typescript",
{
"project": "tsconfig.build.json"
}
]
]

@@ -49,0 +54,0 @@ },

@@ -1,1 +0,2 @@

export * as logger from './logger';
export * from './logger';
export { warnOnce } from './warn-once';

@@ -31,28 +31,34 @@ import readline from 'readline';

export function error(...args: unknown[]) {
rawConsole.error(colorError(...args));
export function error(message: string, ...args: unknown[]) {
rawConsole.error(colorError(message, ...args));
}
export function warn(...args: unknown[]) {
export function warn(message: string, ...args: unknown[]) {
if (config.silent) return;
rawConsole.warn(colorWarn(...args));
rawConsole.warn(colorWarn(message, ...args));
}
export function log(...args: unknown[]) {
export function log(message: string, ...args: unknown[]) {
if (config.silent) return;
rawConsole.log(...args);
rawConsole.log(message, ...args);
}
export function verbose(...args: unknown[]) {
export function verbose(message: string, ...args: unknown[]) {
if (!config.verbose || config.silent) return;
rawConsole.log(colorVerbose(...args));
rawConsole.log(colorVerbose(message, ...args));
}
export function newLine() {
if (config.silent) return;
rawConsole.log();
}
export function color(color: keyof typeof colors, ...args: unknown[]) {
if (config.silent) return;
return rawConsole.log(chalk.hex(colors[color])(args));
return rawConsole.log(chalk.hex(colors[color])(...args));
}

@@ -59,0 +65,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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