@remotion/lambda 4.0.31 → 4.0.33
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-or-create-bucket.d.ts +11 -1
- package/dist/api/get-or-create-bucket.js +34 -8
- package/dist/api/iam-validation/user-permissions.js +1 -0
- package/dist/api/make-lambda-payload.d.ts +47 -3
- package/dist/api/make-lambda-payload.js +18 -20
- package/dist/api/render-media-on-lambda.d.ts +4 -2
- package/dist/api/render-media-on-lambda.js +49 -1
- package/dist/api/render-still-on-lambda.d.ts +3 -1
- package/dist/api/render-still-on-lambda.js +2 -1
- package/dist/cli/args.d.ts +3 -0
- package/dist/cli/commands/render/render.js +5 -1
- package/dist/cli/commands/sites/create.js +5 -1
- package/dist/cli/commands/sites/rm.js +7 -2
- package/dist/cli/commands/sites/rmall.js +7 -2
- package/dist/cli/commands/still.js +3 -0
- package/dist/client.d.ts +2 -1
- package/dist/functions/compositions.js +3 -1
- package/dist/functions/helpers/create-post-render-data.js +5 -1
- package/dist/functions/helpers/get-cleanup-progress.js +4 -1
- package/dist/functions/helpers/lifecycle.d.ts +3 -6
- package/dist/functions/helpers/lifecycle.js +19 -11
- package/dist/functions/helpers/streaming-payloads.d.ts +3 -3
- package/dist/functions/index.js +3 -2
- package/dist/functions/launch.js +2 -0
- package/dist/functions/start.js +7 -3
- package/dist/functions/still.js +7 -2
- package/dist/index.d.ts +2 -2
- package/dist/internals.d.ts +1 -1
- package/dist/shared/compress-props.js +4 -2
- package/dist/shared/constants.d.ts +7 -0
- package/dist/shared/validate-lambda-codec.d.ts +1 -1
- package/dist/shared/validate-lambda-codec.js +1 -0
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
- package/dist/cli/helpers/validate.d.ts +0 -4
- package/dist/cli/helpers/validate.js +0 -8
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
import type { CustomCredentials } from '../shared/aws-clients';
|
|
3
|
+
type GetOrCreateBucketInputInner = {
|
|
4
|
+
region: AwsRegion;
|
|
5
|
+
enableFolderExpiry: boolean | null;
|
|
6
|
+
customCredentials: CustomCredentials | null;
|
|
7
|
+
};
|
|
2
8
|
export type GetOrCreateBucketInput = {
|
|
3
9
|
region: AwsRegion;
|
|
10
|
+
enableFolderExpiry?: boolean;
|
|
11
|
+
customCredentials?: CustomCredentials;
|
|
4
12
|
};
|
|
5
13
|
export type GetOrCreateBucketOutput = {
|
|
6
14
|
bucketName: string;
|
|
7
15
|
alreadyExisted: boolean;
|
|
8
16
|
};
|
|
17
|
+
export declare const internalGetOrCreateBucket: (params: GetOrCreateBucketInputInner) => Promise<GetOrCreateBucketOutput>;
|
|
9
18
|
/**
|
|
10
19
|
* @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
|
|
11
20
|
* @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
|
|
12
21
|
* @param params.region The region in which you want your S3 bucket to reside in.
|
|
13
22
|
* @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
|
|
14
23
|
*/
|
|
15
|
-
export declare const getOrCreateBucket: (
|
|
24
|
+
export declare const getOrCreateBucket: (options: GetOrCreateBucketInput) => Promise<GetOrCreateBucketOutput>;
|
|
25
|
+
export {};
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOrCreateBucket = void 0;
|
|
3
|
+
exports.getOrCreateBucket = exports.internalGetOrCreateBucket = void 0;
|
|
4
4
|
const constants_1 = require("../shared/constants");
|
|
5
|
+
const lifecycle_rules_1 = require("../shared/lifecycle-rules");
|
|
5
6
|
const validate_bucketname_1 = require("../shared/validate-bucketname");
|
|
6
7
|
const create_bucket_1 = require("./create-bucket");
|
|
7
8
|
const get_buckets_1 = require("./get-buckets");
|
|
8
|
-
|
|
9
|
-
* @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
|
|
10
|
-
* @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
|
|
11
|
-
* @param params.region The region in which you want your S3 bucket to reside in.
|
|
12
|
-
* @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
|
|
13
|
-
*/
|
|
14
|
-
const getOrCreateBucket = async (params) => {
|
|
9
|
+
const internalGetOrCreateBucket = async (params) => {
|
|
15
10
|
const { remotionBuckets } = await (0, get_buckets_1.getRemotionS3Buckets)(params.region);
|
|
16
11
|
if (remotionBuckets.length > 1) {
|
|
17
12
|
throw new Error(`You have multiple buckets (${remotionBuckets.map((b) => b.name)}) in your S3 region (${params.region}) starting with "${constants_1.REMOTION_BUCKET_PREFIX}". Please see https://remotion.dev/docs/lambda/multiple-buckets.`);
|
|
18
13
|
}
|
|
14
|
+
const { enableFolderExpiry, region } = params;
|
|
19
15
|
if (remotionBuckets.length === 1) {
|
|
16
|
+
const existingBucketName = remotionBuckets[0].name;
|
|
17
|
+
// apply to existing bucket
|
|
18
|
+
await (0, lifecycle_rules_1.applyLifeCyleOperation)({
|
|
19
|
+
enableFolderExpiry: enableFolderExpiry !== null && enableFolderExpiry !== void 0 ? enableFolderExpiry : null,
|
|
20
|
+
bucketName: existingBucketName,
|
|
21
|
+
region,
|
|
22
|
+
customCredentials: params.customCredentials,
|
|
23
|
+
});
|
|
20
24
|
return { bucketName: remotionBuckets[0].name, alreadyExisted: true };
|
|
21
25
|
}
|
|
22
26
|
const bucketName = (0, validate_bucketname_1.makeBucketName)(params.region);
|
|
@@ -24,6 +28,28 @@ const getOrCreateBucket = async (params) => {
|
|
|
24
28
|
bucketName,
|
|
25
29
|
region: params.region,
|
|
26
30
|
});
|
|
31
|
+
// apply to newly created bucket
|
|
32
|
+
await (0, lifecycle_rules_1.applyLifeCyleOperation)({
|
|
33
|
+
enableFolderExpiry: enableFolderExpiry !== null && enableFolderExpiry !== void 0 ? enableFolderExpiry : null,
|
|
34
|
+
bucketName,
|
|
35
|
+
region,
|
|
36
|
+
customCredentials: params.customCredentials,
|
|
37
|
+
});
|
|
27
38
|
return { bucketName, alreadyExisted: false };
|
|
28
39
|
};
|
|
40
|
+
exports.internalGetOrCreateBucket = internalGetOrCreateBucket;
|
|
41
|
+
/**
|
|
42
|
+
* @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
|
|
43
|
+
* @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
|
|
44
|
+
* @param params.region The region in which you want your S3 bucket to reside in.
|
|
45
|
+
* @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
|
|
46
|
+
*/
|
|
47
|
+
const getOrCreateBucket = (options) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return (0, exports.internalGetOrCreateBucket)({
|
|
50
|
+
region: options.region,
|
|
51
|
+
enableFolderExpiry: (_a = options.enableFolderExpiry) !== null && _a !== void 0 ? _a : null,
|
|
52
|
+
customCredentials: (_b = options.customCredentials) !== null && _b !== void 0 ? _b : null,
|
|
53
|
+
});
|
|
54
|
+
};
|
|
29
55
|
exports.getOrCreateBucket = getOrCreateBucket;
|
|
@@ -39,6 +39,7 @@ exports.requiredPermissions = [
|
|
|
39
39
|
aws_policies_1.s3.DeleteBucket,
|
|
40
40
|
aws_policies_1.s3.PutBucketOwnershipControls,
|
|
41
41
|
aws_policies_1.s3.PutBucketPublicAccessBlock,
|
|
42
|
+
aws_policies_1.s3.PutLifecycleConfiguration,
|
|
42
43
|
],
|
|
43
44
|
resource: [`arn:aws:s3:::${constants_1.REMOTION_BUCKET_PREFIX}*`],
|
|
44
45
|
},
|
|
@@ -1,5 +1,49 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AudioCodec, ChromiumOptions, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
|
+
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
|
+
import type { AwsRegion, DeleteAfter } from '../client';
|
|
4
|
+
import type { LambdaStartPayload, LambdaStatusPayload, OutNameInput, Privacy, WebhookOption } from '../defaults';
|
|
5
|
+
import type { DownloadBehavior } from '../shared/content-disposition-header';
|
|
6
|
+
import type { LambdaCodec } from '../shared/validate-lambda-codec';
|
|
2
7
|
import type { GetRenderProgressInput } from './get-render-progress';
|
|
3
|
-
|
|
4
|
-
|
|
8
|
+
export type InnerRenderMediaOnLambdaInput = {
|
|
9
|
+
region: AwsRegion;
|
|
10
|
+
functionName: string;
|
|
11
|
+
serveUrl: string;
|
|
12
|
+
composition: string;
|
|
13
|
+
inputProps: Record<string, unknown>;
|
|
14
|
+
codec: LambdaCodec;
|
|
15
|
+
imageFormat: VideoImageFormat;
|
|
16
|
+
crf: number | undefined;
|
|
17
|
+
envVariables: Record<string, string>;
|
|
18
|
+
pixelFormat: PixelFormat | undefined;
|
|
19
|
+
proResProfile: ProResProfile | undefined;
|
|
20
|
+
x264Preset: X264Preset | null;
|
|
21
|
+
privacy: Privacy;
|
|
22
|
+
jpegQuality: number;
|
|
23
|
+
maxRetries: number;
|
|
24
|
+
framesPerLambda: number | null;
|
|
25
|
+
logLevel: LogLevel;
|
|
26
|
+
frameRange: FrameRange | null;
|
|
27
|
+
outName: OutNameInput | null;
|
|
28
|
+
timeoutInMilliseconds: number;
|
|
29
|
+
chromiumOptions: ChromiumOptions;
|
|
30
|
+
scale: number;
|
|
31
|
+
everyNthFrame: number;
|
|
32
|
+
numberOfGifLoops: number | null;
|
|
33
|
+
concurrencyPerLambda: number;
|
|
34
|
+
downloadBehavior: DownloadBehavior;
|
|
35
|
+
muted: boolean;
|
|
36
|
+
overwrite: boolean;
|
|
37
|
+
audioBitrate: string | null;
|
|
38
|
+
videoBitrate: string | null;
|
|
39
|
+
webhook: WebhookOption | null;
|
|
40
|
+
forceWidth: number | null;
|
|
41
|
+
forceHeight: number | null;
|
|
42
|
+
rendererFunctionName: string | null;
|
|
43
|
+
forceBucketName: string | null;
|
|
44
|
+
audioCodec: AudioCodec | null;
|
|
45
|
+
colorSpace: ColorSpace;
|
|
46
|
+
deleteAfter: DeleteAfter | null;
|
|
47
|
+
} & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>;
|
|
48
|
+
export declare const makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, }: InnerRenderMediaOnLambdaInput) => Promise<LambdaStartPayload>;
|
|
5
49
|
export declare const getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, }: GetRenderProgressInput) => LambdaStatusPayload;
|
|
@@ -9,10 +9,7 @@ const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lamb
|
|
|
9
9
|
const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
|
|
10
10
|
const validate_serveurl_1 = require("../shared/validate-serveurl");
|
|
11
11
|
const validate_webhook_1 = require("../shared/validate-webhook");
|
|
12
|
-
const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite,
|
|
13
|
-
if (quality) {
|
|
14
|
-
throw new Error('quality has been renamed to jpegQuality. Please rename the option.');
|
|
15
|
-
}
|
|
12
|
+
const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, }) => {
|
|
16
13
|
const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
|
|
17
14
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
18
15
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)({
|
|
@@ -32,31 +29,31 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
|
|
|
32
29
|
propsType: 'input-props',
|
|
33
30
|
});
|
|
34
31
|
return {
|
|
35
|
-
rendererFunctionName
|
|
36
|
-
framesPerLambda
|
|
32
|
+
rendererFunctionName,
|
|
33
|
+
framesPerLambda,
|
|
37
34
|
composition,
|
|
38
35
|
serveUrl,
|
|
39
36
|
inputProps: serialized,
|
|
40
37
|
codec: actualCodec,
|
|
41
|
-
imageFormat
|
|
38
|
+
imageFormat,
|
|
42
39
|
crf,
|
|
43
40
|
envVariables,
|
|
44
41
|
pixelFormat,
|
|
45
42
|
proResProfile,
|
|
46
|
-
x264Preset
|
|
43
|
+
x264Preset,
|
|
47
44
|
jpegQuality,
|
|
48
|
-
maxRetries
|
|
49
|
-
privacy
|
|
50
|
-
logLevel
|
|
51
|
-
frameRange
|
|
52
|
-
outName
|
|
53
|
-
timeoutInMilliseconds
|
|
54
|
-
chromiumOptions
|
|
55
|
-
scale
|
|
56
|
-
everyNthFrame
|
|
57
|
-
numberOfGifLoops
|
|
58
|
-
concurrencyPerLambda
|
|
59
|
-
downloadBehavior
|
|
45
|
+
maxRetries,
|
|
46
|
+
privacy,
|
|
47
|
+
logLevel,
|
|
48
|
+
frameRange,
|
|
49
|
+
outName,
|
|
50
|
+
timeoutInMilliseconds,
|
|
51
|
+
chromiumOptions,
|
|
52
|
+
scale,
|
|
53
|
+
everyNthFrame,
|
|
54
|
+
numberOfGifLoops,
|
|
55
|
+
concurrencyPerLambda,
|
|
56
|
+
downloadBehavior,
|
|
60
57
|
muted: muted !== null && muted !== void 0 ? muted : false,
|
|
61
58
|
version: version_1.VERSION,
|
|
62
59
|
overwrite: overwrite !== null && overwrite !== void 0 ? overwrite : false,
|
|
@@ -69,6 +66,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
|
|
|
69
66
|
audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
|
|
70
67
|
type: defaults_1.LambdaRoutines.start,
|
|
71
68
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
69
|
+
deleteAfter: deleteAfter !== null && deleteAfter !== void 0 ? deleteAfter : null,
|
|
72
70
|
colorSpace: colorSpace !== null && colorSpace !== void 0 ? colorSpace : 'default',
|
|
73
71
|
};
|
|
74
72
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AudioCodec, ChromiumOptions, ColorSpace, FrameRange, LogLevel, PixelFormat, ProResProfile, ToOptions, VideoImageFormat, X264Preset } from '@remotion/renderer';
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
|
+
import type { DeleteAfter } from '../functions/helpers/lifecycle';
|
|
3
4
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
4
5
|
import type { OutNameInput, Privacy, WebhookOption } from '../shared/constants';
|
|
5
6
|
import type { DownloadBehavior } from '../shared/content-disposition-header';
|
|
@@ -50,6 +51,7 @@ export type RenderMediaOnLambdaInput = {
|
|
|
50
51
|
*/
|
|
51
52
|
dumpBrowserLogs?: boolean;
|
|
52
53
|
colorSpace?: ColorSpace;
|
|
54
|
+
deleteAfter?: DeleteAfter | null;
|
|
53
55
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>>;
|
|
54
56
|
export type RenderMediaOnLambdaOutput = {
|
|
55
57
|
renderId: string;
|
|
@@ -76,8 +78,8 @@ export type RenderMediaOnLambdaOutput = {
|
|
|
76
78
|
* @param params.webhook Configuration for webhook called upon completion or timeout of the render.
|
|
77
79
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
78
80
|
*/
|
|
79
|
-
export declare const renderMediaOnLambda: (
|
|
81
|
+
export declare const renderMediaOnLambda: (options: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
80
82
|
/**
|
|
81
83
|
* @deprecated Renamed to renderMediaOnLambda()
|
|
82
84
|
*/
|
|
83
|
-
export declare const renderVideoOnLambda: (
|
|
85
|
+
export declare const renderVideoOnLambda: (options: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
@@ -62,7 +62,55 @@ const renderMediaOnLambdaRaw = async (input) => {
|
|
|
62
62
|
* @param params.webhook Configuration for webhook called upon completion or timeout of the render.
|
|
63
63
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
const renderMediaOnLambda = (options) => {
|
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
67
|
+
const wrapped = pure_1.PureJSAPIs.wrapWithErrorHandling(renderMediaOnLambdaRaw);
|
|
68
|
+
if (options.quality) {
|
|
69
|
+
throw new Error('quality has been renamed to jpegQuality. Please rename the option.');
|
|
70
|
+
}
|
|
71
|
+
return wrapped({
|
|
72
|
+
audioBitrate: (_a = options.audioBitrate) !== null && _a !== void 0 ? _a : null,
|
|
73
|
+
audioCodec: (_b = options.audioCodec) !== null && _b !== void 0 ? _b : null,
|
|
74
|
+
chromiumOptions: (_c = options.chromiumOptions) !== null && _c !== void 0 ? _c : {},
|
|
75
|
+
codec: options.codec,
|
|
76
|
+
colorSpace: (_d = options.colorSpace) !== null && _d !== void 0 ? _d : 'default',
|
|
77
|
+
composition: options.composition,
|
|
78
|
+
concurrencyPerLambda: (_e = options.concurrencyPerLambda) !== null && _e !== void 0 ? _e : 1,
|
|
79
|
+
crf: options.crf,
|
|
80
|
+
downloadBehavior: (_f = options.downloadBehavior) !== null && _f !== void 0 ? _f : { type: 'play-in-browser' },
|
|
81
|
+
envVariables: (_g = options.envVariables) !== null && _g !== void 0 ? _g : {},
|
|
82
|
+
everyNthFrame: (_h = options.everyNthFrame) !== null && _h !== void 0 ? _h : 1,
|
|
83
|
+
forceBucketName: (_j = options.forceBucketName) !== null && _j !== void 0 ? _j : null,
|
|
84
|
+
forceHeight: (_k = options.forceHeight) !== null && _k !== void 0 ? _k : null,
|
|
85
|
+
forceWidth: (_l = options.forceWidth) !== null && _l !== void 0 ? _l : null,
|
|
86
|
+
frameRange: (_m = options.frameRange) !== null && _m !== void 0 ? _m : null,
|
|
87
|
+
framesPerLambda: (_o = options.framesPerLambda) !== null && _o !== void 0 ? _o : null,
|
|
88
|
+
functionName: options.functionName,
|
|
89
|
+
imageFormat: (_p = options.imageFormat) !== null && _p !== void 0 ? _p : 'jpeg',
|
|
90
|
+
inputProps: (_q = options.inputProps) !== null && _q !== void 0 ? _q : {},
|
|
91
|
+
jpegQuality: (_r = options.jpegQuality) !== null && _r !== void 0 ? _r : 80,
|
|
92
|
+
logLevel: (_s = options.logLevel) !== null && _s !== void 0 ? _s : 'info',
|
|
93
|
+
maxRetries: (_t = options.maxRetries) !== null && _t !== void 0 ? _t : 1,
|
|
94
|
+
muted: (_u = options.muted) !== null && _u !== void 0 ? _u : false,
|
|
95
|
+
numberOfGifLoops: (_v = options.numberOfGifLoops) !== null && _v !== void 0 ? _v : 0,
|
|
96
|
+
offthreadVideoCacheSizeInBytes: (_w = options.offthreadVideoCacheSizeInBytes) !== null && _w !== void 0 ? _w : 0,
|
|
97
|
+
outName: (_x = options.outName) !== null && _x !== void 0 ? _x : null,
|
|
98
|
+
overwrite: (_y = options.overwrite) !== null && _y !== void 0 ? _y : false,
|
|
99
|
+
pixelFormat: (_z = options.pixelFormat) !== null && _z !== void 0 ? _z : undefined,
|
|
100
|
+
privacy: (_0 = options.privacy) !== null && _0 !== void 0 ? _0 : 'public',
|
|
101
|
+
proResProfile: (_1 = options.proResProfile) !== null && _1 !== void 0 ? _1 : undefined,
|
|
102
|
+
region: options.region,
|
|
103
|
+
rendererFunctionName: (_2 = options.rendererFunctionName) !== null && _2 !== void 0 ? _2 : null,
|
|
104
|
+
scale: (_3 = options.scale) !== null && _3 !== void 0 ? _3 : 1,
|
|
105
|
+
serveUrl: options.serveUrl,
|
|
106
|
+
timeoutInMilliseconds: (_4 = options.timeoutInMilliseconds) !== null && _4 !== void 0 ? _4 : 30000,
|
|
107
|
+
videoBitrate: (_5 = options.videoBitrate) !== null && _5 !== void 0 ? _5 : null,
|
|
108
|
+
webhook: (_6 = options.webhook) !== null && _6 !== void 0 ? _6 : null,
|
|
109
|
+
x264Preset: (_7 = options.x264Preset) !== null && _7 !== void 0 ? _7 : null,
|
|
110
|
+
deleteAfter: (_8 = options.deleteAfter) !== null && _8 !== void 0 ? _8 : null,
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
exports.renderMediaOnLambda = renderMediaOnLambda;
|
|
66
114
|
/**
|
|
67
115
|
* @deprecated Renamed to renderMediaOnLambda()
|
|
68
116
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ChromiumOptions, LogLevel, StillImageFormat, ToOptions } from '@remotion/renderer';
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
|
+
import type { DeleteAfter } from '../functions/helpers/lifecycle';
|
|
3
4
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
4
5
|
import type { CostsInfo, OutNameInput, Privacy } from '../shared/constants';
|
|
5
6
|
import type { DownloadBehavior } from '../shared/content-disposition-header';
|
|
@@ -36,6 +37,7 @@ export type RenderStillOnLambdaInput = {
|
|
|
36
37
|
renderId: string;
|
|
37
38
|
cloudWatchLogs: string;
|
|
38
39
|
}) => void;
|
|
40
|
+
deleteAfter?: DeleteAfter | null;
|
|
39
41
|
} & Partial<ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>>;
|
|
40
42
|
export type RenderStillOnLambdaOutput = {
|
|
41
43
|
estimatedPrice: CostsInfo;
|
|
@@ -61,4 +63,4 @@ export type RenderStillOnLambdaOutput = {
|
|
|
61
63
|
* @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
|
|
62
64
|
* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
|
|
63
65
|
*/
|
|
64
|
-
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, onInit, offthreadVideoCacheSizeInBytes, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
66
|
+
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, onInit, offthreadVideoCacheSizeInBytes, deleteAfter, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
@@ -7,7 +7,7 @@ const call_lambda_1 = require("../shared/call-lambda");
|
|
|
7
7
|
const compress_props_1 = require("../shared/compress-props");
|
|
8
8
|
const constants_1 = require("../shared/constants");
|
|
9
9
|
const get_aws_urls_1 = require("../shared/get-aws-urls");
|
|
10
|
-
const renderStillOnLambdaRaw = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, onInit, offthreadVideoCacheSizeInBytes, }) => {
|
|
10
|
+
const renderStillOnLambdaRaw = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, onInit, offthreadVideoCacheSizeInBytes, deleteAfter, }) => {
|
|
11
11
|
var _a;
|
|
12
12
|
if (quality) {
|
|
13
13
|
throw new Error('The `quality` option is deprecated. Use `jpegQuality` instead.');
|
|
@@ -46,6 +46,7 @@ const renderStillOnLambdaRaw = async ({ functionName, serveUrl, inputProps, imag
|
|
|
46
46
|
forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
|
|
47
47
|
bucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
|
|
48
48
|
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
|
|
49
|
+
deleteAfter: deleteAfter !== null && deleteAfter !== void 0 ? deleteAfter : null,
|
|
49
50
|
},
|
|
50
51
|
region,
|
|
51
52
|
receivedStreamingPayload: (payload) => {
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="minimist" />
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
|
+
import type { DeleteAfter } from '../client';
|
|
3
4
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
4
5
|
import type { Privacy } from '../shared/constants';
|
|
5
6
|
type LambdaCommandLineOptions = {
|
|
@@ -30,6 +31,8 @@ type LambdaCommandLineOptions = {
|
|
|
30
31
|
['renderer-function-name']: string | undefined;
|
|
31
32
|
['function-name']: string | undefined;
|
|
32
33
|
['force-bucket-name']: string | undefined;
|
|
34
|
+
[BrowserSafeApis.options.deleteAfterOption.cliFlag]: DeleteAfter | undefined;
|
|
35
|
+
[BrowserSafeApis.options.folderExpiryOption.cliFlag]: boolean | undefined;
|
|
33
36
|
};
|
|
34
37
|
export declare const parsedLambdaCli: LambdaCommandLineOptions & import("minimist").ParsedArgs;
|
|
35
38
|
export declare const forceFlagProvided: boolean;
|
|
@@ -4,6 +4,7 @@ exports.renderCommand = exports.RENDER_COMMAND = void 0;
|
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
5
|
const config_1 = require("@remotion/cli/config");
|
|
6
6
|
const renderer_1 = require("@remotion/renderer");
|
|
7
|
+
const client_1 = require("@remotion/renderer/client");
|
|
7
8
|
const remotion_1 = require("remotion");
|
|
8
9
|
const download_media_1 = require("../../../api/download-media");
|
|
9
10
|
const get_render_progress_1 = require("../../../api/get-render-progress");
|
|
@@ -33,7 +34,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
33
34
|
(0, quit_1.quit)(1);
|
|
34
35
|
}
|
|
35
36
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
36
|
-
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, overwrite, audioBitrate, videoBitrate, height, width, browserExecutable, port, offthreadVideoCacheSizeInBytes, } = await cli_1.CliInternals.getCliOptions({
|
|
37
|
+
const { chromiumOptions, crf, envVariables, frameRange, inputProps, logLevel, pixelFormat, proResProfile, puppeteerTimeout, jpegQuality, scale, everyNthFrame, numberOfGifLoops, muted, overwrite, audioBitrate, videoBitrate, height, width, browserExecutable, port, offthreadVideoCacheSizeInBytes, colorSpace, } = await cli_1.CliInternals.getCliOptions({
|
|
37
38
|
type: 'series',
|
|
38
39
|
isLambda: true,
|
|
39
40
|
remotionRoot,
|
|
@@ -99,6 +100,7 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
99
100
|
const framesPerLambda = (_e = args_1.parsedLambdaCli['frames-per-lambda']) !== null && _e !== void 0 ? _e : undefined;
|
|
100
101
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)({ framesPerLambda, durationInFrames: 1 });
|
|
101
102
|
const webhookCustomData = (0, get_webhook_custom_data_1.getWebhookCustomData)();
|
|
103
|
+
const deleteAfter = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.deleteAfterOption.cliFlag];
|
|
102
104
|
const res = await (0, render_media_on_lambda_1.renderMediaOnLambda)({
|
|
103
105
|
functionName,
|
|
104
106
|
serveUrl,
|
|
@@ -140,6 +142,8 @@ const renderCommand = async (args, remotionRoot) => {
|
|
|
140
142
|
rendererFunctionName: (_g = args_1.parsedLambdaCli['renderer-function-name']) !== null && _g !== void 0 ? _g : null,
|
|
141
143
|
forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
|
|
142
144
|
audioCodec: cli_1.CliInternals.parsedCli['audio-codec'],
|
|
145
|
+
deleteAfter,
|
|
146
|
+
colorSpace,
|
|
143
147
|
});
|
|
144
148
|
const totalSteps = downloadName ? 6 : 5;
|
|
145
149
|
const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sitesCreateSubcommand = exports.SITES_CREATE_SUBCOMMAND = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
5
|
const config_1 = require("@remotion/cli/config");
|
|
6
|
+
const client_1 = require("@remotion/renderer/client");
|
|
6
7
|
const remotion_1 = require("remotion");
|
|
7
8
|
const deploy_site_1 = require("../../../api/deploy-site");
|
|
8
9
|
const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
|
|
@@ -60,9 +61,12 @@ const sitesCreateSubcommand = async (args, remotionRoot) => {
|
|
|
60
61
|
].join('\n'), false);
|
|
61
62
|
};
|
|
62
63
|
const bucketStart = Date.now();
|
|
64
|
+
const enableFolderExpiry = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.folderExpiryOption.cliFlag];
|
|
63
65
|
const cliBucketName = (_b = args_1.parsedLambdaCli['force-bucket-name']) !== null && _b !== void 0 ? _b : null;
|
|
64
|
-
const bucketName = cliBucketName !== null && cliBucketName !== void 0 ? cliBucketName : (await (0, get_or_create_bucket_1.
|
|
66
|
+
const bucketName = cliBucketName !== null && cliBucketName !== void 0 ? cliBucketName : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
65
67
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
68
|
+
enableFolderExpiry: enableFolderExpiry !== null && enableFolderExpiry !== void 0 ? enableFolderExpiry : null,
|
|
69
|
+
customCredentials: null,
|
|
66
70
|
})).bucketName;
|
|
67
71
|
multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
|
|
68
72
|
updateProgress();
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sitesRmSubcommand = exports.SITES_RM_COMMAND = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const client_1 = require("@remotion/renderer/client");
|
|
5
6
|
const delete_site_1 = require("../../../api/delete-site");
|
|
6
7
|
const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
|
|
7
8
|
const get_sites_1 = require("../../../api/get-sites");
|
|
@@ -12,7 +13,7 @@ const quit_1 = require("../../helpers/quit");
|
|
|
12
13
|
const log_1 = require("../../log");
|
|
13
14
|
exports.SITES_RM_COMMAND = 'rm';
|
|
14
15
|
const sitesRmSubcommand = async (args) => {
|
|
15
|
-
var _a;
|
|
16
|
+
var _a, _b;
|
|
16
17
|
if (args.length === 0) {
|
|
17
18
|
log_1.Log.error('No site name was passed. Run the command again and pass another argument <site-name>.');
|
|
18
19
|
(0, quit_1.quit)(1);
|
|
@@ -26,7 +27,11 @@ const sitesRmSubcommand = async (args) => {
|
|
|
26
27
|
region,
|
|
27
28
|
forceBucketName: args_1.parsedLambdaCli['force-bucket-name'],
|
|
28
29
|
});
|
|
29
|
-
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.
|
|
30
|
+
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
31
|
+
region,
|
|
32
|
+
enableFolderExpiry: (_b = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.folderExpiryOption.cliFlag]) !== null && _b !== void 0 ? _b : null,
|
|
33
|
+
customCredentials: null,
|
|
34
|
+
})).bucketName;
|
|
30
35
|
for (const siteName of args) {
|
|
31
36
|
const site = deployedSites.sites.find((s) => s.id === siteName.trim());
|
|
32
37
|
if (!site) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sitesRmallSubcommand = exports.SITES_RMALL_COMMAND = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
|
+
const client_1 = require("@remotion/renderer/client");
|
|
5
6
|
const delete_site_1 = require("../../../api/delete-site");
|
|
6
7
|
const get_or_create_bucket_1 = require("../../../api/get-or-create-bucket");
|
|
7
8
|
const get_sites_1 = require("../../../api/get-sites");
|
|
@@ -11,12 +12,16 @@ const confirm_1 = require("../../helpers/confirm");
|
|
|
11
12
|
const log_1 = require("../../log");
|
|
12
13
|
exports.SITES_RMALL_COMMAND = 'rmall';
|
|
13
14
|
const sitesRmallSubcommand = async () => {
|
|
14
|
-
var _a;
|
|
15
|
+
var _a, _b;
|
|
15
16
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
16
17
|
const deployedSites = await (0, get_sites_1.getSites)({
|
|
17
18
|
region,
|
|
18
19
|
});
|
|
19
|
-
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.
|
|
20
|
+
const bucketName = (_a = args_1.parsedLambdaCli['force-bucket-name']) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
21
|
+
region,
|
|
22
|
+
enableFolderExpiry: (_b = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.folderExpiryOption.cliFlag]) !== null && _b !== void 0 ? _b : null,
|
|
23
|
+
customCredentials: null,
|
|
24
|
+
})).bucketName;
|
|
20
25
|
for (const site of deployedSites.sites) {
|
|
21
26
|
if (!(await (0, confirm_1.confirmCli)({
|
|
22
27
|
delMessage: `Site ${site.id} in bucket ${site.bucketName} (${cli_1.CliInternals.formatBytes(site.sizeInBytes)}): Delete? (Y/n)`,
|
|
@@ -4,6 +4,7 @@ exports.stillCommand = exports.STILL_COMMAND = void 0;
|
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
5
|
const config_1 = require("@remotion/cli/config");
|
|
6
6
|
const renderer_1 = require("@remotion/renderer");
|
|
7
|
+
const client_1 = require("@remotion/renderer/client");
|
|
7
8
|
const remotion_1 = require("remotion");
|
|
8
9
|
const download_media_1 = require("../../api/download-media");
|
|
9
10
|
const render_still_on_lambda_1 = require("../../api/render-still-on-lambda");
|
|
@@ -89,6 +90,7 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
89
90
|
configImageFormat: (_e = config_1.ConfigInternals.getUserPreferredStillImageFormat()) !== null && _e !== void 0 ? _e : null,
|
|
90
91
|
});
|
|
91
92
|
log_1.Log.info(cli_1.CliInternals.chalk.gray(`functionName = ${functionName}, imageFormat = ${imageFormat} (${imageFormatReason})`));
|
|
93
|
+
const deleteAfter = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.deleteAfterOption.cliFlag];
|
|
92
94
|
const res = await (0, render_still_on_lambda_1.renderStillOnLambda)({
|
|
93
95
|
functionName,
|
|
94
96
|
serveUrl,
|
|
@@ -112,6 +114,7 @@ const stillCommand = async (args, remotionRoot) => {
|
|
|
112
114
|
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Render invoked with ID = ${renderId}`));
|
|
113
115
|
log_1.Log.verbose(`CloudWatch logs (if enabled): ${cloudWatchLogs}`);
|
|
114
116
|
},
|
|
117
|
+
deleteAfter,
|
|
115
118
|
});
|
|
116
119
|
if (downloadName) {
|
|
117
120
|
log_1.Log.info('Finished rendering. Downloading...');
|
package/dist/client.d.ts
CHANGED
|
@@ -12,8 +12,9 @@ import { renderStillOnLambda } from './api/render-still-on-lambda';
|
|
|
12
12
|
import type { SpeculateFunctionNameInput } from './api/speculate-function-name';
|
|
13
13
|
import { speculateFunctionName } from './api/speculate-function-name';
|
|
14
14
|
import { validateWebhookSignature } from './api/validate-webhook-signature';
|
|
15
|
+
import { DeleteAfter } from './functions/helpers/lifecycle';
|
|
15
16
|
import type { AwsRegion } from './pricing/aws-regions';
|
|
16
17
|
import type { RenderProgress } from './shared/constants';
|
|
17
18
|
import type { WebhookPayload } from './shared/invoke-webhook';
|
|
18
|
-
export { renderVideoOnLambda, renderMediaOnLambda, renderStillOnLambda, getRenderProgress, getFunctions, validateWebhookSignature, getCompositionsOnLambda, presignUrl, getSites, speculateFunctionName, };
|
|
19
|
+
export { renderVideoOnLambda, renderMediaOnLambda, renderStillOnLambda, getRenderProgress, getFunctions, validateWebhookSignature, getCompositionsOnLambda, presignUrl, getSites, speculateFunctionName, DeleteAfter, };
|
|
19
20
|
export type { AwsRegion, RenderProgress, SpeculateFunctionNameInput, WebhookPayload, PresignUrlInput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, GetRenderProgressInput, };
|
|
@@ -22,8 +22,10 @@ const compositionsHandler = async (lambdaParams, options) => {
|
|
|
22
22
|
}
|
|
23
23
|
const region = (0, get_current_region_1.getCurrentRegionInFunction)();
|
|
24
24
|
const [bucketName, browserInstance] = await Promise.all([
|
|
25
|
-
(_a = lambdaParams.bucketName) !== null && _a !== void 0 ? _a : (0, get_or_create_bucket_1.
|
|
25
|
+
(_a = lambdaParams.bucketName) !== null && _a !== void 0 ? _a : (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
26
26
|
region,
|
|
27
|
+
enableFolderExpiry: null,
|
|
28
|
+
customCredentials: null,
|
|
27
29
|
}).then((b) => b.bucketName),
|
|
28
30
|
(0, get_browser_instance_1.getBrowserInstance)(lambdaParams.logLevel, false, (_b = lambdaParams.chromiumOptions) !== null && _b !== void 0 ? _b : {}),
|
|
29
31
|
]);
|
|
@@ -38,7 +38,10 @@ const createPostRenderData = ({ renderId, region, memorySizeInMb, renderMetadata
|
|
|
38
38
|
const renderSize = contents
|
|
39
39
|
.map((c) => { var _a; return (_a = c.Size) !== null && _a !== void 0 ? _a : 0; })
|
|
40
40
|
.reduce((a, b) => a + b, 0);
|
|
41
|
-
const retriesInfo = (0, get_retry_stats_1.getRetryStats)({
|
|
41
|
+
const retriesInfo = (0, get_retry_stats_1.getRetryStats)({
|
|
42
|
+
contents,
|
|
43
|
+
renderId,
|
|
44
|
+
});
|
|
42
45
|
return {
|
|
43
46
|
cost: {
|
|
44
47
|
currency: 'USD',
|
|
@@ -70,6 +73,7 @@ const createPostRenderData = ({ renderId, region, memorySizeInMb, renderMetadata
|
|
|
70
73
|
}),
|
|
71
74
|
retriesInfo,
|
|
72
75
|
mostExpensiveFrameRanges: (0, get_most_expensive_chunks_1.getMostExpensiveChunks)(parsedTimings, renderMetadata.framesPerLambda, renderMetadata.frameRange[0], renderMetadata.frameRange[1]),
|
|
76
|
+
deleteAfter: renderMetadata.deleteAfter,
|
|
73
77
|
};
|
|
74
78
|
};
|
|
75
79
|
exports.createPostRenderData = createPostRenderData;
|
|
@@ -6,7 +6,10 @@ const getCleanupProgress = ({ contents, output, chunkCount, renderId, }) => {
|
|
|
6
6
|
if (output === null) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
const filesToDelete = (0, get_files_to_delete_1.getFilesToDelete)({
|
|
9
|
+
const filesToDelete = (0, get_files_to_delete_1.getFilesToDelete)({
|
|
10
|
+
chunkCount,
|
|
11
|
+
renderId,
|
|
12
|
+
});
|
|
10
13
|
const filesStillThere = contents.filter((c) => {
|
|
11
14
|
return filesToDelete.find((f) => {
|
|
12
15
|
var _a;
|
|
@@ -5,15 +5,12 @@ declare const expiryDays: {
|
|
|
5
5
|
readonly '7-days': 7;
|
|
6
6
|
readonly '30-days': 30;
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
9
|
-
export declare const renderEnumToStr: (v: RenderExpiryDays) => string;
|
|
10
|
-
export declare const strToRenderEnum: ({ value }: {
|
|
11
|
-
value?: string | undefined;
|
|
12
|
-
}) => "1-day" | "3-days" | "7-days" | "30-days" | null;
|
|
8
|
+
export type DeleteAfter = keyof typeof expiryDays;
|
|
13
9
|
export declare const getEnabledLifeCycleRule: ({ key, value, }: {
|
|
14
10
|
key: string;
|
|
15
11
|
value: number;
|
|
16
12
|
}) => LifecycleRule;
|
|
17
13
|
export declare const getLifeCycleRules: () => LifecycleRule[];
|
|
18
|
-
export declare const generateRandomHashWithLifeCycleRule: (
|
|
14
|
+
export declare const generateRandomHashWithLifeCycleRule: (deleteAfter: DeleteAfter | null) => string;
|
|
15
|
+
export declare const validateDeleteAfter: (lifeCycleValue: unknown) => void;
|
|
19
16
|
export {};
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateDeleteAfter = exports.generateRandomHashWithLifeCycleRule = exports.getLifeCycleRules = exports.getEnabledLifeCycleRule = void 0;
|
|
4
4
|
const random_hash_1 = require("../../shared/random-hash");
|
|
5
5
|
const truthy_1 = require("../../shared/truthy");
|
|
6
|
+
// Needs to be in sync with cli/src/config/render-folder-expiry.ts#L7
|
|
6
7
|
const expiryDays = {
|
|
7
8
|
'1-day': 1,
|
|
8
9
|
'3-days': 3,
|
|
9
10
|
'7-days': 7,
|
|
10
11
|
'30-days': 30,
|
|
11
12
|
};
|
|
12
|
-
const renderEnumToStr = (v) => {
|
|
13
|
-
return v;
|
|
14
|
-
};
|
|
15
|
-
exports.renderEnumToStr = renderEnumToStr;
|
|
16
|
-
const strToRenderEnum = ({ value }) => {
|
|
17
|
-
return value ? value : null;
|
|
18
|
-
};
|
|
19
|
-
exports.strToRenderEnum = strToRenderEnum;
|
|
20
13
|
const getEnabledLifeCycleRule = ({ key, value, }) => {
|
|
21
14
|
return {
|
|
22
15
|
Expiration: {
|
|
@@ -34,9 +27,24 @@ const getLifeCycleRules = () => {
|
|
|
34
27
|
return Object.entries(expiryDays).map(([key, value]) => (0, exports.getEnabledLifeCycleRule)({ key, value }));
|
|
35
28
|
};
|
|
36
29
|
exports.getLifeCycleRules = getLifeCycleRules;
|
|
37
|
-
const generateRandomHashWithLifeCycleRule = (
|
|
38
|
-
return [
|
|
30
|
+
const generateRandomHashWithLifeCycleRule = (deleteAfter) => {
|
|
31
|
+
return [deleteAfter, (0, random_hash_1.randomHash)({ randomInTests: true })]
|
|
39
32
|
.filter(truthy_1.truthy)
|
|
40
33
|
.join('-');
|
|
41
34
|
};
|
|
42
35
|
exports.generateRandomHashWithLifeCycleRule = generateRandomHashWithLifeCycleRule;
|
|
36
|
+
const validateDeleteAfter = (lifeCycleValue) => {
|
|
37
|
+
if (lifeCycleValue === null) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (lifeCycleValue === undefined) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (typeof lifeCycleValue !== 'string') {
|
|
44
|
+
throw new TypeError(`Expected life cycle value to be a string, got ${JSON.stringify(lifeCycleValue)}`);
|
|
45
|
+
}
|
|
46
|
+
if (!(lifeCycleValue in expiryDays)) {
|
|
47
|
+
throw new TypeError(`Expected deleteAfter value to be one of ${Object.keys(expiryDays).join(', ')}, got ${lifeCycleValue}`);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.validateDeleteAfter = validateDeleteAfter;
|
|
@@ -4,16 +4,16 @@ declare const streamingPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
4
4
|
type: z.ZodLiteral<"render-id-determined">;
|
|
5
5
|
renderId: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
type: "render-id-determined";
|
|
8
7
|
renderId: string;
|
|
9
|
-
}, {
|
|
10
8
|
type: "render-id-determined";
|
|
9
|
+
}, {
|
|
11
10
|
renderId: string;
|
|
11
|
+
type: "render-id-determined";
|
|
12
12
|
}>]>;
|
|
13
13
|
export type StreamingPayloads = z.infer<typeof streamingPayloadSchema>;
|
|
14
14
|
export declare const isStreamingPayload: (str: string) => false | {
|
|
15
|
-
type: "render-id-determined";
|
|
16
15
|
renderId: string;
|
|
16
|
+
type: "render-id-determined";
|
|
17
17
|
};
|
|
18
18
|
export declare const sendProgressEvent: (responseStream: ResponseStream, payload: StreamingPayloads) => void;
|
|
19
19
|
export {};
|
package/dist/functions/index.js
CHANGED
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handler = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const constants_1 = require("../shared/constants");
|
|
6
|
-
const random_hash_1 = require("../shared/random-hash");
|
|
7
6
|
const compositions_1 = require("./compositions");
|
|
8
7
|
const clean_tmpdir_1 = require("./helpers/clean-tmpdir");
|
|
9
8
|
const is_warm_1 = require("./helpers/is-warm");
|
|
9
|
+
const lifecycle_1 = require("./helpers/lifecycle");
|
|
10
10
|
const print_cloudwatch_helper_1 = require("./helpers/print-cloudwatch-helper");
|
|
11
11
|
const streamify_response_1 = require("./helpers/streamify-response");
|
|
12
12
|
const streaming_payloads_1 = require("./helpers/streaming-payloads");
|
|
@@ -27,7 +27,8 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
27
27
|
(0, is_warm_1.setWarm)();
|
|
28
28
|
const currentUserId = context.invokedFunctionArn.split(':')[4];
|
|
29
29
|
if (params.type === constants_1.LambdaRoutines.still) {
|
|
30
|
-
|
|
30
|
+
(0, lifecycle_1.validateDeleteAfter)(params.deleteAfter);
|
|
31
|
+
const renderId = (0, lifecycle_1.generateRandomHashWithLifeCycleRule)(params.deleteAfter);
|
|
31
32
|
(0, print_cloudwatch_helper_1.printCloudwatchHelper)(constants_1.LambdaRoutines.still, {
|
|
32
33
|
renderId,
|
|
33
34
|
inputProps: JSON.stringify(params.inputProps),
|
package/dist/functions/launch.js
CHANGED
|
@@ -204,6 +204,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
204
204
|
},
|
|
205
205
|
resolvedProps: serializedResolvedProps,
|
|
206
206
|
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
|
|
207
|
+
deleteAfter: params.deleteAfter,
|
|
207
208
|
colorSpace: params.colorSpace,
|
|
208
209
|
};
|
|
209
210
|
return payload;
|
|
@@ -236,6 +237,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
236
237
|
everyNthFrame: params.everyNthFrame,
|
|
237
238
|
frameRange: realFrameRange,
|
|
238
239
|
audioCodec: params.audioCodec,
|
|
240
|
+
deleteAfter: params.deleteAfter,
|
|
239
241
|
};
|
|
240
242
|
const { key, renderBucketName, customCredentials } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, params.bucketName, typeof params.outName === 'string' || typeof params.outName === 'undefined'
|
|
241
243
|
? null
|
package/dist/functions/start.js
CHANGED
|
@@ -7,9 +7,9 @@ const get_or_create_bucket_1 = require("../api/get-or-create-bucket");
|
|
|
7
7
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
8
8
|
const constants_1 = require("../shared/constants");
|
|
9
9
|
const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
10
|
-
const random_hash_1 = require("../shared/random-hash");
|
|
11
10
|
const get_current_region_1 = require("./helpers/get-current-region");
|
|
12
11
|
const io_1 = require("./helpers/io");
|
|
12
|
+
const lifecycle_1 = require("./helpers/lifecycle");
|
|
13
13
|
const startHandler = async (params, options) => {
|
|
14
14
|
var _a, _b;
|
|
15
15
|
if (params.type !== constants_1.LambdaRoutines.start) {
|
|
@@ -22,15 +22,18 @@ const startHandler = async (params, options) => {
|
|
|
22
22
|
throw new Error(`Version mismatch: When calling renderMediaOnLambda(), you passed ${process.env.AWS_LAMBDA_FUNCTION_NAME} as the function, which has the version ${version_1.VERSION}, but the @remotion/lambda package you used to invoke the function has version ${params.version}. Deploy a new function and use it to call renderMediaOnLambda(). See: https://www.remotion.dev/docs/lambda/upgrading`);
|
|
23
23
|
}
|
|
24
24
|
const region = (0, get_current_region_1.getCurrentRegionInFunction)();
|
|
25
|
-
const bucketName = (_a = params.bucketName) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.
|
|
25
|
+
const bucketName = (_a = params.bucketName) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
26
26
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
27
|
+
enableFolderExpiry: null,
|
|
28
|
+
customCredentials: null,
|
|
27
29
|
})).bucketName;
|
|
28
30
|
const realServeUrl = (0, convert_to_serve_url_1.convertToServeUrl)({
|
|
29
31
|
urlOrId: params.serveUrl,
|
|
30
32
|
region,
|
|
31
33
|
bucketName,
|
|
32
34
|
});
|
|
33
|
-
|
|
35
|
+
(0, lifecycle_1.validateDeleteAfter)(params.deleteAfter);
|
|
36
|
+
const renderId = (0, lifecycle_1.generateRandomHashWithLifeCycleRule)(params.deleteAfter);
|
|
34
37
|
const initialFile = (0, io_1.lambdaWriteFile)({
|
|
35
38
|
bucketName,
|
|
36
39
|
downloadBehavior: null,
|
|
@@ -79,6 +82,7 @@ const startHandler = async (params, options) => {
|
|
|
79
82
|
rendererFunctionName: params.rendererFunctionName,
|
|
80
83
|
audioCodec: params.audioCodec,
|
|
81
84
|
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
|
|
85
|
+
deleteAfter: params.deleteAfter,
|
|
82
86
|
colorSpace: params.colorSpace,
|
|
83
87
|
};
|
|
84
88
|
// Don't replace with callLambda(), we want to return before the render is snone
|
package/dist/functions/still.js
CHANGED
|
@@ -46,8 +46,10 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
46
46
|
(0, validate_outname_1.validateOutname)(lambdaParams.outName, null, null);
|
|
47
47
|
const start = Date.now();
|
|
48
48
|
const [bucketName, browserInstance] = await Promise.all([
|
|
49
|
-
(_a = lambdaParams.bucketName) !== null && _a !== void 0 ? _a : (0, get_or_create_bucket_1.
|
|
49
|
+
(_a = lambdaParams.bucketName) !== null && _a !== void 0 ? _a : (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
50
50
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
51
|
+
enableFolderExpiry: null,
|
|
52
|
+
customCredentials: null,
|
|
51
53
|
}).then((b) => b.bucketName),
|
|
52
54
|
(0, get_browser_instance_1.getBrowserInstance)(lambdaParams.logLevel, false, (_b = lambdaParams.chromiumOptions) !== null && _b !== void 0 ? _b : {}),
|
|
53
55
|
]);
|
|
@@ -112,6 +114,7 @@ const innerStillHandler = async ({ params: lambdaParams, expectedBucketOwner, re
|
|
|
112
114
|
everyNthFrame: 1,
|
|
113
115
|
frameRange: [lambdaParams.frame, lambdaParams.frame],
|
|
114
116
|
audioCodec: null,
|
|
117
|
+
deleteAfter: lambdaParams.deleteAfter,
|
|
115
118
|
};
|
|
116
119
|
await (0, io_1.lambdaWriteFile)({
|
|
117
120
|
bucketName,
|
|
@@ -225,8 +228,10 @@ const stillHandler = async (options) => {
|
|
|
225
228
|
timeoutInTest: 120000,
|
|
226
229
|
retriesRemaining: 0,
|
|
227
230
|
});
|
|
228
|
-
const bucketName = (_a = params.bucketName) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.
|
|
231
|
+
const bucketName = (_a = params.bucketName) !== null && _a !== void 0 ? _a : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
229
232
|
region: (0, get_current_region_1.getCurrentRegionInFunction)(),
|
|
233
|
+
enableFolderExpiry: null,
|
|
234
|
+
customCredentials: null,
|
|
230
235
|
})).bucketName;
|
|
231
236
|
// `await` elided on purpose here; using `void` to mark it as intentional
|
|
232
237
|
// eslint-disable-next-line no-void
|
package/dist/index.d.ts
CHANGED
|
@@ -43,11 +43,11 @@ import type { WebhookPayload } from './shared/invoke-webhook';
|
|
|
43
43
|
/**
|
|
44
44
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
45
45
|
*/
|
|
46
|
-
declare const renderMediaOnLambda: (
|
|
46
|
+
declare const renderMediaOnLambda: (options: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
47
47
|
/**
|
|
48
48
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
49
49
|
*/
|
|
50
|
-
declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, onInit, offthreadVideoCacheSizeInBytes, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
50
|
+
declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, onInit, offthreadVideoCacheSizeInBytes, deleteAfter, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
51
51
|
/**
|
|
52
52
|
* @deprecated Import this from `@remotion/lambda/client` instead
|
|
53
53
|
*/
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const LambdaInternals: {
|
|
2
2
|
executeCommand: (args: string[], remotionRoot: string) => Promise<void>;
|
|
3
|
-
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite,
|
|
3
|
+
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("./defaults").LambdaStartPayload>;
|
|
4
4
|
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, }: import(".").GetRenderProgressInput) => import("./defaults").LambdaStatusPayload;
|
|
5
5
|
};
|
|
@@ -36,8 +36,10 @@ exports.getNeedsToUpload = getNeedsToUpload;
|
|
|
36
36
|
const compressInputProps = async ({ stringifiedInputProps, region, userSpecifiedBucketName, propsType, needsToUpload, }) => {
|
|
37
37
|
const hash = (0, random_hash_1.randomHash)();
|
|
38
38
|
if (needsToUpload) {
|
|
39
|
-
const bucketName = userSpecifiedBucketName !== null && userSpecifiedBucketName !== void 0 ? userSpecifiedBucketName : (await (0, get_or_create_bucket_1.
|
|
39
|
+
const bucketName = userSpecifiedBucketName !== null && userSpecifiedBucketName !== void 0 ? userSpecifiedBucketName : (await (0, get_or_create_bucket_1.internalGetOrCreateBucket)({
|
|
40
40
|
region,
|
|
41
|
+
enableFolderExpiry: null,
|
|
42
|
+
customCredentials: null,
|
|
41
43
|
})).bucketName;
|
|
42
44
|
await (0, io_1.lambdaWriteFile)({
|
|
43
45
|
body: stringifiedInputProps,
|
|
@@ -47,7 +49,7 @@ const compressInputProps = async ({ stringifiedInputProps, region, userSpecified
|
|
|
47
49
|
downloadBehavior: null,
|
|
48
50
|
expectedBucketOwner: null,
|
|
49
51
|
key: makeKey(propsType, hash),
|
|
50
|
-
privacy: '
|
|
52
|
+
privacy: 'private',
|
|
51
53
|
});
|
|
52
54
|
return {
|
|
53
55
|
type: 'bucket-url',
|
|
@@ -2,6 +2,7 @@ import type { AudioCodec, ChromiumOptions, Codec, ColorSpace, FrameRange, LogLev
|
|
|
2
2
|
import type { BrowserSafeApis } from '@remotion/renderer/client';
|
|
3
3
|
import type { VideoConfig } from 'remotion';
|
|
4
4
|
import type { ChunkRetry } from '../functions/helpers/get-retry-stats';
|
|
5
|
+
import type { DeleteAfter } from '../functions/helpers/lifecycle';
|
|
5
6
|
import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
|
|
6
7
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
7
8
|
import type { CustomCredentials, CustomCredentialsWithoutSensitiveData } from './aws-clients';
|
|
@@ -148,6 +149,7 @@ export type LambdaStartPayload = {
|
|
|
148
149
|
forceWidth: number | null;
|
|
149
150
|
bucketName: string | null;
|
|
150
151
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
152
|
+
deleteAfter: DeleteAfter | null;
|
|
151
153
|
colorSpace: ColorSpace;
|
|
152
154
|
};
|
|
153
155
|
export type LambdaStatusPayload = {
|
|
@@ -200,6 +202,7 @@ export type LambdaPayloads = {
|
|
|
200
202
|
forceHeight: number | null;
|
|
201
203
|
forceWidth: number | null;
|
|
202
204
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
205
|
+
deleteAfter: DeleteAfter | null;
|
|
203
206
|
colorSpace: ColorSpace;
|
|
204
207
|
};
|
|
205
208
|
status: LambdaStatusPayload;
|
|
@@ -241,6 +244,7 @@ export type LambdaPayloads = {
|
|
|
241
244
|
version: string;
|
|
242
245
|
};
|
|
243
246
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
247
|
+
deleteAfter: DeleteAfter | null;
|
|
244
248
|
colorSpace: ColorSpace;
|
|
245
249
|
};
|
|
246
250
|
still: {
|
|
@@ -266,6 +270,7 @@ export type LambdaPayloads = {
|
|
|
266
270
|
forceWidth: number | null;
|
|
267
271
|
bucketName: string | null;
|
|
268
272
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
273
|
+
deleteAfter: DeleteAfter | null;
|
|
269
274
|
};
|
|
270
275
|
compositions: {
|
|
271
276
|
type: LambdaRoutines.compositions;
|
|
@@ -311,6 +316,7 @@ export type RenderMetadata = Discriminated & {
|
|
|
311
316
|
privacy: Privacy;
|
|
312
317
|
frameRange: [number, number];
|
|
313
318
|
everyNthFrame: number;
|
|
319
|
+
deleteAfter: DeleteAfter | null;
|
|
314
320
|
};
|
|
315
321
|
export type AfterRenderCost = {
|
|
316
322
|
estimatedCost: number;
|
|
@@ -334,6 +340,7 @@ export type PostRenderData = {
|
|
|
334
340
|
timeToRenderChunks: number;
|
|
335
341
|
retriesInfo: ChunkRetry[];
|
|
336
342
|
mostExpensiveFrameRanges: ExpensiveChunk[] | undefined;
|
|
343
|
+
deleteAfter: DeleteAfter | null;
|
|
337
344
|
};
|
|
338
345
|
export type CostsInfo = {
|
|
339
346
|
accruedSoFar: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const lambdaCodecs: readonly ["h264", "vp8", "vp9", "mp3", "aac", "wav", "gif", "prores"];
|
|
1
|
+
declare const lambdaCodecs: readonly ["h264", "h265", "vp8", "vp9", "mp3", "aac", "wav", "gif", "prores"];
|
|
2
2
|
export type LambdaCodec = (typeof lambdaCodecs)[number];
|
|
3
3
|
export declare const validateLambdaCodec: (codec: unknown) => LambdaCodec;
|
|
4
4
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.33",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"zod": "3.21.4",
|
|
29
|
-
"@remotion/bundler": "4.0.
|
|
30
|
-
"@remotion/cli": "4.0.
|
|
31
|
-
"@remotion/renderer": "4.0.
|
|
32
|
-
"remotion": "4.0.
|
|
29
|
+
"@remotion/bundler": "4.0.33",
|
|
30
|
+
"@remotion/cli": "4.0.33",
|
|
31
|
+
"@remotion/renderer": "4.0.33",
|
|
32
|
+
"remotion": "4.0.33"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"ts-node": "^10.8.0",
|
|
44
44
|
"vitest": "0.31.1",
|
|
45
45
|
"zip-lib": "^0.7.2",
|
|
46
|
-
"@remotion/bundler": "4.0.
|
|
47
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
+
"@remotion/bundler": "4.0.33",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.33"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.
|
|
50
|
+
"@remotion/bundler": "4.0.33"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateDurationInFrames = exports.validateDimension = exports.validateFps = void 0;
|
|
4
|
-
/* eslint-disable prefer-destructuring */
|
|
5
|
-
const remotion_1 = require("remotion");
|
|
6
|
-
exports.validateFps = remotion_1.Internals.validateFps;
|
|
7
|
-
exports.validateDimension = remotion_1.Internals.validateDimension;
|
|
8
|
-
exports.validateDurationInFrames = remotion_1.Internals.validateDurationInFrames;
|