sandboxbox 2.2.6 → 2.2.8
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 +4 -1
- package/package.json +1 -1
- package/utils/podman.js +2 -43
package/CLAUDE.md
CHANGED
@@ -12,6 +12,8 @@ Portable containerized environments using Podman with automatic WSL management a
|
|
12
12
|
|
13
13
|
### Podman Downloader (scripts/download-podman.js)
|
14
14
|
- Cross-platform binary downloads from GitHub releases
|
15
|
+
- Architecture auto-detection: `process.arch === 'arm64' ? 'arm64' : 'amd64'`
|
16
|
+
- Platform support: Windows (amd64/arm64), macOS (amd64/arm64), Linux (amd64/arm64)
|
15
17
|
- PowerShell ZIP extraction on Windows
|
16
18
|
- Auto-detects existing installations
|
17
19
|
- Auto-triggers on first use if Podman not found
|
@@ -81,7 +83,8 @@ if (process.platform === 'win32' && isBundled) {
|
|
81
83
|
- **Simple Configuration**: Minimal backend setup only when needed
|
82
84
|
- **Auto-Download**: Downloads platform-specific binaries automatically
|
83
85
|
- **NPX Compatible**: Works via npx without global installation
|
84
|
-
- **
|
86
|
+
- **Architecture Support**: Auto-detects and downloads correct binary (amd64 or arm64)
|
87
|
+
- **Cross-Platform**: Windows, macOS, Linux - all with amd64/arm64 support
|
85
88
|
|
86
89
|
## Isolation Architecture
|
87
90
|
|
package/package.json
CHANGED
package/utils/podman.js
CHANGED
@@ -2,6 +2,7 @@ import { existsSync } from 'fs';
|
|
2
2
|
import { execSync } from 'child_process';
|
3
3
|
import { resolve, dirname } from 'path';
|
4
4
|
import { fileURLToPath } from 'url';
|
5
|
+
import { color } from './colors.js';
|
5
6
|
|
6
7
|
const __filename = fileURLToPath(import.meta.url);
|
7
8
|
const __dirname = dirname(__filename);
|
@@ -60,49 +61,7 @@ export function checkPodman() {
|
|
60
61
|
|
61
62
|
const newVersion = execSync(`"${newPodmanPath}" --version`, execOptions).trim();
|
62
63
|
console.log(`\n✅ ${newVersion} (auto-downloaded)`);
|
63
|
-
|
64
|
-
// Auto-setup minimal backend for Windows portable operation
|
65
|
-
if (process.platform === 'win32' && isBundled) {
|
66
|
-
try {
|
67
|
-
execSync(`"${newPodmanPath}" info`, { ...execOptions, stdio: 'pipe' });
|
68
|
-
} catch (infoError) {
|
69
|
-
if (infoError.message.includes('Cannot connect to Podman')) {
|
70
|
-
console.log('\n🔧 Setting up portable Podman backend...');
|
71
|
-
try {
|
72
|
-
// Try to start existing machine first
|
73
|
-
execSync(`"${newPodmanPath}" machine start`, {
|
74
|
-
stdio: 'inherit',
|
75
|
-
shell: true,
|
76
|
-
cwd: __dirname
|
77
|
-
});
|
78
|
-
console.log('\n✅ Portable Podman backend started!');
|
79
|
-
} catch (startError) {
|
80
|
-
if (startError.message.includes('does not exist') || startError.message.includes('not found')) {
|
81
|
-
try {
|
82
|
-
// Create new machine if none exists
|
83
|
-
execSync(`"${newPodmanPath}" machine init --rootful=false`, {
|
84
|
-
stdio: 'inherit',
|
85
|
-
shell: true,
|
86
|
-
cwd: __dirname
|
87
|
-
});
|
88
|
-
execSync(`"${newPodmanPath}" machine start`, {
|
89
|
-
stdio: 'inherit',
|
90
|
-
shell: true,
|
91
|
-
cwd: __dirname
|
92
|
-
});
|
93
|
-
console.log('\n✅ Portable Podman backend created and started!');
|
94
|
-
} catch (initError) {
|
95
|
-
console.log('\n⚠️ Podman backend setup needed on first container run');
|
96
|
-
}
|
97
|
-
} else {
|
98
|
-
console.log('\n⚠️ Podman backend setup needed on first container run');
|
99
|
-
}
|
100
|
-
}
|
101
|
-
}
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
console.log('\n✅ Portable Podman ready');
|
64
|
+
console.log('✅ Portable Podman ready');
|
106
65
|
|
107
66
|
return newPodmanPath;
|
108
67
|
} catch (downloadError) {
|