@remotion/cli 3.2.39 → 3.2.41

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 (60) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/benchmark.js +7 -6
  3. package/dist/compositions.d.ts +1 -1
  4. package/dist/compositions.js +4 -3
  5. package/dist/config/entry-point.d.ts +2 -0
  6. package/dist/config/entry-point.js +12 -0
  7. package/dist/config/every-nth-frame.d.ts +1 -2
  8. package/dist/config/every-nth-frame.js +3 -11
  9. package/dist/config/height.d.ts +1 -1
  10. package/dist/config/height.js +4 -4
  11. package/dist/config/index.d.ts +5 -2
  12. package/dist/config/index.js +15 -8
  13. package/dist/config/log.d.ts +1 -1
  14. package/dist/config/number-of-gif-loops.d.ts +1 -2
  15. package/dist/config/number-of-gif-loops.js +3 -9
  16. package/dist/config/width.d.ts +1 -1
  17. package/dist/config/width.js +3 -3
  18. package/dist/editor/components/Canvas.js +3 -0
  19. package/dist/editor/components/GlobalKeybindings.js +4 -0
  20. package/dist/editor/components/NewComposition/MenuContent.js +7 -0
  21. package/dist/editor/components/PlayPause.js +6 -0
  22. package/dist/editor/components/PlaybackKeyboardShortcutsManager.js +3 -0
  23. package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.js +2 -0
  24. package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.js +1 -0
  25. package/dist/editor/components/TimelineInOutToggle.js +3 -0
  26. package/dist/editor/helpers/use-keybinding.d.ts +1 -0
  27. package/dist/editor/helpers/use-keybinding.js +3 -1
  28. package/dist/editor/helpers/use-menu-structure.js +10 -7
  29. package/dist/editor/state/z-index.js +1 -0
  30. package/dist/entry-point.d.ts +5 -0
  31. package/dist/entry-point.js +46 -0
  32. package/dist/get-cli-options.d.ts +4 -4
  33. package/dist/get-cli-options.js +7 -25
  34. package/dist/get-composition-id.d.ts +2 -1
  35. package/dist/get-composition-id.js +8 -6
  36. package/dist/get-composition-with-dimension-override.d.ts +3 -1
  37. package/dist/get-composition-with-dimension-override.js +2 -2
  38. package/dist/get-filename.d.ts +2 -1
  39. package/dist/get-filename.js +2 -1
  40. package/dist/get-render-media-options.js +8 -3
  41. package/dist/index.d.ts +10 -6
  42. package/dist/index.js +11 -11
  43. package/dist/lambda-command.d.ts +1 -1
  44. package/dist/lambda-command.js +2 -3
  45. package/dist/list-of-remotion-packages.js +1 -0
  46. package/dist/parse-command-line.d.ts +2 -0
  47. package/dist/parse-command-line.js +6 -0
  48. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +1 -0
  49. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +1 -0
  50. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +1 -0
  51. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -0
  52. package/dist/preview.d.ts +1 -1
  53. package/dist/preview.js +4 -2
  54. package/dist/render.d.ts +1 -1
  55. package/dist/render.js +21 -12
  56. package/dist/still.d.ts +1 -1
  57. package/dist/still.js +26 -14
  58. package/dist/user-passed-output-location.d.ts +3 -2
  59. package/dist/user-passed-output-location.js +5 -7
  60. package/package.json +7 -7
package/dist/still.js CHANGED
@@ -10,18 +10,25 @@ const path_1 = __importDefault(require("path"));
10
10
  const chalk_1 = require("./chalk");
11
11
  const config_1 = require("./config");
12
12
  const determine_image_format_1 = require("./determine-image-format");
13
+ const entry_point_1 = require("./entry-point");
13
14
  const get_cli_options_1 = require("./get-cli-options");
14
- const get_composition_id_1 = require("./get-composition-id");
15
+ const get_composition_with_dimension_override_1 = require("./get-composition-with-dimension-override");
15
16
  const log_1 = require("./log");
16
17
  const parse_command_line_1 = require("./parse-command-line");
17
18
  const progress_bar_1 = require("./progress-bar");
18
19
  const setup_cache_1 = require("./setup-cache");
19
20
  const truthy_1 = require("./truthy");
20
21
  const user_passed_output_location_1 = require("./user-passed-output-location");
21
- const still = async (remotionRoot) => {
22
+ const still = async (remotionRoot, args) => {
22
23
  var _a, _b;
23
24
  const startTime = Date.now();
24
- const file = parse_command_line_1.parsedCli._[1];
25
+ const { file, remainingArgs, reason: entryPointReason, } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
26
+ if (!file) {
27
+ log_1.Log.error('No entry point specified. Pass more arguments:');
28
+ log_1.Log.error(' npx remotion render [entry-point] [composition-name] [out-name]');
29
+ log_1.Log.error('Documentation: https://www.remotion.dev/docs/render');
30
+ process.exit(1);
31
+ }
25
32
  const fullPath = renderer_1.RenderInternals.isServeUrl(file)
26
33
  ? file
27
34
  : path_1.default.join(process.cwd(), file);
@@ -29,19 +36,11 @@ const still = async (remotionRoot) => {
29
36
  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
37
  process.exit(1);
31
38
  }
32
- const { inputProps, envVariables, quality, browser, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
39
+ const { inputProps, envVariables, quality, browser, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, publicDir, height, width, } = await (0, get_cli_options_1.getCliOptions)({
33
40
  isLambda: false,
34
41
  type: 'still',
35
- codec: 'h264',
36
42
  });
37
43
  log_1.Log.verbose('Browser executable: ', browserExecutable);
38
- const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalImageFormat)({
39
- cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
40
- configImageFormat: (_b = config_1.ConfigInternals.getUserPreferredImageFormat()) !== null && _b !== void 0 ? _b : null,
41
- downloadName: null,
42
- outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(),
43
- isLambda: false,
44
- });
45
44
  const browserInstance = (0, renderer_1.openBrowser)(browser, {
46
45
  browserExecutable,
47
46
  chromiumOptions,
@@ -67,16 +66,29 @@ const still = async (remotionRoot) => {
67
66
  ffprobeExecutable,
68
67
  downloadMap,
69
68
  });
70
- const { compositionId, config, reason } = await (0, get_composition_id_1.getCompositionId)(comps);
69
+ const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
70
+ validCompositions: comps,
71
+ height,
72
+ width,
73
+ args: remainingArgs,
74
+ });
75
+ const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalImageFormat)({
76
+ cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
77
+ configImageFormat: (_b = config_1.ConfigInternals.getUserPreferredImageFormat()) !== null && _b !== void 0 ? _b : null,
78
+ downloadName: null,
79
+ outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(argsAfterComposition),
80
+ isLambda: false,
81
+ });
71
82
  const relativeOutputLocation = (0, user_passed_output_location_1.getOutputLocation)({
72
83
  compositionId,
73
84
  defaultExtension: imageFormat,
85
+ args: argsAfterComposition,
74
86
  });
75
87
  const absoluteOutputLocation = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite);
76
88
  (0, fs_1.mkdirSync)(path_1.default.join(absoluteOutputLocation, '..'), {
77
89
  recursive: true,
78
90
  });
79
- log_1.Log.info(chalk_1.chalk.gray(`Output = ${relativeOutputLocation}, Format = ${imageFormat} (${source}), Composition = ${compositionId} (${reason})`));
91
+ log_1.Log.info(chalk_1.chalk.gray(`Entry point = ${file} (${entryPointReason}), Output = ${relativeOutputLocation}, Format = ${imageFormat} (${source}), Composition = ${compositionId} (${reason})`));
80
92
  const renderProgress = (0, progress_bar_1.createOverwriteableCliOutput)((0, parse_command_line_1.quietFlagProvided)());
81
93
  const renderStart = Date.now();
82
94
  const downloads = [];
@@ -1,5 +1,6 @@
1
- export declare const getUserPassedOutputLocation: () => string | null;
2
- export declare const getOutputLocation: ({ compositionId, defaultExtension, }: {
1
+ export declare const getUserPassedOutputLocation: (args: string[]) => string;
2
+ export declare const getOutputLocation: ({ compositionId, defaultExtension, args, }: {
3
3
  compositionId: string;
4
4
  defaultExtension: string;
5
+ args: string[];
5
6
  }) => string;
@@ -2,11 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOutputLocation = exports.getUserPassedOutputLocation = void 0;
4
4
  const config_1 = require("./config");
5
- const parse_command_line_1 = require("./parse-command-line");
6
- const getUserPassedOutputLocation = () => {
7
- const filename = parse_command_line_1.parsedCli._[3]
8
- ? parse_command_line_1.parsedCli._[3]
9
- : config_1.ConfigInternals.getOutputLocation();
5
+ const getUserPassedOutputLocation = (args) => {
6
+ var _a;
7
+ const filename = (_a = args[0]) !== null && _a !== void 0 ? _a : config_1.ConfigInternals.getOutputLocation();
10
8
  return filename;
11
9
  };
12
10
  exports.getUserPassedOutputLocation = getUserPassedOutputLocation;
@@ -14,8 +12,8 @@ const getDefaultOutLocation = ({ compositionName, defaultExtension, }) => {
14
12
  const defaultName = `out/${compositionName}.${defaultExtension}`;
15
13
  return defaultName;
16
14
  };
17
- const getOutputLocation = ({ compositionId, defaultExtension, }) => {
15
+ const getOutputLocation = ({ compositionId, defaultExtension, args, }) => {
18
16
  var _a;
19
- return ((_a = (0, exports.getUserPassedOutputLocation)()) !== null && _a !== void 0 ? _a : getDefaultOutLocation({ compositionName: compositionId, defaultExtension }));
17
+ return ((_a = (0, exports.getUserPassedOutputLocation)(args)) !== null && _a !== void 0 ? _a : getDefaultOutLocation({ compositionName: compositionId, defaultExtension }));
20
18
  };
21
19
  exports.getOutputLocation = getOutputLocation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.2.39",
3
+ "version": "3.2.41",
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.2.39",
26
- "@remotion/media-utils": "3.2.39",
27
- "@remotion/player": "3.2.39",
28
- "@remotion/renderer": "3.2.39",
25
+ "@remotion/bundler": "3.2.41",
26
+ "@remotion/media-utils": "3.2.41",
27
+ "@remotion/player": "3.2.41",
28
+ "@remotion/renderer": "3.2.41",
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.2.39",
34
+ "remotion": "3.2.41",
35
35
  "semver": "7.3.5",
36
36
  "source-map": "0.6.1"
37
37
  },
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "406632092cb2b96ac34d489808283508298c4e1f"
75
+ "gitHead": "017d1f002dfe81d451e4707ca0a58f30e3a080b9"
76
76
  }