Skip to content

🎥 Make videos programmatically with React

add documentation and prettier output

Jonny Burgere151e230b6e1
diff --git a/packages/docs/docs/lambda/deploysite.md b/packages/docs/docs/lambda/deploysite.md
index 397fe89dfb..e6c58ecfd2 100644
--- a/packages/docs/docs/lambda/deploysite.md
+++ b/packages/docs/docs/lambda/deploysite.md
@@ -134,6 +134,12 @@ An object with the following values:
- `siteName` _(string)_: The identifier of the site that was given. Is either the site name that you have passed into this function, or a random string that was generated if you didn't pass a site name.
+- `stats`: (_available from v3.3.7_) An object with 3 entries: `uploadedFiles`, `deletedFiles` and `untouchedFiles`. Each one is a `number`.
+
+## Changelog
+
+From `v3.3.7`, this function is incremental: It only compares the contents of the local files and the files on S3 and only executes the necessary operations.
+
## See also
- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/lambda/src/api/deploy-site.ts)
diff --git a/packages/lambda/src/cli/commands/sites/create.ts b/packages/lambda/src/cli/commands/sites/create.ts
index bd138a7885..20d29d922a 100644
--- a/packages/lambda/src/cli/commands/sites/create.ts
+++ b/packages/lambda/src/cli/commands/sites/create.ts
@@ -1,6 +1,7 @@
import {CliInternals, ConfigInternals} from '@remotion/cli';
import {existsSync, lstatSync} from 'fs';
import path from 'path';
+import {Internals} from 'remotion';
import {deploySite} from '../../../api/deploy-site';
import {getOrCreateBucket} from '../../../api/get-or-create-bucket';
import {BINARY_NAME} from '../../../shared/constants';
@@ -166,7 +167,9 @@ export const sitesCreateSubcommand = async (
);
Log.info(
CliInternals.chalk.blueBright(
- `npx remotion lambda sites create ${args[0]} --site-name=${siteName}`
+ ['npx remotion lambda sites create', args[0], `--site-name=${siteName}`]
+ .filter(Internals.truthy)
+ .join(' ')
)
);
};
diff --git a/packages/lambda/src/cli/helpers/progress-bar.ts b/packages/lambda/src/cli/helpers/progress-bar.ts
index 885ae75436..4ff65b1833 100644
--- a/packages/lambda/src/cli/helpers/progress-bar.ts
+++ b/packages/lambda/src/cli/helpers/progress-bar.ts
@@ -66,16 +66,14 @@ const makeUploadDiff = ({stats}: {stats: UploadStats | null}) => {
return CliInternals.chalk.gray(`(Unchanged)`);
}
+ const total = stats.addedFiles + stats.removedFiles;
return CliInternals.chalk.gray(
- '(' +
- [
- stats.addedFiles ? `+${stats.addedFiles}` : null,
- stats.removedFiles ? `-${stats.removedFiles}` : null,
- ]
- .filter(Internals.truthy)
- .join(',') +
- ' files' +
- ')'
+ `(${[
+ stats.addedFiles ? `+${stats.addedFiles}` : null,
+ stats.removedFiles ? `-${stats.removedFiles}` : null,
+ ]
+ .filter(Internals.truthy)
+ .join(',')} ${total === 1 ? 'file' : 'files'})`
);
};