create-prod-backend 1.2.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,17 +79,18 @@ npx create-prod-backend
79
79
  ---
80
80
 
81
81
  ## Supported Dependencies
82
-
83
82
  * express
84
- * nodemon
85
83
  * cors
86
- * bcryptjs
87
84
  * dotenv
88
- * jsonwebtoken
89
85
  * cookie-parser
90
- * cloudinary
91
- * multer
92
- * mongoose (optional)
86
+ * nodemon (devDependency)
87
+ * bcryptjs (Optional)
88
+ * zod (Optional)
89
+ * argon2 (Optional)
90
+ * jsonwebtoken (Optional)
91
+ * cloudinary (Optional)
92
+ * multer (Optional)
93
+ * mongoose (Optional)
93
94
 
94
95
  ---
95
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prod-backend",
3
- "version": "1.2.5",
3
+ "version": "1.3.6",
4
4
  "description": "A cli tool to generate a production-ready backend boilerplate with Express.js, MongoDB, and essential features.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -24,9 +24,10 @@ export default [
24
24
  message: chalk.bold.yellow("Do you want .env?"),
25
25
  },
26
26
  {
27
- type: "confirm",
27
+ type: "select",
28
28
  name: "auth",
29
- message: chalk.bold.yellow("Add Authentication (JWT + bcrypt)?"),
29
+ message: chalk.bold.yellow("Add Authentication : "),
30
+ choices: ["No Authentication", "JWT + bcryptjs", "JWT + argon2"],
30
31
  },
31
32
 
32
33
  {
@@ -4,7 +4,8 @@ import { execSync } from "child_process";
4
4
  export function installDeps(projectPath, answer) {
5
5
  let deps = ["express","cors","dotenv","cookie-parser"];
6
6
 
7
- if(answer.auth) deps.push("jsonwebtoken", "bcrypt");
7
+ if(answer.auth === "JWT + bcryptjs") deps.push("jsonwebtoken", "bcryptjs");
8
+ if(answer.auth === "JWT + argon2") deps.push("jsonwebtoken", "argon2");
8
9
  if(answer.validation) deps.push("zod");
9
10
  if(answer.fileUpload) deps.push("multer", "cloudinary");
10
11
  if(answer.devTools) deps.push("nodemon");