@remotion/cli 3.2.25 → 3.2.26-crf.18

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.
Files changed (53) hide show
  1. package/dist/benchmark.d.ts +1 -0
  2. package/dist/benchmark.js +180 -0
  3. package/dist/bundle.d.ts +1 -0
  4. package/dist/bundle.js +32 -0
  5. package/dist/compositions.js +2 -1
  6. package/dist/config/bundle-out-dir.d.ts +2 -0
  7. package/dist/config/bundle-out-dir.js +12 -0
  8. package/dist/config/get-public-path.d.ts +2 -0
  9. package/dist/config/get-public-path.js +12 -0
  10. package/dist/config/image-format.js +8 -1
  11. package/dist/config/log.d.ts +1 -1
  12. package/dist/determine-image-format.d.ts +11 -0
  13. package/dist/determine-image-format.js +48 -0
  14. package/dist/editor/components/Button.d.ts +4 -0
  15. package/dist/editor/components/Button.js +24 -0
  16. package/dist/editor/components/PreviewZoomControls.d.ts +2 -0
  17. package/dist/editor/components/PreviewZoomControls.js +49 -0
  18. package/dist/editor/helpers/normalize-wheel.d.ts +5 -0
  19. package/dist/editor/helpers/normalize-wheel.js +20 -0
  20. package/dist/event-source-events.d.ts +3 -0
  21. package/dist/event-source.js +1 -1
  22. package/dist/get-cli-options.d.ts +11 -3
  23. package/dist/get-cli-options.js +22 -28
  24. package/dist/get-env.d.ts +1 -1
  25. package/dist/get-env.js +58 -6
  26. package/dist/get-final-output-codec.d.ts +9 -5
  27. package/dist/get-final-output-codec.js +56 -56
  28. package/dist/get-render-media-options.d.ts +7 -0
  29. package/dist/get-render-media-options.js +44 -0
  30. package/dist/index.d.ts +21 -4
  31. package/dist/index.js +13 -3
  32. package/dist/initialize-cli.d.ts +1 -0
  33. package/dist/initialize-cli.js +22 -0
  34. package/dist/lambda-command.js +0 -2
  35. package/dist/parse-command-line.d.ts +1 -1
  36. package/dist/parse-command-line.js +1 -12
  37. package/dist/prepare-entry-point.d.ts +12 -0
  38. package/dist/prepare-entry-point.js +37 -0
  39. package/dist/preview-server/routes.d.ts +2 -1
  40. package/dist/preview-server/routes.js +4 -2
  41. package/dist/preview-server/start-server.d.ts +1 -1
  42. package/dist/preview-server/start-server.js +2 -1
  43. package/dist/preview.js +10 -4
  44. package/dist/print-help.js +6 -3
  45. package/dist/progress-bar.js +3 -1
  46. package/dist/render.js +22 -32
  47. package/dist/still.js +15 -25
  48. package/dist/validate-image-format.d.ts +2 -0
  49. package/dist/validate-image-format.js +15 -0
  50. package/dist/versions.js +1 -1
  51. package/dist/webpack-cache.d.ts +12 -0
  52. package/dist/webpack-cache.js +66 -0
  53. package/package.json +7 -7
package/dist/preview.js CHANGED
@@ -9,7 +9,6 @@ const path_1 = __importDefault(require("path"));
9
9
  const config_1 = require("./config");
10
10
  const get_env_1 = require("./get-env");
11
11
  const get_input_props_1 = require("./get-input-props");
12
- const initialize_render_cli_1 = require("./initialize-render-cli");
13
12
  const log_1 = require("./log");
14
13
  const parse_command_line_1 = require("./parse-command-line");
15
14
  const start_server_1 = require("./preview-server/start-server");
@@ -40,7 +39,6 @@ const previewCommand = async (remotionRoot) => {
40
39
  }
41
40
  const { port: desiredPort } = parse_command_line_1.parsedCli;
42
41
  const fullPath = path_1.default.join(process.cwd(), file);
43
- await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'preview');
44
42
  let inputProps = (0, get_input_props_1.getInputProps)((newProps) => {
45
43
  waitForLiveEventsListener().then((listener) => {
46
44
  inputProps = newProps;
@@ -50,10 +48,18 @@ const previewCommand = async (remotionRoot) => {
50
48
  });
51
49
  });
52
50
  });
53
- const envVariables = await (0, get_env_1.getEnvironmentVariables)();
51
+ let envVariables = await (0, get_env_1.getEnvironmentVariables)((newEnvVariables) => {
52
+ waitForLiveEventsListener().then((listener) => {
53
+ envVariables = newEnvVariables;
54
+ listener.sendEventToClient({
55
+ type: 'new-env-variables',
56
+ newEnvVariables,
57
+ });
58
+ });
59
+ });
54
60
  const { port, liveEventsServer } = await (0, start_server_1.startServer)(path_1.default.resolve(__dirname, 'previewEntry.js'), fullPath, {
55
61
  getCurrentInputProps: () => inputProps,
56
- envVariables,
62
+ getEnvVariables: () => envVariables,
57
63
  port: desiredPort,
58
64
  maxTimelineTracks: config_1.ConfigInternals.getMaxTimelineTracks(),
59
65
  remotionRoot,
@@ -11,7 +11,7 @@ const printFlags = (flags) => {
11
11
  });
12
12
  };
13
13
  const printHelp = () => {
14
- log_1.Log.info(`@remotion/cli ${packagejson.version} © ${new Date().getFullYear()} Jonny Burger`);
14
+ log_1.Log.info(`@remotion/cli ${packagejson.version} © ${new Date().getFullYear()} The Remotion developers`);
15
15
  log_1.Log.info();
16
16
  log_1.Log.info('Available commands:');
17
17
  log_1.Log.info('');
@@ -19,7 +19,7 @@ const printHelp = () => {
19
19
  log_1.Log.info(chalk_1.chalk.gray('Start the preview server.'));
20
20
  printFlags([['--props', 'Pass input props as filename or as JSON']]);
21
21
  log_1.Log.info();
22
- log_1.Log.info('remotion render <entry-point.ts> <comp-name> <output-file.mp4>');
22
+ log_1.Log.info('remotion render <entry-point.ts> <comp-id> <output-file.mp4>');
23
23
  log_1.Log.info(chalk_1.chalk.gray('Render video, audio or an image sequence.'));
24
24
  printFlags([
25
25
  ['--props', 'Pass input props as filename or as JSON'],
@@ -40,7 +40,7 @@ const printHelp = () => {
40
40
  ['--env-file', 'Specify a location for a dotenv file'],
41
41
  ]);
42
42
  log_1.Log.info();
43
- log_1.Log.info('remotion still <entry-point.ts> <comp-name> <still.png>');
43
+ log_1.Log.info('remotion still <entry-point.ts> <comp-id> <still.png>');
44
44
  log_1.Log.info(chalk_1.chalk.gray('Render a still frame and save it as an image.'));
45
45
  printFlags([
46
46
  ['--frame', 'Which frame to render (default 0)'],
@@ -59,6 +59,9 @@ const printHelp = () => {
59
59
  log_1.Log.info('remotion compositions <index-file.ts>');
60
60
  log_1.Log.info(chalk_1.chalk.gray('Prints the available compositions.'));
61
61
  log_1.Log.info();
62
+ log_1.Log.info('remotion benchmark <index-file.ts> <list-of-compositions>');
63
+ log_1.Log.info(chalk_1.chalk.gray('Benchmarks rendering a composition. Same options as for render.'));
64
+ log_1.Log.info();
62
65
  log_1.Log.info('remotion ' + versions_1.VERSIONS_COMMAND);
63
66
  log_1.Log.info(chalk_1.chalk.gray('Prints and validates versions of all Remotion packages.'));
64
67
  log_1.Log.info();
@@ -34,7 +34,9 @@ const makeBundlingProgress = ({ progress, steps, doneIn, }) => [
34
34
  doneIn === null
35
35
  ? (progress * 100).toFixed(0) + '%'
36
36
  : chalk_1.chalk.gray(`${doneIn}ms`),
37
- ].join(' ');
37
+ ]
38
+ .filter(truthy_1.truthy)
39
+ .join(' ');
38
40
  exports.makeBundlingProgress = makeBundlingProgress;
39
41
  const makeRenderingProgress = ({ frames, totalFrames, steps, concurrency, doneIn, }) => {
40
42
  const progress = frames / totalFrames;
package/dist/render.js CHANGED
@@ -15,11 +15,12 @@ const config_1 = require("./config");
15
15
  const get_cli_options_1 = require("./get-cli-options");
16
16
  const get_composition_id_1 = require("./get-composition-id");
17
17
  const get_filename_1 = require("./get-filename");
18
- const initialize_render_cli_1 = require("./initialize-render-cli");
18
+ const get_render_media_options_1 = require("./get-render-media-options");
19
19
  const log_1 = require("./log");
20
20
  const parse_command_line_1 = require("./parse-command-line");
21
21
  const progress_bar_1 = require("./progress-bar");
22
22
  const setup_cache_1 = require("./setup-cache");
23
+ const user_passed_output_location_1 = require("./user-passed-output-location");
23
24
  const validate_ffmpeg_version_1 = require("./validate-ffmpeg-version");
24
25
  const render = async (remotionRoot) => {
25
26
  const startTime = Date.now();
@@ -34,11 +35,20 @@ const render = async (remotionRoot) => {
34
35
  ? file
35
36
  : path_1.default.join(process.cwd(), file);
36
37
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
37
- await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'sequence');
38
+ if (parse_command_line_1.parsedCli.frame) {
39
+ 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/');
40
+ process.exit(1);
41
+ }
38
42
  log_1.Log.verbose('Asset dirs', downloadMap.assetDir);
39
- const { codec, proResProfile, concurrency, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, quality, browser, crf, pixelFormat, imageFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, numberOfGifLoops, everyNthFrame, puppeteerTimeout, muted, enforceAudioTrack, publicDir, ffmpegOverride, } = await (0, get_cli_options_1.getCliOptions)({
43
+ const { codec, reason: codecReason } = (0, get_cli_options_1.getFinalCodec)({
44
+ downloadName: null,
45
+ outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(),
46
+ });
47
+ (0, get_cli_options_1.validateFfmpegCanUseCodec)(codec);
48
+ const { concurrency, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, quality, browser, imageFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, everyNthFrame, puppeteerTimeout, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
40
49
  isLambda: false,
41
50
  type: 'series',
51
+ codec,
42
52
  });
43
53
  const relativeOutputLocation = (0, get_filename_1.getOutputFilename)({
44
54
  codec,
@@ -48,7 +58,7 @@ const render = async (remotionRoot) => {
48
58
  });
49
59
  const absoluteOutputFile = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite);
50
60
  const compositionId = (0, get_composition_id_1.getCompositionId)();
51
- log_1.Log.info(chalk_1.chalk.gray(`Composition = ${compositionId}, Codec = ${codec}, Output = ${relativeOutputLocation}`));
61
+ log_1.Log.info(chalk_1.chalk.gray(`Composition = ${compositionId}, Codec = ${codec} (${codecReason}), Output = ${relativeOutputLocation}`));
52
62
  log_1.Log.verbose('Browser executable: ', browserExecutable);
53
63
  await (0, validate_ffmpeg_version_1.checkAndValidateFfmpegVersion)({
54
64
  ffmpegExecutable,
@@ -93,10 +103,11 @@ const render = async (remotionRoot) => {
93
103
  inputProps,
94
104
  puppeteerInstance,
95
105
  envVariables,
96
- timeoutInMilliseconds: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
106
+ timeoutInMilliseconds: puppeteerTimeout,
97
107
  chromiumOptions,
98
108
  browserExecutable,
99
109
  downloadMap,
110
+ port,
100
111
  });
101
112
  const config = comps.find((c) => c.id === compositionId);
102
113
  if (!config) {
@@ -197,17 +208,14 @@ const render = async (remotionRoot) => {
197
208
  log_1.Log.info(chalk_1.chalk.green('\nYour image sequence is ready!'));
198
209
  return;
199
210
  }
200
- await (0, renderer_1.renderMedia)({
211
+ const options = await (0, get_render_media_options_1.getRenderMediaOptions)({
212
+ config,
201
213
  outputLocation: absoluteOutputFile,
214
+ serveUrl: urlOrBundle,
202
215
  codec,
203
- composition: config,
204
- crf,
205
- envVariables,
206
- ffmpegExecutable,
207
- ffprobeExecutable,
208
- frameRange,
209
- imageFormat,
210
- inputProps,
216
+ });
217
+ await (0, renderer_1.renderMedia)({
218
+ ...options,
211
219
  onProgress: (update) => {
212
220
  encodedDoneIn = update.encodedDoneIn;
213
221
  encodedFrames = update.encodedFrames;
@@ -217,26 +225,8 @@ const render = async (remotionRoot) => {
217
225
  updateRenderProgress();
218
226
  },
219
227
  puppeteerInstance,
220
- overwrite,
221
- concurrency,
222
- pixelFormat,
223
- proResProfile,
224
- quality,
225
- serveUrl: urlOrBundle,
226
228
  onDownload,
227
- dumpBrowserLogs: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
228
- chromiumOptions,
229
- timeoutInMilliseconds: config_1.ConfigInternals.getCurrentPuppeteerTimeout(),
230
- scale,
231
- port,
232
- numberOfGifLoops,
233
- everyNthFrame,
234
- verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
235
229
  downloadMap,
236
- muted,
237
- enforceAudioTrack,
238
- browserExecutable,
239
- ffmpegOverride,
240
230
  });
241
231
  log_1.Log.info();
242
232
  log_1.Log.info();
package/dist/still.js CHANGED
@@ -9,9 +9,9 @@ const fs_1 = require("fs");
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const chalk_1 = require("./chalk");
11
11
  const config_1 = require("./config");
12
+ const determine_image_format_1 = require("./determine-image-format");
12
13
  const get_cli_options_1 = require("./get-cli-options");
13
14
  const get_composition_id_1 = require("./get-composition-id");
14
- const initialize_render_cli_1 = require("./initialize-render-cli");
15
15
  const log_1 = require("./log");
16
16
  const parse_command_line_1 = require("./parse-command-line");
17
17
  const progress_bar_1 = require("./progress-bar");
@@ -19,46 +19,36 @@ const setup_cache_1 = require("./setup-cache");
19
19
  const truthy_1 = require("./truthy");
20
20
  const user_passed_output_location_1 = require("./user-passed-output-location");
21
21
  const still = async (remotionRoot) => {
22
+ var _a, _b;
22
23
  const startTime = Date.now();
23
24
  const file = parse_command_line_1.parsedCli._[1];
24
25
  const fullPath = renderer_1.RenderInternals.isServeUrl(file)
25
26
  ? file
26
27
  : path_1.default.join(process.cwd(), file);
27
- await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'still');
28
- const userPassedOutput = (0, user_passed_output_location_1.getUserPassedOutputLocation)();
29
- if ((userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.jpeg')) ||
30
- (userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.jpg'))) {
31
- log_1.Log.verbose('Output file has a JPEG extension, setting the image format to JPEG.');
32
- config_1.Config.Rendering.setImageFormat('jpeg');
33
- }
34
- if (userPassedOutput === null || userPassedOutput === void 0 ? void 0 : userPassedOutput.endsWith('.png')) {
35
- log_1.Log.verbose('Output file has a PNG extension, setting the image format to PNG.');
36
- config_1.Config.Rendering.setImageFormat('png');
28
+ if (parse_command_line_1.parsedCli.frames) {
29
+ log_1.Log.error('--frames flag was passed to the `still` command. This flag only works with the `render` command. Did you mean `--frame`? See reference: https://www.remotion.dev/docs/cli/');
30
+ process.exit(1);
37
31
  }
38
- const { inputProps, envVariables, quality, browser, imageFormat, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
32
+ const { inputProps, envVariables, quality, browser, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
39
33
  isLambda: false,
40
34
  type: 'still',
35
+ codec: 'h264',
41
36
  });
42
37
  log_1.Log.verbose('Browser executable: ', browserExecutable);
43
38
  const compositionId = (0, get_composition_id_1.getCompositionId)();
39
+ const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalImageFormat)({
40
+ cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
41
+ configImageFormat: (_b = config_1.ConfigInternals.getUserPreferredImageFormat()) !== null && _b !== void 0 ? _b : null,
42
+ downloadName: null,
43
+ outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(),
44
+ isLambda: false,
45
+ });
44
46
  const relativeOutputLocation = (0, user_passed_output_location_1.getOutputLocation)({
45
47
  compositionId,
46
48
  defaultExtension: imageFormat,
47
49
  });
48
50
  const absoluteOutputLocation = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite);
49
- log_1.Log.info(chalk_1.chalk.gray(`Output = ${relativeOutputLocation}, Format = ${imageFormat}, Composition = ${compositionId}`));
50
- if (imageFormat === 'none') {
51
- log_1.Log.error('No image format was selected - this is probably an error in Remotion - please post your command on Github Issues for help.');
52
- process.exit(1);
53
- }
54
- if (imageFormat === 'png' && !absoluteOutputLocation.endsWith('.png')) {
55
- log_1.Log.warn(`Rendering a PNG, expected a .png extension but got ${absoluteOutputLocation}`);
56
- }
57
- if (imageFormat === 'jpeg' &&
58
- !absoluteOutputLocation.endsWith('.jpg') &&
59
- !absoluteOutputLocation.endsWith('.jpeg')) {
60
- log_1.Log.warn(`Rendering a JPEG, expected a .jpg or .jpeg extension but got ${absoluteOutputLocation}`);
61
- }
51
+ log_1.Log.info(chalk_1.chalk.gray(`Output = ${relativeOutputLocation}, Format = ${imageFormat} (${source}), Composition = ${compositionId}`));
62
52
  const browserInstance = (0, renderer_1.openBrowser)(browser, {
63
53
  browserExecutable,
64
54
  chromiumOptions,
@@ -0,0 +1,2 @@
1
+ import type { ImageFormat } from '@remotion/renderer';
2
+ export declare const validateImageFormat: (imageFormat: ImageFormat, outName: string | null) => void;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateImageFormat = void 0;
4
+ const log_1 = require("./log");
5
+ const validateImageFormat = (imageFormat, outName) => {
6
+ if (imageFormat === 'png' && (outName === null || outName === void 0 ? void 0 : outName.endsWith('.png'))) {
7
+ log_1.Log.warn(`Rendering a PNG, expected a .png extension but got ${outName}`);
8
+ }
9
+ if (imageFormat === 'jpeg' &&
10
+ !(outName === null || outName === void 0 ? void 0 : outName.endsWith('.jpg')) &&
11
+ !(outName === null || outName === void 0 ? void 0 : outName.endsWith('.jpeg'))) {
12
+ log_1.Log.warn(`Rendering a JPEG, expected a .jpg or .jpeg extension but got ${outName}`);
13
+ }
14
+ };
15
+ exports.validateImageFormat = validateImageFormat;
package/dist/versions.js CHANGED
@@ -68,7 +68,7 @@ const validateVersionsBeforeCommand = async (remotionRoot) => {
68
68
  };
69
69
  exports.validateVersionsBeforeCommand = validateVersionsBeforeCommand;
70
70
  const versionsCommand = async (remotionRoot) => {
71
- (0, parse_command_line_1.parseCommandLine)('versions');
71
+ (0, parse_command_line_1.parseCommandLine)();
72
72
  const versions = await getAllVersions(remotionRoot);
73
73
  const grouped = groupBy(versions);
74
74
  const installedVersions = Object.keys(grouped);
@@ -0,0 +1,12 @@
1
+ declare type Environment = 'development' | 'production';
2
+ declare global {
3
+ namespace NodeJS {
4
+ interface ProcessVersions {
5
+ pnp?: string;
6
+ }
7
+ }
8
+ }
9
+ export declare const clearCache: (environment: Environment, inputProps: object | null) => Promise<void>;
10
+ export declare const getWebpackCacheName: (environment: Environment, inputProps: object | null) => string;
11
+ export declare const cacheExists: (environment: Environment, inputProps: object | null) => boolean;
12
+ export {};
@@ -0,0 +1,66 @@
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.cacheExists = exports.getWebpackCacheName = exports.clearCache = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const remotion_1 = require("remotion");
10
+ // Inlined from https://github.com/webpack/webpack/blob/4c2ee7a4ddb8db2362ca83b6c4190523387ba7ee/lib/config/defaults.js#L265
11
+ // An algorithm to determine where Webpack will cache the depencies
12
+ const getWebpackCacheDir = () => {
13
+ const cwd = process.cwd();
14
+ let dir = cwd;
15
+ for (;;) {
16
+ try {
17
+ if (fs_1.default.statSync(path_1.default.join(dir, 'package.json')).isFile()) {
18
+ break;
19
+ }
20
+ // eslint-disable-next-line no-empty
21
+ }
22
+ catch (e) { }
23
+ const parent = path_1.default.dirname(dir);
24
+ if (dir === parent) {
25
+ dir = undefined;
26
+ break;
27
+ }
28
+ dir = parent;
29
+ }
30
+ if (!dir) {
31
+ return path_1.default.resolve(cwd, '.cache/webpack');
32
+ }
33
+ if (process.versions.pnp === '1') {
34
+ return path_1.default.resolve(dir, '.pnp/.cache/webpack');
35
+ }
36
+ if (process.versions.pnp === '3') {
37
+ return path_1.default.resolve(dir, '.yarn/.cache/webpack');
38
+ }
39
+ return path_1.default.resolve(dir, 'node_modules/.cache/webpack');
40
+ };
41
+ const remotionCacheLocation = (environment, inputProps) => {
42
+ return path_1.default.join(getWebpackCacheDir(), (0, exports.getWebpackCacheName)(environment, inputProps));
43
+ };
44
+ const clearCache = (environment, inputProps) => {
45
+ var _a;
46
+ return ((_a = fs_1.default.promises.rm) !== null && _a !== void 0 ? _a : fs_1.default.promises.rmdir)(remotionCacheLocation(environment, inputProps), {
47
+ recursive: true,
48
+ });
49
+ };
50
+ exports.clearCache = clearCache;
51
+ const getWebpackCacheName = (environment, inputProps) => {
52
+ // In development, let's reset the cache when input props
53
+ // are changing, because they are injected using Webpack and if changed,
54
+ // it will get the cached version
55
+ if (environment === 'development') {
56
+ return `remotion-v3-${environment}-${(0, remotion_1.random)(JSON.stringify(inputProps))}`;
57
+ }
58
+ // In production, the cache is independent from input props because
59
+ // they are passed over URL params. Speed is mostly important in production.
60
+ return `remotion-v3-${environment}`;
61
+ };
62
+ exports.getWebpackCacheName = getWebpackCacheName;
63
+ const cacheExists = (environment, inputProps) => {
64
+ return fs_1.default.existsSync(remotionCacheLocation(environment, inputProps));
65
+ };
66
+ exports.cacheExists = cacheExists;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.2.25",
3
+ "version": "3.2.26-crf.18+b22217116",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,15 +23,15 @@
23
23
  "author": "Jonny Burger <jonny@remotion.dev>",
24
24
  "license": "SEE LICENSE IN LICENSE.md",
25
25
  "dependencies": {
26
- "@remotion/bundler": "3.2.25",
27
- "@remotion/media-utils": "3.2.25",
28
- "@remotion/player": "3.2.25",
29
- "@remotion/renderer": "3.2.25",
26
+ "@remotion/bundler": "3.2.26-crf.18+b22217116",
27
+ "@remotion/media-utils": "3.2.26-crf.18+b22217116",
28
+ "@remotion/player": "3.2.26-crf.18+b22217116",
29
+ "@remotion/renderer": "3.2.26-crf.18+b22217116",
30
30
  "better-opn": "2.1.1",
31
31
  "dotenv": "9.0.2",
32
32
  "memfs": "3.4.3",
33
33
  "minimist": "1.2.6",
34
- "remotion": "3.2.25",
34
+ "remotion": "3.2.26-crf.18+b22217116",
35
35
  "semver": "7.3.5",
36
36
  "source-map": "0.6.1"
37
37
  },
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "8e51d998e16f062336d65469cbfc9266068b7701"
74
+ "gitHead": "b222171164aefac1d44e1ad9e08231e9bad9a029"
75
75
  }