From 42544cf78c91079ffad430e78bba8827da6511b4 Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 15 Oct 2023 11:59:51 +0530 Subject: [PATCH 01/37] Add dev code to test --- .gitignore | 2 + devfolder/app.js | 38 ++ frontend/index.html | 2 +- frontend/index.js | 6 +- frontend/style.css | 9 +- package-lock.json | 1127 +++++++++++++++++++++++++++++++++++++++++++ package.json | 20 + 7 files changed, 1199 insertions(+), 5 deletions(-) create mode 100644 devfolder/app.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index cd4c22c..79f8239 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *__pycache__* +/node_modules + diff --git a/devfolder/app.js b/devfolder/app.js new file mode 100644 index 0000000..0b72bc4 --- /dev/null +++ b/devfolder/app.js @@ -0,0 +1,38 @@ +const express = require('express'); +const bodyParser = require('body-parser'); +const jwt = require('jsonwebtoken'); // Import the jsonwebtoken library + +const app = express(); +const PORT = 5000; +const cors = require('cors'); + +const corsOptions = { + origin: 'http://127.0.0.1:5500', // Replace with your frontend's origin + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', + credentials: true, + optionsSuccessStatus: 204, + }; + +app.use(cors(corsOptions)); + +app.use(bodyParser.json()); + +const secretKey = 'your-secret-key'; // Replace with a strong secret key for encoding the JWT token + +app.post('/api/auth', (req, res) => { + const { user_name, password } = req.body; + + // Check the username and password (for demonstration purposes, accept any non-empty values) + if (user_name && password) { + // Authentication successful, create a JWT token + const token = jwt.sign({ user_name }, secretKey, { expiresIn: '1h' }); // Token expires in 1 hour + res.json({ token }); + } else { + // Authentication failed + res.status(401).json({ error: 'Invalid username or password' }); + } +}); + +app.listen(PORT, () => { + console.log(`Server is running on port ${PORT}`); +}); \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 7aa86f3..5cfac0b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -44,5 +44,5 @@ - + diff --git a/frontend/index.js b/frontend/index.js index 6c944a1..6630d85 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -43,7 +43,7 @@ async function getAuth() { let _username = document.getElementById("username").value; let _password = document.getElementById("password").value; try { - const response = await fetch('http://127.0.0.1:5000/', { + const response = await fetch('http://127.0.0.1:5000/api/auth', { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -62,6 +62,8 @@ let _password = document.getElementById("password").value; const token = data.token; console.log(`Got token: ${token}`) + console.log(data) + handleAuthRes(data); } catch (error) { console.log('Error', error); } @@ -70,7 +72,7 @@ let _password = document.getElementById("password").value; function handleAuthRes(data) { if(data.token){ - localStorage.setItem('token', token.data); + localStorage.setItem('token', data.token); console.log("Logged In...") } else { console.error('Login Failed:', data.error) diff --git a/frontend/style.css b/frontend/style.css index 604591b..bcc6263 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -29,8 +29,8 @@ body { backdrop-filter: blur(20px); justify-content: center; align-items: center; - width: 500px; - height: 450px; + width: 450px; + height: 400px; flex-direction: column; padding: 70px; padding-bottom: 90px; @@ -155,4 +155,9 @@ footer{ background-color: rgb(12, 12, 12); height: 50px; width: 100vw; +} + +footer p{ + color: white; + text-align: center; } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..591912d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1127 @@ +{ + "name": "unnamed-password-manager", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "unnamed-password-manager", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "jsonwebtoken": "^9.0.2" + }, + "devDependencies": { + "nodemon": "^3.0.1" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "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/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "dev": true, + "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/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..851ae3a --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "unnamed-password-manager", + "version": "1.0.0", + "description": "Hi", + "main": "index.js", + "scripts": { + "start": "nodemon devfolder/app.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "nodemon": "^3.0.1" + }, + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "jsonwebtoken": "^9.0.2" + } +} From 8a2c2d02d9d8c62e754a9453b245d9ba353cc8c6 Mon Sep 17 00:00:00 2001 From: Kosh Date: Sun, 15 Oct 2023 13:50:52 +0530 Subject: [PATCH 02/37] Make the file paths cross-platform compatible --- backend/data_handler.py | 6 ++++-- backend/rest_api.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/data_handler.py b/backend/data_handler.py index d9d7a83..99adefb 100644 --- a/backend/data_handler.py +++ b/backend/data_handler.py @@ -54,7 +54,8 @@ class DataHandler: WARNING:- If this is the first time the app is opened, the user_name will be shown as wrong """ - self.__file_path = appdirs.user_data_dir(appname="Unnamed_Password_Manager") + self.__file_path = appdirs.user_data_dir() + self.__file_path = path.join(self.__file_path, "Unnamed_Password_Manager") self.__user_name = user_name self.__file_path = path.join(self.__file_path, self.__user_name) self.__password = password @@ -77,7 +78,8 @@ class DataHandler: If user_name exists, ValueError is thrown """ file_path = path.join( - appdirs.user_data_dir(appname="Unnamed_Password_Manager"), + appdirs.user_data_dir(), + "Unnamed_Password_Manager", user_name ) if path.exists(file_path): diff --git a/backend/rest_api.py b/backend/rest_api.py index 2dbd4a1..27c6ed2 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -10,7 +10,11 @@ app: Flask = Flask(__name__) def handle_first_launched(): - folder_path: str = appdirs.user_data_dir(appname="Unnamed_Password_Manager") + """ + Makes sure everything is initialized correctly + """ + folder_path: str = appdirs.user_data_dir() + folder_path = path.join(folder_path, "Unnamed_Password_Manager") if not path.exists(folder_path): mkdir(folder_path) From ca736f0afa698a73f3a1d76a131c0dc472e76c43 Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 15 Oct 2023 11:59:51 +0530 Subject: [PATCH 03/37] Add dev code to test --- .gitignore | 2 + devfolder/app.js | 38 ++ frontend/index.html | 2 +- frontend/index.js | 6 +- frontend/style.css | 9 +- package-lock.json | 1127 +++++++++++++++++++++++++++++++++++++++++++ package.json | 20 + 7 files changed, 1199 insertions(+), 5 deletions(-) create mode 100644 devfolder/app.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index cd4c22c..79f8239 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *__pycache__* +/node_modules + diff --git a/devfolder/app.js b/devfolder/app.js new file mode 100644 index 0000000..0b72bc4 --- /dev/null +++ b/devfolder/app.js @@ -0,0 +1,38 @@ +const express = require('express'); +const bodyParser = require('body-parser'); +const jwt = require('jsonwebtoken'); // Import the jsonwebtoken library + +const app = express(); +const PORT = 5000; +const cors = require('cors'); + +const corsOptions = { + origin: 'http://127.0.0.1:5500', // Replace with your frontend's origin + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', + credentials: true, + optionsSuccessStatus: 204, + }; + +app.use(cors(corsOptions)); + +app.use(bodyParser.json()); + +const secretKey = 'your-secret-key'; // Replace with a strong secret key for encoding the JWT token + +app.post('/api/auth', (req, res) => { + const { user_name, password } = req.body; + + // Check the username and password (for demonstration purposes, accept any non-empty values) + if (user_name && password) { + // Authentication successful, create a JWT token + const token = jwt.sign({ user_name }, secretKey, { expiresIn: '1h' }); // Token expires in 1 hour + res.json({ token }); + } else { + // Authentication failed + res.status(401).json({ error: 'Invalid username or password' }); + } +}); + +app.listen(PORT, () => { + console.log(`Server is running on port ${PORT}`); +}); \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 7aa86f3..5cfac0b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -44,5 +44,5 @@ -
HI
+

© 2023 Password Manager

diff --git a/frontend/index.js b/frontend/index.js index 6c944a1..6630d85 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -43,7 +43,7 @@ async function getAuth() { let _username = document.getElementById("username").value; let _password = document.getElementById("password").value; try { - const response = await fetch('http://127.0.0.1:5000/', { + const response = await fetch('http://127.0.0.1:5000/api/auth', { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -62,6 +62,8 @@ let _password = document.getElementById("password").value; const token = data.token; console.log(`Got token: ${token}`) + console.log(data) + handleAuthRes(data); } catch (error) { console.log('Error', error); } @@ -70,7 +72,7 @@ let _password = document.getElementById("password").value; function handleAuthRes(data) { if(data.token){ - localStorage.setItem('token', token.data); + localStorage.setItem('token', data.token); console.log("Logged In...") } else { console.error('Login Failed:', data.error) diff --git a/frontend/style.css b/frontend/style.css index 604591b..bcc6263 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -29,8 +29,8 @@ body { backdrop-filter: blur(20px); justify-content: center; align-items: center; - width: 500px; - height: 450px; + width: 450px; + height: 400px; flex-direction: column; padding: 70px; padding-bottom: 90px; @@ -155,4 +155,9 @@ footer{ background-color: rgb(12, 12, 12); height: 50px; width: 100vw; +} + +footer p{ + color: white; + text-align: center; } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..591912d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1127 @@ +{ + "name": "unnamed-password-manager", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "unnamed-password-manager", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "jsonwebtoken": "^9.0.2" + }, + "devDependencies": { + "nodemon": "^3.0.1" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "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/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "dev": true, + "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/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..851ae3a --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "unnamed-password-manager", + "version": "1.0.0", + "description": "Hi", + "main": "index.js", + "scripts": { + "start": "nodemon devfolder/app.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "nodemon": "^3.0.1" + }, + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "jsonwebtoken": "^9.0.2" + } +} From 7e1d2e8cfb8ed95f20a20766d2621aed4e690ee2 Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 15 Oct 2023 18:41:27 +0530 Subject: [PATCH 04/37] Add api request changes --- .gitignore | 2 +- .vscode/launch.json | 25 ++++ devfolder/app.js | 5 +- frontend/index.js | 72 ++++++---- package-lock.json | 344 -------------------------------------------- package.json | 3 - 6 files changed, 76 insertions(+), 375 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index 79f8239..50a6bce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *__pycache__* /node_modules - +/devfolder diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6e2463c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Flask", + "type": "python", + "request": "launch", + "module": "flask", + "env": { + "FLASK_APP": "rest_api.py", + "FLASK_DEBUG": "1" + }, + "args": [ + "run", + "--debug", + ], + "jinja": true, + "justMyCode": true, + "cwd": "${workspaceFolder}/backend" + } + ] +} \ No newline at end of file diff --git a/devfolder/app.js b/devfolder/app.js index 0b72bc4..e7c3ef2 100644 --- a/devfolder/app.js +++ b/devfolder/app.js @@ -17,13 +17,12 @@ app.use(cors(corsOptions)); app.use(bodyParser.json()); -const secretKey = 'your-secret-key'; // Replace with a strong secret key for encoding the JWT token +const secretKey = 'your-secret-key'; app.post('/api/auth', (req, res) => { const { user_name, password } = req.body; - // Check the username and password (for demonstration purposes, accept any non-empty values) - if (user_name && password) { + if (user_name==="Yash" && password==="123") { // Authentication successful, create a JWT token const token = jwt.sign({ user_name }, secretKey, { expiresIn: '1h' }); // Token expires in 1 hour res.json({ token }); diff --git a/frontend/index.js b/frontend/index.js index 6630d85..a716481 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -42,39 +42,63 @@ function validateLogin() { async function getAuth() { let _username = document.getElementById("username").value; let _password = document.getElementById("password").value; + +formData = new FormData(); +formData.append('user_name', _username); +formData.append('password', _password); +console.log(formData) + try { - const response = await fetch('http://127.0.0.1:5000/api/auth', { - method: 'POST', - headers: { + const response = await fetch('/login', { + method: "post", + /*headers: { 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - user_name: _username, - password: _password - }) + }*/ + body: formData }); - if(!response.ok) { - throw new Error('Connection was not Ok!'); + if(response.ok) { + //next page + } else if(!response.ok) { + if (response.status === 403) { + const error = new Error('Access denied: You do not have permission to access this resource.'); + document.getElementById("errlabel").innerHTML = "Invalid Details!"; + setTimeout(()=> { + document.getElementById("errlabel").innerHTML = ""; + },3000) + throw error; + } } - const data = await response.json(); - const token = data.token; + //error + /*const errorData = await response.json(); + if (response.status === 401) { + throw new Error('Invalid username or password') + } else { + throw new Error(errorData.error) + }*/ + + // const data = await response.json(); + // const token = data.token; + // console.log(`Got token: ${token}`) + // console.log(data) + // handleAuthRes(data); + - console.log(`Got token: ${token}`) - console.log(data) - handleAuthRes(data); } catch (error) { - console.log('Error', error); + console.log(error); + if(error instanceof TypeError && error.message === 'Failed to fetch'){ + console.log("Failed Server") + } } } -function handleAuthRes(data) { - if(data.token){ - localStorage.setItem('token', data.token); - console.log("Logged In...") - } else { - console.error('Login Failed:', data.error) - } -} \ No newline at end of file +// function handleAuthRes(data) { +// if(data.token){ +// localStorage.setItem('token', data.token); +// console.log("Logged In...") +// } else { +// console.error('Login Failed:', data.error) +// } +// } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 591912d..3bfc501 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,17 +12,8 @@ "cors": "^2.8.5", "express": "^4.18.2", "jsonwebtoken": "^9.0.2" - }, - "devDependencies": { - "nodemon": "^3.0.1" } }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -35,39 +26,11 @@ "node": ">= 0.6" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/body-parser": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", @@ -104,28 +67,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -151,39 +92,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "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/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -228,15 +136,6 @@ "node": ">= 0.10" } }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -342,18 +241,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -400,20 +287,6 @@ "node": ">= 0.6" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -436,18 +309,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/has": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", @@ -456,15 +317,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -513,12 +365,6 @@ "node": ">=0.10.0" } }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -532,48 +378,6 @@ "node": ">= 0.10" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -711,18 +515,6 @@ "node": ">= 0.6" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -736,58 +528,6 @@ "node": ">= 0.6" } }, - "node_modules/nodemon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", - "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", - "dev": true, - "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/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -828,18 +568,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -852,12 +580,6 @@ "node": ">= 0.10" } }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -894,18 +616,6 @@ "node": ">= 0.8" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1012,18 +722,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/simple-update-notifier": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", - "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -1032,30 +730,6 @@ "node": ">= 0.8" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -1064,18 +738,6 @@ "node": ">=0.6" } }, - "node_modules/touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dev": true, - "dependencies": { - "nopt": "~1.0.10" - }, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -1088,12 +750,6 @@ "node": ">= 0.6" } }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 851ae3a..5982b50 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,6 @@ "keywords": [], "author": "", "license": "ISC", - "devDependencies": { - "nodemon": "^3.0.1" - }, "dependencies": { "cors": "^2.8.5", "express": "^4.18.2", From 8676d88dcb2a4750011db9d97fe6df39f7bf5ac4 Mon Sep 17 00:00:00 2001 From: Kosh Date: Sun, 15 Oct 2023 14:38:32 +0530 Subject: [PATCH 05/37] Implement getting data using rest api --- backend/api-docs.txt | 37 +++++++++++++++++++++++++++++++++++++ backend/rest_api.py | 24 +++++++++++++++++++++--- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/backend/api-docs.txt b/backend/api-docs.txt index 7af4ae6..84f0cdc 100644 --- a/backend/api-docs.txt +++ b/backend/api-docs.txt @@ -86,3 +86,40 @@ Add User:- This will give a response status 200 with no data if login is done. This will return a 403 if the user gave wrong name or password. _____________________ + + +_____________________ +Get Data:- + URL:- /get_data + + Method:- POST + + Data:- None + + Response:- + 200 OK:- + Data:- All user data + Note:- + data:- { + entry_name: { + field_name: field_value + } + } + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Note:- Not logged in + + + Example:- + { + "Amazon": { + "Username": "Kosh", + "Password": "Pass1234" + }, + "Matrix": { + "Username": "Kosh", + "Email": "kosh@fake.com", + "id": "@kosh:matrix.com" + } + } +_____________________ diff --git a/backend/rest_api.py b/backend/rest_api.py index 27c6ed2..ae02b43 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -1,9 +1,9 @@ from os import mkdir, path from flask import Flask, request, send_file, abort, Response from werkzeug.datastructures import ImmutableMultiDict - -from data_handler import DataHandler import appdirs +import json +from data_handler import DataHandler app: Flask = Flask(__name__) @@ -39,7 +39,7 @@ class QueryHandler: """ This is the bridge between the frontend and DataHandler class """ - __data_handler: DataHandler + __data_handler: DataHandler| None = None @staticmethod @app.post("/login") @@ -103,3 +103,21 @@ class QueryHandler: ) return Response(status=200) + + @staticmethod + @app.post("/get_data") + def get_data() -> Response: + """ + Return all user data + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + return Response( + json.dumps(QueryHandler.__data_handler.get_data()), + 200, + content_type="application/json" + ) From 5cd31778c419a43d61e8e4e967f2328e399f1817 Mon Sep 17 00:00:00 2001 From: Kosh Date: Sun, 15 Oct 2023 18:54:06 +0530 Subject: [PATCH 06/37] Interacting with data with rest api --- backend/api-docs.txt | 264 ++++++++++++++++++++++++++++++---- backend/rest_api.py | 336 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 567 insertions(+), 33 deletions(-) diff --git a/backend/api-docs.txt b/backend/api-docs.txt index 84f0cdc..0b5badd 100644 --- a/backend/api-docs.txt +++ b/backend/api-docs.txt @@ -1,11 +1,19 @@ +WARNING:- + Do NOT use this api for ANY reason EXCEPT if usage is ONLY local, i.e., + this api is NOT built for usage over an external network and doing so + WILL NOT BE SECURE + +Note:- Server throws 405 METHOD NOT ALLOWED if the url is mistyped _____________________ Login:- + + WARNING:- + If login is used when another user is logged in, + the original user is automatically logged out. + URL:- /login - Method:- POST - Data Type:- Form Data - Data content:- { user_name: "", password: "" @@ -15,102 +23,111 @@ Login:- 200 OK:- Data:- No Note:- Assume login completed. - 400 Bad Request:- Content Type:- text/plain Note:- user_name or password not given a Form Data. Data:- What is missing will be mentioned. - 403 Forbidden:- Content Type:- text/plain Note:- user_name or password is wrong, can display the response data to user. Data:- What is wrong will be mentioned, text that can be displayed on the screen. Example:- - formData = new FormData(); - formData.append('name', 'John'); - formData.append('password', 'John123'); + formData = new FormData() + formData.append('user_name', 'John') + formData.append('password', 'John123') fetch( "/login", { body: formData, method: "post" } - ); - + ) This will give a response status 200 with no data if login is done. This will return a 403 if the user gave wrong name or password. _____________________ +_____________________ +Logout:- + URL:- /logout + Method:- POST + Data:- None + + Response:- + 200 OK:- + Data:- No + Note:- Assume Success. + 403 Forbidden:- + Content Type:- text/plain + Note:- User is not logged in. + Data:- What is wrong will be mentioned. + This text that can be displayed on the screen. +_____________________ + + _____________________ Add User:- URL:- /add_user - Method:- POST - Data Type:- Form Data - Data content:- { user_name: "", password: "" } + Note:- Does not login the user Response:- 200 OK:- Data:- No Note:- Assume success. - 400 Bad Request:- Content Type:- text/plain Note:- user_name or password not given a Form Data. Data:- What is missing will be mentioned. - 403 Forbidden:- Content Type:- text/plain - Note:- user_name is exists, can display the response data to user. - Data:- Text that can be displayed on the screen. + Note:- user_name exists, can display the response data to user. + Data:- What is wrong will be mentioned. + This text that can be displayed on the screen. Example:- - formData = new FormData(); - formData.append('name', 'John'); - formData.append('password', 'John123'); + formData = new FormData() + formData.append('user_name', 'John') + formData.append('password', 'John123') fetch( - "/login", + "/add_user", { body: formData, method: "post" } - ); - - This will give a response status 200 with no data if login is done. - This will return a 403 if the user gave wrong name or password. + ) + This will give a response status 200 with no data if a user is added. + This will return a 403 if the user gave a existing name. _____________________ _____________________ Get Data:- URL:- /get_data - Method:- POST - Data:- None + Prerequisites:- Login Response:- 200 OK:- - Data:- All user data - Note:- - data:- { + Data:- { entry_name: { field_name: field_value } } + Content Type:- text/json 403 Forbidden:- Data:- Text that can be directly displayed to the user Note:- Not logged in - Example:- + Example Response:- { "Amazon": { "Username": "Kosh", @@ -123,3 +140,188 @@ Get Data:- } } _____________________ + + +_____________________ +Change Password:- + URL:- /change_password + Method:- POST + Data:- New Password + Prerequisites:- Login + + Response:- + 200 OK:- + Data:- None + Note:- Assume success + 400 Bad Request:- + Data:- Error text + Content Type:- text/plain + Note:- password not given. :< + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Content Type:- text/plain + Note:- Not logged in +_____________________ + + +_____________________ +Add entry:- + URL:- /add_entry + Method:- POST + Data:- { + entry_name: "", + fields: { + field_name1: "", + field_name2: "", + ... + } + } + Prerequisites:- Login + + Response:- + 200 OK:- + Data:- None + Note:- Assume success + 400 Bad Request:- + Data:- Error text + Content Type:- text/plain + Note:- entry_name or fields not given or fields cannot be converted to json + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Content Type:- text/plain + Note:- Not logged in or entry_name already exists + + Example:- + formData = new FormData() + formData.append('entry_name', 'Amazon') + formData.append( + 'fields', + JSON.stringify( + { + "User Name": "Kosh", + password: "1234" + } + ) + ) + fetch( + "/entry_name", + { + body: formData, + method: "post" + } + ) + This will give a response status 200 with no data if the data is entered. + This will return a 403 if the user is not logged in or entry_name already exists. +_____________________ + + +_____________________ +Delete Entry:- + URL:- /delete_entry + Method:- POST + Data:- entry_name + Prerequisites:- Login + + Response:- + 200 OK:- + Data:- None + Note:- Assume success + 400 Bad Request:- + Data:- Error text + Content Type:- text/plain + Note:- entry_name not given + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Content Type:- text/plain + Note:- Not logged in or entry_name does not exist +_____________________ + + +_____________________ +Edit Entry Name:- + URL:- /edit_entry_name + Method:- POST + Data:- old_entry_name, new_entry_name + Prerequisites:- Login + + Response:- + 200 OK:- + Data:- None + Note:- Assume success + 400 Bad Request:- + Data:- Error text + Content Type:- text/plain + Note:- old_entry_name or new_entry_name not given + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Content Type:- text/plain + Note:- Not logged in or old_entry_name does not exist or new_entry_name exists +_____________________ + + +_____________________ +Add Field:- + URL:- /add_field + Method:- POST + Data:- entry_name, field_name, field_value + Prerequisites:- Login + + Response:- + 200 OK:- + Data:- None + Note:- Assume success + 400 Bad Request:- + Data:- Error text + Content Type:- text/plain + Note:- entry_name, field_name or field_value are + not given or fields cannot be converted to json + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Content Type:- text/plain + Note:- Not logged in or field_name already exists or entry_name does not exist +_____________________ + + +_____________________ +Edit Field Name:- + URL:- /edit_field_name + Method:- POST + Data:- entry_name, old_field_name, new_field_name + Prerequisites:- Login + + Response:- + 200 OK:- + Data:- None + Note:- Assume success + 400 Bad Request:- + Data:- Error text + Content Type:- text/plain + Note:- old_field_name or new_field_name not given + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Content Type:- text/plain + Note:- Not logged in or old_field_name does not exist or new_field_name exists +_____________________ + + +_____________________ +Edit Field Value:- + URL:- /edit_field_value + Method:- POST + Data:- entry_name, field_name, field_value + Prerequisites:- Login + + Response:- + 200 OK:- + Data:- None + Note:- Assume success + 400 Bad Request:- + Data:- Error text + Content Type:- text/plain + Note:- entry_name, field_name or field_value not given + 403 Forbidden:- + Data:- Text that can be directly displayed to the user + Content Type:- text/plain + Note:- Not logged in or field_name does not exist +_____________________ + diff --git a/backend/rest_api.py b/backend/rest_api.py index ae02b43..38478b3 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -1,8 +1,9 @@ from os import mkdir, path +import json from flask import Flask, request, send_file, abort, Response from werkzeug.datastructures import ImmutableMultiDict import appdirs -import json + from data_handler import DataHandler @@ -73,6 +74,21 @@ class QueryHandler: return Response(status=200) + @staticmethod + @app.post("/logout") + def logout() -> Response: + """ + Logs the user out + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + QueryHandler.__data_handler = None + return Response(status=200) + @staticmethod @app.post("/add_user") def add_user() -> Response: @@ -119,5 +135,321 @@ class QueryHandler: return Response( json.dumps(QueryHandler.__data_handler.get_data()), 200, - content_type="application/json" + content_type="text/json" ) + + @staticmethod + @app.post("/change_password") + def change_password() -> Response: + """ + Change the password of the user. + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "password" not in data: + return Response( + "password is not given", + 400, + content_type="text/plain" + ) + + QueryHandler.__data_handler.change_password(data["password"]) + + return Response(status=200) + + @staticmethod + @app.post("/add_entry") + def add_entry() -> Response: + """ + Add a new entry to the data + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "entry_name" not in data: + return Response( + "entry_name is not given", + 400, + content_type="text/plain" + ) + if "fields" not in data: + return Response( + "fields is not given", + 400, + content_type="text/plain" + ) + entry_name: str = data["entry_name"] + try: + fields: dict = json.loads(data["fields"]) + except json.decoder.JSONDecodeError: + return Response( + f"The json-string provided is wrong {data['fields']}", + 400, + content_type="text/plain" + ) + try: + QueryHandler.__data_handler.add_entry(entry_name, fields) + except ValueError as value_error: + return Response( + str(value_error), + 403, + content_type="text/plain" + ) + return Response(status=200) + + @staticmethod + @app.post("/delete_entry") + def delete_entry() -> Response: + """ + Delete Entry for the logged in user + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "entry_name" not in data: + return Response( + "entry_name is not given", + 400, + content_type="text/plain" + ) + entry_name: str = data["entry_name"] + try: + QueryHandler.__data_handler.delete_entry(entry_name) + except ValueError as value_error: + return Response( + str(value_error), + 403, + content_type="text/plain" + ) + return Response(status=200) + + @staticmethod + @app.post("/edit_entry_name") + def edit_entry_name() -> Response: + """ + Delete Entry for the logged in user + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "old_entry_name" not in data: + return Response( + "old_entry_name is not given", + 400, + content_type="text/plain" + ) + if "new_entry_name" not in data: + return Response( + "new_entry_name is not given", + 400, + content_type="text/plain" + ) + try: + QueryHandler.__data_handler.edit_entry_name( + data["old_entry_name"], data["new_entry_name"] + ) + except ValueError as value_error: + return Response( + str(value_error), + 403, + content_type="text/plain" + ) + return Response(status=200) + + @staticmethod + @app.post("/add_field") + def add_field() -> Response: + """ + Add a field to the entry + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "entry_name" not in data: + return Response( + "entry_name is not given", + 400, + content_type="text/plain" + ) + if "field_name" not in data: + return Response( + "field_name is not given", + 400, + content_type="text/plain" + ) + if "field_value" not in data: + return Response( + "field_value is not given", + 400, + content_type="text/plain" + ) + try: + QueryHandler.__data_handler.add_field( + data["entry_name"], + data["field_name"], + data["field_value"] + ) + except ValueError as value_error: + return Response( + str(value_error), + 403, + content_type="text/plain" + ) + return Response(status=200) + + @staticmethod + @app.post("/delete_field") + def delete_field() -> Response: + """ + Delete a field from a entry + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "entry_name" not in data: + return Response( + "entry_name is not given", + 400, + content_type="text/plain" + ) + if "field_name" not in data: + return Response( + "field_name is not given", + 400, + content_type="text/plain" + ) + try: + QueryHandler.__data_handler.delete_field( + data["entry_name"], + data["field_name"] + ) + except ValueError as value_error: + return Response( + str(value_error), + 403, + content_type="text/plain" + ) + return Response(status=200) + + @staticmethod + @app.post("/edit_field_name") + def edit_field_name() -> Response: + """ + Change the field name in a entry + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "entry_name" not in data: + return Response( + "entry_name is not given", + 400, + content_type="text/plain" + ) + if "old_field_name" not in data: + return Response( + "old_field_name is not given", + 400, + content_type="text/plain" + ) + if "new_field_name" not in data: + return Response( + "new_field_name is not given", + 400, + content_type="text/plain" + ) + try: + QueryHandler.__data_handler.edit_field_name( + data["entry_name"], + data["old_field_name"], + data["new_field_name"] + ) + except ValueError as value_error: + return Response( + str(value_error), + 403, + content_type="text/plain" + ) + return Response(status=200) + + @staticmethod + @app.post("/edit_field_value") + def edit_field_value() -> Response: + """ + Change the value of a field + """ + if QueryHandler.__data_handler is None: + return Response( + "Not logged in", + 403, + content_type="text/plain" + ) + + data: ImmutableMultiDict[str, str] = request.form + if "entry_name" not in data: + return Response( + "entry_name is not given", + 400, + content_type="text/plain" + ) + if "field_name" not in data: + return Response( + "field_name is not given", + 400, + content_type="text/plain" + ) + if "field_value" not in data: + return Response( + "field_value is not given", + 400, + content_type="text/plain" + ) + try: + QueryHandler.__data_handler.edit_field_value( + data["entry_name"], + data["field_name"], + data["field_value"] + ) + except ValueError as value_error: + return Response( + str(value_error), + 403, + content_type="text/plain" + ) + return Response(status=200) From c59483f97fce0554fcd1e97407e5c105891f0c26 Mon Sep 17 00:00:00 2001 From: Koshin Hegde Date: Sun, 15 Oct 2023 14:04:47 +0000 Subject: [PATCH 07/37] Add LICENSE --- LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..947d6a8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 2023 Koshin Hegde + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) 2023 Koshin Hegde + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. From 6bb6fc0035214433815816c7bd8aad4e2f0f6c65 Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 15 Oct 2023 21:14:26 +0530 Subject: [PATCH 08/37] Add all other pages --- frontend/dashboard.css | 47 ++++++++++++++ frontend/dashboard.html | 20 ++++++ frontend/dashboard.js | 0 frontend/{style.css => index.css} | 0 frontend/index.html | 6 +- frontend/index.js | 39 +++++++++--- frontend/register.css | 102 ++++++++++++++++++++++++++++++ frontend/register.html | 31 +++++++++ frontend/register.js | 0 9 files changed, 233 insertions(+), 12 deletions(-) create mode 100644 frontend/dashboard.css create mode 100644 frontend/dashboard.html create mode 100644 frontend/dashboard.js rename frontend/{style.css => index.css} (100%) create mode 100644 frontend/register.css create mode 100644 frontend/register.html create mode 100644 frontend/register.js diff --git a/frontend/dashboard.css b/frontend/dashboard.css new file mode 100644 index 0000000..44ef651 --- /dev/null +++ b/frontend/dashboard.css @@ -0,0 +1,47 @@ +* { + box-sizing: border-box; + margin: none; + } + +body { + background-color: rgb(255, 255, 255); + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("bg.jpg"); + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} + +.wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; +} + +.container { + display: flex; + background-color: rgb(255, 255, 255,0.2); + backdrop-filter: blur(15px); + border-radius: 30px; + width: 90vw; + height: 80vh; + box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8); +} + +footer{ + position: fixed; + bottom: 0px; + background-color: rgb(12, 12, 12); + height: 50px; + width: 100vw; +} + +footer p{ + color: white; + text-align: center; +} \ No newline at end of file diff --git a/frontend/dashboard.html b/frontend/dashboard.html new file mode 100644 index 0000000..a740708 --- /dev/null +++ b/frontend/dashboard.html @@ -0,0 +1,20 @@ + + + + + + DashBoard + + + +
+
+ +
+
+ + + +

© 2023 Password Manager

+ + \ No newline at end of file diff --git a/frontend/dashboard.js b/frontend/dashboard.js new file mode 100644 index 0000000..e69de29 diff --git a/frontend/style.css b/frontend/index.css similarity index 100% rename from frontend/style.css rename to frontend/index.css diff --git a/frontend/index.html b/frontend/index.html index 5cfac0b..56a20ff 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,7 +3,7 @@ - + Login @@ -24,10 +24,10 @@ diff --git a/frontend/index.js b/frontend/index.js index a716481..2adb4e5 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -5,14 +5,12 @@ loginb.addEventListener("click", validateLogin); function validateName() { var name = document.getElementById("username").value; if(name=='' || name==null){ - // console.log("falsevn"); document.getElementById("errlabel").innerHTML = "Enter Username!"; setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) return false; } else { - // console.log("truevn"); return true; } } @@ -20,14 +18,12 @@ var name = document.getElementById("username").value; function validatePass() { var pass = document.getElementById("password").value; if(pass=='' || pass==null){ - // console.log("falsevp"); document.getElementById("errlabel").innerHTML = "Enter Password!"; setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) return false; } else { - // console.log("truevp"); return true; } } @@ -51,14 +47,14 @@ console.log(formData) try { const response = await fetch('/login', { method: "post", - /*headers: { + /* headers: { 'Content-Type': 'application/json' }*/ body: formData }); if(response.ok) { - //next page + window.location.href = "dashboard.html"; } else if(!response.ok) { if (response.status === 403) { const error = new Error('Access denied: You do not have permission to access this resource.'); @@ -66,17 +62,18 @@ console.log(formData) setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) + console.log(response) throw error; } } //error - /*const errorData = await response.json(); + const errorData = await response.json(); if (response.status === 401) { throw new Error('Invalid username or password') } else { throw new Error(errorData.error) - }*/ + } // const data = await response.json(); // const token = data.token; @@ -91,9 +88,33 @@ console.log(formData) console.log("Failed Server") } } - + } +const register = document.getElementById("register"); + +register.addEventListener("click", function(event) { + event.preventDefault(); + window.location.href = "register.html"; +}); + + + + + + + + + + + + + + + + + + // function handleAuthRes(data) { // if(data.token){ // localStorage.setItem('token', data.token); diff --git a/frontend/register.css b/frontend/register.css new file mode 100644 index 0000000..ac1abf2 --- /dev/null +++ b/frontend/register.css @@ -0,0 +1,102 @@ +* { + box-sizing: border-box; + } + + body { + background-color: dimgrey; + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("bg.jpg"); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + } + + .wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; + } + + + .container { + display: flex; + background-color: transparent; + backdrop-filter: blur(20px); + justify-content: center; + align-items: center; + width: 450px; + height: 400px; + flex-direction: column; + padding: 70px; + padding-bottom: 90px; + box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); + row-gap: 8px; + border-radius: 50px; + } + + .input { + width: 300px; + height: 30px; + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5); + border: none; + border-top: rgba(255, 255, 255, 0.2) 2px solid; + border-left: rgb(255, 255, 255, 0.2) 2px solid; + border-radius: 10px; + padding-left: 5px; + } + + .idiv p { + color: white; + font-family: 'Pixelify Sans', cursive; + margin-left: 5px; + } + + #username::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; + } + + #password::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; + } + + .idiv { + display: flex; + flex-direction: column; + row-gap: 10px; + justify-content: center; + padding: 7px; + } + + .idiv p{ + padding: none; + margin: none; + display: absolute; + translate: 0px 12px; + } + + #loginb { + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + padding: 7px; + margin-top: 20px; + margin-bottom: 20px; + width: 150px; + box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5); + translate: 0px -5px; + font-family: 'Pixelify Sans', cursive; + font-size: 20px; + border-radius: 10px; + } + + #loginb:active { + background-color: rgb(155, 155, 155, 0.3); + } \ No newline at end of file diff --git a/frontend/register.html b/frontend/register.html new file mode 100644 index 0000000..94b19d8 --- /dev/null +++ b/frontend/register.html @@ -0,0 +1,31 @@ + + + + + + + Register + +
+
+ +
+

Register

+
+ +
+ + +
+ +
+ +
+ +
+
+ + + +

© 2023 Password Manager

+ diff --git a/frontend/register.js b/frontend/register.js new file mode 100644 index 0000000..e69de29 From 7e3e9da659f30398fd187728582b7762fa276d93 Mon Sep 17 00:00:00 2001 From: Kosh Date: Sun, 15 Oct 2023 22:42:01 +0530 Subject: [PATCH 09/37] Added compatibility for subfolders --- backend/rest_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/rest_api.py b/backend/rest_api.py index 38478b3..1ac4d02 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -21,7 +21,7 @@ def handle_first_launched(): @app.get("/") -@app.get("/") +@app.get("/") def handle_get(url_path: str = "index.html") -> Response: """ Handle all get requests that are made. From 2ba36d3cd42201f93ebdf3175e9aa28364fb28c8 Mon Sep 17 00:00:00 2001 From: Modo Date: Tue, 17 Oct 2023 23:44:10 +0530 Subject: [PATCH 10/37] Add error message to login, Fix Internal Error 500 Yeah i touched the rest api and fixed the internal favicon error :P Cleaned up the pages and linked the error messages --- backend/rest_api.py | 10 +- backend/static/favicon.ico | Bin 0 -> 67646 bytes frontend/arrow.svg | 1 + frontend/dashboard.html | 2 +- frontend/download.svg | 4 + frontend/index.css | 2 +- frontend/index.js | 25 +--- frontend/register.css | 285 ++++++++++++++++++++++++------------- frontend/register.html | 10 +- 9 files changed, 214 insertions(+), 125 deletions(-) create mode 100644 backend/static/favicon.ico create mode 100644 frontend/arrow.svg create mode 100644 frontend/download.svg diff --git a/backend/rest_api.py b/backend/rest_api.py index 2dbd4a1..c0dcf32 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -13,7 +13,7 @@ def handle_first_launched(): folder_path: str = appdirs.user_data_dir(appname="Unnamed_Password_Manager") if not path.exists(folder_path): mkdir(folder_path) - + @app.get("/") @app.get("/") @@ -99,3 +99,11 @@ class QueryHandler: ) return Response(status=200) + +import os +from os import path + +@app.route('/favicon.ico') +def favicon(): + favicon_path = os.path.join(app.root_path, 'static', 'favicon.ico') + return send_file(favicon_path, mimetype='image/vnd.microsoft.icon') \ No newline at end of file diff --git a/backend/static/favicon.ico b/backend/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..40dd7f5cd69f8a36d476c77784f1b78eb9453f44 GIT binary patch literal 67646 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 \ No newline at end of file diff --git a/frontend/dashboard.html b/frontend/dashboard.html index a740708..093fe20 100644 --- a/frontend/dashboard.html +++ b/frontend/dashboard.html @@ -12,7 +12,7 @@ - +

© 2023 Password Manager

diff --git a/frontend/download.svg b/frontend/download.svg new file mode 100644 index 0000000..8877e84 --- /dev/null +++ b/frontend/download.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/frontend/index.css b/frontend/index.css index bcc6263..27df6bf 100644 --- a/frontend/index.css +++ b/frontend/index.css @@ -9,7 +9,7 @@ body { align-items: center; justify-content: center; background-image: url("bg.jpg"); - background-size: cover; + background-size: 200% auto; background-position: center; background-repeat: no-repeat; } diff --git a/frontend/index.js b/frontend/index.js index 2adb4e5..0c7619b 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -47,32 +47,18 @@ console.log(formData) try { const response = await fetch('/login', { method: "post", - /* headers: { - 'Content-Type': 'application/json' - }*/ body: formData }); if(response.ok) { window.location.href = "dashboard.html"; } else if(!response.ok) { - if (response.status === 403) { - const error = new Error('Access denied: You do not have permission to access this resource.'); - document.getElementById("errlabel").innerHTML = "Invalid Details!"; + const errorMessage = await response.text(); + document.getElementById("errlabel").innerHTML = errorMessage; setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) - console.log(response) - throw error; - } - } - - //error - const errorData = await response.json(); - if (response.status === 401) { - throw new Error('Invalid username or password') - } else { - throw new Error(errorData.error) + throw new Error(errorMessage); } // const data = await response.json(); @@ -83,10 +69,7 @@ console.log(formData) } catch (error) { - console.log(error); - if(error instanceof TypeError && error.message === 'Failed to fetch'){ - console.log("Failed Server") - } + console.error('Error:', error.message); } } diff --git a/frontend/register.css b/frontend/register.css index ac1abf2..aed3c06 100644 --- a/frontend/register.css +++ b/frontend/register.css @@ -1,102 +1,189 @@ * { - box-sizing: border-box; - } - - body { - background-color: dimgrey; - display: flex; - margin-top: 25px; - align-items: center; - justify-content: center; - background-image: url("bg.jpg"); - background-size: cover; - background-position: center; - background-repeat: no-repeat; - } - - .wrapper { - display: flex; - width: 90vw; - height: 90vh; - align-items: center; - justify-content: center; - } - - - .container { - display: flex; - background-color: transparent; - backdrop-filter: blur(20px); - justify-content: center; - align-items: center; - width: 450px; - height: 400px; - flex-direction: column; - padding: 70px; - padding-bottom: 90px; - box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); - row-gap: 8px; - border-radius: 50px; - } + box-sizing: border-box; +} - .input { - width: 300px; - height: 30px; - background-color: transparent; - color: rgb(255, 255, 255, 0.8); - box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5); - border: none; - border-top: rgba(255, 255, 255, 0.2) 2px solid; - border-left: rgb(255, 255, 255, 0.2) 2px solid; - border-radius: 10px; - padding-left: 5px; - } - - .idiv p { - color: white; - font-family: 'Pixelify Sans', cursive; - margin-left: 5px; - } - - #username::placeholder { - color: rgb(255, 255, 255, 0.5); - padding-left: 5px; - } - - #password::placeholder { - color: rgb(255, 255, 255, 0.5); - padding-left: 5px; - } +body { + background-color: dimgrey; + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("bg.jpg"); + background-size: 200% auto; + background-position: center; + background-repeat: no-repeat; +} - .idiv { - display: flex; - flex-direction: column; - row-gap: 10px; - justify-content: center; - padding: 7px; - } - - .idiv p{ - padding: none; - margin: none; - display: absolute; - translate: 0px 12px; - } - - #loginb { - background-color: transparent; - color: rgb(255, 255, 255, 0.8); - padding: 7px; - margin-top: 20px; - margin-bottom: 20px; - width: 150px; - box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5); - translate: 0px -5px; - font-family: 'Pixelify Sans', cursive; - font-size: 20px; - border-radius: 10px; - } - - #loginb:active { - background-color: rgb(155, 155, 155, 0.3); - } \ No newline at end of file +.wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; +} + + +.container { + display: flex; + background-color: transparent; + backdrop-filter: blur(20px); + justify-content: center; + align-items: center; + width: 450px; + height: 400px; + flex-direction: column; + padding: 70px; + padding-bottom: 90px; + box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); + row-gap: 8px; + border-radius: 50px; +} + +#register { + display: block; + text-align: center; + font-family: 'Pixelify Sans', cursive; + font-size: 50px; + text-shadow: 2px 2px 5px rgb(0, 0, 0); + color: white; + translate: 0px 10px; +} + +.input { + width: 300px; + height: 30px; + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5); + border: none; + border-top: rgba(255, 255, 255, 0.2) 2px solid; + border-left: rgb(255, 255, 255, 0.2) 2px solid; + border-radius: 10px; + padding-left: 5px; +} + +.idiv p { + color: white; + font-family: 'Pixelify Sans', cursive; + margin-left: 5px; +} + +#username::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; +} + +#password::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; +} + +#conpassword::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; +} + +.idiv input { + translate: 0px -20px; +} + +.idiv { + display: flex; + flex-direction: column; + row-gap: 10px; + justify-content: center; + padding: 7px; +} + +.idiv p{ + padding: none; + margin: none; + display: absolute; + translate: 0px 12px; +} + +#loginb { + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + padding: 7px; + margin-top: 20px; + margin-bottom: 20px; + width: 150px; + box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5); + translate: 0px -5px; + font-family: 'Pixelify Sans', cursive; + font-size: 20px; + border-radius: 10px; +} + +#loginb:active { + background-color: rgb(155, 155, 155, 0.3); +} + +.help { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + +} + + +.help div{ + display: flex; + width: 50%; + justify-content: center; +} + +.error label { + position: absolute; + display: block; + justify-content: center; + translate: -50% 3px; + color: rgba(184, 156, 255, 0.9); + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + font-style: bold; + font-weight: bold; +} + +a { + text-decoration: none; + color: rgba(255, 255, 255, 0.5); + text-align: center; + font-family: 'Poppins', sans-serif; + font-size: 12px; +} + +a:active { + color: rgb(196, 196, 196, 10); +} + +footer{ + position: fixed; + bottom: 0px; + background-color: rgb(12, 12, 12); + height: 50px; + width: 100vw; +} + +footer p{ + color: white; + text-align: center; +} + +#returnb { + position: absolute; + top: 30px; + left: 30px; + width: 35px; + height: 35px; + border-radius: 15px; + font-family: 'Pixelify Sans', cursive; + color: white; + background-color: transparent; + background-image: url('download.svg'); + background-size: cover; + + box-shadow: rgb(0, 0, 0) 0px 0px 10px; +} \ No newline at end of file diff --git a/frontend/register.html b/frontend/register.html index 94b19d8..9beca2f 100644 --- a/frontend/register.html +++ b/frontend/register.html @@ -4,22 +4,28 @@ + + + Register
+ +
-

Register

+

Register

+
- +
From 8c90c551e37f6ad9ee76a2e8e9c829992e05defb Mon Sep 17 00:00:00 2001 From: Kosh Date: Wed, 18 Oct 2023 12:36:58 +0530 Subject: [PATCH 11/37] Moved frontend/index.html to frontend/html/index.html Closing #2; Closing #1 --- backend/rest_api.py | 2 +- frontend/{ => html}/index.html | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename frontend/{ => html}/index.html (100%) diff --git a/backend/rest_api.py b/backend/rest_api.py index 1ac4d02..7628ed3 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -22,7 +22,7 @@ def handle_first_launched(): @app.get("/") @app.get("/") -def handle_get(url_path: str = "index.html") -> Response: +def handle_get(url_path: str = "html/index.html") -> Response: """ Handle all get requests that are made. """ diff --git a/frontend/index.html b/frontend/html/index.html similarity index 100% rename from frontend/index.html rename to frontend/html/index.html From 11cc0fc4f269fd0652bc9224bcc713d0c5614b3c Mon Sep 17 00:00:00 2001 From: Kosh Date: Wed, 18 Oct 2023 12:38:11 +0530 Subject: [PATCH 12/37] Add .gitkeep to every subfolder --- backend/.gitkeep | 0 frontend/.gitkeep | 0 frontend/html/.gitkeep | 0 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 backend/.gitkeep create mode 100644 frontend/.gitkeep create mode 100644 frontend/html/.gitkeep diff --git a/backend/.gitkeep b/backend/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/frontend/.gitkeep b/frontend/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/frontend/html/.gitkeep b/frontend/html/.gitkeep new file mode 100644 index 0000000..e69de29 From 090a61f92482cbcf305a92a1cb9e90825a8d8264 Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 15 Oct 2023 11:59:51 +0530 Subject: [PATCH 13/37] Add dev code to test --- .gitignore | 2 + devfolder/app.js | 38 ++ frontend/html/index.html | 2 +- frontend/index.js | 6 +- frontend/style.css | 9 +- package-lock.json | 1127 ++++++++++++++++++++++++++++++++++++++ package.json | 20 + 7 files changed, 1199 insertions(+), 5 deletions(-) create mode 100644 devfolder/app.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index cd4c22c..79f8239 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *__pycache__* +/node_modules + diff --git a/devfolder/app.js b/devfolder/app.js new file mode 100644 index 0000000..0b72bc4 --- /dev/null +++ b/devfolder/app.js @@ -0,0 +1,38 @@ +const express = require('express'); +const bodyParser = require('body-parser'); +const jwt = require('jsonwebtoken'); // Import the jsonwebtoken library + +const app = express(); +const PORT = 5000; +const cors = require('cors'); + +const corsOptions = { + origin: 'http://127.0.0.1:5500', // Replace with your frontend's origin + methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', + credentials: true, + optionsSuccessStatus: 204, + }; + +app.use(cors(corsOptions)); + +app.use(bodyParser.json()); + +const secretKey = 'your-secret-key'; // Replace with a strong secret key for encoding the JWT token + +app.post('/api/auth', (req, res) => { + const { user_name, password } = req.body; + + // Check the username and password (for demonstration purposes, accept any non-empty values) + if (user_name && password) { + // Authentication successful, create a JWT token + const token = jwt.sign({ user_name }, secretKey, { expiresIn: '1h' }); // Token expires in 1 hour + res.json({ token }); + } else { + // Authentication failed + res.status(401).json({ error: 'Invalid username or password' }); + } +}); + +app.listen(PORT, () => { + console.log(`Server is running on port ${PORT}`); +}); \ No newline at end of file diff --git a/frontend/html/index.html b/frontend/html/index.html index 7aa86f3..5cfac0b 100644 --- a/frontend/html/index.html +++ b/frontend/html/index.html @@ -44,5 +44,5 @@ -
HI
+

© 2023 Password Manager

diff --git a/frontend/index.js b/frontend/index.js index 6c944a1..6630d85 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -43,7 +43,7 @@ async function getAuth() { let _username = document.getElementById("username").value; let _password = document.getElementById("password").value; try { - const response = await fetch('http://127.0.0.1:5000/', { + const response = await fetch('http://127.0.0.1:5000/api/auth', { method: 'POST', headers: { 'Content-Type': 'application/json' @@ -62,6 +62,8 @@ let _password = document.getElementById("password").value; const token = data.token; console.log(`Got token: ${token}`) + console.log(data) + handleAuthRes(data); } catch (error) { console.log('Error', error); } @@ -70,7 +72,7 @@ let _password = document.getElementById("password").value; function handleAuthRes(data) { if(data.token){ - localStorage.setItem('token', token.data); + localStorage.setItem('token', data.token); console.log("Logged In...") } else { console.error('Login Failed:', data.error) diff --git a/frontend/style.css b/frontend/style.css index 604591b..bcc6263 100644 --- a/frontend/style.css +++ b/frontend/style.css @@ -29,8 +29,8 @@ body { backdrop-filter: blur(20px); justify-content: center; align-items: center; - width: 500px; - height: 450px; + width: 450px; + height: 400px; flex-direction: column; padding: 70px; padding-bottom: 90px; @@ -155,4 +155,9 @@ footer{ background-color: rgb(12, 12, 12); height: 50px; width: 100vw; +} + +footer p{ + color: white; + text-align: center; } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..591912d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1127 @@ +{ + "name": "unnamed-password-manager", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "unnamed-password-manager", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "jsonwebtoken": "^9.0.2" + }, + "devDependencies": { + "nodemon": "^3.0.1" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "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/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "dev": true, + "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/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", + "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dev": true, + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..851ae3a --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "unnamed-password-manager", + "version": "1.0.0", + "description": "Hi", + "main": "index.js", + "scripts": { + "start": "nodemon devfolder/app.js" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "nodemon": "^3.0.1" + }, + "dependencies": { + "cors": "^2.8.5", + "express": "^4.18.2", + "jsonwebtoken": "^9.0.2" + } +} From b1b896fe6ef4cd9ffcf39d6db08510f6db7159ca Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 15 Oct 2023 18:41:27 +0530 Subject: [PATCH 14/37] Add api request changes --- .gitignore | 2 +- .vscode/launch.json | 25 ++++ devfolder/app.js | 5 +- frontend/index.js | 72 ++++++---- package-lock.json | 344 -------------------------------------------- package.json | 3 - 6 files changed, 76 insertions(+), 375 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index 79f8239..50a6bce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *__pycache__* /node_modules - +/devfolder diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6e2463c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Flask", + "type": "python", + "request": "launch", + "module": "flask", + "env": { + "FLASK_APP": "rest_api.py", + "FLASK_DEBUG": "1" + }, + "args": [ + "run", + "--debug", + ], + "jinja": true, + "justMyCode": true, + "cwd": "${workspaceFolder}/backend" + } + ] +} \ No newline at end of file diff --git a/devfolder/app.js b/devfolder/app.js index 0b72bc4..e7c3ef2 100644 --- a/devfolder/app.js +++ b/devfolder/app.js @@ -17,13 +17,12 @@ app.use(cors(corsOptions)); app.use(bodyParser.json()); -const secretKey = 'your-secret-key'; // Replace with a strong secret key for encoding the JWT token +const secretKey = 'your-secret-key'; app.post('/api/auth', (req, res) => { const { user_name, password } = req.body; - // Check the username and password (for demonstration purposes, accept any non-empty values) - if (user_name && password) { + if (user_name==="Yash" && password==="123") { // Authentication successful, create a JWT token const token = jwt.sign({ user_name }, secretKey, { expiresIn: '1h' }); // Token expires in 1 hour res.json({ token }); diff --git a/frontend/index.js b/frontend/index.js index 6630d85..a716481 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -42,39 +42,63 @@ function validateLogin() { async function getAuth() { let _username = document.getElementById("username").value; let _password = document.getElementById("password").value; + +formData = new FormData(); +formData.append('user_name', _username); +formData.append('password', _password); +console.log(formData) + try { - const response = await fetch('http://127.0.0.1:5000/api/auth', { - method: 'POST', - headers: { + const response = await fetch('/login', { + method: "post", + /*headers: { 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - user_name: _username, - password: _password - }) + }*/ + body: formData }); - if(!response.ok) { - throw new Error('Connection was not Ok!'); + if(response.ok) { + //next page + } else if(!response.ok) { + if (response.status === 403) { + const error = new Error('Access denied: You do not have permission to access this resource.'); + document.getElementById("errlabel").innerHTML = "Invalid Details!"; + setTimeout(()=> { + document.getElementById("errlabel").innerHTML = ""; + },3000) + throw error; + } } - const data = await response.json(); - const token = data.token; + //error + /*const errorData = await response.json(); + if (response.status === 401) { + throw new Error('Invalid username or password') + } else { + throw new Error(errorData.error) + }*/ + + // const data = await response.json(); + // const token = data.token; + // console.log(`Got token: ${token}`) + // console.log(data) + // handleAuthRes(data); + - console.log(`Got token: ${token}`) - console.log(data) - handleAuthRes(data); } catch (error) { - console.log('Error', error); + console.log(error); + if(error instanceof TypeError && error.message === 'Failed to fetch'){ + console.log("Failed Server") + } } } -function handleAuthRes(data) { - if(data.token){ - localStorage.setItem('token', data.token); - console.log("Logged In...") - } else { - console.error('Login Failed:', data.error) - } -} \ No newline at end of file +// function handleAuthRes(data) { +// if(data.token){ +// localStorage.setItem('token', data.token); +// console.log("Logged In...") +// } else { +// console.error('Login Failed:', data.error) +// } +// } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 591912d..3bfc501 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,17 +12,8 @@ "cors": "^2.8.5", "express": "^4.18.2", "jsonwebtoken": "^9.0.2" - }, - "devDependencies": { - "nodemon": "^3.0.1" } }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -35,39 +26,11 @@ "node": ">= 0.6" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/body-parser": { "version": "1.20.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", @@ -104,28 +67,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", @@ -151,39 +92,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "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/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -228,15 +136,6 @@ "node": ">= 0.10" } }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -342,18 +241,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -400,20 +287,6 @@ "node": ">= 0.6" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -436,18 +309,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/has": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", @@ -456,15 +317,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", @@ -513,12 +365,6 @@ "node": ">=0.10.0" } }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -532,48 +378,6 @@ "node": ">= 0.10" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -711,18 +515,6 @@ "node": ">= 0.6" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -736,58 +528,6 @@ "node": ">= 0.6" } }, - "node_modules/nodemon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", - "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", - "dev": true, - "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/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -828,18 +568,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -852,12 +580,6 @@ "node": ">= 0.10" } }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -894,18 +616,6 @@ "node": ">= 0.8" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -1012,18 +722,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/simple-update-notifier": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", - "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -1032,30 +730,6 @@ "node": ">= 0.8" } }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -1064,18 +738,6 @@ "node": ">=0.6" } }, - "node_modules/touch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", - "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", - "dev": true, - "dependencies": { - "nopt": "~1.0.10" - }, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -1088,12 +750,6 @@ "node": ">= 0.6" } }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 851ae3a..5982b50 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,6 @@ "keywords": [], "author": "", "license": "ISC", - "devDependencies": { - "nodemon": "^3.0.1" - }, "dependencies": { "cors": "^2.8.5", "express": "^4.18.2", From 22cbef5e0af195e16fff3e5cdcf5eb788e05c295 Mon Sep 17 00:00:00 2001 From: Modo Date: Sun, 15 Oct 2023 21:14:26 +0530 Subject: [PATCH 15/37] Add all other pages --- frontend/dashboard.css | 47 ++++++++++++++ frontend/dashboard.html | 20 ++++++ frontend/dashboard.js | 0 frontend/html/index.html | 6 +- frontend/{style.css => index.css} | 0 frontend/index.js | 39 +++++++++--- frontend/register.css | 102 ++++++++++++++++++++++++++++++ frontend/register.html | 31 +++++++++ frontend/register.js | 0 9 files changed, 233 insertions(+), 12 deletions(-) create mode 100644 frontend/dashboard.css create mode 100644 frontend/dashboard.html create mode 100644 frontend/dashboard.js rename frontend/{style.css => index.css} (100%) create mode 100644 frontend/register.css create mode 100644 frontend/register.html create mode 100644 frontend/register.js diff --git a/frontend/dashboard.css b/frontend/dashboard.css new file mode 100644 index 0000000..44ef651 --- /dev/null +++ b/frontend/dashboard.css @@ -0,0 +1,47 @@ +* { + box-sizing: border-box; + margin: none; + } + +body { + background-color: rgb(255, 255, 255); + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("bg.jpg"); + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} + +.wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; +} + +.container { + display: flex; + background-color: rgb(255, 255, 255,0.2); + backdrop-filter: blur(15px); + border-radius: 30px; + width: 90vw; + height: 80vh; + box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8); +} + +footer{ + position: fixed; + bottom: 0px; + background-color: rgb(12, 12, 12); + height: 50px; + width: 100vw; +} + +footer p{ + color: white; + text-align: center; +} \ No newline at end of file diff --git a/frontend/dashboard.html b/frontend/dashboard.html new file mode 100644 index 0000000..a740708 --- /dev/null +++ b/frontend/dashboard.html @@ -0,0 +1,20 @@ + + + + + + DashBoard + + + +
+
+ +
+
+ + + +

© 2023 Password Manager

+ + \ No newline at end of file diff --git a/frontend/dashboard.js b/frontend/dashboard.js new file mode 100644 index 0000000..e69de29 diff --git a/frontend/html/index.html b/frontend/html/index.html index 5cfac0b..56a20ff 100644 --- a/frontend/html/index.html +++ b/frontend/html/index.html @@ -3,7 +3,7 @@ - + Login @@ -24,10 +24,10 @@ diff --git a/frontend/style.css b/frontend/index.css similarity index 100% rename from frontend/style.css rename to frontend/index.css diff --git a/frontend/index.js b/frontend/index.js index a716481..2adb4e5 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -5,14 +5,12 @@ loginb.addEventListener("click", validateLogin); function validateName() { var name = document.getElementById("username").value; if(name=='' || name==null){ - // console.log("falsevn"); document.getElementById("errlabel").innerHTML = "Enter Username!"; setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) return false; } else { - // console.log("truevn"); return true; } } @@ -20,14 +18,12 @@ var name = document.getElementById("username").value; function validatePass() { var pass = document.getElementById("password").value; if(pass=='' || pass==null){ - // console.log("falsevp"); document.getElementById("errlabel").innerHTML = "Enter Password!"; setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) return false; } else { - // console.log("truevp"); return true; } } @@ -51,14 +47,14 @@ console.log(formData) try { const response = await fetch('/login', { method: "post", - /*headers: { + /* headers: { 'Content-Type': 'application/json' }*/ body: formData }); if(response.ok) { - //next page + window.location.href = "dashboard.html"; } else if(!response.ok) { if (response.status === 403) { const error = new Error('Access denied: You do not have permission to access this resource.'); @@ -66,17 +62,18 @@ console.log(formData) setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) + console.log(response) throw error; } } //error - /*const errorData = await response.json(); + const errorData = await response.json(); if (response.status === 401) { throw new Error('Invalid username or password') } else { throw new Error(errorData.error) - }*/ + } // const data = await response.json(); // const token = data.token; @@ -91,9 +88,33 @@ console.log(formData) console.log("Failed Server") } } - + } +const register = document.getElementById("register"); + +register.addEventListener("click", function(event) { + event.preventDefault(); + window.location.href = "register.html"; +}); + + + + + + + + + + + + + + + + + + // function handleAuthRes(data) { // if(data.token){ // localStorage.setItem('token', data.token); diff --git a/frontend/register.css b/frontend/register.css new file mode 100644 index 0000000..ac1abf2 --- /dev/null +++ b/frontend/register.css @@ -0,0 +1,102 @@ +* { + box-sizing: border-box; + } + + body { + background-color: dimgrey; + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("bg.jpg"); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + } + + .wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; + } + + + .container { + display: flex; + background-color: transparent; + backdrop-filter: blur(20px); + justify-content: center; + align-items: center; + width: 450px; + height: 400px; + flex-direction: column; + padding: 70px; + padding-bottom: 90px; + box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); + row-gap: 8px; + border-radius: 50px; + } + + .input { + width: 300px; + height: 30px; + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5); + border: none; + border-top: rgba(255, 255, 255, 0.2) 2px solid; + border-left: rgb(255, 255, 255, 0.2) 2px solid; + border-radius: 10px; + padding-left: 5px; + } + + .idiv p { + color: white; + font-family: 'Pixelify Sans', cursive; + margin-left: 5px; + } + + #username::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; + } + + #password::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; + } + + .idiv { + display: flex; + flex-direction: column; + row-gap: 10px; + justify-content: center; + padding: 7px; + } + + .idiv p{ + padding: none; + margin: none; + display: absolute; + translate: 0px 12px; + } + + #loginb { + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + padding: 7px; + margin-top: 20px; + margin-bottom: 20px; + width: 150px; + box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5); + translate: 0px -5px; + font-family: 'Pixelify Sans', cursive; + font-size: 20px; + border-radius: 10px; + } + + #loginb:active { + background-color: rgb(155, 155, 155, 0.3); + } \ No newline at end of file diff --git a/frontend/register.html b/frontend/register.html new file mode 100644 index 0000000..94b19d8 --- /dev/null +++ b/frontend/register.html @@ -0,0 +1,31 @@ + + + + + + + Register + +
+
+ +
+

Register

+
+ +
+ + +
+ +
+ +
+ +
+
+ + + +

© 2023 Password Manager

+ diff --git a/frontend/register.js b/frontend/register.js new file mode 100644 index 0000000..e69de29 From d7982e1e82337b309cd742e8dfcb6a46da4628e5 Mon Sep 17 00:00:00 2001 From: Modo Date: Tue, 17 Oct 2023 23:44:10 +0530 Subject: [PATCH 16/37] Add error message to login, Fix Internal Error 500 Yeah i touched the rest api and fixed the internal favicon error :P Cleaned up the pages and linked the error messages --- backend/rest_api.py | 5 + backend/static/favicon.ico | Bin 0 -> 67646 bytes frontend/arrow.svg | 1 + frontend/dashboard.html | 2 +- frontend/download.svg | 4 + frontend/index.css | 2 +- frontend/index.js | 25 +--- frontend/register.css | 285 ++++++++++++++++++++++++------------- frontend/register.html | 10 +- 9 files changed, 210 insertions(+), 124 deletions(-) create mode 100644 backend/static/favicon.ico create mode 100644 frontend/arrow.svg create mode 100644 frontend/download.svg diff --git a/backend/rest_api.py b/backend/rest_api.py index 7628ed3..a30d825 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -18,7 +18,12 @@ def handle_first_launched(): folder_path = path.join(folder_path, "Unnamed_Password_Manager") if not path.exists(folder_path): mkdir(folder_path) + +@app.route('/favicon.ico') +def favicon(): + favicon_path = path.join(app.root_path, '../frontend/static', 'favicon.ico') + return send_file(favicon_path, mimetype='image/vnd.microsoft.icon') @app.get("/") @app.get("/") diff --git a/backend/static/favicon.ico b/backend/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..40dd7f5cd69f8a36d476c77784f1b78eb9453f44 GIT binary patch literal 67646 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 \ No newline at end of file diff --git a/frontend/dashboard.html b/frontend/dashboard.html index a740708..093fe20 100644 --- a/frontend/dashboard.html +++ b/frontend/dashboard.html @@ -12,7 +12,7 @@
- +

© 2023 Password Manager

diff --git a/frontend/download.svg b/frontend/download.svg new file mode 100644 index 0000000..8877e84 --- /dev/null +++ b/frontend/download.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/frontend/index.css b/frontend/index.css index bcc6263..27df6bf 100644 --- a/frontend/index.css +++ b/frontend/index.css @@ -9,7 +9,7 @@ body { align-items: center; justify-content: center; background-image: url("bg.jpg"); - background-size: cover; + background-size: 200% auto; background-position: center; background-repeat: no-repeat; } diff --git a/frontend/index.js b/frontend/index.js index 2adb4e5..0c7619b 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -47,32 +47,18 @@ console.log(formData) try { const response = await fetch('/login', { method: "post", - /* headers: { - 'Content-Type': 'application/json' - }*/ body: formData }); if(response.ok) { window.location.href = "dashboard.html"; } else if(!response.ok) { - if (response.status === 403) { - const error = new Error('Access denied: You do not have permission to access this resource.'); - document.getElementById("errlabel").innerHTML = "Invalid Details!"; + const errorMessage = await response.text(); + document.getElementById("errlabel").innerHTML = errorMessage; setTimeout(()=> { document.getElementById("errlabel").innerHTML = ""; },3000) - console.log(response) - throw error; - } - } - - //error - const errorData = await response.json(); - if (response.status === 401) { - throw new Error('Invalid username or password') - } else { - throw new Error(errorData.error) + throw new Error(errorMessage); } // const data = await response.json(); @@ -83,10 +69,7 @@ console.log(formData) } catch (error) { - console.log(error); - if(error instanceof TypeError && error.message === 'Failed to fetch'){ - console.log("Failed Server") - } + console.error('Error:', error.message); } } diff --git a/frontend/register.css b/frontend/register.css index ac1abf2..aed3c06 100644 --- a/frontend/register.css +++ b/frontend/register.css @@ -1,102 +1,189 @@ * { - box-sizing: border-box; - } - - body { - background-color: dimgrey; - display: flex; - margin-top: 25px; - align-items: center; - justify-content: center; - background-image: url("bg.jpg"); - background-size: cover; - background-position: center; - background-repeat: no-repeat; - } - - .wrapper { - display: flex; - width: 90vw; - height: 90vh; - align-items: center; - justify-content: center; - } - - - .container { - display: flex; - background-color: transparent; - backdrop-filter: blur(20px); - justify-content: center; - align-items: center; - width: 450px; - height: 400px; - flex-direction: column; - padding: 70px; - padding-bottom: 90px; - box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); - row-gap: 8px; - border-radius: 50px; - } + box-sizing: border-box; +} - .input { - width: 300px; - height: 30px; - background-color: transparent; - color: rgb(255, 255, 255, 0.8); - box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5); - border: none; - border-top: rgba(255, 255, 255, 0.2) 2px solid; - border-left: rgb(255, 255, 255, 0.2) 2px solid; - border-radius: 10px; - padding-left: 5px; - } - - .idiv p { - color: white; - font-family: 'Pixelify Sans', cursive; - margin-left: 5px; - } - - #username::placeholder { - color: rgb(255, 255, 255, 0.5); - padding-left: 5px; - } - - #password::placeholder { - color: rgb(255, 255, 255, 0.5); - padding-left: 5px; - } +body { + background-color: dimgrey; + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("bg.jpg"); + background-size: 200% auto; + background-position: center; + background-repeat: no-repeat; +} - .idiv { - display: flex; - flex-direction: column; - row-gap: 10px; - justify-content: center; - padding: 7px; - } - - .idiv p{ - padding: none; - margin: none; - display: absolute; - translate: 0px 12px; - } - - #loginb { - background-color: transparent; - color: rgb(255, 255, 255, 0.8); - padding: 7px; - margin-top: 20px; - margin-bottom: 20px; - width: 150px; - box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5); - translate: 0px -5px; - font-family: 'Pixelify Sans', cursive; - font-size: 20px; - border-radius: 10px; - } - - #loginb:active { - background-color: rgb(155, 155, 155, 0.3); - } \ No newline at end of file +.wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; +} + + +.container { + display: flex; + background-color: transparent; + backdrop-filter: blur(20px); + justify-content: center; + align-items: center; + width: 450px; + height: 400px; + flex-direction: column; + padding: 70px; + padding-bottom: 90px; + box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); + row-gap: 8px; + border-radius: 50px; +} + +#register { + display: block; + text-align: center; + font-family: 'Pixelify Sans', cursive; + font-size: 50px; + text-shadow: 2px 2px 5px rgb(0, 0, 0); + color: white; + translate: 0px 10px; +} + +.input { + width: 300px; + height: 30px; + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + box-shadow: 2px 2px 3px rgb(0, 0, 0, 0.5); + border: none; + border-top: rgba(255, 255, 255, 0.2) 2px solid; + border-left: rgb(255, 255, 255, 0.2) 2px solid; + border-radius: 10px; + padding-left: 5px; +} + +.idiv p { + color: white; + font-family: 'Pixelify Sans', cursive; + margin-left: 5px; +} + +#username::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; +} + +#password::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; +} + +#conpassword::placeholder { + color: rgb(255, 255, 255, 0.5); + padding-left: 5px; +} + +.idiv input { + translate: 0px -20px; +} + +.idiv { + display: flex; + flex-direction: column; + row-gap: 10px; + justify-content: center; + padding: 7px; +} + +.idiv p{ + padding: none; + margin: none; + display: absolute; + translate: 0px 12px; +} + +#loginb { + background-color: transparent; + color: rgb(255, 255, 255, 0.8); + padding: 7px; + margin-top: 20px; + margin-bottom: 20px; + width: 150px; + box-shadow: 2px 2px 5px rgb(0, 0, 0, 0.5); + translate: 0px -5px; + font-family: 'Pixelify Sans', cursive; + font-size: 20px; + border-radius: 10px; +} + +#loginb:active { + background-color: rgb(155, 155, 155, 0.3); +} + +.help { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + +} + + +.help div{ + display: flex; + width: 50%; + justify-content: center; +} + +.error label { + position: absolute; + display: block; + justify-content: center; + translate: -50% 3px; + color: rgba(184, 156, 255, 0.9); + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + font-style: bold; + font-weight: bold; +} + +a { + text-decoration: none; + color: rgba(255, 255, 255, 0.5); + text-align: center; + font-family: 'Poppins', sans-serif; + font-size: 12px; +} + +a:active { + color: rgb(196, 196, 196, 10); +} + +footer{ + position: fixed; + bottom: 0px; + background-color: rgb(12, 12, 12); + height: 50px; + width: 100vw; +} + +footer p{ + color: white; + text-align: center; +} + +#returnb { + position: absolute; + top: 30px; + left: 30px; + width: 35px; + height: 35px; + border-radius: 15px; + font-family: 'Pixelify Sans', cursive; + color: white; + background-color: transparent; + background-image: url('download.svg'); + background-size: cover; + + box-shadow: rgb(0, 0, 0) 0px 0px 10px; +} \ No newline at end of file diff --git a/frontend/register.html b/frontend/register.html index 94b19d8..9beca2f 100644 --- a/frontend/register.html +++ b/frontend/register.html @@ -4,22 +4,28 @@ + + + Register
+ +
-

Register

+

Register

+
- +
From 7c3d5008def9d284176da21245af1f1d0a99eeb5 Mon Sep 17 00:00:00 2001 From: Kosh Date: Wed, 18 Oct 2023 12:55:55 +0530 Subject: [PATCH 17/37] Move static folder from backend to frontend folder --- frontend/static/.gitignore | 0 {backend => frontend}/static/favicon.ico | Bin 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 frontend/static/.gitignore rename {backend => frontend}/static/favicon.ico (100%) diff --git a/frontend/static/.gitignore b/frontend/static/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/backend/static/favicon.ico b/frontend/static/favicon.ico similarity index 100% rename from backend/static/favicon.ico rename to frontend/static/favicon.ico From 099acd0eccdd1e597af67e92853cd4ed0de93f1f Mon Sep 17 00:00:00 2001 From: Kosh Date: Wed, 18 Oct 2023 12:59:24 +0530 Subject: [PATCH 18/37] Add compatibility for a get request to /index.html --- backend/rest_api.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/rest_api.py b/backend/rest_api.py index a30d825..9dd1f8a 100644 --- a/backend/rest_api.py +++ b/backend/rest_api.py @@ -21,10 +21,17 @@ def handle_first_launched(): @app.route('/favicon.ico') -def favicon(): - favicon_path = path.join(app.root_path, '../frontend/static', 'favicon.ico') +def favicon() -> Response: + favicon_path: str = path.join(app.root_path, '../frontend/static', 'favicon.ico') return send_file(favicon_path, mimetype='image/vnd.microsoft.icon') + +@app.route("/index.html") +def handle_index() -> Response: + index_path: str = path.join(app.root_path, "../frontend/html", "index.html") + return send_file(index_path, mimetype="text/html") + + @app.get("/") @app.get("/") def handle_get(url_path: str = "html/index.html") -> Response: From e41ce4945b43fa48ac69a31aad622e928cba67da Mon Sep 17 00:00:00 2001 From: Kosh Date: Wed, 18 Oct 2023 13:27:17 +0530 Subject: [PATCH 19/37] Add content box in the dashboard --- frontend/dashboard.css | 15 +++++++++++++-- frontend/dashboard.html | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/dashboard.css b/frontend/dashboard.css index 44ef651..cda552f 100644 --- a/frontend/dashboard.css +++ b/frontend/dashboard.css @@ -25,7 +25,8 @@ body { .container { display: flex; - background-color: rgb(255, 255, 255,0.2); + align-items: center; + background-color: rgb(0, 255, 255,0.2); backdrop-filter: blur(15px); border-radius: 30px; width: 90vw; @@ -44,4 +45,14 @@ footer{ footer p{ color: white; text-align: center; -} \ No newline at end of file +} + +.contentbox { + position: absolute; + left: 30px; + background-color: rgb(255, 255, 255,0.7); + border-radius: 20px; + translate: translateX(50%); + height: 90%; + width: 500px; +} diff --git a/frontend/dashboard.html b/frontend/dashboard.html index 093fe20..ce516a7 100644 --- a/frontend/dashboard.html +++ b/frontend/dashboard.html @@ -9,7 +9,7 @@
- +
@@ -17,4 +17,4 @@

© 2023 Password Manager

- \ No newline at end of file + From a32a961f9176e880d93842cb536e65a1a2d32e75 Mon Sep 17 00:00:00 2001 From: Modo Date: Wed, 18 Oct 2023 20:02:53 +0530 Subject: [PATCH 20/37] Add git ignor --- .gitignore | 1 + frontend/index.js | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 50a6bce..08775f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *__pycache__* /node_modules /devfolder +.vscode \ No newline at end of file diff --git a/frontend/index.js b/frontend/index.js index 0c7619b..f4f2193 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -42,7 +42,6 @@ let _password = document.getElementById("password").value; formData = new FormData(); formData.append('user_name', _username); formData.append('password', _password); -console.log(formData) try { const response = await fetch('/login', { From 01e3ab7a4a4ba465caad508c3b34a3fa56815319 Mon Sep 17 00:00:00 2001 From: Modo Date: Wed, 18 Oct 2023 20:10:14 +0530 Subject: [PATCH 21/37] Reorganize Folders --- frontend/{ => assets}/arrow.svg | 0 frontend/{ => assets}/bg.jpg | Bin frontend/{ => assets}/download.svg | 0 frontend/{ => html}/dashboard.html | 0 frontend/{ => html}/register.html | 0 frontend/{ => scripts}/dashboard.js | 0 frontend/{ => scripts}/index.js | 0 frontend/{ => scripts}/register.js | 0 frontend/{ => styles}/dashboard.css | 0 frontend/{ => styles}/index.css | 0 frontend/{ => styles}/register.css | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename frontend/{ => assets}/arrow.svg (100%) rename frontend/{ => assets}/bg.jpg (100%) rename frontend/{ => assets}/download.svg (100%) rename frontend/{ => html}/dashboard.html (100%) rename frontend/{ => html}/register.html (100%) rename frontend/{ => scripts}/dashboard.js (100%) rename frontend/{ => scripts}/index.js (100%) rename frontend/{ => scripts}/register.js (100%) rename frontend/{ => styles}/dashboard.css (100%) rename frontend/{ => styles}/index.css (100%) rename frontend/{ => styles}/register.css (100%) diff --git a/frontend/arrow.svg b/frontend/assets/arrow.svg similarity index 100% rename from frontend/arrow.svg rename to frontend/assets/arrow.svg diff --git a/frontend/bg.jpg b/frontend/assets/bg.jpg similarity index 100% rename from frontend/bg.jpg rename to frontend/assets/bg.jpg diff --git a/frontend/download.svg b/frontend/assets/download.svg similarity index 100% rename from frontend/download.svg rename to frontend/assets/download.svg diff --git a/frontend/dashboard.html b/frontend/html/dashboard.html similarity index 100% rename from frontend/dashboard.html rename to frontend/html/dashboard.html diff --git a/frontend/register.html b/frontend/html/register.html similarity index 100% rename from frontend/register.html rename to frontend/html/register.html diff --git a/frontend/dashboard.js b/frontend/scripts/dashboard.js similarity index 100% rename from frontend/dashboard.js rename to frontend/scripts/dashboard.js diff --git a/frontend/index.js b/frontend/scripts/index.js similarity index 100% rename from frontend/index.js rename to frontend/scripts/index.js diff --git a/frontend/register.js b/frontend/scripts/register.js similarity index 100% rename from frontend/register.js rename to frontend/scripts/register.js diff --git a/frontend/dashboard.css b/frontend/styles/dashboard.css similarity index 100% rename from frontend/dashboard.css rename to frontend/styles/dashboard.css diff --git a/frontend/index.css b/frontend/styles/index.css similarity index 100% rename from frontend/index.css rename to frontend/styles/index.css diff --git a/frontend/register.css b/frontend/styles/register.css similarity index 100% rename from frontend/register.css rename to frontend/styles/register.css From a260428f8445432f35b90172aced8f2c41c341d1 Mon Sep 17 00:00:00 2001 From: Modo Date: Thu, 19 Oct 2023 00:42:22 +0530 Subject: [PATCH 22/37] Dashboard Entry Update --- frontend/assets/search.svg | 1 + frontend/html/dashboard.html | 37 ++++++++ frontend/html/index.html | 4 +- frontend/html/register.html | 4 +- frontend/scripts/dashboard.js | 74 +++++++++++++++ frontend/scripts/index.js | 33 ++++--- frontend/styles/dashboard.css | 174 ++++++++++++++++++++++++++++++++++ frontend/styles/index.css | 5 +- frontend/styles/register.css | 6 +- 9 files changed, 316 insertions(+), 22 deletions(-) create mode 100644 frontend/assets/search.svg diff --git a/frontend/assets/search.svg b/frontend/assets/search.svg new file mode 100644 index 0000000..6c8c6fb --- /dev/null +++ b/frontend/assets/search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/html/dashboard.html b/frontend/html/dashboard.html index e69de29..1229bf1 100644 --- a/frontend/html/dashboard.html +++ b/frontend/html/dashboard.html @@ -0,0 +1,37 @@ + + + + + + DashBoard + + + +
+
+ +
+ + + +
+ +
+
+ +
+
+
+ +
+
+
+ + + +

© 2023 Password Manager

+ + diff --git a/frontend/html/index.html b/frontend/html/index.html index 56a20ff..08f8422 100644 --- a/frontend/html/index.html +++ b/frontend/html/index.html @@ -3,7 +3,7 @@ - + Login @@ -41,7 +41,7 @@
- +

© 2023 Password Manager

diff --git a/frontend/html/register.html b/frontend/html/register.html index 9beca2f..ac91956 100644 --- a/frontend/html/register.html +++ b/frontend/html/register.html @@ -3,7 +3,7 @@ - + @@ -30,7 +30,7 @@ - +

© 2023 Password Manager

diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index e69de29..28b27f7 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -0,0 +1,74 @@ + +const search = document.getElementById('search'); +let globaldata; + +search.addEventListener('keyup', function() { + let result = search.value; + if(result == ""){ + updatelist(globaldata) + } else { + console.log(result); + updatelist(globaldata) + } +}); + +async function getData() { + try { + let response = await fetch('/get_data', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + } + }); + + if(response.ok) { + let userdata = await response.json(); + console.log(userdata) + globaldata = userdata + updatelist(userdata); + } else if(!response.ok) { + const errorMessage = await response.text(); + throw new Error(errorMessage); + } + } catch (error) { + console.error('Error:', error.message); + } + } + + +// function addlist(userdata) { +// let masterdata = []; +// for (let field in userdata){ +// masterdata.push(userdata[field]) +// } +// console.log(...masterdata) +// updatelist(masterdata) +// } + +const contentbox = document.querySelector('.objcontainer') + +function updatelist(userdata) { + contentbox.innerHTML = '' + for(let field in userdata){ + let fields = userdata[field]; + for (let data in fields) { + if (fields.hasOwnProperty(data)) { + let value = fields[data]; + updategui(field, data, value) + console.log(field, data, value) + } + + } + } + +} + +function updategui(title, key, value) { + console.log(`${title},${key},${value}`) + let content = contentbox.innerHTML.concat(`
${title},${key},${value}
`) + contentbox.innerHTML = content; +} + +window.onload = function() { + getData(); +}; \ No newline at end of file diff --git a/frontend/scripts/index.js b/frontend/scripts/index.js index a61b901..343311c 100644 --- a/frontend/scripts/index.js +++ b/frontend/scripts/index.js @@ -38,20 +38,27 @@ function validateLogin() { async function getAuth() { let _username = document.getElementById("username").value; let _password = document.getElementById("password").value; + +formData = new FormData(); +formData.append('user_name', _username); +formData.append('password', _password); +console.log(formData) + try { - const response = await fetch('http://127.0.0.1:5000/', { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - user_name: _username, - password: _password - }) + const response = await fetch('/login', { + method: "post", + body: formData }); - if(!response.ok) { - throw new Error('Connection was not Ok!'); + if(response.ok) { + window.location.href = "dashboard.html"; + } else if(!response.ok) { + const errorMessage = await response.text(); + document.getElementById("errlabel").innerHTML = errorMessage; + setTimeout(()=> { + document.getElementById("errlabel").innerHTML = ""; + },3000) + throw new Error(errorMessage); } // const data = await response.json(); @@ -71,7 +78,7 @@ const register = document.getElementById("register"); register.addEventListener("click", function(event) { event.preventDefault(); - window.location.href = "register.html"; + window.location.href = "../html/register.html"; }); @@ -98,4 +105,4 @@ register.addEventListener("click", function(event) { // } else { // console.error('Login Failed:', data.error) // } -// } \ No newline at end of file +// } diff --git a/frontend/styles/dashboard.css b/frontend/styles/dashboard.css index e69de29..abf9b98 100644 --- a/frontend/styles/dashboard.css +++ b/frontend/styles/dashboard.css @@ -0,0 +1,174 @@ +* { + box-sizing: border-box; + margin: none; + } + +body { + background-color: rgb(255, 255, 255); + display: flex; + margin-top: 25px; + align-items: center; + justify-content: center; + background-image: url("../assets/bg.jpg"); + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} + +.wrapper { + display: flex; + width: 90vw; + height: 90vh; + align-items: center; + justify-content: center; +} + +.container { + display: flex; + align-items: center; + background-color: rgb(0, 255, 255,0.2); + backdrop-filter: blur(15px); + border-radius: 30px; + width: 90vw; + height: 80vh; + box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8); + overflow: hidden; +} + +footer{ + position: fixed; + bottom: 0px; + background-color: rgb(12, 12, 12); + height: 50px; + width: 100vw; +} + +footer p{ + color: white; + text-align: center; +} + +.contentbox { + display: flex; + position: absolute; + right: 30px; + background-color: rgb(0, 255, 255,0.3); + border-radius: 20px; + height: 85%; + width: 40%; + justify-content: center; + align-items: center; +} + +.searchbar { + display: flex; + justify-content: center; + align-items: center; + position: absolute; + overflow: hidden; + top: 20px; + width: 90%; + height: 10%; + background-color: rgb(255, 255, 255, 0.8); + border-radius: 10px 10px 0 0; +} + +.searchbar input { + width: 95%; + height: 80%; + border: blue 2px slateblue; + box-shadow: none; + background-color: rgb(255, 255, 255, 0.5); + border-radius: 20px; + padding-left: 20px; + padding-right: 40px; +} + +.searchbar img { + display: block; + position: absolute; + top: 24%; + right: 25px; + width: 25px; +} + +.objcontainer { + display: flex; + flex-direction: column; + row-gap: 10px; + position: absolute; + bottom: 20px; + width: 90%; + height: 80%; + background-color: rgb(255, 255, 255, 0.8); + border-radius: 0 0 10px 10px; + overflow: auto; + padding-top: 10px; + padding-bottom: 10px; + align-items: center; +} + +.objcontainer div{ + padding: 20px; + width: 90%; + height: 200px; + background-color: rgb(255, 255, 255, 0.5); + text-align: center; + box-shadow: 0 0 10px black; + border: rgba(0, 255, 255, 0.5) 1px solid; + overflow: hidden; +} + +.objcontainer div:hover { + background-color: rgb(128, 128, 128, 0.4); +} + +.objcontainer div:not(:hover) { + background-color: rgb(255, 255, 255, 0.5); +} + +.querybox { + display: flex; + justify-content: center; + align-items: center; + position: absolute; + left: 30px; + bottom: 40px; + background-color: rgb(0, 255, 255,0.3); + border-radius: 20px; + height: 60%; + width: 50%; +} + +.infopanel { + width: 90%; + height: 80%; + background-color: rgb(255, 255, 255, 0.8); + border-radius: 10px; +} + +.buttonbox { + position: absolute; + left: 30px; + top: 40px; + background-color: rgb(0, 255, 255,0.3); + border-radius: 20px; + height: 20%; + width: 50%; +} + +::-webkit-scrollbar { + width: 10px; +} + +::-webkit-scrollbar-track { + background: #f1f1f1; +} + +::-webkit-scrollbar-thumb { + background: hsl(0, 0%, 53%); +} + +::-webkit-scrollbar-thumb:hover { + background: hsl(0, 0%, 33%); +} \ No newline at end of file diff --git a/frontend/styles/index.css b/frontend/styles/index.css index 27df6bf..ded948c 100644 --- a/frontend/styles/index.css +++ b/frontend/styles/index.css @@ -8,10 +8,11 @@ body { margin-top: 25px; align-items: center; justify-content: center; - background-image: url("bg.jpg"); - background-size: 200% auto; + background-image: url("../assets/bg.jpg"); + background-size: cover; background-position: center; background-repeat: no-repeat; + background-attachment: fixed } .wrapper { diff --git a/frontend/styles/register.css b/frontend/styles/register.css index aed3c06..f93aba2 100644 --- a/frontend/styles/register.css +++ b/frontend/styles/register.css @@ -8,8 +8,8 @@ body { margin-top: 25px; align-items: center; justify-content: center; - background-image: url("bg.jpg"); - background-size: 200% auto; + background-image: url("../assets/bg.jpg"); + background-size: cover; background-position: center; background-repeat: no-repeat; } @@ -182,7 +182,7 @@ footer p{ font-family: 'Pixelify Sans', cursive; color: white; background-color: transparent; - background-image: url('download.svg'); + background-image: url('../assets/download.svg'); background-size: cover; box-shadow: rgb(0, 0, 0) 0px 0px 10px; From 464820aacfcab57b5ebb37c615725ddc0a3834e2 Mon Sep 17 00:00:00 2001 From: Modo Date: Fri, 20 Oct 2023 22:13:41 +0530 Subject: [PATCH 23/37] Add Entry List with Functionality --- frontend/assets/search2.svg | 1 + frontend/html/dashboard.html | 2 +- frontend/html/index.html | 3 +- frontend/html/register.html | 2 +- frontend/scripts/dashboard.js | 140 ++++++++++++++++++++++++---------- frontend/scripts/index.js | 2 +- frontend/styles/dashboard.css | 81 ++++++++++++++++++-- frontend/styles/index.css | 1 - 8 files changed, 179 insertions(+), 53 deletions(-) create mode 100644 frontend/assets/search2.svg diff --git a/frontend/assets/search2.svg b/frontend/assets/search2.svg new file mode 100644 index 0000000..dedb2cd --- /dev/null +++ b/frontend/assets/search2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/html/dashboard.html b/frontend/html/dashboard.html index 1229bf1..59065b4 100644 --- a/frontend/html/dashboard.html +++ b/frontend/html/dashboard.html @@ -14,7 +14,7 @@
diff --git a/frontend/html/index.html b/frontend/html/index.html index 08f8422..77ff60f 100644 --- a/frontend/html/index.html +++ b/frontend/html/index.html @@ -8,6 +8,7 @@ +
@@ -41,7 +42,7 @@
- +

© 2023 Password Manager

diff --git a/frontend/html/register.html b/frontend/html/register.html index ac91956..c5f368d 100644 --- a/frontend/html/register.html +++ b/frontend/html/register.html @@ -30,7 +30,7 @@ - +

© 2023 Password Manager

diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index 28b27f7..3bd59eb 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -1,17 +1,7 @@ -const search = document.getElementById('search'); +//-----------------------------------------------------------------------------------------(Getting Data) let globaldata; -search.addEventListener('keyup', function() { - let result = search.value; - if(result == ""){ - updatelist(globaldata) - } else { - console.log(result); - updatelist(globaldata) - } -}); - async function getData() { try { let response = await fetch('/get_data', { @@ -23,9 +13,9 @@ async function getData() { if(response.ok) { let userdata = await response.json(); - console.log(userdata) + //console.log(userdata) globaldata = userdata - updatelist(userdata); + getFieldName(userdata) } else if(!response.ok) { const errorMessage = await response.text(); throw new Error(errorMessage); @@ -35,40 +25,110 @@ async function getData() { } } - -// function addlist(userdata) { -// let masterdata = []; -// for (let field in userdata){ -// masterdata.push(userdata[field]) -// } -// console.log(...masterdata) -// updatelist(masterdata) -// } +//-----------------------------------------------------------------------------------------(Adds Values to Content Box) const contentbox = document.querySelector('.objcontainer') -function updatelist(userdata) { - contentbox.innerHTML = '' - for(let field in userdata){ - let fields = userdata[field]; - for (let data in fields) { - if (fields.hasOwnProperty(data)) { - let value = fields[data]; - updategui(field, data, value) - console.log(field, data, value) - } - - } - } - +function updateListGui(field) { + let content = contentbox.innerHTML.concat( + ` +
+ +

${field["fieldname"]}

+ +
+ ` + ) + contentbox.innerHTML = content; + + let btns = document.querySelectorAll('.entrybutton') + btns.forEach(btn => { + btn.addEventListener('click', () => { + updateInfoGui(btn.id); + }); + }); } -function updategui(title, key, value) { - console.log(`${title},${key},${value}`) - let content = contentbox.innerHTML.concat(`
${title},${key},${value}
`) - contentbox.innerHTML = content; + +// const data = { +// Amazon: { +// url: "https://www.amazon.com", +// Name: "Yash", +// Password: "123" +// }, +// Google: { +// url: "https://www.google.com", +// Name: "XYZ", +// Password: "Secret" +// } +// } + +function getFieldName(data) { //Gets All Field Values + let fieldnamearray = [] + for(let field in data){ + let fieldname = field + fieldnamearray.push(fieldname) + } + getDisplayList(fieldnamearray,data); + //console.log(fieldnamearray) } +function getFaviconUrl(fieldname,data) { + let fielddata = data[fieldname] + let url = fielddata["url"] + url = url.replace("https://",'') + faviconlink = `http://www.google.com/s2/favicons?domain=${url}` + return faviconlink +} + +function getDisplayList(fieldnames,userdata){ + contentbox.innerHTML = '' + for(let i in fieldnames){ + let faviconurl = getFaviconUrl(fieldnames[i],userdata) + let guidata = { + fieldname: fieldnames[i], + url: faviconurl + } + updateListGui(guidata) + } +} + +//----------------------------------------------------------------------------------------- + +const search = document.getElementById('search'); + +search.addEventListener('keyup', function() { + let result = search.value; + if(result == ""){ + getData() + } else { + getFilterList(result,globaldata) + //console.log(result); + + } +}); + +function getFilterList(keyword,data) { //Gets Filtered Field Values + let filterarray = [] + for(let field in data){ + if(field.toLowerCase().indexOf(keyword) !== -1){ + let fieldname = field + filterarray.push(fieldname) + } + } + getDisplayList(filterarray,data); + //console.log(filterarray) + } + +//----------------------------------------------------------------------------------------- + + +function updateInfoGui(call) { + console.log(call) +} + +//----------------------------------------------------------------------------------------- + window.onload = function() { getData(); }; \ No newline at end of file diff --git a/frontend/scripts/index.js b/frontend/scripts/index.js index 343311c..747f269 100644 --- a/frontend/scripts/index.js +++ b/frontend/scripts/index.js @@ -51,7 +51,7 @@ console.log(formData) }); if(response.ok) { - window.location.href = "dashboard.html"; + window.location.href = "../html/dashboard.html"; } else if(!response.ok) { const errorMessage = await response.text(); document.getElementById("errlabel").innerHTML = errorMessage; diff --git a/frontend/styles/dashboard.css b/frontend/styles/dashboard.css index abf9b98..ad1202f 100644 --- a/frontend/styles/dashboard.css +++ b/frontend/styles/dashboard.css @@ -29,8 +29,9 @@ body { background-color: rgb(0, 255, 255,0.2); backdrop-filter: blur(15px); border-radius: 30px; - width: 90vw; - height: 80vh; + position: relative; + width: 1100px; + height: 600px; box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8); overflow: hidden; } @@ -56,6 +57,8 @@ footer p{ border-radius: 20px; height: 85%; width: 40%; + /* height: 70vh; + width: 40vw; */ justify-content: center; align-items: center; } @@ -84,12 +87,35 @@ footer p{ padding-right: 40px; } -.searchbar img { - display: block; +.searchbar button { + background-image: url("../assets/search.svg"); + background-size: cover; + background-position: center; + display: inline-block; position: absolute; - top: 24%; + top: 20%; right: 25px; - width: 25px; + width: 30px; + height: 30px; + border: none; + background-color: transparent; + cursor: pointer; +} + +.searchbar button:hover { + background-image: url(../assets/search2.svg); +} + +.searchbar button:not(:hover) { + background-image: url(../assets/search.svg); +} + +.searchbar:hover{ + box-shadow: 0, 0, 5px; +} + +.searchbar:not(:hover){ + box-shadow: none; } .objcontainer { @@ -109,14 +135,16 @@ footer p{ } .objcontainer div{ + display: flex; padding: 20px; width: 90%; - height: 200px; + height: 50px; background-color: rgb(255, 255, 255, 0.5); - text-align: center; + text-align: left; box-shadow: 0 0 10px black; border: rgba(0, 255, 255, 0.5) 1px solid; overflow: hidden; + align-items: center; } .objcontainer div:hover { @@ -127,6 +155,35 @@ footer p{ background-color: rgb(255, 255, 255, 0.5); } +.objcontainer div button{ + position: absolute; + right: 40px; + background-color: hsl(0, 0%, 100%, 0.5); + border-radius: 10px; + padding: 5px; + font-weight: bold; + box-shadow: 0 0 5px; + cursor: pointer; +} + +.objcontainer div button:hover{ + background-color: rgb(128, 128, 128, 0.7); +} + +.objcontainer div button:not(:hover){ + background-color: hsl(0, 0%, 100%, 0.5); +} + +.objcontainer div img{ + width: 30px; +} + +.objcontainer div p{ + padding-left: 20px; + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + font-weight: bold; +} + .querybox { display: flex; justify-content: center; @@ -171,4 +228,12 @@ footer p{ ::-webkit-scrollbar-thumb:hover { background: hsl(0, 0%, 33%); +} + +@media (max-width: 860px) { + .container{ + position: fixed; + width: 774px; + } + } \ No newline at end of file diff --git a/frontend/styles/index.css b/frontend/styles/index.css index ded948c..e16d9c6 100644 --- a/frontend/styles/index.css +++ b/frontend/styles/index.css @@ -119,7 +119,6 @@ body { } - .help div{ display: flex; width: 50%; From d5ead083285e7fef76c2529ecb95407a6c99bd98 Mon Sep 17 00:00:00 2001 From: Modo Date: Sat, 21 Oct 2023 00:49:11 +0530 Subject: [PATCH 24/37] Make UI changes, Implement Logout --- frontend/assets/internet.svg | 34 +++++++++++++++++ frontend/assets/logout.svg | 7 ++++ frontend/assets/logout2.svg | 7 ++++ frontend/html/dashboard.html | 25 +++++++----- frontend/scripts/dashboard.js | 33 +++++++++++++++- frontend/styles/dashboard.css | 72 ++++++++++++++++++++++++++++------- 6 files changed, 154 insertions(+), 24 deletions(-) create mode 100644 frontend/assets/internet.svg create mode 100644 frontend/assets/logout.svg create mode 100644 frontend/assets/logout2.svg diff --git a/frontend/assets/internet.svg b/frontend/assets/internet.svg new file mode 100644 index 0000000..a3bf248 --- /dev/null +++ b/frontend/assets/internet.svg @@ -0,0 +1,34 @@ + + + + + + + + + + \ No newline at end of file diff --git a/frontend/assets/logout.svg b/frontend/assets/logout.svg new file mode 100644 index 0000000..33d5139 --- /dev/null +++ b/frontend/assets/logout.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/frontend/assets/logout2.svg b/frontend/assets/logout2.svg new file mode 100644 index 0000000..5a2ffde --- /dev/null +++ b/frontend/assets/logout2.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/frontend/html/dashboard.html b/frontend/html/dashboard.html index 59065b4..1803cd4 100644 --- a/frontend/html/dashboard.html +++ b/frontend/html/dashboard.html @@ -9,24 +9,29 @@
+ -
+
+
+ + + +
- -
+
+
+
+
+
-
-
-
- -
diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index 3bd59eb..bba312f 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -18,6 +18,7 @@ async function getData() { getFieldName(userdata) } else if(!response.ok) { const errorMessage = await response.text(); + window.location.href = "../html/index.html"; throw new Error(errorMessage); } } catch (error) { @@ -33,7 +34,7 @@ function updateListGui(field) { let content = contentbox.innerHTML.concat( `
- +

${field["fieldname"]}

@@ -129,6 +130,36 @@ function updateInfoGui(call) { //----------------------------------------------------------------------------------------- +async function logOut() { + try{ + await fetch("/logout", { + method:'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({}) + }) + window.location.href = "../html/index.html"; + } catch(err) { + console.log(err) + } +} + +const logoutbtn = document.querySelector("#logout") + +logoutbtn.addEventListener('click', () => { + console.log("logging out") + logOut() +}) + + +//----------------------------------------------------------------------------------------- + +// window.addEventListener('unload', function() { +// logOut() +// }); + + window.onload = function() { getData(); }; \ No newline at end of file diff --git a/frontend/styles/dashboard.css b/frontend/styles/dashboard.css index ad1202f..ad56d68 100644 --- a/frontend/styles/dashboard.css +++ b/frontend/styles/dashboard.css @@ -30,10 +30,11 @@ body { backdrop-filter: blur(15px); border-radius: 30px; position: relative; - width: 1100px; + width: 1200px; height: 600px; box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.8); overflow: hidden; + justify-content: center; } footer{ @@ -53,14 +54,15 @@ footer p{ display: flex; position: absolute; right: 30px; + bottom: 0; background-color: rgb(0, 255, 255,0.3); border-radius: 20px; - height: 85%; - width: 40%; - /* height: 70vh; - width: 40vw; */ + height: 100%; + width: 45%; justify-content: center; align-items: center; + max-height: 100%; + overflow: auto; } .searchbar { @@ -129,8 +131,8 @@ footer p{ background-color: rgb(255, 255, 255, 0.8); border-radius: 0 0 10px 10px; overflow: auto; - padding-top: 10px; - padding-bottom: 10px; + padding-top: 20px; + padding-bottom: 20px; align-items: center; } @@ -145,6 +147,7 @@ footer p{ border: rgba(0, 255, 255, 0.5) 1px solid; overflow: hidden; align-items: center; + flex-shrink: 0; } .objcontainer div:hover { @@ -193,25 +196,37 @@ footer p{ bottom: 40px; background-color: rgb(0, 255, 255,0.3); border-radius: 20px; - height: 60%; - width: 50%; + height: 70%; + width: 40%; + position: absolute; + bottom: 0; } .infopanel { width: 90%; - height: 80%; + height: 90%; + background-color: rgb(255, 255, 255, 0.8); + border-radius: 10px; +} + +.buttonpanel { + width: 90%; + height: 70%; background-color: rgb(255, 255, 255, 0.8); border-radius: 10px; } .buttonbox { + display: flex; + justify-content: center; + align-items: center; position: absolute; left: 30px; - top: 40px; + top: 0; background-color: rgb(0, 255, 255,0.3); border-radius: 20px; height: 20%; - width: 50%; + width: 40%; } ::-webkit-scrollbar { @@ -230,10 +245,41 @@ footer p{ background: hsl(0, 0%, 33%); } +#logout{ + width: 40px; + height: 40px; + position: absolute; + top: 20px; + right: 20px; + border-radius: 10px; + background-image: url(../assets/logout2.svg); + background-size: cover; + background-color: transparent; + border: none; +} + +#logout:hover{ + background-image: url(../assets/logout2.svg); + opacity: 0.8; +} + +#logout:not(:hover){ + background-image: url(../assets/logout.svg); + opacity: 0.7; +} + +.innerwrapper { + height: 90%; + width: 90%; + padding: 10px; + position: relative; +} + @media (max-width: 860px) { .container{ position: fixed; width: 774px; } -} \ No newline at end of file +} + From b6d960f2b1d1df71204e2df944a8654c8cffcf6b Mon Sep 17 00:00:00 2001 From: Modo Date: Sat, 21 Oct 2023 14:42:54 +0530 Subject: [PATCH 25/37] Add Add Entry Page & CSS Animations --- frontend/assets/plus.svg | 4 + frontend/assets/x.svg | 12 ++ frontend/html/dashboard.html | 18 ++- frontend/scripts/dashboard.js | 27 ++++- frontend/scripts/index.js | 20 ++++ frontend/styles/dashboard.css | 202 ++++++++++++++++++++++++++++++---- 6 files changed, 256 insertions(+), 27 deletions(-) create mode 100644 frontend/assets/plus.svg create mode 100644 frontend/assets/x.svg diff --git a/frontend/assets/plus.svg b/frontend/assets/plus.svg new file mode 100644 index 0000000..06941f6 --- /dev/null +++ b/frontend/assets/plus.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/frontend/assets/x.svg b/frontend/assets/x.svg new file mode 100644 index 0000000..a2f3c55 --- /dev/null +++ b/frontend/assets/x.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/html/dashboard.html b/frontend/html/dashboard.html index 1803cd4..136c6d8 100644 --- a/frontend/html/dashboard.html +++ b/frontend/html/dashboard.html @@ -16,7 +16,7 @@
@@ -28,11 +28,25 @@
-
+
+

Welcome

+
+ +
+
+ + + diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index bba312f..4167476 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -33,15 +33,17 @@ const contentbox = document.querySelector('.objcontainer') function updateListGui(field) { let content = contentbox.innerHTML.concat( ` -
- +
+

${field["fieldname"]}

` ) + contentbox.innerHTML = content; + let btns = document.querySelectorAll('.entrybutton') btns.forEach(btn => { btn.addEventListener('click', () => { @@ -51,6 +53,9 @@ function updateListGui(field) { } + + + // const data = { // Amazon: { // url: "https://www.amazon.com", @@ -112,7 +117,7 @@ search.addEventListener('keyup', function() { function getFilterList(keyword,data) { //Gets Filtered Field Values let filterarray = [] for(let field in data){ - if(field.toLowerCase().indexOf(keyword) !== -1){ + if(field.toLowerCase().indexOf(keyword.toLowerCase()) !== -1){ let fieldname = field filterarray.push(fieldname) } @@ -123,6 +128,22 @@ function getFilterList(keyword,data) { //Gets Filtered Fie //----------------------------------------------------------------------------------------- +const addentry = document.getElementById('addentry') +const entrywindow = document.querySelector('#entrycontainer') + +addentry.addEventListener('click', function() { + entrywindow.classList.toggle("hidden"); + entrywindow.style.display = "flex"; +}) + +const exitentrywin = document.getElementById('backbtn') + +exitentrywin.addEventListener('click', function() { + entrywindow.style.display = "none" +}) + +//----------------------------------------------------------------------------------------- + function updateInfoGui(call) { console.log(call) diff --git a/frontend/scripts/index.js b/frontend/scripts/index.js index 747f269..20b4e24 100644 --- a/frontend/scripts/index.js +++ b/frontend/scripts/index.js @@ -82,6 +82,26 @@ register.addEventListener("click", function(event) { }); +window.onload = async function() { + try { + let response = await fetch('/get_data', { + method: 'POST', + headers: { + 'Content-Type': 'application/json' + } + }); + + if(response.ok) { + window.location.href = "../html/dashboard.html"; + } else if(!response.ok) { + const errorMessage = await response.text(); + throw new Error(errorMessage); + } + } catch (error) { + console.error("Not Logged In..") + + } +}; diff --git a/frontend/styles/dashboard.css b/frontend/styles/dashboard.css index ad56d68..850c80b 100644 --- a/frontend/styles/dashboard.css +++ b/frontend/styles/dashboard.css @@ -23,6 +23,13 @@ body { justify-content: center; } +.innerwrapper { + height: 90%; + width: 90%; + padding: 10px; + position: relative; +} + .container { display: flex; align-items: center; @@ -50,6 +57,8 @@ footer p{ text-align: center; } +/*----------------------------------------------------------------------------------------*/ + .contentbox { display: flex; position: absolute; @@ -63,46 +72,53 @@ footer p{ align-items: center; max-height: 100%; overflow: auto; + box-shadow: 0 0 10px; } +/*----------------------------------------------------------------------------------------*/ + .searchbar { display: flex; justify-content: center; align-items: center; position: absolute; overflow: hidden; - top: 20px; + top: 15px; width: 90%; - height: 10%; - background-color: rgb(255, 255, 255, 0.8); - border-radius: 10px 10px 0 0; + height: 11%; + background-color: rgb(255, 255, 255, 0.5); + border-radius: 10px; + padding: 10px; + flex-shrink: 0; } .searchbar input { - width: 95%; - height: 80%; + width: 88%; + height: 65%; border: blue 2px slateblue; box-shadow: none; background-color: rgb(255, 255, 255, 0.5); border-radius: 20px; padding-left: 20px; padding-right: 40px; + position: absolute; + left:20px; } -.searchbar button { +/* .searchbar button { background-image: url("../assets/search.svg"); background-size: cover; background-position: center; display: inline-block; position: absolute; - top: 20%; - right: 25px; + top: 19%; + right: 4px; width: 30px; height: 30px; border: none; background-color: transparent; cursor: pointer; -} +} */ .searchbar button:hover { background-image: url(../assets/search2.svg); @@ -120,6 +136,8 @@ footer p{ box-shadow: none; } +/*----------------------------------------------------------------------------------------*/ + .objcontainer { display: flex; flex-direction: column; @@ -128,8 +146,8 @@ footer p{ bottom: 20px; width: 90%; height: 80%; - background-color: rgb(255, 255, 255, 0.8); - border-radius: 0 0 10px 10px; + background-color: rgb(255, 255, 255, 0.5); + border-radius: 10px; overflow: auto; padding-top: 20px; padding-bottom: 20px; @@ -148,14 +166,20 @@ footer p{ overflow: hidden; align-items: center; flex-shrink: 0; + transition: width 0.3s ease, height 0.3s ease; } + .objcontainer div:hover { background-color: rgb(128, 128, 128, 0.4); + width: 95%; + height: 60px; } .objcontainer div:not(:hover) { background-color: rgb(255, 255, 255, 0.5); + width: 90%; + height: 50px; } .objcontainer div button{ @@ -167,6 +191,16 @@ footer p{ font-weight: bold; box-shadow: 0 0 5px; cursor: pointer; + opacity: 0; + transition: opacity 0.3s ease; +} + +.objcontainer div:hover button{ + opacity: 1; +} + +.objcontainer div:not(:hover) button{ + opacity: 0; } .objcontainer div button:hover{ @@ -187,6 +221,16 @@ footer p{ font-weight: bold; } +.objcontainer div:last-child { + border-radius: 0 0 10px 10px; +} + +.objcontainer div:first-child { + border-radius: 10px 10px 0 0; +} + +/*----------------------------------------------------------------------------------------*/ + .querybox { display: flex; justify-content: center; @@ -200,20 +244,26 @@ footer p{ width: 40%; position: absolute; bottom: 0; + box-shadow: 0 0 10px; } .infopanel { width: 90%; height: 90%; - background-color: rgb(255, 255, 255, 0.8); + background-color: rgb(255, 255, 255, 0.5); border-radius: 10px; } +/*----------------------------------------------------------------------------------------*/ + .buttonpanel { width: 90%; height: 70%; - background-color: rgb(255, 255, 255, 0.8); + background-color: rgb(255, 255, 255, 0.5); border-radius: 10px; + display: flex; + align-items: center; + padding: 20px; } .buttonbox { @@ -227,24 +277,73 @@ footer p{ border-radius: 20px; height: 20%; width: 40%; + box-shadow: 0 0 10px; } +.buttonpanel p { + font-size: 30px; + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + font-weight: bold; +} + +.buttonpanel div { + position: absolute; + width: 50px; + height: 50px; + right: 50px; + display: flex; + align-items: center; + justify-content: center; +} + +#addentry { + width: 40px; + height: 40px; + border-radius: 10px; + background-color: rgba(0, 146, 15, 0.7); + border: none; + box-shadow: 0 0 5px; + background-image: url(../assets/plus.svg); + background-size: 90% auto; + background-position: center; + transition: width 0.1s ease, height 0.1s ease; +} + +#addentry:hover { + background-color: rgba(0, 223, 22, 0.7); + width: 45px; + height: 45px; +} + +#addentry:not(:hover) { + background-color: rgba(0, 146, 15, 0.7); + width: 40px; + height: 40px; +} + +/*----------------------------------------------------------------------------------------*/ + ::-webkit-scrollbar { width: 10px; + border-radius: 5px; } ::-webkit-scrollbar-track { - background: #f1f1f1; + /* background: hsla(0, 0%, 73%, 0.7); */ + background: transparent; } ::-webkit-scrollbar-thumb { - background: hsl(0, 0%, 53%); + background: hsl(0, 0%, 20%); + border-radius: 5px; } ::-webkit-scrollbar-thumb:hover { - background: hsl(0, 0%, 33%); + background: hsl(0, 0%, 17%); } +/*----------------------------------------------------------------------------------------*/ + #logout{ width: 40px; height: 40px; @@ -268,13 +367,70 @@ footer p{ opacity: 0.7; } -.innerwrapper { - height: 90%; - width: 90%; - padding: 10px; - position: relative; +/*----------------------------------------------------------------------------------------*/ + +#entrycontainer { + position: absolute; + width: 100%; + height: 100%; + background-color: hsl(0, 0%, 100%, 10%); + justify-content: center; + align-items: center; + backdrop-filter: blur(20px); } +.hidden { + display: none; +} + +.addentrydiv { + position: relative; + width: 50%; + height: 60%; + background-color: rgb(255, 255, 255, 0.8); + border-radius: 20px; +} +.addentrydiv div{ + display: flex; + position: absolute; + top: 20px; + right: 20px; + justify-content: center; + align-items: center; + width: 35px; + height: 35px; +} + +#backbtn { + width: 30px; + height: 30px; + background-color: rgb(255, 0, 0, 0.8); + background-image: url(../assets/x.svg); + background-size: 50%; + background-position: center; + background-repeat: no-repeat; + border: none; + box-shadow: 0 0 5px; + border-radius: 20px; + transition: width 0.1s ease, height 0.1s ease; +} + +#backbtn:hover { + width: 35px; + height: 35px; + background-color: rgba(226, 0, 0, 0.8); +} + +#backbtn:not(:hover) { + width: 30px; + height: 30px; + background-color: rgb(255, 0, 0, 0.8); +} + + +/*----------------------------------------------------------------------------------------*/ + + @media (max-width: 860px) { .container{ position: fixed; @@ -283,3 +439,5 @@ footer p{ } + + From 106888c7f4e0edc7eeddc896100a3f4f325444f4 Mon Sep 17 00:00:00 2001 From: Modo Date: Sat, 21 Oct 2023 19:57:29 +0530 Subject: [PATCH 26/37] Add input boxes for Add entry page --- frontend/html/dashboard.html | 39 +++++- frontend/scripts/dashboard.js | 13 ++ frontend/scripts/index.js | 4 + frontend/styles/dashboard.css | 218 ++++++++++++++++++++++++++++++---- 4 files changed, 250 insertions(+), 24 deletions(-) diff --git a/frontend/html/dashboard.html b/frontend/html/dashboard.html index 136c6d8..da24649 100644 --- a/frontend/html/dashboard.html +++ b/frontend/html/dashboard.html @@ -29,10 +29,16 @@
-

Welcome

+ +
+

Welcome,

+

+
+
+
@@ -41,9 +47,40 @@ diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index 4167476..3b4e7bf 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -2,6 +2,7 @@ //-----------------------------------------------------------------------------------------(Getting Data) let globaldata; + async function getData() { try { let response = await fetch('/get_data', { @@ -149,6 +150,14 @@ function updateInfoGui(call) { console.log(call) } +const greettext = document.querySelector('#greetname') +const masterusername = localStorage.getItem("username"); +console.log(masterusername) + +function greet(){ + greettext.textContent = masterusername; +} + //----------------------------------------------------------------------------------------- async function logOut() { @@ -183,4 +192,8 @@ logoutbtn.addEventListener('click', () => { window.onload = function() { getData(); + greet() + + entrywindow.classList.toggle("hidden"); + entrywindow.style.display = "flex"; }; \ No newline at end of file diff --git a/frontend/scripts/index.js b/frontend/scripts/index.js index 20b4e24..6a73581 100644 --- a/frontend/scripts/index.js +++ b/frontend/scripts/index.js @@ -35,10 +35,13 @@ function validateLogin() { } } + async function getAuth() { let _username = document.getElementById("username").value; let _password = document.getElementById("password").value; +localStorage.setItem("username", _username); + formData = new FormData(); formData.append('user_name', _username); formData.append('password', _password); @@ -74,6 +77,7 @@ console.log(formData) } + const register = document.getElementById("register"); register.addEventListener("click", function(event) { diff --git a/frontend/styles/dashboard.css b/frontend/styles/dashboard.css index 850c80b..b5cf69e 100644 --- a/frontend/styles/dashboard.css +++ b/frontend/styles/dashboard.css @@ -171,7 +171,7 @@ footer p{ .objcontainer div:hover { - background-color: rgb(128, 128, 128, 0.4); + background-color: rgba(255, 255, 255, 0.7); width: 95%; height: 60px; } @@ -204,7 +204,7 @@ footer p{ } .objcontainer div button:hover{ - background-color: rgb(128, 128, 128, 0.7); + background-color: rgba(143, 143, 143, 0.5); } .objcontainer div button:not(:hover){ @@ -256,16 +256,6 @@ footer p{ /*----------------------------------------------------------------------------------------*/ -.buttonpanel { - width: 90%; - height: 70%; - background-color: rgb(255, 255, 255, 0.5); - border-radius: 10px; - display: flex; - align-items: center; - padding: 20px; -} - .buttonbox { display: flex; justify-content: center; @@ -280,13 +270,44 @@ footer p{ box-shadow: 0 0 10px; } -.buttonpanel p { - font-size: 30px; - font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; - font-weight: bold; +.buttonpanel { + width: 90%; + height: 70%; + background-color: rgb(255, 255, 255, 0.5); + border-radius: 10px; + display: flex; + align-items: center; + padding: 20px; } -.buttonpanel div { +.buttonpanel div:first-child { + display: flex; + flex-direction: column; + position: absolute; + width: 50%; + height: 50px; + left: 30px; +} + +.buttonpanel p:first-child { + color: rgb(0, 0, 0); + position: absolute; + bottom: 0px; + left: 10px; + font-size: 25px; + font-family: Impact, fantasy; +} + +.buttonpanel p:last-child { + position: absolute; + color: rgb(0, 0, 0); + top: -1px; + left: 11px; + font-size: 25px; + font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; +} + +.buttonpanel div:last-child { position: absolute; width: 50px; height: 50px; @@ -320,7 +341,6 @@ footer p{ width: 40px; height: 40px; } - /*----------------------------------------------------------------------------------------*/ ::-webkit-scrollbar { @@ -374,9 +394,11 @@ footer p{ width: 100%; height: 100%; background-color: hsl(0, 0%, 100%, 10%); + display: flex; justify-content: center; align-items: center; backdrop-filter: blur(20px); + overflow: hidden; } .hidden { @@ -385,12 +407,17 @@ footer p{ .addentrydiv { position: relative; - width: 50%; - height: 60%; - background-color: rgb(255, 255, 255, 0.8); - border-radius: 20px; + width: 700px; + height: 400px; + background-color: rgb(255, 255, 255, 0.6); + backdrop-filter: blur(5px); + border-radius: 40px; + display: flex; + justify-content: center; + align-items: center; } -.addentrydiv div{ + +.addentrydiv > div:first-child{ display: flex; position: absolute; top: 20px; @@ -428,6 +455,141 @@ footer p{ } +/*----------------------------------------------------------------------------------------*/ + +.fieldcontainer { + width: 80%; + height: 70%; + background-color: white; + display: flex; + position: relative; + overflow: hidden; + border-radius: 20px; + box-shadow: 0 0 5px; +} + +.fieldcontainer form > div:first-child { + position: absolute; + width: 50%; + height: 100%; + background-color: rgba(55, 16, 229, 0.8); + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + row-gap: 20px; +} + +.fieldcontainer input { + padding-left: 10px; + font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + box-shadow: 0 0 10px; +} + +.fieldcontainer input:focus { + outline: none; +} + +.fieldcontainer input::placeholder{ + color: rgb(82, 82, 82); + font-weight: bold; +} + +.fieldcontainer form > div:first-child input{ + margin-top: 20px; + width: 80%; + height: 30px; + border-radius: 10px; + background-color: rgb(255, 255, 255, 0.8); + border: none; + transition: width 0.1s ease, height 0.1s ease; +} + +.fieldcontainer form > div:first-child input:hover, .fieldcontainer form > div:first-child input:focus { + width: 83%; + height: 35px; +} + +.fieldcontainer form > div:first-child input:not(:hover):not(:focus) { + width: 80%; + height: 30px; +} + +.fieldcontainer form > div:first-child button{ + width: 60px; + height: 30px; + border-radius: 10px; + background-color: rgb(255, 255, 255, 0.8); + border: none; + margin-top: 30px; +} + +/*----------------------------------------------------------------------------------------*/ + + +.fieldcontainer form > div:last-child { + position: absolute; + right: 0; + width: 50%; + height: 100%; + background-color: rgb(34, 0, 255, 0.2); + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + row-gap: 20px; +} + +.fieldcontainer form > div:last-child div { + display: flex; + flex-direction: row; + align-items: center; + width: 100%; +} + +.fieldcontainer form > div:last-child div input[type="text"]{ + width: 80%; + height: 30px; + border-radius: 10px; + background-color: rgb(255, 255, 255, 0.8); + border: none; + transition: width 0.1s ease, height 0.1s ease; +} + +.fieldcontainer form > div:last-child div input[type="text"]:enabled:hover, .fieldcontainer form > div:last-child div input[type="text"]:enabled:focus{ + width: 83%; + height: 35px; +} + +.fieldcontainer form > div:last-child div input[type="text"]:not(:hover):not(:focus){ + width: 80%; + height: 30px; +} + +.fieldcontainer form > div:last-child div input[type="checkbox"]{ + margin-right: 10px; + margin-left: 10px; + width: 15px; + height: 15px; + border: none; + transition: width 0.1s ease, height 0.1s ease; +} + +.fieldcontainer form > div:last-child div input[type="checkbox"]:hover { + width: 20px; + height: 20px; +} + +.fieldcontainer form > div:last-child div input[type="checkbox"]:checked { + width: 20px; + height: 20px; +} + +.fieldcontainer form > div:last-child div input[type="checkbox"]:not(:hover):not(:checked) { + width: 15px; + height: 15px; +} + /*----------------------------------------------------------------------------------------*/ @@ -436,7 +598,17 @@ footer p{ position: fixed; width: 774px; } +} +@media (max-width: 860px) { + .entrycontainer{ + position: fixed; + width: 860px; + } + .addentrydiv{ + position: fixed; + width: 700px; + } } From 69bfc652aaf12e7accb4cda69b912ed19dc32d4f Mon Sep 17 00:00:00 2001 From: Modo Date: Sat, 21 Oct 2023 22:22:49 +0530 Subject: [PATCH 27/37] Add Form Logic --- frontend/html/dashboard.html | 21 ++++++++-------- frontend/scripts/dashboard.js | 47 +++++++++++++++++++++++++++++------ frontend/styles/dashboard.css | 2 +- 3 files changed, 50 insertions(+), 20 deletions(-) diff --git a/frontend/html/dashboard.html b/frontend/html/dashboard.html index da24649..2e6c7c5 100644 --- a/frontend/html/dashboard.html +++ b/frontend/html/dashboard.html @@ -44,7 +44,6 @@ - +
+
+
+ +
+
+ +
+
+ +
+ diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index f37891d..796d53a 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -44,7 +44,7 @@ const contentbox = document.querySelector('.objcontainer') function updateListGui(field) { let content = contentbox.innerHTML.concat( ` -
+

${field["fieldname"]}

@@ -58,6 +58,12 @@ function updateListGui(field) { let btns = document.querySelectorAll('.entryview') let editbtns = document.querySelectorAll('.editbutton') + let divs = document.querySelectorAll('.fielddiv') + divs.forEach(div => { + div.addEventListener('click', () => { + updateInfoGui(div.id); + }); + }); btns.forEach(btn => { btn.addEventListener('click', () => { updateInfoGui(btn.id); @@ -150,6 +156,8 @@ addentry.addEventListener('click', function() { const exitentrywin = document.getElementById('backbtn') exitentrywin.addEventListener('click', function() { + const binbutton = document.getElementById('deletedata') + binbutton.style.display = "none" entrywindow.style.display = "none" localStorage.removeItem("editVal") }) @@ -160,9 +168,17 @@ function addFieldLogic() { const forminputs = document.querySelectorAll('.inputfieldpanel div input[type="text"]') const formcheckbox = document.querySelectorAll('.inputfieldpanel div input[type="checkbox"]') formcheckbox.forEach((checkbox, index) => { - forminputs[index].disabled = true - forminputs[index].value = '' - checkbox.checked = false; + if(forminputs[index].id=="u_input" || forminputs[index].id=="p_input"){ + forminputs[index].disabled = false + forminputs[index].value = '' + checkbox.checked = true; + } + else { + forminputs[index].disabled = true + forminputs[index].value = '' + checkbox.checked = false; + } + }) formcheckbox.forEach((checkbox, index) => checkbox.addEventListener('change', function(){ @@ -195,9 +211,7 @@ function formatData(userdata) { }) formData.append("entry_name", sitename) formData.append("fields", JSON.stringify(objData)) - // jsondata[sitename] = jsonuserdata - // sendData(JSON.stringify(jsondata)) - console.log(sitename) + // console.log(sitename) sendData(formData) } @@ -280,8 +294,10 @@ function showEditPage(field) { entrywindow.style.display = "flex"; const otherbutton = document.getElementById('submitdatabtn') const editbutton = document.getElementById('submiteditdatabtn') + const binbutton = document.getElementById('deletedata') otherbutton.style.display = "none"; editbutton.style.display = "block"; + binbutton.style.display = "block" const inputbox = document.getElementById("sitenamefield") const urlfield = document.getElementById("urlfield") inputbox.value = '' @@ -377,9 +393,118 @@ function validateEditUrl(){ } } +//----------------------------------------------------------------------------------------- Delete Entry Button + +async function deleteEntry() { + const formData = new FormData() + formData.append("entry_name", localStorage.getItem("editVal")) + try { + const response = await fetch('/delete_entry', { + method: "POST", + body: formData + }); + if(response.ok){ + console.log(`Deleted ${localStorage.getItem("editVal")}`) + entrywindow.style.display = "none" + localStorage.removeItem("editVal") + getData() + const infobox = document.querySelector('.infobox') + const infopanel = document.querySelector('.infopanel') + const popupdivparent = document.querySelector('.popupdivparent') + const popupdiv = document.querySelector('.popupdivchild') + infobox.style.display = 'flex' + infopanel.style.display = 'none' + popupdivparent.style.display = "none" + popupdiv.innerHTML = '' + } + if(!response.ok){ + isError = true + const errorMessage = await response.text(); + errorlabel.textContent = errorMessage + setTimeout(()=>{ + errorlabel.textContent = '' + },3000) + throw new Error(errorMessage); + } + } catch(error){ + console.error(error) + } +} + +//----------------------------------------------------------------------------------------- Delete Entry Popup + +function deleteEntryConfirm() { + const popupdivparent = document.querySelector('.popupdivparent') + const popupdiv = document.querySelector('.popupdivchild') + popupdivparent.style.display = "flex" + popupdiv.innerHTML = "
\n
" +} + +//----------------------------------------------------------------------------------------- Change Pass Entry Popup + +function changePassConfirm() { + const popupdivparent = document.querySelector('.popupdivparent') + const popupdiv = document.querySelector('.popupdivchild') + popupdivparent.style.display = "flex" + popupdiv.innerHTML = "
" +} + +function changePass() { + const password = document.getElementById('c2i1').value + const confirmpassword = document.getElementById('c2i2').value + const errlabel = document.getElementById('passerrlabel') + if(password != confirmpassword){ + errlabel.textContent = "Password Must Match!" + setTimeout(()=>{ + errlabel.textContent = '' + },3000) + } + else if(password==""|| confirmpassword==""){ + errlabel.textContent = "Password Can't Be Blank!" + setTimeout(()=>{ + errlabel.textContent = '' + },3000) + } + else if(password == confirmpassword){ + sendPass(password) + } +} + +async function sendPass(password) { + const errlabel = document.getElementById('passerrlabel') + const formData = new FormData() + formData.append("password", password) + try { + const response = await fetch('/change_password', { + method: "POST", + body: formData + }); + if(response.ok){ + console.log(`Password Changed!`) + } + if(!response.ok){ + isError = true + const errorMessage = await response.text(); + errlabel.textContent = errorMessage + setTimeout(()=>{ + errlabel.textContent = '' + },3000) + throw new Error(errorMessage); + } + } catch(error){ + console.error(error) + } +} + //----------------------------------------------------------------------------------------- Edit Data Submission Logic function editData() { + const backbtn = document.getElementById('backbtn') + const submitbtn = document.getElementById('submiteditdatabtn') + const binbutton = document.getElementById('deletedata') + binbutton.disabled = true + backbtn.disabled = true + submitbtn.disabled = true const form = document.getElementById('formdata') const formeditdata = new FormData(form) editDataHandler(formeditdata) @@ -407,7 +532,7 @@ async function editDataHandler(editdata) { } } - console.log(objData) + // console.log(objData) isError = false for(let field in objData){ @@ -440,6 +565,12 @@ async function editDataHandler(editdata) { entrywindow.style.display = "none" localStorage.removeItem("editVal") }, 1000); + const backbtn = document.getElementById('backbtn') + const submitbtn = document.getElementById('submiteditdatabtn') + const binbutton = document.getElementById('deletedata') + binbutton.disabled = false + backbtn.disabled = false + submitbtn.disabled = false } } @@ -537,7 +668,7 @@ async function changeEntryName(entryname, sitename) { //----------------------------------------------------------------------------------------- Confirmation Box function confirmation() { - console.log('Confirmed') + // console.log('Confirmed') const confirm = document.querySelector('.confirmdivparent') const tick = document.querySelector('.confirmdiv img') const confirmbox = document.querySelector('.confirmdiv') @@ -626,7 +757,7 @@ function updateInfoGui(field) { const greettext = document.querySelector('#greetname') const masterusername = localStorage.getItem("username"); -console.log(masterusername) +console.log(`Logged in as: ${masterusername}`) function greet(){ greettext.textContent = masterusername; @@ -640,6 +771,14 @@ function removeBox() { infobox.style.display = 'none' infopanel.style.display = 'flex' } +//----------------------------------------------------------------------------------------- Close Popup Box Logic + +function closePopup() { + const popupdivparent = document.querySelector('.popupdivparent') + const popupdiv = document.querySelector('.popupdivchild') + popupdivparent.style.display = "none" + popupdiv.innerHTML = "" +} //----------------------------------------------------------------------------------------- Logout @@ -661,7 +800,7 @@ async function logOut() { const logoutbtn = document.querySelector("#logout") logoutbtn.addEventListener('click', () => { - console.log("logging out") + console.log("Logging out") localStorage.clear() logOut() }) diff --git a/frontend/styles/dashboard.css b/frontend/styles/dashboard.css index c03cb56..8495f8b 100644 --- a/frontend/styles/dashboard.css +++ b/frontend/styles/dashboard.css @@ -333,6 +333,9 @@ footer p{ font-weight: bolder; font-size: 13px; text-align: left; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; } .infopanel > div:first-child{ @@ -534,7 +537,7 @@ footer p{ } } -.buttonbox > div:first-child label:last-child { +.buttonbox > div:first-child a { display: block; color: rgb(0, 0, 0); font-size: 10px; @@ -771,6 +774,212 @@ footer p{ /*----------------------------------------------------------------------------------------*/ +.popupdivparent{ + position: absolute; + width: 100%; + height: 100%; + background-color: hsl(0, 0%, 100%, 10%); + display: none; + justify-content: center; + align-items: center; + backdrop-filter: blur(20px); + box-sizing: border-box; +} + +.popupdiv { + position: relative; + width: 500px; + height: 300px; + background-color: rgb(255, 255, 255, 0.8); + backdrop-filter: blur(5px); + border-radius: 40px; + display: flex; + justify-content: center; + align-items: center; + transition: opacity 0.3s ease; + opacity: 1; + flex-direction: row; + overflow: hidden; + flex-shrink: 0; +} + +#closepopup { + width: 30px; + height: 30px; + background-color: rgb(255, 0, 0, 0.8); + background-image: url(../assets/x.svg); + background-size: 50%; + background-position: center; + background-repeat: no-repeat; + border: none; + box-shadow: 0 0 5px; + border-radius: 20px; + transition: width 0.1s ease, height 0.1s ease; +} + +#closepopup:hover { + width: 35px; + height: 35px; + background-color: rgba(226, 0, 0, 0.5); +} + +.popupdiv > div:first-of-type { + position: absolute; + top: 25px; + right: 25px; + display: flex; + justify-content: center; + align-items: center; + width: 35px; + height: 35px; +} + +.popupdivchild { + display: flex; + justify-content: center; + align-items: center; + width: 70%; + height: 70%; + background-color: rgba(55, 16, 229, 0.8); + backdrop-filter: blur(10px); + flex-direction: column; + border-radius: 30px; + box-shadow: 0 0 10px; +} + +/*----------------------------------------------------------------------------------------*/ + +.c1f label { + font-size: 25px; + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + font-weight: bold; + text-align: center; + display: block; +} + +.c1f { + height: 50px; + width: 80%; + display: flex; + justify-content: center; + align-items: center; + overflow: hidden; + background-color: rgb(255, 255, 255, 0.7); + border-radius: 10px; + padding: 10px; + box-shadow: 0 0 10px; +} + +.c1l { + display: flex; + justify-content: center; + align-items: center; + flex-direction: row; + gap: 20px; + margin: 20px; + width: 90%; +} + +.c1l button:first-of-type{ + width: 40%; + height: 30px; + flex-shrink: 0; + border-radius: 10px; + background-color: rgba(0, 255, 81, 0.8); + border: none; + margin-top: 5px; + transition: height 0.1s ease, width 0.1s ease; + box-shadow: black 0 0 10px; + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + font-weight: bold; + color: white; +} + +.c1l button:first-of-type:hover{ + color: black; + background-color: rgb(255, 255, 255, 0.9); + width: 42%; + height: 35px; +} + +.c1l button:last-of-type{ + width: 40%; + height: 30px; + flex-shrink: 0; + border-radius: 10px; + background-color: rgba(255, 0, 0, 0.8); + border: none; + margin-top: 5px; + transition: height 0.1s ease, width 0.1s ease; + box-shadow: black 0 0 10px; + font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; + font-weight: bold; + color: white; +} + +.c1l button:last-of-type:hover{ + color: black; + background-color: rgb(255, 255, 255, 0.9); + width: 42%; + height: 35px; +} +/*----------------------------------------------------------------------------------------*/ + +.c2 { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + flex-direction: column; + gap: 10px; +} + +.c2 input{ + width: 80%; + height: 30px; + border-radius: 10px; + background-color: rgb(255, 255, 255, 0.8); + border: none; + padding-left: 10px; + font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + box-shadow: 0 0 10px; + transition: transform 0.3s ease; +} + +.c2 button{ + width: 60px; + height: 30px; + border-radius: 10px; + background-color: rgb(255, 255, 255, 0.8); + font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + border: none; + margin-top: 5px; + transition: transform 0.3s ease; + box-shadow: 0 0 10px; +} + +.c2 input:hover, .c2 input:focus { + transform: scale(1.05); +} + +.c2 button:hover { + transform: scale(1.1); + background-color: rgb(255, 255, 255, 0.9); +} + +.c2 label { + text-align: center; + color: rgb(208, 189, 255); + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + font-style: bold; + font-weight: bold; + width: 100%; +} + +/*----------------------------------------------------------------------------------------*/ + .fieldcontainer { width: 80%; height: 70%; @@ -850,6 +1059,27 @@ footer p{ height: 35px; } +.fieldcontainer form > div:first-child button:nth-of-type(2){ + position: absolute; + width: 25px; + height: 25px; + top: 15px; + right: 15px; + background-image: url(../assets/bin2.svg); + background-size: cover; + background-color: transparent; + border: none; + transition: transform 0.3s ease; + transition: filter 0.2s ease; + display: none; +} + +.fieldcontainer form > div:first-child button:nth-of-type(2):hover{ + /* background-image: url(../assets/binred.svg); */ + filter: brightness(10%); + transform: scale(1.1); +} + .fieldcontainer form > div:first-child button:last-child{ display: none; width: 60px; @@ -964,6 +1194,10 @@ footer p{ position: fixed; width: 700px; } + .popupdivparent{ + position: fixed; + width: 860px; + } } @media (max-width: 1080px) { From 7afbabaa7b01894967ce357d36df927cf5779060 Mon Sep 17 00:00:00 2001 From: Modo Date: Tue, 24 Oct 2023 01:51:30 +0530 Subject: [PATCH 34/37] Finish Frontend -Added Register Logic -Added Change Password Logic This is the Alpha Version of the PasswordManager, there shouldn't be any bugs as far as I know. Report any that are found..Plz Don't Good Night! --- devfolder/app.js | 37 ----------------- frontend/html/dashboard.html | 15 +++---- frontend/html/index.html | 3 -- frontend/html/register.html | 6 ++- frontend/scripts/dashboard.js | 9 +++- frontend/scripts/index.js | 16 +------ frontend/scripts/register.js | 78 +++++++++++++++++++++++++++++++++++ frontend/styles/dashboard.css | 14 ++++++- frontend/styles/index.css | 4 +- frontend/styles/register.css | 24 ++++++++--- 10 files changed, 131 insertions(+), 75 deletions(-) delete mode 100644 devfolder/app.js diff --git a/devfolder/app.js b/devfolder/app.js deleted file mode 100644 index e7c3ef2..0000000 --- a/devfolder/app.js +++ /dev/null @@ -1,37 +0,0 @@ -const express = require('express'); -const bodyParser = require('body-parser'); -const jwt = require('jsonwebtoken'); // Import the jsonwebtoken library - -const app = express(); -const PORT = 5000; -const cors = require('cors'); - -const corsOptions = { - origin: 'http://127.0.0.1:5500', // Replace with your frontend's origin - methods: 'GET,HEAD,PUT,PATCH,POST,DELETE', - credentials: true, - optionsSuccessStatus: 204, - }; - -app.use(cors(corsOptions)); - -app.use(bodyParser.json()); - -const secretKey = 'your-secret-key'; - -app.post('/api/auth', (req, res) => { - const { user_name, password } = req.body; - // Check the username and password (for demonstration purposes, accept any non-empty values) - if (user_name==="Yash" && password==="123") { - // Authentication successful, create a JWT token - const token = jwt.sign({ user_name }, secretKey, { expiresIn: '1h' }); // Token expires in 1 hour - res.json({ token }); - } else { - // Authentication failed - res.status(401).json({ error: 'Invalid username or password' }); - } -}); - -app.listen(PORT, () => { - console.log(`Server is running on port ${PORT}`); -}); \ No newline at end of file diff --git a/frontend/html/dashboard.html b/frontend/html/dashboard.html index 8612754..a3c5173 100644 --- a/frontend/html/dashboard.html +++ b/frontend/html/dashboard.html @@ -143,22 +143,19 @@
-
-
- -
-
-
-
- -
+
+
+
+
+ +
diff --git a/frontend/html/index.html b/frontend/html/index.html index 77ff60f..2214cae 100644 --- a/frontend/html/index.html +++ b/frontend/html/index.html @@ -24,9 +24,6 @@
- diff --git a/frontend/html/register.html b/frontend/html/register.html index c5f368d..f743d65 100644 --- a/frontend/html/register.html +++ b/frontend/html/register.html @@ -24,8 +24,12 @@
+
+ +
+
- +
diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index 796d53a..b1c6e76 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -144,6 +144,8 @@ addentry.addEventListener('click', function() { entrywindow.style.display = "flex"; const otherbutton = document.getElementById('submitdatabtn') const editbutton = document.getElementById('submiteditdatabtn') + const binbutton = document.getElementById('deletedata') + binbutton.style.display = "none" otherbutton.style.display = "block"; editbutton.style.display = "none"; const inputbox = document.getElementById("sitenamefield") @@ -297,7 +299,7 @@ function showEditPage(field) { const binbutton = document.getElementById('deletedata') otherbutton.style.display = "none"; editbutton.style.display = "block"; - binbutton.style.display = "block" + binbutton.style.display = "block"; const inputbox = document.getElementById("sitenamefield") const urlfield = document.getElementById("urlfield") inputbox.value = '' @@ -405,13 +407,15 @@ async function deleteEntry() { }); if(response.ok){ console.log(`Deleted ${localStorage.getItem("editVal")}`) - entrywindow.style.display = "none" localStorage.removeItem("editVal") getData() + confirmation() + await delay(1000) const infobox = document.querySelector('.infobox') const infopanel = document.querySelector('.infopanel') const popupdivparent = document.querySelector('.popupdivparent') const popupdiv = document.querySelector('.popupdivchild') + entrywindow.style.display = "none" infobox.style.display = 'flex' infopanel.style.display = 'none' popupdivparent.style.display = "none" @@ -563,6 +567,7 @@ async function editDataHandler(editdata) { confirmation() setTimeout(() => { entrywindow.style.display = "none" + binbutton.style.display = "none" localStorage.removeItem("editVal") }, 1000); const backbtn = document.getElementById('backbtn') diff --git a/frontend/scripts/index.js b/frontend/scripts/index.js index 6a73581..eca2ca1 100644 --- a/frontend/scripts/index.js +++ b/frontend/scripts/index.js @@ -45,7 +45,7 @@ localStorage.setItem("username", _username); formData = new FormData(); formData.append('user_name', _username); formData.append('password', _password); -console.log(formData) +// console.log(formData) try { const response = await fetch('/login', { @@ -108,20 +108,6 @@ window.onload = async function() { }; - - - - - - - - - - - - - - // function handleAuthRes(data) { // if(data.token){ // localStorage.setItem('token', data.token); diff --git a/frontend/scripts/register.js b/frontend/scripts/register.js index e69de29..bd6d844 100644 --- a/frontend/scripts/register.js +++ b/frontend/scripts/register.js @@ -0,0 +1,78 @@ + +const errlabel = document.getElementById('errlabel') + +function validateRegister() { + const username = document.getElementById('username').value + const password = document.getElementById('password').value + const confirmpassword = document.getElementById('conpassword').value + + if(username== "" || password=="" || confirmpassword==""){ + errlabel.textContent = "Can't Leave Blank!" + setTimeout(() => { + errlabel.textContent = "" + }, 3000); + } + else if(password != confirmpassword){ + errlabel.textContent = "Password Must Match!" + setTimeout(() => { + errlabel.textContent = "" + }, 3000); + } + else if(password == confirmpassword && username!=''){ + createUser(username,password) + } +} + +async function createUser(username,password) { + formData = new FormData() + formData.append("user_name",username) + formData.append("password", password) + + try { + const response = await fetch('/add_user', { + method: "POST", + body: formData + }); + if(response.ok) { + console.log("User Created!") + Login(username,password) + } else if(!response.ok) { + const errorMessage = await response.text(); + errlabel.textContentL = errorMessage; + setTimeout(()=> { + errorlabel.textContent = ""; + },3000) + throw new Error(errorMessage); + } + } catch (error) { + console.error('Error:', error.message); + } +} + +async function Login(username,password){ + formData = new FormData(); + formData.append('user_name', username); + formData.append('password', password); + + try { + const response = await fetch('/login', { + method: "post", + body: formData + }); + + if(response.ok) { + localStorage.setItem("username", username); + window.location.href = "../html/dashboard.html"; + } else if(!response.ok) { + const errorMessage = await response.text(); + document.getElementById("errlabel").innerHTML = errorMessage; + setTimeout(()=> { + document.getElementById("errlabel").innerHTML = ""; + },3000) + throw new Error(errorMessage); + } + + } catch (error) { + console.error('Error:', error.message); + } +} \ No newline at end of file diff --git a/frontend/styles/dashboard.css b/frontend/styles/dashboard.css index 8495f8b..5b960aa 100644 --- a/frontend/styles/dashboard.css +++ b/frontend/styles/dashboard.css @@ -855,6 +855,17 @@ footer p{ font-weight: bold; text-align: center; display: block; + color: white; +} + +.c1f:hover { + transform: scale(1.05); + background-color: rgb(255, 255, 255, 0.8); +} + +.c1f:hover label{ + transform: scale(1.05); + color: rgb(0, 0, 0); } .c1f { @@ -864,10 +875,11 @@ footer p{ justify-content: center; align-items: center; overflow: hidden; - background-color: rgb(255, 255, 255, 0.7); + background-color: rgb(255, 255, 255, 0.5); border-radius: 10px; padding: 10px; box-shadow: 0 0 10px; + transition: transform 0.3s ease; } .c1l { diff --git a/frontend/styles/index.css b/frontend/styles/index.css index e16d9c6..6752bbc 100644 --- a/frontend/styles/index.css +++ b/frontend/styles/index.css @@ -114,15 +114,15 @@ body { .help { width: 100%; display: flex; - justify-content: space-between; + justify-content: center; align-items: center; - } .help div{ display: flex; width: 50%; justify-content: center; + align-items: center; } .error label { diff --git a/frontend/styles/register.css b/frontend/styles/register.css index f93aba2..6056731 100644 --- a/frontend/styles/register.css +++ b/frontend/styles/register.css @@ -32,11 +32,13 @@ body { width: 450px; height: 400px; flex-direction: column; - padding: 70px; + padding: 20px; + padding-top: 70px; padding-bottom: 90px; box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.6); row-gap: 8px; border-radius: 50px; + flex-direction: column; } #register { @@ -60,6 +62,7 @@ body { border-left: rgb(255, 255, 255, 0.2) 2px solid; border-radius: 10px; padding-left: 5px; + flex-shrink: 0; } .idiv p { @@ -92,7 +95,10 @@ body { flex-direction: column; row-gap: 10px; justify-content: center; + align-items: center; padding: 7px; + width: 90%; + height: 40%; } .idiv p{ @@ -128,23 +134,32 @@ body { } - .help div{ display: flex; width: 50%; justify-content: center; } +.error { + position: relative; + height: 20px; + width: 90%; + display: flex; + align-items: center; + justify-content: center; +} + .error label { position: absolute; - display: block; + display: inline-block; justify-content: center; - translate: -50% 3px; color: rgba(184, 156, 255, 0.9); font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: bold; font-weight: bold; + text-align: center; + padding: 5px; } a { @@ -184,6 +199,5 @@ footer p{ background-color: transparent; background-image: url('../assets/download.svg'); background-size: cover; - box-shadow: rgb(0, 0, 0) 0px 0px 10px; } \ No newline at end of file From 687e035dffd7ed3198abdfab291a0d72fcde336d Mon Sep 17 00:00:00 2001 From: Modo Date: Tue, 24 Oct 2023 12:51:21 +0530 Subject: [PATCH 35/37] Add success popup to Password Change UI --- frontend/scripts/dashboard.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/scripts/dashboard.js b/frontend/scripts/dashboard.js index b1c6e76..d4e2e34 100644 --- a/frontend/scripts/dashboard.js +++ b/frontend/scripts/dashboard.js @@ -485,6 +485,12 @@ async function sendPass(password) { }); if(response.ok){ console.log(`Password Changed!`) + confirmation() + await delay(1000) + const popupdivparent = document.querySelector('.popupdivparent') + const popupdiv = document.querySelector('.popupdivchild') + popupdivparent.style.display = "none" + popupdiv.innerHTML = '' } if(!response.ok){ isError = true From 57a562d64c8d6441aa8dafb0e7b6105cda652bf9 Mon Sep 17 00:00:00 2001 From: Modo Date: Tue, 24 Oct 2023 22:52:30 +0530 Subject: [PATCH 36/37] Edit package.json dependancies --- package-lock.json | 741 +--------------------------------------------- package.json | 4 +- 2 files changed, 2 insertions(+), 743 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3bfc501..50a1987 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,121 +9,9 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "cors": "^2.8.5", - "express": "^4.18.2", - "jsonwebtoken": "^9.0.2" + "cors": "^2.8.5" } }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" - }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" - }, "node_modules/cors": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", @@ -136,398 +24,6 @@ "node": ">= 0.10" } }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/jsonwebtoken": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", - "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", - "dependencies": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -536,236 +32,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-inspect": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz", - "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -773,11 +39,6 @@ "engines": { "node": ">= 0.8" } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } } diff --git a/package.json b/package.json index 5982b50..cc11d94 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,6 @@ "author": "", "license": "ISC", "dependencies": { - "cors": "^2.8.5", - "express": "^4.18.2", - "jsonwebtoken": "^9.0.2" + "cors": "^2.8.5" } } From 0d9e690db10b6dfbef3d9aa4316e52d1e8cb8f6a Mon Sep 17 00:00:00 2001 From: Modo Date: Wed, 25 Oct 2023 20:59:55 +0530 Subject: [PATCH 37/37] Remove package.json --- package-lock.json | 44 -------------------------------------------- package.json | 15 --------------- 2 files changed, 59 deletions(-) delete mode 100644 package-lock.json delete mode 100644 package.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 50a1987..0000000 --- a/package-lock.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "unnamed-password-manager", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "unnamed-password-manager", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "cors": "^2.8.5" - } - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "engines": { - "node": ">= 0.8" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index cc11d94..0000000 --- a/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "unnamed-password-manager", - "version": "1.0.0", - "description": "Hi", - "main": "index.js", - "scripts": { - "start": "nodemon devfolder/app.js" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "cors": "^2.8.5" - } -}