@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 14 lines 626 Bytes
Raw
1 import * as Effect from "effect/Effect";
2 import type { BucketNotification } from "./BucketNotifications.ts";
3 import type { S3EventType, S3Record } from "./S3Event.ts";
4
5 export const normalizeBucketNotification = (record: S3Record) =>
6 Effect.sync((): BucketNotification => ({
7 type: `s3:${record.eventName.replace(/^s3:/, "")}` as S3EventType,
8 bucket: record.s3.bucket.name,
9 key: decodeURIComponent(record.s3.object.key.replace(/\+/g, " ")),
10 size: record.s3.object.size,
11 eTag: record.s3.object.eTag,
12 versionId: record.s3.object.versionId ?? undefined,
13 sequencer: record.s3.object.sequencer,
14 }));