Socket
Socket
Sign inDemoInstall

residue

Package Overview
Dependencies
3
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.3 to 3.0.4

2

package.json
{
"name": "residue",
"version": "3.0.3",
"version": "3.0.4",
"description": "Library to interact with residue server seamlessly.",

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

@@ -18,3 +18,3 @@ //

const util = require('util');
const residue_native = require('residue-native');
const residueNativeClient = require('residue-native');
const CommonUtils = require('residue-utils');

@@ -27,22 +27,22 @@

// (see CMakeLists.txt) but will still do it so we have it available before hand
residue_native.register_logger(this.id);
residueNativeClient.register_logger(this.id);
this.trace = (fmt, ...args) => this._write_log(CommonUtils.LoggingLevels.Trace, undefined, fmt, ...args);
this.debug = (fmt, ...args) => this._write_log(CommonUtils.LoggingLevels.Debug, undefined, fmt, ...args);
this.fatal = (fmt, ...args) => this._write_log(CommonUtils.LoggingLevels.Fatal, undefined, fmt, ...args);
this.error = (fmt, ...args) => this._write_log(CommonUtils.LoggingLevels.Error, undefined, fmt, ...args);
this.warn = (fmt, ...args) => this._write_log(CommonUtils.LoggingLevels.Warning, undefined, fmt, ...args);
this.info = (fmt, ...args) => this._write_log(CommonUtils.LoggingLevels.Info, undefined, fmt, ...args);
this.verbose = (vlevel, fmt, ...args) => this._write_log(CommonUtils.LoggingLevels.Verbose, vlevel, fmt, ...args);
this.trace = (fmt, ...args) => this._write(CommonUtils.LoggingLevels.Trace, undefined, fmt, ...args);
this.debug = (fmt, ...args) => this._write(CommonUtils.LoggingLevels.Debug, undefined, fmt, ...args);
this.fatal = (fmt, ...args) => this._write(CommonUtils.LoggingLevels.Fatal, undefined, fmt, ...args);
this.error = (fmt, ...args) => this._write(CommonUtils.LoggingLevels.Error, undefined, fmt, ...args);
this.warn = (fmt, ...args) => this._write(CommonUtils.LoggingLevels.Warning, undefined, fmt, ...args);
this.info = (fmt, ...args) => this._write(CommonUtils.LoggingLevels.Info, undefined, fmt, ...args);
this.verbose = (vlevel, fmt, ...args) => this._write(CommonUtils.LoggingLevels.Verbose, vlevel, fmt, ...args);
// private members
this._source_base_index = 5;
this._write_log = (level, vlevel, fmt, ...args) => {
this._sourceBaseIndex = 5;
this._write = (level, vlevel, fmt, ...args) => {
const fullMessage = CommonUtils.translateArgs(true, ...args);
residue_native.write_log(this.id,
this.log_sources.getSourceFile(),
this.log_sources.getSourceLine(),
this.log_sources.getSourceFunc(),
residueNativeClient.write_log(this.id,
this._logSources.getSourceFile(),
this._logSources.getSourceLine(),
this._logSources.getSourceFunc(),
util.format(fmt, ...fullMessage),

@@ -53,7 +53,7 @@ level,

this.log_sources = {
base_idx: 6,
getSourceFile: () => CommonUtils.getSourceFile(this.log_sources.base_idx),
getSourceLine: () => CommonUtils.getSourceLine(this.log_sources.base_idx),
getSourceFunc: () => CommonUtils.getSourceFunc(this.log_sources.base_idx),
this._logSources = {
baseIndex: 6,
getSourceFile: () => CommonUtils.getSourceFile(this._logSources.baseIndex),
getSourceLine: () => CommonUtils.getSourceLine(this._logSources.baseIndex),
getSourceFunc: () => CommonUtils.getSourceFunc(this._logSources.baseIndex),
};

@@ -63,3 +63,3 @@ };

const ResidueClient = function() {
this.version = residue_native.version;
this.version = residueNativeClient.version;

@@ -72,8 +72,8 @@ this.type = () => 'native';

}
residue_native.connect();
residueNativeClient.connect();
};
this.disconnect = residue_native.disconnect;
this.disconnect = residueNativeClient.disconnect;
this.isConnected = residue_native.is_connected;
this.isConnected = residueNativeClient.is_connected;

@@ -88,3 +88,3 @@ this.getLogger = (id) => (new Logger(id));

}
residue_native.configure(conf);
residueNativeClient.configure(conf);
return true;

@@ -91,0 +91,0 @@ };

@@ -288,4 +288,4 @@ //

setTimeout(() => {
if (self.params.sendRequestBacklogCallbacks.length > 0) {
const cb = self.params.sendRequestBacklogCallbacks.splice(0, 1)[0];
if (self._params.sendRequestBacklogCallbacks.length > 0) {
const cb = self._params.sendRequestBacklogCallbacks.splice(0, 1)[0];
cb();

@@ -292,0 +292,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc