fix: resolve TypeScript strict null errors in producer

- server.ts: default token param to empty string to satisfy string type
- renderOrchestrator.ts: capture fileServer in local const before closure
  to preserve TypeScript null narrowing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-03-22 00:50:19 -07:00
co-authored by Claude Opus 4.6
parent 9f8e5ba5a1
commit fbfb6c6156
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -391,7 +391,7 @@ export function createRenderHandlers(options: HandlerOptions = {}): RenderHandle
};
const outputs = (c: Context): Response => {
const token = c.req.param("token");
const token = c.req.param("token") ?? "";
const artifact = store.get(token);
if (!artifact) {
return c.json({ success: false, error: "Output artifact not found or expired" }, 404);
@@ -882,7 +882,8 @@ export async function executeRenderJob(
job.error = error instanceof Error ? error.message : "render_cancelled";
updateJobStatus(job, "cancelled", "Render cancelled", job.progress, onProgress);
if (fileServer) {
await safeCleanup("close file server (cancel)", () => { fileServer.close(); }, log);
const fs = fileServer;
await safeCleanup("close file server (cancel)", () => { fs.close(); }, log);
}
if (probeSession) {
const session = probeSession;
@@ -925,7 +926,8 @@ export async function executeRenderJob(
// Cleanup
if (fileServer) {
await safeCleanup("close file server (error)", () => { fileServer.close(); }, log);
const fs = fileServer;
await safeCleanup("close file server (error)", () => { fs.close(); }, log);
}
if (probeSession) {
const session = probeSession;