Socket
Socket
Sign inDemoInstall

node-opcua-debug

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-debug - npm Package Compare versions

Comparing version 0.2.0 to 0.2.2

0

index.js

@@ -0,0 +0,0 @@

2

package.json
{
"name": "node-opcua-debug",
"version": "0.2.0",
"version": "0.2.2",
"description": "pure nodejs OPCUA SDK - module -debug",

@@ -5,0 +5,0 @@ "scripts": {

@@ -0,0 +0,0 @@ function trace_from_this_projet_only(err) {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ function hexDump(buffer, width) {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

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

//xx console.log(" log_file ",log_file);
var f = fs.createWriteStream(log_file, {flags: 'w', encoding: "ascii"});

@@ -33,13 +34,9 @@

var msg = util.format.apply(null, arguments);
f.write(msg + '\n');
if (process.env.DEBUG) {
old_console_log.call(old_console_log, msg);
old_console_log.call(console, msg);
}
}
f.on('finish', function () {
if (callback) {
callback();
}
});

@@ -59,17 +56,16 @@ if (!is_async) {

console.log("redirectToFile has intercepted an error");
console.log("redirectToFile has intercepted an error :" , err);
// we don't want the callback anymore since we got an error
callback = function() {
// display file on screen for insvestigation
console.log(fs.readFileSync(log_file).toString("ascii"));
// rethrow exception
throw err;
};
f.end();
// display file on screen for insvestigation
console.log(fs.readFileSync(log_file).toString("ascii"));
f.end(function() {
callback(err);
});
}
console.log = old_console_log;
f.end(callback);
f.end();
} else {

@@ -81,6 +77,11 @@

// async version
action_func(function (err) {
assert(callback);
f.end();
console.log = old_console_log;
if (err) {
console.log("redirectToFile has intercepted an error");
throw err;
}
f.end(callback);
});

@@ -87,0 +88,0 @@ }

describe("",function(){
});

@@ -0,0 +0,0 @@ var dumpIf = require("..").dumpIf;

@@ -0,0 +0,0 @@ "use strcit";

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