sandboxbox 1.0.9 → 1.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/build.js +27 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandboxbox",
3
- "version": "1.0.9",
3
+ "version": "1.1.0",
4
4
  "description": "Zero-privilege container runner with Playwright support",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/scripts/build.js CHANGED
@@ -286,22 +286,37 @@ async function buildFromSource(binaryPath) {
286
286
 
287
287
  // Configure and build
288
288
  console.log('⚙️ Configuring build...');
289
- execSync(`
290
- cd "${sourceDir}" &&
291
- ./configure --prefix="${tmpDir}/install" --disable-man
292
- `, { stdio: 'inherit' });
289
+ try {
290
+ execSync(`
291
+ cd "${sourceDir}" &&
292
+ timeout 60 ./configure --prefix="${tmpDir}/install" --disable-man
293
+ `, { stdio: 'inherit' });
294
+ } catch (e) {
295
+ console.error('❌ Configure step failed or timed out');
296
+ return false;
297
+ }
293
298
 
294
299
  console.log('🏗️ Compiling bubblewrap...');
295
- execSync(`
296
- cd "${sourceDir}" &&
297
- make -j$(nproc 2>/dev/null || echo 4)
298
- `, { stdio: 'inherit' });
300
+ try {
301
+ execSync(`
302
+ cd "${sourceDir}" &&
303
+ timeout 300 make -j$(nproc 2>/dev/null || echo 4)
304
+ `, { stdio: 'inherit' });
305
+ } catch (e) {
306
+ console.error('❌ Compile step failed or timed out');
307
+ return false;
308
+ }
299
309
 
300
310
  console.log('📦 Installing...');
301
- execSync(`
302
- cd "${sourceDir}" &&
303
- make install
304
- `, { stdio: 'inherit' });
311
+ try {
312
+ execSync(`
313
+ cd "${sourceDir}" &&
314
+ timeout 60 make install
315
+ `, { stdio: 'inherit' });
316
+ } catch (e) {
317
+ console.error('❌ Install step failed or timed out');
318
+ return false;
319
+ }
305
320
 
306
321
  // Copy binary to final location
307
322
  const builtBinary = path.join(tmpDir, 'install', 'bin', 'bwrap');