@remotion/cloudrun 4.0.423 → 4.0.424
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/dist/api/get-buckets.d.ts +1 -2
- package/dist/api/get-buckets.js +4 -1
- package/dist/api/get-regions.d.ts +1 -2
- package/dist/api/get-sites.d.ts +1 -1
- package/dist/api/helpers/parse-service-name.d.ts +3 -4
- package/dist/api/iam-validation/testPermissions.d.ts +1 -1
- package/dist/api/render-media-on-cloudrun.d.ts +33 -4
- package/dist/api/render-still-on-cloudrun.d.ts +6 -6
- package/dist/cli/commands/permissions.d.ts +1 -2
- package/dist/cli/commands/regions.d.ts +1 -2
- package/dist/cli/commands/render/helpers/renderArgsCheck.d.ts +2 -3
- package/dist/cli/commands/render/index.d.ts +1 -2
- package/dist/cli/commands/render/index.js +8 -4
- package/dist/cli/commands/services/deploy.d.ts +1 -2
- package/dist/cli/commands/services/index.d.ts +1 -2
- package/dist/cli/commands/services/ls.d.ts +1 -2
- package/dist/cli/commands/services/rm.d.ts +1 -2
- package/dist/cli/commands/services/rmall.d.ts +1 -2
- package/dist/cli/commands/sites/create.d.ts +1 -2
- package/dist/cli/commands/sites/index.d.ts +1 -2
- package/dist/cli/commands/sites/ls.d.ts +1 -2
- package/dist/cli/commands/sites/rm.d.ts +1 -2
- package/dist/cli/commands/sites/rmall.d.ts +1 -2
- package/dist/cli/commands/still.d.ts +1 -2
- package/dist/cli/commands/still.js +4 -3
- package/dist/cli/get-gcp-region.d.ts +1 -2
- package/dist/cli/help.d.ts +1 -2
- package/dist/cli/helpers/cloudrun-crash-logs.d.ts +8 -3
- package/dist/cli/helpers/make-console-url.d.ts +1 -2
- package/dist/cli/index.d.ts +1 -2
- package/dist/cli/index.js +2 -1
- package/dist/cli/log.js +1 -1
- package/dist/client.js +10 -10
- package/dist/functions/helpers/get-composition-from-body.d.ts +104 -2
- package/dist/functions/helpers/get-download-behavior-setting.d.ts +6 -2
- package/dist/functions/helpers/payloads.d.ts +95 -95
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/render-media-single-thread.d.ts +104 -2
- package/dist/functions/render-media-single-thread.js +9 -8
- package/dist/functions/render-still-single-thread.d.ts +104 -2
- package/dist/functions/render-still-single-thread.js +9 -8
- package/dist/index.d.ts +29 -14
- package/dist/internals.d.ts +1 -1
- package/dist/shared/random-hash.d.ts +1 -1
- package/dist/shared/read-dir.d.ts +1 -1
- package/dist/shared/validate-bucketname.d.ts +1 -2
- package/dist/shared/validate-gcp-codec.d.ts +1 -1
- package/dist/shared/validate-region.d.ts +1 -2
- package/package.json +10 -9
|
@@ -11,7 +11,8 @@ const get_composition_from_body_1 = require("./helpers/get-composition-from-body
|
|
|
11
11
|
const get_download_behavior_setting_1 = require("./helpers/get-download-behavior-setting");
|
|
12
12
|
const write_cloudrun_error_1 = require("./helpers/write-cloudrun-error");
|
|
13
13
|
const renderStillSingleThread = async (body, res) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f
|
|
14
|
+
var _a, _b, _c, _d, _e, _f;
|
|
15
|
+
var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
15
16
|
if (body.type !== 'still') {
|
|
16
17
|
throw new Error('expected type still');
|
|
17
18
|
}
|
|
@@ -21,7 +22,7 @@ const renderStillSingleThread = async (body, res) => {
|
|
|
21
22
|
}
|
|
22
23
|
throw new Error(`Version mismatch: When calling renderMediaOnCloudRun(), you called a service, which has the version ${version_1.VERSION}, but the @remotion/cloudrun package you used to invoke the function has version ${body.clientVersion}. Deploy a new service and use it to call renderMediaOnCloudrun().`);
|
|
23
24
|
}
|
|
24
|
-
const renderId = (
|
|
25
|
+
const renderId = (_g = body.renderIdOverride) !== null && _g !== void 0 ? _g : (0, random_hash_1.randomHash)({ randomInTests: true });
|
|
25
26
|
try {
|
|
26
27
|
log_1.Log.verbose({ indent: false, logLevel: body.logLevel }, 'Rendering still frame', body);
|
|
27
28
|
const composition = await (0, get_composition_from_body_1.getCompositionFromBody)(body);
|
|
@@ -29,13 +30,13 @@ const renderStillSingleThread = async (body, res) => {
|
|
|
29
30
|
const tempFilePath = '/tmp/still.png';
|
|
30
31
|
const actualChromiumOptions = {
|
|
31
32
|
...body.chromiumOptions,
|
|
32
|
-
darkMode: (
|
|
33
|
-
disableWebSecurity: (
|
|
34
|
-
headless: (
|
|
35
|
-
userAgent: (
|
|
36
|
-
ignoreCertificateErrors: (
|
|
33
|
+
darkMode: (_h = (_a = body.chromiumOptions) === null || _a === void 0 ? void 0 : _a.darkMode) !== null && _h !== void 0 ? _h : false,
|
|
34
|
+
disableWebSecurity: (_j = (_b = body.chromiumOptions) === null || _b === void 0 ? void 0 : _b.disableWebSecurity) !== null && _j !== void 0 ? _j : false,
|
|
35
|
+
headless: (_k = (_c = body.chromiumOptions) === null || _c === void 0 ? void 0 : _c.headless) !== null && _k !== void 0 ? _k : true,
|
|
36
|
+
userAgent: (_l = (_d = body.chromiumOptions) === null || _d === void 0 ? void 0 : _d.userAgent) !== null && _l !== void 0 ? _l : null,
|
|
37
|
+
ignoreCertificateErrors: (_m = (_e = body.chromiumOptions) === null || _e === void 0 ? void 0 : _e.ignoreCertificateErrors) !== null && _m !== void 0 ? _m : false,
|
|
37
38
|
// Override the `null` value, which might come from CLI with swANGLE
|
|
38
|
-
gl: (_o = (
|
|
39
|
+
gl: (_o = (_f = body.chromiumOptions) === null || _f === void 0 ? void 0 : _f.gl) !== null && _o !== void 0 ? _o : 'swangle',
|
|
39
40
|
enableMultiProcessOnLinux: true,
|
|
40
41
|
};
|
|
41
42
|
await renderer_1.RenderInternals.internalRenderStill({
|
package/dist/index.d.ts
CHANGED
|
@@ -16,34 +16,49 @@ import type { GcpRegion } from './pricing/gcp-regions';
|
|
|
16
16
|
/**
|
|
17
17
|
* @deprecated Import this from `@remotion/cloudrun/client` instead
|
|
18
18
|
*/
|
|
19
|
-
declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, }: RenderMediaOnCloudrunInput) => Promise<
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Import this from `@remotion/cloudrun/client` instead
|
|
22
|
-
*/
|
|
23
|
-
declare const renderStillOnCloudrun: (options: import("./api/render-still-on-cloudrun").RenderStillOnCloudrunInput) => Promise<{
|
|
24
|
-
name: string;
|
|
25
|
-
message: string;
|
|
26
|
-
type: "error";
|
|
27
|
-
stack: string;
|
|
28
|
-
} | {
|
|
29
|
-
bucketName: string;
|
|
19
|
+
declare const renderMediaOnCloudrun: ({ cloudRunUrl, serviceName, region, serveUrl, composition, inputProps, codec, forceBucketName, privacy, outName, updateRenderProgress, jpegQuality, audioCodec, audioBitrate, videoBitrate, encodingMaxRate, encodingBufferSize, proResProfile, x264Preset, crf, pixelFormat, imageFormat, scale, everyNthFrame, numberOfGifLoops, frameRange, envVariables, chromiumOptions, muted, forceWidth, forceHeight, logLevel, delayRenderTimeoutInMilliseconds, concurrency, enforceAudioTrack, preferLossless, offthreadVideoCacheSizeInBytes, colorSpace, downloadBehavior, metadata, renderIdOverride, renderStatusWebhook, offthreadVideoThreads, mediaCacheSizeInBytes, }: RenderMediaOnCloudrunInput) => Promise<{
|
|
30
20
|
type: "success";
|
|
31
|
-
|
|
21
|
+
publicUrl?: string | null | undefined;
|
|
32
22
|
cloudStorageUri: string;
|
|
33
23
|
size: number;
|
|
24
|
+
bucketName: string;
|
|
34
25
|
renderId: string;
|
|
35
|
-
|
|
26
|
+
privacy: "project-private" | "public-read";
|
|
36
27
|
} | {
|
|
28
|
+
type: "crash";
|
|
29
|
+
cloudRunEndpoint: string;
|
|
37
30
|
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
31
|
+
requestStartTime: string;
|
|
32
|
+
requestCrashTime: string;
|
|
33
|
+
requestElapsedTimeInSeconds: number;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Import this from `@remotion/cloudrun/client` instead
|
|
37
|
+
*/
|
|
38
|
+
declare const renderStillOnCloudrun: (options: import("./client").RenderStillOnCloudrunInput) => Promise<{
|
|
38
39
|
type: "crash";
|
|
39
40
|
cloudRunEndpoint: string;
|
|
41
|
+
message: "Service crashed without sending a response. Check the logs in GCP console.";
|
|
40
42
|
requestStartTime: string;
|
|
41
43
|
requestCrashTime: string;
|
|
42
44
|
requestElapsedTimeInSeconds: number;
|
|
45
|
+
} | {
|
|
46
|
+
type: "error";
|
|
47
|
+
message: string;
|
|
48
|
+
name: string;
|
|
49
|
+
stack: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: "success";
|
|
52
|
+
publicUrl?: string | null | undefined;
|
|
53
|
+
cloudStorageUri: string;
|
|
54
|
+
size: number;
|
|
55
|
+
bucketName: string;
|
|
56
|
+
renderId: string;
|
|
57
|
+
privacy: "project-private" | "public-read";
|
|
43
58
|
}>;
|
|
44
59
|
/**
|
|
45
60
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
46
61
|
*/
|
|
47
|
-
declare const getSites: (region:
|
|
62
|
+
declare const getSites: (region: "all regions" | "asia-east1" | "asia-east2" | "asia-northeast1" | "asia-northeast2" | "asia-northeast3" | "asia-south1" | "asia-south2" | "asia-southeast1" | "asia-southeast2" | "australia-southeast1" | "australia-southeast2" | "europe-central2" | "europe-north1" | "europe-southwest1" | "europe-west1" | "europe-west2" | "europe-west3" | "europe-west4" | "europe-west6" | "europe-west8" | "europe-west9" | "me-west1" | "northamerica-northeast1" | "northamerica-northeast2" | "southamerica-east1" | "southamerica-west1" | "us-central1" | "us-east1" | "us-east4" | "us-east5" | "us-south1" | "us-west1" | "us-west2" | "us-west3" | "us-west4") => Promise<import("./api/get-sites").GetSitesOutput>;
|
|
48
63
|
export { CloudrunInternals, deleteService, deleteSite, deployService, deploySite, getOrCreateBucket, getRegions, getServiceInfo, getServices, getSites, renderMediaOnCloudrun, renderStillOnCloudrun, speculateServiceName, testPermissions, };
|
|
49
64
|
export type { DeployServiceInput, DeployServiceOutput, GcpRegion, RenderMediaOnCloudrunInput, RenderMediaOnCloudrunOutput, UpdateRenderProgress, };
|
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" | "info" | "trace" | "verbose" | "warn") => Promise<void>;
|
|
3
3
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { GcpRegion } from '../pricing/gcp-regions';
|
|
2
1
|
export declare const validateBucketName: (bucketName: unknown, options: {
|
|
3
2
|
mustStartWithRemotion: boolean;
|
|
4
3
|
}) => void;
|
|
5
4
|
export declare const parseBucketName: (name: string) => {
|
|
6
|
-
region:
|
|
5
|
+
region: "asia-east1" | "asia-east2" | "asia-northeast1" | "asia-northeast2" | "asia-northeast3" | "asia-south1" | "asia-south2" | "asia-southeast1" | "asia-southeast2" | "australia-southeast1" | "australia-southeast2" | "europe-central2" | "europe-north1" | "europe-southwest1" | "europe-west1" | "europe-west2" | "europe-west3" | "europe-west4" | "europe-west6" | "europe-west8" | "europe-west9" | "me-west1" | "northamerica-northeast1" | "northamerica-northeast2" | "southamerica-east1" | "southamerica-west1" | "us-central1" | "us-east1" | "us-east4" | "us-east5" | "us-south1" | "us-west1" | "us-west2" | "us-west3" | "us-west4" | null;
|
|
7
6
|
};
|
|
8
7
|
export declare const makeBucketName: () => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const cloudrunCodecs: readonly ["h264", "vp8", "vp9", "mp3", "aac", "wav", "gif", "prores"];
|
|
2
2
|
export type CloudrunCodec = (typeof cloudrunCodecs)[number];
|
|
3
|
-
export declare const validateCloudrunCodec: (codec: unknown) =>
|
|
3
|
+
export declare const validateCloudrunCodec: (codec: unknown) => "aac" | "gif" | "h264" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
|
|
4
4
|
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const validateRegion: (region: unknown) => GcpRegion;
|
|
1
|
+
export declare const validateRegion: (region: unknown) => "asia-east1" | "asia-east2" | "asia-northeast1" | "asia-northeast2" | "asia-northeast3" | "asia-south1" | "asia-south2" | "asia-southeast1" | "asia-southeast2" | "australia-southeast1" | "australia-southeast2" | "europe-central2" | "europe-north1" | "europe-southwest1" | "europe-west1" | "europe-west2" | "europe-west3" | "europe-west4" | "europe-west6" | "europe-west8" | "europe-west9" | "me-west1" | "northamerica-northeast1" | "northamerica-northeast2" | "southamerica-east1" | "southamerica-west1" | "us-central1" | "us-east1" | "us-east4" | "us-east5" | "us-south1" | "us-west1" | "us-west2" | "us-west3" | "us-west4";
|
package/package.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
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.424",
|
|
7
7
|
"description": "Render Remotion videos on Google Cloud Run",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"scripts": {
|
|
11
|
-
"make": "
|
|
11
|
+
"make": "tsgo -d && cp src/shared/sa-permissions.json dist/shared/sa-permissions.json",
|
|
12
12
|
"makeruntime": "bun build.ts",
|
|
13
13
|
"lint": "eslint src",
|
|
14
14
|
"test": "bun test src",
|
|
@@ -21,19 +21,20 @@
|
|
|
21
21
|
"@google-cloud/storage": "7.15.2",
|
|
22
22
|
"@google-cloud/resource-manager": "5.3.1",
|
|
23
23
|
"@google-cloud/logging": "11.2.0",
|
|
24
|
-
"@remotion/bundler": "4.0.
|
|
25
|
-
"@remotion/cli": "4.0.
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
24
|
+
"@remotion/bundler": "4.0.424",
|
|
25
|
+
"@remotion/cli": "4.0.424",
|
|
26
|
+
"@remotion/renderer": "4.0.424",
|
|
27
27
|
"google-auth-library": "8.7.0",
|
|
28
|
-
"remotion": "4.0.
|
|
28
|
+
"remotion": "4.0.424",
|
|
29
29
|
"zod": "3.22.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
32
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.424",
|
|
33
33
|
"@types/minimist": "1.2.2",
|
|
34
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
34
|
+
"@remotion/eslint-config-internal": "4.0.424",
|
|
35
35
|
"eslint": "9.19.0",
|
|
36
|
-
"@types/node": "20.12.14"
|
|
36
|
+
"@types/node": "20.12.14",
|
|
37
|
+
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
37
38
|
},
|
|
38
39
|
"exports": {
|
|
39
40
|
"./package.json": "./package.json",
|