servcraft 0.4.5 → 0.4.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/ROADMAP.md +2 -1
- package/dist/cli/index.cjs +32 -26
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +32 -26
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/init.ts +47 -26
package/ROADMAP.md
CHANGED
|
@@ -4,7 +4,8 @@ This document outlines the planned features and improvements for Servcraft.
|
|
|
4
4
|
|
|
5
5
|
## Version History
|
|
6
6
|
|
|
7
|
-
- **v0.4.
|
|
7
|
+
- **v0.4.6** (Current) - Improved CLI design - Phase 3 in progress 🚧
|
|
8
|
+
- **v0.4.5** - Lazy Prisma client initialization
|
|
8
9
|
- **v0.4.4** - Prisma client bundling fix
|
|
9
10
|
- **v0.4.3** - ESM/CommonJS compatibility fix
|
|
10
11
|
- **v0.4.2** - Custom template loading in generate/scaffold
|
package/dist/cli/index.cjs
CHANGED
|
@@ -200,15 +200,21 @@ var initCommand = new import_commander.Command("init").alias("new").description(
|
|
|
200
200
|
dryRun.enable();
|
|
201
201
|
console.log(import_chalk3.default.yellow("\n\u26A0 DRY RUN MODE - No files will be written\n"));
|
|
202
202
|
}
|
|
203
|
+
console.log("");
|
|
204
|
+
console.log(import_chalk3.default.cyan("\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
|
|
205
|
+
console.log(import_chalk3.default.cyan("\u2502") + " " + import_chalk3.default.cyan("\u2502"));
|
|
203
206
|
console.log(
|
|
204
|
-
import_chalk3.default.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
import_chalk3.default.cyan("\u2502") + " " + import_chalk3.default.bold.white("\u{1F680} Servcraft") + import_chalk3.default.gray(" - Project Generator") + " " + import_chalk3.default.cyan("\u2502")
|
|
208
|
+
);
|
|
209
|
+
console.log(
|
|
210
|
+
import_chalk3.default.cyan("\u2502") + " " + import_chalk3.default.gray("by ") + import_chalk3.default.blue("Yao Logan") + import_chalk3.default.gray(" (@Le-Sourcier)") + " " + import_chalk3.default.cyan("\u2502")
|
|
211
|
+
);
|
|
212
|
+
console.log(
|
|
213
|
+
import_chalk3.default.cyan("\u2502") + " " + import_chalk3.default.bgBlue.white(" in/yao-logan ") + " " + import_chalk3.default.cyan("\u2502")
|
|
211
214
|
);
|
|
215
|
+
console.log(import_chalk3.default.cyan("\u2502") + " " + import_chalk3.default.cyan("\u2502"));
|
|
216
|
+
console.log(import_chalk3.default.cyan("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
|
|
217
|
+
console.log("");
|
|
212
218
|
let options;
|
|
213
219
|
if (cmdOptions?.yes) {
|
|
214
220
|
const db = cmdOptions.db || "postgresql";
|
|
@@ -226,11 +232,11 @@ var initCommand = new import_commander.Command("init").alias("new").description(
|
|
|
226
232
|
{
|
|
227
233
|
type: "input",
|
|
228
234
|
name: "name",
|
|
229
|
-
message: "Project name:",
|
|
235
|
+
message: "\u{1F4E6} Project name:",
|
|
230
236
|
default: name || "my-servcraft-app",
|
|
231
237
|
validate: (input) => {
|
|
232
238
|
if (!/^[a-z0-9-_]+$/i.test(input)) {
|
|
233
|
-
return "Project name can only contain letters, numbers, hyphens, and underscores";
|
|
239
|
+
return "\u274C Project name can only contain letters, numbers, hyphens, and underscores";
|
|
234
240
|
}
|
|
235
241
|
return true;
|
|
236
242
|
}
|
|
@@ -238,51 +244,51 @@ var initCommand = new import_commander.Command("init").alias("new").description(
|
|
|
238
244
|
{
|
|
239
245
|
type: "list",
|
|
240
246
|
name: "language",
|
|
241
|
-
message: "Select language:",
|
|
247
|
+
message: "\u{1F4BB} Select language:",
|
|
242
248
|
choices: [
|
|
243
|
-
{ name: "TypeScript (Recommended)", value: "typescript" },
|
|
244
|
-
{ name: "JavaScript", value: "javascript" }
|
|
249
|
+
{ name: "\u2728 TypeScript (Recommended)", value: "typescript" },
|
|
250
|
+
{ name: " JavaScript", value: "javascript" }
|
|
245
251
|
],
|
|
246
252
|
default: "typescript"
|
|
247
253
|
},
|
|
248
254
|
{
|
|
249
255
|
type: "list",
|
|
250
256
|
name: "moduleSystem",
|
|
251
|
-
message: "Select module system:",
|
|
257
|
+
message: "\u{1F4E6} Select module system:",
|
|
252
258
|
choices: [
|
|
253
|
-
{ name: "ESM (import/export) - Recommended", value: "esm" },
|
|
254
|
-
{ name: "CommonJS (require/module.exports)", value: "commonjs" }
|
|
259
|
+
{ name: "\u2728 ESM (import/export) - Recommended", value: "esm" },
|
|
260
|
+
{ name: " CommonJS (require/module.exports)", value: "commonjs" }
|
|
255
261
|
],
|
|
256
262
|
default: "esm"
|
|
257
263
|
},
|
|
258
264
|
{
|
|
259
265
|
type: "list",
|
|
260
266
|
name: "database",
|
|
261
|
-
message: "Select database:",
|
|
267
|
+
message: "\u{1F5C4}\uFE0F Select database:",
|
|
262
268
|
choices: [
|
|
263
|
-
{ name: "PostgreSQL (Recommended
|
|
264
|
-
{ name: "MySQL", value: "mysql" },
|
|
265
|
-
{ name: "SQLite (Development)", value: "sqlite" },
|
|
266
|
-
{ name: "MongoDB (NoSQL)", value: "mongodb" },
|
|
267
|
-
{ name: "None (Add later)", value: "none" }
|
|
269
|
+
{ name: "\u2728 PostgreSQL (Recommended)", value: "postgresql" },
|
|
270
|
+
{ name: " MySQL", value: "mysql" },
|
|
271
|
+
{ name: " SQLite (Development)", value: "sqlite" },
|
|
272
|
+
{ name: " MongoDB (NoSQL)", value: "mongodb" },
|
|
273
|
+
{ name: " None (Add later)", value: "none" }
|
|
268
274
|
],
|
|
269
275
|
default: "postgresql"
|
|
270
276
|
},
|
|
271
277
|
{
|
|
272
278
|
type: "list",
|
|
273
279
|
name: "validator",
|
|
274
|
-
message: "Select validation library:",
|
|
280
|
+
message: "\u2705 Select validation library:",
|
|
275
281
|
choices: [
|
|
276
|
-
{ name: "Zod (
|
|
277
|
-
{ name: "Joi (Battle-tested
|
|
278
|
-
{ name: "Yup (
|
|
282
|
+
{ name: "\u2728 Zod (TypeScript-first)", value: "zod" },
|
|
283
|
+
{ name: " Joi (Battle-tested)", value: "joi" },
|
|
284
|
+
{ name: " Yup (Lightweight)", value: "yup" }
|
|
279
285
|
],
|
|
280
286
|
default: "zod"
|
|
281
287
|
},
|
|
282
288
|
{
|
|
283
289
|
type: "checkbox",
|
|
284
290
|
name: "features",
|
|
285
|
-
message: "Select features to include:",
|
|
291
|
+
message: "\u{1F527} Select features to include:",
|
|
286
292
|
choices: [
|
|
287
293
|
{ name: "Authentication (JWT)", value: "auth", checked: true },
|
|
288
294
|
{ name: "User Management", value: "users", checked: true },
|