@remotion/lambda 3.3.13 → 3.3.15

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.
@@ -12,24 +12,35 @@ const getRemotionS3Buckets = async (region) => {
12
12
  }
13
13
  const remotionBuckets = Buckets.filter((b) => { var _a; return (_a = b.Name) === null || _a === void 0 ? void 0 : _a.startsWith(constants_1.REMOTION_BUCKET_PREFIX); });
14
14
  const locations = await Promise.all(remotionBuckets.map(async (bucket) => {
15
- var _a;
15
+ var _a, _b;
16
16
  const { region: parsedRegion } = (0, validate_bucketname_1.parseBucketName)(bucket.Name);
17
17
  if (parsedRegion) {
18
18
  return parsedRegion;
19
19
  }
20
- const result = await (0, aws_clients_1.getS3Client)(region, null).send(new client_s3_1.GetBucketLocationCommand({
21
- Bucket: bucket.Name,
22
- }));
23
- // AWS docs: Buckets in Region us-east-1 have a LocationConstraint of null!!
24
- return (_a = result.LocationConstraint) !== null && _a !== void 0 ? _a : 'us-east-1';
20
+ try {
21
+ const result = await (0, aws_clients_1.getS3Client)(region, null).send(new client_s3_1.GetBucketLocationCommand({
22
+ Bucket: bucket.Name,
23
+ }));
24
+ // AWS docs: Buckets in Region us-east-1 have a LocationConstraint of null!!
25
+ return (_a = result.LocationConstraint) !== null && _a !== void 0 ? _a : 'us-east-1';
26
+ }
27
+ catch (err) {
28
+ // Sometimes the API returns a bucket even if it was deleted before
29
+ if ((_b = err.stack) === null || _b === void 0 ? void 0 : _b.includes('NoSuchBucket')) {
30
+ return null;
31
+ }
32
+ throw err;
33
+ }
25
34
  }));
26
- const bucketsWithLocation = remotionBuckets.map((bucket, i) => {
35
+ const bucketsWithLocation = remotionBuckets
36
+ .map((bucket, i) => {
27
37
  return {
28
38
  creationDate: bucket.CreationDate.getTime(),
29
39
  name: bucket.Name,
30
40
  region: locations[i],
31
41
  };
32
- });
42
+ })
43
+ .filter((b) => b.region);
33
44
  return {
34
45
  remotionBuckets: bucketsWithLocation.filter((bucket) => {
35
46
  return bucket.region === region;
@@ -1 +1 @@
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";
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" | "ap-south-1" | "ap-southeast-1" | "ap-southeast-2" | "ap-northeast-1" | "ap-northeast-2" | "ap-northeast-3" | "ca-central-1" | "sa-east-1" | "eu-south-1" | "af-south-1" | "ap-east-1" | "me-south-1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/lambda",
3
- "version": "3.3.13",
3
+ "version": "3.3.15",
4
4
  "description": "Distributed renderer for Remotion based on AWS Lambda",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -33,12 +33,12 @@
33
33
  "@aws-sdk/credential-providers": "3.215.0",
34
34
  "@aws-sdk/lib-storage": "3.215.0",
35
35
  "@aws-sdk/s3-request-presigner": "3.215.0",
36
- "@remotion/bundler": "3.3.13",
37
- "@remotion/cli": "3.3.13",
38
- "@remotion/renderer": "3.3.13",
36
+ "@remotion/bundler": "3.3.15",
37
+ "@remotion/cli": "3.3.15",
38
+ "@remotion/renderer": "3.3.15",
39
39
  "aws-policies": "^1.0.1",
40
40
  "mime-types": "2.1.34",
41
- "remotion": "3.3.13"
41
+ "remotion": "3.3.15"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": ">=16.8.0",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "5149292492bbbd27d48935e0aea371251c21588d"
64
+ "gitHead": "2fc46f12fd00b0f4eace6398e5eaa054210928ea"
65
65
  }
Binary file