@remotion/lambda 4.0.57 → 4.0.58
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 +1 -4
- package/dist/shared/invoke-webhook.d.ts +2 -0
- package/package.json +8 -8
- package/remotionlambda-arm64.zip +0 -0
- package/dist/cli/helpers/validate.d.ts +0 -4
- package/dist/cli/helpers/validate.js +0 -8
- package/dist/functions/streaming/streaming.d.ts +0 -12
- package/dist/functions/streaming/streaming.js +0 -100
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/lambda",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.58",
|
|
4
4
|
"description": "Distributed renderer for Remotion based on AWS Lambda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"aws-policies": "^1.0.1",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"zod": "3.22.3",
|
|
29
|
-
"@remotion/
|
|
30
|
-
"@remotion/
|
|
31
|
-
"remotion": "4.0.
|
|
32
|
-
"@remotion/cli": "4.0.
|
|
29
|
+
"@remotion/bundler": "4.0.58",
|
|
30
|
+
"@remotion/renderer": "4.0.58",
|
|
31
|
+
"remotion": "4.0.58",
|
|
32
|
+
"@remotion/cli": "4.0.58"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jonny/eslint-config": "3.0.276",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"ts-node": "^10.8.0",
|
|
44
44
|
"vitest": "0.31.1",
|
|
45
45
|
"zip-lib": "^0.7.2",
|
|
46
|
-
"@remotion/bundler": "4.0.
|
|
47
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
46
|
+
"@remotion/bundler": "4.0.58",
|
|
47
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.58"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@remotion/bundler": "4.0.
|
|
50
|
+
"@remotion/bundler": "4.0.58"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
package/remotionlambda-arm64.zip
CHANGED
|
Binary file
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateDurationInFrames = exports.validateDimension = exports.validateFps = void 0;
|
|
4
|
-
/* eslint-disable prefer-destructuring */
|
|
5
|
-
const remotion_1 = require("remotion");
|
|
6
|
-
exports.validateFps = remotion_1.Internals.validateFps;
|
|
7
|
-
exports.validateDimension = remotion_1.Internals.validateDimension;
|
|
8
|
-
exports.validateDurationInFrames = remotion_1.Internals.validateDurationInFrames;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
type OnMessage = (type: 'error' | 'success', nonce: string, data: Buffer) => void;
|
|
3
|
-
export declare const makeStreaming: (onMessage: OnMessage) => {
|
|
4
|
-
addData: (data: Buffer) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const makePayloadMessage: (nonce: number, data: Buffer, status: 0 | 1) => Buffer;
|
|
7
|
-
export type StreamingPayload = {
|
|
8
|
-
type: 'frames-rendered';
|
|
9
|
-
frames: number;
|
|
10
|
-
};
|
|
11
|
-
export type OnStream = (payload: StreamingPayload) => void;
|
|
12
|
-
export {};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makePayloadMessage = exports.makeStreaming = void 0;
|
|
4
|
-
const makeStreaming = (onMessage) => {
|
|
5
|
-
let outputBuffer = Buffer.from('');
|
|
6
|
-
const separator = Buffer.from('remotion_buffer:');
|
|
7
|
-
let unprocessedBuffers = [];
|
|
8
|
-
let missingData = null;
|
|
9
|
-
const processInput = () => {
|
|
10
|
-
let separatorIndex = outputBuffer.indexOf(separator);
|
|
11
|
-
if (separatorIndex === -1) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
separatorIndex += separator.length;
|
|
15
|
-
let nonceString = '';
|
|
16
|
-
let lengthString = '';
|
|
17
|
-
let statusString = '';
|
|
18
|
-
// Each message from Rust is prefixed with `remotion_buffer;{[nonce]}:{[length]}`
|
|
19
|
-
// Let's read the buffer to extract the nonce, and if the full length is available,
|
|
20
|
-
// we'll extract the data and pass it to the callback.
|
|
21
|
-
// eslint-disable-next-line no-constant-condition
|
|
22
|
-
while (true) {
|
|
23
|
-
const nextDigit = outputBuffer[separatorIndex];
|
|
24
|
-
// 0x3a is the character ":"
|
|
25
|
-
if (nextDigit === 0x3a) {
|
|
26
|
-
separatorIndex++;
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
separatorIndex++;
|
|
30
|
-
nonceString += String.fromCharCode(nextDigit);
|
|
31
|
-
}
|
|
32
|
-
// eslint-disable-next-line no-constant-condition
|
|
33
|
-
while (true) {
|
|
34
|
-
const nextDigit = outputBuffer[separatorIndex];
|
|
35
|
-
if (nextDigit === 0x3a) {
|
|
36
|
-
separatorIndex++;
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
separatorIndex++;
|
|
40
|
-
lengthString += String.fromCharCode(nextDigit);
|
|
41
|
-
}
|
|
42
|
-
// eslint-disable-next-line no-constant-condition
|
|
43
|
-
while (true) {
|
|
44
|
-
const nextDigit = outputBuffer[separatorIndex];
|
|
45
|
-
if (nextDigit === 0x3a) {
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
separatorIndex++;
|
|
49
|
-
statusString += String.fromCharCode(nextDigit);
|
|
50
|
-
}
|
|
51
|
-
const length = Number(lengthString);
|
|
52
|
-
const status = Number(statusString);
|
|
53
|
-
const dataLength = outputBuffer.length - separatorIndex - 1;
|
|
54
|
-
if (dataLength < length) {
|
|
55
|
-
missingData = {
|
|
56
|
-
dataMissing: length - dataLength,
|
|
57
|
-
};
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
const data = outputBuffer.subarray(separatorIndex + 1, separatorIndex + 1 + Number(lengthString));
|
|
61
|
-
onMessage(status === 1 ? 'error' : 'success', nonceString, data);
|
|
62
|
-
missingData = null;
|
|
63
|
-
outputBuffer = outputBuffer.subarray(separatorIndex + Number(lengthString) + 1);
|
|
64
|
-
processInput();
|
|
65
|
-
};
|
|
66
|
-
return {
|
|
67
|
-
addData: (data) => {
|
|
68
|
-
unprocessedBuffers.push(data);
|
|
69
|
-
const separatorIndex = data.indexOf(separator);
|
|
70
|
-
if (separatorIndex === -1) {
|
|
71
|
-
if (missingData) {
|
|
72
|
-
missingData.dataMissing -= data.length;
|
|
73
|
-
}
|
|
74
|
-
if (!missingData || missingData.dataMissing > 0) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
unprocessedBuffers.unshift(outputBuffer);
|
|
79
|
-
outputBuffer = Buffer.concat(unprocessedBuffers);
|
|
80
|
-
unprocessedBuffers = [];
|
|
81
|
-
console.log('the unprocessed input is now', new TextDecoder('utf-8').decode(outputBuffer));
|
|
82
|
-
processInput();
|
|
83
|
-
},
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
exports.makeStreaming = makeStreaming;
|
|
87
|
-
const makePayloadMessage = (nonce, data, status) => {
|
|
88
|
-
const concat = Buffer.concat([
|
|
89
|
-
Buffer.from('remotion_buffer:'),
|
|
90
|
-
Buffer.from(nonce.toString()),
|
|
91
|
-
Buffer.from(':'),
|
|
92
|
-
Buffer.from(data.length.toString()),
|
|
93
|
-
Buffer.from(':'),
|
|
94
|
-
Buffer.from(String(status)),
|
|
95
|
-
Buffer.from(':'),
|
|
96
|
-
data,
|
|
97
|
-
]);
|
|
98
|
-
return concat;
|
|
99
|
-
};
|
|
100
|
-
exports.makePayloadMessage = makePayloadMessage;
|