@remotion/cli 4.0.208 → 4.0.210

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
@@ -347,7 +347,8 @@ const benchmarkCommand = async (remotionRoot, args, logLevel) => {
347
347
  });
348
348
  benchmarkProgress.update('', false);
349
349
  benchmarkProgress.update(getResults(timeTaken, runs), false);
350
- benchmark[composition.id][`${con}`] = timeTaken;
350
+ benchmark[composition.id][`${con}`] =
351
+ timeTaken;
351
352
  }
352
353
  }
353
354
  log_1.Log.info({ indent: false, logLevel });
@@ -57,7 +57,7 @@ const defaultBrowserDownloadProgress = ({ indent, logLevel, quiet, }) => {
57
57
  doneIn,
58
58
  bytesDownloaded: progress.downloadedBytes,
59
59
  totalBytes: progress.totalSizeInBytes,
60
- }), false);
60
+ }), progress.percent === 1);
61
61
  },
62
62
  };
63
63
  };
@@ -13,7 +13,7 @@ const cloudrunCommand = async (remotionRoot, args, logLevel) => {
13
13
  process.exit(0);
14
14
  }
15
15
  catch (err) {
16
- const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined);
16
+ const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined, 0);
17
17
  const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
18
18
  log_1.Log.error({ indent: false, logLevel }, err);
19
19
  log_1.Log.error({ indent: false, logLevel }, 'Remotion Cloud Run is not installed.');
@@ -56,7 +56,8 @@ function supportsHyperlink() {
56
56
  return version.major >= 20200620 ? 'Click' : false;
57
57
  case 'vscode':
58
58
  // eslint-disable-next-line no-mixed-operators
59
- return version.major > 1 || (version.major === 1 && version.minor >= 72)
59
+ return version.major > 1 ||
60
+ (version.major === 1 && version.minor >= 72)
60
61
  ? process.platform === 'darwin'
61
62
  ? 'Option+Click'
62
63
  : 'Ctrl+Click'
@@ -70,7 +71,9 @@ function supportsHyperlink() {
70
71
  return false;
71
72
  }
72
73
  const version = parseVersion(VTE_VERSION);
73
- return version.major > 0 || version.minor >= 50 ? 'Click' : false;
74
+ return version.major > 0 || version.minor >= 50
75
+ ? 'Click'
76
+ : false;
74
77
  }
75
78
  return false;
76
79
  }
@@ -13,7 +13,7 @@ const lambdaCommand = async (remotionRoot, args, logLevel) => {
13
13
  process.exit(0);
14
14
  }
15
15
  catch (err) {
16
- const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined);
16
+ const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, undefined, 0);
17
17
  const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
18
18
  log_1.Log.error({ indent: false, logLevel }, err);
19
19
  log_1.Log.error({ indent: false, logLevel }, 'Remotion Lambda is not installed.');
@@ -36,7 +36,12 @@ const loadConfigFile = async (remotionRoot, configFileName, isJavascript) => {
36
36
  }
37
37
  process.exit(1);
38
38
  }
39
- let str = new TextDecoder().decode(result.outputFiles[0].contents);
39
+ const firstOutfile = result.outputFiles[0];
40
+ if (!firstOutfile) {
41
+ log_1.Log.error({ indent: false, logLevel: 'error' }, 'No output files found in the config file.');
42
+ process.exit(1);
43
+ }
44
+ let str = new TextDecoder().decode(firstOutfile.contents);
40
45
  const currentCwd = process.cwd();
41
46
  // The config file is always executed from the Remotion root, if `process.cwd()` is being used. We cannot enforce this in worker threads used for testing
42
47
  if (node_worker_threads_1.isMainThread) {
@@ -285,7 +285,7 @@ export type CommandLineOptions = {
285
285
  [publicPathOption.cliFlag]: string;
286
286
  crf: number;
287
287
  force: boolean;
288
- output: string;
288
+ output: string | undefined;
289
289
  overwrite: boolean;
290
290
  png: boolean;
291
291
  props: string;
package/dist/upgrade.js CHANGED
@@ -1,33 +1,13 @@
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.upgrade = void 0;
7
4
  const renderer_1 = require("@remotion/renderer");
8
5
  const studio_server_1 = require("@remotion/studio-server");
9
6
  const node_child_process_1 = require("node:child_process");
10
- const node_path_1 = __importDefault(require("node:path"));
11
7
  const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
12
8
  const log_1 = require("./log");
13
- const getUpgradeCommand = ({ manager, packages, version, }) => {
14
- const pkgList = packages.map((p) => `${p}@${version}`);
15
- const commands = {
16
- npm: ['i', '--save-exact', '--no-fund', '--no-audit', ...pkgList],
17
- pnpm: ['i', ...pkgList],
18
- yarn: ['add', '--exact', ...pkgList],
19
- bun: ['i', ...pkgList],
20
- };
21
- return commands[manager];
22
- };
23
9
  const upgrade = async (remotionRoot, packageManager, version, logLevel) => {
24
- var _a, _b, _c;
25
- const packageJsonFilePath = node_path_1.default.join(remotionRoot, 'package.json');
26
- const packageJson = require(packageJsonFilePath);
27
- const dependencies = Object.keys(packageJson.dependencies);
28
- const devDependencies = Object.keys((_a = packageJson.devDependencies) !== null && _a !== void 0 ? _a : {});
29
- const optionalDependencies = Object.keys((_b = packageJson.optionalDependencies) !== null && _b !== void 0 ? _b : {});
30
- const peerDependencies = Object.keys((_c = packageJson.peerDependencies) !== null && _c !== void 0 ? _c : {});
10
+ const { dependencies, devDependencies, optionalDependencies, peerDependencies, } = studio_server_1.StudioServerInternals.getInstalledDependencies(remotionRoot);
31
11
  let targetVersion;
32
12
  if (version) {
33
13
  targetVersion = version;
@@ -37,7 +17,7 @@ const upgrade = async (remotionRoot, packageManager, version, logLevel) => {
37
17
  targetVersion = await studio_server_1.StudioServerInternals.getLatestRemotionVersion();
38
18
  log_1.Log.info({ indent: false, logLevel }, 'Newest Remotion version is', targetVersion);
39
19
  }
40
- const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, packageManager);
20
+ const manager = studio_server_1.StudioServerInternals.getPackageManager(remotionRoot, packageManager, 0);
41
21
  if (manager === 'unknown') {
42
22
  throw new Error(`No lockfile was found in your project (one of ${studio_server_1.StudioServerInternals.lockFilePaths
43
23
  .map((p) => p.path)
@@ -47,7 +27,7 @@ const upgrade = async (remotionRoot, packageManager, version, logLevel) => {
47
27
  devDependencies.includes(u) ||
48
28
  optionalDependencies.includes(u) ||
49
29
  peerDependencies.includes(u));
50
- const task = (0, node_child_process_1.spawn)(manager.manager, getUpgradeCommand({
30
+ const task = (0, node_child_process_1.spawn)(manager.manager, studio_server_1.StudioServerInternals.getInstallCommand({
51
31
  manager: manager.manager,
52
32
  packages: toUpgrade,
53
33
  version: targetVersion,
@@ -1,4 +1,4 @@
1
- export declare const getUserPassedOutputLocation: (args: (string | number)[], uiPassedOutName: string | null) => string;
1
+ export declare const getUserPassedOutputLocation: (args: (string | number)[], uiPassedOutName: string | null) => string | null;
2
2
  export declare const getOutputLocation: ({ compositionId, defaultExtension, args, type, outputLocationFromUi, }: {
3
3
  compositionId: string;
4
4
  outputLocationFromUi: string | null;
@@ -7,7 +7,7 @@ const parsed_cli_1 = require("./parsed-cli");
7
7
  const getUserPassedOutputLocation = (args, uiPassedOutName) => {
8
8
  var _a, _b;
9
9
  const filename = (_b = (_a = uiPassedOutName !== null && uiPassedOutName !== void 0 ? uiPassedOutName : args[0]) !== null && _a !== void 0 ? _a : parsed_cli_1.parsedCli.output) !== null && _b !== void 0 ? _b : config_1.ConfigInternals.getOutputLocation();
10
- return String(filename);
10
+ return filename ? String(filename) : null;
11
11
  };
12
12
  exports.getUserPassedOutputLocation = getUserPassedOutputLocation;
13
13
  const getOutputLocation = ({ compositionId, defaultExtension, args, type, outputLocationFromUi, }) => {
package/dist/versions.js CHANGED
@@ -36,6 +36,7 @@ const getAllVersions = async (remotionRoot) => {
36
36
  };
37
37
  exports.VERSIONS_COMMAND = 'versions';
38
38
  const validateVersionsBeforeCommand = async (remotionRoot, logLevel) => {
39
+ var _a;
39
40
  const versions = await getAllVersions(remotionRoot);
40
41
  const grouped = groupBy(versions);
41
42
  const installedVersions = Object.keys(grouped);
@@ -52,7 +53,7 @@ const validateVersionsBeforeCommand = async (remotionRoot, logLevel) => {
52
53
  log_1.Log.warn(logOptions, 'Version mismatch:');
53
54
  for (const version of installedVersions) {
54
55
  log_1.Log.warn(logOptions, `- On version: ${version}`);
55
- for (const pkg of grouped[version]) {
56
+ for (const pkg of (_a = grouped[version]) !== null && _a !== void 0 ? _a : []) {
56
57
  log_1.Log.warn(logOptions, ` - ${pkg}`);
57
58
  }
58
59
  log_1.Log.info({ indent: false, logLevel });
@@ -73,6 +74,7 @@ const validateVersionsBeforeCommand = async (remotionRoot, logLevel) => {
73
74
  };
74
75
  exports.validateVersionsBeforeCommand = validateVersionsBeforeCommand;
75
76
  const versionsCommand = async (remotionRoot, logLevel) => {
77
+ var _a;
76
78
  (0, parse_command_line_1.parseCommandLine)();
77
79
  const versions = await getAllVersions(remotionRoot);
78
80
  const grouped = groupBy(versions);
@@ -81,7 +83,7 @@ const versionsCommand = async (remotionRoot, logLevel) => {
81
83
  log_1.Log.info({ indent: false, logLevel });
82
84
  for (const version of installedVersions) {
83
85
  log_1.Log.info({ indent: false, logLevel }, `On version: ${version}`);
84
- for (const pkg of grouped[version]) {
86
+ for (const pkg of (_a = grouped[version]) !== null && _a !== void 0 ? _a : []) {
85
87
  log_1.Log.info({ indent: false, logLevel }, `- ${pkg}`);
86
88
  log_1.Log.verbose({ indent: false, logLevel }, ` ${(0, resolve_from_1.resolveFrom)(remotionRoot, `${pkg}/package.json`)}`);
87
89
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/cli"
4
4
  },
5
5
  "name": "@remotion/cli",
6
- "version": "4.0.208",
6
+ "version": "4.0.210",
7
7
  "description": "Control Remotion features using the `npx remotion` command",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -32,14 +32,14 @@
32
32
  "dotenv": "9.0.2",
33
33
  "minimist": "1.2.6",
34
34
  "prompts": "2.4.2",
35
- "@remotion/bundler": "4.0.208",
36
- "@remotion/media-utils": "4.0.208",
37
- "@remotion/studio-server": "4.0.208",
38
- "@remotion/player": "4.0.208",
39
- "@remotion/renderer": "4.0.208",
40
- "remotion": "4.0.208",
41
- "@remotion/studio": "4.0.208",
42
- "@remotion/studio-shared": "4.0.208"
35
+ "@remotion/bundler": "4.0.210",
36
+ "@remotion/media-utils": "4.0.210",
37
+ "@remotion/player": "4.0.210",
38
+ "@remotion/studio-shared": "4.0.210",
39
+ "@remotion/renderer": "4.0.210",
40
+ "remotion": "4.0.210",
41
+ "@remotion/studio": "4.0.210",
42
+ "@remotion/studio-server": "4.0.210"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
@@ -52,10 +52,10 @@
52
52
  "react": "18.3.1",
53
53
  "react-dom": "18.3.1",
54
54
  "zod": "3.22.3",
55
- "@remotion/zod-types": "4.0.208",
56
- "@remotion/skia": "4.0.208",
57
- "@remotion/enable-scss": "4.0.208",
58
- "@remotion/tailwind": "4.0.208"
55
+ "@remotion/zod-types": "4.0.210",
56
+ "@remotion/tailwind": "4.0.210",
57
+ "@remotion/skia": "4.0.210",
58
+ "@remotion/enable-scss": "4.0.210"
59
59
  },
60
60
  "keywords": [
61
61
  "remotion",