@remotion/cloudrun 4.0.19 → 4.0.21
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/download-file.d.ts +3 -1
- package/dist/api/download-file.js +6 -8
- package/dist/cli/commands/render/index.js +5 -2
- package/dist/cli/commands/sites/create.js +4 -1
- package/dist/cli/commands/still.js +5 -2
- package/dist/shared/validate-serveurl.js +1 -7
- 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.20 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.20 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.20 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
|
@@ -4,7 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.downloadFile = void 0;
|
|
7
|
-
const
|
|
7
|
+
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
9
|
const get_cloud_storage_client_1 = require("./helpers/get-cloud-storage-client");
|
|
9
10
|
/**
|
|
10
11
|
* @description Downloads a file from a GCP storage bucket.
|
|
@@ -16,14 +17,11 @@ const get_cloud_storage_client_1 = require("./helpers/get-cloud-storage-client")
|
|
|
16
17
|
const downloadFile = async ({ bucketName, gsutilURI, downloadName, }) => {
|
|
17
18
|
const cloudStorageClient = (0, get_cloud_storage_client_1.getCloudStorageClient)();
|
|
18
19
|
const fileName = gsutilURI.replace(`gs://${bucketName}/`, '');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
fs_1.default.mkdirSync('out');
|
|
22
|
-
}
|
|
23
|
-
const destination = `out/${downloadName}`;
|
|
20
|
+
const outputPath = node_path_1.default.resolve(process.cwd(), downloadName);
|
|
21
|
+
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
24
22
|
await cloudStorageClient.bucket(bucketName).file(fileName).download({
|
|
25
|
-
destination,
|
|
23
|
+
destination: outputPath,
|
|
26
24
|
});
|
|
27
|
-
return
|
|
25
|
+
return { outputPath };
|
|
28
26
|
};
|
|
29
27
|
exports.downloadFile = downloadFile;
|
|
@@ -36,6 +36,9 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
36
36
|
if (!composition) {
|
|
37
37
|
log_1.Log.info('No compositions passed. Fetching compositions...');
|
|
38
38
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
39
|
+
if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
|
|
40
|
+
throw Error('Passing the shorthand serve URL without composition name is currently not supported.\n Make sure to pass a composition name after the shorthand serve URL or pass the complete serveURL without composition name to get to choose between all compositions.');
|
|
41
|
+
}
|
|
39
42
|
const server = renderer_1.RenderInternals.prepareServer({
|
|
40
43
|
concurrency: 1,
|
|
41
44
|
indent: false,
|
|
@@ -45,7 +48,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
45
48
|
webpackConfigOrServeUrl: serveUrl,
|
|
46
49
|
});
|
|
47
50
|
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
48
|
-
args,
|
|
51
|
+
args: args.slice(1),
|
|
49
52
|
compositionIdFromUi: null,
|
|
50
53
|
browserExecutable,
|
|
51
54
|
chromiumOptions,
|
|
@@ -215,7 +218,7 @@ Codec = ${codec} (${codecReason})
|
|
|
215
218
|
if (downloadName) {
|
|
216
219
|
log_1.Log.info('');
|
|
217
220
|
log_1.Log.info('downloading file...');
|
|
218
|
-
const destination = await (0, download_file_1.downloadFile)({
|
|
221
|
+
const { outputPath: destination } = await (0, download_file_1.downloadFile)({
|
|
219
222
|
bucketName: res.bucketName,
|
|
220
223
|
gsutilURI: res.cloudStorageUri,
|
|
221
224
|
downloadName,
|
|
@@ -81,6 +81,7 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
81
81
|
multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
|
|
82
82
|
updateProgress();
|
|
83
83
|
const bundleStart = Date.now();
|
|
84
|
+
let uploadStart = Date.now();
|
|
84
85
|
const { serveUrl, siteName, stats } = await (0, deploy_site_1.deploySite)({
|
|
85
86
|
entryPoint: file,
|
|
86
87
|
siteName: desiredSiteName,
|
|
@@ -91,6 +92,9 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
91
92
|
progress,
|
|
92
93
|
doneIn: progress === 100 ? Date.now() - bundleStart : null,
|
|
93
94
|
};
|
|
95
|
+
if (progress === 100) {
|
|
96
|
+
uploadStart = Date.now();
|
|
97
|
+
}
|
|
94
98
|
},
|
|
95
99
|
onUploadProgress: (p) => {
|
|
96
100
|
multiProgress.deployProgress = {
|
|
@@ -106,7 +110,6 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
106
110
|
},
|
|
107
111
|
});
|
|
108
112
|
updateProgress();
|
|
109
|
-
const uploadStart = Date.now();
|
|
110
113
|
const uploadDuration = Date.now() - uploadStart;
|
|
111
114
|
multiProgress.deployProgress = {
|
|
112
115
|
sizeUploaded: 1,
|
|
@@ -23,6 +23,9 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
23
23
|
if (!composition) {
|
|
24
24
|
log_1.Log.info('No compositions passed. Fetching compositions...');
|
|
25
25
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
26
|
+
if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
|
|
27
|
+
throw Error('Passing the shorthand serve URL without composition name is currently not supported.\n Make sure to pass a composition name after the shorthand serve URL or pass the complete serveURL without composition name to get to choose between all compositions.');
|
|
28
|
+
}
|
|
26
29
|
const server = renderer_1.RenderInternals.prepareServer({
|
|
27
30
|
concurrency: 1,
|
|
28
31
|
indent: false,
|
|
@@ -32,7 +35,7 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
32
35
|
webpackConfigOrServeUrl: serveUrl,
|
|
33
36
|
});
|
|
34
37
|
const { compositionId } = await cli_1.CliInternals.getCompositionWithDimensionOverride({
|
|
35
|
-
args,
|
|
38
|
+
args: args.slice(1),
|
|
36
39
|
compositionIdFromUi: null,
|
|
37
40
|
indent: false,
|
|
38
41
|
serveUrlOrWebpackUrl: serveUrl,
|
|
@@ -118,7 +121,7 @@ ${downloadName ? ` Downloaded File = ${downloadName}` : ''}
|
|
|
118
121
|
if (downloadName) {
|
|
119
122
|
log_1.Log.info('');
|
|
120
123
|
log_1.Log.info('downloading file...');
|
|
121
|
-
const destination = await (0, download_file_1.downloadFile)({
|
|
124
|
+
const { outputPath: destination } = await (0, download_file_1.downloadFile)({
|
|
122
125
|
bucketName: res.bucketName,
|
|
123
126
|
gsutilURI: res.cloudStorageUri,
|
|
124
127
|
downloadName,
|
|
@@ -17,13 +17,7 @@ const validateServeUrl = async (serveUrl) => {
|
|
|
17
17
|
.file(fileName)
|
|
18
18
|
.exists();
|
|
19
19
|
if (!exists) {
|
|
20
|
-
throw new Error(
|
|
21
|
-
fileName +
|
|
22
|
-
'" not found in bucket "' +
|
|
23
|
-
bucketName +
|
|
24
|
-
'". Is your site name correct - "' +
|
|
25
|
-
siteName +
|
|
26
|
-
'"?');
|
|
20
|
+
throw new Error(`serveURL ERROR. File "${fileName}" not found in bucket "${bucketName}". Is your site name correct - "${siteName}"?`);
|
|
27
21
|
}
|
|
28
22
|
}
|
|
29
23
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.21",
|
|
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/cli": "4.0.
|
|
17
|
-
"@remotion/renderer": "4.0.
|
|
18
|
-
"remotion": "4.0.
|
|
15
|
+
"@remotion/bundler": "4.0.21",
|
|
16
|
+
"@remotion/cli": "4.0.21",
|
|
17
|
+
"@remotion/renderer": "4.0.21",
|
|
18
|
+
"remotion": "4.0.21"
|
|
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.21"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|