@remotion/lambda 4.0.15 → 4.0.16
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.
- package/dist/functions/chunk-optimization/plan-frame-ranges.d.ts +4 -1
- package/dist/functions/helpers/io.js +5 -1
- package/dist/functions/index.js +21 -14
- package/dist/shared/call-lambda.js +3 -4
- package/dist/shared/invoke-webhook.d.ts +0 -2
- package/package.json +18 -18
- package/remotionlambda-arm64.zip +0 -0
|
@@ -82,12 +82,16 @@ const lambdaWriteFile = async (params) => {
|
|
|
82
82
|
if (remainingRetries === 0) {
|
|
83
83
|
throw err;
|
|
84
84
|
}
|
|
85
|
+
const backoff = 2 ** (2 - remainingRetries) * 2000;
|
|
86
|
+
await new Promise((resolve) => {
|
|
87
|
+
setTimeout(resolve, backoff);
|
|
88
|
+
});
|
|
85
89
|
console.warn('Failed to write file to Lambda:');
|
|
86
90
|
console.warn(err);
|
|
87
91
|
console.warn(`Retrying (${remainingRetries} retries remaining)...`);
|
|
88
92
|
return (0, exports.lambdaWriteFile)({
|
|
89
93
|
...params,
|
|
90
|
-
retries:
|
|
94
|
+
retries: remainingRetries - 1,
|
|
91
95
|
});
|
|
92
96
|
}
|
|
93
97
|
};
|
package/dist/functions/index.js
CHANGED
|
@@ -44,8 +44,9 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
44
44
|
params,
|
|
45
45
|
renderId,
|
|
46
46
|
});
|
|
47
|
-
responseStream.write(JSON.stringify(response))
|
|
48
|
-
|
|
47
|
+
responseStream.write(JSON.stringify(response), () => {
|
|
48
|
+
responseStream.end();
|
|
49
|
+
});
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
52
|
if (params.type === constants_1.LambdaRoutines.start) {
|
|
@@ -57,8 +58,9 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
57
58
|
const response = await (0, start_1.startHandler)(params, {
|
|
58
59
|
expectedBucketOwner: currentUserId,
|
|
59
60
|
});
|
|
60
|
-
responseStream.write(JSON.stringify(response))
|
|
61
|
-
|
|
61
|
+
responseStream.write(JSON.stringify(response), () => {
|
|
62
|
+
responseStream.end();
|
|
63
|
+
});
|
|
62
64
|
return;
|
|
63
65
|
}
|
|
64
66
|
if (params.type === constants_1.LambdaRoutines.launch) {
|
|
@@ -72,8 +74,9 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
72
74
|
expectedBucketOwner: currentUserId,
|
|
73
75
|
getRemainingTimeInMillis: context.getRemainingTimeInMillis,
|
|
74
76
|
});
|
|
75
|
-
responseStream.write(JSON.stringify(response))
|
|
76
|
-
|
|
77
|
+
responseStream.write(JSON.stringify(response), () => {
|
|
78
|
+
responseStream.end();
|
|
79
|
+
});
|
|
77
80
|
return;
|
|
78
81
|
}
|
|
79
82
|
if (params.type === constants_1.LambdaRoutines.status) {
|
|
@@ -85,8 +88,9 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
85
88
|
expectedBucketOwner: currentUserId,
|
|
86
89
|
timeoutInMilliseconds,
|
|
87
90
|
});
|
|
88
|
-
responseStream.write(JSON.stringify(response))
|
|
89
|
-
|
|
91
|
+
responseStream.write(JSON.stringify(response), () => {
|
|
92
|
+
responseStream.end();
|
|
93
|
+
});
|
|
90
94
|
return;
|
|
91
95
|
}
|
|
92
96
|
if (params.type === constants_1.LambdaRoutines.renderer) {
|
|
@@ -102,8 +106,9 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
102
106
|
expectedBucketOwner: currentUserId,
|
|
103
107
|
isWarm,
|
|
104
108
|
});
|
|
105
|
-
responseStream.write(JSON.stringify(response))
|
|
106
|
-
|
|
109
|
+
responseStream.write(JSON.stringify(response), () => {
|
|
110
|
+
responseStream.end();
|
|
111
|
+
});
|
|
107
112
|
return;
|
|
108
113
|
}
|
|
109
114
|
if (params.type === constants_1.LambdaRoutines.info) {
|
|
@@ -111,8 +116,9 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
111
116
|
isWarm,
|
|
112
117
|
});
|
|
113
118
|
const response = await (0, info_1.infoHandler)(params);
|
|
114
|
-
responseStream.write(JSON.stringify(response))
|
|
115
|
-
|
|
119
|
+
responseStream.write(JSON.stringify(response), () => {
|
|
120
|
+
responseStream.end();
|
|
121
|
+
});
|
|
116
122
|
return;
|
|
117
123
|
}
|
|
118
124
|
if (params.type === constants_1.LambdaRoutines.compositions) {
|
|
@@ -122,8 +128,9 @@ const innerHandler = async (params, responseStream, context) => {
|
|
|
122
128
|
const response = await (0, compositions_1.compositionsHandler)(params, {
|
|
123
129
|
expectedBucketOwner: currentUserId,
|
|
124
130
|
});
|
|
125
|
-
responseStream.write(JSON.stringify(response))
|
|
126
|
-
|
|
131
|
+
responseStream.write(JSON.stringify(response), () => {
|
|
132
|
+
responseStream.end();
|
|
133
|
+
});
|
|
127
134
|
return;
|
|
128
135
|
}
|
|
129
136
|
throw new Error(constants_1.COMMAND_NOT_FOUND);
|
|
@@ -10,7 +10,7 @@ const callLambda = async ({ functionName, type, payload, region, receivedStreami
|
|
|
10
10
|
Payload: JSON.stringify({ type, ...payload }),
|
|
11
11
|
}));
|
|
12
12
|
const events = res.EventStream;
|
|
13
|
-
let responsePayload =
|
|
13
|
+
let responsePayload = '';
|
|
14
14
|
for await (const event of events) {
|
|
15
15
|
// There are two types of events you can get on a stream.
|
|
16
16
|
// `PayloadChunk`: These contain the actual raw bytes of the chunk
|
|
@@ -23,7 +23,7 @@ const callLambda = async ({ functionName, type, payload, region, receivedStreami
|
|
|
23
23
|
receivedStreamingPayload(streamPayload);
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
|
-
responsePayload
|
|
26
|
+
responsePayload += decoded;
|
|
27
27
|
}
|
|
28
28
|
if (event.InvokeComplete) {
|
|
29
29
|
if (event.InvokeComplete.ErrorCode) {
|
|
@@ -35,8 +35,7 @@ const callLambda = async ({ functionName, type, payload, region, receivedStreami
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
const json = parseJson(string);
|
|
38
|
+
const json = parseJson(responsePayload.trim());
|
|
40
39
|
return json;
|
|
41
40
|
};
|
|
42
41
|
exports.callLambda = callLambda;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.16",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -13,23 +13,23 @@
|
|
|
13
13
|
"url": "https://github.com/JonnyBurger/remotion"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@aws-sdk/abort-controller": "3.
|
|
17
|
-
"@aws-sdk/client-cloudwatch-logs": "3.
|
|
18
|
-
"@aws-sdk/client-iam": "3.
|
|
19
|
-
"@aws-sdk/client-lambda": "3.
|
|
20
|
-
"@aws-sdk/client-s3": "3.
|
|
21
|
-
"@aws-sdk/client-service-quotas": "3.
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
-
"@aws-sdk/credential-providers": "3.
|
|
24
|
-
"@aws-sdk/lib-storage": "3.
|
|
25
|
-
"@aws-sdk/s3-request-presigner": "3.
|
|
16
|
+
"@aws-sdk/abort-controller": "3.374.0",
|
|
17
|
+
"@aws-sdk/client-cloudwatch-logs": "3.382.0",
|
|
18
|
+
"@aws-sdk/client-iam": "3.382.0",
|
|
19
|
+
"@aws-sdk/client-lambda": "3.382.0",
|
|
20
|
+
"@aws-sdk/client-s3": "3.382.0",
|
|
21
|
+
"@aws-sdk/client-service-quotas": "3.382.0",
|
|
22
|
+
"@aws-sdk/client-sts": "3.382.0",
|
|
23
|
+
"@aws-sdk/credential-providers": "3.382.0",
|
|
24
|
+
"@aws-sdk/lib-storage": "3.382.0",
|
|
25
|
+
"@aws-sdk/s3-request-presigner": "3.382.0",
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"zod": "3.21.4",
|
|
29
|
-
"@remotion/bundler": "4.0.
|
|
30
|
-
"@remotion/cli": "4.0.
|
|
31
|
-
"@remotion/renderer": "4.0.
|
|
32
|
-
"remotion": "4.0.
|
|
29
|
+
"@remotion/bundler": "4.0.16",
|
|
30
|
+
"@remotion/cli": "4.0.16",
|
|
31
|
+
"@remotion/renderer": "4.0.16",
|
|
32
|
+
"remotion": "4.0.16"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.266",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"typescript": "4.9.5",
|
|
45
45
|
"vitest": "0.31.1",
|
|
46
46
|
"zip-lib": "^0.7.2",
|
|
47
|
-
"@remotion/bundler": "4.0.
|
|
48
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
47
|
+
"@remotion/bundler": "4.0.16",
|
|
48
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.16"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@remotion/bundler": "4.0.
|
|
51
|
+
"@remotion/bundler": "4.0.16"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|