natureco-cli 2.17.9 → 2.17.10
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/package.json +1 -1
- package/src/commands/chat.js +30 -4
package/package.json
CHANGED
package/src/commands/chat.js
CHANGED
|
@@ -26,6 +26,19 @@ const ASCII_LOGO = [
|
|
|
26
26
|
'╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝',
|
|
27
27
|
];
|
|
28
28
|
|
|
29
|
+
// ── Tips ─────────────────────────────────────────────────────────────────────
|
|
30
|
+
const TIPS = [
|
|
31
|
+
"🌿 Nature.co'da canlı yayın yapabilir, sesli odalarda buluşabilirsin — natureco.me",
|
|
32
|
+
'🤖 NatureBot AI ile içerik üret, topluluğunu yönet, trendi yakala — natureco.me/robot-house',
|
|
33
|
+
'📡 Geliştirici API ile platformu entegre et — natureco.me/developer',
|
|
34
|
+
'🏆 Günlük görevler tamamla, XP kazan, liderlik tablosuna gir — natureco.me',
|
|
35
|
+
"📺 Nature TV'de doğa belgeselleri ve oyun yayınları tek platformda!",
|
|
36
|
+
'👥 Kendi sunucunu kur, özel kanallar ve roller oluştur — natureco.me',
|
|
37
|
+
'🔌 WordPress sitene tek tıkla NatureBot ekle — natureco SDK ile entegre et',
|
|
38
|
+
"📱 Nature.co masaüstü uygulaması — Mac, Windows ve Android TV'de mevcut!",
|
|
39
|
+
'🌍 Forum, blog ve etkinlikler — topluluğa katıl, doğa projelerinde yer al',
|
|
40
|
+
];
|
|
41
|
+
|
|
29
42
|
// ── What's New ────────────────────────────────────────────────────────────────
|
|
30
43
|
const CHANGELOG = [
|
|
31
44
|
'Eklendi: Chalk TUI — saf readline tabanlı arayüz',
|
|
@@ -37,6 +50,14 @@ const CHANGELOG = [
|
|
|
37
50
|
|
|
38
51
|
const sep = () => chalk.gray('─'.repeat(process.stdout.columns || 80));
|
|
39
52
|
|
|
53
|
+
function centerText(text) {
|
|
54
|
+
const width = process.stdout.columns || 120;
|
|
55
|
+
return text.split('\n').map(line => {
|
|
56
|
+
const padding = Math.max(0, Math.floor((width - line.length) / 2));
|
|
57
|
+
return ' '.repeat(padding) + line;
|
|
58
|
+
}).join('\n');
|
|
59
|
+
}
|
|
60
|
+
|
|
40
61
|
async function chat(botName, options = {}) {
|
|
41
62
|
const apiKey = getApiKey();
|
|
42
63
|
const config = getConfig();
|
|
@@ -115,11 +136,9 @@ async function chat(botName, options = {}) {
|
|
|
115
136
|
|
|
116
137
|
// ── Header ──────────────────────────────────────────────────────────────────
|
|
117
138
|
console.clear();
|
|
118
|
-
ASCII_LOGO.
|
|
119
|
-
console.log(i < 5 ? chalk.green(line) : chalk.gray(line));
|
|
120
|
-
});
|
|
139
|
+
console.log(centerText(ASCII_LOGO.map((line, i) => i < 5 ? chalk.green(line) : chalk.gray(line)).join('\n')));
|
|
121
140
|
console.log();
|
|
122
|
-
console.log(chalk.cyan(`
|
|
141
|
+
console.log(centerText(chalk.cyan(`(\\_/) `) + chalk.white(`Hoş geldin, ${userName}`) + chalk.gray(' · ') + chalk.cyan(`${displayBotName} hazır`) + chalk.gray(` · v${version}`)));
|
|
123
142
|
console.log(sep());
|
|
124
143
|
console.log();
|
|
125
144
|
|
|
@@ -129,6 +148,13 @@ async function chat(botName, options = {}) {
|
|
|
129
148
|
CHANGELOG.forEach(c => console.log(chalk.gray(` · ${c}`)));
|
|
130
149
|
console.log();
|
|
131
150
|
try { fs.writeFileSync(lastVersionFile, version); } catch {}
|
|
151
|
+
} else {
|
|
152
|
+
// Yeni versiyon yoksa günlük tip göster
|
|
153
|
+
const dayIndex = Math.floor(Date.now() / (1000 * 60 * 60 * 24)) % TIPS.length;
|
|
154
|
+
console.log(sep());
|
|
155
|
+
console.log(' ' + chalk.yellow(TIPS[dayIndex]));
|
|
156
|
+
console.log(sep());
|
|
157
|
+
console.log();
|
|
132
158
|
}
|
|
133
159
|
|
|
134
160
|
// ── Önceki session mesajları ─────────────────────────────────────────────────
|