@remotion/cloudrun 4.0.82 → 4.0.84
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 +27 -0
- package/.turbo/turbo-test.log +16 -0
- package/dist/api/deploy-service.js +1 -1
- package/dist/api/deploy-site.js +1 -1
- package/dist/api/render-media-on-cloudrun.js +5 -6
- package/dist/api/render-still-on-cloudrun.d.ts +1 -1
- package/dist/api/render-still-on-cloudrun.js +3 -3
- package/dist/client.d.ts +10 -0
- package/dist/client.js +23 -0
- package/dist/functions/helpers/get-composition-from-body.js +2 -2
- package/dist/functions/helpers/payloads.d.ts +32 -32
- package/dist/functions/helpers/payloads.js +11 -12
- package/dist/functions/render-media-single-thread.js +9 -9
- package/dist/internals.d.ts +1 -1
- package/package.json +12 -8
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @remotion/cloudrun@4.0.
|
|
2
|
+
> @remotion/cloudrun@4.0.83 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.83 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.83 tarInstaller /Users/jonathanburger/remotion/packages/cloudrun
|
|
12
12
|
> ts-node src/admin/bundle-installer.ts
|
|
13
13
|
|
|
14
14
|
Making reproducible build with gtar
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
> @remotion/cloudrun@4.0.83 lint /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
|
+
> eslint src --ext ts,tsx
|
|
4
|
+
|
|
5
|
+
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
|
|
6
|
+
|
|
7
|
+
/Users/jonathanburger/remotion/packages/cloudrun/src/api/check-if-service-exists.ts
|
|
8
|
+
56:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
9
|
+
|
|
10
|
+
/Users/jonathanburger/remotion/packages/cloudrun/src/api/render-media-on-cloudrun.ts
|
|
11
|
+
224:3 warning Unexpected 'todo' comment: 'TODO: Add any sort of type safety' no-warning-comments
|
|
12
|
+
233:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
13
|
+
|
|
14
|
+
/Users/jonathanburger/remotion/packages/cloudrun/src/api/render-still-on-cloudrun.ts
|
|
15
|
+
153:17 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
16
|
+
|
|
17
|
+
/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/helpers/renderArgsCheck.ts
|
|
18
|
+
76:4 warning Unexpected 'todo' comment: 'TODO: Log if there is an incompatible...' no-warning-comments
|
|
19
|
+
|
|
20
|
+
/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/render/index.ts
|
|
21
|
+
126:2 warning Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' no-warning-comments
|
|
22
|
+
|
|
23
|
+
/Users/jonathanburger/remotion/packages/cloudrun/src/cli/commands/still.ts
|
|
24
|
+
112:2 warning Unexpected 'todo' comment: 'Todo: Check cloudRunUrl is valid, as the...' no-warning-comments
|
|
25
|
+
|
|
26
|
+
✖ 7 problems (0 errors, 7 warnings)
|
|
27
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
> @remotion/cloudrun@4.0.71 test /Users/jonathanburger/remotion/packages/cloudrun
|
|
3
|
+
> vitest --run
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
RUN v0.31.1 /Users/jonathanburger/remotion/packages/cloudrun
|
|
7
|
+
|
|
8
|
+
✓ src/api/test/service-names.test.ts (1 test) 3ms
|
|
9
|
+
✓ src/api/test/make-console.test.ts (2 tests) 2ms
|
|
10
|
+
✓ src/api/test/running-in-what-server.test.ts (4 tests) 2ms
|
|
11
|
+
|
|
12
|
+
Test Files 3 passed (3)
|
|
13
|
+
Tests 7 passed (7)
|
|
14
|
+
Start at 12:17:00
|
|
15
|
+
Duration 739ms (transform 179ms, setup 0ms, collect 527ms, tests 7ms, environment 0ms, prepare 54ms)
|
|
16
|
+
|
|
@@ -62,7 +62,7 @@ const deployServiceRaw = async ({ performImageVersionValidation = true, memoryLi
|
|
|
62
62
|
alreadyExists: false,
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
exports.internalDeployService = pure_1.
|
|
65
|
+
exports.internalDeployService = pure_1.NoReactAPIs.wrapWithErrorHandling(deployServiceRaw);
|
|
66
66
|
/**
|
|
67
67
|
* @description Creates a Cloud Run service in your project that will be able to render a video in GCP.
|
|
68
68
|
* @link https://remotion.dev/docs/cloudrun/deployservice
|
package/dist/api/deploy-site.js
CHANGED
|
@@ -76,4 +76,4 @@ const deploySiteRaw = async ({ entryPoint, bucketName, siteName, options, }) =>
|
|
|
76
76
|
* @param {string} params.siteName The name of the folder in which the project gets deployed to.
|
|
77
77
|
* @param {object} params.options Further options, see documentation page for this function.
|
|
78
78
|
*/
|
|
79
|
-
exports.deploySite = pure_1.
|
|
79
|
+
exports.deploySite = pure_1.NoReactAPIs.wrapWithErrorHandling(deploySiteRaw);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderMediaOnCloudrun = exports.internalRenderMediaOnCloudrun = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
4
|
const pure_1 = require("@remotion/renderer/pure");
|
|
6
5
|
const no_react_1 = require("remotion/no-react");
|
|
7
6
|
const validate_gcp_codec_1 = require("../shared/validate-gcp-codec");
|
|
@@ -30,15 +29,15 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
30
29
|
staticBase: null,
|
|
31
30
|
data: inputProps !== null && inputProps !== void 0 ? inputProps : {},
|
|
32
31
|
}).serializedString,
|
|
33
|
-
jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality :
|
|
32
|
+
jpegQuality: jpegQuality !== null && jpegQuality !== void 0 ? jpegQuality : null,
|
|
34
33
|
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
|
|
35
34
|
audioBitrate: audioBitrate !== null && audioBitrate !== void 0 ? audioBitrate : null,
|
|
36
35
|
videoBitrate: videoBitrate !== null && videoBitrate !== void 0 ? videoBitrate : null,
|
|
37
36
|
encodingBufferSize: encodingBufferSize !== null && encodingBufferSize !== void 0 ? encodingBufferSize : null,
|
|
38
37
|
encodingMaxRate: encodingMaxRate !== null && encodingMaxRate !== void 0 ? encodingMaxRate : null,
|
|
39
38
|
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
40
|
-
pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat :
|
|
41
|
-
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat :
|
|
39
|
+
pixelFormat: pixelFormat !== null && pixelFormat !== void 0 ? pixelFormat : null,
|
|
40
|
+
imageFormat: imageFormat !== null && imageFormat !== void 0 ? imageFormat : null,
|
|
42
41
|
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
43
42
|
proResProfile: proResProfile !== null && proResProfile !== void 0 ? proResProfile : null,
|
|
44
43
|
x264Preset: x264Preset !== null && x264Preset !== void 0 ? x264Preset : null,
|
|
@@ -55,7 +54,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
55
54
|
forceHeight,
|
|
56
55
|
type: 'media',
|
|
57
56
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
58
|
-
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds :
|
|
57
|
+
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : null,
|
|
59
58
|
concurrency: concurrency !== null && concurrency !== void 0 ? concurrency : null,
|
|
60
59
|
enforceAudioTrack: enforceAudioTrack !== null && enforceAudioTrack !== void 0 ? enforceAudioTrack : false,
|
|
61
60
|
preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
|
|
@@ -123,7 +122,7 @@ const internalRenderMediaOnCloudrunRaw = async ({ cloudRunUrl, serviceName, regi
|
|
|
123
122
|
});
|
|
124
123
|
return renderResponse;
|
|
125
124
|
};
|
|
126
|
-
exports.internalRenderMediaOnCloudrun = pure_1.
|
|
125
|
+
exports.internalRenderMediaOnCloudrun = pure_1.NoReactAPIs.wrapWithErrorHandling(internalRenderMediaOnCloudrunRaw);
|
|
127
126
|
/**
|
|
128
127
|
* @description Triggers a render on a GCP Cloud Run service given a composition and a Cloud Run URL.
|
|
129
128
|
* @see [Documentation](https://remotion.dev/docs/cloudrun/renderMediaOnGcp)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChromiumOptions, LogLevel, StillImageFormat, ToOptions } from '@remotion/renderer';
|
|
2
|
-
import
|
|
2
|
+
import { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
3
|
import type { CloudRunCrashResponse, ErrorResponsePayload, RenderStillOnCloudrunOutput } from '../functions/helpers/payloads';
|
|
4
4
|
import type { GcpRegion } from '../pricing/gcp-regions';
|
|
5
5
|
export type RenderStillOnCloudrunInput = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderStillOnCloudrun = void 0;
|
|
4
|
-
const
|
|
4
|
+
const client_1 = require("@remotion/renderer/client");
|
|
5
5
|
const pure_1 = require("@remotion/renderer/pure");
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
7
|
const validate_privacy_1 = require("../shared/validate-privacy");
|
|
@@ -64,7 +64,7 @@ const renderStillOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serv
|
|
|
64
64
|
frame: frame !== null && frame !== void 0 ? frame : 0,
|
|
65
65
|
type: 'still',
|
|
66
66
|
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
|
|
67
|
-
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds :
|
|
67
|
+
delayRenderTimeoutInMilliseconds: delayRenderTimeoutInMilliseconds !== null && delayRenderTimeoutInMilliseconds !== void 0 ? delayRenderTimeoutInMilliseconds : client_1.BrowserSafeApis.DEFAULT_TIMEOUT,
|
|
68
68
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
69
69
|
};
|
|
70
70
|
const client = await (0, get_auth_client_for_url_1.getAuthClientForUrl)(cloudRunEndpoint);
|
|
@@ -123,4 +123,4 @@ const renderStillOnCloudrunRaw = async ({ cloudRunUrl, serviceName, region, serv
|
|
|
123
123
|
});
|
|
124
124
|
return renderResponse;
|
|
125
125
|
};
|
|
126
|
-
exports.renderStillOnCloudrun = pure_1.
|
|
126
|
+
exports.renderStillOnCloudrun = pure_1.NoReactAPIs.wrapWithErrorHandling(renderStillOnCloudrunRaw);
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { deleteService } from './api/delete-service';
|
|
2
|
+
export { deleteSite } from './api/delete-site';
|
|
3
|
+
export { getOrCreateBucket } from './api/get-or-create-bucket';
|
|
4
|
+
export { getRegions } from './api/get-regions';
|
|
5
|
+
export { getServiceInfo } from './api/get-service-info';
|
|
6
|
+
export { getServices } from './api/get-services';
|
|
7
|
+
export { getSites } from './api/get-sites';
|
|
8
|
+
export { renderMediaOnCloudrun, RenderMediaOnCloudrunInput, } from './api/render-media-on-cloudrun';
|
|
9
|
+
export { renderStillOnCloudrun, RenderStillOnCloudrunInput, } from './api/render-still-on-cloudrun';
|
|
10
|
+
export { speculateServiceName } from './api/speculate-service-name';
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.speculateServiceName = exports.renderStillOnCloudrun = exports.renderMediaOnCloudrun = exports.getSites = exports.getServices = exports.getServiceInfo = exports.getRegions = exports.getOrCreateBucket = exports.deleteSite = exports.deleteService = void 0;
|
|
4
|
+
var delete_service_1 = require("./api/delete-service");
|
|
5
|
+
Object.defineProperty(exports, "deleteService", { enumerable: true, get: function () { return delete_service_1.deleteService; } });
|
|
6
|
+
var delete_site_1 = require("./api/delete-site");
|
|
7
|
+
Object.defineProperty(exports, "deleteSite", { enumerable: true, get: function () { return delete_site_1.deleteSite; } });
|
|
8
|
+
var get_or_create_bucket_1 = require("./api/get-or-create-bucket");
|
|
9
|
+
Object.defineProperty(exports, "getOrCreateBucket", { enumerable: true, get: function () { return get_or_create_bucket_1.getOrCreateBucket; } });
|
|
10
|
+
var get_regions_1 = require("./api/get-regions");
|
|
11
|
+
Object.defineProperty(exports, "getRegions", { enumerable: true, get: function () { return get_regions_1.getRegions; } });
|
|
12
|
+
var get_service_info_1 = require("./api/get-service-info");
|
|
13
|
+
Object.defineProperty(exports, "getServiceInfo", { enumerable: true, get: function () { return get_service_info_1.getServiceInfo; } });
|
|
14
|
+
var get_services_1 = require("./api/get-services");
|
|
15
|
+
Object.defineProperty(exports, "getServices", { enumerable: true, get: function () { return get_services_1.getServices; } });
|
|
16
|
+
var get_sites_1 = require("./api/get-sites");
|
|
17
|
+
Object.defineProperty(exports, "getSites", { enumerable: true, get: function () { return get_sites_1.getSites; } });
|
|
18
|
+
var render_media_on_cloudrun_1 = require("./api/render-media-on-cloudrun");
|
|
19
|
+
Object.defineProperty(exports, "renderMediaOnCloudrun", { enumerable: true, get: function () { return render_media_on_cloudrun_1.renderMediaOnCloudrun; } });
|
|
20
|
+
var render_still_on_cloudrun_1 = require("./api/render-still-on-cloudrun");
|
|
21
|
+
Object.defineProperty(exports, "renderStillOnCloudrun", { enumerable: true, get: function () { return render_still_on_cloudrun_1.renderStillOnCloudrun; } });
|
|
22
|
+
var speculate_service_name_1 = require("./api/speculate-service-name");
|
|
23
|
+
Object.defineProperty(exports, "speculateServiceName", { enumerable: true, get: function () { return speculate_service_name_1.speculateServiceName; } });
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getCompositionFromBody = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const getCompositionFromBody = async (body) => {
|
|
6
|
-
var _a, _b;
|
|
6
|
+
var _a, _b, _c;
|
|
7
7
|
const { metadata, propsSize } = await renderer_1.RenderInternals.internalSelectComposition({
|
|
8
8
|
serveUrl: body.serveUrl,
|
|
9
9
|
browserExecutable: null,
|
|
@@ -20,7 +20,7 @@ const getCompositionFromBody = async (body) => {
|
|
|
20
20
|
port: null,
|
|
21
21
|
puppeteerInstance: undefined,
|
|
22
22
|
server: undefined,
|
|
23
|
-
timeoutInMilliseconds: body.delayRenderTimeoutInMilliseconds,
|
|
23
|
+
timeoutInMilliseconds: (_c = body.delayRenderTimeoutInMilliseconds) !== null && _c !== void 0 ? _c : renderer_1.RenderInternals.DEFAULT_TIMEOUT,
|
|
24
24
|
offthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,
|
|
25
25
|
});
|
|
26
26
|
if (propsSize > 10000000) {
|
|
@@ -7,15 +7,15 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
7
7
|
forceWidth: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
8
8
|
codec: z.ZodEnum<["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "prores", "h264-mkv", "gif"]>;
|
|
9
9
|
serializedInputPropsWithCustomSchema: z.ZodString;
|
|
10
|
-
jpegQuality: z.ZodNumber
|
|
10
|
+
jpegQuality: z.ZodNullable<z.ZodNumber>;
|
|
11
11
|
audioCodec: z.ZodNullable<z.ZodEnum<["pcm-16", "aac", "mp3", "opus"]>>;
|
|
12
12
|
audioBitrate: z.ZodNullable<z.ZodString>;
|
|
13
13
|
videoBitrate: z.ZodNullable<z.ZodString>;
|
|
14
14
|
encodingMaxRate: z.ZodNullable<z.ZodString>;
|
|
15
15
|
encodingBufferSize: z.ZodNullable<z.ZodString>;
|
|
16
16
|
crf: z.ZodNullable<z.ZodNumber>;
|
|
17
|
-
pixelFormat: z.ZodEnum<["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"]
|
|
18
|
-
imageFormat: z.ZodEnum<["png", "jpeg", "none"]
|
|
17
|
+
pixelFormat: z.ZodNullable<z.ZodEnum<["yuv420p", "yuva420p", "yuv422p", "yuv444p", "yuv420p10le", "yuv422p10le", "yuv444p10le", "yuva444p10le"]>>;
|
|
18
|
+
imageFormat: z.ZodNullable<z.ZodEnum<["png", "jpeg", "none"]>>;
|
|
19
19
|
scale: z.ZodNumber;
|
|
20
20
|
proResProfile: z.ZodNullable<z.ZodEnum<["4444-xq", "4444", "hq", "standard", "light", "proxy"]>>;
|
|
21
21
|
x264Preset: z.ZodNullable<z.ZodEnum<["ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo"]>>;
|
|
@@ -47,27 +47,27 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
47
47
|
outName: z.ZodOptional<z.ZodString>;
|
|
48
48
|
privacy: z.ZodOptional<z.ZodEnum<["public", "private"]>>;
|
|
49
49
|
logLevel: z.ZodEnum<["verbose", "info", "warn", "error"]>;
|
|
50
|
-
delayRenderTimeoutInMilliseconds: z.ZodNumber
|
|
50
|
+
delayRenderTimeoutInMilliseconds: z.ZodNullable<z.ZodNumber>;
|
|
51
51
|
concurrency: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
52
52
|
enforceAudioTrack: z.ZodBoolean;
|
|
53
53
|
preferLossless: z.ZodBoolean;
|
|
54
54
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
55
55
|
colorSpace: z.ZodEnum<["default", "bt709"]>;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
serveUrl: string;
|
|
58
57
|
type: "media";
|
|
58
|
+
serveUrl: string;
|
|
59
59
|
composition: string;
|
|
60
60
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
61
61
|
serializedInputPropsWithCustomSchema: string;
|
|
62
|
-
jpegQuality: number;
|
|
62
|
+
jpegQuality: number | null;
|
|
63
63
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
64
64
|
audioBitrate: string | null;
|
|
65
65
|
videoBitrate: string | null;
|
|
66
66
|
encodingMaxRate: string | null;
|
|
67
67
|
encodingBufferSize: string | null;
|
|
68
68
|
crf: number | null;
|
|
69
|
-
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
70
|
-
imageFormat: "png" | "jpeg" | "none";
|
|
69
|
+
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | null;
|
|
70
|
+
imageFormat: "png" | "jpeg" | "none" | null;
|
|
71
71
|
scale: number;
|
|
72
72
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
73
73
|
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
@@ -77,8 +77,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
77
77
|
envVariables: Record<string, string>;
|
|
78
78
|
muted: boolean;
|
|
79
79
|
outputBucket: string;
|
|
80
|
-
logLevel: "
|
|
81
|
-
delayRenderTimeoutInMilliseconds: number;
|
|
80
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
81
|
+
delayRenderTimeoutInMilliseconds: number | null;
|
|
82
82
|
concurrency: string | number | null;
|
|
83
83
|
enforceAudioTrack: boolean;
|
|
84
84
|
preferLossless: boolean;
|
|
@@ -96,20 +96,20 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
96
96
|
outName?: string | undefined;
|
|
97
97
|
privacy?: "public" | "private" | undefined;
|
|
98
98
|
}, {
|
|
99
|
-
serveUrl: string;
|
|
100
99
|
type: "media";
|
|
100
|
+
serveUrl: string;
|
|
101
101
|
composition: string;
|
|
102
102
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
103
103
|
serializedInputPropsWithCustomSchema: string;
|
|
104
|
-
jpegQuality: number;
|
|
104
|
+
jpegQuality: number | null;
|
|
105
105
|
audioCodec: "mp3" | "aac" | "pcm-16" | "opus" | null;
|
|
106
106
|
audioBitrate: string | null;
|
|
107
107
|
videoBitrate: string | null;
|
|
108
108
|
encodingMaxRate: string | null;
|
|
109
109
|
encodingBufferSize: string | null;
|
|
110
110
|
crf: number | null;
|
|
111
|
-
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
112
|
-
imageFormat: "png" | "jpeg" | "none";
|
|
111
|
+
pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le" | null;
|
|
112
|
+
imageFormat: "png" | "jpeg" | "none" | null;
|
|
113
113
|
scale: number;
|
|
114
114
|
proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | null;
|
|
115
115
|
x264Preset: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
@@ -119,8 +119,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
119
119
|
envVariables: Record<string, string>;
|
|
120
120
|
muted: boolean;
|
|
121
121
|
outputBucket: string;
|
|
122
|
-
logLevel: "
|
|
123
|
-
delayRenderTimeoutInMilliseconds: number;
|
|
122
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
123
|
+
delayRenderTimeoutInMilliseconds: number | null;
|
|
124
124
|
concurrency: string | number | null;
|
|
125
125
|
enforceAudioTrack: boolean;
|
|
126
126
|
preferLossless: boolean;
|
|
@@ -175,8 +175,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
175
175
|
logLevel: z.ZodEnum<["verbose", "info", "warn", "error"]>;
|
|
176
176
|
offthreadVideoCacheSizeInBytes: z.ZodNullable<z.ZodNumber>;
|
|
177
177
|
}, "strip", z.ZodTypeAny, {
|
|
178
|
-
serveUrl: string;
|
|
179
178
|
type: "still";
|
|
179
|
+
serveUrl: string;
|
|
180
180
|
composition: string;
|
|
181
181
|
serializedInputPropsWithCustomSchema: string;
|
|
182
182
|
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
@@ -184,7 +184,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
184
184
|
envVariables: Record<string, string>;
|
|
185
185
|
outputBucket: string;
|
|
186
186
|
privacy: "public" | "private";
|
|
187
|
-
logLevel: "
|
|
187
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
188
188
|
delayRenderTimeoutInMilliseconds: number;
|
|
189
189
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
190
190
|
frame: number;
|
|
@@ -200,8 +200,8 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
200
200
|
} | undefined;
|
|
201
201
|
outName?: string | undefined;
|
|
202
202
|
}, {
|
|
203
|
-
serveUrl: string;
|
|
204
203
|
type: "still";
|
|
204
|
+
serveUrl: string;
|
|
205
205
|
composition: string;
|
|
206
206
|
serializedInputPropsWithCustomSchema: string;
|
|
207
207
|
imageFormat: "png" | "jpeg" | "pdf" | "webp";
|
|
@@ -209,7 +209,7 @@ export declare const CloudRunPayload: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
209
209
|
envVariables: Record<string, string>;
|
|
210
210
|
outputBucket: string;
|
|
211
211
|
privacy: "public" | "private";
|
|
212
|
-
logLevel: "
|
|
212
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
213
213
|
delayRenderTimeoutInMilliseconds: number;
|
|
214
214
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
215
215
|
frame: number;
|
|
@@ -231,13 +231,13 @@ declare const renderFailResponsePayload: z.ZodObject<{
|
|
|
231
231
|
name: z.ZodString;
|
|
232
232
|
stack: z.ZodString;
|
|
233
233
|
}, "strip", z.ZodTypeAny, {
|
|
234
|
-
message: string;
|
|
235
234
|
type: "error";
|
|
235
|
+
message: string;
|
|
236
236
|
name: string;
|
|
237
237
|
stack: string;
|
|
238
238
|
}, {
|
|
239
|
-
message: string;
|
|
240
239
|
type: "error";
|
|
240
|
+
message: string;
|
|
241
241
|
name: string;
|
|
242
242
|
stack: string;
|
|
243
243
|
}>;
|
|
@@ -250,19 +250,19 @@ declare const renderStillOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
250
250
|
renderId: z.ZodString;
|
|
251
251
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
bucketName: string;
|
|
254
|
-
size: number;
|
|
255
253
|
type: "success";
|
|
256
254
|
privacy: "public-read" | "project-private";
|
|
257
255
|
cloudStorageUri: string;
|
|
256
|
+
size: number;
|
|
257
|
+
bucketName: string;
|
|
258
258
|
renderId: string;
|
|
259
259
|
publicUrl?: string | null | undefined;
|
|
260
260
|
}, {
|
|
261
|
-
bucketName: string;
|
|
262
|
-
size: number;
|
|
263
261
|
type: "success";
|
|
264
262
|
privacy: "public-read" | "project-private";
|
|
265
263
|
cloudStorageUri: string;
|
|
264
|
+
size: number;
|
|
265
|
+
bucketName: string;
|
|
266
266
|
renderId: string;
|
|
267
267
|
publicUrl?: string | null | undefined;
|
|
268
268
|
}>;
|
|
@@ -275,19 +275,19 @@ declare const renderMediaOnCloudrunResponsePayload: z.ZodObject<{
|
|
|
275
275
|
renderId: z.ZodString;
|
|
276
276
|
privacy: z.ZodEnum<["public-read", "project-private"]>;
|
|
277
277
|
}, "strip", z.ZodTypeAny, {
|
|
278
|
-
bucketName: string;
|
|
279
|
-
size: number;
|
|
280
278
|
type: "success";
|
|
281
279
|
privacy: "public-read" | "project-private";
|
|
282
280
|
cloudStorageUri: string;
|
|
281
|
+
size: number;
|
|
282
|
+
bucketName: string;
|
|
283
283
|
renderId: string;
|
|
284
284
|
publicUrl?: string | null | undefined;
|
|
285
285
|
}, {
|
|
286
|
-
bucketName: string;
|
|
287
|
-
size: number;
|
|
288
286
|
type: "success";
|
|
289
287
|
privacy: "public-read" | "project-private";
|
|
290
288
|
cloudStorageUri: string;
|
|
289
|
+
size: number;
|
|
290
|
+
bucketName: string;
|
|
291
291
|
renderId: string;
|
|
292
292
|
publicUrl?: string | null | undefined;
|
|
293
293
|
}>;
|
|
@@ -299,15 +299,15 @@ declare const cloudRunCrashResponse: z.ZodObject<{
|
|
|
299
299
|
requestCrashTime: z.ZodString;
|
|
300
300
|
requestElapsedTimeInSeconds: z.ZodNumber;
|
|
301
301
|
}, "strip", z.ZodTypeAny, {
|
|
302
|
-
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
303
302
|
type: "crash";
|
|
303
|
+
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
304
304
|
cloudRunEndpoint: string;
|
|
305
305
|
requestStartTime: string;
|
|
306
306
|
requestCrashTime: string;
|
|
307
307
|
requestElapsedTimeInSeconds: number;
|
|
308
308
|
}, {
|
|
309
|
-
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
310
309
|
type: "crash";
|
|
310
|
+
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
311
311
|
cloudRunEndpoint: string;
|
|
312
312
|
requestStartTime: string;
|
|
313
313
|
requestCrashTime: string;
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CloudRunPayload = void 0;
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
5
4
|
const client_1 = require("@remotion/renderer/client");
|
|
6
5
|
const zod_1 = require("zod");
|
|
7
|
-
const codec = zod_1.z.enum(
|
|
8
|
-
const audioCodec = zod_1.z.enum(
|
|
9
|
-
const pixelFormat = zod_1.z.enum(
|
|
10
|
-
const videoImageFormat = zod_1.z.enum(
|
|
11
|
-
const stillImageFormat = zod_1.z.enum(
|
|
6
|
+
const codec = zod_1.z.enum(client_1.BrowserSafeApis.validCodecs);
|
|
7
|
+
const audioCodec = zod_1.z.enum(client_1.BrowserSafeApis.validAudioCodecs);
|
|
8
|
+
const pixelFormat = zod_1.z.enum(client_1.BrowserSafeApis.validPixelFormats);
|
|
9
|
+
const videoImageFormat = zod_1.z.enum(client_1.BrowserSafeApis.validVideoImageFormats);
|
|
10
|
+
const stillImageFormat = zod_1.z.enum(client_1.BrowserSafeApis.validStillImageFormats);
|
|
12
11
|
const proResProfile = zod_1.z.enum(client_1.BrowserSafeApis.proResProfileOptions).nullable();
|
|
13
12
|
const x264Preset = zod_1.z.enum(client_1.BrowserSafeApis.x264PresetOptions).nullable();
|
|
14
13
|
const chromiumOptions = zod_1.z.object({
|
|
15
14
|
ignoreCertificateErrors: zod_1.z.boolean().optional(),
|
|
16
15
|
disableWebSecurity: zod_1.z.boolean().optional(),
|
|
17
|
-
gl: zod_1.z.enum(
|
|
16
|
+
gl: zod_1.z.enum(client_1.BrowserSafeApis.validOpenGlRenderers).optional().nullable(),
|
|
18
17
|
headless: zod_1.z.boolean().optional(),
|
|
19
18
|
userAgent: zod_1.z.string().optional().nullable(),
|
|
20
19
|
});
|
|
21
|
-
const logLevel = zod_1.z.enum(
|
|
20
|
+
const logLevel = zod_1.z.enum(client_1.BrowserSafeApis.logLevels);
|
|
22
21
|
exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
23
22
|
zod_1.z.object({
|
|
24
23
|
type: zod_1.z.literal('media'),
|
|
@@ -28,15 +27,15 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
28
27
|
forceWidth: zod_1.z.number().optional().nullable(),
|
|
29
28
|
codec,
|
|
30
29
|
serializedInputPropsWithCustomSchema: zod_1.z.string(),
|
|
31
|
-
jpegQuality: zod_1.z.number(),
|
|
30
|
+
jpegQuality: zod_1.z.number().nullable(),
|
|
32
31
|
audioCodec: audioCodec.nullable(),
|
|
33
32
|
audioBitrate: zod_1.z.string().nullable(),
|
|
34
33
|
videoBitrate: zod_1.z.string().nullable(),
|
|
35
34
|
encodingMaxRate: zod_1.z.string().nullable(),
|
|
36
35
|
encodingBufferSize: zod_1.z.string().nullable(),
|
|
37
36
|
crf: zod_1.z.number().nullable(),
|
|
38
|
-
pixelFormat,
|
|
39
|
-
imageFormat: videoImageFormat,
|
|
37
|
+
pixelFormat: pixelFormat.nullable(),
|
|
38
|
+
imageFormat: videoImageFormat.nullable(),
|
|
40
39
|
scale: zod_1.z.number(),
|
|
41
40
|
proResProfile,
|
|
42
41
|
x264Preset,
|
|
@@ -50,7 +49,7 @@ exports.CloudRunPayload = zod_1.z.discriminatedUnion('type', [
|
|
|
50
49
|
outName: zod_1.z.string().optional(),
|
|
51
50
|
privacy: zod_1.z.enum(['public', 'private']).optional(),
|
|
52
51
|
logLevel,
|
|
53
|
-
delayRenderTimeoutInMilliseconds: zod_1.z.number(),
|
|
52
|
+
delayRenderTimeoutInMilliseconds: zod_1.z.number().nullable(),
|
|
54
53
|
concurrency: zod_1.z.number().or(zod_1.z.string()).nullable(),
|
|
55
54
|
enforceAudioTrack: zod_1.z.boolean(),
|
|
56
55
|
preferLossless: zod_1.z.boolean(),
|
|
@@ -8,7 +8,7 @@ const random_hash_1 = require("../shared/random-hash");
|
|
|
8
8
|
const get_composition_from_body_1 = require("./helpers/get-composition-from-body");
|
|
9
9
|
const write_cloudrun_error_1 = require("./helpers/write-cloudrun-error");
|
|
10
10
|
const renderMediaSingleThread = async (body, res) => {
|
|
11
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
12
12
|
if (body.type !== 'media') {
|
|
13
13
|
throw new Error('expected type media');
|
|
14
14
|
}
|
|
@@ -46,18 +46,18 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
46
46
|
indent: undefined,
|
|
47
47
|
staticBase: null,
|
|
48
48
|
}).serializedString,
|
|
49
|
-
jpegQuality: body.jpegQuality,
|
|
49
|
+
jpegQuality: (_e = body.jpegQuality) !== null && _e !== void 0 ? _e : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
|
|
50
50
|
audioCodec: body.audioCodec,
|
|
51
51
|
audioBitrate: body.audioBitrate,
|
|
52
52
|
videoBitrate: body.videoBitrate,
|
|
53
53
|
encodingMaxRate: body.encodingMaxRate,
|
|
54
54
|
encodingBufferSize: body.encodingBufferSize,
|
|
55
55
|
crf: body.crf,
|
|
56
|
-
pixelFormat: body.pixelFormat,
|
|
57
|
-
imageFormat: body.imageFormat,
|
|
56
|
+
pixelFormat: (_f = body.pixelFormat) !== null && _f !== void 0 ? _f : renderer_1.RenderInternals.DEFAULT_PIXEL_FORMAT,
|
|
57
|
+
imageFormat: (_g = body.imageFormat) !== null && _g !== void 0 ? _g : renderer_1.RenderInternals.DEFAULT_VIDEO_IMAGE_FORMAT,
|
|
58
58
|
scale: body.scale,
|
|
59
|
-
proResProfile: (
|
|
60
|
-
x264Preset: (
|
|
59
|
+
proResProfile: (_h = body.proResProfile) !== null && _h !== void 0 ? _h : undefined,
|
|
60
|
+
x264Preset: (_j = body.x264Preset) !== null && _j !== void 0 ? _j : undefined,
|
|
61
61
|
everyNthFrame: body.everyNthFrame,
|
|
62
62
|
numberOfGifLoops: body.numberOfGifLoops,
|
|
63
63
|
onProgress,
|
|
@@ -67,9 +67,9 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
67
67
|
muted: body.muted,
|
|
68
68
|
logLevel: body.logLevel,
|
|
69
69
|
browserExecutable: null,
|
|
70
|
-
timeoutInMilliseconds: body.delayRenderTimeoutInMilliseconds,
|
|
70
|
+
timeoutInMilliseconds: (_k = body.delayRenderTimeoutInMilliseconds) !== null && _k !== void 0 ? _k : renderer_1.RenderInternals.DEFAULT_TIMEOUT,
|
|
71
71
|
cancelSignal: undefined,
|
|
72
|
-
concurrency: (
|
|
72
|
+
concurrency: (_l = body.concurrency) !== null && _l !== void 0 ? _l : null,
|
|
73
73
|
disallowParallelEncoding: false,
|
|
74
74
|
enforceAudioTrack: body.enforceAudioTrack,
|
|
75
75
|
ffmpegOverride: undefined,
|
|
@@ -91,7 +91,7 @@ const renderMediaSingleThread = async (body, res) => {
|
|
|
91
91
|
const uploadedResponse = await storage
|
|
92
92
|
.bucket(body.outputBucket)
|
|
93
93
|
.upload(tempFilePath, {
|
|
94
|
-
destination: `renders/${renderId}/${(
|
|
94
|
+
destination: `renders/${renderId}/${(_m = body.outName) !== null && _m !== void 0 ? _m : defaultOutName}`,
|
|
95
95
|
predefinedAcl: publicUpload ? 'publicRead' : 'projectPrivate',
|
|
96
96
|
});
|
|
97
97
|
const uploadedFile = uploadedResponse[0];
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const CloudrunInternals: {
|
|
2
|
-
executeCommand: (args: string[], remotionRoot: string, logLevel: "
|
|
2
|
+
executeCommand: (args: string[], remotionRoot: string, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
|
|
3
3
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cloudrun",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.84",
|
|
4
4
|
"description": "GCP Cloud Run alternative to lambda rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -12,27 +12,28 @@
|
|
|
12
12
|
"@google-cloud/logging": "^10.5.0",
|
|
13
13
|
"google-auth-library": "^8.7.0",
|
|
14
14
|
"zod": "^3.22.3",
|
|
15
|
-
"@remotion/bundler": "4.0.
|
|
16
|
-
"@remotion/
|
|
17
|
-
"remotion": "4.0.
|
|
18
|
-
"
|
|
15
|
+
"@remotion/bundler": "4.0.84",
|
|
16
|
+
"@remotion/renderer": "4.0.84",
|
|
17
|
+
"@remotion/cli": "4.0.84",
|
|
18
|
+
"remotion": "4.0.84"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@jonny/eslint-config": "3.0.276",
|
|
22
22
|
"@types/node": "^18.11.2",
|
|
23
23
|
"@types/minimist": "1.2.2",
|
|
24
24
|
"eslint": "8.42.0",
|
|
25
|
-
"prettier": "3.
|
|
26
|
-
"prettier-plugin-organize-imports": "^3.2.
|
|
25
|
+
"prettier": "3.1.1",
|
|
26
|
+
"prettier-plugin-organize-imports": "^3.2.4",
|
|
27
27
|
"ts-node": "^10.8.0",
|
|
28
28
|
"vitest": "0.31.1",
|
|
29
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
29
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.84"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
"./package.json": "./package.json",
|
|
33
33
|
".": "./dist/index.js",
|
|
34
34
|
"./defaults": "./dist/defaults.js",
|
|
35
35
|
"./regions": "./dist/regions.js",
|
|
36
|
+
"./client": "./dist/client.js",
|
|
36
37
|
"./permissions.json": "./dist/shared/sa-permissions.json"
|
|
37
38
|
},
|
|
38
39
|
"typesVersions": {
|
|
@@ -42,6 +43,9 @@
|
|
|
42
43
|
],
|
|
43
44
|
"regions": [
|
|
44
45
|
"dist/regions.d.ts"
|
|
46
|
+
],
|
|
47
|
+
"client": [
|
|
48
|
+
"dist/client.d.ts"
|
|
45
49
|
]
|
|
46
50
|
}
|
|
47
51
|
},
|