servcraft 0.4.4 → 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/dist/cli/index.js CHANGED
@@ -179,15 +179,21 @@ var initCommand = new Command("init").alias("new").description("Initialize a new
179
179
  dryRun.enable();
180
180
  console.log(chalk3.yellow("\n\u26A0 DRY RUN MODE - No files will be written\n"));
181
181
  }
182
+ console.log("");
183
+ console.log(chalk3.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"));
184
+ console.log(chalk3.cyan("\u2502") + " " + chalk3.cyan("\u2502"));
182
185
  console.log(
183
- chalk3.blue(`
184
- \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
185
- \u2551 \u2551
186
- \u2551 ${chalk3.bold("\u{1F680} Servcraft Project Generator")} \u2551
187
- \u2551 \u2551
188
- \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
189
- `)
186
+ chalk3.cyan("\u2502") + " " + chalk3.bold.white("\u{1F680} Servcraft") + chalk3.gray(" - Project Generator") + " " + chalk3.cyan("\u2502")
187
+ );
188
+ console.log(
189
+ chalk3.cyan("\u2502") + " " + chalk3.gray("by ") + chalk3.blue("Yao Logan") + chalk3.gray(" (@Le-Sourcier)") + " " + chalk3.cyan("\u2502")
190
+ );
191
+ console.log(
192
+ chalk3.cyan("\u2502") + " " + chalk3.bgBlue.white(" in/yao-logan ") + " " + chalk3.cyan("\u2502")
190
193
  );
194
+ console.log(chalk3.cyan("\u2502") + " " + chalk3.cyan("\u2502"));
195
+ console.log(chalk3.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"));
196
+ console.log("");
191
197
  let options;
192
198
  if (cmdOptions?.yes) {
193
199
  const db = cmdOptions.db || "postgresql";
@@ -205,11 +211,11 @@ var initCommand = new Command("init").alias("new").description("Initialize a new
205
211
  {
206
212
  type: "input",
207
213
  name: "name",
208
- message: "Project name:",
214
+ message: "\u{1F4E6} Project name:",
209
215
  default: name || "my-servcraft-app",
210
216
  validate: (input) => {
211
217
  if (!/^[a-z0-9-_]+$/i.test(input)) {
212
- return "Project name can only contain letters, numbers, hyphens, and underscores";
218
+ return "\u274C Project name can only contain letters, numbers, hyphens, and underscores";
213
219
  }
214
220
  return true;
215
221
  }
@@ -217,51 +223,51 @@ var initCommand = new Command("init").alias("new").description("Initialize a new
217
223
  {
218
224
  type: "list",
219
225
  name: "language",
220
- message: "Select language:",
226
+ message: "\u{1F4BB} Select language:",
221
227
  choices: [
222
- { name: "TypeScript (Recommended)", value: "typescript" },
223
- { name: "JavaScript", value: "javascript" }
228
+ { name: "\u2728 TypeScript (Recommended)", value: "typescript" },
229
+ { name: " JavaScript", value: "javascript" }
224
230
  ],
225
231
  default: "typescript"
226
232
  },
227
233
  {
228
234
  type: "list",
229
235
  name: "moduleSystem",
230
- message: "Select module system:",
236
+ message: "\u{1F4E6} Select module system:",
231
237
  choices: [
232
- { name: "ESM (import/export) - Recommended", value: "esm" },
233
- { name: "CommonJS (require/module.exports)", value: "commonjs" }
238
+ { name: "\u2728 ESM (import/export) - Recommended", value: "esm" },
239
+ { name: " CommonJS (require/module.exports)", value: "commonjs" }
234
240
  ],
235
241
  default: "esm"
236
242
  },
237
243
  {
238
244
  type: "list",
239
245
  name: "database",
240
- message: "Select database:",
246
+ message: "\u{1F5C4}\uFE0F Select database:",
241
247
  choices: [
242
- { name: "PostgreSQL (Recommended for SQL)", value: "postgresql" },
243
- { name: "MySQL", value: "mysql" },
244
- { name: "SQLite (Development)", value: "sqlite" },
245
- { name: "MongoDB (NoSQL)", value: "mongodb" },
246
- { name: "None (Add later)", value: "none" }
248
+ { name: "\u2728 PostgreSQL (Recommended)", value: "postgresql" },
249
+ { name: " MySQL", value: "mysql" },
250
+ { name: " SQLite (Development)", value: "sqlite" },
251
+ { name: " MongoDB (NoSQL)", value: "mongodb" },
252
+ { name: " None (Add later)", value: "none" }
247
253
  ],
248
254
  default: "postgresql"
249
255
  },
250
256
  {
251
257
  type: "list",
252
258
  name: "validator",
253
- message: "Select validation library:",
259
+ message: "\u2705 Select validation library:",
254
260
  choices: [
255
- { name: "Zod (Recommended - TypeScript-first)", value: "zod" },
256
- { name: "Joi (Battle-tested, feature-rich)", value: "joi" },
257
- { name: "Yup (Inspired by Joi, lighter)", value: "yup" }
261
+ { name: "\u2728 Zod (TypeScript-first)", value: "zod" },
262
+ { name: " Joi (Battle-tested)", value: "joi" },
263
+ { name: " Yup (Lightweight)", value: "yup" }
258
264
  ],
259
265
  default: "zod"
260
266
  },
261
267
  {
262
268
  type: "checkbox",
263
269
  name: "features",
264
- message: "Select features to include:",
270
+ message: "\u{1F527} Select features to include:",
265
271
  choices: [
266
272
  { name: "Authentication (JWT)", value: "auth", checked: true },
267
273
  { name: "User Management", value: "users", checked: true },
@@ -5742,10 +5748,18 @@ var prismaClientSingleton = () => {
5742
5748
  errorFormat: isProduction() ? "minimal" : "pretty"
5743
5749
  });
5744
5750
  };
5745
- var prisma = globalThis.__prisma ?? prismaClientSingleton();
5746
- if (!isProduction()) {
5747
- globalThis.__prisma = prisma;
5748
- }
5751
+ var _prisma;
5752
+ var prisma = new Proxy({}, {
5753
+ get(target, prop) {
5754
+ if (!_prisma) {
5755
+ _prisma = globalThis.__prisma ?? prismaClientSingleton();
5756
+ if (!isProduction()) {
5757
+ globalThis.__prisma = _prisma;
5758
+ }
5759
+ }
5760
+ return _prisma[prop];
5761
+ }
5762
+ });
5749
5763
 
5750
5764
  // src/utils/pagination.ts
5751
5765
  var DEFAULT_PAGE = 1;