@remotion/cloudrun 4.0.244 → 4.0.245
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-lint.log +31 -0
- package/.turbo/turbo-make.log +2 -2
- package/LICENSE.md +1 -1
- package/dist/api/delete-service.d.ts +0 -7
- package/dist/api/delete-service.js +2 -5
- package/dist/api/delete-site.d.ts +0 -8
- package/dist/api/delete-site.js +2 -6
- package/dist/api/deploy-service.d.ts +0 -11
- package/dist/api/deploy-service.js +2 -9
- package/dist/api/deploy-site.d.ts +0 -8
- package/dist/api/deploy-site.js +2 -6
- package/dist/api/get-or-create-bucket.d.ts +0 -7
- package/dist/api/get-or-create-bucket.js +3 -6
- package/dist/api/get-regions.d.ts +0 -5
- package/dist/api/get-regions.js +2 -3
- package/dist/api/get-service-info.d.ts +0 -7
- package/dist/api/get-service-info.js +2 -5
- package/dist/api/get-services.d.ts +0 -7
- package/dist/api/get-services.js +1 -4
- package/dist/api/get-sites.d.ts +0 -6
- package/dist/api/get-sites.js +2 -4
- package/dist/api/iam-validation/testPermissions.d.ts +0 -7
- package/dist/api/iam-validation/testPermissions.js +3 -6
- package/dist/api/render-media-on-cloudrun.d.ts +0 -42
- package/dist/api/render-media-on-cloudrun.js +3 -41
- package/dist/api/speculate-service-name.d.ts +0 -8
- package/dist/api/speculate-service-name.js +3 -7
- package/package.json +7 -7
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @remotion/cloudrun@4.0.244 lint /Users/jonathanburger/remotion/packages/cloudrun
|
|
4
|
+
> eslint src
|
|
5
|
+
|
|
6
|
+
[0m[0m
|
|
7
|
+
[0m[4m/Users/jonathanburger/remotion/packages/cloudrun/src/api/check-if-service-exists.ts[24m[0m
|
|
8
|
+
[0m [2m59:14[22m [33mwarning[39m Unexpected any. Specify a different type [2m@typescript-eslint/no-explicit-any[22m[0m
|
|
9
|
+
[0m[0m
|
|
10
|
+
[0m[4m/Users/jonathanburger/remotion/packages/cloudrun/src/api/get-sites.ts[24m[0m
|
|
11
|
+
[0m [2m58:24[22m [33mwarning[39m Unexpected any. Specify a different type [2m@typescript-eslint/no-explicit-any[22m[0m
|
|
12
|
+
[0m [2m62:40[22m [33mwarning[39m Unexpected any. Specify a different type [2m@typescript-eslint/no-explicit-any[22m[0m
|
|
13
|
+
[0m[0m
|
|
14
|
+
[0m[4m/Users/jonathanburger/remotion/packages/cloudrun/src/api/render-media-on-cloudrun.ts[24m[0m
|
|
15
|
+
[0m [2m209:3[22m [33mwarning[39m Unexpected 'todo' comment: 'TODO: Add any sort of type safety' [2mno-warning-comments[22m[0m
|
|
16
|
+
[0m [2m218:17[22m [33mwarning[39m Unexpected any. Specify a different type [2m@typescript-eslint/no-explicit-any[22m[0m
|
|
17
|
+
[0m[0m
|
|
18
|
+
[0m[4m/Users/jonathanburger/remotion/packages/cloudrun/src/api/render-still-on-cloudrun.ts[24m[0m
|
|
19
|
+
[0m [2m161:17[22m [33mwarning[39m Unexpected any. Specify a different type [2m@typescript-eslint/no-explicit-any[22m[0m
|
|
20
|
+
[0m[0m
|
|
21
|
+
[0m[4m/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/helpers/renderArgsCheck.ts[24m[0m
|
|
22
|
+
[0m [2m79:4[22m [33mwarning[39m Unexpected 'todo' comment: 'TODO: Log if there is an incompatible...' [2mno-warning-comments[22m[0m
|
|
23
|
+
[0m[0m
|
|
24
|
+
[0m[4m/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/index.ts[24m[0m
|
|
25
|
+
[0m [2m181:2[22m [33mwarning[39m Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' [2mno-warning-comments[22m[0m
|
|
26
|
+
[0m[0m
|
|
27
|
+
[0m[4m/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/still.ts[24m[0m
|
|
28
|
+
[0m [2m162:2[22m [33mwarning[39m Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' [2mno-warning-comments[22m[0m
|
|
29
|
+
[0m[0m
|
|
30
|
+
[0m[33m[1m✖ 9 problems (0 errors, 9 warnings)[22m[39m[0m
|
|
31
|
+
[0m[33m[1m[22m[39m[0m
|
package/.turbo/turbo-make.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @remotion/cloudrun@4.0.
|
|
3
|
+
> @remotion/cloudrun@4.0.244 make /Users/jonathanburger/remotion/packages/cloudrun
|
|
4
4
|
> tsc -d && bun build.ts
|
|
5
5
|
|
|
6
|
-
[0m[2m[[
|
|
6
|
+
[0m[2m[[1m5.62ms[0m[2m][0m Made reproducible build with gtar
|
package/LICENSE.md
CHANGED
|
@@ -2,11 +2,4 @@ export type DeleteServiceInput = {
|
|
|
2
2
|
serviceName: string;
|
|
3
3
|
region: string;
|
|
4
4
|
};
|
|
5
|
-
/**
|
|
6
|
-
* @description Deletes a service from GCP Cloud Run
|
|
7
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/deleteservice)
|
|
8
|
-
* @param params.serviceName The name of the service to delete.
|
|
9
|
-
* @param params.region The region of the service to delete.
|
|
10
|
-
* @returns {Promise<void>} Nothing. Throws if the service failed to delete.
|
|
11
|
-
*/
|
|
12
5
|
export declare const deleteService: (params: DeleteServiceInput) => Promise<void>;
|
|
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deleteService = void 0;
|
|
4
4
|
const is_in_cloud_task_1 = require("../functions/helpers/is-in-cloud-task");
|
|
5
5
|
const get_cloud_run_client_1 = require("./helpers/get-cloud-run-client");
|
|
6
|
-
|
|
7
|
-
* @description Deletes a service
|
|
6
|
+
/*
|
|
7
|
+
* @description Deletes a deployed Cloud Run service based on its name.
|
|
8
8
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/deleteservice)
|
|
9
|
-
* @param params.serviceName The name of the service to delete.
|
|
10
|
-
* @param params.region The region of the service to delete.
|
|
11
|
-
* @returns {Promise<void>} Nothing. Throws if the service failed to delete.
|
|
12
9
|
*/
|
|
13
10
|
const deleteService = async (params) => {
|
|
14
11
|
const cloudRunClient = (0, get_cloud_run_client_1.getCloudRunClient)();
|
|
@@ -2,12 +2,4 @@ export type DeleteSiteInput = {
|
|
|
2
2
|
bucketName: string;
|
|
3
3
|
siteName: string;
|
|
4
4
|
};
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @description Deletes a deployed site from your Cloud Run bucket. The opposite of deploySite().
|
|
8
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/deletesite)
|
|
9
|
-
* @param params.bucketName The name of the Cloud Storage bucket where the site resides in.
|
|
10
|
-
* @param params.siteName The ID of the site to delete.
|
|
11
|
-
* @returns {Promise<void>} Nothing. Throws if the site failed to delete.
|
|
12
|
-
*/
|
|
13
5
|
export declare const deleteSite: ({ bucketName, siteName, }: DeleteSiteInput) => Promise<void>;
|
package/dist/api/delete-site.js
CHANGED
|
@@ -2,13 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deleteSite = void 0;
|
|
4
4
|
const get_cloud_storage_client_1 = require("./helpers/get-cloud-storage-client");
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @description Deletes a deployed site from your Cloud Run bucket. The opposite of deploySite().
|
|
5
|
+
/*
|
|
6
|
+
* @description Removes a Remotion project from your Cloud Storage bucket.
|
|
8
7
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/deletesite)
|
|
9
|
-
* @param params.bucketName The name of the Cloud Storage bucket where the site resides in.
|
|
10
|
-
* @param params.siteName The ID of the site to delete.
|
|
11
|
-
* @returns {Promise<void>} Nothing. Throws if the site failed to delete.
|
|
12
8
|
*/
|
|
13
9
|
const deleteSite = ({ bucketName, siteName, }) => {
|
|
14
10
|
return new Promise((resolve, reject) => {
|
|
@@ -31,16 +31,5 @@ export type DeployServiceOutput = {
|
|
|
31
31
|
alreadyExists: boolean;
|
|
32
32
|
};
|
|
33
33
|
export declare const internalDeployService: (args_0: InternalDeployServiceInput) => Promise<DeployServiceOutput>;
|
|
34
|
-
/**
|
|
35
|
-
* @description Creates a Cloud Run service in your project that will be able to render a video in GCP.
|
|
36
|
-
* @link https://remotion.dev/docs/cloudrun/deployservice
|
|
37
|
-
* @param params.performImageVersionValidation Validate that an image exists in the public Artifact Registry that matches the Remotion Version. Default true
|
|
38
|
-
* @param params.memoryLimit Memory limit of Cloud Run service to deploy.
|
|
39
|
-
* @param params.cpuLimit CPU limit of Cloud Run service to deploy.
|
|
40
|
-
* @param params.timeoutSeconds After how many seconds the Cloud Run service should be killed if it does not end itself.
|
|
41
|
-
* @param params.projectID GCP Project ID to deploy the Cloud Run service to.
|
|
42
|
-
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
43
|
-
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
44
|
-
*/
|
|
45
34
|
export declare const deployService: ({ performImageVersionValidation, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, onlyAllocateCpuDuringRequestProcessing, }: DeployServiceInput) => Promise<DeployServiceOutput>;
|
|
46
35
|
export {};
|
|
@@ -64,16 +64,9 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
exports.internalDeployService = (0, error_handling_1.wrapWithErrorHandling)(deployServiceRaw);
|
|
67
|
-
|
|
67
|
+
/*
|
|
68
68
|
* @description Creates a Cloud Run service in your project that will be able to render a video in GCP.
|
|
69
|
-
* @
|
|
70
|
-
* @param params.performImageVersionValidation Validate that an image exists in the public Artifact Registry that matches the Remotion Version. Default true
|
|
71
|
-
* @param params.memoryLimit Memory limit of Cloud Run service to deploy.
|
|
72
|
-
* @param params.cpuLimit CPU limit of Cloud Run service to deploy.
|
|
73
|
-
* @param params.timeoutSeconds After how many seconds the Cloud Run service should be killed if it does not end itself.
|
|
74
|
-
* @param params.projectID GCP Project ID to deploy the Cloud Run service to.
|
|
75
|
-
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
76
|
-
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
69
|
+
* @see [Documentation](https://remotion.dev/docs/cloudrun/deployservice)
|
|
77
70
|
*/
|
|
78
71
|
const deployService = ({ performImageVersionValidation = true, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, logLevel, onlyAllocateCpuDuringRequestProcessing, }) => {
|
|
79
72
|
return (0, exports.internalDeployService)({
|
|
@@ -40,13 +40,5 @@ export type DeploySiteOutput = Promise<{
|
|
|
40
40
|
};
|
|
41
41
|
}>;
|
|
42
42
|
export declare const internalDeploySiteRaw: ({ entryPoint, bucketName, siteName, options, }: RawDeploySiteInput) => DeploySiteOutput;
|
|
43
|
-
/**
|
|
44
|
-
* @description Deploys a Remotion project to a GCP storage bucket to prepare it for rendering on Cloud Run.
|
|
45
|
-
* @link https://remotion.dev/docs/cloudrun/deploysite
|
|
46
|
-
* @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
|
|
47
|
-
* @param {string} params.bucketName The name of the bucket to deploy your project into.
|
|
48
|
-
* @param {string} params.siteName The name of the folder in which the project gets deployed to.
|
|
49
|
-
* @param {object} params.options Further options, see documentation page for this function.
|
|
50
|
-
*/
|
|
51
43
|
export declare const deploySite: (input: DeploySiteInput) => DeploySiteOutput;
|
|
52
44
|
export {};
|
package/dist/api/deploy-site.js
CHANGED
|
@@ -76,13 +76,9 @@ const internalDeploySiteRaw = async ({ entryPoint, bucketName, siteName, options
|
|
|
76
76
|
};
|
|
77
77
|
exports.internalDeploySiteRaw = internalDeploySiteRaw;
|
|
78
78
|
const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(exports.internalDeploySiteRaw);
|
|
79
|
-
|
|
79
|
+
/*
|
|
80
80
|
* @description Deploys a Remotion project to a GCP storage bucket to prepare it for rendering on Cloud Run.
|
|
81
|
-
* @
|
|
82
|
-
* @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
|
|
83
|
-
* @param {string} params.bucketName The name of the bucket to deploy your project into.
|
|
84
|
-
* @param {string} params.siteName The name of the folder in which the project gets deployed to.
|
|
85
|
-
* @param {object} params.options Further options, see documentation page for this function.
|
|
81
|
+
* @see [Documentation](https://remotion.dev/docs/cloudrun/deploysite)
|
|
86
82
|
*/
|
|
87
83
|
const deploySite = (input) => {
|
|
88
84
|
var _a, _b;
|
|
@@ -7,11 +7,4 @@ export type GetOrCreateBucketOutput = {
|
|
|
7
7
|
bucketName: string;
|
|
8
8
|
alreadyExisted: boolean;
|
|
9
9
|
};
|
|
10
|
-
/**
|
|
11
|
-
* @description Creates a bucket for Remotion Cloud Run in your GCP Project, in a particular region. If one already exists, it will get returned instead.
|
|
12
|
-
* @link https://remotion.dev/docs/cloudrun/getorcreatebucket
|
|
13
|
-
* @param params.region The region in which you want your Storage bucket to reside in.
|
|
14
|
-
* @param params.updateBucketState A function that gets called whenever the state of the bucket changes. This is useful for CLI updates.
|
|
15
|
-
* @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
|
|
16
|
-
*/
|
|
17
10
|
export declare const getOrCreateBucket: (params: GetOrCreateBucketInput) => Promise<GetOrCreateBucketOutput>;
|
|
@@ -5,12 +5,9 @@ const constants_1 = require("../shared/constants");
|
|
|
5
5
|
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
6
6
|
const create_bucket_1 = require("./create-bucket");
|
|
7
7
|
const get_buckets_1 = require("./get-buckets");
|
|
8
|
-
|
|
9
|
-
* @description Creates a bucket for Remotion Cloud Run in your GCP
|
|
10
|
-
* @
|
|
11
|
-
* @param params.region The region in which you want your Storage bucket to reside in.
|
|
12
|
-
* @param params.updateBucketState A function that gets called whenever the state of the bucket changes. This is useful for CLI updates.
|
|
13
|
-
* @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
|
|
8
|
+
/*
|
|
9
|
+
* @description Creates a Cloud Storage bucket for Remotion Cloud Run in your GCP project. If one already exists, it will get returned instead.
|
|
10
|
+
* @see [Documentation](https://remotion.dev/docs/cloudrun/getorcreatebucket)
|
|
14
11
|
*/
|
|
15
12
|
const getOrCreateBucket = async (params) => {
|
|
16
13
|
var _a, _b, _c;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import type { GcpRegion } from '../pricing/gcp-regions';
|
|
2
|
-
/**
|
|
3
|
-
* @description Gets an array of all supported GCP regions of this release of Remotion Cloudrun.
|
|
4
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/getregions)
|
|
5
|
-
* @returns {GcpRegion[]} A list of GCP regions.
|
|
6
|
-
*/
|
|
7
2
|
export declare const getRegions: () => readonly GcpRegion[];
|
package/dist/api/get-regions.js
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRegions = void 0;
|
|
4
4
|
const regions_1 = require("../regions");
|
|
5
|
-
|
|
6
|
-
* @description Gets an array of all supported GCP regions of this release of Remotion
|
|
5
|
+
/*
|
|
6
|
+
* @description Gets an array of all supported GCP regions of this release of Remotion Cloud Run.
|
|
7
7
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/getregions)
|
|
8
|
-
* @returns {GcpRegion[]} A list of GCP regions.
|
|
9
8
|
*/
|
|
10
9
|
const getRegions = () => {
|
|
11
10
|
return regions_1.GCP_REGIONS;
|
|
@@ -13,11 +13,4 @@ export type GetServiceInfoInput = {
|
|
|
13
13
|
region: GcpRegion;
|
|
14
14
|
serviceName: string;
|
|
15
15
|
};
|
|
16
|
-
/**
|
|
17
|
-
* @description Given a region and service name, returns information about the service such as version, memory limit and timeout.
|
|
18
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/getserviceinfo)
|
|
19
|
-
* @param params.region The region in which the service resides in.
|
|
20
|
-
* @param params.serviceName The name of the service.
|
|
21
|
-
* @returns {Promise<ServiceInfo[]>} An array with the objects containing information about the deployed services.
|
|
22
|
-
*/
|
|
23
16
|
export declare const getServiceInfo: ({ region, serviceName, }: GetServiceInfoInput) => Promise<ServiceInfo>;
|
|
@@ -5,12 +5,9 @@ const make_console_url_1 = require("../cli/helpers/make-console-url");
|
|
|
5
5
|
const is_in_cloud_task_1 = require("../functions/helpers/is-in-cloud-task");
|
|
6
6
|
const get_cloud_run_client_1 = require("./helpers/get-cloud-run-client");
|
|
7
7
|
const parse_service_name_1 = require("./helpers/parse-service-name");
|
|
8
|
-
|
|
9
|
-
* @description
|
|
8
|
+
/*
|
|
9
|
+
* @description Retrieves detailed information about a specific Cloud Run service using the service name and region.
|
|
10
10
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/getserviceinfo)
|
|
11
|
-
* @param params.region The region in which the service resides in.
|
|
12
|
-
* @param params.serviceName The name of the service.
|
|
13
|
-
* @returns {Promise<ServiceInfo[]>} An array with the objects containing information about the deployed services.
|
|
14
11
|
*/
|
|
15
12
|
const getServiceInfo = async ({ region, serviceName, }) => {
|
|
16
13
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
@@ -4,11 +4,4 @@ export type GetServicesInput = {
|
|
|
4
4
|
region: GcpRegion;
|
|
5
5
|
compatibleOnly: boolean;
|
|
6
6
|
};
|
|
7
|
-
/**
|
|
8
|
-
* @description Lists Remotion Cloud Run render services deployed to GCP Cloud Run.
|
|
9
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/getservices)
|
|
10
|
-
* @param params.region The region of which the services should be listed.
|
|
11
|
-
* @param params.compatibleOnly Whether only services compatible with the installed version of Remotion Cloud Run should be returned.
|
|
12
|
-
* @returns {Promise<ServiceInfo[]>} An array with the objects containing information about the deployed services.
|
|
13
|
-
*/
|
|
14
7
|
export declare const getServices: (params: GetServicesInput) => Promise<ServiceInfo[]>;
|
package/dist/api/get-services.js
CHANGED
|
@@ -5,12 +5,9 @@ const constants_1 = require("../shared/constants");
|
|
|
5
5
|
const service_version_string_1 = require("../shared/service-version-string");
|
|
6
6
|
const get_cloud_run_client_1 = require("./helpers/get-cloud-run-client");
|
|
7
7
|
const parse_service_name_1 = require("./helpers/parse-service-name");
|
|
8
|
-
|
|
8
|
+
/*
|
|
9
9
|
* @description Lists Remotion Cloud Run render services deployed to GCP Cloud Run.
|
|
10
10
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/getservices)
|
|
11
|
-
* @param params.region The region of which the services should be listed.
|
|
12
|
-
* @param params.compatibleOnly Whether only services compatible with the installed version of Remotion Cloud Run should be returned.
|
|
13
|
-
* @returns {Promise<ServiceInfo[]>} An array with the objects containing information about the deployed services.
|
|
14
11
|
*/
|
|
15
12
|
const getServices = async (params) => {
|
|
16
13
|
const cloudRunClient = (0, get_cloud_run_client_1.getCloudRunClient)();
|
package/dist/api/get-sites.d.ts
CHANGED
|
@@ -14,10 +14,4 @@ export type GetSitesOutput = {
|
|
|
14
14
|
sites: Site[];
|
|
15
15
|
buckets: BucketWithLocation[];
|
|
16
16
|
};
|
|
17
|
-
/**
|
|
18
|
-
* @description Gets all the deployed sites for a certain GCP project, within the specified region.
|
|
19
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/getsites)
|
|
20
|
-
* @param {GcpRegion} params.region The GCP region that you want to query for.
|
|
21
|
-
* @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
|
|
22
|
-
*/
|
|
23
17
|
export declare const getSites: (region: GcpRegion | "all regions") => Promise<GetSitesOutput>;
|
package/dist/api/get-sites.js
CHANGED
|
@@ -3,11 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getSites = void 0;
|
|
4
4
|
const constants_1 = require("../shared/constants");
|
|
5
5
|
const get_cloud_storage_client_1 = require("./helpers/get-cloud-storage-client");
|
|
6
|
-
|
|
7
|
-
* @description Gets
|
|
6
|
+
/*
|
|
7
|
+
* @description Gets an array of Remotion projects in Cloud Storage, in your GCP project.
|
|
8
8
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/getsites)
|
|
9
|
-
* @param {GcpRegion} params.region The GCP region that you want to query for.
|
|
10
|
-
* @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
|
|
11
9
|
*/
|
|
12
10
|
const getSites = async (region) => {
|
|
13
11
|
var _a, _b;
|
|
@@ -9,12 +9,5 @@ type TestPermissionsInput = {
|
|
|
9
9
|
type TestPermissionsOutput = {
|
|
10
10
|
results: TestResult[];
|
|
11
11
|
};
|
|
12
|
-
/**
|
|
13
|
-
* @description Test the permissions on the service account match the permissions required.
|
|
14
|
-
* @see [Remotion-Documentation](http://remotion.dev/docs/cloudrun/testpermissions)
|
|
15
|
-
* @see [Cloudrun-Documentation](https://cloud.google.com/resource-manager/reference/rest/v3/projects/testIamPermissions)
|
|
16
|
-
* @param {(result: TestResult) => void} params.onTest Function to run on each test result
|
|
17
|
-
* @returns {Promise<TestPermissionsOutput>} Returns array of TestResult objects
|
|
18
|
-
*/
|
|
19
12
|
export declare const testPermissions: (params?: TestPermissionsInput) => Promise<TestPermissionsOutput>;
|
|
20
13
|
export {};
|
|
@@ -12,12 +12,9 @@ const logPermissionOutput = (output) => {
|
|
|
12
12
|
return [output.decision ? '✅' : '❌', output.permissionName].join(' ');
|
|
13
13
|
};
|
|
14
14
|
exports.logPermissionOutput = logPermissionOutput;
|
|
15
|
-
|
|
16
|
-
* @description Test the permissions on the
|
|
17
|
-
* @see [
|
|
18
|
-
* @see [Cloudrun-Documentation](https://cloud.google.com/resource-manager/reference/rest/v3/projects/testIamPermissions)
|
|
19
|
-
* @param {(result: TestResult) => void} params.onTest Function to run on each test result
|
|
20
|
-
* @returns {Promise<TestPermissionsOutput>} Returns array of TestResult objects
|
|
15
|
+
/*
|
|
16
|
+
* @description Makes a call to the Test Iam Permissions method of the Resource Manager API in GCP, which returns the list of permissions the Service Account has on the GCP Project. This is then validated against the list of permissions required for the version of Remotion.
|
|
17
|
+
* @see [Documentation](https://remotion.dev/docs/cloudrun/testpermissions)
|
|
21
18
|
*/
|
|
22
19
|
const testPermissions = async (params) => {
|
|
23
20
|
const resourceManagerClient = (0, get_resource_manager_client_1.getResourceManagerClient)();
|
|
@@ -64,47 +64,5 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
64
64
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
65
65
|
declare const internalRenderMediaOnCloudrunRaw: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
66
66
|
export declare const internalRenderMediaOnCloudrun: typeof internalRenderMediaOnCloudrunRaw;
|
|
67
|
-
/**
|
|
68
|
-
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
69
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
|
|
70
|
-
* @param params.cloudRunUrl The URL of the Cloud Run service that should be used. Use either this or serviceName.
|
|
71
|
-
* @param params.serviceName The name of the Cloud Run service that should be used. Use either this or cloudRunUrl.
|
|
72
|
-
* @param params.region The region that the Cloud Run service is deployed in.
|
|
73
|
-
* @param params.serveUrl The URL of the deployed project
|
|
74
|
-
* @param params.composition The ID of the composition which should be rendered.
|
|
75
|
-
* @param params.inputProps The input props that should be passed to the composition.
|
|
76
|
-
* @param params.codec The media codec which should be used for encoding.
|
|
77
|
-
* @param params.forceBucketName The name of the bucket that the output file should be uploaded to.
|
|
78
|
-
* @param params.privacy Whether the output file should be public or private.
|
|
79
|
-
* @param params.outName The name of the output file.
|
|
80
|
-
* @param params.updateRenderProgress A callback that is called with the progress of the render.
|
|
81
|
-
* @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
|
|
82
|
-
* @param params.audioCodec The encoding of the audio of the output video.
|
|
83
|
-
* @param params.audioBitrate The target bitrate for the audio of the generated video.
|
|
84
|
-
* @param params.videoBitrate The target bitrate of the generated video.
|
|
85
|
-
* @param params.encodingBufferSize The decoder buffer size, which determines the variability of the generated video bitrate.
|
|
86
|
-
* @param params.encodingMaxRate The maximum bitrate tolerance to be used, this is only used in conjunction with encodingBufferSize.
|
|
87
|
-
* @param params.proResProfile Sets a ProRes profile. Only applies to videos rendered with prores codec.
|
|
88
|
-
* @param params.x264Preset Sets a Preset profile. Only applies to videos rendered with h.264 codec.
|
|
89
|
-
* @param params.crf Constant Rate Factor, controlling the quality.
|
|
90
|
-
* @param params.pixelFormat Custom pixel format to use. Usually used for special use cases like transparent videos.
|
|
91
|
-
* @param params.imageFormat Which image format the frames should be rendered in.
|
|
92
|
-
* @param params.scale Scales the output dimensions by a factor.
|
|
93
|
-
* @param params.everyNthFrame Only used if rendering gigs - renders only every nth frame.
|
|
94
|
-
* @param params.numberOfGifLoops Only used if rendering gigs - how many times the gif should loop. Null means infinite.
|
|
95
|
-
* @param params.frameRange Specify a single frame (a number) or a range of frames (a tuple [number, number]) to be rendered.
|
|
96
|
-
* @param params.envVariables Object containing environment variables to be injected in your project.
|
|
97
|
-
* @param params.chromiumOptions Allows you to set certain Chromium / Google Chrome flags.
|
|
98
|
-
* @param params.muted If set to true, no audio is rendered.
|
|
99
|
-
* @param params.forceWidth Overrides default composition width.
|
|
100
|
-
* @param params.forceHeight Overrides default composition height.
|
|
101
|
-
* @param params.logLevel Level of logging that Cloud Run service should perform. Default "info".
|
|
102
|
-
* @param params.delayRenderTimeoutInMilliseconds A number describing how long the render may take to resolve all delayRender() calls before it times out.
|
|
103
|
-
* @param params.concurrency A number or a string describing how many browser tabs should be opened. Default "50%".
|
|
104
|
-
* @param params.enforceAudioTrack Render a silent audio track if there wouldn't be any otherwise.
|
|
105
|
-
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
106
|
-
* @param params.metadata Metadata to be attached to the output file.
|
|
107
|
-
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
108
|
-
*/
|
|
109
67
|
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
110
68
|
export {};
|
|
@@ -129,47 +129,9 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
129
129
|
return renderResponse;
|
|
130
130
|
};
|
|
131
131
|
exports.internalRenderMediaOnCloudrun = (0, error_handling_1.wrapWithErrorHandling)(internalRenderMediaOnCloudrunRaw);
|
|
132
|
-
|
|
133
|
-
* @description
|
|
134
|
-
* @see [Documentation](https://remotion.dev/docs/cloudrun/
|
|
135
|
-
* @param params.cloudRunUrl The URL of the Cloud Run service that should be used. Use either this or serviceName.
|
|
136
|
-
* @param params.serviceName The name of the Cloud Run service that should be used. Use either this or cloudRunUrl.
|
|
137
|
-
* @param params.region The region that the Cloud Run service is deployed in.
|
|
138
|
-
* @param params.serveUrl The URL of the deployed project
|
|
139
|
-
* @param params.composition The ID of the composition which should be rendered.
|
|
140
|
-
* @param params.inputProps The input props that should be passed to the composition.
|
|
141
|
-
* @param params.codec The media codec which should be used for encoding.
|
|
142
|
-
* @param params.forceBucketName The name of the bucket that the output file should be uploaded to.
|
|
143
|
-
* @param params.privacy Whether the output file should be public or private.
|
|
144
|
-
* @param params.outName The name of the output file.
|
|
145
|
-
* @param params.updateRenderProgress A callback that is called with the progress of the render.
|
|
146
|
-
* @param params.jpegQuality JPEG quality if JPEG was selected as the image format.
|
|
147
|
-
* @param params.audioCodec The encoding of the audio of the output video.
|
|
148
|
-
* @param params.audioBitrate The target bitrate for the audio of the generated video.
|
|
149
|
-
* @param params.videoBitrate The target bitrate of the generated video.
|
|
150
|
-
* @param params.encodingBufferSize The decoder buffer size, which determines the variability of the generated video bitrate.
|
|
151
|
-
* @param params.encodingMaxRate The maximum bitrate tolerance to be used, this is only used in conjunction with encodingBufferSize.
|
|
152
|
-
* @param params.proResProfile Sets a ProRes profile. Only applies to videos rendered with prores codec.
|
|
153
|
-
* @param params.x264Preset Sets a Preset profile. Only applies to videos rendered with h.264 codec.
|
|
154
|
-
* @param params.crf Constant Rate Factor, controlling the quality.
|
|
155
|
-
* @param params.pixelFormat Custom pixel format to use. Usually used for special use cases like transparent videos.
|
|
156
|
-
* @param params.imageFormat Which image format the frames should be rendered in.
|
|
157
|
-
* @param params.scale Scales the output dimensions by a factor.
|
|
158
|
-
* @param params.everyNthFrame Only used if rendering gigs - renders only every nth frame.
|
|
159
|
-
* @param params.numberOfGifLoops Only used if rendering gigs - how many times the gif should loop. Null means infinite.
|
|
160
|
-
* @param params.frameRange Specify a single frame (a number) or a range of frames (a tuple [number, number]) to be rendered.
|
|
161
|
-
* @param params.envVariables Object containing environment variables to be injected in your project.
|
|
162
|
-
* @param params.chromiumOptions Allows you to set certain Chromium / Google Chrome flags.
|
|
163
|
-
* @param params.muted If set to true, no audio is rendered.
|
|
164
|
-
* @param params.forceWidth Overrides default composition width.
|
|
165
|
-
* @param params.forceHeight Overrides default composition height.
|
|
166
|
-
* @param params.logLevel Level of logging that Cloud Run service should perform. Default "info".
|
|
167
|
-
* @param params.delayRenderTimeoutInMilliseconds A number describing how long the render may take to resolve all delayRender() calls before it times out.
|
|
168
|
-
* @param params.concurrency A number or a string describing how many browser tabs should be opened. Default "50%".
|
|
169
|
-
* @param params.enforceAudioTrack Render a silent audio track if there wouldn't be any otherwise.
|
|
170
|
-
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
171
|
-
* @param params.metadata Metadata to be attached to the output file.
|
|
172
|
-
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
132
|
+
/*
|
|
133
|
+
* @description Initiates a media rendering process on the Remotion Cloud Run service, facilitating configurations like service region, project composition, and output settings.
|
|
134
|
+
* @see [Documentation](https://remotion.dev/docs/cloudrun/rendermediaoncloudrun)
|
|
173
135
|
*/
|
|
174
136
|
const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, }) => {
|
|
175
137
|
return (0, exports.internalRenderMediaOnCloudrun)({
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Speculate the name of a Cloud Run service that will be created when you call `deployService`, based on the service configuration.
|
|
3
|
-
* @see [Documentation](https://www.remotion.dev/docs/cloudrun/speculateservicename)
|
|
4
|
-
* @param memoryLimit The upper bound on the amount of RAM that the Cloud Run service can consume.
|
|
5
|
-
* @param cpuLimit The maximum number of CPU cores that the Cloud Run service can use to process requests.
|
|
6
|
-
* @param timeoutInSeconds How long the Cloud Run Service may run before it gets killed.
|
|
7
|
-
* @returns {string} The speculated Cloud Run service name
|
|
8
|
-
*/
|
|
9
1
|
export declare const speculateServiceName: ({ memoryLimit, cpuLimit, timeoutSeconds, }: {
|
|
10
2
|
memoryLimit: string;
|
|
11
3
|
cpuLimit: string;
|
|
@@ -2,13 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.speculateServiceName = void 0;
|
|
4
4
|
const generate_service_name_1 = require("../shared/generate-service-name");
|
|
5
|
-
|
|
6
|
-
* @description Speculate the name of
|
|
7
|
-
* @see [Documentation](https://
|
|
8
|
-
* @param memoryLimit The upper bound on the amount of RAM that the Cloud Run service can consume.
|
|
9
|
-
* @param cpuLimit The maximum number of CPU cores that the Cloud Run service can use to process requests.
|
|
10
|
-
* @param timeoutInSeconds How long the Cloud Run Service may run before it gets killed.
|
|
11
|
-
* @returns {string} The speculated Cloud Run service name
|
|
5
|
+
/*
|
|
6
|
+
* @description Speculate the name of the Cloud Run service that will be created by `deployService` or its CLI equivalent, based on the provided configuration parameters.
|
|
7
|
+
* @see [Documentation](https://remotion.dev/docs/cloudrun/speculateservicename)
|
|
12
8
|
*/
|
|
13
9
|
const speculateServiceName = ({ memoryLimit, cpuLimit, timeoutSeconds, }) => {
|
|
14
10
|
return (0, generate_service_name_1.generateServiceName)({
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/cloudrun"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/cloudrun",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.245",
|
|
7
7
|
"description": "Render Remotion videos on Google Cloud Run",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"@google-cloud/logging": "^11.1.0",
|
|
17
17
|
"google-auth-library": "^8.7.0",
|
|
18
18
|
"zod": "3.22.3",
|
|
19
|
-
"@remotion/bundler": "4.0.
|
|
20
|
-
"@remotion/cli": "4.0.
|
|
21
|
-
"remotion": "4.0.
|
|
22
|
-
"@remotion/renderer": "4.0.
|
|
19
|
+
"@remotion/bundler": "4.0.245",
|
|
20
|
+
"@remotion/cli": "4.0.245",
|
|
21
|
+
"remotion": "4.0.245",
|
|
22
|
+
"@remotion/renderer": "4.0.245"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/minimist": "1.2.2",
|
|
26
26
|
"eslint": "9.14.0",
|
|
27
|
-
"@remotion/
|
|
28
|
-
"@remotion/
|
|
27
|
+
"@remotion/eslint-config-internal": "4.0.245",
|
|
28
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.245"
|
|
29
29
|
},
|
|
30
30
|
"exports": {
|
|
31
31
|
"./package.json": "./package.json",
|