🎥 Make videos programmatically with React
drop lambda size of remotion/lambda/client, don't require react
Jonny Burgerbd500807bfa5
diff --git a/packages/lambda/src/shared/check-credentials.ts b/packages/lambda/src/shared/check-credentials.tsindex 0d2d8b0fb3..6a85f2c67c 100644--- a/packages/lambda/src/shared/check-credentials.ts+++ b/packages/lambda/src/shared/check-credentials.ts@@ -1,6 +1,6 @@-import {Internals} from 'remotion';import {getIsCli} from '../cli/is-cli';import {DOCS_URL} from './docs-url';+import {truthy} from './truthy';const messageForVariable = (variable: string) => {return [@@ -11,7 +11,7 @@ const messageForVariable = (variable: string) => {`- Please refer to the Remotion Lambda docs (${DOCS_URL}/docs/lambda/setup) to see how to generate the credentials for your AWS account and then set the environment variables.`,`- For more reasons see the troubleshooting page: ${DOCS_URL}/docs/lambda/troubleshooting/permissions`,]- .filter(Internals.truthy)+ .filter(truthy).join('\n');};diff --git a/packages/lambda/src/shared/truthy.ts b/packages/lambda/src/shared/truthy.tsnew file mode 100644index 0000000000..e186dc6277--- /dev/null+++ b/packages/lambda/src/shared/truthy.ts@@ -0,0 +1,5 @@+type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T; // from lodash++export function truthy<T>(value: T): value is Truthy<T> {+ return Boolean(value);+}