Skip to content

🎥 Make videos programmatically with React

fix code formatting check for ls

Ritish Srivastavacd27544d187c
diff --git a/packages/lambda/src/cli/commands/functions/ls.ts b/packages/lambda/src/cli/commands/functions/ls.ts
index a2b1477276..a8289d7d92 100644
--- a/packages/lambda/src/cli/commands/functions/ls.ts
+++ b/packages/lambda/src/cli/commands/functions/ls.ts
@@ -1,8 +1,8 @@
-import {CliInternals} from '@remotion/cli';
-import type {LogLevel} from '@remotion/renderer';
-import {getFunctions} from '../../../api/get-functions';
-import {getAwsRegion} from '../../get-aws-region';
-import {parsedLambdaCli} from '../../args';
+import { CliInternals } from "@remotion/cli";
+import type { LogLevel } from "@remotion/renderer";
+import { getFunctions } from "../../../api/get-functions";
+import { getAwsRegion } from "../../get-aws-region";
+import { parsedLambdaCli } from "../../args";
const NAME_COLS = 70;
const MEMORY_COLS = 15;
@@ -10,73 +10,73 @@ const DISK_COLS = 15;
const TIMEOUT_COLS = 15;
const VERSION_COLS = 15;
-export const FUNCTIONS_LS_SUBCOMMAND = 'ls';
+export const FUNCTIONS_LS_SUBCOMMAND = "ls";
export const functionsLsCommand = async (logLevel: LogLevel) => {
- const region = getAwsRegion();
- const fetchingOutput = CliInternals.createOverwriteableCliOutput({
- quiet: CliInternals.quietFlagProvided(),
- cancelSignal: null,
- updatesDontOverwrite: CliInternals.shouldUseNonOverlayingLogger({
- logLevel,
- }),
- indent: false,
- });
- fetchingOutput.update('Getting functions...', false);
+ const region = getAwsRegion();
+ const fetchingOutput = CliInternals.createOverwriteableCliOutput({
+ quiet: CliInternals.quietFlagProvided(),
+ cancelSignal: null,
+ updatesDontOverwrite: CliInternals.shouldUseNonOverlayingLogger({
+ logLevel,
+ }),
+ indent: false,
+ });
+ fetchingOutput.update("Getting functions...", false);
- const compatibleOnly = parsedLambdaCli['compatible-only'] || false;
+ const compatibleOnly = parsedLambdaCli["compatible-only"] || false;
- const functions = await getFunctions({
- region,
- compatibleOnly,
- });
+ const functions = await getFunctions({
+ region,
+ compatibleOnly,
+ });
- if (CliInternals.quietFlagProvided()) {
- if (functions.length === 0) {
- CliInternals.Log.info({indent: false, logLevel}, '()');
- return;
- }
+ if (CliInternals.quietFlagProvided()) {
+ if (functions.length === 0) {
+ CliInternals.Log.info({ indent: false, logLevel }, "()");
+ return;
+ }
- CliInternals.Log.info(
- {indent: false, logLevel},
- functions.map((f) => f.functionName).join(' '),
- );
- return;
- }
+ CliInternals.Log.info(
+ { indent: false, logLevel },
+ functions.map((f) => f.functionName).join(" ")
+ );
+ return;
+ }
- fetchingOutput.update('Getting function info...', false);
+ fetchingOutput.update("Getting function info...", false);
- const pluralized = functions.length === 1 ? 'function' : 'functions';
- fetchingOutput.update(
- `${functions.length} ${pluralized} in the ${region} region`,
- true,
- );
- CliInternals.Log.info({indent: false, logLevel});
- CliInternals.Log.info(
- {indent: false, logLevel},
- CliInternals.chalk.gray(
- [
- 'Name'.padEnd(NAME_COLS, ' '),
- 'Version'.padEnd(VERSION_COLS, ' '),
- 'Disk (MB)'.padEnd(MEMORY_COLS, ' '),
- 'Memory (MB)'.padEnd(MEMORY_COLS, ' '),
- 'Timeout (sec)'.padEnd(TIMEOUT_COLS, ' '),
- ].join(''),
- ),
- );
+ const pluralized = functions.length === 1 ? "function" : "functions";
+ fetchingOutput.update(
+ `${functions.length} ${pluralized} in the ${region} region`,
+ true
+ );
+ CliInternals.Log.info({ indent: false, logLevel });
+ CliInternals.Log.info(
+ { indent: false, logLevel },
+ CliInternals.chalk.gray(
+ [
+ "Name".padEnd(NAME_COLS, " "),
+ "Version".padEnd(VERSION_COLS, " "),
+ "Disk (MB)".padEnd(MEMORY_COLS, " "),
+ "Memory (MB)".padEnd(MEMORY_COLS, " "),
+ "Timeout (sec)".padEnd(TIMEOUT_COLS, " "),
+ ].join("")
+ )
+ );
- for (const datapoint of functions) {
- CliInternals.Log.info(
- {indent: false, logLevel},
- [
- datapoint.functionName.padEnd(NAME_COLS, ' '),
- datapoint.version
- ? datapoint.version.padEnd(VERSION_COLS, ' ')
- : 'Error'.padEnd(VERSION_COLS, ' '),
- String(datapoint.diskSizeInMb).padEnd(DISK_COLS, ' '),
- String(datapoint.memorySizeInMb).padEnd(MEMORY_COLS, ' '),
- String(datapoint.timeoutInSeconds).padEnd(TIMEOUT_COLS, ' '),
- ].join(''),
- );
- }
+ for (const datapoint of functions) {
+ CliInternals.Log.info(
+ { indent: false, logLevel },
+ [
+ datapoint.functionName.padEnd(NAME_COLS, " "),
+ datapoint.version
+ ? datapoint.version.padEnd(VERSION_COLS, " ")
+ : "Error".padEnd(VERSION_COLS, " "),
+ String(datapoint.diskSizeInMb).padEnd(DISK_COLS, " "),
+ String(datapoint.memorySizeInMb).padEnd(MEMORY_COLS, " "),
+ String(datapoint.timeoutInSeconds).padEnd(TIMEOUT_COLS, " "),
+ ].join("")
+ );
+ }
};