refactor: replace tsx with bun for TypeScript execution (#278)

This commit is contained in:
Ayaan Zaidi
2026-01-06 12:44:08 +05:30
committed by GitHub
parent b472143882
commit 7a48b908e4
13 changed files with 64 additions and 67 deletions

View File

@@ -118,10 +118,8 @@ const spawnGatewayInstance = async (name: string): Promise<GatewayInstance> => {
try {
child = spawn(
process.execPath,
"bun",
[
"--import",
"tsx",
"src/index.ts",
"gateway",
"--port",
@@ -218,15 +216,11 @@ const runCliJson = async (
): Promise<unknown> => {
const stdout: string[] = [];
const stderr: string[] = [];
const child = spawn(
process.execPath,
["--import", "tsx", "src/index.ts", ...args],
{
cwd: process.cwd(),
env: { ...process.env, ...env },
stdio: ["ignore", "pipe", "pipe"],
},
);
const child = spawn("bun", ["src/index.ts", ...args], {
cwd: process.cwd(),
env: { ...process.env, ...env },
stdio: ["ignore", "pipe", "pipe"],
});
child.stdout?.setEncoding("utf8");
child.stderr?.setEncoding("utf8");
child.stdout?.on("data", (d) => stdout.push(String(d)));