@remotion/cli 4.0.87 → 4.0.89

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 CHANGED
@@ -125,6 +125,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
125
125
  (0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
126
126
  },
127
127
  quietProgress: false,
128
+ quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
129
+ outDir: null,
128
130
  });
129
131
  (0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
130
132
  const puppeteerInstance = await browserInstance;
@@ -243,6 +245,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
243
245
  }).serializedString,
244
246
  offthreadVideoCacheSizeInBytes,
245
247
  colorSpace,
248
+ repro: false,
249
+ finishRenderProgress: () => undefined,
246
250
  }, (run, progress) => {
247
251
  benchmarkProgress.update(makeBenchmarkProgressBar({
248
252
  totalRuns: runs,
@@ -0,0 +1,2 @@
1
+ import type { LogLevel } from '@remotion/renderer';
2
+ export declare const bundleCommand: (remotionRoot: string, args: string[], logLevel: LogLevel) => Promise<void>;
package/dist/bundle.js ADDED
@@ -0,0 +1,110 @@
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.bundleCommand = void 0;
7
+ const bundler_1 = require("@remotion/bundler");
8
+ const studio_1 = require("@remotion/studio");
9
+ const fs_1 = require("fs");
10
+ const path_1 = __importDefault(require("path"));
11
+ const chalk_1 = require("./chalk");
12
+ const entry_point_1 = require("./entry-point");
13
+ const get_cli_options_1 = require("./get-cli-options");
14
+ const log_1 = require("./log");
15
+ const parse_command_line_1 = require("./parse-command-line");
16
+ const setup_cache_1 = require("./setup-cache");
17
+ const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
18
+ const yes_or_no_1 = require("./yes-or-no");
19
+ const bundleCommand = async (remotionRoot, args, logLevel) => {
20
+ const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot, logLevel);
21
+ const explicitlyPassed = args[0];
22
+ if (explicitlyPassed &&
23
+ reason !== 'argument passed' &&
24
+ reason !== 'argument passed - found in cwd' &&
25
+ reason !== 'argument passed - found in root') {
26
+ log_1.Log.error(`Entry point was specified as ${chalk_1.chalk.bold(explicitlyPassed)}, but it was not found.`);
27
+ process.exit(1);
28
+ }
29
+ const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
30
+ if (!file) {
31
+ log_1.Log.error('No entry point found.');
32
+ log_1.Log.error('Pass another argument to the command specifying the entry point.');
33
+ log_1.Log.error('See: https://www.remotion.dev/docs/terminology#entry-point');
34
+ process.exit(1);
35
+ }
36
+ const { publicDir } = await (0, get_cli_options_1.getCliOptions)({
37
+ isLambda: false,
38
+ type: 'get-compositions',
39
+ remotionRoot,
40
+ logLevel,
41
+ });
42
+ const outputPath = parse_command_line_1.parsedCli['out-dir']
43
+ ? path_1.default.resolve(process.cwd(), parse_command_line_1.parsedCli['out-dir'])
44
+ : path_1.default.join(remotionRoot, 'build');
45
+ const gitignoreFolder = bundler_1.BundlerInternals.findClosestFolderWithFile(outputPath, '.gitignore');
46
+ const existed = (0, fs_1.existsSync)(outputPath);
47
+ if (existed) {
48
+ if (!(0, fs_1.existsSync)(path_1.default.join(outputPath, 'index.html'))) {
49
+ log_1.Log.error(`The folder at ${outputPath} already exists, and needs to be deleted before a new bundle can be created.`);
50
+ log_1.Log.error('However, it does not look like the folder was created by `npx remotion bundle` (no index.html).');
51
+ log_1.Log.error('Aborting to prevent accidental data loss.');
52
+ process.exit(1);
53
+ }
54
+ (0, fs_1.rmSync)(outputPath, { recursive: true });
55
+ }
56
+ const output = await (0, setup_cache_1.bundleOnCli)({
57
+ fullPath: file,
58
+ logLevel,
59
+ onDirectoryCreated: () => { },
60
+ bundlingStep: 0,
61
+ indent: false,
62
+ quietProgress: updatesDontOverwrite,
63
+ publicDir,
64
+ steps: 1,
65
+ remotionRoot,
66
+ onProgressCallback: ({ bundling, copying }) => {
67
+ // Handle floating point inaccuracies
68
+ if (bundling.progress < 0.99999) {
69
+ if (updatesDontOverwrite) {
70
+ log_1.Log.info(`Bundling ${Math.round(bundling.progress * 100)}%`);
71
+ }
72
+ }
73
+ if (copying.doneIn === null) {
74
+ if (updatesDontOverwrite) {
75
+ return `Copying public dir ${studio_1.StudioInternals.formatBytes(copying.bytes)}`;
76
+ }
77
+ }
78
+ },
79
+ quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
80
+ outDir: outputPath,
81
+ });
82
+ log_1.Log.infoAdvanced({ indent: false, logLevel }, chalk_1.chalk.blue(`${existed ? '○' : '+'} ${output}`));
83
+ if (!gitignoreFolder) {
84
+ return;
85
+ }
86
+ // Non-interactive terminal
87
+ if (!process.stdout.isTTY) {
88
+ return;
89
+ }
90
+ const gitignorePath = path_1.default.join(gitignoreFolder, '.gitignore');
91
+ const gitIgnoreContents = (0, fs_1.readFileSync)(gitignorePath, 'utf-8');
92
+ const relativePathToGitIgnore = path_1.default.relative(gitignoreFolder, outputPath);
93
+ const isInGitIgnore = gitIgnoreContents
94
+ .split('\n')
95
+ .includes(relativePathToGitIgnore);
96
+ if (isInGitIgnore) {
97
+ return;
98
+ }
99
+ const answer = await (0, yes_or_no_1.yesOrNo)({
100
+ defaultValue: true,
101
+ question: `Recommended: Add ${chalk_1.chalk.bold(relativePathToGitIgnore)} to your ${chalk_1.chalk.bold('.gitignore')} file? (Y/n)`,
102
+ });
103
+ if (!answer) {
104
+ return;
105
+ }
106
+ const newGitIgnoreContents = gitIgnoreContents + '\n' + relativePathToGitIgnore;
107
+ (0, fs_1.writeFileSync)(gitignorePath, newGitIgnoreContents);
108
+ log_1.Log.infoAdvanced({ indent: false, logLevel }, chalk_1.chalk.blue(`Added to .gitignore!`));
109
+ };
110
+ exports.bundleCommand = bundleCommand;
@@ -8,6 +8,7 @@ const preview_server_1 = require("./config/preview-server");
8
8
  const entry_point_1 = require("./entry-point");
9
9
  const get_cli_options_1 = require("./get-cli-options");
10
10
  const log_1 = require("./log");
11
+ const parse_command_line_1 = require("./parse-command-line");
11
12
  const print_compositions_1 = require("./print-compositions");
12
13
  const setup_cache_1 = require("./setup-cache");
13
14
  const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
@@ -38,6 +39,8 @@ const listCompositionsCommand = async (remotionRoot, args, logLevel) => {
38
39
  (0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
39
40
  },
40
41
  quietProgress: false,
42
+ quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
43
+ outDir: null,
41
44
  });
42
45
  (0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
43
46
  const compositions = await renderer_1.RenderInternals.internalGetCompositions({
@@ -273,6 +273,10 @@ declare global {
273
273
  * Whether the Remotion Studio should play a beep sound when a render has finished.
274
274
  */
275
275
  readonly setBeepOnFinish: (beepOnFinish: boolean) => void;
276
+ /**
277
+ * Collect information that you can submit to Remotion if asked for a reproduction.
278
+ */
279
+ readonly setRepro: (enableRepro: boolean) => void;
276
280
  }
277
281
  }
278
282
  type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
@@ -346,6 +350,7 @@ export declare const ConfigInternals: {
346
350
  getWebpackCaching: () => boolean;
347
351
  getOutputLocation: () => string | null;
348
352
  getBeepOnFinish: () => boolean;
353
+ getRepro: () => boolean;
349
354
  Logging: typeof Logging;
350
355
  setFrameRangeFromCli: (newFrameRange: string | number) => void;
351
356
  setStillFrame: (frame: number) => void;
@@ -81,6 +81,7 @@ const pixel_format_2 = require("./pixel-format");
81
81
  const preview_server_2 = require("./preview-server");
82
82
  const prores_profile_2 = require("./prores-profile");
83
83
  const public_dir_1 = require("./public-dir");
84
+ const repro_1 = require("./repro");
84
85
  const scale_2 = require("./scale");
85
86
  const timeout_2 = require("./timeout");
86
87
  const user_agent_1 = require("./user-agent");
@@ -167,6 +168,7 @@ exports.Config = {
167
168
  setColorSpace: color_space_1.setColorSpace,
168
169
  setBeepOnFinish: beep_on_finish_1.setBeepOnFinish,
169
170
  setEnableFolderExpiry: enable_folder_expiry_1.setEnableFolderExpiry,
171
+ setRepro: repro_1.setRepro,
170
172
  };
171
173
  exports.ConfigInternals = {
172
174
  getRange: frame_range_1.getRange,
@@ -199,6 +201,7 @@ exports.ConfigInternals = {
199
201
  getWebpackCaching: webpack_caching_1.getWebpackCaching,
200
202
  getOutputLocation: output_location_1.getOutputLocation,
201
203
  getBeepOnFinish: beep_on_finish_1.getBeepOnFinish,
204
+ getRepro: repro_1.getRepro,
202
205
  Logging,
203
206
  setFrameRangeFromCli: frame_range_1.setFrameRangeFromCli,
204
207
  setStillFrame: still_frame_1.setStillFrame,
@@ -0,0 +1,2 @@
1
+ export declare const setRepro: (should: boolean) => void;
2
+ export declare const getRepro: () => boolean;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRepro = exports.setRepro = void 0;
4
+ let enableRepro = false;
5
+ const setRepro = (should) => {
6
+ enableRepro = should;
7
+ };
8
+ exports.setRepro = setRepro;
9
+ const getRepro = () => enableRepro;
10
+ exports.getRepro = getRepro;
@@ -1,6 +1,8 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
+ type FoundReason = 'argument passed - found in cwd' | 'argument passed - found in root' | 'argument passed' | 'config file' | 'common paths' | 'none found';
2
3
  export declare const findEntryPoint: (args: string[], remotionRoot: string, logLevel: LogLevel) => {
3
4
  file: string | null;
4
5
  remainingArgs: string[];
5
- reason: string;
6
+ reason: FoundReason;
6
7
  };
8
+ export {};
@@ -40,4 +40,5 @@ export declare const getCliOptions: (options: {
40
40
  offthreadVideoCacheSizeInBytes: number | null;
41
41
  deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
42
42
  colorSpace: "default" | "bt709" | "bt2020-ncl";
43
+ repro: boolean;
43
44
  }>;
@@ -141,6 +141,7 @@ const getCliOptions = async (options) => {
141
141
  offthreadVideoCacheSizeInBytes: config_1.ConfigInternals.getOffthreadVideoCacheSizeInBytes(),
142
142
  deleteAfter: config_1.ConfigInternals.getDeleteAfter(),
143
143
  colorSpace: config_1.ConfigInternals.getColorSpace(),
144
+ repro: config_1.ConfigInternals.getRepro(),
144
145
  };
145
146
  };
146
147
  exports.getCliOptions = getCliOptions;
@@ -36,6 +36,7 @@ const getRenderDefaults = () => {
36
36
  const maxConcurrency = renderer_1.RenderInternals.getMaxConcurrency();
37
37
  const minConcurrency = renderer_1.RenderInternals.getMinConcurrency();
38
38
  const multiProcessOnLinux = config_1.ConfigInternals.getChromiumMultiProcessOnLinux();
39
+ const repro = config_1.ConfigInternals.getRepro();
39
40
  return {
40
41
  jpegQuality: defaultJpegQuality !== null && defaultJpegQuality !== void 0 ? defaultJpegQuality : renderer_1.RenderInternals.DEFAULT_JPEG_QUALITY,
41
42
  scale: defaultScale !== null && defaultScale !== void 0 ? defaultScale : 1,
@@ -68,6 +69,7 @@ const getRenderDefaults = () => {
68
69
  multiProcessOnLinux,
69
70
  userAgent,
70
71
  beepOnFinish,
72
+ repro,
71
73
  };
72
74
  };
73
75
  exports.getRenderDefaults = getRenderDefaults;
package/dist/index.d.ts CHANGED
@@ -110,6 +110,7 @@ export declare const CliInternals: {
110
110
  offthreadVideoCacheSizeInBytes: number | null;
111
111
  deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
112
112
  colorSpace: "default" | "bt709" | "bt2020-ncl";
113
+ repro: boolean;
113
114
  }>;
114
115
  loadConfig: (remotionRoot: string) => Promise<string | null>;
115
116
  initializeCli: (remotionRoot: string) => Promise<"verbose" | "info" | "warn" | "error">;
@@ -168,6 +169,8 @@ export declare const CliInternals: {
168
169
  browser: string;
169
170
  "browser-args": string;
170
171
  "user-agent": string;
172
+ "out-dir": string;
173
+ repro: boolean;
171
174
  "number-of-gif-loops": number;
172
175
  "offthreadvideo-cache-size-in-bytes": number | null;
173
176
  "color-space": "default" | "bt709" | "bt2020-ncl";
@@ -203,7 +206,7 @@ export declare const CliInternals: {
203
206
  findEntryPoint: (args: string[], remotionRoot: string, logLevel: "verbose" | "info" | "warn" | "error") => {
204
207
  file: string | null;
205
208
  remainingArgs: string[];
206
- reason: string;
209
+ reason: "argument passed - found in cwd" | "argument passed - found in root" | "argument passed" | "config file" | "common paths" | "none found";
207
210
  };
208
211
  getVideoImageFormat: ({ codec, uiImageFormat, }: {
209
212
  codec: import("@remotion/renderer").CodecOrUndefined;
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ const renderer_1 = require("@remotion/renderer");
8
8
  const studio_1 = require("@remotion/studio");
9
9
  const minimist_1 = __importDefault(require("minimist"));
10
10
  const benchmark_1 = require("./benchmark");
11
+ const bundle_1 = require("./bundle");
11
12
  const chalk_1 = require("./chalk");
12
13
  const cleanup_before_quit_1 = require("./cleanup-before-quit");
13
14
  const cloudrun_command_1 = require("./cloudrun-command");
@@ -69,7 +70,10 @@ const cli = async () => {
69
70
  const logLevel = await (0, initialize_cli_1.initializeCli)(remotionRoot);
70
71
  (0, cleanup_before_quit_1.handleCtrlC)({ indent: false, logLevel });
71
72
  try {
72
- if (command === 'compositions') {
73
+ if (command === 'bundle') {
74
+ await (0, bundle_1.bundleCommand)(remotionRoot, args, logLevel);
75
+ }
76
+ else if (command === 'compositions') {
73
77
  await (0, compositions_1.listCompositionsCommand)(remotionRoot, args, logLevel);
74
78
  }
75
79
  else if (isStudio) {
@@ -122,9 +122,11 @@ type CommandLineOptions = {
122
122
  ['browser']: string;
123
123
  ['browser-args']: string;
124
124
  ['user-agent']: string;
125
+ ['out-dir']: string;
125
126
  [deleteAfterOption.cliFlag]: string | undefined;
126
127
  [folderExpiryOption.cliFlag]: boolean | undefined;
127
128
  [enableMultiprocessOnLinuxOption.cliFlag]: boolean;
129
+ repro: boolean;
128
130
  };
129
131
  export declare const BooleanFlags: string[];
130
132
  export declare const parsedCli: CommandLineOptions & {
@@ -34,11 +34,15 @@ exports.BooleanFlags = [
34
34
  'default-only',
35
35
  'no-open',
36
36
  beepOnFinishOption.cliFlag,
37
+ 'repro',
37
38
  ];
38
39
  exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
39
40
  boolean: exports.BooleanFlags,
40
41
  });
41
42
  const parseCommandLine = () => {
43
+ if (exports.parsedCli.repro) {
44
+ config_1.Config.setRepro(true);
45
+ }
42
46
  if (exports.parsedCli['pixel-format']) {
43
47
  config_1.Config.setPixelFormat(exports.parsedCli['pixel-format']);
44
48
  }
@@ -8,10 +8,10 @@ const versions_1 = require("./versions");
8
8
  const packagejson = require('../package.json');
9
9
  const printHelp = () => {
10
10
  log_1.Log.info(`@remotion/cli ${packagejson.version}`);
11
- log_1.Log.info(`© ${new Date().getFullYear()} The Remotion AG`);
11
+ log_1.Log.info(`© ${new Date().getFullYear()} Remotion AG`);
12
12
  log_1.Log.info();
13
13
  log_1.Log.info('Available commands:');
14
- log_1.Log.info('');
14
+ log_1.Log.info();
15
15
  log_1.Log.info(chalk_1.chalk.blue('remotion studio') + chalk_1.chalk.gray(' <entry-point.ts>'));
16
16
  log_1.Log.info('Start the Remotion studio.');
17
17
  log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/studio'));
@@ -26,6 +26,10 @@ const printHelp = () => {
26
26
  log_1.Log.info('Render a still frame and save it as an image.');
27
27
  log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/still'));
28
28
  log_1.Log.info();
29
+ log_1.Log.info(chalk_1.chalk.blue('remotion bundle') + chalk_1.chalk.gray(' <entry-point.ts>'));
30
+ log_1.Log.info('Create a Remotion bundle to be deployed to the web.');
31
+ log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/bundle'));
32
+ log_1.Log.info();
29
33
  log_1.Log.info(chalk_1.chalk.blue('remotion compositions') + chalk_1.chalk.gray(' <index-file.ts>'));
30
34
  log_1.Log.info('Prints the available compositions.');
31
35
  log_1.Log.info(chalk_1.chalk.gray('https://www.remotion.dev/docs/cli/compositions'));
@@ -1,7 +1,7 @@
1
1
  import type { AudioCodec, Browser, BrowserExecutable, CancelSignal, ChromiumOptions, Codec, ColorSpace, Crf, FfmpegOverrideFn, FrameRange, LogLevel, PixelFormat, ProResProfile, VideoImageFormat, X264Preset } from '@remotion/renderer';
2
2
  import type { JobProgressCallback } from '@remotion/studio';
3
3
  import type { Loop } from '../config/number-of-gif-loops';
4
- export declare const renderVideoFlow: ({ 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, }: {
4
+ export declare const renderVideoFlow: ({ 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, }: {
5
5
  remotionRoot: string;
6
6
  fullEntryPoint: string;
7
7
  entryPointReason: string;
@@ -49,4 +49,5 @@ export declare const renderVideoFlow: ({ remotionRoot, fullEntryPoint, indent, l
49
49
  disallowParallelEncoding: boolean;
50
50
  offthreadVideoCacheSizeInBytes: number | null;
51
51
  colorSpace: ColorSpace;
52
+ repro: boolean;
52
53
  }) => Promise<void>;
@@ -47,7 +47,7 @@ const setup_cache_1 = require("../setup-cache");
47
47
  const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
48
48
  const truthy_1 = require("../truthy");
49
49
  const user_passed_output_location_1 = require("../user-passed-output-location");
50
- 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, }) => {
50
+ 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, }) => {
51
51
  var _a;
52
52
  const downloads = [];
53
53
  const browserInstance = renderer_1.RenderInternals.internalOpenBrowser({
@@ -118,6 +118,8 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
118
118
  addCleanupCallback(() => renderer_1.RenderInternals.deleteDirectory(dir));
119
119
  },
120
120
  quietProgress: updatesDontOverwrite,
121
+ quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
122
+ outDir: null,
121
123
  });
122
124
  addCleanupCallback(() => cleanupBundle());
123
125
  const onDownload = (0, make_on_download_1.makeOnDownload)({
@@ -327,8 +329,11 @@ const renderVideoFlow = async ({ remotionRoot, fullEntryPoint, indent, logLevel,
327
329
  }).serializedString,
328
330
  offthreadVideoCacheSizeInBytes,
329
331
  colorSpace,
332
+ repro: repro !== null && repro !== void 0 ? repro : false,
333
+ finishRenderProgress: () => {
334
+ updateRenderProgress({ newline: true, printToConsole: true });
335
+ },
330
336
  });
331
- updateRenderProgress({ newline: true, printToConsole: true });
332
337
  log_1.Log.infoAdvanced({ indent, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputFile}`));
333
338
  log_1.Log.verbose({ indent, logLevel }, `Slowest frames:`);
334
339
  slowestFrames.forEach(({ frame, time }) => {
@@ -82,6 +82,8 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
82
82
  });
83
83
  },
84
84
  quietProgress: updatesDontOverwrite,
85
+ quietFlag: (0, parse_command_line_1.quietFlagProvided)(),
86
+ outDir: null,
85
87
  });
86
88
  const server = await renderer_1.RenderInternals.prepareServer({
87
89
  concurrency: 1,
@@ -65,6 +65,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
65
65
  disallowParallelEncoding: job.type === 'video' ? job.disallowParallelEncoding : false,
66
66
  offthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
67
67
  colorSpace: job.type === 'video' ? job.colorSpace : 'default',
68
+ repro: job.repro,
68
69
  });
69
70
  };
70
71
  exports.processVideoJob = processVideoJob;
package/dist/render.js CHANGED
@@ -25,7 +25,7 @@ const render = async (remotionRoot, args, logLevel) => {
25
25
  log_1.Log.error('--frame flag was passed to the `render` command. This flag only works with the `still` command. Did you mean `--frames`? See reference: https://www.remotion.dev/docs/cli/');
26
26
  process.exit(1);
27
27
  }
28
- const { concurrency, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, jpegQuality, browser, browserExecutable, scale, chromiumOptions, everyNthFrame, puppeteerTimeout, publicDir, height, width, crf, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, offthreadVideoCacheSizeInBytes, colorSpace, } = await (0, get_cli_options_1.getCliOptions)({
28
+ const { concurrency, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, jpegQuality, browser, browserExecutable, scale, chromiumOptions, everyNthFrame, puppeteerTimeout, publicDir, height, width, crf, ffmpegOverride, audioBitrate, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, videoBitrate, encodingMaxRate, encodingBufferSize, numberOfGifLoops, offthreadVideoCacheSizeInBytes, colorSpace, repro, } = await (0, get_cli_options_1.getCliOptions)({
29
29
  isLambda: false,
30
30
  type: 'series',
31
31
  remotionRoot,
@@ -86,6 +86,7 @@ const render = async (remotionRoot, args, logLevel) => {
86
86
  disallowParallelEncoding: false,
87
87
  offthreadVideoCacheSizeInBytes,
88
88
  colorSpace,
89
+ repro,
89
90
  });
90
91
  };
91
92
  exports.render = render;
@@ -1,6 +1,6 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
2
  import type { BundlingState, CopyingState } from '@remotion/studio';
3
- export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }: {
3
+ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }: {
4
4
  fullPath: string;
5
5
  remotionRoot: string;
6
6
  publicDir: string | null;
@@ -14,7 +14,26 @@ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publi
14
14
  steps: number;
15
15
  onDirectoryCreated: (path: string) => void;
16
16
  quietProgress: boolean;
17
+ quietFlag: boolean;
18
+ outDir: string | null;
17
19
  }) => Promise<{
18
20
  urlOrBundle: string;
19
21
  cleanup: () => void;
20
22
  }>;
23
+ export declare const bundleOnCli: ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }: {
24
+ fullPath: string;
25
+ remotionRoot: string;
26
+ publicDir: string | null;
27
+ onProgressCallback: (params: {
28
+ bundling: BundlingState;
29
+ copying: CopyingState;
30
+ }) => void;
31
+ indent: boolean;
32
+ logLevel: LogLevel;
33
+ bundlingStep: number;
34
+ steps: number;
35
+ onDirectoryCreated: (path: string) => void;
36
+ quietProgress: boolean;
37
+ quietFlag: boolean;
38
+ outDir: string | null;
39
+ }) => Promise<string>;
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bundleOnCliOrTakeServeUrl = void 0;
3
+ exports.bundleOnCli = exports.bundleOnCliOrTakeServeUrl = void 0;
4
4
  const bundler_1 = require("@remotion/bundler");
5
5
  const renderer_1 = require("@remotion/renderer");
6
6
  const config_1 = require("./config");
7
7
  const log_1 = require("./log");
8
- const parse_command_line_1 = require("./parse-command-line");
9
8
  const progress_bar_1 = require("./progress-bar");
10
9
  const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
11
- const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
10
+ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }) => {
12
11
  if (renderer_1.RenderInternals.isServeUrl(fullPath)) {
13
12
  onProgress({
14
13
  bundling: {
@@ -25,7 +24,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
25
24
  cleanup: () => Promise.resolve(undefined),
26
25
  };
27
26
  }
28
- const bundled = await bundleOnCli({
27
+ const bundled = await (0, exports.bundleOnCli)({
29
28
  fullPath,
30
29
  remotionRoot,
31
30
  publicDir,
@@ -36,6 +35,8 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
36
35
  steps,
37
36
  onDirectoryCreated,
38
37
  quietProgress,
38
+ quietFlag,
39
+ outDir,
39
40
  });
40
41
  return {
41
42
  urlOrBundle: bundled,
@@ -43,7 +44,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
43
44
  };
44
45
  };
45
46
  exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
46
- const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
47
+ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, quietFlag, outDir, }) => {
47
48
  var _a;
48
49
  const shouldCache = config_1.ConfigInternals.getWebpackCaching();
49
50
  const symlinkState = {
@@ -112,7 +113,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
112
113
  }
113
114
  const bundleStartTime = Date.now();
114
115
  const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
115
- quiet: quietProgress || (0, parse_command_line_1.quietFlagProvided)(),
116
+ quiet: quietProgress || quietFlag,
116
117
  cancelSignal: null,
117
118
  updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
118
119
  indent,
@@ -131,6 +132,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
131
132
  updateProgress(false);
132
133
  },
133
134
  onDirectoryCreated,
135
+ outDir: outDir !== null && outDir !== void 0 ? outDir : undefined,
134
136
  ...options,
135
137
  });
136
138
  bundlingState = {
@@ -154,3 +156,4 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
154
156
  }
155
157
  return bundled;
156
158
  };
159
+ exports.bundleOnCli = bundleOnCli;
@@ -0,0 +1,4 @@
1
+ export declare const yesOrNo: ({ question, defaultValue, }: {
2
+ question: string;
3
+ defaultValue: boolean;
4
+ }) => Promise<boolean>;
@@ -0,0 +1,44 @@
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.yesOrNo = void 0;
7
+ const readline_1 = __importDefault(require("readline"));
8
+ const options = {
9
+ yes: ['yes', 'y'],
10
+ no: ['no', 'n'],
11
+ };
12
+ function defaultInvalidHandler({ yesValues, noValues, }) {
13
+ process.stdout.write('\nInvalid Response.\n');
14
+ process.stdout.write('Answer either yes : (' + yesValues.join(', ') + ') \n');
15
+ process.stdout.write('Or no: (' + noValues.join(', ') + ') \n\n');
16
+ }
17
+ const yesOrNo = ({ question, defaultValue, }) => {
18
+ const invalid = defaultInvalidHandler;
19
+ const yesValues = options.yes.map((v) => v.toLowerCase());
20
+ const noValues = options.no.map((v) => v.toLowerCase());
21
+ const rl = readline_1.default.createInterface({
22
+ input: process.stdin,
23
+ output: process.stdout,
24
+ });
25
+ return new Promise((resolve) => {
26
+ rl.question(question + ' ', async (answer) => {
27
+ rl.close();
28
+ const cleaned = answer.trim().toLowerCase();
29
+ if (cleaned === '' && defaultValue !== null)
30
+ return resolve(defaultValue);
31
+ if (yesValues.indexOf(cleaned) >= 0)
32
+ return resolve(true);
33
+ if (noValues.indexOf(cleaned) >= 0)
34
+ return resolve(false);
35
+ invalid({ question, yesValues, noValues });
36
+ const result = await (0, exports.yesOrNo)({
37
+ question,
38
+ defaultValue,
39
+ });
40
+ resolve(result);
41
+ });
42
+ });
43
+ };
44
+ exports.yesOrNo = yesOrNo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.87",
3
+ "version": "4.0.89",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -31,12 +31,12 @@
31
31
  "dotenv": "9.0.2",
32
32
  "minimist": "1.2.6",
33
33
  "prompts": "2.4.2",
34
- "@remotion/player": "4.0.87",
35
- "@remotion/bundler": "4.0.87",
36
- "@remotion/studio": "4.0.87",
37
- "remotion": "4.0.87",
38
- "@remotion/renderer": "4.0.87",
39
- "@remotion/media-utils": "4.0.87"
34
+ "@remotion/player": "4.0.89",
35
+ "@remotion/media-utils": "4.0.89",
36
+ "@remotion/bundler": "4.0.89",
37
+ "@remotion/renderer": "4.0.89",
38
+ "remotion": "4.0.89",
39
+ "@remotion/studio": "4.0.89"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=16.8.0",
@@ -61,8 +61,8 @@
61
61
  "react-dom": "18.2.0",
62
62
  "vitest": "0.31.1",
63
63
  "zod": "^3.22.3",
64
- "@remotion/tailwind": "4.0.87",
65
- "@remotion/zod-types": "4.0.87"
64
+ "@remotion/zod-types": "4.0.89",
65
+ "@remotion/tailwind": "4.0.89"
66
66
  },
67
67
  "keywords": [
68
68
  "remotion",