bonzai-burn 1.0.17 → 1.0.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonzai-burn",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "Git branch-based cleanup tool with bburn, baccept, and brevert commands",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,14 +1,7 @@
1
- console.log(`[Terminal] Node version: ${process.version}`);
2
- console.log(`[Terminal] Platform: ${process.platform} ${process.arch}`);
3
-
4
1
  let pty;
5
2
  try {
6
3
  pty = require('node-pty');
7
- console.log('[Terminal] node-pty loaded successfully');
8
4
  } catch (err) {
9
- console.error('[Terminal] Failed to load node-pty:', err.message);
10
- console.error('[Terminal] This usually means node-pty native binaries failed to install.');
11
- console.error('[Terminal] Try running: cd bonzai && npm rebuild node-pty');
12
5
  pty = null;
13
6
  }
14
7
 
@@ -20,9 +13,7 @@ function getDefaultShell() {
20
13
  if (process.platform === 'win32') {
21
14
  return process.env.COMSPEC || 'powershell.exe';
22
15
  }
23
- // Prefer SHELL env var, but always use full path
24
16
  const shell = process.env.SHELL || '/bin/bash';
25
- // Ensure we have a full path
26
17
  if (!shell.startsWith('/')) {
27
18
  return '/bin/bash';
28
19
  }
@@ -38,10 +29,6 @@ function createTerminal(sessionId, cols = 80, rows = 24) {
38
29
  const shell = getDefaultShell();
39
30
  const cwd = process.env.HOME || process.cwd();
40
31
 
41
- console.log(`[Terminal] Spawning shell: ${shell}`);
42
- console.log(`[Terminal] Working directory: ${cwd}`);
43
- console.log(`[Terminal] PATH: ${process.env.PATH}`);
44
-
45
32
  let ptyProcess;
46
33
  try {
47
34
  ptyProcess = pty.spawn(shell, [], {
@@ -56,11 +43,6 @@ function createTerminal(sessionId, cols = 80, rows = 24) {
56
43
  }
57
44
  });
58
45
  } catch (spawnErr) {
59
- console.error('[Terminal] pty.spawn failed:', spawnErr);
60
- console.error('[Terminal] Error code:', spawnErr.code);
61
- console.error('[Terminal] Error errno:', spawnErr.errno);
62
- // Try with /bin/bash as fallback
63
- console.log('[Terminal] Retrying with /bin/bash...');
64
46
  try {
65
47
  ptyProcess = pty.spawn('/bin/bash', [], {
66
48
  name: 'xterm-256color',
@@ -74,8 +56,7 @@ function createTerminal(sessionId, cols = 80, rows = 24) {
74
56
  }
75
57
  });
76
58
  } catch (bashErr) {
77
- console.error('[Terminal] /bin/bash also failed:', bashErr);
78
- throw spawnErr; // throw original error
59
+ throw spawnErr;
79
60
  }
80
61
  }
81
62
 
@@ -110,9 +91,7 @@ function setupTerminalWebSocket(wss) {
110
91
 
111
92
  try {
112
93
  ptyProcess = createTerminal(sessionId);
113
- console.log(`Terminal session ${sessionId} started`);
114
94
  } catch (err) {
115
- console.error('Failed to create terminal:', err.message);
116
95
  ws.send(JSON.stringify({ type: 'error', message: 'Failed to create terminal: ' + err.message }));
117
96
  ws.close();
118
97
  return;
@@ -146,13 +125,12 @@ function setupTerminalWebSocket(wss) {
146
125
  break;
147
126
  }
148
127
  } catch (e) {
149
- console.error('Terminal message error:', e);
128
+ // Parse error
150
129
  }
151
130
  });
152
131
 
153
132
  // Cleanup on disconnect
154
133
  ws.on('close', () => {
155
- console.log(`Terminal session ${sessionId} closed`);
156
134
  ptyProcess.kill();
157
135
  terminals.delete(sessionId);
158
136
  });