natureco-cli 5.60.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 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,4 +1,6 @@
1
1
  const chalk = require('chalk');
2
+ const { getLang: _gl } = require('../utils/i18n');
3
+ const L = (tr, en) => (_gl() === 'en' ? en : tr);
2
4
  const fs = require('fs');
3
5
  const path = require('path');
4
6
  const os = require('os');
@@ -12,35 +14,35 @@ function policy(args) {
12
14
  if (action === 'list') return listPolicies();
13
15
  if (action === 'remove') return removePolicy(params[0]);
14
16
 
15
- console.log(chalk.red(`\n ❌ Bilinmeyen komut: ${action}\n`));
16
- console.log(chalk.gray(' Kullanım: natureco policy [check|set|list|remove]\n'));
17
+ console.log(chalk.red(`\n ❌ ${L('Bilinmeyen komut', 'Unknown command')}: ${action}\n`));
18
+ console.log(chalk.gray(L(' Kullanım: natureco policy [check|set|list|remove]\n', ' Usage: natureco policy [check|set|list|remove]\n')));
17
19
  process.exit(1);
18
20
  }
19
21
 
20
22
  const POLICY_CHECKS = [
21
23
  {
22
24
  id: 'node-version',
23
- name: 'Node.js Versiyonu',
25
+ name: L('Node.js Versiyonu', 'Node.js Version'),
24
26
  check: () => {
25
27
  const v = process.version.slice(1).split('.')[0];
26
28
  return parseInt(v) >= 18
27
29
  ? { status: 'pass', message: `Node.js ${process.version}` }
28
- : { status: 'fail', message: `Node.js ${process.version} (18+ gerekli)`, fix: 'Node.js güncelleyin' };
30
+ : { status: 'fail', message: `Node.js ${process.version} (18+ ${L('gerekli', 'required')})`, fix: L('Node.js güncelleyin', 'Update Node.js') };
29
31
  }
30
32
  },
31
33
  {
32
34
  id: 'config-exists',
33
- name: 'Config Dosyası',
35
+ name: L('Config Dosyası', 'Config File'),
34
36
  check: () => {
35
37
  const configFile = path.join(os.homedir(), '.natureco', 'config.json');
36
38
  if (!fs.existsSync(configFile)) {
37
- return { status: 'fail', message: 'config.json bulunamadı', fix: 'natureco setup çalıştırın' };
39
+ return { status: 'fail', message: L('config.json bulunamadı', 'config.json not found'), fix: L('natureco setup çalıştırın', 'run natureco setup') };
38
40
  }
39
41
  try {
40
42
  JSON.parse(fs.readFileSync(configFile, 'utf-8'));
41
- return { status: 'pass', message: 'Config geçerli JSON' };
43
+ return { status: 'pass', message: L('Config geçerli JSON', 'Config valid JSON') };
42
44
  } catch {
43
- return { status: 'fail', message: 'Config bozuk JSON', fix: '~/.natureco/config.json düzeltin' };
45
+ return { status: 'fail', message: L('Config bozuk JSON', 'Config broken JSON'), fix: L('~/.natureco/config.json düzeltin', 'fix ~/.natureco/config.json') };
44
46
  }
45
47
  }
46
48
  },
@@ -50,9 +52,9 @@ const POLICY_CHECKS = [
50
52
  check: () => {
51
53
  const config = getConfig();
52
54
  if (config.providerApiKey || config.apiKey || process.env.GROQ_API_KEY) {
53
- return { status: 'pass', message: 'API key mevcut' };
55
+ return { status: 'pass', message: L('API key mevcut', 'API key present') };
54
56
  }
55
- return { status: 'warn', message: 'API key eksik', fix: 'natureco login veya GROQ_API_KEY env' };
57
+ return { status: 'warn', message: L('API key eksik', 'API key missing'), fix: L('natureco login veya GROQ_API_KEY env', 'natureco login or GROQ_API_KEY env') };
56
58
  }
57
59
  },
58
60
  {
@@ -63,46 +65,46 @@ const POLICY_CHECKS = [
63
65
  if (config.providerUrl) {
64
66
  return { status: 'pass', message: config.providerUrl };
65
67
  }
66
- return { status: 'warn', message: 'Provider ayarlanmamış', fix: 'natureco setup' };
68
+ return { status: 'warn', message: L('Provider ayarlanmamış', 'Provider not set'), fix: 'natureco setup' };
67
69
  }
68
70
  },
69
71
  {
70
72
  id: 'git-config',
71
- name: 'Git Yapılandırması',
73
+ name: L('Git Yapılandırması', 'Git Configuration'),
72
74
  check: () => {
73
75
  try {
74
76
  const { execSync } = require('child_process');
75
77
  const name = execSync('git config user.name', { encoding: 'utf-8', stdio: 'pipe' }).trim();
76
78
  const email = execSync('git config user.email', { encoding: 'utf-8', stdio: 'pipe' }).trim();
77
79
  if (name && email) return { status: 'pass', message: `${name} <${email}>` };
78
- return { status: 'warn', message: 'Git user.name/email eksik', fix: 'git config --global user.name "Adınız"' };
80
+ return { status: 'warn', message: L('Git user.name/email eksik', 'Git user.name/email missing'), fix: L('git config --global user.name "Adınız"', 'git config --global user.name "Your Name"') };
79
81
  } catch {
80
- return { status: 'warn', message: 'Git repo değil', fix: 'git init' };
82
+ return { status: 'warn', message: L('Git repo değil', 'Not a git repo'), fix: 'git init' };
81
83
  }
82
84
  }
83
85
  },
84
86
  {
85
87
  id: 'disk-space',
86
- name: 'Disk Alanı',
88
+ name: L('Disk Alanı', 'Disk Space'),
87
89
  check: () => {
88
90
  try {
89
91
  const drive = path.parse(os.homedir()).root.replace(':', '');
90
92
  const { execSync } = require('child_process');
91
93
  const output = execSync(`powershell -Command "Get-PSDrive -Name ${drive} | Select-Object -ExpandProperty Free"`, { encoding: 'utf-8' }).trim();
92
94
  const free = parseInt(output);
93
- if (isNaN(free)) return { status: 'pass', message: 'Kontrol edilemedi' };
95
+ if (isNaN(free)) return { status: 'pass', message: L('Kontrol edilemedi', 'Could not check') };
94
96
  const freeGB = free / 1e9;
95
- if (freeGB < 0.5) return { status: 'fail', message: `Sadece ${freeGB.toFixed(1)}GB boş`, fix: 'Disk temizliği yapın' };
96
- return { status: 'pass', message: `${freeGB.toFixed(1)}GB boş alan` };
97
+ if (freeGB < 0.5) return { status: 'fail', message: `${L('Sadece', 'Only')} ${freeGB.toFixed(1)}GB ${L('boş', 'free')}`, fix: L('Disk temizliği yapın', 'Free up disk space') };
98
+ return { status: 'pass', message: `${freeGB.toFixed(1)}GB ${L('boş alan', 'free')}` };
97
99
  } catch {
98
- return { status: 'pass', message: 'Kontrol edilemedi' };
100
+ return { status: 'pass', message: L('Kontrol edilemedi', 'Could not check') };
99
101
  }
100
102
  }
101
103
  }
102
104
  ];
103
105
 
104
106
  function checkPolicy() {
105
- console.log(chalk.cyan.bold('\n Workspace Uyumluluk Politikası\n'));
107
+ console.log(chalk.cyan.bold(L('\n Workspace Uyumluluk Politikası\n', '\n Workspace Compliance Policy\n')));
106
108
  console.log(chalk.gray(' ' + '─'.repeat(48)));
107
109
 
108
110
  let passed = 0;
@@ -116,29 +118,29 @@ function checkPolicy() {
116
118
  passed++;
117
119
  } else if (result.status === 'fail') {
118
120
  console.log(` ${chalk.red('✗')} ${check.name}: ${chalk.white(result.message)}`);
119
- console.log(chalk.gray(` Düzeltme: ${result.fix}`));
121
+ console.log(chalk.gray(` ${L('Düzeltme', 'Fix')}: ${result.fix}`));
120
122
  failed++;
121
123
  } else {
122
124
  console.log(` ${chalk.yellow('⚠')} ${check.name}: ${chalk.white(result.message)}`);
123
- if (result.fix) console.log(chalk.gray(` Öneri: ${result.fix}`));
125
+ if (result.fix) console.log(chalk.gray(` ${L('Öneri', 'Tip')}: ${result.fix}`));
124
126
  warnings++;
125
127
  }
126
128
  }
127
129
 
128
130
  console.log(chalk.gray(' ' + '─'.repeat(48)));
129
- console.log(chalk.gray(` Geçti: ${passed} | Uyarı: ${warnings} | Hata: ${failed}\n`));
131
+ console.log(chalk.gray(` ${L('Geçti', 'Passed')}: ${passed} | ${L('Uyarı', 'Warnings')}: ${warnings} | ${L('Hata', 'Errors')}: ${failed}\n`));
130
132
  }
131
133
 
132
134
  function setPolicy(key, value) {
133
135
  if (!key) {
134
- console.log(chalk.red('\n ❌ Politika adı gerekli\n'));
136
+ console.log(chalk.red(L('\n ❌ Politika adı gerekli\n', '\n ❌ Policy name required\n')));
135
137
  return;
136
138
  }
137
139
  const config = getConfig();
138
140
  if (!config.policies) config.policies = {};
139
141
  config.policies[key] = value;
140
142
  saveConfig(config);
141
- console.log(chalk.green(`\n ✓ Politika ayarlandı: ${key} = ${value}\n`));
143
+ console.log(chalk.green(`\n ✓ ${L('Politika ayarlandı', 'Policy set')}: ${key} = ${value}\n`));
142
144
  }
143
145
 
144
146
  function listPolicies() {
@@ -146,11 +148,11 @@ function listPolicies() {
146
148
  const policies = config.policies || {};
147
149
 
148
150
  if (Object.keys(policies).length === 0) {
149
- console.log(chalk.gray('\n Tanımlı politika yok.\n'));
151
+ console.log(chalk.gray(L('\n Tanımlı politika yok.\n', '\n No policies defined.\n')));
150
152
  return;
151
153
  }
152
154
 
153
- console.log(chalk.cyan.bold('\n Tanımlı Politikalar\n'));
155
+ console.log(chalk.cyan.bold(L('\n Tanımlı Politikalar\n', '\n Defined Policies\n')));
154
156
  console.log(chalk.gray(' ' + '─'.repeat(48)));
155
157
  for (const [key, value] of Object.entries(policies)) {
156
158
  console.log(` ${chalk.white(key)}: ${chalk.cyan(value)}`);
@@ -160,16 +162,16 @@ function listPolicies() {
160
162
 
161
163
  function removePolicy(key) {
162
164
  if (!key) {
163
- console.log(chalk.red('\n ❌ Politika adı gerekli\n'));
165
+ console.log(chalk.red(L('\n ❌ Politika adı gerekli\n', '\n ❌ Policy name required\n')));
164
166
  return;
165
167
  }
166
168
  const config = getConfig();
167
169
  if (config.policies?.[key]) {
168
170
  delete config.policies[key];
169
171
  saveConfig(config);
170
- console.log(chalk.green(`\n ✓ Politika silindi: ${key}\n`));
172
+ console.log(chalk.green(`\n ✓ ${L('Politika silindi', 'Policy deleted')}: ${key}\n`));
171
173
  } else {
172
- console.log(chalk.yellow(`\n ⚠ Politika bulunamadı: ${key}\n`));
174
+ console.log(chalk.yellow(`\n ⚠ ${L('Politika bulunamadı', 'Policy not found')}: ${key}\n`));
173
175
  }
174
176
  }
175
177
 
@@ -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
  }