@lvnt/release-radar 1.7.11 → 1.7.13
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 +1 -1
- package/cli/src/index.ts +19 -1
- package/dist/index.js +10 -7
- package/package.json +1 -1
package/cli/package.json
CHANGED
package/cli/src/index.ts
CHANGED
|
@@ -17,6 +17,20 @@ function getVersion(): string {
|
|
|
17
17
|
return pkg.version;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
function showLogo(): void {
|
|
21
|
+
const version = getVersion();
|
|
22
|
+
const logo = `
|
|
23
|
+
${chalk.cyan(' ____ _ ____ _ ')}
|
|
24
|
+
${chalk.cyan(' | _ \\ ___| | ___ __ _ ___ ___ | _ \\ __ _ __| | __ _ _ __ ')}
|
|
25
|
+
${chalk.cyan(' | |_) / _ \\ |/ _ \\/ _` / __|/ _ \\| |_) / _` |/ _` |/ _` | \'__|')}
|
|
26
|
+
${chalk.cyan(' | _ < __/ | __/ (_| \\__ \\ __/| _ < (_| | (_| | (_| | | ')}
|
|
27
|
+
${chalk.cyan(' |_| \\_\\___|_|\\___|\\__,_|___/\\___||_| \\_\\__,_|\\__,_|\\__,_|_| ')}
|
|
28
|
+
|
|
29
|
+
${chalk.gray(' Tool Download Manager')} ${chalk.yellow(`v${version}`)}
|
|
30
|
+
`;
|
|
31
|
+
console.log(logo);
|
|
32
|
+
}
|
|
33
|
+
|
|
20
34
|
function showHelp(): void {
|
|
21
35
|
const version = getVersion();
|
|
22
36
|
console.log(`
|
|
@@ -55,7 +69,8 @@ async function showStatus(): Promise<void> {
|
|
|
55
69
|
const versions = loadVersions();
|
|
56
70
|
const downloaded = tracker.getAll();
|
|
57
71
|
|
|
58
|
-
|
|
72
|
+
showLogo();
|
|
73
|
+
console.log(chalk.bold('Tool Status:\n'));
|
|
59
74
|
|
|
60
75
|
const rows: TableRow[] = versions.tools.map(tool => {
|
|
61
76
|
const record = downloaded[tool.name];
|
|
@@ -128,6 +143,9 @@ async function runInteractive(): Promise<void> {
|
|
|
128
143
|
await checkAndUpdate();
|
|
129
144
|
}
|
|
130
145
|
|
|
146
|
+
// Show logo
|
|
147
|
+
showLogo();
|
|
148
|
+
|
|
131
149
|
// First run setup
|
|
132
150
|
if (!configManager.isConfigured()) {
|
|
133
151
|
const config = await promptSetup();
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { config } from 'dotenv';
|
|
|
3
3
|
config();
|
|
4
4
|
import TelegramBot from 'node-telegram-bot-api';
|
|
5
5
|
import cron from 'node-cron';
|
|
6
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync, cpSync } from 'fs';
|
|
6
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, cpSync, rmSync } from 'fs';
|
|
7
7
|
import { fileURLToPath } from 'url';
|
|
8
8
|
import { dirname, join } from 'path';
|
|
9
9
|
import { Storage } from './storage.js';
|
|
@@ -65,11 +65,7 @@ const PKG_CLI_DIR = join(PKG_ROOT, 'cli');
|
|
|
65
65
|
const USER_CLI_DIR = join(DATA_DIR, 'cli');
|
|
66
66
|
console.log(`Syncing CLI source from ${PKG_CLI_DIR} to ${USER_CLI_DIR}...`);
|
|
67
67
|
if (existsSync(PKG_CLI_DIR)) {
|
|
68
|
-
//
|
|
69
|
-
if (!existsSync(USER_CLI_DIR)) {
|
|
70
|
-
mkdirSync(USER_CLI_DIR, { recursive: true });
|
|
71
|
-
}
|
|
72
|
-
// Sync source files (excluding node_modules which is installed separately)
|
|
68
|
+
// Sync source files (excluding node_modules and dist which are generated)
|
|
73
69
|
const filesToSync = ['src', 'bin', 'package.json', 'tsconfig.json', 'README.md'];
|
|
74
70
|
let syncedCount = 0;
|
|
75
71
|
for (const file of filesToSync) {
|
|
@@ -77,7 +73,14 @@ if (existsSync(PKG_CLI_DIR)) {
|
|
|
77
73
|
const destPath = join(USER_CLI_DIR, file);
|
|
78
74
|
if (existsSync(srcPath)) {
|
|
79
75
|
try {
|
|
80
|
-
|
|
76
|
+
// Remove existing destination first to ensure clean copy
|
|
77
|
+
if (existsSync(destPath)) {
|
|
78
|
+
rmSync(destPath, { recursive: true, force: true });
|
|
79
|
+
}
|
|
80
|
+
// Ensure parent directory exists
|
|
81
|
+
mkdirSync(USER_CLI_DIR, { recursive: true });
|
|
82
|
+
// Copy fresh
|
|
83
|
+
cpSync(srcPath, destPath, { recursive: true });
|
|
81
84
|
syncedCount++;
|
|
82
85
|
}
|
|
83
86
|
catch (err) {
|