vimo-oss 2.2.0 → 2.2.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/vimo.mjs +57 -27
  2. package/package.json +1 -1
package/bin/vimo.mjs CHANGED
@@ -66,35 +66,64 @@ const CYAN = '\x1b[36m';
66
66
  const GREEN = '\x1b[32m';
67
67
  const YELLOW = '\x1b[33m';
68
68
  const RED = '\x1b[31m';
69
+ const BOLD = '\x1b[1m';
69
70
  const DIM = '\x1b[2m';
70
71
  const RESET = '\x1b[0m';
71
72
 
73
+ // Colors are for humans looking at a terminal. When output is piped to a file
74
+ // or the user asked for no color, fall back to clean plain text.
75
+ const colorEnabled =
76
+ !process.env.NO_COLOR && (process.stdout.isTTY || process.stderr.isTTY);
77
+ function paint(code, text) {
78
+ return colorEnabled ? `${code}${text}${RESET}` : text;
79
+ }
80
+
72
81
  function log(msg) {
73
- console.log(`${CYAN}[vimo]${RESET} ${msg}`);
82
+ console.log(`${paint(CYAN, '[vimo]')} ${msg}`);
74
83
  }
75
84
  function ok(msg) {
76
- console.log(`${GREEN}[vimo]${RESET} ${msg}`);
85
+ console.log(`${paint(GREEN, '[vimo]')} ${msg}`);
77
86
  }
78
87
  function warn(msg) {
79
- console.warn(`${YELLOW}[vimo]${RESET} ${msg}`);
88
+ console.warn(`${paint(YELLOW, '[vimo]')} ${msg}`);
80
89
  }
81
90
  function fail(msg) {
82
- console.error(`\n${RED}[vimo] ${msg}${RESET}`);
91
+ console.error(`\n${paint(RED, '[vimo] ' + msg)}`);
83
92
  process.exit(1);
84
93
  }
85
94
 
95
+ /**
96
+ * Startup banner.
97
+ *
98
+ * "ANSI Shadow" block letterforms spelling V I M O with a per-line
99
+ * aqua → deep-blue gradient. Block/box glyphs (█ ╗ ║ ╚ ─ …) render correctly
100
+ * in Windows Terminal, VS Code, iTerm2 and classic conhost (Node writes them
101
+ * through WriteConsoleW), so they are safe everywhere this CLI runs.
102
+ */
86
103
  function printBanner() {
87
- // Hand-set block letters spelling V I M O (verified in monospace).
104
+ const LOGO = [
105
+ '██╗ ██╗ ██╗ ███╗ ███╗ ██████╗ ',
106
+ '██║ ██║ ██║████╗ ████║ ██╔═══██╗',
107
+ '██║ ██║ ██║██╔████╔██║ ██║ ██║',
108
+ '╚██╗ ██╔╝ ██║██║╚██╔╝██║ ██║ ██║',
109
+ ' ╚████╔╝ ██║██║ ╚═╝ ██║ ╚██████╔╝',
110
+ ' ╚═══╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ',
111
+ ];
112
+ // 256-color ramp: bright aqua fading into deep blue, top to bottom.
113
+ const GRADIENT = [87, 81, 75, 69, 62, 56];
114
+
115
+ console.log('');
116
+ LOGO.forEach((line, i) => {
117
+ console.log(' ' + paint(`\x1b[38;5;${GRADIENT[i]}m`, line));
118
+ });
119
+ console.log('');
120
+ console.log(
121
+ ` ${paint(BOLD + GREEN, 'VIMO OSS')} ${paint(DIM, '· Vibe Marketing Operations · v' + pkgVersion)}${colorEnabled ? RESET : ''}`,
122
+ );
88
123
  console.log(
89
- `\n${CYAN}` +
90
- '__ __ _ __ __ ___ \n' +
91
- '\\ \\ / / | | | \\/ | / _ \\ \n' +
92
- ' \\ V / | | | |\\/| | | (_) |\n' +
93
- ' \\_/ |_| |_| |_| \\___/ \n' +
94
- `${RESET}`,
124
+ ` ${paint(DIM, 'Your brand, on autopilot — local-first, open-source.')}`,
95
125
  );
96
- console.log(` ${GREEN}VIMO OSS${RESET} ${DIM}- Vibe Marketing Operations - v${pkgVersion}${RESET}\n`);
97
- console.log(' Your marketing operations app is starting up.\n');
126
+ console.log('');
98
127
  }
99
128
 
100
129
  /* -------------------------------------------------------------------------- */
@@ -546,16 +575,16 @@ function doctor() {
546
575
  }
547
576
  push('Security key configured', keyOk, keyOk ? '' : 'created automatically on first start');
548
577
 
549
- console.log(`\n${CYAN}[vimo]${RESET} Environment check:\n`);
578
+ console.log(`\n${paint(CYAN, '[vimo]')} Environment check:`);
550
579
  for (const r of results) {
551
- const mark = r.good ? `${GREEN}OK${RESET}` : `${YELLOW}--${RESET}`;
580
+ const mark = r.good ? paint(GREEN, 'OK') : paint(YELLOW, '--');
552
581
  console.log(` ${mark} ${r.name.padEnd(24)} ${r.note || ''}`);
553
582
  }
554
583
  const blockers = results.filter((r) => !r.good);
555
584
  if (blockers.length) {
556
- console.log(`\nItems marked "${YELLOW}--${RESET}" are fixed automatically the first time you run \`vimo\`.`);
585
+ console.log(`\nItems marked "${paint(YELLOW, '--')}" are fixed automatically the first time you run \`vimo\`.`);
557
586
  } else {
558
- console.log(`\n${GREEN}Everything looks good — just type \`vimo\` to start.${RESET}`);
587
+ console.log(`\n${paint(GREEN, 'Everything looks good — just type `vimo` to start.')}`);
559
588
  }
560
589
  process.exit(0);
561
590
  }
@@ -618,8 +647,8 @@ async function main() {
618
647
  if (!exiting) {
619
648
  exiting = true;
620
649
  if (code && code !== 0) {
621
- console.error(`\n${RED}[vimo] VIMO stopped unexpectedly (code ${code}).${RESET}`);
622
- console.error(`${RED}[vimo] Try \`vimo --reset\`, or run \`vimo doctor\` for a health check.${RESET}`);
650
+ console.error(`\n${paint(RED, '[vimo] VIMO stopped unexpectedly (code ' + code + ').')}`);
651
+ console.error(paint(RED, '[vimo] Try `vimo --reset`, or run `vimo doctor` for a health check.'));
623
652
  }
624
653
  process.exit(code ?? 0);
625
654
  }
@@ -635,17 +664,18 @@ async function main() {
635
664
  process.exit(1);
636
665
  }
637
666
 
667
+ const line = paint(DIM, '─'.repeat(52));
638
668
  console.log(`
639
- ──────────────────────────────────────────────
640
- ${GREEN}VIMO is ready! (${seconds}s)${RESET}
669
+ ${line}
670
+ ${paint(BOLD + GREEN, `VIMO is ready! (${seconds}s)`)}
641
671
 
642
- Open: ${url}
643
- Stop: press Ctrl+C in this window
644
- Data: ${managedHome ? path.join(repo, 'data') : path.join(repo, 'data')}
645
- Update: run \`vimo --update\`
672
+ ${paint(DIM, 'Open: ')} ${url}
673
+ ${paint(DIM, 'Stop: ')} press Ctrl+C in this window
674
+ ${paint(DIM, 'Data: ')} ${path.join(repo, 'data')}
675
+ ${paint(DIM, 'Update:')} run \`vimo --update\`
646
676
 
647
- Next time, just type ${CYAN}vimo${RESET}.
648
- ──────────────────────────────────────────────
677
+ Next time, just type ${paint(BOLD + CYAN, 'vimo')}.
678
+ ${line}
649
679
  `);
650
680
 
651
681
  if (!noOpen) openBrowser(url);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vimo-oss",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "VIMO — one-command start for the VIBE Marketing Operations platform. Installs, builds and launches VIMO locally; type `vimo` (or `VIMO`) anywhere to open it in your browser.",
5
5
  "license": "MIT",
6
6
  "bin": {