natureco-cli 4.6.5 → 4.6.6
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/config.js +30 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natureco-cli",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.6",
|
|
4
4
|
"description": "OpenClaw'dan daha güvenli, daha hızlı, daha ucuz AI agent CLI. Multi-agent, self-evolving skills, audit log, maliyet optimizasyonu ve NatureCo platform-native.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"natureco": "bin/natureco.js"
|
package/src/commands/config.js
CHANGED
|
@@ -24,18 +24,30 @@ function config(args) {
|
|
|
24
24
|
|
|
25
25
|
if (action === 'list') {
|
|
26
26
|
const cfg = getAllConfig();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
k,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
const rows = Object.entries(cfg).map(([k, v]) => ({
|
|
28
|
+
key: k,
|
|
29
|
+
value: maskSensitive(k, typeof v === 'string' ? v : JSON.stringify(v)),
|
|
30
|
+
sensitive: SENSITIVE_KEYS.some(sk => k.toLowerCase().includes(sk.toLowerCase())),
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
console.log('\n' + tui.styled(' ⚙️ Configuration (' + rows.length + ' ayar)', { color: tui.PALETTE.primary, bold: true }));
|
|
34
|
+
console.log(tui.styled(' ' + '─'.repeat(56), { color: tui.PALETTE.border }));
|
|
35
|
+
console.log('\n' + tui.table(rows, [
|
|
36
|
+
{ key: 'key', label: 'Anahtar', minWidth: 24, render: r => tui.styled(r.key, { color: tui.PALETTE.primary, bold: true }) },
|
|
37
|
+
{
|
|
38
|
+
key: 'value', label: 'Değer', minWidth: 40,
|
|
39
|
+
render: r => r.sensitive
|
|
40
|
+
? tui.styled(r.value, { color: tui.PALETTE.warning })
|
|
41
|
+
: tui.C.text(r.value)
|
|
42
|
+
},
|
|
43
|
+
], { borderStyle: 'round', zebra: true }));
|
|
44
|
+
console.log('');
|
|
33
45
|
return;
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
if (action === 'get') {
|
|
37
49
|
if (!key) {
|
|
38
|
-
|
|
50
|
+
console.log('\n' + tui.C.red(' ❌ Key belirtilmedi.') + '\n');
|
|
39
51
|
process.exit(1);
|
|
40
52
|
}
|
|
41
53
|
const cfg = getConfig();
|
|
@@ -45,9 +57,18 @@ function config(args) {
|
|
|
45
57
|
value = value?.[k];
|
|
46
58
|
}
|
|
47
59
|
if (value === undefined) {
|
|
48
|
-
|
|
60
|
+
console.log('\n' + tui.styled(' ℹ ' + key + ': (tanımlı değil)', { color: tui.PALETTE.muted }) + '\n');
|
|
49
61
|
} else {
|
|
50
|
-
|
|
62
|
+
const cardW = 60;
|
|
63
|
+
console.log('\n' + tui.styled(' 🔍 ' + key, { color: tui.PALETTE.primary, bold: true }));
|
|
64
|
+
console.log(tui.styled(' ╭' + '─'.repeat(cardW) + '╮', { color: tui.PALETTE.border }));
|
|
65
|
+
const lines = maskSensitive(key, JSON.stringify(value, null, 2)).split('\n');
|
|
66
|
+
for (const line of lines) {
|
|
67
|
+
const padded = (line || '').padEnd(cardW - 2).slice(0, cardW - 2);
|
|
68
|
+
console.log(tui.styled(' │ ', { color: tui.PALETTE.border }) + tui.styled(padded, { color: tui.PALETTE.text }) + tui.styled(' │', { color: tui.PALETTE.border }));
|
|
69
|
+
}
|
|
70
|
+
console.log(tui.styled(' ╰' + '─'.repeat(cardW) + '╯', { color: tui.PALETTE.border }));
|
|
71
|
+
console.log('');
|
|
51
72
|
}
|
|
52
73
|
return;
|
|
53
74
|
}
|