@remotion/lambda 3.0.0-lambda.295 → 3.0.0-lambda.338
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/admin/make-layer-public.js +65 -48
- package/dist/admin/make-layer-public.js.map +1 -1
- package/dist/api/create-function.d.ts +3 -1
- package/dist/api/create-function.d.ts.map +1 -1
- package/dist/api/create-function.js +3 -3
- package/dist/api/create-function.js.map +1 -1
- package/dist/api/deploy-function.d.ts +3 -0
- package/dist/api/deploy-function.d.ts.map +1 -1
- package/dist/api/deploy-function.js +4 -0
- package/dist/api/deploy-function.js.map +1 -1
- package/dist/api/download-media.d.ts.map +1 -1
- package/dist/api/download-media.js +4 -15
- package/dist/api/download-media.js.map +1 -1
- package/dist/api/render-media-on-lambda.d.ts +5 -2
- package/dist/api/render-media-on-lambda.d.ts.map +1 -1
- package/dist/api/render-media-on-lambda.js +5 -1
- package/dist/api/render-media-on-lambda.js.map +1 -1
- package/dist/api/render-still-on-lambda.d.ts +4 -1
- package/dist/api/render-still-on-lambda.d.ts.map +1 -1
- package/dist/api/render-still-on-lambda.js +6 -2
- package/dist/api/render-still-on-lambda.js.map +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/functions/deploy.d.ts.map +1 -1
- package/dist/cli/commands/functions/deploy.js +14 -9
- package/dist/cli/commands/functions/deploy.js.map +1 -1
- package/dist/cli/commands/render/render.d.ts.map +1 -1
- package/dist/cli/commands/render/render.js +17 -14
- package/dist/cli/commands/render/render.js.map +1 -1
- package/dist/cli/commands/still.d.ts.map +1 -1
- package/dist/cli/commands/still.js +10 -7
- package/dist/cli/commands/still.js.map +1 -1
- package/dist/functions/helpers/concat-videos.d.ts.map +1 -1
- package/dist/functions/helpers/concat-videos.js +4 -2
- package/dist/functions/helpers/concat-videos.js.map +1 -1
- package/dist/functions/helpers/get-browser-instance.d.ts +2 -1
- package/dist/functions/helpers/get-browser-instance.d.ts.map +1 -1
- package/dist/functions/helpers/get-browser-instance.js +2 -1
- package/dist/functions/helpers/get-browser-instance.js.map +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.d.ts +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.d.ts.map +1 -1
- package/dist/functions/helpers/get-chromium-executable-path.js.map +1 -1
- package/dist/functions/helpers/presign-url.d.ts +2 -0
- package/dist/functions/helpers/presign-url.d.ts.map +1 -0
- package/dist/functions/helpers/presign-url.js +9 -0
- package/dist/functions/helpers/presign-url.js.map +1 -0
- package/dist/functions/helpers/read-with-progress.d.ts +5 -3
- package/dist/functions/helpers/read-with-progress.d.ts.map +1 -1
- package/dist/functions/helpers/read-with-progress.js +4 -12
- package/dist/functions/helpers/read-with-progress.js.map +1 -1
- package/dist/functions/launch.d.ts.map +1 -1
- package/dist/functions/launch.js +3 -1
- package/dist/functions/launch.js.map +1 -1
- package/dist/functions/renderer.d.ts.map +1 -1
- package/dist/functions/renderer.js +16 -8
- package/dist/functions/renderer.js.map +1 -1
- package/dist/functions/start.d.ts.map +1 -1
- package/dist/functions/start.js +3 -3
- package/dist/functions/start.js.map +1 -1
- package/dist/functions/still.d.ts.map +1 -1
- package/dist/functions/still.js +8 -6
- package/dist/functions/still.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +13 -7
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +3 -7
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/hosted-layers.d.ts +9 -5
- package/dist/shared/hosted-layers.d.ts.map +1 -1
- package/dist/shared/hosted-layers.js +284 -140
- package/dist/shared/hosted-layers.js.map +1 -1
- package/dist/shared/random-hash.d.ts +3 -1
- package/dist/shared/random-hash.d.ts.map +1 -1
- package/dist/shared/random-hash.js +2 -1
- package/dist/shared/random-hash.js.map +1 -1
- package/dist/shared/validate-architecture.d.ts +5 -0
- package/dist/shared/validate-architecture.d.ts.map +1 -0
- package/dist/shared/validate-architecture.js +15 -0
- package/dist/shared/validate-architecture.js.map +1 -0
- package/package.json +8 -7
- package/remotionlambda.zip +0 -0
- package/dist/api/get-aws-clients.d.ts +0 -16
- package/dist/api/get-aws-clients.d.ts.map +0 -1
- package/dist/api/get-aws-clients.js +0 -40
- package/dist/api/get-aws-clients.js.map +0 -1
|
@@ -2,63 +2,80 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
4
4
|
const aws_policies_1 = require("aws-policies");
|
|
5
|
+
const __1 = require("..");
|
|
5
6
|
const quit_1 = require("../cli/helpers/quit");
|
|
6
|
-
const regions_1 = require("../regions");
|
|
7
7
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
8
8
|
const constants_1 = require("../shared/constants");
|
|
9
9
|
const runtimes = ['nodejs14.x'];
|
|
10
|
+
const archictures = ['arm64', 'x86_64'];
|
|
10
11
|
const layerInfo = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
arm64: {
|
|
13
|
+
'ap-northeast-1': [],
|
|
14
|
+
'ap-south-1': [],
|
|
15
|
+
'ap-southeast-1': [],
|
|
16
|
+
'ap-southeast-2': [],
|
|
17
|
+
'eu-central-1': [],
|
|
18
|
+
'eu-west-1': [],
|
|
19
|
+
'eu-west-2': [],
|
|
20
|
+
'us-east-1': [],
|
|
21
|
+
'us-east-2': [],
|
|
22
|
+
'us-west-2': [],
|
|
23
|
+
},
|
|
24
|
+
x86_64: {
|
|
25
|
+
'ap-northeast-1': [],
|
|
26
|
+
'ap-south-1': [],
|
|
27
|
+
'ap-southeast-1': [],
|
|
28
|
+
'ap-southeast-2': [],
|
|
29
|
+
'eu-central-1': [],
|
|
30
|
+
'eu-west-1': [],
|
|
31
|
+
'eu-west-2': [],
|
|
32
|
+
'us-east-1': [],
|
|
33
|
+
'us-east-2': [],
|
|
34
|
+
'us-west-2': [],
|
|
35
|
+
},
|
|
21
36
|
};
|
|
22
37
|
const makeLayerPublic = async () => {
|
|
23
38
|
const layers = ['remotion', 'ffmpeg', 'chromium'];
|
|
24
|
-
for (const
|
|
25
|
-
for (const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
layerInfo[region]
|
|
39
|
+
for (const architecture of archictures) {
|
|
40
|
+
for (const region of (0, __1.getRegions)()) {
|
|
41
|
+
for (const layer of layers) {
|
|
42
|
+
const layerName = `remotion-binaries-${layer}-${architecture}`;
|
|
43
|
+
const { Version, LayerArn } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PublishLayerVersionCommand({
|
|
44
|
+
Content: {
|
|
45
|
+
S3Bucket: 'remotionlambda-binaries-' + region,
|
|
46
|
+
S3Key: `remotion-layer-${layer}-v4-${architecture}.zip`,
|
|
47
|
+
},
|
|
48
|
+
LayerName: layerName,
|
|
49
|
+
LicenseInfo: layer === 'chromium'
|
|
50
|
+
? 'Compiled from Chromium source. Read Chromium License: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/LICENSE'
|
|
51
|
+
: layer === 'ffmpeg'
|
|
52
|
+
? 'Compiled from FFMPEG source. Read FFMPEG license: https://ffmpeg.org/legal.html'
|
|
53
|
+
: 'Contains UNIX .so files and Noto Sans font. Read Noto Sans License: https://fonts.google.com/noto/specimen/Noto+Sans/about',
|
|
54
|
+
CompatibleRuntimes: runtimes,
|
|
55
|
+
Description: constants_1.CURRENT_VERSION,
|
|
56
|
+
}));
|
|
57
|
+
await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.AddLayerVersionPermissionCommand({
|
|
58
|
+
Action: aws_policies_1.lambda.GetLayerVersion,
|
|
59
|
+
LayerName: layerName,
|
|
60
|
+
Principal: '*',
|
|
61
|
+
VersionNumber: Version,
|
|
62
|
+
StatementId: 'public-layer',
|
|
63
|
+
}));
|
|
64
|
+
if (!layerInfo[architecture][region]) {
|
|
65
|
+
layerInfo[architecture][region] = [];
|
|
66
|
+
}
|
|
67
|
+
if (!LayerArn) {
|
|
68
|
+
throw new Error('layerArn is null');
|
|
69
|
+
}
|
|
70
|
+
if (!Version) {
|
|
71
|
+
throw new Error('Version is null');
|
|
72
|
+
}
|
|
73
|
+
layerInfo[architecture][region].push({
|
|
74
|
+
layerArn: LayerArn,
|
|
75
|
+
version: Version,
|
|
76
|
+
});
|
|
77
|
+
console.log({ LayerArn, Version });
|
|
50
78
|
}
|
|
51
|
-
if (!LayerArn) {
|
|
52
|
-
throw new Error('layerArn is null');
|
|
53
|
-
}
|
|
54
|
-
if (!Version) {
|
|
55
|
-
throw new Error('Version is null');
|
|
56
|
-
}
|
|
57
|
-
layerInfo[region].push({
|
|
58
|
-
layerArn: LayerArn,
|
|
59
|
-
version: Version,
|
|
60
|
-
});
|
|
61
|
-
console.log({ LayerArn, Version });
|
|
62
79
|
}
|
|
63
80
|
}
|
|
64
81
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-layer-public.js","sourceRoot":"","sources":["../../src/admin/make-layer-public.ts"],"names":[],"mappings":";;AAAA,0DAGgC;AAChC,+CAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"make-layer-public.js","sourceRoot":"","sources":["../../src/admin/make-layer-public.ts"],"names":[],"mappings":";;AAAA,0DAGgC;AAChC,+CAAoC;AACpC,0BAA8B;AAC9B,8CAAyC;A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AAG,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACd,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,IAAA,WAAI,EAAC,CAAC,CAAC,CAAC;AACT,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
-
|
|
2
|
+
import { LambdaArchitecture } from '../shared/validate-architecture';
|
|
3
|
+
export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, architecture, }: {
|
|
3
4
|
createCloudWatchLogGroup: boolean;
|
|
4
5
|
region: AwsRegion;
|
|
5
6
|
zipFile: string;
|
|
@@ -9,6 +10,7 @@ export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFil
|
|
|
9
10
|
timeoutInSeconds: number;
|
|
10
11
|
alreadyCreated: boolean;
|
|
11
12
|
retentionInDays: number;
|
|
13
|
+
architecture: LambdaArchitecture;
|
|
12
14
|
}) => Promise<{
|
|
13
15
|
FunctionName: string;
|
|
14
16
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.d.ts","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-function.d.ts","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AAGnE,eAAO,MAAM,cAAc;8BAYA,OAAO;YACzB,SAAS;aACR,MAAM;kBACD,MAAM;eACT,MAAM;oBACD,MAAM;sBACJ,MAAM;oBACR,OAAO;qBACN,MAAM;kBACT,kBAAkB;;kBACN,MAAM;EAqDhC,CAAC"}
|
|
@@ -8,7 +8,7 @@ const defaults_1 = require("../defaults");
|
|
|
8
8
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
9
9
|
const hosted_layers_1 = require("../shared/hosted-layers");
|
|
10
10
|
const suggested_policy_1 = require("./iam-validation/suggested-policy");
|
|
11
|
-
const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, }) => {
|
|
11
|
+
const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, architecture, }) => {
|
|
12
12
|
if (createCloudWatchLogGroup) {
|
|
13
13
|
try {
|
|
14
14
|
await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
|
|
@@ -40,8 +40,8 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
|
|
|
40
40
|
Description: 'Renders a Remotion video.',
|
|
41
41
|
MemorySize: memorySizeInMb,
|
|
42
42
|
Timeout: timeoutInSeconds,
|
|
43
|
-
Layers: hosted_layers_1.hostedLayers[region].map(({ layerArn, version }) => `${layerArn}:${version}`),
|
|
44
|
-
Architectures: [
|
|
43
|
+
Layers: hosted_layers_1.hostedLayers[architecture][region].map(({ layerArn, version }) => `${layerArn}:${version}`),
|
|
44
|
+
Architectures: [architecture],
|
|
45
45
|
}));
|
|
46
46
|
await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PutFunctionEventInvokeConfigCommand({
|
|
47
47
|
MaximumRetryAttempts: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-function.js","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":";;;AAAA,4EAGyC;AACzC,0DAGgC;AAChC,2BAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"create-function.js","sourceRoot":"","sources":["../../src/api/create-function.ts"],"names":[],"mappings":";;;AAAA,4EAGyC;AACzC,0DAGgC;AAChC,2BAAgC;AAChC,0CAA6C;AAE7C,uDAA+E;AAC/E,2DAAqD;AAErD,wEAA4D;AAErD,MAAM,cAAc,GAAG,KAAK,EAAE,EACpC,wBAAwB,EACxB,MAAM,EACN,OAAO,EACP,YAAY,EACZ,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,YAAY,GAYZ,EAAmC,EAAE;IACrC,IAAI,wBAAwB,EAAE;QAC7B,IAAI;YACH,MAAM,IAAA,qCAAuB,EAAC,MAAM,CAAC,CAAC,IAAI,CACzC,IAAI,8CAAqB,CAAC;gBACzB,YAAY,EAAE,GAAG,2BAAgB,GAAG,YAAY,EAAE;aAClD,CAAC,CACF,CAAC;SACF;QAAC,OAAO,IAAI,EAAE;YACd,MAAM,GAAG,GAAG,IAAa,CAAC;YAC1B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,EAAE;gBACtD,MAAM,GAAG,CAAC;aACV;SACD;QAED,MAAM,IAAA,qCAAuB,EAAC,MAAM,CAAC,CAAC,IAAI,CACzC,IAAI,kDAAyB,CAAC;YAC7B,YAAY,EAAE,GAAG,2BAAgB,GAAG,YAAY,EAAE;YAClD,eAAe;SACf,CAAC,CACF,CAAC;KACF;IAED,IAAI,cAAc,EAAE;QACnB,OAAO,EAAC,YAAY,EAAE,YAAY,EAAC,CAAC;KACpC;IAED,MAAM,EAAC,YAAY,EAAC,GAAG,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC,IAAI,CACxD,IAAI,qCAAqB,CAAC;QACzB,IAAI,EAAE;YACL,OAAO,EAAE,IAAA,iBAAY,EAAC,OAAO,CAAC;SAC9B;QACD,YAAY,EAAE,YAAY;QAC1B,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,gBAAgB,SAAS,SAAS,4BAAS,EAAE;QACnD,OAAO,EAAE,YAAY;QACrB,WAAW,EAAE,2BAA2B;QACxC,UAAU,EAAE,cAAc;QAC1B,OAAO,EAAE,gBAAgB;QACzB,MAAM,EAAE,4BAAY,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAC7C,CAAC,EAAC,QAAQ,EAAE,OAAO,EAAC,EAAE,EAAE,CAAC,GAAG,QAAQ,IAAI,OAAO,EAAE,CACjD;QACD,aAAa,EAAE,CAAC,YAAY,CAAC;KAC7B,CAAC,CACF,CAAC;IACF,MAAM,IAAA,6BAAe,EAAC,MAAM,CAAC,CAAC,IAAI,CACjC,IAAI,mDAAmC,CAAC;QACvC,oBAAoB,EAAE,CAAC;QACvB,YAAY;KACZ,CAAC,CACF,CAAC;IAEF,OAAO,EAAC,YAAY,EAAE,YAAsB,EAAC,CAAC;AAC/C,CAAC,CAAC;AA3EW,QAAA,cAAc,kBA2EzB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
2
|
+
import { LambdaArchitecture } from '../shared/validate-architecture';
|
|
2
3
|
export declare type DeployFunctionInput = {
|
|
3
4
|
createCloudWatchLogGroup: boolean;
|
|
4
5
|
cloudWatchLogRetentionPeriodInDays?: number;
|
|
5
6
|
region: AwsRegion;
|
|
6
7
|
timeoutInSeconds: number;
|
|
7
8
|
memorySizeInMb: number;
|
|
9
|
+
architecture: LambdaArchitecture;
|
|
8
10
|
};
|
|
9
11
|
export declare type DeployFunctionOutput = {
|
|
10
12
|
functionName: string;
|
|
@@ -18,6 +20,7 @@ export declare type DeployFunctionOutput = {
|
|
|
18
20
|
* @param options.region The region you want to deploy your function to.
|
|
19
21
|
* @param options.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
20
22
|
* @param options.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
23
|
+
* @param options.architecture The architecture Lambda should run on. One of x86_64 and x64
|
|
21
24
|
* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
|
|
22
25
|
*/
|
|
23
26
|
export declare const deployFunction: (options: DeployFunctionInput) => Promise<DeployFunctionOutput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-function.d.ts","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-function.d.ts","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAQjD,OAAO,EACN,kBAAkB,EAElB,MAAM,iCAAiC,CAAC;AAOzC,oBAAY,mBAAmB,GAAG;IACjC,wBAAwB,EAAE,OAAO,CAAC;IAClC,kCAAkC,CAAC,EAAE,MAAM,CAAC;IAC5C,MAAM,EAAE,SAAS,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,kBAAkB,CAAC;CACjC,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,YACjB,mBAAmB,KAC1B,QAAQ,oBAAoB,CA6C9B,CAAC"}
|
|
@@ -5,6 +5,7 @@ const get_functions_1 = require("../api/get-functions");
|
|
|
5
5
|
const constants_1 = require("../shared/constants");
|
|
6
6
|
const function_zip_path_1 = require("../shared/function-zip-path");
|
|
7
7
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
8
|
+
const validate_architecture_1 = require("../shared/validate-architecture");
|
|
8
9
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
9
10
|
const validate_memory_size_1 = require("../shared/validate-memory-size");
|
|
10
11
|
const validate_retention_period_1 = require("../shared/validate-retention-period");
|
|
@@ -18,6 +19,7 @@ const create_function_1 = require("./create-function");
|
|
|
18
19
|
* @param options.region The region you want to deploy your function to.
|
|
19
20
|
* @param options.timeoutInSeconds After how many seconds the lambda function should be killed if it does not end itself.
|
|
20
21
|
* @param options.memorySizeInMb How much memory should be allocated to the Lambda function.
|
|
22
|
+
* @param options.architecture The architecture Lambda should run on. One of x86_64 and x64
|
|
21
23
|
* @returns {Promise<DeployFunctionOutput>} An object that contains the `functionName` property
|
|
22
24
|
*/
|
|
23
25
|
const deployFunction = async (options) => {
|
|
@@ -26,6 +28,7 @@ const deployFunction = async (options) => {
|
|
|
26
28
|
(0, validate_timeout_1.validateTimeout)(options.timeoutInSeconds);
|
|
27
29
|
(0, validate_aws_region_1.validateAwsRegion)(options.region);
|
|
28
30
|
(0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(options.cloudWatchLogRetentionPeriodInDays);
|
|
31
|
+
(0, validate_architecture_1.validateArchitecture)(options.architecture);
|
|
29
32
|
const fnNameRender = `${constants_1.RENDER_FN_PREFIX}${constants_1.CURRENT_VERSION}-${options.memorySizeInMb}mb-${options.timeoutInSeconds}sec`;
|
|
30
33
|
const accountId = await (0, get_account_id_1.getAccountId)({ region: options.region });
|
|
31
34
|
const fns = await (0, get_functions_1.getFunctions)({
|
|
@@ -45,6 +48,7 @@ const deployFunction = async (options) => {
|
|
|
45
48
|
timeoutInSeconds: options.timeoutInSeconds,
|
|
46
49
|
retentionInDays: (_a = options.cloudWatchLogRetentionPeriodInDays) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD,
|
|
47
50
|
alreadyCreated: Boolean(alreadyDeployed),
|
|
51
|
+
architecture: options.architecture,
|
|
48
52
|
});
|
|
49
53
|
if (!created.FunctionName) {
|
|
50
54
|
throw new Error('Lambda was created but has no name');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-function.js","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":";;;AAAA,wDAAkD;AAElD,mDAI6B;AAC7B,mEAAyD;AACzD,6DAAsD;AACtD,uEAAgE;AAChE,yEAAkE;AAClE,mFAAsF;AACtF,iEAA2D;AAC3D,uDAAiD;
|
|
1
|
+
{"version":3,"file":"deploy-function.js","sourceRoot":"","sources":["../../src/api/deploy-function.ts"],"names":[],"mappings":";;;AAAA,wDAAkD;AAElD,mDAI6B;AAC7B,mEAAyD;AACzD,6DAAsD;AACtD,2EAGyC;AACzC,uEAAgE;AAChE,yEAAkE;AAClE,mFAAsF;AACtF,iEAA2D;AAC3D,uDAAiD;AAgBjD;;;;;;;;;;GAUG;AACI,MAAM,cAAc,GAAG,KAAK,EAClC,OAA4B,EACI,EAAE;;IAClC,IAAA,yCAAkB,EAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAA,kCAAe,EAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC1C,IAAA,uCAAiB,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,IAAA,6DAAiC,EAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;IAC9E,IAAA,4CAAoB,EAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAE3C,MAAM,YAAY,GAAG,GAAG,4BAAgB,GAAG,2BAAe,IAAI,OAAO,CAAC,cAAc,MAAM,OAAO,CAAC,gBAAgB,KAAK,CAAC;IACxH,MAAM,SAAS,GAAG,MAAM,IAAA,6BAAY,EAAC,EAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAC,CAAC,CAAC;IAE/D,MAAM,GAAG,GAAG,MAAM,IAAA,4BAAY,EAAC;QAC9B,cAAc,EAAE,IAAI;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;KACtB,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,GAAG,CAAC,IAAI,CAC/B,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,CAAC,OAAO,KAAK,2BAAe;QAC7B,CAAC,CAAC,cAAc,KAAK,OAAO,CAAC,cAAc;QAC3C,CAAC,CAAC,gBAAgB,KAAK,OAAO,CAAC,gBAAgB,CAChD,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,IAAA,gCAAc,EAAC;QACpC,wBAAwB,EAAE,OAAO,CAAC,wBAAwB;QAC1D,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,gCAAY;QACrB,YAAY,EAAE,YAAY;QAC1B,SAAS;QACT,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;QAC1C,eAAe,EACd,MAAA,OAAO,CAAC,kCAAkC,mCAC1C,+CAAmC;QACpC,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC;QACxC,YAAY,EAAE,OAAO,CAAC,YAAY;KAClC,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACtD;IAED,OAAO;QACN,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,cAAc,EAAE,OAAO,CAAC,eAAe,CAAC;KACxC,CAAC;AACH,CAAC,CAAC;AA/CW,QAAA,cAAc,kBA+CzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-media.d.ts","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"download-media.d.ts","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":"AAIA,OAAO,EAEN,sBAAsB,EACtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAGjD,oBAAY,kBAAkB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACpC,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,UAClB,kBAAkB,KACvB,QAAQ,mBAAmB,CA0B7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,UAhClB,kBAAkB,KACvB,QAAQ,mBAAmB,CA+BY,CAAC"}
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.downloadVideo = exports.downloadMedia = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const fs_1 = require("fs");
|
|
9
8
|
const path_1 = __importDefault(require("path"));
|
|
10
9
|
const expected_out_name_1 = require("../functions/helpers/expected-out-name");
|
|
11
10
|
const get_render_metadata_1 = require("../functions/helpers/get-render-metadata");
|
|
@@ -22,25 +21,15 @@ const downloadMedia = async (input) => {
|
|
|
22
21
|
region: input.region,
|
|
23
22
|
renderId: input.renderId,
|
|
24
23
|
});
|
|
25
|
-
const
|
|
24
|
+
const outputPath = path_1.default.resolve(process.cwd(), input.outPath);
|
|
25
|
+
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
26
|
+
const { sizeInBytes } = await (0, read_with_progress_1.lambdaDownloadFileWithProgress)({
|
|
26
27
|
bucketName: input.bucketName,
|
|
27
28
|
expectedBucketOwner,
|
|
28
29
|
key: (0, expected_out_name_1.getExpectedOutName)(renderMetadata),
|
|
29
30
|
region: input.region,
|
|
30
31
|
onProgress: (_a = input.onProgress) !== null && _a !== void 0 ? _a : (() => undefined),
|
|
31
|
-
|
|
32
|
-
const outputPath = path_1.default.resolve(process.cwd(), input.outPath);
|
|
33
|
-
renderer_1.RenderInternals.ensureOutputDirectory(outputPath);
|
|
34
|
-
const writeStream = (0, fs_1.createWriteStream)(outputPath);
|
|
35
|
-
let sizeInBytes = 0;
|
|
36
|
-
await new Promise((resolve, reject) => {
|
|
37
|
-
readable
|
|
38
|
-
.on('data', (d) => {
|
|
39
|
-
sizeInBytes += d.length;
|
|
40
|
-
})
|
|
41
|
-
.pipe(writeStream)
|
|
42
|
-
.on('error', (err) => reject(err))
|
|
43
|
-
.on('close', () => resolve());
|
|
32
|
+
outputPath,
|
|
44
33
|
});
|
|
45
34
|
return {
|
|
46
35
|
outputPath,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-media.js","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAmD;AACnD,
|
|
1
|
+
{"version":3,"file":"download-media.js","sourceRoot":"","sources":["../../src/api/download-media.ts"],"names":[],"mappings":";;;;;;AAAA,iDAAmD;AACnD,gDAAwB;AACxB,8EAA0E;AAC1E,kFAA2E;AAC3E,gFAGiD;AAEjD,6DAAsD;AAe/C,MAAM,aAAa,GAAG,KAAK,EACjC,KAAyB,EACM,EAAE;;IACjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,6BAAY,EAAC;QAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;KACpB,CAAC,CAAC;IACH,MAAM,cAAc,GAAG,MAAM,IAAA,uCAAiB,EAAC;QAC9C,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,mBAAmB;QACnB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACxB,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9D,0BAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,EAAC,WAAW,EAAC,GAAG,MAAM,IAAA,mDAA8B,EAAC;QAC1D,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,mBAAmB;QACnB,GAAG,EAAE,IAAA,sCAAkB,EAAC,cAAc,CAAC;QACvC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,UAAU,EAAE,MAAA,KAAK,CAAC,UAAU,mCAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;QACjD,UAAU;KACV,CAAC,CAAC;IAEH,OAAO;QACN,UAAU;QACV,WAAW;KACX,CAAC;AACH,CAAC,CAAC;AA5BW,QAAA,aAAa,iBA4BxB;AAEF;;GAEG;AACU,QAAA,aAAa,GAAG,qBAAa,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChromiumOptions } from '@remotion/renderer/src/open-browser';
|
|
1
2
|
import { FrameRange, ImageFormat, LogLevel, PixelFormat, ProResProfile } from 'remotion';
|
|
2
3
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
4
|
import { Privacy } from '../shared/constants';
|
|
@@ -22,6 +23,8 @@ export declare type RenderMediaOnLambdaInput = {
|
|
|
22
23
|
frameRange?: FrameRange;
|
|
23
24
|
outName?: string;
|
|
24
25
|
timeoutInMilliseconds?: number;
|
|
26
|
+
chromiumOptions?: ChromiumOptions;
|
|
27
|
+
scale?: number;
|
|
25
28
|
};
|
|
26
29
|
export declare type RenderMediaOnLambdaOutput = {
|
|
27
30
|
renderId: string;
|
|
@@ -46,9 +49,9 @@ export declare type RenderMediaOnLambdaOutput = {
|
|
|
46
49
|
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
47
50
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
48
51
|
*/
|
|
49
|
-
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
52
|
+
export declare const renderMediaOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
50
53
|
/**
|
|
51
54
|
* @deprecated Renamed to renderMediaOnLambda()
|
|
52
55
|
*/
|
|
53
|
-
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
56
|
+
export declare const renderVideoOnLambda: ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, }: RenderMediaOnLambdaInput) => Promise<RenderMediaOnLambdaOutput>;
|
|
54
57
|
//# sourceMappingURL=render-media-on-lambda.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-media-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render-media-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,EACN,UAAU,EACV,WAAW,EAEX,QAAQ,EACR,WAAW,EACX,aAAa,EACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAiB,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAI5D,oBAAY,wBAA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, "__esModule", { value: true });
|
|
3
3
|
exports.renderVideoOnLambda = exports.renderMediaOnLambda = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
4
5
|
const remotion_1 = require("remotion");
|
|
5
6
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
6
7
|
const constants_1 = require("../shared/constants");
|
|
@@ -25,8 +26,9 @@ const validate_frames_per_lambda_1 = require("../shared/validate-frames-per-lamb
|
|
|
25
26
|
* @param params.logLevel Level of logging that Lambda function should perform. Default "info".
|
|
26
27
|
* @returns {Promise<RenderMediaOnLambdaOutput>} See documentation for detailed structure
|
|
27
28
|
*/
|
|
28
|
-
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, }) => {
|
|
29
|
+
const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec, imageFormat, crf, envVariables, pixelFormat, proResProfile, quality, region, maxRetries, composition, framesPerLambda, privacy, enableChunkOptimization, logLevel, frameRange, outName, timeoutInMilliseconds, chromiumOptions, scale, }) => {
|
|
29
30
|
(0, validate_frames_per_lambda_1.validateFramesPerLambda)(framesPerLambda !== null && framesPerLambda !== void 0 ? framesPerLambda : null);
|
|
31
|
+
renderer_1.RenderInternals.validateScale(scale);
|
|
30
32
|
const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
|
|
31
33
|
const res = await (0, call_lambda_1.callLambda)({
|
|
32
34
|
functionName,
|
|
@@ -50,6 +52,8 @@ const renderMediaOnLambda = async ({ functionName, serveUrl, inputProps, codec,
|
|
|
50
52
|
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
51
53
|
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
52
54
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : remotion_1.Internals.DEFAULT_PUPPETEER_TIMEOUT,
|
|
55
|
+
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
56
|
+
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
53
57
|
},
|
|
54
58
|
region,
|
|
55
59
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-media-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,uDAAiD;AACjD,mDAA4D;AAC5D,yEAAiE;AACjE,qFAA6E;
|
|
1
|
+
{"version":3,"file":"render-media-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-media-on-lambda.ts"],"names":[],"mappings":";;;AAAA,iDAAmD;AAEnD,uCAOkB;AAElB,uDAAiD;AACjD,mDAA4D;AAC5D,yEAAiE;AACjE,qFAA6E;AAgC7E;;;;;;;;;;;;;;;;;;GAkBG;AAEI,MAAM,mBAAmB,GAAG,KAAK,EAAE,EACzC,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,KAAK,EACL,WAAW,EACX,GAAG,EACH,YAAY,EACZ,WAAW,EACX,aAAa,EACb,OAAO,EACP,MAAM,EACN,UAAU,EACV,WAAW,EACX,eAAe,EACf,OAAO,EACP,uBAAuB,EACvB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,qBAAqB,EACrB,eAAe,EACf,KAAK,GACqB,EAAsC,EAAE;IAClE,IAAA,oDAAuB,EAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI,CAAC,CAAC;IACjD,0BAAe,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,MAAM,YAAY,GAAG,MAAM,IAAA,wCAAiB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAM,IAAA,wBAAU,EAAC;QAC5B,YAAY;QACZ,IAAI,EAAE,0BAAc,CAAC,KAAK;QAC1B,OAAO,EAAE;YACR,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI;YACxC,WAAW;YACX,QAAQ,EAAE,YAAY;YACtB,UAAU;YACV,KAAK;YACL,WAAW;YACX,GAAG;YACH,YAAY;YACZ,WAAW;YACX,aAAa;YACb,OAAO;YACP,UAAU;YACV,OAAO;YACP,uBAAuB;YACvB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,oBAAS,CAAC,OAAO,CAAC,iBAAiB;YACzD,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,IAAI;YAC9B,OAAO,EAAE,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI;YACxB,qBAAqB,EACpB,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,oBAAS,CAAC,yBAAyB;YAC7D,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE;YACtC,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC;SACjB;QACD,MAAM;KACN,CAAC,CAAC;IACH,OAAO;QACN,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,UAAU,EAAE,GAAG,CAAC,UAAU;KAC1B,CAAC;AACH,CAAC,CAAC;AA3DW,QAAA,mBAAmB,uBA2D9B;AAEF;;GAEG;AACU,QAAA,mBAAmB,GAAG,2BAAmB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChromiumOptions } from '@remotion/renderer/src/open-browser';
|
|
1
2
|
import { LogLevel, StillImageFormat } from 'remotion';
|
|
2
3
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
4
|
import { CostsInfo } from '../shared/constants';
|
|
@@ -16,6 +17,8 @@ export declare type RenderStillOnLambdaInput = {
|
|
|
16
17
|
logLevel?: LogLevel;
|
|
17
18
|
outName?: string;
|
|
18
19
|
timeoutInMilliseconds?: number;
|
|
20
|
+
chromiumOptions?: ChromiumOptions;
|
|
21
|
+
scale?: number;
|
|
19
22
|
};
|
|
20
23
|
export declare type RenderStillOnLambdaOutput = {
|
|
21
24
|
estimatedPrice: CostsInfo;
|
|
@@ -40,5 +43,5 @@ export declare type RenderStillOnLambdaOutput = {
|
|
|
40
43
|
* @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
|
|
41
44
|
* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
|
|
42
45
|
*/
|
|
43
|
-
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
46
|
+
export declare const renderStillOnLambda: ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, }: RenderStillOnLambdaInput) => Promise<RenderStillOnLambdaOutput>;
|
|
44
47
|
//# sourceMappingURL=render-still-on-lambda.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-still-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render-still-on-lambda.d.ts","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAC,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAY,QAAQ,EAAE,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EACN,SAAS,EAGT,MAAM,qBAAqB,CAAC;AAG7B,oBAAY,wBAAwB,GAAG;IACtC,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,OAAO,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,cAAc,EAAE,SAAS,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,mBAAmB,mMAiB7B,wBAAwB,KAAG,QAAQ,yBAAyB,CAiC9D,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderStillOnLambda = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
4
5
|
const remotion_1 = require("remotion");
|
|
5
6
|
const call_lambda_1 = require("../shared/call-lambda");
|
|
6
7
|
const constants_1 = require("../shared/constants");
|
|
@@ -21,8 +22,9 @@ const convert_to_serve_url_1 = require("../shared/convert-to-serve-url");
|
|
|
21
22
|
* @param params.privacy Whether the item in the S3 bucket should be public. Possible values: `"private"` and `"public"`
|
|
22
23
|
* @returns {Promise<RenderStillOnLambdaOutput>} See documentation for exact response structure.
|
|
23
24
|
*/
|
|
24
|
-
const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, }) => {
|
|
25
|
+
const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFormat, envVariables, quality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, }) => {
|
|
25
26
|
const realServeUrl = await (0, convert_to_serve_url_1.convertToServeUrl)(serveUrl, region);
|
|
27
|
+
renderer_1.RenderInternals.validateScale(scale);
|
|
26
28
|
const res = await (0, call_lambda_1.callLambda)({
|
|
27
29
|
functionName,
|
|
28
30
|
type: constants_1.LambdaRoutines.still,
|
|
@@ -37,9 +39,11 @@ const renderStillOnLambda = async ({ functionName, serveUrl, inputProps, imageFo
|
|
|
37
39
|
frame: frame !== null && frame !== void 0 ? frame : 0,
|
|
38
40
|
privacy,
|
|
39
41
|
attempt: 1,
|
|
40
|
-
logLevel,
|
|
42
|
+
logLevel: logLevel !== null && logLevel !== void 0 ? logLevel : remotion_1.Internals.Logging.DEFAULT_LOG_LEVEL,
|
|
41
43
|
outName: outName !== null && outName !== void 0 ? outName : null,
|
|
42
44
|
timeoutInMilliseconds: timeoutInMilliseconds !== null && timeoutInMilliseconds !== void 0 ? timeoutInMilliseconds : remotion_1.Internals.DEFAULT_PUPPETEER_TIMEOUT,
|
|
45
|
+
chromiumOptions: chromiumOptions !== null && chromiumOptions !== void 0 ? chromiumOptions : {},
|
|
46
|
+
scale: scale !== null && scale !== void 0 ? scale : 1,
|
|
43
47
|
},
|
|
44
48
|
region,
|
|
45
49
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-still-on-lambda.js","sourceRoot":"","sources":["../../src/api/render-still-on-lambda.ts"],"names":[],"mappings":";;;AAAA,uCAA+D;AAE/D,uDAAiD;AACjD,mDAI6B;AAC7B,yEAAiE;
|
|
1
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K,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC;SACjB;QACD,MAAM;KACN,CAAC,CAAC;IACH,OAAO;QACN,cAAc,EAAE,GAAG,CAAC,cAAc;QAClC,GAAG,EAAE,GAAG,CAAC,MAAM;QACf,WAAW,EAAE,GAAG,CAAC,IAAI;QACrB,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ;KACtB,CAAC;AACH,CAAC,CAAC;AAlDW,QAAA,mBAAmB,uBAkD9B"}
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import minimist from 'minimist';
|
|
2
2
|
import { AwsRegion } from '../pricing/aws-regions';
|
|
3
3
|
import { Privacy } from '../shared/constants';
|
|
4
|
+
import { LambdaArchitecture } from '../shared/validate-architecture';
|
|
4
5
|
declare type LambdaCommandLineOptions = {
|
|
5
6
|
help: boolean;
|
|
6
7
|
region: AwsRegion;
|
|
@@ -17,6 +18,7 @@ declare type LambdaCommandLineOptions = {
|
|
|
17
18
|
['disable-cloudwatch']: boolean;
|
|
18
19
|
['max-retries']: number;
|
|
19
20
|
['out-name']: string | undefined;
|
|
21
|
+
['architecture']: LambdaArchitecture;
|
|
20
22
|
privacy: Privacy;
|
|
21
23
|
};
|
|
22
24
|
export declare const parsedLambdaCli: LambdaCommandLineOptions & minimist.ParsedArgs;
|
package/dist/cli/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AAEnE,aAAK,wBAAwB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC7B,CAAC,EAAE,OAAO,CAAC;IACX,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,EAAE,OAAO,CAAC;IAEX,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACxC,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC/B,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAChC,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IACxB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,CAAC,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACrC,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,eAAe,gDAK3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAIZ,CAAC"}
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA2C;AAC3C,wDAAgC;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA2C;AAC3C,wDAAgC;AA0BnB,QAAA,eAAe,GAAG,IAAA,kBAAQ,EACtC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB;IACC,OAAO,EAAE,kBAAY,CAAC,YAAY;CAClC,CACD,CAAC;AAEW,QAAA,iBAAiB,GAC7B,uBAAe,CAAC,CAAC;IACjB,uBAAe,CAAC,KAAK;IACrB,uBAAe,CAAC,GAAG;IACnB,uBAAe,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/functions/deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/functions/deploy.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,2BAA2B,WAAW,CAAC;AAEpD,eAAO,MAAM,yBAAyB,qBAiDrC,CAAC"}
|
|
@@ -5,29 +5,33 @@ const cli_1 = require("@remotion/cli");
|
|
|
5
5
|
const log_1 = require("@remotion/cli/dist/log");
|
|
6
6
|
const deploy_function_1 = require("../../../api/deploy-function");
|
|
7
7
|
const constants_1 = require("../../../shared/constants");
|
|
8
|
+
const validate_architecture_1 = require("../../../shared/validate-architecture");
|
|
8
9
|
const validate_memory_size_1 = require("../../../shared/validate-memory-size");
|
|
9
10
|
const validate_timeout_1 = require("../../../shared/validate-timeout");
|
|
10
11
|
const args_1 = require("../../args");
|
|
11
12
|
const get_aws_region_1 = require("../../get-aws-region");
|
|
12
13
|
exports.FUNCTIONS_DEPLOY_SUBCOMMAND = 'deploy';
|
|
13
14
|
const functionsDeploySubcommand = async () => {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
+
var _a, _b, _c, _d;
|
|
15
16
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
16
17
|
const timeoutInSeconds = (_a = args_1.parsedLambdaCli.timeout) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_TIMEOUT;
|
|
17
18
|
const memorySizeInMb = (_b = args_1.parsedLambdaCli.memory) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MEMORY_SIZE;
|
|
19
|
+
const architecture = (_c = args_1.parsedLambdaCli.architecture) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_ARCHITECTURE;
|
|
18
20
|
const createCloudWatchLogGroup = !args_1.parsedLambdaCli['disable-cloudwatch'];
|
|
19
|
-
const cloudWatchLogRetentionPeriodInDays = (
|
|
21
|
+
const cloudWatchLogRetentionPeriodInDays = (_d = args_1.parsedLambdaCli['retention-period']) !== null && _d !== void 0 ? _d : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD;
|
|
20
22
|
(0, validate_memory_size_1.validateMemorySize)(memorySizeInMb);
|
|
21
23
|
(0, validate_timeout_1.validateTimeout)(timeoutInSeconds);
|
|
24
|
+
(0, validate_architecture_1.validateArchitecture)(architecture);
|
|
22
25
|
if (!cli_1.CliInternals.quietFlagProvided()) {
|
|
23
26
|
log_1.Log.info(cli_1.CliInternals.chalk.gray(`
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
Region = ${region}
|
|
28
|
+
Memory = ${memorySizeInMb}MB
|
|
29
|
+
Timeout = ${timeoutInSeconds}sec
|
|
30
|
+
Version = ${constants_1.CURRENT_VERSION}
|
|
31
|
+
Architecture = ${architecture}
|
|
32
|
+
CloudWatch Logging Enabled = ${createCloudWatchLogGroup}
|
|
33
|
+
CloudWatch Retention Period = ${cloudWatchLogRetentionPeriodInDays} days
|
|
34
|
+
`.trim()));
|
|
31
35
|
}
|
|
32
36
|
const output = cli_1.CliInternals.createOverwriteableCliOutput(cli_1.CliInternals.quietFlagProvided());
|
|
33
37
|
output.update('Deploying Lambda...');
|
|
@@ -37,6 +41,7 @@ const functionsDeploySubcommand = async () => {
|
|
|
37
41
|
timeoutInSeconds,
|
|
38
42
|
memorySizeInMb,
|
|
39
43
|
cloudWatchLogRetentionPeriodInDays,
|
|
44
|
+
architecture,
|
|
40
45
|
});
|
|
41
46
|
if (cli_1.CliInternals.quietFlagProvided()) {
|
|
42
47
|
log_1.Log.info(functionName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../../src/cli/commands/functions/deploy.ts"],"names":[],"mappings":";;;AAAA,uCAA2C;AAC3C,gDAA2C;AAC3C,kEAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../../../src/cli/commands/functions/deploy.ts"],"names":[],"mappings":";;;AAAA,uCAA2C;AAC3C,gDAA2C;AAC3C,kEAA4D;AAC5D,yDAMmC;AACnC,iFAA2E;AAC3E,+EAAwE;AACxE,uEAAiE;AACjE,qCAA2C;AAC3C,yDAAkD;AAErC,QAAA,2BAA2B,GAAG,QAAQ,CAAC;AAE7C,MAAM,yBAAyB,GAAG,KAAK,IAAI,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,6BAAY,GAAE,CAAC;IAC9B,MAAM,gBAAgB,GAAG,MAAA,sBAAe,CAAC,OAAO,mCAAI,2BAAe,CAAC;IACpE,MAAM,cAAc,GAAG,MAAA,sBAAe,CAAC,MAAM,mCAAI,+BAAmB,CAAC;IACrE,MAAM,YAAY,GAAG,MAAA,sBAAe,CAAC,YAAY,mCAAI,gCAAoB,CAAC;IAC1E,MAAM,wBAAwB,GAAG,CAAC,sBAAe,CAAC,oBAAoB,CAAC,CAAC;IACxE,MAAM,kCAAkC,GACvC,MAAA,sBAAe,CAAC,kBAAkB,CAAC,mCAAI,+CAAmC,CAAC;IAE5E,IAAA,yCAAkB,EAAC,cAAc,CAAC,CAAC;IACnC,IAAA,kCAAe,EAAC,gBAAgB,CAAC,CAAC;IAClC,IAAA,4CAAoB,EAAC,YAAY,CAAC,CAAC;IACnC,IAAI,CAAC,kBAAY,CAAC,iBAAiB,EAAE,EAAE;QACtC,SAAG,CAAC,IAAI,CACP,kBAAY,CAAC,KAAK,CAAC,IAAI,CACtB;WACO,MAAM;WACN,cAAc;YACb,gBAAgB;YAChB,2BAAe;iBACV,YAAY;+BACE,wBAAwB;gCACvB,kCAAkC;KAC7D,CAAC,IAAI,EAAE,CACR,CACD,CAAC;KACF;IAED,MAAM,MAAM,GAAG,kBAAY,CAAC,4BAA4B,CACvD,kBAAY,CAAC,iBAAiB,EAAE,CAChC,CAAC;IACF,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACrC,MAAM,EAAC,YAAY,EAAE,cAAc,EAAC,GAAG,MAAM,IAAA,gCAAc,EAAC;QAC3D,wBAAwB;QACxB,MAAM;QACN,gBAAgB;QAChB,cAAc;QACd,kCAAkC;QAClC,YAAY;KACZ,CAAC,CAAC;IACH,IAAI,kBAAY,CAAC,iBAAiB,EAAE,EAAE;QACrC,SAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KACvB;IAED,IAAI,cAAc,EAAE;QACnB,MAAM,CAAC,MAAM,CAAC,qBAAqB,YAAY,IAAI,CAAC,CAAC;KACrD;SAAM;QACN,MAAM,CAAC,MAAM,CAAC,eAAe,YAAY,IAAI,CAAC,CAAC;KAC/C;AACF,CAAC,CAAC;AAjDW,QAAA,yBAAyB,6BAiDpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/render/render.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,cAAc,WAAW,CAAC;AAEvC,eAAO,MAAM,aAAa,SAAgB,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/render/render.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,cAAc,WAAW,CAAC;AAEvC,eAAO,MAAM,aAAa,SAAgB,MAAM,EAAE,kBA6NjD,CAAC"}
|