wormclaude 1.0.118 → 1.0.119

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/theme.js CHANGED
@@ -16,4 +16,4 @@ export const theme = {
16
16
  synType: '#a78bfa', // tip/sınıf adları, sabitler
17
17
  synProp: '#e0e0e0', // özellik/anahtar adları
18
18
  };
19
- export const VERSION = '1.0.118';
19
+ export const VERSION = '1.0.119';
package/dist/tools.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // OpenAI function şemaları + Node executor'ları. Açıklamalar ve davranışlar
3
3
  // WormClaude'un gerçek prompt.ts/şemalarından alınmıştır; sadece marka adı ve
4
4
  // WormClaude'da bulunmayan araç referansları (Agent tool, sandbox) uyarlandı.
5
- import { execSync, spawn } from 'node:child_process';
5
+ import { execSync, spawn, spawnSync } from 'node:child_process';
6
6
  import * as fs from 'node:fs';
7
7
  import * as os from 'node:os';
8
8
  import * as path from 'node:path';
@@ -50,10 +50,13 @@ function runBashCapturingCwd(command, timeout) {
50
50
  const cwd = getBashCwd();
51
51
  const opts = { encoding: 'utf8', timeout, maxBuffer: 10 * 1024 * 1024, windowsHide: true, cwd };
52
52
  if (process.platform === 'win32') {
53
- // stderr'i yakala: yoksa cmd.exe stderr'i terminale "inherit" eder (curl'ün "% Total"
54
- // progress meter'ı, hata mesajları ekrana sızar). 2>&1 ile stdout'a birleştir tek akış.
55
- const _cmd = /2>&1|2>\s*nul/i.test(command) ? command : command + ' 2>&1';
56
- const out = execSync(_cmd, opts);
53
+ // spawnSync: stdout+stderr'i AYRI yakalar (komutu DEĞİŞTİRMEDEN) curl'ün "% Total" progress
54
+ // meter'ı terminale sızmaz. execSync stderr'i inherit ederdi; `2>&1` ise zincirli (A && B)
55
+ // komutlarda yalnız SON komutun stderr'ini yakalıyordu (ilkininki sızıyordu).
56
+ const r = spawnSync(command, { ...opts, shell: true });
57
+ if (r.error)
58
+ throw r.error;
59
+ const out = (r.stdout || '') + (r.stderr || '');
57
60
  // best-effort: "cd <hedef>" / "cd /d <hedef>" (zincirsiz tek komut)
58
61
  const m = /^\s*cd\s+(?:\/d\s+)?"?([^"&|<>]+?)"?\s*$/i.exec(command);
59
62
  if (m) {
@@ -64,6 +67,12 @@ function runBashCapturingCwd(command, timeout) {
64
67
  }
65
68
  catch { /* yok say */ }
66
69
  }
70
+ if (typeof r.status === 'number' && r.status !== 0) {
71
+ const e = new Error(out || `Command failed (exit ${r.status})`);
72
+ e.stdout = out;
73
+ e.status = r.status;
74
+ throw e;
75
+ }
67
76
  return out;
68
77
  }
69
78
  // POSIX
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.118",
3
+ "version": "1.0.119",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {