MCPcopy Index your code
hub / github.com/heygen-com/hyperframes / summarizeEvent

Function summarizeEvent

packages/aws-lambda/src/handler.ts:181–207  ·  view source on GitHub ↗

* Compact, non-PII summary of a Lambda event for logging. The full * event payload can include the entire project config; we only emit * the routable fields (S3 URIs, chunk index, format) needed to triage * a failure from CloudWatch.

(
  event: PlanEvent | RenderChunkEvent | AssembleEvent,
)

Source from the content-addressed store, hash-verified

179 * a failure from CloudWatch.
180 */
181function summarizeEvent(
182 event: PlanEvent | RenderChunkEvent | AssembleEvent,
183): Record<string, unknown> {
184 switch (event.Action) {
185 case "plan":
186 return {
187 projectS3Uri: event.ProjectS3Uri,
188 planOutputS3Prefix: event.PlanOutputS3Prefix,
189 format: event.Config.format,
190 fps: event.Config.fps,
191 };
192 case "renderChunk":
193 return {
194 planS3Uri: event.PlanS3Uri,
195 chunkIndex: event.ChunkIndex,
196 format: event.Format,
197 };
198 case "assemble":
199 return {
200 planS3Uri: event.PlanS3Uri,
201 chunkCount: event.ChunkS3Uris.length,
202 hasAudio: event.AudioS3Uri !== null,
203 outputS3Uri: event.OutputS3Uri,
204 format: event.Format,
205 };
206 }
207}
208
209/**
210 * Lambda sets `TMPDIR` to `/tmp` already, but the bundled binaries (Chrome

Callers 1

handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected