🎥 Make videos programmatically with React
rename REMOTION_LAMBDA to __RESERVED_IS_INSIDE_REMOTION_LAMBDA
Jonny Burgera3889763c37d
diff --git a/packages/lambda/src/functions/index.ts b/packages/lambda/src/functions/index.tsindex 8b3c8c2bc1..466c6c259d 100644--- a/packages/lambda/src/functions/index.ts+++ b/packages/lambda/src/functions/index.ts@@ -16,7 +16,7 @@ export const handler = async <T extends LambdaRoutines>(params: LambdaPayload,context: {invokedFunctionArn: string; getRemainingTimeInMillis: () => number}): Promise<LambdaReturnValues[T]> => {- process.env.REMOTION_LAMBDA = 'true';+ process.env.__RESERVED_IS_INSIDE_REMOTION_LAMBDA = 'true';const timeoutInMiliseconds = context.getRemainingTimeInMillis();if (!context || !context.invokedFunctionArn) {diff --git a/packages/lambda/src/shared/is-in-lambda.ts b/packages/lambda/src/shared/is-in-lambda.tsindex f0c481b477..4e57a61b0a 100644--- a/packages/lambda/src/shared/is-in-lambda.ts+++ b/packages/lambda/src/shared/is-in-lambda.ts@@ -1,2 +1,5 @@export const isInsideLambda = () =>- Boolean(typeof process !== 'undefined' && process?.env?.REMOTION_LAMBDA);+ Boolean(+ typeof process !== 'undefined' &&+ process?.env?.__RESERVED_IS_INSIDE_REMOTION_LAMBDA+ );diff --git a/packages/lambda/src/test/unit/price-calculation.test.ts b/packages/lambda/src/test/unit/price-calculation.test.tsindex 12abdbe7f2..916fbea8fb 100644--- a/packages/lambda/src/test/unit/price-calculation.test.ts+++ b/packages/lambda/src/test/unit/price-calculation.test.ts@@ -2,7 +2,7 @@ import {estimatePriceFromBucket} from '../../functions/helpers/calculate-price-ftest('Should not throw while calculating prices when time shifts occur', () => {const aDate = Date.now();- process.env.REMOTION_LAMBDA = 'true';+ process.env.__RESERVED_IS_INSIDE_REMOTION_LAMBDA = 'true';process.env.REMOTION_AWS_REGION = 'us-east-1';const price = estimatePriceFromBucket({diff --git a/packages/renderer/src/screenshot-task.ts b/packages/renderer/src/screenshot-task.tsindex 0c98d0c2a9..bf773c214b 100644--- a/packages/renderer/src/screenshot-task.ts+++ b/packages/renderer/src/screenshot-task.ts@@ -47,7 +47,7 @@ export const _screenshotTask = async (if ((err as Error).message.includes('Unable to capture screenshot')) {const errMessage = ['Could not take a screenshot because Google Chrome ran out of memory or disk space.',- process?.env?.REMOTION_LAMBDA+ process?.env?.__RESERVED_IS_INSIDE_REMOTION_LAMBDA? 'Deploy a new Lambda function with more memory or disk space.': 'Decrease the concurrency to use less RAM.',].join(' ');