@remotion/lambda 4.0.115 → 4.0.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/get-compositions-on-lambda.d.ts +2 -4
- package/dist/api/get-function-info.d.ts +3 -1
- package/dist/api/get-function-info.js +2 -1
- package/dist/api/get-functions.d.ts +2 -0
- package/dist/api/get-functions.js +2 -0
- package/dist/api/get-render-progress.d.ts +2 -0
- package/dist/api/make-lambda-payload.d.ts +1 -1
- package/dist/api/make-lambda-payload.js +2 -1
- package/dist/api/render-media-on-lambda.d.ts +1 -3
- package/dist/api/render-still-on-lambda.d.ts +1 -6
- package/dist/cli/commands/compositions/index.d.ts +1 -1
- package/dist/cli/commands/compositions/index.js +15 -11
- package/dist/cli/commands/functions/deploy.d.ts +2 -1
- package/dist/cli/commands/functions/deploy.js +3 -3
- package/dist/cli/commands/functions/index.d.ts +2 -1
- package/dist/cli/commands/functions/index.js +24 -24
- package/dist/cli/commands/functions/ls.d.ts +2 -1
- package/dist/cli/commands/functions/ls.js +7 -8
- package/dist/cli/commands/functions/rm.d.ts +2 -1
- package/dist/cli/commands/functions/rm.js +6 -7
- package/dist/cli/commands/functions/rmall.d.ts +2 -1
- package/dist/cli/commands/functions/rmall.js +2 -3
- package/dist/cli/commands/policies/policies.d.ts +2 -1
- package/dist/cli/commands/policies/policies.js +20 -20
- package/dist/cli/commands/policies/role.d.ts +2 -1
- package/dist/cli/commands/policies/role.js +2 -2
- package/dist/cli/commands/policies/user.d.ts +2 -1
- package/dist/cli/commands/policies/user.js +2 -2
- package/dist/cli/commands/policies/validate.d.ts +2 -1
- package/dist/cli/commands/policies/validate.js +4 -4
- package/dist/cli/commands/quotas/increase.js +8 -8
- package/dist/cli/commands/quotas/index.js +10 -10
- package/dist/cli/commands/quotas/list.js +10 -10
- package/dist/cli/commands/regions.d.ts +2 -1
- package/dist/cli/commands/regions.js +2 -2
- package/dist/cli/commands/render/render.js +35 -26
- package/dist/cli/commands/sites/create.js +12 -12
- package/dist/cli/commands/sites/index.js +21 -21
- package/dist/cli/commands/sites/ls.js +8 -8
- package/dist/cli/commands/sites/rm.d.ts +2 -1
- package/dist/cli/commands/sites/rm.js +6 -6
- package/dist/cli/commands/sites/rmall.d.ts +2 -1
- package/dist/cli/commands/sites/rmall.js +3 -3
- package/dist/cli/commands/still.js +34 -29
- package/dist/cli/help.d.ts +2 -1
- package/dist/cli/help.js +27 -27
- package/dist/cli/helpers/find-function-name.js +21 -21
- package/dist/cli/helpers/get-webhook-custom-data.js +3 -3
- package/dist/cli/index.js +27 -28
- package/dist/cli/log.d.ts +2 -4
- package/dist/functions/helpers/concat-videos.d.ts +2 -1
- package/dist/functions/helpers/concat-videos.js +2 -2
- package/dist/functions/helpers/get-browser-instance.js +8 -8
- package/dist/functions/helpers/merge-chunks.js +2 -1
- package/dist/functions/helpers/print-cloudwatch-helper.d.ts +2 -1
- package/dist/functions/helpers/print-cloudwatch-helper.js +2 -2
- package/dist/functions/index.js +8 -13
- package/dist/functions/launch.js +23 -23
- package/dist/functions/merge.js +3 -3
- package/dist/functions/renderer.js +1 -1
- package/dist/internals.d.ts +1 -1
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/get-function-version.d.ts +3 -1
- package/dist/shared/get-function-version.js +2 -2
- package/dist/shared/invoke-webhook.d.ts +4 -1
- package/dist/shared/invoke-webhook.js +5 -5
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
|
@@ -46,14 +46,14 @@ const quotasIncreaseCommand = async (logLevel) => {
|
|
|
46
46
|
const defaultConcurrency = (_c = defaultConcurrencyLimit.Quota) === null || _c === void 0 ? void 0 : _c.Value;
|
|
47
47
|
const increaseRecommended = concurrencyCurrent <= defaultConcurrency;
|
|
48
48
|
if (!increaseRecommended && !args_1.forceFlagProvided) {
|
|
49
|
-
log_1.Log.error(`Current limit of ${concurrencyCurrent} is already increased over the default (${defaultConcurrency}).`);
|
|
50
|
-
log_1.Log.info('You can force the increase with the --force flag.');
|
|
51
|
-
log_1.Log.info('You are more likely to get an increase if you attach a reason. Go so by going to the AWS console:');
|
|
52
|
-
log_1.Log.info(makeQuotaUrl({ quotaId: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA, region }));
|
|
49
|
+
log_1.Log.error({ indent: false, logLevel }, `Current limit of ${concurrencyCurrent} is already increased over the default (${defaultConcurrency}).`);
|
|
50
|
+
log_1.Log.info({ indent: false, logLevel }, 'You can force the increase with the --force flag.');
|
|
51
|
+
log_1.Log.info({ indent: false, logLevel }, 'You are more likely to get an increase if you attach a reason. Go so by going to the AWS console:');
|
|
52
|
+
log_1.Log.info({ indent: false, logLevel }, makeQuotaUrl({ quotaId: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA, region }));
|
|
53
53
|
(0, quit_1.quit)(1);
|
|
54
54
|
}
|
|
55
55
|
const newLimit = Math.floor(concurrencyCurrent / 5000) * 5000 + 5000;
|
|
56
|
-
log_1.Log.info(`Sending request to AWS to increase concurrency limit from ${concurrencyCurrent} to ${newLimit}.`);
|
|
56
|
+
log_1.Log.info({ indent: false, logLevel }, `Sending request to AWS to increase concurrency limit from ${concurrencyCurrent} to ${newLimit}.`);
|
|
57
57
|
if (!(await (0, confirm_1.confirmCli)({
|
|
58
58
|
allowForceFlag: true,
|
|
59
59
|
delMessage: 'Send? (Y/n)',
|
|
@@ -69,8 +69,8 @@ const quotasIncreaseCommand = async (logLevel) => {
|
|
|
69
69
|
}
|
|
70
70
|
catch (err) {
|
|
71
71
|
if (err.name === 'DependencyAccessDeniedException') {
|
|
72
|
-
log_1.Log.error('Could not request increase because this is a sub-account of another AWS account.');
|
|
73
|
-
log_1.Log.error(`Please go to ${makeQuotaUrl({
|
|
72
|
+
log_1.Log.error({ indent: false, logLevel }, 'Could not request increase because this is a sub-account of another AWS account.');
|
|
73
|
+
log_1.Log.error({ indent: false, logLevel }, `Please go to ${makeQuotaUrl({
|
|
74
74
|
quotaId: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
|
|
75
75
|
region,
|
|
76
76
|
})} to request the increase via the AWS console.`);
|
|
@@ -78,6 +78,6 @@ const quotasIncreaseCommand = async (logLevel) => {
|
|
|
78
78
|
}
|
|
79
79
|
throw err;
|
|
80
80
|
}
|
|
81
|
-
log_1.Log.info(`Requested increase successfully. Run "${defaults_1.BINARY_NAME} ${_1.QUOTAS_COMMAND}" to check whether your request was approved.`);
|
|
81
|
+
log_1.Log.info({ indent: false, logLevel }, `Requested increase successfully. Run "${defaults_1.BINARY_NAME} ${_1.QUOTAS_COMMAND}" to check whether your request was approved.`);
|
|
82
82
|
};
|
|
83
83
|
exports.quotasIncreaseCommand = quotasIncreaseCommand;
|
|
@@ -6,14 +6,14 @@ const defaults_1 = require("../../../defaults");
|
|
|
6
6
|
const increase_1 = require("./increase");
|
|
7
7
|
const list_1 = require("./list");
|
|
8
8
|
exports.QUOTAS_COMMAND = 'quotas';
|
|
9
|
-
const printHelp = () => {
|
|
10
|
-
cli_1.CliInternals.Log.info('Available commands:');
|
|
11
|
-
cli_1.CliInternals.Log.info();
|
|
12
|
-
cli_1.CliInternals.Log.info(`npx ${defaults_1.BINARY_NAME} ${exports.QUOTAS_COMMAND}`);
|
|
13
|
-
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('List relevant AWS Lambda quotas.'));
|
|
14
|
-
cli_1.CliInternals.Log.info();
|
|
15
|
-
cli_1.CliInternals.Log.info(`npx ${defaults_1.BINARY_NAME} ${exports.QUOTAS_COMMAND} ${increase_1.INCREASE_SUBCOMMAND}`);
|
|
16
|
-
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Increase Lambda quotas.'));
|
|
9
|
+
const printHelp = (logLevel) => {
|
|
10
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, 'Available commands:');
|
|
11
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
12
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `npx ${defaults_1.BINARY_NAME} ${exports.QUOTAS_COMMAND}`);
|
|
13
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('List relevant AWS Lambda quotas.'));
|
|
14
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
15
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `npx ${defaults_1.BINARY_NAME} ${exports.QUOTAS_COMMAND} ${increase_1.INCREASE_SUBCOMMAND}`);
|
|
16
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Increase Lambda quotas.'));
|
|
17
17
|
};
|
|
18
18
|
const quotasCommand = (args, logLevel) => {
|
|
19
19
|
if (args.filter(Boolean).length === 0) {
|
|
@@ -22,7 +22,7 @@ const quotasCommand = (args, logLevel) => {
|
|
|
22
22
|
if (args[0] === increase_1.INCREASE_SUBCOMMAND) {
|
|
23
23
|
return (0, increase_1.quotasIncreaseCommand)(logLevel);
|
|
24
24
|
}
|
|
25
|
-
cli_1.CliInternals.Log.error('Subcommand ' + args[0] + ' not found.');
|
|
26
|
-
printHelp();
|
|
25
|
+
cli_1.CliInternals.Log.error({ indent: false, logLevel }, 'Subcommand ' + args[0] + ' not found.');
|
|
26
|
+
printHelp(logLevel);
|
|
27
27
|
};
|
|
28
28
|
exports.quotasCommand = quotasCommand;
|
|
@@ -12,8 +12,8 @@ const increase_1 = require("./increase");
|
|
|
12
12
|
const quotasListCommand = async (logLevel) => {
|
|
13
13
|
var _a, _b, _c, _d;
|
|
14
14
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
15
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Region = ${region}`));
|
|
16
|
-
log_1.Log.info();
|
|
15
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Region = ${region}`));
|
|
16
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
17
17
|
const [concurrencyLimit, defaultConcurrencyLimit, burstLimit, changes] = await Promise.all([
|
|
18
18
|
(0, aws_clients_1.getServiceQuotasClient)(region).send(new client_service_quotas_1.GetServiceQuotaCommand({
|
|
19
19
|
QuotaCode: defaults_1.LAMBDA_CONCURRENCY_LIMIT_QUOTA,
|
|
@@ -39,26 +39,26 @@ const quotasListCommand = async (logLevel) => {
|
|
|
39
39
|
const increaseRecommended = concurrencyCurrent <= defaultConcurrency;
|
|
40
40
|
const effectiveBurstConcurrency = Math.min(burstDefault, defaultConcurrency);
|
|
41
41
|
if (increaseRecommended) {
|
|
42
|
-
log_1.Log.info(`Concurrency limit: ${concurrencyCurrent} - ${increaseRecommended
|
|
42
|
+
log_1.Log.info({ indent: false, logLevel }, `Concurrency limit: ${concurrencyCurrent} - ${increaseRecommended
|
|
43
43
|
? cli_1.CliInternals.chalk.greenBright('Increase recommended!')
|
|
44
44
|
: ''}`);
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
log_1.Log.info(`Concurrency limit: ${concurrencyCurrent}`);
|
|
47
|
+
log_1.Log.info({ indent: false, logLevel }, `Concurrency limit: ${concurrencyCurrent}`);
|
|
48
48
|
}
|
|
49
49
|
if (openCase) {
|
|
50
50
|
log_1.Log.warn({ indent: false, logLevel }, `A request to increase it to ${openCase.DesiredValue} is pending:`);
|
|
51
51
|
log_1.Log.warn({ indent: false, logLevel }, `https://${region}.console.aws.amazon.com/support/home#/case/?displayId=${openCase.CaseId}`);
|
|
52
52
|
}
|
|
53
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray('The maximum amount of Lambda functions which can concurrently execute.'));
|
|
54
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Run \`npx ${defaults_1.BINARY_NAME} ${_1.QUOTAS_COMMAND} ${increase_1.INCREASE_SUBCOMMAND}\` to ask AWS to increase your limit.`));
|
|
55
|
-
log_1.Log.info();
|
|
53
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('The maximum amount of Lambda functions which can concurrently execute.'));
|
|
54
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Run \`npx ${defaults_1.BINARY_NAME} ${_1.QUOTAS_COMMAND} ${increase_1.INCREASE_SUBCOMMAND}\` to ask AWS to increase your limit.`));
|
|
55
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
56
56
|
if (effectiveBurstConcurrency === burstDefault) {
|
|
57
|
-
log_1.Log.info(`Burst concurrency: ${burstDefault}`);
|
|
57
|
+
log_1.Log.info({ indent: false, logLevel }, `Burst concurrency: ${burstDefault}`);
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
|
-
log_1.Log.info(`Burst concurrency: ${burstDefault}, but only ${effectiveBurstConcurrency} effective because of concurrency limit`);
|
|
60
|
+
log_1.Log.info({ indent: false, logLevel }, `Burst concurrency: ${burstDefault}, but only ${effectiveBurstConcurrency} effective because of concurrency limit`);
|
|
61
61
|
}
|
|
62
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray('The maximum amount of concurrency increase in 10 seconds'));
|
|
62
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('The maximum amount of concurrency increase in 10 seconds'));
|
|
63
63
|
};
|
|
64
64
|
exports.quotasListCommand = quotasListCommand;
|
|
@@ -5,9 +5,9 @@ const cli_1 = require("@remotion/cli");
|
|
|
5
5
|
const get_regions_1 = require("../../api/get-regions");
|
|
6
6
|
const args_1 = require("../args");
|
|
7
7
|
exports.REGIONS_COMMAND = 'regions';
|
|
8
|
-
const regionsCommand = () => {
|
|
8
|
+
const regionsCommand = (logLevel) => {
|
|
9
9
|
var _a;
|
|
10
|
-
cli_1.CliInternals.Log.info((0, get_regions_1.getRegions)({
|
|
10
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, (0, get_regions_1.getRegions)({
|
|
11
11
|
enabledByDefaultOnly: (_a = args_1.parsedLambdaCli['default-only']) !== null && _a !== void 0 ? _a : false,
|
|
12
12
|
}).join(' '));
|
|
13
13
|
};
|
|
@@ -28,22 +28,20 @@ function getTotalFrames(status) {
|
|
|
28
28
|
? renderer_1.RenderInternals.getFramesToRender(status.renderMetadata.frameRange, status.renderMetadata.everyNthFrame).length
|
|
29
29
|
: null;
|
|
30
30
|
}
|
|
31
|
-
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, } = client_1.BrowserSafeApis.options;
|
|
31
|
+
const { x264Option, audioBitrateOption, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, mutedOption, colorSpaceOption, deleteAfterOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, overwriteOption, } = client_1.BrowserSafeApis.options;
|
|
32
32
|
const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
33
33
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
34
34
|
const serveUrl = args[0];
|
|
35
35
|
if (!serveUrl) {
|
|
36
|
-
log_1.Log.error('No serve URL passed.');
|
|
37
|
-
log_1.Log.info('Pass an additional argument specifying a URL where your Remotion project is hosted.');
|
|
38
|
-
log_1.Log.info();
|
|
39
|
-
log_1.Log.info(`${constants_1.BINARY_NAME} ${exports.RENDER_COMMAND} <serve-url> <composition-id> [output-location]`);
|
|
36
|
+
log_1.Log.error({ indent: false, logLevel }, 'No serve URL passed.');
|
|
37
|
+
log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying a URL where your Remotion project is hosted.');
|
|
38
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
39
|
+
log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.RENDER_COMMAND} <serve-url> <composition-id> [output-location]`);
|
|
40
40
|
(0, quit_1.quit)(1);
|
|
41
41
|
}
|
|
42
42
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
43
|
-
const { envVariables, frameRange, inputProps, pixelFormat, proResProfile,
|
|
44
|
-
|
|
45
|
-
isLambda: true,
|
|
46
|
-
remotionRoot,
|
|
43
|
+
const { envVariables, frameRange, inputProps, pixelFormat, proResProfile, everyNthFrame, height, width, browserExecutable, ignoreCertificateErrors, userAgent, disableWebSecurity, } = cli_1.CliInternals.getCliOptions({
|
|
44
|
+
isStill: false,
|
|
47
45
|
logLevel,
|
|
48
46
|
});
|
|
49
47
|
const x264Preset = x264Option.getValue({
|
|
@@ -82,6 +80,9 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
82
80
|
const gl = glOption.getValue({
|
|
83
81
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
84
82
|
}).value;
|
|
83
|
+
const headless = headlessOption.getValue({
|
|
84
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
85
|
+
}).value;
|
|
85
86
|
const numberOfGifLoops = numberOfGifLoopsOption.getValue({
|
|
86
87
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
87
88
|
}).value;
|
|
@@ -91,6 +92,12 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
91
92
|
const encodingBufferSize = encodingBufferSizeOption.getValue({
|
|
92
93
|
commandLine: cli_1.CliInternals.parsedCli,
|
|
93
94
|
}).value;
|
|
95
|
+
const timeoutInMilliseconds = delayRenderTimeoutInMillisecondsOption.getValue({
|
|
96
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
97
|
+
}).value;
|
|
98
|
+
const overwrite = overwriteOption.getValue({
|
|
99
|
+
commandLine: cli_1.CliInternals.parsedCli,
|
|
100
|
+
}, false).value;
|
|
94
101
|
const chromiumOptions = {
|
|
95
102
|
disableWebSecurity,
|
|
96
103
|
enableMultiProcessOnLinux,
|
|
@@ -101,7 +108,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
101
108
|
};
|
|
102
109
|
let composition = args[1];
|
|
103
110
|
if (!composition) {
|
|
104
|
-
log_1.Log.info('No compositions passed. Fetching compositions...');
|
|
111
|
+
log_1.Log.info({ indent: false, logLevel }, 'No compositions passed. Fetching compositions...');
|
|
105
112
|
(0, validate_serveurl_1.validateServeUrl)(serveUrl);
|
|
106
113
|
if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
|
|
107
114
|
throw Error('Passing the shorthand serve URL without composition name is currently not supported.\n Make sure to pass a composition name after the shorthand serve URL or pass the complete serveURL without composition name to get to choose between all compositions.');
|
|
@@ -131,7 +138,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
131
138
|
port: config_1.ConfigInternals.getRendererPortFromConfigFileAndCliFlag(),
|
|
132
139
|
puppeteerInstance: undefined,
|
|
133
140
|
serveUrlOrWebpackUrl: serveUrl,
|
|
134
|
-
timeoutInMilliseconds
|
|
141
|
+
timeoutInMilliseconds,
|
|
135
142
|
logLevel,
|
|
136
143
|
width,
|
|
137
144
|
server,
|
|
@@ -181,7 +188,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
181
188
|
logLevel,
|
|
182
189
|
frameRange: frameRange !== null && frameRange !== void 0 ? frameRange : null,
|
|
183
190
|
outName: (_f = args_1.parsedLambdaCli['out-name']) !== null && _f !== void 0 ? _f : null,
|
|
184
|
-
timeoutInMilliseconds
|
|
191
|
+
timeoutInMilliseconds,
|
|
185
192
|
chromiumOptions,
|
|
186
193
|
scale,
|
|
187
194
|
numberOfGifLoops,
|
|
@@ -219,8 +226,8 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
219
226
|
updatesDontOverwrite: false,
|
|
220
227
|
indent: false,
|
|
221
228
|
});
|
|
222
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray(`bucket = ${res.bucketName}, function = ${functionName}`));
|
|
223
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray(`renderId = ${res.renderId}, codec = ${codec} (${reason})`));
|
|
229
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`bucket = ${res.bucketName}, function = ${functionName}`));
|
|
230
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`renderId = ${res.renderId}, codec = ${codec} (${reason})`));
|
|
224
231
|
log_1.Log.verbose({ indent: false, logLevel }, `CloudWatch logs (if enabled): ${res.cloudWatchLogs}`);
|
|
225
232
|
log_1.Log.verbose({ indent: false, logLevel }, `Lambda insights (if enabled): ${res.lambdaInsightsLogs}`);
|
|
226
233
|
log_1.Log.verbose({ indent: false, logLevel }, `Render folder: ${res.folderInS3Console}`);
|
|
@@ -229,6 +236,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
229
236
|
bucketName: res.bucketName,
|
|
230
237
|
renderId: res.renderId,
|
|
231
238
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
239
|
+
logLevel,
|
|
232
240
|
});
|
|
233
241
|
const multiProgress = (0, progress_1.makeMultiProgressFromStatus)(status);
|
|
234
242
|
progressBar.update((0, progress_1.makeProgressString)({
|
|
@@ -248,6 +256,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
248
256
|
bucketName: res.bucketName,
|
|
249
257
|
renderId: res.renderId,
|
|
250
258
|
region: (0, get_aws_region_1.getAwsRegion)(),
|
|
259
|
+
logLevel,
|
|
251
260
|
});
|
|
252
261
|
const newProgress = (0, progress_1.makeMultiProgressFromStatus)(newStatus);
|
|
253
262
|
progressBar.update((0, progress_1.makeProgressString)({
|
|
@@ -306,16 +315,16 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
306
315
|
timeToEncode: newStatus.timeToEncode,
|
|
307
316
|
totalFrames: getTotalFrames(newStatus),
|
|
308
317
|
}), false);
|
|
309
|
-
log_1.Log.info();
|
|
310
|
-
log_1.Log.info();
|
|
311
|
-
log_1.Log.info('Done!', outputPath, cli_1.CliInternals.formatBytes(sizeInBytes));
|
|
318
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
319
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
320
|
+
log_1.Log.info({ indent: false, logLevel }, 'Done!', outputPath, cli_1.CliInternals.formatBytes(sizeInBytes));
|
|
312
321
|
}
|
|
313
322
|
else {
|
|
314
|
-
log_1.Log.info();
|
|
315
|
-
log_1.Log.info();
|
|
316
|
-
log_1.Log.info('Done! ' + newStatus.outputFile);
|
|
323
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
324
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
325
|
+
log_1.Log.info({ indent: false, logLevel }, 'Done! ' + newStatus.outputFile);
|
|
317
326
|
}
|
|
318
|
-
log_1.Log.info([
|
|
327
|
+
log_1.Log.info({ indent: false, logLevel }, [
|
|
319
328
|
newStatus.renderMetadata
|
|
320
329
|
? `${newStatus.renderMetadata.estimatedTotalLambdaInvokations} λ's used`
|
|
321
330
|
: null,
|
|
@@ -337,7 +346,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
337
346
|
(0, quit_1.quit)(0);
|
|
338
347
|
}
|
|
339
348
|
if (newStatus.fatalErrorEncountered) {
|
|
340
|
-
log_1.Log.error('\n');
|
|
349
|
+
log_1.Log.error({ indent: false, logLevel }, '\n');
|
|
341
350
|
const uniqueErrors = [];
|
|
342
351
|
for (const err of newStatus.errors) {
|
|
343
352
|
if (uniqueErrors.find((e) => e.stack === err.stack)) {
|
|
@@ -345,7 +354,7 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
345
354
|
}
|
|
346
355
|
uniqueErrors.push(err);
|
|
347
356
|
if (err.explanation) {
|
|
348
|
-
log_1.Log.error(err.explanation);
|
|
357
|
+
log_1.Log.error({ indent: false, logLevel }, err.explanation);
|
|
349
358
|
}
|
|
350
359
|
const frames = renderer_1.RenderInternals.parseStack(err.stack.split('\n'));
|
|
351
360
|
const errorWithStackFrame = new renderer_1.RenderInternals.SymbolicateableError({
|
|
@@ -357,9 +366,9 @@ const renderCommand = async (args, remotionRoot, logLevel) => {
|
|
|
357
366
|
});
|
|
358
367
|
await cli_1.CliInternals.printError(errorWithStackFrame, logLevel);
|
|
359
368
|
}
|
|
360
|
-
log_1.Log.info();
|
|
361
|
-
log_1.Log.info(`Accrued costs until error was thrown: ${newStatus.costs.displayCost}.`);
|
|
362
|
-
log_1.Log.info('This is an estimate and continuing Lambda functions may incur additional costs.');
|
|
369
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
370
|
+
log_1.Log.info({ indent: false, logLevel }, `Accrued costs until error was thrown: ${newStatus.costs.displayCost}.`);
|
|
371
|
+
log_1.Log.info({ indent: false, logLevel }, 'This is an estimate and continuing Lambda functions may incur additional costs.');
|
|
363
372
|
(0, quit_1.quit)(1);
|
|
364
373
|
}
|
|
365
374
|
}
|
|
@@ -19,10 +19,10 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
19
19
|
var _a, _b, _c;
|
|
20
20
|
const { file, reason } = cli_1.CliInternals.findEntryPoint(args, remotionRoot, logLevel);
|
|
21
21
|
if (!file) {
|
|
22
|
-
log_1.Log.error('No entry file passed.');
|
|
23
|
-
log_1.Log.info('Pass an additional argument specifying the entry file of your Remotion project:');
|
|
24
|
-
log_1.Log.info();
|
|
25
|
-
log_1.Log.info(`${constants_1.BINARY_NAME} deploy <entry-file.ts>`);
|
|
22
|
+
log_1.Log.error({ indent: false, logLevel }, 'No entry file passed.');
|
|
23
|
+
log_1.Log.info({ indent: false, logLevel }, 'Pass an additional argument specifying the entry file of your Remotion project:');
|
|
24
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
25
|
+
log_1.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} deploy <entry-file.ts>`);
|
|
26
26
|
(0, quit_1.quit)(1);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
@@ -118,14 +118,14 @@ const sitesCreateSubcommand = async (args, remotionRoot, logLevel) => {
|
|
|
118
118
|
},
|
|
119
119
|
};
|
|
120
120
|
updateProgress();
|
|
121
|
-
log_1.Log.info();
|
|
122
|
-
log_1.Log.info();
|
|
123
|
-
log_1.Log.info('Deployed to S3!');
|
|
124
|
-
log_1.Log.info(`Serve URL: ${serveUrl}`);
|
|
125
|
-
log_1.Log.info(`Site Name: ${siteName}`);
|
|
126
|
-
log_1.Log.info();
|
|
127
|
-
log_1.Log.info(cli_1.CliInternals.chalk.blueBright('ℹ️ If you make changes to your code, you need to redeploy the site. You can overwrite the existing site by running:'));
|
|
128
|
-
log_1.Log.info(cli_1.CliInternals.chalk.blueBright(['npx remotion lambda sites create', args[0], `--site-name=${siteName}`]
|
|
121
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
122
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
123
|
+
log_1.Log.info({ indent: false, logLevel }, 'Deployed to S3!');
|
|
124
|
+
log_1.Log.info({ indent: false, logLevel }, `Serve URL: ${serveUrl}`);
|
|
125
|
+
log_1.Log.info({ indent: false, logLevel }, `Site Name: ${siteName}`);
|
|
126
|
+
log_1.Log.info({ indent: false, logLevel });
|
|
127
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.blueBright('ℹ️ If you make changes to your code, you need to redeploy the site. You can overwrite the existing site by running:'));
|
|
128
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.blueBright(['npx remotion lambda sites create', args[0], `--site-name=${siteName}`]
|
|
129
129
|
.filter(no_react_1.NoReactInternals.truthy)
|
|
130
130
|
.join(' ')));
|
|
131
131
|
};
|
|
@@ -9,41 +9,41 @@ const ls_1 = require("./ls");
|
|
|
9
9
|
const rm_1 = require("./rm");
|
|
10
10
|
const rmall_1 = require("./rmall");
|
|
11
11
|
exports.SITES_COMMAND = 'sites';
|
|
12
|
-
const printSitesHelp = () => {
|
|
13
|
-
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} <subcommand>`);
|
|
14
|
-
cli_1.CliInternals.Log.info();
|
|
15
|
-
cli_1.CliInternals.Log.info('Available subcommands:');
|
|
16
|
-
cli_1.CliInternals.Log.info();
|
|
17
|
-
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${create_1.SITES_CREATE_SUBCOMMAND} <entry-point>`);
|
|
18
|
-
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Creates a new site based on a Remotion project'));
|
|
19
|
-
cli_1.CliInternals.Log.info();
|
|
20
|
-
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${ls_1.SITES_LS_SUBCOMMAND}`);
|
|
21
|
-
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Lists the sites currently deployed'));
|
|
22
|
-
cli_1.CliInternals.Log.info();
|
|
23
|
-
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rm_1.SITES_RM_COMMAND} <site-id>`);
|
|
24
|
-
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Remove a site from the S3 bucket.'));
|
|
25
|
-
cli_1.CliInternals.Log.info();
|
|
26
|
-
cli_1.CliInternals.Log.info(`${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rmall_1.SITES_RMALL_COMMAND}`);
|
|
27
|
-
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray('Remove all sites from the S3 bucket.'));
|
|
12
|
+
const printSitesHelp = (logLevel) => {
|
|
13
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} <subcommand>`);
|
|
14
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
15
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, 'Available subcommands:');
|
|
16
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
17
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${create_1.SITES_CREATE_SUBCOMMAND} <entry-point>`);
|
|
18
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Creates a new site based on a Remotion project'));
|
|
19
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
20
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${ls_1.SITES_LS_SUBCOMMAND}`);
|
|
21
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Lists the sites currently deployed'));
|
|
22
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
23
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rm_1.SITES_RM_COMMAND} <site-id>`);
|
|
24
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Remove a site from the S3 bucket.'));
|
|
25
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
26
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${constants_1.BINARY_NAME} ${exports.SITES_COMMAND} ${rmall_1.SITES_RMALL_COMMAND}`);
|
|
27
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray('Remove all sites from the S3 bucket.'));
|
|
28
28
|
};
|
|
29
29
|
const sitesCommand = (args, remotionRoot, logLevel) => {
|
|
30
30
|
if (args[0] === ls_1.SITES_LS_SUBCOMMAND) {
|
|
31
31
|
return (0, ls_1.sitesLsSubcommand)(logLevel);
|
|
32
32
|
}
|
|
33
33
|
if (args[0] === rm_1.SITES_RM_COMMAND) {
|
|
34
|
-
return (0, rm_1.sitesRmSubcommand)(args.slice(1));
|
|
34
|
+
return (0, rm_1.sitesRmSubcommand)(args.slice(1), logLevel);
|
|
35
35
|
}
|
|
36
36
|
if (args[0] === rmall_1.SITES_RMALL_COMMAND) {
|
|
37
|
-
return (0, rmall_1.sitesRmallSubcommand)();
|
|
37
|
+
return (0, rmall_1.sitesRmallSubcommand)(logLevel);
|
|
38
38
|
}
|
|
39
39
|
if (args[0] === create_1.SITES_CREATE_SUBCOMMAND) {
|
|
40
40
|
return (0, create_1.sitesCreateSubcommand)(args.slice(1), remotionRoot, logLevel);
|
|
41
41
|
}
|
|
42
42
|
if (args[0]) {
|
|
43
|
-
cli_1.CliInternals.Log.error(`Subcommand ${args[0]} not found.`);
|
|
44
|
-
printSitesHelp();
|
|
43
|
+
cli_1.CliInternals.Log.error({ indent: false, logLevel }, `Subcommand ${args[0]} not found.`);
|
|
44
|
+
printSitesHelp(logLevel);
|
|
45
45
|
(0, quit_1.quit)(1);
|
|
46
46
|
}
|
|
47
|
-
printSitesHelp();
|
|
47
|
+
printSitesHelp(logLevel);
|
|
48
48
|
};
|
|
49
49
|
exports.sitesCommand = sitesCommand;
|
|
@@ -23,26 +23,26 @@ const sitesLsSubcommand = async (logLevel) => {
|
|
|
23
23
|
}
|
|
24
24
|
const sitesPluralized = sites.length === 1 ? 'site' : 'sites';
|
|
25
25
|
if (!cli_1.CliInternals.quietFlagProvided()) {
|
|
26
|
-
cli_1.CliInternals.Log.info(`${sites.length} ${sitesPluralized} in the ${region} region.`);
|
|
26
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, `${sites.length} ${sitesPluralized} in the ${region} region.`);
|
|
27
27
|
}
|
|
28
28
|
if (cli_1.CliInternals.quietFlagProvided()) {
|
|
29
29
|
if (sites.length === 0) {
|
|
30
|
-
cli_1.CliInternals.Log.info('()');
|
|
30
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, '()');
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
return cli_1.CliInternals.Log.info(sites.map((s) => s.id).join(' '));
|
|
33
|
+
return cli_1.CliInternals.Log.info({ indent: false, logLevel }, sites.map((s) => s.id).join(' '));
|
|
34
34
|
}
|
|
35
|
-
cli_1.CliInternals.Log.info();
|
|
36
|
-
cli_1.CliInternals.Log.info(cli_1.CliInternals.chalk.gray(logRow(['Site Name', 'Bucket', 'Size', 'Last updated'])));
|
|
35
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
36
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(logRow(['Site Name', 'Bucket', 'Size', 'Last updated'])));
|
|
37
37
|
for (const site of sites) {
|
|
38
|
-
cli_1.CliInternals.Log.info(logRow([
|
|
38
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, logRow([
|
|
39
39
|
site.id,
|
|
40
40
|
site.bucketName,
|
|
41
41
|
cli_1.CliInternals.formatBytes(site.sizeInBytes),
|
|
42
42
|
site.lastModified ? (0, date_string_1.dateString)(new Date(site.lastModified)) : 'n/a',
|
|
43
43
|
]));
|
|
44
|
-
cli_1.CliInternals.Log.info(site.serveUrl);
|
|
45
|
-
cli_1.CliInternals.Log.info();
|
|
44
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel }, site.serveUrl);
|
|
45
|
+
cli_1.CliInternals.Log.info({ indent: false, logLevel });
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
exports.sitesLsSubcommand = sitesLsSubcommand;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
1
2
|
export declare const SITES_RM_COMMAND = "rm";
|
|
2
|
-
export declare const sitesRmSubcommand: (args: string[]) => Promise<undefined>;
|
|
3
|
+
export declare const sitesRmSubcommand: (args: string[], logLevel: LogLevel) => Promise<undefined>;
|
|
@@ -11,14 +11,14 @@ const confirm_1 = require("../../helpers/confirm");
|
|
|
11
11
|
const quit_1 = require("../../helpers/quit");
|
|
12
12
|
const log_1 = require("../../log");
|
|
13
13
|
exports.SITES_RM_COMMAND = 'rm';
|
|
14
|
-
const sitesRmSubcommand = async (args) => {
|
|
14
|
+
const sitesRmSubcommand = async (args, logLevel) => {
|
|
15
15
|
var _a;
|
|
16
16
|
if (args.length === 0) {
|
|
17
|
-
log_1.Log.error('No site name was passed. Run the command again and pass another argument <site-name>.');
|
|
17
|
+
log_1.Log.error({ indent: false, logLevel }, 'No site name was passed. Run the command again and pass another argument <site-name>.');
|
|
18
18
|
(0, quit_1.quit)(1);
|
|
19
19
|
}
|
|
20
20
|
if (args[0] === '()') {
|
|
21
|
-
log_1.Log.info('No sites to remove.');
|
|
21
|
+
log_1.Log.info({ indent: false, logLevel }, 'No sites to remove.');
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
@@ -34,7 +34,7 @@ const sitesRmSubcommand = async (args) => {
|
|
|
34
34
|
for (const siteName of args) {
|
|
35
35
|
const site = deployedSites.sites.find((s) => s.id === siteName.trim());
|
|
36
36
|
if (!site) {
|
|
37
|
-
log_1.Log.error(`No site ${siteName.trim()} was found in your bucket ${bucketName}.`);
|
|
37
|
+
log_1.Log.error({ indent: false, logLevel }, `No site ${siteName.trim()} was found in your bucket ${bucketName}.`);
|
|
38
38
|
return (0, quit_1.quit)(1);
|
|
39
39
|
}
|
|
40
40
|
if (!(await (0, confirm_1.confirmCli)({
|
|
@@ -48,10 +48,10 @@ const sitesRmSubcommand = async (args) => {
|
|
|
48
48
|
siteName,
|
|
49
49
|
region,
|
|
50
50
|
onAfterItemDeleted: ({ itemName }) => {
|
|
51
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Deleted ${itemName}`));
|
|
51
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Deleted ${itemName}`));
|
|
52
52
|
},
|
|
53
53
|
});
|
|
54
|
-
log_1.Log.info(`Deleted site ${siteName} and freed up ${cli_1.CliInternals.formatBytes(totalSize)}.`);
|
|
54
|
+
log_1.Log.info({ indent: false, logLevel }, `Deleted site ${siteName} and freed up ${cli_1.CliInternals.formatBytes(totalSize)}.`);
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
exports.sitesRmSubcommand = sitesRmSubcommand;
|
|
@@ -10,7 +10,7 @@ const get_aws_region_1 = require("../../get-aws-region");
|
|
|
10
10
|
const confirm_1 = require("../../helpers/confirm");
|
|
11
11
|
const log_1 = require("../../log");
|
|
12
12
|
exports.SITES_RMALL_COMMAND = 'rmall';
|
|
13
|
-
const sitesRmallSubcommand = async () => {
|
|
13
|
+
const sitesRmallSubcommand = async (logLevel) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const region = (0, get_aws_region_1.getAwsRegion)();
|
|
16
16
|
const deployedSites = await (0, get_sites_1.getSites)({
|
|
@@ -33,10 +33,10 @@ const sitesRmallSubcommand = async () => {
|
|
|
33
33
|
siteName: site.id,
|
|
34
34
|
region,
|
|
35
35
|
onAfterItemDeleted: ({ itemName }) => {
|
|
36
|
-
log_1.Log.info(cli_1.CliInternals.chalk.gray(`Deleted ${itemName}`));
|
|
36
|
+
log_1.Log.info({ indent: false, logLevel }, cli_1.CliInternals.chalk.gray(`Deleted ${itemName}`));
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
|
-
log_1.Log.info(`Deleted site ${site.id} and freed up ${cli_1.CliInternals.formatBytes(totalSize)}.`);
|
|
39
|
+
log_1.Log.info({ indent: false, logLevel }, `Deleted site ${site.id} and freed up ${cli_1.CliInternals.formatBytes(totalSize)}.`);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
exports.sitesRmallSubcommand = sitesRmallSubcommand;
|