@lvnt/release-radar 1.7.7 → 1.7.8

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 +17 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -56,16 +56,25 @@ if (!existsSync(DATA_DIR)) {
56
56
  mkdirSync(DATA_DIR, { recursive: true });
57
57
  }
58
58
  console.log(`Data directory: ${DATA_DIR}`);
59
- // Copy cli/ to user directory for publishing (needs to be writable)
59
+ // Sync cli/ source from package to user directory for publishing
60
+ // Always sync to ensure updates from the package are reflected
60
61
  const PKG_CLI_DIR = join(PKG_ROOT, 'cli');
61
62
  const USER_CLI_DIR = join(DATA_DIR, 'cli');
62
- if (existsSync(PKG_CLI_DIR) && !existsSync(USER_CLI_DIR)) {
63
- console.log(`Copying CLI source to ${USER_CLI_DIR}...`);
64
- cpSync(PKG_CLI_DIR, USER_CLI_DIR, { recursive: true });
65
- console.log('CLI source copied successfully');
66
- }
67
- else if (existsSync(USER_CLI_DIR)) {
68
- console.log(`CLI source directory: ${USER_CLI_DIR}`);
63
+ if (existsSync(PKG_CLI_DIR)) {
64
+ // Create user CLI dir if it doesn't exist
65
+ if (!existsSync(USER_CLI_DIR)) {
66
+ mkdirSync(USER_CLI_DIR, { recursive: true });
67
+ }
68
+ // Sync source files (excluding node_modules which is installed separately)
69
+ const filesToSync = ['src', 'bin', 'package.json', 'tsconfig.json', 'README.md'];
70
+ for (const file of filesToSync) {
71
+ const srcPath = join(PKG_CLI_DIR, file);
72
+ const destPath = join(USER_CLI_DIR, file);
73
+ if (existsSync(srcPath)) {
74
+ cpSync(srcPath, destPath, { recursive: true, force: true });
75
+ }
76
+ }
77
+ console.log(`CLI source synced to ${USER_CLI_DIR}`);
69
78
  }
70
79
  // Initialize components
71
80
  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.7",
3
+ "version": "1.7.8",
4
4
  "description": "Monitor tool versions and notify via Telegram when updates are detected",
5
5
  "main": "dist/index.js",
6
6
  "bin": {