@remotion/lambda 4.0.243 → 4.0.244

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.
@@ -45,7 +45,7 @@ async function getFiles(directory, originalDirectory, toUpload) {
45
45
  }));
46
46
  return _files.flat(1);
47
47
  }
48
- const limit = (0, p_limit_1.pLimit)(50);
48
+ const limit = (0, p_limit_1.pLimit)(30);
49
49
  const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, privacy, toUpload, forcePathStyle, }) => {
50
50
  const files = await getFiles(localDir, localDir, toUpload);
51
51
  const progresses = {};
@@ -53,34 +53,51 @@ const uploadDir = async ({ bucket, region, localDir, onProgress, keyPrefix, priv
53
53
  progresses[file.name] = 0;
54
54
  }
55
55
  const client = (0, get_s3_client_1.getS3Client)({ region, customCredentials: null, forcePathStyle });
56
+ const uploadWithoutRetry = async (filePath) => {
57
+ const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
58
+ const Body = (0, node_fs_1.createReadStream)(filePath.name);
59
+ const ContentType = mime_types_1.default.lookup(Key) || 'application/octet-stream';
60
+ const ACL = privacy === 'no-acl'
61
+ ? undefined
62
+ : privacy === 'private'
63
+ ? 'private'
64
+ : 'public-read';
65
+ const paralellUploads3 = new lib_storage_1.Upload({
66
+ client,
67
+ queueSize: 4,
68
+ partSize: 5 * 1024 * 1024,
69
+ params: {
70
+ Key,
71
+ Bucket: bucket,
72
+ Body,
73
+ ACL,
74
+ ContentType,
75
+ },
76
+ });
77
+ paralellUploads3.on('httpUploadProgress', (progress) => {
78
+ var _a;
79
+ progresses[filePath.name] = (_a = progress.loaded) !== null && _a !== void 0 ? _a : 0;
80
+ });
81
+ const prom = await paralellUploads3.done();
82
+ return prom;
83
+ };
84
+ const uploadWithRetry = async (filePath) => {
85
+ let error = null;
86
+ for (let i = 0; i < 3; i++) {
87
+ try {
88
+ return await uploadWithoutRetry(filePath);
89
+ }
90
+ catch (err) {
91
+ error = err;
92
+ }
93
+ }
94
+ if (error) {
95
+ throw error;
96
+ }
97
+ };
56
98
  const uploadAll = (async () => {
57
99
  const uploads = files.map((filePath) => limit(async () => {
58
- const Key = (0, make_s3_key_1.makeS3Key)(keyPrefix, localDir, filePath.name);
59
- const Body = (0, node_fs_1.createReadStream)(filePath.name);
60
- const ContentType = mime_types_1.default.lookup(Key) || 'application/octet-stream';
61
- const ACL = privacy === 'no-acl'
62
- ? undefined
63
- : privacy === 'private'
64
- ? 'private'
65
- : 'public-read';
66
- const paralellUploads3 = new lib_storage_1.Upload({
67
- client,
68
- queueSize: 4,
69
- partSize: 5 * 1024 * 1024,
70
- params: {
71
- Key,
72
- Bucket: bucket,
73
- Body,
74
- ACL,
75
- ContentType,
76
- },
77
- });
78
- paralellUploads3.on('httpUploadProgress', (progress) => {
79
- var _a;
80
- progresses[filePath.name] = (_a = progress.loaded) !== null && _a !== void 0 ? _a : 0;
81
- });
82
- const prom = await paralellUploads3.done();
83
- return prom;
100
+ await uploadWithRetry(filePath);
84
101
  }));
85
102
  await Promise.all(uploads);
86
103
  })();
package/dist/cli/log.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  export declare const Log: {
2
- verbose: (options: import("@remotion/renderer/dist/logger").LogOptions & {
2
+ verbose: (options: import("@remotion/renderer").LogOptions & {
3
3
  tag?: string;
4
4
  }, ...args: Parameters<typeof console.log>) => boolean | void;
5
5
  info: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
6
- warn: (options: import("@remotion/renderer/dist/logger").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
7
- error: (options: import("@remotion/renderer/dist/logger").LogOptions & {
6
+ warn: (options: import("@remotion/renderer").LogOptions, ...args: Parameters<typeof console.log>) => boolean | void;
7
+ error: (options: import("@remotion/renderer").LogOptions & {
8
8
  tag?: string;
9
9
  }, ...args: Parameters<typeof console.log>) => boolean | void;
10
10
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda"
4
4
  },
5
5
  "name": "@remotion/lambda",
6
- "version": "4.0.243",
6
+ "version": "4.0.244",
7
7
  "description": "Render Remotion videos on AWS Lambda",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -22,13 +22,13 @@
22
22
  "@aws-sdk/s3-request-presigner": "3.645.0",
23
23
  "mime-types": "2.1.34",
24
24
  "zod": "3.22.3",
25
- "@remotion/bundler": "4.0.243",
26
- "@remotion/cli": "4.0.243",
27
- "@remotion/renderer": "4.0.243",
28
- "@remotion/streaming": "4.0.243",
29
- "@remotion/studio-server": "4.0.243",
30
- "@remotion/serverless": "4.0.243",
31
- "remotion": "4.0.243"
25
+ "@remotion/renderer": "4.0.244",
26
+ "@remotion/cli": "4.0.244",
27
+ "@remotion/streaming": "4.0.244",
28
+ "remotion": "4.0.244",
29
+ "@remotion/serverless": "4.0.244",
30
+ "@remotion/studio-server": "4.0.244",
31
+ "@remotion/bundler": "4.0.244"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/mime-types": "2.1.1",
@@ -38,12 +38,12 @@
38
38
  "vitest": "0.31.1",
39
39
  "zip-lib": "^0.7.2",
40
40
  "eslint": "9.14.0",
41
- "@remotion/bundler": "4.0.243",
42
- "@remotion/eslint-config-internal": "4.0.243",
43
- "@remotion/compositor-linux-arm64-gnu": "4.0.243"
41
+ "@remotion/bundler": "4.0.244",
42
+ "@remotion/compositor-linux-arm64-gnu": "4.0.244",
43
+ "@remotion/eslint-config-internal": "4.0.244"
44
44
  },
45
45
  "peerDependencies": {
46
- "@remotion/bundler": "4.0.243"
46
+ "@remotion/bundler": "4.0.244"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
Binary file