node-opcua-assert
Advanced tools
Comparing version 2.3.0 to 2.5.0-alpha.0
declare type func = (...args: any[]) => any; | ||
export declare function assert(cond: boolean | object | null | undefined | func, message?: string): void; | ||
export default assert; |
@@ -7,2 +7,4 @@ "use strict"; | ||
const chalk = require("chalk"); | ||
const PrettyError = require("pretty-error"); | ||
const pe = new PrettyError(); | ||
const displayAssert = process.env.DISPLAY_ASSERT ? true : false; | ||
@@ -17,3 +19,3 @@ function assert(cond, message) { | ||
console.log(chalk.whiteBright.bgRed(message)); | ||
console.log(err); | ||
console.log(pe.render(err)); | ||
console.log(chalk.whiteBright.bgRed("-----------------------------------------------------------")); | ||
@@ -20,0 +22,0 @@ } |
{ | ||
"name": "node-opcua-assert", | ||
"version": "2.3.0", | ||
"description": "pure nodejs OPCUA SDK - module -assert", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "echo nothing to do", | ||
"clean": "node -e \"require('rimraf').sync('dist');\"", | ||
"lint": "tslint source/**/*.ts" | ||
}, | ||
"dependencies": { | ||
"better-assert": "1.0.2", | ||
"chalk": "^3.0.0" | ||
}, | ||
"author": "Etienne Rossignon", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/node-opcua/node-opcua.git" | ||
}, | ||
"keywords": [ | ||
"OPCUA", | ||
"opcua", | ||
"m2m", | ||
"iot", | ||
"opc ua", | ||
"internet of things" | ||
], | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "3fc22180b26cd0d0481e57e7bb6a2cab7623e6d1" | ||
"name": "node-opcua-assert", | ||
"version": "2.5.0-alpha.0", | ||
"description": "pure nodejs OPCUA SDK - module -assert", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc -b", | ||
"test": "echo nothing to do", | ||
"clean": "node -e \"require('rimraf').sync('dist');\"", | ||
"lint": "tslint source/**/*.ts" | ||
}, | ||
"dependencies": { | ||
"better-assert": "1.0.2", | ||
"chalk": "^3.0.0", | ||
"pretty-error": "^2.1.1" | ||
}, | ||
"author": "Etienne Rossignon", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/node-opcua/node-opcua.git" | ||
}, | ||
"keywords": [ | ||
"OPCUA", | ||
"opcua", | ||
"m2m", | ||
"iot", | ||
"opc ua", | ||
"internet of things" | ||
], | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "341ac6292b30304bb028ab10971dc8552ff1a35a" | ||
} |
@@ -5,2 +5,4 @@ /*** | ||
import * as chalk from "chalk"; | ||
import * as PrettyError from "pretty-error"; | ||
const pe = new PrettyError(); | ||
@@ -19,3 +21,3 @@ const displayAssert = process.env.DISPLAY_ASSERT ? true : false; | ||
console.log(chalk.whiteBright.bgRed(message!)); | ||
console.log(err); | ||
console.log(pe.render(err)); | ||
console.log(chalk.whiteBright.bgRed("-----------------------------------------------------------")); | ||
@@ -22,0 +24,0 @@ } |
@@ -5,7 +5,13 @@ { | ||
"rootDir": "source", | ||
"outDir": "dist" | ||
"outDir": "dist", | ||
"composite": true | ||
}, | ||
"files": [ | ||
"./source/index.ts" | ||
"include": [ | ||
"source/**/*.ts" | ||
], | ||
"references": [], | ||
"exclude": [ | ||
"node_modules", | ||
"dist" | ||
] | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
102088
66
3
1
+ Addedpretty-error@^2.1.1
+ Addedansi-regex@2.1.1(transitive)
+ Addedboolbase@1.0.0(transitive)
+ Addedcss-select@4.3.0(transitive)
+ Addedcss-what@6.1.0(transitive)
+ Addeddom-converter@0.2.0(transitive)
+ Addeddom-serializer@1.4.1(transitive)
+ Addeddomelementtype@2.3.0(transitive)
+ Addeddomhandler@4.3.1(transitive)
+ Addeddomutils@2.8.0(transitive)
+ Addedentities@2.2.0(transitive)
+ Addedhtmlparser2@6.1.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addednth-check@2.1.1(transitive)
+ Addedpretty-error@2.1.2(transitive)
+ Addedrenderkid@2.0.7(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedutila@0.4.0(transitive)