diff --git a/.gitignore b/.gitignore index 924a613..76cbdcd 100644 --- a/.gitignore +++ b/.gitignore @@ -78,6 +78,7 @@ web_modules/ .env.test.local .env.production.local .env.local +!.env.development # parcel-bundler cache (https://parceljs.org/) .cache @@ -132,4 +133,6 @@ dist # others report* -deploy.tests.yml \ No newline at end of file +deploy.tests.yml + +/tmp/mysql/* diff --git a/.lintstagedrc b/.lintstagedrc index caefe8c..4bdd4ce 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,3 +1,3 @@ { - "*.{js,jsx,ts,tsx,json,md,html}": ["npm run format", "git add"] + "*.{js,jsx,ts,tsx,html}": ["npm run format", "git add"] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ae32fb6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,104 @@ +# Contributing to BadgingAPI + +We are beyond excited to see that you want to contribute! +Your contributions are a big help in improving this project. There are various ways to get involved with the BadgingAPI, and we value every single contribution. + +Before you begin, please take a moment to go through these guidelines: + +- [Code of Conduct](#code-of-conduct) + +- [Who can contribute?](#who-can-contribute) + +- [How to Contribute](#how-to-contribute) + - [Set up your Local Development Environment](#set-up-your-local-development-environment) +- [Code Style and Standards](#code-style-and-standards) + +## Code of Conduct + +Please note that this project has a [Code of Conduct](https://github.com/chaoss/.github/blob/main/CODE_OF_CONDUCT.md). We expect all contributors to adhere to it. Please take a moment to read through these guidelines to ensure a positive and inclusive contributor experience. + +## Who can contribute + +The BadgingAPI is built by the community and warmly welcomes collaboration. So anyone can contribute to this project. + +## How to Contribute + +### What you'll need + +Before cloning this repository, make sure you have the latest versions; + +- [NodeJS and NPM](https://nodejs.org/en/download) +- [MySQL](https://dev.mysql.com/downloads/installer/) + +Configure MySQL and make sure it is running on your machine before you proceed with the next steps. create a new **_database_** and a new **_database user_** with a **_password_**. these three values will be used to connect to MySQL and will be needed when setting up your `.env` file. + +### Basic Configurations + +1. You'll need to [create a GitHub OAuth App](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app) on your personal GitHub account. Creating a GitHub OAuth App will automatically generate a `Client_ID` and will also enable you generate a `Client_Secret` for your OAuth App. Store these values safely because they will be needed while generating a `.env` file for the first time. + +2. Create your personal [Augur Application](https://projectbadge.chaoss.io/account/settings?section=application) in order to general an `augur_client_secret`. When your new application is created, the `augur_client_secret` will be listed in the last column of **_Your Apps_** table. Store the `augur_client_secret` together with the above GitHub OAuth credentials since it will be needed too while generating a `.env` file for the first time. The `augur_client_secret` is used to connect to the Augur API in order to submit repositories to the Augur Library for further badging. + +After generating those values, + +1. **Fork the Repository**: Click the "Fork" button in the upper right-hand corner of the BadgingAPI repository on GitHub. + +2. **Clone Your Fork**: Clone your fork of the repository to your local machine: + + ```bash + git clone https://github.com/your_username/BadgingAPI.git #replace `your_username` with your actual GitHub username + ``` + +### Set up your Local Development Environment + +1. **Perform the following to get your working environment ready**: + + ```bash + cd BadgingAPI # move into project directory + npm install # installs packages and dependencies + ``` + +2. **Create a Branch**: Create a new branch for your contribution: + + ```bash + git checkout -b your-branch-name + ``` + +3. **Make sure project is running**: + + ```bash + npm run dev # this command will trigger a series of configuration questions in order setup your environmental variables + ``` + +4. **Make Changes**: Make your desired changes to the codebase. Ensure your code follows our coding standards and guidelines. + +5. **Test**: Test your changes to ensure they work as expected. + +6. **Commit Changes**: Commit your changes with a clear and descriptive message. Make sure your commits are signed. + + ```bash + git add . + git commit -S -m "" + ``` + +7. **Push Changes**: Push your changes to your fork on GitHub: + + ```bash + git push origin your-branch-name + ``` + +8. Create a Pull Request: Go to the BadgingAPI repository on GitHub and create a new pull request from your fork. Describe your changes and why they should be merged. + +9. **Review and Discussion**: Your pull request will be reviewed by the maintainers and the community. Be prepared for feedback and be responsive to any suggested changes. + +10. **Merge**: Once your pull request is approved, it will be merged into the main project. + +## Code Style and Standards + +BadgingAPI follows a specific code style and coding standards. Please make sure to adhere to these standards when contributing. + +### Issue Tracking + +If you're looking for ways to contribute but don't have specific code changes in mind, you can check the [issue tracker](https://github.com/badging/BadgingAPI/issues) for BadgingAPI on GitHub. You might find issues marked as "help wanted" or "good first issue." +Ask for help +If you have any questions or need assistance with your contribution, please contact get in touch with the project maintainers. +We appreciate your contributions and look forward to working with you to make BadgingAPI even better! diff --git a/configure.js b/configure.js new file mode 100644 index 0000000..708e0a5 --- /dev/null +++ b/configure.js @@ -0,0 +1,56 @@ +const { input, password } = require("@inquirer/prompts"); +const fs = require("fs"); + +(async () => { + if (!fs.existsSync(__dirname + "/.env")) { + console.info( + "Please input the fields below to configure your project locally" + ); + const values = { + db_name: await input({ message: "Your database name:" }), + db_user: await input({ message: "Your database user name:" }), + db_password: await password({ + message: "Input your database password:", + mask: true, + }), + db_host: await input({ + message: "MySQL database host address:", + default: "localhost", + }), + db_dialect: await input({ + message: "Your database dialect:", + default: "mysql", + }), + + client_ID: await input({ + message: "Your personal Github OAuth App Client ID: ", + }), + client_secret: await input({ + message: "Your personal Github OAuth App Client Secret:", + }), + augur_client_secret: await input({ + message: "Your Augur Client Secret: ", + }), + port: await input({ + message: "Port that you'd like server to run on: ", + default: 4040, + }), + }; + + const envFile = ` + DB_NAME=${values.db_name} + DB_USER=${values.db_user} + DB_PASSWORD=${values.db_password} + DB_HOST=${values.db_host} + DB_DIALECT=${values.db_dialect} + + CLIENT_ID=${values.client_ID} + CLIENT_SECRET=${values.client_secret} + AUGUR_CLIENT_SECRET=${values.augur_client_secret} + PORT=${values.port} + `; + + fs.writeFileSync(".env", envFile); + console.info("Configuration file (.env) created successfully."); + } +})(); diff --git a/index.js b/index.js index ee1901e..c710499 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,9 @@ const express = require("express"); -require("dotenv").config(); const bodyParser = require("body-parser"); const cors = require("cors"); const routes = require("./src/routes/routes.js"); const dbconnect = require("./database/helpers/dbconnect"); +require("dotenv").config(); const app = express(); app.use(express.static("public")); diff --git a/package-lock.json b/package-lock.json index a0e93ce..2f057d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,8 +7,9 @@ "": { "name": "badgingapi", "version": "1.0.0", - "license": "ISC", + "license": "MIT", "dependencies": { + "@inquirer/prompts": "^3.3.0", "@octokit/rest": "^19.0.11", "axios": "^1.4.0", "body-parser": "^1.20.2", @@ -192,6 +193,218 @@ "dev": true, "peer": true }, + "node_modules/@inquirer/checkbox": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-1.5.0.tgz", + "integrity": "sha512-3cKJkW1vIZAs4NaS0reFsnpAjP0azffYII4I2R7PTI7ZTMg5Y1at4vzXccOH3762b2c2L4drBhpJpf9uiaGNxA==", + "dependencies": { + "@inquirer/core": "^5.1.1", + "@inquirer/type": "^1.1.5", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "figures": "^3.2.0" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/confirm": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-2.0.15.tgz", + "integrity": "sha512-hj8Q/z7sQXsF0DSpLQZVDhWYGN6KLM/gNjjqGkpKwBzljbQofGjn0ueHADy4HUY+OqDHmXuwk/bY+tZyIuuB0w==", + "dependencies": { + "@inquirer/core": "^5.1.1", + "@inquirer/type": "^1.1.5", + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/core": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-5.1.1.tgz", + "integrity": "sha512-IuJyZQUg75+L5AmopgnzxYrgcU6PJKL0hoIs332G1Gv55CnmZrhG6BzNOeZ5sOsTi1YCGOopw4rYICv74ejMFg==", + "dependencies": { + "@inquirer/type": "^1.1.5", + "@types/mute-stream": "^0.0.4", + "@types/node": "^20.9.0", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "cli-spinners": "^2.9.1", + "cli-width": "^4.1.0", + "figures": "^3.2.0", + "mute-stream": "^1.0.0", + "run-async": "^3.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/core/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/@inquirer/core/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@inquirer/core/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@inquirer/core/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@inquirer/core/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@inquirer/editor": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-1.2.13.tgz", + "integrity": "sha512-gBxjqt0B9GLN0j6M/tkEcmcIvB2fo9Cw0f5NRqDTkYyB9AaCzj7qvgG0onQ3GVPbMyMbbP4tWYxrBOaOdKpzNA==", + "dependencies": { + "@inquirer/core": "^5.1.1", + "@inquirer/type": "^1.1.5", + "chalk": "^4.1.2", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/expand": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-1.1.14.tgz", + "integrity": "sha512-yS6fJ8jZYAsxdxuw2c8XTFMTvMR1NxZAw3LxDaFnqh7BZ++wTQ6rSp/2gGJhMacdZ85osb+tHxjVgx7F+ilv5g==", + "dependencies": { + "@inquirer/core": "^5.1.1", + "@inquirer/type": "^1.1.5", + "chalk": "^4.1.2", + "figures": "^3.2.0" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/input": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-1.2.14.tgz", + "integrity": "sha512-tISLGpUKXixIQue7jypNEShrdzJoLvEvZOJ4QRsw5XTfrIYfoWFqAjMQLerGs9CzR86yAI89JR6snHmKwnNddw==", + "dependencies": { + "@inquirer/core": "^5.1.1", + "@inquirer/type": "^1.1.5", + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/password": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-1.1.14.tgz", + "integrity": "sha512-vL2BFxfMo8EvuGuZYlryiyAB3XsgtbxOcFs4H9WI9szAS/VZCAwdVqs8rqEeaAf/GV/eZOghIOYxvD91IsRWSg==", + "dependencies": { + "@inquirer/input": "^1.2.14", + "@inquirer/type": "^1.1.5", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/prompts": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-3.3.0.tgz", + "integrity": "sha512-BBCqdSnhNs+WziSIo4f/RNDu6HAj4R/Q5nMgJb5MNPFX8sJGCvj9BoALdmR0HTWXyDS7TO8euKj6W6vtqCQG7A==", + "dependencies": { + "@inquirer/checkbox": "^1.5.0", + "@inquirer/confirm": "^2.0.15", + "@inquirer/core": "^5.1.1", + "@inquirer/editor": "^1.2.13", + "@inquirer/expand": "^1.1.14", + "@inquirer/input": "^1.2.14", + "@inquirer/password": "^1.1.14", + "@inquirer/rawlist": "^1.2.14", + "@inquirer/select": "^1.3.1" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/rawlist": { + "version": "1.2.14", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-1.2.14.tgz", + "integrity": "sha512-xIYmDpYgfz2XGCKubSDLKEvadkIZAKbehHdWF082AyC2I4eHK44RUfXaoOAqnbqItZq4KHXS6jDJ78F2BmQvxg==", + "dependencies": { + "@inquirer/core": "^5.1.1", + "@inquirer/type": "^1.1.5", + "chalk": "^4.1.2" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/select": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-1.3.1.tgz", + "integrity": "sha512-EgOPHv7XOHEqiBwBJTyiMg9r57ySyW4oyYCumGp+pGyOaXQaLb2kTnccWI6NFd9HSi5kDJhF7YjA+3RfMQJ2JQ==", + "dependencies": { + "@inquirer/core": "^5.1.1", + "@inquirer/type": "^1.1.5", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "figures": "^3.2.0" + }, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/@inquirer/type": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.1.5.tgz", + "integrity": "sha512-wmwHvHozpPo4IZkkNtbYenem/0wnfI6hvOcGKmPEa0DwuaH5XUQzFqy6OpEpjEegZMhYIk8HDYITI16BPLtrRA==", + "engines": { + "node": ">=14.18.0" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -658,10 +871,21 @@ "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" }, + "node_modules/@types/mute-stream": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", + "integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.4.tgz", - "integrity": "sha512-ni5f8Xlf4PwnT/Z3f0HURc3ZSw8UyrqMqmM3L5ysa7VjHu8c3FOmIo1nKCcLrV/OAmtf3N4kFna/aJqxsfEtnA==" + "version": "20.9.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.4.tgz", + "integrity": "sha512-wmyg8HUhcn6ACjsn8oKYjkN/zUzQeNtMy44weTJSM6p4MMzEOuKbA3OjJ267uPCOW7Xex9dyrNTful8XTQYoDA==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/validator": { "version": "13.11.1", @@ -682,6 +906,11 @@ "@types/webidl-conversions": "*" } }, + "node_modules/@types/wrap-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", + "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -755,7 +984,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, "dependencies": { "type-fest": "^0.21.3" }, @@ -770,7 +998,6 @@ "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, "engines": { "node": ">=10" }, @@ -782,7 +1009,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -791,7 +1017,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -1094,8 +1319,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1111,8 +1334,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, "engines": { "node": ">=8" } @@ -1121,8 +1342,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -1130,6 +1349,11 @@ "node": ">=8" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -1176,6 +1400,17 @@ "node": ">=8" } }, + "node_modules/cli-spinners": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.1.tgz", + "integrity": "sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-truncate": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", @@ -1192,11 +1427,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "engines": { + "node": ">= 12" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -1207,8 +1449,7 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/colorette": { "version": "2.0.20", @@ -2127,6 +2368,19 @@ "node": ">= 0.8" } }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2164,6 +2418,28 @@ "reusify": "^1.0.4" } }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -3847,6 +4123,14 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/mysql2": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.6.0.tgz", @@ -4218,6 +4502,14 @@ "node": ">= 0.8.0" } }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -4614,6 +4906,14 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -5133,7 +5433,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5211,6 +5510,17 @@ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5347,6 +5657,11 @@ "integrity": "sha512-z4o1fvKUojIWh9XuaVLUDdf86RQiq13AC1dmHbTpoyuu+bquHms76v16CjycCbec87J7z0k//SiQVk0sMdFmpQ==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/universal-github-app-jwt": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/universal-github-app-jwt/-/universal-github-app-jwt-1.1.1.tgz", diff --git a/package.json b/package.json index 0bfd7bb..430943a 100644 --- a/package.json +++ b/package.json @@ -11,22 +11,23 @@ "precommit": "lint-staged", "format": "npm run prettier:fix && npm run lint:fix", "test": "npm run test", - "dev": "NODE_ENV=development nodemon index.js", + "dev": "NODE_ENV=development node configure.js && nodemon index.js", "start": "NODE_ENV=production node index.js", "prepare": "husky install", "build": "webpack" }, "repository": { "type": "git", - "url": "git+https://github.com/AllInOpenSource/BadgingAPI.git" + "url": "git+https://github.com/badging/BadgingAPI.git" }, - "author": "CHAOSS/AllInOpenSource", + "author": "CHAOSS", "license": "MIT", "bugs": { - "url": "https://github.com/AllInOpenSource/BadgingAPI/issues" + "url": "https://github.com/badging/BadgingAPI/issues" }, - "homepage": "https://github.com/AllInOpenSource/BadgingAPI#readme", + "homepage": "https://github.com/badging/BadgingAPI#readme", "dependencies": { + "@inquirer/prompts": "^3.3.0", "@octokit/rest": "^19.0.11", "axios": "^1.4.0", "body-parser": "^1.20.2",