wormclaude 1.0.58 → 1.0.60
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/dist/ansi.js +4 -1
- package/dist/i18n.js +13 -7
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/ansi.js
CHANGED
|
@@ -78,7 +78,10 @@ export function bannerAnsi(cols) {
|
|
|
78
78
|
const w = Math.max(10, cols);
|
|
79
79
|
const rows = cols >= 90 ? WORM_ROWS.map((r, i) => r + CLAUDE_ROWS[i]) : [...WORM_ROWS, ...CLAUDE_ROWS];
|
|
80
80
|
const body = rows.map((r) => paint(r.length > w ? r.slice(0, w) : r, theme.red, true)).join('\n');
|
|
81
|
-
|
|
81
|
+
// İmza + ticari marka: "WORMCLAUDE® · by S.Y" (initial env ile değiştirilebilir).
|
|
82
|
+
const sign = (process.env.WORMCLAUDE_SIGN || 'S.Y').trim();
|
|
83
|
+
const sig = paint(' WORMCLAUDE®', theme.red, true) + paint(' · by ' + sign, theme.greyDim);
|
|
84
|
+
return body + '\n' + sig + '\n' + paint(' ' + t('banner.subtitle'), theme.greyDim);
|
|
82
85
|
}
|
|
83
86
|
// ── Markdown bloğu → ANSI (kod blokları sözdizimi-vurgulu) ──
|
|
84
87
|
export function markdownAnsi(text, cols) {
|
package/dist/i18n.js
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
// Çoklu dil (TR/EN) — arayüz metinleri. İlk açılışta dil seçilir, .wormclaude/settings.json'a yazılır.
|
|
2
2
|
import * as fs from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
|
+
import * as os from 'node:os';
|
|
4
5
|
let current = 'en'; // varsayılan: İngilizce (ilk kurulum). loadLang() kayıtlıysa onu uygular.
|
|
5
6
|
export function setLang(l) { current = l; }
|
|
6
7
|
export function getLang() { return current; }
|
|
7
|
-
//
|
|
8
|
-
|
|
8
|
+
// GLOBAL ayar: bir kez seçilince TÜM klasörlerde geçerli (~/.wormclaude/settings.json).
|
|
9
|
+
// (Önceden process.cwd()'ye yazılıyordu → her klasörde sıfırlanıyordu. Artık ev dizini.)
|
|
10
|
+
const SETTINGS = path.join(os.homedir(), '.wormclaude', 'settings.json');
|
|
11
|
+
// Geriye-uyum: eski proje-yerel ayar varsa onu da oku (yalnız global yoksa).
|
|
12
|
+
const LEGACY_SETTINGS = path.join(process.cwd(), '.wormclaude', 'settings.json');
|
|
9
13
|
export function loadLang() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
for (const p of [SETTINGS, LEGACY_SETTINGS]) {
|
|
15
|
+
try {
|
|
16
|
+
const j = JSON.parse(fs.readFileSync(p, 'utf8'));
|
|
17
|
+
if (j.lang === 'tr' || j.lang === 'en')
|
|
18
|
+
return j.lang;
|
|
19
|
+
}
|
|
20
|
+
catch { }
|
|
14
21
|
}
|
|
15
|
-
catch { }
|
|
16
22
|
return null;
|
|
17
23
|
}
|
|
18
24
|
export function saveLang(l) {
|
package/dist/theme.js
CHANGED