@remotion/cloudrun 4.0.177 → 4.0.179
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 +1 -3
- package/build.ts +4 -2
- package/dist/admin/bundle-installer.d.ts +1 -0
- package/dist/admin/bundle-installer.js +2 -2
- package/dist/admin/bundle-renderLogic.d.ts +1 -1
- package/dist/admin/bundle-renderLogic.js +2 -1
- package/dist/api/test/make-console.test.js +8 -8
- package/dist/api/test/running-in-what-server.test.js +10 -10
- package/dist/api/test/service-names.test.js +5 -5
- package/package.json +15 -17
- package/readme.md +17 -2
- package/.turbo/turbo-test.log +0 -20
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
> @remotion/cloudrun@4.0.
|
|
2
|
+
> @remotion/cloudrun@4.0.178 build /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
3
|
> bun build.ts
|
|
4
4
|
|
|
5
|
-
$ ts-node src/admin/bundle-renderLogic.ts
|
|
6
5
|
distribution bundled.
|
|
7
|
-
$ ts-node src/admin/bundle-installer.ts
|
|
8
6
|
Making reproducible build with gtar
|
package/build.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {$} from 'bun';
|
|
2
|
+
import {bundleInstaller} from './src/admin/bundle-installer';
|
|
3
|
+
import {bundleRenderLogic} from './src/admin/bundle-renderLogic';
|
|
2
4
|
|
|
3
5
|
await $`bun x tsc -d`;
|
|
4
6
|
|
|
5
7
|
const permissions = Bun.file('src/shared/sa-permissions.json');
|
|
6
8
|
await Bun.write('dist/shared/sa-permissions.json', permissions);
|
|
7
9
|
|
|
8
|
-
await
|
|
9
|
-
await
|
|
10
|
+
await bundleRenderLogic();
|
|
11
|
+
await bundleInstaller();
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.hasGTar = void 0;
|
|
6
|
+
exports.bundleInstaller = exports.hasGTar = void 0;
|
|
7
7
|
const bundler_1 = require("@remotion/bundler");
|
|
8
8
|
const child_process_1 = require("child_process");
|
|
9
9
|
const fs_1 = require("fs");
|
|
@@ -52,4 +52,4 @@ const bundleInstaller = async () => {
|
|
|
52
52
|
}
|
|
53
53
|
(0, fs_1.rmSync)(outdir, { recursive: true });
|
|
54
54
|
};
|
|
55
|
-
bundleInstaller
|
|
55
|
+
exports.bundleInstaller = bundleInstaller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const bundleRenderLogic: () => Promise<void>;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.bundleRenderLogic = void 0;
|
|
6
7
|
const bundler_1 = require("@remotion/bundler");
|
|
7
8
|
const compositor_linux_x64_gnu_1 = require("@remotion/compositor-linux-x64-gnu");
|
|
8
9
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -39,4 +40,4 @@ const bundleRenderLogic = async () => {
|
|
|
39
40
|
fs_1.default.cpSync(path_1.default.join(__dirname, '..', '..', '..', 'renderer', 'node_modules', 'source-map', 'lib', 'mappings.wasm'), `${outdir}/mappings.wasm`);
|
|
40
41
|
console.log('distribution bundled.');
|
|
41
42
|
};
|
|
42
|
-
bundleRenderLogic
|
|
43
|
+
exports.bundleRenderLogic = bundleRenderLogic;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const bun_test_1 = require("bun:test");
|
|
4
4
|
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
|
-
(0,
|
|
6
|
+
(0, bun_test_1.beforeEach)(() => {
|
|
7
7
|
delete process.env.GCLOUD_PROJECT;
|
|
8
8
|
delete process.env.REMOTION_GCP_PROJECT_ID;
|
|
9
9
|
delete process.env.K_CONFIGURATION;
|
|
10
10
|
});
|
|
11
|
-
(0,
|
|
11
|
+
(0, bun_test_1.test)('app is in cloud tasks', () => {
|
|
12
12
|
process.env.GCLOUD_PROJECT = 'remotion-test-cloudtask';
|
|
13
13
|
process.env.K_CONFIGURATION = 'config';
|
|
14
14
|
const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
|
|
15
|
-
(0,
|
|
15
|
+
(0, bun_test_1.expect)(isInCloud).toBe(true);
|
|
16
16
|
const consoleUrl = (0, make_console_url_1.makeConsoleUrl)('asia-east1', 'test-name');
|
|
17
|
-
(0,
|
|
17
|
+
(0, bun_test_1.expect)(consoleUrl).toBe('https://console.cloud.google.com/run/detail/asia-east1/test-name/logs?project=remotion-test-cloudtask');
|
|
18
18
|
});
|
|
19
|
-
(0,
|
|
19
|
+
(0, bun_test_1.test)('app is not in cloud tasks', () => {
|
|
20
20
|
process.env.GCLOUD_PROJECT = 'remotion-test';
|
|
21
21
|
process.env.K_CONFIGURATION = 'config';
|
|
22
22
|
const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
|
|
23
|
-
(0,
|
|
23
|
+
(0, bun_test_1.expect)(isInCloud).toBe(true);
|
|
24
24
|
const consoleUrl = (0, make_console_url_1.makeConsoleUrl)('asia-east1', 'test-name');
|
|
25
|
-
(0,
|
|
25
|
+
(0, bun_test_1.expect)(consoleUrl).toBe('https://console.cloud.google.com/run/detail/asia-east1/test-name/logs?project=remotion-test');
|
|
26
26
|
});
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const bun_test_1 = require("bun:test");
|
|
4
4
|
const is_in_cloud_task_1 = require("../../functions/helpers/is-in-cloud-task");
|
|
5
|
-
(0,
|
|
5
|
+
(0, bun_test_1.beforeEach)(() => {
|
|
6
6
|
delete process.env.GCLOUD_PROJECT;
|
|
7
7
|
delete process.env.REMOTION_GCP_PROJECT_ID;
|
|
8
8
|
delete process.env.K_CONFIGURATION;
|
|
9
9
|
});
|
|
10
|
-
(0,
|
|
10
|
+
(0, bun_test_1.test)('is running in cloud tasks = true', () => {
|
|
11
11
|
process.env.GCLOUD_PROJECT = 'remotion-test-cloudtask';
|
|
12
12
|
process.env.K_CONFIGURATION = 'config';
|
|
13
13
|
const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
|
|
14
|
-
(0,
|
|
14
|
+
(0, bun_test_1.expect)(isInCloud).toBe(true);
|
|
15
15
|
});
|
|
16
|
-
(0,
|
|
16
|
+
(0, bun_test_1.test)('is running in cloud tasks = false', () => {
|
|
17
17
|
process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-cloudtask';
|
|
18
18
|
const isInCloud = (0, is_in_cloud_task_1.isInCloudTask)();
|
|
19
|
-
(0,
|
|
19
|
+
(0, bun_test_1.expect)(isInCloud).toBe(false);
|
|
20
20
|
});
|
|
21
|
-
(0,
|
|
21
|
+
(0, bun_test_1.test)('which project Id = remotion-test', () => {
|
|
22
22
|
process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test';
|
|
23
23
|
const projectId = (0, is_in_cloud_task_1.getProjectId)();
|
|
24
|
-
(0,
|
|
24
|
+
(0, bun_test_1.expect)(projectId).toBe('remotion-test');
|
|
25
25
|
});
|
|
26
|
-
(0,
|
|
26
|
+
(0, bun_test_1.test)('which project Id = remotion-test-cloudtask', () => {
|
|
27
27
|
process.env.GCLOUD_PROJECT = 'remotion-test-cloudtask';
|
|
28
28
|
process.env.K_CONFIGURATION = 'config';
|
|
29
29
|
const projectId = (0, is_in_cloud_task_1.getProjectId)();
|
|
30
|
-
(0,
|
|
30
|
+
(0, bun_test_1.expect)(projectId).toBe('remotion-test-cloudtask');
|
|
31
31
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const bun_test_1 = require("bun:test");
|
|
3
4
|
const remotion_1 = require("remotion");
|
|
4
|
-
const vitest_1 = require("vitest");
|
|
5
5
|
const parse_service_name_1 = require("../helpers/parse-service-name");
|
|
6
6
|
const speculate_service_name_1 = require("../speculate-service-name");
|
|
7
7
|
const dashedVersion = remotion_1.VERSION.replace(/\./g, '-');
|
|
8
8
|
const region = 'asia-east1';
|
|
9
|
-
(0,
|
|
9
|
+
(0, bun_test_1.test)('Parse service names', () => {
|
|
10
10
|
process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-project';
|
|
11
11
|
const shortServiceName = (0, speculate_service_name_1.speculateServiceName)({
|
|
12
12
|
cpuLimit: '8.0',
|
|
@@ -14,16 +14,16 @@ const region = 'asia-east1';
|
|
|
14
14
|
// max timeout
|
|
15
15
|
timeoutSeconds: 3600,
|
|
16
16
|
});
|
|
17
|
-
(0,
|
|
17
|
+
(0, bun_test_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
19
|
process.env.REMOTION_GCP_PROJECT_ID = 'remotion-test-project';
|
|
20
20
|
const parsed = (0, parse_service_name_1.parseServiceName)(fullServiceName, region);
|
|
21
|
-
(0,
|
|
21
|
+
(0, bun_test_1.expect)(parsed).toEqual({
|
|
22
22
|
consoleUrl: `https://console.cloud.google.com/run/detail/asia-east1/remotion-${dashedVersion}-mem100000k-cpu8-0-t3600/logs?project=remotion-test-project`,
|
|
23
23
|
region: 'asia-east1',
|
|
24
24
|
remotionVersion: remotion_1.VERSION.replace(/\./g, '-'),
|
|
25
25
|
serviceName: `remotion-${dashedVersion}-mem100000k-cpu8-0-t3600`,
|
|
26
26
|
});
|
|
27
27
|
// Max length of service name is 49 characters, asking for less in case the version string gets longer
|
|
28
|
-
(0,
|
|
28
|
+
(0, bun_test_1.expect)(shortServiceName.length).toBeLessThanOrEqual(47);
|
|
29
29
|
});
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
+
"repository": {
|
|
3
|
+
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/cloudrun"
|
|
4
|
+
},
|
|
2
5
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "
|
|
6
|
+
"version": "4.0.179",
|
|
7
|
+
"description": "Render Remotion videos on Google Cloud Run",
|
|
5
8
|
"main": "dist/index.js",
|
|
9
|
+
"sideEffects": false,
|
|
6
10
|
"dependencies": {
|
|
7
11
|
"@google-cloud/artifact-registry": "^3.4.0",
|
|
8
12
|
"@google-cloud/functions-framework": "^3.4.0",
|
|
@@ -12,21 +16,14 @@
|
|
|
12
16
|
"@google-cloud/logging": "^11.1.0",
|
|
13
17
|
"google-auth-library": "^8.7.0",
|
|
14
18
|
"zod": "3.22.3",
|
|
15
|
-
"@remotion/
|
|
16
|
-
"@remotion/
|
|
17
|
-
"@remotion/renderer": "4.0.
|
|
18
|
-
"remotion": "4.0.
|
|
19
|
+
"@remotion/cli": "4.0.179",
|
|
20
|
+
"@remotion/bundler": "4.0.179",
|
|
21
|
+
"@remotion/renderer": "4.0.179",
|
|
22
|
+
"remotion": "4.0.179"
|
|
19
23
|
},
|
|
20
24
|
"devDependencies": {
|
|
21
|
-
"@jonny/eslint-config": "3.0.281",
|
|
22
|
-
"@types/node": "^18.11.2",
|
|
23
25
|
"@types/minimist": "1.2.2",
|
|
24
|
-
"
|
|
25
|
-
"prettier": "3.2.5",
|
|
26
|
-
"prettier-plugin-organize-imports": "^3.2.4",
|
|
27
|
-
"ts-node": "10.9.2",
|
|
28
|
-
"vitest": "0.31.1",
|
|
29
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.177"
|
|
26
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.179"
|
|
30
27
|
},
|
|
31
28
|
"exports": {
|
|
32
29
|
"./package.json": "./package.json",
|
|
@@ -49,11 +46,12 @@
|
|
|
49
46
|
]
|
|
50
47
|
}
|
|
51
48
|
},
|
|
49
|
+
"homepage": "https://www.remotion.dev/docs/cloudrun",
|
|
52
50
|
"scripts": {
|
|
53
51
|
"build": "bun build.ts",
|
|
54
|
-
"buildContainer": "
|
|
55
|
-
"tarInstaller": "
|
|
52
|
+
"buildContainer": "bun src/admin/bundle-renderLogic.ts",
|
|
53
|
+
"tarInstaller": "bun src/admin/bundle-installer.ts",
|
|
56
54
|
"lint": "eslint src --ext ts,tsx",
|
|
57
|
-
"test": "
|
|
55
|
+
"test": "bun test src"
|
|
58
56
|
}
|
|
59
57
|
}
|
package/readme.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
# @remotion/cloudrun
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
Render Remotion videos on Google Cloud Run
|
|
4
|
+
|
|
5
|
+
[](https://npmcharts.com/compare/@remotion/cloudrun?minimal=true)
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @remotion/cloudrun --save-exact
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
|
|
14
|
+
Remove the `^` character from the version number to use the exact version.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
See the [documentation](https://www.remotion.dev/docs/cloudrun) for more information.
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @remotion/cloudrun@4.0.163 test /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
|
-
> vitest --run
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[7m[1m[36m RUN [39m[22m[27m [36mv0.31.1[39m [90m/Users/jonathanburger/remotion/packages/cloudrun[39m
|
|
7
|
-
|
|
8
|
-
[?25l [32m✓[39m [2msrc/api/test/[22mservice-names[2m.test.ts[22m[2m (1)[22m
|
|
9
|
-
[32m✓[39m [2msrc/api/test/[22mmake-console[2m.test.ts[22m[2m (2)[22m
|
|
10
|
-
[32m✓[39m [2msrc/api/test/[22mrunning-in-what-server[2m.test.ts[22m[2m (4)[22m
|
|
11
|
-
[2K[1A[2K[1A[2K[1A[2K[G [32m✓[39m [2msrc/api/test/[22mservice-names[2m.test.ts[22m[2m (1)[22m
|
|
12
|
-
[32m✓[39m [2msrc/api/test/[22mmake-console[2m.test.ts[22m[2m (2)[22m
|
|
13
|
-
[32m✓[39m [2msrc/api/test/[22mrunning-in-what-server[2m.test.ts[22m[2m (4)[22m
|
|
14
|
-
|
|
15
|
-
[2m Test Files [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
16
|
-
[2m Tests [22m [1m[32m7 passed[39m[22m[90m (7)[39m
|
|
17
|
-
[2m Start at [22m 19:38:46
|
|
18
|
-
[2m Duration [22m 887ms[2m (transform 278ms, setup 0ms, collect 429ms, tests 5ms, environment 0ms, prepare 109ms)[22m
|
|
19
|
-
|
|
20
|
-
[?25h
|