@remotion/cloudrun 4.0.41 → 4.0.43
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/.turbo/turbo-lint.log +5 -0
- package/dist/admin/bundle-renderLogic.js +2 -0
- package/dist/api/get-service-info.js +2 -1
- package/dist/api/helpers/construct-service-deploy-request.js +2 -1
- package/dist/api/helpers/lifecycle-rules.d.ts +0 -0
- package/dist/api/helpers/lifecycle-rules.js +1 -0
- package/dist/api/helpers/parse-service-name.js +2 -1
- package/dist/api/test/service-names.test.js +2 -1
- package/dist/cli/commands/services/deploy.js +2 -1
- package/dist/cli/helpers/make-console-url.d.ts +2 -0
- package/dist/cli/helpers/make-console-url.js +7 -0
- package/dist/functions/helpers/get-composition-from-body.js +4 -1
- package/dist/functions/helpers/payloads.d.ts +16 -16
- package/dist/functions/render-media-single-thread.js +1 -0
- package/dist/functions/render-still-single-thread.js +1 -0
- 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.42 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.42 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.42 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
|
@@ -29,11 +29,13 @@ const bundleRenderLogic = async () => {
|
|
|
29
29
|
'./compositor.exe',
|
|
30
30
|
'./ffmpeg/remotion/bin/ffmpeg',
|
|
31
31
|
'./ffmpeg/remotion/bin/ffprobe',
|
|
32
|
+
'./mappings.wasm',
|
|
32
33
|
],
|
|
33
34
|
});
|
|
34
35
|
const compositorFile = `${outdir}/compositor`;
|
|
35
36
|
fs_1.default.copyFileSync(compositor_linux_x64_gnu_1.binaryPath, compositorFile);
|
|
36
37
|
fs_1.default.cpSync(compositor_linux_x64_gnu_1.ffmpegCwd, `${outdir}/ffmpeg`, { recursive: true });
|
|
38
|
+
fs_1.default.cpSync(path_1.default.join(__dirname, '..', '..', '..', 'renderer', 'node_modules', 'source-map', 'lib', 'mappings.wasm'), `${outdir}/mappings.wasm`);
|
|
37
39
|
console.log('distribution bundled.');
|
|
38
40
|
};
|
|
39
41
|
bundleRenderLogic();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getServiceInfo = void 0;
|
|
4
|
+
const make_console_url_1 = require("../cli/helpers/make-console-url");
|
|
4
5
|
const get_cloud_run_client_1 = require("./helpers/get-cloud-run-client");
|
|
5
6
|
const parse_service_name_1 = require("./helpers/parse-service-name");
|
|
6
7
|
/**
|
|
@@ -28,7 +29,7 @@ const getServiceInfo = async ({ region, serviceName, }) => {
|
|
|
28
29
|
remotionVersion,
|
|
29
30
|
uri: service.uri,
|
|
30
31
|
region: deployedRegion,
|
|
31
|
-
consoleUrl:
|
|
32
|
+
consoleUrl: (0, make_console_url_1.makeConsoleUrl)(deployedRegion, deployedServiceName),
|
|
32
33
|
};
|
|
33
34
|
};
|
|
34
35
|
exports.getServiceInfo = getServiceInfo;
|
|
@@ -10,6 +10,7 @@ var ExecutionEnvironment;
|
|
|
10
10
|
ExecutionEnvironment[ExecutionEnvironment["EXECUTION_ENVIRONMENT_GEN2"] = 2] = "EXECUTION_ENVIRONMENT_GEN2";
|
|
11
11
|
})(ExecutionEnvironment || (ExecutionEnvironment = {}));
|
|
12
12
|
const constructServiceTemplate = ({ memoryLimit, cpuLimit, timeoutSeconds, minInstances, maxInstances, }) => {
|
|
13
|
+
var _a;
|
|
13
14
|
return {
|
|
14
15
|
scaling: {
|
|
15
16
|
minInstanceCount: minInstances,
|
|
@@ -20,7 +21,7 @@ const constructServiceTemplate = ({ memoryLimit, cpuLimit, timeoutSeconds, minIn
|
|
|
20
21
|
},
|
|
21
22
|
containers: [
|
|
22
23
|
{
|
|
23
|
-
image: `us-docker.pkg.dev/remotion-dev
|
|
24
|
+
image: `us-docker.pkg.dev/remotion-dev/${(_a = process.env.ARTIFACT_REGISTRY_ENV) !== null && _a !== void 0 ? _a : 'production'}/render:${version_1.VERSION}`,
|
|
24
25
|
resources: {
|
|
25
26
|
limits: {
|
|
26
27
|
memory: memoryLimit,
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseServiceName = exports.getGcpParent = void 0;
|
|
4
|
+
const make_console_url_1 = require("../../cli/helpers/make-console-url");
|
|
4
5
|
const getGcpParent = (region) => {
|
|
5
6
|
const parent = `projects/${process.env.REMOTION_GCP_PROJECT_ID}/locations/${region}`;
|
|
6
7
|
return parent;
|
|
@@ -18,7 +19,7 @@ const parseServiceName = (fullServiceName, region) => {
|
|
|
18
19
|
serviceName: shortServiceName,
|
|
19
20
|
remotionVersion: matched[1],
|
|
20
21
|
region: deployedRegion,
|
|
21
|
-
consoleUrl:
|
|
22
|
+
consoleUrl: (0, make_console_url_1.makeConsoleUrl)(deployedRegion, shortServiceName),
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
25
|
exports.parseServiceName = parseServiceName;
|
|
@@ -16,9 +16,10 @@ process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-project';
|
|
|
16
16
|
});
|
|
17
17
|
(0, vitest_1.expect)(shortServiceName).toBe(`remotion-${remotion_1.VERSION.replace(/\./g, '-')}-mem100000k-cpu8-0-t3600`);
|
|
18
18
|
const fullServiceName = `${(0, parse_service_name_1.getGcpParent)(region)}/services/${shortServiceName}`;
|
|
19
|
+
process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-project';
|
|
19
20
|
const parsed = (0, parse_service_name_1.parseServiceName)(fullServiceName, region);
|
|
20
21
|
(0, vitest_1.expect)(parsed).toEqual({
|
|
21
|
-
consoleUrl: `https://console.cloud.google.com/run/detail/asia-east1/remotion-${dashedVersion}-mem100000k-cpu8-0-t3600/logs`,
|
|
22
|
+
consoleUrl: `https://console.cloud.google.com/run/detail/asia-east1/remotion-${dashedVersion}-mem100000k-cpu8-0-t3600/logs?project=remotion-test-project`,
|
|
22
23
|
region: 'asia-east1',
|
|
23
24
|
remotionVersion: remotion_1.VERSION.replace(/\./g, '-'),
|
|
24
25
|
serviceName: `remotion-${dashedVersion}-mem100000k-cpu8-0-t3600`,
|
|
@@ -11,6 +11,7 @@ const validate_gcp_region_1 = require("../../../shared/validate-gcp-region");
|
|
|
11
11
|
const validate_image_remotion_version_1 = require("../../../shared/validate-image-remotion-version");
|
|
12
12
|
const args_1 = require("../../args");
|
|
13
13
|
const get_gcp_region_1 = require("../../get-gcp-region");
|
|
14
|
+
const make_console_url_1 = require("../../helpers/make-console-url");
|
|
14
15
|
const quit_1 = require("../../helpers/quit");
|
|
15
16
|
const log_1 = require("../../log");
|
|
16
17
|
exports.CLOUD_RUN_DEPLOY_SUBCOMMAND = 'deploy';
|
|
@@ -73,7 +74,7 @@ ${[
|
|
|
73
74
|
if (!deployResult.alreadyExists && !deployResult.uri) {
|
|
74
75
|
log_1.Log.error('service uri not returned from Cloud Run API.');
|
|
75
76
|
}
|
|
76
|
-
const consoleUrl =
|
|
77
|
+
const consoleUrl = (0, make_console_url_1.makeConsoleUrl)(region, deployResult.shortName);
|
|
77
78
|
if (deployResult.alreadyExists) {
|
|
78
79
|
log_1.Log.info();
|
|
79
80
|
if (cli_1.CliInternals.quietFlagProvided()) {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeConsoleUrl = void 0;
|
|
4
|
+
const makeConsoleUrl = (region, shortName) => {
|
|
5
|
+
return `https://console.cloud.google.com/run/detail/${region}/${shortName}/logs?project=${process.env.REMOTION_GCP_PROJECT_ID}`;
|
|
6
|
+
};
|
|
7
|
+
exports.makeConsoleUrl = makeConsoleUrl;
|
|
@@ -7,7 +7,10 @@ const getCompositionFromBody = async (body) => {
|
|
|
7
7
|
const { metadata, propsSize } = await renderer_1.RenderInternals.internalSelectComposition({
|
|
8
8
|
serveUrl: body.serveUrl,
|
|
9
9
|
browserExecutable: null,
|
|
10
|
-
chromiumOptions:
|
|
10
|
+
chromiumOptions: {
|
|
11
|
+
...((_a = body.chromiumOptions) !== null && _a !== void 0 ? _a : {}),
|
|
12
|
+
enableMultiProcessOnLinux: false,
|
|
13
|
+
},
|
|
11
14
|
envVariables: (_b = body.envVariables) !== null && _b !== void 0 ? _b : {},
|
|
12
15
|
id: body.composition,
|
|
13
16
|
indent: false,
|
|
@@ -52,8 +52,8 @@ 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
|
+
type: "media";
|
|
57
57
|
composition: string;
|
|
58
58
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
59
59
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -92,8 +92,8 @@ 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
|
+
type: "media";
|
|
97
97
|
composition: string;
|
|
98
98
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
99
99
|
serializedInputPropsWithCustomSchema: string;
|
|
@@ -169,8 +169,8 @@ 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
|
-
type: "still";
|
|
173
172
|
serveUrl: string;
|
|
173
|
+
type: "still";
|
|
174
174
|
composition: string;
|
|
175
175
|
serializedInputPropsWithCustomSchema: string;
|
|
176
176
|
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
@@ -194,8 +194,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
194
194
|
} | undefined;
|
|
195
195
|
outName?: string | undefined;
|
|
196
196
|
}, {
|
|
197
|
-
type: "still";
|
|
198
197
|
serveUrl: string;
|
|
198
|
+
type: "still";
|
|
199
199
|
composition: string;
|
|
200
200
|
serializedInputPropsWithCustomSchema: string;
|
|
201
201
|
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
@@ -225,13 +225,13 @@ declare const renderFailResponsePayload: z.ZodObject<{
|
|
|
225
225
|
name: z.ZodString;
|
|
226
226
|
stack: z.ZodString;
|
|
227
227
|
}, "strip", z.ZodTypeAny, {
|
|
228
|
-
type: "error";
|
|
229
228
|
message: string;
|
|
229
|
+
type: "error";
|
|
230
230
|
name: string;
|
|
231
231
|
stack: string;
|
|
232
232
|
}, {
|
|
233
|
-
type: "error";
|
|
234
233
|
message: string;
|
|
234
|
+
type: "error";
|
|
235
235
|
name: string;
|
|
236
236
|
stack: string;
|
|
237
237
|
}>;
|
|
@@ -244,19 +244,19 @@ 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
|
+
bucketName: string;
|
|
248
|
+
size: number;
|
|
247
249
|
type: "success";
|
|
248
250
|
privacy: "public-read" | "project-private";
|
|
249
251
|
cloudStorageUri: string;
|
|
250
|
-
size: number;
|
|
251
|
-
bucketName: string;
|
|
252
252
|
renderId: string;
|
|
253
253
|
publicUrl?: string | null | undefined;
|
|
254
254
|
}, {
|
|
255
|
+
bucketName: string;
|
|
256
|
+
size: number;
|
|
255
257
|
type: "success";
|
|
256
258
|
privacy: "public-read" | "project-private";
|
|
257
259
|
cloudStorageUri: string;
|
|
258
|
-
size: number;
|
|
259
|
-
bucketName: string;
|
|
260
260
|
renderId: string;
|
|
261
261
|
publicUrl?: string | null | undefined;
|
|
262
262
|
}>;
|
|
@@ -269,19 +269,19 @@ 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
|
+
bucketName: string;
|
|
273
|
+
size: number;
|
|
272
274
|
type: "success";
|
|
273
275
|
privacy: "public-read" | "project-private";
|
|
274
276
|
cloudStorageUri: string;
|
|
275
|
-
size: number;
|
|
276
|
-
bucketName: string;
|
|
277
277
|
renderId: string;
|
|
278
278
|
publicUrl?: string | null | undefined;
|
|
279
279
|
}, {
|
|
280
|
+
bucketName: string;
|
|
281
|
+
size: number;
|
|
280
282
|
type: "success";
|
|
281
283
|
privacy: "public-read" | "project-private";
|
|
282
284
|
cloudStorageUri: string;
|
|
283
|
-
size: number;
|
|
284
|
-
bucketName: string;
|
|
285
285
|
renderId: string;
|
|
286
286
|
publicUrl?: string | null | undefined;
|
|
287
287
|
}>;
|
|
@@ -293,15 +293,15 @@ declare const cloudRunCrashResponse: z.ZodObject<{
|
|
|
293
293
|
requestCrashTime: z.ZodString;
|
|
294
294
|
requestElapsedTimeInSeconds: z.ZodNumber;
|
|
295
295
|
}, "strip", z.ZodTypeAny, {
|
|
296
|
-
type: "crash";
|
|
297
296
|
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
297
|
+
type: "crash";
|
|
298
298
|
cloudRunEndpoint: string;
|
|
299
299
|
requestStartTime: string;
|
|
300
300
|
requestCrashTime: string;
|
|
301
301
|
requestElapsedTimeInSeconds: number;
|
|
302
302
|
}, {
|
|
303
|
-
type: "crash";
|
|
304
303
|
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
304
|
+
type: "crash";
|
|
305
305
|
cloudRunEndpoint: string;
|
|
306
306
|
requestStartTime: string;
|
|
307
307
|
requestCrashTime: string;
|
|
@@ -29,6 +29,7 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
29
29
|
...body.chromiumOptions,
|
|
30
30
|
// Override the `null` value, which might come from CLI with swANGLE
|
|
31
31
|
gl: (_b = (_a = body.chromiumOptions) === null || _a === void 0 ? void 0 : _a.gl) !== null && _b !== void 0 ? _b : 'swangle',
|
|
32
|
+
enableMultiProcessOnLinux: true,
|
|
32
33
|
};
|
|
33
34
|
await renderer_1.RenderInternals.internalRenderMedia({
|
|
34
35
|
composition: {
|
|
@@ -23,6 +23,7 @@ const renderStillSingleThread = async (body, res) => {
|
|
|
23
23
|
...body.chromiumOptions,
|
|
24
24
|
// Override the `null` value, which might come from CLI with swANGLE
|
|
25
25
|
gl: (_b = (_a = body.chromiumOptions) === null || _a === void 0 ? void 0 : _a.gl) !== null && _b !== void 0 ? _b : 'swangle',
|
|
26
|
+
enableMultiProcessOnLinux: true,
|
|
26
27
|
};
|
|
27
28
|
await renderer_1.RenderInternals.internalRenderStill({
|
|
28
29
|
composition: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.43",
|
|
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": "4.0.
|
|
16
|
-
"@remotion/
|
|
17
|
-
"@remotion/
|
|
18
|
-
"
|
|
15
|
+
"@remotion/bundler": "4.0.43",
|
|
16
|
+
"@remotion/renderer": "4.0.43",
|
|
17
|
+
"@remotion/cli": "4.0.43",
|
|
18
|
+
"remotion": "4.0.43"
|
|
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.43"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|