Skip to content
Snippets Groups Projects
Commit 62fae22e authored by juaordmar's avatar juaordmar
Browse files

UI changes for login and register

parents 44529787 1557e4b4
No related branches found
No related tags found
No related merge requests found
Showing
with 21 additions and 284 deletions
/**
* Module dependencies.
*/
const tty = require('tty');
const util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.destroy = util.deprecate(
() => {},
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
);
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
const supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [
20,
21,
26,
27,
32,
33,
38,
39,
40,
41,
42,
43,
44,
45,
56,
57,
62,
63,
68,
69,
74,
75,
76,
77,
78,
79,
80,
81,
92,
93,
98,
99,
112,
113,
128,
129,
134,
135,
148,
149,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
178,
179,
184,
185,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
214,
215,
220,
221
];
}
} catch (error) {
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
}
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(key => {
return /^debug_/i.test(key);
}).reduce((obj, key) => {
// Camel-case
const prop = key
.substring(6)
.toLowerCase()
.replace(/_([a-z])/g, (_, k) => {
return k.toUpperCase();
});
// Coerce string value into JS value
let val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ?
Boolean(exports.inspectOpts.colors) :
tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
const {namespace: name, useColors} = this;
if (useColors) {
const c = this.color;
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
function log(...args) {
return process.stderr.write(util.format(...args) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
const keys = Object.keys(exports.inspectOpts);
for (let i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
const {formatters} = module.exports;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(str => str.trim())
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
"_shasum": "49fff58577cfee3f37176feab4c22e00f86d7f77",
"_spec": "agent-base@6",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/https-proxy-agent",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\https-proxy-agent",
"author": {
"name": "Nathan Rajlich",
"email": "nathan@tootallnate.net",
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
"_shasum": "0cdf12e111ace773a86e9a1fad1225c43cb19a59",
"_spec": "ansi-align@^3.0.0",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/boxen",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\boxen",
"author": {
"name": "nexdrew"
},
......
......
......@@ -16,12 +16,13 @@
"fetchSpec": "^5.0.1"
},
"_requiredBy": [
"/gauge",
"/strip-ansi"
],
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"_shasum": "082cb2c89c9fe8659a311a53bd6a4dc5301db304",
"_spec": "ansi-regex@^5.0.1",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/strip-ansi",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\gauge",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
......
......
......@@ -22,7 +22,7 @@
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"_shasum": "edd803628ae71c04c85ae7a0906edad34b648937",
"_spec": "ansi-styles@^4.1.0",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/chalk",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\chalk",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
"_shasum": "c0557c096af32f106198f4f4e2a383537e378716",
"_spec": "anymatch@~3.1.2",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/chokidar",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\chokidar",
"author": {
"name": "Elan Shanker",
"url": "https://github.com/es128"
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
"_shasum": "52520b8ae5b569215b354efc0caa3fe1e45a8adc",
"_spec": "aproba@^1.0.3 || ^2.0.0",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/gauge",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\gauge",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org"
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
"_shasum": "372e0e7bd279d8e94c653aaa1f67200884bf3e1c",
"_spec": "are-we-there-yet@^2.0.0",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/npmlog",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\npmlog",
"author": {
"name": "GitHub Inc."
},
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2",
"_spec": "array-flatten@1.1.1",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/express",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\express",
"author": {
"name": "Blake Embrey",
"email": "hello@blakeembrey.com",
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"_shasum": "e83e3a7e3f300b34cb9d87f615fa0cbf357690ee",
"_spec": "balanced-match@^1.0.0",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/brace-expansion",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\brace-expansion",
"author": {
"name": "Julian Gruber",
"email": "mail@juliangruber.com",
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.1.tgz",
"_shasum": "87bd13525626db4a9838e00a508c2b73efcf348c",
"_spec": "base64-arraybuffer@~1.0.1",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/engine.io-parser",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\engine.io-parser",
"author": {
"name": "Niklas von Hertzen",
"email": "niklasvh@gmail.com",
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"_shasum": "1b1b440160a5bf7ad40b650f095963481903930a",
"_spec": "base64-js@^1.3.1",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/buffer",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\buffer",
"author": {
"name": "T. Jameson Little",
"email": "t.jameson.little@gmail.com"
......
......
......@@ -22,7 +22,7 @@
"_resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
"_shasum": "2770ac6bc47d312af97a8bf9a634342e0cd25cb6",
"_spec": "base64id@~2.0.0",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/socket.io",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\socket.io",
"author": {
"name": "Kristian Faeldt",
"email": "faeldt_kristian@cyberagent.co.jp"
......
......
No preview for this file type
{
"_from": "bcrypt",
"_from": "bcrypt@^5.0.1",
"_id": "bcrypt@5.0.1",
"_inBundle": false,
"_integrity": "sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw==",
"_location": "/bcrypt",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"type": "range",
"registry": true,
"raw": "bcrypt",
"raw": "bcrypt@^5.0.1",
"name": "bcrypt",
"escapedName": "bcrypt",
"rawSpec": "",
"rawSpec": "^5.0.1",
"saveSpec": null,
"fetchSpec": "latest"
"fetchSpec": "^5.0.1"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.1.tgz",
"_shasum": "f1a2c20f208e2ccdceea4433df0c8b2c54ecdf71",
"_spec": "bcrypt",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend",
"_spec": "bcrypt@^5.0.1",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend",
"author": {
"name": "Nick Campbell",
"url": "https://github.com/ncb000gt"
......
......
......@@ -21,7 +21,7 @@
"_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"_shasum": "75f502eeaf9ffde42fc98829645be4ea76bd9e2d",
"_spec": "binary-extensions@^2.0.0",
"_where": "/home/ric/Università/Mobile computing/ForPhysio_try/backend/node_modules/is-binary-path",
"_where": "C:\\Users\\LENOVO\\OneDrive\\Documentos\\ETSII Juan\\\\1er cuatri\\Mobile Computing\\Project\\ForPhysio_try\\backend\\node_modules\\is-binary-path",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment