@lvnt/release-radar 1.7.9 → 1.7.11

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/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvnt/release-radar-cli",
3
- "version": "0.2.12",
3
+ "version": "0.2.15",
4
4
  "description": "Interactive CLI for downloading tools through Nexus proxy",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/cli/src/ui.ts CHANGED
@@ -159,16 +159,21 @@ export function renderTable(rows: TableRow[]): void {
159
159
 
160
160
  // Rows
161
161
  for (const row of rows) {
162
- let statusStr: string;
162
+ // Pad plain text BEFORE applying colors (chalk adds invisible ANSI codes)
163
+ let statusText: string;
164
+ let statusColored: string;
163
165
  switch (row.status) {
164
166
  case 'new':
165
- statusStr = chalk.blue('NEW');
167
+ statusText = 'NEW'.padEnd(colWidths.status);
168
+ statusColored = chalk.blue(statusText);
166
169
  break;
167
170
  case 'update':
168
- statusStr = chalk.yellow('UPDATE');
171
+ statusText = 'UPDATE'.padEnd(colWidths.status);
172
+ statusColored = chalk.yellow(statusText);
169
173
  break;
170
174
  case 'current':
171
- statusStr = chalk.green('✓');
175
+ statusText = '✓'.padEnd(colWidths.status);
176
+ statusColored = chalk.green(statusText);
172
177
  break;
173
178
  }
174
179
  const typeStr = row.type === 'npm' ? chalk.magenta('npm') : chalk.cyan('wget');
@@ -178,7 +183,7 @@ export function renderTable(rows: TableRow[]): void {
178
183
  row.displayName.padEnd(colWidths.tool) +
179
184
  row.version.padEnd(colWidths.latest) +
180
185
  row.downloadedVersion.padEnd(colWidths.downloaded) +
181
- statusStr.padEnd(colWidths.status + 5) + // +5 for chalk color codes
186
+ statusColored +
182
187
  typeStr
183
188
  );
184
189
  }
package/dist/index.js CHANGED
@@ -56,10 +56,14 @@ if (!existsSync(DATA_DIR)) {
56
56
  mkdirSync(DATA_DIR, { recursive: true });
57
57
  }
58
58
  console.log(`Data directory: ${DATA_DIR}`);
59
+ // Log package version for debugging
60
+ const pkgJson = JSON.parse(readFileSync(join(PKG_ROOT, 'package.json'), 'utf-8'));
61
+ console.log(`ReleaseRadar version: ${pkgJson.version}`);
59
62
  // Sync cli/ source from package to user directory for publishing
60
63
  // Always sync to ensure updates from the package are reflected
61
64
  const PKG_CLI_DIR = join(PKG_ROOT, 'cli');
62
65
  const USER_CLI_DIR = join(DATA_DIR, 'cli');
66
+ console.log(`Syncing CLI source from ${PKG_CLI_DIR} to ${USER_CLI_DIR}...`);
63
67
  if (existsSync(PKG_CLI_DIR)) {
64
68
  // Create user CLI dir if it doesn't exist
65
69
  if (!existsSync(USER_CLI_DIR)) {
@@ -67,14 +71,27 @@ if (existsSync(PKG_CLI_DIR)) {
67
71
  }
68
72
  // Sync source files (excluding node_modules which is installed separately)
69
73
  const filesToSync = ['src', 'bin', 'package.json', 'tsconfig.json', 'README.md'];
74
+ let syncedCount = 0;
70
75
  for (const file of filesToSync) {
71
76
  const srcPath = join(PKG_CLI_DIR, file);
72
77
  const destPath = join(USER_CLI_DIR, file);
73
78
  if (existsSync(srcPath)) {
74
- cpSync(srcPath, destPath, { recursive: true, force: true });
79
+ try {
80
+ cpSync(srcPath, destPath, { recursive: true, force: true });
81
+ syncedCount++;
82
+ }
83
+ catch (err) {
84
+ console.error(`Failed to sync ${file}: ${err}`);
85
+ }
86
+ }
87
+ else {
88
+ console.log(`CLI source file not found: ${srcPath}`);
75
89
  }
76
90
  }
77
- console.log(`CLI source synced to ${USER_CLI_DIR}`);
91
+ console.log(`CLI source synced: ${syncedCount}/${filesToSync.length} files`);
92
+ }
93
+ else {
94
+ console.error(`CLI source directory not found: ${PKG_CLI_DIR}`);
78
95
  }
79
96
  // Initialize components
80
97
  const bot = new TelegramBot(BOT_TOKEN, { polling: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvnt/release-radar",
3
- "version": "1.7.9",
3
+ "version": "1.7.11",
4
4
  "description": "Monitor tool versions and notify via Telegram when updates are detected",
5
5
  "main": "dist/index.js",
6
6
  "bin": {