Skip to content

🎥 Make videos programmatically with React

formatting

Jonny Burger84eaf1e72e2c
diff --git a/packages/ai-improvements/src/improve-docs.ts b/packages/ai-improvements/src/improve-docs.ts
index 8e604c7b91..4d8bd9240d 100644
--- a/packages/ai-improvements/src/improve-docs.ts
+++ b/packages/ai-improvements/src/improve-docs.ts
@@ -18,13 +18,6 @@ for (const api of apis) {
continue;
}
- const flag = path.join('.done', api.id);
-
- if (await Bun.file(flag).exists()) {
- console.log(`Article ${api.title} already processed`);
- continue;
- }
-
const file = path.join(process.cwd(), '..', '..', api.sourceCodePath);
const sourceContents = await Bun.file(file).text();
console.log(`Article ${api.title} contains source code`);
@@ -44,6 +37,4 @@ for (const api of apis) {
openai,
contents,
});
-
- await Bun.write(flag, 'txt');
}
diff --git a/packages/ai-improvements/src/tasks/add-jsdoc-comment.ts b/packages/ai-improvements/src/tasks/add-jsdoc-comment.ts
index 0594be0070..a8e6c34660 100644
--- a/packages/ai-improvements/src/tasks/add-jsdoc-comment.ts
+++ b/packages/ai-improvements/src/tasks/add-jsdoc-comment.ts
@@ -15,7 +15,7 @@ export const addJsDocComment = ({
if (!trimmed.startsWith('/**') || !trimmed.endsWith('*/')) {
throw new Error('Comment must be a block comment, but');
}
- const removedComment = '\n ' + trimmed.slice(3, -2).trim() + '\n ';
+ const commentWithoutStars = '\n ' + trimmed.slice(3, -2).trim() + '\n ';
const ast = recast.parse(sourceCode, {
parser: tsParser,
@@ -68,7 +68,7 @@ export const addJsDocComment = ({
found = true;
const newComment = recast.types.builders.commentBlock(
- removedComment,
+ commentWithoutStars,
true,
);
return {
@@ -87,7 +87,7 @@ export const addJsDocComment = ({
);
}
- console.log('Added comment', {removedComment});
+ console.log('Added comment', commentWithoutStars);
const output = recast.print(ast, {
parser: tsParser,
}).code;
diff --git a/packages/captions/src/create-tiktok-style-captions.ts b/packages/captions/src/create-tiktok-style-captions.ts
index 2dd6c51e9f..b0afb30406 100644
--- a/packages/captions/src/create-tiktok-style-captions.ts
+++ b/packages/captions/src/create-tiktok-style-captions.ts
@@ -21,12 +21,10 @@ export type CreateTikTokStyleCaptionsOutput = {
pages: TikTokPage[];
};
-export function createTikTokStyleCaptions(
- {
- captions,
- combineTokensWithinMilliseconds,
- }: CreateTikTokStyleCaptionsInput
-): CreateTikTokStyleCaptionsOutput {
+export function createTikTokStyleCaptions({
+ captions,
+ combineTokensWithinMilliseconds,
+}: CreateTikTokStyleCaptionsInput): CreateTikTokStyleCaptionsOutput {
const tikTokStyleCaptions: TikTokPage[] = [];
let currentText = '';
let currentTokens: TikTokToken[] = [];
diff --git a/packages/core/src/prefetch.ts b/packages/core/src/prefetch.ts
index 5f4229a663..aff45c26fd 100644
--- a/packages/core/src/prefetch.ts
+++ b/packages/core/src/prefetch.ts
@@ -76,7 +76,7 @@ const getBlobFromReader = async ({
};
/*
- * @description When you call the preFetch() function, an asset will be fetched and kept in memory so it is ready when you want to play it in a <Player>.
+ * @description When you call the prefetch() function, an asset will be fetched and kept in memory so it is ready when you want to play it in a <Player>.
* @see [Documentation](https://www.remotion.dev/docs/prefetch)
*/
export const prefetch = (
diff --git a/packages/lambda/src/api/delete-site.ts b/packages/lambda/src/api/delete-site.ts
index e10a1c9e2c..0b05a0d5f0 100644
--- a/packages/lambda/src/api/delete-site.ts
+++ b/packages/lambda/src/api/delete-site.ts
@@ -78,15 +78,9 @@ export const internalDeleteSite = async ({
};
};
-/**
- *
- * @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
- * @see [Documentation](https://remotion.dev/docs/lambda/deletesite)
- * @param params.bucketName The S3 bucket name where the site resides in.
- * @param params.siteName The ID of the site that you want to delete.
- * @param {AwsRegion} params.region The region in where the S3 bucket resides in.
- * @param params.onAfterItemDeleted Function that gets called after each file that gets deleted, useful for showing progress.
- * @returns {Promise<DeleteSiteOutput>} Object containing info about how much space was freed.
+/*
+ * @description Removes a Remotion project from your Cloud Storage bucket.
+ * @see [Documentation](https://remotion.dev/docs/cloudrun/deletesite)
*/
export const deleteSite = (
props: DeleteSiteOptionalInput,
diff --git a/packages/lambda/src/api/deploy-site.ts b/packages/lambda/src/api/deploy-site.ts
index cbb2db52eb..4b315d415a 100644
--- a/packages/lambda/src/api/deploy-site.ts
+++ b/packages/lambda/src/api/deploy-site.ts
@@ -190,14 +190,9 @@ const mandatoryDeploySite = async ({
export const internalDeploySite = wrapWithErrorHandling(mandatoryDeploySite);
-/**
- * @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
- * @see [Documentation](https://remotion.dev/docs/lambda/deploysite)
- * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
- * @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
- * @param {string} params.bucketName The name of the bucket to deploy your project into.
- * @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.
+/*
+ * @description Deploys a Remotion project to a GCP storage bucket to prepare it for rendering on Cloud Run.
+ * @see [Documentation](https://remotion.dev/docs/cloudrun/deploysite)
*/
export const deploySite = (args: DeploySiteInput) => {
return internalDeploySite({
diff --git a/packages/lambda/src/api/get-or-create-bucket.ts b/packages/lambda/src/api/get-or-create-bucket.ts
index 487f3433e9..61e25f1f52 100644
--- a/packages/lambda/src/api/get-or-create-bucket.ts
+++ b/packages/lambda/src/api/get-or-create-bucket.ts
@@ -3,11 +3,9 @@ import {internalGetOrCreateBucket} from '@remotion/serverless/client';
import type {AwsProvider} from '../functions/aws-implementation';
import {awsImplementation} from '../functions/aws-implementation';
-/**
- * @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
- * @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
- * @param params.region The region in which you want your S3 bucket to reside in.
- * @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
+/*
+ * @description Creates a Cloud Storage bucket for Remotion Cloud Run in your GCP project. If one already exists, it will get returned instead.
+ * @see [Documentation](https://remotion.dev/docs/cloudrun/getorcreatebucket)
*/
export const getOrCreateBucket = (
options: GetOrCreateBucketInput<AwsProvider>,
diff --git a/packages/lambda/src/api/get-regions.ts b/packages/lambda/src/api/get-regions.ts
index 6b3360eaf6..c0dc5afb42 100644
--- a/packages/lambda/src/api/get-regions.ts
+++ b/packages/lambda/src/api/get-regions.ts
@@ -5,10 +5,9 @@ type Options = {
enabledByDefaultOnly?: boolean;
};
-/**
- * @description Gets an array of all supported AWS regions of this release of Remotion Lambda.
- * @see [Documentation](https://remotion.dev/docs/lambda/getregions)
- * @returns {AwsRegion[]} A list of AWS regions.
+/*
+ * @description Gets an array of all supported GCP regions of this release of Remotion Cloud Run.
+ * @see [Documentation](https://remotion.dev/docs/cloudrun/getregions)
*/
export const getRegions = (options?: Options): readonly AwsRegion[] => {
const onlyEnabledByDefault = options?.enabledByDefaultOnly ?? false;
diff --git a/packages/lambda/src/api/get-sites.ts b/packages/lambda/src/api/get-sites.ts
index b4339072bb..4db149067c 100644
--- a/packages/lambda/src/api/get-sites.ts
+++ b/packages/lambda/src/api/get-sites.ts
@@ -111,11 +111,9 @@ export const internalGetSites = async ({
return {sites: sitesArray, buckets: remotionBuckets};
};
-/**
- * @description Gets all the deployed sites for a certain AWS region.
- * @see [Documentation](https://remotion.dev/docs/lambda/getsites)
- * @param {AwsRegion} params.region The AWS region that you want to query for.
- * @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
+/*
+ * @description Gets an array of Remotion projects in Cloud Storage, in your GCP project.
+ * @see [Documentation](https://remotion.dev/docs/cloudrun/getsites)
*/
export const getSites = ({
region,