🎥 Make videos programmatically with React
go on
Jonny Burgere0dd66a41c1e
diff --git a/packages/cloudrun/src/api/deploy-service.ts b/packages/cloudrun/src/api/deploy-service.tsindex e98b3cda9f..fc910ca969 100644--- a/packages/cloudrun/src/api/deploy-service.ts+++ b/packages/cloudrun/src/api/deploy-service.ts@@ -1,4 +1,4 @@-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import {DEFAULT_MAX_INSTANCES,DEFAULT_MIN_INSTANCES,@@ -111,7 +111,7 @@ const deployServiceRaw = async ({};export const internalDeployService =- PureJSAPIs.wrapWithErrorHandling(deployServiceRaw);+ NoReactAPIs.wrapWithErrorHandling(deployServiceRaw);/*** @description Creates a Cloud Run service in your project that will be able to render a video in GCP.diff --git a/packages/cloudrun/src/api/deploy-site.ts b/packages/cloudrun/src/api/deploy-site.tsindex 075a570264..0fe80db6d3 100644--- a/packages/cloudrun/src/api/deploy-site.ts+++ b/packages/cloudrun/src/api/deploy-site.ts@@ -1,5 +1,5 @@import type {WebpackOverrideFn} from '@remotion/bundler';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import {cloudrunDeleteFile, cloudrunLs} from '../functions/helpers/io';import {bundleSite} from '../shared/bundle-site';import {getSitesKey} from '../shared/constants';@@ -117,4 +117,4 @@ const deploySiteRaw = async ({* @param {string} params.siteName The name of the folder in which the project gets deployed to.* @param {object} params.options Further options, see documentation page for this function.*/-export const deploySite = PureJSAPIs.wrapWithErrorHandling(deploySiteRaw);+export const deploySite = NoReactAPIs.wrapWithErrorHandling(deploySiteRaw);diff --git a/packages/cloudrun/src/api/render-media-on-cloudrun.ts b/packages/cloudrun/src/api/render-media-on-cloudrun.tsindex da357be629..8dc3a57c7c 100644--- a/packages/cloudrun/src/api/render-media-on-cloudrun.ts+++ b/packages/cloudrun/src/api/render-media-on-cloudrun.ts@@ -13,7 +13,7 @@ import type {} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';import type {BrowserSafeApis} from '@remotion/renderer/client';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import {NoReactInternals} from 'remotion/no-react';import type {CloudRunCrashResponse,@@ -291,7 +291,7 @@ const internalRenderMediaOnCloudrunRaw = async ({return renderResponse;};-export const internalRenderMediaOnCloudrun = PureJSAPIs.wrapWithErrorHandling(+export const internalRenderMediaOnCloudrun = NoReactAPIs.wrapWithErrorHandling(internalRenderMediaOnCloudrunRaw,) as typeof internalRenderMediaOnCloudrunRaw;diff --git a/packages/cloudrun/src/api/render-still-on-cloudrun.ts b/packages/cloudrun/src/api/render-still-on-cloudrun.tsindex 0db8e16b1b..81d7bc05fc 100644--- a/packages/cloudrun/src/api/render-still-on-cloudrun.ts+++ b/packages/cloudrun/src/api/render-still-on-cloudrun.ts@@ -6,7 +6,7 @@ import type {} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';import type {BrowserSafeApis} from '@remotion/renderer/client';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import {NoReactInternals} from 'remotion/no-react';import type {CloudRunCrashResponse,@@ -206,6 +206,6 @@ const renderStillOnCloudrunRaw = async ({return renderResponse;};-export const renderStillOnCloudrun = PureJSAPIs.wrapWithErrorHandling(+export const renderStillOnCloudrun = NoReactAPIs.wrapWithErrorHandling(renderStillOnCloudrunRaw,) as typeof renderStillOnCloudrunRaw;diff --git a/packages/lambda/src/api/deploy-function.ts b/packages/lambda/src/api/deploy-function.tsindex ec8ae06438..f4f0519063 100644--- a/packages/lambda/src/api/deploy-function.ts+++ b/packages/lambda/src/api/deploy-function.ts@@ -1,4 +1,4 @@-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import {VERSION} from 'remotion/version';import {getFunctions} from '../api/get-functions';import type {AwsRegion} from '../pricing/aws-regions';@@ -107,6 +107,6 @@ const deployFunctionRaw = async (* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property*/-export const deployFunction = PureJSAPIs.wrapWithErrorHandling(+export const deployFunction = NoReactAPIs.wrapWithErrorHandling(deployFunctionRaw,) as typeof deployFunctionRaw;diff --git a/packages/lambda/src/api/deploy-site.ts b/packages/lambda/src/api/deploy-site.tsindex 8ac827d996..b3f64c1e57 100644--- a/packages/lambda/src/api/deploy-site.ts+++ b/packages/lambda/src/api/deploy-site.ts@@ -1,5 +1,5 @@import type {WebpackOverrideFn} from '@remotion/bundler';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import fs from 'node:fs';import {lambdaDeleteFile, lambdaLs} from '../functions/helpers/io';import type {AwsRegion} from '../pricing/aws-regions';@@ -150,6 +150,6 @@ const deploySiteRaw = async ({* @param {string} params.siteName The name of the folder in which the project gets deployed to.* @param {object} params.options Further options, see documentation page for this function.*/-export const deploySite = PureJSAPIs.wrapWithErrorHandling(+export const deploySite = NoReactAPIs.wrapWithErrorHandling(deploySiteRaw,) as typeof deploySiteRaw;diff --git a/packages/lambda/src/api/render-media-on-lambda.ts b/packages/lambda/src/api/render-media-on-lambda.tsindex 0bc95f5cae..0a3d870096 100644--- a/packages/lambda/src/api/render-media-on-lambda.ts+++ b/packages/lambda/src/api/render-media-on-lambda.ts@@ -11,7 +11,7 @@ import type {X264Preset,} from '@remotion/renderer';import type {BrowserSafeApis} from '@remotion/renderer/client';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import type {DeleteAfter} from '../functions/helpers/lifecycle';import type {AwsRegion} from '../pricing/aws-regions';import {callLambda} from '../shared/call-lambda';@@ -155,7 +155,7 @@ export const internalRenderMediaOnLambdaRaw = async (export const renderMediaOnLambda = (options: RenderMediaOnLambdaInput,): Promise<RenderMediaOnLambdaOutput> => {- const wrapped = PureJSAPIs.wrapWithErrorHandling(+ const wrapped = NoReactAPIs.wrapWithErrorHandling(internalRenderMediaOnLambdaRaw,);if (options.quality) {diff --git a/packages/lambda/src/api/render-still-on-lambda.ts b/packages/lambda/src/api/render-still-on-lambda.tsindex ed665cf378..84991631eb 100644--- a/packages/lambda/src/api/render-still-on-lambda.ts+++ b/packages/lambda/src/api/render-still-on-lambda.ts@@ -5,7 +5,7 @@ import type {ToOptions,} from '@remotion/renderer';import type {BrowserSafeApis} from '@remotion/renderer/client';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import type {DeleteAfter} from '../functions/helpers/lifecycle';import type {AwsRegion} from '../pricing/aws-regions';import {callLambda} from '../shared/call-lambda';@@ -137,6 +137,6 @@ const renderStillOnLambdaRaw = async (* @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.*/-export const renderStillOnLambda = PureJSAPIs.wrapWithErrorHandling(+export const renderStillOnLambda = NoReactAPIs.wrapWithErrorHandling(renderStillOnLambdaRaw,) as typeof renderStillOnLambdaRaw;diff --git a/packages/lambda/src/functions/helpers/expected-out-name.ts b/packages/lambda/src/functions/helpers/expected-out-name.tsindex 5302b56dfe..c128602fd4 100644--- a/packages/lambda/src/functions/helpers/expected-out-name.ts+++ b/packages/lambda/src/functions/helpers/expected-out-name.ts@@ -1,5 +1,5 @@import type {Codec} from '@remotion/renderer';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import type {OutNameInput, OutNameOutput, RenderMetadata} from '../../defaults';import {customOutName, outName, outStillName} from '../../defaults';import type {CustomCredentials} from '../../shared/aws-clients';@@ -55,7 +55,7 @@ export const getExpectedOutName = (renderBucketName: bucketName,key: outName(renderMetadata.renderId,- PureJSAPIs.getFileExtensionFromCodec(+ NoReactAPIs.getFileExtensionFromCodec(renderMetadata.codec as Codec,renderMetadata.audioCodec,),diff --git a/packages/lambda/src/shared/validate-outname.ts b/packages/lambda/src/shared/validate-outname.tsindex b6c61449a9..e8db677d5c 100644--- a/packages/lambda/src/shared/validate-outname.ts+++ b/packages/lambda/src/shared/validate-outname.ts@@ -1,5 +1,5 @@import type {AudioCodec, Codec} from '@remotion/renderer';-import {PureJSAPIs} from '@remotion/renderer/pure';+import {NoReactAPIs} from '@remotion/renderer/pure';import type {OutNameInputWithoutCredentials} from './constants';import {validateBucketName} from './validate-bucketname';@@ -36,10 +36,10 @@ export const validateOutname = (}if (codec) {- PureJSAPIs.validateOutputFilename({+ NoReactAPIs.validateOutputFilename({codec,audioCodec,- extension: PureJSAPIs.getExtensionOfFilename(outName) as string,+ extension: NoReactAPIs.getExtensionOfFilename(outName) as string,preferLossless: false,});}diff --git a/packages/renderer/src/pure.ts b/packages/renderer/src/pure.tsindex 2816b21bd3..dd2a48ce74 100644--- a/packages/renderer/src/pure.ts+++ b/packages/renderer/src/pure.ts@@ -3,7 +3,7 @@ import {getExtensionOfFilename} from './get-extension-of-filename';import {validateOutputFilename} from './validate-output-filename';import {wrapWithErrorHandling} from './wrap-with-error-handling';-export const PureJSAPIs = {+export const NoReactAPIs = {wrapWithErrorHandling,getExtensionOfFilename,getFileExtensionFromCodec,