@remotion/cli 4.0.42 → 4.0.43

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.
@@ -295,7 +295,7 @@ export declare const ConfigInternals: {
295
295
  getOutputCodecOrUndefined: () => CodecOrUndefined;
296
296
  getBrowser: () => null;
297
297
  getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
298
- getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
298
+ getProResProfile: () => "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
299
299
  getPresetProfile: () => "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
300
300
  getShouldOverwrite: ({ defaultValue, }: {
301
301
  defaultValue: boolean;
@@ -1 +1 @@
1
- export declare const getLogLevel: () => "verbose" | "info" | "warn" | "error", setLogLevel: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
1
+ export declare const getLogLevel: () => "error" | "verbose" | "info" | "warn", setLogLevel: (newLogLevel: "error" | "verbose" | "info" | "warn") => void;
@@ -0,0 +1,3 @@
1
+ import type { x264Preset } from '@remotion/renderer';
2
+ export declare const getPresetProfile: () => x264Preset | undefined;
3
+ export declare const setPresetProfile: (profile: x264Preset | undefined) => void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setPresetProfile = exports.getPresetProfile = void 0;
4
+ let preset;
5
+ const getPresetProfile = () => {
6
+ return preset;
7
+ };
8
+ exports.getPresetProfile = getPresetProfile;
9
+ const setPresetProfile = (profile) => {
10
+ preset = profile;
11
+ };
12
+ exports.setPresetProfile = setPresetProfile;
@@ -38,6 +38,6 @@ const CopyButton = ({ textToCopy, label, labelWhenCopied }) => {
38
38
  const to = setTimeout(() => setCopied(false), 2000);
39
39
  return () => clearTimeout(to);
40
40
  }, [copied]);
41
- return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: onClick, style: {}, buttonContainerStyle: buttonContainerStyle, children: [copyIcon, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }), ' ', (0, jsx_runtime_1.jsx)("span", { style: labelStyle, children: copied ? labelWhenCopied : label })] }));
41
+ return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: onClick, buttonContainerStyle: buttonContainerStyle, children: [copyIcon, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }), ' ', (0, jsx_runtime_1.jsx)("span", { style: labelStyle, children: copied ? labelWhenCopied : label })] }));
42
42
  };
43
43
  exports.CopyButton = CopyButton;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const JSONViewer: React.FC<{
3
+ src: string;
4
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JSONViewer = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const RemTextarea_1 = require("./NewComposition/RemTextarea");
7
+ const jsonStyle = {
8
+ marginTop: 14,
9
+ marginBottom: 14,
10
+ fontFamily: 'monospace',
11
+ flex: 1,
12
+ };
13
+ const JSONViewer = ({ src }) => {
14
+ const [json, setJson] = (0, react_1.useState)(null);
15
+ (0, react_1.useEffect)(() => {
16
+ fetch(src)
17
+ .then((res) => res.json())
18
+ .then((jsonRes) => {
19
+ setJson(JSON.stringify(jsonRes, null, 2));
20
+ });
21
+ }, [src]);
22
+ return ((0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { value: json !== null && json !== void 0 ? json : undefined, status: "ok", onChange: () => {
23
+ return null;
24
+ }, style: jsonStyle }));
25
+ };
26
+ exports.JSONViewer = JSONViewer;
@@ -8,9 +8,13 @@ const container = {
8
8
  flexDirection: 'row',
9
9
  alignItems: 'center',
10
10
  };
11
+ const text = {
12
+ fontSize: 14,
13
+ flex: 1,
14
+ };
11
15
  const KnownBugs = ({ bugs }) => {
12
16
  const bugElements = bugs.map((bug) => {
13
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsxs)("div", { children: ["\uD83E\uDEB2 ", bug.title] }), (0, jsx_runtime_1.jsx)(OpenIssueButton_1.OpenIssueButton, { link: bug.link })] }, bug.description + bug.link));
17
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsxs)("div", { style: text, children: ["\uD83E\uDEB2 ", bug.title] }), (0, jsx_runtime_1.jsx)(OpenIssueButton_1.OpenIssueButton, { link: bug.link })] }, bug.description + bug.link));
14
18
  });
15
19
  return (0, jsx_runtime_1.jsx)("div", { children: bugElements });
16
20
  };
@@ -18,6 +18,6 @@ const Modals = () => {
18
18
  const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type === 'connected';
19
19
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux })), modalContextType &&
20
20
  canRender &&
21
- modalContextType.type === 'render-progress' && ((0, jsx_runtime_1.jsx)(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
21
+ modalContextType.type === 'render-progress' && ((0, jsx_runtime_1.jsx)(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
22
22
  };
23
23
  exports.Modals = Modals;
@@ -12,6 +12,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
12
12
  status: 'error' | 'warning' | 'ok';
13
13
  isFocused: boolean;
14
14
  isHovered: boolean;
15
- }) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
16
- export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status" | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
15
+ }) => "hsla(0, 0%, 100%, 0.15)" | "#ff3232" | "#f1c40f" | "rgba(255, 255, 255, 0.05)" | "rgba(0, 0, 0, 0.6)";
16
+ export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | "rightAlign" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
17
17
  export {};
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
4
4
  status: RemInputStatus;
5
5
  name: string;
6
6
  };
7
- export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status"> & React.RefAttributes<HTMLInputElement>>;
7
+ export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
8
8
  export {};
@@ -3,5 +3,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLTextAreaEleme
3
3
  status: 'error' | 'warning' | 'ok';
4
4
  };
5
5
  export declare const inputBaseStyle: React.CSSProperties;
6
- export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
6
+ export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
7
7
  export {};
@@ -1,8 +1,31 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  exports.RenderQueue = void 0;
4
27
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
28
+ const react_1 = __importStar(require("react"));
6
29
  const client_id_1 = require("../../helpers/client-id");
7
30
  const colors_1 = require("../../helpers/colors");
8
31
  const layout_1 = require("../layout");
@@ -36,14 +59,29 @@ const renderQueue = {
36
59
  const RenderQueue = () => {
37
60
  const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).type;
38
61
  const { jobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
62
+ const previousJobCount = react_1.default.useRef(jobs.length);
39
63
  const jobCount = jobs.length;
64
+ const divRef = react_1.default.useRef(null);
65
+ (0, react_1.useEffect)(() => {
66
+ if (!divRef.current) {
67
+ return;
68
+ }
69
+ // Scroll down to bottom of render queue if new jobs have been added
70
+ if (jobCount > previousJobCount.current) {
71
+ divRef.current.scrollTo({
72
+ top: divRef.current.scrollHeight,
73
+ behavior: 'smooth',
74
+ });
75
+ }
76
+ previousJobCount.current = jobCount;
77
+ }, [jobCount]);
40
78
  if (connectionStatus === 'disconnected') {
41
79
  return ((0, jsx_runtime_1.jsxs)("div", { style: explainer, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 5 }), (0, jsx_runtime_1.jsx)("div", { style: errorExplanation, children: "The studio server has disconnected." }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 2, block: true })] }));
42
80
  }
43
81
  if (jobCount === 0) {
44
82
  return ((0, jsx_runtime_1.jsxs)("div", { style: explainer, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 5 }), (0, jsx_runtime_1.jsx)("div", { style: errorExplanation, children: "No renders in the queue." }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 2, block: true })] }));
45
83
  }
46
- return ((0, jsx_runtime_1.jsx)("div", { style: renderQueue, className: ['css-reset', is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME].join(' '), children: jobs.map((j, index) => {
84
+ return ((0, jsx_runtime_1.jsx)("div", { ref: divRef, style: renderQueue, className: ['css-reset', is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME].join(' '), children: jobs.map((j, index) => {
47
85
  return ((0, jsx_runtime_1.jsx)("div", { style: index === jobs.length - 1 ? undefined : separatorStyle, children: (0, jsx_runtime_1.jsx)(RenderQueueItem_1.RenderQueueItem, { job: j }) }, j.id));
48
86
  }) }));
49
87
  };
@@ -7,4 +7,10 @@ export type UpdateInfo = {
7
7
  timedOut: boolean;
8
8
  packageManager: PackageManager | 'unknown';
9
9
  };
10
+ export type Bug = {
11
+ title: string;
12
+ description: string;
13
+ link: string;
14
+ versions: string[];
15
+ };
10
16
  export declare const UpdateCheck: () => JSX.Element | null;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UpdateCheck = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
6
7
  const colors_1 = require("../helpers/colors");
7
8
  const modals_1 = require("../state/modals");
8
9
  const z_index_1 = require("../state/z-index");
@@ -20,6 +21,10 @@ const UpdateCheck = () => {
20
21
  const [info, setInfo] = (0, react_1.useState)(null);
21
22
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
22
23
  const { tabIndex } = (0, z_index_1.useZIndex)();
24
+ const [knownBugs, setKnownBugs] = (0, react_1.useState)(null);
25
+ const hasKnownBugs = (0, react_1.useMemo)(() => {
26
+ return knownBugs && knownBugs.length > 0;
27
+ }, [knownBugs]);
23
28
  const checkForUpdates = (0, react_1.useCallback)(() => {
24
29
  const controller = new AbortController();
25
30
  (0, actions_1.updateAvailable)(controller.signal)
@@ -34,24 +39,50 @@ const UpdateCheck = () => {
34
39
  });
35
40
  return controller;
36
41
  }, []);
42
+ const checkForBugs = (0, react_1.useCallback)(() => {
43
+ const controller = new AbortController();
44
+ fetch(`https://bugs.remotion.dev/api/${remotion_1.VERSION}`, {
45
+ signal: controller.signal,
46
+ })
47
+ .then(async (res) => {
48
+ const body = await res.json();
49
+ setKnownBugs(body.bugs);
50
+ })
51
+ .catch((err) => {
52
+ if (err.message.includes('aborted')) {
53
+ return;
54
+ }
55
+ console.log('Could not check for bugs in this version', err);
56
+ });
57
+ return controller;
58
+ }, []);
37
59
  (0, react_1.useEffect)(() => {
38
- const abortController = checkForUpdates();
60
+ const abortUpdate = checkForUpdates();
61
+ const abortBugs = checkForBugs();
39
62
  return () => {
40
- abortController.abort();
63
+ abortUpdate.abort();
64
+ abortBugs.abort();
41
65
  };
42
- }, [checkForUpdates]);
66
+ }, [checkForBugs, checkForUpdates]);
43
67
  const openModal = (0, react_1.useCallback)(() => {
44
68
  setSelectedModal({
45
69
  type: 'update',
46
70
  info: info,
71
+ knownBugs: knownBugs,
47
72
  });
48
- }, [info, setSelectedModal]);
73
+ }, [info, knownBugs, setSelectedModal]);
74
+ const dynButtonStyle = (0, react_1.useMemo)(() => {
75
+ return {
76
+ ...buttonStyle,
77
+ color: hasKnownBugs ? colors_1.WARNING_COLOR : colors_1.BLUE,
78
+ };
79
+ }, [hasKnownBugs]);
49
80
  if (!info) {
50
81
  return null;
51
82
  }
52
83
  if (!info.updateAvailable) {
53
84
  return null;
54
85
  }
55
- return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style: buttonStyle, onClick: openModal, type: "button", children: "Update available!" }));
86
+ return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, type: "button", children: hasKnownBugs ? 'Bugfixes available' : 'Update available' }));
56
87
  };
57
88
  exports.UpdateCheck = UpdateCheck;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import type { UpdateInfo } from '../UpdateCheck';
2
+ import type { Bug, UpdateInfo } from '../UpdateCheck';
3
3
  export declare const UpdateModal: React.FC<{
4
4
  info: UpdateInfo;
5
+ knownBugs: Bug[];
5
6
  }>;
@@ -7,6 +7,7 @@ const colors_1 = require("../../helpers/colors");
7
7
  const copy_text_1 = require("../../helpers/copy-text");
8
8
  const modals_1 = require("../../state/modals");
9
9
  const CopyButton_1 = require("../CopyButton");
10
+ const KnownBugs_1 = require("../KnownBugs");
10
11
  const layout_1 = require("../layout");
11
12
  const ModalContainer_1 = require("../ModalContainer");
12
13
  const ModalHeader_1 = require("../ModalHeader");
@@ -15,33 +16,48 @@ const container = {
15
16
  padding: 20,
16
17
  paddingTop: 0,
17
18
  };
19
+ const text = {
20
+ fontSize: 14,
21
+ };
22
+ const title = {
23
+ paddingTop: 12,
24
+ paddingBottom: 8,
25
+ ...text,
26
+ };
18
27
  const code = {
19
28
  background: colors_1.SELECTED_BACKGROUND,
20
29
  padding: '12px 10px',
21
- fontSize: 17,
30
+ fontSize: 14,
22
31
  marginTop: 10,
23
32
  marginBottom: 10,
24
33
  };
25
34
  const link = {
26
35
  fontWeight: 'bold',
27
- color: 'inherit',
36
+ color: colors_1.BLUE,
28
37
  textDecoration: 'none',
38
+ ...text,
29
39
  };
30
40
  const commands = {
31
- npm: 'npm run upgrade',
32
- yarn: 'yarn upgrade',
33
- pnpm: 'pnpm run upgrade',
34
- bun: 'bun run upgrade',
35
- unknown: 'npm run upgrade',
41
+ npm: 'npx remotion upgrade',
42
+ yarn: 'yarn remotion upgrade',
43
+ pnpm: 'pnpm exec remotion upgrade',
44
+ bun: 'bun remotion upgrade',
45
+ unknown: 'npx remotion upgrade',
36
46
  };
37
- const UpdateModal = ({ info }) => {
47
+ const UpdateModal = ({ info, knownBugs }) => {
38
48
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
39
49
  const onQuit = (0, react_1.useCallback)(() => {
40
50
  setSelectedModal(null);
41
51
  }, [setSelectedModal]);
52
+ const hasKnownBugs = (0, react_1.useMemo)(() => {
53
+ return knownBugs && (knownBugs === null || knownBugs === void 0 ? void 0 : knownBugs.length) > 0;
54
+ }, [knownBugs]);
42
55
  const command = commands[info.packageManager];
43
- 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) => {
44
- (0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
45
- }), 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."] })] })] }));
56
+ const onClick = (0, react_1.useCallback)(() => {
57
+ (0, copy_text_1.copyText)(command).catch((err) => {
58
+ (0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
59
+ });
60
+ }, [command]);
61
+ 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: [hasKnownBugs ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: title, children: ["The currently installed version ", info.currentVersion, " has the following known bugs:"] }), (0, jsx_runtime_1.jsx)(KnownBugs_1.KnownBugs, { bugs: knownBugs }), (0, jsx_runtime_1.jsx)("div", { style: { height: '20px' } }), (0, jsx_runtime_1.jsx)("div", { style: text, children: "To upgrade, run the following command:" })] })) : ((0, jsx_runtime_1.jsx)("div", { style: text, 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: onClick, 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", labelWhenCopied: "Copied!" })] }), (0, jsx_runtime_1.jsxs)("div", { style: text, children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }), (0, jsx_runtime_1.jsxs)("div", { style: text, 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."] })] })] }));
46
62
  };
47
63
  exports.UpdateModal = UpdateModal;
@@ -1,4 +1,4 @@
1
1
  export declare const getCheckerboardBackgroundSize: (size: number) => string;
2
2
  export declare const getCheckerboardBackgroundPos: (size: number) => string;
3
- export declare const checkerboardBackgroundColor: (checkerboard: boolean) => "black" | "white";
3
+ export declare const checkerboardBackgroundColor: (checkerboard: boolean) => "white" | "black";
4
4
  export declare const checkerboardBackgroundImage: (checkerboard: boolean) => "\n linear-gradient(\n 45deg,\n rgba(0, 0, 0, 0.1) 25%,\n transparent 25%\n ),\n linear-gradient(135deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%),\n linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%),\n linear-gradient(135deg, transparent 75%, rgba(0, 0, 0, 0.1) 75%)\n " | undefined;
@@ -16,4 +16,4 @@ export declare const BLUE_DISABLED = "#284f73";
16
16
  export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
17
17
  selected: boolean;
18
18
  hovered: boolean;
19
- }) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)";
19
+ }) => "transparent" | "rgba(255, 255, 255, 0.06)" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)";
@@ -2,7 +2,7 @@ import type { AudioCodec, Codec, ColorSpace, OpenGlRenderer, PixelFormat, ProRes
2
2
  import type React from 'react';
3
3
  import type { QuickSwitcherMode } from '../components/QuickSwitcher/NoResults';
4
4
  import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
5
- import type { UpdateInfo } from '../components/UpdateCheck';
5
+ import type { Bug, UpdateInfo } from '../components/UpdateCheck';
6
6
  export type CompType = 'composition' | 'still';
7
7
  export type RenderModalState = {
8
8
  type: 'render';
@@ -52,6 +52,7 @@ export type ModalState = {
52
52
  } | {
53
53
  type: 'update';
54
54
  info: UpdateInfo;
55
+ knownBugs: Bug[];
55
56
  } | {
56
57
  type: 'quick-switcher';
57
58
  mode: QuickSwitcherMode;
@@ -15,13 +15,13 @@ export declare const getCliOptions: (options: {
15
15
  browser: "chrome";
16
16
  crf: import("@remotion/renderer").Crf | null;
17
17
  pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
18
- proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
18
+ proResProfile: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
19
19
  x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
20
20
  everyNthFrame: number;
21
21
  numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
22
22
  stillFrame: number;
23
23
  browserExecutable: BrowserExecutable;
24
- logLevel: "verbose" | "info" | "warn" | "error";
24
+ logLevel: "error" | "verbose" | "info" | "warn";
25
25
  scale: number;
26
26
  chromiumOptions: ChromiumOptions;
27
27
  overwrite: boolean;
@@ -0,0 +1,2 @@
1
+ import type { LogLevel } from '@remotion/renderer';
2
+ export declare const handleCommonError: (err: Error, logLevel: LogLevel) => Promise<void>;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleCommonError = void 0;
4
+ const chalk_1 = require("./chalk");
5
+ const log_1 = require("./log");
6
+ const print_error_1 = require("./print-error");
7
+ const truthy_1 = require("./truthy");
8
+ const handleCommonError = async (err, logLevel) => {
9
+ var _a;
10
+ await (0, print_error_1.printError)(err, logLevel);
11
+ if (err.message.includes('Could not play video with')) {
12
+ log_1.Log.info();
13
+ log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
14
+ }
15
+ if (err.message.includes('A delayRender()') &&
16
+ err.message.includes('was called but not cleared after')) {
17
+ log_1.Log.info();
18
+ log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/timeout');
19
+ }
20
+ if (err.message.includes('Target closed')) {
21
+ log_1.Log.info();
22
+ log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/target-closed');
23
+ }
24
+ if (err.message.includes('ENAMETOOLONG')) {
25
+ log_1.Log.info();
26
+ log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
27
+ }
28
+ if (err.message.includes('Error creating WebGL context')) {
29
+ log_1.Log.info();
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
+ }
33
+ if (err.message.includes('The bucket does not allow ACLs')) {
34
+ log_1.Log.info();
35
+ log_1.Log.info(chalk_1.chalk.green('💡 Fix this issue https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl'));
36
+ }
37
+ if (err.message.includes('Minified React error #306')) {
38
+ const componentName = (_a = err.message.match(/<\w+>/)) === null || _a === void 0 ? void 0 : _a[0];
39
+ log_1.Log.info([
40
+ '💡 This error indicates that the component',
41
+ componentName ? `(${componentName})` : null,
42
+ 'you are trying to render is not imported correctly.',
43
+ ]
44
+ .filter(truthy_1.truthy)
45
+ .join(' '));
46
+ log_1.Log.info();
47
+ log_1.Log.info(' Check the root file and ensure that the component is not undefined.');
48
+ log_1.Log.info(' Oftentimes, this happens if the component is missing the `export` keyword');
49
+ log_1.Log.info(' or if the component was renamed and the import statement not properly adjusted.');
50
+ }
51
+ if (err.message.includes('GLIBC_')) {
52
+ log_1.Log.info('💡 Remotion requires at least Libc 2.35.');
53
+ log_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
54
+ }
55
+ if (err.message.includes('EBADF')) {
56
+ log_1.Log.info('💡 This error might be fixed by changing your Node version:');
57
+ log_1.Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
58
+ }
59
+ };
60
+ exports.handleCommonError = handleCommonError;
package/dist/index.d.ts CHANGED
@@ -63,24 +63,24 @@ export declare const CliInternals: {
63
63
  verbose: (message?: any, ...optionalParams: any[]) => void;
64
64
  verboseAdvanced: (options: {
65
65
  indent: boolean;
66
- logLevel: "verbose" | "info" | "warn" | "error";
66
+ logLevel: "error" | "verbose" | "info" | "warn";
67
67
  } & {
68
68
  tag?: string | undefined;
69
69
  }, message?: any, ...optionalParams: any[]) => void;
70
70
  info: (message?: any, ...optionalParams: any[]) => void;
71
71
  infoAdvanced: (options: {
72
72
  indent: boolean;
73
- logLevel: "verbose" | "info" | "warn" | "error";
73
+ logLevel: "error" | "verbose" | "info" | "warn";
74
74
  }, message?: any, ...optionalParams: any[]) => void;
75
75
  warn: (message?: any, ...optionalParams: any[]) => void;
76
76
  warnAdvanced: (options: {
77
77
  indent: boolean;
78
- logLevel: "verbose" | "info" | "warn" | "error";
78
+ logLevel: "error" | "verbose" | "info" | "warn";
79
79
  }, message?: any, ...optionalParams: any[]) => void;
80
80
  error: (message?: any, ...optionalParams: any[]) => void;
81
81
  errorAdvanced: (options: {
82
82
  indent: boolean;
83
- logLevel: "verbose" | "info" | "warn" | "error";
83
+ logLevel: "error" | "verbose" | "info" | "warn";
84
84
  } & {
85
85
  tag?: string | undefined;
86
86
  }, message?: any, ...optionalParams: any[]) => void;
@@ -100,13 +100,13 @@ export declare const CliInternals: {
100
100
  browser: "chrome";
101
101
  crf: import("@remotion/renderer").Crf | null;
102
102
  pixelFormat: "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
103
- proResProfile: "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
103
+ proResProfile: "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy" | undefined;
104
104
  x264Preset: "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo" | undefined;
105
105
  everyNthFrame: number;
106
106
  numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
107
107
  stillFrame: number;
108
108
  browserExecutable: import("@remotion/renderer").BrowserExecutable;
109
- logLevel: "verbose" | "info" | "warn" | "error";
109
+ logLevel: "error" | "verbose" | "info" | "warn";
110
110
  scale: number;
111
111
  chromiumOptions: import("@remotion/renderer").ChromiumOptions;
112
112
  overwrite: boolean;
@@ -132,7 +132,7 @@ export declare const CliInternals: {
132
132
  "browser-executable": import("@remotion/renderer").BrowserExecutable;
133
133
  "pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
134
134
  "image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
135
- "prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
135
+ "prores-profile": "light" | "4444-xq" | "4444" | "hq" | "standard" | "proxy";
136
136
  "x264-preset": "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
137
137
  "bundle-cache": string;
138
138
  "env-file": string;
@@ -190,7 +190,7 @@ export declare const CliInternals: {
190
190
  } & {
191
191
  _: string[];
192
192
  };
193
- printError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
193
+ printError: (err: Error, logLevel: "error" | "verbose" | "info" | "warn") => Promise<void>;
194
194
  formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
195
195
  locale: string;
196
196
  bits?: boolean | undefined;
@@ -232,7 +232,7 @@ export declare const CliInternals: {
232
232
  };
233
233
  listOfRemotionPackages: string[];
234
234
  shouldUseNonOverlayingLogger: ({ logLevel, }: {
235
- logLevel: "verbose" | "info" | "warn" | "error";
235
+ logLevel: "error" | "verbose" | "info" | "warn";
236
236
  }) => boolean;
237
237
  getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, serializedInputPropsWithCustomSchema, logLevel, server, offthreadVideoCacheSizeInBytes, }: {
238
238
  height: number | null;
@@ -247,7 +247,7 @@ export declare const CliInternals: {
247
247
  browserExecutable: import("@remotion/renderer").BrowserExecutable;
248
248
  serveUrlOrWebpackUrl: string;
249
249
  indent: boolean;
250
- logLevel: "verbose" | "info" | "warn" | "error";
250
+ logLevel: "error" | "verbose" | "info" | "warn";
251
251
  serializedInputPropsWithCustomSchema: string;
252
252
  server: import("@remotion/renderer").RemotionServer;
253
253
  offthreadVideoCacheSizeInBytes: number | null;
package/dist/index.js CHANGED
@@ -64,7 +64,16 @@ const cli = async () => {
64
64
  }
65
65
  const isBun = typeof Bun !== 'undefined';
66
66
  if (isBun) {
67
- log_1.Log.warn('You are running Remotion with Bun. Visit https://remotion.dev/bun for known bugs and status updates.');
67
+ const version = Bun.version.split('.');
68
+ if (version.length === 3) {
69
+ if (Number(version[0]) < 1) {
70
+ throw new Error('Please upgrade to at least Bun 1.0.3');
71
+ }
72
+ if (Number(version[1]) === 0 && Number(version[2]) < 3) {
73
+ throw new Error('Please upgrade to at least Bun 1.0.3');
74
+ }
75
+ }
76
+ log_1.Log.info('You are running Remotion with Bun, which is mostly supported. Visit https://remotion.dev/bun for more information.');
68
77
  }
69
78
  const isStudio = command === 'studio' || command === 'preview';
70
79
  const errorSymbolicationLock = isStudio
package/dist/log.d.ts CHANGED
@@ -2,24 +2,24 @@ export declare const Log: {
2
2
  verbose: (message?: any, ...optionalParams: any[]) => void;
3
3
  verboseAdvanced: (options: {
4
4
  indent: boolean;
5
- logLevel: "verbose" | "info" | "warn" | "error";
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: "verbose" | "info" | "warn" | "error";
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: "verbose" | "info" | "warn" | "error";
17
+ logLevel: "error" | "verbose" | "info" | "warn";
18
18
  }, message?: any, ...optionalParams: any[]) => void;
19
19
  error: (message?: any, ...optionalParams: any[]) => void;
20
20
  errorAdvanced: (options: {
21
21
  indent: boolean;
22
- logLevel: "verbose" | "info" | "warn" | "error";
22
+ logLevel: "error" | "verbose" | "info" | "warn";
23
23
  } & {
24
24
  tag?: string | undefined;
25
25
  }, message?: any, ...optionalParams: any[]) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.42",
3
+ "version": "4.0.43",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -35,11 +35,11 @@
35
35
  "prompts": "2.4.1",
36
36
  "semver": "7.5.3",
37
37
  "source-map": "0.6.1",
38
- "@remotion/renderer": "4.0.42",
39
- "remotion": "4.0.42",
40
- "@remotion/bundler": "4.0.42",
41
- "@remotion/media-utils": "4.0.42",
42
- "@remotion/player": "4.0.42"
38
+ "@remotion/bundler": "4.0.43",
39
+ "@remotion/renderer": "4.0.43",
40
+ "@remotion/media-utils": "4.0.43",
41
+ "remotion": "4.0.43",
42
+ "@remotion/player": "4.0.43"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
@@ -65,8 +65,8 @@
65
65
  "react-dom": "^18.0.0",
66
66
  "vitest": "0.31.1",
67
67
  "zod": "^3.21.4",
68
- "@remotion/zod-types": "4.0.42",
69
- "@remotion/tailwind": "4.0.42"
68
+ "@remotion/zod-types": "4.0.43",
69
+ "@remotion/tailwind": "4.0.43"
70
70
  },
71
71
  "keywords": [
72
72
  "remotion",