{"version":3,"file":"run.mjs","names":[],"sources":["../../src/run.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { spawnWithArgsAndVersion } from './binary/binaryExecution';\nimport { DEFAULT_NEAR_SANDBOX_VERSION } from './constants';\n\nasync function run() {\n  try {\n    if (process.argv.length < 3) {\n      process.argv.push('--help');\n    }\n    const sandboxProcess = await spawnWithArgsAndVersion(\n      DEFAULT_NEAR_SANDBOX_VERSION,\n      process.argv.slice(2),\n      [null, 'inherit', 'inherit'],\n    );\n\n    sandboxProcess.on('exit', (code) => {\n      if (code !== 0) {\n        console.error(`Sandbox process exited with code ${code}`);\n      }\n    });\n  } catch (error) {\n    console.log(error);\n    process.exit(1);\n  }\n}\n\nrun();\n"],"mappings":";;;;uBACmE;iBACR;CAE3D,eAAe,MAAM;AACnB,MAAI;AACF,OAAI,QAAQ,KAAK,SAAS,EACxB,SAAQ,KAAK,KAAK,SAAS;AAQ7B,IAAA,MAN6B,wBAC3B,8BACA,QAAQ,KAAK,MAAM,EAAE,EACrB;IAAC;IAAM;IAAW;IAAU,CAC7B,EAEc,GAAG,SAAS,SAAS;AAClC,QAAI,SAAS,EACX,SAAQ,MAAM,oCAAoC,OAAO;KAE3D;WACK,OAAO;AACd,WAAQ,IAAI,MAAM;AAClB,WAAQ,KAAK,EAAE;;;AAInB,MAAK"}