@remotion/cli 3.3.39 → 3.3.40

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
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.benchmarkCommand = void 0;
7
4
  const renderer_1 = require("@remotion/renderer");
8
- const path_1 = __importDefault(require("path"));
9
5
  const chalk_1 = require("./chalk");
10
6
  const config_1 = require("./config");
11
7
  const entry_point_1 = require("./entry-point");
@@ -97,7 +93,6 @@ const benchmarkCommand = async (remotionRoot, args) => {
97
93
  log_1.Log.info(`$ remotion benchmark <entry file>`);
98
94
  process.exit(1);
99
95
  }
100
- const fullPath = path_1.default.join(process.cwd(), file);
101
96
  const { inputProps, envVariables, browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, puppeteerTimeout, browser, scale, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
102
97
  isLambda: false,
103
98
  type: 'series',
@@ -111,7 +106,7 @@ const benchmarkCommand = async (remotionRoot, args) => {
111
106
  forceDeviceScaleFactor: scale,
112
107
  });
113
108
  const { urlOrBundle: bundleLocation, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
114
- fullPath,
109
+ fullPath: file,
115
110
  publicDir,
116
111
  remotionRoot,
117
112
  steps: ['bundling'],
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.listCompositionsCommand = void 0;
7
4
  const renderer_1 = require("@remotion/renderer");
8
- const path_1 = __importDefault(require("path"));
9
5
  const entry_point_1 = require("./entry-point");
10
6
  const get_cli_options_1 = require("./get-cli-options");
11
7
  const get_config_file_name_1 = require("./get-config-file-name");
@@ -22,7 +18,6 @@ const listCompositionsCommand = async (remotionRoot, args) => {
22
18
  }
23
19
  log_1.Log.verbose('Entry point:', file, 'reason:', reason);
24
20
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
25
- const fullPath = path_1.default.join(process.cwd(), file);
26
21
  await (0, get_config_file_name_1.loadConfig)(remotionRoot);
27
22
  const { browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
28
23
  isLambda: false,
@@ -31,7 +26,7 @@ const listCompositionsCommand = async (remotionRoot, args) => {
31
26
  });
32
27
  const { urlOrBundle: bundled, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
33
28
  remotionRoot,
34
- fullPath,
29
+ fullPath: file,
35
30
  steps: ['bundling'],
36
31
  publicDir,
37
32
  });
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.findEntryPoint = void 0;
7
+ const renderer_1 = require("@remotion/renderer");
7
8
  const fs_1 = require("fs");
8
9
  const path_1 = __importDefault(require("path"));
9
10
  const config_1 = require("./config");
@@ -20,12 +21,46 @@ const findCommonPath = (remotionRoot) => {
20
21
  return candidates.find((candidate) => (0, fs_1.existsSync)(path_1.default.resolve(remotionRoot, candidate)));
21
22
  };
22
23
  const findEntryPoint = (args, remotionRoot) => {
24
+ const result = findEntryPointInner(args, remotionRoot);
25
+ if (result.file === null) {
26
+ return result;
27
+ }
28
+ if (renderer_1.RenderInternals.isServeUrl(result.file)) {
29
+ return result;
30
+ }
31
+ if (!(0, fs_1.existsSync)(result.file)) {
32
+ throw new Error(`${result.file} was chosen as the entry point (reason = ${result.reason}) but it does not exist.`);
33
+ }
34
+ if ((0, fs_1.lstatSync)(result.file).isDirectory()) {
35
+ throw new Error(`${result.file} was chosen as the entry point (reason = ${result.reason}) but it is a directory - it needs to be a file.`);
36
+ }
37
+ return result;
38
+ };
39
+ exports.findEntryPoint = findEntryPoint;
40
+ const findEntryPointInner = (args, remotionRoot) => {
23
41
  // 1st priority: Explicitly passed entry point
24
42
  let file = args[0];
25
43
  if (file) {
26
44
  log_1.Log.verbose('Checking if', file, 'is the entry file');
27
- // Intentionally resolving CLI files to CWD, while resolving config file to remotionRoot
28
- if ((0, fs_1.existsSync)(path_1.default.resolve(process.cwd(), file))) {
45
+ const cwdResolution = path_1.default.resolve(process.cwd(), file);
46
+ const remotionRootResolution = path_1.default.resolve(remotionRoot, file);
47
+ // Checking if file was found in CWD
48
+ if ((0, fs_1.existsSync)(cwdResolution)) {
49
+ return {
50
+ file: cwdResolution,
51
+ remainingArgs: args.slice(1),
52
+ reason: 'argument passed - found in cwd',
53
+ };
54
+ }
55
+ // Checking if file was found in remotion root
56
+ if ((0, fs_1.existsSync)(remotionRootResolution)) {
57
+ return {
58
+ file: remotionRootResolution,
59
+ remainingArgs: args.slice(1),
60
+ reason: 'argument passed - found in root',
61
+ };
62
+ }
63
+ if (renderer_1.RenderInternals.isServeUrl(file)) {
29
64
  return { file, remainingArgs: args.slice(1), reason: 'argument passed' };
30
65
  }
31
66
  }
@@ -33,14 +68,22 @@ const findEntryPoint = (args, remotionRoot) => {
33
68
  file = config_1.ConfigInternals.getEntryPoint();
34
69
  if (file) {
35
70
  log_1.Log.verbose('Entry point from config file is', file);
36
- return { file, remainingArgs: args, reason: 'config file' };
71
+ return {
72
+ file: path_1.default.resolve(remotionRoot, file),
73
+ remainingArgs: args,
74
+ reason: 'config file',
75
+ };
37
76
  }
38
77
  // 3rd priority: Common paths
39
78
  const found = findCommonPath(remotionRoot);
40
79
  if (found) {
41
- log_1.Log.verbose('Selected', found, 'as the entry point because file exists and is a common entry point and no entry point was explicitly selected');
42
- return { file: found, remainingArgs: args, reason: 'common paths' };
80
+ const absolutePath = path_1.default.resolve(remotionRoot, found);
81
+ log_1.Log.verbose('Selected', absolutePath, 'as the entry point because file exists and is a common entry point and no entry point was explicitly selected');
82
+ return {
83
+ file: absolutePath,
84
+ remainingArgs: args,
85
+ reason: 'common paths',
86
+ };
43
87
  }
44
88
  return { file: null, remainingArgs: args, reason: 'none found' };
45
89
  };
46
- exports.findEntryPoint = findEntryPoint;
@@ -10,7 +10,8 @@ const handleCommonError = async (err) => {
10
10
  log_1.Log.info();
11
11
  log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
12
12
  }
13
- if (err.message.includes('A delayRender was called')) {
13
+ if (err.message.includes('A delayRender()') &&
14
+ err.message.includes('was called but not cleared after')) {
14
15
  log_1.Log.info();
15
16
  log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/timeout');
16
17
  }
package/dist/index.d.ts CHANGED
@@ -146,4 +146,5 @@ export declare const CliInternals: {
146
146
  };
147
147
  getImageFormat: (codec: import("@remotion/renderer").CodecOrUndefined) => "png" | "jpeg" | "none";
148
148
  printCompositions: (compositions: import("remotion").TCompMetadata[]) => void;
149
+ listOfRemotionPackages: string[];
149
150
  };
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ const image_formats_1 = require("./image-formats");
35
35
  const initialize_cli_1 = require("./initialize-cli");
36
36
  const install_1 = require("./install");
37
37
  const lambda_command_1 = require("./lambda-command");
38
+ const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
38
39
  const log_1 = require("./log");
39
40
  const make_progress_bar_1 = require("./make-progress-bar");
40
41
  const parse_command_line_1 = require("./parse-command-line");
@@ -135,4 +136,5 @@ exports.CliInternals = {
135
136
  findEntryPoint: entry_point_1.findEntryPoint,
136
137
  getImageFormat: image_formats_1.getImageFormat,
137
138
  printCompositions: print_compositions_1.printCompositions,
139
+ listOfRemotionPackages: list_of_remotion_packages_1.listOfRemotionPackages,
138
140
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.listOfRemotionPackages = void 0;
4
+ // Keep in sync with create-video
4
5
  exports.listOfRemotionPackages = [
5
6
  '@remotion/bundler',
6
7
  '@remotion/cli',
package/dist/preview.js CHANGED
@@ -73,7 +73,6 @@ const previewCommand = async (remotionRoot, args) => {
73
73
  process.exit(1);
74
74
  }
75
75
  const desiredPort = getPort();
76
- const fullPath = path_1.default.join(process.cwd(), file);
77
76
  let inputProps = (0, get_input_props_1.getInputProps)((newProps) => {
78
77
  waitForLiveEventsListener().then((listener) => {
79
78
  inputProps = newProps;
@@ -113,7 +112,7 @@ const previewCommand = async (remotionRoot, args) => {
113
112
  });
114
113
  const { port, liveEventsServer } = await (0, start_server_1.startServer)({
115
114
  entry: path_1.default.resolve(__dirname, 'previewEntry.js'),
116
- userDefinedComponent: fullPath,
115
+ userDefinedComponent: file,
117
116
  getCurrentInputProps: () => inputProps,
118
117
  getEnvVariables: () => envVariables,
119
118
  port: desiredPort,
package/dist/render.js CHANGED
@@ -32,9 +32,6 @@ const render = async (remotionRoot, args) => {
32
32
  log_1.Log.error('Documentation: https://www.remotion.dev/docs/render');
33
33
  process.exit(1);
34
34
  }
35
- const fullPath = renderer_1.RenderInternals.isServeUrl(file)
36
- ? file
37
- : path_1.default.join(process.cwd(), file);
38
35
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
39
36
  if (parse_command_line_1.parsedCli.frame) {
40
37
  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/');
@@ -59,12 +56,12 @@ const render = async (remotionRoot, args) => {
59
56
  forceDeviceScaleFactor: scale,
60
57
  });
61
58
  const steps = [
62
- renderer_1.RenderInternals.isServeUrl(fullPath) ? null : 'bundling',
59
+ renderer_1.RenderInternals.isServeUrl(file) ? null : 'bundling',
63
60
  'rendering',
64
61
  shouldOutputImageSequence ? null : 'stitching',
65
62
  ].filter(remotion_1.Internals.truthy);
66
63
  const { urlOrBundle, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
67
- fullPath,
64
+ fullPath: file,
68
65
  remotionRoot,
69
66
  steps,
70
67
  publicDir,
@@ -122,7 +119,7 @@ const render = async (remotionRoot, args) => {
122
119
  defaultExtension: renderer_1.RenderInternals.getFileExtensionFromCodec(codec),
123
120
  args: argsAfterComposition,
124
121
  });
125
- log_1.Log.info(chalk_1.chalk.gray(`Entry point = ${file} (${entryPointReason}), Composition = ${compositionId} (${reason}), Codec = ${codec} (${codecReason}), Output = ${relativeOutputLocation}`));
122
+ log_1.Log.info(chalk_1.chalk.gray(`Entry point = ${path_1.default.relative(process.cwd(), file)} (${entryPointReason}), Composition = ${compositionId} (${reason}), Codec = ${codec} (${codecReason}), Output = ${relativeOutputLocation}`));
126
123
  const absoluteOutputFile = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite);
127
124
  const outputDir = shouldOutputImageSequence
128
125
  ? absoluteOutputFile
package/dist/still.js CHANGED
@@ -29,9 +29,6 @@ const still = async (remotionRoot, args) => {
29
29
  log_1.Log.error('Documentation: https://www.remotion.dev/docs/render');
30
30
  process.exit(1);
31
31
  }
32
- const fullPath = renderer_1.RenderInternals.isServeUrl(file)
33
- ? file
34
- : path_1.default.join(process.cwd(), file);
35
32
  if (parse_command_line_1.parsedCli.frames) {
36
33
  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/');
37
34
  process.exit(1);
@@ -49,10 +46,10 @@ const still = async (remotionRoot, args) => {
49
46
  forceDeviceScaleFactor: scale,
50
47
  });
51
48
  const steps = [
52
- renderer_1.RenderInternals.isServeUrl(fullPath) ? null : 'bundling',
49
+ renderer_1.RenderInternals.isServeUrl(file) ? null : 'bundling',
53
50
  'rendering',
54
51
  ].filter(truthy_1.truthy);
55
- const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({ fullPath, remotionRoot, steps, publicDir });
52
+ const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({ fullPath: file, remotionRoot, steps, publicDir });
56
53
  const puppeteerInstance = await browserInstance;
57
54
  const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
58
55
  const comps = await (0, renderer_1.getCompositions)(urlOrBundle, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.3.39",
3
+ "version": "3.3.40",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -22,16 +22,16 @@
22
22
  "author": "Jonny Burger <jonny@remotion.dev>",
23
23
  "license": "SEE LICENSE IN LICENSE.md",
24
24
  "dependencies": {
25
- "@remotion/bundler": "3.3.39",
26
- "@remotion/media-utils": "3.3.39",
27
- "@remotion/player": "3.3.39",
28
- "@remotion/renderer": "3.3.39",
25
+ "@remotion/bundler": "3.3.40",
26
+ "@remotion/media-utils": "3.3.40",
27
+ "@remotion/player": "3.3.40",
28
+ "@remotion/renderer": "3.3.40",
29
29
  "better-opn": "2.1.1",
30
30
  "dotenv": "9.0.2",
31
31
  "memfs": "3.4.3",
32
32
  "minimist": "1.2.6",
33
33
  "prompts": "2.4.1",
34
- "remotion": "3.3.39",
34
+ "remotion": "3.3.40",
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": "5a07260074fe3a6db2cdba0001503c665951414d"
74
+ "gitHead": "be5f606a81761f7f8e1e191ebabd5f8d225d8c09"
75
75
  }