@remotion/cli 4.0.56 → 4.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/benchmark.d.ts +2 -1
- package/dist/benchmark.js +11 -10
- package/dist/cleanup-before-quit.d.ts +9 -2
- package/dist/cleanup-before-quit.js +6 -6
- package/dist/cloudrun-command.d.ts +2 -1
- package/dist/cloudrun-command.js +4 -4
- package/dist/compositions.d.ts +2 -1
- package/dist/compositions.js +4 -5
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderButton.js +1 -1
- package/dist/editor/components/RenderModal/RenderModal.d.ts +2 -2
- package/dist/editor/components/RenderModal/RenderModal.js +9 -9
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +3 -3
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +3 -3
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +7 -7
- package/dist/editor/components/RenderQueue/actions.js +6 -6
- package/dist/editor/components/SidebarRenderButton.js +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
- package/dist/editor/state/modals.d.ts +2 -2
- package/dist/entry-point.d.ts +2 -1
- package/dist/entry-point.js +6 -6
- package/dist/get-cli-options.d.ts +3 -2
- package/dist/get-cli-options.js +8 -9
- package/dist/get-composition-id.js +1 -1
- package/dist/get-env.d.ts +2 -1
- package/dist/get-env.js +11 -10
- package/dist/get-filename.js +1 -1
- package/dist/get-input-props.d.ts +2 -1
- package/dist/get-input-props.js +10 -6
- package/dist/gpu.d.ts +2 -1
- package/dist/gpu.js +3 -2
- package/dist/index.d.ts +12 -26
- package/dist/index.js +13 -28
- package/dist/initialize-cli.d.ts +2 -1
- package/dist/initialize-cli.js +7 -4
- package/dist/log.d.ts +4 -18
- package/dist/make-on-download.js +2 -2
- package/dist/parse-command-line.js +1 -1
- package/dist/preview-server/api-types.d.ts +2 -0
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/handler.d.ts +3 -1
- package/dist/preview-server/handler.js +2 -1
- package/dist/preview-server/render-queue/job.d.ts +5 -5
- package/dist/preview-server/render-queue/make-retry-payload.js +3 -3
- package/dist/preview-server/render-queue/process-still.js +2 -1
- package/dist/preview-server/render-queue/process-video.d.ts +3 -1
- package/dist/preview-server/render-queue/process-video.js +3 -2
- package/dist/preview-server/render-queue/queue.d.ts +3 -1
- package/dist/preview-server/render-queue/queue.js +7 -5
- package/dist/preview-server/routes/add-render.js +7 -4
- package/dist/preview-server/routes.d.ts +3 -2
- package/dist/preview-server/routes.js +2 -1
- package/dist/preview-server/start-server.d.ts +2 -0
- package/dist/preview-server/start-server.js +1 -0
- package/dist/render-flows/render.js +6 -6
- package/dist/render-flows/still.js +2 -2
- package/dist/render.d.ts +2 -1
- package/dist/render.js +3 -3
- package/dist/setup-cache.js +3 -3
- package/dist/still.d.ts +2 -1
- package/dist/still.js +4 -3
- package/dist/studio.d.ts +2 -1
- package/dist/studio.js +7 -6
- package/dist/versions.d.ts +3 -2
- package/dist/versions.js +18 -17
- package/package.json +8 -8
package/dist/entry-point.js
CHANGED
|
@@ -22,8 +22,8 @@ const candidates = [
|
|
|
22
22
|
const findCommonPath = (remotionRoot) => {
|
|
23
23
|
return candidates.find((candidate) => (0, node_fs_1.existsSync)(node_path_1.default.resolve(remotionRoot, candidate)));
|
|
24
24
|
};
|
|
25
|
-
const findEntryPoint = (args, remotionRoot) => {
|
|
26
|
-
const result = findEntryPointInner(args, remotionRoot);
|
|
25
|
+
const findEntryPoint = (args, remotionRoot, logLevel) => {
|
|
26
|
+
const result = findEntryPointInner(args, remotionRoot, logLevel);
|
|
27
27
|
if (result.file === null) {
|
|
28
28
|
return result;
|
|
29
29
|
}
|
|
@@ -39,11 +39,11 @@ const findEntryPoint = (args, remotionRoot) => {
|
|
|
39
39
|
return result;
|
|
40
40
|
};
|
|
41
41
|
exports.findEntryPoint = findEntryPoint;
|
|
42
|
-
const findEntryPointInner = (args, remotionRoot) => {
|
|
42
|
+
const findEntryPointInner = (args, remotionRoot, logLevel) => {
|
|
43
43
|
// 1st priority: Explicitly passed entry point
|
|
44
44
|
let file = args[0];
|
|
45
45
|
if (file) {
|
|
46
|
-
log_1.Log.verbose('Checking if', file, 'is the entry file');
|
|
46
|
+
log_1.Log.verbose({ indent: false, logLevel }, 'Checking if', file, 'is the entry file');
|
|
47
47
|
const cwdResolution = node_path_1.default.resolve(process.cwd(), file);
|
|
48
48
|
const remotionRootResolution = node_path_1.default.resolve(remotionRoot, file);
|
|
49
49
|
// Checking if file was found in CWD
|
|
@@ -69,7 +69,7 @@ const findEntryPointInner = (args, remotionRoot) => {
|
|
|
69
69
|
// 2nd priority: Config file
|
|
70
70
|
file = config_1.ConfigInternals.getEntryPoint();
|
|
71
71
|
if (file) {
|
|
72
|
-
log_1.Log.verbose('Entry point from config file is', file);
|
|
72
|
+
log_1.Log.verbose({ indent: false, logLevel }, 'Entry point from config file is', file);
|
|
73
73
|
return {
|
|
74
74
|
file: node_path_1.default.resolve(remotionRoot, file),
|
|
75
75
|
remainingArgs: args,
|
|
@@ -80,7 +80,7 @@ const findEntryPointInner = (args, remotionRoot) => {
|
|
|
80
80
|
const found = findCommonPath(remotionRoot);
|
|
81
81
|
if (found) {
|
|
82
82
|
const absolutePath = node_path_1.default.resolve(remotionRoot, found);
|
|
83
|
-
log_1.Log.verbose('Selected', absolutePath, 'as the entry point because file exists and is a common entry point and no entry point was explicitly selected');
|
|
83
|
+
log_1.Log.verbose({ indent: false, logLevel }, 'Selected', absolutePath, 'as the entry point because file exists and is a common entry point and no entry point was explicitly selected');
|
|
84
84
|
return {
|
|
85
85
|
file: absolutePath,
|
|
86
86
|
remainingArgs: args,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { BrowserExecutable, ChromiumOptions, FrameRange } from '@remotion/renderer';
|
|
1
|
+
import type { BrowserExecutable, ChromiumOptions, FrameRange, LogLevel } from '@remotion/renderer';
|
|
2
2
|
export declare const getAndValidateAbsoluteOutputFile: (relativeOutputLocation: string, overwrite: boolean) => string;
|
|
3
3
|
export declare const getCliOptions: (options: {
|
|
4
4
|
isLambda: boolean;
|
|
5
5
|
type: 'still' | 'series' | 'get-compositions';
|
|
6
6
|
remotionRoot: string;
|
|
7
|
+
logLevel: LogLevel;
|
|
7
8
|
}) => Promise<{
|
|
8
9
|
puppeteerTimeout: number;
|
|
9
10
|
concurrency: string | number | null;
|
|
@@ -34,7 +35,7 @@ export declare const getCliOptions: (options: {
|
|
|
34
35
|
videoBitrate: string | null;
|
|
35
36
|
height: number | null;
|
|
36
37
|
width: number | null;
|
|
37
|
-
configFileImageFormat: "
|
|
38
|
+
configFileImageFormat: "none" | "png" | "jpeg" | undefined;
|
|
38
39
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
39
40
|
deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
|
|
40
41
|
colorSpace: "default" | "bt709";
|
package/dist/get-cli-options.js
CHANGED
|
@@ -11,12 +11,12 @@ const config_1 = require("./config");
|
|
|
11
11
|
const get_env_1 = require("./get-env");
|
|
12
12
|
const get_input_props_1 = require("./get-input-props");
|
|
13
13
|
const log_1 = require("./log");
|
|
14
|
-
const getAndValidateFrameRange = () => {
|
|
14
|
+
const getAndValidateFrameRange = (logLevel, indent) => {
|
|
15
15
|
const frameRange = config_1.ConfigInternals.getRange();
|
|
16
16
|
if (typeof frameRange === 'number') {
|
|
17
|
-
log_1.Log.warn('Selected a single frame. Assuming you want to output an image.');
|
|
18
|
-
log_1.Log.warn(`If you want to render a video, pass a range: '--frames=${frameRange}-${frameRange}'.`);
|
|
19
|
-
log_1.Log.warn("To dismiss this message, add the '--sequence' flag explicitly.");
|
|
17
|
+
log_1.Log.warn({ logLevel, indent }, 'Selected a single frame. Assuming you want to output an image.');
|
|
18
|
+
log_1.Log.warn({ logLevel, indent }, `If you want to render a video, pass a range: '--frames=${frameRange}-${frameRange}'.`);
|
|
19
|
+
log_1.Log.warn({ indent, logLevel }, "To dismiss this message, add the '--sequence' flag explicitly.");
|
|
20
20
|
}
|
|
21
21
|
return frameRange;
|
|
22
22
|
};
|
|
@@ -66,7 +66,7 @@ const getAndValidateBrowser = async ({ browserExecutable, indent, logLevel, }) =
|
|
|
66
66
|
};
|
|
67
67
|
const getCliOptions = async (options) => {
|
|
68
68
|
var _a;
|
|
69
|
-
const frameRange = getAndValidateFrameRange();
|
|
69
|
+
const frameRange = getAndValidateFrameRange(options.logLevel, false);
|
|
70
70
|
const shouldOutputImageSequence = options.type === 'still'
|
|
71
71
|
? true
|
|
72
72
|
: getAndValidateShouldOutputImageSequence({
|
|
@@ -101,19 +101,18 @@ const getCliOptions = async (options) => {
|
|
|
101
101
|
setting: 'concurrency',
|
|
102
102
|
checkIfValidForCurrentMachine: false,
|
|
103
103
|
});
|
|
104
|
-
const logLevel = config_1.ConfigInternals.Logging.getLogLevel();
|
|
105
104
|
return {
|
|
106
105
|
puppeteerTimeout: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
|
|
107
106
|
concurrency,
|
|
108
107
|
frameRange,
|
|
109
108
|
shouldOutputImageSequence,
|
|
110
|
-
inputProps: (0, get_input_props_1.getInputProps)(null),
|
|
111
|
-
envVariables: await (0, get_env_1.getEnvironmentVariables)(null),
|
|
109
|
+
inputProps: (0, get_input_props_1.getInputProps)(null, options.logLevel),
|
|
110
|
+
envVariables: await (0, get_env_1.getEnvironmentVariables)(null, options.logLevel),
|
|
112
111
|
jpegQuality: config_1.ConfigInternals.getJpegQuality(),
|
|
113
112
|
browser: await getAndValidateBrowser({
|
|
114
113
|
browserExecutable,
|
|
115
114
|
indent: false,
|
|
116
|
-
logLevel,
|
|
115
|
+
logLevel: options.logLevel,
|
|
117
116
|
}),
|
|
118
117
|
crf,
|
|
119
118
|
pixelFormat,
|
|
@@ -39,7 +39,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, serializedInputProp
|
|
|
39
39
|
offthreadVideoCacheSizeInBytes,
|
|
40
40
|
});
|
|
41
41
|
if (propsSize > 10000000) {
|
|
42
|
-
log_1.Log.
|
|
42
|
+
log_1.Log.warn({
|
|
43
43
|
indent,
|
|
44
44
|
logLevel,
|
|
45
45
|
}, `The props of your composition are large (${(0, format_bytes_1.formatBytes)(propsSize)}). This may cause slowdown.`);
|
package/dist/get-env.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
export declare const getEnvironmentVariables: (onUpdate: ((newProps: Record<string, string>) => void) | null, logLevel: LogLevel) => Promise<Record<string, string>>;
|
package/dist/get-env.js
CHANGED
|
@@ -21,7 +21,7 @@ function getProcessEnv() {
|
|
|
21
21
|
}
|
|
22
22
|
return env;
|
|
23
23
|
}
|
|
24
|
-
const watchEnvFile = ({ processEnv, envFile, onUpdate, }) => {
|
|
24
|
+
const watchEnvFile = ({ processEnv, envFile, onUpdate, logLevel, }) => {
|
|
25
25
|
const updateFile = async () => {
|
|
26
26
|
const file = await node_fs_1.default.promises.readFile(envFile, 'utf-8');
|
|
27
27
|
onUpdate({
|
|
@@ -34,7 +34,7 @@ const watchEnvFile = ({ processEnv, envFile, onUpdate, }) => {
|
|
|
34
34
|
onChange: async (type) => {
|
|
35
35
|
try {
|
|
36
36
|
if (type === 'deleted') {
|
|
37
|
-
log_1.Log.warn(`${envFile} was deleted.`);
|
|
37
|
+
log_1.Log.warn({ indent: false, logLevel }, `${envFile} was deleted.`);
|
|
38
38
|
}
|
|
39
39
|
else if (type === 'changed') {
|
|
40
40
|
await updateFile();
|
|
@@ -52,15 +52,15 @@ const watchEnvFile = ({ processEnv, envFile, onUpdate, }) => {
|
|
|
52
52
|
});
|
|
53
53
|
return unwatch;
|
|
54
54
|
};
|
|
55
|
-
const getEnvForEnvFile = async (processEnv, envFile, onUpdate) => {
|
|
55
|
+
const getEnvForEnvFile = async (processEnv, envFile, onUpdate, logLevel) => {
|
|
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.');
|
|
60
|
+
log_1.Log.warn({ indent: false, logLevel }, 'Unsupported feature (fs.watchFile): .env file will not hot reload.');
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
|
-
watchEnvFile({ processEnv, envFile, onUpdate });
|
|
63
|
+
watchEnvFile({ processEnv, envFile, onUpdate, logLevel });
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return {
|
|
@@ -74,7 +74,7 @@ const getEnvForEnvFile = async (processEnv, envFile, onUpdate) => {
|
|
|
74
74
|
process.exit(1);
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
const getEnvironmentVariables = (onUpdate) => {
|
|
77
|
+
const getEnvironmentVariables = (onUpdate, logLevel) => {
|
|
78
78
|
const processEnv = getProcessEnv();
|
|
79
79
|
if (parse_command_line_1.parsedCli['env-file']) {
|
|
80
80
|
const envFile = node_path_1.default.resolve(process.cwd(), parse_command_line_1.parsedCli['env-file']);
|
|
@@ -84,7 +84,7 @@ const getEnvironmentVariables = (onUpdate) => {
|
|
|
84
84
|
log_1.Log.error('Check that your path is correct and try again.');
|
|
85
85
|
process.exit(1);
|
|
86
86
|
}
|
|
87
|
-
return getEnvForEnvFile(processEnv, envFile, onUpdate);
|
|
87
|
+
return getEnvForEnvFile(processEnv, envFile, onUpdate, logLevel);
|
|
88
88
|
}
|
|
89
89
|
const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
|
|
90
90
|
const configFileSetting = config_1.ConfigInternals.getDotEnvLocation();
|
|
@@ -96,24 +96,25 @@ const getEnvironmentVariables = (onUpdate) => {
|
|
|
96
96
|
log_1.Log.error('Check that your path is correct and try again.');
|
|
97
97
|
process.exit(1);
|
|
98
98
|
}
|
|
99
|
-
return getEnvForEnvFile(processEnv, envFile, onUpdate);
|
|
99
|
+
return getEnvForEnvFile(processEnv, envFile, onUpdate, logLevel);
|
|
100
100
|
}
|
|
101
101
|
const defaultEnvFile = node_path_1.default.resolve(remotionRoot, '.env');
|
|
102
102
|
if (!node_fs_1.default.existsSync(defaultEnvFile)) {
|
|
103
103
|
if (onUpdate) {
|
|
104
104
|
if (typeof node_fs_1.default.watchFile === 'undefined') {
|
|
105
|
-
log_1.Log.warn('Unsupported Bun feature: .env file will not hot reload.');
|
|
105
|
+
log_1.Log.warn({ indent: false, logLevel }, 'Unsupported Bun feature: .env file will not hot reload.');
|
|
106
106
|
}
|
|
107
107
|
else {
|
|
108
108
|
watchEnvFile({
|
|
109
109
|
processEnv,
|
|
110
110
|
envFile: defaultEnvFile,
|
|
111
111
|
onUpdate,
|
|
112
|
+
logLevel,
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
return Promise.resolve(processEnv);
|
|
116
117
|
}
|
|
117
|
-
return getEnvForEnvFile(processEnv, defaultEnvFile, onUpdate);
|
|
118
|
+
return getEnvForEnvFile(processEnv, defaultEnvFile, onUpdate, logLevel);
|
|
118
119
|
};
|
|
119
120
|
exports.getEnvironmentVariables = getEnvironmentVariables;
|
package/dist/get-filename.js
CHANGED
|
@@ -24,7 +24,7 @@ const getOutputFilename = ({ imageSequence, compositionName, defaultExtension, a
|
|
|
24
24
|
return filename;
|
|
25
25
|
}
|
|
26
26
|
if (extension === null && !imageSequence) {
|
|
27
|
-
log_1.Log.
|
|
27
|
+
log_1.Log.warn({ indent, logLevel }, `No file extension specified, adding ${defaultExtension} automatically.`);
|
|
28
28
|
return `${filename}.${defaultExtension}`;
|
|
29
29
|
}
|
|
30
30
|
return filename;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
export declare const getInputProps: (onUpdate: ((newProps: Record<string, unknown>) => void) | null, logLevel: LogLevel) => Record<string, unknown>;
|
package/dist/get-input-props.js
CHANGED
|
@@ -9,7 +9,7 @@ const node_os_1 = __importDefault(require("node:os"));
|
|
|
9
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
10
|
const log_1 = require("./log");
|
|
11
11
|
const parse_command_line_1 = require("./parse-command-line");
|
|
12
|
-
const getInputProps = (onUpdate) => {
|
|
12
|
+
const getInputProps = (onUpdate, logLevel) => {
|
|
13
13
|
if (!parse_command_line_1.parsedCli.props) {
|
|
14
14
|
return {};
|
|
15
15
|
}
|
|
@@ -38,11 +38,15 @@ const getInputProps = (onUpdate) => {
|
|
|
38
38
|
log_1.Log.info('Got the following value:', parse_command_line_1.parsedCli.props);
|
|
39
39
|
log_1.Log.error('Check that your input is parseable using `JSON.parse` and try again.');
|
|
40
40
|
if (node_os_1.default.platform() === 'win32') {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
log_1.Log.warn('
|
|
41
|
+
const logOptions = {
|
|
42
|
+
indent: false,
|
|
43
|
+
logLevel,
|
|
44
|
+
};
|
|
45
|
+
log_1.Log.warn(logOptions, 'Note: Windows handles escaping of quotes very weirdly in the command line.');
|
|
46
|
+
log_1.Log.warn(logOptions, 'This might have led to you having this problem.');
|
|
47
|
+
log_1.Log.warn(logOptions, 'Consider using the alternative API for --props which is to pass');
|
|
48
|
+
log_1.Log.warn(logOptions, 'a path to a JSON file:');
|
|
49
|
+
log_1.Log.warn(logOptions, ' --props=path/to/props.json');
|
|
46
50
|
}
|
|
47
51
|
process.exit(1);
|
|
48
52
|
}
|
package/dist/gpu.d.ts
CHANGED
package/dist/gpu.js
CHANGED
|
@@ -6,11 +6,12 @@ const chalk_1 = require("./chalk");
|
|
|
6
6
|
const get_cli_options_1 = require("./get-cli-options");
|
|
7
7
|
const log_1 = require("./log");
|
|
8
8
|
exports.GPU_COMMAND = 'gpu';
|
|
9
|
-
const gpuCommand = async (remotionRoot) => {
|
|
10
|
-
const { browserExecutable,
|
|
9
|
+
const gpuCommand = async (remotionRoot, logLevel) => {
|
|
10
|
+
const { browserExecutable, chromiumOptions } = await (0, get_cli_options_1.getCliOptions)({
|
|
11
11
|
isLambda: false,
|
|
12
12
|
remotionRoot,
|
|
13
13
|
type: 'get-compositions',
|
|
14
|
+
logLevel,
|
|
14
15
|
});
|
|
15
16
|
const statuses = await renderer_1.RenderInternals.getChromiumGpuInformation({
|
|
16
17
|
browserExecutable,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import minimist from 'minimist';
|
|
2
2
|
export declare const cli: () => Promise<void>;
|
|
3
|
-
export * from './render';
|
|
4
3
|
export declare const CliInternals: {
|
|
5
4
|
createOverwriteableCliOutput: (options: {
|
|
6
5
|
quiet: boolean;
|
|
@@ -60,28 +59,14 @@ export declare const CliInternals: {
|
|
|
60
59
|
};
|
|
61
60
|
makeProgressBar: (percentage: number) => string;
|
|
62
61
|
Log: {
|
|
63
|
-
verbose: (
|
|
64
|
-
verboseAdvanced: (options: {
|
|
65
|
-
indent: boolean;
|
|
66
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
67
|
-
} & {
|
|
62
|
+
verbose: (options: import("@remotion/renderer").LogOptions & {
|
|
68
63
|
tag?: string | undefined;
|
|
69
64
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
70
65
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
71
|
-
infoAdvanced: (options:
|
|
72
|
-
|
|
73
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
74
|
-
}, message?: any, ...optionalParams: any[]) => void;
|
|
75
|
-
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
76
|
-
warnAdvanced: (options: {
|
|
77
|
-
indent: boolean;
|
|
78
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
79
|
-
}, message?: any, ...optionalParams: any[]) => void;
|
|
66
|
+
infoAdvanced: (options: import("@remotion/renderer").LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
67
|
+
warn: (options: import("@remotion/renderer").LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
80
68
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
81
|
-
errorAdvanced: (options: {
|
|
82
|
-
indent: boolean;
|
|
83
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
84
|
-
} & {
|
|
69
|
+
errorAdvanced: (options: import("@remotion/renderer").LogOptions & {
|
|
85
70
|
tag?: string | undefined;
|
|
86
71
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
87
72
|
};
|
|
@@ -89,6 +74,7 @@ export declare const CliInternals: {
|
|
|
89
74
|
isLambda: boolean;
|
|
90
75
|
type: "still" | "series" | "get-compositions";
|
|
91
76
|
remotionRoot: string;
|
|
77
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
92
78
|
}) => Promise<{
|
|
93
79
|
puppeteerTimeout: number;
|
|
94
80
|
concurrency: string | number | null;
|
|
@@ -119,19 +105,19 @@ export declare const CliInternals: {
|
|
|
119
105
|
videoBitrate: string | null;
|
|
120
106
|
height: number | null;
|
|
121
107
|
width: number | null;
|
|
122
|
-
configFileImageFormat: "
|
|
108
|
+
configFileImageFormat: "none" | "png" | "jpeg" | undefined;
|
|
123
109
|
offthreadVideoCacheSizeInBytes: number | null;
|
|
124
110
|
deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
|
|
125
111
|
colorSpace: "default" | "bt709";
|
|
126
112
|
}>;
|
|
127
113
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
128
|
-
initializeCli: (remotionRoot: string) => Promise<
|
|
114
|
+
initializeCli: (remotionRoot: string) => Promise<"verbose" | "info" | "warn" | "error">;
|
|
129
115
|
BooleanFlags: string[];
|
|
130
116
|
quietFlagProvided: () => boolean;
|
|
131
117
|
parsedCli: {
|
|
132
118
|
"browser-executable": import("@remotion/renderer").BrowserExecutable;
|
|
133
119
|
"pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
134
|
-
"image-format": "
|
|
120
|
+
"image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
|
|
135
121
|
"prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
|
|
136
122
|
"x264-preset": "medium" | "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "slow" | "slower" | "veryslow" | "placebo";
|
|
137
123
|
"bundle-cache": string;
|
|
@@ -202,7 +188,7 @@ export declare const CliInternals: {
|
|
|
202
188
|
downloadName: string | null;
|
|
203
189
|
outName: string | null;
|
|
204
190
|
configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
205
|
-
cliFlag: "
|
|
191
|
+
cliFlag: "none" | "png" | "jpeg" | "pdf" | "webp" | null;
|
|
206
192
|
isLambda: boolean;
|
|
207
193
|
fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
|
|
208
194
|
}) => {
|
|
@@ -210,15 +196,15 @@ export declare const CliInternals: {
|
|
|
210
196
|
source: string;
|
|
211
197
|
};
|
|
212
198
|
minimist: typeof minimist;
|
|
213
|
-
findEntryPoint: (args: string[], remotionRoot: string) => {
|
|
199
|
+
findEntryPoint: (args: string[], remotionRoot: string, logLevel: "verbose" | "info" | "warn" | "error") => {
|
|
214
200
|
file: string | null;
|
|
215
201
|
remainingArgs: string[];
|
|
216
202
|
reason: string;
|
|
217
203
|
};
|
|
218
204
|
getVideoImageFormat: ({ codec, uiImageFormat, }: {
|
|
219
205
|
codec: import("@remotion/renderer").CodecOrUndefined;
|
|
220
|
-
uiImageFormat: "
|
|
221
|
-
}) => "
|
|
206
|
+
uiImageFormat: "none" | "png" | "jpeg" | null;
|
|
207
|
+
}) => "none" | "png" | "jpeg";
|
|
222
208
|
printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
|
|
223
209
|
getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, compositionCodec, }: {
|
|
224
210
|
cliFlag: import("@remotion/renderer").CodecOrUndefined;
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
4
|
};
|
|
@@ -61,7 +47,7 @@ const cli = async () => {
|
|
|
61
47
|
}
|
|
62
48
|
const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
|
|
63
49
|
if (command !== versions_1.VERSIONS_COMMAND) {
|
|
64
|
-
await (0, versions_1.validateVersionsBeforeCommand)(remotionRoot);
|
|
50
|
+
await (0, versions_1.validateVersionsBeforeCommand)(remotionRoot, 'info');
|
|
65
51
|
}
|
|
66
52
|
const isBun = typeof Bun !== 'undefined';
|
|
67
53
|
if (isBun) {
|
|
@@ -80,32 +66,32 @@ const cli = async () => {
|
|
|
80
66
|
const errorSymbolicationLock = isStudio
|
|
81
67
|
? 0
|
|
82
68
|
: renderer_1.RenderInternals.registerErrorSymbolicationLock();
|
|
83
|
-
(0,
|
|
84
|
-
|
|
69
|
+
const logLevel = await (0, initialize_cli_1.initializeCli)(remotionRoot);
|
|
70
|
+
(0, cleanup_before_quit_1.handleCtrlC)({ indent: false, logLevel });
|
|
85
71
|
try {
|
|
86
72
|
if (command === 'compositions') {
|
|
87
|
-
await (0, compositions_1.listCompositionsCommand)(remotionRoot, args);
|
|
73
|
+
await (0, compositions_1.listCompositionsCommand)(remotionRoot, args, logLevel);
|
|
88
74
|
}
|
|
89
75
|
else if (isStudio) {
|
|
90
|
-
await (0, studio_1.studioCommand)(remotionRoot, args);
|
|
76
|
+
await (0, studio_1.studioCommand)(remotionRoot, args, logLevel);
|
|
91
77
|
}
|
|
92
78
|
else if (command === 'lambda') {
|
|
93
79
|
await (0, lambda_command_1.lambdaCommand)(remotionRoot, args);
|
|
94
80
|
}
|
|
95
81
|
else if (command === 'cloudrun') {
|
|
96
|
-
await (0, cloudrun_command_1.cloudrunCommand)(remotionRoot, args);
|
|
82
|
+
await (0, cloudrun_command_1.cloudrunCommand)(remotionRoot, args, logLevel);
|
|
97
83
|
}
|
|
98
84
|
else if (command === 'render') {
|
|
99
|
-
await (0, render_1.render)(remotionRoot, args);
|
|
85
|
+
await (0, render_1.render)(remotionRoot, args, logLevel);
|
|
100
86
|
}
|
|
101
87
|
else if (command === 'still') {
|
|
102
|
-
await (0, still_1.still)(remotionRoot, args);
|
|
88
|
+
await (0, still_1.still)(remotionRoot, args, logLevel);
|
|
103
89
|
}
|
|
104
90
|
else if (command === 'ffmpeg') {
|
|
105
91
|
(0, ffmpeg_1.ffmpegCommand)(remotionRoot, process.argv.slice(3));
|
|
106
92
|
}
|
|
107
93
|
else if (command === 'gpu') {
|
|
108
|
-
await (0, gpu_1.gpuCommand)(remotionRoot);
|
|
94
|
+
await (0, gpu_1.gpuCommand)(remotionRoot, logLevel);
|
|
109
95
|
}
|
|
110
96
|
else if (command === 'ffprobe') {
|
|
111
97
|
(0, ffmpeg_1.ffprobeCommand)(remotionRoot, process.argv.slice(3));
|
|
@@ -114,10 +100,10 @@ const cli = async () => {
|
|
|
114
100
|
await (0, upgrade_1.upgrade)(remotionRoot, parse_command_line_1.parsedCli['package-manager'], parse_command_line_1.parsedCli.version);
|
|
115
101
|
}
|
|
116
102
|
else if (command === versions_1.VERSIONS_COMMAND) {
|
|
117
|
-
await (0, versions_1.versionsCommand)(remotionRoot);
|
|
103
|
+
await (0, versions_1.versionsCommand)(remotionRoot, logLevel);
|
|
118
104
|
}
|
|
119
105
|
else if (command === 'benchmark') {
|
|
120
|
-
await (0, benchmark_1.benchmarkCommand)(remotionRoot, args);
|
|
106
|
+
await (0, benchmark_1.benchmarkCommand)(remotionRoot, args, logLevel);
|
|
121
107
|
}
|
|
122
108
|
else if (command === 'help') {
|
|
123
109
|
(0, print_help_1.printHelp)();
|
|
@@ -134,16 +120,15 @@ const cli = async () => {
|
|
|
134
120
|
catch (err) {
|
|
135
121
|
log_1.Log.info();
|
|
136
122
|
await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
|
|
137
|
-
(0, cleanup_before_quit_1.cleanupBeforeQuit)();
|
|
123
|
+
(0, cleanup_before_quit_1.cleanupBeforeQuit)({ indent: false, logLevel });
|
|
138
124
|
process.exit(1);
|
|
139
125
|
}
|
|
140
126
|
finally {
|
|
141
127
|
renderer_1.RenderInternals.unlockErrorSymbolicationLock(errorSymbolicationLock);
|
|
142
|
-
(0, cleanup_before_quit_1.cleanupBeforeQuit)();
|
|
128
|
+
(0, cleanup_before_quit_1.cleanupBeforeQuit)({ indent: false, logLevel });
|
|
143
129
|
}
|
|
144
130
|
};
|
|
145
131
|
exports.cli = cli;
|
|
146
|
-
__exportStar(require("./render"), exports);
|
|
147
132
|
exports.CliInternals = {
|
|
148
133
|
createOverwriteableCliOutput: progress_bar_1.createOverwriteableCliOutput,
|
|
149
134
|
chalk: chalk_1.chalk,
|
package/dist/initialize-cli.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
export declare const initializeCli: (remotionRoot: string) => Promise<LogLevel>;
|
package/dist/initialize-cli.js
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initializeCli = void 0;
|
|
4
|
+
const config_1 = require("./config");
|
|
4
5
|
const get_config_file_name_1 = require("./get-config-file-name");
|
|
5
6
|
const log_1 = require("./log");
|
|
6
7
|
const parse_command_line_1 = require("./parse-command-line");
|
|
7
8
|
const initializeCli = async (remotionRoot) => {
|
|
8
9
|
const appliedName = await (0, get_config_file_name_1.loadConfig)(remotionRoot);
|
|
9
10
|
(0, parse_command_line_1.parseCommandLine)();
|
|
11
|
+
const logLevel = config_1.ConfigInternals.Logging.getLogLevel();
|
|
10
12
|
// Only now Log.verbose is available
|
|
11
|
-
log_1.Log.verbose('Remotion root directory:', remotionRoot);
|
|
13
|
+
log_1.Log.verbose({ indent: false, logLevel }, 'Remotion root directory:', remotionRoot);
|
|
12
14
|
if (remotionRoot !== process.cwd()) {
|
|
13
|
-
log_1.Log.warn(`Warning: The root directory of your project is ${remotionRoot}, but you are executing this command from ${process.cwd()}. The recommendation is to execute commands from the root directory.`);
|
|
15
|
+
log_1.Log.warn({ indent: false, logLevel }, `Warning: The root directory of your project is ${remotionRoot}, but you are executing this command from ${process.cwd()}. The recommendation is to execute commands from the root directory.`);
|
|
14
16
|
}
|
|
15
17
|
if (appliedName) {
|
|
16
|
-
log_1.Log.verbose(`Applied configuration from ${appliedName}.`);
|
|
18
|
+
log_1.Log.verbose({ indent: false, logLevel }, `Applied configuration from ${appliedName}.`);
|
|
17
19
|
}
|
|
18
20
|
else {
|
|
19
|
-
log_1.Log.verbose('No config file loaded.');
|
|
21
|
+
log_1.Log.verbose({ indent: false, logLevel }, 'No config file loaded.');
|
|
20
22
|
}
|
|
23
|
+
return logLevel;
|
|
21
24
|
};
|
|
22
25
|
exports.initializeCli = initializeCli;
|
package/dist/log.d.ts
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
export declare const Log: {
|
|
2
|
-
verbose: (
|
|
3
|
-
verboseAdvanced: (options: {
|
|
4
|
-
indent: boolean;
|
|
5
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
6
|
-
} & {
|
|
2
|
+
verbose: (options: import("@remotion/renderer").LogOptions & {
|
|
7
3
|
tag?: string | undefined;
|
|
8
4
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
5
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
|
-
infoAdvanced: (options:
|
|
11
|
-
|
|
12
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
13
|
-
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
|
-
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
|
-
warnAdvanced: (options: {
|
|
16
|
-
indent: boolean;
|
|
17
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
18
|
-
}, message?: any, ...optionalParams: any[]) => void;
|
|
6
|
+
infoAdvanced: (options: import("@remotion/renderer").LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
7
|
+
warn: (options: import("@remotion/renderer").LogOptions, message?: any, ...optionalParams: any[]) => void;
|
|
19
8
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
|
-
errorAdvanced: (options: {
|
|
21
|
-
indent: boolean;
|
|
22
|
-
logLevel: "verbose" | "info" | "warn" | "error";
|
|
23
|
-
} & {
|
|
9
|
+
errorAdvanced: (options: import("@remotion/renderer").LogOptions & {
|
|
24
10
|
tag?: string | undefined;
|
|
25
11
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
26
12
|
};
|
package/dist/make-on-download.js
CHANGED
|
@@ -15,7 +15,7 @@ const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, upd
|
|
|
15
15
|
};
|
|
16
16
|
const nextDownloadIndex = downloads.length;
|
|
17
17
|
downloads.push(download);
|
|
18
|
-
log_1.Log.
|
|
18
|
+
log_1.Log.verbose({ indent, logLevel }, `Starting download [${nextDownloadIndex}]:`, src);
|
|
19
19
|
updateRenderProgress({
|
|
20
20
|
newline: false,
|
|
21
21
|
printToConsole: !updatesDontOverwrite,
|
|
@@ -30,7 +30,7 @@ const makeOnDownload = ({ indent, logLevel, updatesDontOverwrite, downloads, upd
|
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
lastUpdate = Date.now();
|
|
33
|
-
log_1.Log.
|
|
33
|
+
log_1.Log.verbose({ indent, logLevel }, `Download [${nextDownloadIndex}]:`, percent ? `${(percent * 100).toFixed(1)}%` : (0, format_bytes_1.formatBytes)(downloaded));
|
|
34
34
|
updateRenderProgress({
|
|
35
35
|
newline: false,
|
|
36
36
|
printToConsole: !updatesDontOverwrite,
|
|
@@ -113,7 +113,7 @@ const parseCommandLine = () => {
|
|
|
113
113
|
config_1.Config.setOverwriteOutput(exports.parsedCli.overwrite);
|
|
114
114
|
}
|
|
115
115
|
if (typeof exports.parsedCli.quality !== 'undefined') {
|
|
116
|
-
log_1.Log.warn('The --quality flag has been renamed to --jpeg-quality instead.');
|
|
116
|
+
log_1.Log.warn({ indent: false, logLevel: 'info' }, 'The --quality flag has been renamed to --jpeg-quality instead.');
|
|
117
117
|
config_1.Config.setJpegQuality(exports.parsedCli.quality);
|
|
118
118
|
}
|
|
119
119
|
if (typeof exports.parsedCli['jpeg-quality'] !== 'undefined') {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
3
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
3
4
|
import type { AddRenderRequest, CancelRenderRequest, CancelRenderResponse, CanUpdateDefaultPropsRequest, CanUpdateDefaultPropsResponse, CopyStillToClipboardRequest, OpenInFileExplorerRequest, RemoveRenderRequest, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, UnsubscribeFromFileExistenceRequest, UpdateAvailableRequest, UpdateAvailableResponse, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse } from './render-queue/job';
|
|
4
5
|
export type ApiHandler<ReqData, ResData> = (params: {
|
|
@@ -7,6 +8,7 @@ export type ApiHandler<ReqData, ResData> = (params: {
|
|
|
7
8
|
remotionRoot: string;
|
|
8
9
|
request: IncomingMessage;
|
|
9
10
|
response: ServerResponse;
|
|
11
|
+
logLevel: LogLevel;
|
|
10
12
|
}) => Promise<ResData>;
|
|
11
13
|
type ReqAndRes<A, B> = {
|
|
12
14
|
Request: A;
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | -2 | Ranges;
|
|
15
15
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
1
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
3
|
import type { ApiHandler } from './api-types';
|
|
3
|
-
export declare const handleRequest: <Req, Res>({ remotionRoot, request, response, entryPoint, handler, }: {
|
|
4
|
+
export declare const handleRequest: <Req, Res>({ remotionRoot, request, response, entryPoint, handler, logLevel, }: {
|
|
4
5
|
remotionRoot: string;
|
|
5
6
|
request: IncomingMessage;
|
|
6
7
|
response: ServerResponse;
|
|
7
8
|
entryPoint: string;
|
|
8
9
|
handler: ApiHandler<Req, Res>;
|
|
10
|
+
logLevel: LogLevel;
|
|
9
11
|
}) => Promise<void>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handleRequest = void 0;
|
|
4
4
|
const parse_body_1 = require("./parse-body");
|
|
5
|
-
const handleRequest = async ({ remotionRoot, request, response, entryPoint, handler, }) => {
|
|
5
|
+
const handleRequest = async ({ remotionRoot, request, response, entryPoint, handler, logLevel, }) => {
|
|
6
6
|
if (request.method === 'OPTIONS') {
|
|
7
7
|
response.statusCode = 200;
|
|
8
8
|
response.end();
|
|
@@ -18,6 +18,7 @@ const handleRequest = async ({ remotionRoot, request, response, entryPoint, hand
|
|
|
18
18
|
request,
|
|
19
19
|
response,
|
|
20
20
|
input: body,
|
|
21
|
+
logLevel,
|
|
21
22
|
});
|
|
22
23
|
response.end(JSON.stringify({
|
|
23
24
|
success: true,
|