Skip to content

πŸŽ₯ Make videos programmatically with React

npx remotion gcp πŸ‘‰ npx remotion cloudrun

Matt McGillivraya3766b09261f
diff --git a/.gitignore b/.gitignore
index 63f8e44a06..220dbf2bbc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,5 +13,5 @@ packages/example/out
.turbo
.vercel
packages/renderer/target
-packages/gcp/remotion-lambda-gcp.code-workspace
+packages/cloudrun/remotion-lambda-gcp.code-workspace
.terraform*
diff --git a/packages/cli/src/gcp-command.ts b/packages/cli/src/cloudrun-command.ts
similarity index 57%
rename from packages/cli/src/gcp-command.ts
rename to packages/cli/src/cloudrun-command.ts
index 18a735d0e5..e780ad6d06 100644
--- a/packages/cli/src/gcp-command.ts
+++ b/packages/cli/src/cloudrun-command.ts
@@ -2,24 +2,24 @@ import {Log} from './log';
import {getPackageManager} from './preview-server/get-package-manager';
import {getRemotionVersion} from './preview-server/update-available';
-export const gcpCommand = async (remotionRoot: string, args: string[]) => {
+export const cloudrunCommand = async (remotionRoot: string, args: string[]) => {
try {
- const path = require.resolve('@remotion/gcp', {
+ const path = require.resolve('@remotion/cloudrun', {
paths: [remotionRoot],
});
- const {GCPInternals} = require(path);
+ const {CloudrunInternals} = require(path);
- await GCPInternals.executeCommand(args, remotionRoot);
+ await CloudrunInternals.executeCommand(args, remotionRoot);
process.exit(0);
} catch (err) {
const manager = getPackageManager(remotionRoot, undefined);
const installCommand =
manager === 'unknown' ? 'npm i' : manager.installCommand;
Log.error(err);
- Log.error('Remotion GCP is not installed.');
+ Log.error('Remotion CloudRun is not installed.');
Log.info('');
Log.info('You can install it using:');
- Log.info(`${installCommand} @remotion/gcp@${getRemotionVersion()}`);
+ Log.info(`${installCommand} @remotion/cloudrun@${getRemotionVersion()}`);
process.exit(1);
}
};
diff --git a/packages/cli/src/index.tsx b/packages/cli/src/index.tsx
index 7845c1dd35..b57b7d1be2 100644
--- a/packages/cli/src/index.tsx
+++ b/packages/cli/src/index.tsx
@@ -1,34 +1,34 @@
-import {RenderInternals} from '@remotion/renderer';
+import { RenderInternals } from '@remotion/renderer';
import minimist from 'minimist';
-import {benchmarkCommand} from './benchmark';
-import {chalk} from './chalk';
-import {cleanupBeforeQuit, handleCtrlC} from './cleanup-before-quit';
-import {listCompositionsCommand} from './compositions';
-import {overrideRemotion} from './config/index';
-import {determineFinalImageFormat} from './determine-image-format';
-import {getFileSizeDownloadBar} from './download-progress';
-import {findEntryPoint} from './entry-point';
-import {formatBytes} from './format-bytes';
-import {gcpCommand} from './gcp-command';
-import {getCliOptions, getFinalCodec} from './get-cli-options';
-import {loadConfig} from './get-config-file-name';
-import {handleCommonError} from './handle-common-errors';
-import {getImageFormat} from './image-formats';
-import {initializeCli} from './initialize-cli';
-import {installCommand, INSTALL_COMMAND} from './install';
-import {lambdaCommand} from './lambda-command';
-import {listOfRemotionPackages} from './list-of-remotion-packages';
-import {Log} from './log';
-import {makeProgressBar} from './make-progress-bar';
-import {BooleanFlags, parsedCli, quietFlagProvided} from './parse-command-line';
-import {previewCommand} from './preview';
-import {printCompositions} from './print-compositions';
-import {printHelp} from './print-help';
-import {createOverwriteableCliOutput} from './progress-bar';
-import {render} from './render';
-import {selectComposition} from './select-composition';
-import {still} from './still';
-import {upgrade} from './upgrade';
+import { benchmarkCommand } from './benchmark';
+import { chalk } from './chalk';
+import { cleanupBeforeQuit, handleCtrlC } from './cleanup-before-quit';
+import { listCompositionsCommand } from './compositions';
+import { overrideRemotion } from './config/index';
+import { determineFinalImageFormat } from './determine-image-format';
+import { getFileSizeDownloadBar } from './download-progress';
+import { findEntryPoint } from './entry-point';
+import { formatBytes } from './format-bytes';
+import { cloudrunCommand } from './cloudrun-command';
+import { getCliOptions, getFinalCodec } from './get-cli-options';
+import { loadConfig } from './get-config-file-name';
+import { handleCommonError } from './handle-common-errors';
+import { getImageFormat } from './image-formats';
+import { initializeCli } from './initialize-cli';
+import { installCommand, INSTALL_COMMAND } from './install';
+import { lambdaCommand } from './lambda-command';
+import { listOfRemotionPackages } from './list-of-remotion-packages';
+import { Log } from './log';
+import { makeProgressBar } from './make-progress-bar';
+import { BooleanFlags, parsedCli, quietFlagProvided } from './parse-command-line';
+import { previewCommand } from './preview';
+import { printCompositions } from './print-compositions';
+import { printHelp } from './print-help';
+import { createOverwriteableCliOutput } from './progress-bar';
+import { render } from './render';
+import { selectComposition } from './select-composition';
+import { still } from './still';
+import { upgrade } from './upgrade';
import {
validateVersionsBeforeCommand,
versionsCommand,
@@ -63,8 +63,8 @@ export const cli = async () => {
await previewCommand(remotionRoot, args);
} else if (command === 'lambda') {
await lambdaCommand(remotionRoot, args);
- } else if (command === 'gcp') {
- await gcpCommand(remotionRoot, args);
+ } else if (command === 'cloudrun') {
+ await cloudrunCommand(remotionRoot, args);
} else if (command === 'render') {
await render(remotionRoot, args);
} else if (command === 'still') {
@@ -99,7 +99,7 @@ export const cli = async () => {
}
};
-export {ConfigInternals, overrideRemotion} from './config/index';
+export { ConfigInternals, overrideRemotion } from './config/index';
export * from './render';
export const CliInternals = {
diff --git a/packages/gcp/.eslintrc b/packages/cloudrun/.eslintrc
similarity index 100%
rename from packages/gcp/.eslintrc
rename to packages/cloudrun/.eslintrc
diff --git a/packages/gcp/.prettierrc.js b/packages/cloudrun/.prettierrc.js
similarity index 100%
rename from packages/gcp/.prettierrc.js
rename to packages/cloudrun/.prettierrc.js
diff --git a/packages/gcp/container/Dockerfile b/packages/cloudrun/container/Dockerfile
similarity index 100%
rename from packages/gcp/container/Dockerfile
rename to packages/cloudrun/container/Dockerfile
diff --git a/packages/gcp/container/package.json b/packages/cloudrun/container/package.json
similarity index 68%
rename from packages/gcp/container/package.json
rename to packages/cloudrun/container/package.json
index 3c8ded5cae..25c3007e01 100644
--- a/packages/gcp/container/package.json
+++ b/packages/cloudrun/container/package.json
@@ -1,7 +1,7 @@
{
- "name": "gcp-cloud-run-render-media",
+ "name": "cloud-run-render",
"version": "0.1.0",
- "description": "Render media on Cloud Run",
+ "description": "Render media and stills on GCP Cloud Run",
"main": "dist/index.js",
"scripts": {
"start": "functions-framework --target=renderOnCloudRun"
@@ -9,4 +9,4 @@
"dependencies": {
"@google-cloud/functions-framework": "^3.1.3"
}
-}
+}
\ No newline at end of file
diff --git a/packages/gcp/container/readme.md b/packages/cloudrun/container/readme.md
similarity index 100%
rename from packages/gcp/container/readme.md
rename to packages/cloudrun/container/readme.md
diff --git a/packages/gcp/haloInf.mp4 b/packages/cloudrun/haloInf.mp4
similarity index 100%
rename from packages/gcp/haloInf.mp4
rename to packages/cloudrun/haloInf.mp4
diff --git a/packages/gcp/package.json b/packages/cloudrun/package.json
similarity index 92%
rename from packages/gcp/package.json
rename to packages/cloudrun/package.json
index 498896cc58..128a9aef66 100644
--- a/packages/gcp/package.json
+++ b/packages/cloudrun/package.json
@@ -1,7 +1,7 @@
{
- "name": "@remotion/gcp",
+ "name": "@remotion/cloudrun",
"version": "3.3.75",
- "description": "GCP alternative to lambda rendering",
+ "description": "GCP Cloud Run alternative to lambda rendering",
"main": "dist/index.js",
"scripts": {
"build": "tsc -d && pnpm run buildContainer",
diff --git a/packages/gcp/readme.md b/packages/cloudrun/readme.md
similarity index 100%
rename from packages/gcp/readme.md
rename to packages/cloudrun/readme.md
diff --git a/packages/docs/static/img/gcp/createSA.png b/packages/cloudrun/readmeImages/createSA.png
similarity index 100%
rename from packages/docs/static/img/gcp/createSA.png
rename to packages/cloudrun/readmeImages/createSA.png
diff --git a/packages/docs/static/img/gcp/downloadEnv.jpg b/packages/cloudrun/readmeImages/downloadEnv.jpg
similarity index 100%
rename from packages/docs/static/img/gcp/downloadEnv.jpg
rename to packages/cloudrun/readmeImages/downloadEnv.jpg
diff --git a/packages/docs/static/img/gcp/downloadEnvFolder.png b/packages/cloudrun/readmeImages/downloadEnvFolder.png
similarity index 100%
rename from packages/docs/static/img/gcp/downloadEnvFolder.png
rename to packages/cloudrun/readmeImages/downloadEnvFolder.png
diff --git a/packages/docs/static/img/gcp/saRole.png b/packages/cloudrun/readmeImages/saRole.png
similarity index 100%
rename from packages/docs/static/img/gcp/saRole.png
rename to packages/cloudrun/readmeImages/saRole.png
diff --git a/packages/docs/static/img/gcp/selectCloudShell.jpg b/packages/cloudrun/readmeImages/selectCloudShell.jpg
similarity index 100%
rename from packages/docs/static/img/gcp/selectCloudShell.jpg
rename to packages/cloudrun/readmeImages/selectCloudShell.jpg
diff --git a/packages/gcp/src/admin/bundle-renderLogic.ts b/packages/cloudrun/src/admin/bundle-renderLogic.ts
similarity index 100%
rename from packages/gcp/src/admin/bundle-renderLogic.ts
rename to packages/cloudrun/src/admin/bundle-renderLogic.ts
diff --git a/packages/gcp/src/api/check-if-service-exists.ts b/packages/cloudrun/src/api/check-if-service-exists.ts
similarity index 100%
rename from packages/gcp/src/api/check-if-service-exists.ts
rename to packages/cloudrun/src/api/check-if-service-exists.ts
diff --git a/packages/gcp/src/api/cloud-run-allow-unauthenticated-access.ts b/packages/cloudrun/src/api/cloud-run-allow-unauthenticated-access.ts
similarity index 100%
rename from packages/gcp/src/api/cloud-run-allow-unauthenticated-access.ts
rename to packages/cloudrun/src/api/cloud-run-allow-unauthenticated-access.ts
diff --git a/packages/gcp/src/api/create-bucket.ts b/packages/cloudrun/src/api/create-bucket.ts
similarity index 100%
rename from packages/gcp/src/api/create-bucket.ts
rename to packages/cloudrun/src/api/create-bucket.ts
diff --git a/packages/gcp/src/api/deploy-cloud-run-revision.ts b/packages/cloudrun/src/api/deploy-cloud-run-revision.ts
similarity index 100%
rename from packages/gcp/src/api/deploy-cloud-run-revision.ts
rename to packages/cloudrun/src/api/deploy-cloud-run-revision.ts
diff --git a/packages/gcp/src/api/deploy-new-cloud-run.ts b/packages/cloudrun/src/api/deploy-new-cloud-run.ts
similarity index 100%
rename from packages/gcp/src/api/deploy-new-cloud-run.ts
rename to packages/cloudrun/src/api/deploy-new-cloud-run.ts
diff --git a/packages/gcp/src/api/deploy-site.ts b/packages/cloudrun/src/api/deploy-site.ts
similarity index 96%
rename from packages/gcp/src/api/deploy-site.ts
rename to packages/cloudrun/src/api/deploy-site.ts
index 9927bedc84..a1f512560c 100644
--- a/packages/gcp/src/api/deploy-site.ts
+++ b/packages/cloudrun/src/api/deploy-site.ts
@@ -1,5 +1,5 @@
import type {WebpackOverrideFn} from '@remotion/bundler';
-import {gcpDeleteFile, gcpLs} from '../functions/helpers/io';
+import {cloudrunDeleteFile, cloudrunLs} from '../functions/helpers/io';
import {bundleSite} from '../shared/bundle-site';
import {getSitesKey} from '../shared/constants';
import {getStorageDiffOperations} from '../shared/get-storage-operations';
@@ -63,7 +63,7 @@ export const deploySite = async ({
// gcpLs is a function that lists all files in a bucket
const [files, bundled] = await Promise.all([
- gcpLs({
+ cloudrunLs({
bucketName,
prefix: subFolder,
}),
@@ -92,7 +92,7 @@ export const deploySite = async ({
}),
Promise.all(
toDelete.map((d) => {
- return gcpDeleteFile({
+ return cloudrunDeleteFile({
bucketName,
key: d.name as string,
});
diff --git a/packages/gcp/src/api/get-buckets.ts b/packages/cloudrun/src/api/get-buckets.ts
similarity index 100%
rename from packages/gcp/src/api/get-buckets.ts
rename to packages/cloudrun/src/api/get-buckets.ts
diff --git a/packages/gcp/src/api/get-compositions-on-gcp.ts b/packages/cloudrun/src/api/get-compositions-on-gcp.ts
similarity index 100%
rename from packages/gcp/src/api/get-compositions-on-gcp.ts
rename to packages/cloudrun/src/api/get-compositions-on-gcp.ts
diff --git a/packages/gcp/src/api/get-or-create-bucket.ts b/packages/cloudrun/src/api/get-or-create-bucket.ts
similarity index 100%
rename from packages/gcp/src/api/get-or-create-bucket.ts
rename to packages/cloudrun/src/api/get-or-create-bucket.ts
diff --git a/packages/gcp/src/api/helpers/IService.ts b/packages/cloudrun/src/api/helpers/IService.ts
similarity index 100%
rename from packages/gcp/src/api/helpers/IService.ts
rename to packages/cloudrun/src/api/helpers/IService.ts
diff --git a/packages/gcp/src/api/helpers/construct-service-deploy-request.ts b/packages/cloudrun/src/api/helpers/construct-service-deploy-request.ts
similarity index 100%
rename from packages/gcp/src/api/helpers/construct-service-deploy-request.ts
rename to packages/cloudrun/src/api/helpers/construct-service-deploy-request.ts
diff --git a/packages/gcp/src/api/helpers/get-auth-client-for-url.ts b/packages/cloudrun/src/api/helpers/get-auth-client-for-url.ts
similarity index 100%
rename from packages/gcp/src/api/helpers/get-auth-client-for-url.ts
rename to packages/cloudrun/src/api/helpers/get-auth-client-for-url.ts
diff --git a/packages/gcp/src/api/helpers/get-cloud-run-client.ts b/packages/cloudrun/src/api/helpers/get-cloud-run-client.ts
similarity index 100%
rename from packages/gcp/src/api/helpers/get-cloud-run-client.ts
rename to packages/cloudrun/src/api/helpers/get-cloud-run-client.ts
diff --git a/packages/gcp/src/api/helpers/get-cloud-storage-client.ts b/packages/cloudrun/src/api/helpers/get-cloud-storage-client.ts
similarity index 100%
rename from packages/gcp/src/api/helpers/get-cloud-storage-client.ts
rename to packages/cloudrun/src/api/helpers/get-cloud-storage-client.ts
diff --git a/packages/gcp/src/api/helpers/parse-cloud-run-url.ts b/packages/cloudrun/src/api/helpers/parse-cloud-run-url.ts
similarity index 100%
rename from packages/gcp/src/api/helpers/parse-cloud-run-url.ts
rename to packages/cloudrun/src/api/helpers/parse-cloud-run-url.ts
diff --git a/packages/gcp/src/api/iam-validation/simulate.ts b/packages/cloudrun/src/api/iam-validation/simulate.ts
similarity index 91%
rename from packages/gcp/src/api/iam-validation/simulate.ts
rename to packages/cloudrun/src/api/iam-validation/simulate.ts
index 4bb47203c6..eeac387f7e 100644
--- a/packages/gcp/src/api/iam-validation/simulate.ts
+++ b/packages/cloudrun/src/api/iam-validation/simulate.ts
@@ -20,8 +20,8 @@ type SimulatePermissionsOutput = {
/**
* @description Simulates calls using the AWS Simulator to validate the correct permissions.
- * @see [Remotion-Documentation](http://remotion.dev/docs/gcp/simulatepermissions)
- * @see [GCP-Documentation]https://cloud.google.com/iam/docs/testing-permissions)
+ * @see [Remotion-Documentation](http://remotion.dev/docs/cloudrun/simulatepermissions)
+ * @see [Cloudrun-Documentation]https://cloud.google.com/iam/docs/testing-permissions)
* @param {(result: SimulationResult) => void} options.onSimulation Function to run on each simulation result
* @returns {Promise<SimulatePermissionsOutput>} See documentation for detailed response structure.
*/
diff --git a/packages/gcp/src/api/render-media-on-gcp.ts b/packages/cloudrun/src/api/render-media-on-cloudrun.ts
similarity index 89%
rename from packages/gcp/src/api/render-media-on-gcp.ts
rename to packages/cloudrun/src/api/render-media-on-cloudrun.ts
index c9bf9c5690..c99a082c57 100644
--- a/packages/gcp/src/api/render-media-on-gcp.ts
+++ b/packages/cloudrun/src/api/render-media-on-cloudrun.ts
@@ -1,25 +1,25 @@
import got from 'got/dist/source';
import {validateCloudRunUrl} from '../shared/validate-cloudrun-url';
-import type {GcpCodec} from '../shared/validate-gcp-codec';
-import {validateGcpCodec} from '../shared/validate-gcp-codec';
+import type {CloudrunCodec} from '../shared/validate-gcp-codec';
+import {validateCloudrunCodec} from '../shared/validate-gcp-codec';
import {validateServeUrl} from '../shared/validate-serveurl';
import {getAuthClientForUrl} from './helpers/get-auth-client-for-url';
import {parseCloudRunUrl} from './helpers/parse-cloud-run-url';
-export type RenderMediaOnGcpInput = {
+export type RenderMediaOnCloudrunInput = {
authenticatedRequest: boolean;
cloudRunUrl: string;
// serviceName?: string;
serveUrl: string;
composition: string;
inputProps?: unknown;
- codec: GcpCodec;
+ codec: CloudrunCodec;
outputBucket: string;
outputFile: string;
updateRenderProgress?: (progress: number) => void;
};
-export type RenderMediaOnGcpOutput = {
+export type RenderMediaOnCloudrunOutput = {
authenticatedRequest: boolean;
publicUrl: string;
cloudStorageUri: string;
@@ -31,7 +31,7 @@ export type RenderMediaOnGcpOutput = {
error: any;
};
-export type RenderMediaOnGcpErrOutput = {
+export type RenderMediaOnCloudrunErrOutput = {
message: string;
error: any;
status: string;
@@ -50,10 +50,10 @@ export type RenderMediaOnGcpErrOutput = {
* @param params.outputBucket The name of the GCP Storage Bucket that will store the rendered media output.
* @param params.outputFolderPath The folder path of the GCP Storage Bucket that will store the rendered media output.
* @param params.outName The file name of the rendered media output.
- * @returns {Promise<RenderMediaOnGcpOutput>} See documentation for detailed structure
+ * @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
*/
-export const renderMediaOnGcp = async ({
+export const renderMediaOnCloudrun = async ({
authenticatedRequest,
cloudRunUrl,
// serviceName,
@@ -64,8 +64,8 @@ export const renderMediaOnGcp = async ({
outputBucket,
outputFile,
updateRenderProgress,
-}: RenderMediaOnGcpInput): Promise<any> => {
- const actualCodec = validateGcpCodec(codec);
+}: RenderMediaOnCloudrunInput): Promise<any> => {
+ const actualCodec = validateCloudrunCodec(codec);
validateServeUrl(serveUrl);
validateCloudRunUrl(cloudRunUrl);
diff --git a/packages/gcp/src/api/render-still-on-gcp.ts b/packages/cloudrun/src/api/render-still-on-cloudrun.ts
similarity index 83%
rename from packages/gcp/src/api/render-still-on-gcp.ts
rename to packages/cloudrun/src/api/render-still-on-cloudrun.ts
index 165a47c453..8011820e90 100644
--- a/packages/gcp/src/api/render-still-on-gcp.ts
+++ b/packages/cloudrun/src/api/render-still-on-cloudrun.ts
@@ -4,7 +4,7 @@ import {validateServeUrl} from '../shared/validate-serveurl';
import {getAuthClientForUrl} from './helpers/get-auth-client-for-url';
import {parseCloudRunUrl} from './helpers/parse-cloud-run-url';
-export type RenderStillOnGcpInput = {
+export type RenderStillOnCloudrunInput = {
authenticatedRequest: boolean;
cloudRunUrl: string;
// serviceName?: string;
@@ -15,7 +15,7 @@ export type RenderStillOnGcpInput = {
outputFile: string;
};
-export type RenderStillOnGcpOutput = {
+export type RenderStillOnCloudrunOutput = {
publicUrl: string;
cloudStorageUri: string;
size: string;
@@ -26,7 +26,7 @@ export type RenderStillOnGcpOutput = {
error: any;
};
-export type RenderStillOnGcpErrOutput = {
+export type RenderStillOnCloudrunErrOutput = {
message: string;
error: any;
status: string;
@@ -34,7 +34,7 @@ export type RenderStillOnGcpErrOutput = {
/**
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
- * @see [Documentation](https://remotion.dev/docs/lambda/renderStillOnGcp)
+ * @see [Documentation](https://remotion.dev/docs/cloudrun/renderStillOnCloudrun)
* @param params.authenticatedRequest If this is an authenticated request, .env file will be checked for GCP credentials
* @param params.cloudRunUrl The url of the Cloud Run service that should be used
* @param params.serviceName The name of the Cloud Run service that should be used
@@ -44,10 +44,10 @@ export type RenderStillOnGcpErrOutput = {
* @param params.outputBucket The name of the GCP Storage Bucket that will store the rendered media output.
* @param params.outputFolderPath The folder path of the GCP Storage Bucket that will store the rendered media output.
* @param params.outName The file name of the rendered media output.
- * @returns {Promise<RenderStillOnGcpOutput>} See documentation for detailed structure
+ * @returns {Promise<RenderStillOnCloudrunOutput>} See documentation for detailed structure
*/
-export const renderStillOnGcp = async ({
+export const renderStillOnCloudrun = async ({
authenticatedRequest,
cloudRunUrl,
// serviceName,
@@ -56,8 +56,8 @@ export const renderStillOnGcp = async ({
inputProps,
outputBucket,
outputFile,
-}: RenderStillOnGcpInput): Promise<
- RenderStillOnGcpOutput | RenderStillOnGcpErrOutput
+}: RenderStillOnCloudrunInput): Promise<
+ RenderStillOnCloudrunOutput | RenderStillOnCloudrunErrOutput
> => {
validateServeUrl(serveUrl);
validateCloudRunUrl(cloudRunUrl);
@@ -84,7 +84,7 @@ export const renderStillOnGcp = async ({
method: 'POST',
data,
});
- return response.data as RenderStillOnGcpOutput;
+ return response.data as RenderStillOnCloudrunOutput;
} catch (e) {
return {
// TODO: How do we get the project ID?
@@ -95,7 +95,7 @@ export const renderStillOnGcp = async ({
}
} else {
try {
- const response: RenderStillOnGcpOutput = await got
+ const response: RenderStillOnCloudrunOutput = await got
.post(cloudRunUrl, {json: data})
.json();
return response;
diff --git a/packages/gcp/src/api/upload-dir.ts b/packages/cloudrun/src/api/upload-dir.ts
similarity index 100%
rename from packages/gcp/src/api/upload-dir.ts
rename to packages/cloudrun/src/api/upload-dir.ts
diff --git a/packages/gcp/src/cli/args.ts b/packages/cloudrun/src/cli/args.ts
similarity index 66%
rename from packages/gcp/src/cli/args.ts
rename to packages/cloudrun/src/cli/args.ts
index d724d1d8a1..122d225062 100644
--- a/packages/gcp/src/cli/args.ts
+++ b/packages/cloudrun/src/cli/args.ts
@@ -2,7 +2,7 @@ import {CliInternals} from '@remotion/cli';
import type {GcpRegion} from '../pricing/gcp-regions';
-type GCPCommandLineOptions = {
+type CloudrunCommandLineOptions = {
help: boolean;
region: GcpRegion;
['project-id']: string;
@@ -19,12 +19,13 @@ type GCPCommandLineOptions = {
['output-folder-path']: string;
};
-export const parsedGcpCli = CliInternals.minimist<GCPCommandLineOptions>(
- process.argv.slice(2),
- {
+export const parsedCloudrunCli =
+ CliInternals.minimist<CloudrunCommandLineOptions>(process.argv.slice(2), {
boolean: CliInternals.BooleanFlags,
- }
-);
+ });
export const forceFlagProvided =
- parsedGcpCli.f || parsedGcpCli.force || parsedGcpCli.yes || parsedGcpCli.y;
+ parsedCloudrunCli.f ||
+ parsedCloudrunCli.force ||
+ parsedCloudrunCli.yes ||
+ parsedCloudrunCli.y;
diff --git a/packages/gcp/src/cli/commands/compositions/index.ts b/packages/cloudrun/src/cli/commands/compositions/index.ts
similarity index 100%
rename from packages/gcp/src/cli/commands/compositions/index.ts
rename to packages/cloudrun/src/cli/commands/compositions/index.ts
diff --git a/packages/gcp/src/cli/commands/permissions/index.ts b/packages/cloudrun/src/cli/commands/permissions/index.ts
similarity index 94%
rename from packages/gcp/src/cli/commands/permissions/index.ts
rename to packages/cloudrun/src/cli/commands/permissions/index.ts
index 2e4e48dfc2..6305208f43 100644
--- a/packages/gcp/src/cli/commands/permissions/index.ts
+++ b/packages/cloudrun/src/cli/commands/permissions/index.ts
@@ -30,7 +30,7 @@ const printPoliciesHelp = () => {
Log.info(`${BINARY_NAME} ${POLICIES_COMMAND} ${VALIDATE_SUBCOMMAND}`);
Log.info(
CliInternals.chalk.gray(
- 'Validate the current permissions on the service account are correct in GCP.'
+ 'Validate that the current permissions on the service account are correct in GCP.'
)
);
};
diff --git a/packages/gcp/src/cli/commands/permissions/validate.ts b/packages/cloudrun/src/cli/commands/permissions/validate.ts
similarity index 100%
rename from packages/gcp/src/cli/commands/permissions/validate.ts
rename to packages/cloudrun/src/cli/commands/permissions/validate.ts
diff --git a/packages/gcp/src/cli/commands/regions.ts b/packages/cloudrun/src/cli/commands/regions.ts
similarity index 100%
rename from packages/gcp/src/cli/commands/regions.ts
rename to packages/cloudrun/src/cli/commands/regions.ts
diff --git a/packages/gcp/src/cli/commands/render/helpers/renderArgsCheck.ts b/packages/cloudrun/src/cli/commands/render/helpers/renderArgsCheck.ts
similarity index 85%
rename from packages/gcp/src/cli/commands/render/helpers/renderArgsCheck.ts
rename to packages/cloudrun/src/cli/commands/render/helpers/renderArgsCheck.ts
index 0e7fc5a03e..b4dfa0f749 100644
--- a/packages/gcp/src/cli/commands/render/helpers/renderArgsCheck.ts
+++ b/packages/cloudrun/src/cli/commands/render/helpers/renderArgsCheck.ts
@@ -3,7 +3,7 @@ import {getCompositions} from '@remotion/renderer';
import {getOrCreateBucket} from '../../../../api/get-or-create-bucket';
import {BINARY_NAME} from '../../../../shared/constants';
import {validateServeUrl} from '../../../../shared/validate-serveurl';
-import {parsedGcpCli} from '../../../args';
+import {parsedCloudrunCli} from '../../../args';
import {getGcpRegion} from '../../../get-gcp-region';
import {quit} from '../../../helpers/quit';
import {Log} from '../../../log';
@@ -54,7 +54,9 @@ export const renderArgsCheck = async (
}
const outName =
- parsedGcpCli['out-name'] ?? subcommand === 'still' ? 'out.png' : 'out.mp4'; // Todo, workout file extension instead of assuming mp4
+ parsedCloudrunCli['out-name'] ?? subcommand === 'still'
+ ? 'out.png'
+ : 'out.mp4'; // Todo, workout file extension instead of assuming mp4
const downloadName = args[2] ?? null;
const {codec} = CliInternals.getFinalCodec({
@@ -67,13 +69,13 @@ export const renderArgsCheck = async (
isLambda: true, // TODO: what do I need to do with this?
remotionRoot,
});
- // const maxRetries = parsedGcpCli['max-retries'] ?? DEFAULT_MAX_RETRIES;
+ // const maxRetries = parsedCloudrunCli['max-retries'] ?? DEFAULT_MAX_RETRIES;
// validateMaxRetries(maxRetries);
// const privacy = parsedLambdaCli.privacy ?? DEFAULT_OUTPUT_PRIVACY;
// validatePrivacy(privacy);
- let outputBucket = parsedGcpCli['output-bucket'];
+ let outputBucket = parsedCloudrunCli['output-bucket'];
if (!outputBucket) {
const {bucketName} = await getOrCreateBucket({
region: getGcpRegion(),
@@ -81,7 +83,7 @@ export const renderArgsCheck = async (
outputBucket = bucketName;
}
- const authenticatedRequest = !parsedGcpCli['unauthenticated-request'];
+ const authenticatedRequest = !parsedCloudrunCli['unauthenticated-request'];
return {
serveUrl,
diff --git a/packages/gcp/src/cli/commands/render/index.ts b/packages/cloudrun/src/cli/commands/render/index.ts
similarity index 100%
rename from packages/gcp/src/cli/commands/render/index.ts
rename to packages/cloudrun/src/cli/commands/render/index.ts
diff --git a/packages/gcp/src/cli/commands/render/renderMedia.ts b/packages/cloudrun/src/cli/commands/render/renderMedia.ts
similarity index 84%
rename from packages/gcp/src/cli/commands/render/renderMedia.ts
rename to packages/cloudrun/src/cli/commands/render/renderMedia.ts
index 5e468e775d..0a5c368710 100644
--- a/packages/gcp/src/cli/commands/render/renderMedia.ts
+++ b/packages/cloudrun/src/cli/commands/render/renderMedia.ts
@@ -1,10 +1,10 @@
import {CliInternals} from '@remotion/cli';
import type {
- RenderMediaOnGcpErrOutput,
- RenderMediaOnGcpOutput,
-} from '../../../api/render-media-on-gcp';
-import {renderMediaOnGcp} from '../../../api/render-media-on-gcp';
-import type {GcpCodec} from '../../../shared/validate-gcp-codec';
+ RenderMediaOnCloudrunErrOutput,
+ RenderMediaOnCloudrunOutput,
+} from '../../../api/render-media-on-cloudrun';
+import {renderMediaOnCloudrun} from '../../../api/render-media-on-cloudrun';
+import type {CloudrunCodec} from '../../../shared/validate-gcp-codec';
// import {validateMaxRetries} from '../../../shared/validate-retries';
import {Log} from '../../log';
import {renderArgsCheck} from './helpers/renderArgsCheck';
@@ -74,28 +74,28 @@ Sending request to Cloud Run:
updateProgress();
};
- const res = await renderMediaOnGcp({
+ const res = await renderMediaOnCloudrun({
authenticatedRequest,
cloudRunUrl,
// serviceName,
serveUrl,
composition,
inputProps,
- codec: codec as GcpCodec,
+ codec: codec as CloudrunCodec,
outputBucket,
outputFile: outName,
updateRenderProgress,
});
if (res.status === 'error') {
- const err = res as RenderMediaOnGcpErrOutput;
+ const err = res as RenderMediaOnCloudrunErrOutput;
Log.error(CliInternals.chalk.red(err.message));
throw err.error;
} else {
renderProgress.doneIn = Date.now() - renderStart;
updateProgress();
- const success = res as RenderMediaOnGcpOutput;
+ const success = res as RenderMediaOnCloudrunOutput;
Log.info(`
`);
diff --git a/packages/gcp/src/cli/commands/render/renderStill.ts b/packages/cloudrun/src/cli/commands/render/renderStill.ts
similarity index 85%
rename from packages/gcp/src/cli/commands/render/renderStill.ts
rename to packages/cloudrun/src/cli/commands/render/renderStill.ts
index b09bee3655..9993ad82d7 100644
--- a/packages/gcp/src/cli/commands/render/renderStill.ts
+++ b/packages/cloudrun/src/cli/commands/render/renderStill.ts
@@ -1,9 +1,9 @@
import {CliInternals} from '@remotion/cli';
import type {
- RenderStillOnGcpErrOutput,
- RenderStillOnGcpOutput,
-} from '../../../api/render-still-on-gcp';
-import {renderStillOnGcp} from '../../../api/render-still-on-gcp';
+ RenderStillOnCloudrunErrOutput,
+ RenderStillOnCloudrunOutput,
+} from '../../../api/render-still-on-cloudrun';
+import {renderStillOnCloudrun} from '../../../api/render-still-on-cloudrun';
// import {validateMaxRetries} from '../../../shared/validate-retries';
import {Log} from '../../log';
import {renderArgsCheck} from './helpers/renderArgsCheck';
@@ -59,7 +59,7 @@ Sending request to Cloud Run:
);
};
- const res = await renderStillOnGcp({
+ const res = await renderStillOnCloudrun({
authenticatedRequest,
cloudRunUrl,
// serviceName,
@@ -71,14 +71,14 @@ Sending request to Cloud Run:
});
if (res.status === 'error') {
- const err = res as RenderStillOnGcpErrOutput;
+ const err = res as RenderStillOnCloudrunErrOutput;
Log.error(CliInternals.chalk.red(err.message));
throw err.error;
} else {
doneIn = Date.now() - renderStart;
updateProgress();
- const success = res as RenderStillOnGcpOutput;
+ const success = res as RenderStillOnCloudrunOutput;
Log.info(`
`);
diff --git a/packages/gcp/src/cli/commands/cloud-run/deploy.ts b/packages/cloudrun/src/cli/commands/services/deploy.ts
similarity index 94%
rename from packages/gcp/src/cli/commands/cloud-run/deploy.ts
rename to packages/cloudrun/src/cli/commands/services/deploy.ts
index a406ce92ab..fc07dd758d 100644
--- a/packages/gcp/src/cli/commands/cloud-run/deploy.ts
+++ b/packages/cloudrun/src/cli/commands/services/deploy.ts
@@ -9,7 +9,7 @@ import {validateGcpRegion} from '../../../shared/validate-gcp-region';
import {validateOverwrite} from '../../../shared/validate-overwrite';
import {validateRemotionVersion} from '../../../shared/validate-remotion-version';
import {validateServiceName} from '../../../shared/validate-service-name';
-import {parsedGcpCli} from '../../args';
+import {parsedCloudrunCli} from '../../args';
import {getGcpRegion} from '../../get-gcp-region';
import {confirmCli} from '../../helpers/confirm';
import {quit} from '../../helpers/quit';
@@ -18,13 +18,14 @@ export const CLOUD_RUN_DEPLOY_SUBCOMMAND = 'deploy';
export const cloudRunDeploySubcommand = async () => {
const region = getGcpRegion();
- const serviceName = parsedGcpCli['service-name'];
+ const serviceName = parsedCloudrunCli['service-name'];
const projectID = process.env.REMOTION_GCP_PROJECT_ID as string;
const remotionVersion = VERSION;
- const allowUnauthenticated = parsedGcpCli['allow-unauthenticated'] ?? false;
- const overwriteService = parsedGcpCli['overwrite-service'] ?? false;
- const memory = parsedGcpCli.memory ?? '512Mi';
- const cpu = parsedGcpCli.cpu ?? '1.0';
+ const allowUnauthenticated =
+ parsedCloudrunCli['allow-unauthenticated'] ?? false;
+ const overwriteService = parsedCloudrunCli['overwrite-service'] ?? false;
+ const memory = parsedCloudrunCli.memory ?? '512Mi';
+ const cpu = parsedCloudrunCli.cpu ?? '1.0';
if (!CliInternals.quietFlagProvided()) {
Log.info(
diff --git a/packages/gcp/src/cli/commands/cloud-run/index.ts b/packages/cloudrun/src/cli/commands/services/index.ts
similarity index 95%
rename from packages/gcp/src/cli/commands/cloud-run/index.ts
rename to packages/cloudrun/src/cli/commands/services/index.ts
index 0813ed1a14..9dc6e055e9 100644
--- a/packages/gcp/src/cli/commands/cloud-run/index.ts
+++ b/packages/cloudrun/src/cli/commands/services/index.ts
@@ -4,7 +4,7 @@ import {BINARY_NAME} from '../../../shared/constants';
import {quit} from '../../helpers/quit';
import {cloudRunDeploySubcommand, CLOUD_RUN_DEPLOY_SUBCOMMAND} from './deploy';
-export const CLOUD_RUN_COMMAND = 'cloud-run';
+export const CLOUD_RUN_COMMAND = 'service';
const printCloudRunHelp = () => {
Log.info(`${BINARY_NAME} ${CLOUD_RUN_COMMAND} <subcommand>`);
diff --git a/packages/gcp/src/cli/commands/sites/create.ts b/packages/cloudrun/src/cli/commands/sites/create.ts
similarity index 95%
rename from packages/gcp/src/cli/commands/sites/create.ts
rename to packages/cloudrun/src/cli/commands/sites/create.ts
index 6a903e301d..2078a42ff3 100644
--- a/packages/gcp/src/cli/commands/sites/create.ts
+++ b/packages/cloudrun/src/cli/commands/sites/create.ts
@@ -5,7 +5,7 @@ import {deploySite} from '../../../api/deploy-site';
import {getOrCreateBucket} from '../../../api/get-or-create-bucket';
import {BINARY_NAME} from '../../../shared/constants';
import {validateSiteName} from '../../../shared/validate-site-name';
-import {parsedGcpCli} from '../../args';
+import {parsedCloudrunCli} from '../../args';
import {getGcpRegion} from '../../get-gcp-region';
import type {
BucketCreationProgress,
@@ -54,7 +54,7 @@ export const sitesCreateSubcommand = async (
quit(1);
}
- const desiredSiteName = parsedGcpCli['site-name'] ?? undefined;
+ const desiredSiteName = parsedCloudrunCli['site-name'] ?? undefined;
if (desiredSiteName !== undefined) {
validateSiteName(desiredSiteName);
}
@@ -166,7 +166,7 @@ export const sitesCreateSubcommand = async (
);
Log.info(
CliInternals.chalk.blueBright(
- ['npx remotion gcp sites create', args[0], `--site-name=${siteName}`]
+ ['npx remotion cloudrun sites create', args[0], `--site-name=${siteName}`]
.filter(Internals.truthy)
.join(' ')
)
diff --git a/packages/gcp/src/cli/commands/sites/index.ts b/packages/cloudrun/src/cli/commands/sites/index.ts
similarity index 100%
rename from packages/gcp/src/cli/commands/sites/index.ts
rename to packages/cloudrun/src/cli/commands/sites/index.ts
diff --git a/packages/gcp/src/cli/get-gcp-region.ts b/packages/cloudrun/src/cli/get-gcp-region.ts
similarity index 61%
rename from packages/gcp/src/cli/get-gcp-region.ts
rename to packages/cloudrun/src/cli/get-gcp-region.ts
index dbcbdcc8dd..4fb562664d 100644
--- a/packages/gcp/src/cli/get-gcp-region.ts
+++ b/packages/cloudrun/src/cli/get-gcp-region.ts
@@ -1,12 +1,12 @@
import type {GcpRegion} from '../pricing/gcp-regions';
import {DEFAULT_REGION} from '../shared/constants';
import {validateGcpRegion} from '../shared/validate-gcp-region';
-import {parsedGcpCli} from './args';
+import {parsedCloudrunCli} from './args';
export const getGcpRegion = (): GcpRegion => {
- if (parsedGcpCli.region) {
- validateGcpRegion(parsedGcpCli.region);
- return parsedGcpCli.region;
+ if (parsedCloudrunCli.region) {
+ validateGcpRegion(parsedCloudrunCli.region);
+ return parsedCloudrunCli.region;
}
return DEFAULT_REGION;
diff --git a/packages/gcp/src/cli/help.ts b/packages/cloudrun/src/cli/help.ts
similarity index 88%
rename from packages/gcp/src/cli/help.ts
rename to packages/cloudrun/src/cli/help.ts
index dbcda9b03e..06f7d3e662 100644
--- a/packages/gcp/src/cli/help.ts
+++ b/packages/cloudrun/src/cli/help.ts
@@ -1,6 +1,6 @@
import {CliInternals} from '@remotion/cli';
import {BINARY_NAME} from '../shared/constants';
-import {CLOUD_RUN_COMMAND} from './commands/cloud-run';
+import {CLOUD_RUN_COMMAND} from './commands/services';
import {SITES_COMMAND} from './commands/sites';
import {Log} from './log';
@@ -25,7 +25,7 @@ export const printHelp = () => {
Log.info();
Log.info(`${BINARY_NAME} ${CLOUD_RUN_COMMAND}`);
Log.info(
- CliInternals.chalk.gray('Deploy and manage GCP Cloud Run services.')
+ CliInternals.chalk.gray('Deploy and manage Cloud Run services on GCP.')
);
Log.info();
diff --git a/packages/gcp/src/cli/helpers/confirm.ts b/packages/cloudrun/src/cli/helpers/confirm.ts
similarity index 100%
rename from packages/gcp/src/cli/helpers/confirm.ts
rename to packages/cloudrun/src/cli/helpers/confirm.ts
diff --git a/packages/gcp/src/cli/helpers/progress-bar.ts b/packages/cloudrun/src/cli/helpers/progress-bar.ts
similarity index 100%
rename from packages/gcp/src/cli/helpers/progress-bar.ts
rename to packages/cloudrun/src/cli/helpers/progress-bar.ts
diff --git a/packages/gcp/src/cli/helpers/quit.ts b/packages/cloudrun/src/cli/helpers/quit.ts
similarity index 100%
rename from packages/gcp/src/cli/helpers/quit.ts
rename to packages/cloudrun/src/cli/helpers/quit.ts
diff --git a/packages/gcp/src/cli/helpers/yes-or-no.ts b/packages/cloudrun/src/cli/helpers/yes-or-no.ts
similarity index 100%
rename from packages/gcp/src/cli/helpers/yes-or-no.ts
rename to packages/cloudrun/src/cli/helpers/yes-or-no.ts
diff --git a/packages/gcp/src/cli/index.ts b/packages/cloudrun/src/cli/index.ts
similarity index 86%
rename from packages/gcp/src/cli/index.ts
rename to packages/cloudrun/src/cli/index.ts
index c0c54e6dca..4963cfe609 100644
--- a/packages/gcp/src/cli/index.ts
+++ b/packages/cloudrun/src/cli/index.ts
@@ -1,5 +1,4 @@
-import {parsedGcpCli} from './args';
-import {cloudRunCommand, CLOUD_RUN_COMMAND} from './commands/cloud-run';
+import {parsedCloudrunCli} from './args';
import {
compositionsCommand,
COMPOSITIONS_COMMAND,
@@ -7,13 +6,14 @@ import {
import {policiesCommand, POLICIES_COMMAND} from './commands/permissions';
import {regionsCommand, REGIONS_COMMAND} from './commands/regions';
import {renderCommand, RENDER_COMMAND} from './commands/render';
+import {cloudRunCommand, CLOUD_RUN_COMMAND} from './commands/services';
import {sitesCommand, SITES_COMMAND} from './commands/sites';
import {printHelp} from './help';
import {quit} from './helpers/quit';
import {Log} from './log';
const matchCommand = (args: string[], remotionRoot: string) => {
- if (parsedGcpCli.help || args.length === 0 || args[0] === 'help') {
+ if (parsedCloudrunCli.help || args.length === 0 || args[0] === 'help') {
printHelp();
quit(0);
}
@@ -44,7 +44,7 @@ const matchCommand = (args: string[], remotionRoot: string) => {
if (args[0] === 'deploy') {
Log.info(`The "deploy" command does not exist.`);
- Log.info(`Did you mean "cloud-run deploy"?`);
+ Log.info(`Did you mean "service deploy"?`);
}
Log.error(`Command ${args[0]} not found.`);
diff --git a/packages/gcp/src/cli/log.ts b/packages/cloudrun/src/cli/log.ts
similarity index 100%
rename from packages/gcp/src/cli/log.ts
rename to packages/cloudrun/src/cli/log.ts
diff --git a/packages/gcp/src/client.ts b/packages/cloudrun/src/client.ts
similarity index 100%
rename from packages/gcp/src/client.ts
rename to packages/cloudrun/src/client.ts
diff --git a/packages/gcp/src/functions/helpers/get-composition-from-body.ts b/packages/cloudrun/src/functions/helpers/get-composition-from-body.ts
similarity index 100%
rename from packages/gcp/src/functions/helpers/get-composition-from-body.ts
rename to packages/cloudrun/src/functions/helpers/get-composition-from-body.ts
diff --git a/packages/gcp/src/functions/helpers/io.ts b/packages/cloudrun/src/functions/helpers/io.ts
similarity index 72%
rename from packages/gcp/src/functions/helpers/io.ts
rename to packages/cloudrun/src/functions/helpers/io.ts
index 5b30265f37..a5ccb23081 100644
--- a/packages/gcp/src/functions/helpers/io.ts
+++ b/packages/cloudrun/src/functions/helpers/io.ts
@@ -1,16 +1,16 @@
import type {File} from '@google-cloud/storage';
import {getCloudStorageClient} from '../../api/helpers/get-cloud-storage-client';
-export type GcpLSInput = {
+export type CloudrunLSInput = {
bucketName: string;
prefix: string;
};
-export type GcpLsReturnType = Promise<File[]>;
+export type CloudrunLsReturnType = Promise<File[]>;
-export const gcpLs = async ({
+export const cloudrunLs = async ({
bucketName,
prefix,
-}: GcpLSInput): GcpLsReturnType => {
+}: CloudrunLSInput): CloudrunLsReturnType => {
const cloudStorageClient = getCloudStorageClient();
const [files] = await cloudStorageClient
.bucket(bucketName)
@@ -18,7 +18,7 @@ export const gcpLs = async ({
return files;
};
-export const gcpDeleteFile = async ({
+export const cloudrunDeleteFile = async ({
bucketName,
key,
}: {
diff --git a/packages/gcp/src/functions/index.ts b/packages/cloudrun/src/functions/index.ts
similarity index 100%
rename from packages/gcp/src/functions/index.ts
rename to packages/cloudrun/src/functions/index.ts
diff --git a/packages/gcp/src/functions/render-media-single-thread.ts b/packages/cloudrun/src/functions/render-media-single-thread.ts
similarity index 100%
rename from packages/gcp/src/functions/render-media-single-thread.ts
rename to packages/cloudrun/src/functions/render-media-single-thread.ts
diff --git a/packages/gcp/src/functions/render-still-single-thread.ts b/packages/cloudrun/src/functions/render-still-single-thread.ts
similarity index 100%
rename from packages/gcp/src/functions/render-still-single-thread.ts
rename to packages/cloudrun/src/functions/render-still-single-thread.ts
diff --git a/packages/cloudrun/src/index.ts b/packages/cloudrun/src/index.ts
new file mode 100644
index 0000000000..50eb59aad0
--- /dev/null
+++ b/packages/cloudrun/src/index.ts
@@ -0,0 +1,3 @@
+import {CloudrunInternals} from './internals';
+
+export {CloudrunInternals};
diff --git a/packages/gcp/src/internals.ts b/packages/cloudrun/src/internals.ts
similarity index 64%
rename from packages/gcp/src/internals.ts
rename to packages/cloudrun/src/internals.ts
index 4d1b466212..048bf33c32 100644
--- a/packages/gcp/src/internals.ts
+++ b/packages/cloudrun/src/internals.ts
@@ -1,4 +1,4 @@
import {executeCommand} from './cli/index';
-export const GCPInternals = {
+export const CloudrunInternals = {
executeCommand,
};
diff --git a/packages/gcp/src/pricing/gcp-regions.ts b/packages/cloudrun/src/pricing/gcp-regions.ts
similarity index 100%
rename from packages/gcp/src/pricing/gcp-regions.ts
rename to packages/cloudrun/src/pricing/gcp-regions.ts
diff --git a/packages/gcp/src/regions.ts b/packages/cloudrun/src/regions.ts
similarity index 100%
rename from packages/gcp/src/regions.ts
rename to packages/cloudrun/src/regions.ts
diff --git a/packages/gcp/src/shared/bundle-site.ts b/packages/cloudrun/src/shared/bundle-site.ts
similarity index 100%
rename from packages/gcp/src/shared/bundle-site.ts
rename to packages/cloudrun/src/shared/bundle-site.ts
diff --git a/packages/gcp/src/shared/constants.ts b/packages/cloudrun/src/shared/constants.ts
similarity index 88%
rename from packages/gcp/src/shared/constants.ts
rename to packages/cloudrun/src/shared/constants.ts
index 79d8189c66..67e1ca4443 100644
--- a/packages/gcp/src/shared/constants.ts
+++ b/packages/cloudrun/src/shared/constants.ts
@@ -1,7 +1,7 @@
import type {GcpRegion} from '../pricing/gcp-regions';
export const DEFAULT_REGION: GcpRegion = 'us-east1';
-export const BINARY_NAME = 'remotion gcp';
+export const BINARY_NAME = 'remotion cloudrun';
export const REMOTION_BUCKET_PREFIX = 'remotioncloudrun-';
diff --git a/packages/gcp/src/shared/get-etag.ts b/packages/cloudrun/src/shared/get-etag.ts
similarity index 100%
rename from packages/gcp/src/shared/get-etag.ts
rename to packages/cloudrun/src/shared/get-etag.ts
diff --git a/packages/gcp/src/shared/get-storage-operations.ts b/packages/cloudrun/src/shared/get-storage-operations.ts
similarity index 100%
rename from packages/gcp/src/shared/get-storage-operations.ts
rename to packages/cloudrun/src/shared/get-storage-operations.ts
diff --git a/packages/gcp/src/shared/make-storage-key.ts b/packages/cloudrun/src/shared/make-storage-key.ts
similarity index 100%
rename from packages/gcp/src/shared/make-storage-key.ts
rename to packages/cloudrun/src/shared/make-storage-key.ts
diff --git a/packages/gcp/src/shared/make-storage-url.ts b/packages/cloudrun/src/shared/make-storage-url.ts
similarity index 100%
rename from packages/gcp/src/shared/make-storage-url.ts
rename to packages/cloudrun/src/shared/make-storage-url.ts
diff --git a/packages/gcp/src/shared/random-hash.ts b/packages/cloudrun/src/shared/random-hash.ts
similarity index 100%
rename from packages/gcp/src/shared/random-hash.ts
rename to packages/cloudrun/src/shared/random-hash.ts
diff --git a/packages/gcp/src/shared/read-dir.ts b/packages/cloudrun/src/shared/read-dir.ts
similarity index 100%
rename from packages/gcp/src/shared/read-dir.ts
rename to packages/cloudrun/src/shared/read-dir.ts
diff --git a/packages/gcp/src/shared/sa-permissions.json b/packages/cloudrun/src/shared/sa-permissions.json
similarity index 100%
rename from packages/gcp/src/shared/sa-permissions.json
rename to packages/cloudrun/src/shared/sa-permissions.json
diff --git a/packages/gcp/src/shared/validate-bucketname.ts b/packages/cloudrun/src/shared/validate-bucketname.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-bucketname.ts
rename to packages/cloudrun/src/shared/validate-bucketname.ts
diff --git a/packages/gcp/src/shared/validate-cloudrun-url.ts b/packages/cloudrun/src/shared/validate-cloudrun-url.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-cloudrun-url.ts
rename to packages/cloudrun/src/shared/validate-cloudrun-url.ts
diff --git a/packages/gcp/src/shared/validate-gcp-codec.ts b/packages/cloudrun/src/shared/validate-gcp-codec.ts
similarity index 51%
rename from packages/gcp/src/shared/validate-gcp-codec.ts
rename to packages/cloudrun/src/shared/validate-gcp-codec.ts
index e5b4e328ed..57661c9f17 100644
--- a/packages/gcp/src/shared/validate-gcp-codec.ts
+++ b/packages/cloudrun/src/shared/validate-gcp-codec.ts
@@ -1,4 +1,4 @@
-const gcpCodecs = [
+const cloudrunCodecs = [
'h264',
'vp8',
'vp9',
@@ -9,29 +9,29 @@ const gcpCodecs = [
'prores',
] as const;
-export type GcpCodec = typeof gcpCodecs[number];
+export type CloudrunCodec = typeof cloudrunCodecs[number];
-export const validateGcpCodec = (codec: unknown): GcpCodec => {
+export const validateCloudrunCodec = (codec: unknown): CloudrunCodec => {
if (typeof codec !== 'string') {
throw new TypeError('"codec" must be a string ');
}
- if (!(gcpCodecs as readonly string[]).includes(codec)) {
+ if (!(cloudrunCodecs as readonly string[]).includes(codec)) {
throw new TypeError(
"'" +
codec +
"' is not a valid codec for GCP Cloud Run. The following values are supported: " +
- gcpCodecs.join(', ')
+ cloudrunCodecs.join(', ')
);
}
if ((codec as string) === 'h264-mkv') {
console.warn(
- 'The "h264-mkv" codec for renderMediaOnGcp() is deprecated - it\'s now just "h264".'
+ 'The "h264-mkv" codec for renderMediaOnCloudrun() is deprecated - it\'s now just "h264".'
);
return 'h264';
}
- return codec as GcpCodec;
+ return codec as CloudrunCodec;
};
diff --git a/packages/gcp/src/shared/validate-gcp-region.ts b/packages/cloudrun/src/shared/validate-gcp-region.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-gcp-region.ts
rename to packages/cloudrun/src/shared/validate-gcp-region.ts
diff --git a/packages/gcp/src/shared/validate-overwrite.ts b/packages/cloudrun/src/shared/validate-overwrite.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-overwrite.ts
rename to packages/cloudrun/src/shared/validate-overwrite.ts
diff --git a/packages/gcp/src/shared/validate-project-id.ts b/packages/cloudrun/src/shared/validate-project-id.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-project-id.ts
rename to packages/cloudrun/src/shared/validate-project-id.ts
diff --git a/packages/gcp/src/shared/validate-remotion-version.ts b/packages/cloudrun/src/shared/validate-remotion-version.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-remotion-version.ts
rename to packages/cloudrun/src/shared/validate-remotion-version.ts
diff --git a/packages/gcp/src/shared/validate-retries.ts b/packages/cloudrun/src/shared/validate-retries.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-retries.ts
rename to packages/cloudrun/src/shared/validate-retries.ts
diff --git a/packages/gcp/src/shared/validate-serveurl.ts b/packages/cloudrun/src/shared/validate-serveurl.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-serveurl.ts
rename to packages/cloudrun/src/shared/validate-serveurl.ts
diff --git a/packages/gcp/src/shared/validate-service-name.ts b/packages/cloudrun/src/shared/validate-service-name.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-service-name.ts
rename to packages/cloudrun/src/shared/validate-service-name.ts
diff --git a/packages/gcp/src/shared/validate-site-name.ts b/packages/cloudrun/src/shared/validate-site-name.ts
similarity index 100%
rename from packages/gcp/src/shared/validate-site-name.ts
rename to packages/cloudrun/src/shared/validate-site-name.ts
diff --git a/packages/gcp/src/test/parse-cloud-run.test.ts b/packages/cloudrun/src/test/parse-cloud-run.test.ts
similarity index 100%
rename from packages/gcp/src/test/parse-cloud-run.test.ts
rename to packages/cloudrun/src/test/parse-cloud-run.test.ts
diff --git a/packages/gcp/terraform/main.tf b/packages/cloudrun/terraform/main.tf
similarity index 78%
rename from packages/gcp/terraform/main.tf
rename to packages/cloudrun/terraform/main.tf
index 140914b198..9a376a4264 100644
--- a/packages/gcp/terraform/main.tf
+++ b/packages/cloudrun/terraform/main.tf
@@ -14,6 +14,11 @@ variable "project_id" {
description = "The ID of the project in which the resources will be created."
}
+variable "remotion_version" {
+ type = string
+ description = "The version of Remotion being deployed."
+}
+
provider "google" {
project = var.project_id
@@ -21,8 +26,13 @@ provider "google" {
zone = "us-central1-c"
}
+data "http" "permissions" {
+ url = "https://storage.googleapis.com/remotion-sa/${var.remotion_version}/sa-permissions.json"
+}
+
locals {
- permissions = jsondecode(file("${path.module}/../src/shared/sa-permissions.json"))
+ # permissions = jsondecode(file("${path.module}/../src/shared/sa-permissions.json"))
+ cloudrun-permissions = jsondecode(data.http.permissions.body)
}
# Create an IAM role
@@ -30,7 +40,7 @@ resource "google_project_iam_custom_role" "remotion_sa" {
role_id = "RemotionSA"
title = "Remotion API Service Account"
description = "Allow the service account to manage necessary resources for Remotion Cloud Run rendering."
- permissions = local.permissions.list
+ permissions = local.cloudrun-permissions.list
}
# Create a service account
diff --git a/packages/gcp/terraform/readme.md b/packages/cloudrun/terraform/readme.md
similarity index 100%
rename from packages/gcp/terraform/readme.md
rename to packages/cloudrun/terraform/readme.md
diff --git a/packages/gcp/tsconfig.json b/packages/cloudrun/tsconfig.json
similarity index 100%
rename from packages/gcp/tsconfig.json
rename to packages/cloudrun/tsconfig.json
diff --git a/packages/gcp/vitest.config.ts b/packages/cloudrun/vitest.config.ts
similarity index 100%
rename from packages/gcp/vitest.config.ts
rename to packages/cloudrun/vitest.config.ts
diff --git a/packages/gcp/zoomJump.mp4 b/packages/cloudrun/zoomJump.mp4
similarity index 100%
rename from packages/gcp/zoomJump.mp4
rename to packages/cloudrun/zoomJump.mp4
diff --git a/packages/docs/components/TableOfContents/api.tsx b/packages/docs/components/TableOfContents/api.tsx
index eb2aa5ee41..1ed43ad97e 100644
--- a/packages/docs/components/TableOfContents/api.tsx
+++ b/packages/docs/components/TableOfContents/api.tsx
@@ -40,8 +40,8 @@ export const TableOfContents: React.FC = () => {
<strong>@remotion/lambda</strong>
<div>Render videos and stills on AWS Lambda</div>
</TOCItem>
- <TOCItem link="/docs/gcp">
- <strong>@remotion/gcp</strong>
+ <TOCItem link="/docs/cloudrun">
+ <strong>@remotion/cloudrun</strong>
<div>Render videos and stills on GCP Cloud Run</div>
</TOCItem>
<TOCItem link="/docs/gif">
diff --git a/packages/docs/components/gcp/regions.tsx b/packages/docs/components/gcp/regions.tsx
index bcd4c105c2..838375ac10 100644
--- a/packages/docs/components/gcp/regions.tsx
+++ b/packages/docs/components/gcp/regions.tsx
@@ -1,4 +1,4 @@
-import { GCP_REGIONS } from "@remotion/gcp/regions";
+import { GCP_REGIONS } from "@remotion/cloudrun/regions";
import React from "react";
export const GcpRegionList: React.FC = () => {
diff --git a/packages/docs/docs/gcp.md b/packages/docs/docs/gcp.md
index 687083b0dc..4ed856b3be 100644
--- a/packages/docs/docs/gcp.md
+++ b/packages/docs/docs/gcp.md
@@ -1,17 +1,17 @@
---
image: /generated/articles-docs-lambda.png
-id: gcp
+id: cloudrun
sidebar_label: Overview
-title: "@remotion/gcp"
+title: "@remotion/cloudrun"
---
Render Remotion videos on [GCP Cloud Run](https://cloud.google.com/run).
-import {GcpRegionList} from '../components/gcp/regions.tsx';
+import {GcpRegionList} from '../components/cloudrun/regions.tsx';
## When should I use it?
-- You are fine with using Google Cloud Platform in one of the [supported regions](/docs/gcp/region-selection).
+- You are fine with using Google Cloud Platform in one of the [supported regions](/docs/cloudrun/region-selection).
If one of those constraints is a dealbreaker for you, resort to normal [server-side rendering](/docs/ssr).
@@ -33,12 +33,12 @@ If one of those constraints is a dealbreaker for you, resort to normal [server-s
- **Cloud Run service**: Contains the required libraries and binaries for rendering Remotion projects, and is available for invoking behind a URL.
- **Cloud Storage bucket**: Stores the projects, the renders, and render metadata.
-- **CLI**: Allows control of the overall architecture from the command line. Is installed by adding `@remotion/gcp` to a project.
+- **CLI**: Allows control of the overall architecture from the command line. Is installed by adding `@remotion/cloudrun` to a project.
- **Node.JS API**: Has the same features as the CLI but is easier to use programmatically.
## Setup / Installation
-[**See here**](/docs/gcp/setup)
+[**See here**](/docs/cloudrun/setup)
## Region selection
@@ -46,7 +46,7 @@ The following regions are available for Remotion Cloud Run:
<GcpRegionList />
-[**See here for configurations and considerations.**](/docs/gcp/region-selection)
+[**See here for configurations and considerations.**](/docs/cloudrun/region-selection)
## Limitations
@@ -62,17 +62,17 @@ Most of our users render multiple minutes of video for just a few pennies. The e
Remotion Cloud Run requires you to create a GCP project and create a Service Account with some permissions attached to it. We require only the minimal amount of permissions required for operating Remotion Cloud Run.
-[**Read more about permissions**](/docs/gcp/permissions)
+[**Read more about permissions**](/docs/cloudrun/permissions)
## CLI
-You can control Remotion Cloud Run using the `npx remotion gcp` command.
+You can control Remotion Cloud Run using the `npx remotion cloudrun` command.
-[**Read more about the CLI**](/docs/gcp/cli)
+[**Read more about the CLI**](/docs/cloudrun/cli)
## Node.JS API
-Everything you can do using the CLI, you can also control using Node.JS APIs. See the reference [here](/docs/gcp/api).
+Everything you can do using the CLI, you can also control using Node.JS APIs. See the reference [here](/docs/cloudrun/api).
## License
@@ -84,4 +84,4 @@ Companies need to buy 1 cloud rendering seat per 2000 renders per month - see ht
We make it easy to remove all Remotion resources from your GCP account without leaving any traces or causing further costs.
-[**How to uninstall Remotion Lambda**](/docs/gcp/uninstall)
+[**How to uninstall Remotion Lambda**](/docs/cloudrun/uninstall)
diff --git a/packages/docs/docs/gcp/cli.md b/packages/docs/docs/gcp/cli.md
index c11d909dfd..18fbb1a444 100644
--- a/packages/docs/docs/gcp/cli.md
+++ b/packages/docs/docs/gcp/cli.md
@@ -1,22 +1,22 @@
---
-image: /generated/articles-docs-gcp-cli.png
+image: /generated/articles-docs-cloudrun-cli.png
id: cli
sidebar_label: Overview
-title: "@remotion/gcp - CLI"
-slug: /gcp/cli
+title: "@remotion/cloudrun - CLI"
+slug: /cloudrun/cli
---
-To use the Remotion GCP CLI, you first need to [install it](/docs/gcp/setup).
+To use the Remotion Cloudrun CLI, you first need to [install it](/docs/cloudrun/setup).
## Commands
-- [sites](/docs/gcp/cli/sites)
-- [functions](/docs/gcp/cli/functions)
-- [render](/docs/gcp/cli/render)
-- [still](/docs/gcp/cli/still)
-- [compositions](/docs/gcp/cli/compositions)
-- [policies](/docs/gcp/cli/policies)
-- [quotas](/docs/gcp/cli/quotas)
+- [sites](/docs/cloudrun/cli/sites)
+- [functions](/docs/cloudrun/cli/functions)
+- [render](/docs/cloudrun/cli/render)
+- [still](/docs/cloudrun/cli/still)
+- [compositions](/docs/cloudrun/cli/compositions)
+- [policies](/docs/cloudrun/cli/policies)
+- [quotas](/docs/cloudrun/cli/quotas)
## Global options
diff --git a/packages/docs/docs/gcp/region-selection.md b/packages/docs/docs/gcp/region-selection.md
index feabcfb96b..a5adce8dce 100644
--- a/packages/docs/docs/gcp/region-selection.md
+++ b/packages/docs/docs/gcp/region-selection.md
@@ -1,12 +1,12 @@
---
-image: /generated/articles-docs-gcp-region-selection.png
+image: /generated/articles-docs-cloudrun-region-selection.png
id: region-selection
title: Region selection
-slug: /gcp/region-selection
-crumb: "GCP"
+slug: /cloudrun/region-selection
+crumb: "Cloudrun"
---
-import {GcpRegionList} from '../../components/gcp/regions.tsx';
+import {GcpRegionList} from '../../components/cloudrun/regions.tsx';
Before going live with Remotion Cloud Run, you need to think about into which GCP region you are deploying your service and bucket.
@@ -18,7 +18,7 @@ The following GCP regions are available:
<GcpRegionList />
-You can call [`getRegions()`](/docs/gcp/getregions) or type [`npx remotion gcp regions`](/docs/gcp/cli/regions) to get this list programmatically.
+You can call [`getRegions()`](/docs/cloudrun/getregions) or type [`npx remotion cloudrun regions`](/docs/cloudrun/cli/regions) to get this list programmatically.
## Default region
diff --git a/packages/docs/docs/gcp/setup.md b/packages/docs/docs/gcp/setup.md
index a79689a549..ce9f34ccfc 100644
--- a/packages/docs/docs/gcp/setup.md
+++ b/packages/docs/docs/gcp/setup.md
@@ -1,15 +1,15 @@
---
-image: /generated/articles-docs-gcp-setup.png
+image: /generated/articles-docs-cloudrun-setup.png
id: setup
title: Setup
-slug: /gcp/setup
-crumb: "Gcp"
+slug: /cloudrun/setup
+crumb: "Cloudrun"
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-## 1. Install `@remotion/gcp`
+## 1. Install `@remotion/cloudrun`
<Tabs
defaultValue="npm"
@@ -22,7 +22,7 @@ values={[
<TabItem value="npm">
```bash
-npm i @remotion/gcp
+npm i @remotion/cloudrun
```
</TabItem>
@@ -30,14 +30,14 @@ npm i @remotion/gcp
<TabItem value="pnpm">
```bash
-pnpm i @remotion/gcp
+pnpm i @remotion/cloudrun
```
</TabItem>
<TabItem value="yarn">
```bash
-yarn add @remotion/gcp
+yarn add @remotion/cloudrun
```
</TabItem>
@@ -54,7 +54,7 @@ Your package.json should look like the following:
```json
"@remotion/cli": "3.0.0", // Replace 3.0.0 with the current version
- "@remotion/gcp": "3.0.0", // Remove any `^` character
+ "@remotion/cloudrun": "3.0.0", // Remove any `^` character
// ...
"remotion": "3.0.0",
```
@@ -84,18 +84,18 @@ This means that you can clone a github repo, run a couple of Terraform commands,
1. In the top right hand corner of the screen, click the Activate Cloud Shell icon
- <img src="/img/gcp/selectCloudShell.jpg" width="200" />
+ <img src="/img/cloudrun/selectCloudShell.jpg" width="200" />
2. Within the Cloud Shell, type
```bash
- git clone https://github.com/UmungoBungo/remotion-gcp-terraform.git remotion-gcp-terraform/
+ git clone https://github.com/UmungoBungo/remotion-gcp-terraform.git remotion-cloudrun-terraform/
```
<!-- ToDo - host this in the official Remotion repo -->
3. Change directory into the new folder
```bash
- cd remotion-gcp-terraform/
+ cd remotion-cloudrun-terraform/
```
4. Within the terraform file, there is a variable named project_id. This needs to be set to your newly created Remotion project. Because Cloud Shell is already authenticated with GCP, the variable can be set using the following command:
```bash
@@ -136,10 +136,10 @@ This means that you can clone a github repo, run a couple of Terraform commands,
echo "REMOTION_GCP_PROJECT_ID=$(gcloud config get-value project)" >> .env
```
8. Download the .env file by clicking the vertical ellipsis, in the top right of the cloud shell window, and selecting Download. Then type .env at the end of the prefilled path, and click DOWNLOAD;
- <img src="/img/gcp/downloadEnv.jpg" width="350" />
+ <img src="/img/cloudrun/downloadEnv.jpg" width="350" />
<br />
<br />
- <img src="/img/gcp/downloadEnvFolder.png" width="300" />
+ <img src="/img/cloudrun/downloadEnvFolder.png" width="300" />
9. Remove the .env file and key.json from the virtual machine, using this command;
@@ -157,7 +157,7 @@ This means that you can clone a github repo, run a couple of Terraform commands,
## 5. Optional: Validate the permission setup
-- Run `npx remotion gcp policies validate`
+- Run `npx remotion cloudrun policies validate`
<hr/>
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 7a89b6371d..0f20d55159 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -29,7 +29,7 @@
"@remotion/babel-loader": "workspace:*",
"@remotion/bundler": "workspace:*",
"@remotion/cli": "workspace:*",
- "@remotion/gcp": "workspace:*",
+ "@remotion/cloudrun": "workspace:*",
"@remotion/gif": "workspace:*",
"@remotion/google-fonts": "workspace:*",
"@remotion/lambda": "workspace:*",
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 89b5a8597d..720b7df364 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -34,10 +34,10 @@ module.exports = {
},
{
type: "category",
- label: "gcp",
+ label: "cloudrun",
link: {
type: "doc",
- id: "gcp/cli",
+ id: "cloudrun/cli",
},
items: [
"lambda/cli/sites",
@@ -474,14 +474,14 @@ module.exports = {
],
},{
type: "category",
- label: "GCP",
+ label: "Cloudrun",
link: {
type: "doc",
- id: "gcp",
+ id: "cloudrun",
},
items: [
- "gcp/setup",
- "gcp/region-selection"
+ "cloudrun/setup",
+ "cloudrun/region-selection"
],
},
{
diff --git a/packages/gcp/readmeImages/createSA.png b/packages/docs/static/img/cloudrun/createSA.png
similarity index 100%
rename from packages/gcp/readmeImages/createSA.png
rename to packages/docs/static/img/cloudrun/createSA.png
diff --git a/packages/gcp/readmeImages/downloadEnv.jpg b/packages/docs/static/img/cloudrun/downloadEnv.jpg
similarity index 100%
rename from packages/gcp/readmeImages/downloadEnv.jpg
rename to packages/docs/static/img/cloudrun/downloadEnv.jpg
diff --git a/packages/gcp/readmeImages/downloadEnvFolder.png b/packages/docs/static/img/cloudrun/downloadEnvFolder.png
similarity index 100%
rename from packages/gcp/readmeImages/downloadEnvFolder.png
rename to packages/docs/static/img/cloudrun/downloadEnvFolder.png
diff --git a/packages/gcp/readmeImages/saRole.png b/packages/docs/static/img/cloudrun/saRole.png
similarity index 100%
rename from packages/gcp/readmeImages/saRole.png
rename to packages/docs/static/img/cloudrun/saRole.png
diff --git a/packages/gcp/readmeImages/selectCloudShell.jpg b/packages/docs/static/img/cloudrun/selectCloudShell.jpg
similarity index 100%
rename from packages/gcp/readmeImages/selectCloudShell.jpg
rename to packages/docs/static/img/cloudrun/selectCloudShell.jpg
diff --git a/packages/example/package.json b/packages/example/package.json
index d23752036e..d48f89c38a 100644
--- a/packages/example/package.json
+++ b/packages/example/package.json
@@ -32,7 +32,7 @@
"@remotion/cli": "workspace:*",
"@remotion/eslint-config": "workspace:*",
"@remotion/eslint-plugin": "workspace:*",
- "@remotion/gcp": "workspace:*",
+ "@remotion/cloudrun": "workspace:*",
"@remotion/gif": "workspace:*",
"@remotion/google-fonts": "workspace:*",
"@remotion/lambda": "workspace:*",
@@ -78,4 +78,4 @@
"publishConfig": {
"access": "public"
}
-}
+}
\ No newline at end of file
diff --git a/packages/gcp/src/index.ts b/packages/gcp/src/index.ts
deleted file mode 100644
index 71976303aa..0000000000
--- a/packages/gcp/src/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import {GCPInternals} from './internals';
-
-export {GCPInternals};
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 53c42b2cd3..ea2ad98838 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -200,6 +200,53 @@ importers:
typescript: 4.7.2
vitest: 0.24.3
+ packages/cloudrun:
+ specifiers:
+ '@google-cloud/functions-framework': ^3.1.3
+ '@google-cloud/run': ^0.4.0
+ '@google-cloud/storage': ^6.9.1
+ '@jonny/eslint-config': 3.0.266
+ '@remotion/bundler': workspace:*
+ '@remotion/cli': workspace:*
+ '@remotion/compositor-linux-x64-musl': workspace:*
+ '@remotion/renderer': workspace:*
+ '@types/minimist': 1.2.2
+ eslint: 8.25.0
+ google-auth-library: ^8.7.0
+ got: 11.8.2
+ prettier: ^2.7.1
+ prettier-plugin-organize-imports: ^3.2.2
+ remotion: workspace:*
+ ts-node: ^10.8.0
+ typescript: ^4.7.0
+ vitest: 0.24.3
+ dependencies:
+ '@google-cloud/functions-framework': 3.1.3
+ '@google-cloud/run': 0.4.0
+ '@google-cloud/storage': 6.9.1
+ '@remotion/bundler': link:../bundler
+ '@remotion/cli': link:../cli
+ '@remotion/renderer': link:../renderer
+ google-auth-library: 8.7.0
+ got: 11.8.2
+ remotion: link:../core
+ devDependencies:
+ '@jonny/eslint-config': 3.0.266_mx6jhvnay66odhn2yt7eqo2wou
+ '@remotion/compositor-linux-x64-musl': link:../compositor-linux-x64-musl
+ '@types/minimist': 1.2.2
+ eslint: 8.25.0
+ prettier: 2.8.4
+ prettier-plugin-organize-imports: 3.2.2_silln3pw57har7jydmecgzoypa
+ ts-node: 10.8.0_alpjt73dvgv6kni625hu7f2l4m
+ typescript: 4.9.5
+ vitest: 0.24.3
+
+ packages/cloudrun/container:
+ specifiers:
+ '@google-cloud/functions-framework': ^3.1.3
+ dependencies:
+ '@google-cloud/functions-framework': 3.1.3
+
packages/compositor-darwin-arm64:
specifiers: {}
@@ -326,7 +373,7 @@ importers:
'@remotion/babel-loader': workspace:*
'@remotion/bundler': workspace:*
'@remotion/cli': workspace:*
- '@remotion/gcp': workspace:*
+ '@remotion/cloudrun': workspace:*
'@remotion/gif': workspace:*
'@remotion/google-fonts': workspace:*
'@remotion/lambda': workspace:*
@@ -390,7 +437,7 @@ importers:
'@remotion/babel-loader': link:../babel-loader
'@remotion/bundler': link:../bundler
'@remotion/cli': link:../cli
- '@remotion/gcp': link:../gcp
+ '@remotion/cloudrun': link:../cloudrun
'@remotion/gif': link:../gif
'@remotion/google-fonts': link:../google-fonts
'@remotion/lambda': link:../lambda
@@ -489,9 +536,9 @@ importers:
'@remotion/babel-loader': workspace:*
'@remotion/bundler': workspace:*
'@remotion/cli': workspace:*
+ '@remotion/cloudrun': workspace:*
'@remotion/eslint-config': workspace:*
'@remotion/eslint-plugin': workspace:*
- '@remotion/gcp': workspace:*
'@remotion/gif': workspace:*
'@remotion/google-fonts': workspace:*
'@remotion/lambda': workspace:*
@@ -540,9 +587,9 @@ importers:
'@remotion/babel-loader': link:../babel-loader
'@remotion/bundler': link:../bundler
'@remotion/cli': link:../cli
+ '@remotion/cloudrun': link:../cloudrun
'@remotion/eslint-config': link:../eslint-config
'@remotion/eslint-plugin': link:../eslint-plugin
- '@remotion/gcp': link:../gcp
'@remotion/gif': link:../gif
'@remotion/google-fonts': link:../google-fonts
'@remotion/lambda': link:../lambda
@@ -584,53 +631,6 @@ importers:
eslint-plugin-react-hooks: [email protected]
prettier-plugin-organize-imports: 2.3.4_j2odc4yr77iddtreafyicbq5hi
- packages/gcp:
- specifiers:
- '@google-cloud/functions-framework': ^3.1.3
- '@google-cloud/run': ^0.4.0
- '@google-cloud/storage': ^6.9.1
- '@jonny/eslint-config': 3.0.266
- '@remotion/bundler': workspace:*
- '@remotion/cli': workspace:*
- '@remotion/compositor-linux-x64-musl': workspace:*
- '@remotion/renderer': workspace:*
- '@types/minimist': 1.2.2
- eslint: 8.25.0
- google-auth-library: ^8.7.0
- got: 11.8.2
- prettier: ^2.7.1
- prettier-plugin-organize-imports: ^3.2.2
- remotion: workspace:*
- ts-node: ^10.8.0
- typescript: ^4.7.0
- vitest: 0.24.3
- dependencies:
- '@google-cloud/functions-framework': 3.1.3
- '@google-cloud/run': 0.4.0
- '@google-cloud/storage': 6.9.1
- '@remotion/bundler': link:../bundler
- '@remotion/cli': link:../cli
- '@remotion/renderer': link:../renderer
- google-auth-library: 8.7.0
- got: 11.8.2
- remotion: link:../core
- devDependencies:
- '@jonny/eslint-config': 3.0.266_t54va6jeo5lf3vtqih5uiyrm5e
- '@remotion/compositor-linux-x64-musl': link:../compositor-linux-x64-musl
- '@types/minimist': 1.2.2
- eslint: 8.25.0
- prettier: 2.7.1
- prettier-plugin-organize-imports: 3.2.2_j2odc4yr77iddtreafyicbq5hi
- ts-node: 10.8.0_4tanjcddichj7gkvnxggaglk5m
- typescript: 4.7.2
- vitest: 0.24.3
-
- packages/gcp/container:
- specifiers:
- '@google-cloud/functions-framework': ^3.1.3
- dependencies:
- '@google-cloud/functions-framework': 3.1.3
-
packages/gif:
specifiers:
'@jonny/eslint-config': 3.0.266
@@ -3663,7 +3663,7 @@ packages:
resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/helper-validator-identifier': 7.18.6
+ '@babel/helper-validator-identifier': 7.19.1
chalk: 2.4.2
js-tokens: 4.0.0
@@ -8518,7 +8518,7 @@ packages:
ajv: 6.12.6
debug: 4.3.4
espree: 9.4.0
- globals: 13.17.0
+ globals: 13.20.0
ignore: 5.2.0
import-fresh: 3.3.0
js-yaml: 4.1.0
@@ -8565,7 +8565,7 @@ packages:
minimist: 1.2.7
on-finished: 2.3.0
read-pkg-up: 7.0.1
- semver: 7.3.7
+ semver: 7.3.8
transitivePeerDependencies:
- supports-color
dev: false
@@ -8763,6 +8763,20 @@ packages:
'@types/yargs': 17.0.22
chalk: 4.1.2
+ /@jonny/eslint-config/3.0.266_mx6jhvnay66odhn2yt7eqo2wou:
+ resolution: {integrity: sha512-jtrgDIHcM+arLaGxuUlSIh3FrJFSrSjMHEQAFtcSeA/4iNXYjJHRbN9Q0vc8H3wwMNPYYvbxrbmC1zycaEAStQ==}
+ dependencies:
+ '@typescript-eslint/eslint-plugin': 5.29.0_4yudac4qy4dz3wdiypqku2gk34
+ '@typescript-eslint/parser': 5.29.0_mx6jhvnay66odhn2yt7eqo2wou
+ eslint-plugin-10x: [email protected]
+ eslint-plugin-react: [email protected]
+ eslint-plugin-react-hooks: [email protected]
+ transitivePeerDependencies:
+ - eslint
+ - supports-color
+ - typescript
+ dev: true
+
/@jonny/eslint-config/3.0.266_t54va6jeo5lf3vtqih5uiyrm5e:
resolution: {integrity: sha512-jtrgDIHcM+arLaGxuUlSIh3FrJFSrSjMHEQAFtcSeA/4iNXYjJHRbN9Q0vc8H3wwMNPYYvbxrbmC1zycaEAStQ==}
dependencies:
@@ -8839,10 +8853,6 @@ packages:
'@jridgewell/gen-mapping': 0.3.2
'@jridgewell/trace-mapping': 0.3.15
- /@jridgewell/sourcemap-codec/1.4.11:
- resolution: {integrity: sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==}
- dev: true
-
/@jridgewell/sourcemap-codec/1.4.14:
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
@@ -8861,8 +8871,8 @@ packages:
/@jridgewell/trace-mapping/0.3.9:
resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
dependencies:
- '@jridgewell/resolve-uri': 3.0.5
- '@jridgewell/sourcemap-codec': 1.4.11
+ '@jridgewell/resolve-uri': 3.1.0
+ '@jridgewell/sourcemap-codec': 1.4.14
dev: true
/@jsdoc/salty/0.2.3:
@@ -11078,6 +11088,33 @@ packages:
transitivePeerDependencies:
- supports-color
+ /@typescript-eslint/eslint-plugin/5.29.0_4yudac4qy4dz3wdiypqku2gk34:
+ resolution: {integrity: sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ '@typescript-eslint/parser': ^5.0.0
+ eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/parser': 5.29.0_mx6jhvnay66odhn2yt7eqo2wou
+ '@typescript-eslint/scope-manager': 5.29.0
+ '@typescript-eslint/type-utils': 5.29.0_mx6jhvnay66odhn2yt7eqo2wou
+ '@typescript-eslint/utils': 5.29.0_mx6jhvnay66odhn2yt7eqo2wou
+ debug: 4.3.4
+ eslint: 8.25.0
+ functional-red-black-tree: 1.0.1
+ ignore: 5.2.0
+ regexpp: 3.2.0
+ semver: 7.3.7
+ typescript: 4.9.5
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/eslint-plugin/5.46.0_k56qtvu5cr72d426lmpugttyca:
resolution: {integrity: sha512-QrZqaIOzJAjv0sfjY4EjbXUi3ZOFpKfzntx22gPGr9pmFcTjcFw/1sS1LJhEubfAGwuLjNrPV0rH+D1/XZFy7Q==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -11172,6 +11209,26 @@ packages:
- supports-color
dev: false
+ /@typescript-eslint/parser/5.29.0_mx6jhvnay66odhn2yt7eqo2wou:
+ resolution: {integrity: sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/scope-manager': 5.29.0
+ '@typescript-eslint/types': 5.29.0
+ '@typescript-eslint/typescript-estree': [email protected]
+ debug: 4.3.4
+ eslint: 8.25.0
+ typescript: 4.9.5
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/parser/5.29.0_t54va6jeo5lf3vtqih5uiyrm5e:
resolution: {integrity: sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -11308,6 +11365,25 @@ packages:
- supports-color
dev: false
+ /@typescript-eslint/type-utils/5.29.0_mx6jhvnay66odhn2yt7eqo2wou:
+ resolution: {integrity: sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: '*'
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/utils': 5.29.0_mx6jhvnay66odhn2yt7eqo2wou
+ debug: 4.3.4
+ eslint: 8.25.0
+ typescript: 4.9.5
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/type-utils/5.29.0_t54va6jeo5lf3vtqih5uiyrm5e:
resolution: {integrity: sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -11452,6 +11528,27 @@ packages:
transitivePeerDependencies:
- supports-color
+ /@typescript-eslint/typescript-estree/[email protected]:
+ resolution: {integrity: sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/types': 5.29.0
+ '@typescript-eslint/visitor-keys': 5.29.0
+ debug: 4.3.4
+ globby: 11.1.0
+ is-glob: 4.0.3
+ semver: 7.3.8
+ typescript: 4.9.5
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@typescript-eslint/typescript-estree/[email protected]:
resolution: {integrity: sha512-kDLNn/tQP+Yp8Ro2dUpyyVV0Ksn2rmpPpB0/3MO874RNmXtypMwSeazjEN/Q6CTp8D7ExXAAekPEcCEB/vtJkw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -11572,6 +11669,24 @@ packages:
- typescript
dev: false
+ /@typescript-eslint/utils/5.29.0_mx6jhvnay66odhn2yt7eqo2wou:
+ resolution: {integrity: sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
+ dependencies:
+ '@types/json-schema': 7.0.9
+ '@typescript-eslint/scope-manager': 5.29.0
+ '@typescript-eslint/types': 5.29.0
+ '@typescript-eslint/typescript-estree': [email protected]
+ eslint: 8.25.0
+ eslint-scope: 5.1.1
+ eslint-utils: [email protected]
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+ dev: true
+
/@typescript-eslint/utils/5.29.0_t54va6jeo5lf3vtqih5uiyrm5e:
resolution: {integrity: sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -13806,7 +13921,7 @@ packages:
safe-buffer: 5.1.2
/cookie-signature/1.0.6:
- resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=}
+ resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==}
dev: false
/cookie/0.4.2:
@@ -15737,13 +15852,13 @@ packages:
eslint-utils: [email protected]
eslint-visitor-keys: 3.3.0
espree: 9.4.0
- esquery: 1.4.0
+ esquery: 1.5.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
file-entry-cache: 6.0.1
find-up: 5.0.0
glob-parent: 6.0.2
- globals: 13.17.0
+ globals: 13.20.0
globby: 11.1.0
grapheme-splitter: 1.0.4
ignore: 5.2.0
@@ -15846,6 +15961,7 @@ packages:
engines: {node: '>=0.10'}
dependencies:
estraverse: 5.3.0
+ dev: false
/esquery/1.5.0:
resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==}
@@ -16831,18 +16947,11 @@ packages:
type-fest: 0.20.2
dev: false
- /globals/13.17.0:
- resolution: {integrity: sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==}
- engines: {node: '>=8'}
- dependencies:
- type-fest: 0.20.2
-
/globals/13.20.0:
resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
engines: {node: '>=8'}
dependencies:
type-fest: 0.20.2
- dev: true
/globalthis/1.0.3:
resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==}
@@ -19513,7 +19622,7 @@ packages:
dev: false
/media-typer/0.3.0:
- resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=}
+ resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
dev: false
@@ -19552,7 +19661,7 @@ packages:
dev: false
/merge-descriptors/1.0.1:
- resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=}
+ resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==}
dev: false
/merge-stream/2.0.0:
@@ -22273,7 +22382,7 @@ packages:
typescript: 4.7.2
dev: true
- /prettier-plugin-organize-imports/3.2.2_j2odc4yr77iddtreafyicbq5hi:
+ /prettier-plugin-organize-imports/3.2.2_silln3pw57har7jydmecgzoypa:
resolution: {integrity: sha512-e97lE6odGSiHonHJMTYC0q0iLXQyw0u5z/PJpvP/3vRy6/Zi9kLBwFAbEGjDzIowpjQv8b+J04PDamoUSQbzGA==}
peerDependencies:
'@volar/vue-language-plugin-pug': ^1.0.4
@@ -22286,8 +22395,8 @@ packages:
'@volar/vue-typescript':
optional: true
dependencies:
- prettier: 2.7.1
- typescript: 4.7.2
+ prettier: 2.8.4
+ typescript: 4.9.5
dev: true
/prettier/2.4.1:
@@ -25318,7 +25427,7 @@ packages:
resolution: {integrity: sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w==}
dev: false
- /ts-node/10.8.0_4tanjcddichj7gkvnxggaglk5m:
+ /ts-node/10.8.0_alpjt73dvgv6kni625hu7f2l4m:
resolution: {integrity: sha512-/fNd5Qh+zTt8Vt1KbYZjRHCE9sI5i7nqfD/dzBBRDeVXZXS6kToW6R7tTU6Nd4XavFs0mAVCg29Q//ML7WsZYA==}
hasBin: true
peerDependencies:
@@ -25344,7 +25453,7 @@ packages:
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
- typescript: 4.7.2
+ typescript: 4.9.5
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: true