sandboxbox 2.2.0 ā 2.2.1
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/CLAUDE.md +3 -0
- package/package.json +3 -3
- package/utils/podman.js +39 -20
package/CLAUDE.md
CHANGED
@@ -14,6 +14,9 @@ Portable containerized environments using Podman with automatic WSL management a
|
|
14
14
|
- Cross-platform binary downloads from GitHub releases
|
15
15
|
- PowerShell ZIP extraction on Windows
|
16
16
|
- Auto-detects existing installations
|
17
|
+
- Auto-triggers on first use if Podman not found
|
18
|
+
- Verifies binary existence post-download
|
19
|
+
- Auto-initializes Podman machine on Windows after download
|
17
20
|
|
18
21
|
### Container Images
|
19
22
|
- **sandboxbox:latest**: Full development environment
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "sandboxbox",
|
3
|
-
"version": "2.2.
|
3
|
+
"version": "2.2.1",
|
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",
|
7
7
|
"bin": {
|
8
|
-
"sandboxbox": "
|
8
|
+
"sandboxbox": "cli.js"
|
9
9
|
},
|
10
10
|
"scripts": {
|
11
11
|
"start": "node cli.js",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"dependencies": {},
|
30
30
|
"repository": {
|
31
31
|
"type": "git",
|
32
|
-
"url": "https://github.com/AnEntrypoint/sandboxbox.git"
|
32
|
+
"url": "git+https://github.com/AnEntrypoint/sandboxbox.git"
|
33
33
|
},
|
34
34
|
"homepage": "https://github.com/AnEntrypoint/sandboxbox#readme",
|
35
35
|
"bugs": {
|
package/utils/podman.js
CHANGED
@@ -76,28 +76,47 @@ export function checkPodman() {
|
|
76
76
|
|
77
77
|
return podmanPath;
|
78
78
|
} catch (error) {
|
79
|
-
|
80
|
-
|
81
|
-
console.log('\nš¦ Auto-downloading Podman...');
|
79
|
+
console.log('ā Podman not found');
|
80
|
+
console.log('\nš¦ Auto-downloading Podman...');
|
82
81
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
stdio: 'pipe',
|
91
|
-
shell: process.platform === 'win32'
|
92
|
-
};
|
93
|
-
const newVersion = execSync(`"${newPodmanPath}" --version`, execOptions).trim();
|
94
|
-
console.log(`\nā
${newVersion} (auto-downloaded)`);
|
95
|
-
return newPodmanPath;
|
96
|
-
} catch (downloadError) {
|
97
|
-
console.log(`\nā Auto-download failed: ${downloadError.message}`);
|
82
|
+
try {
|
83
|
+
const scriptPath = resolve(__dirname, '..', 'scripts', 'download-podman.js');
|
84
|
+
execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: __dirname, shell: process.platform === 'win32' });
|
85
|
+
|
86
|
+
const newPodmanPath = getPodmanPath();
|
87
|
+
if (!existsSync(newPodmanPath) && newPodmanPath !== 'podman') {
|
88
|
+
throw new Error('Download completed but binary not found');
|
98
89
|
}
|
99
|
-
|
100
|
-
|
90
|
+
|
91
|
+
const execOptions = {
|
92
|
+
encoding: 'utf-8',
|
93
|
+
stdio: 'pipe',
|
94
|
+
shell: process.platform === 'win32'
|
95
|
+
};
|
96
|
+
|
97
|
+
const newVersion = execSync(`"${newPodmanPath}" --version`, execOptions).trim();
|
98
|
+
console.log(`\nā
${newVersion} (auto-downloaded)`);
|
99
|
+
|
100
|
+
if (process.platform === 'win32') {
|
101
|
+
try {
|
102
|
+
execSync(`"${newPodmanPath}" info`, { ...execOptions, stdio: 'pipe' });
|
103
|
+
} catch (infoError) {
|
104
|
+
if (infoError.message.includes('Cannot connect to Podman')) {
|
105
|
+
console.log('\nš§ Initializing Podman machine...');
|
106
|
+
try {
|
107
|
+
execSync(`"${newPodmanPath}" machine init`, { stdio: 'inherit', shell: true });
|
108
|
+
execSync(`"${newPodmanPath}" machine start`, { stdio: 'inherit', shell: true });
|
109
|
+
console.log('\nā
Podman machine initialized and started!');
|
110
|
+
} catch (machineError) {
|
111
|
+
console.log('\nā ļø Podman machine initialization will be done on first use');
|
112
|
+
}
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
return newPodmanPath;
|
118
|
+
} catch (downloadError) {
|
119
|
+
console.log(`\nā Auto-download failed: ${downloadError.message}`);
|
101
120
|
}
|
102
121
|
|
103
122
|
console.log('\nš” Please install Podman manually:');
|