@remotion/renderer 3.3.39 → 3.3.40
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/compositor/compositor.js +25 -40
- package/dist/puppeteer-evaluate.js +19 -11
- package/dist/render-web-frame.js +1 -0
- package/package.json +10 -10
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.waitForCompositorWithIdToQuit = exports.releaseCompositorWithId = exports.spawnCompositorOrReuse = void 0;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
|
-
const truthy_1 = require("../truthy");
|
|
6
5
|
const get_executable_path_1 = require("./get-executable-path");
|
|
7
6
|
const compositorMap = {};
|
|
8
7
|
const spawnCompositorOrReuse = ({ initiatePayload, renderId, }) => {
|
|
@@ -30,15 +29,28 @@ const startCompositor = (compositorInitiatePayload) => {
|
|
|
30
29
|
const child = (0, child_process_1.spawn)(`${bin}`, [JSON.stringify(compositorInitiatePayload)]);
|
|
31
30
|
const stderrChunks = [];
|
|
32
31
|
let stdoutListeners = [];
|
|
33
|
-
|
|
32
|
+
// TODO: Without this the render gets stuck!! :O
|
|
34
33
|
child.stderr.on('data', (d) => {
|
|
35
|
-
|
|
36
|
-
const str = d.toString('utf-8');
|
|
37
|
-
stderrListeners.forEach((s) => s(str));
|
|
34
|
+
console.log('stderr', d.toString('utf-8'));
|
|
38
35
|
});
|
|
39
36
|
child.stdout.on('data', (d) => {
|
|
40
37
|
const str = d.toString('utf-8');
|
|
41
|
-
|
|
38
|
+
try {
|
|
39
|
+
const payloads = str
|
|
40
|
+
.split('--debug-end--')
|
|
41
|
+
.map((t) => t.trim())
|
|
42
|
+
.filter(Boolean);
|
|
43
|
+
for (const payload of payloads) {
|
|
44
|
+
const p = JSON.parse(payload.replace('--debug-start--', ''));
|
|
45
|
+
if (p.msg_type === 'debug') {
|
|
46
|
+
console.log('Rust debug', p.msg);
|
|
47
|
+
}
|
|
48
|
+
stdoutListeners.forEach((s) => s(p));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
console.log({ str });
|
|
53
|
+
}
|
|
42
54
|
});
|
|
43
55
|
let nonce = 0;
|
|
44
56
|
return {
|
|
@@ -65,46 +77,19 @@ const startCompositor = (compositorInitiatePayload) => {
|
|
|
65
77
|
nonce++;
|
|
66
78
|
return new Promise((resolve, reject) => {
|
|
67
79
|
child.stdin.write(JSON.stringify(actualPayload) + '\n');
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (content.msg_type === 'error') {
|
|
73
|
-
parsed = content;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
// TODO: Obviously bad, does not handle panics
|
|
78
|
-
console.log('Rust debug err:', message);
|
|
80
|
+
const onStdout = (p) => {
|
|
81
|
+
if (p.msg_type === 'finish' && p.nonce === actualPayload.nonce) {
|
|
82
|
+
resolve();
|
|
83
|
+
stdoutListeners = stdoutListeners.filter((s) => s !== onStdout);
|
|
79
84
|
}
|
|
80
|
-
if (
|
|
81
|
-
const err = new Error(
|
|
82
|
-
err.stack =
|
|
85
|
+
if (p.msg_type === 'error') {
|
|
86
|
+
const err = new Error(p.error);
|
|
87
|
+
err.stack = p.error + '\n' + p.backtrace;
|
|
83
88
|
reject(err);
|
|
84
89
|
stdoutListeners = stdoutListeners.filter((s) => s !== onStdout);
|
|
85
|
-
stderrListeners = stderrListeners.filter((s) => s !== onStderr);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
const onStdout = (str) => {
|
|
89
|
-
const lineSplit = str.split('\n');
|
|
90
|
-
for (const line of lineSplit.filter(truthy_1.truthy)) {
|
|
91
|
-
let parsed = null;
|
|
92
|
-
try {
|
|
93
|
-
const p = JSON.parse(line);
|
|
94
|
-
if (p.msg_type === 'finish') {
|
|
95
|
-
parsed = p;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
catch (e) { }
|
|
99
|
-
if (parsed && parsed.nonce === actualPayload.nonce) {
|
|
100
|
-
resolve();
|
|
101
|
-
stdoutListeners = stdoutListeners.filter((s) => s !== onStdout);
|
|
102
|
-
stderrListeners = stderrListeners.filter((s) => s !== onStderr);
|
|
103
|
-
}
|
|
104
90
|
}
|
|
105
91
|
};
|
|
106
92
|
stdoutListeners.push(onStdout);
|
|
107
|
-
stderrListeners.push(onStderr);
|
|
108
93
|
});
|
|
109
94
|
},
|
|
110
95
|
};
|
|
@@ -99,18 +99,26 @@ async function puppeteerEvaluateWithCatch({ page, pageFunction, frame, args, })
|
|
|
99
99
|
error.message += ' Are you passing a nested JSHandle?';
|
|
100
100
|
throw error;
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
102
|
+
try {
|
|
103
|
+
const { exceptionDetails, result: remoteObject } = await callFunctionOnPromise;
|
|
104
|
+
if (exceptionDetails) {
|
|
105
|
+
const err = new symbolicateable_error_1.SymbolicateableError({
|
|
106
|
+
stack: (_c = exceptionDetails.exception) === null || _c === void 0 ? void 0 : _c.description,
|
|
107
|
+
name: (_d = exceptionDetails.exception) === null || _d === void 0 ? void 0 : _d.className,
|
|
108
|
+
message: (_f = (_e = exceptionDetails.exception) === null || _e === void 0 ? void 0 : _e.description) === null || _f === void 0 ? void 0 : _f.split('\n')[0],
|
|
109
|
+
frame,
|
|
110
|
+
stackFrame: (0, parse_browser_error_stack_1.parseStack)(((_g = exceptionDetails.exception) === null || _g === void 0 ? void 0 : _g.description).split('\n')),
|
|
111
|
+
});
|
|
112
|
+
throw err;
|
|
113
|
+
}
|
|
114
|
+
return valueFromRemoteObject(remoteObject);
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
if (error === null || error === void 0 ? void 0 : error.originalMessage.startsWith("Object couldn't be returned by value")) {
|
|
118
|
+
throw new Error('Could not serialize the return value of the function. Did you pass non-serializable values to defaultProps?');
|
|
119
|
+
}
|
|
120
|
+
throw error;
|
|
112
121
|
}
|
|
113
|
-
return valueFromRemoteObject(remoteObject);
|
|
114
122
|
}
|
|
115
123
|
exports.puppeteerEvaluateWithCatch = puppeteerEvaluateWithCatch;
|
|
116
124
|
/**
|
package/dist/render-web-frame.js
CHANGED
|
@@ -92,6 +92,7 @@ const renderWebFrame = ({ frame, index, downloadMap, imageFormat, poolPromise, s
|
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
|
+
// TODO: Bring fixes for retrying here
|
|
95
96
|
const renderWebFrameAndRetryTargetClose = async ({ frame, index, retriesLeft, attempt, actualConcurrency, browserReplacer, poolPromise, composition, downloadMap, imageFormat, onFrameBuffer, outputDir, stopState, countType, scale, quality, framesToRender, lastFrame, framesRendered, browserExecutable, chromiumOptions, dumpBrowserLogs, pagesArray, onBrowserLog, inputProps, envVariables, muted, proxyPort, realFrameRange, serveUrl, timeoutInMilliseconds, }) => {
|
|
96
97
|
var _a, _b;
|
|
97
98
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/renderer",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.40",
|
|
4
4
|
"description": "Renderer for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"execa": "5.1.1",
|
|
26
26
|
"extract-zip": "2.0.1",
|
|
27
|
-
"remotion": "3.3.
|
|
27
|
+
"remotion": "3.3.40",
|
|
28
28
|
"source-map": "^0.8.0-beta.0",
|
|
29
29
|
"ws": "8.7.0"
|
|
30
30
|
},
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"vitest": "0.24.3"
|
|
50
50
|
},
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@remotion/compositor-darwin-arm64": "3.3.
|
|
53
|
-
"@remotion/compositor-darwin-x64": "3.3.
|
|
54
|
-
"@remotion/compositor-linux-arm64-gnu": "3.3.
|
|
55
|
-
"@remotion/compositor-linux-arm64-musl": "3.3.
|
|
56
|
-
"@remotion/compositor-linux-x64-gnu": "3.3.
|
|
57
|
-
"@remotion/compositor-linux-x64-musl": "3.3.
|
|
58
|
-
"@remotion/compositor-win32-x64-msvc": "3.3.
|
|
52
|
+
"@remotion/compositor-darwin-arm64": "3.3.40",
|
|
53
|
+
"@remotion/compositor-darwin-x64": "3.3.40",
|
|
54
|
+
"@remotion/compositor-linux-arm64-gnu": "3.3.40",
|
|
55
|
+
"@remotion/compositor-linux-arm64-musl": "3.3.40",
|
|
56
|
+
"@remotion/compositor-linux-x64-gnu": "3.3.40",
|
|
57
|
+
"@remotion/compositor-linux-x64-musl": "3.3.40",
|
|
58
|
+
"@remotion/compositor-win32-x64-msvc": "3.3.40"
|
|
59
59
|
},
|
|
60
60
|
"keywords": [
|
|
61
61
|
"remotion",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "be5f606a81761f7f8e1e191ebabd5f8d225d8c09"
|
|
71
71
|
}
|