diff --git a/packages/yonode/src/lib/repoConditions.js b/packages/yonode/src/lib/repoConditions.js index 164bdcb1..18e61189 100644 --- a/packages/yonode/src/lib/repoConditions.js +++ b/packages/yonode/src/lib/repoConditions.js @@ -65,60 +65,52 @@ export const repoConditions = () => { options.orm_type === "Mongoose" && options.auth === true: cloneRepo(projectName, "JS-MongoDB-Mongoose-Auth-Template"); - console.log('This Template is Not Available right now!'); break; case options.language_type === "JavaScript" && options.database_type === "MongoDB" && options.orm_type === "Prisma" && options.auth === true: - // cloneRepo(projectName, "JS-MongoDB-Prisma-Auth-Template"); - console.log('This Template is Not Available right now!'); + cloneRepo(projectName, "JS-MongoDB-Prisma-Auth-Template"); break; case options.language_type === "JavaScript" && options.database_type === "MongoDB" && options.orm_type === "TypeORM" && options.auth === true: - // cloneRepo(projectName, "JS-MongoDB-TypeORM-Auth-Template"); - console.log('This Template is Not Available right now!'); + cloneRepo(projectName, "JS-MongoDB-TypeORM-Auth-Template"); break; // MySQL case options.language_type === "JavaScript" && options.database_type === "MySQL" && options.orm_type === "Prisma" && options.auth === true: - // cloneRepo(projectName, "JS-MySQL-Prisma-Auth-Template"); - console.log('This Template is Not Available right now!'); + cloneRepo(projectName, "JS-MySQL-Prisma-Auth-Template"); case options.language_type === "JavaScript" && options.database_type === "MySQL" && options.orm_type === "Sequelize" && options.auth === true: - // cloneRepo(projectName, "JS-MySQL-Sequelize-Auth-Template"); - console.log('This Template is Not Available right now!'); + cloneRepo(projectName, "JS-MySQL-Sequelize-Auth-Template"); case options.language_type === "JavaScript" && options.database_type === "MySQL" && options.orm_type === "TypeORM" && options.auth === true: - // cloneRepo(projectName, "JS-MySQL-TypeORM-Auth-Template"); - console.log('This Template is Not Available right now!'); + cloneRepo(projectName, "JS-MySQL-TypeORM-Auth-Template"); // PostgreSQL case options.language_type === "JavaScript" && options.database_type === "PostgreSQL" && options.orm_type === "Prisma" && options.auth === true: - // cloneRepo(projectName, "JS-PostgreSQL-Prisma-Auth-Template"); - console.log('This Template is Not Available right now!'); + cloneRepo(projectName, "JS-PostgreSQL-Prisma-Auth-Template"); case options.language_type === "JavaScript" && options.database_type === "PostgreSQL" && options.orm_type === "Sequelize" && options.auth === true: - // cloneRepo(projectName, "JS-PostgreSQL-Sequelize-Auth-Template"); + cloneRepo(projectName, "JS-PostgreSQL-Sequelize-Auth-Template"); console.log('This Template is Not Available right now!'); case options.language_type === "JavaScript" && options.database_type === "PostgreSQL" && options.orm_type === "TypeORM" && options.auth === true: - // cloneRepo(projectName, "JS-PostgreSQL-TypeORM-Auth-Template"); - console.log('This Template is Not Available right now!'); + cloneRepo(projectName, "JS-PostgreSQL-TypeORM-Auth-Template"); break; // TypeScript diff --git a/packages/yonode/src/orm/mongoDB.js b/packages/yonode/src/orm/mongoDB.js index b189829c..7d6817df 100644 --- a/packages/yonode/src/orm/mongoDB.js +++ b/packages/yonode/src/orm/mongoDB.js @@ -1,27 +1,26 @@ -import inquirer from 'inquirer' -import { options } from '../index.js'; -import { mongodbOrmQuestion } from '../lib/questions.js'; -import { authType } from '../lib/prompt/auth.js'; +import inquirer from "inquirer"; +import { options } from "../index.js"; +import { mongodbOrmQuestion } from "../lib/questions.js"; +import { authType } from "../lib/prompt/auth.js"; export const mongodbOrm = () => { - inquirer.prompt( - mongodbOrmQuestion - ).then(answer => { - if (answer.mongodb_orm === 'Mongoose') { - options.orm_type = answer.mongodb_orm - authType() - } else if (answer.mongodb_orm === 'Prisma') { - options.orm_type = answer.mongodb_orm - authType() - } - else { - options.orm_type = answer.mongodb_orm - authType() - } + inquirer + .prompt(mongodbOrmQuestion) + .then((answer) => { + if (answer.mongodb_orm === "Mongoose") { + options.orm_type = answer.mongodb_orm; + authType(); + } else if (answer.mongodb_orm === "Prisma") { + options.orm_type = answer.mongodb_orm; + authType(); + } else { + options.orm_type = answer.mongodb_orm; + authType(); + } }) - .catch((error) => { - if (error.isTtyError) { - } else { - } - }); -} \ No newline at end of file + .catch((error) => { + if (error.isTtyError) { + } else { + } + }); +};