| | |
| | | return res.send({status: "error", error: "access denied"}) |
| | | } |
| | | else { |
| | | log.debug("AUTH FOR ", req.url) |
| | | // log.debug("AUTH FOR ", req.url) |
| | | } |
| | | }) |
| | | |
| | |
| | | const _ = require("lodash") |
| | | const dayjs = require("dayjs") |
| | | const colors = require("colors/safe") |
| | | |
| | | ///////////////////////////////////////////////////////////////////////// |
| | | |
| | |
| | | msg = JSON.stringify(msg) |
| | | } |
| | | } |
| | | level = _.padEnd(level, 5) |
| | | level = format(level.toLowerCase()) |
| | | console.log(`${level} ${dayjs().format("DD.MM.YYYY HH:mm:ss")} - ${msg}`) |
| | | } |
| | | |
| | | function format (level) { |
| | | switch (level.trim()) { |
| | | case "info": |
| | | return colors.green(level.toUpperCase()) |
| | | case "warn": |
| | | return colors.blue(level.toUpperCase()) |
| | | case "error": |
| | | return colors.red(level.toUpperCase()) |
| | | case "debug": |
| | | return colors.grey(level.toUpperCase()) |
| | | } |
| | | return level |
| | | } |
| | |
| | | "@vueuse/core": "^13.3.0", |
| | | "@vueuse/router": "^13.3.0", |
| | | "chai": "^5.2.0", |
| | | "colors": "^1.4.0", |
| | | "dayjs": "^1.11.13", |
| | | "dotenv": "^16.5.0", |
| | | "enquirer": "^2.4.1", |
| | |
| | | "node": ">=12" |
| | | } |
| | | }, |
| | | "node_modules/chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "license": "MIT", |
| | | "dependencies": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | }, |
| | | "engines": { |
| | | "node": ">=10" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/chalk/chalk?sponsor=1" |
| | | } |
| | | }, |
| | | "node_modules/chalk/node_modules/has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "license": "MIT", |
| | | "engines": { |
| | | "node": ">=8" |
| | | } |
| | | }, |
| | | "node_modules/chalk/node_modules/supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "license": "MIT", |
| | | "dependencies": { |
| | | "has-flag": "^4.0.0" |
| | | }, |
| | | "engines": { |
| | | "node": ">=8" |
| | | } |
| | | }, |
| | | "node_modules/check-error": { |
| | | "version": "2.1.1", |
| | | "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", |
| | |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "license": "MIT" |
| | | }, |
| | | "node_modules/colors": { |
| | | "version": "1.4.0", |
| | | "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", |
| | | "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", |
| | | "license": "MIT", |
| | | "engines": { |
| | | "node": ">=0.1.90" |
| | | } |
| | | }, |
| | | "node_modules/concat-map": { |
| | | "version": "0.0.1", |
| | |
| | | "url": "https://github.com/sponsors/sindresorhus" |
| | | } |
| | | }, |
| | | "node_modules/log-symbols/node_modules/chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "license": "MIT", |
| | | "dependencies": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | }, |
| | | "engines": { |
| | | "node": ">=10" |
| | | }, |
| | | "funding": { |
| | | "url": "https://github.com/chalk/chalk?sponsor=1" |
| | | } |
| | | }, |
| | | "node_modules/log-symbols/node_modules/has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "license": "MIT", |
| | | "engines": { |
| | | "node": ">=8" |
| | | } |
| | | }, |
| | | "node_modules/log-symbols/node_modules/is-unicode-supported": { |
| | | "version": "0.1.0", |
| | | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", |
| | |
| | | "url": "https://github.com/sponsors/sindresorhus" |
| | | } |
| | | }, |
| | | "node_modules/log-symbols/node_modules/supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "license": "MIT", |
| | | "dependencies": { |
| | | "has-flag": "^4.0.0" |
| | | }, |
| | | "engines": { |
| | | "node": ">=8" |
| | | } |
| | | }, |
| | | "node_modules/long": { |
| | | "version": "5.3.2", |
| | | "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", |
| | |
| | | "@vueuse/core": "^13.3.0", |
| | | "@vueuse/router": "^13.3.0", |
| | | "chai": "^5.2.0", |
| | | "colors": "^1.4.0", |
| | | "dayjs": "^1.11.13", |
| | | "dotenv": "^16.5.0", |
| | | "enquirer": "^2.4.1", |