@lvnt/release-radar 1.5.0 → 1.6.0

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/dist/index.js +25 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -161,6 +161,29 @@ bot.onText(/\/generate/, async (msg) => {
161
161
  writeFileSync(outputPath, JSON.stringify(versionsJson, null, 2));
162
162
  await bot.sendMessage(CHAT_ID, `Generated versions.json with ${versionsJson.tools.length} tools.\nPath: ${outputPath}`);
163
163
  });
164
+ // Helper to format CLI preview
165
+ function formatCliPreview(versions) {
166
+ const versionsJson = generateVersionsJson(versions, downloadsConfig);
167
+ if (versionsJson.tools.length === 0) {
168
+ return 'No tools configured in downloads.json';
169
+ }
170
+ const lines = versionsJson.tools.map((tool) => {
171
+ const typeLabel = tool.type === 'npm' ? '(npm)' : '';
172
+ return `• ${tool.displayName}: ${tool.version} ${typeLabel}`;
173
+ });
174
+ return `CLI will include ${versionsJson.tools.length} tools:\n${lines.join('\n')}`;
175
+ }
176
+ bot.onText(/\/clipreview/, async (msg) => {
177
+ if (msg.chat.id.toString() !== validatedChatId)
178
+ return;
179
+ if (!cliPublisher.isConfigured()) {
180
+ await bot.sendMessage(validatedChatId, 'CLI publisher not configured. Check downloads.json and cli/ directory.');
181
+ return;
182
+ }
183
+ const state = storage.load();
184
+ const preview = formatCliPreview(state.versions);
185
+ await bot.sendMessage(validatedChatId, `📋 CLI Preview\n\n${preview}\n\nUse /publishcli to publish.`);
186
+ });
164
187
  bot.onText(/\/publishcli/, async (msg) => {
165
188
  if (msg.chat.id.toString() !== validatedChatId)
166
189
  return;
@@ -168,8 +191,9 @@ bot.onText(/\/publishcli/, async (msg) => {
168
191
  await bot.sendMessage(validatedChatId, 'CLI publisher not configured. Check downloads.json and cli/ directory.');
169
192
  return;
170
193
  }
171
- await bot.sendMessage(validatedChatId, 'Publishing CLI...');
172
194
  const state = storage.load();
195
+ const preview = formatCliPreview(state.versions);
196
+ await bot.sendMessage(validatedChatId, `📦 Publishing CLI...\n\n${preview}`);
173
197
  const result = await cliPublisher.publish(state.versions);
174
198
  if (result.success) {
175
199
  await bot.sendMessage(validatedChatId, `✅ CLI published: v${result.version}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvnt/release-radar",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Monitor tool versions and notify via Telegram when updates are detected",
5
5
  "main": "dist/index.js",
6
6
  "bin": {