From 005ffb2e01fa415cb3dc314a8f402fd310335efe Mon Sep 17 00:00:00 2001 From: Kazuki Matsuda Date: Thu, 29 Jun 2023 22:10:59 +0900 Subject: [PATCH] fix: add comments --- src/supabase-cdn/cache-manager/queue-consumer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/supabase-cdn/cache-manager/queue-consumer.ts b/src/supabase-cdn/cache-manager/queue-consumer.ts index 9eb7dcc..7f26bb1 100644 --- a/src/supabase-cdn/cache-manager/queue-consumer.ts +++ b/src/supabase-cdn/cache-manager/queue-consumer.ts @@ -10,6 +10,7 @@ const logger = new Logger(); const tracer = new Tracer(); const cloudfront = tracer.captureAWSv3Client(new CloudFrontClient({ region: 'us-east-1' })); +/** Create CloudFront invalidation. */ const createInvalidation = async(paths: string[], callerReference: string) => { const cmd = new CreateInvalidationCommand({ DistributionId: distributionId, @@ -25,6 +26,7 @@ const createInvalidation = async(paths: string[], callerReference: string) => { return output; }; +/** Convert webhook event to CloudFront paths. */ const eventToPath = (event: WebhookEvent): string[] => { const bucketId = event.event.payload.bucketId; const objectName = event.event.payload.name;