node-opcua-debug
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -7,6 +7,6 @@ "use strict"; | ||
// tslint:disable:no-console | ||
const chalk_1 = require("chalk"); | ||
const chalk = require("chalk"); | ||
function trace_from_this_projet_only(err) { | ||
const str = []; | ||
str.push(chalk_1.default.cyan.bold(" display_trace_from_this_project_only = ")); | ||
str.push(chalk.cyan.bold(" display_trace_from_this_project_only = ")); | ||
if (err) { | ||
@@ -19,6 +19,6 @@ str.push(err.message); | ||
stack = stack.split("\n").filter((el) => el.match(/node-opcua/) && !el.match(/node_modules/)); | ||
str.push(chalk_1.default.yellow(stack.join("\n"))); | ||
str.push(chalk.yellow(stack.join("\n"))); | ||
} | ||
else { | ||
str.push(chalk_1.default.red(" NO STACK TO TRACE !!!!")); | ||
str.push(chalk.red(" NO STACK TO TRACE !!!!")); | ||
} | ||
@@ -25,0 +25,0 @@ return str.join("\n"); |
@@ -7,3 +7,3 @@ "use strict"; | ||
// tslint:disable:no-console | ||
const chalk_1 = require("chalk"); | ||
const chalk = require("chalk"); | ||
const path = require("path"); | ||
@@ -24,4 +24,4 @@ const _ = require("underscore"); | ||
if (process.env.DEBUG && process.env.DEBUG.length > 1) { | ||
const decoratedFilename = chalk_1.default.yellow(w(filename, 60)); | ||
console.log(" Setting debug for ", decoratedFilename, " to ", (flag ? chalk_1.default.cyan : chalk_1.default.red)(flag.toString())); | ||
const decoratedFilename = chalk.yellow(w(filename, 60)); | ||
console.log(" Setting debug for ", decoratedFilename, " to ", (flag ? chalk.cyan : chalk.red)(flag.toString(), process.env.DEBUG)); | ||
} | ||
@@ -49,6 +49,6 @@ debugFlags[filename] = flag; | ||
if (mode === "D") { | ||
return chalk_1.default.bgWhite.cyan(w(d, 14) + ":" + w(filename, 30) + ":" + w(callerLine.toString(), 5)); | ||
return chalk.bgWhite.cyan(w(d, 14) + ":" + w(filename, 30) + ":" + w(callerLine.toString(), 5)); | ||
} | ||
else { | ||
return chalk_1.default.bgRed.white(w(d, 14) + ":" + w(filename, 30) + ":" + w(callerLine.toString(), 5)); | ||
return chalk.bgRed.white(w(d, 14) + ":" + w(filename, 30) + ":" + w(callerLine.toString(), 5)); | ||
} | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"name": "node-opcua-debug", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "pure nodejs OPCUA SDK - module -debug", | ||
@@ -10,10 +10,10 @@ "scripts": { | ||
"dependencies": { | ||
"chalk": "^2.4.2", | ||
"chalk": "^3.0.0", | ||
"hexy": "^0.3.0", | ||
"node-opcua-assert": "^2.0.0", | ||
"node-opcua-buffer-utils": "^2.2.0", | ||
"node-opcua-assert": "^2.3.0", | ||
"node-opcua-buffer-utils": "^2.3.0", | ||
"underscore": "^1.9.1" | ||
}, | ||
"devDependencies": { | ||
"chalk": "^2.4.2", | ||
"chalk": "^3.0.0", | ||
"should": "13.2.3" | ||
@@ -38,3 +38,3 @@ }, | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "e77e0371580d04e874b2023f8a5751c3608bc3f9" | ||
"gitHead": "3fc22180b26cd0d0481e57e7bb6a2cab7623e6d1" | ||
} |
@@ -5,3 +5,3 @@ /** | ||
// tslint:disable:no-console | ||
import chalk from "chalk"; | ||
import * as chalk from "chalk"; | ||
@@ -8,0 +8,0 @@ export function trace_from_this_projet_only(err?: Error): string { |
@@ -5,3 +5,3 @@ /** | ||
// tslint:disable:no-console | ||
import chalk from "chalk"; | ||
import * as chalk from "chalk"; | ||
import * as path from "path"; | ||
@@ -14,3 +14,3 @@ import * as _ from "underscore"; | ||
const maxLines = (process.env && process.env.NODEOPCUA_DEBUG_MAXLINE_PER_MESSAGE) ? | ||
parseInt(process.env.NODEOPCUA_DEBUG_MAXLINE_PER_MESSAGE, 10) : 25; | ||
parseInt(process.env.NODEOPCUA_DEBUG_MAXLINE_PER_MESSAGE, 10) : 25; | ||
@@ -30,6 +30,6 @@ function extractBasename(name: string) { | ||
console.log( | ||
" Setting debug for ", | ||
decoratedFilename, | ||
" to ", | ||
(flag ? chalk.cyan : chalk.red)(flag.toString()) | ||
" Setting debug for ", | ||
decoratedFilename, | ||
" to ", | ||
(flag ? chalk.cyan : chalk.red)(flag.toString(), process.env.DEBUG) | ||
); | ||
@@ -36,0 +36,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139223
13
+ Addedchalk@3.0.0(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)
Updatedchalk@^3.0.0
Updatednode-opcua-assert@^2.3.0