@remotion/cli 4.0.174 → 4.0.176
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/artifact.d.ts +0 -0
- package/dist/artifact.js +1 -0
- package/dist/benchmark.js +1 -0
- package/dist/hyperlinks/hyperlinks.d.ts +2 -0
- package/dist/hyperlinks/hyperlinks.js +79 -0
- package/dist/hyperlinks.d.ts +2 -0
- package/dist/hyperlinks.js +79 -0
- package/dist/on-artifact.d.ts +9 -0
- package/dist/on-artifact.js +35 -0
- package/dist/parse-command-line.d.ts +3 -3
- package/dist/progress-bar.js +23 -1
- package/dist/progress-types.js +3 -0
- package/dist/render-flows/render.js +13 -0
- package/dist/render-flows/still.js +15 -5
- package/package.json +13 -13
|
File without changes
|
package/dist/artifact.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/benchmark.js
CHANGED
|
@@ -336,6 +336,7 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
336
336
|
}).value,
|
|
337
337
|
compositionStart: 0,
|
|
338
338
|
onBrowserDownload,
|
|
339
|
+
onArtifact: () => undefined,
|
|
339
340
|
}, (run, progress) => {
|
|
340
341
|
benchmarkProgress.update(makeBenchmarkProgressBar({
|
|
341
342
|
totalRuns: runs,
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// From https://github.com/jamestalmage/supports-hyperlinks/blob/master/index.js
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.supportsHyperlink = void 0;
|
|
5
|
+
// MIT License
|
|
6
|
+
// Copyright (c) James Talmage <james@talmage.io> (github.com/jamestalmage)
|
|
7
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
+
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
const renderer_1 = require("@remotion/renderer");
|
|
11
|
+
function parseVersion(versionString) {
|
|
12
|
+
if (/^\d{3,4}$/.test(versionString)) {
|
|
13
|
+
// Env var doesn't always use dots. example: 4601 => 46.1.0
|
|
14
|
+
const m = /(\d{1,2})(\d{2})/.exec(versionString) || [];
|
|
15
|
+
return {
|
|
16
|
+
major: 0,
|
|
17
|
+
minor: parseInt(m[1], 10),
|
|
18
|
+
patch: parseInt(m[2], 10),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const versions = (versionString || '').split('.').map((n) => parseInt(n, 10));
|
|
22
|
+
return {
|
|
23
|
+
major: versions[0],
|
|
24
|
+
minor: versions[1],
|
|
25
|
+
patch: versions[2],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function supportsHyperlink(stream) {
|
|
29
|
+
const { CI, FORCE_HYPERLINK, NETLIFY, TEAMCITY_VERSION, TERM_PROGRAM, TERM_PROGRAM_VERSION, VTE_VERSION, } = process.env;
|
|
30
|
+
if (FORCE_HYPERLINK) {
|
|
31
|
+
return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
|
|
32
|
+
}
|
|
33
|
+
// Netlify does not run a TTY, it does not need `supportsColor` check
|
|
34
|
+
if (NETLIFY) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
// If they specify no colors, they probably don't want hyperlinks.
|
|
38
|
+
if (!renderer_1.RenderInternals.isColorSupported()) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
if (stream && !stream.isTTY) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (process.platform === 'win32') {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
if (CI) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
if (TEAMCITY_VERSION) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (TERM_PROGRAM) {
|
|
54
|
+
const version = parseVersion(TERM_PROGRAM_VERSION || '');
|
|
55
|
+
switch (TERM_PROGRAM) {
|
|
56
|
+
case 'iTerm.app':
|
|
57
|
+
if (version.major === 3) {
|
|
58
|
+
return version.minor >= 1;
|
|
59
|
+
}
|
|
60
|
+
return version.major > 3;
|
|
61
|
+
case 'WezTerm':
|
|
62
|
+
return version.major >= 20200620;
|
|
63
|
+
case 'vscode':
|
|
64
|
+
// eslint-disable-next-line no-mixed-operators
|
|
65
|
+
return (version.major > 1 || (version.major === 1 && version.minor >= 72));
|
|
66
|
+
// No default
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (VTE_VERSION) {
|
|
70
|
+
// 0.50.0 was supposed to support hyperlinks, but throws a segfault
|
|
71
|
+
if (VTE_VERSION === '0.50.0') {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
const version = parseVersion(VTE_VERSION);
|
|
75
|
+
return version.major > 0 || version.minor >= 50;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
exports.supportsHyperlink = supportsHyperlink;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// From https://github.com/jamestalmage/supports-hyperlinks/blob/master/index.js
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.supportsHyperlink = void 0;
|
|
5
|
+
// MIT License
|
|
6
|
+
// Copyright (c) James Talmage <james@talmage.io> (github.com/jamestalmage)
|
|
7
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
8
|
+
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
9
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
const renderer_1 = require("@remotion/renderer");
|
|
11
|
+
function parseVersion(versionString) {
|
|
12
|
+
if (/^\d{3,4}$/.test(versionString)) {
|
|
13
|
+
// Env var doesn't always use dots. example: 4601 => 46.1.0
|
|
14
|
+
const m = /(\d{1,2})(\d{2})/.exec(versionString) || [];
|
|
15
|
+
return {
|
|
16
|
+
major: 0,
|
|
17
|
+
minor: parseInt(m[1], 10),
|
|
18
|
+
patch: parseInt(m[2], 10),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const versions = (versionString || '').split('.').map((n) => parseInt(n, 10));
|
|
22
|
+
return {
|
|
23
|
+
major: versions[0],
|
|
24
|
+
minor: versions[1],
|
|
25
|
+
patch: versions[2],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function supportsHyperlink(stream) {
|
|
29
|
+
const { CI, FORCE_HYPERLINK, NETLIFY, TEAMCITY_VERSION, TERM_PROGRAM, TERM_PROGRAM_VERSION, VTE_VERSION, } = process.env;
|
|
30
|
+
if (FORCE_HYPERLINK) {
|
|
31
|
+
return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
|
|
32
|
+
}
|
|
33
|
+
// Netlify does not run a TTY, it does not need `supportsColor` check
|
|
34
|
+
if (NETLIFY) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
// If they specify no colors, they probably don't want hyperlinks.
|
|
38
|
+
if (!renderer_1.RenderInternals.isColorSupported()) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
if (stream && !stream.isTTY) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (process.platform === 'win32') {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
if (CI) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
if (TEAMCITY_VERSION) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (TERM_PROGRAM) {
|
|
54
|
+
const version = parseVersion(TERM_PROGRAM_VERSION || '');
|
|
55
|
+
switch (TERM_PROGRAM) {
|
|
56
|
+
case 'iTerm.app':
|
|
57
|
+
if (version.major === 3) {
|
|
58
|
+
return version.minor >= 1;
|
|
59
|
+
}
|
|
60
|
+
return version.major > 3;
|
|
61
|
+
case 'WezTerm':
|
|
62
|
+
return version.major >= 20200620;
|
|
63
|
+
case 'vscode':
|
|
64
|
+
// eslint-disable-next-line no-mixed-operators
|
|
65
|
+
return (version.major > 1 || (version.major === 1 && version.minor >= 72));
|
|
66
|
+
// No default
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (VTE_VERSION) {
|
|
70
|
+
// 0.50.0 was supposed to support hyperlinks, but throws a segfault
|
|
71
|
+
if (VTE_VERSION === '0.50.0') {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
const version = parseVersion(VTE_VERSION);
|
|
75
|
+
return version.major > 0 || version.minor >= 50;
|
|
76
|
+
}
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
exports.supportsHyperlink = supportsHyperlink;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OnArtifact } from '@remotion/renderer';
|
|
2
|
+
import type { ArtifactProgress } from '@remotion/studio-shared';
|
|
3
|
+
export declare const handleOnArtifact: ({ artifactState, onProgress, compositionId, }: {
|
|
4
|
+
artifactState: ArtifactProgress;
|
|
5
|
+
onProgress: (artifact: ArtifactProgress) => void;
|
|
6
|
+
compositionId: string;
|
|
7
|
+
}) => {
|
|
8
|
+
onArtifact: OnArtifact;
|
|
9
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.handleOnArtifact = void 0;
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const handleOnArtifact = ({ artifactState, onProgress, compositionId, }) => {
|
|
10
|
+
const initialProgress = { ...artifactState };
|
|
11
|
+
const onArtifact = (artifact) => {
|
|
12
|
+
// It would be nice in the future to customize the artifact output destination
|
|
13
|
+
const relativeOutputDestination = path_1.default.join('out', compositionId, artifact.filename.replace('/', path_1.default.sep));
|
|
14
|
+
const defaultOutName = path_1.default.join(process.cwd(), relativeOutputDestination);
|
|
15
|
+
if (!(0, fs_1.existsSync)(path_1.default.dirname(defaultOutName))) {
|
|
16
|
+
(0, fs_1.mkdirSync)(path_1.default.dirname(defaultOutName), {
|
|
17
|
+
recursive: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const alreadyExisted = (0, fs_1.existsSync)(defaultOutName);
|
|
21
|
+
(0, fs_1.writeFileSync)(defaultOutName, artifact.content);
|
|
22
|
+
initialProgress.received.push({
|
|
23
|
+
absoluteOutputDestination: defaultOutName,
|
|
24
|
+
filename: artifact.filename,
|
|
25
|
+
sizeInBytes: artifact.content.length,
|
|
26
|
+
alreadyExisted,
|
|
27
|
+
relativeOutputDestination,
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
onProgress(initialProgress);
|
|
31
|
+
return {
|
|
32
|
+
onArtifact,
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
exports.handleOnArtifact = handleOnArtifact;
|
|
@@ -147,17 +147,17 @@ declare const beepOnFinishOption: {
|
|
|
147
147
|
description: () => import("react/jsx-runtime").JSX.Element;
|
|
148
148
|
ssrName: "x264Preset";
|
|
149
149
|
docLink: string;
|
|
150
|
-
type: "
|
|
150
|
+
type: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null;
|
|
151
151
|
getValue: ({ commandLine }: {
|
|
152
152
|
commandLine: Record<string, unknown>;
|
|
153
153
|
}) => {
|
|
154
|
-
value: "
|
|
154
|
+
value: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo";
|
|
155
155
|
source: string;
|
|
156
156
|
} | {
|
|
157
157
|
value: null;
|
|
158
158
|
source: string;
|
|
159
159
|
};
|
|
160
|
-
setConfig: (profile: "
|
|
160
|
+
setConfig: (profile: "ultrafast" | "superfast" | "veryfast" | "faster" | "fast" | "medium" | "slow" | "slower" | "veryslow" | "placebo" | null) => void;
|
|
161
161
|
}, enforceAudioOption: {
|
|
162
162
|
name: string;
|
|
163
163
|
cliFlag: "enforce-audio-track";
|
package/dist/progress-bar.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.printFact = exports.makeRenderingAndStitchingProgress = exports.getRightLabelWidth = 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
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
7
|
const chalk_1 = require("./chalk");
|
|
7
8
|
const download_progress_1 = require("./download-progress");
|
|
8
9
|
const eta_string_1 = require("./eta-string");
|
|
@@ -132,6 +133,26 @@ const makeRenderingProgress = ({ frames, totalFrames, doneIn, timeRemainingInMil
|
|
|
132
133
|
.filter(truthy_1.truthy)
|
|
133
134
|
.join(' ');
|
|
134
135
|
};
|
|
136
|
+
const makeArtifactProgress = (artifactState) => {
|
|
137
|
+
const { received } = artifactState;
|
|
138
|
+
if (received.length === 0) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
return received
|
|
142
|
+
.map((artifact) => {
|
|
143
|
+
return [
|
|
144
|
+
chalk_1.chalk.blue((artifact.alreadyExisted ? '○' : '+').padEnd(exports.LABEL_WIDTH)),
|
|
145
|
+
chalk_1.chalk.blue((0, make_link_1.makeHyperlink)({
|
|
146
|
+
url: 'file://' + artifact.absoluteOutputDestination,
|
|
147
|
+
fallback: artifact.absoluteOutputDestination,
|
|
148
|
+
text: artifact.relativeOutputDestination,
|
|
149
|
+
})),
|
|
150
|
+
chalk_1.chalk.gray(`${(0, studio_shared_1.formatBytes)(artifact.sizeInBytes)}`),
|
|
151
|
+
].join(' ');
|
|
152
|
+
})
|
|
153
|
+
.filter(truthy_1.truthy)
|
|
154
|
+
.join('\n');
|
|
155
|
+
};
|
|
135
156
|
const getRightLabelWidth = (totalFrames) => {
|
|
136
157
|
return `${totalFrames}/${totalFrames}`.length;
|
|
137
158
|
};
|
|
@@ -158,7 +179,7 @@ const makeStitchingProgress = ({ stitchingProgress, isUsingParallelEncoding, })
|
|
|
158
179
|
};
|
|
159
180
|
const makeRenderingAndStitchingProgress = ({ prog, isUsingParallelEncoding, }) => {
|
|
160
181
|
var _a;
|
|
161
|
-
const { rendering, stitching, downloads, bundling } = prog;
|
|
182
|
+
const { rendering, stitching, downloads, bundling, artifactState } = prog;
|
|
162
183
|
const output = [
|
|
163
184
|
rendering ? makeRenderingProgress(rendering) : null,
|
|
164
185
|
(0, download_progress_1.makeMultiDownloadProgress)(downloads, (_a = rendering === null || rendering === void 0 ? void 0 : rendering.totalFrames) !== null && _a !== void 0 ? _a : 0),
|
|
@@ -168,6 +189,7 @@ const makeRenderingAndStitchingProgress = ({ prog, isUsingParallelEncoding, }) =
|
|
|
168
189
|
stitchingProgress: stitching,
|
|
169
190
|
isUsingParallelEncoding,
|
|
170
191
|
}),
|
|
192
|
+
makeArtifactProgress(artifactState),
|
|
171
193
|
]
|
|
172
194
|
.filter(truthy_1.truthy)
|
|
173
195
|
.join('\n');
|
package/dist/progress-types.js
CHANGED
|
@@ -43,6 +43,7 @@ const make_link_1 = require("../hyperlinks/make-link");
|
|
|
43
43
|
const image_formats_1 = require("../image-formats");
|
|
44
44
|
const log_1 = require("../log");
|
|
45
45
|
const make_on_download_1 = require("../make-on-download");
|
|
46
|
+
const on_artifact_1 = require("../on-artifact");
|
|
46
47
|
const parsed_cli_1 = require("../parsed-cli");
|
|
47
48
|
const progress_bar_1 = require("../progress-bar");
|
|
48
49
|
const setup_cache_1 = require("../setup-cache");
|
|
@@ -101,6 +102,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
101
102
|
bytes: 0,
|
|
102
103
|
doneIn: null,
|
|
103
104
|
};
|
|
105
|
+
let artifactState = { received: [] };
|
|
104
106
|
const updateRenderProgress = ({ newline, printToConsole, }) => {
|
|
105
107
|
const aggregateRenderProgress = {
|
|
106
108
|
rendering: renderingProgress,
|
|
@@ -108,6 +110,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
108
110
|
downloads,
|
|
109
111
|
bundling: bundlingProgress,
|
|
110
112
|
copyingState,
|
|
113
|
+
artifactState,
|
|
111
114
|
};
|
|
112
115
|
const { output, message, progress } = (0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
113
116
|
prog: aggregateRenderProgress,
|
|
@@ -185,6 +188,14 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
185
188
|
binariesDirectory,
|
|
186
189
|
onBrowserDownload,
|
|
187
190
|
});
|
|
191
|
+
const { onArtifact } = (0, on_artifact_1.handleOnArtifact)({
|
|
192
|
+
artifactState,
|
|
193
|
+
onProgress: (progress) => {
|
|
194
|
+
artifactState = progress;
|
|
195
|
+
updateRenderProgress({ newline: false, printToConsole: true });
|
|
196
|
+
},
|
|
197
|
+
compositionId,
|
|
198
|
+
});
|
|
188
199
|
const { value: codec, source: codecReason } = client_1.BrowserSafeApis.options.videoCodecOption.getValue({
|
|
189
200
|
commandLine: parsed_cli_1.parsedCli,
|
|
190
201
|
}, {
|
|
@@ -317,6 +328,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
317
328
|
compositionStart: 0,
|
|
318
329
|
forSeamlessAacConcatenation,
|
|
319
330
|
onBrowserDownload,
|
|
331
|
+
onArtifact,
|
|
320
332
|
});
|
|
321
333
|
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`▶ ${absoluteOutputFile}`));
|
|
322
334
|
return;
|
|
@@ -400,6 +412,7 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
|
|
|
400
412
|
forSeamlessAacConcatenation,
|
|
401
413
|
compositionStart: 0,
|
|
402
414
|
onBrowserDownload,
|
|
415
|
+
onArtifact,
|
|
403
416
|
});
|
|
404
417
|
if (!updatesDontOverwrite) {
|
|
405
418
|
updateRenderProgress({ newline: true, printToConsole: true });
|
|
@@ -19,6 +19,7 @@ const get_composition_with_dimension_override_1 = require("../get-composition-wi
|
|
|
19
19
|
const make_link_1 = require("../hyperlinks/make-link");
|
|
20
20
|
const log_1 = require("../log");
|
|
21
21
|
const make_on_download_1 = require("../make-on-download");
|
|
22
|
+
const on_artifact_1 = require("../on-artifact");
|
|
22
23
|
const parsed_cli_1 = require("../parsed-cli");
|
|
23
24
|
const progress_bar_1 = require("../progress-bar");
|
|
24
25
|
const progress_types_1 = require("../progress-types");
|
|
@@ -38,10 +39,10 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
38
39
|
updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
|
|
39
40
|
indent,
|
|
40
41
|
});
|
|
41
|
-
const updateRenderProgress = ({ newline, printToConsole,
|
|
42
|
+
const updateRenderProgress = ({ newline, printToConsole, }) => {
|
|
42
43
|
const { output, progress, message } = (0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
43
44
|
prog: aggregate,
|
|
44
|
-
isUsingParallelEncoding,
|
|
45
|
+
isUsingParallelEncoding: false,
|
|
45
46
|
});
|
|
46
47
|
if (printToConsole) {
|
|
47
48
|
renderProgress.update(updatesDontOverwrite ? message : output, newline);
|
|
@@ -79,7 +80,6 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
79
80
|
updateRenderProgress({
|
|
80
81
|
newline: false,
|
|
81
82
|
printToConsole: true,
|
|
82
|
-
isUsingParallelEncoding: false,
|
|
83
83
|
});
|
|
84
84
|
},
|
|
85
85
|
indentOutput: indent,
|
|
@@ -189,7 +189,6 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
189
189
|
updateRenderProgress({
|
|
190
190
|
newline: false,
|
|
191
191
|
printToConsole: true,
|
|
192
|
-
isUsingParallelEncoding: false,
|
|
193
192
|
});
|
|
194
193
|
const onDownload = (0, make_on_download_1.makeOnDownload)({
|
|
195
194
|
downloads: aggregate.downloads,
|
|
@@ -199,6 +198,17 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
199
198
|
updatesDontOverwrite,
|
|
200
199
|
isUsingParallelEncoding: false,
|
|
201
200
|
});
|
|
201
|
+
const { onArtifact } = (0, on_artifact_1.handleOnArtifact)({
|
|
202
|
+
artifactState: aggregate.artifactState,
|
|
203
|
+
compositionId,
|
|
204
|
+
onProgress: (progress) => {
|
|
205
|
+
aggregate.artifactState = progress;
|
|
206
|
+
updateRenderProgress({
|
|
207
|
+
newline: false,
|
|
208
|
+
printToConsole: true,
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
});
|
|
202
212
|
await renderer_1.RenderInternals.internalRenderStill({
|
|
203
213
|
composition: config,
|
|
204
214
|
frame: stillFrame,
|
|
@@ -229,6 +239,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
229
239
|
offthreadVideoCacheSizeInBytes,
|
|
230
240
|
binariesDirectory,
|
|
231
241
|
onBrowserDownload,
|
|
242
|
+
onArtifact,
|
|
232
243
|
});
|
|
233
244
|
aggregate.rendering = {
|
|
234
245
|
frames: 1,
|
|
@@ -239,7 +250,6 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
239
250
|
updateRenderProgress({
|
|
240
251
|
newline: true,
|
|
241
252
|
printToConsole: true,
|
|
242
|
-
isUsingParallelEncoding: false,
|
|
243
253
|
});
|
|
244
254
|
log_1.Log.info({ indent, logLevel }, chalk_1.chalk.blue(`${(exists ? '○' : '+').padEnd(progress_bar_1.LABEL_WIDTH)} ${(0, make_link_1.makeHyperlink)({ url: 'file://' + absoluteOutputLocation, text: relativeOutputLocation, fallback: relativeOutputLocation })}`));
|
|
245
255
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.176",
|
|
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/
|
|
37
|
-
"@remotion/
|
|
38
|
-
"@remotion/
|
|
39
|
-
"@remotion/
|
|
40
|
-
"remotion": "4.0.
|
|
41
|
-
"@remotion/studio
|
|
42
|
-
"
|
|
35
|
+
"@remotion/bundler": "4.0.176",
|
|
36
|
+
"@remotion/media-utils": "4.0.176",
|
|
37
|
+
"@remotion/player": "4.0.176",
|
|
38
|
+
"@remotion/studio-server": "4.0.176",
|
|
39
|
+
"@remotion/studio-shared": "4.0.176",
|
|
40
|
+
"@remotion/renderer": "4.0.176",
|
|
41
|
+
"@remotion/studio": "4.0.176",
|
|
42
|
+
"remotion": "4.0.176"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"react-dom": "18.3.1",
|
|
64
64
|
"vitest": "0.31.1",
|
|
65
65
|
"zod": "3.22.3",
|
|
66
|
-
"@remotion/zod-types": "4.0.
|
|
67
|
-
"@remotion/tailwind": "4.0.
|
|
68
|
-
"@remotion/
|
|
69
|
-
"@remotion/
|
|
66
|
+
"@remotion/zod-types": "4.0.176",
|
|
67
|
+
"@remotion/tailwind": "4.0.176",
|
|
68
|
+
"@remotion/skia": "4.0.176",
|
|
69
|
+
"@remotion/enable-scss": "4.0.176"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|