mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
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:
co-authored by
Claude Opus 4.6
parent
9f8e5ba5a1
commit
fbfb6c6156
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user