MCPcopy Index your code
hub / github.com/simstudioai/sim / getFlushScriptResult

Function getFlushScriptResult

apps/sim/lib/execution/event-buffer.ts:189–202  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

187}
188
189function getFlushScriptResult(value: unknown): {
190 allowed: boolean
191 resource?: string
192 currentBytes?: number
193} {
194 if (Array.isArray(value)) {
195 return {
196 allowed: Number(value[0]) === 1,
197 resource: typeof value[1] === 'string' ? value[1] : undefined,
198 currentBytes: Number(value[2] ?? 0),
199 }
200 }
201 return { allowed: true }
202}
203
204function trimFinalBlockLogsForEventData(data: unknown): unknown {
205 if (!data || typeof data !== 'object' || Array.isArray(data)) return data

Callers 1

doFlushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected