fix(runner): add missing writeFileSync import
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-08 13:22:12 +01:00
parent 71c0767a1b
commit 2bd388a5e2

View File

@@ -15,7 +15,7 @@
import { createServer } from "node:http";
import { spawn } from "node:child_process";
import { createInterface } from "node:readline";
import { existsSync, readFileSync, mkdirSync } from "node:fs";
import { existsSync, readFileSync, mkdirSync, writeFileSync, readdirSync } from "node:fs";
import { join } from "node:path";
const PORT = parseInt(process.env.RUNNER_PORT || "7901", 10);
@@ -264,8 +264,7 @@ const server = createServer(async (req, res) => {
if (npxPackage) {
const binDir = join(svcSourcePath, "node_modules", ".bin");
if (existsSync(binDir)) {
// Override detectEntry for npx packages
const bins = await import("node:fs").then(fs => fs.readdirSync(binDir));
const bins = readdirSync(binDir);
if (bins.length > 0) {
svc._npxBin = join(binDir, bins[0]);
}