package: remove colors module

This commit is contained in:
Bill Church 2022-05-19 09:05:18 -04:00
parent 8aebdc54a5
commit 78dafebb2b
3 changed files with 1 additions and 21 deletions

14
app/package-lock.json generated
View file

@ -11,7 +11,6 @@
"dependencies": { "dependencies": {
"basic-auth": "~2.0.1", "basic-auth": "~2.0.1",
"cidr-matcher": "^2.1.1", "cidr-matcher": "^2.1.1",
"colors": "~1.4.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"express": "^4.18.1", "express": "^4.18.1",
"express-session": "^1.17.3", "express-session": "^1.17.3",
@ -1360,14 +1359,6 @@
"integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==",
"dev": true "dev": true
}, },
"node_modules/colors": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"engines": {
"node": ">=0.1.90"
}
},
"node_modules/commander": { "node_modules/commander": {
"version": "2.20.3", "version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
@ -8677,11 +8668,6 @@
"integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==",
"dev": true "dev": true
}, },
"colors": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA=="
},
"commander": { "commander": {
"version": "2.20.3", "version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",

View file

@ -34,7 +34,6 @@
"dependencies": { "dependencies": {
"basic-auth": "~2.0.1", "basic-auth": "~2.0.1",
"cidr-matcher": "^2.1.1", "cidr-matcher": "^2.1.1",
"colors": "~1.4.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"express": "^4.18.1", "express": "^4.18.1",
"express-session": "^1.17.3", "express-session": "^1.17.3",

View file

@ -2,7 +2,6 @@
// util.js // util.js
// private // private
require('colors'); // allow for color property extensions in log messages
const debug = require('debug')('WebSSH2'); const debug = require('debug')('WebSSH2');
const Auth = require('basic-auth'); const Auth = require('basic-auth');
@ -28,11 +27,7 @@ exports.basicAuth = function basicAuth(req, res, next) {
if (myAuth && myAuth.pass !== '' && !defaultCredentials.overridebasic) { if (myAuth && myAuth.pass !== '' && !defaultCredentials.overridebasic) {
req.session.username = myAuth.name; req.session.username = myAuth.name;
req.session.userpassword = myAuth.pass; req.session.userpassword = myAuth.pass;
debug( debug(`myAuth.name: ${myAuth.name} and password ${myAuth.pass ? 'exists' : 'is blank'}`);
`myAuth.name: ${myAuth.name.yellow.bold.underline} and password ${
myAuth.pass ? 'exists'.yellow.bold.underline : 'is blank'.underline.red.bold
}`
);
} else { } else {
req.session.username = defaultCredentials.username; req.session.username = defaultCredentials.username;
req.session.userpassword = defaultCredentials.password; req.session.userpassword = defaultCredentials.password;