SPB Git
584 B · 13 lines typescript
1import { guarded, json } from "@/lib/api";2import { execFile } from "node:child_process";3import { promisify } from "node:util";45const run = promisify(execFile);6export const maxDuration = 120;78/** Live re-discovery of the provider listings (no inference). Runs the same script as the scheduled refresh. */9export const POST = guarded(async () => {10  const { stdout, stderr } = await run("npx", ["tsx", "scripts/registry-refresh.ts"], { cwd: process.cwd(), env: process.env, timeout: 110_000 });11  return json({ ok: true, log: (stdout + stderr).trim().split("\n").slice(-5) });12});13
Files · main
Menu

Theme