@remotion/lambda 3.2.35 → 3.2.36

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.
@@ -7,10 +7,12 @@ const download_media_1 = require("../../../api/download-media");
7
7
  const get_render_progress_1 = require("../../../api/get-render-progress");
8
8
  const render_media_on_lambda_1 = require("../../../api/render-media-on-lambda");
9
9
  const constants_1 = require("../../../shared/constants");
10
+ const convert_to_serve_url_1 = require("../../../shared/convert-to-serve-url");
10
11
  const sleep_1 = require("../../../shared/sleep");
11
12
  const validate_frames_per_lambda_1 = require("../../../shared/validate-frames-per-lambda");
12
13
  const validate_privacy_1 = require("../../../shared/validate-privacy");
13
14
  const validate_retries_1 = require("../../../shared/validate-retries");
15
+ const validate_serveurl_1 = require("../../../shared/validate-serveurl");
14
16
  const args_1 = require("../../args");
15
17
  const get_aws_region_1 = require("../../get-aws-region");
16
18
  const find_function_name_1 = require("../../helpers/find-function-name");
@@ -28,13 +30,15 @@ const renderCommand = async (args) => {
28
30
  log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.RENDER_COMMAND} <serve-url> <composition-id> [output-location]`);
29
31
  (0, quit_1.quit)(1);
30
32
  }
31
- const composition = args[1];
33
+ const region = (0, get_aws_region_1.getAwsRegion)();
34
+ let composition = args[1];
32
35
  if (!composition) {
33
- log_1.Log.error('No composition ID passed.');
34
- log_1.Log.info('Pass an additional argument specifying the composition ID.');
35
- log_1.Log.info();
36
- log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.RENDER_COMMAND} <serve-url> <composition-id> [output-location]`);
37
- (0, quit_1.quit)(1);
36
+ log_1.Log.info('No compositions passed. Fetching compositions...');
37
+ (0, validate_serveurl_1.validateServeUrl)(serveUrl);
38
+ const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
39
+ const comps = await (0, renderer_1.getCompositions)(realServeUrl);
40
+ const { compositionId } = await cli_1.CliInternals.selectComposition(comps);
41
+ composition = compositionId;
38
42
  }
39
43
  const outName = args_1.parsedLambdaCli['out-name'];
40
44
  const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
@@ -48,7 +52,6 @@ const renderCommand = async (args) => {
48
52
  codec,
49
53
  });
50
54
  const functionName = await (0, find_function_name_1.findFunctionName)();
51
- const region = (0, get_aws_region_1.getAwsRegion)();
52
55
  const maxRetries = (_b = args_1.parsedLambdaCli['max-retries']) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MAX_RETRIES;
53
56
  (0, validate_retries_1.validateMaxRetries)(maxRetries);
54
57
  const privacy = (_c = args_1.parsedLambdaCli.privacy) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_OUTPUT_PRIVACY;
@@ -6,8 +6,10 @@ const renderer_1 = require("@remotion/renderer");
6
6
  const download_media_1 = require("../../api/download-media");
7
7
  const render_still_on_lambda_1 = require("../../api/render-still-on-lambda");
8
8
  const constants_1 = require("../../shared/constants");
9
+ const convert_to_serve_url_1 = require("../../shared/convert-to-serve-url");
9
10
  const validate_privacy_1 = require("../../shared/validate-privacy");
10
11
  const validate_retries_1 = require("../../shared/validate-retries");
12
+ const validate_serveurl_1 = require("../../shared/validate-serveurl");
11
13
  const args_1 = require("../args");
12
14
  const get_aws_region_1 = require("../get-aws-region");
13
15
  const find_function_name_1 = require("../helpers/find-function-name");
@@ -24,13 +26,17 @@ const stillCommand = async (args) => {
24
26
  log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.STILL_COMMAND} <serve-url> <composition-id> [output-location]`);
25
27
  (0, quit_1.quit)(1);
26
28
  }
27
- const composition = args[1];
29
+ const region = (0, get_aws_region_1.getAwsRegion)();
30
+ let composition = args[1];
28
31
  if (!composition) {
29
- log_1.Log.error('No composition ID passed.');
30
- log_1.Log.info('Pass an additional argument specifying the composition ID.');
31
- log_1.Log.info();
32
- log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.STILL_COMMAND} <serve-url> <composition-id> [output-location]`);
33
- (0, quit_1.quit)(1);
32
+ if (!composition) {
33
+ log_1.Log.info('No compositions passed. Fetching compositions...');
34
+ (0, validate_serveurl_1.validateServeUrl)(serveUrl);
35
+ const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
36
+ const comps = await (0, renderer_1.getCompositions)(realServeUrl);
37
+ const { compositionId } = await cli_1.CliInternals.selectComposition(comps);
38
+ composition = compositionId;
39
+ }
34
40
  }
35
41
  const downloadName = (_a = args[2]) !== null && _a !== void 0 ? _a : null;
36
42
  const outName = args_1.parsedLambdaCli['out-name'];
@@ -60,7 +66,7 @@ const stillCommand = async (args) => {
60
66
  imageFormat,
61
67
  composition,
62
68
  privacy,
63
- region: (0, get_aws_region_1.getAwsRegion)(),
69
+ region,
64
70
  maxRetries,
65
71
  envVariables,
66
72
  frame: stillFrame,
@@ -78,7 +84,7 @@ const stillCommand = async (args) => {
78
84
  const { outputPath, sizeInBytes } = await (0, download_media_1.downloadMedia)({
79
85
  bucketName: res.bucketName,
80
86
  outPath: downloadName,
81
- region: (0, get_aws_region_1.getAwsRegion)(),
87
+ region,
82
88
  renderId: res.renderId,
83
89
  });
84
90
  log_1.Log.info('Done!', outputPath, cli_1.CliInternals.formatBytes(sizeInBytes));
@@ -12,6 +12,7 @@ const version_1 = require("remotion/version");
12
12
  const aws_clients_1 = require("../shared/aws-clients");
13
13
  const cleanup_serialized_input_props_1 = require("../shared/cleanup-serialized-input-props");
14
14
  const constants_1 = require("../shared/constants");
15
+ const deserialize_input_props_1 = require("../shared/deserialize-input-props");
15
16
  const docs_url_1 = require("../shared/docs-url");
16
17
  const invoke_webhook_1 = require("../shared/invoke-webhook");
17
18
  const make_s3_url_1 = require("../shared/make-s3-url");
@@ -124,11 +125,17 @@ const innerLaunchHandler = async (params, options) => {
124
125
  }),
125
126
  ]);
126
127
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
128
+ const inputPropsPromise = (0, deserialize_input_props_1.deserializeInputProps)({
129
+ bucketName: params.bucketName,
130
+ expectedBucketOwner: options.expectedBucketOwner,
131
+ region: (0, get_current_region_1.getCurrentRegionInFunction)(),
132
+ serialized: params.inputProps,
133
+ });
127
134
  const comp = await (0, validate_composition_1.validateComposition)({
128
135
  serveUrl: params.serveUrl,
129
136
  composition: params.composition,
130
137
  browserInstance,
131
- inputProps: params.inputProps,
138
+ inputProps: await inputPropsPromise,
132
139
  envVariables: params.envVariables,
133
140
  ffmpegExecutable: null,
134
141
  ffprobeExecutable: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.2.35",
3
+ "version": "3.2.36",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -31,12 +31,12 @@
31
31
  "@aws-sdk/client-service-quotas": "3.190.0",
32
32
  "@aws-sdk/lib-storage": "3.190.0",
33
33
  "@aws-sdk/s3-request-presigner": "3.190.0",
34
- "@remotion/bundler": "3.2.35",
35
- "@remotion/cli": "3.2.35",
36
- "@remotion/renderer": "3.2.35",
34
+ "@remotion/bundler": "3.2.36",
35
+ "@remotion/cli": "3.2.36",
36
+ "@remotion/renderer": "3.2.36",
37
37
  "aws-policies": "^1.0.1",
38
38
  "mime-types": "2.1.34",
39
- "remotion": "3.2.35"
39
+ "remotion": "3.2.36"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=16.8.0",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "1bf079a1df57808460b1dd87de07d698388598da"
62
+ "gitHead": "69d6e23f17b14509aee4d327b3481fd4e15df4a4"
63
63
  }
Binary file