// src/actions/package/compile/runTsc.ts
import { cwd } from "node:process";
import chalk from "chalk";

// src/lib/crossSpawn.ts
import crossSpawn from "cross-spawn";
function spawnSync(command, args, options) {
  return crossSpawn.sync(command, args, options);
}

// src/actions/package/compile/runTsc.ts
var runTsc = (configPath, verbose = false, extraArgs = []) => {
  const args = ["-p", configPath, ...extraArgs];
  if (verbose) {
    console.log(chalk.gray(`tsc ${args.join(" ")}`));
  }
  const result = spawnSync("tsc", args, {
    cwd: cwd(),
    stdio: "inherit"
  });
  return result.status ?? (result.error === void 0 ? 0 : 1);
};
export {
  runTsc
};
//# sourceMappingURL=runTsc.mjs.map
