natureco-cli 5.61.0 → 5.62.0

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.
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const fs = require('fs');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const path = require('path');
4
6
  const os = require('os');
5
7
  const crypto = require('crypto');
@@ -36,7 +38,7 @@ function devicePair(args) {
36
38
  if (action === 'verify') return verifyPairing(params[0], params[1]);
37
39
 
38
40
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
39
- console.log(chalk.gray(' Kullanım: natureco device-pair [list|request|approve|reject|remove|pairing-code|verify]\n'));
41
+ console.log(chalk.gray(L(' Kullanım: natureco device-pair [list|request|approve|reject|remove|pairing-code|verify]\n', ' Usage: natureco device-pair [list|request|approve|reject|remove|pairing-code|verify]\n')));
40
42
  process.exit(1);
41
43
  }
42
44
 
@@ -48,7 +50,7 @@ function listDevices() {
48
50
 
49
51
  const devices = data.pairedDevices || [];
50
52
  if (devices.length === 0) {
51
- console.log(chalk.gray(' Eşleştirilmiş cihaz yok.\n'));
53
+ console.log(chalk.gray(L(' Eşleştirilmiş cihaz yok.\n', ' No paired devices.\n')));
52
54
  } else {
53
55
  for (const d of devices) {
54
56
  console.log(` ${chalk.green('●')} ${chalk.white(d.name || d.id)} ${chalk.gray(`(${d.type || 'unknown'})`)}`);
@@ -60,13 +62,13 @@ function listDevices() {
60
62
 
61
63
  const pending = data.pendingRequests || [];
62
64
  if (pending.length > 0) {
63
- console.log(chalk.yellow(`\n ⏳ Bekleyen İstekler (${pending.length})\n`));
65
+ console.log(chalk.yellow(`\n ⏳ ${L('Bekleyen İstekler', 'Pending Requests')} (${pending.length})\n`));
64
66
  for (const p of pending) {
65
67
  console.log(` ${chalk.yellow('◐')} ${chalk.white(p.name || p.id)} ${chalk.gray(`(${p.type || 'unknown'})`)}`);
66
68
  console.log(` ${chalk.gray('Code:')} ${chalk.cyan(p.code)}`);
67
69
  console.log(` ${chalk.gray('Since:')} ${p.requestedAt ? new Date(p.requestedAt).toLocaleString() : '-'}`);
68
70
  }
69
- console.log(chalk.gray('\n Onaylamak için:'));
71
+ console.log(chalk.gray(L('\n Onaylamak için:', '\n To approve:')));
70
72
  console.log(chalk.cyan(' natureco device-pair approve <code>'));
71
73
  console.log(chalk.cyan(' natureco device-pair reject <code>'));
72
74
  }
@@ -109,7 +111,7 @@ function requestPairing(deviceName, deviceType) {
109
111
 
110
112
  function approvePairing(code) {
111
113
  if (!code) {
112
- console.log(chalk.red('\n ❌ Pairing code gerekli\n'));
114
+ console.log(chalk.red(L('\n ❌ Pairing code gerekli\n', '\n ❌ Pairing code required\n')));
113
115
  process.exit(1);
114
116
  }
115
117
 
@@ -117,8 +119,8 @@ function approvePairing(code) {
117
119
  const idx = (data.pendingRequests || []).findIndex(p => p.code === code);
118
120
 
119
121
  if (idx === -1) {
120
- console.log(chalk.red(`\n ❌ Geçersiz pairing code: ${code}\n`));
121
- console.log(chalk.gray(' Bekleyen istekleri görmek için: natureco device-pair list\n'));
122
+ console.log(chalk.red(`\n ❌ ${L('Geçersiz pairing code', 'Invalid pairing code')}: ${code}\n`));
123
+ console.log(chalk.gray(L(' Bekleyen istekleri görmek için: natureco device-pair list\n', ' To see pending requests: natureco device-pair list\n')));
122
124
  process.exit(1);
123
125
  }
124
126
 
@@ -144,7 +146,7 @@ function approvePairing(code) {
144
146
 
145
147
  function rejectPairing(code) {
146
148
  if (!code) {
147
- console.log(chalk.red('\n ❌ Pairing code gerekli\n'));
149
+ console.log(chalk.red(L('\n ❌ Pairing code gerekli\n', '\n ❌ Pairing code required\n')));
148
150
  process.exit(1);
149
151
  }
150
152
 
@@ -152,7 +154,7 @@ function rejectPairing(code) {
152
154
  const idx = (data.pendingRequests || []).findIndex(p => p.code === code);
153
155
 
154
156
  if (idx === -1) {
155
- console.log(chalk.red(`\n ❌ Geçersiz pairing code: ${code}\n`));
157
+ console.log(chalk.red(`\n ❌ ${L('Geçersiz pairing code', 'Invalid pairing code')}: ${code}\n`));
156
158
  process.exit(1);
157
159
  }
158
160
 
@@ -165,7 +167,7 @@ function rejectPairing(code) {
165
167
 
166
168
  function removeDevice(deviceId) {
167
169
  if (!deviceId) {
168
- console.log(chalk.red('\n ❌ Device ID gerekli\n'));
170
+ console.log(chalk.red(L('\n ❌ Device ID gerekli\n', '\n ❌ Device ID required\n')));
169
171
  console.log(chalk.cyan(' natureco device-pair remove dev_abc123\n'));
170
172
  process.exit(1);
171
173
  }
@@ -174,7 +176,7 @@ function removeDevice(deviceId) {
174
176
  const idx = (data.pairedDevices || []).findIndex(d => d.id === deviceId);
175
177
 
176
178
  if (idx === -1) {
177
- console.log(chalk.red(`\n ❌ Cihaz bulunamadı: ${deviceId}\n`));
179
+ console.log(chalk.red(`\n ❌ ${L('Cihaz bulunamadı', 'Device not found')}: ${deviceId}\n`));
178
180
  process.exit(1);
179
181
  }
180
182
 
@@ -200,7 +202,7 @@ function showPairingCode() {
200
202
 
201
203
  function verifyPairing(code, deviceName) {
202
204
  if (!code) {
203
- console.log(chalk.red('\n ❌ Pairing code gerekli\n'));
205
+ console.log(chalk.red(L('\n ❌ Pairing code gerekli\n', '\n ❌ Pairing code required\n')));
204
206
  process.exit(1);
205
207
  }
206
208
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const tui = require('../utils/tui');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const F = require('../utils/format');
4
6
  const { getConfig, saveConfig } = require('../utils/config');
5
7
  const fs = require('fs');
@@ -20,7 +22,7 @@ function devices(args) {
20
22
  if (action === 'clear') return clearDevices();
21
23
 
22
24
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
23
- console.log(chalk.gray(' Kullanım: natureco devices [list|pair|unpair|remove|token|regenerate-token|rotate|revoke|clear]\n'));
25
+ console.log(chalk.gray(L(' Kullanım: natureco devices [list|pair|unpair|remove|token|regenerate-token|rotate|revoke|clear]\n', ' Usage: natureco devices [list|pair|unpair|remove|token|regenerate-token|rotate|revoke|clear]\n')));
24
26
  process.exit(1);
25
27
  }
26
28
 
@@ -28,12 +30,12 @@ function listDevices() {
28
30
  const config = getConfig();
29
31
  const devices = config.pairedDevices || [];
30
32
 
31
- console.log('\n' + tui.styled(' 📱 Cihaz Listesi', { color: tui.PALETTE.primary, bold: true }));
33
+ console.log('\n' + tui.styled(L(' 📱 Cihaz Listesi', ' 📱 Device List'), { color: tui.PALETTE.primary, bold: true }));
32
34
  console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
33
35
 
34
36
  if (devices.length === 0) {
35
- console.log('\n ' + tui.C.muted('Eşleşmiş cihaz yok.'));
36
- console.log(' ' + tui.C.muted('Eşleştirmek için: ') + tui.C.brand('natureco devices pair <ad> <tip>'));
37
+ console.log('\n ' + tui.C.muted(L('Eşleşmiş cihaz yok.', 'No paired devices.')));
38
+ console.log(' ' + tui.C.muted(L('Eşleştirmek için: ', 'To pair: ')) + tui.C.brand('natureco devices pair <ad> <tip>'));
37
39
  console.log('');
38
40
  return;
39
41
  }
@@ -46,16 +48,16 @@ function listDevices() {
46
48
 
47
49
  console.log('\n' + tui.table(rows, [
48
50
  { key: 'id', label: 'ID', minWidth: 16, render: r => tui.C.muted(r.id) },
49
- { key: 'name', label: 'İsim', minWidth: 14, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
51
+ { key: 'name', label: L('İsim', 'Name'), minWidth: 14, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
50
52
  { key: 'type', label: 'Tip', minWidth: 12, render: r => tui.C.text(r.type) },
51
- { key: 'lastSeen', label: 'Eşleşme', minWidth: 18, render: r => tui.C.muted(r.lastSeen) },
53
+ { key: 'lastSeen', label: L('Eşleşme', 'Pairing'), minWidth: 18, render: r => tui.C.muted(r.lastSeen) },
52
54
  ], { borderStyle: 'round', zebra: true }));
53
55
  console.log('');
54
56
  }
55
57
 
56
58
  function pairDevice(name, type) {
57
59
  if (!name) {
58
- F.error('Device name gerekli');
60
+ F.error(L('Device name gerekli', 'Device name required'));
59
61
  process.exit(1);
60
62
  }
61
63
 
@@ -80,7 +82,7 @@ function pairDevice(name, type) {
80
82
 
81
83
  function unpairDevice(id) {
82
84
  if (!id) {
83
- F.error('Device ID gerekli');
85
+ F.error(L('Device ID gerekli', 'Device ID required'));
84
86
  process.exit(1);
85
87
  }
86
88
 
@@ -89,7 +91,7 @@ function unpairDevice(id) {
89
91
  const idx = devices.findIndex(d => d.id === id);
90
92
 
91
93
  if (idx === -1) {
92
- F.error('Cihaz bulunamadı: ' + id);
94
+ F.error(L('Cihaz bulunamadı: ', 'Device not found: ') + id);
93
95
  process.exit(1);
94
96
  }
95
97
 
@@ -121,7 +123,7 @@ function regenerateToken() {
121
123
 
122
124
  function rotateDevice(deviceId) {
123
125
  if (!deviceId) {
124
- F.error('Device ID gerekli');
126
+ F.error(L('Device ID gerekli', 'Device ID required'));
125
127
  process.exit(1);
126
128
  }
127
129
 
@@ -131,7 +133,7 @@ function rotateDevice(deviceId) {
131
133
 
132
134
  function revokeDevice(deviceId) {
133
135
  if (!deviceId) {
134
- F.error('Device ID gerekli');
136
+ F.error(L('Device ID gerekli', 'Device ID required'));
135
137
  process.exit(1);
136
138
  }
137
139
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const path = require('path');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const fs = require('fs');
4
6
  const os = require('os');
5
7
  const { getConfig } = require('../utils/config');
@@ -33,7 +35,7 @@ function directory(args) {
33
35
  if (action === 'groups') return groupsList();
34
36
 
35
37
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
36
- console.log(chalk.gray(' Kullanım: natureco directory [self|peers|search|register|remove|groups]\n'));
38
+ console.log(chalk.gray(L(' Kullanım: natureco directory [self|peers|search|register|remove|groups]\n', ' Usage: natureco directory [self|peers|search|register|remove|groups]\n')));
37
39
  process.exit(1);
38
40
  }
39
41
 
@@ -89,8 +91,8 @@ function listPeers() {
89
91
 
90
92
  function searchPeers(query) {
91
93
  if (!query) {
92
- console.log(chalk.red('\n ❌ Arama sorgusu gerekli\n'));
93
- console.log(chalk.gray(' Kullanım: natureco directory search <query>\n'));
94
+ console.log(chalk.red(L('\n ❌ Arama sorgusu gerekli\n', '\n ❌ Search query required\n')));
95
+ console.log(chalk.gray(L(' Kullanım: natureco directory search <query>\n', ' Usage: natureco directory search <query>\n')));
94
96
  process.exit(1);
95
97
  }
96
98
 
@@ -103,7 +105,7 @@ function searchPeers(query) {
103
105
  );
104
106
 
105
107
  if (results.length === 0) {
106
- console.log(chalk.yellow(`\n "${query}" için eşleşen peer bulunamadı.\n`));
108
+ console.log(chalk.yellow(`\n "${query}" ${L('için eşleşen peer bulunamadı.', '— no matching peers found.')}\n`));
107
109
  return;
108
110
  }
109
111
 
@@ -119,26 +121,26 @@ function searchPeers(query) {
119
121
 
120
122
  function registerPeer(url, name) {
121
123
  if (!url) {
122
- console.log(chalk.red('\n ❌ URL gerekli\n'));
123
- console.log(chalk.gray(' Kullanım: natureco directory register <url> [name]\n'));
124
+ console.log(chalk.red(L('\n ❌ URL gerekli\n', '\n ❌ URL required\n')));
125
+ console.log(chalk.gray(L(' Kullanım: natureco directory register <url> [name]\n', ' Usage: natureco directory register <url> [name]\n')));
124
126
  process.exit(1);
125
127
  }
126
128
 
127
129
  const peers = loadPeers();
128
130
  if (peers.some(p => p.url === url)) {
129
- console.log(chalk.yellow(`\n ⚠ Bu peer zaten kayıtlı: ${url}\n`));
131
+ console.log(chalk.yellow(`\n ⚠ ${L('Bu peer zaten kayıtlı', 'This peer is already registered')}: ${url}\n`));
130
132
  return;
131
133
  }
132
134
 
133
135
  peers.push({ url, name: name || url, tags: [], addedAt: new Date().toISOString(), lastSeen: null });
134
136
  savePeers(peers);
135
- console.log(chalk.green(`\n ✓ Peer kaydedildi: ${name || url}\n`));
137
+ console.log(chalk.green(`\n ✓ ${L('Peer kaydedildi', 'Peer registered')}: ${name || url}\n`));
136
138
  }
137
139
 
138
140
  function removePeer(urlOrName) {
139
141
  if (!urlOrName) {
140
- console.log(chalk.red('\n ❌ URL veya isim gerekli\n'));
141
- console.log(chalk.gray(' Kullanım: natureco directory remove <url|name>\n'));
142
+ console.log(chalk.red(L('\n ❌ URL veya isim gerekli\n', '\n ❌ URL or name required\n')));
143
+ console.log(chalk.gray(L(' Kullanım: natureco directory remove <url|name>\n', ' Usage: natureco directory remove <url|name>\n')));
142
144
  process.exit(1);
143
145
  }
144
146
 
@@ -147,12 +149,12 @@ function removePeer(urlOrName) {
147
149
  peers = peers.filter(p => p.url !== urlOrName && p.name !== urlOrName);
148
150
 
149
151
  if (peers.length === initialLength) {
150
- console.log(chalk.yellow(`\n ⚠ Peer bulunamadı: ${urlOrName}\n`));
152
+ console.log(chalk.yellow(`\n ⚠ ${L('Peer bulunamadı', 'Peer not found')}: ${urlOrName}\n`));
151
153
  return;
152
154
  }
153
155
 
154
156
  savePeers(peers);
155
- console.log(chalk.green(`\n ✓ Peer kaldırıldı: ${urlOrName}\n`));
157
+ console.log(chalk.green(`\n ✓ ${L('Peer kaldırıldı', 'Peer removed')}: ${urlOrName}\n`));
156
158
  }
157
159
 
158
160
  function groupsList() {
@@ -161,7 +163,7 @@ function groupsList() {
161
163
 
162
164
  function groupsMembers(name) {
163
165
  if (!name) {
164
- console.log(chalk.red('\n ❌ Group name gerekli\n'));
166
+ console.log(chalk.red(L('\n ❌ Group name gerekli\n', '\n ❌ Group name required\n')));
165
167
  process.exit(1);
166
168
  }
167
169
  console.log(chalk.cyan('\n Members of group "' + name + '":\n'));
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const dns = require('dns');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const os = require('os');
4
6
 
5
7
  function dnsCmd(args) {
@@ -10,7 +12,7 @@ function dnsCmd(args) {
10
12
  if (action === 'services') return discoverServices();
11
13
 
12
14
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
13
- console.log(chalk.gray(' Kullanım: natureco dns [discover|resolve <host>|services]\n'));
15
+ console.log(chalk.gray(L(' Kullanım: natureco dns [discover|resolve <host>|services]\n', ' Usage: natureco dns [discover|resolve <host>|services]\n')));
14
16
  process.exit(1);
15
17
  }
16
18
 
@@ -93,7 +95,7 @@ function detectZeroTier() {
93
95
  function resolveHost(hostname) {
94
96
  if (!hostname) {
95
97
  console.log(chalk.red('\n ❌ Hostname gerekli\n'));
96
- console.log(chalk.gray(' Kullanım: natureco dns resolve <hostname>\n'));
98
+ console.log(chalk.gray(L(' Kullanım: natureco dns resolve <hostname>\n', ' Usage: natureco dns resolve <hostname>\n')));
97
99
  process.exit(1);
98
100
  }
99
101
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const tui = require('../utils/tui');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const F = require('../utils/format');
4
6
  const fs = require('fs');
5
7
  const path = require('path');
@@ -183,12 +185,12 @@ function listNodes() {
183
185
  }));
184
186
  console.log('\n' + tui.table(rows, [
185
187
  { key: 'id', label: 'ID', minWidth: 14, render: r => tui.C.muted(r.id) },
186
- { key: 'name', label: 'İsim', minWidth: 14, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
188
+ { key: 'name', label: L('İsim', 'Name'), minWidth: 14, render: r => tui.styled(r.name, { color: tui.PALETTE.primary, bold: true }) },
187
189
  {
188
190
  key: 'status', label: 'Durum', minWidth: 12,
189
191
  render: r => tui.styled(' ✓ Online ', { bg: tui.PALETTE.success, color: '#000', bold: true })
190
192
  },
191
- { key: 'lastSeen', label: 'Son Görülme', minWidth: 18, render: r => tui.C.muted(r.lastSeen) },
193
+ { key: 'lastSeen', label: L('Son Görülme', 'Last Seen'), minWidth: 18, render: r => tui.C.muted(r.lastSeen) },
192
194
  ], { borderStyle: 'round', zebra: true }));
193
195
  console.log('');
194
196
  }
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const path = require('path');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const fs = require('fs');
4
6
  const os = require('os');
5
7
 
@@ -74,21 +76,21 @@ function ocPath(args) {
74
76
  if (action === 'ls') return lsPath(params.join('/'));
75
77
 
76
78
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
77
- console.log(chalk.gray(' Kullanım: natureco oc-path [resolve|list|cat|ls] <path>\n'));
79
+ console.log(chalk.gray(L(' Kullanım: natureco oc-path [resolve|list|cat|ls] <path>\n', ' Usage: natureco oc-path [resolve|list|cat|ls] <path>\n')));
78
80
  process.exit(1);
79
81
  }
80
82
 
81
83
  function resolvePath(uri) {
82
84
  const ncPath = normalizeNcPath(uri);
83
85
  if (!ncPath) {
84
- console.log(chalk.red('\n ❌ Path gerekli\n'));
86
+ console.log(chalk.red(L('\n ❌ Path gerekli\n', '\n ❌ Path required\n')));
85
87
  console.log(chalk.cyan(' natureco oc-path resolve nc://config\n'));
86
88
  process.exit(1);
87
89
  }
88
90
 
89
91
  const resolved = resolveNcPath(ncPath);
90
92
  if (!resolved) {
91
- console.log(chalk.red(`\n ❌ Çözümlenemedi: ${ncPath}\n`));
93
+ console.log(chalk.red(`\n ❌ ${L('Çözümlenemedi', 'Could not resolve')}: ${ncPath}\n`));
92
94
  process.exit(1);
93
95
  }
94
96
 
@@ -133,24 +135,24 @@ function listScopes() {
133
135
  function catFile(uri) {
134
136
  const ncPath = normalizeNcPath(uri);
135
137
  if (!ncPath) {
136
- console.log(chalk.red('\n ❌ Path gerekli\n'));
138
+ console.log(chalk.red(L('\n ❌ Path gerekli\n', '\n ❌ Path required\n')));
137
139
  process.exit(1);
138
140
  }
139
141
 
140
142
  const resolved = resolveNcPath(ncPath);
141
143
  if (!resolved) {
142
- console.log(chalk.red(`\n ❌ Çözümlenemedi: ${ncPath}\n`));
144
+ console.log(chalk.red(`\n ❌ ${L('Çözümlenemedi', 'Could not resolve')}: ${ncPath}\n`));
143
145
  process.exit(1);
144
146
  }
145
147
 
146
148
  if (!fs.existsSync(resolved.path)) {
147
- console.log(chalk.red(`\n ❌ Dosya bulunamadı: ${resolved.path}\n`));
149
+ console.log(chalk.red(`\n ❌ ${L('Dosya bulunamadı', 'File not found')}: ${resolved.path}\n`));
148
150
  process.exit(1);
149
151
  }
150
152
 
151
153
  const stat = fs.statSync(resolved.path);
152
154
  if (stat.isDirectory()) {
153
- console.log(chalk.yellow(`\n ⚠️ Bu bir dizin, dosya değil: ${resolved.path}\n`));
155
+ console.log(chalk.yellow(`\n ⚠️ ${L('Bu bir dizin, dosya değil', 'This is a directory, not a file')}: ${resolved.path}\n`));
154
156
  process.exit(1);
155
157
  }
156
158
 
@@ -163,24 +165,24 @@ function catFile(uri) {
163
165
  function lsPath(uri) {
164
166
  const ncPath = normalizeNcPath(uri || 'nc://w');
165
167
  if (!ncPath) {
166
- console.log(chalk.red('\n ❌ Path gerekli\n'));
168
+ console.log(chalk.red(L('\n ❌ Path gerekli\n', '\n ❌ Path required\n')));
167
169
  process.exit(1);
168
170
  }
169
171
 
170
172
  const resolved = resolveNcPath(ncPath);
171
173
  if (!resolved) {
172
- console.log(chalk.red(`\n ❌ Çözümlenemedi: ${ncPath}\n`));
174
+ console.log(chalk.red(`\n ❌ ${L('Çözümlenemedi', 'Could not resolve')}: ${ncPath}\n`));
173
175
  process.exit(1);
174
176
  }
175
177
 
176
178
  if (!fs.existsSync(resolved.path)) {
177
- console.log(chalk.red(`\n ❌ Dizin bulunamadı: ${resolved.path}\n`));
179
+ console.log(chalk.red(`\n ❌ ${L('Dizin bulunamadı', 'Directory not found')}: ${resolved.path}\n`));
178
180
  process.exit(1);
179
181
  }
180
182
 
181
183
  const stat = fs.statSync(resolved.path);
182
184
  if (!stat.isDirectory()) {
183
- console.log(chalk.yellow(`\n ⚠️ Bu bir dosya: ${resolved.path}\n`));
185
+ console.log(chalk.yellow(`\n ⚠️ ${L('Bu bir dosya', 'This is a file')}: ${resolved.path}\n`));
184
186
  process.exit(1);
185
187
  }
186
188
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const path = require('path');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const fs = require('fs');
4
6
 
5
7
  function openProse(args) {
@@ -9,7 +11,7 @@ function openProse(args) {
9
11
  if (action === 'info') return showInfo();
10
12
 
11
13
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
12
- console.log(chalk.gray(' Kullanım: natureco open-prose [list|info]\n'));
14
+ console.log(chalk.gray(L(' Kullanım: natureco open-prose [list|info]\n', ' Usage: natureco open-prose [list|info]\n')));
13
15
  process.exit(1);
14
16
  }
15
17
 
@@ -37,11 +39,11 @@ function listBundles() {
37
39
  }
38
40
 
39
41
  if (bundles.length === 0) {
40
- console.log(chalk.gray(' Yüklü bundle bulunamadı.\n'));
42
+ console.log(chalk.gray(L(' Yüklü bundle bulunamadı.\n', ' No bundles installed.\n')));
41
43
  }
42
44
 
43
45
  console.log(chalk.gray('\n OpenProse, NatureCo\'nun prose skills paketidir.\n'));
44
- console.log(chalk.gray(' Skills yüklemek için:'));
46
+ console.log(chalk.gray(L(' Skills yüklemek için:', ' To install skills:')));
45
47
  console.log(chalk.cyan(' natureco skills install <name>\n'));
46
48
  }
47
49
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const path = require('path');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const fs = require('fs');
4
6
  const os = require('os');
5
7
 
@@ -59,7 +61,7 @@ function listPaths() {
59
61
 
60
62
  function resolvePath(uri) {
61
63
  if (!uri) {
62
- console.log(chalk.red('\n ❌ URI gerekli\n'));
64
+ console.log(chalk.red(L('\n ❌ URI gerekli\n', '\n ❌ URI required\n')));
63
65
  console.log(chalk.gray(' Usage: natureco path resolve nc://path\n'));
64
66
  process.exit(1);
65
67
  }
@@ -101,7 +103,7 @@ function resolvePath(uri) {
101
103
 
102
104
  function findPath(name) {
103
105
  if (!name) {
104
- console.log(chalk.red('\n ❌ Name gerekli\n'));
106
+ console.log(chalk.red(L('\n ❌ Name gerekli\n', '\n ❌ Name required\n')));
105
107
  process.exit(1);
106
108
  }
107
109
 
@@ -127,11 +129,11 @@ function findPath(name) {
127
129
 
128
130
  function setPath(name, targetPath) {
129
131
  if (!name) {
130
- console.log(chalk.red('\n ❌ Name gerekli\n'));
132
+ console.log(chalk.red(L('\n ❌ Name gerekli\n', '\n ❌ Name required\n')));
131
133
  process.exit(1);
132
134
  }
133
135
  if (!targetPath) {
134
- console.log(chalk.red('\n ❌ Path gerekli\n'));
136
+ console.log(chalk.red(L('\n ❌ Path gerekli\n', '\n ❌ Path required\n')));
135
137
  process.exit(1);
136
138
  }
137
139
 
@@ -147,7 +149,7 @@ function setPath(name, targetPath) {
147
149
 
148
150
  function validatePath(name) {
149
151
  if (!name) {
150
- console.log(chalk.red('\n ❌ Name gerekli\n'));
152
+ console.log(chalk.red(L('\n ❌ Name gerekli\n', '\n ❌ Name required\n')));
151
153
  process.exit(1);
152
154
  }
153
155
 
@@ -180,7 +182,7 @@ function validatePath(name) {
180
182
 
181
183
  function emitPath(name) {
182
184
  if (!name) {
183
- console.log(chalk.red('\n ❌ Name gerekli\n'));
185
+ console.log(chalk.red(L('\n ❌ Name gerekli\n', '\n ❌ Name required\n')));
184
186
  process.exit(1);
185
187
  }
186
188
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const http = require('http');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const https = require('https');
4
6
  const path = require('path');
5
7
  const fs = require('fs');
@@ -47,7 +49,7 @@ function proxy(args) {
47
49
  if (action === 'purge') return cmdPurge();
48
50
 
49
51
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
50
- console.log(chalk.gray(' Kullanım: natureco proxy [status|start|stop|capture|clear|run|coverage|sessions|query|blob|purge]\n'));
52
+ console.log(chalk.gray(L(' Kullanım: natureco proxy [status|start|stop|capture|clear|run|coverage|sessions|query|blob|purge]\n', ' Usage: natureco proxy [status|start|stop|capture|clear|run|coverage|sessions|query|blob|purge]\n')));
51
53
  process.exit(1);
52
54
  }
53
55
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const crypto = require('crypto');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const qrcode = require('qrcode-terminal');
4
6
 
5
7
  function qr(args) {
@@ -48,8 +50,8 @@ function showQR(data) {
48
50
 
49
51
  function generateQR(text) {
50
52
  if (!text) {
51
- console.log(chalk.red('\n ❌ QR için veri gerekli\n'));
52
- console.log(chalk.gray(' Örnek: natureco qr generate "https://natureco.me/pair?code=ABC"\n'));
53
+ console.log(chalk.red(L('\n ❌ QR için veri gerekli\n', '\n ❌ Data required for QR\n')));
54
+ console.log(chalk.gray(L(' Örnek: natureco qr generate "https://natureco.me/pair?code=ABC"\n', ' Example: natureco qr generate "https://natureco.me/pair?code=ABC"\n')));
53
55
  process.exit(1);
54
56
  }
55
57
  console.log(chalk.cyan('\n 📱 QR: ') + chalk.white(text) + '\n');
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const { execSync, spawn } = require('child_process');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const fs = require('fs');
4
6
  const path = require('path');
5
7
  const os = require('os');
@@ -15,7 +17,7 @@ function sandbox(args) {
15
17
  if (action === 'exec') return execSandbox(params[0], params.slice(1).join(' '));
16
18
 
17
19
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
18
- console.log(chalk.gray(' Kullanım: natureco sandbox [list|create|destroy|exec]\n'));
20
+ console.log(chalk.gray(L(' Kullanım: natureco sandbox [list|create|destroy|exec]\n', ' Usage: natureco sandbox [list|create|destroy|exec]\n')));
19
21
  process.exit(1);
20
22
  }
21
23
 
@@ -80,7 +82,7 @@ function createSandbox(name) {
80
82
 
81
83
  function destroySandbox(name) {
82
84
  if (!name) {
83
- console.log(chalk.red('\n ❌ Sandbox name gerekli\n'));
85
+ console.log(chalk.red(L('\n ❌ Sandbox name gerekli\n', '\n ❌ Sandbox name required\n')));
84
86
  process.exit(1);
85
87
  }
86
88
 
@@ -98,8 +100,8 @@ function destroySandbox(name) {
98
100
 
99
101
  function execSandbox(name, command) {
100
102
  if (!name || !command) {
101
- console.log(chalk.red('\n ❌ Sandbox name ve command gerekli\n'));
102
- console.log(chalk.gray(' Kullanım: natureco sandbox exec <name> <command>\n'));
103
+ console.log(chalk.red(L('\n ❌ Sandbox name ve command gerekli\n', '\n ❌ Sandbox name and command required\n')));
104
+ console.log(chalk.gray(L(' Kullanım: natureco sandbox exec <name> <command>\n', ' Usage: natureco sandbox exec <name> <command>\n')));
103
105
  process.exit(1);
104
106
  }
105
107
 
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const tui = require('../utils/tui');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
  const F = require('../utils/format');
4
6
  const { getConfig, saveConfig } = require('../utils/config');
5
7
 
@@ -16,7 +18,7 @@ function secrets(args) {
16
18
  if (action === 'apply') return applySecrets();
17
19
 
18
20
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
19
- console.log(chalk.gray(' Kullanım: natureco secrets [list|set|get|unset|audit|reload|configure|apply]\n'));
21
+ console.log(chalk.gray(L(' Kullanım: natureco secrets [list|set|get|unset|audit|reload|configure|apply]\n', ' Usage: natureco secrets [list|set|get|unset|audit|reload|configure|apply]\n')));
20
22
  process.exit(1);
21
23
  }
22
24
 
@@ -42,9 +44,9 @@ function listSecrets() {
42
44
  });
43
45
 
44
46
  console.log('\n' + tui.table(rows, [
45
- { key: 'key', label: 'İsim', minWidth: 24, render: r => tui.styled(r.key, { color: tui.PALETTE.primary, bold: true }) },
46
- { key: 'masked', label: 'Maskelenmiş', minWidth: 16, render: r => tui.styled(r.masked, { color: tui.PALETTE.warning }) },
47
- { key: 'updated', label: 'Güncellendi', minWidth: 14, render: r => tui.C.muted(r.updated) },
47
+ { key: 'key', label: L('İsim', 'Name'), minWidth: 24, render: r => tui.styled(r.key, { color: tui.PALETTE.primary, bold: true }) },
48
+ { key: 'masked', label: L('Maskelenmiş', 'Masked'), minWidth: 16, render: r => tui.styled(r.masked, { color: tui.PALETTE.warning }) },
49
+ { key: 'updated', label: L('Güncellendi', 'Updated'), minWidth: 14, render: r => tui.C.muted(r.updated) },
48
50
  ], { borderStyle: 'round', zebra: true }));
49
51
  console.log('');
50
52
  }
@@ -1,5 +1,7 @@
1
1
  const chalk = require('chalk');
2
2
  const os = require('os');
3
+ const { getLang: _gl } = require('../utils/i18n');
4
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
3
5
 
4
6
  function system(args) {
5
7
  const [action, ...params] = args || [];
@@ -9,7 +11,7 @@ function system(args) {
9
11
  if (action === 'presence') return systemPresence();
10
12
 
11
13
  console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
12
- console.log(chalk.gray(' Kullanım: natureco system [status|events|presence]\n'));
14
+ console.log(chalk.gray(L(' Kullanım: natureco system [status|events|presence]\n', ' Usage: natureco system [status|events|presence]\n')));
13
15
  process.exit(1);
14
16
  }
15
17