🎥 Make videos programmatically with React
fix constants
Jonny Burgercb1116e4ddd5
diff --git a/packages/lambda/src/functions/helpers/get-overall-progress-s3.ts b/packages/lambda/src/functions/helpers/get-overall-progress-s3.tsindex de4dd85cbe..53c7c0881a 100644--- a/packages/lambda/src/functions/helpers/get-overall-progress-s3.ts+++ b/packages/lambda/src/functions/helpers/get-overall-progress-s3.ts@@ -1,6 +1,5 @@import type {ProviderSpecifics} from '@remotion/serverless';-import {streamToString} from '@remotion/serverless/client';-import {overallProgressKey} from '../../shared/constants';+import {overallProgressKey, streamToString} from '@remotion/serverless/client';import type {OverallRenderProgress} from './overall-render-progress';export const getOverallProgressS3 = async <Region extends string>({diff --git a/packages/lambda/src/functions/helpers/overall-render-progress.ts b/packages/lambda/src/functions/helpers/overall-render-progress.tsindex e24c321ee7..d4c1dc5075 100644--- a/packages/lambda/src/functions/helpers/overall-render-progress.ts+++ b/packages/lambda/src/functions/helpers/overall-render-progress.ts@@ -1,9 +1,11 @@import type {LogLevel} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';import type {ProviderSpecifics} from '@remotion/serverless';-import type {RenderMetadata} from '@remotion/serverless/client';+import {+ overallProgressKey,+ type RenderMetadata,+} from '@remotion/serverless/client';import type {PostRenderData} from '../../shared/constants';-import {overallProgressKey} from '../../shared/constants';import type {ParsedTiming} from '../../shared/parse-lambda-timings-key';import type {ChunkRetry} from './get-retry-stats';import type {LambdaErrorInfo} from './write-lambda-error';diff --git a/packages/lambda/src/functions/launch.ts b/packages/lambda/src/functions/launch.tsindex cceb10da8e..e794b1fca1 100644--- a/packages/lambda/src/functions/launch.ts+++ b/packages/lambda/src/functions/launch.ts@@ -14,6 +14,7 @@ import type {} from '@remotion/serverless/client';import {ServerlessRoutines,+ artifactName,compressInputProps,decompressInputProps,getExpectedOutName,@@ -28,7 +29,6 @@ import type {PostRenderData} from '../shared/constants';import {CONCAT_FOLDER_TOKEN,MAX_FUNCTIONS_PER_RENDER,- artifactName,} from '../shared/constants';import {DOCS_URL} from '../shared/docs-url';import {invokeWebhook} from '../shared/invoke-webhook';diff --git a/packages/lambda/src/functions/start.ts b/packages/lambda/src/functions/start.tsindex b8ab42c9b3..3e04680d62 100644--- a/packages/lambda/src/functions/start.ts+++ b/packages/lambda/src/functions/start.ts@@ -4,11 +4,11 @@ import type {ServerlessPayload} from '@remotion/serverless/client';import {ServerlessRoutines,internalGetOrCreateBucket,+ overallProgressKey,} from '@remotion/serverless/client';import {VERSION} from 'remotion/version';import type {AwsRegion} from '../regions';import {getLambdaClient} from '../shared/aws-clients';-import {overallProgressKey} from '../shared/constants';import {generateRandomHashWithLifeCycleRule,validateDeleteAfter,diff --git a/packages/lambda/src/functions/still.ts b/packages/lambda/src/functions/still.tsindex ef3c78c021..0e29af6ebf 100644--- a/packages/lambda/src/functions/still.ts+++ b/packages/lambda/src/functions/still.ts@@ -14,9 +14,11 @@ import type {} from '@remotion/serverless/client';import {ServerlessRoutines,+ artifactName,decompressInputProps,getExpectedOutName,internalGetOrCreateBucket,+ overallProgressKey,} from '@remotion/serverless/client';import fs from 'node:fs';import path from 'node:path';@@ -26,11 +28,7 @@ import {estimatePrice} from '../api/estimate-price';import type {AwsRegion} from '../regions';import {cleanupSerializedInputProps} from '../shared/cleanup-serialized-input-props';import type {CostsInfo} from '../shared/constants';-import {- MAX_EPHEMERAL_STORAGE_IN_MB,- artifactName,- overallProgressKey,-} from '../shared/constants';+import {MAX_EPHEMERAL_STORAGE_IN_MB} from '../shared/constants';import {isFlakyError} from '../shared/is-flaky-error';import {validateDownloadBehavior} from '../shared/validate-download-behavior';import {validatePrivacy} from '../shared/validate-privacy';diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.tsindex 66ab29e085..73cba32cea 100644--- a/packages/lambda/src/shared/constants.ts+++ b/packages/lambda/src/shared/constants.ts@@ -1,5 +1,4 @@import {- rendersPrefix,type DeleteAfter,type Privacy,type RenderMetadata,@@ -39,12 +38,8 @@ export const DEFAULT_CLOUDWATCH_RETENTION_PERIOD = 14;export const RENDER_FN_PREFIX = 'remotion-render-';export const LOG_GROUP_PREFIX = '/aws/lambda/';export const LAMBDA_INSIGHTS_PREFIX = '/aws/lambda-insights';-export const overallProgressKey = (renderId: string) =>- `${rendersPrefix(renderId)}/progress.json`;export const getSitesKey = (siteId: string) => `sites/${siteId}`;-export const artifactName = (renderId: string, name: string) =>- `${rendersPrefix(renderId)}/artifacts/${name}`;export const RENDERER_PATH_TOKEN = 'remotion-bucket';export const CONCAT_FOLDER_TOKEN = 'remotion-concat';diff --git a/packages/serverless/src/client.ts b/packages/serverless/src/client.tsindex 773b31f593..e66cb3d443 100644--- a/packages/serverless/src/client.ts+++ b/packages/serverless/src/client.ts@@ -13,10 +13,12 @@ export {ServerlessRoutines,ServerlessStartPayload,ServerlessStatusPayload,+ artifactName,customOutName,expiryDays,outName,outStillName,+ overallProgressKey,rendersPrefix,serverlessCodecs,type CustomCredentials,diff --git a/packages/serverless/src/constants.ts b/packages/serverless/src/constants.tsindex 6b284020c2..006e0a1154 100644--- a/packages/serverless/src/constants.ts+++ b/packages/serverless/src/constants.ts@@ -341,3 +341,9 @@ export const customOutName = <Region extends string>(customCredentials: name.s3OutputProvider ?? null,};};++export const overallProgressKey = (renderId: string) =>+ `${rendersPrefix(renderId)}/progress.json`;++export const artifactName = (renderId: string, name: string) =>+ `${rendersPrefix(renderId)}/artifacts/${name}`;