@remotion/cli 3.2.0 → 3.2.3
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/config/drop-silent-audio-if-silent.d.ts +2 -0
- package/dist/config/drop-silent-audio-if-silent.js +13 -0
- package/dist/config/enforce-audio-track.d.ts +2 -0
- package/dist/config/enforce-audio-track.js +13 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.js +8 -0
- package/dist/config/muted.d.ts +2 -0
- package/dist/config/muted.js +13 -0
- package/dist/editor/components/Notifications/ServerDisconnected.d.ts +5 -0
- package/dist/editor/components/Notifications/ServerDisconnected.js +56 -0
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/event-source.js +6 -0
- package/dist/get-cli-options.d.ts +2 -0
- package/dist/get-cli-options.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/parse-command-line.d.ts +2 -0
- package/dist/parse-command-line.js +8 -0
- package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.js +9 -1
- package/dist/preview-server/error-overlay/remotion-overlay/Button.js +1 -1
- package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.js +2 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorMessage.js +4 -2
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.js +1 -1
- package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.js +3 -1
- package/dist/preview-server/get-package-manager.d.ts +1 -0
- package/dist/preview-server/get-package-manager.js +8 -1
- package/dist/preview-server/routes.js +3 -0
- package/dist/previewEntry.js +6 -0
- package/dist/progress-bar.js +7 -2
- package/dist/render.js +3 -1
- package/package.json +7 -7
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDropAudioIfSilent = exports.setDropAudioIfSilent = void 0;
|
|
4
|
+
const DEFAULT_DROP_AUDIO_IF_SILENT_STATE = true;
|
|
5
|
+
let mutedState = DEFAULT_DROP_AUDIO_IF_SILENT_STATE;
|
|
6
|
+
const setDropAudioIfSilent = (muted) => {
|
|
7
|
+
mutedState = muted;
|
|
8
|
+
};
|
|
9
|
+
exports.setDropAudioIfSilent = setDropAudioIfSilent;
|
|
10
|
+
const getDropAudioIfSilent = () => {
|
|
11
|
+
return mutedState;
|
|
12
|
+
};
|
|
13
|
+
exports.getDropAudioIfSilent = getDropAudioIfSilent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEnforceAudioTrack = exports.setEnforceAudioTrack = void 0;
|
|
4
|
+
const DEFAULT_ENFORCE_AUDIO_TRACK = true;
|
|
5
|
+
let enforceAudioTrackState = DEFAULT_ENFORCE_AUDIO_TRACK;
|
|
6
|
+
const setEnforceAudioTrack = (enforceAudioTrack) => {
|
|
7
|
+
enforceAudioTrackState = enforceAudioTrack;
|
|
8
|
+
};
|
|
9
|
+
exports.setEnforceAudioTrack = setEnforceAudioTrack;
|
|
10
|
+
const getEnforceAudioTrack = () => {
|
|
11
|
+
return enforceAudioTrackState;
|
|
12
|
+
};
|
|
13
|
+
exports.getEnforceAudioTrack = getEnforceAudioTrack;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -39,5 +39,9 @@ export declare const ConfigInternals: {
|
|
|
39
39
|
setStillFrame: (frame: number) => void;
|
|
40
40
|
getMaxTimelineTracks: () => number;
|
|
41
41
|
defaultOverrideFunction: WebpackOverrideFn;
|
|
42
|
+
setMuted: (muted: boolean) => void;
|
|
43
|
+
getMuted: () => boolean;
|
|
44
|
+
getEnforceAudioTrack: () => boolean;
|
|
45
|
+
setEnforceAudioTrack: (enforceAudioTrack: boolean) => void;
|
|
42
46
|
};
|
|
43
47
|
export declare const overrideRemotion: () => void;
|
package/dist/config/index.js
CHANGED
|
@@ -57,6 +57,7 @@ const chromium_flags_2 = require("./chromium-flags");
|
|
|
57
57
|
const codec_2 = require("./codec");
|
|
58
58
|
const concurrency_2 = require("./concurrency");
|
|
59
59
|
const crf_2 = require("./crf");
|
|
60
|
+
const enforce_audio_track_1 = require("./enforce-audio-track");
|
|
60
61
|
const env_file_2 = require("./env-file");
|
|
61
62
|
const every_nth_frame_2 = require("./every-nth-frame");
|
|
62
63
|
const ffmpeg_executable_2 = require("./ffmpeg-executable");
|
|
@@ -65,6 +66,7 @@ const image_format_2 = require("./image-format");
|
|
|
65
66
|
const image_sequence_2 = require("./image-sequence");
|
|
66
67
|
const log_1 = require("./log");
|
|
67
68
|
const max_timeline_tracks_2 = require("./max-timeline-tracks");
|
|
69
|
+
const muted_1 = require("./muted");
|
|
68
70
|
const number_of_gif_loops_2 = require("./number-of-gif-loops");
|
|
69
71
|
const output_location_2 = require("./output-location");
|
|
70
72
|
const override_webpack_2 = require("./override-webpack");
|
|
@@ -107,6 +109,8 @@ exports.Config = {
|
|
|
107
109
|
setScale: scale_2.setScale,
|
|
108
110
|
setEveryNthFrame: every_nth_frame_2.setEveryNthFrame,
|
|
109
111
|
setNumberOfGifLoops: number_of_gif_loops_2.setNumberOfGifLoops,
|
|
112
|
+
setMuted: muted_1.setMuted,
|
|
113
|
+
setEnforceAudioTrack: enforce_audio_track_1.setEnforceAudioTrack,
|
|
110
114
|
},
|
|
111
115
|
Output: {
|
|
112
116
|
setOutputLocation: output_location_2.setOutputLocation,
|
|
@@ -154,6 +158,10 @@ exports.ConfigInternals = {
|
|
|
154
158
|
setStillFrame: still_frame_1.setStillFrame,
|
|
155
159
|
getMaxTimelineTracks: max_timeline_tracks_1.getMaxTimelineTracks,
|
|
156
160
|
defaultOverrideFunction: override_webpack_1.defaultOverrideFunction,
|
|
161
|
+
setMuted: muted_1.setMuted,
|
|
162
|
+
getMuted: muted_1.getMuted,
|
|
163
|
+
getEnforceAudioTrack: enforce_audio_track_1.getEnforceAudioTrack,
|
|
164
|
+
setEnforceAudioTrack: enforce_audio_track_1.setEnforceAudioTrack,
|
|
157
165
|
};
|
|
158
166
|
const overrideRemotion = () => {
|
|
159
167
|
Object.assign(remotion_1.Config, exports.Config);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMuted = exports.setMuted = void 0;
|
|
4
|
+
const DEFAULT_MUTED_STATE = false;
|
|
5
|
+
let mutedState = DEFAULT_MUTED_STATE;
|
|
6
|
+
const setMuted = (muted) => {
|
|
7
|
+
mutedState = muted;
|
|
8
|
+
};
|
|
9
|
+
exports.setMuted = setMuted;
|
|
10
|
+
const getMuted = () => {
|
|
11
|
+
return mutedState;
|
|
12
|
+
};
|
|
13
|
+
exports.getMuted = getMuted;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServerDisconnected = exports.serverDisconnectedRef = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const container = {
|
|
7
|
+
position: 'fixed',
|
|
8
|
+
justifyContent: 'flex-end',
|
|
9
|
+
alignItems: 'flex-start',
|
|
10
|
+
display: 'flex',
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: '100%',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
padding: 30,
|
|
15
|
+
pointerEvents: 'none',
|
|
16
|
+
backgroundColor: 'transparent',
|
|
17
|
+
fontFamily: 'SF Pro, Arial, Helvetica, sans-serif',
|
|
18
|
+
};
|
|
19
|
+
const message = {
|
|
20
|
+
backgroundColor: '#e74c3c',
|
|
21
|
+
color: 'white',
|
|
22
|
+
paddingLeft: 20,
|
|
23
|
+
paddingRight: 20,
|
|
24
|
+
paddingTop: 12,
|
|
25
|
+
paddingBottom: 12,
|
|
26
|
+
borderRadius: 4,
|
|
27
|
+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.4)',
|
|
28
|
+
lineHeight: 1.5,
|
|
29
|
+
};
|
|
30
|
+
const inlineCode = {
|
|
31
|
+
fontSize: 16,
|
|
32
|
+
fontFamily: 'monospace',
|
|
33
|
+
};
|
|
34
|
+
exports.serverDisconnectedRef = (0, react_1.createRef)();
|
|
35
|
+
let pageIsGoingToReload = false;
|
|
36
|
+
window.addEventListener('beforeunload', () => {
|
|
37
|
+
pageIsGoingToReload = true;
|
|
38
|
+
});
|
|
39
|
+
const ServerDisconnected = () => {
|
|
40
|
+
const [serverDisconnected, setServerDisconnected] = (0, react_1.useState)(false);
|
|
41
|
+
(0, react_1.useImperativeHandle)(exports.serverDisconnectedRef, () => {
|
|
42
|
+
return {
|
|
43
|
+
setServerDisconnected: () => {
|
|
44
|
+
setServerDisconnected(true);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}, []);
|
|
48
|
+
if (!serverDisconnected) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
if (pageIsGoingToReload) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: container, className: "css-reset", children: (0, jsx_runtime_1.jsxs)("div", { style: message, children: ["The preview server has disconnected. ", (0, jsx_runtime_1.jsx)("br", {}), window.remotion_previewServerCommand ? ((0, jsx_runtime_1.jsxs)("span", { children: ["Run", ' ', (0, jsx_runtime_1.jsx)("code", { style: inlineCode, children: window.remotion_previewServerCommand }), ' ', "to run it again."] })) : ((0, jsx_runtime_1.jsx)("span", { children: "Fast refresh will not work." }))] }) }));
|
|
55
|
+
};
|
|
56
|
+
exports.ServerDisconnected = ServerDisconnected;
|
|
@@ -12,4 +12,4 @@ export declare const TIMELINE_BACKGROUND = "#111";
|
|
|
12
12
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
13
13
|
selected: boolean;
|
|
14
14
|
hovered: boolean;
|
|
15
|
-
}) => "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)"
|
|
15
|
+
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)";
|
package/dist/event-source.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.openEventSource = void 0;
|
|
4
|
+
const ServerDisconnected_1 = require("./editor/components/Notifications/ServerDisconnected");
|
|
4
5
|
let source = null;
|
|
5
6
|
const openEventSource = () => {
|
|
6
7
|
source = new EventSource('/events');
|
|
@@ -10,5 +11,10 @@ const openEventSource = () => {
|
|
|
10
11
|
window.location.reload();
|
|
11
12
|
}
|
|
12
13
|
});
|
|
14
|
+
source.addEventListener('error', () => {
|
|
15
|
+
var _a;
|
|
16
|
+
// Display an error message that the preview server has disconnected.
|
|
17
|
+
(_a = ServerDisconnected_1.serverDisconnectedRef.current) === null || _a === void 0 ? void 0 : _a.setServerDisconnected();
|
|
18
|
+
});
|
|
13
19
|
};
|
|
14
20
|
exports.openEventSource = openEventSource;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -179,6 +179,8 @@ const getCliOptions = async (options) => {
|
|
|
179
179
|
chromiumOptions,
|
|
180
180
|
overwrite,
|
|
181
181
|
port: port !== null && port !== void 0 ? port : null,
|
|
182
|
+
muted: config_1.ConfigInternals.getMuted(),
|
|
183
|
+
enforceAudioTrack: config_1.ConfigInternals.getEnforceAudioTrack(),
|
|
182
184
|
};
|
|
183
185
|
};
|
|
184
186
|
exports.getCliOptions = getCliOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ export declare const CliInternals: {
|
|
|
95
95
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
96
96
|
overwrite: boolean;
|
|
97
97
|
port: number | null;
|
|
98
|
+
muted: boolean;
|
|
99
|
+
enforceAudioTrack: boolean;
|
|
98
100
|
}>;
|
|
99
101
|
parseCommandLine: (type: "sequence" | "still" | "lambda" | "preview" | "versions") => void;
|
|
100
102
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
@@ -16,6 +16,8 @@ exports.BooleanFlags = [
|
|
|
16
16
|
'help',
|
|
17
17
|
'quiet',
|
|
18
18
|
'q',
|
|
19
|
+
'muted',
|
|
20
|
+
'enforce-audio-track',
|
|
19
21
|
// Lambda flags
|
|
20
22
|
'force',
|
|
21
23
|
'disable-chunk-optimization',
|
|
@@ -126,6 +128,12 @@ const parseCommandLine = (type) => {
|
|
|
126
128
|
if (typeof exports.parsedCli.port !== 'undefined') {
|
|
127
129
|
config_1.Config.Bundling.setPort(exports.parsedCli.port);
|
|
128
130
|
}
|
|
131
|
+
if (typeof exports.parsedCli.muted !== 'undefined') {
|
|
132
|
+
config_1.Config.Rendering.setMuted(exports.parsedCli.muted);
|
|
133
|
+
}
|
|
134
|
+
if (typeof exports.parsedCli['enforce-audio-track'] !== 'undefined') {
|
|
135
|
+
config_1.Config.Rendering.setEnforceAudioTrack(exports.parsedCli['enforce-audio-track']);
|
|
136
|
+
}
|
|
129
137
|
};
|
|
130
138
|
exports.parseCommandLine = parseCommandLine;
|
|
131
139
|
const quietFlagProvided = () => exports.parsedCli.quiet || exports.parsedCli.q;
|
|
@@ -31,7 +31,15 @@ const crashWithFrames = (crash) => (error) => {
|
|
|
31
31
|
var _a;
|
|
32
32
|
const didHookOrderChange = error.message.startsWith('Rendered fewer hooks') ||
|
|
33
33
|
error.message.startsWith('Rendered more hooks');
|
|
34
|
-
|
|
34
|
+
const key = 'remotion.lastCrashBecauseOfHooks';
|
|
35
|
+
const previousCrashWasBecauseOfHooks = window.localStorage.getItem(key);
|
|
36
|
+
// When rendering conditional hooks, refreshing does not help.
|
|
37
|
+
// So we only refresh once.
|
|
38
|
+
const justRefreshedBecauseOfHooks = previousCrashWasBecauseOfHooks
|
|
39
|
+
? Date.now() - Number(previousCrashWasBecauseOfHooks) < 5000
|
|
40
|
+
: false;
|
|
41
|
+
window.localStorage.setItem('remotion.lastCrashBecauseOfHooks', String(Date.now()));
|
|
42
|
+
if (didHookOrderChange && !justRefreshedBecauseOfHooks) {
|
|
35
43
|
// eslint-disable-next-line no-console
|
|
36
44
|
console.log('Hook order changed. Reloading app...');
|
|
37
45
|
window.location.reload();
|
|
@@ -26,6 +26,6 @@ const Button = ({ children, onClick, disabled, style }) => {
|
|
|
26
26
|
...(style !== null && style !== void 0 ? style : {}),
|
|
27
27
|
};
|
|
28
28
|
}, [style]);
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)("button", { style: combined, type: "button", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)("div", { style: buttonContainer, children: children }) }));
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("button", { style: combined, type: "button", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: buttonContainer, children: children }) }));
|
|
30
30
|
};
|
|
31
31
|
exports.Button = Button;
|
|
@@ -13,6 +13,8 @@ const lineNumber = {
|
|
|
13
13
|
paddingLeft: 10,
|
|
14
14
|
paddingRight: 12,
|
|
15
15
|
marginRight: 12,
|
|
16
|
+
color: 'inherit',
|
|
17
|
+
fontSize: 14,
|
|
16
18
|
};
|
|
17
19
|
const CodeFrame = ({ source, lineNumberWidth }) => {
|
|
18
20
|
return ((0, jsx_runtime_1.jsx)("div", { style: frame, children: source.map((s, j) => {
|
|
@@ -16,9 +16,11 @@ const container = {
|
|
|
16
16
|
marginBottom: 15,
|
|
17
17
|
};
|
|
18
18
|
const messageContainer = {
|
|
19
|
+
overflow: 'hidden',
|
|
20
|
+
};
|
|
21
|
+
const textContainer = {
|
|
19
22
|
fontSize,
|
|
20
23
|
lineHeight,
|
|
21
|
-
overflow: 'hidden',
|
|
22
24
|
};
|
|
23
25
|
const moreLine = {
|
|
24
26
|
width: '100%',
|
|
@@ -62,6 +64,6 @@ const ErrorMessage = ({ message }) => {
|
|
|
62
64
|
const toggle = (0, react_1.useCallback)(() => {
|
|
63
65
|
setExpanded((e) => !e);
|
|
64
66
|
}, []);
|
|
65
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: style, children: (0, jsx_runtime_1.jsx)("div", { ref: ref, children: message }) }), errorLines !== null && errorLines > maxLines ? ((0, jsx_runtime_1.jsx)("div", { style: moreLine, children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: toggle, style: moreButton, children: (0, jsx_runtime_1.jsx)(carets_1.CaretDown, { invert: expanded }) }) })) : null] }));
|
|
67
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: style, children: (0, jsx_runtime_1.jsx)("div", { ref: ref, style: textContainer, children: message }) }), errorLines !== null && errorLines > maxLines ? ((0, jsx_runtime_1.jsx)("div", { style: moreLine, children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: toggle, style: moreButton, children: (0, jsx_runtime_1.jsx)(carets_1.CaretDown, { invert: expanded }) }) })) : null] }));
|
|
66
68
|
};
|
|
67
69
|
exports.ErrorMessage = ErrorMessage;
|
|
@@ -32,6 +32,6 @@ const spacer = {
|
|
|
32
32
|
width: 5,
|
|
33
33
|
};
|
|
34
34
|
const ErrorTitle = ({ name, message, symbolicating }) => {
|
|
35
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: title, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("span", { style: errName, children: name }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [symbolicating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Symbolicating_1.Symbolicating, {}), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)(ErrorMessage_1.ErrorMessage, { message: message })] })] }), (0, react_overlay_1.didUnmountReactApp)() ? null : (0, jsx_runtime_1.jsx)(DismissButton_1.DismissButton, {})] }));
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: title, className: "css-reset", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("span", { style: errName, children: name }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [symbolicating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Symbolicating_1.Symbolicating, {}), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)(ErrorMessage_1.ErrorMessage, { message: message })] })] }), (0, react_overlay_1.didUnmountReactApp)() ? null : (0, jsx_runtime_1.jsx)(DismissButton_1.DismissButton, {})] }));
|
|
36
36
|
};
|
|
37
37
|
exports.ErrorTitle = ErrorTitle;
|
|
@@ -10,6 +10,7 @@ const format_location_1 = require("./format-location");
|
|
|
10
10
|
const location = {
|
|
11
11
|
color: 'rgba(255, 255, 255, 0.6)',
|
|
12
12
|
fontFamily: 'monospace',
|
|
13
|
+
fontSize: 14,
|
|
13
14
|
};
|
|
14
15
|
const header = {
|
|
15
16
|
paddingLeft: 14,
|
|
@@ -28,6 +29,7 @@ const left = {
|
|
|
28
29
|
};
|
|
29
30
|
const fnName = {
|
|
30
31
|
fontSize: 14,
|
|
32
|
+
lineHeight: 1.5,
|
|
31
33
|
marginBottom: 3,
|
|
32
34
|
};
|
|
33
35
|
const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
|
|
@@ -41,7 +43,7 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
|
|
|
41
43
|
const toggleCodeFrame = (0, react_1.useCallback)(() => {
|
|
42
44
|
setShowCodeFrame((f) => !f);
|
|
43
45
|
}, []);
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: header, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }), s.originalFileName ? ((0, jsx_runtime_1.jsxs)("div", { style: location, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : null] }), s.originalScriptCode && s.originalScriptCode.length > 0 ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: toggleCodeFrame, children: showCodeFrame ? (0, jsx_runtime_1.jsx)(carets_1.CaretDown, { invert: false }) : (0, jsx_runtime_1.jsx)(carets_1.CaretRight, {}) })) : null] }), (0, jsx_runtime_1.jsx)("div", { children: s.originalScriptCode &&
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "css-reset", children: [(0, jsx_runtime_1.jsxs)("div", { style: header, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }), s.originalFileName ? ((0, jsx_runtime_1.jsxs)("div", { style: location, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : null] }), s.originalScriptCode && s.originalScriptCode.length > 0 ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: toggleCodeFrame, children: showCodeFrame ? (0, jsx_runtime_1.jsx)(carets_1.CaretDown, { invert: false }) : (0, jsx_runtime_1.jsx)(carets_1.CaretRight, {}) })) : null] }), (0, jsx_runtime_1.jsx)("div", { children: s.originalScriptCode &&
|
|
45
47
|
s.originalScriptCode.length > 0 &&
|
|
46
48
|
showCodeFrame ? ((0, jsx_runtime_1.jsx)(CodeFrame_1.CodeFrame, { lineNumberWidth: lineNumberWidth, source: s.originalScriptCode })) : null })] }));
|
|
47
49
|
};
|
|
@@ -3,6 +3,7 @@ declare type LockfilePath = {
|
|
|
3
3
|
manager: PackageManager;
|
|
4
4
|
path: string;
|
|
5
5
|
installCommand: string;
|
|
6
|
+
startCommand: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const lockFilePaths: LockfilePath[];
|
|
8
9
|
export declare const getPackageManager: (remotionRoot: string) => LockfilePath | 'unknown';
|
|
@@ -7,16 +7,23 @@ exports.getPackageManager = exports.lockFilePaths = void 0;
|
|
|
7
7
|
const fs_1 = __importDefault(require("fs"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
exports.lockFilePaths = [
|
|
10
|
-
{
|
|
10
|
+
{
|
|
11
|
+
path: 'package-lock.json',
|
|
12
|
+
manager: 'npm',
|
|
13
|
+
installCommand: 'npm i',
|
|
14
|
+
startCommand: 'npm start',
|
|
15
|
+
},
|
|
11
16
|
{
|
|
12
17
|
path: 'yarn.lock',
|
|
13
18
|
manager: 'yarn',
|
|
14
19
|
installCommand: 'yarn add',
|
|
20
|
+
startCommand: 'yarn start',
|
|
15
21
|
},
|
|
16
22
|
{
|
|
17
23
|
path: 'pnpm-lock.yaml',
|
|
18
24
|
manager: 'pnpm',
|
|
19
25
|
installCommand: 'pnpm i',
|
|
26
|
+
startCommand: 'pnpm start',
|
|
20
27
|
},
|
|
21
28
|
];
|
|
22
29
|
const getPackageManager = (remotionRoot) => {
|
|
@@ -10,6 +10,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
10
10
|
const url_1 = require("url");
|
|
11
11
|
const get_file_source_1 = require("./error-overlay/react-overlay/utils/get-file-source");
|
|
12
12
|
const open_in_editor_1 = require("./error-overlay/react-overlay/utils/open-in-editor");
|
|
13
|
+
const get_package_manager_1 = require("./get-package-manager");
|
|
13
14
|
const project_info_1 = require("./project-info");
|
|
14
15
|
const serve_static_1 = require("./serve-static");
|
|
15
16
|
const update_available_1 = require("./update-available");
|
|
@@ -29,12 +30,14 @@ const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputPro
|
|
|
29
30
|
const displayName = (0, open_in_editor_1.getDisplayNameForEditor)(edit ? edit.command : null);
|
|
30
31
|
response.setHeader('content-type', 'text/html');
|
|
31
32
|
response.writeHead(200);
|
|
33
|
+
const packageManager = (0, get_package_manager_1.getPackageManager)(remotionRoot);
|
|
32
34
|
response.end(bundler_1.BundlerInternals.indexHtml({
|
|
33
35
|
staticHash: hash,
|
|
34
36
|
baseDir: '/',
|
|
35
37
|
editorName: displayName,
|
|
36
38
|
inputProps: getCurrentInputProps(),
|
|
37
39
|
remotionRoot,
|
|
40
|
+
previewServerCommand: packageManager === 'unknown' ? null : packageManager.startCommand,
|
|
38
41
|
}));
|
|
39
42
|
};
|
|
40
43
|
const handleProjectInfo = async (remotionRoot, _, response) => {
|
package/dist/previewEntry.js
CHANGED
|
@@ -9,13 +9,19 @@ const client_1 = __importDefault(require("react-dom/client"));
|
|
|
9
9
|
const remotion_1 = require("remotion");
|
|
10
10
|
require("../styles/styles.css");
|
|
11
11
|
const Editor_1 = require("./editor/components/Editor");
|
|
12
|
+
const ServerDisconnected_1 = require("./editor/components/Notifications/ServerDisconnected");
|
|
12
13
|
const event_source_1 = require("./event-source");
|
|
13
14
|
remotion_1.Internals.CSSUtils.injectCSS(remotion_1.Internals.CSSUtils.makeDefaultCSS(null, '#1f2428'));
|
|
15
|
+
const getServerDisconnectedDomElement = () => {
|
|
16
|
+
return document.getElementById('server-disconnected-overlay');
|
|
17
|
+
};
|
|
14
18
|
const content = ((0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionRoot, { children: (0, jsx_runtime_1.jsx)(Editor_1.Editor, {}) }));
|
|
15
19
|
if (client_1.default.createRoot) {
|
|
16
20
|
client_1.default.createRoot(remotion_1.Internals.getPreviewDomElement()).render(content);
|
|
21
|
+
client_1.default.createRoot(getServerDisconnectedDomElement()).render((0, jsx_runtime_1.jsx)(ServerDisconnected_1.ServerDisconnected, {}));
|
|
17
22
|
}
|
|
18
23
|
else {
|
|
19
24
|
client_1.default.render((0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionRoot, { children: (0, jsx_runtime_1.jsx)(Editor_1.Editor, {}) }), remotion_1.Internals.getPreviewDomElement());
|
|
25
|
+
client_1.default.render((0, jsx_runtime_1.jsx)(ServerDisconnected_1.ServerDisconnected, {}), getServerDisconnectedDomElement());
|
|
20
26
|
}
|
|
21
27
|
(0, event_source_1.openEventSource)();
|
package/dist/progress-bar.js
CHANGED
|
@@ -50,12 +50,17 @@ const makeRenderingProgress = ({ frames, totalFrames, steps, concurrency, doneIn
|
|
|
50
50
|
exports.makeRenderingProgress = makeRenderingProgress;
|
|
51
51
|
const makeStitchingProgress = ({ frames, totalFrames, steps, doneIn, stage, codec, }) => {
|
|
52
52
|
const progress = frames / totalFrames;
|
|
53
|
+
const mediaType = codec === 'gif'
|
|
54
|
+
? 'GIF'
|
|
55
|
+
: renderer_1.RenderInternals.isAudioCodec(codec)
|
|
56
|
+
? 'audio'
|
|
57
|
+
: 'video';
|
|
53
58
|
return [
|
|
54
59
|
`(${steps.indexOf('stitching') + 1}/${steps.length})`,
|
|
55
60
|
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
56
61
|
stage === 'muxing' && renderer_1.RenderInternals.canUseParallelEncoding(codec)
|
|
57
|
-
? `${doneIn ? 'Muxed' : 'Muxing'}
|
|
58
|
-
: `${doneIn ? 'Encoded' : 'Encoding'} ${
|
|
62
|
+
? `${doneIn ? 'Muxed' : 'Muxing'} ${mediaType}`
|
|
63
|
+
: `${doneIn ? 'Encoded' : 'Encoding'} ${mediaType}`,
|
|
59
64
|
doneIn === null ? `${frames}/${totalFrames}` : chalk_1.chalk.gray(`${doneIn}ms`),
|
|
60
65
|
].join(' ');
|
|
61
66
|
};
|
package/dist/render.js
CHANGED
|
@@ -36,7 +36,7 @@ const render = async (remotionRoot) => {
|
|
|
36
36
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
37
37
|
await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'sequence');
|
|
38
38
|
log_1.Log.verbose('Asset dirs', downloadMap.assetDir);
|
|
39
|
-
const { codec, proResProfile, parallelism, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, quality, browser, crf, pixelFormat, imageFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, numberOfGifLoops, everyNthFrame, puppeteerTimeout, } = await (0, get_cli_options_1.getCliOptions)({
|
|
39
|
+
const { codec, proResProfile, parallelism, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, quality, browser, crf, pixelFormat, imageFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, numberOfGifLoops, everyNthFrame, puppeteerTimeout, muted, enforceAudioTrack, } = await (0, get_cli_options_1.getCliOptions)({
|
|
40
40
|
isLambda: false,
|
|
41
41
|
type: 'series',
|
|
42
42
|
});
|
|
@@ -232,6 +232,8 @@ const render = async (remotionRoot) => {
|
|
|
232
232
|
everyNthFrame,
|
|
233
233
|
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
234
234
|
downloadMap,
|
|
235
|
+
muted,
|
|
236
|
+
enforceAudioTrack,
|
|
235
237
|
});
|
|
236
238
|
log_1.Log.info();
|
|
237
239
|
log_1.Log.info();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
24
24
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/bundler": "3.2.
|
|
27
|
-
"@remotion/media-utils": "3.2.
|
|
28
|
-
"@remotion/player": "3.2.
|
|
29
|
-
"@remotion/renderer": "3.2.
|
|
26
|
+
"@remotion/bundler": "3.2.3",
|
|
27
|
+
"@remotion/media-utils": "3.2.3",
|
|
28
|
+
"@remotion/player": "3.2.3",
|
|
29
|
+
"@remotion/renderer": "3.2.3",
|
|
30
30
|
"better-opn": "2.1.1",
|
|
31
31
|
"dotenv": "9.0.2",
|
|
32
32
|
"memfs": "3.4.3",
|
|
33
33
|
"minimist": "1.2.6",
|
|
34
|
-
"remotion": "3.2.
|
|
34
|
+
"remotion": "3.2.3",
|
|
35
35
|
"semver": "7.3.5",
|
|
36
36
|
"source-map": "0.6.1"
|
|
37
37
|
},
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "15773a2e48ee8a9dbcfd898520cb914396c21eb1"
|
|
75
75
|
}
|