sandboxbox 2.3.8 → 2.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandboxbox",
3
- "version": "2.3.8",
3
+ "version": "2.4.0",
4
4
  "description": "Portable container runner with Podman - Claude Code & Playwright support. Works on Windows, macOS, and Linux.",
5
5
  "type": "module",
6
6
  "main": "cli.js",
@@ -0,0 +1 @@
1
+ console.log('Hello from test project');
@@ -26,7 +26,8 @@ export function claudeCommand(projectDir, command = 'claude') {
26
26
  try {
27
27
  execSync(`"${podmanPath}" image inspect sandboxbox-local:latest`, {
28
28
  stdio: 'pipe',
29
- shell: process.platform === 'win32'
29
+ shell: process.platform === 'win32',
30
+ windowsHide: process.platform === 'win32'
30
31
  });
31
32
  } catch {
32
33
  console.log(color('yellow', 'šŸ“¦ Building Claude Code container...'));
@@ -58,6 +59,7 @@ export function claudeCommand(projectDir, command = 'claude') {
58
59
  execSync(containerCommand, {
59
60
  stdio: 'inherit',
60
61
  shell: process.platform === 'win32',
62
+ windowsHide: process.platform === 'win32',
61
63
  timeout: 30000 // 30 second timeout
62
64
  });
63
65
 
@@ -95,7 +97,8 @@ function buildClaudeContainer() {
95
97
  execSync(`"${podmanPath}" build -f "${dockerfilePath}" -t sandboxbox-local:latest .`, {
96
98
  stdio: 'inherit',
97
99
  cwd: resolve(__dirname, '..', '..'),
98
- shell: process.platform === 'win32'
100
+ shell: process.platform === 'win32',
101
+ windowsHide: process.platform === 'win32'
99
102
  });
100
103
  console.log(color('green', '\nāœ… Claude Code container built successfully!'));
101
104
  return true;
@@ -33,6 +33,7 @@ export function buildCommand(dockerfilePath) {
33
33
  stdio: 'inherit',
34
34
  cwd: dirname(dockerfilePath),
35
35
  shell: process.platform === 'win32',
36
+ windowsHide: process.platform === 'win32',
36
37
  timeout: 30000 // 30 second timeout
37
38
  });
38
39
  console.log(color('green', '\nāœ… Container built successfully!'));
@@ -86,6 +87,7 @@ export function runCommand(projectDir, cmd = 'bash') {
86
87
  execSync(`"${podmanPath}" run --rm -it ${mounts.join(' ')} -w /workspace sandboxbox:latest ${cmd}`, {
87
88
  stdio: 'inherit',
88
89
  shell: process.platform === 'win32',
90
+ windowsHide: process.platform === 'win32',
89
91
  timeout: 30000 // 30 second timeout
90
92
  });
91
93
 
@@ -140,6 +142,7 @@ export function shellCommand(projectDir) {
140
142
  execSync(`"${podmanPath}" run --rm -it ${mounts.join(' ')} -w /workspace sandboxbox:latest /bin/bash`, {
141
143
  stdio: 'inherit',
142
144
  shell: process.platform === 'win32',
145
+ windowsHide: process.platform === 'win32',
143
146
  timeout: 30000 // 30 second timeout
144
147
  });
145
148
 
@@ -94,6 +94,14 @@ export function createIsolatedEnvironment(projectDir) {
94
94
 
95
95
  if (!existsSync(gitDirPath)) {
96
96
  // Not a git repository, skip git setup
97
+ // Define cleanup function early for early return
98
+ const cleanup = () => {
99
+ try {
100
+ rmSync(tempDir, { recursive: true, force: true });
101
+ } catch (cleanupError) {
102
+ // Ignore cleanup errors
103
+ }
104
+ };
97
105
  return { tempDir, tempProjectDir, cleanup };
98
106
  }
99
107
 
@@ -104,6 +112,14 @@ export function createIsolatedEnvironment(projectDir) {
104
112
 
105
113
  if (!existsSync(tempGitDirPath)) {
106
114
  // Copy didn't preserve git, skip git setup
115
+ // Define cleanup function early for early return
116
+ const cleanup = () => {
117
+ try {
118
+ rmSync(tempDir, { recursive: true, force: true });
119
+ } catch (cleanupError) {
120
+ // Ignore cleanup errors
121
+ }
122
+ };
107
123
  return { tempDir, tempProjectDir, cleanup };
108
124
  }
109
125