@remotion/cloudrun 4.0.226 → 4.0.228
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 +3 -4
- package/.turbo/turbo-test.log +6 -5
- package/dist/admin/bundle-installer.js +4 -2
- package/dist/admin/bundle-renderLogic.js +0 -1
- package/dist/api/render-media-on-cloudrun.js +1 -1
- package/dist/api/render-still-on-cloudrun.js +1 -1
- package/dist/cli/commands/services/deploy.js +3 -3
- package/dist/cli/commands/sites/index.d.ts +1 -1
- package/dist/cli/commands/sites/ls.d.ts +1 -1
- package/dist/cli/log.d.ts +4 -4
- package/dist/functions/helpers/payloads.js +4 -0
- package/dist/functions/render-media-single-thread.js +1 -0
- package/dist/shared/read-dir.js +0 -1
- package/eslint.config.mjs +39 -0
- package/package.json +10 -8
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> @remotion/cloudrun@4.0.226 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 [2m60:24[22m [33mwarning[39m Unexpected any. Specify a different type [2m@typescript-eslint/no-explicit-any[22m[0m
|
|
12
|
+
[0m [2m64: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,7 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @remotion/cloudrun@4.0.
|
|
4
|
-
> bun build.ts
|
|
3
|
+
> @remotion/cloudrun@4.0.227 make /Users/jonathanburger/remotion/packages/cloudrun
|
|
4
|
+
> tsc -d && bun build.ts
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
Making reproducible build with gtar
|
|
6
|
+
[0m[2m[[1m14.55ms[0m[2m][0m Made reproducible build with gtar
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
> @remotion/cloudrun@4.0.226 test /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
4
|
> bun test src
|
|
4
5
|
|
|
5
6
|
[0m[1mbun test [0m[2mv1.1.29 (6d43b366)[0m
|
|
6
7
|
[0m
|
|
7
8
|
src/api/test/service-names.test.ts:
|
|
8
|
-
[0m[32m✓[0m[0m[1m Parse service names[0m [0m[2m[0.
|
|
9
|
+
[0m[32m✓[0m[0m[1m Parse service names[0m [0m[2m[0.31ms[0m[2m][0m
|
|
9
10
|
[0m
|
|
10
11
|
src/api/test/running-in-what-server.test.ts:
|
|
11
12
|
[0m[32m✓[0m[0m[1m is running in cloud tasks = true[0m
|
|
12
13
|
[0m[32m✓[0m[0m[1m is running in cloud tasks = false[0m
|
|
13
14
|
[0m[32m✓[0m[0m[1m which project Id = remotion-test[0m
|
|
14
|
-
[0m[32m✓[0m[0m[1m which project Id = remotion-test-cloudtask[0m
|
|
15
|
+
[0m[32m✓[0m[0m[1m which project Id = remotion-test-cloudtask[0m
|
|
15
16
|
[0m
|
|
16
17
|
src/api/test/make-console.test.ts:
|
|
17
|
-
[0m[32m✓[0m[0m[1m app is in cloud tasks[0m
|
|
18
|
+
[0m[32m✓[0m[0m[1m app is in cloud tasks[0m [0m[2m[0.08ms[0m[2m][0m
|
|
18
19
|
[0m[32m✓[0m[0m[1m app is not in cloud tasks[0m [0m[2m[0.01ms[0m[2m][0m
|
|
19
20
|
|
|
20
21
|
[0m[32m 7 pass[0m
|
|
21
22
|
[0m[2m 0 fail[0m
|
|
22
23
|
11 expect() calls
|
|
23
|
-
Ran 7 tests across 3 files. [0m[2m[[
|
|
24
|
+
Ran 7 tests across 3 files. [0m[2m[[1m33.00ms[0m[2m][0m
|
|
@@ -37,18 +37,20 @@ const bundleInstaller = async () => {
|
|
|
37
37
|
const tarArgs = `-cf ../gcpInstaller/gcpInstaller.tar -C . ${path_1.default.relative(outdir, bundlemjs)} ${path_1.default.relative(outdir, tfoutfile)} ${path_1.default.relative(outdir, sapermissionsoutfile)}`;
|
|
38
38
|
// A reproducible build will lead to no pending change in Git
|
|
39
39
|
if ((0, exports.hasGTar)()) {
|
|
40
|
-
console.
|
|
40
|
+
console.time('Made reproducible build with gtar');
|
|
41
41
|
(0, child_process_1.execSync)(`gtar --mtime='2023-01-01 00:00Z' --sort=name --owner=0 --group=0 --numeric-owner --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime ${tarArgs}`, {
|
|
42
42
|
stdio: 'inherit',
|
|
43
43
|
cwd: outdir,
|
|
44
44
|
});
|
|
45
|
+
console.timeEnd('Made reproducible build with gtar');
|
|
45
46
|
}
|
|
46
47
|
else {
|
|
47
|
-
console.
|
|
48
|
+
console.time('Made non-reproducible build with tar.');
|
|
48
49
|
(0, child_process_1.execSync)(`tar ${tarArgs}`, {
|
|
49
50
|
stdio: 'inherit',
|
|
50
51
|
cwd: outdir,
|
|
51
52
|
});
|
|
53
|
+
console.timeEnd('Made non-reproducible build with tar.');
|
|
52
54
|
}
|
|
53
55
|
(0, fs_1.rmSync)(outdir, { recursive: true });
|
|
54
56
|
};
|
|
@@ -38,6 +38,5 @@ const bundleRenderLogic = async () => {
|
|
|
38
38
|
fs_1.default.cpSync(path_1.default.join(compositor_linux_x64_gnu_1.dir, file), path_1.default.join(outdir, file));
|
|
39
39
|
}
|
|
40
40
|
fs_1.default.cpSync(path_1.default.join(__dirname, '..', '..', '..', 'renderer', 'node_modules', 'source-map', 'lib', 'mappings.wasm'), `${outdir}/mappings.wasm`);
|
|
41
|
-
console.log('distribution bundled.');
|
|
42
41
|
};
|
|
43
42
|
exports.bundleRenderLogic = bundleRenderLogic;
|
|
@@ -86,7 +86,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
86
86
|
parsedData = JSON.parse(accumulatedChunks.trim());
|
|
87
87
|
accumulatedChunks = ''; // Clear the buffer after successful parsing.
|
|
88
88
|
}
|
|
89
|
-
catch (
|
|
89
|
+
catch (_a) {
|
|
90
90
|
// eslint-disable-next-line no-console
|
|
91
91
|
console.error('Could not parse progress: ', accumulatedChunks.trim());
|
|
92
92
|
// If parsing fails, it means we don't have a complete JSON string yet.
|
|
@@ -91,7 +91,7 @@ const internalRenderStillOnCloudRun = async ({ cloudRunUrl, serviceName, region,
|
|
|
91
91
|
parsedData = JSON.parse(accumulatedChunks.trim());
|
|
92
92
|
accumulatedChunks = ''; // Clear the buffer after successful parsing.
|
|
93
93
|
}
|
|
94
|
-
catch (
|
|
94
|
+
catch (_a) {
|
|
95
95
|
// If parsing fails, it means we don't have a complete JSON string yet.
|
|
96
96
|
// We'll wait for more chunks.
|
|
97
97
|
return;
|
|
@@ -16,7 +16,7 @@ const quit_1 = require("../../helpers/quit");
|
|
|
16
16
|
const log_1 = require("../../log");
|
|
17
17
|
exports.CLOUD_RUN_DEPLOY_SUBCOMMAND = 'deploy';
|
|
18
18
|
const cloudRunDeploySubcommand = async (logLevel) => {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f
|
|
19
|
+
var _a, _b, _c, _d, _e, _f;
|
|
20
20
|
const region = (0, get_gcp_region_1.getGcpRegion)();
|
|
21
21
|
const projectID = process.env.REMOTION_GCP_PROJECT_ID;
|
|
22
22
|
const memoryLimit = String((_a = args_1.parsedCloudrunCli.memoryLimit) !== null && _a !== void 0 ? _a : '2Gi');
|
|
@@ -59,8 +59,8 @@ ${[
|
|
|
59
59
|
memoryLimit: memoryLimit !== null && memoryLimit !== void 0 ? memoryLimit : '2Gi',
|
|
60
60
|
cpuLimit: cpuLimit !== null && cpuLimit !== void 0 ? cpuLimit : '1.0',
|
|
61
61
|
timeoutSeconds: timeoutSeconds !== null && timeoutSeconds !== void 0 ? timeoutSeconds : constants_1.DEFAULT_TIMEOUT,
|
|
62
|
-
minInstances:
|
|
63
|
-
maxInstances:
|
|
62
|
+
minInstances: Number(minInstances),
|
|
63
|
+
maxInstances: Number(maxInstances),
|
|
64
64
|
projectID,
|
|
65
65
|
region,
|
|
66
66
|
logLevel,
|
|
@@ -2,4 +2,4 @@ import type { LogLevel } from '@remotion/renderer';
|
|
|
2
2
|
import type { Site } from '../../../api/get-sites';
|
|
3
3
|
export declare const SITES_COMMAND = "sites";
|
|
4
4
|
export declare const displaySiteInfo: (site: Site) => string;
|
|
5
|
-
export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<void> | undefined;
|
|
5
|
+
export declare const sitesCommand: (args: string[], remotionRoot: string, logLevel: LogLevel) => Promise<boolean | void> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
2
|
export declare const SITES_LS_SUBCOMMAND = "ls";
|
|
3
|
-
export declare const sitesLsSubcommand: (logLevel: LogLevel) => Promise<void>;
|
|
3
|
+
export declare const sitesLsSubcommand: (logLevel: LogLevel) => Promise<boolean | void>;
|
package/dist/cli/log.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const Log: {
|
|
2
2
|
verbose: (options: import("@remotion/renderer").LogOptions & {
|
|
3
3
|
tag?: string;
|
|
4
|
-
}, ...args: Parameters<typeof console.log>) => void;
|
|
5
|
-
info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => void;
|
|
6
|
-
warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => void;
|
|
4
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
5
|
+
info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
6
|
+
warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
7
7
|
error: (options: import("@remotion/renderer").LogOptions & {
|
|
8
8
|
tag?: string;
|
|
9
|
-
}, ...args: Parameters<typeof console.log>) => void;
|
|
9
|
+
}, ...args: Parameters<typeof console.log>) => boolean | void;
|
|
10
10
|
};
|
|
@@ -92,12 +92,14 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
92
92
|
metadata: zod_1.z.record(zod_1.z.string()).optional().nullable(),
|
|
93
93
|
}),
|
|
94
94
|
]);
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
95
96
|
const renderFailResponsePayload = zod_1.z.object({
|
|
96
97
|
type: zod_1.z.literal('error'),
|
|
97
98
|
message: zod_1.z.string(),
|
|
98
99
|
name: zod_1.z.string(),
|
|
99
100
|
stack: zod_1.z.string(),
|
|
100
101
|
});
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
101
103
|
const renderStillOnCloudrunResponsePayload = zod_1.z.object({
|
|
102
104
|
type: zod_1.z.literal('success'),
|
|
103
105
|
publicUrl: zod_1.z.string().optional().nullable(),
|
|
@@ -107,6 +109,7 @@ const renderStillOnCloudrunResponsePayload = zod_1.z.object({
|
|
|
107
109
|
renderId: zod_1.z.string(),
|
|
108
110
|
privacy: zod_1.z.enum(['public-read', 'project-private']),
|
|
109
111
|
});
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
113
|
const renderMediaOnCloudrunResponsePayload = zod_1.z.object({
|
|
111
114
|
type: zod_1.z.literal('success'),
|
|
112
115
|
publicUrl: zod_1.z.string().optional().nullable(),
|
|
@@ -116,6 +119,7 @@ const renderMediaOnCloudrunResponsePayload = zod_1.z.object({
|
|
|
116
119
|
renderId: zod_1.z.string(),
|
|
117
120
|
privacy: zod_1.z.enum(['public-read', 'project-private']),
|
|
118
121
|
});
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
119
123
|
const cloudRunCrashResponse = zod_1.z.object({
|
|
120
124
|
type: zod_1.z.literal('crash'),
|
|
121
125
|
cloudRunEndpoint: zod_1.z.string(),
|
|
@@ -114,6 +114,7 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
114
114
|
},
|
|
115
115
|
onArtifact,
|
|
116
116
|
metadata: (_m = body.metadata) !== null && _m !== void 0 ? _m : null,
|
|
117
|
+
hardwareAcceleration: 'disable',
|
|
117
118
|
});
|
|
118
119
|
const storage = new storage_1.Storage();
|
|
119
120
|
const publicUpload = body.privacy === 'public' || !body.privacy;
|
package/dist/shared/read-dir.js
CHANGED
|
@@ -42,7 +42,6 @@ async function readDirectory({ dir, etags, originalDir, }) {
|
|
|
42
42
|
};
|
|
43
43
|
continue;
|
|
44
44
|
}
|
|
45
|
-
// eslint-disable-next-line no-lonely-if
|
|
46
45
|
if (fs.lstatSync(filePath).isSymbolicLink()) {
|
|
47
46
|
const realPath = fs.realpathSync(filePath);
|
|
48
47
|
etags[path.relative(originalDir, filePath)] =
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {remotionFlatConfig} from '@remotion/eslint-config-internal';
|
|
2
|
+
|
|
3
|
+
const config = remotionFlatConfig({react: false});
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
...config,
|
|
8
|
+
ignores: ['./src/gcpInstaller/**', 'src/admin/**'],
|
|
9
|
+
rules: {
|
|
10
|
+
...config.rules,
|
|
11
|
+
'no-console': 'error',
|
|
12
|
+
'no-restricted-imports': [
|
|
13
|
+
'error',
|
|
14
|
+
{
|
|
15
|
+
patterns: [
|
|
16
|
+
'@remotion/*/src/*',
|
|
17
|
+
'@remotion/renderer/*/src/*',
|
|
18
|
+
'@remotion/cli/*/src/*',
|
|
19
|
+
'remotion/src/*',
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
files: ['./src/gcpInstaller/**'],
|
|
27
|
+
rules: {
|
|
28
|
+
...config.rules,
|
|
29
|
+
'no-console': 'off',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
files: ['src/admin/**'],
|
|
34
|
+
rules: {
|
|
35
|
+
...config.rules,
|
|
36
|
+
'no-console': 'off',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
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.228",
|
|
7
7
|
"description": "Render Remotion videos on Google Cloud Run",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -16,14 +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
|
-
"
|
|
19
|
+
"@remotion/bundler": "4.0.228",
|
|
20
|
+
"@remotion/cli": "4.0.228",
|
|
21
|
+
"@remotion/renderer": "4.0.228",
|
|
22
|
+
"remotion": "4.0.228"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/minimist": "1.2.2",
|
|
26
|
-
"
|
|
26
|
+
"eslint": "9.14.0",
|
|
27
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.228",
|
|
28
|
+
"@remotion/eslint-config-internal": "4.0.228"
|
|
27
29
|
},
|
|
28
30
|
"exports": {
|
|
29
31
|
"./package.json": "./package.json",
|
|
@@ -48,10 +50,10 @@
|
|
|
48
50
|
},
|
|
49
51
|
"homepage": "https://www.remotion.dev/docs/cloudrun",
|
|
50
52
|
"scripts": {
|
|
51
|
-
"make": "bun build.ts",
|
|
53
|
+
"make": "tsc -d && bun build.ts",
|
|
52
54
|
"buildContainer": "bun src/admin/bundle-renderLogic.ts",
|
|
53
55
|
"tarInstaller": "bun src/admin/bundle-installer.ts",
|
|
54
|
-
"lint": "eslint src
|
|
56
|
+
"lint": "eslint src",
|
|
55
57
|
"test": "bun test src"
|
|
56
58
|
}
|
|
57
59
|
}
|