natureco-cli 2.17.9 → 2.17.11

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "natureco-cli",
3
- "version": "2.17.9",
3
+ "version": "2.17.11",
4
4
  "description": "NatureCo AI Bot Terminal Interface",
5
5
  "main": "bin/natureco.js",
6
6
  "bin": {
@@ -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,20 +136,25 @@ async function chat(botName, options = {}) {
115
136
 
116
137
  // ── Header ──────────────────────────────────────────────────────────────────
117
138
  console.clear();
118
- ASCII_LOGO.forEach((line, i) => {
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(` (\\_/) `) + chalk.white(`Hoş geldin, ${userName}`) + chalk.gray(' · ') + chalk.cyan(`${displayBotName} hazır`) + chalk.gray(` · v${version}`));
123
- console.log(sep());
141
+ console.log(centerText(chalk.cyan(`(\\_/) `) + chalk.white(`Hoş geldin, ${userName}`) + chalk.gray(' · ') + chalk.cyan(`${displayBotName} hazır`) + chalk.gray(` · v${version}`)));
142
+ console.log(centerText(chalk.gray('─'.repeat(60))));
124
143
  console.log();
125
144
 
126
145
  // ── What's New ──────────────────────────────────────────────────────────────
127
146
  if (isNewVersion) {
128
- console.log(chalk.yellow(`── v${version} yenilikleri ──`));
129
- CHANGELOG.forEach(c => console.log(chalk.gray(` · ${c}`)));
147
+ console.log(centerText(chalk.yellow(`── v${version} yenilikleri ──`)));
148
+ CHANGELOG.forEach(c => console.log(centerText(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(centerText(chalk.gray('─'.repeat(60))));
155
+ console.log(centerText(chalk.yellow(TIPS[dayIndex])));
156
+ console.log(centerText(chalk.gray('─'.repeat(60))));
157
+ console.log();
132
158
  }
133
159
 
134
160
  // ── Önceki session mesajları ─────────────────────────────────────────────────
@@ -141,8 +167,8 @@ async function chat(botName, options = {}) {
141
167
  });
142
168
  }
143
169
 
144
- console.log(chalk.gray(` ${shortModel} · /help için yardım · Ctrl+C çıkış`));
145
- console.log(sep());
170
+ console.log(centerText(chalk.gray(` ${shortModel} · /help için yardım · Ctrl+C çıkış`)));
171
+ console.log(centerText(chalk.gray('─'.repeat(60))));
146
172
  console.log();
147
173
 
148
174
  // ── Yükleme animasyonu ──────────────────────────────────────────────────────