{"version":3,"file":"run.cjs","names":["spawnWithArgsAndVersion","DEFAULT_NEAR_SANDBOX_VERSION"],"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":";;;AAIA,eAAe,MAAM;AACnB,KAAI;AACF,MAAI,QAAQ,KAAK,SAAS,EACxB,SAAQ,KAAK,KAAK,SAAS;AAQ7B,GAAA,MAN6BA,wBAAAA,wBAC3BC,wBAAAA,8BACA,QAAQ,KAAK,MAAM,EAAE,EACrB;GAAC;GAAM;GAAW;GAAU,CAC7B,EAEc,GAAG,SAAS,SAAS;AAClC,OAAI,SAAS,EACX,SAAQ,MAAM,oCAAoC,OAAO;IAE3D;UACK,OAAO;AACd,UAAQ,IAAI,MAAM;AAClB,UAAQ,KAAK,EAAE;;;AAInB,KAAK"}