Collect every S3 URI that the handler will touch for a given event.
(event: PlanEvent | RenderChunkEvent | AssembleEvent)
| 480 | |
| 481 | /** Collect every S3 URI that the handler will touch for a given event. */ |
| 482 | function getEventS3Uris(event: PlanEvent | RenderChunkEvent | AssembleEvent): string[] { |
| 483 | switch (event.Action) { |
| 484 | case "plan": |
| 485 | return [event.ProjectS3Uri, event.PlanOutputS3Prefix]; |
| 486 | case "renderChunk": |
| 487 | return [event.PlanS3Uri, event.ChunkOutputS3Prefix]; |
| 488 | case "assemble": |
| 489 | return [event.PlanS3Uri, ...event.ChunkS3Uris, event.OutputS3Uri, event.AudioS3Uri].filter( |
| 490 | (u): u is string => u != null, |
| 491 | ); |
| 492 | } |
| 493 | } |
| 494 | |
| 495 | /** |
| 496 | * Verify every S3 URI in the event resolves to the configured render bucket. |
no outgoing calls
no test coverage detected