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 2.5.9 to 2.6.0-alpha.0

5

dist/display_trace.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
// tslint:disable:no-console
exports.display_trace_from_this_projet_only = exports.trace_from_this_projet_only = void 0;
const chalk = require("chalk");

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

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
// tslint:disable:no-console
exports.dumpIf = exports.dump = void 0;
const util = require("util");

@@ -8,0 +5,0 @@ function dump(obj) {

4

dist/get_temp_filename.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
exports.getTempFilename = void 0;
const fs = require("fs");

@@ -7,0 +5,0 @@ const path = require("path");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
// tslint:disable:no-var-requires
exports.hexDump = void 0;
const hexy = require("hexy");

@@ -8,0 +5,0 @@ function hexDump(buffer, width = 32, maxSize = 1024) {

@@ -1,4 +0,1 @@

/**
* @module node-opcua-debug
*/
export { trace_from_this_projet_only, display_trace_from_this_projet_only } from "./display_trace";

@@ -5,0 +2,0 @@ export { checkDebugFlag, setDebugFlag, make_debugLog, make_errorLog } from "./make_loggers";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
var display_trace_1 = require("./display_trace");
exports.trace_from_this_projet_only = display_trace_1.trace_from_this_projet_only;
exports.display_trace_from_this_projet_only = display_trace_1.display_trace_from_this_projet_only;
Object.defineProperty(exports, "trace_from_this_projet_only", { enumerable: true, get: function () { return display_trace_1.trace_from_this_projet_only; } });
Object.defineProperty(exports, "display_trace_from_this_projet_only", { enumerable: true, get: function () { return display_trace_1.display_trace_from_this_projet_only; } });
var make_loggers_1 = require("./make_loggers");
exports.checkDebugFlag = make_loggers_1.checkDebugFlag;
exports.setDebugFlag = make_loggers_1.setDebugFlag;
exports.make_debugLog = make_loggers_1.make_debugLog;
exports.make_errorLog = make_loggers_1.make_errorLog;
Object.defineProperty(exports, "checkDebugFlag", { enumerable: true, get: function () { return make_loggers_1.checkDebugFlag; } });
Object.defineProperty(exports, "setDebugFlag", { enumerable: true, get: function () { return make_loggers_1.setDebugFlag; } });
Object.defineProperty(exports, "make_debugLog", { enumerable: true, get: function () { return make_loggers_1.make_debugLog; } });
Object.defineProperty(exports, "make_errorLog", { enumerable: true, get: function () { return make_loggers_1.make_errorLog; } });
var get_temp_filename_1 = require("./get_temp_filename");
exports.getTempFilename = get_temp_filename_1.getTempFilename;
Object.defineProperty(exports, "getTempFilename", { enumerable: true, get: function () { return get_temp_filename_1.getTempFilename; } });
var makebuffer_from_trace_1 = require("./makebuffer_from_trace");
exports.makebuffer_from_trace = makebuffer_from_trace_1.makebuffer_from_trace;
exports.inlineText = makebuffer_from_trace_1.inlineText;
Object.defineProperty(exports, "makebuffer_from_trace", { enumerable: true, get: function () { return makebuffer_from_trace_1.makebuffer_from_trace; } });
Object.defineProperty(exports, "inlineText", { enumerable: true, get: function () { return makebuffer_from_trace_1.inlineText; } });
var hexDump_1 = require("./hexDump");
exports.hexDump = hexDump_1.hexDump;
Object.defineProperty(exports, "hexDump", { enumerable: true, get: function () { return hexDump_1.hexDump; } });
var redirect_to_file_1 = require("./redirect_to_file");
exports.redirectToFile = redirect_to_file_1.redirectToFile;
Object.defineProperty(exports, "redirectToFile", { enumerable: true, get: function () { return redirect_to_file_1.redirectToFile; } });
var dump_if_1 = require("./dump_if");
exports.dump = dump_if_1.dump;
exports.dumpIf = dump_if_1.dumpIf;
Object.defineProperty(exports, "dump", { enumerable: true, get: function () { return dump_if_1.dump; } });
Object.defineProperty(exports, "dumpIf", { enumerable: true, get: function () { return dump_if_1.dumpIf; } });
//# sourceMappingURL=index.js.map
export declare function setDebugFlag(scriptFullPath: string, flag: boolean): void;
export declare function checkDebugFlag(scriptFullPath: string): boolean;
/**
* @method make_debugLog
* @param scriptFullPath:string
* @return returns a debugLog function that will write message to the console
* if the DEBUG environment variable indicates that the provided source file shall display debug trace
*
*/
export declare function make_debugLog(scriptFullPath: string): (...arg: any[]) => void;
export declare function make_errorLog(context: string): (...arg: any[]) => void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
// tslint:disable:no-console
exports.make_errorLog = exports.make_debugLog = exports.checkDebugFlag = exports.setDebugFlag = void 0;
const chalk = require("chalk");

@@ -39,7 +36,2 @@ const path = require("path");

exports.checkDebugFlag = checkDebugFlag;
/**
* file_line return a 51 caracter string
* @param filename
* @param callerLine
*/
function file_line(mode, filename, callerLine) {

@@ -57,3 +49,2 @@ const d = (new Date()).toISOString().substr(11);

const stack = new Error("").stack || "";
// caller line number
const l = stack.split("\n")[4].split(":");

@@ -81,9 +72,2 @@ const callerLine = parseInt(l[l.length - 2], 10);

}
/**
* @method make_debugLog
* @param scriptFullPath:string
* @return returns a debugLog function that will write message to the console
* if the DEBUG environment variable indicates that the provided source file shall display debug trace
*
*/
function make_debugLog(scriptFullPath) {

@@ -90,0 +74,0 @@ const filename = extractBasename(scriptFullPath);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
exports.makebuffer_from_trace = exports.inlineText = void 0;
const node_opcua_buffer_utils_1 = require("node-opcua-buffer-utils");

@@ -22,3 +20,2 @@ function inlineText(f) {

}
// find prefix
const prefixLength = lines[0].match(/[0-9a-fA-F:]*\ +/)[0].length;

@@ -42,3 +39,2 @@ for (let line of lines) {

}
// tslint:disable:ban-types
function makebuffer_from_trace(func) {

@@ -45,0 +41,0 @@ if (typeof func === "string") {

@@ -1,7 +0,1 @@

/**
* @method redirectToFile
* @param tmpFile {String} log file name to redirect console output.
* @param actionFct the inner function to execute
* @param callback
*/
export declare function redirectToFile(tmpFile: string, actionFct: Function, callback: ((err?: Error) => void) | null): void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @module node-opcua-debug
*/
// tslint:disable:no-console
// tslint:disable:ban-types
exports.redirectToFile = void 0;
const fs = require("fs");

@@ -13,8 +9,2 @@ const _ = require("underscore");

const get_temp_filename_1 = require("./get_temp_filename");
/**
* @method redirectToFile
* @param tmpFile {String} log file name to redirect console output.
* @param actionFct the inner function to execute
* @param callback
*/
function redirectToFile(tmpFile, actionFct, callback) {

@@ -26,3 +16,2 @@ let oldConsoleLog;

const logFile = get_temp_filename_1.getTempFilename(tmpFile);
// xx console.log(" log_file ",log_file);
const f = fs.createWriteStream(logFile, { flags: "w", encoding: "ascii" });

@@ -39,3 +28,2 @@ function _write_to_file(...args) {

console.log = _write_to_file;
// async version
try {

@@ -48,4 +36,2 @@ actionFct();

console.log("redirectToFile has intercepted an error :", err);
// we don't want the callback anymore since we got an error
// display file on screen for investigation
console.log(fs.readFileSync(logFile).toString("ascii"));

@@ -64,3 +50,2 @@ f.end(() => {

console.log = _write_to_file;
// async version
actionFct((err) => {

@@ -67,0 +52,0 @@ node_opcua_assert_1.assert(_.isFunction(callback));

{
"name": "node-opcua-debug",
"version": "2.5.9",
"version": "2.6.0-alpha.0",
"description": "pure nodejs OPCUA SDK - module -debug",

@@ -14,3 +14,3 @@ "scripts": {

"node-opcua-assert": "2.5.8",
"node-opcua-buffer-utils": "^2.5.9",
"node-opcua-buffer-utils": "^2.6.0-alpha.0",
"underscore": "^1.10.2"

@@ -39,3 +39,3 @@ },

"homepage": "http://node-opcua.github.io/",
"gitHead": "3cadd387a1ddb6158b80280e9b61d4432d5be996"
"gitHead": "b4e0776f042c4a1e5c801f38a249f6da46b5057d"
}

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

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