@remotion/lambda 4.0.148 → 4.0.149
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 +1 -2
- package/dist/api/deploy-site.d.ts +3 -3
- package/dist/api/iam-validation/role-permissions.d.ts +1 -3
- package/dist/api/iam-validation/role-permissions.js +12 -13
- package/dist/api/iam-validation/user-permissions.d.ts +1 -2
- package/dist/api/iam-validation/user-permissions.js +28 -29
- package/dist/cli/commands/render/progress.js +11 -19
- package/dist/cli/commands/sites/create.js +21 -12
- package/dist/cli/helpers/progress-bar.js +3 -6
- package/dist/functions/helpers/find-output-file-in-bucket.js +2 -1
- package/dist/functions/helpers/get-current-region.d.ts +1 -1
- package/dist/functions/helpers/io.d.ts +2 -1
- package/dist/functions/helpers/io.js +2 -2
- package/dist/functions/renderer.js +0 -1
- package/dist/internals.d.ts +5 -5
- package/package.json +9 -11
- package/remotionlambda-arm64.zip +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
4
|
-
const aws_policies_1 = require("aws-policies");
|
|
5
4
|
const version_1 = require("remotion/version");
|
|
6
5
|
const get_regions_1 = require("../api/get-regions");
|
|
7
6
|
const quit_1 = require("../cli/helpers/quit");
|
|
@@ -53,7 +52,7 @@ const makeLayerPublic = async () => {
|
|
|
53
52
|
Description: version_1.VERSION,
|
|
54
53
|
}));
|
|
55
54
|
await (0, aws_clients_1.getLambdaClient)(region).send(new client_lambda_1.AddLayerVersionPermissionCommand({
|
|
56
|
-
Action:
|
|
55
|
+
Action: 'lambda:GetLayerVersion',
|
|
57
56
|
LayerName: layerName,
|
|
58
57
|
Principal: '*',
|
|
59
58
|
VersionNumber: Version,
|
|
@@ -59,11 +59,11 @@ export declare const internalDeploySite: (args_0: MandatoryParameters & {
|
|
|
59
59
|
getValue: ({ commandLine }: {
|
|
60
60
|
commandLine: Record<string, unknown>;
|
|
61
61
|
}) => {
|
|
62
|
-
value: "
|
|
62
|
+
value: "verbose" | "info" | "warn" | "error";
|
|
63
63
|
source: string;
|
|
64
64
|
};
|
|
65
|
-
setConfig: (newLogLevel: "
|
|
66
|
-
type: "
|
|
65
|
+
setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
66
|
+
type: "verbose" | "info" | "warn" | "error";
|
|
67
67
|
};
|
|
68
68
|
readonly throwIfSiteExists: {
|
|
69
69
|
cliFlag: string;
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.rolePermissions = void 0;
|
|
4
|
-
const aws_policies_1 = require("aws-policies");
|
|
5
4
|
const constants_1 = require("../../shared/constants");
|
|
6
5
|
exports.rolePermissions = [
|
|
7
6
|
{
|
|
8
|
-
actions: [
|
|
7
|
+
actions: ['s3:ListAllMyBuckets'],
|
|
9
8
|
resource: ['*'],
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
11
|
actions: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
's3:CreateBucket',
|
|
13
|
+
's3:ListBucket',
|
|
14
|
+
's3:PutBucketAcl',
|
|
15
|
+
's3:GetObject',
|
|
16
|
+
's3:DeleteObject',
|
|
17
|
+
's3:PutObjectAcl',
|
|
18
|
+
's3:PutObject',
|
|
19
|
+
's3:GetBucketLocation',
|
|
21
20
|
],
|
|
22
21
|
resource: [`arn:aws:s3:::${constants_1.REMOTION_BUCKET_PREFIX}*`],
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
|
-
actions: [
|
|
24
|
+
actions: ['lambda:InvokeFunction'],
|
|
26
25
|
resource: [`arn:aws:lambda:*:*:function:${constants_1.RENDER_FN_PREFIX}*`],
|
|
27
26
|
},
|
|
28
27
|
{
|
|
29
|
-
actions: [
|
|
28
|
+
actions: ['logs:CreateLogGroup'],
|
|
30
29
|
resource: [`arn:aws:logs:*:*:log-group:${constants_1.LAMBDA_INSIGHTS_PREFIX}`],
|
|
31
30
|
},
|
|
32
31
|
{
|
|
33
|
-
actions: [
|
|
32
|
+
actions: ['logs:CreateLogStream', 'logs:PutLogEvents'],
|
|
34
33
|
resource: [
|
|
35
34
|
`arn:aws:logs:*:*:log-group:${constants_1.LOG_GROUP_PREFIX}${constants_1.RENDER_FN_PREFIX}*`,
|
|
36
35
|
`arn:aws:logs:*:*:log-group:${constants_1.LAMBDA_INSIGHTS_PREFIX}:*`,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { iam, lambda, logs, s3, servicequotas } from 'aws-policies';
|
|
2
1
|
export declare const requiredPermissions: {
|
|
3
|
-
actions:
|
|
2
|
+
actions: string[];
|
|
4
3
|
resource: string[];
|
|
5
4
|
id: string;
|
|
6
5
|
}[];
|
|
@@ -1,81 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requiredPermissions = void 0;
|
|
4
|
-
const aws_policies_1 = require("aws-policies");
|
|
5
4
|
const constants_1 = require("../../shared/constants");
|
|
6
5
|
const hosted_layers_1 = require("../../shared/hosted-layers");
|
|
7
6
|
exports.requiredPermissions = [
|
|
8
7
|
{
|
|
9
8
|
id: 'HandleQuotas',
|
|
10
9
|
actions: [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
'servicequotas:GetServiceQuota',
|
|
11
|
+
'servicequotas:GetAWSDefaultServiceQuota',
|
|
12
|
+
'servicequotas:RequestServiceQuotaIncrease',
|
|
13
|
+
'servicequotas:ListRequestedServiceQuotaChangeHistoryByQuota',
|
|
15
14
|
],
|
|
16
15
|
resource: ['*'],
|
|
17
16
|
},
|
|
18
17
|
{
|
|
19
18
|
id: 'PermissionValidation',
|
|
20
|
-
actions: [
|
|
19
|
+
actions: ['iam:SimulatePrincipalPolicy'],
|
|
21
20
|
resource: ['*'],
|
|
22
21
|
},
|
|
23
22
|
{
|
|
24
23
|
id: 'LambdaInvokation',
|
|
25
|
-
actions: [
|
|
24
|
+
actions: ['iam:PassRole'],
|
|
26
25
|
resource: ['arn:aws:iam::*:role/remotion-lambda-role'],
|
|
27
26
|
},
|
|
28
27
|
{
|
|
29
28
|
id: 'Storage',
|
|
30
29
|
actions: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
's3:GetObject',
|
|
31
|
+
's3:DeleteObject',
|
|
32
|
+
's3:PutObjectAcl',
|
|
33
|
+
's3:PutObject',
|
|
34
|
+
's3:CreateBucket',
|
|
35
|
+
's3:ListBucket',
|
|
36
|
+
's3:GetBucketLocation',
|
|
37
|
+
's3:PutBucketAcl',
|
|
38
|
+
's3:DeleteBucket',
|
|
39
|
+
's3:PutBucketOwnershipControls',
|
|
40
|
+
's3:PutBucketPublicAccessBlock',
|
|
41
|
+
's3:PutLifecycleConfiguration',
|
|
43
42
|
],
|
|
44
43
|
resource: [`arn:aws:s3:::${constants_1.REMOTION_BUCKET_PREFIX}*`],
|
|
45
44
|
},
|
|
46
45
|
{
|
|
47
46
|
id: 'BucketListing',
|
|
48
|
-
actions: [
|
|
47
|
+
actions: ['s3:ListAllMyBuckets'],
|
|
49
48
|
resource: ['*'],
|
|
50
49
|
},
|
|
51
50
|
{
|
|
52
51
|
id: 'FunctionListing',
|
|
53
|
-
actions: [
|
|
52
|
+
actions: ['lambda:ListFunctions', 'lambda:GetFunction'],
|
|
54
53
|
resource: ['*'],
|
|
55
54
|
},
|
|
56
55
|
{
|
|
57
56
|
id: 'FunctionManagement',
|
|
58
57
|
actions: [
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
'lambda:InvokeAsync',
|
|
59
|
+
'lambda:InvokeFunction',
|
|
60
|
+
'lambda:CreateFunction',
|
|
61
|
+
'lambda:DeleteFunction',
|
|
62
|
+
'lambda:PutFunctionEventInvokeConfig',
|
|
64
63
|
'lambda:PutRuntimeManagementConfig',
|
|
65
|
-
|
|
64
|
+
'lambda:TagResource',
|
|
66
65
|
],
|
|
67
66
|
resource: [`arn:aws:lambda:*:*:function:${constants_1.RENDER_FN_PREFIX}*`],
|
|
68
67
|
},
|
|
69
68
|
{
|
|
70
69
|
id: 'LogsRetention',
|
|
71
|
-
actions: [
|
|
70
|
+
actions: ['logs:CreateLogGroup', 'logs:PutRetentionPolicy'],
|
|
72
71
|
resource: [
|
|
73
72
|
`arn:aws:logs:*:*:log-group:${constants_1.LOG_GROUP_PREFIX}${constants_1.RENDER_FN_PREFIX}*`,
|
|
74
73
|
],
|
|
75
74
|
},
|
|
76
75
|
{
|
|
77
76
|
id: 'FetchBinaries',
|
|
78
|
-
actions: [
|
|
77
|
+
actions: ['lambda:GetLayerVersion'],
|
|
79
78
|
resource: [
|
|
80
79
|
hosted_layers_1.REMOTION_HOSTED_LAYER_ARN,
|
|
81
80
|
'arn:aws:lambda:*:580247275435:layer:LambdaInsightsExtension*',
|
|
@@ -5,20 +5,19 @@ const cli_1 = require("@remotion/cli");
|
|
|
5
5
|
const renderer_1 = require("@remotion/renderer");
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
7
|
const truthy_1 = require("../../../shared/truthy");
|
|
8
|
-
const makeInvokeProgress = (invokeProgress,
|
|
8
|
+
const makeInvokeProgress = (invokeProgress, retriesInfo) => {
|
|
9
9
|
const { lambdasInvoked, totalLambdas } = invokeProgress;
|
|
10
10
|
const progress = totalLambdas === null ? 0 : lambdasInvoked / totalLambdas;
|
|
11
11
|
return [
|
|
12
|
-
|
|
12
|
+
`${progress === 0 ? 'Invoked' : 'Invoking'} lambdas`.padEnd(cli_1.CliInternals.LABEL_WIDTH),
|
|
13
13
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
14
|
-
`${progress === 0 ? 'Invoked' : 'Invoking'} lambdas`,
|
|
15
14
|
progress === 1
|
|
16
15
|
? cli_1.CliInternals.chalk.gray('100%')
|
|
17
16
|
: `${Math.round(progress * 100)}%`,
|
|
18
17
|
retriesInfo.length > 0 ? `(+${retriesInfo.length} retries)` : [],
|
|
19
18
|
].join(' ');
|
|
20
19
|
};
|
|
21
|
-
const makeRenderProgress = ({ chunkProgress,
|
|
20
|
+
const makeRenderProgress = ({ chunkProgress, }) => {
|
|
22
21
|
const { chunksEncoded, totalChunks, doneIn } = chunkProgress;
|
|
23
22
|
const renderProgress = chunkProgress.totalFrames === null
|
|
24
23
|
? 0
|
|
@@ -26,26 +25,24 @@ const makeRenderProgress = ({ chunkProgress, totalSteps, }) => {
|
|
|
26
25
|
const encodingProgress = totalChunks === null ? 0 : chunksEncoded / totalChunks;
|
|
27
26
|
const frames = chunkProgress.totalFrames === null
|
|
28
27
|
? null
|
|
29
|
-
:
|
|
28
|
+
: `${chunkProgress.framesRendered}/${chunkProgress.totalFrames}`;
|
|
30
29
|
const first = [
|
|
31
|
-
|
|
30
|
+
(doneIn === null ? 'Rendering frames' : 'Rendered frames').padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
|
|
32
31
|
cli_1.CliInternals.makeProgressBar(renderProgress),
|
|
33
|
-
doneIn === null ? 'Rendering frames' : 'Rendered frames',
|
|
34
32
|
doneIn === null ? frames : cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
|
|
35
33
|
]
|
|
36
34
|
.filter(truthy_1.truthy)
|
|
37
35
|
.join(' ');
|
|
38
36
|
const second = [
|
|
39
|
-
|
|
37
|
+
`${doneIn === null ? 'Encoding' : 'Encoded'} chunks`.padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
|
|
40
38
|
cli_1.CliInternals.makeProgressBar(encodingProgress),
|
|
41
|
-
`${doneIn === null ? 'Encoding' : 'Encoded'} chunks`,
|
|
42
39
|
doneIn === null
|
|
43
40
|
? `${Math.round(encodingProgress * 100)}%`
|
|
44
41
|
: cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
|
|
45
42
|
].join(' ');
|
|
46
43
|
return [first, second];
|
|
47
44
|
};
|
|
48
|
-
const makeEncodingProgress = ({ encodingProgress, chunkProgress,
|
|
45
|
+
const makeEncodingProgress = ({ encodingProgress, chunkProgress, totalFrames, timeToEncode, }) => {
|
|
49
46
|
const { framesEncoded } = encodingProgress;
|
|
50
47
|
const progress = totalFrames === null ? 0 : framesEncoded / totalFrames;
|
|
51
48
|
const chunksDone = chunkProgress.doneIn !== null;
|
|
@@ -54,28 +51,25 @@ const makeEncodingProgress = ({ encodingProgress, chunkProgress, totalSteps, tot
|
|
|
54
51
|
return '';
|
|
55
52
|
}
|
|
56
53
|
return [
|
|
57
|
-
|
|
54
|
+
`${timeToEncode === null ? 'Combining' : 'Combined'} videos`.padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
|
|
58
55
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
59
|
-
`${timeToEncode === null ? 'Combining' : 'Combined'} videos`,
|
|
60
56
|
timeToEncode === null
|
|
61
57
|
? `${Math.round(progress * 100)}%`
|
|
62
58
|
: cli_1.CliInternals.chalk.gray(`${timeToEncode}ms`),
|
|
63
59
|
].join(' ');
|
|
64
60
|
};
|
|
65
|
-
const makeCleanupProgress = (cleanupInfo,
|
|
61
|
+
const makeCleanupProgress = (cleanupInfo, skipped) => {
|
|
66
62
|
if (!cleanupInfo) {
|
|
67
63
|
return '';
|
|
68
64
|
}
|
|
69
65
|
if (skipped) {
|
|
70
66
|
return [
|
|
71
|
-
`(5/${totalSteps})`,
|
|
72
67
|
cli_1.CliInternals.chalk.blueBright(`Not cleaning up because --log=verbose was set`),
|
|
73
68
|
].join(' ');
|
|
74
69
|
}
|
|
75
70
|
const { doneIn, filesDeleted, minFilesToDelete } = cleanupInfo;
|
|
76
71
|
const progress = filesDeleted / minFilesToDelete;
|
|
77
72
|
return [
|
|
78
|
-
`(5/${totalSteps})`,
|
|
79
73
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
80
74
|
`${doneIn === null ? 'Cleaning up' : 'Cleaned up'} artifacts`,
|
|
81
75
|
doneIn === null
|
|
@@ -127,19 +121,17 @@ const makeMultiProgressFromStatus = (status) => {
|
|
|
127
121
|
exports.makeMultiProgressFromStatus = makeMultiProgressFromStatus;
|
|
128
122
|
const makeProgressString = ({ progress, steps, downloadInfo, retriesInfo, logLevel, timeToEncode, totalFrames, }) => {
|
|
129
123
|
return [
|
|
130
|
-
makeInvokeProgress(progress.lambdaInvokeProgress,
|
|
124
|
+
makeInvokeProgress(progress.lambdaInvokeProgress, retriesInfo),
|
|
131
125
|
...makeRenderProgress({
|
|
132
126
|
chunkProgress: progress.chunkProgress,
|
|
133
|
-
totalSteps: steps,
|
|
134
127
|
}),
|
|
135
128
|
makeEncodingProgress({
|
|
136
129
|
encodingProgress: progress.encodingProgress,
|
|
137
130
|
chunkProgress: progress.chunkProgress,
|
|
138
|
-
totalSteps: steps,
|
|
139
131
|
timeToEncode,
|
|
140
132
|
totalFrames,
|
|
141
133
|
}),
|
|
142
|
-
makeCleanupProgress(progress.cleanupInfo,
|
|
134
|
+
makeCleanupProgress(progress.cleanupInfo, logLevel === 'verbose'),
|
|
143
135
|
downloadInfo ? makeDownloadProgress(downloadInfo, steps) : null,
|
|
144
136
|
]
|
|
145
137
|
.filter(no_react_1.NoReactInternals.truthy)
|
|
@@ -60,12 +60,12 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
60
60
|
stats: null,
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
|
-
const updateProgress = () => {
|
|
63
|
+
const updateProgress = (newLine) => {
|
|
64
64
|
progressBar.update([
|
|
65
65
|
(0, progress_bar_1.makeBundleProgress)(multiProgress.bundleProgress),
|
|
66
66
|
(0, progress_bar_1.makeBucketProgress)(multiProgress.bucketProgress),
|
|
67
67
|
(0, progress_bar_1.makeDeployProgressBar)(multiProgress.deployProgress),
|
|
68
|
-
].join('\n'),
|
|
68
|
+
].join('\n'), newLine);
|
|
69
69
|
};
|
|
70
70
|
const bucketStart = Date.now();
|
|
71
71
|
const enableFolderExpiry = folderExpiryOption.getValue({
|
|
@@ -78,7 +78,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
78
78
|
customCredentials: null,
|
|
79
79
|
})).bucketName;
|
|
80
80
|
multiProgress.bucketProgress.doneIn = Date.now() - bucketStart;
|
|
81
|
-
updateProgress();
|
|
81
|
+
updateProgress(false);
|
|
82
82
|
const bundleStart = Date.now();
|
|
83
83
|
let uploadStart = Date.now();
|
|
84
84
|
const publicDir = publicDirOption.getValue({
|
|
@@ -102,7 +102,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
102
102
|
if (progress === 100) {
|
|
103
103
|
uploadStart = Date.now();
|
|
104
104
|
}
|
|
105
|
-
updateProgress();
|
|
105
|
+
updateProgress(false);
|
|
106
106
|
},
|
|
107
107
|
onUploadProgress: (p) => {
|
|
108
108
|
multiProgress.deployProgress = {
|
|
@@ -111,7 +111,7 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
111
111
|
doneIn: null,
|
|
112
112
|
stats: null,
|
|
113
113
|
};
|
|
114
|
-
updateProgress();
|
|
114
|
+
updateProgress(false);
|
|
115
115
|
},
|
|
116
116
|
enableCaching: config_1.ConfigInternals.getWebpackCaching(),
|
|
117
117
|
webpackOverride: (_c = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _c !== void 0 ? _c : ((f) => f),
|
|
@@ -135,14 +135,23 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
135
135
|
untouchedFiles: stats.untouchedFiles,
|
|
136
136
|
},
|
|
137
137
|
};
|
|
138
|
-
updateProgress();
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
updateProgress(true);
|
|
139
|
+
cli_1.CliInternals.printFact('info')({
|
|
140
|
+
indent: false,
|
|
141
|
+
left: 'Serve URL',
|
|
142
|
+
logLevel,
|
|
143
|
+
right: serveUrl,
|
|
144
|
+
color: 'blue',
|
|
145
|
+
});
|
|
146
|
+
cli_1.CliInternals.printFact('info')({
|
|
147
|
+
indent: false,
|
|
148
|
+
left: 'Site name',
|
|
149
|
+
logLevel,
|
|
150
|
+
right: siteName,
|
|
151
|
+
color: 'blue',
|
|
152
|
+
});
|
|
144
153
|
log_1.Log.info({ indent: false, logLevel });
|
|
145
|
-
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.blueBright('ℹ️
|
|
154
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.blueBright('ℹ️ Redeploy your site everytime you make changes to it. You can overwrite the existing site by running:'));
|
|
146
155
|
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.blueBright(['npx remotion lambda sites create', args[0], `--site-name=${siteName}`]
|
|
147
156
|
.filter(no_react_1.NoReactInternals.truthy)
|
|
148
157
|
.join(' ')));
|
|
@@ -5,9 +5,8 @@ const cli_1 = require("@remotion/cli");
|
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
6
|
const makeBundleProgress = ({ progress, doneIn }) => {
|
|
7
7
|
return [
|
|
8
|
-
|
|
8
|
+
`${doneIn === null ? 'Bundling' : 'Bundled'} video`.padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
|
|
9
9
|
cli_1.CliInternals.makeProgressBar(progress / 100),
|
|
10
|
-
`${doneIn === null ? 'Bundling' : 'Bundled'} video`,
|
|
11
10
|
doneIn === null
|
|
12
11
|
? `${Math.round(progress)}%`
|
|
13
12
|
: cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
|
|
@@ -17,9 +16,8 @@ exports.makeBundleProgress = makeBundleProgress;
|
|
|
17
16
|
const makeBucketProgress = ({ doneIn }) => {
|
|
18
17
|
const progress = doneIn === null ? 0 : 1;
|
|
19
18
|
return [
|
|
20
|
-
|
|
19
|
+
`${doneIn === null ? 'Creating' : 'Created'} bucket`.padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
|
|
21
20
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
22
|
-
`${doneIn === null ? 'Creating' : 'Created'} bucket`,
|
|
23
21
|
doneIn === null ? `0/1` : cli_1.CliInternals.chalk.gray(`${doneIn}ms`),
|
|
24
22
|
].join(' ');
|
|
25
23
|
};
|
|
@@ -42,9 +40,8 @@ const makeUploadDiff = ({ stats }) => {
|
|
|
42
40
|
const makeDeployProgressBar = ({ sizeUploaded, totalSize, doneIn, stats, }) => {
|
|
43
41
|
const progress = totalSize === null ? 0 : sizeUploaded / totalSize;
|
|
44
42
|
return [
|
|
45
|
-
|
|
43
|
+
`${doneIn === null ? 'Uploading' : 'Uploaded'} to S3`.padEnd(cli_1.CliInternals.LABEL_WIDTH, ' '),
|
|
46
44
|
cli_1.CliInternals.makeProgressBar(progress),
|
|
47
|
-
`${doneIn === null ? 'Uploading' : 'Uploaded'} to S3`,
|
|
48
45
|
doneIn === null
|
|
49
46
|
? typeof totalSize === 'number'
|
|
50
47
|
? `${cli_1.CliInternals.formatBytes(sizeUploaded)}/${cli_1.CliInternals.formatBytes(totalSize)}`
|
|
@@ -10,12 +10,13 @@ const findOutputFileInBucket = async ({ region, renderMetadata, bucketName, cust
|
|
|
10
10
|
if (!renderMetadata) {
|
|
11
11
|
throw new Error('unexpectedly did not get renderMetadata');
|
|
12
12
|
}
|
|
13
|
-
const { renderBucketName, key } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, bucketName,
|
|
13
|
+
const { renderBucketName, key } = (0, expected_out_name_1.getExpectedOutName)(renderMetadata, bucketName, customCredentials);
|
|
14
14
|
try {
|
|
15
15
|
const head = await (0, io_1.lambdaHeadCommand)({
|
|
16
16
|
bucketName,
|
|
17
17
|
key,
|
|
18
18
|
region,
|
|
19
|
+
customCredentials,
|
|
19
20
|
});
|
|
20
21
|
return {
|
|
21
22
|
lastModified: (_a = head.LastModified) === null || _a === void 0 ? void 0 : _a.getTime(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "
|
|
1
|
+
export declare const getCurrentRegionInFunction: () => "eu-central-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "eu-north-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2" | "af-south-1" | "ap-south-1" | "ap-east-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "me-south-1" | "sa-east-1";
|
|
@@ -42,10 +42,11 @@ export declare const lambdaReadFile: ({ bucketName, key, region, expectedBucketO
|
|
|
42
42
|
region: AwsRegion;
|
|
43
43
|
expectedBucketOwner: string;
|
|
44
44
|
}) => Promise<Readable>;
|
|
45
|
-
export declare const lambdaHeadCommand: ({ bucketName, key, region, }: {
|
|
45
|
+
export declare const lambdaHeadCommand: ({ bucketName, key, region, customCredentials, }: {
|
|
46
46
|
bucketName: string;
|
|
47
47
|
key: string;
|
|
48
48
|
region: AwsRegion;
|
|
49
|
+
customCredentials: CustomCredentials | null;
|
|
49
50
|
}) => Promise<{
|
|
50
51
|
LastModified?: Date | undefined;
|
|
51
52
|
ContentLength?: number | undefined;
|
|
@@ -105,8 +105,8 @@ const lambdaReadFile = async ({ bucketName, key, region, expectedBucketOwner, })
|
|
|
105
105
|
return Body;
|
|
106
106
|
};
|
|
107
107
|
exports.lambdaReadFile = lambdaReadFile;
|
|
108
|
-
const lambdaHeadCommand = async ({ bucketName, key, region, }) => {
|
|
109
|
-
const head = await (0, aws_clients_1.getS3Client)(region,
|
|
108
|
+
const lambdaHeadCommand = async ({ bucketName, key, region, customCredentials, }) => {
|
|
109
|
+
const head = await (0, aws_clients_1.getS3Client)(region, customCredentials).send(new client_s3_1.HeadObjectCommand({
|
|
110
110
|
Bucket: bucketName,
|
|
111
111
|
Key: key,
|
|
112
112
|
}));
|
|
@@ -190,7 +190,6 @@ const renderHandler = async (params, options, logs) => {
|
|
|
190
190
|
serializedResolvedPropsWithCustomSchema: resolvedProps,
|
|
191
191
|
offthreadVideoCacheSizeInBytes: params.offthreadVideoCacheSizeInBytes,
|
|
192
192
|
colorSpace: params.colorSpace,
|
|
193
|
-
finishRenderProgress: () => undefined,
|
|
194
193
|
binariesDirectory: null,
|
|
195
194
|
separateAudioTo: audioOutputLocation,
|
|
196
195
|
forSeamlessAacConcatenation: seamlessAudio,
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const LambdaInternals: {
|
|
2
|
-
executeCommand: (args: string[], remotionRoot: string, logLevel: "
|
|
2
|
+
executeCommand: (args: string[], remotionRoot: string, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
3
3
|
makeLambdaRenderMediaPayload: ({ rendererFunctionName, frameRange, framesPerLambda, forceBucketName: bucketName, codec, composition, serveUrl, imageFormat, inputProps, region, crf, envVariables, pixelFormat, proResProfile, x264Preset, maxRetries, privacy, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, everyNthFrame, numberOfGifLoops, audioBitrate, concurrencyPerLambda, audioCodec, forceHeight, forceWidth, webhook, videoBitrate, encodingMaxRate, encodingBufferSize, downloadBehavior, muted, overwrite, jpegQuality, offthreadVideoCacheSizeInBytes, deleteAfter, colorSpace, preferLossless, }: import("./api/make-lambda-payload").InnerRenderMediaOnLambdaInput) => Promise<import("./defaults").LambdaStartPayload>;
|
|
4
4
|
getRenderProgressPayload: ({ bucketName, renderId, s3OutputProvider, logLevel, }: import(".").GetRenderProgressInput) => import("./defaults").LambdaStatusPayload;
|
|
5
5
|
makeLambdaRenderStillPayload: ({ serveUrl, inputProps, imageFormat, envVariables, quality, jpegQuality, region, maxRetries, composition, privacy, frame, logLevel, outName, timeoutInMilliseconds, chromiumOptions, scale, downloadBehavior, forceHeight, forceWidth, forceBucketName, offthreadVideoCacheSizeInBytes, deleteAfter, }: import("./api/render-still-on-lambda").RenderStillOnLambdaNonNullInput) => Promise<{
|
|
@@ -14,7 +14,7 @@ export declare const LambdaInternals: {
|
|
|
14
14
|
maxRetries: number;
|
|
15
15
|
frame: number;
|
|
16
16
|
privacy: import("./defaults").Privacy;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
18
18
|
outName: import("./defaults").OutNameInput | null;
|
|
19
19
|
timeoutInMilliseconds: number;
|
|
20
20
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
@@ -56,11 +56,11 @@ export declare const LambdaInternals: {
|
|
|
56
56
|
getValue: ({ commandLine }: {
|
|
57
57
|
commandLine: Record<string, unknown>;
|
|
58
58
|
}) => {
|
|
59
|
-
value: "
|
|
59
|
+
value: "verbose" | "info" | "warn" | "error";
|
|
60
60
|
source: string;
|
|
61
61
|
};
|
|
62
|
-
setConfig: (newLogLevel: "
|
|
63
|
-
type: "
|
|
62
|
+
setConfig: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
63
|
+
type: "verbose" | "info" | "warn" | "error";
|
|
64
64
|
};
|
|
65
65
|
readonly throwIfSiteExists: {
|
|
66
66
|
cliFlag: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.149",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -23,13 +23,12 @@
|
|
|
23
23
|
"@aws-sdk/credential-providers": "3.382.0",
|
|
24
24
|
"@aws-sdk/lib-storage": "3.382.0",
|
|
25
25
|
"@aws-sdk/s3-request-presigner": "3.382.0",
|
|
26
|
-
"aws-policies": "^1.0.1",
|
|
27
26
|
"mime-types": "2.1.34",
|
|
28
27
|
"zod": "3.22.3",
|
|
29
|
-
"@remotion/bundler": "4.0.
|
|
30
|
-
"@remotion/renderer": "4.0.
|
|
31
|
-
"remotion": "4.0.
|
|
32
|
-
"
|
|
28
|
+
"@remotion/bundler": "4.0.149",
|
|
29
|
+
"@remotion/renderer": "4.0.149",
|
|
30
|
+
"@remotion/cli": "4.0.149",
|
|
31
|
+
"remotion": "4.0.149"
|
|
33
32
|
},
|
|
34
33
|
"devDependencies": {
|
|
35
34
|
"@jonny/eslint-config": "3.0.281",
|
|
@@ -45,11 +44,11 @@
|
|
|
45
44
|
"ts-node": "10.9.2",
|
|
46
45
|
"vitest": "0.31.1",
|
|
47
46
|
"zip-lib": "^0.7.2",
|
|
48
|
-
"@remotion/
|
|
49
|
-
"@remotion/
|
|
47
|
+
"@remotion/bundler": "4.0.149",
|
|
48
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.149"
|
|
50
49
|
},
|
|
51
50
|
"peerDependencies": {
|
|
52
|
-
"@remotion/bundler": "4.0.
|
|
51
|
+
"@remotion/bundler": "4.0.149"
|
|
53
52
|
},
|
|
54
53
|
"publishConfig": {
|
|
55
54
|
"access": "public"
|
|
@@ -84,8 +83,7 @@
|
|
|
84
83
|
"testintegration": "vitest src/test/integration --run",
|
|
85
84
|
"lint": "eslint src --ext ts,tsx",
|
|
86
85
|
"test": "vitest src/test/unit --run",
|
|
87
|
-
"
|
|
88
|
-
"build": "tsc -d && pnpm run buildlambda",
|
|
86
|
+
"build": "pnpm run buildlambda",
|
|
89
87
|
"buildlambda": "ts-node src/admin/bundle-lambda.ts"
|
|
90
88
|
}
|
|
91
89
|
}
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|