@remotion/cli 4.0.24 → 4.0.26
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/ansi/ansi-diff.d.ts +1 -0
- package/dist/better-opn/index.d.ts +2 -0
- package/dist/config/height.js +2 -2
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/width.js +2 -2
- package/dist/editor/components/NewComposition/NewCompCode.d.ts +1 -0
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderModal/OptionExplainer.js +1 -1
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/UpdateCheck.d.ts +1 -0
- package/dist/editor/helpers/colors.d.ts +1 -1
- package/dist/editor/helpers/convert-env-variables.d.ts +2 -8
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -0
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/get-env.js +16 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +3 -3
- package/dist/preview-server/dev-middleware/compatible-api.d.ts +1 -0
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/hot-middleware/client.d.ts +2 -0
- package/dist/preview-server/hot-middleware/client.js +2 -0
- package/dist/preview-server/live-events.js +2 -1
- package/dist/preview-server/render-queue/queue.js +2 -2
- package/dist/preview-server/routes.d.ts +1 -0
- package/dist/preview-server/start-server.js +1 -1
- package/dist/validate.d.ts +2 -0
- package/dist/validate.js +6 -0
- package/package.json +9 -8
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +0 -14
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +0 -42
- package/dist/editor/components/RightPanel.d.ts +0 -8
- package/dist/editor/components/RightPanel.js +0 -79
- package/dist/handle-common-errors.d.ts +0 -2
- package/dist/handle-common-errors.js +0 -60
package/dist/ansi/ansi-diff.d.ts
CHANGED
package/dist/config/height.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getHeight = exports.overrideHeight = void 0;
|
|
4
|
-
const
|
|
4
|
+
const validate_1 = require("../validate");
|
|
5
5
|
let specifiedHeight;
|
|
6
6
|
const overrideHeight = (newHeight) => {
|
|
7
|
-
|
|
7
|
+
(0, validate_1.validateDimension)(newHeight, 'height', 'passed to `overrideHeight()`');
|
|
8
8
|
specifiedHeight = newHeight;
|
|
9
9
|
};
|
|
10
10
|
exports.overrideHeight = overrideHeight;
|
|
@@ -2,4 +2,4 @@ import type { StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
|
2
2
|
export declare const setStillImageFormat: (format: StillImageFormat) => void;
|
|
3
3
|
export declare const setVideoImageFormat: (format: VideoImageFormat) => void;
|
|
4
4
|
export declare const getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
5
|
-
export declare const getUserPreferredVideoImageFormat: () => "
|
|
5
|
+
export declare const getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | undefined;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -300,7 +300,7 @@ export declare const ConfigInternals: {
|
|
|
300
300
|
getShouldOutputImageSequence: (frameRange: FrameRange | null) => boolean;
|
|
301
301
|
getDotEnvLocation: () => string | null;
|
|
302
302
|
getUserPreferredStillImageFormat: () => "png" | "jpeg" | "pdf" | "webp" | undefined;
|
|
303
|
-
getUserPreferredVideoImageFormat: () => "
|
|
303
|
+
getUserPreferredVideoImageFormat: () => "png" | "jpeg" | "none" | undefined;
|
|
304
304
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
305
305
|
getWebpackCaching: () => boolean;
|
|
306
306
|
getOutputLocation: () => string | null;
|
package/dist/config/width.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getWidth = exports.overrideWidth = void 0;
|
|
4
|
-
const
|
|
4
|
+
const validate_1 = require("../validate");
|
|
5
5
|
let passedWidth = null;
|
|
6
6
|
const overrideWidth = (newWidth) => {
|
|
7
7
|
if (typeof newWidth !== 'number') {
|
|
8
|
-
|
|
8
|
+
(0, validate_1.validateDimension)(newWidth, 'width', 'passed to `setWidth()`');
|
|
9
9
|
}
|
|
10
10
|
passedWidth = newWidth;
|
|
11
11
|
};
|
|
@@ -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)" | "
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement
|
|
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, "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
|
|
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, "
|
|
6
|
+
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
7
|
export {};
|
|
@@ -51,6 +51,6 @@ const copyWrapper = {
|
|
|
51
51
|
justifyContent: 'flex-end',
|
|
52
52
|
};
|
|
53
53
|
const OptionExplainer = ({ option }) => {
|
|
54
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "__remotion-info-button-container", children: [(0, jsx_runtime_1.jsxs)("div", { style: padding, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("strong", { style: title, children: option.name }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("a", { style: link, href: option.docLink, target: "_blank", children: "Docs" })] }), (0, jsx_runtime_1.jsx)("div", { style: description, children: option.description })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 0.5, block: true }), (0, jsx_runtime_1.jsx)(MenuDivider_1.MenuDivider, {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 0.5, block: true }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: infoRow, children: [(0, jsx_runtime_1.jsx)("div", { style: infoRowLabel, children: "CLI flag" }), (0, jsx_runtime_1.jsx)("div", { style: flexSpacer }), (0, jsx_runtime_1.jsx)("code", { children: option.cliFlag }), (0, jsx_runtime_1.jsx)("div", { style: copyWrapper, children: (0, jsx_runtime_1.jsx)(CliCopyButton_1.CliCopyButton, { valueToCopy: option.cliFlag }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: infoRow, children: [(0, jsx_runtime_1.jsx)("div", { style: infoRowLabel, children: "Node.JS option" }), (0, jsx_runtime_1.jsx)("div", { style: flexSpacer }), (0, jsx_runtime_1.jsx)("code", { children: option.ssrName }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 3.75 })] }), (0, jsx_runtime_1.jsx)("div", { style: infoRow })] })] }));
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "__remotion-info-button-container", children: [(0, jsx_runtime_1.jsxs)("div", { style: padding, children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("strong", { style: title, children: option.name }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("a", { style: link, href: option.docLink, target: "_blank", children: "Docs" })] }), (0, jsx_runtime_1.jsx)("div", { style: description, children: option.description('ssr') })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 0.5, block: true }), (0, jsx_runtime_1.jsx)(MenuDivider_1.MenuDivider, {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 0.5, block: true }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: infoRow, children: [(0, jsx_runtime_1.jsx)("div", { style: infoRowLabel, children: "CLI flag" }), (0, jsx_runtime_1.jsx)("div", { style: flexSpacer }), (0, jsx_runtime_1.jsx)("code", { children: option.cliFlag }), (0, jsx_runtime_1.jsx)("div", { style: copyWrapper, children: (0, jsx_runtime_1.jsx)(CliCopyButton_1.CliCopyButton, { valueToCopy: option.cliFlag }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: infoRow, children: [(0, jsx_runtime_1.jsx)("div", { style: infoRowLabel, children: "Node.JS option" }), (0, jsx_runtime_1.jsx)("div", { style: flexSpacer }), (0, jsx_runtime_1.jsx)("code", { children: option.ssrName }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 3.75 })] }), (0, jsx_runtime_1.jsx)("div", { style: infoRow })] })] }));
|
|
55
55
|
};
|
|
56
56
|
exports.OptionExplainer = OptionExplainer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Codec } from '@remotion/renderer';
|
|
2
|
-
export declare const humanReadableCodec: (codec: Codec) => "
|
|
2
|
+
export declare const humanReadableCodec: (codec: Codec) => "GIF" | "AAC" | "MP3" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | 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)" | "
|
|
19
|
+
}) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)";
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
|
|
2
|
-
|
|
3
|
-
string
|
|
4
|
-
][];
|
|
5
|
-
export declare const envVariablesArrayToObject: (envVariables: [
|
|
6
|
-
string,
|
|
7
|
-
string
|
|
8
|
-
][]) => Record<string, string>;
|
|
1
|
+
export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [string, string][];
|
|
2
|
+
export declare const envVariablesArrayToObject: (envVariables: [string, string][]) => Record<string, string>;
|
|
@@ -34,6 +34,6 @@ export declare const getCliOptions: (options: {
|
|
|
34
34
|
videoBitrate: string | null;
|
|
35
35
|
height: number | null;
|
|
36
36
|
width: number | null;
|
|
37
|
-
configFileImageFormat: "
|
|
37
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
38
38
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
39
39
|
}>;
|
package/dist/get-env.js
CHANGED
|
@@ -56,7 +56,12 @@ const getEnvForEnvFile = async (processEnv, envFile, onUpdate) => {
|
|
|
56
56
|
try {
|
|
57
57
|
const envFileData = await node_fs_1.default.promises.readFile(envFile);
|
|
58
58
|
if (onUpdate) {
|
|
59
|
-
|
|
59
|
+
if (typeof node_fs_1.default.watchFile === 'undefined') {
|
|
60
|
+
log_1.Log.warn('Unsupported feature (fs.watchFile): .env file will not hot reload.');
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
watchEnvFile({ processEnv, envFile, onUpdate });
|
|
64
|
+
}
|
|
60
65
|
}
|
|
61
66
|
return {
|
|
62
67
|
...processEnv,
|
|
@@ -96,11 +101,16 @@ const getEnvironmentVariables = (onUpdate) => {
|
|
|
96
101
|
const defaultEnvFile = node_path_1.default.resolve(remotionRoot, '.env');
|
|
97
102
|
if (!node_fs_1.default.existsSync(defaultEnvFile)) {
|
|
98
103
|
if (onUpdate) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
if (typeof node_fs_1.default.watchFile === 'undefined') {
|
|
105
|
+
log_1.Log.warn('Unsupported Bun feature: .env file will not hot reload.');
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
watchEnvFile({
|
|
109
|
+
processEnv,
|
|
110
|
+
envFile: defaultEnvFile,
|
|
111
|
+
onUpdate,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
104
114
|
}
|
|
105
115
|
return Promise.resolve(processEnv);
|
|
106
116
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export declare const CliInternals: {
|
|
|
119
119
|
videoBitrate: string | null;
|
|
120
120
|
height: number | null;
|
|
121
121
|
width: number | null;
|
|
122
|
-
configFileImageFormat: "
|
|
122
|
+
configFileImageFormat: "png" | "jpeg" | "none" | undefined;
|
|
123
123
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
124
124
|
}>;
|
|
125
125
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
@@ -129,7 +129,7 @@ export declare const CliInternals: {
|
|
|
129
129
|
parsedCli: {
|
|
130
130
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
131
131
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
132
|
-
"image-format": "
|
|
132
|
+
"image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
|
|
133
133
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
134
134
|
"x264-preset": "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
135
135
|
"bundle-cache": string;
|
|
@@ -184,7 +184,7 @@ export declare const CliInternals: {
|
|
|
184
184
|
} & {
|
|
185
185
|
_: string[];
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
printError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
188
188
|
formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
|
|
189
189
|
locale: string;
|
|
190
190
|
bits?: boolean | undefined;
|
|
@@ -196,7 +196,7 @@ export declare const CliInternals: {
|
|
|
196
196
|
downloadName: string | null;
|
|
197
197
|
outName: string | null;
|
|
198
198
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
199
|
-
cliFlag: "
|
|
199
|
+
cliFlag: "png" | "jpeg" | "pdf" | "webp" | "none" | null;
|
|
200
200
|
isLambda: boolean;
|
|
201
201
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
202
202
|
}) => {
|
|
@@ -211,8 +211,8 @@ export declare const CliInternals: {
|
|
|
211
211
|
};
|
|
212
212
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
213
213
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
214
|
-
uiImageFormat: "
|
|
215
|
-
}) => "
|
|
214
|
+
uiImageFormat: "png" | "jpeg" | "none" | null;
|
|
215
|
+
}) => "png" | "jpeg" | "none";
|
|
216
216
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
217
217
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
|
|
218
218
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,6 @@ const get_cli_options_1 = require("./get-cli-options");
|
|
|
35
35
|
const get_composition_with_dimension_override_1 = require("./get-composition-with-dimension-override");
|
|
36
36
|
const get_config_file_name_1 = require("./get-config-file-name");
|
|
37
37
|
const get_final_output_codec_1 = require("./get-final-output-codec");
|
|
38
|
-
const handle_common_errors_1 = require("./handle-common-errors");
|
|
39
38
|
const image_formats_1 = require("./image-formats");
|
|
40
39
|
const initialize_cli_1 = require("./initialize-cli");
|
|
41
40
|
const lambda_command_1 = require("./lambda-command");
|
|
@@ -44,6 +43,7 @@ const log_1 = require("./log");
|
|
|
44
43
|
const make_progress_bar_1 = require("./make-progress-bar");
|
|
45
44
|
const parse_command_line_1 = require("./parse-command-line");
|
|
46
45
|
const print_compositions_1 = require("./print-compositions");
|
|
46
|
+
const print_error_1 = require("./print-error");
|
|
47
47
|
const print_help_1 = require("./print-help");
|
|
48
48
|
const progress_bar_1 = require("./progress-bar");
|
|
49
49
|
const render_1 = require("./render");
|
|
@@ -116,7 +116,7 @@ const cli = async () => {
|
|
|
116
116
|
}
|
|
117
117
|
catch (err) {
|
|
118
118
|
log_1.Log.info();
|
|
119
|
-
await (0,
|
|
119
|
+
await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
|
|
120
120
|
(0, cleanup_before_quit_1.cleanupBeforeQuit)();
|
|
121
121
|
process.exit(1);
|
|
122
122
|
}
|
|
@@ -138,7 +138,7 @@ exports.CliInternals = {
|
|
|
138
138
|
BooleanFlags: parse_command_line_1.BooleanFlags,
|
|
139
139
|
quietFlagProvided: parse_command_line_1.quietFlagProvided,
|
|
140
140
|
parsedCli: parse_command_line_1.parsedCli,
|
|
141
|
-
|
|
141
|
+
printError: print_error_1.printError,
|
|
142
142
|
formatBytes: format_bytes_1.formatBytes,
|
|
143
143
|
getFileSizeDownloadBar: download_progress_1.getFileSizeDownloadBar,
|
|
144
144
|
determineFinalStillImageFormat: determine_image_format_1.determineFinalStillImageFormat,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
/// <reference types="node" />
|
|
4
|
+
/// <reference types="bun-types" />
|
|
4
5
|
import type { ReadStream } from 'node:fs';
|
|
5
6
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
6
7
|
export declare function setHeaderForResponse(res: ServerResponse, name: string, value: string | number): void;
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | Ranges | -2;
|
|
15
15
|
export {};
|
|
@@ -11,11 +11,12 @@ const makeLiveEventsRouter = () => {
|
|
|
11
11
|
let clients = [];
|
|
12
12
|
const router = (request, response) => {
|
|
13
13
|
const headers = {
|
|
14
|
-
'content-type': 'text/event-stream',
|
|
14
|
+
'content-type': 'text/event-stream;charset=utf-8',
|
|
15
15
|
connection: 'keep-alive',
|
|
16
16
|
'cache-control': 'no-cache',
|
|
17
17
|
};
|
|
18
18
|
response.writeHead(200, headers);
|
|
19
|
+
response.write('\n');
|
|
19
20
|
if (request.method === 'OPTIONS') {
|
|
20
21
|
response.end();
|
|
21
22
|
return;
|
|
@@ -8,8 +8,8 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
8
8
|
const chalk_1 = require("../../chalk");
|
|
9
9
|
const config_1 = require("../../config");
|
|
10
10
|
const file_watcher_1 = require("../../file-watcher");
|
|
11
|
-
const handle_common_errors_1 = require("../../handle-common-errors");
|
|
12
11
|
const log_1 = require("../../log");
|
|
12
|
+
const print_error_1 = require("../../print-error");
|
|
13
13
|
const progress_types_1 = require("../../progress-types");
|
|
14
14
|
const live_events_1 = require("../live-events");
|
|
15
15
|
const process_still_1 = require("./process-still");
|
|
@@ -196,7 +196,7 @@ const processJobIfPossible = async ({ remotionRoot, entryPoint, }) => {
|
|
|
196
196
|
},
|
|
197
197
|
};
|
|
198
198
|
});
|
|
199
|
-
await (0,
|
|
199
|
+
await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
|
|
200
200
|
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
201
201
|
listener.sendEventToClient({
|
|
202
202
|
type: 'render-job-failed',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
3
|
import type { LiveEventsServer } from './live-events';
|
|
3
4
|
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
package/dist/validate.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateDimension = void 0;
|
|
4
|
+
/* eslint-disable prefer-destructuring */
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
6
|
+
exports.validateDimension = remotion_1.Internals.validateDimension;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.26",
|
|
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/bundler": "4.0.
|
|
39
|
-
"@remotion/
|
|
40
|
-
"@remotion/
|
|
41
|
-
"remotion": "4.0.
|
|
42
|
-
"@remotion/
|
|
38
|
+
"@remotion/bundler": "4.0.26",
|
|
39
|
+
"@remotion/renderer": "4.0.26",
|
|
40
|
+
"@remotion/media-utils": "4.0.26",
|
|
41
|
+
"remotion": "4.0.26",
|
|
42
|
+
"@remotion/player": "4.0.26"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@jonny/eslint-config": "3.0.266",
|
|
50
50
|
"@types/minimist": "^1.2.2",
|
|
51
|
+
"bun-types": "0.8.0",
|
|
51
52
|
"@types/node": "18.14.6",
|
|
52
53
|
"@types/prompts": "^2.4.1",
|
|
53
54
|
"@types/react": "18.0.26",
|
|
@@ -64,8 +65,8 @@
|
|
|
64
65
|
"react-dom": "^18.0.0",
|
|
65
66
|
"vitest": "0.31.1",
|
|
66
67
|
"zod": "^3.21.4",
|
|
67
|
-
"@remotion/zod-types": "4.0.
|
|
68
|
-
"@remotion/tailwind": "4.0.
|
|
68
|
+
"@remotion/zod-types": "4.0.26",
|
|
69
|
+
"@remotion/tailwind": "4.0.26"
|
|
69
70
|
},
|
|
70
71
|
"keywords": [
|
|
71
72
|
"remotion",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type SerializedJSONWithCustomFields = {
|
|
2
|
-
serializedString: string;
|
|
3
|
-
customDateUsed: boolean;
|
|
4
|
-
customFileUsed: boolean;
|
|
5
|
-
mapUsed: boolean;
|
|
6
|
-
setUsed: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const FILE_TOKEN = "remotion-file:";
|
|
9
|
-
export declare const serializeJSONWithDate: ({ data, indent, staticBase, }: {
|
|
10
|
-
data: unknown;
|
|
11
|
-
indent: number | undefined;
|
|
12
|
-
staticBase: string;
|
|
13
|
-
}) => SerializedJSONWithCustomFields;
|
|
14
|
-
export declare const deserializeJSONWithCustomFields: (data: string) => any;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeJSONWithCustomFields = exports.serializeJSONWithDate = exports.FILE_TOKEN = void 0;
|
|
4
|
-
const DATE_TOKEN = 'remotion-date:';
|
|
5
|
-
exports.FILE_TOKEN = 'remotion-file:';
|
|
6
|
-
const serializeJSONWithDate = ({ data, indent, staticBase, }) => {
|
|
7
|
-
let customDateUsed = false;
|
|
8
|
-
let customFileUsed = false;
|
|
9
|
-
let mapUsed = false;
|
|
10
|
-
let setUsed = false;
|
|
11
|
-
const serializedString = JSON.stringify(data, function (key, value) {
|
|
12
|
-
const item = this[key];
|
|
13
|
-
if (item instanceof Date) {
|
|
14
|
-
customDateUsed = true;
|
|
15
|
-
return `${DATE_TOKEN}${item.toISOString()}`;
|
|
16
|
-
}
|
|
17
|
-
if (item instanceof Map) {
|
|
18
|
-
mapUsed = true;
|
|
19
|
-
return value;
|
|
20
|
-
}
|
|
21
|
-
if (item instanceof Set) {
|
|
22
|
-
setUsed = true;
|
|
23
|
-
return value;
|
|
24
|
-
}
|
|
25
|
-
if (typeof item === 'string' && item.startsWith(staticBase)) {
|
|
26
|
-
customFileUsed = true;
|
|
27
|
-
return `${exports.FILE_TOKEN}${item.replace(staticBase + '/', '')}`;
|
|
28
|
-
}
|
|
29
|
-
return value;
|
|
30
|
-
}, indent);
|
|
31
|
-
return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };
|
|
32
|
-
};
|
|
33
|
-
exports.serializeJSONWithDate = serializeJSONWithDate;
|
|
34
|
-
const deserializeJSONWithCustomFields = (data) => {
|
|
35
|
-
return JSON.parse(data, (_, value) => {
|
|
36
|
-
if (typeof value === 'string' && value.startsWith(DATE_TOKEN)) {
|
|
37
|
-
return new Date(value.replace(DATE_TOKEN, ''));
|
|
38
|
-
}
|
|
39
|
-
return value;
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
exports.deserializeJSONWithCustomFields = deserializeJSONWithCustomFields;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type SidebarPanel = 'input-props' | 'renders';
|
|
3
|
-
export declare const persistSelectedPanel: (panel: SidebarPanel) => void;
|
|
4
|
-
export declare const rightSidebarTabs: React.RefObject<{
|
|
5
|
-
selectRendersPanel: () => void;
|
|
6
|
-
}>;
|
|
7
|
-
export declare const RightPanel: React.FC<{}>;
|
|
8
|
-
export {};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RightPanel = exports.rightSidebarTabs = exports.persistSelectedPanel = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const remotion_1 = require("remotion");
|
|
7
|
-
const colors_1 = require("../helpers/colors");
|
|
8
|
-
const DataEditor_1 = require("./RenderModal/DataEditor");
|
|
9
|
-
const RenderQueue_1 = require("./RenderQueue");
|
|
10
|
-
const RendersTab_1 = require("./RendersTab");
|
|
11
|
-
const Tabs_1 = require("./Tabs");
|
|
12
|
-
const container = {
|
|
13
|
-
height: '100%',
|
|
14
|
-
width: '100%',
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
display: 'flex',
|
|
17
|
-
flexDirection: 'column',
|
|
18
|
-
};
|
|
19
|
-
const PropsEditor = ({ composition }) => {
|
|
20
|
-
const { props, updateProps } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
21
|
-
const setInputProps = (0, react_1.useCallback)((newProps) => {
|
|
22
|
-
updateProps({
|
|
23
|
-
id: composition.id,
|
|
24
|
-
defaultProps: composition.defaultProps,
|
|
25
|
-
newProps,
|
|
26
|
-
});
|
|
27
|
-
}, [composition.defaultProps, composition.id, updateProps]);
|
|
28
|
-
const actualProps = (0, react_1.useMemo)(() => { var _a, _b; return (_b = (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps) !== null && _b !== void 0 ? _b : {}; }, [composition.defaultProps, composition.id, props]);
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { unresolvedComposition: composition, inputProps: actualProps, setInputProps: setInputProps, mayShowSaveButton: true, propsEditType: "default-props" }, composition.id));
|
|
30
|
-
};
|
|
31
|
-
const localStorageKey = 'remotion.sidebarPanel';
|
|
32
|
-
const getSelectedPanel = () => {
|
|
33
|
-
const panel = localStorage.getItem(localStorageKey);
|
|
34
|
-
if (panel === 'renders') {
|
|
35
|
-
return 'renders';
|
|
36
|
-
}
|
|
37
|
-
return 'input-props';
|
|
38
|
-
};
|
|
39
|
-
const tabsContainer = {
|
|
40
|
-
backgroundColor: colors_1.BACKGROUND,
|
|
41
|
-
};
|
|
42
|
-
const persistSelectedPanel = (panel) => {
|
|
43
|
-
localStorage.setItem(localStorageKey, panel);
|
|
44
|
-
};
|
|
45
|
-
exports.persistSelectedPanel = persistSelectedPanel;
|
|
46
|
-
exports.rightSidebarTabs = (0, react_1.createRef)();
|
|
47
|
-
const RightPanel = () => {
|
|
48
|
-
const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel());
|
|
49
|
-
const onCompositionsSelected = (0, react_1.useCallback)(() => {
|
|
50
|
-
setPanel('input-props');
|
|
51
|
-
(0, exports.persistSelectedPanel)('input-props');
|
|
52
|
-
}, []);
|
|
53
|
-
const onRendersSelected = (0, react_1.useCallback)(() => {
|
|
54
|
-
setPanel('renders');
|
|
55
|
-
(0, exports.persistSelectedPanel)('renders');
|
|
56
|
-
}, []);
|
|
57
|
-
(0, react_1.useImperativeHandle)(exports.rightSidebarTabs, () => {
|
|
58
|
-
return {
|
|
59
|
-
selectRendersPanel: () => {
|
|
60
|
-
setPanel('renders');
|
|
61
|
-
(0, exports.persistSelectedPanel)('renders');
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
}, []);
|
|
65
|
-
const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
66
|
-
const composition = (0, react_1.useMemo)(() => {
|
|
67
|
-
for (const comp of compositions) {
|
|
68
|
-
if (comp.id === currentComposition) {
|
|
69
|
-
return comp;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return null;
|
|
73
|
-
}, [compositions, currentComposition]);
|
|
74
|
-
if (composition === null) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onCompositionsSelected, children: "Props" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) }), panel === 'renders' ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(PropsEditor, { composition: composition }))] }));
|
|
78
|
-
};
|
|
79
|
-
exports.RightPanel = RightPanel;
|
|
@@ -1,60 +0,0 @@
|
|
|
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;
|