├── .env.sample ├── .gitignore ├── .prettierignore ├── .prettierrc ├── Readme.md ├── package-lock.json ├── package.json ├── public └── temp │ └── .gitkeep └── src ├── app.js ├── constants.js ├── controllers ├── comment.controller.js ├── dashboard.controller.js ├── healthcheck.controller.js ├── like.controller.js ├── playlist.controller.js ├── subscription.controller.js ├── tweet.controller.js ├── user.controller.js └── video.controller.js ├── db └── index.js ├── index.js ├── middlewares ├── auth.middleware.js └── multer.middleware.js ├── models ├── comment.model.js ├── like.model.js ├── playlist.model.js ├── subscription.model.js ├── tweet.model.js ├── user.model.js └── video.model.js ├── routes ├── comment.routes.js ├── dashboard.routes.js ├── healthcheck.routes.js ├── like.routes.js ├── playlist.routes.js ├── subscription.routes.js ├── tweet.routes.js ├── user.routes.js └── video.routes.js └── utils ├── ApiError.js ├── ApiResponse.js ├── asyncHandler.js └── cloudinary.js /.env.sample: -------------------------------------------------------------------------------- 1 | PORT=8000 2 | MONGODB_URI=mongodb+srv://hitesh:your-password@cluster0.lxl3fsq.mongodb.net 3 | CORS_ORIGIN=* 4 | ACCESS_TOKEN_SECRET=chai-aur-code 5 | ACCESS_TOKEN_EXPIRY=1d 6 | REFRESH_TOKEN_SECRET=chai-aur-backend 7 | REFRESH_TOKEN_EXPIRY=10d 8 | 9 | CLOUDINARY_CLOUD_NAME= 10 | CLOUDINARY_API_KEY= 11 | CLOUDINARY_API_SECRET= -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Microbundle cache 58 | .rpt2_cache/ 59 | .rts2_cache_cjs/ 60 | .rts2_cache_es/ 61 | .rts2_cache_umd/ 62 | 63 | # Optional REPL history 64 | .node_repl_history 65 | 66 | # Output of 'npm pack' 67 | *.tgz 68 | 69 | # Yarn Integrity file 70 | .yarn-integrity 71 | 72 | # dotenv environment variables file 73 | .env 74 | .env.test 75 | .env.production 76 | 77 | # parcel-bundler cache (https://parceljs.org/) 78 | .cache 79 | .parcel-cache 80 | 81 | # Next.js build output 82 | .next 83 | out 84 | 85 | # Nuxt.js build / generate output 86 | .nuxt 87 | dist 88 | 89 | # Gatsby files 90 | .cache/ 91 | # Comment in the public line in if your project uses Gatsby and not Next.js 92 | # https://nextjs.org/blog/next-9-1#public-directory-support 93 | # public 94 | 95 | # vuepress build output 96 | .vuepress/dist 97 | 98 | # Serverless directories 99 | .serverless/ 100 | 101 | # FuseBox cache 102 | .fusebox/ 103 | 104 | # DynamoDB Local files 105 | .dynamodb/ 106 | 107 | # TernJS port file 108 | .tern-port 109 | 110 | # Stores VSCode versions used for testing VSCode extensions 111 | .vscode-test 112 | 113 | # yarn v2 114 | .yarn/cache 115 | .yarn/unplugged 116 | .yarn/build-state.yml 117 | .yarn/install-state.gz 118 | .pnp.* 119 | 120 | # End of https://mrkandreev.name/snippets/gitignore-generator/#Node 121 | .DS_Store 122 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /.vscode 2 | /node_modules 3 | ./dist 4 | 5 | *.env 6 | .env 7 | .env.* -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": false, 3 | "bracketSpacing": true, 4 | "tabWidth": 2, 5 | "trailingComma": "es5", 6 | "semi": true 7 | } -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # chai aur backend series 2 | 3 | This is a video series on backend with javascript 4 | - [Model link](https://app.eraser.io/workspace/YtPqZ1VogxGy1jzIDkzj?origin=share) 5 | 6 | - [Video playlist](https://www.youtube.com/watch?v=EH3vGeqeIAo&list=PLu71SKxNbfoBGh_8p_NS-ZAh6v7HhYqHW) 7 | 8 | --- 9 | # Summary of this project 10 | 11 | This project is a complex backend project that is built with nodejs, expressjs, mongodb, mongoose, jwt, bcrypt, and many more. This project is a complete backend project that has all the features that a backend project should have. 12 | We are building a complete video hosting website similar to youtube with all the features like login, signup, upload video, like, dislike, comment, reply, subscribe, unsubscribe, and many more. 13 | 14 | Project uses all standard practices like JWT, bcrypt, access tokens, refresh Tokens and many more. We have spent a lot of time in building this project and we are sure that you will learn a lot from this project. 15 | 16 | --- 17 | Top Contributer to complete all TODOs 18 | 19 | 1. Spiderman (just sample) [Link to Repo](https://www.youtube.com/@chaiaurcode) 20 | 21 | --- 22 | ## How to contribute in this open source Project 23 | 24 | First, please understand that this is not your regular project to merge your PR. This repo requires you to finish all assignments that are in controller folder. We don't accept half work, please finish all controllers and then reach us out on [Discord](https://hitesh.ai/discord) or [Twitter](https://twitter.com/@hiteshdotcom) and after checking your repo, I will add link to your repo in this readme. -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chai-backend", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "chai-backend", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "bcrypt": "^5.1.1", 13 | "cloudinary": "^1.41.0", 14 | "cookie-parser": "^1.4.6", 15 | "cors": "^2.8.5", 16 | "dotenv": "^16.3.1", 17 | "express": "^4.18.2", 18 | "jsonwebtoken": "^9.0.2", 19 | "mongoose": "^8.0.0", 20 | "mongoose-aggregate-paginate-v2": "^1.0.6", 21 | "multer": "^1.4.5-lts.1" 22 | }, 23 | "devDependencies": { 24 | "nodemon": "^3.0.1", 25 | "prettier": "^3.0.3" 26 | } 27 | }, 28 | "node_modules/@mapbox/node-pre-gyp": { 29 | "version": "1.0.11", 30 | "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", 31 | "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", 32 | "dependencies": { 33 | "detect-libc": "^2.0.0", 34 | "https-proxy-agent": "^5.0.0", 35 | "make-dir": "^3.1.0", 36 | "node-fetch": "^2.6.7", 37 | "nopt": "^5.0.0", 38 | "npmlog": "^5.0.1", 39 | "rimraf": "^3.0.2", 40 | "semver": "^7.3.5", 41 | "tar": "^6.1.11" 42 | }, 43 | "bin": { 44 | "node-pre-gyp": "bin/node-pre-gyp" 45 | } 46 | }, 47 | "node_modules/@mapbox/node-pre-gyp/node_modules/nopt": { 48 | "version": "5.0.0", 49 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", 50 | "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", 51 | "dependencies": { 52 | "abbrev": "1" 53 | }, 54 | "bin": { 55 | "nopt": "bin/nopt.js" 56 | }, 57 | "engines": { 58 | "node": ">=6" 59 | } 60 | }, 61 | "node_modules/@mongodb-js/saslprep": { 62 | "version": "1.1.1", 63 | "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.1.tgz", 64 | "integrity": "sha512-t7c5K033joZZMspnHg/gWPE4kandgc2OxE74aYOtGKfgB9VPuVJPix0H6fhmm2erj5PBJ21mqcx34lpIGtUCsQ==", 65 | "dependencies": { 66 | "sparse-bitfield": "^3.0.3" 67 | } 68 | }, 69 | "node_modules/@types/node": { 70 | "version": "20.8.10", 71 | "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", 72 | "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", 73 | "dependencies": { 74 | "undici-types": "~5.26.4" 75 | } 76 | }, 77 | "node_modules/@types/webidl-conversions": { 78 | "version": "7.0.2", 79 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.2.tgz", 80 | "integrity": "sha512-uNv6b/uGRLlCVmelat2rA8bcVd3k/42mV2EmjhPh6JLkd35T5bgwR/t6xy7a9MWhd9sixIeBUzhBenvk3NO+DQ==" 81 | }, 82 | "node_modules/@types/whatwg-url": { 83 | "version": "8.2.2", 84 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", 85 | "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", 86 | "dependencies": { 87 | "@types/node": "*", 88 | "@types/webidl-conversions": "*" 89 | } 90 | }, 91 | "node_modules/abbrev": { 92 | "version": "1.1.1", 93 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", 94 | "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" 95 | }, 96 | "node_modules/accepts": { 97 | "version": "1.3.8", 98 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 99 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 100 | "dependencies": { 101 | "mime-types": "~2.1.34", 102 | "negotiator": "0.6.3" 103 | }, 104 | "engines": { 105 | "node": ">= 0.6" 106 | } 107 | }, 108 | "node_modules/agent-base": { 109 | "version": "6.0.2", 110 | "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", 111 | "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", 112 | "dependencies": { 113 | "debug": "4" 114 | }, 115 | "engines": { 116 | "node": ">= 6.0.0" 117 | } 118 | }, 119 | "node_modules/agent-base/node_modules/debug": { 120 | "version": "4.3.4", 121 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 122 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 123 | "dependencies": { 124 | "ms": "2.1.2" 125 | }, 126 | "engines": { 127 | "node": ">=6.0" 128 | }, 129 | "peerDependenciesMeta": { 130 | "supports-color": { 131 | "optional": true 132 | } 133 | } 134 | }, 135 | "node_modules/agent-base/node_modules/ms": { 136 | "version": "2.1.2", 137 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 138 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 139 | }, 140 | "node_modules/ansi-regex": { 141 | "version": "5.0.1", 142 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 143 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 144 | "engines": { 145 | "node": ">=8" 146 | } 147 | }, 148 | "node_modules/anymatch": { 149 | "version": "3.1.3", 150 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 151 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 152 | "dev": true, 153 | "dependencies": { 154 | "normalize-path": "^3.0.0", 155 | "picomatch": "^2.0.4" 156 | }, 157 | "engines": { 158 | "node": ">= 8" 159 | } 160 | }, 161 | "node_modules/append-field": { 162 | "version": "1.0.0", 163 | "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", 164 | "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==" 165 | }, 166 | "node_modules/aproba": { 167 | "version": "2.0.0", 168 | "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", 169 | "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" 170 | }, 171 | "node_modules/are-we-there-yet": { 172 | "version": "2.0.0", 173 | "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", 174 | "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", 175 | "dependencies": { 176 | "delegates": "^1.0.0", 177 | "readable-stream": "^3.6.0" 178 | }, 179 | "engines": { 180 | "node": ">=10" 181 | } 182 | }, 183 | "node_modules/array-flatten": { 184 | "version": "1.1.1", 185 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 186 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 187 | }, 188 | "node_modules/balanced-match": { 189 | "version": "1.0.2", 190 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 191 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 192 | }, 193 | "node_modules/bcrypt": { 194 | "version": "5.1.1", 195 | "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.1.1.tgz", 196 | "integrity": "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==", 197 | "hasInstallScript": true, 198 | "dependencies": { 199 | "@mapbox/node-pre-gyp": "^1.0.11", 200 | "node-addon-api": "^5.0.0" 201 | }, 202 | "engines": { 203 | "node": ">= 10.0.0" 204 | } 205 | }, 206 | "node_modules/binary-extensions": { 207 | "version": "2.2.0", 208 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 209 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 210 | "dev": true, 211 | "engines": { 212 | "node": ">=8" 213 | } 214 | }, 215 | "node_modules/body-parser": { 216 | "version": "1.20.1", 217 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 218 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 219 | "dependencies": { 220 | "bytes": "3.1.2", 221 | "content-type": "~1.0.4", 222 | "debug": "2.6.9", 223 | "depd": "2.0.0", 224 | "destroy": "1.2.0", 225 | "http-errors": "2.0.0", 226 | "iconv-lite": "0.4.24", 227 | "on-finished": "2.4.1", 228 | "qs": "6.11.0", 229 | "raw-body": "2.5.1", 230 | "type-is": "~1.6.18", 231 | "unpipe": "1.0.0" 232 | }, 233 | "engines": { 234 | "node": ">= 0.8", 235 | "npm": "1.2.8000 || >= 1.4.16" 236 | } 237 | }, 238 | "node_modules/body-parser/node_modules/debug": { 239 | "version": "2.6.9", 240 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 241 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 242 | "dependencies": { 243 | "ms": "2.0.0" 244 | } 245 | }, 246 | "node_modules/body-parser/node_modules/ms": { 247 | "version": "2.0.0", 248 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 249 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 250 | }, 251 | "node_modules/brace-expansion": { 252 | "version": "1.1.11", 253 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 254 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 255 | "dependencies": { 256 | "balanced-match": "^1.0.0", 257 | "concat-map": "0.0.1" 258 | } 259 | }, 260 | "node_modules/braces": { 261 | "version": "3.0.2", 262 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 263 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 264 | "dev": true, 265 | "dependencies": { 266 | "fill-range": "^7.0.1" 267 | }, 268 | "engines": { 269 | "node": ">=8" 270 | } 271 | }, 272 | "node_modules/bson": { 273 | "version": "6.2.0", 274 | "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz", 275 | "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==", 276 | "engines": { 277 | "node": ">=16.20.1" 278 | } 279 | }, 280 | "node_modules/buffer-equal-constant-time": { 281 | "version": "1.0.1", 282 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 283 | "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" 284 | }, 285 | "node_modules/buffer-from": { 286 | "version": "1.1.2", 287 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", 288 | "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" 289 | }, 290 | "node_modules/busboy": { 291 | "version": "1.6.0", 292 | "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", 293 | "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", 294 | "dependencies": { 295 | "streamsearch": "^1.1.0" 296 | }, 297 | "engines": { 298 | "node": ">=10.16.0" 299 | } 300 | }, 301 | "node_modules/bytes": { 302 | "version": "3.1.2", 303 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 304 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 305 | "engines": { 306 | "node": ">= 0.8" 307 | } 308 | }, 309 | "node_modules/call-bind": { 310 | "version": "1.0.5", 311 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", 312 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", 313 | "dependencies": { 314 | "function-bind": "^1.1.2", 315 | "get-intrinsic": "^1.2.1", 316 | "set-function-length": "^1.1.1" 317 | }, 318 | "funding": { 319 | "url": "https://github.com/sponsors/ljharb" 320 | } 321 | }, 322 | "node_modules/chokidar": { 323 | "version": "3.5.3", 324 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 325 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 326 | "dev": true, 327 | "funding": [ 328 | { 329 | "type": "individual", 330 | "url": "https://paulmillr.com/funding/" 331 | } 332 | ], 333 | "dependencies": { 334 | "anymatch": "~3.1.2", 335 | "braces": "~3.0.2", 336 | "glob-parent": "~5.1.2", 337 | "is-binary-path": "~2.1.0", 338 | "is-glob": "~4.0.1", 339 | "normalize-path": "~3.0.0", 340 | "readdirp": "~3.6.0" 341 | }, 342 | "engines": { 343 | "node": ">= 8.10.0" 344 | }, 345 | "optionalDependencies": { 346 | "fsevents": "~2.3.2" 347 | } 348 | }, 349 | "node_modules/chownr": { 350 | "version": "2.0.0", 351 | "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", 352 | "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", 353 | "engines": { 354 | "node": ">=10" 355 | } 356 | }, 357 | "node_modules/cloudinary": { 358 | "version": "1.41.0", 359 | "resolved": "https://registry.npmjs.org/cloudinary/-/cloudinary-1.41.0.tgz", 360 | "integrity": "sha512-qFf2McjvILJITePf4VF1PrY/8c2zy+/q5FVV6V3VWrP/gpIZsusPqXL4QZ6ZKXibPRukzMYqsQEhaSQgJHKKow==", 361 | "dependencies": { 362 | "cloudinary-core": "^2.13.0", 363 | "core-js": "^3.30.1", 364 | "lodash": "^4.17.21", 365 | "q": "^1.5.1" 366 | }, 367 | "engines": { 368 | "node": ">=0.6" 369 | } 370 | }, 371 | "node_modules/cloudinary-core": { 372 | "version": "2.13.0", 373 | "resolved": "https://registry.npmjs.org/cloudinary-core/-/cloudinary-core-2.13.0.tgz", 374 | "integrity": "sha512-Nt0Q5I2FtenmJghtC4YZ3MZZbGg1wLm84SsxcuVwZ83OyJqG9CNIGp86CiI6iDv3QobaqBUpOT7vg+HqY5HxEA==", 375 | "peerDependencies": { 376 | "lodash": ">=4.0" 377 | } 378 | }, 379 | "node_modules/color-support": { 380 | "version": "1.1.3", 381 | "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", 382 | "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", 383 | "bin": { 384 | "color-support": "bin.js" 385 | } 386 | }, 387 | "node_modules/concat-map": { 388 | "version": "0.0.1", 389 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 390 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 391 | }, 392 | "node_modules/concat-stream": { 393 | "version": "1.6.2", 394 | "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", 395 | "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", 396 | "engines": [ 397 | "node >= 0.8" 398 | ], 399 | "dependencies": { 400 | "buffer-from": "^1.0.0", 401 | "inherits": "^2.0.3", 402 | "readable-stream": "^2.2.2", 403 | "typedarray": "^0.0.6" 404 | } 405 | }, 406 | "node_modules/concat-stream/node_modules/readable-stream": { 407 | "version": "2.3.8", 408 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", 409 | "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", 410 | "dependencies": { 411 | "core-util-is": "~1.0.0", 412 | "inherits": "~2.0.3", 413 | "isarray": "~1.0.0", 414 | "process-nextick-args": "~2.0.0", 415 | "safe-buffer": "~5.1.1", 416 | "string_decoder": "~1.1.1", 417 | "util-deprecate": "~1.0.1" 418 | } 419 | }, 420 | "node_modules/concat-stream/node_modules/safe-buffer": { 421 | "version": "5.1.2", 422 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 423 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 424 | }, 425 | "node_modules/concat-stream/node_modules/string_decoder": { 426 | "version": "1.1.1", 427 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 428 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 429 | "dependencies": { 430 | "safe-buffer": "~5.1.0" 431 | } 432 | }, 433 | "node_modules/console-control-strings": { 434 | "version": "1.1.0", 435 | "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", 436 | "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" 437 | }, 438 | "node_modules/content-disposition": { 439 | "version": "0.5.4", 440 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 441 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 442 | "dependencies": { 443 | "safe-buffer": "5.2.1" 444 | }, 445 | "engines": { 446 | "node": ">= 0.6" 447 | } 448 | }, 449 | "node_modules/content-type": { 450 | "version": "1.0.5", 451 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 452 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 453 | "engines": { 454 | "node": ">= 0.6" 455 | } 456 | }, 457 | "node_modules/cookie": { 458 | "version": "0.5.0", 459 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 460 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 461 | "engines": { 462 | "node": ">= 0.6" 463 | } 464 | }, 465 | "node_modules/cookie-parser": { 466 | "version": "1.4.6", 467 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", 468 | "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", 469 | "dependencies": { 470 | "cookie": "0.4.1", 471 | "cookie-signature": "1.0.6" 472 | }, 473 | "engines": { 474 | "node": ">= 0.8.0" 475 | } 476 | }, 477 | "node_modules/cookie-parser/node_modules/cookie": { 478 | "version": "0.4.1", 479 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", 480 | "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", 481 | "engines": { 482 | "node": ">= 0.6" 483 | } 484 | }, 485 | "node_modules/cookie-signature": { 486 | "version": "1.0.6", 487 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 488 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 489 | }, 490 | "node_modules/core-js": { 491 | "version": "3.33.2", 492 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.2.tgz", 493 | "integrity": "sha512-XeBzWI6QL3nJQiHmdzbAOiMYqjrb7hwU7A39Qhvd/POSa/t9E1AeZyEZx3fNvp/vtM8zXwhoL0FsiS0hD0pruQ==", 494 | "hasInstallScript": true, 495 | "funding": { 496 | "type": "opencollective", 497 | "url": "https://opencollective.com/core-js" 498 | } 499 | }, 500 | "node_modules/core-util-is": { 501 | "version": "1.0.3", 502 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", 503 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" 504 | }, 505 | "node_modules/cors": { 506 | "version": "2.8.5", 507 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 508 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 509 | "dependencies": { 510 | "object-assign": "^4", 511 | "vary": "^1" 512 | }, 513 | "engines": { 514 | "node": ">= 0.10" 515 | } 516 | }, 517 | "node_modules/debug": { 518 | "version": "3.2.7", 519 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", 520 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 521 | "dev": true, 522 | "dependencies": { 523 | "ms": "^2.1.1" 524 | } 525 | }, 526 | "node_modules/define-data-property": { 527 | "version": "1.1.1", 528 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", 529 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", 530 | "dependencies": { 531 | "get-intrinsic": "^1.2.1", 532 | "gopd": "^1.0.1", 533 | "has-property-descriptors": "^1.0.0" 534 | }, 535 | "engines": { 536 | "node": ">= 0.4" 537 | } 538 | }, 539 | "node_modules/delegates": { 540 | "version": "1.0.0", 541 | "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", 542 | "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" 543 | }, 544 | "node_modules/depd": { 545 | "version": "2.0.0", 546 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 547 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 548 | "engines": { 549 | "node": ">= 0.8" 550 | } 551 | }, 552 | "node_modules/destroy": { 553 | "version": "1.2.0", 554 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 555 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 556 | "engines": { 557 | "node": ">= 0.8", 558 | "npm": "1.2.8000 || >= 1.4.16" 559 | } 560 | }, 561 | "node_modules/detect-libc": { 562 | "version": "2.0.2", 563 | "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", 564 | "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", 565 | "engines": { 566 | "node": ">=8" 567 | } 568 | }, 569 | "node_modules/dotenv": { 570 | "version": "16.3.1", 571 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", 572 | "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", 573 | "engines": { 574 | "node": ">=12" 575 | }, 576 | "funding": { 577 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 578 | } 579 | }, 580 | "node_modules/ecdsa-sig-formatter": { 581 | "version": "1.0.11", 582 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 583 | "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 584 | "dependencies": { 585 | "safe-buffer": "^5.0.1" 586 | } 587 | }, 588 | "node_modules/ee-first": { 589 | "version": "1.1.1", 590 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 591 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 592 | }, 593 | "node_modules/emoji-regex": { 594 | "version": "8.0.0", 595 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 596 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" 597 | }, 598 | "node_modules/encodeurl": { 599 | "version": "1.0.2", 600 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 601 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 602 | "engines": { 603 | "node": ">= 0.8" 604 | } 605 | }, 606 | "node_modules/escape-html": { 607 | "version": "1.0.3", 608 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 609 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 610 | }, 611 | "node_modules/etag": { 612 | "version": "1.8.1", 613 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 614 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 615 | "engines": { 616 | "node": ">= 0.6" 617 | } 618 | }, 619 | "node_modules/express": { 620 | "version": "4.18.2", 621 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 622 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 623 | "dependencies": { 624 | "accepts": "~1.3.8", 625 | "array-flatten": "1.1.1", 626 | "body-parser": "1.20.1", 627 | "content-disposition": "0.5.4", 628 | "content-type": "~1.0.4", 629 | "cookie": "0.5.0", 630 | "cookie-signature": "1.0.6", 631 | "debug": "2.6.9", 632 | "depd": "2.0.0", 633 | "encodeurl": "~1.0.2", 634 | "escape-html": "~1.0.3", 635 | "etag": "~1.8.1", 636 | "finalhandler": "1.2.0", 637 | "fresh": "0.5.2", 638 | "http-errors": "2.0.0", 639 | "merge-descriptors": "1.0.1", 640 | "methods": "~1.1.2", 641 | "on-finished": "2.4.1", 642 | "parseurl": "~1.3.3", 643 | "path-to-regexp": "0.1.7", 644 | "proxy-addr": "~2.0.7", 645 | "qs": "6.11.0", 646 | "range-parser": "~1.2.1", 647 | "safe-buffer": "5.2.1", 648 | "send": "0.18.0", 649 | "serve-static": "1.15.0", 650 | "setprototypeof": "1.2.0", 651 | "statuses": "2.0.1", 652 | "type-is": "~1.6.18", 653 | "utils-merge": "1.0.1", 654 | "vary": "~1.1.2" 655 | }, 656 | "engines": { 657 | "node": ">= 0.10.0" 658 | } 659 | }, 660 | "node_modules/express/node_modules/debug": { 661 | "version": "2.6.9", 662 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 663 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 664 | "dependencies": { 665 | "ms": "2.0.0" 666 | } 667 | }, 668 | "node_modules/express/node_modules/ms": { 669 | "version": "2.0.0", 670 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 671 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 672 | }, 673 | "node_modules/fill-range": { 674 | "version": "7.0.1", 675 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 676 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 677 | "dev": true, 678 | "dependencies": { 679 | "to-regex-range": "^5.0.1" 680 | }, 681 | "engines": { 682 | "node": ">=8" 683 | } 684 | }, 685 | "node_modules/finalhandler": { 686 | "version": "1.2.0", 687 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 688 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 689 | "dependencies": { 690 | "debug": "2.6.9", 691 | "encodeurl": "~1.0.2", 692 | "escape-html": "~1.0.3", 693 | "on-finished": "2.4.1", 694 | "parseurl": "~1.3.3", 695 | "statuses": "2.0.1", 696 | "unpipe": "~1.0.0" 697 | }, 698 | "engines": { 699 | "node": ">= 0.8" 700 | } 701 | }, 702 | "node_modules/finalhandler/node_modules/debug": { 703 | "version": "2.6.9", 704 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 705 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 706 | "dependencies": { 707 | "ms": "2.0.0" 708 | } 709 | }, 710 | "node_modules/finalhandler/node_modules/ms": { 711 | "version": "2.0.0", 712 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 713 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 714 | }, 715 | "node_modules/forwarded": { 716 | "version": "0.2.0", 717 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 718 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 719 | "engines": { 720 | "node": ">= 0.6" 721 | } 722 | }, 723 | "node_modules/fresh": { 724 | "version": "0.5.2", 725 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 726 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 727 | "engines": { 728 | "node": ">= 0.6" 729 | } 730 | }, 731 | "node_modules/fs-minipass": { 732 | "version": "2.1.0", 733 | "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", 734 | "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", 735 | "dependencies": { 736 | "minipass": "^3.0.0" 737 | }, 738 | "engines": { 739 | "node": ">= 8" 740 | } 741 | }, 742 | "node_modules/fs-minipass/node_modules/minipass": { 743 | "version": "3.3.6", 744 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", 745 | "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", 746 | "dependencies": { 747 | "yallist": "^4.0.0" 748 | }, 749 | "engines": { 750 | "node": ">=8" 751 | } 752 | }, 753 | "node_modules/fs.realpath": { 754 | "version": "1.0.0", 755 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 756 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" 757 | }, 758 | "node_modules/fsevents": { 759 | "version": "2.3.3", 760 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 761 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 762 | "dev": true, 763 | "hasInstallScript": true, 764 | "optional": true, 765 | "os": [ 766 | "darwin" 767 | ], 768 | "engines": { 769 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 770 | } 771 | }, 772 | "node_modules/function-bind": { 773 | "version": "1.1.2", 774 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 775 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 776 | "funding": { 777 | "url": "https://github.com/sponsors/ljharb" 778 | } 779 | }, 780 | "node_modules/gauge": { 781 | "version": "3.0.2", 782 | "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", 783 | "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", 784 | "dependencies": { 785 | "aproba": "^1.0.3 || ^2.0.0", 786 | "color-support": "^1.1.2", 787 | "console-control-strings": "^1.0.0", 788 | "has-unicode": "^2.0.1", 789 | "object-assign": "^4.1.1", 790 | "signal-exit": "^3.0.0", 791 | "string-width": "^4.2.3", 792 | "strip-ansi": "^6.0.1", 793 | "wide-align": "^1.1.2" 794 | }, 795 | "engines": { 796 | "node": ">=10" 797 | } 798 | }, 799 | "node_modules/get-intrinsic": { 800 | "version": "1.2.2", 801 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", 802 | "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", 803 | "dependencies": { 804 | "function-bind": "^1.1.2", 805 | "has-proto": "^1.0.1", 806 | "has-symbols": "^1.0.3", 807 | "hasown": "^2.0.0" 808 | }, 809 | "funding": { 810 | "url": "https://github.com/sponsors/ljharb" 811 | } 812 | }, 813 | "node_modules/glob": { 814 | "version": "7.2.3", 815 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", 816 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", 817 | "dependencies": { 818 | "fs.realpath": "^1.0.0", 819 | "inflight": "^1.0.4", 820 | "inherits": "2", 821 | "minimatch": "^3.1.1", 822 | "once": "^1.3.0", 823 | "path-is-absolute": "^1.0.0" 824 | }, 825 | "engines": { 826 | "node": "*" 827 | }, 828 | "funding": { 829 | "url": "https://github.com/sponsors/isaacs" 830 | } 831 | }, 832 | "node_modules/glob-parent": { 833 | "version": "5.1.2", 834 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 835 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 836 | "dev": true, 837 | "dependencies": { 838 | "is-glob": "^4.0.1" 839 | }, 840 | "engines": { 841 | "node": ">= 6" 842 | } 843 | }, 844 | "node_modules/gopd": { 845 | "version": "1.0.1", 846 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 847 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 848 | "dependencies": { 849 | "get-intrinsic": "^1.1.3" 850 | }, 851 | "funding": { 852 | "url": "https://github.com/sponsors/ljharb" 853 | } 854 | }, 855 | "node_modules/has-flag": { 856 | "version": "3.0.0", 857 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 858 | "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", 859 | "dev": true, 860 | "engines": { 861 | "node": ">=4" 862 | } 863 | }, 864 | "node_modules/has-property-descriptors": { 865 | "version": "1.0.1", 866 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", 867 | "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", 868 | "dependencies": { 869 | "get-intrinsic": "^1.2.2" 870 | }, 871 | "funding": { 872 | "url": "https://github.com/sponsors/ljharb" 873 | } 874 | }, 875 | "node_modules/has-proto": { 876 | "version": "1.0.1", 877 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 878 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 879 | "engines": { 880 | "node": ">= 0.4" 881 | }, 882 | "funding": { 883 | "url": "https://github.com/sponsors/ljharb" 884 | } 885 | }, 886 | "node_modules/has-symbols": { 887 | "version": "1.0.3", 888 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 889 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 890 | "engines": { 891 | "node": ">= 0.4" 892 | }, 893 | "funding": { 894 | "url": "https://github.com/sponsors/ljharb" 895 | } 896 | }, 897 | "node_modules/has-unicode": { 898 | "version": "2.0.1", 899 | "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", 900 | "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" 901 | }, 902 | "node_modules/hasown": { 903 | "version": "2.0.0", 904 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", 905 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", 906 | "dependencies": { 907 | "function-bind": "^1.1.2" 908 | }, 909 | "engines": { 910 | "node": ">= 0.4" 911 | } 912 | }, 913 | "node_modules/http-errors": { 914 | "version": "2.0.0", 915 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 916 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 917 | "dependencies": { 918 | "depd": "2.0.0", 919 | "inherits": "2.0.4", 920 | "setprototypeof": "1.2.0", 921 | "statuses": "2.0.1", 922 | "toidentifier": "1.0.1" 923 | }, 924 | "engines": { 925 | "node": ">= 0.8" 926 | } 927 | }, 928 | "node_modules/https-proxy-agent": { 929 | "version": "5.0.1", 930 | "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", 931 | "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", 932 | "dependencies": { 933 | "agent-base": "6", 934 | "debug": "4" 935 | }, 936 | "engines": { 937 | "node": ">= 6" 938 | } 939 | }, 940 | "node_modules/https-proxy-agent/node_modules/debug": { 941 | "version": "4.3.4", 942 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 943 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 944 | "dependencies": { 945 | "ms": "2.1.2" 946 | }, 947 | "engines": { 948 | "node": ">=6.0" 949 | }, 950 | "peerDependenciesMeta": { 951 | "supports-color": { 952 | "optional": true 953 | } 954 | } 955 | }, 956 | "node_modules/https-proxy-agent/node_modules/ms": { 957 | "version": "2.1.2", 958 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 959 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 960 | }, 961 | "node_modules/iconv-lite": { 962 | "version": "0.4.24", 963 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 964 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 965 | "dependencies": { 966 | "safer-buffer": ">= 2.1.2 < 3" 967 | }, 968 | "engines": { 969 | "node": ">=0.10.0" 970 | } 971 | }, 972 | "node_modules/ignore-by-default": { 973 | "version": "1.0.1", 974 | "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", 975 | "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", 976 | "dev": true 977 | }, 978 | "node_modules/inflight": { 979 | "version": "1.0.6", 980 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 981 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", 982 | "dependencies": { 983 | "once": "^1.3.0", 984 | "wrappy": "1" 985 | } 986 | }, 987 | "node_modules/inherits": { 988 | "version": "2.0.4", 989 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 990 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 991 | }, 992 | "node_modules/ipaddr.js": { 993 | "version": "1.9.1", 994 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 995 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 996 | "engines": { 997 | "node": ">= 0.10" 998 | } 999 | }, 1000 | "node_modules/is-binary-path": { 1001 | "version": "2.1.0", 1002 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1003 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1004 | "dev": true, 1005 | "dependencies": { 1006 | "binary-extensions": "^2.0.0" 1007 | }, 1008 | "engines": { 1009 | "node": ">=8" 1010 | } 1011 | }, 1012 | "node_modules/is-extglob": { 1013 | "version": "2.1.1", 1014 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1015 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1016 | "dev": true, 1017 | "engines": { 1018 | "node": ">=0.10.0" 1019 | } 1020 | }, 1021 | "node_modules/is-fullwidth-code-point": { 1022 | "version": "3.0.0", 1023 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1024 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1025 | "engines": { 1026 | "node": ">=8" 1027 | } 1028 | }, 1029 | "node_modules/is-glob": { 1030 | "version": "4.0.3", 1031 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1032 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1033 | "dev": true, 1034 | "dependencies": { 1035 | "is-extglob": "^2.1.1" 1036 | }, 1037 | "engines": { 1038 | "node": ">=0.10.0" 1039 | } 1040 | }, 1041 | "node_modules/is-number": { 1042 | "version": "7.0.0", 1043 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1044 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1045 | "dev": true, 1046 | "engines": { 1047 | "node": ">=0.12.0" 1048 | } 1049 | }, 1050 | "node_modules/isarray": { 1051 | "version": "1.0.0", 1052 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 1053 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" 1054 | }, 1055 | "node_modules/jsonwebtoken": { 1056 | "version": "9.0.2", 1057 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", 1058 | "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", 1059 | "dependencies": { 1060 | "jws": "^3.2.2", 1061 | "lodash.includes": "^4.3.0", 1062 | "lodash.isboolean": "^3.0.3", 1063 | "lodash.isinteger": "^4.0.4", 1064 | "lodash.isnumber": "^3.0.3", 1065 | "lodash.isplainobject": "^4.0.6", 1066 | "lodash.isstring": "^4.0.1", 1067 | "lodash.once": "^4.0.0", 1068 | "ms": "^2.1.1", 1069 | "semver": "^7.5.4" 1070 | }, 1071 | "engines": { 1072 | "node": ">=12", 1073 | "npm": ">=6" 1074 | } 1075 | }, 1076 | "node_modules/jwa": { 1077 | "version": "1.4.1", 1078 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 1079 | "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 1080 | "dependencies": { 1081 | "buffer-equal-constant-time": "1.0.1", 1082 | "ecdsa-sig-formatter": "1.0.11", 1083 | "safe-buffer": "^5.0.1" 1084 | } 1085 | }, 1086 | "node_modules/jws": { 1087 | "version": "3.2.2", 1088 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 1089 | "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 1090 | "dependencies": { 1091 | "jwa": "^1.4.1", 1092 | "safe-buffer": "^5.0.1" 1093 | } 1094 | }, 1095 | "node_modules/kareem": { 1096 | "version": "2.5.1", 1097 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", 1098 | "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", 1099 | "engines": { 1100 | "node": ">=12.0.0" 1101 | } 1102 | }, 1103 | "node_modules/lodash": { 1104 | "version": "4.17.21", 1105 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 1106 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" 1107 | }, 1108 | "node_modules/lodash.includes": { 1109 | "version": "4.3.0", 1110 | "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 1111 | "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" 1112 | }, 1113 | "node_modules/lodash.isboolean": { 1114 | "version": "3.0.3", 1115 | "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 1116 | "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" 1117 | }, 1118 | "node_modules/lodash.isinteger": { 1119 | "version": "4.0.4", 1120 | "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 1121 | "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" 1122 | }, 1123 | "node_modules/lodash.isnumber": { 1124 | "version": "3.0.3", 1125 | "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 1126 | "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" 1127 | }, 1128 | "node_modules/lodash.isplainobject": { 1129 | "version": "4.0.6", 1130 | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 1131 | "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" 1132 | }, 1133 | "node_modules/lodash.isstring": { 1134 | "version": "4.0.1", 1135 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 1136 | "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" 1137 | }, 1138 | "node_modules/lodash.once": { 1139 | "version": "4.1.1", 1140 | "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 1141 | "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" 1142 | }, 1143 | "node_modules/lru-cache": { 1144 | "version": "6.0.0", 1145 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 1146 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 1147 | "dependencies": { 1148 | "yallist": "^4.0.0" 1149 | }, 1150 | "engines": { 1151 | "node": ">=10" 1152 | } 1153 | }, 1154 | "node_modules/make-dir": { 1155 | "version": "3.1.0", 1156 | "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", 1157 | "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", 1158 | "dependencies": { 1159 | "semver": "^6.0.0" 1160 | }, 1161 | "engines": { 1162 | "node": ">=8" 1163 | }, 1164 | "funding": { 1165 | "url": "https://github.com/sponsors/sindresorhus" 1166 | } 1167 | }, 1168 | "node_modules/make-dir/node_modules/semver": { 1169 | "version": "6.3.1", 1170 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", 1171 | "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", 1172 | "bin": { 1173 | "semver": "bin/semver.js" 1174 | } 1175 | }, 1176 | "node_modules/media-typer": { 1177 | "version": "0.3.0", 1178 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 1179 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 1180 | "engines": { 1181 | "node": ">= 0.6" 1182 | } 1183 | }, 1184 | "node_modules/memory-pager": { 1185 | "version": "1.5.0", 1186 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 1187 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" 1188 | }, 1189 | "node_modules/merge-descriptors": { 1190 | "version": "1.0.1", 1191 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 1192 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 1193 | }, 1194 | "node_modules/methods": { 1195 | "version": "1.1.2", 1196 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 1197 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 1198 | "engines": { 1199 | "node": ">= 0.6" 1200 | } 1201 | }, 1202 | "node_modules/mime": { 1203 | "version": "1.6.0", 1204 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1205 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 1206 | "bin": { 1207 | "mime": "cli.js" 1208 | }, 1209 | "engines": { 1210 | "node": ">=4" 1211 | } 1212 | }, 1213 | "node_modules/mime-db": { 1214 | "version": "1.52.0", 1215 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 1216 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 1217 | "engines": { 1218 | "node": ">= 0.6" 1219 | } 1220 | }, 1221 | "node_modules/mime-types": { 1222 | "version": "2.1.35", 1223 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 1224 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 1225 | "dependencies": { 1226 | "mime-db": "1.52.0" 1227 | }, 1228 | "engines": { 1229 | "node": ">= 0.6" 1230 | } 1231 | }, 1232 | "node_modules/minimatch": { 1233 | "version": "3.1.2", 1234 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1235 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1236 | "dependencies": { 1237 | "brace-expansion": "^1.1.7" 1238 | }, 1239 | "engines": { 1240 | "node": "*" 1241 | } 1242 | }, 1243 | "node_modules/minimist": { 1244 | "version": "1.2.8", 1245 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", 1246 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", 1247 | "funding": { 1248 | "url": "https://github.com/sponsors/ljharb" 1249 | } 1250 | }, 1251 | "node_modules/minipass": { 1252 | "version": "5.0.0", 1253 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", 1254 | "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", 1255 | "engines": { 1256 | "node": ">=8" 1257 | } 1258 | }, 1259 | "node_modules/minizlib": { 1260 | "version": "2.1.2", 1261 | "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", 1262 | "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", 1263 | "dependencies": { 1264 | "minipass": "^3.0.0", 1265 | "yallist": "^4.0.0" 1266 | }, 1267 | "engines": { 1268 | "node": ">= 8" 1269 | } 1270 | }, 1271 | "node_modules/minizlib/node_modules/minipass": { 1272 | "version": "3.3.6", 1273 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", 1274 | "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", 1275 | "dependencies": { 1276 | "yallist": "^4.0.0" 1277 | }, 1278 | "engines": { 1279 | "node": ">=8" 1280 | } 1281 | }, 1282 | "node_modules/mkdirp": { 1283 | "version": "1.0.4", 1284 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", 1285 | "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", 1286 | "bin": { 1287 | "mkdirp": "bin/cmd.js" 1288 | }, 1289 | "engines": { 1290 | "node": ">=10" 1291 | } 1292 | }, 1293 | "node_modules/mongodb": { 1294 | "version": "6.2.0", 1295 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.2.0.tgz", 1296 | "integrity": "sha512-d7OSuGjGWDZ5usZPqfvb36laQ9CPhnWkAGHT61x5P95p/8nMVeH8asloMwW6GcYFeB0Vj4CB/1wOTDG2RA9BFA==", 1297 | "dependencies": { 1298 | "@mongodb-js/saslprep": "^1.1.0", 1299 | "bson": "^6.2.0", 1300 | "mongodb-connection-string-url": "^2.6.0" 1301 | }, 1302 | "engines": { 1303 | "node": ">=16.20.1" 1304 | }, 1305 | "peerDependencies": { 1306 | "@aws-sdk/credential-providers": "^3.188.0", 1307 | "@mongodb-js/zstd": "^1.1.0", 1308 | "gcp-metadata": "^5.2.0", 1309 | "kerberos": "^2.0.1", 1310 | "mongodb-client-encryption": ">=6.0.0 <7", 1311 | "snappy": "^7.2.2", 1312 | "socks": "^2.7.1" 1313 | }, 1314 | "peerDependenciesMeta": { 1315 | "@aws-sdk/credential-providers": { 1316 | "optional": true 1317 | }, 1318 | "@mongodb-js/zstd": { 1319 | "optional": true 1320 | }, 1321 | "gcp-metadata": { 1322 | "optional": true 1323 | }, 1324 | "kerberos": { 1325 | "optional": true 1326 | }, 1327 | "mongodb-client-encryption": { 1328 | "optional": true 1329 | }, 1330 | "snappy": { 1331 | "optional": true 1332 | }, 1333 | "socks": { 1334 | "optional": true 1335 | } 1336 | } 1337 | }, 1338 | "node_modules/mongodb-connection-string-url": { 1339 | "version": "2.6.0", 1340 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", 1341 | "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", 1342 | "dependencies": { 1343 | "@types/whatwg-url": "^8.2.1", 1344 | "whatwg-url": "^11.0.0" 1345 | } 1346 | }, 1347 | "node_modules/mongoose": { 1348 | "version": "8.0.0", 1349 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.0.0.tgz", 1350 | "integrity": "sha512-PzwkLgm1Jhj0NQdgGfnFsu0QP9V1sBFgbavEgh/IPAUzKAagzvEhuaBuAQOQGjczVWnpIU9tBqyd02cOTgsPlA==", 1351 | "dependencies": { 1352 | "bson": "^6.2.0", 1353 | "kareem": "2.5.1", 1354 | "mongodb": "6.2.0", 1355 | "mpath": "0.9.0", 1356 | "mquery": "5.0.0", 1357 | "ms": "2.1.3", 1358 | "sift": "16.0.1" 1359 | }, 1360 | "engines": { 1361 | "node": ">=16.20.1" 1362 | }, 1363 | "funding": { 1364 | "type": "opencollective", 1365 | "url": "https://opencollective.com/mongoose" 1366 | } 1367 | }, 1368 | "node_modules/mongoose-aggregate-paginate-v2": { 1369 | "version": "1.0.6", 1370 | "resolved": "https://registry.npmjs.org/mongoose-aggregate-paginate-v2/-/mongoose-aggregate-paginate-v2-1.0.6.tgz", 1371 | "integrity": "sha512-UuALu+mjhQa1K9lMQvjLL3vm3iALvNw8PQNIh2gp1b+tO5hUa0NC0Wf6/8QrT9PSJVTihXaD8hQVy3J4e0jO0Q==", 1372 | "engines": { 1373 | "node": ">=4.0.0" 1374 | } 1375 | }, 1376 | "node_modules/mpath": { 1377 | "version": "0.9.0", 1378 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", 1379 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", 1380 | "engines": { 1381 | "node": ">=4.0.0" 1382 | } 1383 | }, 1384 | "node_modules/mquery": { 1385 | "version": "5.0.0", 1386 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", 1387 | "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", 1388 | "dependencies": { 1389 | "debug": "4.x" 1390 | }, 1391 | "engines": { 1392 | "node": ">=14.0.0" 1393 | } 1394 | }, 1395 | "node_modules/mquery/node_modules/debug": { 1396 | "version": "4.3.4", 1397 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 1398 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 1399 | "dependencies": { 1400 | "ms": "2.1.2" 1401 | }, 1402 | "engines": { 1403 | "node": ">=6.0" 1404 | }, 1405 | "peerDependenciesMeta": { 1406 | "supports-color": { 1407 | "optional": true 1408 | } 1409 | } 1410 | }, 1411 | "node_modules/mquery/node_modules/ms": { 1412 | "version": "2.1.2", 1413 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1414 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 1415 | }, 1416 | "node_modules/ms": { 1417 | "version": "2.1.3", 1418 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1419 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 1420 | }, 1421 | "node_modules/multer": { 1422 | "version": "1.4.5-lts.1", 1423 | "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz", 1424 | "integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==", 1425 | "dependencies": { 1426 | "append-field": "^1.0.0", 1427 | "busboy": "^1.0.0", 1428 | "concat-stream": "^1.5.2", 1429 | "mkdirp": "^0.5.4", 1430 | "object-assign": "^4.1.1", 1431 | "type-is": "^1.6.4", 1432 | "xtend": "^4.0.0" 1433 | }, 1434 | "engines": { 1435 | "node": ">= 6.0.0" 1436 | } 1437 | }, 1438 | "node_modules/multer/node_modules/mkdirp": { 1439 | "version": "0.5.6", 1440 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", 1441 | "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", 1442 | "dependencies": { 1443 | "minimist": "^1.2.6" 1444 | }, 1445 | "bin": { 1446 | "mkdirp": "bin/cmd.js" 1447 | } 1448 | }, 1449 | "node_modules/negotiator": { 1450 | "version": "0.6.3", 1451 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 1452 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 1453 | "engines": { 1454 | "node": ">= 0.6" 1455 | } 1456 | }, 1457 | "node_modules/node-addon-api": { 1458 | "version": "5.1.0", 1459 | "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", 1460 | "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" 1461 | }, 1462 | "node_modules/node-fetch": { 1463 | "version": "2.7.0", 1464 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", 1465 | "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", 1466 | "dependencies": { 1467 | "whatwg-url": "^5.0.0" 1468 | }, 1469 | "engines": { 1470 | "node": "4.x || >=6.0.0" 1471 | }, 1472 | "peerDependencies": { 1473 | "encoding": "^0.1.0" 1474 | }, 1475 | "peerDependenciesMeta": { 1476 | "encoding": { 1477 | "optional": true 1478 | } 1479 | } 1480 | }, 1481 | "node_modules/node-fetch/node_modules/tr46": { 1482 | "version": "0.0.3", 1483 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 1484 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" 1485 | }, 1486 | "node_modules/node-fetch/node_modules/webidl-conversions": { 1487 | "version": "3.0.1", 1488 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 1489 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" 1490 | }, 1491 | "node_modules/node-fetch/node_modules/whatwg-url": { 1492 | "version": "5.0.0", 1493 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 1494 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", 1495 | "dependencies": { 1496 | "tr46": "~0.0.3", 1497 | "webidl-conversions": "^3.0.0" 1498 | } 1499 | }, 1500 | "node_modules/nodemon": { 1501 | "version": "3.0.1", 1502 | "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", 1503 | "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", 1504 | "dev": true, 1505 | "dependencies": { 1506 | "chokidar": "^3.5.2", 1507 | "debug": "^3.2.7", 1508 | "ignore-by-default": "^1.0.1", 1509 | "minimatch": "^3.1.2", 1510 | "pstree.remy": "^1.1.8", 1511 | "semver": "^7.5.3", 1512 | "simple-update-notifier": "^2.0.0", 1513 | "supports-color": "^5.5.0", 1514 | "touch": "^3.1.0", 1515 | "undefsafe": "^2.0.5" 1516 | }, 1517 | "bin": { 1518 | "nodemon": "bin/nodemon.js" 1519 | }, 1520 | "engines": { 1521 | "node": ">=10" 1522 | }, 1523 | "funding": { 1524 | "type": "opencollective", 1525 | "url": "https://opencollective.com/nodemon" 1526 | } 1527 | }, 1528 | "node_modules/nopt": { 1529 | "version": "1.0.10", 1530 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", 1531 | "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", 1532 | "dev": true, 1533 | "dependencies": { 1534 | "abbrev": "1" 1535 | }, 1536 | "bin": { 1537 | "nopt": "bin/nopt.js" 1538 | }, 1539 | "engines": { 1540 | "node": "*" 1541 | } 1542 | }, 1543 | "node_modules/normalize-path": { 1544 | "version": "3.0.0", 1545 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1546 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1547 | "dev": true, 1548 | "engines": { 1549 | "node": ">=0.10.0" 1550 | } 1551 | }, 1552 | "node_modules/npmlog": { 1553 | "version": "5.0.1", 1554 | "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", 1555 | "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", 1556 | "dependencies": { 1557 | "are-we-there-yet": "^2.0.0", 1558 | "console-control-strings": "^1.1.0", 1559 | "gauge": "^3.0.0", 1560 | "set-blocking": "^2.0.0" 1561 | } 1562 | }, 1563 | "node_modules/object-assign": { 1564 | "version": "4.1.1", 1565 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 1566 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 1567 | "engines": { 1568 | "node": ">=0.10.0" 1569 | } 1570 | }, 1571 | "node_modules/object-inspect": { 1572 | "version": "1.13.1", 1573 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", 1574 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", 1575 | "funding": { 1576 | "url": "https://github.com/sponsors/ljharb" 1577 | } 1578 | }, 1579 | "node_modules/on-finished": { 1580 | "version": "2.4.1", 1581 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 1582 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 1583 | "dependencies": { 1584 | "ee-first": "1.1.1" 1585 | }, 1586 | "engines": { 1587 | "node": ">= 0.8" 1588 | } 1589 | }, 1590 | "node_modules/once": { 1591 | "version": "1.4.0", 1592 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1593 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", 1594 | "dependencies": { 1595 | "wrappy": "1" 1596 | } 1597 | }, 1598 | "node_modules/parseurl": { 1599 | "version": "1.3.3", 1600 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1601 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 1602 | "engines": { 1603 | "node": ">= 0.8" 1604 | } 1605 | }, 1606 | "node_modules/path-is-absolute": { 1607 | "version": "1.0.1", 1608 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1609 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", 1610 | "engines": { 1611 | "node": ">=0.10.0" 1612 | } 1613 | }, 1614 | "node_modules/path-to-regexp": { 1615 | "version": "0.1.7", 1616 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1617 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 1618 | }, 1619 | "node_modules/picomatch": { 1620 | "version": "2.3.1", 1621 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1622 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1623 | "dev": true, 1624 | "engines": { 1625 | "node": ">=8.6" 1626 | }, 1627 | "funding": { 1628 | "url": "https://github.com/sponsors/jonschlinkert" 1629 | } 1630 | }, 1631 | "node_modules/prettier": { 1632 | "version": "3.0.3", 1633 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", 1634 | "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", 1635 | "dev": true, 1636 | "bin": { 1637 | "prettier": "bin/prettier.cjs" 1638 | }, 1639 | "engines": { 1640 | "node": ">=14" 1641 | }, 1642 | "funding": { 1643 | "url": "https://github.com/prettier/prettier?sponsor=1" 1644 | } 1645 | }, 1646 | "node_modules/process-nextick-args": { 1647 | "version": "2.0.1", 1648 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 1649 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 1650 | }, 1651 | "node_modules/proxy-addr": { 1652 | "version": "2.0.7", 1653 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 1654 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 1655 | "dependencies": { 1656 | "forwarded": "0.2.0", 1657 | "ipaddr.js": "1.9.1" 1658 | }, 1659 | "engines": { 1660 | "node": ">= 0.10" 1661 | } 1662 | }, 1663 | "node_modules/pstree.remy": { 1664 | "version": "1.1.8", 1665 | "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", 1666 | "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", 1667 | "dev": true 1668 | }, 1669 | "node_modules/punycode": { 1670 | "version": "2.3.1", 1671 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 1672 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 1673 | "engines": { 1674 | "node": ">=6" 1675 | } 1676 | }, 1677 | "node_modules/q": { 1678 | "version": "1.5.1", 1679 | "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", 1680 | "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", 1681 | "engines": { 1682 | "node": ">=0.6.0", 1683 | "teleport": ">=0.2.0" 1684 | } 1685 | }, 1686 | "node_modules/qs": { 1687 | "version": "6.11.0", 1688 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 1689 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 1690 | "dependencies": { 1691 | "side-channel": "^1.0.4" 1692 | }, 1693 | "engines": { 1694 | "node": ">=0.6" 1695 | }, 1696 | "funding": { 1697 | "url": "https://github.com/sponsors/ljharb" 1698 | } 1699 | }, 1700 | "node_modules/range-parser": { 1701 | "version": "1.2.1", 1702 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1703 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 1704 | "engines": { 1705 | "node": ">= 0.6" 1706 | } 1707 | }, 1708 | "node_modules/raw-body": { 1709 | "version": "2.5.1", 1710 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 1711 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 1712 | "dependencies": { 1713 | "bytes": "3.1.2", 1714 | "http-errors": "2.0.0", 1715 | "iconv-lite": "0.4.24", 1716 | "unpipe": "1.0.0" 1717 | }, 1718 | "engines": { 1719 | "node": ">= 0.8" 1720 | } 1721 | }, 1722 | "node_modules/readable-stream": { 1723 | "version": "3.6.2", 1724 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", 1725 | "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", 1726 | "dependencies": { 1727 | "inherits": "^2.0.3", 1728 | "string_decoder": "^1.1.1", 1729 | "util-deprecate": "^1.0.1" 1730 | }, 1731 | "engines": { 1732 | "node": ">= 6" 1733 | } 1734 | }, 1735 | "node_modules/readdirp": { 1736 | "version": "3.6.0", 1737 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1738 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1739 | "dev": true, 1740 | "dependencies": { 1741 | "picomatch": "^2.2.1" 1742 | }, 1743 | "engines": { 1744 | "node": ">=8.10.0" 1745 | } 1746 | }, 1747 | "node_modules/rimraf": { 1748 | "version": "3.0.2", 1749 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", 1750 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", 1751 | "dependencies": { 1752 | "glob": "^7.1.3" 1753 | }, 1754 | "bin": { 1755 | "rimraf": "bin.js" 1756 | }, 1757 | "funding": { 1758 | "url": "https://github.com/sponsors/isaacs" 1759 | } 1760 | }, 1761 | "node_modules/safe-buffer": { 1762 | "version": "5.2.1", 1763 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1764 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1765 | "funding": [ 1766 | { 1767 | "type": "github", 1768 | "url": "https://github.com/sponsors/feross" 1769 | }, 1770 | { 1771 | "type": "patreon", 1772 | "url": "https://www.patreon.com/feross" 1773 | }, 1774 | { 1775 | "type": "consulting", 1776 | "url": "https://feross.org/support" 1777 | } 1778 | ] 1779 | }, 1780 | "node_modules/safer-buffer": { 1781 | "version": "2.1.2", 1782 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1783 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1784 | }, 1785 | "node_modules/semver": { 1786 | "version": "7.5.4", 1787 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", 1788 | "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", 1789 | "dependencies": { 1790 | "lru-cache": "^6.0.0" 1791 | }, 1792 | "bin": { 1793 | "semver": "bin/semver.js" 1794 | }, 1795 | "engines": { 1796 | "node": ">=10" 1797 | } 1798 | }, 1799 | "node_modules/send": { 1800 | "version": "0.18.0", 1801 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 1802 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 1803 | "dependencies": { 1804 | "debug": "2.6.9", 1805 | "depd": "2.0.0", 1806 | "destroy": "1.2.0", 1807 | "encodeurl": "~1.0.2", 1808 | "escape-html": "~1.0.3", 1809 | "etag": "~1.8.1", 1810 | "fresh": "0.5.2", 1811 | "http-errors": "2.0.0", 1812 | "mime": "1.6.0", 1813 | "ms": "2.1.3", 1814 | "on-finished": "2.4.1", 1815 | "range-parser": "~1.2.1", 1816 | "statuses": "2.0.1" 1817 | }, 1818 | "engines": { 1819 | "node": ">= 0.8.0" 1820 | } 1821 | }, 1822 | "node_modules/send/node_modules/debug": { 1823 | "version": "2.6.9", 1824 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 1825 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 1826 | "dependencies": { 1827 | "ms": "2.0.0" 1828 | } 1829 | }, 1830 | "node_modules/send/node_modules/debug/node_modules/ms": { 1831 | "version": "2.0.0", 1832 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1833 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 1834 | }, 1835 | "node_modules/serve-static": { 1836 | "version": "1.15.0", 1837 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 1838 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 1839 | "dependencies": { 1840 | "encodeurl": "~1.0.2", 1841 | "escape-html": "~1.0.3", 1842 | "parseurl": "~1.3.3", 1843 | "send": "0.18.0" 1844 | }, 1845 | "engines": { 1846 | "node": ">= 0.8.0" 1847 | } 1848 | }, 1849 | "node_modules/set-blocking": { 1850 | "version": "2.0.0", 1851 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 1852 | "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" 1853 | }, 1854 | "node_modules/set-function-length": { 1855 | "version": "1.1.1", 1856 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", 1857 | "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", 1858 | "dependencies": { 1859 | "define-data-property": "^1.1.1", 1860 | "get-intrinsic": "^1.2.1", 1861 | "gopd": "^1.0.1", 1862 | "has-property-descriptors": "^1.0.0" 1863 | }, 1864 | "engines": { 1865 | "node": ">= 0.4" 1866 | } 1867 | }, 1868 | "node_modules/setprototypeof": { 1869 | "version": "1.2.0", 1870 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1871 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 1872 | }, 1873 | "node_modules/side-channel": { 1874 | "version": "1.0.4", 1875 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1876 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1877 | "dependencies": { 1878 | "call-bind": "^1.0.0", 1879 | "get-intrinsic": "^1.0.2", 1880 | "object-inspect": "^1.9.0" 1881 | }, 1882 | "funding": { 1883 | "url": "https://github.com/sponsors/ljharb" 1884 | } 1885 | }, 1886 | "node_modules/sift": { 1887 | "version": "16.0.1", 1888 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", 1889 | "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" 1890 | }, 1891 | "node_modules/signal-exit": { 1892 | "version": "3.0.7", 1893 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", 1894 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" 1895 | }, 1896 | "node_modules/simple-update-notifier": { 1897 | "version": "2.0.0", 1898 | "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", 1899 | "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", 1900 | "dev": true, 1901 | "dependencies": { 1902 | "semver": "^7.5.3" 1903 | }, 1904 | "engines": { 1905 | "node": ">=10" 1906 | } 1907 | }, 1908 | "node_modules/sparse-bitfield": { 1909 | "version": "3.0.3", 1910 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 1911 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 1912 | "dependencies": { 1913 | "memory-pager": "^1.0.2" 1914 | } 1915 | }, 1916 | "node_modules/statuses": { 1917 | "version": "2.0.1", 1918 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1919 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1920 | "engines": { 1921 | "node": ">= 0.8" 1922 | } 1923 | }, 1924 | "node_modules/streamsearch": { 1925 | "version": "1.1.0", 1926 | "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", 1927 | "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", 1928 | "engines": { 1929 | "node": ">=10.0.0" 1930 | } 1931 | }, 1932 | "node_modules/string_decoder": { 1933 | "version": "1.3.0", 1934 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 1935 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 1936 | "dependencies": { 1937 | "safe-buffer": "~5.2.0" 1938 | } 1939 | }, 1940 | "node_modules/string-width": { 1941 | "version": "4.2.3", 1942 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1943 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1944 | "dependencies": { 1945 | "emoji-regex": "^8.0.0", 1946 | "is-fullwidth-code-point": "^3.0.0", 1947 | "strip-ansi": "^6.0.1" 1948 | }, 1949 | "engines": { 1950 | "node": ">=8" 1951 | } 1952 | }, 1953 | "node_modules/strip-ansi": { 1954 | "version": "6.0.1", 1955 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1956 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1957 | "dependencies": { 1958 | "ansi-regex": "^5.0.1" 1959 | }, 1960 | "engines": { 1961 | "node": ">=8" 1962 | } 1963 | }, 1964 | "node_modules/supports-color": { 1965 | "version": "5.5.0", 1966 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1967 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1968 | "dev": true, 1969 | "dependencies": { 1970 | "has-flag": "^3.0.0" 1971 | }, 1972 | "engines": { 1973 | "node": ">=4" 1974 | } 1975 | }, 1976 | "node_modules/tar": { 1977 | "version": "6.2.0", 1978 | "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", 1979 | "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", 1980 | "dependencies": { 1981 | "chownr": "^2.0.0", 1982 | "fs-minipass": "^2.0.0", 1983 | "minipass": "^5.0.0", 1984 | "minizlib": "^2.1.1", 1985 | "mkdirp": "^1.0.3", 1986 | "yallist": "^4.0.0" 1987 | }, 1988 | "engines": { 1989 | "node": ">=10" 1990 | } 1991 | }, 1992 | "node_modules/to-regex-range": { 1993 | "version": "5.0.1", 1994 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1995 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1996 | "dev": true, 1997 | "dependencies": { 1998 | "is-number": "^7.0.0" 1999 | }, 2000 | "engines": { 2001 | "node": ">=8.0" 2002 | } 2003 | }, 2004 | "node_modules/toidentifier": { 2005 | "version": "1.0.1", 2006 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 2007 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 2008 | "engines": { 2009 | "node": ">=0.6" 2010 | } 2011 | }, 2012 | "node_modules/touch": { 2013 | "version": "3.1.0", 2014 | "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", 2015 | "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", 2016 | "dev": true, 2017 | "dependencies": { 2018 | "nopt": "~1.0.10" 2019 | }, 2020 | "bin": { 2021 | "nodetouch": "bin/nodetouch.js" 2022 | } 2023 | }, 2024 | "node_modules/tr46": { 2025 | "version": "3.0.0", 2026 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", 2027 | "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", 2028 | "dependencies": { 2029 | "punycode": "^2.1.1" 2030 | }, 2031 | "engines": { 2032 | "node": ">=12" 2033 | } 2034 | }, 2035 | "node_modules/type-is": { 2036 | "version": "1.6.18", 2037 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 2038 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 2039 | "dependencies": { 2040 | "media-typer": "0.3.0", 2041 | "mime-types": "~2.1.24" 2042 | }, 2043 | "engines": { 2044 | "node": ">= 0.6" 2045 | } 2046 | }, 2047 | "node_modules/typedarray": { 2048 | "version": "0.0.6", 2049 | "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", 2050 | "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" 2051 | }, 2052 | "node_modules/undefsafe": { 2053 | "version": "2.0.5", 2054 | "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", 2055 | "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", 2056 | "dev": true 2057 | }, 2058 | "node_modules/undici-types": { 2059 | "version": "5.26.5", 2060 | "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", 2061 | "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" 2062 | }, 2063 | "node_modules/unpipe": { 2064 | "version": "1.0.0", 2065 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 2066 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 2067 | "engines": { 2068 | "node": ">= 0.8" 2069 | } 2070 | }, 2071 | "node_modules/util-deprecate": { 2072 | "version": "1.0.2", 2073 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 2074 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" 2075 | }, 2076 | "node_modules/utils-merge": { 2077 | "version": "1.0.1", 2078 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 2079 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 2080 | "engines": { 2081 | "node": ">= 0.4.0" 2082 | } 2083 | }, 2084 | "node_modules/vary": { 2085 | "version": "1.1.2", 2086 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 2087 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 2088 | "engines": { 2089 | "node": ">= 0.8" 2090 | } 2091 | }, 2092 | "node_modules/webidl-conversions": { 2093 | "version": "7.0.0", 2094 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 2095 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", 2096 | "engines": { 2097 | "node": ">=12" 2098 | } 2099 | }, 2100 | "node_modules/whatwg-url": { 2101 | "version": "11.0.0", 2102 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", 2103 | "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", 2104 | "dependencies": { 2105 | "tr46": "^3.0.0", 2106 | "webidl-conversions": "^7.0.0" 2107 | }, 2108 | "engines": { 2109 | "node": ">=12" 2110 | } 2111 | }, 2112 | "node_modules/wide-align": { 2113 | "version": "1.1.5", 2114 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", 2115 | "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", 2116 | "dependencies": { 2117 | "string-width": "^1.0.2 || 2 || 3 || 4" 2118 | } 2119 | }, 2120 | "node_modules/wrappy": { 2121 | "version": "1.0.2", 2122 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2123 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" 2124 | }, 2125 | "node_modules/xtend": { 2126 | "version": "4.0.2", 2127 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", 2128 | "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", 2129 | "engines": { 2130 | "node": ">=0.4" 2131 | } 2132 | }, 2133 | "node_modules/yallist": { 2134 | "version": "4.0.0", 2135 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 2136 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 2137 | } 2138 | } 2139 | } 2140 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chai-backend", 3 | "version": "1.0.0", 4 | "description": "a backend at chai aur code channel - youtube", 5 | "type": "module", 6 | "main": "index.js", 7 | "scripts": { 8 | "dev": "nodemon -r dotenv/config --experimental-json-modules src/index.js" 9 | }, 10 | "keywords": [ 11 | "javascript", 12 | "backend", 13 | "chai" 14 | ], 15 | "author": "Hitesh Choudhary", 16 | "license": "ISC", 17 | "devDependencies": { 18 | "nodemon": "^3.0.1", 19 | "prettier": "^3.0.3" 20 | }, 21 | "dependencies": { 22 | "bcrypt": "^5.1.1", 23 | "cloudinary": "^1.41.0", 24 | "cookie-parser": "^1.4.6", 25 | "cors": "^2.8.5", 26 | "dotenv": "^16.3.1", 27 | "express": "^4.18.2", 28 | "jsonwebtoken": "^9.0.2", 29 | "mongoose": "^8.0.0", 30 | "mongoose-aggregate-paginate-v2": "^1.0.6", 31 | "multer": "^1.4.5-lts.1" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /public/temp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hiteshchoudhary/chai-backend/d1d9390211552898f6f004118e0491648416eed5/public/temp/.gitkeep -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | import express from "express" 2 | import cors from "cors" 3 | import cookieParser from "cookie-parser" 4 | 5 | const app = express() 6 | 7 | app.use(cors({ 8 | origin: process.env.CORS_ORIGIN, 9 | credentials: true 10 | })) 11 | 12 | app.use(express.json({limit: "16kb"})) 13 | app.use(express.urlencoded({extended: true, limit: "16kb"})) 14 | app.use(express.static("public")) 15 | app.use(cookieParser()) 16 | 17 | 18 | //routes import 19 | import userRouter from './routes/user.routes.js' 20 | import healthcheckRouter from "./routes/healthcheck.routes.js" 21 | import tweetRouter from "./routes/tweet.routes.js" 22 | import subscriptionRouter from "./routes/subscription.routes.js" 23 | import videoRouter from "./routes/video.routes.js" 24 | import commentRouter from "./routes/comment.routes.js" 25 | import likeRouter from "./routes/like.routes.js" 26 | import playlistRouter from "./routes/playlist.routes.js" 27 | import dashboardRouter from "./routes/dashboard.routes.js" 28 | 29 | //routes declaration 30 | app.use("/api/v1/healthcheck", healthcheckRouter) 31 | app.use("/api/v1/users", userRouter) 32 | app.use("/api/v1/tweets", tweetRouter) 33 | app.use("/api/v1/subscriptions", subscriptionRouter) 34 | app.use("/api/v1/videos", videoRouter) 35 | app.use("/api/v1/comments", commentRouter) 36 | app.use("/api/v1/likes", likeRouter) 37 | app.use("/api/v1/playlist", playlistRouter) 38 | app.use("/api/v1/dashboard", dashboardRouter) 39 | 40 | // http://localhost:8000/api/v1/users/register 41 | 42 | export { app } -------------------------------------------------------------------------------- /src/constants.js: -------------------------------------------------------------------------------- 1 | export const DB_NAME = "videotube" -------------------------------------------------------------------------------- /src/controllers/comment.controller.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose" 2 | import {Comment} from "../models/comment.model.js" 3 | import {ApiError} from "../utils/ApiError.js" 4 | import {ApiResponse} from "../utils/ApiResponse.js" 5 | import {asyncHandler} from "../utils/asyncHandler.js" 6 | 7 | const getVideoComments = asyncHandler(async (req, res) => { 8 | //TODO: get all comments for a video 9 | const {videoId} = req.params 10 | const {page = 1, limit = 10} = req.query 11 | 12 | }) 13 | 14 | const addComment = asyncHandler(async (req, res) => { 15 | // TODO: add a comment to a video 16 | }) 17 | 18 | const updateComment = asyncHandler(async (req, res) => { 19 | // TODO: update a comment 20 | }) 21 | 22 | const deleteComment = asyncHandler(async (req, res) => { 23 | // TODO: delete a comment 24 | }) 25 | 26 | export { 27 | getVideoComments, 28 | addComment, 29 | updateComment, 30 | deleteComment 31 | } 32 | -------------------------------------------------------------------------------- /src/controllers/dashboard.controller.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose" 2 | import {Video} from "../models/video.model.js" 3 | import {Subscription} from "../models/subscription.model.js" 4 | import {Like} from "../models/like.model.js" 5 | import {ApiError} from "../utils/ApiError.js" 6 | import {ApiResponse} from "../utils/ApiResponse.js" 7 | import {asyncHandler} from "../utils/asyncHandler.js" 8 | 9 | const getChannelStats = asyncHandler(async (req, res) => { 10 | // TODO: Get the channel stats like total video views, total subscribers, total videos, total likes etc. 11 | }) 12 | 13 | const getChannelVideos = asyncHandler(async (req, res) => { 14 | // TODO: Get all the videos uploaded by the channel 15 | }) 16 | 17 | export { 18 | getChannelStats, 19 | getChannelVideos 20 | } -------------------------------------------------------------------------------- /src/controllers/healthcheck.controller.js: -------------------------------------------------------------------------------- 1 | import {ApiError} from "../utils/ApiError.js" 2 | import {ApiResponse} from "../utils/ApiResponse.js" 3 | import {asyncHandler} from "../utils/asyncHandler.js" 4 | 5 | 6 | const healthcheck = asyncHandler(async (req, res) => { 7 | //TODO: build a healthcheck response that simply returns the OK status as json with a message 8 | }) 9 | 10 | export { 11 | healthcheck 12 | } 13 | -------------------------------------------------------------------------------- /src/controllers/like.controller.js: -------------------------------------------------------------------------------- 1 | import mongoose, {isValidObjectId} from "mongoose" 2 | import {Like} from "../models/like.model.js" 3 | import {ApiError} from "../utils/ApiError.js" 4 | import {ApiResponse} from "../utils/ApiResponse.js" 5 | import {asyncHandler} from "../utils/asyncHandler.js" 6 | 7 | const toggleVideoLike = asyncHandler(async (req, res) => { 8 | const {videoId} = req.params 9 | //TODO: toggle like on video 10 | }) 11 | 12 | const toggleCommentLike = asyncHandler(async (req, res) => { 13 | const {commentId} = req.params 14 | //TODO: toggle like on comment 15 | 16 | }) 17 | 18 | const toggleTweetLike = asyncHandler(async (req, res) => { 19 | const {tweetId} = req.params 20 | //TODO: toggle like on tweet 21 | } 22 | ) 23 | 24 | const getLikedVideos = asyncHandler(async (req, res) => { 25 | //TODO: get all liked videos 26 | }) 27 | 28 | export { 29 | toggleCommentLike, 30 | toggleTweetLike, 31 | toggleVideoLike, 32 | getLikedVideos 33 | } -------------------------------------------------------------------------------- /src/controllers/playlist.controller.js: -------------------------------------------------------------------------------- 1 | import mongoose, {isValidObjectId} from "mongoose" 2 | import {Playlist} from "../models/playlist.model.js" 3 | import {ApiError} from "../utils/ApiError.js" 4 | import {ApiResponse} from "../utils/ApiResponse.js" 5 | import {asyncHandler} from "../utils/asyncHandler.js" 6 | 7 | 8 | const createPlaylist = asyncHandler(async (req, res) => { 9 | const {name, description} = req.body 10 | 11 | //TODO: create playlist 12 | }) 13 | 14 | const getUserPlaylists = asyncHandler(async (req, res) => { 15 | const {userId} = req.params 16 | //TODO: get user playlists 17 | }) 18 | 19 | const getPlaylistById = asyncHandler(async (req, res) => { 20 | const {playlistId} = req.params 21 | //TODO: get playlist by id 22 | }) 23 | 24 | const addVideoToPlaylist = asyncHandler(async (req, res) => { 25 | const {playlistId, videoId} = req.params 26 | }) 27 | 28 | const removeVideoFromPlaylist = asyncHandler(async (req, res) => { 29 | const {playlistId, videoId} = req.params 30 | // TODO: remove video from playlist 31 | 32 | }) 33 | 34 | const deletePlaylist = asyncHandler(async (req, res) => { 35 | const {playlistId} = req.params 36 | // TODO: delete playlist 37 | }) 38 | 39 | const updatePlaylist = asyncHandler(async (req, res) => { 40 | const {playlistId} = req.params 41 | const {name, description} = req.body 42 | //TODO: update playlist 43 | }) 44 | 45 | export { 46 | createPlaylist, 47 | getUserPlaylists, 48 | getPlaylistById, 49 | addVideoToPlaylist, 50 | removeVideoFromPlaylist, 51 | deletePlaylist, 52 | updatePlaylist 53 | } 54 | -------------------------------------------------------------------------------- /src/controllers/subscription.controller.js: -------------------------------------------------------------------------------- 1 | import mongoose, {isValidObjectId} from "mongoose" 2 | import {User} from "../models/user.model.js" 3 | import { Subscription } from "../models/subscription.model.js" 4 | import {ApiError} from "../utils/ApiError.js" 5 | import {ApiResponse} from "../utils/ApiResponse.js" 6 | import {asyncHandler} from "../utils/asyncHandler.js" 7 | 8 | 9 | const toggleSubscription = asyncHandler(async (req, res) => { 10 | const {channelId} = req.params 11 | // TODO: toggle subscription 12 | }) 13 | 14 | // controller to return subscriber list of a channel 15 | const getUserChannelSubscribers = asyncHandler(async (req, res) => { 16 | const {channelId} = req.params 17 | }) 18 | 19 | // controller to return channel list to which user has subscribed 20 | const getSubscribedChannels = asyncHandler(async (req, res) => { 21 | const { subscriberId } = req.params 22 | }) 23 | 24 | export { 25 | toggleSubscription, 26 | getUserChannelSubscribers, 27 | getSubscribedChannels 28 | } -------------------------------------------------------------------------------- /src/controllers/tweet.controller.js: -------------------------------------------------------------------------------- 1 | import mongoose, { isValidObjectId } from "mongoose" 2 | import {Tweet} from "../models/tweet.model.js" 3 | import {User} from "../models/user.model.js" 4 | import {ApiError} from "../utils/ApiError.js" 5 | import {ApiResponse} from "../utils/ApiResponse.js" 6 | import {asyncHandler} from "../utils/asyncHandler.js" 7 | 8 | const createTweet = asyncHandler(async (req, res) => { 9 | //TODO: create tweet 10 | }) 11 | 12 | const getUserTweets = asyncHandler(async (req, res) => { 13 | // TODO: get user tweets 14 | }) 15 | 16 | const updateTweet = asyncHandler(async (req, res) => { 17 | //TODO: update tweet 18 | }) 19 | 20 | const deleteTweet = asyncHandler(async (req, res) => { 21 | //TODO: delete tweet 22 | }) 23 | 24 | export { 25 | createTweet, 26 | getUserTweets, 27 | updateTweet, 28 | deleteTweet 29 | } 30 | -------------------------------------------------------------------------------- /src/controllers/user.controller.js: -------------------------------------------------------------------------------- 1 | import { asyncHandler } from "../utils/asyncHandler.js"; 2 | import {ApiError} from "../utils/ApiError.js" 3 | import { User} from "../models/user.model.js" 4 | import {uploadOnCloudinary} from "../utils/cloudinary.js" 5 | import { ApiResponse } from "../utils/ApiResponse.js"; 6 | import jwt from "jsonwebtoken" 7 | import mongoose from "mongoose"; 8 | 9 | 10 | const generateAccessAndRefereshTokens = async(userId) =>{ 11 | try { 12 | const user = await User.findById(userId) 13 | const accessToken = user.generateAccessToken() 14 | const refreshToken = user.generateRefreshToken() 15 | 16 | user.refreshToken = refreshToken 17 | await user.save({ validateBeforeSave: false }) 18 | 19 | return {accessToken, refreshToken} 20 | 21 | 22 | } catch (error) { 23 | throw new ApiError(500, "Something went wrong while generating referesh and access token") 24 | } 25 | } 26 | 27 | const registerUser = asyncHandler( async (req, res) => { 28 | // get user details from frontend 29 | // validation - not empty 30 | // check if user already exists: username, email 31 | // check for images, check for avatar 32 | // upload them to cloudinary, avatar 33 | // create user object - create entry in db 34 | // remove password and refresh token field from response 35 | // check for user creation 36 | // return res 37 | 38 | 39 | const {fullName, email, username, password } = req.body 40 | //console.log("email: ", email); 41 | 42 | if ( 43 | [fullName, email, username, password].some((field) => field?.trim() === "") 44 | ) { 45 | throw new ApiError(400, "All fields are required") 46 | } 47 | 48 | const existedUser = await User.findOne({ 49 | $or: [{ username }, { email }] 50 | }) 51 | 52 | if (existedUser) { 53 | throw new ApiError(409, "User with email or username already exists") 54 | } 55 | //console.log(req.files); 56 | 57 | const avatarLocalPath = req.files?.avatar[0]?.path; 58 | //const coverImageLocalPath = req.files?.coverImage[0]?.path; 59 | 60 | let coverImageLocalPath; 61 | if (req.files && Array.isArray(req.files.coverImage) && req.files.coverImage.length > 0) { 62 | coverImageLocalPath = req.files.coverImage[0].path 63 | } 64 | 65 | 66 | if (!avatarLocalPath) { 67 | throw new ApiError(400, "Avatar file is required") 68 | } 69 | 70 | const avatar = await uploadOnCloudinary(avatarLocalPath) 71 | const coverImage = await uploadOnCloudinary(coverImageLocalPath) 72 | 73 | if (!avatar) { 74 | throw new ApiError(400, "Avatar file is required") 75 | } 76 | 77 | 78 | const user = await User.create({ 79 | fullName, 80 | avatar: avatar.url, 81 | coverImage: coverImage?.url || "", 82 | email, 83 | password, 84 | username: username.toLowerCase() 85 | }) 86 | 87 | const createdUser = await User.findById(user._id).select( 88 | "-password -refreshToken" 89 | ) 90 | 91 | if (!createdUser) { 92 | throw new ApiError(500, "Something went wrong while registering the user") 93 | } 94 | 95 | return res.status(201).json( 96 | new ApiResponse(200, createdUser, "User registered Successfully") 97 | ) 98 | 99 | } ) 100 | 101 | const loginUser = asyncHandler(async (req, res) =>{ 102 | // req body -> data 103 | // username or email 104 | //find the user 105 | //password check 106 | //access and referesh token 107 | //send cookie 108 | 109 | const {email, username, password} = req.body 110 | console.log(email); 111 | 112 | if (!username && !email) { 113 | throw new ApiError(400, "username or email is required") 114 | } 115 | 116 | // Here is an alternative of above code based on logic discussed in video: 117 | // if (!(username || email)) { 118 | // throw new ApiError(400, "username or email is required") 119 | 120 | // } 121 | 122 | const user = await User.findOne({ 123 | $or: [{username}, {email}] 124 | }) 125 | 126 | if (!user) { 127 | throw new ApiError(404, "User does not exist") 128 | } 129 | 130 | const isPasswordValid = await user.isPasswordCorrect(password) 131 | 132 | if (!isPasswordValid) { 133 | throw new ApiError(401, "Invalid user credentials") 134 | } 135 | 136 | const {accessToken, refreshToken} = await generateAccessAndRefereshTokens(user._id) 137 | 138 | const loggedInUser = await User.findById(user._id).select("-password -refreshToken") 139 | 140 | const options = { 141 | httpOnly: true, 142 | secure: true 143 | } 144 | 145 | return res 146 | .status(200) 147 | .cookie("accessToken", accessToken, options) 148 | .cookie("refreshToken", refreshToken, options) 149 | .json( 150 | new ApiResponse( 151 | 200, 152 | { 153 | user: loggedInUser, accessToken, refreshToken 154 | }, 155 | "User logged In Successfully" 156 | ) 157 | ) 158 | 159 | }) 160 | 161 | const logoutUser = asyncHandler(async(req, res) => { 162 | await User.findByIdAndUpdate( 163 | req.user._id, 164 | { 165 | $unset: { 166 | refreshToken: 1 // this removes the field from document 167 | } 168 | }, 169 | { 170 | new: true 171 | } 172 | ) 173 | 174 | const options = { 175 | httpOnly: true, 176 | secure: true 177 | } 178 | 179 | return res 180 | .status(200) 181 | .clearCookie("accessToken", options) 182 | .clearCookie("refreshToken", options) 183 | .json(new ApiResponse(200, {}, "User logged Out")) 184 | }) 185 | 186 | const refreshAccessToken = asyncHandler(async (req, res) => { 187 | const incomingRefreshToken = req.cookies.refreshToken || req.body.refreshToken 188 | 189 | if (!incomingRefreshToken) { 190 | throw new ApiError(401, "unauthorized request") 191 | } 192 | 193 | try { 194 | const decodedToken = jwt.verify( 195 | incomingRefreshToken, 196 | process.env.REFRESH_TOKEN_SECRET 197 | ) 198 | 199 | const user = await User.findById(decodedToken?._id) 200 | 201 | if (!user) { 202 | throw new ApiError(401, "Invalid refresh token") 203 | } 204 | 205 | if (incomingRefreshToken !== user?.refreshToken) { 206 | throw new ApiError(401, "Refresh token is expired or used") 207 | 208 | } 209 | 210 | const options = { 211 | httpOnly: true, 212 | secure: true 213 | } 214 | 215 | const {accessToken, newRefreshToken} = await generateAccessAndRefereshTokens(user._id) 216 | 217 | return res 218 | .status(200) 219 | .cookie("accessToken", accessToken, options) 220 | .cookie("refreshToken", newRefreshToken, options) 221 | .json( 222 | new ApiResponse( 223 | 200, 224 | {accessToken, refreshToken: newRefreshToken}, 225 | "Access token refreshed" 226 | ) 227 | ) 228 | } catch (error) { 229 | throw new ApiError(401, error?.message || "Invalid refresh token") 230 | } 231 | 232 | }) 233 | 234 | const changeCurrentPassword = asyncHandler(async(req, res) => { 235 | const {oldPassword, newPassword} = req.body 236 | 237 | 238 | 239 | const user = await User.findById(req.user?._id) 240 | const isPasswordCorrect = await user.isPasswordCorrect(oldPassword) 241 | 242 | if (!isPasswordCorrect) { 243 | throw new ApiError(400, "Invalid old password") 244 | } 245 | 246 | user.password = newPassword 247 | await user.save({validateBeforeSave: false}) 248 | 249 | return res 250 | .status(200) 251 | .json(new ApiResponse(200, {}, "Password changed successfully")) 252 | }) 253 | 254 | 255 | const getCurrentUser = asyncHandler(async(req, res) => { 256 | return res 257 | .status(200) 258 | .json(new ApiResponse( 259 | 200, 260 | req.user, 261 | "User fetched successfully" 262 | )) 263 | }) 264 | 265 | const updateAccountDetails = asyncHandler(async(req, res) => { 266 | const {fullName, email} = req.body 267 | 268 | if (!fullName || !email) { 269 | throw new ApiError(400, "All fields are required") 270 | } 271 | 272 | const user = await User.findByIdAndUpdate( 273 | req.user?._id, 274 | { 275 | $set: { 276 | fullName, 277 | email: email 278 | } 279 | }, 280 | {new: true} 281 | 282 | ).select("-password") 283 | 284 | return res 285 | .status(200) 286 | .json(new ApiResponse(200, user, "Account details updated successfully")) 287 | }); 288 | 289 | const updateUserAvatar = asyncHandler(async(req, res) => { 290 | const avatarLocalPath = req.file?.path 291 | 292 | if (!avatarLocalPath) { 293 | throw new ApiError(400, "Avatar file is missing") 294 | } 295 | 296 | //TODO: delete old image - assignment 297 | 298 | const avatar = await uploadOnCloudinary(avatarLocalPath) 299 | 300 | if (!avatar.url) { 301 | throw new ApiError(400, "Error while uploading on avatar") 302 | 303 | } 304 | 305 | const user = await User.findByIdAndUpdate( 306 | req.user?._id, 307 | { 308 | $set:{ 309 | avatar: avatar.url 310 | } 311 | }, 312 | {new: true} 313 | ).select("-password") 314 | 315 | return res 316 | .status(200) 317 | .json( 318 | new ApiResponse(200, user, "Avatar image updated successfully") 319 | ) 320 | }) 321 | 322 | const updateUserCoverImage = asyncHandler(async(req, res) => { 323 | const coverImageLocalPath = req.file?.path 324 | 325 | if (!coverImageLocalPath) { 326 | throw new ApiError(400, "Cover image file is missing") 327 | } 328 | 329 | //TODO: delete old image - assignment 330 | 331 | 332 | const coverImage = await uploadOnCloudinary(coverImageLocalPath) 333 | 334 | if (!coverImage.url) { 335 | throw new ApiError(400, "Error while uploading on avatar") 336 | 337 | } 338 | 339 | const user = await User.findByIdAndUpdate( 340 | req.user?._id, 341 | { 342 | $set:{ 343 | coverImage: coverImage.url 344 | } 345 | }, 346 | {new: true} 347 | ).select("-password") 348 | 349 | return res 350 | .status(200) 351 | .json( 352 | new ApiResponse(200, user, "Cover image updated successfully") 353 | ) 354 | }) 355 | 356 | 357 | const getUserChannelProfile = asyncHandler(async(req, res) => { 358 | const {username} = req.params 359 | 360 | if (!username?.trim()) { 361 | throw new ApiError(400, "username is missing") 362 | } 363 | 364 | const channel = await User.aggregate([ 365 | { 366 | $match: { 367 | username: username?.toLowerCase() 368 | } 369 | }, 370 | { 371 | $lookup: { 372 | from: "subscriptions", 373 | localField: "_id", 374 | foreignField: "channel", 375 | as: "subscribers" 376 | } 377 | }, 378 | { 379 | $lookup: { 380 | from: "subscriptions", 381 | localField: "_id", 382 | foreignField: "subscriber", 383 | as: "subscribedTo" 384 | } 385 | }, 386 | { 387 | $addFields: { 388 | subscribersCount: { 389 | $size: "$subscribers" 390 | }, 391 | channelsSubscribedToCount: { 392 | $size: "$subscribedTo" 393 | }, 394 | isSubscribed: { 395 | $cond: { 396 | if: {$in: [req.user?._id, "$subscribers.subscriber"]}, 397 | then: true, 398 | else: false 399 | } 400 | } 401 | } 402 | }, 403 | { 404 | $project: { 405 | fullName: 1, 406 | username: 1, 407 | subscribersCount: 1, 408 | channelsSubscribedToCount: 1, 409 | isSubscribed: 1, 410 | avatar: 1, 411 | coverImage: 1, 412 | email: 1 413 | 414 | } 415 | } 416 | ]) 417 | 418 | if (!channel?.length) { 419 | throw new ApiError(404, "channel does not exists") 420 | } 421 | 422 | return res 423 | .status(200) 424 | .json( 425 | new ApiResponse(200, channel[0], "User channel fetched successfully") 426 | ) 427 | }) 428 | 429 | const getWatchHistory = asyncHandler(async(req, res) => { 430 | const user = await User.aggregate([ 431 | { 432 | $match: { 433 | _id: new mongoose.Types.ObjectId(req.user._id) 434 | } 435 | }, 436 | { 437 | $lookup: { 438 | from: "videos", 439 | localField: "watchHistory", 440 | foreignField: "_id", 441 | as: "watchHistory", 442 | pipeline: [ 443 | { 444 | $lookup: { 445 | from: "users", 446 | localField: "owner", 447 | foreignField: "_id", 448 | as: "owner", 449 | pipeline: [ 450 | { 451 | $project: { 452 | fullName: 1, 453 | username: 1, 454 | avatar: 1 455 | } 456 | } 457 | ] 458 | } 459 | }, 460 | { 461 | $addFields:{ 462 | owner:{ 463 | $first: "$owner" 464 | } 465 | } 466 | } 467 | ] 468 | } 469 | } 470 | ]) 471 | 472 | return res 473 | .status(200) 474 | .json( 475 | new ApiResponse( 476 | 200, 477 | user[0].watchHistory, 478 | "Watch history fetched successfully" 479 | ) 480 | ) 481 | }) 482 | 483 | 484 | export { 485 | registerUser, 486 | loginUser, 487 | logoutUser, 488 | refreshAccessToken, 489 | changeCurrentPassword, 490 | getCurrentUser, 491 | updateAccountDetails, 492 | updateUserAvatar, 493 | updateUserCoverImage, 494 | getUserChannelProfile, 495 | getWatchHistory 496 | } -------------------------------------------------------------------------------- /src/controllers/video.controller.js: -------------------------------------------------------------------------------- 1 | import mongoose, {isValidObjectId} from "mongoose" 2 | import {Video} from "../models/video.model.js" 3 | import {User} from "../models/user.model.js" 4 | import {ApiError} from "../utils/ApiError.js" 5 | import {ApiResponse} from "../utils/ApiResponse.js" 6 | import {asyncHandler} from "../utils/asyncHandler.js" 7 | import {uploadOnCloudinary} from "../utils/cloudinary.js" 8 | 9 | 10 | const getAllVideos = asyncHandler(async (req, res) => { 11 | const { page = 1, limit = 10, query, sortBy, sortType, userId } = req.query 12 | //TODO: get all videos based on query, sort, pagination 13 | }) 14 | 15 | const publishAVideo = asyncHandler(async (req, res) => { 16 | const { title, description} = req.body 17 | // TODO: get video, upload to cloudinary, create video 18 | }) 19 | 20 | const getVideoById = asyncHandler(async (req, res) => { 21 | const { videoId } = req.params 22 | //TODO: get video by id 23 | }) 24 | 25 | const updateVideo = asyncHandler(async (req, res) => { 26 | const { videoId } = req.params 27 | //TODO: update video details like title, description, thumbnail 28 | 29 | }) 30 | 31 | const deleteVideo = asyncHandler(async (req, res) => { 32 | const { videoId } = req.params 33 | //TODO: delete video 34 | }) 35 | 36 | const togglePublishStatus = asyncHandler(async (req, res) => { 37 | const { videoId } = req.params 38 | }) 39 | 40 | export { 41 | getAllVideos, 42 | publishAVideo, 43 | getVideoById, 44 | updateVideo, 45 | deleteVideo, 46 | togglePublishStatus 47 | } 48 | -------------------------------------------------------------------------------- /src/db/index.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | import { DB_NAME } from "../constants.js"; 3 | 4 | 5 | const connectDB = async () => { 6 | try { 7 | const connectionInstance = await mongoose.connect(`${process.env.MONGODB_URI}/${DB_NAME}`) 8 | console.log(`\n MongoDB connected !! DB HOST: ${connectionInstance.connection.host}`); 9 | } catch (error) { 10 | console.log("MONGODB connection FAILED ", error); 11 | process.exit(1) 12 | } 13 | } 14 | 15 | export default connectDB -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // require('dotenv').config({path: './env'}) 2 | import dotenv from "dotenv" 3 | import connectDB from "./db/index.js"; 4 | import {app} from './app.js' 5 | dotenv.config({ 6 | path: './.env' 7 | }) 8 | 9 | 10 | 11 | connectDB() 12 | .then(() => { 13 | app.listen(process.env.PORT || 8000, () => { 14 | console.log(`⚙️ Server is running at port : ${process.env.PORT}`); 15 | }) 16 | }) 17 | .catch((err) => { 18 | console.log("MONGO db connection failed !!! ", err); 19 | }) 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | /* 31 | import express from "express" 32 | const app = express() 33 | ( async () => { 34 | try { 35 | await mongoose.connect(`${process.env.MONGODB_URI}/${DB_NAME}`) 36 | app.on("errror", (error) => { 37 | console.log("ERRR: ", error); 38 | throw error 39 | }) 40 | 41 | app.listen(process.env.PORT, () => { 42 | console.log(`App is listening on port ${process.env.PORT}`); 43 | }) 44 | 45 | } catch (error) { 46 | console.error("ERROR: ", error) 47 | throw err 48 | } 49 | })() 50 | 51 | */ -------------------------------------------------------------------------------- /src/middlewares/auth.middleware.js: -------------------------------------------------------------------------------- 1 | import { ApiError } from "../utils/ApiError.js"; 2 | import { asyncHandler } from "../utils/asyncHandler.js"; 3 | import jwt from "jsonwebtoken" 4 | import { User } from "../models/user.model.js"; 5 | 6 | export const verifyJWT = asyncHandler(async(req, _, next) => { 7 | try { 8 | const token = req.cookies?.accessToken || req.header("Authorization")?.replace("Bearer ", "") 9 | 10 | // console.log(token); 11 | if (!token) { 12 | throw new ApiError(401, "Unauthorized request") 13 | } 14 | 15 | const decodedToken = jwt.verify(token, process.env.ACCESS_TOKEN_SECRET) 16 | 17 | const user = await User.findById(decodedToken?._id).select("-password -refreshToken") 18 | 19 | if (!user) { 20 | 21 | throw new ApiError(401, "Invalid Access Token") 22 | } 23 | 24 | req.user = user; 25 | next() 26 | } catch (error) { 27 | throw new ApiError(401, error?.message || "Invalid access token") 28 | } 29 | 30 | }) -------------------------------------------------------------------------------- /src/middlewares/multer.middleware.js: -------------------------------------------------------------------------------- 1 | import multer from "multer"; 2 | 3 | const storage = multer.diskStorage({ 4 | destination: function (req, file, cb) { 5 | cb(null, "./public/temp") 6 | }, 7 | filename: function (req, file, cb) { 8 | 9 | cb(null, file.originalname) 10 | } 11 | }) 12 | 13 | export const upload = multer({ 14 | storage, 15 | }) -------------------------------------------------------------------------------- /src/models/comment.model.js: -------------------------------------------------------------------------------- 1 | import mongoose, {Schema} from "mongoose"; 2 | import mongooseAggregatePaginate from "mongoose-aggregate-paginate-v2"; 3 | 4 | const commentSchema = new Schema( 5 | { 6 | content: { 7 | type: String, 8 | required: true 9 | }, 10 | video: { 11 | type: Schema.Types.ObjectId, 12 | ref: "Video" 13 | }, 14 | owner: { 15 | type: Schema.Types.ObjectId, 16 | ref: "User" 17 | } 18 | }, 19 | { 20 | timestamps: true 21 | } 22 | ) 23 | 24 | 25 | commentSchema.plugin(mongooseAggregatePaginate) 26 | 27 | export const Comment = mongoose.model("Comment", commentSchema) -------------------------------------------------------------------------------- /src/models/like.model.js: -------------------------------------------------------------------------------- 1 | import mongoose, {Schema} from "mongoose"; 2 | 3 | 4 | const likeSchema = new Schema({ 5 | video: { 6 | type: Schema.Types.ObjectId, 7 | ref: "Video" 8 | }, 9 | comment: { 10 | type: Schema.Types.ObjectId, 11 | ref: "Comment" 12 | }, 13 | tweet: { 14 | type: Schema.Types.ObjectId, 15 | ref: "Tweet" 16 | }, 17 | likedBy: { 18 | type: Schema.Types.ObjectId, 19 | ref: "User" 20 | }, 21 | 22 | }, {timestamps: true}) 23 | 24 | export const Like = mongoose.model("Like", likeSchema) -------------------------------------------------------------------------------- /src/models/playlist.model.js: -------------------------------------------------------------------------------- 1 | import mongoose, {Schema} from "mongoose"; 2 | 3 | const playlistSchema = new Schema({ 4 | name: { 5 | type: String, 6 | required: true 7 | }, 8 | description: { 9 | type: String, 10 | required: true 11 | }, 12 | videos: [ 13 | { 14 | type: Schema.Types.ObjectId, 15 | ref: "Video" 16 | } 17 | ], 18 | owner: { 19 | type: Schema.Types.ObjectId, 20 | ref: "User" 21 | }, 22 | }, {timestamps: true}) 23 | 24 | 25 | 26 | export const Playlist = mongoose.model("Playlist", playlistSchema) -------------------------------------------------------------------------------- /src/models/subscription.model.js: -------------------------------------------------------------------------------- 1 | import mongoose, {Schema} from "mongoose" 2 | 3 | const subscriptionSchema = new Schema({ 4 | subscriber: { 5 | type: Schema.Types.ObjectId, // one who is subscribing 6 | ref: "User" 7 | }, 8 | channel: { 9 | type: Schema.Types.ObjectId, // one to whom 'subscriber' is subscribing 10 | ref: "User" 11 | } 12 | }, {timestamps: true}) 13 | 14 | 15 | 16 | export const Subscription = mongoose.model("Subscription", subscriptionSchema) -------------------------------------------------------------------------------- /src/models/tweet.model.js: -------------------------------------------------------------------------------- 1 | import mongoose, {Schema} from "mongoose"; 2 | 3 | const tweetSchema = new Schema({ 4 | content: { 5 | type: String, 6 | required: true 7 | }, 8 | owner: { 9 | type: Schema.Types.ObjectId, 10 | ref: "User" 11 | } 12 | }, {timestamps: true}) 13 | 14 | 15 | export const Tweet = mongoose.model("Tweet", tweetSchema) -------------------------------------------------------------------------------- /src/models/user.model.js: -------------------------------------------------------------------------------- 1 | import mongoose, {Schema} from "mongoose"; 2 | import jwt from "jsonwebtoken" 3 | import bcrypt from "bcrypt" 4 | 5 | const userSchema = new Schema( 6 | { 7 | username: { 8 | type: String, 9 | required: true, 10 | unique: true, 11 | lowercase: true, 12 | trim: true, 13 | index: true 14 | }, 15 | email: { 16 | type: String, 17 | required: true, 18 | unique: true, 19 | lowecase: true, 20 | trim: true, 21 | }, 22 | fullName: { 23 | type: String, 24 | required: true, 25 | trim: true, 26 | index: true 27 | }, 28 | avatar: { 29 | type: String, // cloudinary url 30 | required: true, 31 | }, 32 | coverImage: { 33 | type: String, // cloudinary url 34 | }, 35 | watchHistory: [ 36 | { 37 | type: Schema.Types.ObjectId, 38 | ref: "Video" 39 | } 40 | ], 41 | password: { 42 | type: String, 43 | required: [true, 'Password is required'] 44 | }, 45 | refreshToken: { 46 | type: String 47 | } 48 | 49 | }, 50 | { 51 | timestamps: true 52 | } 53 | ) 54 | 55 | userSchema.pre("save", async function (next) { 56 | if(!this.isModified("password")) return next(); 57 | 58 | this.password = await bcrypt.hash(this.password, 10) 59 | next() 60 | }) 61 | 62 | userSchema.methods.isPasswordCorrect = async function(password){ 63 | return await bcrypt.compare(password, this.password) 64 | } 65 | 66 | userSchema.methods.generateAccessToken = function(){ 67 | return jwt.sign( 68 | { 69 | _id: this._id, 70 | email: this.email, 71 | username: this.username, 72 | fullName: this.fullName 73 | }, 74 | process.env.ACCESS_TOKEN_SECRET, 75 | { 76 | expiresIn: process.env.ACCESS_TOKEN_EXPIRY 77 | } 78 | ) 79 | } 80 | userSchema.methods.generateRefreshToken = function(){ 81 | return jwt.sign( 82 | { 83 | _id: this._id, 84 | 85 | }, 86 | process.env.REFRESH_TOKEN_SECRET, 87 | { 88 | expiresIn: process.env.REFRESH_TOKEN_EXPIRY 89 | } 90 | ) 91 | } 92 | 93 | export const User = mongoose.model("User", userSchema) -------------------------------------------------------------------------------- /src/models/video.model.js: -------------------------------------------------------------------------------- 1 | import mongoose, {Schema} from "mongoose"; 2 | import mongooseAggregatePaginate from "mongoose-aggregate-paginate-v2"; 3 | 4 | const videoSchema = new Schema( 5 | { 6 | videoFile: { 7 | type: String, //cloudinary url 8 | required: true 9 | }, 10 | thumbnail: { 11 | type: String, //cloudinary url 12 | required: true 13 | }, 14 | title: { 15 | type: String, 16 | required: true 17 | }, 18 | description: { 19 | type: String, 20 | required: true 21 | }, 22 | duration: { 23 | type: Number, 24 | required: true 25 | }, 26 | views: { 27 | type: Number, 28 | default: 0 29 | }, 30 | isPublished: { 31 | type: Boolean, 32 | default: true 33 | }, 34 | owner: { 35 | type: Schema.Types.ObjectId, 36 | ref: "User" 37 | } 38 | 39 | }, 40 | { 41 | timestamps: true 42 | } 43 | ) 44 | 45 | videoSchema.plugin(mongooseAggregatePaginate) 46 | 47 | export const Video = mongoose.model("Video", videoSchema) -------------------------------------------------------------------------------- /src/routes/comment.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { 3 | addComment, 4 | deleteComment, 5 | getVideoComments, 6 | updateComment, 7 | } from "../controllers/comment.controller.js" 8 | import {verifyJWT} from "../middlewares/auth.middleware.js" 9 | 10 | const router = Router(); 11 | 12 | router.use(verifyJWT); // Apply verifyJWT middleware to all routes in this file 13 | 14 | router.route("/:videoId").get(getVideoComments).post(addComment); 15 | router.route("/c/:commentId").delete(deleteComment).patch(updateComment); 16 | 17 | export default router -------------------------------------------------------------------------------- /src/routes/dashboard.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { 3 | getChannelStats, 4 | getChannelVideos, 5 | } from "../controllers/dashboard.controller.js" 6 | import {verifyJWT} from "../middlewares/auth.middleware.js" 7 | 8 | const router = Router(); 9 | 10 | router.use(verifyJWT); // Apply verifyJWT middleware to all routes in this file 11 | 12 | router.route("/stats").get(getChannelStats); 13 | router.route("/videos").get(getChannelVideos); 14 | 15 | export default router -------------------------------------------------------------------------------- /src/routes/healthcheck.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { healthcheck } from "../controllers/healthcheck.controller.js" 3 | 4 | const router = Router(); 5 | 6 | router.route('/').get(healthcheck); 7 | 8 | export default router -------------------------------------------------------------------------------- /src/routes/like.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { 3 | getLikedVideos, 4 | toggleCommentLike, 5 | toggleVideoLike, 6 | toggleTweetLike, 7 | } from "../controllers/like.controller.js" 8 | import {verifyJWT} from "../middlewares/auth.middleware.js" 9 | 10 | const router = Router(); 11 | router.use(verifyJWT); // Apply verifyJWT middleware to all routes in this file 12 | 13 | router.route("/toggle/v/:videoId").post(toggleVideoLike); 14 | router.route("/toggle/c/:commentId").post(toggleCommentLike); 15 | router.route("/toggle/t/:tweetId").post(toggleTweetLike); 16 | router.route("/videos").get(getLikedVideos); 17 | 18 | export default router -------------------------------------------------------------------------------- /src/routes/playlist.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { 3 | addVideoToPlaylist, 4 | createPlaylist, 5 | deletePlaylist, 6 | getPlaylistById, 7 | getUserPlaylists, 8 | removeVideoFromPlaylist, 9 | updatePlaylist, 10 | } from "../controllers/playlist.controller.js" 11 | import {verifyJWT} from "../middlewares/auth.middleware.js" 12 | 13 | const router = Router(); 14 | 15 | router.use(verifyJWT); // Apply verifyJWT middleware to all routes in this file 16 | 17 | router.route("/").post(createPlaylist) 18 | 19 | router 20 | .route("/:playlistId") 21 | .get(getPlaylistById) 22 | .patch(updatePlaylist) 23 | .delete(deletePlaylist); 24 | 25 | router.route("/add/:videoId/:playlistId").patch(addVideoToPlaylist); 26 | router.route("/remove/:videoId/:playlistId").patch(removeVideoFromPlaylist); 27 | 28 | router.route("/user/:userId").get(getUserPlaylists); 29 | 30 | export default router -------------------------------------------------------------------------------- /src/routes/subscription.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { 3 | getSubscribedChannels, 4 | getUserChannelSubscribers, 5 | toggleSubscription, 6 | } from "../controllers/subscription.controller.js" 7 | import {verifyJWT} from "../middlewares/auth.middleware.js" 8 | 9 | const router = Router(); 10 | router.use(verifyJWT); // Apply verifyJWT middleware to all routes in this file 11 | 12 | router 13 | .route("/c/:channelId") 14 | .get(getSubscribedChannels) 15 | .post(toggleSubscription); 16 | 17 | router.route("/u/:subscriberId").get(getUserChannelSubscribers); 18 | 19 | export default router -------------------------------------------------------------------------------- /src/routes/tweet.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { 3 | createTweet, 4 | deleteTweet, 5 | getUserTweets, 6 | updateTweet, 7 | } from "../controllers/tweet.controller.js" 8 | import {verifyJWT} from "../middlewares/auth.middleware.js" 9 | 10 | const router = Router(); 11 | router.use(verifyJWT); // Apply verifyJWT middleware to all routes in this file 12 | 13 | router.route("/").post(createTweet); 14 | router.route("/user/:userId").get(getUserTweets); 15 | router.route("/:tweetId").patch(updateTweet).delete(deleteTweet); 16 | 17 | export default router -------------------------------------------------------------------------------- /src/routes/user.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from "express"; 2 | import { 3 | loginUser, 4 | logoutUser, 5 | registerUser, 6 | refreshAccessToken, 7 | changeCurrentPassword, 8 | getCurrentUser, 9 | updateUserAvatar, 10 | updateUserCoverImage, 11 | getUserChannelProfile, 12 | getWatchHistory, 13 | updateAccountDetails 14 | } from "../controllers/user.controller.js"; 15 | import {upload} from "../middlewares/multer.middleware.js" 16 | import { verifyJWT } from "../middlewares/auth.middleware.js"; 17 | 18 | 19 | const router = Router() 20 | 21 | router.route("/register").post( 22 | upload.fields([ 23 | { 24 | name: "avatar", 25 | maxCount: 1 26 | }, 27 | { 28 | name: "coverImage", 29 | maxCount: 1 30 | } 31 | ]), 32 | registerUser 33 | ) 34 | 35 | router.route("/login").post(loginUser) 36 | 37 | //secured routes 38 | router.route("/logout").post(verifyJWT, logoutUser) 39 | router.route("/refresh-token").post(refreshAccessToken) 40 | router.route("/change-password").post(verifyJWT, changeCurrentPassword) 41 | router.route("/current-user").get(verifyJWT, getCurrentUser) 42 | router.route("/update-account").patch(verifyJWT, updateAccountDetails) 43 | 44 | router.route("/avatar").patch(verifyJWT, upload.single("avatar"), updateUserAvatar) 45 | router.route("/cover-image").patch(verifyJWT, upload.single("coverImage"), updateUserCoverImage) 46 | 47 | router.route("/c/:username").get(verifyJWT, getUserChannelProfile) 48 | router.route("/history").get(verifyJWT, getWatchHistory) 49 | 50 | export default router -------------------------------------------------------------------------------- /src/routes/video.routes.js: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | import { 3 | deleteVideo, 4 | getAllVideos, 5 | getVideoById, 6 | publishAVideo, 7 | togglePublishStatus, 8 | updateVideo, 9 | } from "../controllers/video.controller.js" 10 | import {verifyJWT} from "../middlewares/auth.middleware.js" 11 | import {upload} from "../middlewares/multer.middleware.js" 12 | 13 | const router = Router(); 14 | router.use(verifyJWT); // Apply verifyJWT middleware to all routes in this file 15 | 16 | router 17 | .route("/") 18 | .get(getAllVideos) 19 | .post( 20 | upload.fields([ 21 | { 22 | name: "videoFile", 23 | maxCount: 1, 24 | }, 25 | { 26 | name: "thumbnail", 27 | maxCount: 1, 28 | }, 29 | 30 | ]), 31 | publishAVideo 32 | ); 33 | 34 | router 35 | .route("/:videoId") 36 | .get(getVideoById) 37 | .delete(deleteVideo) 38 | .patch(upload.single("thumbnail"), updateVideo); 39 | 40 | router.route("/toggle/publish/:videoId").patch(togglePublishStatus); 41 | 42 | export default router -------------------------------------------------------------------------------- /src/utils/ApiError.js: -------------------------------------------------------------------------------- 1 | class ApiError extends Error { 2 | constructor( 3 | statusCode, 4 | message= "Something went wrong", 5 | errors = [], 6 | stack = "" 7 | ){ 8 | super(message) 9 | this.statusCode = statusCode 10 | this.data = null 11 | this.message = message 12 | this.success = false; 13 | this.errors = errors 14 | 15 | if (stack) { 16 | this.stack = stack 17 | } else{ 18 | Error.captureStackTrace(this, this.constructor) 19 | } 20 | 21 | } 22 | } 23 | 24 | export {ApiError} -------------------------------------------------------------------------------- /src/utils/ApiResponse.js: -------------------------------------------------------------------------------- 1 | class ApiResponse { 2 | constructor(statusCode, data, message = "Success"){ 3 | this.statusCode = statusCode 4 | this.data = data 5 | this.message = message 6 | this.success = statusCode < 400 7 | } 8 | } 9 | 10 | export { ApiResponse } -------------------------------------------------------------------------------- /src/utils/asyncHandler.js: -------------------------------------------------------------------------------- 1 | const asyncHandler = (requestHandler) => { 2 | return (req, res, next) => { 3 | Promise.resolve(requestHandler(req, res, next)).catch((err) => next(err)) 4 | } 5 | } 6 | 7 | 8 | export { asyncHandler } 9 | 10 | 11 | 12 | 13 | // const asyncHandler = () => {} 14 | // const asyncHandler = (func) => () => {} 15 | // const asyncHandler = (func) => async () => {} 16 | 17 | 18 | // const asyncHandler = (fn) => async (req, res, next) => { 19 | // try { 20 | // await fn(req, res, next) 21 | // } catch (error) { 22 | // res.status(err.code || 500).json({ 23 | // success: false, 24 | // message: err.message 25 | // }) 26 | // } 27 | // } -------------------------------------------------------------------------------- /src/utils/cloudinary.js: -------------------------------------------------------------------------------- 1 | import {v2 as cloudinary} from "cloudinary" 2 | import fs from "fs" 3 | 4 | 5 | cloudinary.config({ 6 | cloud_name: process.env.CLOUDINARY_CLOUD_NAME, 7 | api_key: process.env.CLOUDINARY_API_KEY, 8 | api_secret: process.env.CLOUDINARY_API_SECRET 9 | }); 10 | 11 | const uploadOnCloudinary = async (localFilePath) => { 12 | try { 13 | if (!localFilePath) return null 14 | //upload the file on cloudinary 15 | const response = await cloudinary.uploader.upload(localFilePath, { 16 | resource_type: "auto" 17 | }) 18 | // file has been uploaded successfull 19 | //console.log("file is uploaded on cloudinary ", response.url); 20 | fs.unlinkSync(localFilePath) 21 | return response; 22 | 23 | } catch (error) { 24 | fs.unlinkSync(localFilePath) // remove the locally saved temporary file as the upload operation got failed 25 | return null; 26 | } 27 | } 28 | 29 | 30 | 31 | export {uploadOnCloudinary} --------------------------------------------------------------------------------