novatec-cli 1.0.0 → 1.0.1

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 (2) hide show
  1. package/bin/index.js +80 -71
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -3,9 +3,7 @@
3
3
  import { program } from 'commander';
4
4
  import chalk from 'chalk';
5
5
  import figlet from 'figlet';
6
- import gradient from 'gradient-string';
7
6
  import boxen from 'boxen';
8
- import chalkAnimation from 'chalk-animation';
9
7
  import { checkRequirements } from '../lib/utils.js';
10
8
  import { runCreate } from '../lib/create.js';
11
9
 
@@ -13,108 +11,119 @@ function sleep(ms) {
13
11
  return new Promise(r => setTimeout(r, ms));
14
12
  }
15
13
 
16
- // Cicla cada carácter entre morado puro → blanco → morado oscuro (efecto RGB)
17
- function rgbCycle(text, offset = 0) {
18
- const palette = [
19
- [120, 0, 200], // morado oscuro
20
- [160, 0, 255], // morado puro
21
- [190, 60, 255], // morado medio
22
- [215,120, 255], // lavanda
23
- [235,180, 255], // lavanda claro
24
- [255,255, 255], // blanco
25
- [235,180, 255], // lavanda claro
26
- [215,120, 255], // lavanda
27
- [190, 60, 255], // morado medio
28
- [160, 0, 255], // morado puro
29
- ];
30
- return text.split('').map((ch, i) => {
31
- if (ch === ' ') return ch;
32
- const [r, g, b] = palette[(i + offset) % palette.length];
33
- return chalk.rgb(r, g, b)(ch);
34
- }).join('');
35
- }
36
-
37
14
  async function showBanner() {
38
15
  console.clear();
39
16
 
17
+ // Logo en blanco puro con sombra gris (efecto profundidad)
40
18
  const logo = figlet.textSync('NOVATEC', { font: 'ANSI Shadow' });
41
19
  const lines = logo.split('\n').filter(l => l.trim());
42
20
 
43
- // Animación: el gradiente RGB "corre" a través del texto
44
- const FRAMES = 20;
45
- for (let frame = 0; frame < FRAMES; frame++) {
46
- if (frame > 0) process.stdout.write(`\x1B[${lines.length + 1}A`);
47
- console.log();
48
- lines.forEach((line, i) => {
49
- console.log(' ' + rgbCycle(line, frame * 3 + i * 4));
50
- });
51
- await sleep(55);
52
- }
21
+ console.log();
22
+ lines.forEach(line => {
23
+ console.log(' ' + chalk.bold.white(line));
24
+ });
53
25
 
54
26
  console.log();
55
27
 
56
- // Subtítulo: animación glitch → queda fijo con gradiente morado-blanco
57
- const sub = ' NOVATEC FULLSTACK CLI Generador Profesional de Proyectos ';
58
- const anim = chalkAnimation.glitch(sub);
59
- await sleep(1200);
60
- anim.stop();
61
- process.stdout.write('\r');
62
- console.log(gradient(['#7B00FF', '#FFFFFF', '#7B00FF'])(sub));
28
+ // Subtítulo elegante
29
+ const sub = ' NOVATEC FULLSTACK CLI · Generador Profesional de Proyectos ';
30
+ console.log(chalk.gray(sub));
63
31
  console.log();
64
32
 
65
- // Separador RGB
66
- const sep = ''.repeat(64);
67
- console.log(' ' + rgbCycle(sep, 0));
33
+ // Separador
34
+ console.log(' ' + chalk.white(''.repeat(66)));
68
35
  console.log();
69
36
 
70
- // Caja de tecnologías
37
+ // Stats rápidos
38
+ console.log(
39
+ ' ' +
40
+ chalk.white.bold('10') + chalk.gray(' frontends ') +
41
+ chalk.white('·') +
42
+ chalk.white.bold(' 10') + chalk.gray(' backends ') +
43
+ chalk.white('·') +
44
+ chalk.white.bold(' 100%') + chalk.gray(' listo para producción')
45
+ );
46
+ console.log();
47
+
48
+ // Caja de tecnologías — blanco y negro elegante
71
49
  console.log(
72
50
  boxen(
73
- gradient(['#7B00FF', '#FFFFFF', '#7B00FF'])(' TECNOLOGÍAS DISPONIBLES') + '\n\n' +
74
- chalk.bold.white(' Frontend ') + chalk.gray('│ ') +
51
+ chalk.bold.white(' TECNOLOGÍAS DISPONIBLES') + '\n\n' +
52
+
53
+ chalk.white.bold(' Frontend') + chalk.gray(' │ ') +
75
54
  [
76
- chalk.hex('#61DAFB')('React (Vite)'),
55
+ chalk.white('React'),
77
56
  chalk.white('Next.js'),
78
- chalk.hex('#42B883')('Vue'),
79
- chalk.hex('#00DC82')('Nuxt'),
80
- chalk.hex('#FF5D01')('Astro'),
81
- chalk.hex('#FF3E00')('Svelte'),
82
- chalk.hex('#4F8EF7')('Solid'),
83
- chalk.hex('#DD0031')('Angular'),
84
- chalk.hex('#E8F2FF')('Remix'),
85
- chalk.hex('#AC7EF4')('Qwik'),
86
- ].join(chalk.gray(' · ')) + '\n\n' +
87
- chalk.bold.white(' Backend ') + chalk.gray('│ ') +
57
+ chalk.white('Vue'),
58
+ chalk.white('Nuxt'),
59
+ chalk.white('Astro'),
60
+ chalk.white('Svelte'),
61
+ chalk.white('SolidJS'),
62
+ chalk.white('Angular'),
63
+ chalk.white('Remix'),
64
+ chalk.white('Qwik'),
65
+ ].join(chalk.gray(' · ')) + '\n\n' +
66
+
67
+ chalk.white.bold(' Backend ') + chalk.gray(' │ ') +
88
68
  [
89
- chalk.hex('#68A063')('Express'),
90
- chalk.hex('#E0234E')('NestJS'),
69
+ chalk.white('Express'),
70
+ chalk.white('NestJS'),
91
71
  chalk.white('Fastify'),
92
- chalk.hex('#E36002')('Hono'),
93
- chalk.hex('#009688')('FastAPI'),
94
- chalk.hex('#44B78B')('Django'),
95
- chalk.gray('Flask'),
96
- chalk.hex('#6DB33F')('Spring'),
72
+ chalk.white('Hono'),
73
+ chalk.white('FastAPI'),
74
+ chalk.white('Django'),
75
+ chalk.white('Flask'),
76
+ chalk.white('Spring'),
97
77
  chalk.white('Deno'),
98
- chalk.hex('#00ADD8')('Go/Gin'),
99
- ].join(chalk.gray(' · ')),
78
+ chalk.white('Go/Gin'),
79
+ ].join(chalk.gray(' · ')) + '\n\n' +
80
+
81
+ chalk.white.bold(' Extras ') + chalk.gray(' │ ') +
82
+ [
83
+ chalk.gray('Docker'),
84
+ chalk.gray('ESLint + Prettier'),
85
+ chalk.gray('Husky'),
86
+ chalk.gray('Jest / Vitest'),
87
+ chalk.gray('GitHub Actions'),
88
+ chalk.gray('.env'),
89
+ ].join(chalk.gray(' · ')),
90
+ {
91
+ padding: { top: 1, bottom: 1, left: 2, right: 4 },
92
+ margin: { left: 2 },
93
+ borderStyle: 'round',
94
+ borderColor: 'white',
95
+ dimBorder: true,
96
+ }
97
+ )
98
+ );
99
+
100
+ console.log();
101
+
102
+ // Uso rápido
103
+ console.log(
104
+ boxen(
105
+ chalk.gray(' Uso rápido\n\n') +
106
+ chalk.white(' $ novatec-cli create ') + chalk.gray('<nombre-proyecto>') + '\n\n' +
107
+ chalk.white(' $ novatec-cli create my-app ') + chalk.gray('--frontend react --backend express'),
100
108
  {
101
- padding: { top: 1, bottom: 1, left: 3, right: 3 },
109
+ padding: { top: 0, bottom: 0, left: 1, right: 4 },
102
110
  margin: { left: 2 },
103
- borderStyle: 'double',
104
- borderColor: 'magenta',
111
+ borderStyle: 'single',
112
+ borderColor: 'gray',
113
+ dimBorder: true,
105
114
  }
106
115
  )
107
116
  );
108
117
 
109
118
  console.log();
110
- console.log(' ' + rgbCycle(sep, 8));
119
+ console.log(' ' + chalk.white('─'.repeat(66)));
111
120
  console.log();
112
121
  }
113
122
 
114
123
  program
115
124
  .name('novatec-cli')
116
125
  .description('NOVATEC FULLSTACK CLI — Generador profesional de proyectos full stack')
117
- .version('1.0.0', '-v, --version', 'Mostrar versión');
126
+ .version('1.0.1', '-v, --version', 'Mostrar versión');
118
127
 
119
128
  program
120
129
  .command('create [name]')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "novatec-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "🚀 NOVATEC FULLSTACK CLI — Generador profesional de proyectos full stack | React, Next.js, Vue, Express, NestJS, FastAPI y más",
5
5
  "type": "module",
6
6
  "main": "./lib/create.js",