create-prod-backend 1.2.5 → 1.3.5

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
@@ -80,16 +80,23 @@ npx create-prod-backend
80
80
 
81
81
  ## Supported Dependencies
82
82
 
83
+ # Must have
83
84
  * express
84
- * nodemon
85
85
  * cors
86
- * bcryptjs
87
86
  * dotenv
88
- * jsonwebtoken
89
87
  * cookie-parser
88
+
89
+ # Dev Dependency
90
+ * nodemon
91
+
92
+ # Optinal
93
+ * bcryptjs
94
+ * zod
95
+ * argon2
96
+ * jsonwebtoken
90
97
  * cloudinary
91
98
  * multer
92
- * mongoose (optional)
99
+ * mongoose
93
100
 
94
101
  ---
95
102
 
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.5",
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");