@lvnt/release-radar 1.9.13 → 1.9.14

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 +10 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -457,19 +457,22 @@ bot.onText(/\/mirror(?:\s+(.+))?/, async (msg, match) => {
457
457
  await bot.sendMessage(validatedChatId, 'Usage: /mirror <toolname> [version] [--force]\nExample: /mirror VSCode\nExample: /mirror VSCode --force\nExample: /mirror "Claude Code VSCode" 2.1.9\n\n--force: Delete existing release and re-mirror');
458
458
  return;
459
459
  }
460
- // Check for --force flag
461
- const force = args.includes('--force') || args.includes('-f');
462
- const argsWithoutForce = args.replace(/\s*--(force|f)\s*/g, ' ').replace(/\s+-f\s*/g, ' ').trim();
460
+ // Check for --force flag and remove it from args
461
+ const force = /\s*--force\b/.test(args) || /\s+-f\b/.test(args);
462
+ const argsWithoutForce = args
463
+ .replace(/\s*--force\b/g, '')
464
+ .replace(/\s+-f\b/g, '')
465
+ .trim();
463
466
  // Parse tool name and optional version
464
467
  let toolName;
465
- let version;
466
- const quoteMatch = argsWithoutForce.match(/^"([^"]+)"(?:\s+(.+))?$/);
468
+ let version = null;
469
+ const quoteMatch = argsWithoutForce.match(/^"([^"]+)"(?:\s+(\S+))?$/);
467
470
  if (quoteMatch) {
468
471
  toolName = quoteMatch[1];
469
- version = quoteMatch[2]?.trim() || null;
472
+ version = quoteMatch[2] || null;
470
473
  }
471
474
  else {
472
- const parts = argsWithoutForce.split(/\s+/);
475
+ const parts = argsWithoutForce.split(/\s+/).filter(p => p.length > 0);
473
476
  toolName = parts[0];
474
477
  version = parts[1] || null;
475
478
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvnt/release-radar",
3
- "version": "1.9.13",
3
+ "version": "1.9.14",
4
4
  "description": "Monitor tool versions and notify via Telegram when updates are detected",
5
5
  "main": "dist/index.js",
6
6
  "bin": {