@remotion/lambda 4.0.0-oops.3 → 4.0.0-spawn.10
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 +3 -3
- package/dist/api/clean-items.js +2 -5
- package/dist/api/create-function.d.ts +2 -1
- package/dist/api/create-function.js +3 -2
- package/dist/api/deploy-function.d.ts +1 -0
- package/dist/api/deploy-function.js +3 -0
- package/dist/api/get-aws-client.js +5 -1
- package/dist/api/upload-dir.js +2 -2
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/commands/functions/deploy.js +6 -2
- package/dist/cli/index.js +10 -0
- package/dist/defaults.js +5 -1
- package/dist/functions/helpers/concat-videos.js +5 -1
- package/dist/functions/helpers/get-browser-instance.js +3 -1
- package/dist/functions/helpers/get-files-to-delete.js +2 -2
- package/dist/functions/helpers/get-progress.js +2 -1
- package/dist/functions/helpers/io.js +5 -0
- package/dist/functions/helpers/validate-composition.d.ts +7 -3
- package/dist/functions/helpers/validate-composition.js +5 -1
- package/dist/functions/launch.js +4 -0
- package/dist/functions/renderer.js +3 -0
- package/dist/functions/still.js +5 -0
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/constants.js +1 -1
- package/dist/shared/hosted-layers.js +60 -60
- package/dist/shared/p-limit.d.ts +1 -0
- package/dist/shared/p-limit.js +57 -0
- package/dist/shared/random-hash.d.ts +2 -2
- package/dist/shared/random-hash.js +1 -1
- package/dist/shared/stream-to-string.d.ts +1 -0
- package/dist/shared/validate-custom-role-arn.d.ts +1 -0
- package/dist/shared/validate-custom-role-arn.js +11 -0
- package/dist/shared/validate-frames-per-lambda.js +1 -1
- package/package.json +10 -9
- package/remotionlambda.zip +0 -0
|
@@ -43,14 +43,14 @@ const makeLayerPublic = async () => {
|
|
|
43
43
|
const { Version, LayerArn } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.PublishLayerVersionCommand({
|
|
44
44
|
Content: {
|
|
45
45
|
S3Bucket: 'remotionlambda-binaries-' + region,
|
|
46
|
-
S3Key: `remotion-layer-${layer}-
|
|
46
|
+
S3Key: `remotion-layer-${layer}-v5-${architecture}.zip`,
|
|
47
47
|
},
|
|
48
48
|
LayerName: layerName,
|
|
49
49
|
LicenseInfo: layer === 'chromium'
|
|
50
|
-
? '
|
|
50
|
+
? 'Chromium 101, compiled from source. Read Chromium License: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/LICENSE'
|
|
51
51
|
: layer === 'ffmpeg'
|
|
52
52
|
? 'Compiled from FFMPEG source. Read FFMPEG license: https://ffmpeg.org/legal.html'
|
|
53
|
-
: 'Contains
|
|
53
|
+
: 'Contains Amazon Linux .so files and Noto Sans font. Read Noto Sans License: https://fonts.google.com/noto/specimen/Noto+Sans/about',
|
|
54
54
|
CompatibleRuntimes: runtimes,
|
|
55
55
|
Description: constants_1.CURRENT_VERSION,
|
|
56
56
|
}));
|
package/dist/api/clean-items.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.cleanItems = void 0;
|
|
7
4
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
8
|
-
const p_limit_1 = __importDefault(require("p-limit"));
|
|
9
5
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
10
|
-
const
|
|
6
|
+
const p_limit_1 = require("../shared/p-limit");
|
|
7
|
+
const limit = (0, p_limit_1.pLimit)(10);
|
|
11
8
|
const cleanItems = async ({ bucket, onAfterItemDeleted, onBeforeItemDeleted, region, list, }) => {
|
|
12
9
|
return Promise.all(list.map((object) => limit(async () => {
|
|
13
10
|
onBeforeItemDeleted({
|
|
@@ -1,6 +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, ephemerealStorageInMb, }: {
|
|
3
|
+
export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, architecture, ephemerealStorageInMb, customRoleArn, }: {
|
|
4
4
|
createCloudWatchLogGroup: boolean;
|
|
5
5
|
region: AwsRegion;
|
|
6
6
|
zipFile: string;
|
|
@@ -12,6 +12,7 @@ export declare const createFunction: ({ createCloudWatchLogGroup, region, zipFil
|
|
|
12
12
|
retentionInDays: number;
|
|
13
13
|
ephemerealStorageInMb: number;
|
|
14
14
|
architecture: LambdaArchitecture;
|
|
15
|
+
customRoleArn: string;
|
|
15
16
|
}) => Promise<{
|
|
16
17
|
FunctionName: string;
|
|
17
18
|
}>;
|
|
@@ -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, architecture, ephemerealStorageInMb, }) => {
|
|
11
|
+
const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, functionName, accountId, memorySizeInMb, timeoutInSeconds, alreadyCreated, retentionInDays, architecture, ephemerealStorageInMb, customRoleArn, }) => {
|
|
12
12
|
if (createCloudWatchLogGroup) {
|
|
13
13
|
try {
|
|
14
14
|
await (0, aws_clients_1.getCloudWatchLogsClient)(region).send(new client_cloudwatch_logs_1.CreateLogGroupCommand({
|
|
@@ -29,13 +29,14 @@ const createFunction = async ({ createCloudWatchLogGroup, region, zipFile, funct
|
|
|
29
29
|
if (alreadyCreated) {
|
|
30
30
|
return { FunctionName: functionName };
|
|
31
31
|
}
|
|
32
|
+
const defaultRoleName = `arn:aws:iam::${accountId}:role/${suggested_policy_1.ROLE_NAME}`;
|
|
32
33
|
const { FunctionName } = await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.CreateFunctionCommand({
|
|
33
34
|
Code: {
|
|
34
35
|
ZipFile: (0, fs_1.readFileSync)(zipFile),
|
|
35
36
|
},
|
|
36
37
|
FunctionName: functionName,
|
|
37
38
|
Handler: 'index.handler',
|
|
38
|
-
Role:
|
|
39
|
+
Role: customRoleArn !== null && customRoleArn !== void 0 ? customRoleArn : defaultRoleName,
|
|
39
40
|
Runtime: 'nodejs14.x',
|
|
40
41
|
Description: 'Renders a Remotion video.',
|
|
41
42
|
MemorySize: memorySizeInMb,
|
|
@@ -7,6 +7,7 @@ const function_zip_path_1 = require("../shared/function-zip-path");
|
|
|
7
7
|
const get_account_id_1 = require("../shared/get-account-id");
|
|
8
8
|
const validate_architecture_1 = require("../shared/validate-architecture");
|
|
9
9
|
const validate_aws_region_1 = require("../shared/validate-aws-region");
|
|
10
|
+
const validate_custom_role_arn_1 = require("../shared/validate-custom-role-arn");
|
|
10
11
|
const validate_disk_size_in_mb_1 = require("../shared/validate-disk-size-in-mb");
|
|
11
12
|
const validate_memory_size_1 = require("../shared/validate-memory-size");
|
|
12
13
|
const validate_retention_period_1 = require("../shared/validate-retention-period");
|
|
@@ -33,6 +34,7 @@ const deployFunction = async (options) => {
|
|
|
33
34
|
(0, validate_retention_period_1.validateCloudWatchRetentionPeriod)(options.cloudWatchLogRetentionPeriodInDays);
|
|
34
35
|
(0, validate_architecture_1.validateArchitecture)(options.architecture);
|
|
35
36
|
(0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(diskSizeInMb);
|
|
37
|
+
(0, validate_custom_role_arn_1.validateCustomRoleArn)(options.customRoleArn);
|
|
36
38
|
const fnNameRender = [
|
|
37
39
|
`${constants_1.RENDER_FN_PREFIX}${constants_1.CURRENT_VERSION}`,
|
|
38
40
|
`mem${options.memorySizeInMb}mb`,
|
|
@@ -60,6 +62,7 @@ const deployFunction = async (options) => {
|
|
|
60
62
|
alreadyCreated: Boolean(alreadyDeployed),
|
|
61
63
|
architecture: options.architecture,
|
|
62
64
|
ephemerealStorageInMb: diskSizeInMb,
|
|
65
|
+
customRoleArn: options.customRoleArn,
|
|
63
66
|
});
|
|
64
67
|
if (!created.FunctionName) {
|
|
65
68
|
throw new Error('Lambda was created but has no name');
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/api/upload-dir.js
CHANGED
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.uploadDir = exports.getDirFiles = void 0;
|
|
7
7
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
8
8
|
const lib_storage_1 = require("@aws-sdk/lib-storage");
|
|
9
|
-
const bundler_1 = require("@remotion/bundler");
|
|
10
9
|
const fs_1 = require("fs");
|
|
10
|
+
const mime_types_1 = __importDefault(require("mime-types"));
|
|
11
11
|
const path_1 = __importDefault(require("path"));
|
|
12
12
|
const aws_clients_1 = require("../shared/aws-clients");
|
|
13
13
|
const getDirFiles = (entry) => {
|
|
@@ -40,7 +40,7 @@ const uploadDir = async ({ bucket, region, dir, onProgress, folder, privacy, })
|
|
|
40
40
|
const uploads = files.map(async (filePath) => {
|
|
41
41
|
const Key = `${folder}/${path_1.default.relative(dir, filePath.name)}`;
|
|
42
42
|
const Body = (0, fs_1.createReadStream)(filePath.name);
|
|
43
|
-
const ContentType =
|
|
43
|
+
const ContentType = mime_types_1.default.lookup(Key) || 'application/octet-stream';
|
|
44
44
|
const ACL = privacy === 'private' ? 'private' : 'public-read';
|
|
45
45
|
if (filePath.size > 5 * 1024 * 1024) {
|
|
46
46
|
const paralellUploads3 = new lib_storage_1.Upload({
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ declare type LambdaCommandLineOptions = {
|
|
|
21
21
|
['frames-per-lambda']: number;
|
|
22
22
|
['out-name']: string | undefined;
|
|
23
23
|
['architecture']: LambdaArchitecture;
|
|
24
|
+
['custom-role-arn']: string | undefined;
|
|
24
25
|
privacy: Privacy;
|
|
25
26
|
};
|
|
26
27
|
export declare const parsedLambdaCli: LambdaCommandLineOptions & minimist.ParsedArgs;
|
|
@@ -6,6 +6,7 @@ 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
8
|
const validate_architecture_1 = require("../../../shared/validate-architecture");
|
|
9
|
+
const validate_custom_role_arn_1 = require("../../../shared/validate-custom-role-arn");
|
|
9
10
|
const validate_disk_size_in_mb_1 = require("../../../shared/validate-disk-size-in-mb");
|
|
10
11
|
const validate_memory_size_1 = require("../../../shared/validate-memory-size");
|
|
11
12
|
const validate_timeout_1 = require("../../../shared/validate-timeout");
|
|
@@ -13,18 +14,20 @@ const args_1 = require("../../args");
|
|
|
13
14
|
const get_aws_region_1 = require("../../get-aws-region");
|
|
14
15
|
exports.FUNCTIONS_DEPLOY_SUBCOMMAND = 'deploy';
|
|
15
16
|
const functionsDeploySubcommand = async () => {
|
|
16
|
-
var _a, _b, _c, _d, _e;
|
|
17
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17
18
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
18
19
|
const timeoutInSeconds = (_a = args_1.parsedLambdaCli.timeout) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_TIMEOUT;
|
|
19
20
|
const memorySizeInMb = (_b = args_1.parsedLambdaCli.memory) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_MEMORY_SIZE;
|
|
20
21
|
const diskSizeInMb = (_c = args_1.parsedLambdaCli.disk) !== null && _c !== void 0 ? _c : constants_1.DEFAULT_EPHEMERAL_STORAGE_IN_MB;
|
|
21
22
|
const architecture = (_d = args_1.parsedLambdaCli.architecture) !== null && _d !== void 0 ? _d : constants_1.DEFAULT_ARCHITECTURE;
|
|
23
|
+
const customRoleArn = (_e = args_1.parsedLambdaCli['custom-role-arn']) !== null && _e !== void 0 ? _e : undefined;
|
|
22
24
|
const createCloudWatchLogGroup = !args_1.parsedLambdaCli['disable-cloudwatch'];
|
|
23
|
-
const cloudWatchLogRetentionPeriodInDays = (
|
|
25
|
+
const cloudWatchLogRetentionPeriodInDays = (_f = args_1.parsedLambdaCli['retention-period']) !== null && _f !== void 0 ? _f : constants_1.DEFAULT_CLOUDWATCH_RETENTION_PERIOD;
|
|
24
26
|
(0, validate_memory_size_1.validateMemorySize)(memorySizeInMb);
|
|
25
27
|
(0, validate_timeout_1.validateTimeout)(timeoutInSeconds);
|
|
26
28
|
(0, validate_architecture_1.validateArchitecture)(architecture);
|
|
27
29
|
(0, validate_disk_size_in_mb_1.validateDiskSizeInMb)(diskSizeInMb);
|
|
30
|
+
(0, validate_custom_role_arn_1.validateCustomRoleArn)(customRoleArn);
|
|
28
31
|
if (!cli_1.CliInternals.quietFlagProvided()) {
|
|
29
32
|
log_1.Log.info(cli_1.CliInternals.chalk.gray(`
|
|
30
33
|
Region = ${region}
|
|
@@ -47,6 +50,7 @@ CloudWatch Retention Period = ${cloudWatchLogRetentionPeriodInDays} days
|
|
|
47
50
|
cloudWatchLogRetentionPeriodInDays,
|
|
48
51
|
architecture,
|
|
49
52
|
diskSizeInMb,
|
|
53
|
+
customRoleArn,
|
|
50
54
|
});
|
|
51
55
|
if (cli_1.CliInternals.quietFlagProvided()) {
|
|
52
56
|
log_1.Log.info(functionName);
|
package/dist/cli/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.cli = exports.executeCommand = void 0;
|
|
4
4
|
const cli_1 = require("@remotion/cli");
|
|
5
5
|
const suggested_policy_1 = require("../api/iam-validation/suggested-policy");
|
|
6
|
+
const defaults_1 = require("../defaults");
|
|
6
7
|
const check_credentials_1 = require("../shared/check-credentials");
|
|
7
8
|
const docs_url_1 = require("../shared/docs-url");
|
|
8
9
|
const args_1 = require("./args");
|
|
@@ -99,6 +100,15 @@ const executeCommand = async (args) => {
|
|
|
99
100
|
catch (err) {
|
|
100
101
|
const error = err;
|
|
101
102
|
if (error.message.includes('The role defined for the function cannot be assumed by Lambda')) {
|
|
103
|
+
if (args_1.parsedLambdaCli['custom-role-arn']) {
|
|
104
|
+
log_1.Log.error(`
|
|
105
|
+
The role "${args_1.parsedLambdaCli['custom-role-arn']}" does not exist or has the wrong policy assigned to it. Do either:
|
|
106
|
+
- Remove the "--custom-role-arn" parameter and set up Remotion Lambda according to the setup guide
|
|
107
|
+
- Make sure the role has the same policy assigned as the one returned by "npx ${defaults_1.BINARY_NAME} ${policies_1.POLICIES_COMMAND} ${role_1.ROLE_SUBCOMMAND}"
|
|
108
|
+
|
|
109
|
+
Revisit ${docs_url_1.DOCS_URL}/docs/lambda/setup and make sure you set up the role and role policy correctly. Also see the troubleshooting page: ${docs_url_1.DOCS_URL}/docs/lambda/troubleshooting/permissions. The original error message is:
|
|
110
|
+
`.trim());
|
|
111
|
+
}
|
|
102
112
|
log_1.Log.error(`
|
|
103
113
|
The role "${suggested_policy_1.ROLE_NAME}" does not exist in your AWS account or has the wrong policy assigned to it. Common reasons:
|
|
104
114
|
- The name of the role is not "${suggested_policy_1.ROLE_NAME}"
|
package/dist/defaults.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -20,6 +20,7 @@ const waitForLaunched = () => {
|
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
const getBrowserInstance = async (shouldDumpIo, chromiumOptions) => {
|
|
23
|
+
var _a;
|
|
23
24
|
if (launching) {
|
|
24
25
|
await waitForLaunched();
|
|
25
26
|
if (!_browserInstance) {
|
|
@@ -33,8 +34,9 @@ const getBrowserInstance = async (shouldDumpIo, chromiumOptions) => {
|
|
|
33
34
|
launching = true;
|
|
34
35
|
const execPath = await (0, get_chromium_executable_path_1.executablePath)();
|
|
35
36
|
const actualChromiumOptions = {
|
|
36
|
-
gl: 'swiftshader',
|
|
37
37
|
...chromiumOptions,
|
|
38
|
+
// Override the `null` value, which might come from CLI with swANGLE
|
|
39
|
+
gl: (_a = chromiumOptions.gl) !== null && _a !== void 0 ? _a : 'swangle',
|
|
38
40
|
};
|
|
39
41
|
_browserInstance = await (0, renderer_1.openBrowser)('chrome', {
|
|
40
42
|
browserExecutable: execPath,
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getFilesToDelete = void 0;
|
|
4
4
|
const constants_1 = require("../../shared/constants");
|
|
5
5
|
const getFilesToDelete = ({ chunkCount, renderId, }) => {
|
|
6
|
-
const chunks = new Array(chunkCount).fill(true).map((
|
|
6
|
+
const chunks = new Array(chunkCount).fill(true).map((_x, i) => (0, constants_1.chunkKeyForIndex)({
|
|
7
7
|
index: i,
|
|
8
8
|
renderId,
|
|
9
9
|
}));
|
|
10
10
|
const lambdaTimings = new Array(chunkCount)
|
|
11
11
|
.fill(true)
|
|
12
|
-
.map((
|
|
12
|
+
.map((_x, i) => (0, constants_1.lambdaTimingsPrefixForChunk)(renderId, i));
|
|
13
13
|
return [
|
|
14
14
|
{
|
|
15
15
|
name: (0, constants_1.lambdaInitializedPrefix)(renderId),
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getProgress = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const constants_1 = require("../../shared/constants");
|
|
6
|
+
const docs_url_1 = require("../../shared/docs-url");
|
|
6
7
|
const calculate_chunk_times_1 = require("./calculate-chunk-times");
|
|
7
8
|
const calculate_price_from_bucket_1 = require("./calculate-price-from-bucket");
|
|
8
9
|
const expected_out_name_1 = require("./expected-out-name");
|
|
@@ -155,7 +156,7 @@ const getProgress = async ({ bucketName, renderId, expectedBucketOwner, region,
|
|
|
155
156
|
? {
|
|
156
157
|
attempt: 1,
|
|
157
158
|
chunk: null,
|
|
158
|
-
explanation: `The main function timed out after ${timeoutInMiliseconds}ms. Consider increasing the timeout of your function
|
|
159
|
+
explanation: `The main function timed out after ${timeoutInMiliseconds}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`,
|
|
159
160
|
frame: null,
|
|
160
161
|
isFatal: true,
|
|
161
162
|
s3Location: '',
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.lambdaReadFile = exports.lambdaWriteFile = exports.lambdaLs = void 0;
|
|
4
7
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
8
|
+
const mime_types_1 = __importDefault(require("mime-types"));
|
|
5
9
|
const aws_clients_1 = require("../../shared/aws-clients");
|
|
6
10
|
const lambdaLs = async ({ bucketName, prefix, region, expectedBucketOwner, continuationToken, }) => {
|
|
7
11
|
var _a, _b, _c;
|
|
@@ -49,6 +53,7 @@ const lambdaWriteFile = async ({ bucketName, key, body, region, privacy, expecte
|
|
|
49
53
|
Body: body,
|
|
50
54
|
ACL: privacy === 'private' ? 'private' : 'public-read',
|
|
51
55
|
ExpectedBucketOwner: expectedBucketOwner !== null && expectedBucketOwner !== void 0 ? expectedBucketOwner : undefined,
|
|
56
|
+
ContentType: mime_types_1.default.lookup(key) || 'application/octet-stream',
|
|
52
57
|
}));
|
|
53
58
|
};
|
|
54
59
|
exports.lambdaWriteFile = lambdaWriteFile;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { openBrowser } from '@remotion/renderer';
|
|
2
|
-
import { TCompMetadata } from 'remotion';
|
|
1
|
+
import { ChromiumOptions, openBrowser } from '@remotion/renderer';
|
|
2
|
+
import { FfmpegExecutable, TCompMetadata } from 'remotion';
|
|
3
3
|
import { Await } from '../../shared/await';
|
|
4
4
|
declare type ValidateCompositionOptions = {
|
|
5
5
|
serveUrl: string;
|
|
@@ -7,6 +7,10 @@ declare type ValidateCompositionOptions = {
|
|
|
7
7
|
browserInstance: Await<ReturnType<typeof openBrowser>>;
|
|
8
8
|
inputProps: unknown;
|
|
9
9
|
envVariables: Record<string, string> | undefined;
|
|
10
|
+
ffmpegExecutable: FfmpegExecutable;
|
|
11
|
+
timeoutInMilliseconds: number;
|
|
12
|
+
chromiumOptions: ChromiumOptions;
|
|
13
|
+
port: number | null;
|
|
10
14
|
};
|
|
11
|
-
export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, }: ValidateCompositionOptions) => Promise<TCompMetadata>;
|
|
15
|
+
export declare const validateComposition: ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, chromiumOptions, port, }: ValidateCompositionOptions) => Promise<TCompMetadata>;
|
|
12
16
|
export {};
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateComposition = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, }) => {
|
|
5
|
+
const validateComposition = async ({ serveUrl, composition, browserInstance, inputProps, envVariables, timeoutInMilliseconds, ffmpegExecutable, chromiumOptions, port, }) => {
|
|
6
6
|
const compositions = await (0, renderer_1.getCompositions)(serveUrl, {
|
|
7
7
|
puppeteerInstance: browserInstance,
|
|
8
8
|
inputProps: inputProps,
|
|
9
9
|
envVariables,
|
|
10
|
+
ffmpegExecutable,
|
|
11
|
+
timeoutInMilliseconds,
|
|
12
|
+
chromiumOptions,
|
|
13
|
+
port,
|
|
10
14
|
});
|
|
11
15
|
const found = compositions.find((c) => c.id === composition);
|
|
12
16
|
if (!found) {
|
package/dist/functions/launch.js
CHANGED
|
@@ -61,6 +61,10 @@ const innerLaunchHandler = async (params, options) => {
|
|
|
61
61
|
browserInstance,
|
|
62
62
|
inputProps: params.inputProps,
|
|
63
63
|
envVariables: params.envVariables,
|
|
64
|
+
ffmpegExecutable: null,
|
|
65
|
+
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
66
|
+
chromiumOptions: params.chromiumOptions,
|
|
67
|
+
port: null,
|
|
64
68
|
});
|
|
65
69
|
remotion_1.Internals.validateDurationInFrames(comp.durationInFrames, 'passed to <Component />');
|
|
66
70
|
remotion_1.Internals.validateFps(comp.fps, 'passed to <Component />');
|
|
@@ -101,10 +101,13 @@ const renderHandler = async (params, options, logs) => {
|
|
|
101
101
|
proResProfile: params.proResProfile,
|
|
102
102
|
onDownload: (src) => {
|
|
103
103
|
console.log('Downloading', src);
|
|
104
|
+
return () => undefined;
|
|
104
105
|
},
|
|
105
106
|
overwrite: false,
|
|
106
107
|
chromiumOptions: params.chromiumOptions,
|
|
107
108
|
scale: params.scale,
|
|
109
|
+
timeoutInMilliseconds: params.timeoutInMilliseconds,
|
|
110
|
+
port: null,
|
|
108
111
|
});
|
|
109
112
|
const endRendered = Date.now();
|
|
110
113
|
console.log('Adding silent audio, chunk', params.chunk);
|
package/dist/functions/still.js
CHANGED
|
@@ -48,6 +48,10 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
48
48
|
composition: lambdaParams.composition,
|
|
49
49
|
inputProps: lambdaParams.inputProps,
|
|
50
50
|
envVariables: lambdaParams.envVariables,
|
|
51
|
+
ffmpegExecutable: null,
|
|
52
|
+
chromiumOptions: lambdaParams.chromiumOptions,
|
|
53
|
+
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
54
|
+
port: null,
|
|
51
55
|
});
|
|
52
56
|
const renderMetadata = {
|
|
53
57
|
startedDate: Date.now(),
|
|
@@ -91,6 +95,7 @@ const innerStillHandler = async (lambdaParams, renderId, options) => {
|
|
|
91
95
|
quality: lambdaParams.quality,
|
|
92
96
|
chromiumOptions: lambdaParams.chromiumOptions,
|
|
93
97
|
scale: lambdaParams.scale,
|
|
98
|
+
timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,
|
|
94
99
|
});
|
|
95
100
|
const { key: outName, renderBucketName } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, bucketName);
|
|
96
101
|
const { size } = await fs_1.default.promises.stat(outputPath);
|
|
@@ -210,7 +210,7 @@ export declare type RenderMetadata = {
|
|
|
210
210
|
renderId: string;
|
|
211
211
|
outName: OutNameInput | undefined;
|
|
212
212
|
};
|
|
213
|
-
export declare type LambdaVersions = '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
|
|
213
|
+
export declare type LambdaVersions = '2022-05-31' | '2022-05-28' | '2022-05-27' | '2022-05-19' | '2022-05-16' | '2022-05-11' | '2022-05-07' | '2022-05-06' | '2022-05-03' | '2022-04-20' | '2022-04-19' | '2022-04-18' | '2022-04-09' | '2022-04-08' | '2022-04-05' | '2022-04-02' | '2022-03-29' | '2022-03-17' | '2022-03-02' | '2022-03-01' | '2022-02-27' | '2022-02-14' | '2022-02-12' | '2022-02-09' | '2022-02-08' | '2022-02-07' | '2022-02-06' | '2022-02-05' | '2022-02-04' | '2022-02-03' | '2022-01-23' | '2022-01-19' | '2022-01-11' | '2022-01-10' | '2022-01-09' | '2022-01-06' | '2022-01-05' | '2021-12-22' | '2021-12-17' | '2021-12-16' | '2021-12-15' | '2021-12-14' | '2021-12-13' | '2021-12-11' | '2021-12-10' | '2021-12-04' | '2021-11-29' | '2021-11-27' | '2021-11-24' | '2021-11-22' | '2021-11-19' | '2021-11-18' | '2021-11-15' | '2021-11-12' | '2021-11-10' | '2021-11-01' | '2021-10-29' | '2021-10-27' | '2021-10-21' | '2021-10-19' | '2021-10-07' | '2021-10-03' | '2021-10-01' | '2021-09-15' | '2021-09-06' | '2021-08-06' | '2021-07-14' | '2021-07-05' | '2021-07-02' | '2021-06-23' | 'n/a';
|
|
214
214
|
export declare const CURRENT_VERSION: LambdaVersions;
|
|
215
215
|
export declare type PostRenderData = {
|
|
216
216
|
cost: {
|
package/dist/shared/constants.js
CHANGED
|
@@ -84,6 +84,6 @@ var LambdaRoutines;
|
|
|
84
84
|
LambdaRoutines["renderer"] = "renderer";
|
|
85
85
|
LambdaRoutines["still"] = "still";
|
|
86
86
|
})(LambdaRoutines = exports.LambdaRoutines || (exports.LambdaRoutines = {}));
|
|
87
|
-
exports.CURRENT_VERSION = '2022-05-
|
|
87
|
+
exports.CURRENT_VERSION = '2022-05-31';
|
|
88
88
|
exports.LAMBDA_CONCURRENCY_LIMIT_QUOTA = 'L-B99A9384';
|
|
89
89
|
exports.LAMBDA_BURST_LIMIT_QUOTA = 'L-548AE339';
|
|
@@ -7,141 +7,141 @@ exports.hostedLayers = {
|
|
|
7
7
|
'ap-northeast-1': [
|
|
8
8
|
{
|
|
9
9
|
layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
10
|
-
version:
|
|
10
|
+
version: 4,
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
14
|
-
version:
|
|
14
|
+
version: 4,
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
18
|
-
version:
|
|
18
|
+
version: 4,
|
|
19
19
|
},
|
|
20
20
|
],
|
|
21
21
|
'ap-south-1': [
|
|
22
22
|
{
|
|
23
23
|
layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
24
|
-
version:
|
|
24
|
+
version: 4,
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
28
|
-
version:
|
|
28
|
+
version: 4,
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
32
|
-
version:
|
|
32
|
+
version: 4,
|
|
33
33
|
},
|
|
34
34
|
],
|
|
35
35
|
'ap-southeast-1': [
|
|
36
36
|
{
|
|
37
37
|
layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
38
|
-
version:
|
|
38
|
+
version: 4,
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
42
|
-
version:
|
|
42
|
+
version: 4,
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
46
|
-
version:
|
|
46
|
+
version: 4,
|
|
47
47
|
},
|
|
48
48
|
],
|
|
49
49
|
'ap-southeast-2': [
|
|
50
50
|
{
|
|
51
51
|
layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
52
|
-
version:
|
|
52
|
+
version: 4,
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
56
|
-
version:
|
|
56
|
+
version: 4,
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
60
|
-
version:
|
|
60
|
+
version: 4,
|
|
61
61
|
},
|
|
62
62
|
],
|
|
63
63
|
'eu-central-1': [
|
|
64
64
|
{
|
|
65
65
|
layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
66
|
-
version:
|
|
66
|
+
version: 4,
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
70
|
-
version:
|
|
70
|
+
version: 4,
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
74
|
-
version:
|
|
74
|
+
version: 4,
|
|
75
75
|
},
|
|
76
76
|
],
|
|
77
77
|
'eu-west-1': [
|
|
78
78
|
{
|
|
79
79
|
layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
80
|
-
version:
|
|
80
|
+
version: 4,
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
84
|
-
version:
|
|
84
|
+
version: 4,
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
88
|
-
version:
|
|
88
|
+
version: 4,
|
|
89
89
|
},
|
|
90
90
|
],
|
|
91
91
|
'eu-west-2': [
|
|
92
92
|
{
|
|
93
93
|
layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
94
|
-
version:
|
|
94
|
+
version: 4,
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
98
|
-
version:
|
|
98
|
+
version: 4,
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
102
|
-
version:
|
|
102
|
+
version: 4,
|
|
103
103
|
},
|
|
104
104
|
],
|
|
105
105
|
'us-east-1': [
|
|
106
106
|
{
|
|
107
107
|
layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
108
|
-
version:
|
|
108
|
+
version: 8,
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
112
|
-
version:
|
|
112
|
+
version: 8,
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
116
|
-
version:
|
|
116
|
+
version: 8,
|
|
117
117
|
},
|
|
118
118
|
],
|
|
119
119
|
'us-east-2': [
|
|
120
120
|
{
|
|
121
121
|
layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
122
|
-
version:
|
|
122
|
+
version: 4,
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
126
|
-
version:
|
|
126
|
+
version: 4,
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
130
|
-
version:
|
|
130
|
+
version: 4,
|
|
131
131
|
},
|
|
132
132
|
],
|
|
133
133
|
'us-west-2': [
|
|
134
134
|
{
|
|
135
135
|
layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-remotion-arm64',
|
|
136
|
-
version:
|
|
136
|
+
version: 4,
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-ffmpeg-arm64',
|
|
140
|
-
version:
|
|
140
|
+
version: 4,
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-chromium-arm64',
|
|
144
|
-
version:
|
|
144
|
+
version: 4,
|
|
145
145
|
},
|
|
146
146
|
],
|
|
147
147
|
},
|
|
@@ -149,141 +149,141 @@ exports.hostedLayers = {
|
|
|
149
149
|
'ap-northeast-1': [
|
|
150
150
|
{
|
|
151
151
|
layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
152
|
-
version:
|
|
152
|
+
version: 4,
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
156
|
-
version:
|
|
156
|
+
version: 4,
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
159
|
layerArn: 'arn:aws:lambda:ap-northeast-1:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
160
|
-
version:
|
|
160
|
+
version: 4,
|
|
161
161
|
},
|
|
162
162
|
],
|
|
163
163
|
'ap-south-1': [
|
|
164
164
|
{
|
|
165
165
|
layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
166
|
-
version:
|
|
166
|
+
version: 4,
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
170
|
-
version:
|
|
170
|
+
version: 4,
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
layerArn: 'arn:aws:lambda:ap-south-1:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
174
|
-
version:
|
|
174
|
+
version: 4,
|
|
175
175
|
},
|
|
176
176
|
],
|
|
177
177
|
'ap-southeast-1': [
|
|
178
178
|
{
|
|
179
179
|
layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
180
|
-
version:
|
|
180
|
+
version: 4,
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
184
|
-
version:
|
|
184
|
+
version: 4,
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
layerArn: 'arn:aws:lambda:ap-southeast-1:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
188
|
-
version:
|
|
188
|
+
version: 4,
|
|
189
189
|
},
|
|
190
190
|
],
|
|
191
191
|
'ap-southeast-2': [
|
|
192
192
|
{
|
|
193
193
|
layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
194
|
-
version:
|
|
194
|
+
version: 4,
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
198
|
-
version:
|
|
198
|
+
version: 4,
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
layerArn: 'arn:aws:lambda:ap-southeast-2:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
202
|
-
version:
|
|
202
|
+
version: 4,
|
|
203
203
|
},
|
|
204
204
|
],
|
|
205
205
|
'eu-central-1': [
|
|
206
206
|
{
|
|
207
207
|
layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
208
|
-
version:
|
|
208
|
+
version: 4,
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
212
|
-
version:
|
|
212
|
+
version: 4,
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
layerArn: 'arn:aws:lambda:eu-central-1:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
216
|
-
version:
|
|
216
|
+
version: 4,
|
|
217
217
|
},
|
|
218
218
|
],
|
|
219
219
|
'eu-west-1': [
|
|
220
220
|
{
|
|
221
221
|
layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
222
|
-
version:
|
|
222
|
+
version: 4,
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
226
|
-
version:
|
|
226
|
+
version: 4,
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
layerArn: 'arn:aws:lambda:eu-west-1:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
230
|
-
version:
|
|
230
|
+
version: 4,
|
|
231
231
|
},
|
|
232
232
|
],
|
|
233
233
|
'eu-west-2': [
|
|
234
234
|
{
|
|
235
235
|
layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
236
|
-
version:
|
|
236
|
+
version: 4,
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
239
|
layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
240
|
-
version:
|
|
240
|
+
version: 4,
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
layerArn: 'arn:aws:lambda:eu-west-2:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
244
|
-
version:
|
|
244
|
+
version: 4,
|
|
245
245
|
},
|
|
246
246
|
],
|
|
247
247
|
'us-east-1': [
|
|
248
248
|
{
|
|
249
249
|
layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
250
|
-
version:
|
|
250
|
+
version: 8,
|
|
251
251
|
},
|
|
252
252
|
{
|
|
253
253
|
layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
254
|
-
version:
|
|
254
|
+
version: 8,
|
|
255
255
|
},
|
|
256
256
|
{
|
|
257
257
|
layerArn: 'arn:aws:lambda:us-east-1:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
258
|
-
version:
|
|
258
|
+
version: 8,
|
|
259
259
|
},
|
|
260
260
|
],
|
|
261
261
|
'us-east-2': [
|
|
262
262
|
{
|
|
263
263
|
layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
264
|
-
version:
|
|
264
|
+
version: 4,
|
|
265
265
|
},
|
|
266
266
|
{
|
|
267
267
|
layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
268
|
-
version:
|
|
268
|
+
version: 4,
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
layerArn: 'arn:aws:lambda:us-east-2:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
272
|
-
version:
|
|
272
|
+
version: 4,
|
|
273
273
|
},
|
|
274
274
|
],
|
|
275
275
|
'us-west-2': [
|
|
276
276
|
{
|
|
277
277
|
layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-remotion-x86_64',
|
|
278
|
-
version:
|
|
278
|
+
version: 4,
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-ffmpeg-x86_64',
|
|
282
|
-
version:
|
|
282
|
+
version: 4,
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
layerArn: 'arn:aws:lambda:us-west-2:678892195805:layer:remotion-binaries-chromium-x86_64',
|
|
286
|
-
version:
|
|
286
|
+
version: 4,
|
|
287
287
|
},
|
|
288
288
|
],
|
|
289
289
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pLimit: (concurrency: number) => <Arguments extends unknown[], ReturnType_1>(fn: (..._arguments: Arguments) => ReturnType_1 | PromiseLike<ReturnType_1>, ...args: Arguments) => Promise<ReturnType_1>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pLimit = void 0;
|
|
4
|
+
const pLimit = (concurrency) => {
|
|
5
|
+
const queue = [];
|
|
6
|
+
let activeCount = 0;
|
|
7
|
+
const next = () => {
|
|
8
|
+
var _a;
|
|
9
|
+
activeCount--;
|
|
10
|
+
if (queue.length > 0) {
|
|
11
|
+
(_a = queue.shift()) === null || _a === void 0 ? void 0 : _a();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const run = async (fn, resolve, ...args) => {
|
|
15
|
+
activeCount++;
|
|
16
|
+
// eslint-disable-next-line require-await
|
|
17
|
+
const result = (async () => fn(...args))();
|
|
18
|
+
resolve(result);
|
|
19
|
+
try {
|
|
20
|
+
await result;
|
|
21
|
+
}
|
|
22
|
+
catch (_a) { }
|
|
23
|
+
next();
|
|
24
|
+
};
|
|
25
|
+
const enqueue = (fn, resolve, ...args) => {
|
|
26
|
+
queue.push(() => run(fn, resolve, ...args));
|
|
27
|
+
(async () => {
|
|
28
|
+
var _a;
|
|
29
|
+
// This function needs to wait until the next microtask before comparing
|
|
30
|
+
// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously
|
|
31
|
+
// when the run function is dequeued and called. The comparison in the if-statement
|
|
32
|
+
// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.
|
|
33
|
+
await Promise.resolve();
|
|
34
|
+
if (activeCount < concurrency && queue.length > 0) {
|
|
35
|
+
(_a = queue.shift()) === null || _a === void 0 ? void 0 : _a();
|
|
36
|
+
}
|
|
37
|
+
})();
|
|
38
|
+
};
|
|
39
|
+
const generator = (fn, ...args) => new Promise((resolve) => {
|
|
40
|
+
enqueue(fn, resolve, ...args);
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperties(generator, {
|
|
43
|
+
activeCount: {
|
|
44
|
+
get: () => activeCount,
|
|
45
|
+
},
|
|
46
|
+
pendingCount: {
|
|
47
|
+
get: () => queue.length,
|
|
48
|
+
},
|
|
49
|
+
clearQueue: {
|
|
50
|
+
value: () => {
|
|
51
|
+
queue.length = 0;
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
return generator;
|
|
56
|
+
};
|
|
57
|
+
exports.pLimit = pLimit;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const randomHash: (
|
|
1
|
+
export declare const randomHash: (_options?: {
|
|
2
2
|
randomInTests: boolean;
|
|
3
|
-
}
|
|
3
|
+
}) => string;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.randomHash = void 0;
|
|
4
4
|
const alphabet = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
-
const randomHash = (
|
|
6
|
+
const randomHash = (_options) => {
|
|
7
7
|
return new Array(10)
|
|
8
8
|
.fill(1)
|
|
9
9
|
.map(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateCustomRoleArn: (customRoleArn: unknown) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateCustomRoleArn = void 0;
|
|
4
|
+
const validateCustomRoleArn = (customRoleArn) => {
|
|
5
|
+
if (typeof customRoleArn !== 'undefined' &&
|
|
6
|
+
typeof customRoleArn !== 'string') {
|
|
7
|
+
throw new TypeError('A custom role ARN must either be "undefined" or a string, but instead got: ' +
|
|
8
|
+
JSON.stringify(customRoleArn));
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
exports.validateCustomRoleArn = validateCustomRoleArn;
|
|
@@ -22,7 +22,7 @@ const validateFramesPerLambda = (framesPerLambda) => {
|
|
|
22
22
|
throw new TypeError(`'framesPerLambda' needs to be an integer, passed ${framesPerLambda}`);
|
|
23
23
|
}
|
|
24
24
|
if (framesPerLambda < constants_1.MINIMUM_FRAMES_PER_LAMBDA) {
|
|
25
|
-
throw new TypeError(
|
|
25
|
+
throw new TypeError(`The framesPerLambda needs to be at least 4, but is ${framesPerLambda}`);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
exports.validateFramesPerLambda = validateFramesPerLambda;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-spawn.10+911177607",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"@aws-sdk/client-service-quotas": "3.58.0",
|
|
32
32
|
"@aws-sdk/lib-storage": "3.58.0",
|
|
33
33
|
"@aws-sdk/s3-request-presigner": "3.58.0",
|
|
34
|
-
"@remotion/bundler": "4.0.0-
|
|
35
|
-
"@remotion/cli": "4.0.0-
|
|
36
|
-
"@remotion/renderer": "4.0.0-
|
|
34
|
+
"@remotion/bundler": "4.0.0-spawn.10+911177607",
|
|
35
|
+
"@remotion/cli": "4.0.0-spawn.10+911177607",
|
|
36
|
+
"@remotion/renderer": "4.0.0-spawn.10+911177607",
|
|
37
37
|
"aws-policies": "^1.0.1",
|
|
38
38
|
"dotenv": "^10.0.0",
|
|
39
|
+
"mime-types": "2.1.34",
|
|
39
40
|
"minimist": "1.2.6",
|
|
40
|
-
"
|
|
41
|
-
"remotion": "4.0.0-oops.3+31c506229"
|
|
41
|
+
"remotion": "4.0.0-spawn.10+911177607"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=16.8.0",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jonny/eslint-config": "3.0.259",
|
|
49
49
|
"@types/jest": "^27.0.2",
|
|
50
|
+
"@types/mime-types": "2.1.1",
|
|
50
51
|
"@types/minimist": "1.2.2",
|
|
51
52
|
"@types/node": "^14.14.14",
|
|
52
53
|
"@types/prompt": "^1.1.0",
|
|
@@ -56,12 +57,12 @@
|
|
|
56
57
|
"prettier": "^2.4.1",
|
|
57
58
|
"prettier-plugin-organize-imports": "^2.3.4",
|
|
58
59
|
"ts-jest": "^27.0.5",
|
|
59
|
-
"ts-node": "^
|
|
60
|
-
"typescript": "^4.
|
|
60
|
+
"ts-node": "^10.8.0",
|
|
61
|
+
"typescript": "^4.7.0",
|
|
61
62
|
"zip-lib": "^0.7.2"
|
|
62
63
|
},
|
|
63
64
|
"publishConfig": {
|
|
64
65
|
"access": "public"
|
|
65
66
|
},
|
|
66
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "911177607ac127d9f4d1c014ad8ae32fd14947dd"
|
|
67
68
|
}
|
package/remotionlambda.zip
CHANGED
|
Binary file
|