@remotion/cli 4.0.425 → 4.0.427
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 +25 -7
- package/dist/bundle.js +10 -3
- package/dist/compositions.js +7 -1
- package/dist/config/index.d.ts +16 -3
- package/dist/config/index.js +11 -19
- package/dist/config/preview-server.js +3 -1
- package/dist/extra-packages.js +2 -2
- package/dist/get-cli-options.d.ts +0 -5
- package/dist/get-cli-options.js +11 -29
- package/dist/get-config-file-name.js +7 -4
- package/dist/get-env.js +11 -15
- package/dist/get-input-props.js +8 -5
- package/dist/index.d.ts +1 -6
- package/dist/index.js +9 -3
- package/dist/list-of-remotion-packages.js +2 -0
- package/dist/parse-command-line.d.ts +0 -657
- package/dist/parse-command-line.js +0 -17
- package/dist/parsed-cli.d.ts +1104 -1
- package/dist/parsed-cli.js +24 -33
- package/dist/render-flows/render.d.ts +3 -1
- package/dist/render-flows/render.js +8 -1
- package/dist/render-flows/still.d.ts +3 -1
- package/dist/render-flows/still.js +3 -1
- package/dist/render-queue/process-still.js +7 -1
- package/dist/render-queue/process-video.js +7 -1
- package/dist/render.js +25 -4
- package/dist/setup-cache.d.ts +6 -2
- package/dist/setup-cache.js +5 -3
- package/dist/still.js +18 -2
- package/dist/studio.js +11 -18
- package/package.json +15 -15
package/dist/benchmark.js
CHANGED
|
@@ -21,8 +21,7 @@ const setup_cache_1 = require("./setup-cache");
|
|
|
21
21
|
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
22
22
|
const show_compositions_picker_1 = require("./show-compositions-picker");
|
|
23
23
|
const truthy_1 = require("./truthy");
|
|
24
|
-
const
|
|
25
|
-
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = client_1.BrowserSafeApis.options;
|
|
24
|
+
const { audioBitrateOption, x264Option, offthreadVideoCacheSizeInBytesOption, scaleOption, crfOption, jpegQualityOption, videoBitrateOption, enforceAudioOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, enableMultiprocessOnLinuxOption, glOption, numberOfGifLoopsOption, encodingMaxRateOption, encodingBufferSizeOption, delayRenderTimeoutInMillisecondsOption, headlessOption, overwriteOption, binariesDirectoryOption, forSeamlessAacConcatenationOption, publicPathOption, publicDirOption, metadataOption, hardwareAccelerationOption, chromeModeOption, offthreadVideoThreadsOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, rspackOption, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, concurrencyOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, bundleCacheOption, runsOption, } = client_1.BrowserSafeApis.options;
|
|
26
25
|
const getValidConcurrency = (cliConcurrency) => {
|
|
27
26
|
const { concurrencies } = parsed_cli_1.parsedCli;
|
|
28
27
|
if (!concurrencies) {
|
|
@@ -87,8 +86,8 @@ const makeBenchmarkProgressBar = ({ totalRuns, run, progress, doneIn, }) => {
|
|
|
87
86
|
].join(' ');
|
|
88
87
|
};
|
|
89
88
|
const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
90
|
-
var _a, _b
|
|
91
|
-
const runs = (
|
|
89
|
+
var _a, _b;
|
|
90
|
+
const runs = runsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
92
91
|
const { file, reason, remainingArgs } = (0, entry_point_1.findEntryPoint)({
|
|
93
92
|
args,
|
|
94
93
|
remotionRoot,
|
|
@@ -103,11 +102,24 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
103
102
|
process.exit(1);
|
|
104
103
|
}
|
|
105
104
|
const fullEntryPoint = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
106
|
-
const { inputProps, envVariables, frameRange: defaultFrameRange, ffmpegOverride,
|
|
105
|
+
const { inputProps, envVariables, frameRange: defaultFrameRange, ffmpegOverride, } = (0, get_cli_options_1.getCliOptions)({
|
|
107
106
|
isStill: false,
|
|
108
107
|
logLevel,
|
|
109
108
|
indent: false,
|
|
110
109
|
});
|
|
110
|
+
const unparsedConcurrency = concurrencyOption.getValue({
|
|
111
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
112
|
+
}).value;
|
|
113
|
+
const height = overrideHeightOption.getValue({
|
|
114
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
115
|
+
}).value;
|
|
116
|
+
const width = overrideWidthOption.getValue({
|
|
117
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
118
|
+
}).value;
|
|
119
|
+
const fps = overrideFpsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
120
|
+
const durationInFrames = overrideDurationOption.getValue({
|
|
121
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
122
|
+
}).value;
|
|
111
123
|
const pixelFormat = pixelFormatOption.getValue({
|
|
112
124
|
commandLine: parsed_cli_1.parsedCli,
|
|
113
125
|
}).value;
|
|
@@ -145,6 +157,10 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
145
157
|
const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
|
|
146
158
|
commandLine: parsed_cli_1.parsedCli,
|
|
147
159
|
}).value;
|
|
160
|
+
const rspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
161
|
+
const shouldCache = bundleCacheOption.getValue({
|
|
162
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
163
|
+
}).value;
|
|
148
164
|
if (experimentalClientSideRenderingEnabled) {
|
|
149
165
|
log_1.Log.warn({ indent: false, logLevel }, 'Enabling WIP client-side rendering. Please see caveats on https://www.remotion.dev/docs/client-side-rendering/.');
|
|
150
166
|
}
|
|
@@ -204,6 +220,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
204
220
|
experimentalClientSideRenderingEnabled,
|
|
205
221
|
askAIEnabled,
|
|
206
222
|
keyboardShortcutsEnabled,
|
|
223
|
+
rspack,
|
|
224
|
+
shouldCache,
|
|
207
225
|
});
|
|
208
226
|
(0, cleanup_before_quit_1.registerCleanupJob)(`Deleting bundle`, () => cleanupBundle());
|
|
209
227
|
const puppeteerInstance = await browserInstance;
|
|
@@ -302,9 +320,9 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
|
|
|
302
320
|
}, {
|
|
303
321
|
downloadName: null,
|
|
304
322
|
outName: null,
|
|
305
|
-
configFile: (
|
|
323
|
+
configFile: (_a = config_1.ConfigInternals.getOutputCodecOrUndefined()) !== null && _a !== void 0 ? _a : null,
|
|
306
324
|
uiCodec: null,
|
|
307
|
-
compositionCodec: (
|
|
325
|
+
compositionCodec: (_b = composition.defaultCodec) !== null && _b !== void 0 ? _b : null,
|
|
308
326
|
});
|
|
309
327
|
const concurrency = getValidConcurrency(unparsedConcurrency);
|
|
310
328
|
benchmark[composition.id] = {};
|
package/dist/bundle.js
CHANGED
|
@@ -17,7 +17,7 @@ const parsed_cli_1 = require("./parsed-cli");
|
|
|
17
17
|
const setup_cache_1 = require("./setup-cache");
|
|
18
18
|
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
19
19
|
const yes_or_no_1 = require("./yes-or-no");
|
|
20
|
-
const { publicPathOption, publicDirOption, disableGitSourceOption, audioLatencyHintOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, } = client_1.BrowserSafeApis.options;
|
|
20
|
+
const { publicPathOption, publicDirOption, disableGitSourceOption, audioLatencyHintOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, rspackOption, outDirOption, bundleCacheOption, } = client_1.BrowserSafeApis.options;
|
|
21
21
|
const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
22
22
|
const { file, reason } = (0, entry_point_1.findEntryPoint)({
|
|
23
23
|
args,
|
|
@@ -47,6 +47,10 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
47
47
|
const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
|
|
48
48
|
commandLine: parsed_cli_1.parsedCli,
|
|
49
49
|
}).value;
|
|
50
|
+
const rspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
51
|
+
const shouldCache = bundleCacheOption.getValue({
|
|
52
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
53
|
+
}).value;
|
|
50
54
|
if (experimentalClientSideRenderingEnabled) {
|
|
51
55
|
log_1.Log.warn({ indent: false, logLevel }, 'Enabling WIP client-side rendering. Please see caveats on https://www.remotion.dev/docs/client-side-rendering/.');
|
|
52
56
|
}
|
|
@@ -58,8 +62,9 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
58
62
|
const audioLatencyHint = audioLatencyHintOption.getValue({
|
|
59
63
|
commandLine: parsed_cli_1.parsedCli,
|
|
60
64
|
}).value;
|
|
61
|
-
const
|
|
62
|
-
|
|
65
|
+
const outDir = outDirOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
66
|
+
const outputPath = outDir
|
|
67
|
+
? path_1.default.resolve(process.cwd(), outDir)
|
|
63
68
|
: path_1.default.join(remotionRoot, 'build');
|
|
64
69
|
const gitignoreFolder = bundler_1.BundlerInternals.findClosestFolderWithItem(outputPath, '.gitignore');
|
|
65
70
|
const existed = (0, fs_1.existsSync)(outputPath);
|
|
@@ -106,6 +111,8 @@ const bundleCommand = async (remotionRoot, args, logLevel) => {
|
|
|
106
111
|
experimentalClientSideRenderingEnabled,
|
|
107
112
|
askAIEnabled,
|
|
108
113
|
keyboardShortcutsEnabled,
|
|
114
|
+
rspack,
|
|
115
|
+
shouldCache,
|
|
109
116
|
});
|
|
110
117
|
log_1.Log.info({ indent: false, logLevel }, chalk_1.chalk.blue(`${existed ? '○' : '+'} ${output}`));
|
|
111
118
|
if (!gitignoreFolder) {
|
package/dist/compositions.js
CHANGED
|
@@ -13,7 +13,7 @@ const log_1 = require("./log");
|
|
|
13
13
|
const parsed_cli_1 = require("./parsed-cli");
|
|
14
14
|
const print_compositions_1 = require("./print-compositions");
|
|
15
15
|
const setup_cache_1 = require("./setup-cache");
|
|
16
|
-
const { enableMultiprocessOnLinuxOption, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, } = client_1.BrowserSafeApis.options;
|
|
16
|
+
const { enableMultiprocessOnLinuxOption, offthreadVideoCacheSizeInBytesOption, offthreadVideoThreadsOption, glOption, headlessOption, delayRenderTimeoutInMillisecondsOption, binariesDirectoryOption, publicPathOption, publicDirOption, chromeModeOption, audioLatencyHintOption, mediaCacheSizeInBytesOption, darkModeOption, askAIOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, rspackOption, browserExecutableOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, bundleCacheOption, } = client_1.BrowserSafeApis.options;
|
|
17
17
|
const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
18
18
|
const { file, reason } = (0, entry_point_1.findEntryPoint)({
|
|
19
19
|
args,
|
|
@@ -85,6 +85,10 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
85
85
|
const keyboardShortcutsEnabled = keyboardShortcutsOption.getValue({
|
|
86
86
|
commandLine: parsed_cli_1.parsedCli,
|
|
87
87
|
}).value;
|
|
88
|
+
const rspack = rspackOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
89
|
+
const shouldCache = bundleCacheOption.getValue({
|
|
90
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
91
|
+
}).value;
|
|
88
92
|
if (experimentalClientSideRenderingEnabled) {
|
|
89
93
|
log_1.Log.warn({ indent: false, logLevel }, 'Enabling WIP client-side rendering. Please see caveats on https://www.remotion.dev/docs/client-side-rendering/.');
|
|
90
94
|
}
|
|
@@ -110,6 +114,8 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
|
|
|
110
114
|
experimentalClientSideRenderingEnabled,
|
|
111
115
|
askAIEnabled,
|
|
112
116
|
keyboardShortcutsEnabled,
|
|
117
|
+
rspack,
|
|
118
|
+
shouldCache,
|
|
113
119
|
});
|
|
114
120
|
(0, cleanup_before_quit_1.registerCleanupJob)(`Cleanup bundle`, () => cleanupBundle());
|
|
115
121
|
const compositions = await renderer_1.RenderInternals.internalGetCompositions({
|
package/dist/config/index.d.ts
CHANGED
|
@@ -61,6 +61,12 @@ declare global {
|
|
|
61
61
|
* @default false
|
|
62
62
|
*/
|
|
63
63
|
readonly setExperimentalClientSideRenderingEnabled: (enabled: boolean) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Enable experimental Rspack bundler instead of Webpack.
|
|
66
|
+
* @param enabled Boolean whether to enable the Rspack bundler
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
readonly setExperimentalRspackEnabled: (enabled: boolean) => void;
|
|
64
70
|
/**
|
|
65
71
|
* Set number of shared audio tags. https://www.remotion.dev/docs/player/autoplay#using-the-numberofsharedaudiotags-prop
|
|
66
72
|
* @param numberOfAudioTags
|
|
@@ -385,10 +391,20 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
|
|
|
385
391
|
* Default: false
|
|
386
392
|
*/
|
|
387
393
|
setIPv4: (ipv4: boolean) => void;
|
|
394
|
+
/**
|
|
395
|
+
* Define the output directory for `npx remotion bundle`.
|
|
396
|
+
* Default: `build` in the Remotion root.
|
|
397
|
+
*/
|
|
398
|
+
setBundleOutDir: (outDir: string | null) => void;
|
|
388
399
|
/**
|
|
389
400
|
* Choose between using Chrome Headless Shell or Chrome for Testing
|
|
390
401
|
*/
|
|
391
402
|
setChromeMode: (chromeMode: ChromeMode) => void;
|
|
403
|
+
/**
|
|
404
|
+
* Set how many times the video should be rendered during a benchmark.
|
|
405
|
+
* Default: 3
|
|
406
|
+
*/
|
|
407
|
+
setBenchmarkRuns: (runs: number) => void;
|
|
392
408
|
/**
|
|
393
409
|
* @deprecated 'The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.'
|
|
394
410
|
*/
|
|
@@ -416,7 +432,6 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
|
|
|
416
432
|
};
|
|
417
433
|
export declare const Config: FlatConfig;
|
|
418
434
|
export declare const ConfigInternals: {
|
|
419
|
-
getRange: () => FrameRange | null;
|
|
420
435
|
getBrowser: () => null;
|
|
421
436
|
getStudioPort: () => number | undefined;
|
|
422
437
|
getRendererPortFromConfigFile: () => number | null;
|
|
@@ -428,7 +443,6 @@ export declare const ConfigInternals: {
|
|
|
428
443
|
getWebpackOverrideFn: () => WebpackOverrideFn;
|
|
429
444
|
getWebpackCaching: () => boolean;
|
|
430
445
|
getOutputLocation: () => string | null;
|
|
431
|
-
setFrameRangeFromCli: (newFrameRange: string | number) => void;
|
|
432
446
|
setStillFrame: (frame: number) => void;
|
|
433
447
|
getMaxTimelineTracks: () => number;
|
|
434
448
|
defaultOverrideFunction: WebpackOverrideFn;
|
|
@@ -436,7 +450,6 @@ export declare const ConfigInternals: {
|
|
|
436
450
|
getMetadata: () => Record<string, string>;
|
|
437
451
|
getEntryPoint: () => string | null;
|
|
438
452
|
getWebpackPolling: () => number | null;
|
|
439
|
-
getShouldOpenBrowser: () => boolean;
|
|
440
453
|
getBufferStateDelayInMilliseconds: () => number | null;
|
|
441
454
|
getOutputCodecOrUndefined: () => CodecOrUndefined;
|
|
442
455
|
};
|
package/dist/config/index.js
CHANGED
|
@@ -4,7 +4,6 @@ exports.ConfigInternals = exports.Config = void 0;
|
|
|
4
4
|
const browser_1 = require("./browser");
|
|
5
5
|
const concurrency_1 = require("./concurrency");
|
|
6
6
|
const env_file_1 = require("./env-file");
|
|
7
|
-
const frame_range_1 = require("./frame-range");
|
|
8
7
|
const image_sequence_1 = require("./image-sequence");
|
|
9
8
|
const output_location_1 = require("./output-location");
|
|
10
9
|
const override_webpack_1 = require("./override-webpack");
|
|
@@ -15,18 +14,13 @@ const client_1 = require("@remotion/renderer/client");
|
|
|
15
14
|
const studio_server_1 = require("@remotion/studio-server");
|
|
16
15
|
const buffer_state_delay_in_milliseconds_1 = require("./buffer-state-delay-in-milliseconds");
|
|
17
16
|
const entry_point_1 = require("./entry-point");
|
|
18
|
-
const env_file_2 = require("./env-file");
|
|
19
17
|
const ffmpeg_override_1 = require("./ffmpeg-override");
|
|
20
|
-
const frame_range_2 = require("./frame-range");
|
|
21
|
-
const image_sequence_2 = require("./image-sequence");
|
|
22
18
|
const metadata_1 = require("./metadata");
|
|
23
|
-
const open_browser_1 = require("./open-browser");
|
|
24
19
|
const output_location_2 = require("./output-location");
|
|
25
20
|
const override_webpack_2 = require("./override-webpack");
|
|
26
21
|
const preview_server_2 = require("./preview-server");
|
|
27
|
-
const webpack_caching_2 = require("./webpack-caching");
|
|
28
22
|
const webpack_poll_1 = require("./webpack-poll");
|
|
29
|
-
const { concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, } = client_1.BrowserSafeApis.options;
|
|
23
|
+
const { concurrencyOption, offthreadVideoCacheSizeInBytesOption, x264Option, audioBitrateOption, videoBitrateOption, scaleOption, crfOption, jpegQualityOption, enforceAudioOption, overwriteOption, chromeModeOption, mutedOption, videoCodecOption, colorSpaceOption, disallowParallelEncodingOption, deleteAfterOption, folderExpiryOption, enableMultiprocessOnLinuxOption, glOption, headlessOption, numberOfGifLoopsOption, beepOnFinishOption, encodingMaxRateOption, encodingBufferSizeOption, reproOption, enableLambdaInsights, logLevelOption, delayRenderTimeoutInMillisecondsOption, publicDirOption, binariesDirectoryOption, preferLosslessOption, framesOption, forSeamlessAacConcatenationOption, audioCodecOption, publicPathOption, hardwareAccelerationOption, audioLatencyHintOption, enableCrossSiteIsolationOption, imageSequencePatternOption, darkModeOption, askAIOption, publicLicenseKeyOption, experimentalClientSideRenderingOption, keyboardShortcutsOption, forceNewStudioOption, numberOfSharedAudioTagsOption, ipv4Option, pixelFormatOption, browserExecutableOption, everyNthFrameOption, proResProfileOption, stillImageFormatOption, videoImageFormatOption, userAgentOption, disableWebSecurityOption, ignoreCertificateErrorsOption, overrideHeightOption, overrideWidthOption, overrideFpsOption, overrideDurationOption, rspackOption, outDirOption, webpackPollOption, imageSequenceOption, bundleCacheOption, envFileOption, runsOption, noOpenOption, } = client_1.BrowserSafeApis.options;
|
|
30
24
|
exports.Config = {
|
|
31
25
|
get Bundling() {
|
|
32
26
|
throw new Error('The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.');
|
|
@@ -49,12 +43,13 @@ exports.Config = {
|
|
|
49
43
|
setMaxTimelineTracks: studio_server_1.StudioServerInternals.setMaxTimelineTracks,
|
|
50
44
|
setKeyboardShortcutsEnabled: keyboardShortcutsOption.setConfig,
|
|
51
45
|
setExperimentalClientSideRenderingEnabled: experimentalClientSideRenderingOption.setConfig,
|
|
46
|
+
setExperimentalRspackEnabled: rspackOption.setConfig,
|
|
52
47
|
setNumberOfSharedAudioTags: numberOfSharedAudioTagsOption.setConfig,
|
|
53
|
-
setWebpackPollingInMilliseconds:
|
|
54
|
-
setShouldOpenBrowser:
|
|
48
|
+
setWebpackPollingInMilliseconds: webpackPollOption.setConfig,
|
|
49
|
+
setShouldOpenBrowser: noOpenOption.setConfig,
|
|
55
50
|
setBufferStateDelayInMilliseconds: buffer_state_delay_in_milliseconds_1.setBufferStateDelayInMilliseconds,
|
|
56
51
|
overrideWebpackConfig: override_webpack_2.overrideWebpackConfig,
|
|
57
|
-
setCachingEnabled:
|
|
52
|
+
setCachingEnabled: bundleCacheOption.setConfig,
|
|
58
53
|
setPort: preview_server_2.setPort,
|
|
59
54
|
setStudioPort: preview_server_2.setStudioPort,
|
|
60
55
|
setRendererPort: preview_server_2.setRendererPort,
|
|
@@ -69,7 +64,7 @@ exports.Config = {
|
|
|
69
64
|
setChromiumHeadlessMode: headlessOption.setConfig,
|
|
70
65
|
setChromiumOpenGlRenderer: glOption.setConfig,
|
|
71
66
|
setChromiumUserAgent: userAgentOption.setConfig,
|
|
72
|
-
setDotEnvLocation:
|
|
67
|
+
setDotEnvLocation: envFileOption.setConfig,
|
|
73
68
|
setConcurrency: concurrencyOption.setConfig,
|
|
74
69
|
setChromiumMultiProcessOnLinux: enableMultiprocessOnLinuxOption.setConfig,
|
|
75
70
|
setChromiumDarkMode: darkModeOption.setConfig,
|
|
@@ -85,7 +80,7 @@ exports.Config = {
|
|
|
85
80
|
setMetadata: metadata_1.setMetadata,
|
|
86
81
|
setEncodingMaxRate: encodingMaxRateOption.setConfig,
|
|
87
82
|
setEncodingBufferSize: encodingBufferSizeOption.setConfig,
|
|
88
|
-
setFrameRange:
|
|
83
|
+
setFrameRange: framesOption.setConfig,
|
|
89
84
|
setScale: scaleOption.setConfig,
|
|
90
85
|
setEveryNthFrame: everyNthFrameOption.setConfig,
|
|
91
86
|
setNumberOfGifLoops: numberOfGifLoopsOption.setConfig,
|
|
@@ -97,7 +92,7 @@ exports.Config = {
|
|
|
97
92
|
setPixelFormat: pixelFormatOption.setConfig,
|
|
98
93
|
setCodec: videoCodecOption.setConfig,
|
|
99
94
|
setCrf: crfOption.setConfig,
|
|
100
|
-
setImageSequence:
|
|
95
|
+
setImageSequence: imageSequenceOption.setConfig,
|
|
101
96
|
setProResProfile: proResProfileOption.setConfig,
|
|
102
97
|
setX264Preset: x264Option.setConfig,
|
|
103
98
|
setAudioBitrate: audioBitrateOption.setConfig,
|
|
@@ -110,9 +105,7 @@ exports.Config = {
|
|
|
110
105
|
overrideDuration: overrideDurationOption.setConfig,
|
|
111
106
|
overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
|
|
112
107
|
setAudioCodec: audioCodecOption.setConfig,
|
|
113
|
-
setOffthreadVideoCacheSizeInBytes:
|
|
114
|
-
offthreadVideoCacheSizeInBytesOption.setConfig(size);
|
|
115
|
-
},
|
|
108
|
+
setOffthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytesOption.setConfig,
|
|
116
109
|
setDeleteAfter: deleteAfterOption.setConfig,
|
|
117
110
|
setColorSpace: colorSpaceOption.setConfig,
|
|
118
111
|
setDisallowParallelEncoding: disallowParallelEncodingOption.setConfig,
|
|
@@ -130,9 +123,10 @@ exports.Config = {
|
|
|
130
123
|
setPublicLicenseKey: publicLicenseKeyOption.setConfig,
|
|
131
124
|
setForceNewStudioEnabled: forceNewStudioOption.setConfig,
|
|
132
125
|
setIPv4: ipv4Option.setConfig,
|
|
126
|
+
setBundleOutDir: outDirOption.setConfig,
|
|
127
|
+
setBenchmarkRuns: runsOption.setConfig,
|
|
133
128
|
};
|
|
134
129
|
exports.ConfigInternals = {
|
|
135
|
-
getRange: frame_range_1.getRange,
|
|
136
130
|
getBrowser: browser_1.getBrowser,
|
|
137
131
|
getStudioPort: preview_server_1.getStudioPort,
|
|
138
132
|
getRendererPortFromConfigFile: preview_server_1.getRendererPortFromConfigFile,
|
|
@@ -144,7 +138,6 @@ exports.ConfigInternals = {
|
|
|
144
138
|
getWebpackOverrideFn: override_webpack_1.getWebpackOverrideFn,
|
|
145
139
|
getWebpackCaching: webpack_caching_1.getWebpackCaching,
|
|
146
140
|
getOutputLocation: output_location_1.getOutputLocation,
|
|
147
|
-
setFrameRangeFromCli: frame_range_1.setFrameRangeFromCli,
|
|
148
141
|
setStillFrame: still_frame_1.setStillFrame,
|
|
149
142
|
getMaxTimelineTracks: studio_server_1.StudioServerInternals.getMaxTimelineTracks,
|
|
150
143
|
defaultOverrideFunction: override_webpack_1.defaultOverrideFunction,
|
|
@@ -152,7 +145,6 @@ exports.ConfigInternals = {
|
|
|
152
145
|
getMetadata: metadata_1.getMetadata,
|
|
153
146
|
getEntryPoint: entry_point_1.getEntryPoint,
|
|
154
147
|
getWebpackPolling: webpack_poll_1.getWebpackPolling,
|
|
155
|
-
getShouldOpenBrowser: open_browser_1.getShouldOpenBrowser,
|
|
156
148
|
getBufferStateDelayInMilliseconds: buffer_state_delay_in_milliseconds_1.getBufferStateDelayInMilliseconds,
|
|
157
149
|
getOutputCodecOrUndefined: client_1.BrowserSafeApis.getOutputCodecOrUndefined,
|
|
158
150
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getRendererPortFromConfigFileAndCliFlag = exports.getRendererPortFromConfigFile = exports.getStudioPort = exports.setRendererPort = exports.setStudioPort = exports.setPort = void 0;
|
|
4
|
+
const client_1 = require("@remotion/renderer/client");
|
|
4
5
|
const parsed_cli_1 = require("../parsed-cli");
|
|
6
|
+
const { portOption } = client_1.BrowserSafeApis.options;
|
|
5
7
|
let studioPort;
|
|
6
8
|
let rendererPort;
|
|
7
9
|
const validatePort = (port) => {
|
|
@@ -44,6 +46,6 @@ const getRendererPortFromConfigFile = () => {
|
|
|
44
46
|
exports.getRendererPortFromConfigFile = getRendererPortFromConfigFile;
|
|
45
47
|
const getRendererPortFromConfigFileAndCliFlag = () => {
|
|
46
48
|
var _a, _b;
|
|
47
|
-
return (_b = (_a = parsed_cli_1.parsedCli.
|
|
49
|
+
return ((_b = (_a = portOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value) !== null && _a !== void 0 ? _a : rendererPort) !== null && _b !== void 0 ? _b : null);
|
|
48
50
|
};
|
|
49
51
|
exports.getRendererPortFromConfigFileAndCliFlag = getRendererPortFromConfigFileAndCliFlag;
|
package/dist/extra-packages.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EXTRA_PACKAGES_DOCS = exports.EXTRA_PACKAGES = void 0;
|
|
4
4
|
exports.EXTRA_PACKAGES = {
|
|
5
|
-
zod: '3.22.3',
|
|
6
5
|
mediabunny: '1.34.4',
|
|
6
|
+
zod: '4.3.6',
|
|
7
7
|
};
|
|
8
8
|
exports.EXTRA_PACKAGES_DOCS = {
|
|
9
|
-
zod: 'https://www.remotion.dev/docs/schemas#prerequisites',
|
|
10
9
|
mediabunny: 'https://www.remotion.dev/docs/mediabunny/version',
|
|
10
|
+
zod: 'https://zod.dev',
|
|
11
11
|
};
|
|
@@ -4,15 +4,10 @@ export declare const getCliOptions: (options: {
|
|
|
4
4
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
5
5
|
indent: boolean;
|
|
6
6
|
}) => {
|
|
7
|
-
concurrency: import("@remotion/renderer").Concurrency;
|
|
8
7
|
frameRange: import("@remotion/renderer").FrameRange | null;
|
|
9
8
|
shouldOutputImageSequence: boolean;
|
|
10
9
|
inputProps: Record<string, unknown>;
|
|
11
10
|
envVariables: Record<string, string>;
|
|
12
11
|
stillFrame: number;
|
|
13
12
|
ffmpegOverride: import("@remotion/renderer").FfmpegOverrideFn;
|
|
14
|
-
height: number | null;
|
|
15
|
-
width: number | null;
|
|
16
|
-
fps: number | null;
|
|
17
|
-
durationInFrames: number | null;
|
|
18
13
|
};
|
package/dist/get-cli-options.js
CHANGED
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getCliOptions = exports.getAndValidateAbsoluteOutputFile = void 0;
|
|
7
|
-
const renderer_1 = require("@remotion/renderer");
|
|
8
7
|
const client_1 = require("@remotion/renderer/client");
|
|
9
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
10
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -14,7 +13,9 @@ const get_input_props_1 = require("./get-input-props");
|
|
|
14
13
|
const log_1 = require("./log");
|
|
15
14
|
const parsed_cli_1 = require("./parsed-cli");
|
|
16
15
|
const getAndValidateFrameRange = (logLevel, indent) => {
|
|
17
|
-
const frameRange =
|
|
16
|
+
const frameRange = client_1.BrowserSafeApis.options.framesOption.getValue({
|
|
17
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
18
|
+
}).value;
|
|
18
19
|
if (typeof frameRange === 'number') {
|
|
19
20
|
log_1.Log.warn({ logLevel, indent }, 'Selected a single frame. Assuming you want to output an image.');
|
|
20
21
|
log_1.Log.warn({ logLevel, indent }, `If you want to render a video, pass a range: '--frames=${frameRange}-${frameRange}'.`);
|
|
@@ -32,42 +33,23 @@ const getAndValidateAbsoluteOutputFile = (relativeOutputLocation, overwrite, log
|
|
|
32
33
|
};
|
|
33
34
|
exports.getAndValidateAbsoluteOutputFile = getAndValidateAbsoluteOutputFile;
|
|
34
35
|
const getCliOptions = (options) => {
|
|
36
|
+
var _a;
|
|
35
37
|
const frameRange = getAndValidateFrameRange(options.logLevel, false);
|
|
36
|
-
const
|
|
37
|
-
? true
|
|
38
|
-
: config_1.ConfigInternals.getShouldOutputImageSequence(frameRange);
|
|
39
|
-
const concurrency = client_1.BrowserSafeApis.options.concurrencyOption.getValue({
|
|
40
|
-
commandLine: parsed_cli_1.parsedCli,
|
|
41
|
-
}).value;
|
|
42
|
-
const height = client_1.BrowserSafeApis.options.overrideHeightOption.getValue({
|
|
43
|
-
commandLine: parsed_cli_1.parsedCli,
|
|
44
|
-
}).value;
|
|
45
|
-
const width = client_1.BrowserSafeApis.options.overrideWidthOption.getValue({
|
|
46
|
-
commandLine: parsed_cli_1.parsedCli,
|
|
47
|
-
}).value;
|
|
48
|
-
const fps = client_1.BrowserSafeApis.options.overrideFpsOption.getValue({
|
|
38
|
+
const imageSequence = client_1.BrowserSafeApis.options.imageSequenceOption.getValue({
|
|
49
39
|
commandLine: parsed_cli_1.parsedCli,
|
|
50
40
|
}).value;
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
renderer_1.RenderInternals.validateConcurrency({
|
|
55
|
-
value: concurrency,
|
|
56
|
-
setting: 'concurrency',
|
|
57
|
-
checkIfValidForCurrentMachine: false,
|
|
58
|
-
});
|
|
41
|
+
const shouldOutputImageSequence = options.isStill
|
|
42
|
+
? true
|
|
43
|
+
: imageSequence || typeof frameRange === 'number';
|
|
59
44
|
return {
|
|
60
|
-
concurrency,
|
|
61
45
|
frameRange,
|
|
62
46
|
shouldOutputImageSequence,
|
|
63
47
|
inputProps: (0, get_input_props_1.getInputProps)(null, options.logLevel),
|
|
64
48
|
envVariables: (0, get_env_1.getEnvironmentVariables)(null, options.logLevel, options.indent),
|
|
65
|
-
stillFrame:
|
|
49
|
+
stillFrame: (_a = client_1.BrowserSafeApis.options.stillFrameOption.getValue({
|
|
50
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
51
|
+
}).value) !== null && _a !== void 0 ? _a : 0,
|
|
66
52
|
ffmpegOverride: config_1.ConfigInternals.getFfmpegOverrideFunction(),
|
|
67
|
-
height,
|
|
68
|
-
width,
|
|
69
|
-
fps,
|
|
70
|
-
durationInFrames,
|
|
71
53
|
};
|
|
72
54
|
};
|
|
73
55
|
exports.getCliOptions = getCliOptions;
|
|
@@ -4,21 +4,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.loadConfig = void 0;
|
|
7
|
+
const client_1 = require("@remotion/renderer/client");
|
|
7
8
|
const node_fs_1 = require("node:fs");
|
|
8
9
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
10
|
const load_config_1 = require("./load-config");
|
|
10
11
|
const log_1 = require("./log");
|
|
11
12
|
const parsed_cli_1 = require("./parsed-cli");
|
|
13
|
+
const { configOption } = client_1.BrowserSafeApis.options;
|
|
12
14
|
const defaultConfigFileJavascript = 'remotion.config.js';
|
|
13
15
|
const defaultConfigFileTypescript = 'remotion.config.ts';
|
|
14
16
|
const loadConfig = (remotionRoot) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
const configFile = configOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
18
|
+
if (configFile) {
|
|
19
|
+
const fullPath = node_path_1.default.resolve(process.cwd(), configFile);
|
|
17
20
|
if (!(0, node_fs_1.existsSync)(fullPath)) {
|
|
18
|
-
log_1.Log.error({ indent: false, logLevel: 'error' }, `You specified a config file location of "${
|
|
21
|
+
log_1.Log.error({ indent: false, logLevel: 'error' }, `You specified a config file location of "${configFile}" but no file under ${fullPath} was found.`);
|
|
19
22
|
process.exit(1);
|
|
20
23
|
}
|
|
21
|
-
return (0, load_config_1.loadConfigFile)(remotionRoot,
|
|
24
|
+
return (0, load_config_1.loadConfigFile)(remotionRoot, configFile, fullPath.endsWith('.js'));
|
|
22
25
|
}
|
|
23
26
|
if (remotionRoot === null) {
|
|
24
27
|
return Promise.resolve(null);
|
package/dist/get-env.js
CHANGED
|
@@ -38,15 +38,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getEnvironmentVariables = void 0;
|
|
40
40
|
const renderer_1 = require("@remotion/renderer");
|
|
41
|
+
const client_1 = require("@remotion/renderer/client");
|
|
41
42
|
const studio_server_1 = require("@remotion/studio-server");
|
|
42
43
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
43
44
|
const node_fs_1 = __importStar(require("node:fs"));
|
|
44
45
|
const node_path_1 = __importDefault(require("node:path"));
|
|
45
46
|
const chalk_1 = require("./chalk");
|
|
46
|
-
const config_1 = require("./config");
|
|
47
47
|
const make_link_1 = require("./hyperlinks/make-link");
|
|
48
48
|
const log_1 = require("./log");
|
|
49
49
|
const parsed_cli_1 = require("./parsed-cli");
|
|
50
|
+
const { envFileOption } = client_1.BrowserSafeApis.options;
|
|
50
51
|
function getProcessEnv() {
|
|
51
52
|
const env = {};
|
|
52
53
|
const validKeys = Object.keys(process.env).filter((key) => key.startsWith('REMOTION_'));
|
|
@@ -122,22 +123,17 @@ const findDotEnvFile = (remotionRoot) => {
|
|
|
122
123
|
};
|
|
123
124
|
const getEnvironmentVariables = (onUpdate, logLevel, indent) => {
|
|
124
125
|
const processEnv = getProcessEnv();
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
log_1.Log.error({ indent: false, logLevel }, 'You passed a --env-file but it could not be found.');
|
|
129
|
-
log_1.Log.error({ indent: false, logLevel }, 'We looked for the file at:', envFile);
|
|
130
|
-
log_1.Log.error({ indent: false, logLevel }, 'Check that your path is correct and try again.');
|
|
131
|
-
process.exit(1);
|
|
132
|
-
}
|
|
133
|
-
return getEnvForEnvFile({ processEnv, envFile, onUpdate, logLevel, indent });
|
|
134
|
-
}
|
|
126
|
+
const { value: envFileValue, source: envFileSource } = envFileOption.getValue({
|
|
127
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
128
|
+
});
|
|
135
129
|
const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const envFile = node_path_1.default.resolve(
|
|
130
|
+
if (envFileValue && envFileSource !== 'default') {
|
|
131
|
+
const baseDir = envFileSource === 'cli' ? process.cwd() : remotionRoot;
|
|
132
|
+
const envFile = node_path_1.default.resolve(baseDir, envFileValue);
|
|
139
133
|
if (!node_fs_1.default.existsSync(envFile)) {
|
|
140
|
-
log_1.Log.error({ indent: false, logLevel },
|
|
134
|
+
log_1.Log.error({ indent: false, logLevel }, envFileSource === 'cli'
|
|
135
|
+
? 'You passed a --env-file but it could not be found.'
|
|
136
|
+
: 'You specified a custom .env file using `Config.setDotEnvLocation()` in the config file but it could not be found');
|
|
141
137
|
log_1.Log.error({ indent: false, logLevel }, 'We looked for the file at:', envFile);
|
|
142
138
|
log_1.Log.error({ indent: false, logLevel }, 'Check that your path is correct and try again.');
|
|
143
139
|
process.exit(1);
|
package/dist/get-input-props.js
CHANGED
|
@@ -4,16 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getInputProps = void 0;
|
|
7
|
+
const client_1 = require("@remotion/renderer/client");
|
|
7
8
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
9
|
const node_os_1 = __importDefault(require("node:os"));
|
|
9
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
10
11
|
const log_1 = require("./log");
|
|
11
12
|
const parsed_cli_1 = require("./parsed-cli");
|
|
13
|
+
const { propsOption } = client_1.BrowserSafeApis.options;
|
|
12
14
|
const getInputProps = (onUpdate, logLevel) => {
|
|
13
|
-
|
|
15
|
+
const props = propsOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value;
|
|
16
|
+
if (!props) {
|
|
14
17
|
return {};
|
|
15
18
|
}
|
|
16
|
-
const jsonFile = node_path_1.default.resolve(process.cwd(),
|
|
19
|
+
const jsonFile = node_path_1.default.resolve(process.cwd(), props);
|
|
17
20
|
try {
|
|
18
21
|
if (node_fs_1.default.existsSync(jsonFile)) {
|
|
19
22
|
const rawJsonData = node_fs_1.default.readFileSync(jsonFile, 'utf-8');
|
|
@@ -30,12 +33,12 @@ const getInputProps = (onUpdate, logLevel) => {
|
|
|
30
33
|
}
|
|
31
34
|
return JSON.parse(rawJsonData);
|
|
32
35
|
}
|
|
33
|
-
return JSON.parse(
|
|
36
|
+
return JSON.parse(props);
|
|
34
37
|
}
|
|
35
38
|
catch (_a) {
|
|
36
39
|
log_1.Log.error({ indent: false, logLevel }, 'You passed --props but it was neither valid JSON nor a file path to a valid JSON file. Provided value: ' +
|
|
37
|
-
|
|
38
|
-
log_1.Log.info({ indent: false, logLevel }, 'Got the following value:',
|
|
40
|
+
props);
|
|
41
|
+
log_1.Log.info({ indent: false, logLevel }, 'Got the following value:', props);
|
|
39
42
|
log_1.Log.error({ indent: false, logLevel }, 'Check that your input is parseable using `JSON.parse` and try again.');
|
|
40
43
|
if (node_os_1.default.platform() === 'win32') {
|
|
41
44
|
const logOptions = {
|
package/dist/index.d.ts
CHANGED
|
@@ -80,17 +80,12 @@ export declare const CliInternals: {
|
|
|
80
80
|
logLevel: "error" | "info" | "trace" | "verbose" | "warn";
|
|
81
81
|
indent: boolean;
|
|
82
82
|
}) => {
|
|
83
|
-
concurrency: import("@remotion/renderer").Concurrency;
|
|
84
83
|
frameRange: import("@remotion/renderer").FrameRange | null;
|
|
85
84
|
shouldOutputImageSequence: boolean;
|
|
86
85
|
inputProps: Record<string, unknown>;
|
|
87
86
|
envVariables: Record<string, string>;
|
|
88
87
|
stillFrame: number;
|
|
89
88
|
ffmpegOverride: import("@remotion/renderer").FfmpegOverrideFn;
|
|
90
|
-
height: number | null;
|
|
91
|
-
width: number | null;
|
|
92
|
-
fps: number | null;
|
|
93
|
-
durationInFrames: number | null;
|
|
94
89
|
};
|
|
95
90
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
96
91
|
formatBytes: (number: number, options?: (Intl.NumberFormatOptions & {
|
|
@@ -102,7 +97,7 @@ export declare const CliInternals: {
|
|
|
102
97
|
initializeCli: (remotionRoot: string) => Promise<"error" | "info" | "trace" | "verbose" | "warn">;
|
|
103
98
|
BooleanFlags: string[];
|
|
104
99
|
quietFlagProvided: () => boolean;
|
|
105
|
-
parsedCli: import("./
|
|
100
|
+
parsedCli: import("./parsed-cli").CommandLineOptions & {
|
|
106
101
|
_: string[];
|
|
107
102
|
};
|
|
108
103
|
printError: (err: Error, logLevel: "error" | "info" | "trace" | "verbose" | "warn") => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CliInternals = exports.cli = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const client_1 = require("@remotion/renderer/client");
|
|
8
9
|
const studio_server_1 = require("@remotion/studio-server");
|
|
9
10
|
const minimist_1 = __importDefault(require("minimist"));
|
|
10
11
|
const add_1 = require("./add");
|
|
@@ -46,8 +47,13 @@ const still_1 = require("./still");
|
|
|
46
47
|
const studio_1 = require("./studio");
|
|
47
48
|
const upgrade_1 = require("./upgrade");
|
|
48
49
|
const versions_1 = require("./versions");
|
|
50
|
+
const { packageManagerOption, versionFlagOption } = client_1.BrowserSafeApis.options;
|
|
49
51
|
const cli = async () => {
|
|
52
|
+
var _a;
|
|
50
53
|
const [command, ...args] = parsed_cli_1.parsedCli._;
|
|
54
|
+
const packageManager = packageManagerOption.getValue({
|
|
55
|
+
commandLine: parsed_cli_1.parsedCli,
|
|
56
|
+
}).value;
|
|
51
57
|
const remotionRoot = renderer_1.RenderInternals.findRemotionRoot();
|
|
52
58
|
if (command !== versions_1.VERSIONS_COMMAND && !parsed_cli_1.parsedCli.help) {
|
|
53
59
|
await (0, versions_1.validateVersionsBeforeCommand)(remotionRoot, 'info');
|
|
@@ -106,8 +112,8 @@ const cli = async () => {
|
|
|
106
112
|
else if (command === 'upgrade') {
|
|
107
113
|
await (0, upgrade_1.upgradeCommand)({
|
|
108
114
|
remotionRoot,
|
|
109
|
-
packageManager:
|
|
110
|
-
version: parsed_cli_1.parsedCli.
|
|
115
|
+
packageManager: packageManager !== null && packageManager !== void 0 ? packageManager : undefined,
|
|
116
|
+
version: (_a = versionFlagOption.getValue({ commandLine: parsed_cli_1.parsedCli }).value) !== null && _a !== void 0 ? _a : undefined,
|
|
111
117
|
logLevel,
|
|
112
118
|
args,
|
|
113
119
|
});
|
|
@@ -122,7 +128,7 @@ const cli = async () => {
|
|
|
122
128
|
const additionalArgs = flagIndex === -1 ? [] : args.slice(flagIndex);
|
|
123
129
|
await (0, add_1.addCommand)({
|
|
124
130
|
remotionRoot,
|
|
125
|
-
packageManager:
|
|
131
|
+
packageManager: packageManager !== null && packageManager !== void 0 ? packageManager : undefined,
|
|
126
132
|
packageNames,
|
|
127
133
|
logLevel,
|
|
128
134
|
args: additionalArgs,
|