@remotion/cli 4.0.148 → 4.0.150
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.js +0 -3
- package/dist/bundle.js +0 -2
- package/dist/check-for-npm-run-flag-pass.d.ts +5 -0
- package/dist/check-for-npm-run-flag-pass.js +43 -0
- package/dist/cloudrun-command.js +1 -1
- package/dist/compositions.js +0 -2
- package/dist/download-progress.js +5 -4
- package/dist/eta-string.d.ts +1 -0
- package/dist/eta-string.js +21 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +4 -0
- package/dist/make-progress-bar.js +16 -13
- package/dist/progress-bar.d.ts +11 -5
- package/dist/progress-bar.js +64 -25
- package/dist/render-flows/render.js +49 -19
- package/dist/render-flows/still.js +30 -15
- package/dist/setup-cache.d.ts +2 -6
- package/dist/setup-cache.js +5 -7
- package/package.json +13 -15
package/dist/benchmark.js
CHANGED
|
@@ -153,8 +153,6 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
153
153
|
onProgress: () => undefined,
|
|
154
154
|
indentOutput: false,
|
|
155
155
|
logLevel,
|
|
156
|
-
bundlingStep: 0,
|
|
157
|
-
steps: 1,
|
|
158
156
|
onDirectoryCreated: (dir) => {
|
|
159
157
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
160
158
|
},
|
|
@@ -331,7 +329,6 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
331
329
|
binariesDirectory: binariesDirectoryOption.getValue({
|
|
332
330
|
commandLine: parsed_cli_1.parsedCli,
|
|
333
331
|
}).value,
|
|
334
|
-
finishRenderProgress: () => undefined,
|
|
335
332
|
separateAudioTo: null,
|
|
336
333
|
forSeamlessAacConcatenation: forSeamlessAacConcatenationOption.getValue({
|
|
337
334
|
commandLine: parsed_cli_1.parsedCli,
|
package/dist/bundle.js
CHANGED
|
@@ -63,11 +63,9 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
63
63
|
fullPath: file,
|
|
64
64
|
logLevel,
|
|
65
65
|
onDirectoryCreated: () => { },
|
|
66
|
-
bundlingStep: 0,
|
|
67
66
|
indent: false,
|
|
68
67
|
quietProgress: updatesDontOverwrite,
|
|
69
68
|
publicDir,
|
|
70
|
-
steps: 1,
|
|
71
69
|
remotionRoot,
|
|
72
70
|
onProgressCallback: ({ bundling, copying }) => {
|
|
73
71
|
// Handle floating point inaccuracies
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// If someone passes --log=verbose to npm run render
|
|
3
|
+
// We don't receive it.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.checkForNpmRunFlagPass = void 0;
|
|
6
|
+
const log_1 = require("./log");
|
|
7
|
+
const checkForNpmRunFlagPass = ({ indent, logLevel, }) => {
|
|
8
|
+
if (!process.env.npm_config_log) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
log_1.Log.error({ indent, logLevel }, `The environment variable "npm_config_log" is set to "${process.env.npm_config_log}".`);
|
|
12
|
+
log_1.Log.error({ indent, logLevel }, `This indicates a likely mistake:`);
|
|
13
|
+
log_1.Log.error({
|
|
14
|
+
indent,
|
|
15
|
+
logLevel,
|
|
16
|
+
}, `--log gets passed to the npm command, however npm has no "log" configuration option.`);
|
|
17
|
+
log_1.Log.error({
|
|
18
|
+
indent,
|
|
19
|
+
logLevel,
|
|
20
|
+
}, `You most likely wanted to pass --log to the Remotion CLI.`);
|
|
21
|
+
log_1.Log.error({
|
|
22
|
+
indent,
|
|
23
|
+
logLevel,
|
|
24
|
+
}, `However, arguments passed to "npm run" don't get received by the script, in this case Remotion.`);
|
|
25
|
+
log_1.Log.error({
|
|
26
|
+
indent,
|
|
27
|
+
logLevel,
|
|
28
|
+
}, `Edit the npm script and pass Remotion flags to "remotion" command instead. Example:`);
|
|
29
|
+
log_1.Log.error({
|
|
30
|
+
indent,
|
|
31
|
+
logLevel,
|
|
32
|
+
});
|
|
33
|
+
log_1.Log.error({
|
|
34
|
+
indent,
|
|
35
|
+
logLevel,
|
|
36
|
+
}, ` "render": "remotion render --log=verbose"`);
|
|
37
|
+
log_1.Log.error({
|
|
38
|
+
indent,
|
|
39
|
+
logLevel,
|
|
40
|
+
});
|
|
41
|
+
process.exit(1);
|
|
42
|
+
};
|
|
43
|
+
exports.checkForNpmRunFlagPass = checkForNpmRunFlagPass;
|
package/dist/cloudrun-command.js
CHANGED
|
@@ -9,7 +9,7 @@ const cloudrunCommand = async (remotionRoot, args, logLevel) => {
|
|
|
9
9
|
paths: [remotionRoot],
|
|
10
10
|
});
|
|
11
11
|
const { CloudrunInternals } = require(path);
|
|
12
|
-
await CloudrunInternals.executeCommand(args, remotionRoot);
|
|
12
|
+
await CloudrunInternals.executeCommand(args, remotionRoot, logLevel);
|
|
13
13
|
process.exit(0);
|
|
14
14
|
}
|
|
15
15
|
catch (err) {
|
package/dist/compositions.js
CHANGED
|
@@ -60,8 +60,6 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
60
60
|
onProgress: () => undefined,
|
|
61
61
|
indentOutput: false,
|
|
62
62
|
logLevel,
|
|
63
|
-
bundlingStep: 0,
|
|
64
|
-
steps: 1,
|
|
65
63
|
onDirectoryCreated: (dir) => {
|
|
66
64
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
67
65
|
},
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeMultiDownloadProgress = exports.getFileSizeDownloadBar = void 0;
|
|
4
4
|
const studio_server_1 = require("@remotion/studio-server");
|
|
5
5
|
const make_progress_bar_1 = require("./make-progress-bar");
|
|
6
|
+
const progress_bar_1 = require("./progress-bar");
|
|
6
7
|
const truthy_1 = require("./truthy");
|
|
7
8
|
const getFileSizeDownloadBar = (downloaded) => {
|
|
8
9
|
const desiredLength = (0, make_progress_bar_1.makeProgressBar)(0).length;
|
|
@@ -19,23 +20,23 @@ const makeMultiDownloadProgress = (progresses) => {
|
|
|
19
20
|
? progress.name.substring(0, 57) + '...'
|
|
20
21
|
: progress.name;
|
|
21
22
|
return [
|
|
22
|
-
`
|
|
23
|
+
`Downloading assets`.padEnd(progress_bar_1.LABEL_WIDTH, ' '),
|
|
23
24
|
progress.progress
|
|
24
25
|
? (0, make_progress_bar_1.makeProgressBar)(progress.progress)
|
|
25
26
|
: (0, exports.getFileSizeDownloadBar)(progress.downloaded),
|
|
26
|
-
|
|
27
|
+
truncatedFileName,
|
|
27
28
|
]
|
|
28
29
|
.filter(truthy_1.truthy)
|
|
29
30
|
.join(' ');
|
|
30
31
|
}
|
|
31
32
|
const everyFileHasContentLength = progresses.every((p) => p.totalBytes !== null);
|
|
32
33
|
return [
|
|
33
|
-
`
|
|
34
|
+
`Downloading assets`.padEnd(progress_bar_1.LABEL_WIDTH, ' '),
|
|
34
35
|
everyFileHasContentLength
|
|
35
36
|
? (0, make_progress_bar_1.makeProgressBar)(progresses.reduce((a, b) => a + b.progress, 0) /
|
|
36
37
|
progresses.length)
|
|
37
38
|
: (0, exports.getFileSizeDownloadBar)(progresses.reduce((a, b) => a + b.downloaded, 0)),
|
|
38
|
-
|
|
39
|
+
`${progresses.length} files`,
|
|
39
40
|
]
|
|
40
41
|
.filter(truthy_1.truthy)
|
|
41
42
|
.join(' ');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatEtaString: (timeRemainingInMilliseconds: number) => string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatEtaString = void 0;
|
|
4
|
+
const truthy_1 = require("./truthy");
|
|
5
|
+
const formatEtaString = (timeRemainingInMilliseconds) => {
|
|
6
|
+
// Get render estimated time value and extract hours, minutes, and seconds
|
|
7
|
+
const remainingTime = timeRemainingInMilliseconds / 1000;
|
|
8
|
+
const remainingTimeHours = Math.floor(remainingTime / 3600);
|
|
9
|
+
const remainingTimeMinutes = Math.round((remainingTime % 3600) / 60);
|
|
10
|
+
const remainingTimeSeconds = Math.round(remainingTime % 60);
|
|
11
|
+
// Create estimated time string by concatenating them with colons
|
|
12
|
+
const estimatedTimeString = [
|
|
13
|
+
remainingTimeHours ? `${remainingTimeHours}h` : null,
|
|
14
|
+
remainingTimeMinutes ? remainingTimeMinutes + 'm' : null,
|
|
15
|
+
`${remainingTimeSeconds}s`,
|
|
16
|
+
]
|
|
17
|
+
.filter(truthy_1.truthy)
|
|
18
|
+
.join(' ');
|
|
19
|
+
return estimatedTimeString;
|
|
20
|
+
};
|
|
21
|
+
exports.formatEtaString = formatEtaString;
|
package/dist/index.d.ts
CHANGED
|
@@ -166,4 +166,12 @@ export declare const CliInternals: {
|
|
|
166
166
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
167
167
|
quiet: boolean;
|
|
168
168
|
}) => import("@remotion/renderer").OnBrowserDownload;
|
|
169
|
+
LABEL_WIDTH: number;
|
|
170
|
+
printFact: (printLevel: "verbose" | "info" | "warn" | "error") => ({ indent, logLevel, left, right, color, }: {
|
|
171
|
+
indent: boolean;
|
|
172
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
173
|
+
left: string;
|
|
174
|
+
right: string;
|
|
175
|
+
color: "blue" | "gray" | undefined;
|
|
176
|
+
}) => void;
|
|
169
177
|
};
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ const browser_1 = require("./browser");
|
|
|
12
12
|
const browser_download_bar_1 = require("./browser-download-bar");
|
|
13
13
|
const bundle_1 = require("./bundle");
|
|
14
14
|
const chalk_1 = require("./chalk");
|
|
15
|
+
const check_for_npm_run_flag_pass_1 = require("./check-for-npm-run-flag-pass");
|
|
15
16
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
16
17
|
const cloudrun_command_1 = require("./cloudrun-command");
|
|
17
18
|
const compositions_1 = require("./compositions");
|
|
@@ -69,6 +70,7 @@ const cli = async () => {
|
|
|
69
70
|
? 0
|
|
70
71
|
: renderer_1.RenderInternals.registerErrorSymbolicationLock();
|
|
71
72
|
(0, cleanup_before_quit_1.handleCtrlC)({ indent: false, logLevel });
|
|
73
|
+
(0, check_for_npm_run_flag_pass_1.checkForNpmRunFlagPass)({ indent: false, logLevel });
|
|
72
74
|
try {
|
|
73
75
|
if (command === 'bundle') {
|
|
74
76
|
await (0, bundle_1.bundleCommand)(remotionRoot, args, logLevel);
|
|
@@ -159,4 +161,6 @@ exports.CliInternals = {
|
|
|
159
161
|
shouldUseNonOverlayingLogger: should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger,
|
|
160
162
|
getCompositionWithDimensionOverride: get_composition_with_dimension_override_1.getCompositionWithDimensionOverride,
|
|
161
163
|
defaultBrowserDownloadProgress: browser_download_bar_1.defaultBrowserDownloadProgress,
|
|
164
|
+
LABEL_WIDTH: progress_bar_1.LABEL_WIDTH,
|
|
165
|
+
printFact: progress_bar_1.printFact,
|
|
162
166
|
};
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeProgressBar = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const chalk_1 = require("./chalk");
|
|
6
|
+
const full = '━';
|
|
7
|
+
const half = '╸';
|
|
8
|
+
const half_right = '╺';
|
|
9
|
+
const totalBars = 18;
|
|
6
10
|
const makeProgressBar = (percentage) => {
|
|
7
|
-
const
|
|
11
|
+
const color = renderer_1.RenderInternals.isColorSupported();
|
|
8
12
|
const barsToShow = Math.floor(percentage * totalBars);
|
|
9
13
|
const extraBar = (percentage * totalBars) % barsToShow;
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
const grayBars = totalBars - barsToShow;
|
|
15
|
+
const showHalf = extraBar > 0.5;
|
|
16
|
+
const base = full.repeat(barsToShow) + (showHalf ? half : '');
|
|
17
|
+
const gray = (renderer_1.RenderInternals.isColorSupported() ? full : ' ')
|
|
18
|
+
.repeat(grayBars - (showHalf ? 1 : 0))
|
|
19
|
+
.split('');
|
|
20
|
+
if (!showHalf && barsToShow > 0 && gray.length > 0 && color) {
|
|
21
|
+
gray[0] = half_right;
|
|
13
22
|
}
|
|
14
|
-
|
|
15
|
-
return `╷${' '.repeat(totalBars)}`;
|
|
16
|
-
}
|
|
17
|
-
if (percentage >= 1) {
|
|
18
|
-
return `╭${base.substring(0, base.length - 1)}╮`;
|
|
19
|
-
}
|
|
20
|
-
return `╭${base.padEnd(totalBars, ' ')}`;
|
|
23
|
+
return `${chalk_1.chalk.blue(base)}${chalk_1.chalk.dim(gray.join(''))}`;
|
|
21
24
|
};
|
|
22
25
|
exports.makeProgressBar = makeProgressBar;
|
package/dist/progress-bar.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { CancelSignal } from '@remotion/renderer';
|
|
1
|
+
import type { CancelSignal, LogLevel } from '@remotion/renderer';
|
|
2
2
|
import type { AggregateRenderProgress, BundlingState, CopyingState } from '@remotion/studio-server';
|
|
3
3
|
export type OverwriteableCliOutput = {
|
|
4
4
|
update: (up: string, newline: boolean) => boolean;
|
|
5
5
|
};
|
|
6
|
+
export declare const LABEL_WIDTH = 18;
|
|
6
7
|
export declare const createOverwriteableCliOutput: (options: {
|
|
7
8
|
quiet: boolean;
|
|
8
9
|
cancelSignal: CancelSignal | null;
|
|
@@ -16,14 +17,19 @@ export declare const makeBundlingAndCopyProgress: ({ bundling, copying, symLinks
|
|
|
16
17
|
bundling: BundlingState;
|
|
17
18
|
copying: CopyingState;
|
|
18
19
|
symLinks: SymbolicLinksState;
|
|
19
|
-
}
|
|
20
|
-
export declare const makeRenderingAndStitchingProgress: ({ prog,
|
|
20
|
+
}) => string;
|
|
21
|
+
export declare const makeRenderingAndStitchingProgress: ({ prog, isUsingParallelEncoding, }: {
|
|
21
22
|
prog: AggregateRenderProgress;
|
|
22
|
-
steps: number;
|
|
23
|
-
stitchingStep: number;
|
|
24
23
|
isUsingParallelEncoding: boolean;
|
|
25
24
|
}) => {
|
|
26
25
|
output: string;
|
|
27
26
|
progress: number;
|
|
28
27
|
message: string;
|
|
29
28
|
};
|
|
29
|
+
export declare const printFact: (printLevel: LogLevel) => ({ indent, logLevel, left, right, color, }: {
|
|
30
|
+
indent: boolean;
|
|
31
|
+
logLevel: LogLevel;
|
|
32
|
+
left: string;
|
|
33
|
+
right: string;
|
|
34
|
+
color: 'blue' | 'gray' | undefined;
|
|
35
|
+
}) => void;
|
package/dist/progress-bar.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeRenderingAndStitchingProgress = exports.makeBundlingAndCopyProgress = exports.createOverwriteableCliOutput = void 0;
|
|
3
|
+
exports.printFact = exports.makeRenderingAndStitchingProgress = exports.makeBundlingAndCopyProgress = exports.createOverwriteableCliOutput = exports.LABEL_WIDTH = void 0;
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const studio_server_1 = require("@remotion/studio-server");
|
|
6
6
|
const chalk_1 = require("./chalk");
|
|
7
7
|
const download_progress_1 = require("./download-progress");
|
|
8
|
+
const eta_string_1 = require("./eta-string");
|
|
9
|
+
const log_1 = require("./log");
|
|
8
10
|
const make_progress_bar_1 = require("./make-progress-bar");
|
|
9
11
|
const truthy_1 = require("./truthy");
|
|
12
|
+
exports.LABEL_WIDTH = 18;
|
|
10
13
|
const createOverwriteableCliOutput = (options) => {
|
|
11
14
|
var _a;
|
|
12
15
|
if (options.quiet) {
|
|
@@ -51,12 +54,11 @@ const createOverwriteableCliOutput = (options) => {
|
|
|
51
54
|
};
|
|
52
55
|
};
|
|
53
56
|
exports.createOverwriteableCliOutput = createOverwriteableCliOutput;
|
|
54
|
-
const makeBundlingProgress = ({ bundlingState,
|
|
57
|
+
const makeBundlingProgress = ({ bundlingState, }) => {
|
|
55
58
|
const { doneIn, progress } = bundlingState;
|
|
56
59
|
return [
|
|
57
|
-
|
|
60
|
+
`${doneIn ? 'Bundled' : 'Bundling'} code`.padEnd(exports.LABEL_WIDTH, ' '),
|
|
58
61
|
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
59
|
-
`${doneIn ? 'Bundled' : 'Bundling'} code`,
|
|
60
62
|
doneIn === null
|
|
61
63
|
? (progress * 100).toFixed(0) + '%'
|
|
62
64
|
: chalk_1.chalk.gray(`${doneIn}ms`),
|
|
@@ -70,9 +72,8 @@ const makeCopyingProgress = (options) => {
|
|
|
70
72
|
return null;
|
|
71
73
|
}
|
|
72
74
|
return [
|
|
73
|
-
'
|
|
75
|
+
'Copying public dir'.padEnd(exports.LABEL_WIDTH, ' '),
|
|
74
76
|
options.doneIn ? (0, make_progress_bar_1.makeProgressBar)(1) : (0, download_progress_1.getFileSizeDownloadBar)(options.bytes),
|
|
75
|
-
'Copying public dir',
|
|
76
77
|
options.doneIn === null ? null : chalk_1.chalk.gray(`${options.doneIn}ms`),
|
|
77
78
|
]
|
|
78
79
|
.filter(truthy_1.truthy)
|
|
@@ -94,12 +95,10 @@ const makeSymlinkProgress = (options) => {
|
|
|
94
95
|
chalk_1.chalk.gray(' The symlinks will be forwarded in to the bundle.'),
|
|
95
96
|
].join('\n');
|
|
96
97
|
};
|
|
97
|
-
const makeBundlingAndCopyProgress = ({ bundling, copying, symLinks, }
|
|
98
|
+
const makeBundlingAndCopyProgress = ({ bundling, copying, symLinks, }) => {
|
|
98
99
|
return [
|
|
99
100
|
makeBundlingProgress({
|
|
100
101
|
bundlingState: bundling,
|
|
101
|
-
bundlingStep,
|
|
102
|
-
steps,
|
|
103
102
|
}),
|
|
104
103
|
makeCopyingProgress(copying),
|
|
105
104
|
makeSymlinkProgress(symLinks),
|
|
@@ -108,20 +107,29 @@ const makeBundlingAndCopyProgress = ({ bundling, copying, symLinks, }, bundlingS
|
|
|
108
107
|
.join('\n');
|
|
109
108
|
};
|
|
110
109
|
exports.makeBundlingAndCopyProgress = makeBundlingAndCopyProgress;
|
|
111
|
-
const makeRenderingProgress = ({ frames, totalFrames,
|
|
110
|
+
const makeRenderingProgress = ({ frames, totalFrames, doneIn, timeRemainingInMilliseconds, }) => {
|
|
112
111
|
const progress = frames / totalFrames;
|
|
113
112
|
return [
|
|
114
|
-
|
|
115
|
-
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
116
|
-
[doneIn ? 'Rendered' : 'Rendering', `frames (${concurrency}x)`]
|
|
113
|
+
[doneIn ? 'Rendered' : 'Rendering', totalFrames === 1 ? 'still' : 'frames']
|
|
117
114
|
.filter(truthy_1.truthy)
|
|
118
|
-
.join(' ')
|
|
119
|
-
|
|
115
|
+
.join(' ')
|
|
116
|
+
.padEnd(exports.LABEL_WIDTH, ' '),
|
|
117
|
+
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
118
|
+
doneIn === null
|
|
119
|
+
? [
|
|
120
|
+
`${String(frames).padStart(String(totalFrames).length, ' ')}/${totalFrames}`,
|
|
121
|
+
timeRemainingInMilliseconds
|
|
122
|
+
? chalk_1.chalk.gray(`${(0, eta_string_1.formatEtaString)(timeRemainingInMilliseconds)} remaining`)
|
|
123
|
+
: null,
|
|
124
|
+
]
|
|
125
|
+
.filter(truthy_1.truthy)
|
|
126
|
+
.join(' ')
|
|
127
|
+
: chalk_1.chalk.gray(`${doneIn}ms`),
|
|
120
128
|
]
|
|
121
129
|
.filter(truthy_1.truthy)
|
|
122
130
|
.join(' ');
|
|
123
131
|
};
|
|
124
|
-
const makeStitchingProgress = ({ stitchingProgress,
|
|
132
|
+
const makeStitchingProgress = ({ stitchingProgress, isUsingParallelEncoding, }) => {
|
|
125
133
|
const { frames, totalFrames, doneIn, stage, codec } = stitchingProgress;
|
|
126
134
|
const progress = frames / totalFrames;
|
|
127
135
|
const mediaType = codec === 'gif'
|
|
@@ -130,17 +138,18 @@ const makeStitchingProgress = ({ stitchingProgress, steps, stitchingStep, isUsin
|
|
|
130
138
|
? 'audio'
|
|
131
139
|
: 'video';
|
|
132
140
|
return [
|
|
133
|
-
|
|
134
|
-
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
135
|
-
stage === 'muxing' && isUsingParallelEncoding
|
|
141
|
+
(stage === 'muxing' && isUsingParallelEncoding
|
|
136
142
|
? `${doneIn ? 'Muxed' : 'Muxing'} ${mediaType}`
|
|
137
|
-
: `${doneIn ? 'Encoded' : 'Encoding'} ${mediaType}
|
|
138
|
-
|
|
143
|
+
: `${doneIn ? 'Encoded' : 'Encoding'} ${mediaType}`).padEnd(exports.LABEL_WIDTH, ' '),
|
|
144
|
+
(0, make_progress_bar_1.makeProgressBar)(progress),
|
|
145
|
+
doneIn === null
|
|
146
|
+
? `${String(frames).padStart(String(totalFrames).length, ' ')}/${totalFrames}`
|
|
147
|
+
: chalk_1.chalk.gray(`${doneIn}ms`),
|
|
139
148
|
]
|
|
140
149
|
.filter(truthy_1.truthy)
|
|
141
150
|
.join(' ');
|
|
142
151
|
};
|
|
143
|
-
const makeRenderingAndStitchingProgress = ({ prog,
|
|
152
|
+
const makeRenderingAndStitchingProgress = ({ prog, isUsingParallelEncoding, }) => {
|
|
144
153
|
const { rendering, stitching, downloads, bundling } = prog;
|
|
145
154
|
const output = [
|
|
146
155
|
rendering ? makeRenderingProgress(rendering) : null,
|
|
@@ -149,8 +158,6 @@ const makeRenderingAndStitchingProgress = ({ prog, steps, stitchingStep, isUsing
|
|
|
149
158
|
? null
|
|
150
159
|
: makeStitchingProgress({
|
|
151
160
|
stitchingProgress: stitching,
|
|
152
|
-
steps,
|
|
153
|
-
stitchingStep,
|
|
154
161
|
isUsingParallelEncoding,
|
|
155
162
|
}),
|
|
156
163
|
]
|
|
@@ -171,15 +178,47 @@ const getGuiProgressSubtitle = (progress) => {
|
|
|
171
178
|
if (progress.bundling.progress < 0.99999) {
|
|
172
179
|
return `Bundling ${Math.round(progress.bundling.progress * 100)}%`;
|
|
173
180
|
}
|
|
181
|
+
if (progress.bundling.progress === 1 &&
|
|
182
|
+
progress.bundling.doneIn === null &&
|
|
183
|
+
progress.copyingState.bytes === 0) {
|
|
184
|
+
return `Bundling ${Math.round(progress.bundling.progress * 100)}%`;
|
|
185
|
+
}
|
|
174
186
|
if (progress.copyingState.doneIn === null) {
|
|
175
187
|
return `Copying public dir ${studio_server_1.StudioServerInternals.formatBytes(progress.copyingState.bytes)}`;
|
|
176
188
|
}
|
|
177
189
|
if (!progress.rendering) {
|
|
178
190
|
return `Getting compositions`;
|
|
179
191
|
}
|
|
192
|
+
// Get render estimated time value and extract hours, minutes, and seconds
|
|
193
|
+
const { timeRemainingInMilliseconds } = progress.rendering;
|
|
194
|
+
// Create estimated time string by concatenating them with colons
|
|
195
|
+
const estimatedTimeString = timeRemainingInMilliseconds === null
|
|
196
|
+
? null
|
|
197
|
+
: (0, eta_string_1.formatEtaString)(timeRemainingInMilliseconds);
|
|
180
198
|
const allRendered = progress.rendering.frames === progress.rendering.totalFrames;
|
|
181
199
|
if (!allRendered || !progress.stitching || progress.stitching.frames === 0) {
|
|
182
|
-
|
|
200
|
+
const etaString = timeRemainingInMilliseconds && timeRemainingInMilliseconds > 0
|
|
201
|
+
? `, time remaining: ${estimatedTimeString}`
|
|
202
|
+
: '';
|
|
203
|
+
return `Rendered ${progress.rendering.frames}/${progress.rendering.totalFrames}${etaString}`;
|
|
183
204
|
}
|
|
184
205
|
return `Stitched ${progress.stitching.frames}/${progress.stitching.totalFrames}`;
|
|
185
206
|
};
|
|
207
|
+
const printFact = (printLevel) => ({ indent, logLevel, left, right, color, }) => {
|
|
208
|
+
const fn = (str) => {
|
|
209
|
+
if (color === 'gray') {
|
|
210
|
+
return chalk_1.chalk.gray(str);
|
|
211
|
+
}
|
|
212
|
+
if (color === 'blue') {
|
|
213
|
+
return chalk_1.chalk.blue(str);
|
|
214
|
+
}
|
|
215
|
+
return str;
|
|
216
|
+
};
|
|
217
|
+
if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose')) {
|
|
218
|
+
log_1.Log[printLevel]({ indent, logLevel }, fn(`${left} = ${right}`));
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const leftPadded = left.padEnd(exports.LABEL_WIDTH, ' ');
|
|
222
|
+
log_1.Log[printLevel]({ indent, logLevel }, fn(`${leftPadded} ${right}`));
|
|
223
|
+
};
|
|
224
|
+
exports.printFact = printFact;
|
|
@@ -50,6 +50,16 @@ const truthy_1 = require("../truthy");
|
|
|
50
50
|
const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
51
51
|
const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel, browserExecutable, browser, chromiumOptions, scale, shouldOutputImageSequence, publicDir, envVariables, puppeteerTimeout, port, height, width, remainingArgs, compositionIdFromUi, entryPointReason, overwrite, quiet, concurrency, frameRange, everyNthFrame, outputLocationFromUI, jpegQuality, onProgress, addCleanupCallback, cancelSignal, crf, uiCodec, uiImageFormat, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, audioCodec, serializedInputPropsWithCustomSchema, disallowParallelEncoding, offthreadVideoCacheSizeInBytes, colorSpace, repro, binariesDirectory, forSeamlessAacConcatenation, separateAudioTo, publicPath, }) => {
|
|
52
52
|
var _a;
|
|
53
|
+
const isVerbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose');
|
|
54
|
+
(0, progress_bar_1.printFact)('verbose')({
|
|
55
|
+
indent,
|
|
56
|
+
logLevel,
|
|
57
|
+
left: 'Entry point',
|
|
58
|
+
right: [fullEntryPoint, isVerbose ? `(${entryPointReason})` : null]
|
|
59
|
+
.filter(truthy_1.truthy)
|
|
60
|
+
.join(' '),
|
|
61
|
+
color: 'gray',
|
|
62
|
+
});
|
|
53
63
|
const downloads = [];
|
|
54
64
|
const onBrowserDownload = (0, browser_download_bar_1.defaultBrowserDownloadProgress)({
|
|
55
65
|
indent,
|
|
@@ -80,11 +90,6 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
80
90
|
updatesDontOverwrite,
|
|
81
91
|
indent,
|
|
82
92
|
});
|
|
83
|
-
const steps = [
|
|
84
|
-
renderer_1.RenderInternals.isServeUrl(fullEntryPoint) ? null : 'bundling',
|
|
85
|
-
'rendering',
|
|
86
|
-
shouldOutputImageSequence ? null : 'stitching',
|
|
87
|
-
].filter(truthy_1.truthy);
|
|
88
93
|
let bundlingProgress = {
|
|
89
94
|
doneIn: null,
|
|
90
95
|
progress: 0,
|
|
@@ -105,8 +110,6 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
105
110
|
};
|
|
106
111
|
const { output, message, progress } = (0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
107
112
|
prog: aggregateRenderProgress,
|
|
108
|
-
steps: steps.length,
|
|
109
|
-
stitchingStep: steps.indexOf('stitching'),
|
|
110
113
|
isUsingParallelEncoding,
|
|
111
114
|
});
|
|
112
115
|
onProgress({ message, value: progress, ...aggregateRenderProgress });
|
|
@@ -125,8 +128,6 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
125
128
|
},
|
|
126
129
|
indentOutput: indent,
|
|
127
130
|
logLevel,
|
|
128
|
-
bundlingStep: steps.indexOf('bundling'),
|
|
129
|
-
steps: steps.length,
|
|
130
131
|
onDirectoryCreated: (dir) => {
|
|
131
132
|
addCleanupCallback(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
132
133
|
},
|
|
@@ -208,8 +209,38 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
208
209
|
fromUi: outputLocationFromUI,
|
|
209
210
|
logLevel,
|
|
210
211
|
});
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
(0, progress_bar_1.printFact)('info')({
|
|
213
|
+
indent,
|
|
214
|
+
logLevel,
|
|
215
|
+
left: 'Composition',
|
|
216
|
+
right: [compositionId, isVerbose ? `(${reason})` : null]
|
|
217
|
+
.filter(truthy_1.truthy)
|
|
218
|
+
.join(' '),
|
|
219
|
+
color: 'gray',
|
|
220
|
+
});
|
|
221
|
+
(0, progress_bar_1.printFact)('info')({
|
|
222
|
+
indent,
|
|
223
|
+
logLevel,
|
|
224
|
+
left: 'Codec',
|
|
225
|
+
right: [codec, isVerbose ? `(${codecReason})` : null]
|
|
226
|
+
.filter(truthy_1.truthy)
|
|
227
|
+
.join(' '),
|
|
228
|
+
color: 'gray',
|
|
229
|
+
});
|
|
230
|
+
(0, progress_bar_1.printFact)('info')({
|
|
231
|
+
indent,
|
|
232
|
+
logLevel,
|
|
233
|
+
left: 'Output',
|
|
234
|
+
right: relativeOutputLocation,
|
|
235
|
+
color: 'gray',
|
|
236
|
+
});
|
|
237
|
+
(0, progress_bar_1.printFact)('info')({
|
|
238
|
+
indent,
|
|
239
|
+
logLevel,
|
|
240
|
+
left: 'Concurrency',
|
|
241
|
+
right: `${actualConcurrency}x`,
|
|
242
|
+
color: 'gray',
|
|
243
|
+
});
|
|
213
244
|
const absoluteOutputFile = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite, logLevel);
|
|
214
245
|
const absoluteSeparateAudioTo = separateAudioTo === null ? null : node_path_1.default.resolve(separateAudioTo);
|
|
215
246
|
const exists = (0, node_fs_1.existsSync)(absoluteOutputFile);
|
|
@@ -221,9 +252,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
221
252
|
renderingProgress = {
|
|
222
253
|
frames: 0,
|
|
223
254
|
totalFrames: totalFrames.length,
|
|
224
|
-
concurrency: actualConcurrency,
|
|
225
255
|
doneIn: null,
|
|
226
|
-
|
|
256
|
+
timeRemainingInMilliseconds: null,
|
|
227
257
|
};
|
|
228
258
|
const imageFormat = (0, image_formats_1.getVideoImageFormat)({
|
|
229
259
|
codec: shouldOutputImageSequence ? undefined : codec,
|
|
@@ -284,7 +314,6 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
284
314
|
forSeamlessAacConcatenation,
|
|
285
315
|
onBrowserDownload,
|
|
286
316
|
});
|
|
287
|
-
updateRenderProgress({ newline: true, printToConsole: true });
|
|
288
317
|
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
289
318
|
return;
|
|
290
319
|
}
|
|
@@ -339,6 +368,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
339
368
|
update.renderedDoneIn;
|
|
340
369
|
renderingProgress.frames =
|
|
341
370
|
update.renderedFrames;
|
|
371
|
+
renderingProgress.timeRemainingInMilliseconds = update.renderEstimatedTime;
|
|
342
372
|
updateRenderProgress({ newline: false, printToConsole: true });
|
|
343
373
|
},
|
|
344
374
|
puppeteerInstance,
|
|
@@ -361,18 +391,18 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
361
391
|
offthreadVideoCacheSizeInBytes,
|
|
362
392
|
colorSpace,
|
|
363
393
|
repro: repro !== null && repro !== void 0 ? repro : false,
|
|
364
|
-
finishRenderProgress: () => {
|
|
365
|
-
updateRenderProgress({ newline: true, printToConsole: true });
|
|
366
|
-
},
|
|
367
394
|
binariesDirectory,
|
|
368
395
|
separateAudioTo: absoluteSeparateAudioTo,
|
|
369
396
|
forSeamlessAacConcatenation,
|
|
370
397
|
compositionStart: 0,
|
|
371
398
|
onBrowserDownload,
|
|
372
399
|
});
|
|
373
|
-
|
|
400
|
+
if (!updatesDontOverwrite) {
|
|
401
|
+
updateRenderProgress({ newline: true, printToConsole: true });
|
|
402
|
+
}
|
|
403
|
+
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${(exists ? '○' : '+').padEnd(progress_bar_1.LABEL_WIDTH)} ${relativeOutputLocation}`));
|
|
374
404
|
if (absoluteSeparateAudioTo) {
|
|
375
|
-
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${audioExists ? '○' : '+'} ${absoluteSeparateAudioTo}`));
|
|
405
|
+
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${(audioExists ? '○' : '+').padEnd(progress_bar_1.LABEL_WIDTH, ' ')} ${absoluteSeparateAudioTo}`));
|
|
376
406
|
}
|
|
377
407
|
log_1.Log.verbose({ indent, logLevel }, `Slowest frames:`);
|
|
378
408
|
slowestFrames.forEach(({ frame, time }) => {
|
|
@@ -27,6 +27,8 @@ const truthy_1 = require("../truthy");
|
|
|
27
27
|
const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
28
28
|
const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, serializedInputPropsWithCustomSchema, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indent, addCleanupCallback, cancelSignal, outputLocationFromUi, offthreadVideoCacheSizeInBytes, binariesDirectory, publicPath, }) => {
|
|
29
29
|
var _a, _b;
|
|
30
|
+
const isVerbose = renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose');
|
|
31
|
+
log_1.Log.verbose({ indent, logLevel }, chalk_1.chalk.gray(`Entry point = ${fullEntryPoint} (${entryPointReason})`));
|
|
30
32
|
const aggregate = (0, progress_types_1.initialAggregateRenderProgress)();
|
|
31
33
|
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
32
34
|
const renderProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
@@ -35,15 +37,9 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
35
37
|
updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
|
|
36
38
|
indent,
|
|
37
39
|
});
|
|
38
|
-
const steps = [
|
|
39
|
-
renderer_1.RenderInternals.isServeUrl(fullEntryPoint) ? null : 'bundling',
|
|
40
|
-
'rendering',
|
|
41
|
-
].filter(truthy_1.truthy);
|
|
42
40
|
const updateRenderProgress = ({ newline, printToConsole, isUsingParallelEncoding, }) => {
|
|
43
41
|
const { output, progress, message } = (0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
44
42
|
prog: aggregate,
|
|
45
|
-
steps: steps.length,
|
|
46
|
-
stitchingStep: steps.indexOf('stitching'),
|
|
47
43
|
isUsingParallelEncoding,
|
|
48
44
|
});
|
|
49
45
|
if (printToConsole) {
|
|
@@ -75,7 +71,6 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
75
71
|
const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
76
72
|
fullPath: fullEntryPoint,
|
|
77
73
|
remotionRoot,
|
|
78
|
-
steps: steps.length,
|
|
79
74
|
publicDir,
|
|
80
75
|
onProgress: ({ copying, bundling }) => {
|
|
81
76
|
aggregate.bundling = bundling;
|
|
@@ -88,7 +83,6 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
88
83
|
},
|
|
89
84
|
indentOutput: indent,
|
|
90
85
|
logLevel,
|
|
91
|
-
bundlingStep: steps.indexOf('bundling'),
|
|
92
86
|
onDirectoryCreated: (dir) => {
|
|
93
87
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => {
|
|
94
88
|
renderer_1.RenderInternals.deleteDirectory(dir);
|
|
@@ -158,15 +152,37 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
158
152
|
(0, node_fs_1.mkdirSync)(node_path_1.default.join(absoluteOutputLocation, '..'), {
|
|
159
153
|
recursive: true,
|
|
160
154
|
});
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
(0, progress_bar_1.printFact)('info')({
|
|
156
|
+
indent,
|
|
157
|
+
left: 'Composition',
|
|
158
|
+
logLevel,
|
|
159
|
+
right: [compositionId, isVerbose ? `(${reason})` : null]
|
|
160
|
+
.filter(truthy_1.truthy)
|
|
161
|
+
.join(' '),
|
|
162
|
+
color: 'gray',
|
|
163
|
+
});
|
|
164
|
+
(0, progress_bar_1.printFact)('info')({
|
|
165
|
+
indent,
|
|
166
|
+
left: 'Format',
|
|
167
|
+
logLevel,
|
|
168
|
+
right: [imageFormat, isVerbose ? `(${source})` : null]
|
|
169
|
+
.filter(truthy_1.truthy)
|
|
170
|
+
.join(' '),
|
|
171
|
+
color: 'gray',
|
|
172
|
+
});
|
|
173
|
+
(0, progress_bar_1.printFact)('info')({
|
|
174
|
+
indent,
|
|
175
|
+
left: 'Output',
|
|
176
|
+
logLevel,
|
|
177
|
+
right: relativeOutputLocation,
|
|
178
|
+
color: 'gray',
|
|
179
|
+
});
|
|
163
180
|
const renderStart = Date.now();
|
|
164
181
|
aggregate.rendering = {
|
|
165
182
|
frames: 0,
|
|
166
|
-
concurrency: 1,
|
|
167
183
|
doneIn: null,
|
|
168
|
-
steps,
|
|
169
184
|
totalFrames: 1,
|
|
185
|
+
timeRemainingInMilliseconds: null,
|
|
170
186
|
};
|
|
171
187
|
updateRenderProgress({
|
|
172
188
|
newline: false,
|
|
@@ -214,16 +230,15 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
214
230
|
});
|
|
215
231
|
aggregate.rendering = {
|
|
216
232
|
frames: 1,
|
|
217
|
-
concurrency: 1,
|
|
218
233
|
doneIn: Date.now() - renderStart,
|
|
219
|
-
steps,
|
|
220
234
|
totalFrames: 1,
|
|
235
|
+
timeRemainingInMilliseconds: null,
|
|
221
236
|
};
|
|
222
237
|
updateRenderProgress({
|
|
223
238
|
newline: true,
|
|
224
239
|
printToConsole: true,
|
|
225
240
|
isUsingParallelEncoding: false,
|
|
226
241
|
});
|
|
227
|
-
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${
|
|
242
|
+
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${(exists ? '○' : '+').padEnd(progress_bar_1.LABEL_WIDTH)} ${relativeOutputLocation}`));
|
|
228
243
|
};
|
|
229
244
|
exports.renderStillFlow = renderStillFlow;
|
package/dist/setup-cache.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
2
|
import type { BundlingState, CopyingState } from '@remotion/studio-server';
|
|
3
3
|
import type { GitSource } from '@remotion/studio-shared';
|
|
4
|
-
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel,
|
|
4
|
+
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, publicPath, }: {
|
|
5
5
|
fullPath: string;
|
|
6
6
|
remotionRoot: string;
|
|
7
7
|
publicDir: string | null;
|
|
@@ -11,8 +11,6 @@ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publi
|
|
|
11
11
|
}) => void;
|
|
12
12
|
indentOutput: boolean;
|
|
13
13
|
logLevel: LogLevel;
|
|
14
|
-
bundlingStep: number;
|
|
15
|
-
steps: number;
|
|
16
14
|
onDirectoryCreated: (path: string) => void;
|
|
17
15
|
quietProgress: boolean;
|
|
18
16
|
quietFlag: boolean;
|
|
@@ -25,7 +23,7 @@ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publi
|
|
|
25
23
|
urlOrBundle: string;
|
|
26
24
|
cleanup: () => void;
|
|
27
25
|
}>;
|
|
28
|
-
export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel,
|
|
26
|
+
export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, publicPath, }: {
|
|
29
27
|
fullPath: string;
|
|
30
28
|
remotionRoot: string;
|
|
31
29
|
publicDir: string | null;
|
|
@@ -35,8 +33,6 @@ export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgre
|
|
|
35
33
|
}) => void;
|
|
36
34
|
indent: boolean;
|
|
37
35
|
logLevel: LogLevel;
|
|
38
|
-
bundlingStep: number;
|
|
39
|
-
steps: number;
|
|
40
36
|
onDirectoryCreated: (path: string) => void;
|
|
41
37
|
quietProgress: boolean;
|
|
42
38
|
quietFlag: boolean;
|
package/dist/setup-cache.js
CHANGED
|
@@ -12,7 +12,7 @@ const config_1 = require("./config");
|
|
|
12
12
|
const log_1 = require("./log");
|
|
13
13
|
const progress_bar_1 = require("./progress-bar");
|
|
14
14
|
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
15
|
-
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel,
|
|
15
|
+
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, bufferStateDelayInMilliseconds, maxTimelineTracks, publicPath, }) => {
|
|
16
16
|
const isServeUrl = renderer_1.RenderInternals.isServeUrl(fullPath);
|
|
17
17
|
const isBundle = (0, fs_1.existsSync)(fullPath) && (0, fs_1.existsSync)(path_1.default.join(fullPath, 'index.html'));
|
|
18
18
|
if (isServeUrl || isBundle) {
|
|
@@ -38,8 +38,6 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
38
38
|
onProgressCallback: onProgress,
|
|
39
39
|
indent: indentOutput,
|
|
40
40
|
logLevel,
|
|
41
|
-
bundlingStep,
|
|
42
|
-
steps,
|
|
43
41
|
onDirectoryCreated,
|
|
44
42
|
quietProgress,
|
|
45
43
|
quietFlag,
|
|
@@ -55,7 +53,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
55
53
|
};
|
|
56
54
|
};
|
|
57
55
|
exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
|
|
58
|
-
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel,
|
|
56
|
+
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, onDirectoryCreated, quietProgress, quietFlag, outDir, gitSource, maxTimelineTracks, bufferStateDelayInMilliseconds, publicPath, }) => {
|
|
59
57
|
var _a;
|
|
60
58
|
const shouldCache = config_1.ConfigInternals.getWebpackCaching();
|
|
61
59
|
const symlinkState = {
|
|
@@ -78,7 +76,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
78
76
|
bundling: bundlingState,
|
|
79
77
|
copying: copyingState,
|
|
80
78
|
symLinks: symlinkState,
|
|
81
|
-
}
|
|
79
|
+
}), newline);
|
|
82
80
|
onProgressCallback({
|
|
83
81
|
bundling: bundlingState,
|
|
84
82
|
copying: copyingState,
|
|
@@ -157,12 +155,12 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
157
155
|
progress: 1,
|
|
158
156
|
doneIn: Date.now() - bundleStartTime,
|
|
159
157
|
};
|
|
160
|
-
log_1.Log.verbose({ logLevel, indent },
|
|
158
|
+
log_1.Log.verbose({ logLevel, indent }, `Bundling done in ${bundlingState.doneIn}ms`);
|
|
161
159
|
copyingState = {
|
|
162
160
|
...copyingState,
|
|
163
161
|
doneIn: copyStart ? Date.now() - copyStart : 0,
|
|
164
162
|
};
|
|
165
|
-
log_1.Log.verbose({ logLevel, indent },
|
|
163
|
+
log_1.Log.verbose({ logLevel, indent }, `Copying done in ${copyingState.doneIn}ms`);
|
|
166
164
|
updateProgress(true);
|
|
167
165
|
log_1.Log.verbose({ indent, logLevel }, 'Bundled under', bundled);
|
|
168
166
|
const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists(remotionRoot, 'production', hash) === 'exists';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.150",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dotenv": "9.0.2",
|
|
33
33
|
"minimist": "1.2.6",
|
|
34
34
|
"prompts": "2.4.2",
|
|
35
|
-
"@remotion/bundler": "4.0.
|
|
36
|
-
"@remotion/media-utils": "4.0.
|
|
37
|
-
"@remotion/
|
|
38
|
-
"@remotion/
|
|
39
|
-
"@remotion/
|
|
40
|
-
"@remotion/studio": "4.0.
|
|
41
|
-
"remotion": "4.0.
|
|
42
|
-
"@remotion/studio
|
|
35
|
+
"@remotion/bundler": "4.0.150",
|
|
36
|
+
"@remotion/media-utils": "4.0.150",
|
|
37
|
+
"@remotion/renderer": "4.0.150",
|
|
38
|
+
"@remotion/studio-shared": "4.0.150",
|
|
39
|
+
"@remotion/player": "4.0.150",
|
|
40
|
+
"@remotion/studio-server": "4.0.150",
|
|
41
|
+
"remotion": "4.0.150",
|
|
42
|
+
"@remotion/studio": "4.0.150"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"react-dom": "18.3.1",
|
|
65
65
|
"vitest": "0.31.1",
|
|
66
66
|
"zod": "3.22.3",
|
|
67
|
-
"@remotion/zod-types": "4.0.
|
|
68
|
-
"@remotion/tailwind": "4.0.
|
|
69
|
-
"@remotion/skia": "4.0.
|
|
67
|
+
"@remotion/zod-types": "4.0.150",
|
|
68
|
+
"@remotion/tailwind": "4.0.150",
|
|
69
|
+
"@remotion/skia": "4.0.150"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|
|
@@ -81,8 +81,6 @@
|
|
|
81
81
|
"scripts": {
|
|
82
82
|
"formatting": "prettier src --check",
|
|
83
83
|
"lint": "eslint src --ext ts,tsx",
|
|
84
|
-
"test": "vitest --run"
|
|
85
|
-
"build": "tsc -d",
|
|
86
|
-
"watch": "tsc -w"
|
|
84
|
+
"test": "vitest --run"
|
|
87
85
|
}
|
|
88
86
|
}
|