@remotion/lambda 3.3.10 → 3.3.11
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-compositions-on-lambda.d.ts +3 -2
- package/dist/api/get-regions.d.ts +5 -1
- package/dist/api/get-regions.js +5 -2
- package/dist/api/render-media-on-lambda.d.ts +3 -2
- package/dist/api/render-still-on-lambda.d.ts +3 -2
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/commands/regions.js +5 -1
- package/dist/functions/helpers/get-chunk-progress.d.ts +0 -0
- package/dist/functions/helpers/get-chunk-progress.js +1 -0
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/launch.js +1 -0
- package/dist/pricing/aws-regions.d.ts +1 -0
- package/dist/pricing/aws-regions.js +20 -1
- package/dist/shared/constants.d.ts +7 -6
- package/dist/shared/get-chunk-progress.d.ts +0 -0
- package/dist/shared/get-chunk-progress.js +1 -0
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +6 -6
- package/remotionlambda.zip +0 -0
- package/dist/shared/get-cloudwatch-stream-url.d.ts +0 -8
- package/dist/shared/get-cloudwatch-stream-url.js +0 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
import type { LambdaChromiumOptions } from '@remotion/renderer/src/open-browser';
|
|
2
3
|
import type { TCompMetadata } from 'remotion';
|
|
3
4
|
import type { AwsRegion } from '../client';
|
|
4
5
|
export declare type GetCompositionsOnLambdaInput = {
|
|
5
|
-
chromiumOptions?:
|
|
6
|
+
chromiumOptions?: LambdaChromiumOptions;
|
|
6
7
|
region: AwsRegion;
|
|
7
8
|
inputProps: unknown;
|
|
8
9
|
functionName: string;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
declare type Options = {
|
|
3
|
+
enabledByDefaultOnly?: boolean;
|
|
4
|
+
};
|
|
2
5
|
/**
|
|
3
6
|
* @description Gets an array of all supported AWS regions of this release of Remotion Lambda.
|
|
4
7
|
* @link https://remotion.dev/docs/lambda/getregions
|
|
5
8
|
* @returns {AwsRegion[]} A list of AWS regions.
|
|
6
9
|
*/
|
|
7
|
-
export declare const getRegions: () => readonly AwsRegion[];
|
|
10
|
+
export declare const getRegions: (options?: Options) => readonly AwsRegion[];
|
|
11
|
+
export {};
|
package/dist/api/get-regions.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRegions = void 0;
|
|
4
|
+
const aws_regions_1 = require("../pricing/aws-regions");
|
|
4
5
|
const regions_1 = require("../regions");
|
|
5
6
|
/**
|
|
6
7
|
* @description Gets an array of all supported AWS regions of this release of Remotion Lambda.
|
|
7
8
|
* @link https://remotion.dev/docs/lambda/getregions
|
|
8
9
|
* @returns {AwsRegion[]} A list of AWS regions.
|
|
9
10
|
*/
|
|
10
|
-
const getRegions = () => {
|
|
11
|
-
|
|
11
|
+
const getRegions = (options) => {
|
|
12
|
+
var _a;
|
|
13
|
+
const onlyEnabledByDefault = (_a = options === null || options === void 0 ? void 0 : options.enabledByDefaultOnly) !== null && _a !== void 0 ? _a : false;
|
|
14
|
+
return onlyEnabledByDefault ? aws_regions_1.DEFAULT_AWS_REGIONS : regions_1.AWS_REGIONS;
|
|
12
15
|
};
|
|
13
16
|
exports.getRegions = getRegions;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from '@remotion/renderer';
|
|
2
|
+
import type { LambdaChromiumOptions } from '@remotion/renderer/src/open-browser';
|
|
2
3
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
3
4
|
import type { OutNameInput, Privacy } from '../shared/constants';
|
|
4
5
|
import type { DownloadBehavior } from '../shared/content-disposition-header';
|
|
@@ -23,7 +24,7 @@ export declare type RenderMediaOnLambdaInput = {
|
|
|
23
24
|
frameRange?: FrameRange;
|
|
24
25
|
outName?: OutNameInput;
|
|
25
26
|
timeoutInMilliseconds?: number;
|
|
26
|
-
chromiumOptions?:
|
|
27
|
+
chromiumOptions?: LambdaChromiumOptions;
|
|
27
28
|
scale?: number;
|
|
28
29
|
everyNthFrame?: number;
|
|
29
30
|
numberOfGifLoops?: number | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LogLevel, StillImageFormat } from '@remotion/renderer';
|
|
2
|
+
import type { LambdaChromiumOptions } from '@remotion/renderer/src/open-browser';
|
|
2
3
|
import type { AwsRegion } from '../pricing/aws-regions';
|
|
3
4
|
import type { CostsInfo, OutNameInput, Privacy } from '../shared/constants';
|
|
4
5
|
import type { DownloadBehavior } from '../shared/content-disposition-header';
|
|
@@ -17,7 +18,7 @@ export declare type RenderStillOnLambdaInput = {
|
|
|
17
18
|
logLevel?: LogLevel;
|
|
18
19
|
outName?: OutNameInput;
|
|
19
20
|
timeoutInMilliseconds?: number;
|
|
20
|
-
chromiumOptions?:
|
|
21
|
+
chromiumOptions?: LambdaChromiumOptions;
|
|
21
22
|
scale?: number;
|
|
22
23
|
downloadBehavior?: DownloadBehavior;
|
|
23
24
|
forceWidth?: number | null;
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -3,8 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.regionsCommand = exports.REGIONS_COMMAND = void 0;
|
|
4
4
|
const log_1 = require("@remotion/cli/dist/log");
|
|
5
5
|
const get_regions_1 = require("../../api/get-regions");
|
|
6
|
+
const args_1 = require("../args");
|
|
6
7
|
exports.REGIONS_COMMAND = 'regions';
|
|
7
8
|
const regionsCommand = () => {
|
|
8
|
-
|
|
9
|
+
var _a;
|
|
10
|
+
log_1.Log.info((0, get_regions_1.getRegions)({
|
|
11
|
+
enabledByDefaultOnly: (_a = args_1.parsedLambdaCli['default-only']) !== null && _a !== void 0 ? _a : false,
|
|
12
|
+
}).join(' '));
|
|
9
13
|
};
|
|
10
14
|
exports.regionsCommand = regionsCommand;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-
|
|
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";
|
package/dist/functions/launch.js
CHANGED
|
@@ -477,6 +477,7 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
477
477
|
lambdaErrors: postRenderData.errors,
|
|
478
478
|
outputFile: postRenderData.outputFile,
|
|
479
479
|
timeToFinish: postRenderData.timeToFinish,
|
|
480
|
+
costs: postRenderData.cost,
|
|
480
481
|
},
|
|
481
482
|
});
|
|
482
483
|
webhookInvoked = true;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
export declare const DEFAULT_AWS_REGIONS: readonly ["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"];
|
|
1
2
|
export declare const AWS_REGIONS: readonly ["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"];
|
|
2
3
|
export declare type AwsRegion = typeof AWS_REGIONS[number];
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AWS_REGIONS = void 0;
|
|
3
|
+
exports.AWS_REGIONS = exports.DEFAULT_AWS_REGIONS = void 0;
|
|
4
|
+
exports.DEFAULT_AWS_REGIONS = [
|
|
5
|
+
'eu-central-1',
|
|
6
|
+
'eu-west-1',
|
|
7
|
+
'eu-west-2',
|
|
8
|
+
'eu-west-3',
|
|
9
|
+
'eu-north-1',
|
|
10
|
+
'us-east-1',
|
|
11
|
+
'us-east-2',
|
|
12
|
+
'us-west-1',
|
|
13
|
+
'us-west-2',
|
|
14
|
+
'ap-south-1',
|
|
15
|
+
'ap-southeast-1',
|
|
16
|
+
'ap-southeast-2',
|
|
17
|
+
'ap-northeast-1',
|
|
18
|
+
'ap-northeast-2',
|
|
19
|
+
'ap-northeast-3',
|
|
20
|
+
'ca-central-1',
|
|
21
|
+
'sa-east-1',
|
|
22
|
+
];
|
|
4
23
|
exports.AWS_REGIONS = [
|
|
5
24
|
'eu-central-1',
|
|
6
25
|
'eu-west-1',
|
|
@@ -277,13 +277,14 @@ export declare type RenderMetadata = {
|
|
|
277
277
|
frameRange: [number, number];
|
|
278
278
|
everyNthFrame: number;
|
|
279
279
|
};
|
|
280
|
+
export declare type AfterRenderCost = {
|
|
281
|
+
estimatedCost: number;
|
|
282
|
+
estimatedDisplayCost: string;
|
|
283
|
+
currency: string;
|
|
284
|
+
disclaimer: string;
|
|
285
|
+
};
|
|
280
286
|
export declare type PostRenderData = {
|
|
281
|
-
cost:
|
|
282
|
-
estimatedCost: number;
|
|
283
|
-
estimatedDisplayCost: string;
|
|
284
|
-
currency: string;
|
|
285
|
-
disclaimer: string;
|
|
286
|
-
};
|
|
287
|
+
cost: AfterRenderCost;
|
|
287
288
|
outputFile: string;
|
|
288
289
|
outputSize: number;
|
|
289
290
|
renderSize: number;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import http from 'http';
|
|
4
4
|
import https from 'https';
|
|
5
5
|
import type { EnhancedErrorInfo } from '../functions/helpers/write-lambda-error';
|
|
6
|
+
import type { AfterRenderCost } from './constants';
|
|
6
7
|
/**
|
|
7
8
|
* @description Calculates cryptographically secure signature for webhooks using Hmac.
|
|
8
9
|
* @link https://remotion.dev/docs/lambda/webhooks#validate-webhooks
|
|
@@ -24,6 +25,7 @@ declare type DynamicWebhookPayload = {
|
|
|
24
25
|
outputUrl: string | undefined;
|
|
25
26
|
outputFile: string | undefined;
|
|
26
27
|
timeToFinish: number | undefined;
|
|
28
|
+
costs: AfterRenderCost;
|
|
27
29
|
} | {
|
|
28
30
|
type: 'timeout';
|
|
29
31
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.11",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"@aws-sdk/credential-providers": "3.215.0",
|
|
34
34
|
"@aws-sdk/lib-storage": "3.215.0",
|
|
35
35
|
"@aws-sdk/s3-request-presigner": "3.215.0",
|
|
36
|
-
"@remotion/bundler": "3.3.
|
|
37
|
-
"@remotion/cli": "3.3.
|
|
38
|
-
"@remotion/renderer": "3.3.
|
|
36
|
+
"@remotion/bundler": "3.3.11",
|
|
37
|
+
"@remotion/cli": "3.3.11",
|
|
38
|
+
"@remotion/renderer": "3.3.11",
|
|
39
39
|
"aws-policies": "^1.0.1",
|
|
40
40
|
"mime-types": "2.1.34",
|
|
41
|
-
"remotion": "3.3.
|
|
41
|
+
"remotion": "3.3.11"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "08404196c439c2bf1f06bbb7a99a6fd84d5158e1"
|
|
65
65
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AwsRegion } from '../client';
|
|
2
|
-
import type { LambdaRoutines } from './constants';
|
|
3
|
-
export declare const getCloudwatchStreamUrl: ({ region, functionName, method, renderId, }: {
|
|
4
|
-
region: AwsRegion;
|
|
5
|
-
functionName: string;
|
|
6
|
-
method: LambdaRoutines;
|
|
7
|
-
renderId: string;
|
|
8
|
-
}) => string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCloudwatchStreamUrl = void 0;
|
|
4
|
-
const getCloudwatchStreamUrl = ({ region, functionName, method, renderId, }) => {
|
|
5
|
-
return `https://${region}.console.aws.amazon.com/cloudwatch/home?region=${region}#logsV2:log-groups/log-group/$252Faws$252Flambda$252F${functionName}/log-events$3FfilterPattern$3D$2522method$253D${method}$252CrenderId$253D${renderId}$2522`;
|
|
6
|
-
};
|
|
7
|
-
exports.getCloudwatchStreamUrl = getCloudwatchStreamUrl;
|