@remotion/cloudrun 4.0.41 → 4.0.42
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/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/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/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.41 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.41 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.41 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,
|
|
@@ -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,
|
|
@@ -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.42",
|
|
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
|
-
"
|
|
18
|
-
"@remotion/bundler": "4.0.
|
|
15
|
+
"@remotion/cli": "4.0.42",
|
|
16
|
+
"@remotion/renderer": "4.0.42",
|
|
17
|
+
"remotion": "4.0.42",
|
|
18
|
+
"@remotion/bundler": "4.0.42"
|
|
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.42"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|