@remotion/renderer 4.0.471 → 4.0.473
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.
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SymbolicatedStackFrame } from '../symbolicate-stacktrace';
|
|
2
|
+
export declare const makeStackFrameFileName: (frame: SymbolicatedStackFrame) => string;
|
|
3
|
+
export declare const formatStackFrameCodeFrame: (frame: SymbolicatedStackFrame) => string | null;
|
|
4
|
+
export declare const formatStackFrameLocationLine: (frame: SymbolicatedStackFrame) => string | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatStackFrameLocationLine = exports.formatStackFrameCodeFrame = exports.makeStackFrameFileName = void 0;
|
|
4
|
+
const chalk_1 = require("../chalk");
|
|
5
|
+
const truthy_1 = require("../truthy");
|
|
6
|
+
const makeStackFrameFileName = (frame) => {
|
|
7
|
+
return [
|
|
8
|
+
frame.originalFileName,
|
|
9
|
+
frame.originalLineNumber,
|
|
10
|
+
frame.originalColumnNumber === 0 ? null : frame.originalColumnNumber,
|
|
11
|
+
]
|
|
12
|
+
.filter(truthy_1.truthy)
|
|
13
|
+
.join(':');
|
|
14
|
+
};
|
|
15
|
+
exports.makeStackFrameFileName = makeStackFrameFileName;
|
|
16
|
+
// Returns the rendered code frame body (line numbers + gutter), or null if the
|
|
17
|
+
// frame has no associated original script code.
|
|
18
|
+
const formatStackFrameCodeFrame = (frame) => {
|
|
19
|
+
if (!frame.originalScriptCode || frame.originalScriptCode.length === 0) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const longestLineNumber = Math.max(...frame.originalScriptCode.map((script) => script.lineNumber)).toString().length;
|
|
23
|
+
const alignLeftAmount = Math.min(...frame.originalScriptCode.map((c) => c.content.length - c.content.trimStart().length));
|
|
24
|
+
return frame.originalScriptCode
|
|
25
|
+
.map((c) => {
|
|
26
|
+
const left = String(c.lineNumber).padStart(longestLineNumber, ' ');
|
|
27
|
+
const right = c.content.substring(alignLeftAmount);
|
|
28
|
+
if (c.highlight) {
|
|
29
|
+
return `${left} │ ${right}`;
|
|
30
|
+
}
|
|
31
|
+
return `${chalk_1.chalk.gray(left)} │ ${chalk_1.chalk.gray(right)}`;
|
|
32
|
+
})
|
|
33
|
+
.join('\n');
|
|
34
|
+
};
|
|
35
|
+
exports.formatStackFrameCodeFrame = formatStackFrameCodeFrame;
|
|
36
|
+
// Returns a single gray "at functionName (fileName)" line, or null if there is
|
|
37
|
+
// no file location for the frame.
|
|
38
|
+
const formatStackFrameLocationLine = (frame) => {
|
|
39
|
+
const fileName = (0, exports.makeStackFrameFileName)(frame);
|
|
40
|
+
if (!fileName) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return chalk_1.chalk.gray(['at', frame.originalFunctionName, `${chalk_1.chalk.blueBright(`(${fileName})`)}`]
|
|
44
|
+
.filter(truthy_1.truthy)
|
|
45
|
+
.join(' '));
|
|
46
|
+
};
|
|
47
|
+
exports.formatStackFrameLocationLine = formatStackFrameLocationLine;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -4877,6 +4877,38 @@ var convertToPositiveFrameIndex = ({
|
|
|
4877
4877
|
return frame < 0 ? durationInFrames + frame : frame;
|
|
4878
4878
|
};
|
|
4879
4879
|
|
|
4880
|
+
// src/error-handling/format-stack-frame.ts
|
|
4881
|
+
var makeStackFrameFileName = (frame) => {
|
|
4882
|
+
return [
|
|
4883
|
+
frame.originalFileName,
|
|
4884
|
+
frame.originalLineNumber,
|
|
4885
|
+
frame.originalColumnNumber === 0 ? null : frame.originalColumnNumber
|
|
4886
|
+
].filter(truthy).join(":");
|
|
4887
|
+
};
|
|
4888
|
+
var formatStackFrameCodeFrame = (frame) => {
|
|
4889
|
+
if (!frame.originalScriptCode || frame.originalScriptCode.length === 0) {
|
|
4890
|
+
return null;
|
|
4891
|
+
}
|
|
4892
|
+
const longestLineNumber = Math.max(...frame.originalScriptCode.map((script) => script.lineNumber)).toString().length;
|
|
4893
|
+
const alignLeftAmount = Math.min(...frame.originalScriptCode.map((c) => c.content.length - c.content.trimStart().length));
|
|
4894
|
+
return frame.originalScriptCode.map((c) => {
|
|
4895
|
+
const left = String(c.lineNumber).padStart(longestLineNumber, " ");
|
|
4896
|
+
const right = c.content.substring(alignLeftAmount);
|
|
4897
|
+
if (c.highlight) {
|
|
4898
|
+
return `${left} │ ${right}`;
|
|
4899
|
+
}
|
|
4900
|
+
return `${chalk.gray(left)} │ ${chalk.gray(right)}`;
|
|
4901
|
+
}).join(`
|
|
4902
|
+
`);
|
|
4903
|
+
};
|
|
4904
|
+
var formatStackFrameLocationLine = (frame) => {
|
|
4905
|
+
const fileName = makeStackFrameFileName(frame);
|
|
4906
|
+
if (!fileName) {
|
|
4907
|
+
return null;
|
|
4908
|
+
}
|
|
4909
|
+
return chalk.gray(["at", frame.originalFunctionName, `${chalk.blueBright(`(${fileName})`)}`].filter(truthy).join(" "));
|
|
4910
|
+
};
|
|
4911
|
+
|
|
4880
4912
|
// src/symbolicate-stacktrace.ts
|
|
4881
4913
|
import { readFileSync } from "fs";
|
|
4882
4914
|
import path6 from "path";
|
|
@@ -25168,6 +25200,9 @@ var RenderInternals = {
|
|
|
25168
25200
|
downloadFile,
|
|
25169
25201
|
parseStack,
|
|
25170
25202
|
symbolicateError,
|
|
25203
|
+
makeStackFrameFileName,
|
|
25204
|
+
formatStackFrameCodeFrame,
|
|
25205
|
+
formatStackFrameLocationLine,
|
|
25171
25206
|
SymbolicateableError,
|
|
25172
25207
|
getFramesToRender,
|
|
25173
25208
|
getExtensionOfFilename,
|
package/dist/index.d.ts
CHANGED
|
@@ -104,6 +104,9 @@ export declare const RenderInternals: {
|
|
|
104
104
|
}>;
|
|
105
105
|
parseStack: (stack: string[]) => import("./parse-browser-error-stack").UnsymbolicatedStackFrame[];
|
|
106
106
|
symbolicateError: (symbolicateableError: SymbolicateableError) => Promise<import(".").ErrorWithStackFrame>;
|
|
107
|
+
makeStackFrameFileName: (frame: import("./symbolicate-stacktrace").SymbolicatedStackFrame) => string;
|
|
108
|
+
formatStackFrameCodeFrame: (frame: import("./symbolicate-stacktrace").SymbolicatedStackFrame) => string | null;
|
|
109
|
+
formatStackFrameLocationLine: (frame: import("./symbolicate-stacktrace").SymbolicatedStackFrame) => string | null;
|
|
107
110
|
SymbolicateableError: typeof SymbolicateableError;
|
|
108
111
|
getFramesToRender: (frameRange: [number, number], everyNthFrame: number) => number[];
|
|
109
112
|
getExtensionOfFilename: (filename: string | null) => string | null;
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ const get_executable_path_1 = require("./compositor/get-executable-path");
|
|
|
52
52
|
const convert_to_positive_frame_index_1 = require("./convert-to-positive-frame-index");
|
|
53
53
|
const delete_directory_1 = require("./delete-directory");
|
|
54
54
|
const ensure_output_directory_1 = require("./ensure-output-directory");
|
|
55
|
+
const format_stack_frame_1 = require("./error-handling/format-stack-frame");
|
|
55
56
|
const symbolicate_error_1 = require("./error-handling/symbolicate-error");
|
|
56
57
|
const symbolicateable_error_1 = require("./error-handling/symbolicateable-error");
|
|
57
58
|
const file_extensions_1 = require("./file-extensions");
|
|
@@ -148,6 +149,9 @@ exports.RenderInternals = {
|
|
|
148
149
|
downloadFile: download_file_1.downloadFile,
|
|
149
150
|
parseStack: parse_browser_error_stack_1.parseStack,
|
|
150
151
|
symbolicateError: symbolicate_error_1.symbolicateError,
|
|
152
|
+
makeStackFrameFileName: format_stack_frame_1.makeStackFrameFileName,
|
|
153
|
+
formatStackFrameCodeFrame: format_stack_frame_1.formatStackFrameCodeFrame,
|
|
154
|
+
formatStackFrameLocationLine: format_stack_frame_1.formatStackFrameLocationLine,
|
|
151
155
|
SymbolicateableError: symbolicateable_error_1.SymbolicateableError,
|
|
152
156
|
getFramesToRender: get_duration_from_frame_range_1.getFramesToRender,
|
|
153
157
|
getExtensionOfFilename: get_extension_of_filename_1.getExtensionOfFilename,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.473",
|
|
7
7
|
"description": "Render Remotion videos using Node.js or Bun",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"execa": "5.1.1",
|
|
25
|
-
"remotion": "4.0.
|
|
26
|
-
"@remotion/streaming": "4.0.
|
|
25
|
+
"remotion": "4.0.473",
|
|
26
|
+
"@remotion/streaming": "4.0.473",
|
|
27
27
|
"source-map": "0.8.0-beta.0",
|
|
28
28
|
"ws": "8.20.1",
|
|
29
|
-
"@remotion/licensing": "4.0.
|
|
29
|
+
"@remotion/licensing": "4.0.473"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=16.8.0",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"react-dom": "19.2.3",
|
|
41
41
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
42
42
|
"@types/ws": "8.5.10",
|
|
43
|
-
"@remotion/example-videos": "4.0.
|
|
44
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
43
|
+
"@remotion/example-videos": "4.0.473",
|
|
44
|
+
"@remotion/eslint-config-internal": "4.0.473",
|
|
45
45
|
"eslint": "9.19.0",
|
|
46
46
|
"@types/node": "20.12.14"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@remotion/compositor-darwin-arm64": "4.0.
|
|
50
|
-
"@remotion/compositor-darwin-x64": "4.0.
|
|
51
|
-
"@remotion/compositor-linux-arm64-gnu": "4.0.
|
|
52
|
-
"@remotion/compositor-linux-arm64-musl": "4.0.
|
|
53
|
-
"@remotion/compositor-linux-x64-gnu": "4.0.
|
|
54
|
-
"@remotion/compositor-linux-x64-musl": "4.0.
|
|
55
|
-
"@remotion/compositor-win32-x64-msvc": "4.0.
|
|
49
|
+
"@remotion/compositor-darwin-arm64": "4.0.473",
|
|
50
|
+
"@remotion/compositor-darwin-x64": "4.0.473",
|
|
51
|
+
"@remotion/compositor-linux-arm64-gnu": "4.0.473",
|
|
52
|
+
"@remotion/compositor-linux-arm64-musl": "4.0.473",
|
|
53
|
+
"@remotion/compositor-linux-x64-gnu": "4.0.473",
|
|
54
|
+
"@remotion/compositor-linux-x64-musl": "4.0.473",
|
|
55
|
+
"@remotion/compositor-win32-x64-msvc": "4.0.473"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|
|
58
58
|
"remotion",
|