New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@contrail/app-framework

Package Overview
Dependencies
Maintainers
9
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/app-framework - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

22

lib/logger.d.ts
export declare class Logger {
allEntries: Array<string>;
private level;
allEntries: any[];
private fatalOn;
private errorOn;
private warnOn;
private infoOn;
private debugOn;
private traceOn;
constructor(_config?: {});
isFatalOn(): boolean;
isErrorOn(): boolean;
isWarnOn(): boolean;
isInfoOn(): boolean;
isDebugOn(): boolean;
isTraceOn(): boolean;
fatal(...args: any[]): void;
error(...args: any[]): void;
warn(...args: any[]): void;
info(...args: any[]): void;
debug(...args: any[]): void;
trace(...args: any[]): void;
log(...args: any[]): void;

@@ -4,0 +24,0 @@ getEntries(): string;

@@ -5,5 +5,98 @@ "use strict";

class Logger {
constructor() {
constructor(_config = {}) {
this.level = 'error';
this.allEntries = [];
this.fatalOn = true;
this.errorOn = true;
this.warnOn = false;
this.infoOn = false;
this.debugOn = false;
this.traceOn = false;
let configLevel = _config['logLevel'];
if (configLevel) {
configLevel = configLevel.toLowerCase();
}
else {
configLevel = 'error';
}
if (['fatal', 'error', 'warn', 'info', 'debug', 'trace'].includes(configLevel)) {
this.level = configLevel;
}
this.fatalOn = this.errorOn = this.warnOn = this.infoOn = this.debugOn = this.traceOn = false;
switch (this.level) {
case 'fatal':
this.fatalOn = true;
this.errorOn = this.warnOn = this.infoOn = this.debugOn = this.traceOn = false;
break;
case 'error':
this.fatalOn = this.errorOn = true;
this.warnOn = this.infoOn = this.debugOn = this.traceOn = false;
break;
case 'warn':
this.fatalOn = this.errorOn = this.warnOn = true;
this.infoOn = this.debugOn = this.traceOn = false;
break;
case 'info':
this.fatalOn = this.errorOn = this.warnOn = this.infoOn = true;
this.debugOn = this.traceOn = false;
break;
case 'debug':
this.fatalOn = this.errorOn = this.warnOn = this.infoOn = this.debugOn = true;
this.traceOn = false;
break;
case 'trace':
this.fatalOn = this.errorOn = this.warnOn = this.infoOn = this.debugOn = this.traceOn = true;
break;
default:
break;
}
}
isFatalOn() {
return this.fatalOn;
}
isErrorOn() {
return this.errorOn;
}
isWarnOn() {
return this.warnOn;
}
isInfoOn() {
return this.infoOn;
}
isDebugOn() {
return this.debugOn;
}
isTraceOn() {
return this.traceOn;
}
fatal(...args) {
if (this.fatalOn) {
this.log(args);
}
}
error(...args) {
if (this.errorOn) {
this.log(args);
}
}
warn(...args) {
if (this.warnOn) {
this.log(args);
}
}
info(...args) {
if (this.infoOn) {
this.log(args);
}
}
debug(...args) {
if (this.debugOn) {
this.log(args);
}
}
trace(...args) {
if (this.traceOn) {
this.log(args);
}
}
log(...args) {

@@ -10,0 +103,0 @@ console.log(...args);

2

package.json
{
"name": "@contrail/app-framework",
"version": "1.0.9",
"version": "1.0.10",
"description": "The app framework for VibeIQ Apps.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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