@remotion/lambda 3.3.54 → 3.3.55

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.
Files changed (49) hide show
  1. package/dist/api/delete-function.d.ts +1 -1
  2. package/dist/api/delete-function.js +1 -1
  3. package/dist/api/delete-render.d.ts +1 -1
  4. package/dist/api/delete-render.js +1 -1
  5. package/dist/api/delete-site.d.ts +1 -1
  6. package/dist/api/delete-site.js +1 -1
  7. package/dist/api/deploy-function.d.ts +1 -1
  8. package/dist/api/deploy-function.js +1 -1
  9. package/dist/api/deploy-site.d.ts +2 -1
  10. package/dist/api/deploy-site.js +7 -4
  11. package/dist/api/download-media.d.ts +1 -1
  12. package/dist/api/download-media.js +1 -1
  13. package/dist/api/estimate-price.d.ts +1 -1
  14. package/dist/api/estimate-price.js +1 -1
  15. package/dist/api/get-aws-client.d.ts +1 -1
  16. package/dist/api/get-aws-client.js +1 -1
  17. package/dist/api/get-compositions-on-lambda.d.ts +1 -1
  18. package/dist/api/get-compositions-on-lambda.js +1 -1
  19. package/dist/api/get-function-info.d.ts +1 -1
  20. package/dist/api/get-function-info.js +1 -1
  21. package/dist/api/get-functions.d.ts +1 -3
  22. package/dist/api/get-functions.js +1 -3
  23. package/dist/api/get-or-create-bucket.d.ts +1 -1
  24. package/dist/api/get-or-create-bucket.js +1 -1
  25. package/dist/api/get-regions.d.ts +1 -1
  26. package/dist/api/get-regions.js +1 -1
  27. package/dist/api/get-render-progress.d.ts +1 -1
  28. package/dist/api/get-render-progress.js +1 -1
  29. package/dist/api/get-sites.d.ts +1 -2
  30. package/dist/api/get-sites.js +1 -2
  31. package/dist/api/iam-validation/simulate.d.ts +1 -1
  32. package/dist/api/iam-validation/simulate.js +1 -1
  33. package/dist/api/presign-url.d.ts +1 -1
  34. package/dist/api/presign-url.js +1 -1
  35. package/dist/api/render-media-on-lambda.d.ts +1 -1
  36. package/dist/api/render-media-on-lambda.js +1 -1
  37. package/dist/api/validate-webhook-signature.d.ts +1 -1
  38. package/dist/api/validate-webhook-signature.js +1 -1
  39. package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +1 -4
  40. package/dist/functions/helpers/create-post-render-data.js +1 -1
  41. package/dist/functions/helpers/get-current-region.d.ts +1 -1
  42. package/dist/functions/helpers/get-progress.js +2 -14
  43. package/dist/functions/helpers/make-timeout-error.d.ts +8 -0
  44. package/dist/functions/helpers/make-timeout-error.js +48 -0
  45. package/dist/shared/get-most-expensive-chunks.d.ts +1 -1
  46. package/dist/shared/get-most-expensive-chunks.js +3 -2
  47. package/package.json +8 -8
  48. package/remotionlambda-arm64.zip +0 -0
  49. package/remotionlambda-x64.zip +0 -0
@@ -5,7 +5,7 @@ export declare type DeleteFunctionInput = {
5
5
  };
6
6
  /**
7
7
  * @description Deletes a function from AWS Lambda.
8
- * @link https://remotion.dev/docs/lambda/deletefunction
8
+ * @see [Documentation](https://remotion.dev/docs/lambda/deletefunction)
9
9
  * @param options.region The region the function was deployed to.
10
10
  * @param options.functionName The name of the function.
11
11
  * @returns {Promise<void>} Nothing. Throws if the function failed to delete.
@@ -5,7 +5,7 @@ const client_lambda_1 = require("@aws-sdk/client-lambda");
5
5
  const aws_clients_1 = require("../shared/aws-clients");
6
6
  /**
7
7
  * @description Deletes a function from AWS Lambda.
8
- * @link https://remotion.dev/docs/lambda/deletefunction
8
+ * @see [Documentation](https://remotion.dev/docs/lambda/deletefunction)
9
9
  * @param options.region The region the function was deployed to.
10
10
  * @param options.functionName The name of the function.
11
11
  * @returns {Promise<void>} Nothing. Throws if the function failed to delete.
@@ -8,7 +8,7 @@ export declare type DeleteRenderInput = {
8
8
  };
9
9
  /**
10
10
  * @description Deletes a render artifact and it's metadata given it's renderId.
11
- * @link https://remotion.dev/docs/lambda/deleterender
11
+ * @see [Documentation](https://remotion.dev/docs/lambda/deleterender)
12
12
  * @param params.region The AWS region in which the media resides.
13
13
  * @param params.bucketName The `bucketName` that was specified during the render
14
14
  * @param params.renderId The `renderId` that was obtained after triggering the render.
@@ -9,7 +9,7 @@ const get_account_id_1 = require("../shared/get-account-id");
9
9
  const clean_items_1 = require("./clean-items");
10
10
  /**
11
11
  * @description Deletes a render artifact and it's metadata given it's renderId.
12
- * @link https://remotion.dev/docs/lambda/deleterender
12
+ * @see [Documentation](https://remotion.dev/docs/lambda/deleterender)
13
13
  * @param params.region The AWS region in which the media resides.
14
14
  * @param params.bucketName The `bucketName` that was specified during the render
15
15
  * @param params.renderId The `renderId` that was obtained after triggering the render.
@@ -14,7 +14,7 @@ export declare type DeleteSiteOutput = {
14
14
  /**
15
15
  *
16
16
  * @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
17
- * @link https://remotion.dev/docs/lambda/deletesite
17
+ * @see [Documentation](https://remotion.dev/docs/lambda/deletesite)
18
18
  * @param options.bucketName The S3 bucket name where the site resides in.
19
19
  * @param options.siteName The ID of the site that you want to delete.
20
20
  * @param {AwsRegion} options.region The region in where the S3 bucket resides in.
@@ -8,7 +8,7 @@ const clean_items_1 = require("./clean-items");
8
8
  /**
9
9
  *
10
10
  * @description Deletes a deployed site from your S3 bucket. The opposite of deploySite().
11
- * @link https://remotion.dev/docs/lambda/deletesite
11
+ * @see [Documentation](https://remotion.dev/docs/lambda/deletesite)
12
12
  * @param options.bucketName The S3 bucket name where the site resides in.
13
13
  * @param options.siteName The ID of the site that you want to delete.
14
14
  * @param {AwsRegion} options.region The region in where the S3 bucket resides in.
@@ -16,7 +16,7 @@ export declare type DeployFunctionOutput = {
16
16
  };
17
17
  /**
18
18
  * @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
19
- * @link https://remotion.dev/docs/lambda/deployfunction
19
+ * @see [Documentation](https://www.remotion.dev/docs/lambda/deployfunction)
20
20
  * @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
21
21
  * @param options.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
22
22
  * @param options.region The region you want to deploy your function to.
@@ -17,7 +17,7 @@ const validate_timeout_1 = require("../shared/validate-timeout");
17
17
  const create_function_1 = require("./create-function");
18
18
  /**
19
19
  * @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.
20
- * @link https://remotion.dev/docs/lambda/deployfunction
20
+ * @see [Documentation](https://www.remotion.dev/docs/lambda/deployfunction)
21
21
  * @param options.createCloudWatchLogGroup Whether you'd like to create a CloudWatch Log Group to store the logs for this function.
22
22
  * @param options.cloudWatchLogRetentionPeriodInDays (optional) The number of days to retain the CloudWatch logs for this function. Default is 14 days.
23
23
  * @param options.region The region you want to deploy your function to.
@@ -10,6 +10,7 @@ export declare type DeploySiteInput = {
10
10
  onBundleProgress?: (progress: number) => void;
11
11
  onUploadProgress?: (upload: UploadDirProgress) => void;
12
12
  webpackOverride?: WebpackOverrideFn;
13
+ ignoreRegisterRootWarning?: boolean;
13
14
  enableCaching?: boolean;
14
15
  publicDir?: string | null;
15
16
  rootDir?: string;
@@ -27,7 +28,7 @@ export declare type DeploySiteOutput = Promise<{
27
28
  }>;
28
29
  /**
29
30
  * @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
30
- * @link https://remotion.dev/docs/lambda/deploysite
31
+ * @see [Documentation](https://remotion.dev/docs/lambda/deploysite)
31
32
  * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
32
33
  * @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
33
34
  * @param {string} params.bucketName The name of the bucket to deploy your project into.
@@ -15,7 +15,7 @@ const bucket_exists_1 = require("./bucket-exists");
15
15
  const upload_dir_1 = require("./upload-dir");
16
16
  /**
17
17
  * @description Deploys a Remotion project to an S3 bucket to prepare it for rendering on AWS Lambda.
18
- * @link https://remotion.dev/docs/lambda/deploysite
18
+ * @see [Documentation](https://remotion.dev/docs/lambda/deploysite)
19
19
  * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
20
20
  * @param {string} params.entryPoint An absolute path to the entry file of your Remotion project.
21
21
  * @param {string} params.bucketName The name of the bucket to deploy your project into.
@@ -47,12 +47,15 @@ const deploySite = async ({ bucketName, entryPoint, siteName, options, region, }
47
47
  region,
48
48
  prefix: subFolder,
49
49
  }),
50
- (0, bundle_site_1.bundleSite)(entryPoint, (_a = options === null || options === void 0 ? void 0 : options.onBundleProgress) !== null && _a !== void 0 ? _a : (() => undefined), {
50
+ (0, bundle_site_1.bundleSite)({
51
51
  publicPath: `/${subFolder}/`,
52
- webpackOverride: (_b = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _b !== void 0 ? _b : ((f) => f),
53
- enableCaching: (_c = options === null || options === void 0 ? void 0 : options.enableCaching) !== null && _c !== void 0 ? _c : true,
52
+ webpackOverride: (_a = options === null || options === void 0 ? void 0 : options.webpackOverride) !== null && _a !== void 0 ? _a : ((f) => f),
53
+ enableCaching: (_b = options === null || options === void 0 ? void 0 : options.enableCaching) !== null && _b !== void 0 ? _b : true,
54
54
  publicDir: options === null || options === void 0 ? void 0 : options.publicDir,
55
55
  rootDir: options === null || options === void 0 ? void 0 : options.rootDir,
56
+ ignoreRegisterRootWarning: options === null || options === void 0 ? void 0 : options.ignoreRegisterRootWarning,
57
+ onProgress: (_c = options === null || options === void 0 ? void 0 : options.onBundleProgress) !== null && _c !== void 0 ? _c : (() => undefined),
58
+ entryPoint,
56
59
  }),
57
60
  ]);
58
61
  const { toDelete, toUpload, existingCount } = await (0, get_s3_operations_1.getS3DiffOperations)({
@@ -15,7 +15,7 @@ export declare type DownloadMediaOutput = {
15
15
  };
16
16
  /**
17
17
  * @description Triggers a render on a lambda given a composition and a lambda function.
18
- * @link https://remotion.dev/docs/lambda/downloadmedia
18
+ * @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
19
19
  * @param params.region The AWS region in which the media resides.
20
20
  * @param params.bucketName The `bucketName` that was specified during the render.
21
21
  * @param params.renderId The `renderId` that was obtained after triggering the render.
@@ -12,7 +12,7 @@ const read_with_progress_1 = require("../functions/helpers/read-with-progress");
12
12
  const get_account_id_1 = require("../shared/get-account-id");
13
13
  /**
14
14
  * @description Triggers a render on a lambda given a composition and a lambda function.
15
- * @link https://remotion.dev/docs/lambda/downloadmedia
15
+ * @see [Documentation](https://remotion.dev/docs/lambda/downloadmedia)
16
16
  * @param params.region The AWS region in which the media resides.
17
17
  * @param params.bucketName The `bucketName` that was specified during the render.
18
18
  * @param params.renderId The `renderId` that was obtained after triggering the render.
@@ -11,7 +11,7 @@ export declare type EstimatePriceInput = {
11
11
  /**
12
12
  *
13
13
  * @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
14
- * @link https://remotion.dev/docs/lambda/estimateprice
14
+ * @see [Documentation](https://remotion.dev/docs/lambda/estimateprice)
15
15
  * @returns {number} Price in USD
16
16
  */
17
17
  export declare const estimatePrice: ({ region, durationInMiliseconds, memorySizeInMb, diskSizeInMb, architecture, lambdasInvoked, }: EstimatePriceInput) => number;
@@ -10,7 +10,7 @@ const validate_memory_size_1 = require("../shared/validate-memory-size");
10
10
  /**
11
11
  *
12
12
  * @description Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size.
13
- * @link https://remotion.dev/docs/lambda/estimateprice
13
+ * @see [Documentation](https://remotion.dev/docs/lambda/estimateprice)
14
14
  * @returns {number} Price in USD
15
15
  */
16
16
  const estimatePrice = ({ region, durationInMiliseconds, memorySizeInMb, diskSizeInMb, architecture, lambdasInvoked, }) => {
@@ -25,7 +25,7 @@ export declare type GetAwsClientOutput<T extends keyof ServiceMapping> = {
25
25
  };
26
26
  /**
27
27
  * @description Gets the full AWS SDK and an instantiated client for an AWS service
28
- * @link https://remotion.dev/docs/lambda/getawsclient
28
+ * @see [Documentation](https://remotion.dev/docs/lambda/getawsclient)
29
29
  * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
30
30
  * @param {string} params.service One of `iam`, `s3`, `cloudwatch`, `iam` or `servicequotas`
31
31
  * @param {CustomCredentials} params.customCredentials Pass endpoint and credentials if you want to connect to a different cloud for S3
@@ -33,7 +33,7 @@ const StsSdk = __importStar(require("@aws-sdk/client-sts"));
33
33
  const aws_clients_1 = require("../shared/aws-clients");
34
34
  /**
35
35
  * @description Gets the full AWS SDK and an instantiated client for an AWS service
36
- * @link https://remotion.dev/docs/lambda/getawsclient
36
+ * @see [Documentation](https://remotion.dev/docs/lambda/getawsclient)
37
37
  * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
38
38
  * @param {string} params.service One of `iam`, `s3`, `cloudwatch`, `iam` or `servicequotas`
39
39
  * @param {CustomCredentials} params.customCredentials Pass endpoint and credentials if you want to connect to a different cloud for S3
@@ -15,7 +15,7 @@ export declare type GetCompositionsOnLambdaInput = {
15
15
  export declare type GetCompositionsOnLambdaOutput = TCompMetadata[];
16
16
  /**
17
17
  * @description Returns the compositions from a serveUrl
18
- * @link https://remotion.dev/docs/lambda/getcompositionsonlambda
18
+ * @see [Documentation](https://remotion.dev/docs/lambda/getcompositionsonlambda)
19
19
  * @param params.functionName The name of the Lambda function that should be used
20
20
  * @param params.serveUrl The URL of the deployed project
21
21
  * @param params.inputProps The input props that should be passed while the compositions are evaluated.
@@ -7,7 +7,7 @@ const call_lambda_1 = require("../shared/call-lambda");
7
7
  const serialize_input_props_1 = require("../shared/serialize-input-props");
8
8
  /**
9
9
  * @description Returns the compositions from a serveUrl
10
- * @link https://remotion.dev/docs/lambda/getcompositionsonlambda
10
+ * @see [Documentation](https://remotion.dev/docs/lambda/getcompositionsonlambda)
11
11
  * @param params.functionName The name of the Lambda function that should be used
12
12
  * @param params.serveUrl The URL of the deployed project
13
13
  * @param params.inputProps The input props that should be passed while the compositions are evaluated.
@@ -12,7 +12,7 @@ export declare type GetFunctionInfoInput = {
12
12
  };
13
13
  /**
14
14
  * @description Given a region and function name, returns information about the function such as version, memory size and timeout.
15
- * @link https://remotion.dev/docs/lambda/getfunctioninfo
15
+ * @see [Documentation](https://remotion.dev/docs/lambda/getfunctioninfo)
16
16
  * @param {AwsRegion} options.region The region in which the function resides in.
17
17
  * @param {string} options.functionName The name of the function
18
18
  * @return {Promise<FunctionInfo>} Promise resolving to information about the function.
@@ -8,7 +8,7 @@ const get_function_version_1 = require("../shared/get-function-version");
8
8
  const validate_aws_region_1 = require("../shared/validate-aws-region");
9
9
  /**
10
10
  * @description Given a region and function name, returns information about the function such as version, memory size and timeout.
11
- * @link https://remotion.dev/docs/lambda/getfunctioninfo
11
+ * @see [Documentation](https://remotion.dev/docs/lambda/getfunctioninfo)
12
12
  * @param {AwsRegion} options.region The region in which the function resides in.
13
13
  * @param {string} options.functionName The name of the function
14
14
  * @return {Promise<FunctionInfo>} Promise resolving to information about the function.
@@ -5,10 +5,8 @@ export declare type GetFunctionsInput = {
5
5
  compatibleOnly: boolean;
6
6
  };
7
7
  /**
8
- *
9
- *
10
8
  * @description Lists Remotion Lambda render functions deployed to AWS Lambda.
11
- * @link https://remotion.dev/docs/lambda/getfunctions
9
+ * @see [Documentation](https://remotion.dev/docs/lambda/getfunctions)
12
10
  * @param options.region The region of which the functions should be listed.
13
11
  * @param options.compatibleOnly Whether only functions compatible with the installed version of Remotion Lambda should be returned.
14
12
  * @returns {Promise<FunctionInfo[]>} An array with the objects containing information about the deployed functions.
@@ -27,10 +27,8 @@ const getAllFunctions = async ({ existing, nextMarker, region, }) => {
27
27
  return allLambdas;
28
28
  };
29
29
  /**
30
- *
31
- *
32
30
  * @description Lists Remotion Lambda render functions deployed to AWS Lambda.
33
- * @link https://remotion.dev/docs/lambda/getfunctions
31
+ * @see [Documentation](https://remotion.dev/docs/lambda/getfunctions)
34
32
  * @param options.region The region of which the functions should be listed.
35
33
  * @param options.compatibleOnly Whether only functions compatible with the installed version of Remotion Lambda should be returned.
36
34
  * @returns {Promise<FunctionInfo[]>} An array with the objects containing information about the deployed functions.
@@ -8,7 +8,7 @@ export declare type GetOrCreateBucketOutput = {
8
8
  };
9
9
  /**
10
10
  * @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
11
- * @link https://remotion.dev/docs/lambda/getorcreatebucket
11
+ * @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
12
12
  * @param options.region The region in which you want your S3 bucket to reside in.
13
13
  * @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
14
14
  */
@@ -7,7 +7,7 @@ const create_bucket_1 = require("./create-bucket");
7
7
  const get_buckets_1 = require("./get-buckets");
8
8
  /**
9
9
  * @description Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
10
- * @link https://remotion.dev/docs/lambda/getorcreatebucket
10
+ * @see [Documentation](https://remotion.dev/docs/lambda/getorcreatebucket)
11
11
  * @param options.region The region in which you want your S3 bucket to reside in.
12
12
  * @returns {Promise<GetOrCreateBucketOutput>} An object containing the `bucketName`.
13
13
  */
@@ -4,7 +4,7 @@ declare type Options = {
4
4
  };
5
5
  /**
6
6
  * @description Gets an array of all supported AWS regions of this release of Remotion Lambda.
7
- * @link https://remotion.dev/docs/lambda/getregions
7
+ * @see [Documentation](https://remotion.dev/docs/lambda/getregions)
8
8
  * @returns {AwsRegion[]} A list of AWS regions.
9
9
  */
10
10
  export declare const getRegions: (options?: Options) => readonly AwsRegion[];
@@ -5,7 +5,7 @@ const aws_regions_1 = require("../pricing/aws-regions");
5
5
  const regions_1 = require("../regions");
6
6
  /**
7
7
  * @description Gets an array of all supported AWS regions of this release of Remotion Lambda.
8
- * @link https://remotion.dev/docs/lambda/getregions
8
+ * @see [Documentation](https://remotion.dev/docs/lambda/getregions)
9
9
  * @returns {AwsRegion[]} A list of AWS regions.
10
10
  */
11
11
  const getRegions = (options) => {
@@ -10,7 +10,7 @@ export declare type GetRenderInput = {
10
10
  };
11
11
  /**
12
12
  * @description Gets the current status of a render originally triggered via renderMediaOnLambda().
13
- * @link https://remotion.dev/docs/lambda/getrenderprogress
13
+ * @see [Documentation](https://remotion.dev/docs/lambda/getrenderprogress)
14
14
  * @param {string} params.functionName The name of the function used to trigger the render.
15
15
  * @param {string} params.bucketName The name of the bucket that was used in the render.
16
16
  * @param {string} params.renderId The ID of the render that was returned by `renderMediaOnLambda()`.
@@ -6,7 +6,7 @@ const call_lambda_1 = require("../shared/call-lambda");
6
6
  const constants_1 = require("../shared/constants");
7
7
  /**
8
8
  * @description Gets the current status of a render originally triggered via renderMediaOnLambda().
9
- * @link https://remotion.dev/docs/lambda/getrenderprogress
9
+ * @see [Documentation](https://remotion.dev/docs/lambda/getrenderprogress)
10
10
  * @param {string} params.functionName The name of the function used to trigger the render.
11
11
  * @param {string} params.bucketName The name of the bucket that was used in the render.
12
12
  * @param {string} params.renderId The ID of the render that was returned by `renderMediaOnLambda()`.
@@ -16,9 +16,8 @@ export declare type GetSitesOutput = {
16
16
  buckets: BucketWithLocation[];
17
17
  };
18
18
  /**
19
- *
20
19
  * @description Gets all the deployed sites for a certain AWS region.
21
- * @link https://remotion.dev/docs/lambda/getsites
20
+ * @see [Documentation](https://remotion.dev/docs/lambda/getsites)
22
21
  * @param {AwsRegion} params.region The AWS region that you want to query for.
23
22
  * @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
24
23
  */
@@ -7,9 +7,8 @@ const get_account_id_1 = require("../shared/get-account-id");
7
7
  const make_s3_url_1 = require("../shared/make-s3-url");
8
8
  const get_buckets_1 = require("./get-buckets");
9
9
  /**
10
- *
11
10
  * @description Gets all the deployed sites for a certain AWS region.
12
- * @link https://remotion.dev/docs/lambda/getsites
11
+ * @see [Documentation](https://remotion.dev/docs/lambda/getsites)
13
12
  * @param {AwsRegion} params.region The AWS region that you want to query for.
14
13
  * @returns {Promise<GetSitesOutput>} A Promise containing an object with `sites` and `bucket` keys. Consult documentation for details.
15
14
  */
@@ -10,7 +10,7 @@ export declare type SimulatePermissionsOutput = {
10
10
  };
11
11
  /**
12
12
  * @description Simulates calls using the AWS Simulator to validate the correct permissions.
13
- * @link http://remotion.dev/docs/lambda/simulatepermissions
13
+ * @see [Documentation](http://remotion.dev/docs/lambda/simulatepermissions)
14
14
  * @param {AwsRegion} options.region The region which you would like to validate
15
15
  * @param {(result: SimulationResult) => void} options.onSimulation The region which you would like to validate
16
16
  * @returns {Promise<SimulatePermissionsOutput>} See documentation for detailed response structure.
@@ -19,7 +19,7 @@ const logPermissionOutput = (output) => {
19
19
  exports.logPermissionOutput = logPermissionOutput;
20
20
  /**
21
21
  * @description Simulates calls using the AWS Simulator to validate the correct permissions.
22
- * @link http://remotion.dev/docs/lambda/simulatepermissions
22
+ * @see [Documentation](http://remotion.dev/docs/lambda/simulatepermissions)
23
23
  * @param {AwsRegion} options.region The region which you would like to validate
24
24
  * @param {(result: SimulationResult) => void} options.onSimulation The region which you would like to validate
25
25
  * @returns {Promise<SimulatePermissionsOutput>} See documentation for detailed response structure.
@@ -8,7 +8,7 @@ export declare type PresignUrlInput<CheckIfObjectExists extends boolean = boolea
8
8
  };
9
9
  /**
10
10
  * @description Returns a public url of an object stored in Remotion's S3 bucket.
11
- * @link https://remotion.dev/docs/lambda/presignurl
11
+ * @see [Documentation](https://remotion.dev/docs/lambda/presignurl)
12
12
  * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
13
13
  * @param {string} params.bucketName The name of the bucket to fetch the object from.
14
14
  * @param {string} params.objectKey Key of the S3 object to get.
@@ -8,7 +8,7 @@ const validate_bucketname_1 = require("../shared/validate-bucketname");
8
8
  const validate_presign_expiration_1 = require("../shared/validate-presign-expiration");
9
9
  /**
10
10
  * @description Returns a public url of an object stored in Remotion's S3 bucket.
11
- * @link https://remotion.dev/docs/lambda/presignurl
11
+ * @see [Documentation](https://remotion.dev/docs/lambda/presignurl)
12
12
  * @param {AwsRegion} params.region The region in which the S3 bucket resides in.
13
13
  * @param {string} params.bucketName The name of the bucket to fetch the object from.
14
14
  * @param {string} params.objectKey Key of the S3 object to get.
@@ -51,7 +51,7 @@ export declare type RenderMediaOnLambdaOutput = {
51
51
  };
52
52
  /**
53
53
  * @description Triggers a render on a lambda given a composition and a lambda function.
54
- * @link https://remotion.dev/docs/lambda/rendermediaonlambda
54
+ * @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
55
55
  * @param params.functionName The name of the Lambda function that should be used
56
56
  * @param params.serveUrl The URL of the deployed project
57
57
  * @param params.composition The ID of the composition which should be rendered.
@@ -12,7 +12,7 @@ const validate_lambda_codec_1 = require("../shared/validate-lambda-codec");
12
12
  const validate_serveurl_1 = require("../shared/validate-serveurl");
13
13
  /**
14
14
  * @description Triggers a render on a lambda given a composition and a lambda function.
15
- * @link https://remotion.dev/docs/lambda/rendermediaonlambda
15
+ * @see [Documentation](https://remotion.dev/docs/lambda/rendermediaonlambda)
16
16
  * @param params.functionName The name of the Lambda function that should be used
17
17
  * @param params.serveUrl The URL of the deployed project
18
18
  * @param params.composition The ID of the composition which should be rendered.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @description Throws if the signature of the finish webhook is missing or inauthentic
3
- * @link https://remotion.dev/docs/lambda/validate-webhook-signature
3
+ * @see [Documentation](https://remotion.dev/docs/lambda/validate-webhook-signature)
4
4
  * @param params.secret The secret used for signing the webhook
5
5
  * @param params.body The body that was received by the endpoint
6
6
  * @param params.signatureHeader The `X-Remotion-Signature` header
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateWebhookSignature = void 0;
4
4
  /**
5
5
  * @description Throws if the signature of the finish webhook is missing or inauthentic
6
- * @link https://remotion.dev/docs/lambda/validate-webhook-signature
6
+ * @see [Documentation](https://remotion.dev/docs/lambda/validate-webhook-signature)
7
7
  * @param params.secret The secret used for signing the webhook
8
8
  * @param params.body The body that was received by the endpoint
9
9
  * @param params.signatureHeader The `X-Remotion-Signature` header
@@ -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
  };
@@ -71,7 +71,7 @@ const createPostRenderData = ({ renderId, region, memorySizeInMb, renderMetadata
71
71
  type: 'absolute-time',
72
72
  }),
73
73
  retriesInfo,
74
- mostExpensiveFrameRanges: (0, get_most_expensive_chunks_1.getMostExpensiveChunks)(parsedTimings, renderMetadata.framesPerLambda),
74
+ mostExpensiveFrameRanges: (0, get_most_expensive_chunks_1.getMostExpensiveChunks)(parsedTimings, renderMetadata.framesPerLambda, renderMetadata.frameRange[1]),
75
75
  };
76
76
  };
77
77
  exports.createPostRenderData = createPostRenderData;
@@ -1 +1 @@
1
- export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "sa-east-1" | "eu-south-1" | "af-south-1" | "ap-east-1" | "me-south-1";
1
+ export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-south-1" | "ap-east-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "me-south-1" | "sa-east-1";
@@ -5,7 +5,6 @@ const renderer_1 = require("@remotion/renderer");
5
5
  const remotion_1 = require("remotion");
6
6
  const chunk_progress_1 = require("../../shared/chunk-progress");
7
7
  const constants_1 = require("../../shared/constants");
8
- const docs_url_1 = require("../../shared/docs-url");
9
8
  const calculate_chunk_times_1 = require("./calculate-chunk-times");
10
9
  const calculate_price_from_bucket_1 = require("./calculate-price-from-bucket");
11
10
  const check_if_render_exists_1 = require("./check-if-render-exists");
@@ -26,6 +25,7 @@ const get_retry_stats_1 = require("./get-retry-stats");
26
25
  const get_time_to_finish_1 = require("./get-time-to-finish");
27
26
  const inspect_errors_1 = require("./inspect-errors");
28
27
  const io_1 = require("./io");
28
+ const make_timeout_error_1 = require("./make-timeout-error");
29
29
  const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region, memorySizeInMb, timeoutInMilliseconds, customCredentials, }) => {
30
30
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
31
31
  const postRenderData = await (0, get_post_render_data_1.getPostRenderData)({
@@ -175,19 +175,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
175
175
  Date.now() > renderMetadata.startedDate + timeoutInMilliseconds + 20000;
176
176
  const allErrors = [
177
177
  isBeyondTimeout
178
- ? {
179
- attempt: 1,
180
- chunk: null,
181
- explanation: `The main function timed out after ${timeoutInMilliseconds}ms. Consider increasing the timeout of your function. You can use the "--timeout" parameter when deploying a function via CLI, or the "timeoutInSeconds" parameter when using the deployFunction API. ${docs_url_1.DOCS_URL}/docs/lambda/cli/functions#deploy`,
182
- frame: null,
183
- isFatal: true,
184
- s3Location: '',
185
- stack: new Error().stack,
186
- tmpDir: null,
187
- totalAttempts: 1,
188
- type: 'stitcher',
189
- willRetry: false,
190
- }
178
+ ? (0, make_timeout_error_1.makeTimeoutError)({ timeoutInMilliseconds, renderMetadata, chunks })
191
179
  : null,
192
180
  ...errorExplanations,
193
181
  ].filter(remotion_1.Internals.truthy);
@@ -0,0 +1,8 @@
1
+ import type { _Object } from '@aws-sdk/client-s3';
2
+ import type { RenderMetadata } from '../../defaults';
3
+ import type { EnhancedErrorInfo } from './write-lambda-error';
4
+ export declare const makeTimeoutError: ({ timeoutInMilliseconds, chunks, renderMetadata, }: {
5
+ timeoutInMilliseconds: number;
6
+ chunks: _Object[];
7
+ renderMetadata: RenderMetadata;
8
+ }) => EnhancedErrorInfo;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeTimeoutError = void 0;
4
+ const docs_url_1 = require("../../shared/docs-url");
5
+ const parse_chunk_key_1 = require("../../shared/parse-chunk-key");
6
+ const makeTimeoutError = ({ timeoutInMilliseconds, chunks, renderMetadata, }) => {
7
+ const availableChunks = chunks.map((c) => (0, parse_chunk_key_1.parseLambdaChunkKey)(c.Key));
8
+ const missingChunks = new Array(renderMetadata.totalChunks)
9
+ .fill(true)
10
+ .filter((_, i) => {
11
+ return !availableChunks.find((c) => c.chunk === i);
12
+ })
13
+ .map((_, i) => i);
14
+ const missingChunksMessageList = missingChunks
15
+ .map((ch) => {
16
+ const isLastChunk = ch === renderMetadata.totalChunks - 1;
17
+ const start = ch * renderMetadata.framesPerLambda;
18
+ const end = isLastChunk
19
+ ? renderMetadata.frameRange[1]
20
+ : (ch + 1) * renderMetadata.framesPerLambda - 1;
21
+ return `Chunk ${ch} (Frames ${start} - ${end})`;
22
+ })
23
+ .slice(0, 5)
24
+ .join(', ');
25
+ const message = [
26
+ `The main function timed out after ${timeoutInMilliseconds}ms.`,
27
+ `Consider increasing the timeout of your function.`,
28
+ `The following chunks are missing (showing up to 5): ${missingChunksMessageList}.`,
29
+ `You can use the "--timeout" parameter when deploying a function via CLI, or the "timeoutInSeconds" parameter when using the deployFunction() API.`,
30
+ `${docs_url_1.DOCS_URL}/docs/lambda/cli/functions#deploy`,
31
+ ].join('\n');
32
+ return {
33
+ attempt: 1,
34
+ chunk: null,
35
+ explanation: message,
36
+ frame: null,
37
+ isFatal: true,
38
+ s3Location: '',
39
+ stack: new Error().stack,
40
+ tmpDir: null,
41
+ totalAttempts: 1,
42
+ type: 'stitcher',
43
+ willRetry: false,
44
+ message,
45
+ name: 'TimeoutError',
46
+ };
47
+ };
48
+ exports.makeTimeoutError = makeTimeoutError;
@@ -5,4 +5,4 @@ export declare type ExpensiveChunk = {
5
5
  frameRange: [number, number];
6
6
  timeInMilliseconds: number;
7
7
  };
8
- export declare const getMostExpensiveChunks: (parsedTimings: ParsedTiming[], framesPerLambda: number) => ExpensiveChunk[];
8
+ export declare const getMostExpensiveChunks: (parsedTimings: ParsedTiming[], framesPerLambda: number, lastFrame: number) => ExpensiveChunk[];
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMostExpensiveChunks = exports.OVERHEAD_TIME_PER_LAMBDA = void 0;
4
4
  exports.OVERHEAD_TIME_PER_LAMBDA = 100;
5
- const getMostExpensiveChunks = (parsedTimings, framesPerLambda) => {
5
+ const getMostExpensiveChunks = (parsedTimings, framesPerLambda, lastFrame) => {
6
6
  const mostExpensiveChunks = parsedTimings
7
7
  .slice(0)
8
8
  .sort((a, b) => {
@@ -12,12 +12,13 @@ const getMostExpensiveChunks = (parsedTimings, framesPerLambda) => {
12
12
  })
13
13
  .slice(0, 5);
14
14
  return mostExpensiveChunks.map((c) => {
15
+ const isLastChunk = c.chunk === parsedTimings.length - 1;
15
16
  return {
16
17
  timeInMilliseconds: c.rendered - c.start,
17
18
  chunk: c.chunk,
18
19
  frameRange: [
19
20
  framesPerLambda * c.chunk,
20
- framesPerLambda * (c.chunk + 1) - 1,
21
+ isLastChunk ? lastFrame : framesPerLambda * (c.chunk + 1) - 1,
21
22
  ],
22
23
  };
23
24
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.3.54",
3
+ "version": "3.3.55",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -33,18 +33,18 @@
33
33
  "@aws-sdk/credential-providers": "3.272.0",
34
34
  "@aws-sdk/lib-storage": "3.272.0",
35
35
  "@aws-sdk/s3-request-presigner": "3.272.0",
36
- "@remotion/bundler": "3.3.54",
37
- "@remotion/cli": "3.3.54",
38
- "@remotion/renderer": "3.3.54",
36
+ "@remotion/bundler": "3.3.55",
37
+ "@remotion/cli": "3.3.55",
38
+ "@remotion/renderer": "3.3.55",
39
39
  "aws-policies": "^1.0.1",
40
40
  "mime-types": "2.1.34",
41
- "remotion": "3.3.54"
41
+ "remotion": "3.3.55"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@jonny/eslint-config": "3.0.266",
45
45
  "@remotion/bundler": "3.3.44",
46
- "@remotion/compositor-linux-arm64-musl": "3.3.54",
47
- "@remotion/compositor-linux-x64-musl": "3.3.54",
46
+ "@remotion/compositor-linux-arm64-musl": "3.3.55",
47
+ "@remotion/compositor-linux-x64-musl": "3.3.55",
48
48
  "@types/mime-types": "2.1.1",
49
49
  "@types/minimist": "1.2.2",
50
50
  "@types/node": "^14.14.14",
@@ -86,5 +86,5 @@
86
86
  ]
87
87
  }
88
88
  },
89
- "gitHead": "3a004e0b0e2a805fb276c35dd5922e3389c9f53c"
89
+ "gitHead": "4cecccc293e9c906c693f55fac65df8f1cfd2338"
90
90
  }
Binary file
Binary file