diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7add826..e5a8a6c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,67 @@ -# CONTRIBUTING \ No newline at end of file +# Yonode Contributing Guide + +Welcome, and thank you for your interest in contributing to Yonode! This guide aims to provide you with all the information you need to contribute to the project effectively. Whether you're fixing a bug, adding a new feature, or improving documentation, your contributions are highly appreciated. + +## Code of Conduct + +Before contributing, please read our [Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project, you agree to abide by its terms. + +## How to Contribute + +Contributions to Yonode can take various forms. Below are the ways you can contribute to the project's success: + +- **Code Submissions**: Enhancements, bug fixes, or new features. +- **Documentation**: Updates, improvements, or corrections to our documentation. +- **Bug Reports**: Identifying and reporting issues for improvement. +- **Feature Requests**: Suggestions for new features or enhancements. +- **Code Reviews**: Participating in code reviews to ensure quality and consistency. + +## Getting Started + +- **Explore the Project**: Familiarize yourself with Yonode by reading the documentation, exploring the codebase, and understanding the project's goals. +- **Read the Documentation**: Familiarize yourself with the project documentation. Understanding the project's architecture and philosophy is crucial for making meaningful contributions. +- **Find an Issue**: Look through the GitHub Issues for tasks. If you're new, look for issues tagged with "good first issue" or "help wanted." +- **Discussion**: For new features or significant changes, it's best to open a discussion or issue first. This allows the community to give feedback early and align efforts. + +## Making Changes + +- **Create a New Branch**: For every new feature or bug fix, Create a branch for your contributions. For new features, use feature/your-feature-name; for bug fixes, bugfix/issue-title. +- **Write Meaningful Commit Messages**: Your commit messages should clearly describe what changes have been made and why. +- **Write Tests**: If you're adding a new feature or fixing a bug, please include tests that cover your changes. +- **Follow the Style Guide**: Ensure your code follows the established style guidelines. + +## Submitting a Pull Request + +- **Rebase Your Branch**: Ensure your branch is up to date with the `main` branch. +- **Open a Pull Request**: Once your changes are ready, open a pull request against the `main` branch. Provide a clear description of the problem you're solving and any relevant issue numbers. +- **Review Process**: The core team will review your pull request. Be open to feedback and willing to make changes if requested. + +## Review Process + +- Code Review: Your PR will be reviewed by the maintainers or other contributors. Be open to feedback and willing to make adjustments. The review process is a time for discussion and improvement. +- Testing: In addition to automated tests, your changes may be manually tested to ensure they work as expected and don't introduce any new issues. +- Merging: Once your PR has been approved and passes all tests, it will be merged into the main branch. Congratulations, and thank you for your contribution! +- + +## Reporting Bugs + +- **Use GitHub Issues**: Report bugs using GitHub Issues. Before creating a new issue, please check if the bug has already been reported. +- **Provide Detailed Information**: When reporting a bug, include as much information as possible, such as the Node.js version, platform, and steps to reproduce the bug. + +## Request for Comments (RFCs) + +For substantial changes, we use an RFC process. If you propose a major change, start by opening an issue to discuss your proposal. This allows the community to discuss and refine ideas before you invest significant effort into it. + +## License + +By contributing to Yonode, you agree that your contributions will be licensed under the project's license. + +## Community Conduct + +- Be Respectful: Treat everyone with respect. We're building a welcoming and supportive community. +- Collaborate: Be open to collaboration. Yonode is a community project, and teamwork makes it better for everyone. +- Stay Positive: Approach every interaction positively and constructively. We're all here to learn and grow. + +## Need Help? + +If you're unsure about anything or have questions, don't hesitate to ask. You can open an issue for questions or reach out to the maintainers directly. \ No newline at end of file diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore index 7af7f047..221391cb 100644 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ +.vscode /node_modules -.env \ No newline at end of file +.env diff --git a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json index 7f847fa9..2f176433 100644 --- a/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MongoDB-Mongoose-NoAuth-Template/package.json @@ -26,7 +26,7 @@ "uuidv4": "^6.2.13" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1" } } diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore index 30bc1627..72eae3c0 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/.gitignore @@ -1 +1,4 @@ -/node_modules \ No newline at end of file +.vscode +/node_modules +.env + diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json index 17fc188d..604e4b57 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/package.json @@ -26,7 +26,7 @@ "uuidv4": "^6.2.13" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1", "prisma": "^5.9.1" } diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js index fb7765ef..d02ae925 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/app.js @@ -1,16 +1,17 @@ // import the packages import express from "express"; +import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; -import chalk from "chalk"; -// Initializing the app +// initializing the app const app = express(); app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js index 6db841b3..2c054c51 100644 --- a/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js +++ b/packages/yonode-templates/JS-MongoDB-Prisma-NoAuth-Template/src/routes/router.js @@ -1,4 +1,5 @@ import express from "express"; const routerName = express.Router(); -export default routerName; \ No newline at end of file + +export default routerName; diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json index c909104b..e5d95a66 100644 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/package.json @@ -28,7 +28,7 @@ "typeorm": "0.3.20" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1" } } diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js index 16edc347..063906f9 100644 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/app.js @@ -12,6 +12,7 @@ app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js index 26cb469d..5dbbe19b 100644 --- a/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js +++ b/packages/yonode-templates/JS-MongoDB-TypeORM-NoAuth-Template/src/config/db.config.js @@ -13,14 +13,10 @@ const AppDataSource = new DataSource({ AppDataSource.initialize() .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); + console.log(`${chalk.green.bold('Connected')} to the database`); }) .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) + console.log(`${chalk.red.bold('Error')} connecting to database`, error); ); export default AppDataSource; diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore index 30bc1627..221391cb 100644 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/.gitignore @@ -1 +1,3 @@ -/node_modules \ No newline at end of file +.vscode +/node_modules +.env diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/package.json b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/package.json index 17fc188d..604e4b57 100644 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/package.json @@ -26,7 +26,7 @@ "uuidv4": "^6.2.13" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1", "prisma": "^5.9.1" } diff --git a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js index fb7765ef..31f5f275 100644 --- a/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MySQL-Prisma-NoAuth-Template/src/app.js @@ -1,9 +1,9 @@ // import the packages import express from "express"; +import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; -import chalk from "chalk"; // Initializing the app const app = express(); @@ -11,6 +11,7 @@ app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore index 3713ac14..221391cb 100644 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ .vscode /node_modules +.env diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/package.json b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/package.json index 376d63a4..01f6e6f2 100644 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/package.json @@ -27,7 +27,7 @@ "sequelize": "^6.36.0" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1" } } diff --git a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js index 319ceaa7..c83b05a9 100644 --- a/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-MySQL-Sequelize-NoAuth-Template/src/app.js @@ -14,6 +14,7 @@ app.use(express.json()); // rest of your code here +// database connection connectDB() app.listen(port, () => { diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore index e8d451db..5a30af86 100644 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/.gitignore @@ -1,3 +1,3 @@ -.vscode/ +.vscode node_modules/ - +.env diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/package.json b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/package.json index d9d6b0cd..44e5ca4a 100644 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/package.json @@ -29,7 +29,7 @@ "typeorm": "0.3.20" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1" } } diff --git a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js index 341bd466..b0bb27c8 100644 --- a/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js +++ b/packages/yonode-templates/JS-MySQL-TypeORM-NoAuth-Template/src/config/db.config.js @@ -12,14 +12,10 @@ const AppDataSource = new DataSource({ AppDataSource.initialize() .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); + console.log(`${chalk.green.bold('Connected')} to the database`); }) .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) + console.log(`${chalk.red.bold('Error')} connecting to database`, error); ); export default AppDataSource; diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore index 7af7f047..221391cb 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ +.vscode /node_modules -.env \ No newline at end of file +.env diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/package.json b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/package.json index 17fc188d..604e4b57 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/package.json @@ -26,7 +26,7 @@ "uuidv4": "^6.2.13" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1", "prisma": "^5.9.1" } diff --git a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js index fb7765ef..31f5f275 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-PostgreSQL-Prisma-NoAuth-Template/src/app.js @@ -1,9 +1,9 @@ // import the packages import express from "express"; +import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; -import chalk from "chalk"; // Initializing the app const app = express(); @@ -11,6 +11,7 @@ app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore index 3713ac14..221391cb 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ .vscode /node_modules +.env diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/package.json b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/package.json index 3f2ae4fc..dd887ef6 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/package.json @@ -28,7 +28,7 @@ "sequelize": "^6.36.0" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1" } } diff --git a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js index 319ceaa7..c83b05a9 100644 --- a/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-PostgreSQL-Sequelize-NoAuth-Template/src/app.js @@ -14,6 +14,7 @@ app.use(express.json()); // rest of your code here +// database connection connectDB() app.listen(port, () => { diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore index 8d056c8e..5a30af86 100644 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/.gitignore @@ -1,2 +1,3 @@ -.vscode/ +.vscode node_modules/ +.env diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/package.json b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/package.json index 65c3c387..bc9e4f5a 100644 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/package.json +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/package.json @@ -28,7 +28,7 @@ "typeorm": "0.3.20" }, "devDependencies": { - "yonode": "^0.5.0", + "yonode": "^0.7.0", "nodemon": "^3.0.1" } } diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js index 4a832b49..b93c5b2f 100644 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/app.js @@ -2,16 +2,17 @@ import express from "express"; import chalk from "chalk"; -//import your files +// import your files import { port } from "./config/initial.config.js"; import "./config/db.config.js"; -//initializing the app +// initializing the app const app = express(); app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`${chalk.green.bold("Server")} is listening on port ${port}`); }); diff --git a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js index 7a3731a3..0fe7e11a 100644 --- a/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js +++ b/packages/yonode-templates/JS-PostgreSQL-TypeORM-NoAuth-Template/src/config/db.config.js @@ -12,14 +12,10 @@ const AppDataSource = new DataSource({ AppDataSource.initialize() .then(async () => { - console.log( - `${chalk.green.bold("Successfully")} connected to the database` - ); + console.log(`${chalk.green.bold('Connected')} to the database`); }) .catch((error) => - console.log( - `${chalk.red.bold("Failed")} to connect to the database: ${error}` - ) + console.log(`${chalk.red.bold('Error')} connecting to database`, error); ); export default AppDataSource; diff --git a/packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/.vscode/settings.json b/packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/.vscode/settings.json deleted file mode 100644 index 3dbeb318..00000000 --- a/packages/yonode-templates/typescript/MongoDB/Mongoose/NoAuth/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cSpell.words": [ - "uuidv" - ] -} \ No newline at end of file diff --git a/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/.gitignore b/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/.gitignore index 11ddd8db..338aad97 100644 --- a/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/.gitignore +++ b/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/.gitignore @@ -1,3 +1,3 @@ node_modules -# Keep environment variables out of version control .env +dest diff --git a/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/nodemon.json b/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/nodemon.json deleted file mode 100644 index 8de6f912..00000000 --- a/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/nodemon.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "watch": ["src"], - "ext": ".ts,.js", - "exec": "tsx ./src/app.ts" -} \ No newline at end of file diff --git a/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/package.json b/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/package.json index f575376a..f90ad5e2 100644 --- a/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/package.json +++ b/packages/yonode-templates/typescript/MongoDB/Prisma/Noauth/package.json @@ -6,7 +6,7 @@ "type": "module", "scripts": { "start": "tsx src/app.ts", - "dev": "nodemon", + "dev": "nodemon -x tsx src/app.ts", "build": "tsc" }, "dependencies": { diff --git a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/README.md b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/README.md index 2319b072..0a6cfd45 100644 --- a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/README.md +++ b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/README.md @@ -1,4 +1,4 @@ -# Yonode + TypeScript + MongoDB with TypeOrm +# Yonode + TypeScript + MongoDB with TypeORM This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. diff --git a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/package.json b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/package.json index 8bb9bb18..22131380 100644 --- a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/package.json +++ b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/package.json @@ -5,7 +5,6 @@ "main": "./src/app.ts", "scripts": { "start": "tsx src/app.ts", - "test": "node dist/app.js", "dev": "nodemon -x tsx src/app.ts", "build": "tsc", "typeorm": "typeorm-ts-node-commonjs" diff --git a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/app.ts b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/app.ts index 919cc5ad..37aef74f 100644 --- a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/app.ts +++ b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/app.ts @@ -4,12 +4,14 @@ import express, { Express } from "express"; // import your files import { port } from "./config/initial.config"; import "./config/db.config"; + // initializing the app const app: Express = express(); app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`Server running on http://localhost:/${port}/`); }); diff --git a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/config/db.config.ts b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/config/db.config.ts index b0028c5d..102e954f 100644 --- a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/config/db.config.ts +++ b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/config/db.config.ts @@ -1,7 +1,6 @@ import "reflect-metadata"; import { DataSource } from "typeorm"; import { EntityName } from "../entity/Entity"; -// import chalk from "chalk"; import { dbName, dbUrl } from "./initial.config"; const AppDataSource = new DataSource({ @@ -14,5 +13,5 @@ AppDataSource.initialize() .then(async () => { console.log(`connected to the database`); }) - .catch((error) => console.log(`to connect to the database: ${error}`)); + .catch((error) => console.error("Error connecting to database", error)); export default AppDataSource; diff --git a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/routes/route.ts b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/routes/route.ts index e69de29b..18b49770 100644 --- a/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/routes/route.ts +++ b/packages/yonode-templates/typescript/MongoDB/TypeORM/noAuth/src/routes/route.ts @@ -0,0 +1,5 @@ +import express from "express"; + +const routerName = express.Router(); + +export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/app.ts b/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/app.ts index 919cc5ad..37aef74f 100644 --- a/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/app.ts +++ b/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/app.ts @@ -4,12 +4,14 @@ import express, { Express } from "express"; // import your files import { port } from "./config/initial.config"; import "./config/db.config"; + // initializing the app const app: Express = express(); app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`Server running on http://localhost:/${port}/`); }); diff --git a/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/config/db.config.ts b/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/config/db.config.ts index 3549d30a..13d9fb7f 100644 --- a/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/config/db.config.ts +++ b/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/config/db.config.ts @@ -1,7 +1,6 @@ import "reflect-metadata"; import { DataSource } from "typeorm"; import { EntityName } from "../entity/Entity"; -// import chalk from "chalk"; import { dbName, dbUrl } from "./initial.config"; const AppDataSource = new DataSource({ @@ -12,7 +11,7 @@ const AppDataSource = new DataSource({ }); AppDataSource.initialize() .then(async () => { - console.log(`connected to the database`); + console.log(`Connected to the database`); }) - .catch((error) => console.log(`to connect to the database: ${error}`)); + .catch((error) => console.error("Error connecting to database", error)); export default AppDataSource; diff --git a/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/routes/route.ts b/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/routes/route.ts index e69de29b..18b49770 100644 --- a/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/routes/route.ts +++ b/packages/yonode-templates/typescript/MySQL/TypeOrm/noAuth/src/routes/route.ts @@ -0,0 +1,5 @@ +import express from "express"; + +const routerName = express.Router(); + +export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/.gitignore b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/.gitignore new file mode 100644 index 00000000..e6367a1f --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/.gitignore @@ -0,0 +1,3 @@ +node_modules +.env +dist diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/README.md b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/README.md new file mode 100644 index 00000000..238b083d --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/README.md @@ -0,0 +1,25 @@ +# Yonode + TypeScript + PostgreSQL with Prisma + +This template simplifies setting up a server in [Yonode](https://yonode.org) with Node.js and Express, offering a quick start for server-side development. + +## Getting Started + +Initially, navigate to the .env file to set up the required environment variables. + +Next, launch the development server: + +```bash +npm start +# or +yarn start +# or +pnpm start +# or +bun start +``` + +The server is running and ready to serve requests. + +Now, Go to the Src directory and start building the server. + +Happy coding! diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/package-lock.json b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/package-lock.json new file mode 100644 index 00000000..fad00d36 --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/package-lock.json @@ -0,0 +1,2621 @@ +{ + "name": "yonode-api", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "yonode-api", + "version": "0.0.0", + "dependencies": { + "bcrypt": "^5.1.1", + "chalk": "5.3.0", + "cookie-parser": "^1.4.6", + "cors": "^2.8.5", + "dotenv": "^16.3.1", + "express": "^4.18.2", + "express-async-handler": "^1.2.0", + "express-rate-limit": "^7.1.5", + "helmet": "^7.0.0", + "joi": "^17.10.0", + "jsonwebtoken": "^9.0.2", + "morgan": "^1.10.0", + "nodemailer": "^6.9.9", + "prisma": "^5.9.1", + "uuidv4": "^6.2.13" + }, + "devDependencies": { + "@types/chalk": "^2.2.0", + "@types/cookie-parser": "^1.4.6", + "@types/cors": "^2.8.17", + "@types/dotenv": "^8.2.0", + "@types/express": "^4.17.21", + "@types/express-rate-limit": "^6.0.0", + "@types/helmet": "^4.0.0", + "@types/joi": "^17.2.3", + "@types/jsonwebtoken": "^9.0.5", + "@types/morgan": "^1.9.9", + "@types/node": "^20.11.18", + "@types/nodemailer": "^6.4.14", + "@types/uuidv4": "^5.0.0", + "nodemon": "^3.0.1", + "ts-node": "^10.9.2", + "typescript": "^5.3.3", + "yonode": "^0.5.0" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@hapi/hoek": { + "version": "9.3.0", + "license": "BSD-3-Clause" + }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@ljharb/through": { + "version": "2.3.12", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "license": "BSD-3-Clause", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@prisma/debug": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.10.0.tgz", + "integrity": "sha512-xBs8M4bGIBUqJ/9lZM+joEJkrNaGPKMUcK3a5JqUDQtwPDaWDTq24wOpkHfoJtvNbmGtlDl9Ky5HAbctN5+x7g==" + }, + "node_modules/@prisma/engines": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.10.0.tgz", + "integrity": "sha512-9NVgMD3bjB5fsxVnrqbasZG3PwurfI2/XKhFfKuZulVRldm5Nz/SJ38t+o0DcOoOmuYMrY4R+UFO57QAB6hCeA==", + "hasInstallScript": true, + "dependencies": { + "@prisma/debug": "5.10.0", + "@prisma/engines-version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", + "@prisma/fetch-engine": "5.10.0", + "@prisma/get-platform": "5.10.0" + } + }, + "node_modules/@prisma/engines-version": { + "version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9.tgz", + "integrity": "sha512-uCy/++3Jx/O3ufM+qv2H1L4tOemTNqcP/gyEVOlZqTpBvYJUe0tWtW0y3o2Ueq04mll4aM5X3f6ugQftOSLdFQ==" + }, + "node_modules/@prisma/fetch-engine": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.10.0.tgz", + "integrity": "sha512-6A7Rh7ItuenDo0itgJ8V90cTeLejN1+vUjUzgdonhcNN+7UhZczZfEGe16nI+steW6+ScB5O8+LZybRLNBb0HA==", + "dependencies": { + "@prisma/debug": "5.10.0", + "@prisma/engines-version": "5.10.0-34.5a9203d0590c951969e85a7d07215503f4672eb9", + "@prisma/get-platform": "5.10.0" + } + }, + "node_modules/@prisma/get-platform": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.10.0.tgz", + "integrity": "sha512-pSxK2RTVhnG6FVkTlSBdBPuvf8087VliR1MMF5ca8/loyY07FtvYF02SP9ZQZITvbZ+6XX1LTwo8WjIp/EHgIQ==", + "dependencies": { + "@prisma/debug": "5.10.0" + } + }, + "node_modules/@sideway/address": { + "version": "4.1.5", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "license": "BSD-3-Clause" + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "license": "BSD-3-Clause" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/chalk": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cookie-parser": { + "version": "1.4.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.17", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/dotenv": { + "version": "8.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "dotenv": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.21", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-rate-limit": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "express-rate-limit": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.43", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/helmet": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "helmet": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/joi": { + "version": "17.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "joi": "*" + } + }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/morgan": { + "version": "1.9.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "20.11.19", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/nodemailer": { + "version": "6.4.14", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.11", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "license": "MIT" + }, + "node_modules/@types/uuidv4": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "uuidv4": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "license": "ISC" + }, + "node_modules/accepts": { + "version": "1.3.8", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.11.3", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/bcrypt": { + "version": "5.1.1", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.11", + "node-addon-api": "^5.0.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "license": "BSD-3-Clause" + }, + "node_modules/bytes": { + "version": "3.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "dev": true, + "license": "MIT" + }, + "node_modules/chokidar": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/color-support": { + "version": "1.1.3", + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/commander": { + "version": "12.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "license": "ISC" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.4.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-parser": { + "version": "1.4.6", + "license": "MIT", + "dependencies": { + "cookie": "0.4.1", + "cookie-signature": "1.0.6" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.5", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/depd": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.0.2", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dotenv": { + "version": "16.4.4", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express-async-handler": { + "version": "1.2.0", + "license": "MIT" + }, + "node_modules/express-rate-limit": { + "version": "7.1.5", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": "4 || 5 || ^5.0.0-beta.1" + } + }, + "node_modules/express/node_modules/cookie": { + "version": "0.5.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gauge": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "license": "ISC" + }, + "node_modules/hasown": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/helmet": { + "version": "7.1.0", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "dev": true, + "license": "ISC" + }, + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/inquirer": { + "version": "9.2.14", + "dev": true, + "license": "MIT", + "dependencies": { + "@ljharb/through": "^2.3.12", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^3.2.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/joi": { + "version": "17.12.1", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/jwa": { + "version": "1.4.1", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "license": "MIT", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "license": "MIT" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "license": "MIT" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "license": "MIT" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "dev": true, + "license": "ISC" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "license": "MIT" + }, + "node_modules/methods": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/morgan": { + "version": "1.10.0", + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/on-finished": { + "version": "2.3.0", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "1.0.0", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/nodemailer": { + "version": "6.9.9", + "license": "MIT-0", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/nodemon": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/nodemon/node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/nopt": { + "version": "5.0.0", + "license": "ISC", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npmlog": { + "version": "5.0.1", + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prisma": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.10.0.tgz", + "integrity": "sha512-uN3jT1v1XP12tvatsBsMUDC/aK+3kA2VUXznl3UutgK4XHdVjM3SBW8bFb/bT9dHU40apwsEazUK9M/vG13YmA==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines": "5.10.0" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": ">=16.13" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "dev": true, + "license": "MIT" + }, + "node_modules/qs": { + "version": "6.11.0", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-async": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.6.0", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "license": "MIT", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.0.5", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tar": { + "version": "6.2.0", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/touch/node_modules/nopt": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "license": "MIT" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "5.26.5", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/uuidv4": { + "version": "6.2.13", + "license": "MIT", + "dependencies": { + "@types/uuid": "8.3.4", + "uuid": "8.3.2" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/vary": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/yallist": { + "version": "4.0.0", + "license": "ISC" + }, + "node_modules/yn": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yonode": { + "version": "0.5.6", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^12.0.0", + "inquirer": "^9.2.14" + }, + "bin": { + "yonode": "src/index.js" + }, + "engines": { + "node": ">=0.10.0" + } + } + } +} diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/package.json b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/package.json new file mode 100644 index 00000000..c5518214 --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/package.json @@ -0,0 +1,47 @@ +{ + "name": "yonode-api", + "version": "0.0.0", + "private": true, + "main": "./src/app.ts", + "scripts": { + "start": "tsx src/app.ts", + "dev": "nodemon -x tsx src/app.ts", + "build": "tsc" + }, + "dependencies": { + "bcrypt": "^5.1.1", + "chalk": "5.3.0", + "cookie-parser": "^1.4.6", + "cors": "^2.8.5", + "dotenv": "^16.3.1", + "express": "^4.18.2", + "express-async-handler": "^1.2.0", + "express-rate-limit": "^7.1.5", + "helmet": "^7.0.0", + "joi": "^17.10.0", + "jsonwebtoken": "^9.0.2", + "morgan": "^1.10.0", + "nodemailer": "^6.9.9", + "prisma": "^5.9.1", + "uuidv4": "^6.2.13" + }, + "devDependencies": { + "@types/chalk": "^2.2.0", + "@types/cookie-parser": "^1.4.6", + "@types/cors": "^2.8.17", + "@types/dotenv": "^8.2.0", + "@types/express": "^4.17.21", + "@types/express-rate-limit": "^6.0.0", + "@types/helmet": "^4.0.0", + "@types/joi": "^17.2.3", + "@types/jsonwebtoken": "^9.0.5", + "@types/morgan": "^1.9.9", + "@types/node": "^20.11.18", + "@types/nodemailer": "^6.4.14", + "@types/uuidv4": "^5.0.0", + "nodemon": "^3.0.1", + "ts-node": "^10.9.2", + "typescript": "^5.3.3", + "yonode": "^0.5.0" + } +} diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/client.js b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/client.js new file mode 100644 index 00000000..ee102c36 --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/client.js @@ -0,0 +1,14 @@ +import { PrismaClient } from "@prisma/client"; + +let prisma; + +if (process.env.NODE_ENV === "production") { + prisma = new PrismaClient(); +} else { + if (!globalThis.prisma) { + globalThis.prisma = new PrismaClient(); + } + prisma = globalThis.prisma; +} + +export default prisma; diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/schema.prisma b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/schema.prisma new file mode 100644 index 00000000..681fe9f2 --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/prisma/schema.prisma @@ -0,0 +1,16 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +model User { + id Int @id @default(autoincrement()) + +} diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/app.ts b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/app.ts new file mode 100644 index 00000000..ed8a010d --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/app.ts @@ -0,0 +1,13 @@ +// import the packages +import express, { Express } from "express"; +import { port } from "config/initial.config"; + +// initializing the app +const app: Express = express(); +app.use(express.json()); + +// rest of your code here + +app.listen(port, () => { + console.log(`Server running on http://localhost:/${port}/`); +}); diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/config/initial.config.ts b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/config/initial.config.ts new file mode 100644 index 00000000..3e7b4524 --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/config/initial.config.ts @@ -0,0 +1,5 @@ +import dotenv from "dotenv"; + +dotenv.config(); + +export const port = process.env.SERVER_PORT || 8000; diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/controllers/controller.ts b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/controllers/controller.ts new file mode 100644 index 00000000..7d2a6d65 --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/controllers/controller.ts @@ -0,0 +1,6 @@ +import { Request, Response } from "express"; + +export const controller = async (req: Request, res: Response) => { + try { + } catch (error) {} +}; diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/middlewares/middleware.ts b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/middlewares/middleware.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/routes/router.ts b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/routes/router.ts new file mode 100644 index 00000000..18b49770 --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/routes/router.ts @@ -0,0 +1,5 @@ +import express from "express"; + +const routerName = express.Router(); + +export default routerName; \ No newline at end of file diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/utils/utils.ts b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/src/utils/utils.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/tsconfig.json b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/tsconfig.json new file mode 100644 index 00000000..f4de6f4c --- /dev/null +++ b/packages/yonode-templates/typescript/PostgreSQL/Prisma/Noauth/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "target": "ES2020", + "baseUrl": "src", + "outDir": "./dist", + "sourceMap": true, + "noImplicitAny": true + }, + "include": ["src/**/*"] +} diff --git a/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/app.ts b/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/app.ts index 919cc5ad..37aef74f 100644 --- a/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/app.ts +++ b/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/app.ts @@ -4,12 +4,14 @@ import express, { Express } from "express"; // import your files import { port } from "./config/initial.config"; import "./config/db.config"; + // initializing the app const app: Express = express(); app.use(express.json()); // rest of your code here + app.listen(port, () => { console.log(`Server running on http://localhost:/${port}/`); }); diff --git a/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/config/db.config.ts b/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/config/db.config.ts index d553bbf1..f07b36ba 100644 --- a/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/config/db.config.ts +++ b/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/config/db.config.ts @@ -1,7 +1,6 @@ import "reflect-metadata"; import { DataSource } from "typeorm"; import { EntityName } from "../entity/Entity"; -// import chalk from "chalk"; import { dbName, dbUrl } from "./initial.config"; const AppDataSource = new DataSource({ @@ -12,7 +11,7 @@ const AppDataSource = new DataSource({ }); AppDataSource.initialize() .then(async () => { - console.log(`connected to the database`); + console.log(`Connected to the database`); }) - .catch((error) => console.log(`to connect to the database: ${error}`)); + .catch((error) => console.error("Error connecting to database", error)); export default AppDataSource; diff --git a/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/routes/route.ts b/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/routes/route.ts index e69de29b..18b49770 100644 --- a/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/routes/route.ts +++ b/packages/yonode-templates/typescript/PostgreSQL/TypeOrm/noAuth/src/routes/route.ts @@ -0,0 +1,5 @@ +import express from "express"; + +const routerName = express.Router(); + +export default routerName; \ No newline at end of file diff --git a/packages/yonode/CHANGELOG.md b/packages/yonode/CHANGELOG.md index 6b899b50..a1ca36c2 100644 --- a/packages/yonode/CHANGELOG.md +++ b/packages/yonode/CHANGELOG.md @@ -1,11 +1,44 @@ +# 0.6.0-beta (2024-02-23) + +## What's Changed +* added v0.5.6 CHANGELOG.md by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/152 +* Sharafdin by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/153 +* started mongoose with AUTH by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/155 +* updated all of the templates by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/156 +* Sharafdin by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/157 +* started typescript version of mongoDB with Mongoose for noAuth by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/158 +* Completed NoAuth MongoDB with Mongoose for TypeScript by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/160 +* Removed MongoDB Mongoose Auth for TypeScript. by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/161 +* Tood by [@Omar-Tood](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/163 +* finished ts-mongodb-typeorm noAuth api-template by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/162 +* Merge pull request #162 from sharafdin/tman by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/164 +* change ts-node into tsx by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/165 +* fixed mysql and postgresql by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/168 +* fix: Update README.md by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/169 +* initializing typescript with Prisma by [@Omar-Tood](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/170 +* Customized project: Node.js, TypeScript, Sequelize by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/172 +* Merge pull request #172 from sharafdin/miirshe by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/173 +* Completed: Node.js, TypeScript, Sequelize + Postgresql by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/174 +* finished the ts-prisma with postgresql by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/175 +* Customized Project: Nodejs-Express-Typescript-Mysql by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/176 +* fix: added route.ts in routes folder by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/180 +* Fix: added routes.ts in routes folder by [@AbdullahiKhalif](https://github.com/AbdullahiKhalif) in https://github.com/sharafdin/yonode/pull/181 +* Fixed: added routes.ts in routes folder specially PostgreSQL part by [@AbdullahiKhalif](https://github.com/AbdullahiKhalif) in https://github.com/sharafdin/yonode/pull/182 +* changed nodemoon structure by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/183 +* removed test script in package.json file by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/184 +* Sharafdin by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/186 +* release: v0.6.0 by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/187 + +**Full Changelog**: https://github.com/sharafdin/yonode/compare/v0.5.6...v0.6.0-beta + # 0.5.6 (2024-02-14) ## What's Changed -* modified some comments in .env.examples by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/144 -* updated yonode templates by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/145 -* updated yonode templates by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/146 -* removed all the templates by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/147 -* publish: added patch version by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/150 +* modified some comments in .env.examples by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/144 +* updated yonode templates by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/145 +* updated yonode templates by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/146 +* removed all the templates by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/147 +* publish: added patch version by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/150 **Full Changelog**: https://github.com/sharafdin/yonode/compare/v0.5.5-beta...v0.5.6 @@ -13,7 +46,7 @@ # 0.5.5-beta (2024-02-12) ## What's Changed -* fixed the custum error when installing in the same folder by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/99 +* fixed the custum error when installing in the same folder by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/99 **Full Changelog**: https://github.com/sharafdin/yonode/compare/v0.5.4-beta...v0.5.5-beta @@ -21,9 +54,9 @@ # 0.5.4-beta (2024-02-12) ## What's Changed -* completed fixed the templated name for windows by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/96 -* Sharafdin by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/97 -* custom error: when you installing the same folder and the folder already exists files by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/98 +* completed fixed the templated name for windows by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/96 +* Sharafdin by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/97 +* custom error: when you installing the same folder and the folder already exists files by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/98 **Full Changelog**: https://github.com/sharafdin/yonode/compare/v0.5.3-beta...v0.5.4-beta @@ -31,10 +64,10 @@ # 0.5.3-beta (2024-02-11) ## What's Changed -* added noAuth example in .env.example file by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/89 -* added comments .env.example file by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/90 -* changed the terminal space and change the structure of the template c… by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/91 -* added 1 patch version by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/92 +* added noAuth example in .env.example file by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/89 +* added comments .env.example file by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/90 +* changed the terminal space and change the structure of the template c… by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/91 +* added 1 patch version by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/92 **Full Changelog**: https://github.com/sharafdin/yonode/compare/v0.5.2.beta...v0.5.3-beta @@ -42,67 +75,67 @@ # 0.5.2-beta (2024-02-10) ## What's Changed -* changed packages structure by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/1 -* configured db connection by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/2 -* added user model by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/3 -* added model, controller, routes, email by ([@isasharafdin](https://github.com/isasharafdin)) in https://github.com/sharafdin/yonode/pull/4 -* added model, controller, routes, email by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/5 -* added api-template in every issues by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/10 -* added api-template in every issues by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/11 -* started the template by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/12 -* created package.json and now has been started by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/13 -* try to work branch by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/14 -* Miirshe by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/15 -* Miirshe by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/16 -* Tood by [@Omar-Tood](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/17 -* Tman by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/18 -* Tood by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/19 -* started building the package by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/20 -* added CHANGELOG.md file by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/21 -* added MIT LICENSE by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/22 -* added README.md by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/23 -* changed the strcuture of the templates by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/24 -* implamented prisma by [@Omar-Tood](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/25 -* Tood by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/26 -* changed the strcuture of the templates by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/27 -* complated the prisma setp by [@Omar-Tood](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/29 -* Tood by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/30 -* updating miirshe branch by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/31 -* updating miirshe brancht #31 by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/32 -* now completed Auth and NoAuth set up mvc except model and also installed a lots packages by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/33 -* added noAuth db connection by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/34 -* finished typeorm noAuth Api by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/35 -* modified Entity schema name by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/36 -* Tman 1 by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/37 -* Tman by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/38 -* added CODE_OF_CONDUCT by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/39 -* fixed file cached by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/40 -* Update .gitignore by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/41 -* added readme and changed the security by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/42 -* removed the unsupported mongodb orms by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/43 -* fixed typeorm noAuth and started Auth by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/44 -* Sharafdin by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/45 -* completed set up Auth and NoAuth of mvc except model instead of using… by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/46 -* started type orm Aut structered the mvc by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/50 -* added mysql typeorm noAuth api-template by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/51 -* Completed set up of Auth and NoAuth of Mysql with Sequelize ORM by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/52 -* Initializing App specal NoAuth direcotory and also removes empty spac… by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/53 -* Initializing App special Auth directory and also removes empty space … by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/54 -* complated msql/prisma by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/58 -* established prisma client by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/62 -* fixed PostgreSQL typeorm no by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/63 -* complated postgreSQL and Prisma by [@Omar-Tood](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/64 -* completed auth and no auth test user model with sequelize by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/65 -* completed set up of no auth Connecting to MySQL database with Sequeli… by [@Miirshe](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/66 -* checking complated prisma mySQL by [@Omar-Tood](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/69 -* Tman by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/70 -* changed to import appdatasource to import only by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/71 -* JS-PostgreSQL noAuth api-template fully Structrectured as js-mongoose… by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/72 -* added .env file by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/73 -* added .env file to all of the templates by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/74 -* completed Prisma and typeorm structure by [@abdinasir-Tman](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/76 -* Sharafdin by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/77 -* releasing beta version for noAuth by [@isasharafdin](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/88 +* changed packages structure by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/1 +* configured db connection by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/2 +* added user model by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/3 +* added model, controller, routes, email by ([[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin)) in https://github.com/sharafdin/yonode/pull/4 +* added model, controller, routes, email by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/5 +* added api-template in every issues by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/10 +* added api-template in every issues by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/11 +* started the template by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/12 +* created package.json and now has been started by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/13 +* try to work branch by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/14 +* Miirshe by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/15 +* Miirshe by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/16 +* Tood by [[@Omar-Tood](https://github.com/Omar-Tood)](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/17 +* Tman by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/18 +* Tood by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/19 +* started building the package by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/20 +* added CHANGELOG.md file by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/21 +* added MIT LICENSE by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/22 +* added README.md by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/23 +* changed the strcuture of the templates by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/24 +* implamented prisma by [[@Omar-Tood](https://github.com/Omar-Tood)](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/25 +* Tood by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/26 +* changed the strcuture of the templates by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/27 +* complated the prisma setp by [[@Omar-Tood](https://github.com/Omar-Tood)](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/29 +* Tood by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/30 +* updating miirshe branch by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/31 +* updating miirshe brancht #31 by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/32 +* now completed Auth and NoAuth set up mvc except model and also installed a lots packages by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/33 +* added noAuth db connection by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/34 +* finished typeorm noAuth Api by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/35 +* modified Entity schema name by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/36 +* Tman 1 by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/37 +* Tman by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/38 +* added CODE_OF_CONDUCT by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/39 +* fixed file cached by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/40 +* Update .gitignore by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/41 +* added readme and changed the security by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/42 +* removed the unsupported mongodb orms by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/43 +* fixed typeorm noAuth and started Auth by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/44 +* Sharafdin by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/45 +* completed set up Auth and NoAuth of mvc except model instead of using… by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/46 +* started type orm Aut structered the mvc by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/50 +* added mysql typeorm noAuth api-template by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/51 +* Completed set up of Auth and NoAuth of Mysql with Sequelize ORM by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/52 +* Initializing App specal NoAuth direcotory and also removes empty spac… by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/53 +* Initializing App special Auth directory and also removes empty space … by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/54 +* complated msql/prisma by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/58 +* established prisma client by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/62 +* fixed PostgreSQL typeorm no by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/63 +* complated postgreSQL and Prisma by [[@Omar-Tood](https://github.com/Omar-Tood)](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/64 +* completed auth and no auth test user model with sequelize by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/65 +* completed set up of no auth Connecting to MySQL database with Sequeli… by [[@Miirshe](https://github.com/Miirshe)](https://github.com/Miirshe) in https://github.com/sharafdin/yonode/pull/66 +* checking complated prisma mySQL by [[@Omar-Tood](https://github.com/Omar-Tood)](https://github.com/Omar-Tood) in https://github.com/sharafdin/yonode/pull/69 +* Tman by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/70 +* changed to import appdatasource to import only by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/71 +* JS-PostgreSQL noAuth api-template fully Structrectured as js-mongoose… by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/72 +* added .env file by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/73 +* added .env file to all of the templates by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/74 +* completed Prisma and typeorm structure by [[@abdinasir-Tman](https://github.com/abdinasir-Tman)](https://github.com/abdinasir-Tman) in https://github.com/sharafdin/yonode/pull/76 +* Sharafdin by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/77 +* releasing beta version for noAuth by [[@isasharafdin](https://github.com/isasharafdin)](https://github.com/isasharafdin) in https://github.com/sharafdin/yonode/pull/88 **Full Changelog**: https://github.com/sharafdin/yonode/commits/v0.5.2.beta diff --git a/packages/yonode/package.json b/packages/yonode/package.json index 5d8db02d..09248b79 100644 --- a/packages/yonode/package.json +++ b/packages/yonode/package.json @@ -1,7 +1,7 @@ { "name": "yonode", - "description": "A Web Server Framework for Node.js", - "version": "0.5.6", + "description": "The Node.js Toolkit for Rapid Development.", + "version": "0.7.0", "author": "Mr Sharafdin", "license": "MIT", "main": "./src/index.js", diff --git a/packages/yonode/src/index.js b/packages/yonode/src/index.js index 6d4b9bf5..ffe50102 100755 --- a/packages/yonode/src/index.js +++ b/packages/yonode/src/index.js @@ -2,137 +2,134 @@ /** * Yonode - * A Web Server Framework for Node.js + * The Node.js Toolkit for Rapid Development. * * @author Mr Sharafdin */ -import { execSync } from 'child_process'; -import fs from 'fs'; -import path, { basename } from 'path'; -import inquirer from 'inquirer'; -import './lib/programOptions.js'; -import { databaseType } from './lib/prompt/db.js'; -import { languageType } from './lib/questions.js'; +import { execSync } from "child_process"; +import fs from "fs"; +import path, { basename } from "path"; +import inquirer from "inquirer"; +import "./lib/programOptions.js"; +import { databaseType } from "./lib/prompt/db.js"; +import { languageType } from "./lib/questions.js"; export const options = { - language_type: '', - database_type: '', - orm_type: '', - auth: false -} - -const runCommand = command => { - try { - execSync(command, { stdio: 'inherit' }) - } catch (error) { - console.log(error); - return false; - } - return true; -} + language_type: "", + database_type: "", + orm_type: "", + auth: false, +}; + +const runCommand = (command) => { + try { + execSync(command, { stdio: "inherit" }); + } catch (error) { + console.log(error); + return false; + } + return true; +}; let cloneDirectory = process.cwd(); export const cloneRepo = (projectName, branchName) => { + let tempProjectName = basename(process.cwd()); + if (projectName === ".") { + console.log(`cloning the repository with name ${tempProjectName}`); + } - let tempProjectName = basename(process.cwd()); + const gitCloneCommand = `git clone --depth 1 -b ${branchName} https://github.com/sharafdin/yonode.git ${projectName}`; - if (projectName === '.') { - console.log(`cloning the repository with name ${tempProjectName}`); - } + const gitClone = runCommand(gitCloneCommand); - const gitCloneCommand = `git clone --depth 1 -b ${branchName} https://github.com/sharafdin/yonode.git ${projectName}` + if (!gitClone) process.exit(1); - const gitClone = runCommand(gitCloneCommand) + if (projectName === ".") { + const packageJsonPath = path.join(cloneDirectory, "package.json"); + const packageJson = fs.readFileSync(packageJsonPath).toString(); - if (!gitClone) process.exit(1); + const packageJsonData = JSON.parse(packageJson); - if (projectName === '.') { + packageJsonData["name"] = tempProjectName; - const packageJsonPath = path.join(cloneDirectory, 'package.json'); - const packageJson = fs.readFileSync(packageJsonPath).toString(); + fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonData, null, 2)); + console.log("\nCongratulations! follow these commands:\n"); + console.log(` npm install \n npm start`); + } else { + cloneDirectory = path.join(process.cwd(), projectName); - const packageJsonData = JSON.parse(packageJson) + const packageJsonPath = path.join(cloneDirectory, "package.json"); + const packageJson = fs.readFileSync(packageJsonPath).toString(); - packageJsonData['name'] = tempProjectName + const packageJsonData = JSON.parse(packageJson); - fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonData, null, 2)); + packageJsonData["name"] = projectName; - console.log('\nCongratulations! follow these commands:\n'); - console.log(` npm install \n npm start`); - } else { - cloneDirectory = path.join(process.cwd(), projectName); + fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonData, null, 2)); - const packageJsonPath = path.join(cloneDirectory, 'package.json'); - const packageJson = fs.readFileSync(packageJsonPath).toString(); + console.log("\nCongratulations! follow these commands:\n"); + console.log(` cd ${projectName} \n npm install \n npm start`); + } + process.exit(1); +}; - const packageJsonData = JSON.parse(packageJson) +export let projectName = process.argv[2]; - packageJsonData['name'] = projectName - - fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonData, null, 2)); - - console.log('\nCongratulations! follow these commands:\n'); - console.log(` cd ${projectName} \n npm install \n npm start`); - } +if (projectName === ".") { + const files = fs.readdirSync(cloneDirectory); + if (files.length) { + console.log("The directory is not empty."); process.exit(1); - - -} - -export let projectName = process.argv[2] - -if (projectName === '.') { - const files = fs.readdirSync(cloneDirectory); - - if (files.length) { - console.log("The directory is not empty."); - process.exit(1); - } + } } if (!projectName) { - console.log('please provide a repository name'); - inquirer.prompt( - { - type: "input", - name: "projectName", - message: "What is your project name?", - default: 'yonode-app' - }, - ).then(name => { - if (name.projectName === '.') { - const files = fs.readdirSync(cloneDirectory); - - if (files.length) { - console.log("The directory is not empty."); - process.exit(1); - } - projectName = name.projectName, main() - } else { projectName = name.projectName, main() } + console.log("please provide a repository name"); + inquirer + .prompt({ + type: "input", + name: "projectName", + message: "What is your project name?", + default: "yonode-app", }) + .then((name) => { + if (name.projectName === ".") { + const files = fs.readdirSync(cloneDirectory); + + if (files.length) { + console.log("The directory is not empty."); + process.exit(1); + } + (projectName = name.projectName), main(); + } else { + (projectName = name.projectName), main(); + } + }); } else { - main() + main(); } function main() { - inquirer - .prompt(languageType) - .then((answer) => { - if (answer.language_type === 'JavaScript') { - options.language_type = answer.language_type - databaseType() - } else { - console.log('sorry, typescript is not available'); - } - }) - .catch((error) => { - if (error.isTtyError) { - } else { - } - }); + inquirer + .prompt(languageType) + .then((answer) => { + if (answer.language_type === "TypeScript") { + console.log( + "Currently, TypeScript is unavailable. Expect its launch in v1.5.0. \nFor more info, visit: https://www.docs.yonode.org." + ); + process.exit(0); + } + options.language_type = answer.language_type; + databaseType(); + }) + .catch((error) => { + if (error.isTtyError) { + } else { + } + }); } diff --git a/packages/yonode/src/lib/repoConditions.js b/packages/yonode/src/lib/repoConditions.js index 66e683d3..92dfd12c 100644 --- a/packages/yonode/src/lib/repoConditions.js +++ b/packages/yonode/src/lib/repoConditions.js @@ -1,34 +1,119 @@ import { cloneRepo, options, projectName } from "../index.js"; export const repoConditions = () => { + switch (true) { + // JavaScript - switch (true) { - // MongoDB - case options.language_type === 'JavaScript' && options.database_type === 'MongoDB' && options.orm_type === 'Mongoose' && options.auth === false: - cloneRepo(projectName, 'JS-MongoDB-Mongoose-NoAuth-Template'); - break; - case options.language_type === 'JavaScript' && options.database_type === 'MongoDB' && options.orm_type === 'Prisma' && options.auth === false: - cloneRepo(projectName, 'JS-MongoDB-Prisma-NoAuth-Template'); - break; - case options.language_type === 'JavaScript' && options.database_type === 'MongoDB' && options.orm_type === 'TypeORM' && options.auth === false: - cloneRepo(projectName, 'JS-MongoDB-TypeORM-NoAuth-Template'); - break; - // MySQL - case options.language_type === 'JavaScript' && options.database_type === 'MySQL' && options.orm_type === 'Prisma' && options.auth === false: - cloneRepo(projectName, 'JS-MySQL-Prisma-NoAuth-Template'); - case options.language_type === 'JavaScript' && options.database_type === 'MySQL' && options.orm_type === 'Sequelize' && options.auth === false: - cloneRepo(projectName, 'JS-MySQL-Sequelize-NoAuth-Template'); - case options.language_type === 'JavaScript' && options.database_type === 'MySQL' && options.orm_type === 'TypeORM' && options.auth === false: - cloneRepo(projectName, 'JS-MySQL-TypeORM-NoAuth-Template'); - // PostgreSQL - case options.language_type === 'JavaScript' && options.database_type === 'PostgreSQL' && options.orm_type === 'Prisma' && options.auth === false: - cloneRepo(projectName, 'JS-PostgreSQL-Prisma-NoAuth-Template'); - case options.language_type === 'JavaScript' && options.database_type === 'PostgreSQL' && options.orm_type === 'Sequelize' && options.auth === false: - cloneRepo(projectName, 'JS-PostgreSQL-Sequelize-NoAuth-Template'); - case options.language_type === 'JavaScript' && options.database_type === 'PostgreSQL' && options.orm_type === 'TypeORM' && options.auth === false: - cloneRepo(projectName, 'JS-PostgreSQL-TypeORM-NoAuth-Template'); - break; - default: - throw new Error ('unsupported option') - } -} + // MongoDB + case options.language_type === "JavaScript" && + options.database_type === "MongoDB" && + options.orm_type === "Mongoose" && + options.auth === false: + cloneRepo(projectName, "JS-MongoDB-Mongoose-NoAuth-Template"); + break; + case options.language_type === "JavaScript" && + options.database_type === "MongoDB" && + options.orm_type === "Prisma" && + options.auth === false: + cloneRepo(projectName, "JS-MongoDB-Prisma-NoAuth-Template"); + break; + case options.language_type === "JavaScript" && + options.database_type === "MongoDB" && + options.orm_type === "TypeORM" && + options.auth === false: + cloneRepo(projectName, "JS-MongoDB-TypeORM-NoAuth-Template"); + break; + // MySQL + case options.language_type === "JavaScript" && + options.database_type === "MySQL" && + options.orm_type === "Prisma" && + options.auth === false: + cloneRepo(projectName, "JS-MySQL-Prisma-NoAuth-Template"); + case options.language_type === "JavaScript" && + options.database_type === "MySQL" && + options.orm_type === "Sequelize" && + options.auth === false: + cloneRepo(projectName, "JS-MySQL-Sequelize-NoAuth-Template"); + case options.language_type === "JavaScript" && + options.database_type === "MySQL" && + options.orm_type === "TypeORM" && + options.auth === false: + cloneRepo(projectName, "JS-MySQL-TypeORM-NoAuth-Template"); + // PostgreSQL + case options.language_type === "JavaScript" && + options.database_type === "PostgreSQL" && + options.orm_type === "Prisma" && + options.auth === false: + cloneRepo(projectName, "JS-PostgreSQL-Prisma-NoAuth-Template"); + case options.language_type === "JavaScript" && + options.database_type === "PostgreSQL" && + options.orm_type === "Sequelize" && + options.auth === false: + cloneRepo(projectName, "JS-PostgreSQL-Sequelize-NoAuth-Template"); + case options.language_type === "JavaScript" && + options.database_type === "PostgreSQL" && + options.orm_type === "TypeORM" && + options.auth === false: + cloneRepo(projectName, "JS-PostgreSQL-TypeORM-NoAuth-Template"); + break; + + // TypeScript + + // MongoDB + // case options.language_type === "TypeScript" && + // options.database_type === "MongoDB" && + // options.orm_type === "Mongoose" && + // options.auth === false: + // cloneRepo(projectName, "TS-MongoDB-Mongoose-NoAuth-Template"); + // break; + // case options.language_type === "TypeScript" && + // options.database_type === "MongoDB" && + // options.orm_type === "Prisma" && + // options.auth === false: + // cloneRepo(projectName, "TS-MongoDB-Prisma-NoAuth-Template"); + // break; + // case options.language_type === "TypeScript" && + // options.database_type === "MongoDB" && + // options.orm_type === "TypeORM" && + // options.auth === false: + // cloneRepo(projectName, "TS-MongoDB-TypeORM-NoAuth-Template"); + // break; + // // MySQL + // case options.language_type === "TypeScript" && + // options.database_type === "MySQL" && + // options.orm_type === "Prisma" && + // options.auth === false: + // cloneRepo(projectName, "TS-MySQL-Prisma-NoAuth-Template"); + // case options.language_type === "TypeScript" && + // options.database_type === "MySQL" && + // options.orm_type === "Sequelize" && + // options.auth === false: + // cloneRepo(projectName, "TS-MySQL-Sequelize-NoAuth-Template"); + // case options.language_type === "TypeScript" && + // options.database_type === "MySQL" && + // options.orm_type === "TypeORM" && + // options.auth === false: + // cloneRepo(projectName, "TS-MySQL-TypeORM-NoAuth-Template"); + // break; + // // PostgreSQL + // case options.language_type === "TypeScript" && + // options.database_type === "PostgreSQL" && + // options.orm_type === "Prisma" && + // options.auth === false: + // cloneRepo(projectName, "TS-PostgreSQL-Prisma-NoAuth-Template"); + // case options.language_type === "TypeScript" && + // options.database_type === "PostgreSQL" && + // options.orm_type === "Sequelize" && + // options.auth === false: + // cloneRepo(projectName, "TS-PostgreSQL-Sequelize-NoAuth-Template"); + // case options.language_type === "TypeScript" && + // options.database_type === "PostgreSQL" && + // options.orm_type === "TypeORM" && + // options.auth === false: + // cloneRepo(projectName, "TS-PostgreSQL-TypeORM-NoAuth-Template"); + // break; + + default: + throw new Error("unsupported option"); + } +};