Skip to content

Commit

Permalink
Fix repo cloning issues in repoConditions #447
Browse files Browse the repository at this point in the history
Fix repo cloning issues in repoConditions
  • Loading branch information
sharafdin authored May 8, 2024
2 parents 619168d + d61297f commit 66082af
Showing 1 changed file with 10 additions and 56 deletions.
66 changes: 10 additions & 56 deletions packages/yonode/src/lib/repoConditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,32 @@ export const repoConditions = () => {
options.orm_type === "Prisma" &&
options.auth === false:
cloneRepo(projectName, "JS-MySQL-Prisma-NoAuth-Template");
break;
case options.language_type === "JavaScript" &&
options.database_type === "MySQL" &&
options.orm_type === "Sequelize" &&
options.auth === false:
cloneRepo(projectName, "JS-MySQL-Sequelize-NoAuth-Template");
break;
case options.language_type === "JavaScript" &&
options.database_type === "MySQL" &&
options.orm_type === "TypeORM" &&
options.auth === false:
cloneRepo(projectName, "JS-MySQL-TypeORM-NoAuth-Template");
break;
// PostgreSQL
case options.language_type === "JavaScript" &&
options.database_type === "PostgreSQL" &&
options.orm_type === "Prisma" &&
options.auth === false:
cloneRepo(projectName, "JS-PostgreSQL-Prisma-NoAuth-Template");
break;
case options.language_type === "JavaScript" &&
options.database_type === "PostgreSQL" &&
options.orm_type === "Sequelize" &&
options.auth === false:
cloneRepo(projectName, "JS-PostgreSQL-Sequelize-NoAuth-Template");
break;
case options.language_type === "JavaScript" &&
options.database_type === "PostgreSQL" &&
options.orm_type === "TypeORM" &&
Expand Down Expand Up @@ -90,91 +95,40 @@ export const repoConditions = () => {
options.orm_type === "Prisma" &&
options.auth === true:
cloneRepo(projectName, "JS-MySQL-Prisma-Auth-Template");
break;
case options.language_type === "JavaScript" &&
options.database_type === "MySQL" &&
options.orm_type === "Sequelize" &&
options.auth === true:
cloneRepo(projectName, "JS-MySQL-Sequelize-Auth-Template");
break;
case options.language_type === "JavaScript" &&
options.database_type === "MySQL" &&
options.orm_type === "TypeORM" &&
options.auth === true:
cloneRepo(projectName, "JS-MySQL-TypeORM-Auth-Template");
break;
// PostgreSQL
case options.language_type === "JavaScript" &&
options.database_type === "PostgreSQL" &&
options.orm_type === "Prisma" &&
options.auth === true:
cloneRepo(projectName, "JS-PostgreSQL-Prisma-Auth-Template");
break;
case options.language_type === "JavaScript" &&
options.database_type === "PostgreSQL" &&
options.orm_type === "Sequelize" &&
options.auth === true:
cloneRepo(projectName, "JS-PostgreSQL-Sequelize-Auth-Template");
console.log('This Template is Not Available right now!');
break;
case options.language_type === "JavaScript" &&
options.database_type === "PostgreSQL" &&
options.orm_type === "TypeORM" &&
options.auth === true:
cloneRepo(projectName, "JS-PostgreSQL-TypeORM-Auth-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");
}
Expand Down

0 comments on commit 66082af

Please sign in to comment.