@remotion/lambda 4.0.251 → 4.0.253

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.
@@ -102,9 +102,11 @@ const mandatoryDeploySite = async ({ bucketName, entryPoint, siteName, options,
102
102
  });
103
103
  })),
104
104
  ]);
105
- node_fs_1.default.rmSync(bundled, {
106
- recursive: true,
107
- });
105
+ if (node_fs_1.default.existsSync(bundled)) {
106
+ node_fs_1.default.rmSync(bundled, {
107
+ recursive: true,
108
+ });
109
+ }
108
110
  return {
109
111
  serveUrl: (0, make_s3_url_1.makeS3ServeUrl)({ bucketName, subFolder, region }),
110
112
  siteName,
@@ -52,6 +52,6 @@ export type InnerRenderMediaOnLambdaInput = {
52
52
  forcePathStyle: boolean;
53
53
  metadata: Record<string, string> | null;
54
54
  } & ToOptions<typeof BrowserSafeApis.optionsMap.renderMediaOnLambda>;
55
- 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, preferLossless, forcePathStyle, metadata, }: InnerRenderMediaOnLambdaInput) => Promise<ServerlessStartPayload<AwsProvider>>;
55
+ 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, preferLossless, forcePathStyle, metadata, apiKey, }: InnerRenderMediaOnLambdaInput) => Promise<ServerlessStartPayload<AwsProvider>>;
56
56
  export declare const getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }: GetRenderProgressInput) => ServerlessStatusPayload<AwsProvider>;
57
- export declare const makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }: RenderStillOnLambdaNonNullInput) => Promise<ServerlessPayloads<AwsProvider>[ServerlessRoutines.still]>;
57
+ export declare const makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, apiKey, }: RenderStillOnLambdaNonNullInput) => Promise<ServerlessPayloads<AwsProvider>[ServerlessRoutines.still]>;
@@ -8,7 +8,7 @@ const client_2 = require("@remotion/serverless/client");
8
8
  const no_react_1 = require("remotion/no-react");
9
9
  const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
10
10
  const validate_serveurl_1 = require("../shared/validate-serveurl");
11
- 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, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, forcePathStyle, metadata, }) => {
11
+ 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, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, forcePathStyle, metadata, apiKey, }) => {
12
12
  const actualCodec = (0, validate_lambda_codec_1.validateLambdaCodec)(codec);
13
13
  (0, validate_serveurl_1.validateServeUrl)(serveUrl);
14
14
  (0, client_1.validateFramesPerFunction)({
@@ -80,6 +80,7 @@ const makeLambdaRenderMediaPayload = async ({ rendererFunctionName, frameRange,
80
80
  preferLossless: preferLossless !== null && preferLossless !== void 0 ? preferLossless : false,
81
81
  forcePathStyle: forcePathStyle !== null && forcePathStyle !== void 0 ? forcePathStyle : false,
82
82
  metadata: metadata !== null && metadata !== void 0 ? metadata : null,
83
+ apiKey: apiKey !== null && apiKey !== void 0 ? apiKey : null,
83
84
  };
84
85
  };
85
86
  exports.makeLambdaRenderMediaPayload = makeLambdaRenderMediaPayload;
@@ -95,7 +96,7 @@ const getRenderProgressPayload = ({ bucketName, renderId, s3OutputProvider, logL
95
96
  };
96
97
  };
97
98
  exports.getRenderProgressPayload = getRenderProgressPayload;
98
- const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }) => {
99
+ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, apiKey, }) => {
99
100
  if (quality) {
100
101
  throw new Error('The `quality` option is deprecated. Use `jpegQuality` instead.');
101
102
  }
@@ -143,6 +144,7 @@ const makeLambdaRenderStillPayload = async ({ serveUrl, inputProps, imageFormat,
143
144
  type: client_1.ServerlessRoutines.still,
144
145
  streamed: true,
145
146
  forcePathStyle,
147
+ apiKey: apiKey !== null && apiKey !== void 0 ? apiKey : null,
146
148
  };
147
149
  };
148
150
  exports.makeLambdaRenderStillPayload = makeLambdaRenderStillPayload;
@@ -59,7 +59,7 @@ const internalRenderMediaOnLambdaRaw = async (input) => {
59
59
  };
60
60
  exports.internalRenderMediaOnLambdaRaw = internalRenderMediaOnLambdaRaw;
61
61
  const renderMediaOnLambdaOptionalToRequired = (options) => {
62
- 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, _9, _10, _11, _12, _13;
62
+ 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, _9, _10, _11, _12, _13, _14;
63
63
  return {
64
64
  audioBitrate: (_a = options.audioBitrate) !== null && _a !== void 0 ? _a : null,
65
65
  audioCodec: (_b = options.audioCodec) !== null && _b !== void 0 ? _b : null,
@@ -106,6 +106,7 @@ const renderMediaOnLambdaOptionalToRequired = (options) => {
106
106
  forcePathStyle: (_12 = options.forcePathStyle) !== null && _12 !== void 0 ? _12 : false,
107
107
  indent: false,
108
108
  metadata: (_13 = options.metadata) !== null && _13 !== void 0 ? _13 : null,
109
+ apiKey: (_14 = options.apiKey) !== null && _14 !== void 0 ? _14 : null,
109
110
  };
110
111
  };
111
112
  exports.renderMediaOnLambdaOptionalToRequired = renderMediaOnLambdaOptionalToRequired;
@@ -83,7 +83,7 @@ const errorHandled = (0, error_handling_1.wrapWithErrorHandling)(internalRenderS
83
83
  * @see [Documentation](https://remotion.dev/docs/lambda/renderstillonlambda)
84
84
  */
85
85
  const renderStillOnLambda = (input) => {
86
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
86
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
87
87
  return errorHandled({
88
88
  chromiumOptions: (_a = input.chromiumOptions) !== null && _a !== void 0 ? _a : {},
89
89
  composition: input.composition,
@@ -112,6 +112,7 @@ const renderStillOnLambda = (input) => {
112
112
  timeoutInMilliseconds: (_r = input.timeoutInMilliseconds) !== null && _r !== void 0 ? _r : 30000,
113
113
  dumpBrowserLogs: false,
114
114
  forcePathStyle: (_s = input.forcePathStyle) !== null && _s !== void 0 ? _s : false,
115
+ apiKey: (_t = input.apiKey) !== null && _t !== void 0 ? _t : null,
115
116
  });
116
117
  };
117
118
  exports.renderStillOnLambda = renderStillOnLambda;
@@ -29,7 +29,7 @@ const progress_1 = require("./progress");
29
29
  exports.RENDER_COMMAND = 'render';
30
30
  const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, binariesDirectoryOption, preferLosslessOption, metadataOption, } = client_1.BrowserSafeApis.options;
31
31
  const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics, }) => {
32
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
32
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
33
33
  const serveUrl = args[0];
34
34
  if (!serveUrl) {
35
35
  log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
@@ -243,6 +243,7 @@ const renderCommand = async ({ args, remotionRoot, logLevel, providerSpecifics,
243
243
  indent: false,
244
244
  forcePathStyle: (_l = args_1.parsedLambdaCli['force-path-style']) !== null && _l !== void 0 ? _l : false,
245
245
  metadata: metadata !== null && metadata !== void 0 ? metadata : null,
246
+ apiKey: (_m = args_1.parsedLambdaCli[client_1.BrowserSafeApis.options.apiKeyOption.cliFlag]) !== null && _m !== void 0 ? _m : null,
246
247
  });
247
248
  const progressBar = cli_1.CliInternals.createOverwriteableCliOutput({
248
249
  quiet: cli_1.CliInternals.quietFlagProvided(),
@@ -22,4 +22,5 @@ exports.serverAwsImplementation = {
22
22
  getCurrentMemorySizeInMb: () => {
23
23
  return Number(process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE);
24
24
  },
25
+ invokeWebhook: serverless_1.invokeWebhook,
25
26
  };
@@ -1,7 +1,2 @@
1
- import http from 'node:http';
2
1
  import https from 'node:https';
3
- export declare const mockableHttpClients: {
4
- http: typeof http.request;
5
- https: typeof https.request;
6
- };
7
2
  export declare const getWebhookClient: (url: string) => typeof https.request;
@@ -3,19 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getWebhookClient = exports.mockableHttpClients = void 0;
6
+ exports.getWebhookClient = void 0;
7
7
  const node_http_1 = __importDefault(require("node:http"));
8
8
  const node_https_1 = __importDefault(require("node:https"));
9
- exports.mockableHttpClients = {
10
- http: node_http_1.default.request,
11
- https: node_https_1.default.request,
12
- };
13
9
  const getWebhookClient = (url) => {
14
10
  if (url.startsWith('https://')) {
15
- return exports.mockableHttpClients.https;
11
+ return node_https_1.default.request;
16
12
  }
17
13
  if (url.startsWith('http://')) {
18
- return exports.mockableHttpClients.http;
14
+ return node_http_1.default.request;
19
15
  }
20
16
  throw new Error('Can only request URLs starting with http:// or https://');
21
17
  };
@@ -1,8 +1,8 @@
1
1
  export declare const LambdaInternals: {
2
2
  executeCommand: (args: string[], remotionRoot: string, logLevel: import("@remotion/renderer").LogLevel, providerSpecifics: import("@remotion/serverless").ProviderSpecifics<import("./functions/aws-implementation").AwsProvider> | null, fullClientSpecifics: import("@remotion/serverless").FullClientSpecifics<import("./functions/aws-implementation").AwsProvider> | null) => 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, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, forcePathStyle, metadata, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("@remotion/serverless/client").ServerlessStartPayload<import("./functions/aws-implementation").AwsProvider>>;
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, preferLossless, forcePathStyle, metadata, apiKey, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("@remotion/serverless/client").ServerlessStartPayload<import("./functions/aws-implementation").AwsProvider>>;
4
4
  getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, forcePathStyle, }: import("./client").GetRenderProgressInput) => import("@remotion/serverless/client").ServerlessStatusPayload<import("./functions/aws-implementation").AwsProvider>;
5
- makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<import("@remotion/serverless/client").ServerlessPayloads<import("./functions/aws-implementation").AwsProvider>[import("@remotion/serverless").ServerlessRoutines.still]>;
5
+ makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, forcePathStyle, apiKey, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<import("@remotion/serverless/client").ServerlessPayloads<import("./functions/aws-implementation").AwsProvider>[import("@remotion/serverless").ServerlessRoutines.still]>;
6
6
  internalDeploySite: (args_0: {
7
7
  entryPoint: string;
8
8
  bucketName: string;
@@ -106,6 +106,8 @@ const callFunctionWithStreamingImplementation = async (options) => {
106
106
  }
107
107
  if (!err.message.includes(INVALID_JSON_MESSAGE) &&
108
108
  !err.message.includes(LAMBDA_STREAM_STALL) &&
109
+ // https://discord.com/channels/809501355504959528/1332166561242288220/1332166561242288220
110
+ !err.message.includes('Runtime.TruncatedResponse') &&
109
111
  !err.message.includes('aborted')) {
110
112
  throw err;
111
113
  }
package/package.json CHANGED
@@ -3,36 +3,36 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
4
4
  },
5
5
  "name": "@remotion/lambda",
6
- "version": "4.0.251",
6
+ "version": "4.0.253",
7
7
  "description": "Render Remotion videos on AWS Lambda",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
10
10
  "author": "Jonny Burger <jonny@remotion.dev>",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@aws-sdk/client-cloudwatch-logs": "3.645.0",
14
- "@aws-sdk/client-iam": "3.645.0",
15
- "@aws-sdk/client-lambda": "3.645.0",
16
- "@aws-sdk/client-s3": "3.645.0",
17
- "@aws-sdk/client-service-quotas": "3.645.0",
18
- "@aws-sdk/client-sts": "3.645.0",
19
- "@aws-sdk/credential-providers": "3.645.0",
20
- "@aws-sdk/lib-storage": "3.645.0",
21
- "@aws-sdk/s3-request-presigner": "3.645.0",
13
+ "@aws-sdk/client-cloudwatch-logs": "3.734.0",
14
+ "@aws-sdk/client-iam": "3.734.0",
15
+ "@aws-sdk/client-lambda": "3.734.0",
16
+ "@aws-sdk/client-s3": "3.734.0",
17
+ "@aws-sdk/client-service-quotas": "3.734.0",
18
+ "@aws-sdk/client-sts": "3.734.0",
19
+ "@aws-sdk/credential-providers": "3.734.0",
20
+ "@aws-sdk/lib-storage": "3.734.0",
21
+ "@aws-sdk/s3-request-presigner": "3.734.0",
22
22
  "@smithy/abort-controller": "3.1.1",
23
- "@types/express": "^5.0.0",
24
- "express": "4.21.0",
25
23
  "mime-types": "2.1.34",
26
24
  "zod": "3.22.3",
27
- "@remotion/bundler": "4.0.251",
28
- "@remotion/streaming": "4.0.251",
29
- "@remotion/studio-server": "4.0.251",
30
- "@remotion/cli": "4.0.251",
31
- "@remotion/serverless": "4.0.251",
32
- "@remotion/renderer": "4.0.251",
33
- "remotion": "4.0.251"
25
+ "@remotion/renderer": "4.0.253",
26
+ "@remotion/bundler": "4.0.253",
27
+ "@remotion/studio-server": "4.0.253",
28
+ "remotion": "4.0.253",
29
+ "@remotion/cli": "4.0.253",
30
+ "@remotion/serverless": "4.0.253",
31
+ "@remotion/streaming": "4.0.253"
34
32
  },
35
33
  "devDependencies": {
34
+ "@types/express": "^5.0.0",
35
+ "express": "4.21.0",
36
36
  "@types/mime-types": "2.1.1",
37
37
  "@types/minimist": "1.2.2",
38
38
  "@types/prompt": "^1.1.0",
@@ -40,12 +40,12 @@
40
40
  "next": "15.1.2",
41
41
  "pureimage": "0.4.13",
42
42
  "zip-lib": "^0.7.2",
43
- "@remotion/bundler": "4.0.251",
44
- "@remotion/compositor-linux-arm64-gnu": "4.0.251",
45
- "@remotion/eslint-config-internal": "4.0.251"
43
+ "@remotion/bundler": "4.0.253",
44
+ "@remotion/compositor-linux-arm64-gnu": "4.0.253",
45
+ "@remotion/eslint-config-internal": "4.0.253"
46
46
  },
47
47
  "peerDependencies": {
48
- "@remotion/bundler": "4.0.251"
48
+ "@remotion/bundler": "4.0.253"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
@@ -79,7 +79,7 @@
79
79
  "scripts": {
80
80
  "formatting": "prettier src --check",
81
81
  "lint": "eslint src",
82
- "testlambda": "bun test src/test/integration",
82
+ "testlambda": "exit 0",
83
83
  "test": "bun test src/test/unit",
84
84
  "make": "tsc -d && bun build.ts"
85
85
  }
Binary file