@remotion/cli 4.0.12 → 4.0.15
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/cloudrun-command.d.ts +1 -0
- package/dist/cloudrun-command.js +27 -0
- package/dist/editor/components/AssetSelector.d.ts +2 -0
- package/dist/editor/components/AssetSelector.js +85 -0
- package/dist/editor/components/AssetSelectorItem.d.ts +6 -0
- package/dist/editor/components/AssetSelectorItem.js +125 -0
- package/dist/editor/components/CompositionSelector.js +3 -3
- package/dist/editor/components/CopyButton.js +8 -2
- package/dist/editor/components/ExplorerPanel.d.ts +8 -0
- package/dist/editor/components/ExplorerPanel.js +67 -0
- package/dist/editor/components/InlineAction.d.ts +1 -0
- package/dist/editor/components/InlineAction.js +2 -2
- package/dist/editor/components/OptionsPanel.d.ts +8 -0
- package/dist/editor/components/OptionsPanel.js +112 -0
- package/dist/editor/components/RenderModal/CliCopyButton.js +2 -1
- package/dist/editor/components/RenderModal/MultiRangeSlider.js +4 -7
- package/dist/editor/components/RenderModal/RenderModal.js +7 -7
- package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/editor/components/TopPanel.js +4 -8
- package/dist/editor/components/UpdateModal/UpdateModal.js +4 -1
- package/dist/editor/helpers/copy-text.d.ts +1 -1
- package/dist/editor/helpers/copy-text.js +15 -10
- package/dist/editor/helpers/pick-color.js +12 -7
- package/dist/editor/icons/clipboard.d.ts +4 -0
- package/dist/editor/icons/clipboard.js +6 -0
- package/dist/editor/icons/file.d.ts +3 -1
- package/dist/editor/icons/file.js +1 -1
- package/dist/editor/icons/folder.d.ts +3 -0
- package/dist/editor/icons/folder.js +5 -1
- package/dist/event-source-events.d.ts +1 -0
- package/dist/event-source.js +1 -0
- package/dist/handle-common-errors.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/make-on-download.d.ts +12 -0
- package/dist/make-on-download.js +40 -0
- package/dist/parse-command-line.d.ts +1 -0
- package/dist/preview-server/public-folder.js +3 -0
- package/dist/preview-server/render-queue/process-still.js +1 -1
- package/dist/preview-server/routes.js +1 -0
- package/dist/progress-bar.js +2 -7
- package/dist/render-flows/render.js +17 -25
- package/dist/render-flows/still.d.ts +2 -2
- package/dist/render-flows/still.js +30 -40
- package/dist/still.js +1 -1
- package/dist/studio.js +8 -1
- package/dist/upgrade.d.ts +1 -1
- package/dist/upgrade.js +11 -4
- package/package.json +8 -8
- package/styles/styles.css +7 -17
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RenderQueueOpenInFinderItem = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const folder_1 = require("../../icons/folder");
|
|
6
7
|
const InlineAction_1 = require("../InlineAction");
|
|
7
8
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
9
|
const actions_1 = require("./actions");
|
|
@@ -19,7 +20,7 @@ const RenderQueueOpenInFinderItem = ({ job, }) => {
|
|
|
19
20
|
};
|
|
20
21
|
}, []);
|
|
21
22
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
22
|
-
return (
|
|
23
|
+
return (0, jsx_runtime_1.jsx)(folder_1.ExpandedFolderIconSolid, { style: icon, color: color });
|
|
23
24
|
}, [icon]);
|
|
24
25
|
return (0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
|
|
25
26
|
};
|
|
@@ -6,12 +6,12 @@ const react_1 = require("react");
|
|
|
6
6
|
const use_breakpoint_1 = require("../helpers/use-breakpoint");
|
|
7
7
|
const sidebar_1 = require("../state/sidebar");
|
|
8
8
|
const CanvasOrLoading_1 = require("./CanvasOrLoading");
|
|
9
|
-
const CompositionSelector_1 = require("./CompositionSelector");
|
|
10
9
|
const CurrentCompositionSideEffects_1 = require("./CurrentCompositionSideEffects");
|
|
10
|
+
const ExplorerPanel_1 = require("./ExplorerPanel");
|
|
11
11
|
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
12
12
|
const MenuToolbar_1 = require("./MenuToolbar");
|
|
13
|
+
const OptionsPanel_1 = require("./OptionsPanel");
|
|
13
14
|
const PreviewToolbar_1 = require("./PreviewToolbar");
|
|
14
|
-
const RightPanel_1 = require("./RightPanel");
|
|
15
15
|
const SplitterContainer_1 = require("./Splitter/SplitterContainer");
|
|
16
16
|
const SplitterElement_1 = require("./Splitter/SplitterElement");
|
|
17
17
|
const SplitterHandle_1 = require("./Splitter/SplitterHandle");
|
|
@@ -26,16 +26,12 @@ const row = {
|
|
|
26
26
|
display: 'flex',
|
|
27
27
|
flexDirection: 'row',
|
|
28
28
|
flex: 1,
|
|
29
|
+
minHeight: 0,
|
|
29
30
|
};
|
|
30
31
|
const canvasContainer = {
|
|
31
32
|
flex: 1,
|
|
32
33
|
display: 'flex',
|
|
33
34
|
};
|
|
34
|
-
const leftContainer = {
|
|
35
|
-
flex: 1,
|
|
36
|
-
display: 'flex',
|
|
37
|
-
maxWidth: '100%',
|
|
38
|
-
};
|
|
39
35
|
const useResponsiveSidebarStatus = () => {
|
|
40
36
|
const { sidebarCollapsedStateLeft } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
41
37
|
const responsiveLeftStatus = (0, use_breakpoint_1.useBreakpoint)(1200) ? 'collapsed' : 'expanded';
|
|
@@ -66,6 +62,6 @@ const TopPanel = () => {
|
|
|
66
62
|
const onCollapseRight = (0, react_1.useCallback)(() => {
|
|
67
63
|
setSidebarCollapsedState({ left: null, right: 'collapsed' });
|
|
68
64
|
}, [setSidebarCollapsedState]);
|
|
69
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(
|
|
65
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(ExplorerPanel_1.ExplorerPanel, {}) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(CanvasOrLoading_1.CanvasOrLoading, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(OptionsPanel_1.OptionsPanel, {}) })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
|
|
70
66
|
};
|
|
71
67
|
exports.TopPanel = TopPanel;
|
|
@@ -10,6 +10,7 @@ const CopyButton_1 = require("../CopyButton");
|
|
|
10
10
|
const layout_1 = require("../layout");
|
|
11
11
|
const ModalContainer_1 = require("../ModalContainer");
|
|
12
12
|
const ModalHeader_1 = require("../ModalHeader");
|
|
13
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
13
14
|
const container = {
|
|
14
15
|
padding: 20,
|
|
15
16
|
paddingTop: 0,
|
|
@@ -38,6 +39,8 @@ const UpdateModal = ({ info }) => {
|
|
|
38
39
|
setSelectedModal(null);
|
|
39
40
|
}, [setSelectedModal]);
|
|
40
41
|
const command = commands[info.packageManager];
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.copyText)(command)
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.copyText)(command).catch((err) => {
|
|
43
|
+
(0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
|
|
44
|
+
}), style: code, children: command }) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { textToCopy: command, label: "Copy command", labelWhenCopied: "Copied!" })] }), (0, jsx_runtime_1.jsxs)("p", { children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Read the", ' ', (0, jsx_runtime_1.jsx)("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })] })] }));
|
|
42
45
|
};
|
|
43
46
|
exports.UpdateModal = UpdateModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const copyText: (cmd: string) => void
|
|
1
|
+
export declare const copyText: (cmd: string) => Promise<void>;
|
|
@@ -3,16 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.copyText = void 0;
|
|
4
4
|
const copyText = (cmd) => {
|
|
5
5
|
const permissionName = 'clipboard-write';
|
|
6
|
-
|
|
7
|
-
.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
return new Promise((resolve, reject) => {
|
|
7
|
+
navigator.permissions
|
|
8
|
+
.query({ name: permissionName })
|
|
9
|
+
.then((result) => {
|
|
10
|
+
if (result.state === 'granted' || result.state === 'prompt') {
|
|
11
|
+
navigator.clipboard.writeText(cmd);
|
|
12
|
+
resolve();
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
reject(new Error('Permission to copy not granted'));
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
.catch((err) => {
|
|
19
|
+
reject(err);
|
|
20
|
+
});
|
|
16
21
|
});
|
|
17
22
|
};
|
|
18
23
|
exports.copyText = copyText;
|
|
@@ -11,13 +11,18 @@ const pickColor = () => {
|
|
|
11
11
|
const open = new EyeDropper().open();
|
|
12
12
|
open
|
|
13
13
|
.then((color) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
(0, copy_text_1.copyText)(color.sRGBHex)
|
|
15
|
+
.then(() => {
|
|
16
|
+
var _a;
|
|
17
|
+
(_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
|
|
18
|
+
content: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorDot_1.ColorDot, { color: color.sRGBHex }), " ", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), " Copied", ' ', color.sRGBHex] })),
|
|
19
|
+
created: Date.now(),
|
|
20
|
+
duration: 2000,
|
|
21
|
+
id: String(Math.random()),
|
|
22
|
+
});
|
|
23
|
+
})
|
|
24
|
+
.catch((err) => {
|
|
25
|
+
(0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
|
|
21
26
|
});
|
|
22
27
|
})
|
|
23
28
|
.catch((err) => {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClipboardIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ClipboardIcon = ({ color, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 384 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }) }));
|
|
6
|
+
exports.ClipboardIcon = ClipboardIcon;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FileIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const FileIcon = (props) => ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill:
|
|
5
|
+
const FileIcon = ({ color, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color !== null && color !== void 0 ? color : 'currentColor', d: "M0 64C0 28.65 28.65 0 64 0h156.1c12.7 0 25 5.057 34 14.06L369.9 129.9c9 9 14.1 21.3 14.1 34V448c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V64zm352 128H240c-26.5 0-48-21.5-48-48V32H64c-17.67 0-32 14.33-32 32v384c0 17.7 14.33 32 32 32h256c17.7 0 32-14.3 32-32V192zm-4.7-39.4L231.4 36.69c-2-2.07-4.6-3.51-7.4-4.21V144c0 8.8 7.2 16 16 16h111.5c-.7-2.8-2.1-5.4-4.2-7.4z" }) }));
|
|
6
6
|
exports.FileIcon = FileIcon;
|
|
@@ -6,3 +6,6 @@ export declare const CollapsedFolderIcon: React.FC<SVGProps<SVGSVGElement> & {
|
|
|
6
6
|
export declare const ExpandedFolderIcon: React.FC<SVGProps<SVGSVGElement> & {
|
|
7
7
|
color: string;
|
|
8
8
|
}>;
|
|
9
|
+
export declare const ExpandedFolderIconSolid: React.FC<SVGProps<SVGSVGElement> & {
|
|
10
|
+
color: string;
|
|
11
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExpandedFolderIcon = exports.CollapsedFolderIcon = void 0;
|
|
3
|
+
exports.ExpandedFolderIconSolid = exports.ExpandedFolderIcon = exports.CollapsedFolderIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const CollapsedFolderIcon = ({ color, ...props }) => {
|
|
6
6
|
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M447.1 96H272L226.7 50.75C214.7 38.74 198.5 32 181.5 32H63.1c-35.35 0-64 28.65-64 64v320c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V160C511.1 124.7 483.3 96 447.1 96zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V96c0-17.64 14.36-32 32-32h117.5c8.549 0 16.58 3.328 22.63 9.375L258.7 128H448c17.64 0 32 14.36 32 32V416z" }) }));
|
|
@@ -10,3 +10,7 @@ const ExpandedFolderIcon = ({ color, ...props }) => {
|
|
|
10
10
|
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M566.6 211.6C557.5 199.1 543.4 192 527.1 192H134.2C114.3 192 96.2 204.5 89.23 223.1L32 375.8V96c0-17.64 14.36-32 32-32h117.5c8.549 0 16.58 3.328 22.63 9.375L258.7 128H448c17.64 0 32 14.36 32 32h32c0-35.35-28.65-64-64-64H272L226.7 50.75C214.7 38.74 198.5 32 181.5 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h403.1c21.11 0 39.53-13.53 45.81-33.69l60-192C578.4 239.6 575.8 224 566.6 211.6zM543.2 244.8l-60 192C481.1 443.5 475 448 467.1 448H64c-3.322 0-6.357-.9551-9.373-1.898c-2.184-1.17-4.109-2.832-5.596-4.977c-3.031-4.375-3.703-9.75-1.828-14.73l72-192C121.5 228.2 127.5 224 134.2 224h393.8c5.141 0 9.844 2.375 12.89 6.516C543.9 234.7 544.8 239.9 543.2 244.8z" }) }));
|
|
11
11
|
};
|
|
12
12
|
exports.ExpandedFolderIcon = ExpandedFolderIcon;
|
|
13
|
+
const ExpandedFolderIconSolid = ({ color, ...props }) => {
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M384 480h48c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224H144c-11.4 0-21.9 6-27.6 15.9L48 357.1V96c0-8.8 7.2-16 16-16H181.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8H416c8.8 0 16 7.2 16 16v32h48V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H87.7 384z" }) }));
|
|
15
|
+
};
|
|
16
|
+
exports.ExpandedFolderIconSolid = ExpandedFolderIconSolid;
|
package/dist/event-source.js
CHANGED
|
@@ -36,6 +36,7 @@ const openEventSource = () => {
|
|
|
36
36
|
}
|
|
37
37
|
if (newEvent.type === 'new-public-folder') {
|
|
38
38
|
window.remotion_staticFiles = newEvent.files;
|
|
39
|
+
window.remotion_publicFolderExists = newEvent.folderExists;
|
|
39
40
|
}
|
|
40
41
|
listeners.forEach((l) => {
|
|
41
42
|
if (l.type === newEvent.type) {
|
|
@@ -27,8 +27,8 @@ const handleCommonError = async (err, logLevel) => {
|
|
|
27
27
|
}
|
|
28
28
|
if (err.message.includes('Error creating WebGL context')) {
|
|
29
29
|
log_1.Log.info();
|
|
30
|
-
log_1.Log.
|
|
31
|
-
log_1.Log.
|
|
30
|
+
log_1.Log.warn('💡 You might need to set the OpenGL renderer to "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
|
|
31
|
+
log_1.Log.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
|
|
32
32
|
}
|
|
33
33
|
if (err.message.includes('The bucket does not allow ACLs')) {
|
|
34
34
|
log_1.Log.info();
|
package/dist/index.d.ts
CHANGED
|
@@ -136,6 +136,7 @@ export declare const CliInternals: {
|
|
|
136
136
|
"every-nth-frame": number;
|
|
137
137
|
"number-of-gif-loops": number;
|
|
138
138
|
"number-of-shared-audio-tags": number;
|
|
139
|
+
version: string;
|
|
139
140
|
codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
|
|
140
141
|
concurrency: number;
|
|
141
142
|
timeout: number;
|
package/dist/index.js
CHANGED
|
@@ -90,7 +90,7 @@ const cli = async () => {
|
|
|
90
90
|
(0, ffmpeg_1.ffprobeCommand)(remotionRoot, process.argv.slice(3));
|
|
91
91
|
}
|
|
92
92
|
else if (command === 'upgrade') {
|
|
93
|
-
await (0, upgrade_1.upgrade)(remotionRoot, parse_command_line_1.parsedCli['package-manager']);
|
|
93
|
+
await (0, upgrade_1.upgrade)(remotionRoot, parse_command_line_1.parsedCli['package-manager'], parse_command_line_1.parsedCli.version);
|
|
94
94
|
}
|
|
95
95
|
else if (command === versions_1.VERSIONS_COMMAND) {
|
|
96
96
|
await (0, versions_1.versionsCommand)(remotionRoot);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LogLevel, RenderMediaOnDownload } from '@remotion/renderer';
|
|
2
|
+
import type { DownloadProgress } from './progress-types';
|
|
3
|
+
export declare const makeOnDownload: ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, }: {
|
|
4
|
+
indent: boolean;
|
|
5
|
+
logLevel: LogLevel;
|
|
6
|
+
updatesDontOverwrite: boolean;
|
|
7
|
+
downloads: DownloadProgress[];
|
|
8
|
+
updateRenderProgress: (progress: {
|
|
9
|
+
newline: boolean;
|
|
10
|
+
printToConsole: boolean;
|
|
11
|
+
}) => void;
|
|
12
|
+
}) => RenderMediaOnDownload;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeOnDownload = void 0;
|
|
4
|
+
const format_bytes_1 = require("./format-bytes");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, updateRenderProgress, }) => {
|
|
7
|
+
return (src) => {
|
|
8
|
+
const id = Math.random();
|
|
9
|
+
const download = {
|
|
10
|
+
id,
|
|
11
|
+
name: src,
|
|
12
|
+
progress: 0,
|
|
13
|
+
downloaded: 0,
|
|
14
|
+
totalBytes: null,
|
|
15
|
+
};
|
|
16
|
+
const nextDownloadIndex = downloads.length;
|
|
17
|
+
downloads.push(download);
|
|
18
|
+
log_1.Log.verboseAdvanced({ indent, logLevel }, `Starting download [${nextDownloadIndex}]:`, src);
|
|
19
|
+
updateRenderProgress({
|
|
20
|
+
newline: false,
|
|
21
|
+
printToConsole: !updatesDontOverwrite,
|
|
22
|
+
});
|
|
23
|
+
let lastUpdate = Date.now();
|
|
24
|
+
return ({ percent, downloaded, totalSize }) => {
|
|
25
|
+
download.progress = percent;
|
|
26
|
+
download.totalBytes = totalSize;
|
|
27
|
+
download.downloaded = downloaded;
|
|
28
|
+
if (lastUpdate + 1000 > Date.now() && updatesDontOverwrite) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
lastUpdate = Date.now();
|
|
32
|
+
log_1.Log.verboseAdvanced({ indent, logLevel }, `Download [${nextDownloadIndex}]:`, percent ? `${(percent * 100).toFixed(1)}%` : (0, format_bytes_1.formatBytes)(downloaded));
|
|
33
|
+
updateRenderProgress({
|
|
34
|
+
newline: false,
|
|
35
|
+
printToConsole: !updatesDontOverwrite,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
exports.makeOnDownload = makeOnDownload;
|
|
@@ -38,12 +38,15 @@ const watchPublicFolder = ({ publicDir, onUpdate, staticHash, }) => {
|
|
|
38
38
|
onUpdate,
|
|
39
39
|
staticHash,
|
|
40
40
|
});
|
|
41
|
+
onUpdate();
|
|
41
42
|
watcher.close();
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
45
|
const watcher = (0, node_fs_1.watch)(parentDir, {}, onDirChange);
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
48
|
+
// Known bug: If whole public folder is deleted, this will not be called on macOS.
|
|
49
|
+
// This is not severe, so a wontfix for now.
|
|
47
50
|
(0, node_fs_1.watch)(publicDir, { recursive: (0, env_supports_fs_recursive_1.envSupportsFsRecursive)() }, () => {
|
|
48
51
|
(0, exports.fetchFolder)({ publicDir, staticHash });
|
|
49
52
|
onUpdate();
|
|
@@ -37,7 +37,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
|
|
|
37
37
|
imageFormatFromUi: job.imageFormat,
|
|
38
38
|
logLevel: job.verbose ? 'verbose' : 'info',
|
|
39
39
|
onProgress,
|
|
40
|
-
|
|
40
|
+
indent: true,
|
|
41
41
|
addCleanupCallback,
|
|
42
42
|
cancelSignal: job.cancelToken.cancelSignal,
|
|
43
43
|
outputLocationFromUi: job.outName,
|
|
@@ -96,6 +96,7 @@ const handleFallback = async ({ remotionRoot, hash, response, getCurrentInputPro
|
|
|
96
96
|
ignoreCertificateErrors,
|
|
97
97
|
openGlRenderer,
|
|
98
98
|
},
|
|
99
|
+
publicFolderExists: (0, node_fs_1.existsSync)(publicDir) ? publicDir : null,
|
|
99
100
|
}));
|
|
100
101
|
};
|
|
101
102
|
const handleProjectInfo = async (remotionRoot, _, response) => {
|
package/dist/progress-bar.js
CHANGED
|
@@ -5,6 +5,7 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
5
5
|
const ansi_diff_1 = require("./ansi/ansi-diff");
|
|
6
6
|
const chalk_1 = require("./chalk");
|
|
7
7
|
const download_progress_1 = require("./download-progress");
|
|
8
|
+
const format_bytes_1 = require("./format-bytes");
|
|
8
9
|
const make_progress_bar_1 = require("./make-progress-bar");
|
|
9
10
|
const truthy_1 = require("./truthy");
|
|
10
11
|
const createOverwriteableCliOutput = (options) => {
|
|
@@ -171,13 +172,7 @@ const getGuiProgressSubtitle = (progress) => {
|
|
|
171
172
|
return `Bundling ${Math.round(progress.bundling.progress * 100)}%`;
|
|
172
173
|
}
|
|
173
174
|
if (progress.copyingState.doneIn === null) {
|
|
174
|
-
|
|
175
|
-
notation: 'compact',
|
|
176
|
-
style: 'unit',
|
|
177
|
-
unit: 'byte',
|
|
178
|
-
unitDisplay: 'narrow',
|
|
179
|
-
});
|
|
180
|
-
return `Copying public dir ${bytes.format(progress.copyingState.bytes)}`;
|
|
175
|
+
return `Copying public dir ${(0, format_bytes_1.formatBytes)(progress.copyingState.bytes)}`;
|
|
181
176
|
}
|
|
182
177
|
if (!progress.rendering) {
|
|
183
178
|
return `Getting compositions`;
|
|
@@ -40,6 +40,7 @@ const get_filename_1 = require("../get-filename");
|
|
|
40
40
|
const get_final_output_codec_1 = require("../get-final-output-codec");
|
|
41
41
|
const image_formats_1 = require("../image-formats");
|
|
42
42
|
const log_1 = require("../log");
|
|
43
|
+
const make_on_download_1 = require("../make-on-download");
|
|
43
44
|
const parse_command_line_1 = require("../parse-command-line");
|
|
44
45
|
const progress_bar_1 = require("../progress-bar");
|
|
45
46
|
const setup_cache_1 = require("../setup-cache");
|
|
@@ -83,7 +84,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
83
84
|
bytes: 0,
|
|
84
85
|
doneIn: null,
|
|
85
86
|
};
|
|
86
|
-
const updateRenderProgress = (newline) => {
|
|
87
|
+
const updateRenderProgress = ({ newline, printToConsole, }) => {
|
|
87
88
|
const aggregateRenderProgress = {
|
|
88
89
|
rendering: renderingProgress,
|
|
89
90
|
stitching: shouldOutputImageSequence ? null : stitchingProgress,
|
|
@@ -97,7 +98,9 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
97
98
|
stitchingStep: steps.indexOf('stitching'),
|
|
98
99
|
});
|
|
99
100
|
onProgress({ message, value: progress, ...aggregateRenderProgress });
|
|
100
|
-
|
|
101
|
+
if (printToConsole) {
|
|
102
|
+
renderProgress.update(updatesDontOverwrite ? message : output, newline);
|
|
103
|
+
}
|
|
101
104
|
};
|
|
102
105
|
const { urlOrBundle, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
103
106
|
fullPath: fullEntryPoint,
|
|
@@ -106,7 +109,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
106
109
|
onProgress: ({ bundling, copying }) => {
|
|
107
110
|
bundlingProgress = bundling;
|
|
108
111
|
copyingState = copying;
|
|
109
|
-
updateRenderProgress(false);
|
|
112
|
+
updateRenderProgress({ newline: false, printToConsole: true });
|
|
110
113
|
},
|
|
111
114
|
indentOutput: indent,
|
|
112
115
|
logLevel,
|
|
@@ -118,24 +121,13 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
118
121
|
quietProgress: updatesDontOverwrite,
|
|
119
122
|
});
|
|
120
123
|
addCleanupCallback(() => cleanupBundle());
|
|
121
|
-
const onDownload = (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
totalBytes: null,
|
|
129
|
-
};
|
|
130
|
-
downloads.push(download);
|
|
131
|
-
updateRenderProgress(false);
|
|
132
|
-
return ({ percent, downloaded, totalSize }) => {
|
|
133
|
-
download.progress = percent;
|
|
134
|
-
download.totalBytes = totalSize;
|
|
135
|
-
download.downloaded = downloaded;
|
|
136
|
-
updateRenderProgress(false);
|
|
137
|
-
};
|
|
138
|
-
};
|
|
124
|
+
const onDownload = (0, make_on_download_1.makeOnDownload)({
|
|
125
|
+
downloads,
|
|
126
|
+
indent,
|
|
127
|
+
logLevel,
|
|
128
|
+
updateRenderProgress,
|
|
129
|
+
updatesDontOverwrite,
|
|
130
|
+
});
|
|
139
131
|
const puppeteerInstance = await browserInstance;
|
|
140
132
|
addCleanupCallback(() => puppeteerInstance.close(false, logLevel, indent));
|
|
141
133
|
const actualConcurrency = renderer_1.RenderInternals.getActualConcurrency(concurrency);
|
|
@@ -220,7 +212,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
220
212
|
serializedInputPropsWithCustomSchema,
|
|
221
213
|
onFrameUpdate: (rendered) => {
|
|
222
214
|
renderingProgress.frames = rendered;
|
|
223
|
-
updateRenderProgress(false);
|
|
215
|
+
updateRenderProgress({ newline: false, printToConsole: true });
|
|
224
216
|
},
|
|
225
217
|
onStart: () => undefined,
|
|
226
218
|
onDownload,
|
|
@@ -251,7 +243,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
251
243
|
data: config.props,
|
|
252
244
|
}).serializedString,
|
|
253
245
|
});
|
|
254
|
-
updateRenderProgress(true);
|
|
246
|
+
updateRenderProgress({ newline: true, printToConsole: true });
|
|
255
247
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
256
248
|
return;
|
|
257
249
|
}
|
|
@@ -303,7 +295,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
303
295
|
update.renderedDoneIn;
|
|
304
296
|
renderingProgress.frames =
|
|
305
297
|
update.renderedFrames;
|
|
306
|
-
updateRenderProgress(false);
|
|
298
|
+
updateRenderProgress({ newline: false, printToConsole: true });
|
|
307
299
|
},
|
|
308
300
|
puppeteerInstance,
|
|
309
301
|
onDownload,
|
|
@@ -323,7 +315,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
323
315
|
staticBase: null,
|
|
324
316
|
}).serializedString,
|
|
325
317
|
});
|
|
326
|
-
updateRenderProgress(true);
|
|
318
|
+
updateRenderProgress({ newline: true, printToConsole: true });
|
|
327
319
|
log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputFile}`));
|
|
328
320
|
log_1.Log.verboseAdvanced({ indent, logLevel }, `Slowest frames:`);
|
|
329
321
|
slowestFrames.forEach(({ frame, time }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
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, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress,
|
|
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, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, }: {
|
|
4
4
|
remotionRoot: string;
|
|
5
5
|
fullEntryPoint: string;
|
|
6
6
|
entryPointReason: string;
|
|
@@ -23,7 +23,7 @@ export declare const renderStillFlow: ({ remotionRoot, fullEntryPoint, entryPoin
|
|
|
23
23
|
imageFormatFromUi: StillImageFormat | null;
|
|
24
24
|
logLevel: LogLevel;
|
|
25
25
|
onProgress: JobProgressCallback;
|
|
26
|
-
|
|
26
|
+
indent: boolean;
|
|
27
27
|
addCleanupCallback: (cb: () => void) => void;
|
|
28
28
|
cancelSignal: CancelSignal | null;
|
|
29
29
|
outputLocationFromUi: string | null;
|