@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.
- package/dist/index.js +17 -8
- 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
|
-
//
|
|
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)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
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 });
|