Skip to content

🎥 Make videos programmatically with React

prettier / move types to dev dependencies

Jonny Burger7d3efec629e4
diff --git a/packages/lambda/package.json b/packages/lambda/package.json
index 19ba7ba649..4cd63d19e0 100644
--- a/packages/lambda/package.json
+++ b/packages/lambda/package.json
@@ -23,7 +23,6 @@
"url": "https://github.com/JonnyBurger/remotion"
},
"dependencies": {
- "@aws-sdk/types": "3.215.0",
"@aws-sdk/abort-controller": "3.215.0",
"@aws-sdk/client-cloudwatch-logs": "3.215.0",
"@aws-sdk/client-iam": "3.215.0",
@@ -46,6 +45,7 @@
"react-dom": ">=16.8.0"
},
"devDependencies": {
+ "@aws-sdk/types": "3.215.0",
"@jonny/eslint-config": "3.0.266",
"@types/mime-types": "2.1.1",
"@types/minimist": "1.2.2",
diff --git a/packages/lambda/src/shared/aws-clients.ts b/packages/lambda/src/shared/aws-clients.ts
index 8dc244dfdb..392b5b7314 100644
--- a/packages/lambda/src/shared/aws-clients.ts
+++ b/packages/lambda/src/shared/aws-clients.ts
@@ -1,12 +1,15 @@
-import {createHash} from 'crypto';
import {CloudWatchLogsClient} from '@aws-sdk/client-cloudwatch-logs';
import {IAMClient} from '@aws-sdk/client-iam';
import {LambdaClient} from '@aws-sdk/client-lambda';
import {S3Client} from '@aws-sdk/client-s3';
-import {fromIni} from '@aws-sdk/credential-providers';
import {ServiceQuotasClient} from '@aws-sdk/client-service-quotas';
import {STSClient} from '@aws-sdk/client-sts';
-import type {AwsCredentialIdentity, AwsCredentialIdentityProvider} from '@aws-sdk/types';
+import {fromIni} from '@aws-sdk/credential-providers';
+import type {
+ AwsCredentialIdentity,
+ AwsCredentialIdentityProvider,
+} from '@aws-sdk/types';
+import {createHash} from 'crypto';
import type {AwsRegion} from '../pricing/aws-regions';
import {checkCredentials} from './check-credentials';
import {isInsideLambda} from './is-in-lambda';
@@ -23,7 +26,10 @@ const _clients: Partial<
>
> = {};
-const getCredentials = (): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined => {
+const getCredentials = ():
+ | AwsCredentialIdentity
+ | AwsCredentialIdentityProvider
+ | undefined => {
if (isInsideLambda()) {
return undefined;
}
@@ -69,7 +75,7 @@ const getCredentialsHash = ({
customCredentials: CustomCredentials | null;
service: keyof ServiceMapping;
}): string => {
- const hashComponents: { [key: string]: any; } = {};
+ const hashComponents: {[key: string]: any} = {};
if (process.env.REMOTION_AWS_PROFILE) {
hashComponents.credentials = {
@@ -87,7 +93,10 @@ const getCredentialsHash = ({
hashComponents.credentials = {
awsProfile: process.env.AWS_PROFILE,
};
- } else if (process.env.AWS_ACCESS_KEY_ID && process.env.AWS_SECRET_ACCESS_KEY) {
+ } else if (
+ process.env.AWS_ACCESS_KEY_ID &&
+ process.env.AWS_SECRET_ACCESS_KEY
+ ) {
hashComponents.credentials = {
accessKeyId: process.env.AWS_ACCESS_KEY_ID as string,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY as string,
@@ -101,7 +110,7 @@ const getCredentialsHash = ({
return createHash('sha256')
.update(JSON.stringify(hashComponents))
.digest('base64');
-}
+};
export type ServiceMapping = {
s3: S3Client;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 40a1fd079d..029f4958e4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -619,7 +619,6 @@ importers:
'@aws-sdk/credential-providers': 3.215.0
'@aws-sdk/lib-storage': 3.215.0_lissoxat37kg4kuf6r76eckcsy
'@aws-sdk/s3-request-presigner': 3.215.0
- '@aws-sdk/types': 3.215.0
'@remotion/bundler': link:../bundler
'@remotion/cli': link:../cli
'@remotion/renderer': link:../renderer
@@ -629,6 +628,7 @@ importers:
react-dom: [email protected]
remotion: link:../core
devDependencies:
+ '@aws-sdk/types': 3.215.0
'@jonny/eslint-config': 3.0.266_t54va6jeo5lf3vtqih5uiyrm5e
'@types/mime-types': 2.1.1
'@types/minimist': 1.2.2
@@ -2147,7 +2147,6 @@ packages:
/@aws-sdk/types/3.215.0:
resolution: {integrity: sha512-eRbCVjwzTYd9C5e2mceScJ6D2kYDDEC3PLkYfJa+1wH9iiF2JlbiYozAokyeYBHQ+AjmD93MK58RBoM8iZfH0Q==}
engines: {node: '>=14.0.0'}
- dev: false
/@aws-sdk/url-parser/3.215.0:
resolution: {integrity: sha512-r/qIk3TUlV36JvoRjTErFm0LzzgNKLB1YUG8zVZCGAc2TEATi8OVEmsZvi+KfTmsbszulITJVcjZKbHLbGoUzg==}