🎥 Make videos programmatically with React
rename bucketSize to renderSize
Jonny Burger9167ed449961
diff --git a/packages/docs/docs/getrenderprogress.md b/packages/docs/docs/getrenderprogress.mdindex 1f7502ae7e..94835bde60 100644--- a/packages/docs/docs/getrenderprogress.md+++ b/packages/docs/docs/getrenderprogress.md@@ -104,7 +104,7 @@ An array which contains errors that occured.The current time at which the Lambda function responded to the progress request.-### `bucketSize`+### `renderSize`How many bytes have been saved to the S3 bucket as a result of this render.diff --git a/packages/docs/docs/lambda-changelog.md b/packages/docs/docs/lambda-changelog.mdindex 3be72cacc2..cc9a5f5144 100644--- a/packages/docs/docs/lambda-changelog.md+++ b/packages/docs/docs/lambda-changelog.md@@ -20,6 +20,7 @@ Keep track of changes to the APIs of Remotion Lambda here.- Exported `getSites()` and `deleteSite()` (not documented yet)- Added `siteName` to the options of `deploySite()`.- Replace `estimatedLambdaInvokations` with `estimatedRenderLambdaInvokations`.+- Rename `bucketSize` to `renderSize`. This property is reporting the size of the render, not the size of the bucket.## September 15th, 2021diff --git a/packages/lambda/src/functions/helpers/create-post-render-data.ts b/packages/lambda/src/functions/helpers/create-post-render-data.tsindex accfd045a7..4d3d5913fa 100644--- a/packages/lambda/src/functions/helpers/create-post-render-data.ts+++ b/packages/lambda/src/functions/helpers/create-post-render-data.ts@@ -72,7 +72,7 @@ export const createPostRenderData = async ({const startTime = renderMetadata.startedDate;const timeToFinish = endTime - startTime;- const bucketSize = contents+ const renderSize = contents.map((c) => c.Size ?? 0).reduce((a, b) => a + b, 0);@@ -93,7 +93,7 @@ export const createPostRenderData = async ({startTime: renderMetadata.startedDate,endTime,outputSize: outputFile.size,- bucketSize,+ renderSize,renderMetadata,filesCleanedUp: getFilesToDelete({chunkCount: renderMetadata.totalChunks,diff --git a/packages/lambda/src/functions/helpers/get-progress.ts b/packages/lambda/src/functions/helpers/get-progress.tsindex b450a12672..f1206868ec 100644--- a/packages/lambda/src/functions/helpers/get-progress.ts+++ b/packages/lambda/src/functions/helpers/get-progress.ts@@ -44,7 +44,7 @@ export const getProgress = async ({if (postRenderData) {return {bucket: bucketName,- bucketSize: postRenderData.bucketSize,+ renderSize: postRenderData.renderSize,chunks: postRenderData.renderMetadata.totalChunks,cleanup: {done: true,@@ -142,7 +142,7 @@ export const getProgress = async ({const chunks = contents.filter((c) => c.Key?.startsWith(chunkKey(renderId)));- const bucketSize = contents+ const renderSize = contents.map((c) => c.Size ?? 0).reduce((a, b) => a + b, 0);@@ -169,7 +169,7 @@ export const getProgress = async ({errors: errorExplanations,fatalErrorEncountered: errorExplanations.some(isFatalError),currentTime: Date.now(),- bucketSize,+ renderSize,lambdasInvoked,cleanup,};diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.tsindex 8a42ca559a..0228145c6f 100644--- a/packages/lambda/src/shared/constants.ts+++ b/packages/lambda/src/shared/constants.ts@@ -239,8 +239,7 @@ export type PostRenderData = {};outputFile: string;outputSize: number;- // TODO: Confusing, should be renderSize- bucketSize: number;+ renderSize: number;timeToFinish: number;errors: EnhancedErrorInfo[];startTime: number;@@ -275,7 +274,7 @@ export type RenderProgress = {errors: EnhancedErrorInfo[];fatalErrorEncountered: boolean;currentTime: number;- bucketSize: number;+ renderSize: number;lambdasInvoked: number;cleanup: CleanupInfo | null;};