ragarciaruben 1.20.22 → 1.20.24

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/install.js +83 -19
  2. package/package.json +1 -1
package/bin/install.js CHANGED
@@ -41,30 +41,94 @@ const hasColor = process.stdout.isTTY && (
41
41
  );
42
42
 
43
43
  const c = {
44
- bold: s => hasColor ? `\x1b[1m${s}\x1b[0m` : s,
45
- green: s => hasColor ? `\x1b[32m${s}\x1b[0m` : s,
46
- blue: s => hasColor ? `\x1b[34m${s}\x1b[0m` : s,
47
- cyan: s => hasColor ? `\x1b[36m${s}\x1b[0m` : s,
48
- yellow: s => hasColor ? `\x1b[33m${s}\x1b[0m` : s,
49
- dim: s => hasColor ? `\x1b[2m${s}\x1b[0m` : s,
50
- red: s => hasColor ? `\x1b[31m${s}\x1b[0m` : s,
44
+ bold: s => hasColor ? `\x1b[1m${s}\x1b[0m` : s,
45
+ green: s => hasColor ? `\x1b[32m${s}\x1b[0m` : s,
46
+ blue: s => hasColor ? `\x1b[34m${s}\x1b[0m` : s,
47
+ cyan: s => hasColor ? `\x1b[36m${s}\x1b[0m` : s,
48
+ turquoise: s => hasColor ? `\x1b[38;2;64;200;248m${s}\x1b[0m` : s,
49
+ yellow: s => hasColor ? `\x1b[33m${s}\x1b[0m` : s,
50
+ dim: s => hasColor ? `\x1b[2m${s}\x1b[0m` : s,
51
+ red: s => hasColor ? `\x1b[31m${s}\x1b[0m` : s,
51
52
  };
52
53
 
53
54
  // ─── Version ─────────────────────────────────────────────────────────────────
54
55
 
55
56
  const pkg = require('../package.json');
56
57
 
57
- const banner =
58
- '\n' +
59
- c.cyan(' ██╗ █████╗ ██╗ █████╗ ██████╗ \n') +
60
- c.cyan(' ██║██╔══██╗ ██║ ██╔══██╗██╔══██╗\n') +
61
- c.cyan(' ██║███████║ ██║ ███████║██████╔╝\n') +
62
- c.cyan(' ██║██╔══██║ ██║ ██╔══██║██╔══██╗\n') +
63
- c.cyan(' ██║██║ ██║ ███████╗██║ ██║██████╔╝\n') +
64
- c.cyan(' ╚═╝╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═════╝ ') + '\n' +
65
- '\n' +
66
- ' IA Labs ' + c.dim('v' + pkg.version) + '\n' +
67
- ' Context engineering for GitHub Copilot & OpenCode.\n';
58
+ // ─── Banner Animation ───────────────────────────────────────────────────────
59
+
60
+ const bannerLines = [
61
+ ' █████╗ ██╗ ██╗ █████╗ ██████╗ ',
62
+ ' ██╔══██╗██║ ██║ ██╔══██╗██╔══██╗',
63
+ ' ███████║██║ ██║ ███████║██████╔╝',
64
+ ' ██╔══██║██║ ██║ ██╔══██║██╔══██╗',
65
+ ' ██║ ██║██║ ███████╗██║ ██║██████╔╝',
66
+ ' ╚═╝ ╚═╝╚═╝ ╚══════╝╚═╝ ╚═╝╚═════╝ ',
67
+ ];
68
+
69
+ function sleepMs(ms) {
70
+ try {
71
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
72
+ } catch (_) {
73
+ const end = Date.now() + ms;
74
+ while (Date.now() < end) { /* busy-wait fallback */ }
75
+ }
76
+ }
77
+
78
+ function showBanner() {
79
+ const subtitle =
80
+ ' AI Lab ' + c.dim('v' + pkg.version) + '\n' +
81
+ ' Context engineering for GitHub Copilot & OpenCode.\n';
82
+
83
+ if (!hasColor) {
84
+ // Non-TTY — static output, no animation
85
+ console.log('\n' + bannerLines.join('\n') + '\n');
86
+ console.log(subtitle);
87
+ return;
88
+ }
89
+
90
+ const glyphs = '░▒▓█▄▀▐▌';
91
+ const h = bannerLines.length;
92
+
93
+ function scramble(line, revealPct) {
94
+ return [...line].map(ch => {
95
+ if (ch === ' ') return ch;
96
+ return Math.random() < revealPct
97
+ ? ch
98
+ : glyphs[Math.floor(Math.random() * glyphs.length)];
99
+ }).join('');
100
+ }
101
+
102
+ // Reserve vertical space
103
+ console.log('');
104
+ for (let i = 0; i < h; i++) console.log('');
105
+
106
+ // Phase 1 — scramble → resolve (5 frames, ~250 ms)
107
+ const frames = [0, 0.12, 0.35, 0.6, 0.85];
108
+ for (const pct of frames) {
109
+ process.stdout.write(`\x1b[${h}A`);
110
+ for (const line of bannerLines) {
111
+ process.stdout.write('\x1b[2K\x1b[2;38;2;64;200;248m' + scramble(line, pct) + '\x1b[0m\n');
112
+ }
113
+ sleepMs(50);
114
+ }
115
+
116
+ // Phase 2 — bright flash (~80 ms)
117
+ process.stdout.write(`\x1b[${h}A`);
118
+ for (const line of bannerLines) {
119
+ process.stdout.write('\x1b[2K\x1b[1;38;2;64;200;248m' + line + '\x1b[0m\n');
120
+ }
121
+ sleepMs(80);
122
+
123
+ // Phase 3 — settle to turquoise
124
+ process.stdout.write(`\x1b[${h}A`);
125
+ for (const line of bannerLines) {
126
+ process.stdout.write('\x1b[2K\x1b[38;2;64;200;248m' + line + '\x1b[0m\n');
127
+ }
128
+
129
+ console.log('');
130
+ console.log(subtitle);
131
+ }
68
132
 
69
133
  // ─── Args ────────────────────────────────────────────────────────────────────
70
134
 
@@ -491,7 +555,7 @@ function promptTarget(callback) {
491
555
 
492
556
  // ─── Main ────────────────────────────────────────────────────────────────────
493
557
 
494
- console.log(banner);
558
+ showBanner();
495
559
 
496
560
  if (hasHelp) {
497
561
  showHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ragarciaruben",
3
- "version": "1.20.22",
3
+ "version": "1.20.24",
4
4
  "description": "A context engineering and spec-driven development system for GitHub Copilot and OpenCode by TÂCHES.",
5
5
  "bin": {
6
6
  "get-shit-done-cc": "bin/install.js"