Skip to content

Commit fde8f97

Browse files
committed
fix(terminal): use ExecutionEvent type instead of any in reconnection stream
1 parent db19975 commit fde8f97

File tree

1 file changed

+4
-4
lines changed
  • apps/sim/app/api/workflows/[id]/executions/[executionId]/stream

1 file changed

+4
-4
lines changed

apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
getExecutionMeta,
88
readExecutionEvents,
99
} from '@/lib/execution/event-buffer'
10-
import { formatSSEEvent } from '@/lib/workflows/executor/execution-events'
10+
import { type ExecutionEvent, formatSSEEvent } from '@/lib/workflows/executor/execution-events'
1111
import { authorizeWorkflowByWorkspacePermission } from '@/lib/workflows/utils'
1212

1313
const logger = createLogger('ExecutionStreamReconnectAPI')
@@ -88,7 +88,7 @@ export async function GET(
8888
const events = await readExecutionEvents(executionId, lastEventId)
8989
for (const entry of events) {
9090
if (closed) return
91-
enqueue(formatSSEEvent(entry.event as any))
91+
enqueue(formatSSEEvent(entry.event as unknown as ExecutionEvent))
9292
lastEventId = entry.eventId
9393
}
9494

@@ -108,7 +108,7 @@ export async function GET(
108108
const newEvents = await readExecutionEvents(executionId, lastEventId)
109109
for (const entry of newEvents) {
110110
if (closed) return
111-
enqueue(formatSSEEvent(entry.event as any))
111+
enqueue(formatSSEEvent(entry.event as unknown as ExecutionEvent))
112112
lastEventId = entry.eventId
113113
}
114114

@@ -118,7 +118,7 @@ export async function GET(
118118
const finalEvents = await readExecutionEvents(executionId, lastEventId)
119119
for (const entry of finalEvents) {
120120
if (closed) return
121-
enqueue(formatSSEEvent(entry.event as any))
121+
enqueue(formatSSEEvent(entry.event as unknown as ExecutionEvent))
122122
lastEventId = entry.eventId
123123
}
124124
enqueue('data: [DONE]\n\n')

0 commit comments

Comments
 (0)