@remotion/cloudrun 4.0.31 → 4.0.32
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-build.log +3 -3
- package/dist/api/delete-site.js +2 -1
- package/dist/api/deploy-service.d.ts +13 -1
- package/dist/api/deploy-service.js +15 -17
- package/dist/api/render-media-on-cloudrun.d.ts +41 -2
- package/dist/api/render-media-on-cloudrun.js +44 -3
- package/dist/cli/commands/render/index.js +24 -20
- package/dist/cli/commands/services/deploy.js +7 -5
- package/dist/cli/log.d.ts +4 -4
- package/dist/functions/helpers/payloads.d.ts +56 -56
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
> @remotion/cloudrun@4.0.
|
|
2
|
+
> @remotion/cloudrun@4.0.31 build /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
3
|
> tsc -d && cp src/shared/sa-permissions.json dist/shared/sa-permissions.json && pnpm run buildContainer && pnpm run tarInstaller
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @remotion/cloudrun@4.0.
|
|
6
|
+
> @remotion/cloudrun@4.0.31 buildContainer /Users/jonathanburger/remotion/packages/cloudrun
|
|
7
7
|
> ts-node src/admin/bundle-renderLogic.ts
|
|
8
8
|
|
|
9
9
|
distribution bundled.
|
|
10
10
|
|
|
11
|
-
> @remotion/cloudrun@4.0.
|
|
11
|
+
> @remotion/cloudrun@4.0.31 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
package/dist/api/delete-site.js
CHANGED
|
@@ -14,7 +14,8 @@ const deleteSite = ({ bucketName, siteName, }) => {
|
|
|
14
14
|
return new Promise((resolve, reject) => {
|
|
15
15
|
const cloudStorageClient = (0, get_cloud_storage_client_1.getCloudStorageClient)();
|
|
16
16
|
cloudStorageClient.bucket(bucketName).deleteFiles({
|
|
17
|
-
|
|
17
|
+
// The `/` is important to not accidentially delete sites with the same name but containing a suffix.
|
|
18
|
+
prefix: `sites/${siteName}/`,
|
|
18
19
|
}, (err) => {
|
|
19
20
|
if (err) {
|
|
20
21
|
// Reject the Promise with the error
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
type InternalDeployServiceInput = {
|
|
2
|
+
performImageVersionValidation: boolean;
|
|
3
|
+
memoryLimit: string;
|
|
4
|
+
cpuLimit: string;
|
|
5
|
+
timeoutSeconds: number;
|
|
6
|
+
minInstances: number;
|
|
7
|
+
maxInstances: number;
|
|
8
|
+
projectID: string;
|
|
9
|
+
region: string;
|
|
10
|
+
};
|
|
1
11
|
export type DeployServiceInput = {
|
|
2
12
|
performImageVersionValidation?: boolean;
|
|
3
13
|
memoryLimit?: string;
|
|
@@ -14,6 +24,7 @@ export type DeployServiceOutput = {
|
|
|
14
24
|
uri: string;
|
|
15
25
|
alreadyExists: boolean;
|
|
16
26
|
};
|
|
27
|
+
export declare const internalDeployService: (args_0: InternalDeployServiceInput) => Promise<DeployServiceOutput>;
|
|
17
28
|
/**
|
|
18
29
|
* @description Creates a Cloud Run service in your project that will be able to render a video in GCP.
|
|
19
30
|
* @link https://remotion.dev/docs/cloudrun/deployservice
|
|
@@ -25,4 +36,5 @@ export type DeployServiceOutput = {
|
|
|
25
36
|
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
26
37
|
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
27
38
|
*/
|
|
28
|
-
export declare const deployService: (
|
|
39
|
+
export declare const deployService: ({ performImageVersionValidation, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, }: DeployServiceInput) => Promise<DeployServiceOutput>;
|
|
40
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deployService = void 0;
|
|
3
|
+
exports.deployService = exports.internalDeployService = void 0;
|
|
4
4
|
const pure_1 = require("@remotion/renderer/pure");
|
|
5
5
|
const constants_1 = require("../shared/constants");
|
|
6
6
|
const generate_service_name_1 = require("../shared/generate-service-name");
|
|
@@ -16,21 +16,6 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
16
16
|
if (performImageVersionValidation) {
|
|
17
17
|
(0, validate_image_remotion_version_1.validateImageRemotionVersion)();
|
|
18
18
|
}
|
|
19
|
-
if (!memoryLimit) {
|
|
20
|
-
memoryLimit = '2Gi';
|
|
21
|
-
}
|
|
22
|
-
if (!cpuLimit) {
|
|
23
|
-
cpuLimit = '1.0';
|
|
24
|
-
}
|
|
25
|
-
if (!timeoutSeconds) {
|
|
26
|
-
timeoutSeconds = constants_1.DEFAULT_TIMEOUT;
|
|
27
|
-
}
|
|
28
|
-
if (!minInstances) {
|
|
29
|
-
minInstances = constants_1.DEFAULT_MIN_INSTANCES;
|
|
30
|
-
}
|
|
31
|
-
if (!maxInstances) {
|
|
32
|
-
maxInstances = constants_1.DEFAULT_MAX_INSTANCES;
|
|
33
|
-
}
|
|
34
19
|
const parent = `projects/${projectID}/locations/${region}`;
|
|
35
20
|
const cloudRunClient = (0, get_cloud_run_client_1.getCloudRunClient)();
|
|
36
21
|
const existingService = await (0, check_if_service_exists_1.checkIfServiceExists)({
|
|
@@ -77,6 +62,7 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
77
62
|
alreadyExists: false,
|
|
78
63
|
};
|
|
79
64
|
};
|
|
65
|
+
exports.internalDeployService = pure_1.PureJSAPIs.wrapWithErrorHandling(deployServiceRaw);
|
|
80
66
|
/**
|
|
81
67
|
* @description Creates a Cloud Run service in your project that will be able to render a video in GCP.
|
|
82
68
|
* @link https://remotion.dev/docs/cloudrun/deployservice
|
|
@@ -88,4 +74,16 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
88
74
|
* @param params.region GCP region to deploy the Cloud Run service to.
|
|
89
75
|
* @returns {Promise<DeployServiceOutput>} See documentation for detailed structure
|
|
90
76
|
*/
|
|
91
|
-
|
|
77
|
+
const deployService = ({ performImageVersionValidation = true, memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, projectID, region, }) => {
|
|
78
|
+
return (0, exports.internalDeployService)({
|
|
79
|
+
performImageVersionValidation,
|
|
80
|
+
memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
|
|
81
|
+
cpuLimit: cpuLimit !== null && cpuLimit !== void 0 ? cpuLimit : '1.0',
|
|
82
|
+
timeoutSeconds: timeoutSeconds !== null && timeoutSeconds !== void 0 ? timeoutSeconds : constants_1.DEFAULT_TIMEOUT,
|
|
83
|
+
minInstances: minInstances !== null && minInstances !== void 0 ? minInstances : constants_1.DEFAULT_MIN_INSTANCES,
|
|
84
|
+
maxInstances: maxInstances !== null && maxInstances !== void 0 ? maxInstances : constants_1.DEFAULT_MAX_INSTANCES,
|
|
85
|
+
projectID,
|
|
86
|
+
region,
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
exports.deployService = deployService;
|
|
@@ -1,8 +1,45 @@
|
|
|
1
|
-
import type { AudioCodec, ChromiumOptions, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
1
|
+
import type { AudioCodec, ChromiumOptions, ColorSpace, Crf, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
3
|
import type { CloudRunCrashResponse, RenderMediaOnCloudrunOutput } from '../functions/helpers/payloads';
|
|
4
4
|
import type { GcpRegion } from '../pricing/gcp-regions';
|
|
5
5
|
import type { CloudrunCodec } from '../shared/validate-gcp-codec';
|
|
6
|
+
type InternalRenderMediaOnCloudrun = {
|
|
7
|
+
cloudRunUrl: string | undefined;
|
|
8
|
+
serviceName: string | undefined;
|
|
9
|
+
region: GcpRegion;
|
|
10
|
+
serveUrl: string;
|
|
11
|
+
composition: string;
|
|
12
|
+
inputProps: Record<string, unknown>;
|
|
13
|
+
privacy: 'public' | 'private' | undefined;
|
|
14
|
+
forceBucketName: string | undefined;
|
|
15
|
+
outName: string | undefined;
|
|
16
|
+
updateRenderProgress: ((progress: number, error?: boolean) => void) | undefined;
|
|
17
|
+
codec: CloudrunCodec;
|
|
18
|
+
audioCodec: AudioCodec | undefined;
|
|
19
|
+
jpegQuality: number | undefined;
|
|
20
|
+
audioBitrate: string | null;
|
|
21
|
+
videoBitrate: string | null;
|
|
22
|
+
proResProfile: ProResProfile | undefined;
|
|
23
|
+
x264Preset: X264Preset | undefined;
|
|
24
|
+
crf: Crf | null;
|
|
25
|
+
pixelFormat: PixelFormat | undefined;
|
|
26
|
+
imageFormat: VideoImageFormat | undefined;
|
|
27
|
+
scale: number | undefined;
|
|
28
|
+
everyNthFrame: number | undefined;
|
|
29
|
+
numberOfGifLoops: number | null;
|
|
30
|
+
frameRange: FrameRange | undefined;
|
|
31
|
+
envVariables: Record<string, string> | undefined;
|
|
32
|
+
chromiumOptions: ChromiumOptions | undefined;
|
|
33
|
+
muted: boolean | undefined;
|
|
34
|
+
forceWidth: number | null;
|
|
35
|
+
forceHeight?: number | null;
|
|
36
|
+
logLevel: LogLevel | undefined;
|
|
37
|
+
delayRenderTimeoutInMilliseconds: number | undefined;
|
|
38
|
+
concurrency: number | string | null;
|
|
39
|
+
enforceAudioTrack: boolean | undefined;
|
|
40
|
+
preferLossless: boolean | undefined;
|
|
41
|
+
colorSpace: ColorSpace | undefined;
|
|
42
|
+
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
6
43
|
export type RenderMediaOnCloudrunInput = {
|
|
7
44
|
cloudRunUrl?: string;
|
|
8
45
|
serviceName?: string;
|
|
@@ -39,7 +76,8 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
39
76
|
enforceAudioTrack?: boolean;
|
|
40
77
|
preferLossless?: boolean;
|
|
41
78
|
colorSpace?: ColorSpace;
|
|
42
|
-
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.
|
|
79
|
+
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnCloudRun>>;
|
|
80
|
+
export declare const internalRenderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }: InternalRenderMediaOnCloudrun) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
43
81
|
/**
|
|
44
82
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
45
83
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
|
|
@@ -80,3 +118,4 @@ export type RenderMediaOnCloudrunInput = {
|
|
|
80
118
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
81
119
|
*/
|
|
82
120
|
export declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }: RenderMediaOnCloudrunInput) => Promise<RenderMediaOnCloudrunOutput | CloudRunCrashResponse>;
|
|
121
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderMediaOnCloudrun = void 0;
|
|
3
|
+
exports.renderMediaOnCloudrun = exports.internalRenderMediaOnCloudrun = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const pure_1 = require("@remotion/renderer/pure");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
@@ -10,7 +10,7 @@ const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
|
10
10
|
const get_or_create_bucket_1 = require("./get-or-create-bucket");
|
|
11
11
|
const get_auth_client_for_url_1 = require("./helpers/get-auth-client-for-url");
|
|
12
12
|
const get_cloudrun_endpoint_1 = require("./helpers/get-cloudrun-endpoint");
|
|
13
|
-
const
|
|
13
|
+
const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
14
14
|
const actualCodec = (0, validate_gcp_codec_1.validateCloudrunCodec)(codec);
|
|
15
15
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
16
16
|
if (privacy)
|
|
@@ -121,6 +121,7 @@ const renderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serv
|
|
|
121
121
|
});
|
|
122
122
|
return renderResponse;
|
|
123
123
|
};
|
|
124
|
+
exports.internalRenderMediaOnCloudrun = pure_1.PureJSAPIs.wrapWithErrorHandling(internalRenderMediaOnCloudrunRaw);
|
|
124
125
|
/**
|
|
125
126
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
126
127
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
|
|
@@ -160,4 +161,44 @@ const renderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serv
|
|
|
160
161
|
* @param params.preferLossless Uses a lossless audio codec, if one is available for the codec. If you set audioCodec, it takes priority over preferLossless.
|
|
161
162
|
* @returns {Promise<RenderMediaOnCloudrunOutput>} See documentation for detailed structure
|
|
162
163
|
*/
|
|
163
|
-
|
|
164
|
+
const renderMediaOnCloudrun = ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, }) => {
|
|
165
|
+
return (0, exports.internalRenderMediaOnCloudrun)({
|
|
166
|
+
cloudRunUrl: cloudRunUrl !== null && cloudRunUrl !== void 0 ? cloudRunUrl : undefined,
|
|
167
|
+
serviceName: serviceName !== null && serviceName !== void 0 ? serviceName : undefined,
|
|
168
|
+
region,
|
|
169
|
+
serveUrl,
|
|
170
|
+
composition,
|
|
171
|
+
inputProps: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
172
|
+
codec,
|
|
173
|
+
forceBucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : undefined,
|
|
174
|
+
privacy: privacy !== null && privacy !== void 0 ? privacy : undefined,
|
|
175
|
+
outName: outName !== null && outName !== void 0 ? outName : undefined,
|
|
176
|
+
updateRenderProgress: updateRenderProgress !== null && updateRenderProgress !== void 0 ? updateRenderProgress : undefined,
|
|
177
|
+
jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : undefined,
|
|
178
|
+
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : undefined,
|
|
179
|
+
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
180
|
+
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
181
|
+
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : undefined,
|
|
182
|
+
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : undefined,
|
|
183
|
+
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
184
|
+
pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat : undefined,
|
|
185
|
+
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : undefined,
|
|
186
|
+
scale: scale !== null && scale !== void 0 ? scale : undefined,
|
|
187
|
+
everyNthFrame: everyNthFrame !== null && everyNthFrame !== void 0 ? everyNthFrame : undefined,
|
|
188
|
+
numberOfGifLoops: numberOfGifLoops !== null && numberOfGifLoops !== void 0 ? numberOfGifLoops : null,
|
|
189
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : undefined,
|
|
190
|
+
envVariables: envVariables !== null && envVariables !== void 0 ? envVariables : undefined,
|
|
191
|
+
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : undefined,
|
|
192
|
+
muted: muted !== null && muted !== void 0 ? muted : undefined,
|
|
193
|
+
forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
|
|
194
|
+
forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
|
|
195
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : undefined,
|
|
196
|
+
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : undefined,
|
|
197
|
+
concurrency: concurrency !== null && concurrency !== void 0 ? concurrency : null,
|
|
198
|
+
enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : undefined,
|
|
199
|
+
preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : undefined,
|
|
200
|
+
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : undefined,
|
|
201
|
+
colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : undefined,
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
exports.renderMediaOnCloudrun = renderMediaOnCloudrun;
|
|
@@ -25,7 +25,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
25
25
|
});
|
|
26
26
|
const imageFormat = args_1.parsedCloudrunCli['image-format'];
|
|
27
27
|
const audioCodec = args_1.parsedCloudrunCli['audio-codec'];
|
|
28
|
-
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, puppeteerTimeout, pixelFormat, proResProfile, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, height, width, browserExecutable, port, enforceAudioTrack, offthreadVideoCacheSizeInBytes, } = await cli_1.CliInternals.getCliOptions({
|
|
28
|
+
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, puppeteerTimeout, pixelFormat, proResProfile, x264Preset, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, audioBitrate, videoBitrate, height, width, browserExecutable, port, enforceAudioTrack, offthreadVideoCacheSizeInBytes, colorSpace, } = await cli_1.CliInternals.getCliOptions({
|
|
29
29
|
type: 'series',
|
|
30
30
|
isLambda: true,
|
|
31
31
|
remotionRoot,
|
|
@@ -116,41 +116,45 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
116
116
|
updateProgress();
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
const res = await (0, render_media_on_cloudrun_1.
|
|
119
|
+
const res = await (0, render_media_on_cloudrun_1.internalRenderMediaOnCloudrun)({
|
|
120
120
|
cloudRunUrl,
|
|
121
|
-
|
|
121
|
+
serviceName: undefined,
|
|
122
122
|
region,
|
|
123
|
+
serveUrl,
|
|
124
|
+
composition,
|
|
123
125
|
inputProps,
|
|
124
126
|
codec: codec,
|
|
125
|
-
|
|
126
|
-
crf: crf !== null && crf !== void 0 ? crf : undefined,
|
|
127
|
-
envVariables,
|
|
128
|
-
pixelFormat,
|
|
129
|
-
proResProfile,
|
|
130
|
-
jpegQuality,
|
|
131
|
-
composition,
|
|
127
|
+
forceBucketName,
|
|
132
128
|
privacy,
|
|
133
|
-
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : undefined,
|
|
134
129
|
outName,
|
|
135
|
-
|
|
130
|
+
updateRenderProgress,
|
|
131
|
+
jpegQuality,
|
|
132
|
+
audioCodec,
|
|
133
|
+
audioBitrate,
|
|
134
|
+
videoBitrate,
|
|
135
|
+
proResProfile,
|
|
136
|
+
x264Preset,
|
|
137
|
+
crf,
|
|
138
|
+
pixelFormat,
|
|
139
|
+
imageFormat,
|
|
136
140
|
scale,
|
|
137
|
-
numberOfGifLoops,
|
|
138
141
|
everyNthFrame,
|
|
142
|
+
numberOfGifLoops,
|
|
143
|
+
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : undefined,
|
|
144
|
+
envVariables,
|
|
145
|
+
chromiumOptions,
|
|
139
146
|
muted,
|
|
140
|
-
audioBitrate,
|
|
141
|
-
videoBitrate,
|
|
142
|
-
forceHeight: height,
|
|
143
147
|
forceWidth: width,
|
|
144
|
-
|
|
145
|
-
forceBucketName,
|
|
146
|
-
updateRenderProgress,
|
|
148
|
+
forceHeight: height,
|
|
147
149
|
logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
|
|
150
|
+
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
148
151
|
// Special case: Should not use default local concurrency, or from
|
|
149
152
|
// config file, just when explicitly set
|
|
150
153
|
concurrency: (_b = cli_1.CliInternals.parsedCli.concurrency) !== null && _b !== void 0 ? _b : null,
|
|
151
|
-
delayRenderTimeoutInMilliseconds: puppeteerTimeout,
|
|
152
154
|
enforceAudioTrack,
|
|
153
155
|
preferLossless: false,
|
|
156
|
+
offthreadVideoCacheSizeInBytes,
|
|
157
|
+
colorSpace,
|
|
154
158
|
});
|
|
155
159
|
if (res.type === 'crash') {
|
|
156
160
|
(0, cloudrun_crash_logs_1.displayCrashLogs)(res);
|
|
@@ -15,7 +15,7 @@ const quit_1 = require("../../helpers/quit");
|
|
|
15
15
|
const log_1 = require("../../log");
|
|
16
16
|
exports.CLOUD_RUN_DEPLOY_SUBCOMMAND = 'deploy';
|
|
17
17
|
const cloudRunDeploySubcommand = async () => {
|
|
18
|
-
var _a, _b, _c, _d, _e;
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
19
19
|
const region = (0, get_gcp_region_1.getGcpRegion)();
|
|
20
20
|
const projectID = process.env.REMOTION_GCP_PROJECT_ID;
|
|
21
21
|
const memoryLimit = String((_a = args_1.parsedCloudrunCli.memoryLimit) !== null && _a !== void 0 ? _a : '2Gi');
|
|
@@ -52,11 +52,13 @@ ${[
|
|
|
52
52
|
log_1.Log.info(cli_1.CliInternals.chalk.white('\nDeploying Cloud Run Service...'));
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
|
-
const deployResult = await (0, deploy_service_1.
|
|
55
|
+
const deployResult = await (0, deploy_service_1.internalDeployService)({
|
|
56
56
|
performImageVersionValidation: false,
|
|
57
|
-
memoryLimit,
|
|
58
|
-
cpuLimit,
|
|
59
|
-
timeoutSeconds,
|
|
57
|
+
memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
|
|
58
|
+
cpuLimit: cpuLimit !== null && cpuLimit !== void 0 ? cpuLimit : '1.0',
|
|
59
|
+
timeoutSeconds: timeoutSeconds !== null && timeoutSeconds !== void 0 ? timeoutSeconds : constants_1.DEFAULT_TIMEOUT,
|
|
60
|
+
minInstances: (_f = Number(minInstances)) !== null && _f !== void 0 ? _f : constants_1.DEFAULT_MIN_INSTANCES,
|
|
61
|
+
maxInstances: (_g = Number(maxInstances)) !== null && _g !== void 0 ? _g : constants_1.DEFAULT_MAX_INSTANCES,
|
|
60
62
|
projectID,
|
|
61
63
|
region,
|
|
62
64
|
});
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -2,24 +2,24 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
errorAdvanced: (options: {
|
|
21
21
|
indent: boolean;
|
|
22
|
-
logLevel: "
|
|
22
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
23
23
|
} & {
|
|
24
24
|
tag?: string | undefined;
|
|
25
25
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
@@ -52,34 +52,34 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
52
52
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
53
53
|
colorSpace: z.ZodEnum<["default", "bt709"]>;
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
type: "media";
|
|
56
55
|
serveUrl: string;
|
|
56
|
+
envVariables: Record<string, string>;
|
|
57
|
+
jpegQuality: number;
|
|
58
|
+
scale: number;
|
|
59
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
60
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
61
|
+
type: "media";
|
|
57
62
|
composition: string;
|
|
63
|
+
imageFormat: "png" | "jpeg" | "none";
|
|
64
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
58
65
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
59
|
-
serializedInputPropsWithCustomSchema: string;
|
|
60
|
-
jpegQuality: number;
|
|
61
|
-
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
62
|
-
audioBitrate: string | null;
|
|
63
|
-
videoBitrate: string | null;
|
|
64
66
|
crf: number | null;
|
|
67
|
+
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
65
68
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
66
|
-
imageFormat: "png" | "jpeg" | "none";
|
|
67
|
-
scale: number;
|
|
68
69
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
69
|
-
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
70
|
+
x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
70
71
|
everyNthFrame: number;
|
|
71
72
|
numberOfGifLoops: number | null;
|
|
72
|
-
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
73
|
-
envVariables: Record<string, string>;
|
|
74
73
|
muted: boolean;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
delayRenderTimeoutInMilliseconds: number;
|
|
78
|
-
concurrency: string | number | null;
|
|
74
|
+
audioBitrate: string | null;
|
|
75
|
+
videoBitrate: string | null;
|
|
79
76
|
enforceAudioTrack: boolean;
|
|
80
|
-
preferLossless: boolean;
|
|
81
|
-
offthreadVideoCacheSizeInBytes: number | null;
|
|
82
77
|
colorSpace: "default" | "bt709";
|
|
78
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
79
|
+
concurrency: string | number | null;
|
|
80
|
+
preferLossless: boolean;
|
|
81
|
+
serializedInputPropsWithCustomSchema: string;
|
|
82
|
+
outputBucket: string;
|
|
83
83
|
forceHeight?: number | null | undefined;
|
|
84
84
|
forceWidth?: number | null | undefined;
|
|
85
85
|
chromiumOptions?: {
|
|
@@ -92,34 +92,34 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
92
92
|
outName?: string | undefined;
|
|
93
93
|
privacy?: "public" | "private" | undefined;
|
|
94
94
|
}, {
|
|
95
|
-
type: "media";
|
|
96
95
|
serveUrl: string;
|
|
96
|
+
envVariables: Record<string, string>;
|
|
97
|
+
jpegQuality: number;
|
|
98
|
+
scale: number;
|
|
99
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
100
|
+
offthreadVideoCacheSizeInBytes: number | null;
|
|
101
|
+
type: "media";
|
|
97
102
|
composition: string;
|
|
103
|
+
imageFormat: "png" | "jpeg" | "none";
|
|
104
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
98
105
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
99
|
-
serializedInputPropsWithCustomSchema: string;
|
|
100
|
-
jpegQuality: number;
|
|
101
|
-
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
102
|
-
audioBitrate: string | null;
|
|
103
|
-
videoBitrate: string | null;
|
|
104
106
|
crf: number | null;
|
|
107
|
+
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
105
108
|
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
106
|
-
imageFormat: "png" | "jpeg" | "none";
|
|
107
|
-
scale: number;
|
|
108
109
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
109
|
-
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "
|
|
110
|
+
x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
110
111
|
everyNthFrame: number;
|
|
111
112
|
numberOfGifLoops: number | null;
|
|
112
|
-
frameRange: ((number | [number, number]) & (number | [number, number] | undefined)) | null;
|
|
113
|
-
envVariables: Record<string, string>;
|
|
114
113
|
muted: boolean;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
delayRenderTimeoutInMilliseconds: number;
|
|
118
|
-
concurrency: string | number | null;
|
|
114
|
+
audioBitrate: string | null;
|
|
115
|
+
videoBitrate: string | null;
|
|
119
116
|
enforceAudioTrack: boolean;
|
|
120
|
-
preferLossless: boolean;
|
|
121
|
-
offthreadVideoCacheSizeInBytes: number | null;
|
|
122
117
|
colorSpace: "default" | "bt709";
|
|
118
|
+
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
119
|
+
concurrency: string | number | null;
|
|
120
|
+
preferLossless: boolean;
|
|
121
|
+
serializedInputPropsWithCustomSchema: string;
|
|
122
|
+
outputBucket: string;
|
|
123
123
|
forceHeight?: number | null | undefined;
|
|
124
124
|
forceWidth?: number | null | undefined;
|
|
125
125
|
chromiumOptions?: {
|
|
@@ -169,19 +169,19 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
169
169
|
logLevel: z.ZodEnum<["verbose", "info", "warn", "error"]>;
|
|
170
170
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
171
171
|
}, "strip", z.ZodTypeAny, {
|
|
172
|
-
|
|
172
|
+
privacy: "public" | "private";
|
|
173
173
|
serveUrl: string;
|
|
174
|
-
composition: string;
|
|
175
|
-
serializedInputPropsWithCustomSchema: string;
|
|
176
|
-
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
177
|
-
scale: number;
|
|
178
174
|
envVariables: Record<string, string>;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
logLevel: "error" | "verbose" | "info" | "warn";
|
|
182
|
-
delayRenderTimeoutInMilliseconds: number;
|
|
175
|
+
scale: number;
|
|
176
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
183
177
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
178
|
+
type: "still";
|
|
179
|
+
composition: string;
|
|
180
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
184
181
|
frame: number;
|
|
182
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
183
|
+
serializedInputPropsWithCustomSchema: string;
|
|
184
|
+
outputBucket: string;
|
|
185
185
|
forceHeight?: number | null | undefined;
|
|
186
186
|
forceWidth?: number | null | undefined;
|
|
187
187
|
jpegQuality?: number | undefined;
|
|
@@ -194,19 +194,19 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
194
194
|
} | undefined;
|
|
195
195
|
outName?: string | undefined;
|
|
196
196
|
}, {
|
|
197
|
-
|
|
197
|
+
privacy: "public" | "private";
|
|
198
198
|
serveUrl: string;
|
|
199
|
-
composition: string;
|
|
200
|
-
serializedInputPropsWithCustomSchema: string;
|
|
201
|
-
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
202
|
-
scale: number;
|
|
203
199
|
envVariables: Record<string, string>;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
logLevel: "error" | "verbose" | "info" | "warn";
|
|
207
|
-
delayRenderTimeoutInMilliseconds: number;
|
|
200
|
+
scale: number;
|
|
201
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
208
202
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
203
|
+
type: "still";
|
|
204
|
+
composition: string;
|
|
205
|
+
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
209
206
|
frame: number;
|
|
207
|
+
delayRenderTimeoutInMilliseconds: number;
|
|
208
|
+
serializedInputPropsWithCustomSchema: string;
|
|
209
|
+
outputBucket: string;
|
|
210
210
|
forceHeight?: number | null | undefined;
|
|
211
211
|
forceWidth?: number | null | undefined;
|
|
212
212
|
jpegQuality?: number | undefined;
|
|
@@ -244,16 +244,16 @@ declare const renderStillOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
244
244
|
renderId: z.ZodString;
|
|
245
245
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
246
246
|
}, "strip", z.ZodTypeAny, {
|
|
247
|
-
type: "success";
|
|
248
247
|
privacy: "public-read" | "project-private";
|
|
248
|
+
type: "success";
|
|
249
249
|
cloudStorageUri: string;
|
|
250
250
|
size: number;
|
|
251
251
|
bucketName: string;
|
|
252
252
|
renderId: string;
|
|
253
253
|
publicUrl?: string | null | undefined;
|
|
254
254
|
}, {
|
|
255
|
-
type: "success";
|
|
256
255
|
privacy: "public-read" | "project-private";
|
|
256
|
+
type: "success";
|
|
257
257
|
cloudStorageUri: string;
|
|
258
258
|
size: number;
|
|
259
259
|
bucketName: string;
|
|
@@ -269,16 +269,16 @@ declare const renderMediaOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
269
269
|
renderId: z.ZodString;
|
|
270
270
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
271
271
|
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
type: "success";
|
|
273
272
|
privacy: "public-read" | "project-private";
|
|
273
|
+
type: "success";
|
|
274
274
|
cloudStorageUri: string;
|
|
275
275
|
size: number;
|
|
276
276
|
bucketName: string;
|
|
277
277
|
renderId: string;
|
|
278
278
|
publicUrl?: string | null | undefined;
|
|
279
279
|
}, {
|
|
280
|
-
type: "success";
|
|
281
280
|
privacy: "public-read" | "project-private";
|
|
281
|
+
type: "success";
|
|
282
282
|
cloudStorageUri: string;
|
|
283
283
|
size: number;
|
|
284
284
|
bucketName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.32",
|
|
4
4
|
"description": "GCP Cloud Run alternative to lambda rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@google-cloud/logging": "^10.5.0",
|
|
13
13
|
"google-auth-library": "^8.7.0",
|
|
14
14
|
"zod": "^3.21.4",
|
|
15
|
-
"@remotion/bundler": "4.0.
|
|
16
|
-
"remotion": "4.0.
|
|
17
|
-
"
|
|
18
|
-
"@remotion/renderer": "4.0.
|
|
15
|
+
"@remotion/bundler": "4.0.32",
|
|
16
|
+
"@remotion/cli": "4.0.32",
|
|
17
|
+
"remotion": "4.0.32",
|
|
18
|
+
"@remotion/renderer": "4.0.32"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prettier-plugin-organize-imports": "^3.2.2",
|
|
27
27
|
"ts-node": "^10.8.0",
|
|
28
28
|
"vitest": "0.24.3",
|
|
29
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
29
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.32"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|