commit aa5176a04c27e17dbec111947b8120b7dfb614da Author: Raphix Date: Sun Dec 29 16:03:49 2024 +0100 Premier commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..65654f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,137 @@ +# ---> Node +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +#data +data +data/* + +private \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8706731 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2023 infrastructure + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9ac835e --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# neutral + +Panel d'administration de Raphix diff --git a/bin/auth.js b/bin/auth.js new file mode 100644 index 0000000..85560cf --- /dev/null +++ b/bin/auth.js @@ -0,0 +1,113 @@ +const { LogType } = require("loguix") +const fs = require("fs") +const path = require("path") +const { __glob } = require("./global-variables") +const alog = new LogType("Authentification") +const keygen = require("./keygen") +const users = require("./users") + +/** + * Vérifie si le token est présent et appartient à un utilisateur + * @param {string} token + */ + +module.exports.check = function(token) { + var isApproved = false; + var username = null + users.fetchUsers().forEach((fetchUser) => { + if(fetchUser.tokens.includes(token)) { + isApproved = true + username = fetchUser.username + } + + }) + + if(isApproved) { + return true + } else { + if(token) { + + alog.warn("Erreur d'authentification - Token n'existe pas : " + token) + } + return false + } +} + +/** + * Permet de se connecter à Inventory + * @param {object} data + * @returns Token or AUTH_FAILED + */ +module.exports.login = function(data) { + var username = data.username + var password = data.password + + if(users.fetchUsers().has(username)) { + const user = users.fetchUsers().get(username) + if(password == user.getPassword()) { + const token = user.generateToken() + alog.log("Connexion approuvé de l'utilisateur : " + username) + return token + } else { + alog.warn("Echec de connexion de l'utilisateur : " + username + " - Mot de passe incorrect") + return "AUTH_FAILED" + } + + } else { + alog.warn("Echec de connexion de l'utilisateur : " + username + " - Utilisateur non-inscrit dans la base de donnée") + return "AUTH_FAILED" + } +} + +/** + * Remove the token + * @param {string} token + * @returns + */ +module.exports.signout = function(token) { + var isDone = false; + var username = null + users.fetchUsers().forEach((fetchUser) => { + if(fetchUser.tokens.includes(token)) { + isDone = true + username = fetchUser.username + fetchUser.removeToken(token) + } + + }) + + if(isDone) { + alog.log("Suppression du Token '" + token + "' de l'utilisateur : " + username) + return true + } else { + if(token) { + + alog.warn("Erreur d'opération lors de la déconnexion - Token n'existe pas : " + token) + } + return false + } + +} + +module.exports.getUserByToken = function(token) { + var isApproved = false; + var userGetted = null + users.fetchUsers().forEach((fetchUser) => { + if(fetchUser.tokens.includes(token)) { + userGetted = fetchUser + } + + }) + + if(userGetted) { + return userGetted + + } else { + if(token) { + + alog.warn("Erreur d'authentification - Token n'existe pas : " + token) + } + return false + } + +} \ No newline at end of file diff --git a/bin/config.js b/bin/config.js new file mode 100644 index 0000000..9aff90c --- /dev/null +++ b/bin/config.js @@ -0,0 +1,43 @@ +const { LogType } = require("loguix") +const fs = require("fs") +const path = require("path") +const { __glob } = require("./global-variables") +const clog = new LogType("Configuration") + +setup() + +function setup() { + if(!fs.existsSync(__glob.CONFIG)) { + clog.log("Création du fichier de configuration dans : " + __glob.CONFIG) + fs.writeFileSync(__glob.CONFIG, JSON.stringify({ + ENCRYPTION_KEY: "1", + }, null, 2)) + } +} + +/** + * + * @returns Config File + */ +module.exports.getFile = function () { + const file = JSON.parse(fs.readFileSync(__glob.CONFIG)) + return file +} + +/** + * Update le fichier configuration avec un object + * @param {Array} file + */ +module.exports.updateFile = function (file) { + if(fs.existsSync(__glob.CONFIG)) { + clog.log("Mise à jour du fichier configuration dans : " + __glob.CONFIG) + fs.writeFileSync(__glob.CONFIG, JSON.stringify(file, null, 2)) + } +} + +module.exports.saveSettings = function (settings) { + const file = this.getFile() + file.JENKINS_TOKEN = settings.jenkins_token + file.OMEGA_KEY = settings.omega_token + this.updateFile(file) +} diff --git a/bin/global-variables.js b/bin/global-variables.js new file mode 100644 index 0000000..5a99b29 --- /dev/null +++ b/bin/global-variables.js @@ -0,0 +1,17 @@ +const path = require("path"); +const root = path.resolve(__dirname, '../') + +const __glob = { + ROUTES: root + path.sep + "routes" + path.sep, + ROOT: root, + LOGS: root + path.sep + "logs", + DATA: root + path.sep + "data", + USERS: root + path.sep + "data" + path.sep + "users.json", + CONFIG: root + path.sep + "data" + path.sep + "config.json", + PACKAGE_JSON: root + path.sep + "package.json", +}; + + + +module.exports = { __glob }; + diff --git a/bin/keygen.js b/bin/keygen.js new file mode 100644 index 0000000..9f7a0a0 --- /dev/null +++ b/bin/keygen.js @@ -0,0 +1,29 @@ +const { LogType } = require("loguix") +const fs = require("fs") +const path = require("path") +var CryptoJS = require("crypto-js") +const { __glob } = require("./global-variables") +const clog = new LogType("KeyGen") +const config = require("./config") + +const keypass = config.getFile().ENCRYPTION_KEY + +setup() + +function setup() { + if(keypass) { + clog.log("Clé de chiffrement trouvé et importé") + } else { + clog.error("Clé de chiffrement inconnu : Passage en mode par défaut") + } +} + +module.exports.encrypt = function (text) { + let encryptedText = CryptoJS.AES.encrypt(text, keypass).toString(); + return encryptedText; + } + +module.exports.decrypt = function(text) { + let decryptedText = CryptoJS.AES.decrypt(text, keypass).toString(CryptoJS.enc.Utf8); + return decryptedText; + } \ No newline at end of file diff --git a/bin/users.js b/bin/users.js new file mode 100644 index 0000000..65f22bc --- /dev/null +++ b/bin/users.js @@ -0,0 +1,430 @@ +const { LogType } = require("loguix") +const fs = require("fs") +const path = require("path") +const { __glob } = require("./global-variables") +const ulog = new LogType("Users") +const keygen = require("./keygen") +const uuid = require("uuid") + +var usersList = new Map() + +setup() + +function setup() { + + if(!fs.existsSync(__glob.USERS)) { + ulog.log("Création du fichier utilisateur dans : " + __glob.USERS) + fs.writeFileSync(__glob.USERS, JSON.stringify([], null, 2)) + } +} + +module.exports.getAllUsers = async function() { + return new Promise(async (resolve, reject) => { + const users = await this.fetchUsers() + + // Remove for every people the password & the tokens + + for(var user of users) { + user = user[1] + user.password = null + user.tokens = null + } + + + resolve(JSON.stringify(Array.from(users))) + }) + + +} + +/** + * Get all users from Users Data Base + */ +module.exports.fetchUsers = function () { + + ulog.step.init("fetch_user", "Récupération de tous les utilisateurs inscrit dans la base de donnée") + const userFile = getFile() + usersList = new Map() + for(var userFetched of userFile) { + const user = new this.User({ + username: userFetched.username, + password: userFetched.password, + display_name: userFetched.display_name, + tokens: userFetched.tokens, + lastLogin: userFetched.lastLogin, + + }) + + usersList.set(user.username, user) + } + + if(usersList.size == 0) { + const adminUser = new this.User({ + "username": "admin", + "password": "inventory", + "display_name": "Administrateur", + "tokens": [], + "lastLogin": "DEFAULT ACCOUNT", + }) + + + adminUser.register() + + + } + + + ulog.step.end("fetch_user") + + return usersList +} + +/** + * User Class is used to access to default user's properties and methods + * @param {object} properties User properties with : username, password, display_name + */ +module.exports.User = class { + username = null + password = null; + display_name = null + tokens = [] + lastLogin = new Date() + + constructor(properties) { + + if(properties) { + + this.username = properties.username + this.password = keygen.encrypt(properties.password) + this.display_name = properties.display_name + this.tokens = properties.tokens + this.lastLogin = properties.lastLogin + + const userFile = getFile() + + for(var userFetched of userFile) { + if(properties.username == userFetched.username) { + ulog.log("Récupération dans la base de donnée, de l'utilisateur : " + userFetched.username) + this.username = userFetched.username + this.password = userFetched.password + this.display_name = userFetched.display_name + this.tokens = userFetched.tokens + this.lastLogin = userFetched.lastLogin + } + } + + + + + + } + + + if(this.username == null) { + ulog.error("One of user is without username ! [IMPORANT_FIELD_IS_MISSING]") + this.username = Math.random() + } + if(this.password == null) { + ulog.error("'" + this.username + "' is without password ! Password reset to 'default' [IMPORANT_FIELD_IS_MISSING]") + this.password = keygen.encrypt("default") + } + if(this.display_name == null) { + ulog.warn("'" + this.username + "' is without display name !") + this.display_name = this.username + } + + if(this.tokens == null) { + this.tokens = [] + } + if(this.lastLogin == null) { + this.lastLogin = new Date() + } + + + + } + + register() { + + var alreadyExist = false + const userFile = getFile() + + for(var userFetched of userFile) { + if(userFetched.username == this.username) { + userFile.splice(userFile.indexOf(userFetched), 1) + ulog.log("Mise à jour dans la base de donnée, de l'utilisateur : " + this.username) + alreadyExist = true + } + } + if(!alreadyExist) { + ulog.log("Création dans la base de donnée de l'utilisateur : " + this.username) + } + userFile.push(this) + updateFile(userFile) + + usersList.set(this.username, this) + } + + unregister() { + + var alreadyExist = false + const userFile = getFile() + + for(var userFetched of userFile) { + if(userFetched.username == this.username) { + userFile.splice(userFile.indexOf(userFetched), 1) + ulog.log("Mise à jour dans la base de donnée, de l'utilisateur : " + this.username) + alreadyExist = true + } + } + if(!alreadyExist) { + ulog.log("L'utilisateur n'est pas enregistré dans la base de donnée : " + this.username) + } + + updateFile(userFile) + usersList.delete(this.username) + } + + + + setPassword(newPassword) { + this.#sync() + this.password = keygen.encrypt(newPassword) + this.register() + ulog.log("Le mot de passe de l'utilisateur a été modifié : " + this.username) + + } + getPassword() { + this.#sync() + return keygen.decrypt(this.password) + } + + generateToken() { + this.#sync() + const gToken = uuid.v4().toString() + this.tokens.push(gToken) + this.register() + return gToken + + } + + removeToken(token) { + this.#sync() + var haveToken = false + for(var aToken of this.tokens) { + if(token == aToken) { + haveToken = true + } + } + if(haveToken) { + this.tokens.splice(this.tokens.indexOf(token), 1) + this.register() + } else { + + ulog.warn("'" + this.username + "' n'a pas le token : " + token) + return false + } + + } + + setDisplayName(text) { + this.#sync() + this.display_name = text + this.register() + ulog.log("Le nom d'affichage de l'utilisateur a été modifié : " + this.username) + + } + + setNewUsername(text) { + this.#sync() + module.exports.deleteUser(this.username) + this.username = text + this.register() + + ulog.log("Le nom d'utilisateur de l'utilisateur a été modifié : " + this.username) + + } + + setLastLogin(text) { + this.#sync() + this.lastLogin = text + this.register() + } + + clearTokens() { + this.#sync() + this.tokens = [] + this.register() + } + + #sync() { + + for(var userGet of usersList.keys()) { + const userFetched = usersList.get(userGet) + if(this.username == userFetched.username) { + this.username = userFetched.username + this.password = userFetched.password + this.display_name = userFetched.display_name + this.tokens = userFetched.tokens + this.lastLogin = userFetched.lastLogin + } + } + + } +} + +module.exports.addUser = function(settings) { + + if(settings.username == '') { + ulog.error("Le nom d'utilisateur est manquant") + return "USERNAME_MISSING" + } else if(settings.password == '') { + ulog.error("Le mot de passe est manquant") + return "PASSWORD_MISSING" + } else if(settings.display_name == '') { + ulog.error("Le nom d'affichage est manquant") + return "DISPLAY_NAME_MISSING" + } else if(this.getUser(settings.username)) { + ulog.error("L'utilisateur existe déjà : " + settings.username) + return "ALREADY_EXIST" + } else { + ulog.step.init("add_user", "Ajout d'un utilisateur dans la base de donnée : " + settings.username) + + const user = new this.User({ + username: settings.username, + display_name: settings.display_name + + }) + + user.setPassword(settings.password) + user.register() + ulog.step.end("add_user") + } + +} + +module.exports.deleteUser = function(username) { + ulog.step.init("delete_user", "Suppression d'un utilisateur dans la base de donnée : " + username) + const user = this.getUser(username) + user.unregister() + ulog.step.end("delete_user") + return "OK" +} + + +module.exports.getUser = function(username) { + return usersList.get(username) +} + +module.exports.editUser = function(settings) { + if(settings.username == '') { + ulog.error("Le nom d'utilisateur est manquant") + return "USERNAME_MISSING" + } else if(settings.display_name == '') { + ulog.error("Le nom d'affichage est manquant") + return "DISPLAY_NAME_MISSING" + } else { + ulog.step.init("edit_user", "Modification d'un utilisateur dans la base de donnée : " + settings.username) + const user = this.fetchUsers().get(settings.username) + if(user) { + + if(settings.newusername && settings.newusername != settings.username) { + if(this.getUser(settings.newusername)) { + ulog.error("L'utilisateur existe déjà : " + settings.username) + return "ALREADY_EXIST" + } else { + + user.setNewUsername(settings.newusername) + } + } + if(settings.display_name) { + user.setDisplayName(settings.display_name) + } + + if(settings.password) { + user.setPassword(settings.password) + } + + + + ulog.step.end("edit_user") + return "OK" + } else { + ulog.step.end("edit_user") + return "NOT_EXIST" + } + + } +} + +module.exports.editMySelf = function (settings, user) { + if(user.username == settings.username) { + if(settings.username == '') { + ulog.error("Le nom d'utilisateur est manquant") + return "USERNAME_MISSING" + } else if(settings.display_name == '') { + ulog.error("Le nom d'affichage est manquant") + return "DISPLAY_NAME_MISSING" + } else { + ulog.step.init("edit_user", "Modification d'un utilisateur dans la base de donnée : " + settings.username) + const user = this.fetchUsers().get(settings.username) + if(user) { + console.log(settings) + if(settings.newusername && settings.newusername != settings.username) { + if(this.getUser(settings.newusername)) { + ulog.error("L'utilisateur existe déjà : " + settings.username) + return "ALREADY_EXIST" + } else { + + user.setNewUsername(settings.newusername) + } + } + if(settings.display_name) { + user.setDisplayName(settings.display_name) + } + + if(settings.password) { + user.setPassword(settings.password) + } + + ulog.step.end("edit_user") + return "OK" + } else { + ulog.step.end("edit_user") + return "NOT_EXIST" + } + + } + } else { + ulog.error("Vous ne pouvez pas modifier les informations d'un autre utilisateur !") + return "NOT_ALLOWED" + } +} + +module.exports.clearTokens = function(username) { + + const user = this.fetchUsers().get(username) + user.clearTokens() +} + + +/** + * + * @returns User File + */ +function getFile() { + const file = JSON.parse(fs.readFileSync(__glob.USERS)) + return file +} + +/** + * Update le fichier utilisateur avec un object + * @param {Array} file + */ +function updateFile(file) { + if(fs.existsSync(__glob.USERS)) { + ulog.log("Mise à jour du fichier utilisateur dans : " + __glob.USERS) + fs.writeFileSync(__glob.USERS, JSON.stringify(file, null, 2)) + } +} + diff --git a/bin/www b/bin/www new file mode 100644 index 0000000..2e472b8 --- /dev/null +++ b/bin/www @@ -0,0 +1,105 @@ +#!/usr/bin/env node + +/** + * Module dependencies. + */ +var log = require("loguix") +var {LogType} = require("loguix") +var { __glob } = require("./global-variables") +log.setup(__glob.LOGS, __glob.PACKAGE_JSON) + +const wlog = new LogType("Serveur") + +if(process.env.DEV ) { + + wlog.log("MODE DEVELOPEMENT ACTIF") +} + +wlog.step.init("start_server", "Démarrage du serveur Express JS") + +var app = require('../main'); +var http = require('http'); +var config = require("./config") + +/** + * Get port from environment and store in Express. + */ + +var port = normalizePort(process.env.PORT || '5005'); +app.set('port', port); + +/** + * Create HTTP server. + */ + +var server = http.createServer(app); + +/** + * Listen on provided port, on all network interfaces. + */ + + +server.listen(port); +server.on('error', onError); +server.on('listening', onListening); + +/** + * Normalize a port into a number, string, or false. + */ + +function normalizePort(val) { + var port = parseInt(val, 10); + + if (isNaN(port)) { + // named pipe + return val; + } + + if (port >= 0) { + // port number + return port; + } + + return false; +} + +/** + * Event listener for HTTP server "error" event. + */ + +function onError(error) { + if (error.syscall !== 'listen') { + throw error; + } + + var bind = typeof port === 'string' + ? 'Pipe ' + port + : 'Port ' + port; + + // handle specific listen errors with friendly messages + switch (error.code) { + case 'EACCES': + wlog.step.error("start_server", bind + ' requires elevated privileges'); + process.exit(1); + break; + case 'EADDRINUSE': + wlog.step.error("start_server" , bind + ' is already in use'); + process.exit(1); + break; + default: + throw error; + } +} + +/** + * Event listener for HTTP server "listening" event. + */ + +function onListening() { + wlog.log("Serveur entrain d'écouter sur le port : " + server.address().port) + var addr = server.address(); + var bind = typeof addr === 'string' + ? 'pipe ' + addr + : 'port ' + addr.port; + wlog.step.end("start_server") +} diff --git a/main.js b/main.js new file mode 100644 index 0000000..4ed962d --- /dev/null +++ b/main.js @@ -0,0 +1,85 @@ +const createError = require('http-errors'); +const express = require('express'); +const path = require('path'); +const cookieParser = require('cookie-parser'); +var favicon = require('express-favicon'); +const app = express(); +const fs = require("fs"); +const log = require("loguix") + +const { __glob } = require('./bin/global-variables'); +const users = require("./bin/users") +const {User} = require("./bin/users") + + + +var wlog = log.getInstance("Serveur") + + + +setup() + + +function getRouters() { + + wlog.log("Récupération de " + fs.readdirSync(__glob.ROUTES).length + " routeurs depuis : " + __glob.ROUTES) + for(var route of fs.readdirSync(__glob.ROUTES)) { + + if(route == "index.js") { + + app.use("/", require(__glob.ROUTES + "index")) + } else { + + app.use("/" + route.replace(".js", ""), require(__glob.ROUTES + route)) + } + + } + +} + +function setup() { + + app.set('views', path.join(__dirname, 'views')); + app.set('view engine', 'ejs'); + + app.use(express.json()); + app.use(express.urlencoded({ extended: false })); + app.use(cookieParser()); + app.use(express.static(path.join(__dirname, 'public'))); + app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))) + + + getRouters() + users.fetchUsers() + + // catch 404 and forward to error handler + app.use(function(req, res, next) { + res.locals.message = "Page non trouvé"; + res.locals.error = { + "status": "404", + "stack": "" + } + + // render the error page + res.status(404 || 404); + res.render('utils/error'); + }); + + // error handler + app.use(function(err, req, res, next) { + // set locals, only providing error in development + res.locals.message = err.message; + res.locals.error = req.app.get('env') === 'development' ? err : {}; + + // render the error page + res.status(err.status || 500); + res.render('utils/error'); + }); + + + +} + + + +module.exports = app; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..ccc8599 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2314 @@ +{ + "name": "inventory", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "inventory", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "cookie-parser": "~1.4.4", + "crypto-js": "^4.2.0", + "debug": "~2.6.9", + "ejs": "~2.6.1", + "express": "~4.16.1", + "express-favicon": "^2.0.4", + "http-errors": "~1.6.3", + "loguix": "^1.4.2", + "nodemon": "^3.0.1", + "os-utils": "^0.0.14", + "pm2": "^5.3.0", + "uuid": "^9.0.1" + } + }, + "node_modules/@opencensus/core": { + "version": "0.0.9", + "license": "Apache-2.0", + "dependencies": { + "continuation-local-storage": "^3.2.1", + "log-driver": "^1.2.7", + "semver": "^5.5.0", + "shimmer": "^1.2.0", + "uuid": "^3.2.1" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@opencensus/core/node_modules/semver": { + "version": "5.7.2", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@opencensus/core/node_modules/uuid": { + "version": "3.4.0", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/@opencensus/propagation-b3": { + "version": "0.0.8", + "license": "Apache-2.0", + "dependencies": { + "@opencensus/core": "^0.0.8", + "uuid": "^3.2.1" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@opencensus/propagation-b3/node_modules/@opencensus/core": { + "version": "0.0.8", + "license": "Apache-2.0", + "dependencies": { + "continuation-local-storage": "^3.2.1", + "log-driver": "^1.2.7", + "semver": "^5.5.0", + "shimmer": "^1.2.0", + "uuid": "^3.2.1" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@opencensus/propagation-b3/node_modules/semver": { + "version": "5.7.2", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@opencensus/propagation-b3/node_modules/uuid": { + "version": "3.4.0", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/@pm2/agent": { + "version": "2.0.3", + "license": "AGPL-3.0", + "dependencies": { + "async": "~3.2.0", + "chalk": "~3.0.0", + "dayjs": "~1.8.24", + "debug": "~4.3.1", + "eventemitter2": "~5.0.1", + "fast-json-patch": "^3.0.0-1", + "fclone": "~1.0.11", + "nssocket": "0.6.0", + "pm2-axon": "~4.0.1", + "pm2-axon-rpc": "~0.7.0", + "proxy-agent": "~6.3.0", + "semver": "~7.5.0", + "ws": "~7.4.0" + } + }, + "node_modules/@pm2/agent/node_modules/dayjs": { + "version": "1.8.36", + "license": "MIT" + }, + "node_modules/@pm2/agent/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@pm2/agent/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/@pm2/agent/node_modules/ws": { + "version": "7.4.6", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@pm2/io": { + "version": "5.0.2", + "license": "Apache-2", + "dependencies": { + "@opencensus/core": "0.0.9", + "@opencensus/propagation-b3": "0.0.8", + "async": "~2.6.1", + "debug": "~4.3.1", + "eventemitter2": "^6.3.1", + "require-in-the-middle": "^5.0.0", + "semver": "~7.5.4", + "shimmer": "^1.2.0", + "signal-exit": "^3.0.3", + "tslib": "1.9.3" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@pm2/io/node_modules/async": { + "version": "2.6.4", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/@pm2/io/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@pm2/io/node_modules/eventemitter2": { + "version": "6.4.9", + "license": "MIT" + }, + "node_modules/@pm2/io/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/@pm2/js-api": { + "version": "0.6.7", + "license": "Apache-2", + "dependencies": { + "async": "^2.6.3", + "axios": "^0.21.0", + "debug": "~4.3.1", + "eventemitter2": "^6.3.1", + "ws": "^7.0.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@pm2/js-api/node_modules/async": { + "version": "2.6.4", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/@pm2/js-api/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@pm2/js-api/node_modules/eventemitter2": { + "version": "6.4.9", + "license": "MIT" + }, + "node_modules/@pm2/js-api/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/@pm2/js-api/node_modules/ws": { + "version": "7.5.9", + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@pm2/pm2-version-check": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pm2/pm2-version-check/-/pm2-version-check-1.0.4.tgz", + "integrity": "sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA==", + "dependencies": { + "debug": "^4.3.1" + } + }, + "node_modules/@pm2/pm2-version-check/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@pm2/pm2-version-check/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "license": "MIT" + }, + "node_modules/abbrev": { + "version": "1.1.1", + "license": "ISC" + }, + "node_modules/accepts": { + "version": "1.3.8", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "7.1.0", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/amp": { + "version": "0.3.1", + "license": "MIT" + }, + "node_modules/amp-message": { + "version": "0.1.2", + "license": "MIT", + "dependencies": { + "amp": "0.3.1" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/argparse/node_modules/sprintf-js": { + "version": "1.0.3", + "license": "BSD-3-Clause" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/ast-types": { + "version": "0.13.4", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ast-types/node_modules/tslib": { + "version": "2.6.2", + "license": "0BSD" + }, + "node_modules/async": { + "version": "3.2.5", + "license": "MIT" + }, + "node_modules/async-listener": { + "version": "0.6.10", + "license": "BSD-2-Clause", + "dependencies": { + "semver": "^5.3.0", + "shimmer": "^1.1.0" + }, + "engines": { + "node": "<=0.11.8 || >0.11.10" + } + }, + "node_modules/async-listener/node_modules/semver": { + "version": "5.7.2", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/axios": { + "version": "0.21.4", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/basic-ftp": { + "version": "5.0.4", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/blessed": { + "version": "0.1.81", + "license": "MIT", + "bin": { + "blessed": "bin/tput.js" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/bodec": { + "version": "0.1.0", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.18.3", + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "license": "MIT" + }, + "node_modules/bytes": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/chalk": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/charm": { + "version": "0.1.2", + "license": "MIT/X11" + }, + "node_modules/chokidar": { + "version": "3.5.3", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cli-tableau": { + "version": "2.0.1", + "dependencies": { + "chalk": "3.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.15.1", + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/content-disposition": { + "version": "0.5.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/continuation-local-storage": { + "version": "3.2.1", + "license": "BSD-2-Clause", + "dependencies": { + "async-listener": "^0.6.0", + "emitter-listener": "^1.1.1" + } + }, + "node_modules/cookie": { + "version": "0.4.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-parser": { + "version": "1.4.6", + "license": "MIT", + "dependencies": { + "cookie": "0.4.1", + "cookie-signature": "1.0.6" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "license": "MIT" + }, + "node_modules/croner": { + "version": "4.1.97", + "license": "MIT" + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/culvert": { + "version": "0.1.2", + "license": "MIT" + }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.1", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/dayjs": { + "version": "1.11.10", + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/degenerator": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/depd": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/ejs": { + "version": "2.6.2", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/emitter-listener": { + "version": "1.1.2", + "license": "BSD-2-Clause", + "dependencies": { + "shimmer": "^1.2.0" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter2": { + "version": "5.0.1", + "license": "MIT" + }, + "node_modules/express": { + "version": "4.16.4", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express-favicon": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/express-favicon/-/express-favicon-2.0.4.tgz", + "integrity": "sha512-JDGzumJdwF+WcJf+qwyhdpF1yzducuMCxZa+G6hxR3hor7ae/1CqpAPj8FXCGaGtqBA6ExDMfeszjuYRw5GUuQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.3.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fast-json-patch": { + "version": "3.1.1", + "license": "MIT" + }, + "node_modules/fclone": { + "version": "1.0.11", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.4", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-uri": { + "version": "6.0.2", + "license": "MIT", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.0", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/get-uri/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/get-uri/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/git-node-fs": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/git-sha1": { + "version": "0.1.2", + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "1.6.3", + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/https-proxy-agent": { + "version": "7.0.2", + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/iconv-lite": { + "version": "0.4.23", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "license": "ISC" + }, + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.3", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "license": "ISC" + }, + "node_modules/ip": { + "version": "1.1.8", + "license": "MIT" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/js-git": { + "version": "0.7.8", + "license": "MIT", + "dependencies": { + "bodec": "^0.1.0", + "culvert": "^0.1.2", + "git-sha1": "^0.1.2", + "pako": "^0.2.5" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "license": "ISC", + "optional": true + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lazy": { + "version": "1.0.11", + "license": "MIT", + "engines": { + "node": ">=0.2.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "license": "MIT" + }, + "node_modules/log-driver": { + "version": "1.2.7", + "license": "ISC", + "engines": { + "node": ">=0.8.6" + } + }, + "node_modules/loguix": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/loguix/-/loguix-1.4.2.tgz", + "integrity": "sha512-fWp699F5Dqszpnriwotr3XvsaPXYAjmV3X2L4tmqUXgwHggvx1Fak1z3Ac7CeuVdIdYY5l85UQrEYPmhAb+IUw==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.4.1", + "license": "MIT", + "bin": { + "mime": "cli.js" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/module-details-from-path": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "license": "ISC" + }, + "node_modules/needle": { + "version": "2.4.0", + "license": "MIT", + "dependencies": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/debug": { + "version": "3.2.7", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/needle/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/netmask": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/nodemon": { + "version": "3.0.1", + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/nopt": { + "version": "1.0.10", + "license": "MIT", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nssocket": { + "version": "0.6.0", + "license": "MIT", + "dependencies": { + "eventemitter2": "~0.4.14", + "lazy": "~1.0.11" + }, + "engines": { + "node": ">= 0.10.x" + } + }, + "node_modules/nssocket/node_modules/eventemitter2": { + "version": "0.4.14", + "license": "MIT" + }, + "node_modules/on-finished": { + "version": "2.3.0", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-utils": { + "version": "0.0.14", + "license": "MIT" + }, + "node_modules/pac-proxy-agent": { + "version": "7.0.1", + "license": "MIT", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pac-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/pac-resolver": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "degenerator": "^5.0.0", + "ip": "^1.1.8", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pako": { + "version": "0.2.9", + "license": "MIT" + }, + "node_modules/parseurl": { + "version": "1.3.3", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidusage": { + "version": "3.0.2", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pidusage/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/pm2": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/pm2/-/pm2-5.3.0.tgz", + "integrity": "sha512-xscmQiAAf6ArVmKhjKTeeN8+Td7ZKnuZFFPw1DGkdFPR/0Iyx+m+1+OpCdf9+HQopX3VPc9/wqPQHqVOfHum9w==", + "dependencies": { + "@pm2/agent": "~2.0.0", + "@pm2/io": "~5.0.0", + "@pm2/js-api": "~0.6.7", + "@pm2/pm2-version-check": "latest", + "async": "~3.2.0", + "blessed": "0.1.81", + "chalk": "3.0.0", + "chokidar": "^3.5.3", + "cli-tableau": "^2.0.0", + "commander": "2.15.1", + "croner": "~4.1.92", + "dayjs": "~1.11.5", + "debug": "^4.3.1", + "enquirer": "2.3.6", + "eventemitter2": "5.0.1", + "fclone": "1.0.11", + "mkdirp": "1.0.4", + "needle": "2.4.0", + "pidusage": "~3.0", + "pm2-axon": "~4.0.1", + "pm2-axon-rpc": "~0.7.1", + "pm2-deploy": "~1.0.2", + "pm2-multimeter": "^0.1.2", + "promptly": "^2", + "semver": "^7.2", + "source-map-support": "0.5.21", + "sprintf-js": "1.1.2", + "vizion": "~2.2.1", + "yamljs": "0.3.0" + }, + "bin": { + "pm2": "bin/pm2", + "pm2-dev": "bin/pm2-dev", + "pm2-docker": "bin/pm2-docker", + "pm2-runtime": "bin/pm2-runtime" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "pm2-sysmonit": "^1.2.8" + } + }, + "node_modules/pm2-axon": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "amp": "~0.3.1", + "amp-message": "~0.1.1", + "debug": "^4.3.1", + "escape-string-regexp": "^4.0.0" + }, + "engines": { + "node": ">=5" + } + }, + "node_modules/pm2-axon-rpc": { + "version": "0.7.1", + "license": "MIT", + "dependencies": { + "debug": "^4.3.1" + }, + "engines": { + "node": ">=5" + } + }, + "node_modules/pm2-axon-rpc/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pm2-axon-rpc/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/pm2-axon/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pm2-axon/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/pm2-deploy": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "run-series": "^1.1.8", + "tv4": "^1.3.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pm2-multimeter": { + "version": "0.1.2", + "license": "MIT/X11", + "dependencies": { + "charm": "~0.1.1" + } + }, + "node_modules/pm2-sysmonit": { + "version": "1.2.8", + "license": "Apache", + "optional": true, + "dependencies": { + "async": "^3.2.0", + "debug": "^4.3.1", + "pidusage": "^2.0.21", + "systeminformation": "^5.7", + "tx2": "~1.0.4" + } + }, + "node_modules/pm2-sysmonit/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "optional": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pm2-sysmonit/node_modules/ms": { + "version": "2.1.2", + "license": "MIT", + "optional": true + }, + "node_modules/pm2-sysmonit/node_modules/pidusage": { + "version": "2.0.21", + "license": "MIT", + "optional": true, + "dependencies": { + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pm2-sysmonit/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "optional": true + }, + "node_modules/pm2/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pm2/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/promptly": { + "version": "2.2.0", + "license": "MIT", + "dependencies": { + "read": "^1.0.4" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-agent": { + "version": "6.3.1", + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-agent/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/proxy-agent/node_modules/lru-cache": { + "version": "7.18.3", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/proxy-agent/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.5.2", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.3.3", + "license": "MIT", + "dependencies": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read": { + "version": "1.0.7", + "license": "ISC", + "dependencies": { + "mute-stream": "~0.0.4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-in-the-middle": { + "version": "5.2.0", + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "module-details-from-path": "^1.0.3", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/require-in-the-middle/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/require-in-the-middle/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.8", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/run-series": { + "version": "1.1.9", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.3.0", + "license": "ISC" + }, + "node_modules/semver": { + "version": "7.5.4", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.16.2", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static": { + "version": "1.13.2", + "license": "MIT", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.1.0", + "license": "ISC" + }, + "node_modules/shimmer": { + "version": "1.2.1", + "license": "BSD-2-Clause" + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "license": "MIT", + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.2", + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/socks/node_modules/ip": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.6.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.2", + "license": "BSD-3-Clause" + }, + "node_modules/statuses": { + "version": "1.4.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/systeminformation": { + "version": "5.21.22", + "license": "MIT", + "optional": true, + "os": [ + "darwin", + "linux", + "win32", + "freebsd", + "openbsd", + "netbsd", + "sunos", + "android" + ], + "bin": { + "systeminformation": "lib/cli.js" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "Buy me a coffee", + "url": "https://www.buymeacoffee.com/systeminfo" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "license": "ISC", + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/tslib": { + "version": "1.9.3", + "license": "Apache-2.0" + }, + "node_modules/tv4": { + "version": "1.3.0", + "license": [ + { + "type": "Public Domain", + "url": "http://geraintluff.github.io/tv4/LICENSE.txt" + }, + { + "type": "MIT", + "url": "http://jsonary.com/LICENSE.txt" + } + ], + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tx2": { + "version": "1.0.5", + "license": "MIT", + "optional": true, + "dependencies": { + "json-stringify-safe": "^5.0.1" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "license": "MIT" + }, + "node_modules/universalify": { + "version": "0.1.2", + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "9.0.1", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vizion": { + "version": "2.2.1", + "license": "Apache-2.0", + "dependencies": { + "async": "^2.6.3", + "git-node-fs": "^1.0.0", + "ini": "^1.3.5", + "js-git": "^0.7.8" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/vizion/node_modules/async": { + "version": "2.6.4", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/yallist": { + "version": "4.0.0", + "license": "ISC" + }, + "node_modules/yamljs": { + "version": "0.3.0", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "glob": "^7.0.5" + }, + "bin": { + "json2yaml": "bin/json2yaml", + "yaml2json": "bin/yaml2json" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..4543f1f --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "name": "inventory", + "version": "1.0.0", + "description": "Gestion de veteements", + "main": "index.js", + "scripts": { + "start": "nodemon ./bin/www", + "dev": "set DEV=true & nodemon ./bin/www" + }, + "repository": { + "type": "git", + "url": "https://git.raphix.fr/raphix/inventory.git" + }, + "nodemonConfig": { + "ext": "js, html", + "ignore": [ + "*.json" + ], + "delay": "10000000" + }, + "keywords": [], + "dependencies": { + "cookie-parser": "~1.4.4", + "crypto-js": "^4.2.0", + "debug": "~2.6.9", + "ejs": "~2.6.1", + "express": "~4.16.1", + "http-errors": "~1.6.3", + "loguix": "^1.4.2", + "nodemon": "^3.0.1", + "os-utils": "^0.0.14", + "pm2": "^5.3.0", + "express-favicon": "^2.0.4", + "uuid": "^9.0.1" + }, + "author": "Raphix", + "license": "ISC" +} diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..87d1dc9 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css new file mode 100644 index 0000000..e69de29 diff --git a/routes/index.js b/routes/index.js new file mode 100644 index 0000000..0e1ee89 --- /dev/null +++ b/routes/index.js @@ -0,0 +1,25 @@ +var express = require('express'); +var router = express.Router(); +var auth = require("../bin/auth") + +/* GET home page. */ +router.get('/', function(req, res, next) { + + if(!auth.check(req.cookies.token)) { + res.clearCookie('token') + res.redirect(302, "/login") +} else { + + if(process.env.DEV ) { + + res.render('index', {dev: "

DÉVELOPEMENT

"}); + } else { + + res.render('index', {dev: ""}); + } + + + } +}); + +module.exports = router; diff --git a/routes/login.js b/routes/login.js new file mode 100644 index 0000000..6bcdd0e --- /dev/null +++ b/routes/login.js @@ -0,0 +1,61 @@ +var express = require('express'); +var router = express.Router(); +var auth = require("../bin/auth") + +/* GET home page. */ +router.get('/', function(req, res, next) { + + if(auth.check(req.cookies.token)) { + + res.redirect(302, "/") + } else { + res.clearCookie('token') + res.render('login', {version: require("../package.json").version}); + } + + +}); + +module.exports = router; + +router.post("/", (req, res) => { + const body = req.body + + const token = auth.login({ + username: body.username, + password: body.password + }) + + if(token == "AUTH_FAILED") { + + setTimeout(() => { + res.status(403).send("AUTH_FAILED") + }, 1000) + + + + } else { + + res.cookie('token' , token, { maxAge: 900000000, httpOnly: true }) + res.status(200).send("AUTH_SUCCESS") + } + +}) + +router.get('/signout', function(req, res, next) { + + if(!auth.check(req.cookies.token)) { + + res.clearCookie('token') + res.redirect(302, "/") + + + } else { + + auth.signout(req.cookies.token) + res.clearCookie('token') + res.redirect(302, "/") + + } + +}); \ No newline at end of file diff --git a/routes/stylepage.js b/routes/stylepage.js new file mode 100644 index 0000000..6aaac1d --- /dev/null +++ b/routes/stylepage.js @@ -0,0 +1,9 @@ +var express = require('express'); +var router = express.Router(); + +/* GET home page. */ +router.get('/', function(req, res, next) { + res.render('utils/stylepage'); +}); + +module.exports = router; diff --git a/views/index.ejs b/views/index.ejs new file mode 100644 index 0000000..5097c40 --- /dev/null +++ b/views/index.ejs @@ -0,0 +1,12 @@ + + + + Inventory + + + + + + + + diff --git a/views/login.ejs b/views/login.ejs new file mode 100644 index 0000000..9b60209 --- /dev/null +++ b/views/login.ejs @@ -0,0 +1,14 @@ + + + + Inventory + + + + + + + + + + diff --git a/views/utils/error.ejs b/views/utils/error.ejs new file mode 100644 index 0000000..3996e99 --- /dev/null +++ b/views/utils/error.ejs @@ -0,0 +1,32 @@ + + + + Inventory - Erreur + + + + +
+

Erreur <%= error.status %>

+

<%= message %> - <%= error.status %>

+
<%= error.stack %>
+ +
+
+ + + + diff --git a/views/utils/stylepage.ejs b/views/utils/stylepage.ejs new file mode 100644 index 0000000..2331523 --- /dev/null +++ b/views/utils/stylepage.ejs @@ -0,0 +1,75 @@ + + + + Inventory + + + +

Inventory - Page de style

+

Cette page est dédiée au développement et n'est pas en relation avec Inventory.

+ +
+

Police : 'Roboto', sans-serif

+

Liens : https://inventory.raphix.fr/stylepage

+
+
+ + +
+

Classe : btn

+
+ + + + + +
+

Classe : btn min

+
+ + + +
+
+

#323031

+

#f10000

+

#605e5863

+
+

Classe : field

+ + + + + +