@batijs/cli 0.0.38 → 0.0.40

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.
Files changed (21) hide show
  1. package/dist/boilerplates/@batijs/edgedb/files/$package.json.js +1 -1
  2. package/dist/boilerplates/@batijs/edgedb/{package-XY7TSZN3.js → package-4HYDCFQC.js} +1 -1
  3. package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
  4. package/dist/boilerplates/@batijs/express/{package-NSBYO6ZY.js → package-PHZH357G.js} +3 -3
  5. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -1
  6. package/dist/boilerplates/@batijs/hattip/{package-PUWO2VVR.js → package-P737QT4N.js} +3 -3
  7. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
  8. package/dist/boilerplates/@batijs/prisma/{package-OVSUG4KZ.js → package-FSGBZ2VB.js} +1 -1
  9. package/dist/boilerplates/@batijs/react/files/$package.json.js +1 -1
  10. package/dist/boilerplates/@batijs/react/{package-ICVJ5UL5.js → package-LR5YVULO.js} +3 -3
  11. package/dist/boilerplates/@batijs/shared/files/package.json +1 -1
  12. package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -1
  13. package/dist/boilerplates/@batijs/solid/{package-UCURTN7N.js → package-NBEQ3O3J.js} +3 -3
  14. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
  15. package/dist/boilerplates/@batijs/tailwindcss/{package-2HMN7U7S.js → package-EX67AI74.js} +3 -3
  16. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
  17. package/dist/boilerplates/@batijs/telefunc/{package-H7G2XYNG.js → package-VVPQITQ5.js} +3 -3
  18. package/dist/chunk-chunk-HOVHXSZ5.js +1064 -0
  19. package/dist/chunk-prompt-LPA56PA5.js +781 -0
  20. package/dist/index.js +143 -256
  21. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,12 +1,15 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ colors,
4
+ consola
5
+ } from "./chunk-chunk-HOVHXSZ5.js";
2
6
 
3
- // ../../node_modules/.pnpm/citty@0.1.1/node_modules/citty/dist/index.mjs
4
- import * as tty from "tty";
7
+ // ../../node_modules/.pnpm/citty@0.1.2/node_modules/citty/dist/index.mjs
5
8
  function toArray(val) {
6
9
  if (Array.isArray(val)) {
7
10
  return val;
8
11
  }
9
- return val !== void 0 ? [val] : [];
12
+ return val === void 0 ? [] : [val];
10
13
  }
11
14
  function formatLineColumns(lines, linePrefix = "") {
12
15
  const maxLengh = [];
@@ -244,13 +247,13 @@ function parseArgs(rawArgs, argsDef) {
244
247
  const nextPositionalArgument = positionalArguments.shift();
245
248
  if (nextPositionalArgument !== void 0) {
246
249
  parsedArgsProxy[arg.name] = nextPositionalArgument;
247
- } else if (arg.default !== void 0) {
248
- parsedArgsProxy[arg.name] = arg.default;
249
- } else {
250
+ } else if (arg.default === void 0 && arg.required !== false) {
250
251
  throw new CLIError(
251
252
  `Missing required positional argument: ${arg.name.toUpperCase()}`,
252
253
  "EARG"
253
254
  );
255
+ } else {
256
+ parsedArgsProxy[arg.name] = arg.default;
254
257
  }
255
258
  } else if (arg.required && parsedArgsProxy[arg.name] === void 0) {
256
259
  throw new CLIError(`Missing required argument: --${arg.name}`, "EARG");
@@ -278,6 +281,7 @@ async function runCommand(cmd, opts) {
278
281
  const context = {
279
282
  rawArgs: opts.rawArgs,
280
283
  args: parsedArgs,
284
+ data: opts.data,
281
285
  cmd
282
286
  };
283
287
  if (typeof cmd.setup === "function") {
@@ -290,15 +294,12 @@ async function runCommand(cmd, opts) {
290
294
  );
291
295
  const subCommandName = opts.rawArgs[subCommandArgIndex];
292
296
  if (!subCommandName && !cmd.run) {
293
- throw new CLIError(
294
- `Missing sub command. Use --help to see available sub commands.`,
295
- "ESUBCOMMAND"
296
- );
297
+ throw new CLIError(`No command specified.`, "E_NO_COMMAND");
297
298
  }
298
299
  if (!subCommands[subCommandName]) {
299
300
  throw new CLIError(
300
- `Unknown sub command: ${subCommandName}`,
301
- "ESUBCOMMAND"
301
+ `Unknown command \`${subCommandName}\``,
302
+ "E_UNKNOWN_COMMAND"
302
303
  );
303
304
  }
304
305
  const subCommand = await resolveValue(subCommands[subCommandName]);
@@ -330,9 +331,9 @@ async function resolveSubCommand(cmd, rawArgs, parent) {
330
331
  }
331
332
  async function showUsage(cmd, parent) {
332
333
  try {
333
- console.log(await renderUsage(cmd, parent) + "\n");
334
+ consola.log(await renderUsage(cmd, parent) + "\n");
334
335
  } catch (error) {
335
- console.error(error);
336
+ consola.error(error);
336
337
  }
337
338
  }
338
339
  async function renderUsage(cmd, parent) {
@@ -349,7 +350,7 @@ async function renderUsage(cmd, parent) {
349
350
  const name = arg.name.toUpperCase();
350
351
  const isRequired = arg.required !== false && arg.default === void 0;
351
352
  const usageHint = arg.default ? `="${arg.default}"` : "";
352
- posLines.push([name + usageHint, arg.description || ""]);
353
+ posLines.push(["`" + name + usageHint + "`", arg.description || ""]);
353
354
  usageLine.push(isRequired ? `<${name}>` : `[${name}]`);
354
355
  } else {
355
356
  const isRequired = arg.required === true && arg.default === void 0;
@@ -360,7 +361,7 @@ async function renderUsage(cmd, parent) {
360
361
  ", "
361
362
  )) + (arg.type === "string" && (arg.valueHint || arg.default) ? `=${arg.valueHint ? `<${arg.valueHint}>` : `"${arg.default || ""}"`}` : "");
362
363
  argLines.push([
363
- argStr + (isRequired ? " (required)" : ""),
364
+ "`" + argStr + (isRequired ? " (required)" : "") + "`",
364
365
  arg.description || ""
365
366
  ]);
366
367
  if (isRequired) {
@@ -370,8 +371,11 @@ async function renderUsage(cmd, parent) {
370
371
  }
371
372
  if (cmd.subCommands) {
372
373
  const commandNames = [];
373
- for (const [name, sub] of Object.entries(cmd.subCommands)) {
374
- commandsLines.push([name, sub.meta?.description || ""]);
374
+ const subCommands = await resolveValue(cmd.subCommands);
375
+ for (const [name, sub] of Object.entries(subCommands)) {
376
+ const subCmd = await resolveValue(sub);
377
+ const meta = await resolveValue(subCmd?.meta);
378
+ commandsLines.push([`\`${name}\``, meta?.description || ""]);
375
379
  commandNames.push(name);
376
380
  }
377
381
  usageLine.push(commandNames.join("|"));
@@ -379,29 +383,28 @@ async function renderUsage(cmd, parent) {
379
383
  const usageLines = [];
380
384
  const version = cmdMeta.version || parentMeta.version;
381
385
  usageLines.push(
382
- commandName + (version ? ` v${version}` : ""),
383
- cmdMeta.description,
386
+ colors.gray(
387
+ `${cmdMeta.description} (${commandName + (version ? ` v${version}` : "")})`
388
+ ),
384
389
  ""
385
390
  );
386
391
  const hasOptions = argLines.length > 0 || posLines.length > 0;
387
392
  usageLines.push(
388
- `USAGE: ${commandName}${hasOptions ? " [OPTIONS]" : ""} ${usageLine.join(
389
- " "
390
- )}`,
393
+ `${colors.underline(colors.bold("USAGE"))} \`${commandName}${hasOptions ? " [OPTIONS]" : ""} ${usageLine.join(" ")}\``,
391
394
  ""
392
395
  );
393
396
  if (posLines.length > 0) {
394
- usageLines.push("ARGUMENTS:", "");
397
+ usageLines.push(colors.underline(colors.bold("ARGUMENTS")), "");
395
398
  usageLines.push(formatLineColumns(posLines, " "));
396
399
  usageLines.push("");
397
400
  }
398
401
  if (argLines.length > 0) {
399
- usageLines.push("OPTIONS:", "");
402
+ usageLines.push(colors.underline(colors.bold("OPTIONS")), "");
400
403
  usageLines.push(formatLineColumns(argLines, " "));
401
404
  usageLines.push("");
402
405
  }
403
406
  if (commandsLines.length > 0) {
404
- usageLines.push("COMMANDS:", "");
407
+ usageLines.push(colors.underline(colors.bold("COMMANDS")), "");
405
408
  usageLines.push(formatLineColumns(commandsLines, " "));
406
409
  usageLines.push(
407
410
  "",
@@ -410,118 +413,6 @@ async function renderUsage(cmd, parent) {
410
413
  }
411
414
  return usageLines.filter((l) => typeof l === "string").join("\n");
412
415
  }
413
- var {
414
- env = {},
415
- argv = [],
416
- platform = ""
417
- } = typeof process === "undefined" ? {} : process;
418
- var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
419
- var isForced = "FORCE_COLOR" in env || argv.includes("--color");
420
- var isWindows = platform === "win32";
421
- var isDumbTerminal = env.TERM === "dumb";
422
- var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
423
- var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
424
- var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
425
- var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
426
- var clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
427
- var filterEmpty = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === void 0) ? clearBleed(
428
- ("" + string).indexOf(close, at),
429
- string,
430
- open,
431
- close,
432
- replace
433
- ) : "";
434
- var init = (open, close, replace) => filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
435
- var colors = {
436
- reset: init(0, 0),
437
- bold: init(1, 22, "\x1B[22m\x1B[1m"),
438
- dim: init(2, 22, "\x1B[22m\x1B[2m"),
439
- italic: init(3, 23),
440
- underline: init(4, 24),
441
- inverse: init(7, 27),
442
- hidden: init(8, 28),
443
- strikethrough: init(9, 29),
444
- black: init(30, 39),
445
- red: init(31, 39),
446
- green: init(32, 39),
447
- yellow: init(33, 39),
448
- blue: init(34, 39),
449
- magenta: init(35, 39),
450
- cyan: init(36, 39),
451
- white: init(37, 39),
452
- gray: init(90, 39),
453
- bgBlack: init(40, 49),
454
- bgRed: init(41, 49),
455
- bgGreen: init(42, 49),
456
- bgYellow: init(43, 49),
457
- bgBlue: init(44, 49),
458
- bgMagenta: init(45, 49),
459
- bgCyan: init(46, 49),
460
- bgWhite: init(47, 49),
461
- blackBright: init(90, 39),
462
- redBright: init(91, 39),
463
- greenBright: init(92, 39),
464
- yellowBright: init(93, 39),
465
- blueBright: init(94, 39),
466
- magentaBright: init(95, 39),
467
- cyanBright: init(96, 39),
468
- whiteBright: init(97, 39),
469
- bgBlackBright: init(100, 49),
470
- bgRedBright: init(101, 49),
471
- bgGreenBright: init(102, 49),
472
- bgYellowBright: init(103, 49),
473
- bgBlueBright: init(104, 49),
474
- bgMagentaBright: init(105, 49),
475
- bgCyanBright: init(106, 49),
476
- bgWhiteBright: init(107, 49)
477
- };
478
- var createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors : Object.keys(colors).reduce(
479
- (colors3, key) => ({ ...colors3, [key]: String }),
480
- {}
481
- );
482
- var {
483
- reset,
484
- bold,
485
- dim,
486
- italic,
487
- underline,
488
- inverse,
489
- hidden,
490
- strikethrough,
491
- black,
492
- red,
493
- green,
494
- yellow,
495
- blue,
496
- magenta,
497
- cyan,
498
- white,
499
- gray,
500
- bgBlack,
501
- bgRed,
502
- bgGreen,
503
- bgYellow,
504
- bgBlue,
505
- bgMagenta,
506
- bgCyan,
507
- bgWhite,
508
- blackBright,
509
- redBright,
510
- greenBright,
511
- yellowBright,
512
- blueBright,
513
- magentaBright,
514
- cyanBright,
515
- whiteBright,
516
- bgBlackBright,
517
- bgRedBright,
518
- bgGreenBright,
519
- bgYellowBright,
520
- bgBlueBright,
521
- bgMagentaBright,
522
- bgCyanBright,
523
- bgWhiteBright
524
- } = createColors();
525
416
  async function runMain(cmd, opts = {}) {
526
417
  const rawArgs = opts.rawArgs || process.argv.slice(2);
527
418
  try {
@@ -534,16 +425,12 @@ async function runMain(cmd, opts = {}) {
534
425
  } catch (error) {
535
426
  const isCLIError = error instanceof CLIError;
536
427
  if (!isCLIError) {
537
- console.error(error, "\n");
428
+ consola.error(error, "\n");
538
429
  }
539
- console.error(
540
- `
541
- ${bgRed(` ${error.code || error.name} `)} ${error.message}
542
- `
543
- );
544
430
  if (isCLIError) {
545
431
  await showUsage(...await resolveSubCommand(cmd, rawArgs));
546
432
  }
433
+ consola.error(error.message);
547
434
  process.exit(1);
548
435
  }
549
436
  }
@@ -653,7 +540,7 @@ Please report this issue to https://github.com/magne4000/bati`
653
540
  // package.json
654
541
  var package_default = {
655
542
  name: "@batijs/cli",
656
- version: "0.0.38",
543
+ version: "0.0.40",
657
544
  type: "module",
658
545
  scripts: {
659
546
  prerelease: "rimraf ./dist",
@@ -671,7 +558,7 @@ var package_default = {
671
558
  "@batijs/tsup": "workspace:*",
672
559
  "@types/node": "^16.18.37",
673
560
  "@types/which": "^3.0.0",
674
- citty: "^0.1.1",
561
+ citty: "^0.1.2",
675
562
  colorette: "^2.0.20",
676
563
  esbuild: "^0.18.11",
677
564
  espree: "^9.6.0",
@@ -682,7 +569,7 @@ var package_default = {
682
569
  "tree-kill": "^1.2.2",
683
570
  tsup: "^7.1.0",
684
571
  typescript: "^5.1.6",
685
- vite: "^4.3.9",
572
+ vite: "^4.4.0",
686
573
  vitest: "^0.32.4",
687
574
  which: "^3.0.1"
688
575
  },
@@ -713,119 +600,119 @@ import { dirname, join, parse } from "path";
713
600
  import { access, constants, lstat, readdir, readFile as readFile2 } from "fs/promises";
714
601
 
715
602
  // ../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.js
716
- import * as tty2 from "tty";
603
+ import * as tty from "tty";
717
604
  var {
718
- env: env2 = {},
719
- argv: argv2 = [],
720
- platform: platform2 = ""
605
+ env = {},
606
+ argv = [],
607
+ platform = ""
721
608
  } = typeof process === "undefined" ? {} : process;
722
- var isDisabled2 = "NO_COLOR" in env2 || argv2.includes("--no-color");
723
- var isForced2 = "FORCE_COLOR" in env2 || argv2.includes("--color");
724
- var isWindows2 = platform2 === "win32";
725
- var isDumbTerminal2 = env2.TERM === "dumb";
726
- var isCompatibleTerminal2 = tty2 && tty2.isatty && tty2.isatty(1) && env2.TERM && !isDumbTerminal2;
727
- var isCI2 = "CI" in env2 && ("GITHUB_ACTIONS" in env2 || "GITLAB_CI" in env2 || "CIRCLECI" in env2);
728
- var isColorSupported2 = !isDisabled2 && (isForced2 || isWindows2 && !isDumbTerminal2 || isCompatibleTerminal2 || isCI2);
729
- var replaceClose2 = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose2(next, tail, close, replace));
730
- var clearBleed2 = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose2(index, string, close, replace) + close;
731
- var filterEmpty2 = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === void 0) ? clearBleed2(
609
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
610
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
611
+ var isWindows = platform === "win32";
612
+ var isDumbTerminal = env.TERM === "dumb";
613
+ var isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
614
+ var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
615
+ var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
616
+ var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
617
+ var clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
618
+ var filterEmpty = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === void 0) ? clearBleed(
732
619
  ("" + string).indexOf(close, at),
733
620
  string,
734
621
  open,
735
622
  close,
736
623
  replace
737
624
  ) : "";
738
- var init2 = (open, close, replace) => filterEmpty2(`\x1B[${open}m`, `\x1B[${close}m`, replace);
625
+ var init = (open, close, replace) => filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
739
626
  var colors2 = {
740
- reset: init2(0, 0),
741
- bold: init2(1, 22, "\x1B[22m\x1B[1m"),
742
- dim: init2(2, 22, "\x1B[22m\x1B[2m"),
743
- italic: init2(3, 23),
744
- underline: init2(4, 24),
745
- inverse: init2(7, 27),
746
- hidden: init2(8, 28),
747
- strikethrough: init2(9, 29),
748
- black: init2(30, 39),
749
- red: init2(31, 39),
750
- green: init2(32, 39),
751
- yellow: init2(33, 39),
752
- blue: init2(34, 39),
753
- magenta: init2(35, 39),
754
- cyan: init2(36, 39),
755
- white: init2(37, 39),
756
- gray: init2(90, 39),
757
- bgBlack: init2(40, 49),
758
- bgRed: init2(41, 49),
759
- bgGreen: init2(42, 49),
760
- bgYellow: init2(43, 49),
761
- bgBlue: init2(44, 49),
762
- bgMagenta: init2(45, 49),
763
- bgCyan: init2(46, 49),
764
- bgWhite: init2(47, 49),
765
- blackBright: init2(90, 39),
766
- redBright: init2(91, 39),
767
- greenBright: init2(92, 39),
768
- yellowBright: init2(93, 39),
769
- blueBright: init2(94, 39),
770
- magentaBright: init2(95, 39),
771
- cyanBright: init2(96, 39),
772
- whiteBright: init2(97, 39),
773
- bgBlackBright: init2(100, 49),
774
- bgRedBright: init2(101, 49),
775
- bgGreenBright: init2(102, 49),
776
- bgYellowBright: init2(103, 49),
777
- bgBlueBright: init2(104, 49),
778
- bgMagentaBright: init2(105, 49),
779
- bgCyanBright: init2(106, 49),
780
- bgWhiteBright: init2(107, 49)
627
+ reset: init(0, 0),
628
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
629
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
630
+ italic: init(3, 23),
631
+ underline: init(4, 24),
632
+ inverse: init(7, 27),
633
+ hidden: init(8, 28),
634
+ strikethrough: init(9, 29),
635
+ black: init(30, 39),
636
+ red: init(31, 39),
637
+ green: init(32, 39),
638
+ yellow: init(33, 39),
639
+ blue: init(34, 39),
640
+ magenta: init(35, 39),
641
+ cyan: init(36, 39),
642
+ white: init(37, 39),
643
+ gray: init(90, 39),
644
+ bgBlack: init(40, 49),
645
+ bgRed: init(41, 49),
646
+ bgGreen: init(42, 49),
647
+ bgYellow: init(43, 49),
648
+ bgBlue: init(44, 49),
649
+ bgMagenta: init(45, 49),
650
+ bgCyan: init(46, 49),
651
+ bgWhite: init(47, 49),
652
+ blackBright: init(90, 39),
653
+ redBright: init(91, 39),
654
+ greenBright: init(92, 39),
655
+ yellowBright: init(93, 39),
656
+ blueBright: init(94, 39),
657
+ magentaBright: init(95, 39),
658
+ cyanBright: init(96, 39),
659
+ whiteBright: init(97, 39),
660
+ bgBlackBright: init(100, 49),
661
+ bgRedBright: init(101, 49),
662
+ bgGreenBright: init(102, 49),
663
+ bgYellowBright: init(103, 49),
664
+ bgBlueBright: init(104, 49),
665
+ bgMagentaBright: init(105, 49),
666
+ bgCyanBright: init(106, 49),
667
+ bgWhiteBright: init(107, 49)
781
668
  };
782
- var createColors2 = ({ useColor = isColorSupported2 } = {}) => useColor ? colors2 : Object.keys(colors2).reduce(
669
+ var createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors2 : Object.keys(colors2).reduce(
783
670
  (colors3, key) => ({ ...colors3, [key]: String }),
784
671
  {}
785
672
  );
786
673
  var {
787
- reset: reset2,
788
- bold: bold2,
789
- dim: dim2,
790
- italic: italic2,
791
- underline: underline2,
792
- inverse: inverse2,
793
- hidden: hidden2,
794
- strikethrough: strikethrough2,
795
- black: black2,
796
- red: red2,
797
- green: green2,
798
- yellow: yellow2,
799
- blue: blue2,
800
- magenta: magenta2,
801
- cyan: cyan2,
802
- white: white2,
803
- gray: gray2,
804
- bgBlack: bgBlack2,
805
- bgRed: bgRed2,
806
- bgGreen: bgGreen2,
807
- bgYellow: bgYellow2,
808
- bgBlue: bgBlue2,
809
- bgMagenta: bgMagenta2,
810
- bgCyan: bgCyan2,
811
- bgWhite: bgWhite2,
812
- blackBright: blackBright2,
813
- redBright: redBright2,
814
- greenBright: greenBright2,
815
- yellowBright: yellowBright2,
816
- blueBright: blueBright2,
817
- magentaBright: magentaBright2,
818
- cyanBright: cyanBright2,
819
- whiteBright: whiteBright2,
820
- bgBlackBright: bgBlackBright2,
821
- bgRedBright: bgRedBright2,
822
- bgGreenBright: bgGreenBright2,
823
- bgYellowBright: bgYellowBright2,
824
- bgBlueBright: bgBlueBright2,
825
- bgMagentaBright: bgMagentaBright2,
826
- bgCyanBright: bgCyanBright2,
827
- bgWhiteBright: bgWhiteBright2
828
- } = createColors2();
674
+ reset,
675
+ bold,
676
+ dim,
677
+ italic,
678
+ underline,
679
+ inverse,
680
+ hidden,
681
+ strikethrough,
682
+ black,
683
+ red,
684
+ green,
685
+ yellow,
686
+ blue,
687
+ magenta,
688
+ cyan,
689
+ white,
690
+ gray,
691
+ bgBlack,
692
+ bgRed,
693
+ bgGreen,
694
+ bgYellow,
695
+ bgBlue,
696
+ bgMagenta,
697
+ bgCyan,
698
+ bgWhite,
699
+ blackBright,
700
+ redBright,
701
+ greenBright,
702
+ yellowBright,
703
+ blueBright,
704
+ magentaBright,
705
+ cyanBright,
706
+ whiteBright,
707
+ bgBlackBright,
708
+ bgRedBright,
709
+ bgGreenBright,
710
+ bgYellowBright,
711
+ bgBlueBright,
712
+ bgMagentaBright,
713
+ bgCyanBright,
714
+ bgWhiteBright
715
+ } = createColors();
829
716
 
830
717
  // index.ts
831
718
  var __filename = fileURLToPath(import.meta.url);
@@ -866,18 +753,18 @@ function findDescription(key, boilerplates) {
866
753
  }
867
754
  }
868
755
  function printOK(dist, flags, boilerplates) {
869
- const arrow0 = withIcon("\u2192", blueBright2);
756
+ const arrow0 = withIcon("\u2192", blueBright);
870
757
  const list3 = withIcon("-", void 0, 3);
871
- const cmd3 = withIcon("$", gray2, 3);
872
- console.log(bold2(`${green2("\u2713")} Project created at ${cyan2(dist)} with:`));
873
- console.log(list3(green2("Typescript")));
758
+ const cmd3 = withIcon("$", gray, 3);
759
+ console.log(bold(`${green("\u2713")} Project created at ${cyan(dist)} with:`));
760
+ console.log(list3(green("Typescript")));
874
761
  for (const key of flags) {
875
762
  const bl = boilerplates.find((b) => b.config.flag === key);
876
763
  if (!bl || !bl.config.name)
877
764
  continue;
878
- console.log(list3(green2(bl.config.name)));
765
+ console.log(list3(green(bl.config.name)));
879
766
  }
880
- console.log("\n" + bold2(arrow0("Next steps:")));
767
+ console.log("\n" + bold(arrow0("Next steps:")));
881
768
  console.log(cmd3(`cd ${dist}`));
882
769
  console.log(cmd3("pnpm install"));
883
770
  console.log(cmd3("pnpm run dev"));
@@ -907,7 +794,7 @@ async function checkArguments(args) {
907
794
  const stat = await lstat(args.project);
908
795
  if (!stat.isDirectory()) {
909
796
  console.error(
910
- `${yellow2("\u26A0")} Target ${cyan2(args.project)} already exists but is not a directory. ${yellow2("Aborting")}.`
797
+ `${yellow("\u26A0")} Target ${cyan(args.project)} already exists but is not a directory. ${yellow("Aborting")}.`
911
798
  );
912
799
  process.exit(2);
913
800
  }
@@ -915,16 +802,16 @@ async function checkArguments(args) {
915
802
  await access(args.project, constants.W_OK);
916
803
  } catch (_) {
917
804
  console.error(
918
- `${yellow2("\u26A0")} Target folder ${cyan2(args.project)} already exists but is not writable. ${yellow2("Aborting")}.`
805
+ `${yellow("\u26A0")} Target folder ${cyan(args.project)} already exists but is not writable. ${yellow("Aborting")}.`
919
806
  );
920
807
  process.exit(3);
921
808
  }
922
809
  if ((await readdir(args.project)).length > 0) {
923
810
  console.error(
924
- `${yellow2("\u26A0")} Target folder ${cyan2(
811
+ `${yellow("\u26A0")} Target folder ${cyan(
925
812
  args.project
926
813
  )} already exists and is not empty.
927
- Continuing might erase existing files. ${yellow2("Aborting")}.`
814
+ Continuing might erase existing files. ${yellow("Aborting")}.`
928
815
  );
929
816
  process.exit(4);
930
817
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "type": "module",
5
5
  "keywords": [],
6
6
  "description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
@@ -10,7 +10,7 @@
10
10
  "devDependencies": {
11
11
  "@types/node": "^16.18.37",
12
12
  "@types/which": "^3.0.0",
13
- "citty": "^0.1.1",
13
+ "citty": "^0.1.2",
14
14
  "colorette": "^2.0.20",
15
15
  "esbuild": "^0.18.11",
16
16
  "espree": "^9.6.0",
@@ -21,14 +21,14 @@
21
21
  "tree-kill": "^1.2.2",
22
22
  "tsup": "^7.1.0",
23
23
  "typescript": "^5.1.6",
24
- "vite": "^4.3.9",
24
+ "vite": "^4.4.0",
25
25
  "vitest": "^0.32.4",
26
26
  "which": "^3.0.1",
27
- "@batijs/build": "0.0.38",
28
- "@batijs/tsup": "0.0.38"
27
+ "@batijs/build": "0.0.40",
28
+ "@batijs/tsup": "0.0.40"
29
29
  },
30
30
  "dependencies": {
31
- "@batijs/core": "0.0.38"
31
+ "@batijs/core": "0.0.40"
32
32
  },
33
33
  "bin": "./dist/index.js",
34
34
  "exports": {