@remotion/cli 4.1.0-alpha7 → 4.1.0-alpha9
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/benchmark.js +13 -2
- package/dist/codemods/stringify-with-path.js +3 -3
- package/dist/compositions.js +6 -1
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/log.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderModal/DataEditor.js +3 -3
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.js +12 -4
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
- package/dist/error-with-stack-frame.d.ts +19 -0
- package/dist/error-with-stack-frame.js +81 -0
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/get-composition-id.d.ts +2 -2
- package/dist/get-composition-id.js +7 -4
- package/dist/get-composition-with-dimension-override.d.ts +2 -2
- package/dist/get-composition-with-dimension-override.js +2 -2
- package/dist/handle-javascript-error.d.ts +20 -0
- package/dist/handle-javascript-error.js +81 -0
- package/dist/index.d.ts +7 -7
- package/dist/log.d.ts +3 -3
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/render-queue/job.d.ts +2 -2
- package/dist/preview-server/render-queue/make-retry-payload.js +3 -2
- package/dist/preview-server/render-queue/process-still.js +1 -1
- package/dist/preview-server/render-queue/process-video.js +1 -1
- package/dist/preview-server/routes/add-render.js +2 -2
- package/dist/preview-server/routes/update-default-props.js +2 -2
- package/dist/preview-server/routes.d.ts +0 -1
- package/dist/render-flows/render.d.ts +2 -2
- package/dist/render-flows/render.js +18 -7
- package/dist/render-flows/still.d.ts +2 -2
- package/dist/render-flows/still.js +12 -6
- package/dist/render.js +6 -1
- package/dist/still.js +6 -1
- package/dist/symbolicate-error.d.ts +3 -0
- package/dist/symbolicate-error.js +24 -0
- package/dist/symbolicate-errors.d.ts +7 -0
- package/dist/symbolicate-errors.js +90 -0
- package/dist/symbolicate-stacktrace.d.ts +28 -0
- package/dist/symbolicate-stacktrace.js +135 -0
- package/dist/symbolicateable-error.d.ts +16 -0
- package/dist/symbolicateable-error.js +18 -0
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export declare const CliInternals: {
|
|
|
112
112
|
videoBitrate: string | null;
|
|
113
113
|
height: number | null;
|
|
114
114
|
width: number | null;
|
|
115
|
-
configFileImageFormat: "
|
|
115
|
+
configFileImageFormat: "none" | "png" | "jpeg" | undefined;
|
|
116
116
|
}>;
|
|
117
117
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
118
118
|
initializeCli: (remotionRoot: string) => Promise<void>;
|
|
@@ -121,7 +121,7 @@ export declare const CliInternals: {
|
|
|
121
121
|
parsedCli: {
|
|
122
122
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
123
123
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
124
|
-
"image-format": "
|
|
124
|
+
"image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
|
|
125
125
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
126
126
|
"bundle-cache": string;
|
|
127
127
|
"env-file": string;
|
|
@@ -185,7 +185,7 @@ export declare const CliInternals: {
|
|
|
185
185
|
downloadName: string | null;
|
|
186
186
|
outName: string | null;
|
|
187
187
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
188
|
-
cliFlag: "
|
|
188
|
+
cliFlag: "none" | "png" | "jpeg" | "pdf" | "webp" | null;
|
|
189
189
|
isLambda: boolean;
|
|
190
190
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
191
191
|
}) => {
|
|
@@ -200,8 +200,8 @@ export declare const CliInternals: {
|
|
|
200
200
|
};
|
|
201
201
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
202
202
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
203
|
-
uiImageFormat: "
|
|
204
|
-
}) => "
|
|
203
|
+
uiImageFormat: "none" | "png" | "jpeg" | null;
|
|
204
|
+
}) => "none" | "png" | "jpeg";
|
|
205
205
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
206
206
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
207
207
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
|
@@ -217,7 +217,7 @@ export declare const CliInternals: {
|
|
|
217
217
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
218
218
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
219
219
|
}) => boolean;
|
|
220
|
-
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent,
|
|
220
|
+
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, }: {
|
|
221
221
|
height: number | null;
|
|
222
222
|
width: number | null;
|
|
223
223
|
args: string[];
|
|
@@ -231,7 +231,7 @@ export declare const CliInternals: {
|
|
|
231
231
|
serveUrlOrWebpackUrl: string;
|
|
232
232
|
indent: boolean;
|
|
233
233
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
234
|
-
|
|
234
|
+
serializedInputPropsWithCustomSchema: string;
|
|
235
235
|
server: import("@remotion/renderer").RemotionServer;
|
|
236
236
|
}) => Promise<{
|
|
237
237
|
compositionId: string;
|
package/dist/log.d.ts
CHANGED
|
@@ -2,19 +2,19 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "error" | "verbose" | "info" | "warn";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
};
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | -2 | Ranges;
|
|
15
15
|
export {};
|
|
@@ -61,7 +61,7 @@ export type RenderJob = {
|
|
|
61
61
|
cancelToken: ReturnType<typeof makeCancelSignal>;
|
|
62
62
|
chromiumOptions: RequiredChromiumOptions;
|
|
63
63
|
envVariables: Record<string, string>;
|
|
64
|
-
|
|
64
|
+
serializedInputPropsWithCustomSchema: string;
|
|
65
65
|
} & RenderJobDynamicFields;
|
|
66
66
|
export type RenderJobWithCleanup = RenderJob & {
|
|
67
67
|
cleanup: (() => void)[];
|
|
@@ -105,7 +105,7 @@ export type AddRenderRequest = {
|
|
|
105
105
|
chromiumOptions: RequiredChromiumOptions;
|
|
106
106
|
delayRenderTimeout: number;
|
|
107
107
|
envVariables: Record<string, string>;
|
|
108
|
-
|
|
108
|
+
serializedInputPropsWithCustomSchema: string;
|
|
109
109
|
} & AddRenderRequestDynamicFields;
|
|
110
110
|
export type RemoveRenderRequest = {
|
|
111
111
|
jobId: string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeRetryPayload = void 0;
|
|
4
4
|
const get_default_video_contexts_1 = require("./get-default-video-contexts");
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
5
6
|
const makeRetryPayload = (job) => {
|
|
6
7
|
var _a, _b, _c;
|
|
7
8
|
const defaults = window.remotion_renderDefaults;
|
|
@@ -44,7 +45,7 @@ const makeRetryPayload = (job) => {
|
|
|
44
45
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
45
46
|
initialHeadless: job.chromiumOptions.headless,
|
|
46
47
|
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
47
|
-
defaultProps: job.
|
|
48
|
+
defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(job.serializedInputPropsWithCustomSchema),
|
|
48
49
|
inFrameMark: null,
|
|
49
50
|
outFrameMark: null,
|
|
50
51
|
};
|
|
@@ -85,7 +86,7 @@ const makeRetryPayload = (job) => {
|
|
|
85
86
|
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
86
87
|
initialHeadless: job.chromiumOptions.headless,
|
|
87
88
|
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
88
|
-
defaultProps: job.
|
|
89
|
+
defaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(job.serializedInputPropsWithCustomSchema),
|
|
89
90
|
inFrameMark: job.startFrame,
|
|
90
91
|
outFrameMark: job.endFrame,
|
|
91
92
|
};
|
|
@@ -23,7 +23,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
|
|
|
23
23
|
envVariables: job.envVariables,
|
|
24
24
|
height: null,
|
|
25
25
|
fullEntryPoint,
|
|
26
|
-
|
|
26
|
+
serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
|
|
27
27
|
overwrite: true,
|
|
28
28
|
port,
|
|
29
29
|
publicDir,
|
|
@@ -24,7 +24,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
24
24
|
envVariables: job.envVariables,
|
|
25
25
|
height: null,
|
|
26
26
|
fullEntryPoint,
|
|
27
|
-
|
|
27
|
+
serializedInputPropsWithCustomSchema: job.serializedInputPropsWithCustomSchema,
|
|
28
28
|
overwrite: true,
|
|
29
29
|
port,
|
|
30
30
|
publicDir,
|
|
@@ -41,7 +41,7 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
41
41
|
disallowParallelEncoding: input.disallowParallelEncoding,
|
|
42
42
|
chromiumOptions: input.chromiumOptions,
|
|
43
43
|
envVariables: input.envVariables,
|
|
44
|
-
|
|
44
|
+
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
45
45
|
},
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -65,7 +65,7 @@ const handleAddRender = ({ input, entryPoint, remotionRoot, }) => {
|
|
|
65
65
|
chromiumOptions: input.chromiumOptions,
|
|
66
66
|
delayRenderTimeout: input.delayRenderTimeout,
|
|
67
67
|
envVariables: input.envVariables,
|
|
68
|
-
|
|
68
|
+
serializedInputPropsWithCustomSchema: input.serializedInputPropsWithCustomSchema,
|
|
69
69
|
},
|
|
70
70
|
entryPoint,
|
|
71
71
|
remotionRoot,
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateDefaultPropsHandler = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const update_default_props_1 = require("../../codemods/update-default-props");
|
|
6
|
-
const input_props_serialization_1 = require("../../editor/components/RenderModal/SchemaEditor/input-props-serialization");
|
|
7
6
|
const project_info_1 = require("../project-info");
|
|
8
7
|
const can_update_default_props_1 = require("./can-update-default-props");
|
|
8
|
+
const remotion_1 = require("remotion");
|
|
9
9
|
const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps, enumPaths }, remotionRoot }) => {
|
|
10
10
|
try {
|
|
11
11
|
const projectInfo = await (0, project_info_1.getProjectInfo)(remotionRoot);
|
|
@@ -16,7 +16,7 @@ const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps,
|
|
|
16
16
|
const updated = await (0, update_default_props_1.updateDefaultProps)({
|
|
17
17
|
compositionId,
|
|
18
18
|
input: (0, node_fs_1.readFileSync)(projectInfo.videoFile, 'utf-8'),
|
|
19
|
-
newDefaultProps:
|
|
19
|
+
newDefaultProps: remotion_1.Internals.deserializeJSONWithCustomFields(defaultProps),
|
|
20
20
|
enumPaths,
|
|
21
21
|
});
|
|
22
22
|
(0, node_fs_1.writeFileSync)(projectInfo.videoFile, updated);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
2
|
import type { LiveEventsServer } from './live-events';
|
|
4
3
|
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AudioCodec, Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec, Crf, FfmpegOverrideFn, FrameRange, LogLevel, PixelFormat, ProResProfile, VideoImageFormat } from '@remotion/renderer';
|
|
2
2
|
import type { Loop } from '../config/number-of-gif-loops';
|
|
3
3
|
import type { JobProgressCallback } from '../preview-server/render-queue/job';
|
|
4
|
-
export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir,
|
|
4
|
+
export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, pixelFormat, videoBitrate, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, }: {
|
|
5
5
|
remotionRoot: string;
|
|
6
6
|
fullEntryPoint: string;
|
|
7
7
|
entryPointReason: string;
|
|
@@ -13,7 +13,7 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
|
|
|
13
13
|
indent: boolean;
|
|
14
14
|
shouldOutputImageSequence: boolean;
|
|
15
15
|
publicDir: string | null;
|
|
16
|
-
|
|
16
|
+
serializedInputPropsWithCustomSchema: string;
|
|
17
17
|
envVariables: Record<string, string>;
|
|
18
18
|
puppeteerTimeout: number;
|
|
19
19
|
port: number | null;
|
|
@@ -45,7 +45,8 @@ const setup_cache_1 = require("../setup-cache");
|
|
|
45
45
|
const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
|
|
46
46
|
const truthy_1 = require("../truthy");
|
|
47
47
|
const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
48
|
-
const
|
|
48
|
+
const remotion_1 = require("remotion");
|
|
49
|
+
const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, pixelFormat, videoBitrate, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, }) => {
|
|
49
50
|
var _a;
|
|
50
51
|
const downloads = [];
|
|
51
52
|
if (browserExecutable) {
|
|
@@ -138,7 +139,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
138
139
|
const puppeteerInstance = await browserInstance;
|
|
139
140
|
addCleanupCallback(() => puppeteerInstance.close(false, logLevel, indent));
|
|
140
141
|
const actualConcurrency = renderer_1.RenderInternals.getActualConcurrency(concurrency);
|
|
141
|
-
const server = renderer_1.RenderInternals.prepareServer({
|
|
142
|
+
const server = await renderer_1.RenderInternals.prepareServer({
|
|
142
143
|
concurrency: actualConcurrency,
|
|
143
144
|
indent,
|
|
144
145
|
port,
|
|
@@ -146,7 +147,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
146
147
|
logLevel,
|
|
147
148
|
webpackConfigOrServeUrl: urlOrBundle,
|
|
148
149
|
});
|
|
149
|
-
addCleanupCallback(() => server.
|
|
150
|
+
addCleanupCallback(() => server.closeServer(false));
|
|
150
151
|
const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
|
|
151
152
|
height,
|
|
152
153
|
width,
|
|
@@ -156,13 +157,13 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
156
157
|
chromiumOptions,
|
|
157
158
|
envVariables,
|
|
158
159
|
indent,
|
|
159
|
-
|
|
160
|
+
serializedInputPropsWithCustomSchema,
|
|
160
161
|
port,
|
|
161
162
|
puppeteerInstance,
|
|
162
163
|
serveUrlOrWebpackUrl: urlOrBundle,
|
|
163
164
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
164
165
|
logLevel,
|
|
165
|
-
server
|
|
166
|
+
server,
|
|
166
167
|
});
|
|
167
168
|
const { codec, reason: codecReason } = (0, get_final_output_codec_1.getFinalOutputCodec)({
|
|
168
169
|
cliFlag: parse_command_line_1.parsedCli.codec,
|
|
@@ -216,7 +217,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
216
217
|
log_1.Log.verboseAdvanced({ indent, logLevel }, 'Output dir', outputDir);
|
|
217
218
|
await renderer_1.RenderInternals.internalRenderFrames({
|
|
218
219
|
imageFormat,
|
|
219
|
-
|
|
220
|
+
serializedInputPropsWithCustomSchema,
|
|
220
221
|
onFrameUpdate: (rendered) => {
|
|
221
222
|
renderingProgress.frames = rendered;
|
|
222
223
|
updateRenderProgress(false);
|
|
@@ -244,6 +245,11 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
244
245
|
onBrowserLog: null,
|
|
245
246
|
onFrameBuffer: null,
|
|
246
247
|
logLevel,
|
|
248
|
+
serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
249
|
+
indent: undefined,
|
|
250
|
+
staticBase: null,
|
|
251
|
+
data: config.props,
|
|
252
|
+
}).serializedString,
|
|
247
253
|
});
|
|
248
254
|
updateRenderProgress(true);
|
|
249
255
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
@@ -266,7 +272,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
266
272
|
crf: crf !== null && crf !== void 0 ? crf : null,
|
|
267
273
|
envVariables,
|
|
268
274
|
frameRange,
|
|
269
|
-
|
|
275
|
+
serializedInputPropsWithCustomSchema,
|
|
270
276
|
overwrite,
|
|
271
277
|
pixelFormat,
|
|
272
278
|
proResProfile,
|
|
@@ -311,6 +317,11 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
311
317
|
disallowParallelEncoding,
|
|
312
318
|
onBrowserLog: null,
|
|
313
319
|
onStart: () => undefined,
|
|
320
|
+
serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
321
|
+
data: config.props,
|
|
322
|
+
indent: undefined,
|
|
323
|
+
staticBase: null,
|
|
324
|
+
}).serializedString,
|
|
314
325
|
});
|
|
315
326
|
updateRenderProgress(true);
|
|
316
327
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputFile}`));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Browser, BrowserExecutable, CancelSignal, ChromiumOptions, LogLevel, StillImageFormat } from '@remotion/renderer';
|
|
2
2
|
import type { JobProgressCallback } from '../preview-server/render-queue/job';
|
|
3
|
-
export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height,
|
|
3
|
+
export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indentOutput, addCleanupCallback, cancelSignal, outputLocationFromUi, }: {
|
|
4
4
|
remotionRoot: string;
|
|
5
5
|
fullEntryPoint: string;
|
|
6
6
|
entryPointReason: string;
|
|
7
7
|
remainingArgs: string[];
|
|
8
|
-
|
|
8
|
+
serializedInputPropsWithCustomSchema: string;
|
|
9
9
|
envVariables: Record<string, string>;
|
|
10
10
|
jpegQuality: number;
|
|
11
11
|
browser: Browser;
|
|
@@ -22,7 +22,8 @@ const setup_cache_1 = require("../setup-cache");
|
|
|
22
22
|
const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
|
|
23
23
|
const truthy_1 = require("../truthy");
|
|
24
24
|
const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
25
|
-
const
|
|
25
|
+
const remotion_1 = require("remotion");
|
|
26
|
+
const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indentOutput, addCleanupCallback, cancelSignal, outputLocationFromUi, }) => {
|
|
26
27
|
var _a, _b;
|
|
27
28
|
const downloads = [];
|
|
28
29
|
const aggregate = (0, progress_types_1.initialAggregateRenderProgress)();
|
|
@@ -75,7 +76,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
75
76
|
},
|
|
76
77
|
quietProgress: updatesDontOverwrite,
|
|
77
78
|
});
|
|
78
|
-
const server = renderer_1.RenderInternals.prepareServer({
|
|
79
|
+
const server = await renderer_1.RenderInternals.prepareServer({
|
|
79
80
|
concurrency: 1,
|
|
80
81
|
indent: indentOutput,
|
|
81
82
|
port,
|
|
@@ -83,7 +84,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
83
84
|
logLevel,
|
|
84
85
|
webpackConfigOrServeUrl: urlOrBundle,
|
|
85
86
|
});
|
|
86
|
-
addCleanupCallback(() => server.
|
|
87
|
+
addCleanupCallback(() => server.closeServer(false));
|
|
87
88
|
addCleanupCallback(() => cleanupBundle());
|
|
88
89
|
const puppeteerInstance = await browserInstance;
|
|
89
90
|
addCleanupCallback(() => puppeteerInstance.close(false, logLevel, indentOutput));
|
|
@@ -96,13 +97,13 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
96
97
|
chromiumOptions,
|
|
97
98
|
envVariables,
|
|
98
99
|
indent: indentOutput,
|
|
99
|
-
|
|
100
|
+
serializedInputPropsWithCustomSchema,
|
|
100
101
|
port,
|
|
101
102
|
puppeteerInstance,
|
|
102
103
|
serveUrlOrWebpackUrl: urlOrBundle,
|
|
103
104
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
104
105
|
logLevel,
|
|
105
|
-
server
|
|
106
|
+
server,
|
|
106
107
|
});
|
|
107
108
|
const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalStillImageFormat)({
|
|
108
109
|
cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
|
|
@@ -165,7 +166,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
165
166
|
jpegQuality,
|
|
166
167
|
envVariables,
|
|
167
168
|
imageFormat,
|
|
168
|
-
|
|
169
|
+
serializedInputPropsWithCustomSchema,
|
|
169
170
|
chromiumOptions,
|
|
170
171
|
timeoutInMilliseconds: puppeteerTimeout,
|
|
171
172
|
scale,
|
|
@@ -179,6 +180,11 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
179
180
|
indent: indentOutput,
|
|
180
181
|
onBrowserLog: null,
|
|
181
182
|
logLevel,
|
|
183
|
+
serializedResolvedPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
184
|
+
indent: undefined,
|
|
185
|
+
staticBase: null,
|
|
186
|
+
data: config.props,
|
|
187
|
+
}).serializedString,
|
|
182
188
|
});
|
|
183
189
|
aggregate.rendering = {
|
|
184
190
|
frames: 1,
|
package/dist/render.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.render = void 0;
|
|
4
4
|
// eslint-disable-next-line no-restricted-imports
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
5
6
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
6
7
|
const config_1 = require("./config");
|
|
7
8
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
@@ -42,7 +43,11 @@ const render = async (remotionRoot, args) => {
|
|
|
42
43
|
shouldOutputImageSequence,
|
|
43
44
|
publicDir,
|
|
44
45
|
envVariables,
|
|
45
|
-
|
|
46
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
47
|
+
indent: undefined,
|
|
48
|
+
staticBase: null,
|
|
49
|
+
data: inputProps,
|
|
50
|
+
}).serializedString,
|
|
46
51
|
puppeteerTimeout,
|
|
47
52
|
port,
|
|
48
53
|
height,
|
package/dist/still.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.still = void 0;
|
|
4
|
+
const remotion_1 = require("remotion");
|
|
4
5
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
5
6
|
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
6
7
|
const entry_point_1 = require("./entry-point");
|
|
@@ -36,7 +37,11 @@ const still = async (remotionRoot, args) => {
|
|
|
36
37
|
chromiumOptions,
|
|
37
38
|
envVariables,
|
|
38
39
|
height,
|
|
39
|
-
|
|
40
|
+
serializedInputPropsWithCustomSchema: remotion_1.Internals.serializeJSONWithDate({
|
|
41
|
+
data: inputProps,
|
|
42
|
+
indent: undefined,
|
|
43
|
+
staticBase: null,
|
|
44
|
+
}).serializedString,
|
|
40
45
|
overwrite,
|
|
41
46
|
port,
|
|
42
47
|
publicDir,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.symbolicateError = void 0;
|
|
4
|
+
const symbolicate_stacktrace_1 = require("../symbolicate-stacktrace");
|
|
5
|
+
const handle_javascript_exception_1 = require("./handle-javascript-exception");
|
|
6
|
+
const truthy_1 = require("./truthy");
|
|
7
|
+
const symbolicateError = async (symbolicateableError) => {
|
|
8
|
+
const { delayRenderCall, stackFrame } = symbolicateableError;
|
|
9
|
+
const [mainErrorFrames, delayRenderFrames] = await Promise.all([
|
|
10
|
+
stackFrame ? (0, symbolicate_stacktrace_1.symbolicateStackTraceFromRemoteFrames)(stackFrame) : null,
|
|
11
|
+
delayRenderCall
|
|
12
|
+
? (0, symbolicate_stacktrace_1.symbolicateStackTraceFromRemoteFrames)(delayRenderCall)
|
|
13
|
+
: null,
|
|
14
|
+
].filter(truthy_1.truthy));
|
|
15
|
+
const symbolicatedErr = new handle_javascript_exception_1.ErrorWithStackFrame({
|
|
16
|
+
message: symbolicateableError.message,
|
|
17
|
+
symbolicatedStackFrames: mainErrorFrames,
|
|
18
|
+
frame: symbolicateableError.frame,
|
|
19
|
+
name: symbolicateableError.name,
|
|
20
|
+
delayRenderCall: delayRenderFrames,
|
|
21
|
+
});
|
|
22
|
+
return symbolicatedErr;
|
|
23
|
+
};
|
|
24
|
+
exports.symbolicateError = symbolicateError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SymbolicatedStackFrame, UnsymbolicatedStackFrame } from '@remotion/renderer';
|
|
2
|
+
import type { SourceMapConsumer } from 'source-map';
|
|
3
|
+
import { ErrorWithStackFrame } from './error-with-stack-frame';
|
|
4
|
+
export declare const symbolicateError: (symbolicateableError: SymbolicateableError) => Promise<ErrorWithStackFrame>;
|
|
5
|
+
export declare const symbolicateStackTraceFromRemoteFrames: (frames: UnsymbolicatedStackFrame[]) => Promise<SymbolicatedStackFrame[]>;
|
|
6
|
+
export declare const getSourceMapFromRemoteFile: (fileName: string) => Promise<any>;
|
|
7
|
+
export declare const symbolicateFromSources: (frames: UnsymbolicatedStackFrame[], mapValues: Record<string, SourceMapConsumer | null>) => SymbolicatedStackFrame[];
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.symbolicateFromSources = exports.getSourceMapFromRemoteFile = exports.symbolicateStackTraceFromRemoteFrames = exports.symbolicateError = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const truthy_1 = require("./truthy");
|
|
6
|
+
const error_with_stack_frame_1 = require("./error-with-stack-frame");
|
|
7
|
+
const symbolicateError = async (symbolicateableError) => {
|
|
8
|
+
const { delayRenderCall, stackFrame } = symbolicateableError;
|
|
9
|
+
const [mainErrorFrames, delayRenderFrames] = await Promise.all([
|
|
10
|
+
stackFrame ? (0, exports.symbolicateStackTraceFromRemoteFrames)(stackFrame) : null,
|
|
11
|
+
delayRenderCall
|
|
12
|
+
? (0, exports.symbolicateStackTraceFromRemoteFrames)(delayRenderCall)
|
|
13
|
+
: null,
|
|
14
|
+
].filter(truthy_1.truthy));
|
|
15
|
+
const symbolicatedErr = new error_with_stack_frame_1.ErrorWithStackFrame({
|
|
16
|
+
message: symbolicateableError.message,
|
|
17
|
+
symbolicatedStackFrames: mainErrorFrames,
|
|
18
|
+
frame: symbolicateableError.frame,
|
|
19
|
+
name: symbolicateableError.name,
|
|
20
|
+
delayRenderCall: delayRenderFrames,
|
|
21
|
+
});
|
|
22
|
+
return symbolicatedErr;
|
|
23
|
+
};
|
|
24
|
+
exports.symbolicateError = symbolicateError;
|
|
25
|
+
const symbolicateStackTraceFromRemoteFrames = async (frames) => {
|
|
26
|
+
const uniqueFileNames = [
|
|
27
|
+
...new Set(frames
|
|
28
|
+
.map((f) => f.fileName)
|
|
29
|
+
.filter((f) => f.startsWith('http://') || f.startsWith('https://'))
|
|
30
|
+
.filter(truthy_1.truthy)),
|
|
31
|
+
];
|
|
32
|
+
const maps = await Promise.all(uniqueFileNames.map((fileName) => {
|
|
33
|
+
return (0, exports.getSourceMapFromRemoteFile)(fileName);
|
|
34
|
+
}));
|
|
35
|
+
const mapValues = {};
|
|
36
|
+
for (let i = 0; i < uniqueFileNames.length; i++) {
|
|
37
|
+
mapValues[uniqueFileNames[i]] = maps[i];
|
|
38
|
+
}
|
|
39
|
+
return (0, exports.symbolicateFromSources)(frames, mapValues);
|
|
40
|
+
};
|
|
41
|
+
exports.symbolicateStackTraceFromRemoteFrames = symbolicateStackTraceFromRemoteFrames;
|
|
42
|
+
const getSourceMapFromRemoteFile = async (fileName) => {
|
|
43
|
+
const fileContents = await renderer_1.RenderInternals.fetchUrl(fileName);
|
|
44
|
+
return renderer_1.RenderInternals.getSourceMap(fileName, fileContents, 'remote');
|
|
45
|
+
};
|
|
46
|
+
exports.getSourceMapFromRemoteFile = getSourceMapFromRemoteFile;
|
|
47
|
+
const symbolicateFromSources = (frames, mapValues) => {
|
|
48
|
+
return frames
|
|
49
|
+
.map((frame) => {
|
|
50
|
+
const map = mapValues[frame.fileName];
|
|
51
|
+
if (!map) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return symbolicateStackFrame(frame, map);
|
|
55
|
+
})
|
|
56
|
+
.filter(truthy_1.truthy);
|
|
57
|
+
};
|
|
58
|
+
exports.symbolicateFromSources = symbolicateFromSources;
|
|
59
|
+
const symbolicateStackFrame = (frame, map) => {
|
|
60
|
+
const pos = getOriginalPosition(map, frame.lineNumber, frame.columnNumber);
|
|
61
|
+
const hasSource = pos.source ? map.sourceContentFor(pos.source, false) : null;
|
|
62
|
+
const scriptCode = hasSource && pos.line
|
|
63
|
+
? getLinesAround(pos.line, 3, hasSource.split('\n'))
|
|
64
|
+
: null;
|
|
65
|
+
return {
|
|
66
|
+
originalColumnNumber: pos.column,
|
|
67
|
+
originalFileName: pos.source,
|
|
68
|
+
originalFunctionName: frame.functionName,
|
|
69
|
+
originalLineNumber: pos.line,
|
|
70
|
+
originalScriptCode: scriptCode,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
const getOriginalPosition = (source_map, line, column) => {
|
|
74
|
+
const result = source_map.originalPositionFor({
|
|
75
|
+
line,
|
|
76
|
+
column,
|
|
77
|
+
});
|
|
78
|
+
return { line: result.line, column: result.column, source: result.source };
|
|
79
|
+
};
|
|
80
|
+
function getLinesAround(line, count, lines) {
|
|
81
|
+
const result = [];
|
|
82
|
+
for (let index = Math.max(0, line - 1 - count) + 1; index <= Math.min(lines.length - 1, line - 1 + count); ++index) {
|
|
83
|
+
result.push({
|
|
84
|
+
lineNumber: index + 1,
|
|
85
|
+
content: lines[index],
|
|
86
|
+
highlight: index + 1 === line,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { BasicSourceMapConsumer, IndexedSourceMapConsumer } from 'source-map';
|
|
2
|
+
import { SourceMapConsumer } from 'source-map';
|
|
3
|
+
import type { UnsymbolicatedStackFrame } from './parse-browser-error-stack';
|
|
4
|
+
type ScriptLine = {
|
|
5
|
+
lineNumber: number;
|
|
6
|
+
content: string;
|
|
7
|
+
highlight: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type SymbolicatedStackFrame = {
|
|
10
|
+
originalFunctionName: string | null;
|
|
11
|
+
originalFileName: string | null;
|
|
12
|
+
originalLineNumber: number | null;
|
|
13
|
+
originalColumnNumber: number | null;
|
|
14
|
+
originalScriptCode: ScriptLine[] | null;
|
|
15
|
+
};
|
|
16
|
+
export declare const symbolicateStackTraceFromRemoteFrames: (frames: UnsymbolicatedStackFrame[]) => Promise<SymbolicatedStackFrame[]>;
|
|
17
|
+
export declare const symbolicateFromSources: (frames: UnsymbolicatedStackFrame[], mapValues: Record<string, SourceMapConsumer | null>) => SymbolicatedStackFrame[];
|
|
18
|
+
export declare const symbolicateStackFrame: (frame: UnsymbolicatedStackFrame, map: SourceMapConsumer) => {
|
|
19
|
+
originalColumnNumber: number | null;
|
|
20
|
+
originalFileName: string | null;
|
|
21
|
+
originalFunctionName: any;
|
|
22
|
+
originalLineNumber: number | null;
|
|
23
|
+
originalScriptCode: ScriptLine[] | null;
|
|
24
|
+
};
|
|
25
|
+
export declare const getSourceMapFromRemoteFile: (fileName: string) => Promise<SourceMapConsumer | null>;
|
|
26
|
+
export declare const getSourceMapFromLocalFile: (fileName: string) => Promise<SourceMapConsumer | null>;
|
|
27
|
+
export type AnySourceMapConsumer = BasicSourceMapConsumer | IndexedSourceMapConsumer;
|
|
28
|
+
export {};
|