@remotion/lambda 4.0.81 → 4.0.83

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.
@@ -1,7 +1,8 @@
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 { AwsRegion, DeleteAfter } from '../client';
4
- import type { LambdaStartPayload, LambdaStatusPayload, OutNameInput, Privacy, WebhookOption } from '../defaults';
3
+ import type { AwsRegion, DeleteAfter, RenderStillOnLambdaInput } from '../client';
4
+ import type { LambdaPayloads, LambdaStartPayload, LambdaStatusPayload, OutNameInput, Privacy, WebhookOption } from '../defaults';
5
+ import { LambdaRoutines } from '../defaults';
5
6
  import type { DownloadBehavior } from '../shared/content-disposition-header';
6
7
  import type { LambdaCodec } from '../shared/validate-lambda-codec';
7
8
  import type { GetRenderProgressInput } from './get-render-progress';
@@ -49,3 +50,4 @@ export type InnerRenderMediaOnLambdaInput = {
49
50
  } & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>;
50
51
  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, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, }: InnerRenderMediaOnLambdaInput) => Promise<LambdaStartPayload>;
51
52
  export declare const getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, }: GetRenderProgressInput) => LambdaStatusPayload;
53
+ export declare const makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, offthreadVideoCacheSizeInBytes, deleteAfter, }: RenderStillOnLambdaInput) => Promise<LambdaPayloads[LambdaRoutines.still]>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRenderProgressPayload = exports.makeLambdaRenderMediaPayload = void 0;
3
+ exports.makeLambdaRenderStillPayload = exports.getRenderProgressPayload = exports.makeLambdaRenderMediaPayload = void 0;
4
4
  const version_1 = require("remotion/version");
5
5
  const defaults_1 = require("../defaults");
6
6
  const compress_props_1 = require("../shared/compress-props");
@@ -83,3 +83,42 @@ const getRenderProgressPayload = ({ bucketName, renderId, s3OutputProvider, }) =
83
83
  };
84
84
  };
85
85
  exports.getRenderProgressPayload = getRenderProgressPayload;
86
+ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, offthreadVideoCacheSizeInBytes, deleteAfter, }) => {
87
+ if (quality) {
88
+ throw new Error('The `quality` option is deprecated. Use `jpegQuality` instead.');
89
+ }
90
+ const stringifiedInputProps = (0, compress_props_1.serializeOrThrow)(inputProps, 'input-props');
91
+ const serializedInputProps = await (0, compress_props_1.compressInputProps)({
92
+ stringifiedInputProps,
93
+ region,
94
+ needsToUpload: (0, compress_props_1.getNeedsToUpload)('still', [stringifiedInputProps.length]),
95
+ userSpecifiedBucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
96
+ propsType: 'input-props',
97
+ });
98
+ return {
99
+ composition,
100
+ serveUrl,
101
+ inputProps: serializedInputProps,
102
+ imageFormat,
103
+ envVariables,
104
+ jpegQuality,
105
+ maxRetries: maxRetries !== null && maxRetries !== void 0 ? maxRetries : defaults_1.DEFAULT_MAX_RETRIES,
106
+ frame: frame !== null && frame !== void 0 ? frame : 0,
107
+ privacy,
108
+ attempt: 1,
109
+ logLevel: dumpBrowserLogs ? 'verbose' : logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
110
+ outName: outName !== null && outName !== void 0 ? outName : null,
111
+ timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
112
+ chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
113
+ scale: scale !== null && scale !== void 0 ? scale : 1,
114
+ downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
115
+ version: version_1.VERSION,
116
+ forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
117
+ forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
118
+ bucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
119
+ offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
120
+ deleteAfter: deleteAfter !== null && deleteAfter !== void 0 ? deleteAfter : null,
121
+ type: defaults_1.LambdaRoutines.still,
122
+ };
123
+ };
124
+ exports.makeLambdaRenderStillPayload = makeLambdaRenderStillPayload;
@@ -64,4 +64,4 @@ export type RenderStillOnLambdaOutput = {
64
64
  * @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
65
65
  * @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
66
66
  */
67
- 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>;
67
+ export declare const renderStillOnLambda: (input: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
@@ -2,52 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderStillOnLambda = void 0;
4
4
  const pure_1 = require("@remotion/renderer/pure");
5
- const version_1 = require("remotion/version");
6
5
  const call_lambda_1 = require("../shared/call-lambda");
7
- const compress_props_1 = require("../shared/compress-props");
8
6
  const constants_1 = require("../shared/constants");
9
7
  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, deleteAfter, }) => {
8
+ const make_lambda_payload_1 = require("./make-lambda-payload");
9
+ const renderStillOnLambdaRaw = async (input) => {
11
10
  var _a;
12
- if (quality) {
13
- throw new Error('The `quality` option is deprecated. Use `jpegQuality` instead.');
14
- }
15
- const stringifiedInputProps = (0, compress_props_1.serializeOrThrow)(inputProps, 'input-props');
16
- const serializedInputProps = await (0, compress_props_1.compressInputProps)({
17
- stringifiedInputProps,
18
- region,
19
- needsToUpload: (0, compress_props_1.getNeedsToUpload)('still', [stringifiedInputProps.length]),
20
- userSpecifiedBucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
21
- propsType: 'input-props',
22
- });
11
+ const { functionName, region, onInit } = input;
23
12
  try {
24
13
  const res = await (0, call_lambda_1.callLambda)({
25
14
  functionName,
26
15
  type: constants_1.LambdaRoutines.still,
27
- payload: {
28
- composition,
29
- serveUrl,
30
- inputProps: serializedInputProps,
31
- imageFormat,
32
- envVariables,
33
- jpegQuality,
34
- maxRetries: maxRetries !== null && maxRetries !== void 0 ? maxRetries : constants_1.DEFAULT_MAX_RETRIES,
35
- frame: frame !== null && frame !== void 0 ? frame : 0,
36
- privacy,
37
- attempt: 1,
38
- logLevel: dumpBrowserLogs ? 'verbose' : logLevel !== null && logLevel !== void 0 ? logLevel : 'info',
39
- outName: outName !== null && outName !== void 0 ? outName : null,
40
- timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : 30000,
41
- chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
42
- scale: scale !== null && scale !== void 0 ? scale : 1,
43
- downloadBehavior: downloadBehavior !== null && downloadBehavior !== void 0 ? downloadBehavior : { type: 'play-in-browser' },
44
- version: version_1.VERSION,
45
- forceHeight: forceHeight !== null && forceHeight !== void 0 ? forceHeight : null,
46
- forceWidth: forceWidth !== null && forceWidth !== void 0 ? forceWidth : null,
47
- bucketName: forceBucketName !== null && forceBucketName !== void 0 ? forceBucketName : null,
48
- offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes !== null && offthreadVideoCacheSizeInBytes !== void 0 ? offthreadVideoCacheSizeInBytes : null,
49
- deleteAfter: deleteAfter !== null && deleteAfter !== void 0 ? deleteAfter : null,
50
- },
16
+ payload: await (0, make_lambda_payload_1.makeLambdaRenderStillPayload)(input),
51
17
  region,
52
18
  receivedStreamingPayload: (payload) => {
53
19
  if (payload.type === 'render-id-determined') {
package/dist/client.d.ts CHANGED
@@ -16,6 +16,7 @@ import { DeleteAfter } from './functions/helpers/lifecycle';
16
16
  import type { AwsRegion } from './pricing/aws-regions';
17
17
  import type { RenderProgress } from './shared/constants';
18
18
  import type { WebhookPayload } from './shared/invoke-webhook';
19
- export { CustomCredentials, getServiceClient } from './shared/aws-clients';
19
+ export { getAwsClient, GetAwsClientInput, GetAwsClientOutput, } from './api/get-aws-client';
20
+ export { CustomCredentials } from './shared/aws-clients';
20
21
  export { renderVideoOnLambda, renderMediaOnLambda, renderStillOnLambda, getRenderProgress, getFunctions, validateWebhookSignature, getCompositionsOnLambda, presignUrl, getSites, speculateFunctionName, DeleteAfter, };
21
22
  export type { AwsRegion, RenderProgress, SpeculateFunctionNameInput, WebhookPayload, PresignUrlInput, RenderStillOnLambdaInput, RenderStillOnLambdaOutput, RenderMediaOnLambdaInput, RenderMediaOnLambdaOutput, GetRenderProgressInput, };
package/dist/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.speculateFunctionName = exports.getSites = exports.presignUrl = exports.getCompositionsOnLambda = exports.validateWebhookSignature = exports.getFunctions = exports.getRenderProgress = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.renderVideoOnLambda = exports.getServiceClient = void 0;
3
+ exports.speculateFunctionName = exports.getSites = exports.presignUrl = exports.getCompositionsOnLambda = exports.validateWebhookSignature = exports.getFunctions = exports.getRenderProgress = exports.renderStillOnLambda = exports.renderMediaOnLambda = exports.renderVideoOnLambda = exports.getAwsClient = void 0;
4
4
  const get_compositions_on_lambda_1 = require("./api/get-compositions-on-lambda");
5
5
  Object.defineProperty(exports, "getCompositionsOnLambda", { enumerable: true, get: function () { return get_compositions_on_lambda_1.getCompositionsOnLambda; } });
6
6
  const get_functions_1 = require("./api/get-functions");
@@ -20,5 +20,5 @@ const speculate_function_name_1 = require("./api/speculate-function-name");
20
20
  Object.defineProperty(exports, "speculateFunctionName", { enumerable: true, get: function () { return speculate_function_name_1.speculateFunctionName; } });
21
21
  const validate_webhook_signature_1 = require("./api/validate-webhook-signature");
22
22
  Object.defineProperty(exports, "validateWebhookSignature", { enumerable: true, get: function () { return validate_webhook_signature_1.validateWebhookSignature; } });
23
- var aws_clients_1 = require("./shared/aws-clients");
24
- Object.defineProperty(exports, "getServiceClient", { enumerable: true, get: function () { return aws_clients_1.getServiceClient; } });
23
+ var get_aws_client_1 = require("./api/get-aws-client");
24
+ Object.defineProperty(exports, "getAwsClient", { enumerable: true, get: function () { return get_aws_client_1.getAwsClient; } });
@@ -3,8 +3,5 @@ export declare const planFrameRanges: ({ framesPerLambda, frameRange, everyNthFr
3
3
  frameRange: [number, number];
4
4
  everyNthFrame: number;
5
5
  }) => {
6
- chunks: [
7
- number,
8
- number
9
- ][];
6
+ chunks: [number, number][];
10
7
  };
package/dist/index.d.ts CHANGED
@@ -47,7 +47,7 @@ declare const renderMediaOnLambda: (options: RenderMediaOnLambdaInput) => Promis
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, deleteAfter, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
50
+ declare const renderStillOnLambda: (input: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
51
51
  /**
52
52
  * @deprecated Import this from `@remotion/lambda/client` instead
53
53
  */
@@ -2,4 +2,29 @@ export declare const LambdaInternals: {
2
2
  executeCommand: (args: string[], remotionRoot: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
3
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, encodingMaxRate, encodingBufferSize, 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
+ makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, dumpBrowserLogs, offthreadVideoCacheSizeInBytes, deleteAfter, }: import(".").RenderStillOnLambdaInput) => Promise<{
6
+ type: import("./defaults").LambdaRoutines.still;
7
+ serveUrl: string;
8
+ composition: string;
9
+ inputProps: import("./defaults").SerializedInputProps;
10
+ imageFormat: "png" | "jpeg" | "pdf" | "webp";
11
+ envVariables: Record<string, string> | undefined;
12
+ attempt: number;
13
+ jpegQuality: number | undefined;
14
+ maxRetries: number;
15
+ frame: number;
16
+ privacy: import("./defaults").Privacy;
17
+ logLevel: "verbose" | "info" | "warn" | "error";
18
+ outName: import("./defaults").OutNameInput | null;
19
+ timeoutInMilliseconds: number;
20
+ chromiumOptions: import("@remotion/renderer").ChromiumOptions;
21
+ scale: number;
22
+ downloadBehavior: import("./shared/content-disposition-header").DownloadBehavior;
23
+ version: string;
24
+ forceHeight: number | null;
25
+ forceWidth: number | null;
26
+ bucketName: string | null;
27
+ offthreadVideoCacheSizeInBytes: number | null;
28
+ deleteAfter: "1-day" | "3-days" | "7-days" | "30-days" | null;
29
+ }>;
5
30
  };
package/dist/internals.js CHANGED
@@ -7,4 +7,5 @@ exports.LambdaInternals = {
7
7
  executeCommand: index_1.executeCommand,
8
8
  makeLambdaRenderMediaPayload: make_lambda_payload_1.makeLambdaRenderMediaPayload,
9
9
  getRenderProgressPayload: make_lambda_payload_1.getRenderProgressPayload,
10
+ makeLambdaRenderStillPayload: make_lambda_payload_1.makeLambdaRenderStillPayload,
10
11
  };
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
1
3
  import https from 'https';
2
4
  import http from 'node:http';
3
5
  import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "4.0.81",
3
+ "version": "4.0.83",
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.22.3",
29
- "@remotion/cli": "4.0.81",
30
- "@remotion/renderer": "4.0.81",
31
- "@remotion/bundler": "4.0.81",
32
- "remotion": "4.0.81"
29
+ "@remotion/cli": "4.0.83",
30
+ "@remotion/renderer": "4.0.83",
31
+ "remotion": "4.0.83",
32
+ "@remotion/bundler": "4.0.83"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@jonny/eslint-config": "3.0.276",
@@ -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.81",
47
- "@remotion/compositor-linux-arm64-gnu": "4.0.81"
46
+ "@remotion/compositor-linux-arm64-gnu": "4.0.83",
47
+ "@remotion/bundler": "4.0.83"
48
48
  },
49
49
  "peerDependencies": {
50
- "@remotion/bundler": "4.0.81"
50
+ "@remotion/bundler": "4.0.83"
51
51
  },
52
52
  "publishConfig": {
53
53
  "access": "public"
Binary file