@remotion/cli 3.2.30 → 3.2.31

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.
@@ -94,9 +94,8 @@ const getAndValidatePixelFormat = (codec) => {
94
94
  renderer_1.RenderInternals.validateSelectedPixelFormatAndCodecCombination(pixelFormat, codec);
95
95
  return pixelFormat;
96
96
  };
97
- const getAndValidateProResProfile = (actualCodec) => {
97
+ const getProResProfile = () => {
98
98
  const proResProfile = config_1.ConfigInternals.getProResProfile();
99
- renderer_1.RenderInternals.validateSelectedCodecAndProResCombination(actualCodec, proResProfile);
100
99
  return proResProfile;
101
100
  };
102
101
  const getAndValidateImageFormat = ({ shouldOutputImageSequence, codec, pixelFormat, }) => {
@@ -135,7 +134,7 @@ const getCliOptions = async (options) => {
135
134
  codec: options.codec,
136
135
  pixelFormat,
137
136
  });
138
- const proResProfile = getAndValidateProResProfile(options.codec);
137
+ const proResProfile = getProResProfile();
139
138
  const browserExecutable = config_1.ConfigInternals.getBrowserExecutable();
140
139
  const ffmpegExecutable = config_1.ConfigInternals.getCustomFfmpegExecutable();
141
140
  const ffprobeExecutable = config_1.ConfigInternals.getCustomFfprobeExecutable();
@@ -44,6 +44,9 @@ const getFinalOutputCodec = ({ cliFlag, configFile, downloadName, outName, }) =>
44
44
  if (cliFlag && derivedOutNameCodec !== cliFlag) {
45
45
  throw new TypeError(`The out name is ${outName} but --codec=${cliFlag} was passed. The out name implies a codec of ${derivedOutNameCodec} which does not align with the --codec flag.`);
46
46
  }
47
+ if (configFile && derivedOutNameCodec !== configFile) {
48
+ throw new TypeError(`The out name is ${outName} but ${configFile} was set as the codec in the config file. The out name implies a codec of ${derivedOutNameCodec} which does not align with the codec set in the config file.`);
49
+ }
47
50
  return {
48
51
  codec: derivedOutNameCodec,
49
52
  reason: 'derived from out name',
@@ -0,0 +1 @@
1
+ export declare const getNetworkAddress: () => string | undefined;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNetworkAddress = void 0;
4
+ const os_1 = require("os");
5
+ const getNetworkAddress = () => {
6
+ for (const interfaceDetails of Object.values((0, os_1.networkInterfaces)())) {
7
+ if (!interfaceDetails)
8
+ continue;
9
+ for (const details of interfaceDetails) {
10
+ const { address, family, internal } = details;
11
+ if (family === 'IPv4' && !internal)
12
+ return address;
13
+ }
14
+ }
15
+ };
16
+ exports.getNetworkAddress = getNetworkAddress;
@@ -9,6 +9,7 @@ exports.listOfRemotionPackages = [
9
9
  '@remotion/skia',
10
10
  '@remotion/lottie',
11
11
  '@remotion/media-utils',
12
+ '@remotion/motion-blur',
12
13
  '@remotion/paths',
13
14
  '@remotion/babel-loader',
14
15
  '@remotion/lambda',
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setupHooks = void 0;
4
4
  const log_1 = require("../../log");
5
+ const truthy_1 = require("../../truthy");
5
6
  const is_color_supported_1 = require("./is-color-supported");
6
7
  function setupHooks(context) {
7
8
  function invalid() {
@@ -21,13 +22,23 @@ function setupHooks(context) {
21
22
  }
22
23
  logger.log('Compilation finished');
23
24
  const statsOptions = {
24
- preset: 'normal',
25
+ preset: 'errors-warnings',
25
26
  colors: is_color_supported_1.isColorSupported,
26
27
  };
27
28
  const printedStats = stats.toString(statsOptions);
28
- // Avoid extra empty line when `stats: 'none'`
29
- if (printedStats) {
30
- log_1.Log.info(printedStats);
29
+ const lines = printedStats
30
+ .split('\n')
31
+ .map((a) => a.trimEnd())
32
+ .filter(truthy_1.truthy)
33
+ .map((a) => {
34
+ if (a.startsWith('webpack compiled')) {
35
+ return `Built in ${stats.endTime - stats.startTime}ms`;
36
+ }
37
+ return a;
38
+ })
39
+ .join('\n');
40
+ if (lines) {
41
+ log_1.Log.info(lines);
31
42
  }
32
43
  context.callbacks = [];
33
44
  callbacks.forEach((callback) => {
@@ -24,7 +24,7 @@ const webpackHotMiddleware = (compiler) => {
24
24
  compiler.hooks.done.tap('remotion', onDone);
25
25
  function onInvalid() {
26
26
  latestStats = null;
27
- log_1.Log.info('webpack building...');
27
+ log_1.Log.info('Building...');
28
28
  eventStream === null || eventStream === void 0 ? void 0 : eventStream.publish({
29
29
  action: 'building',
30
30
  });
@@ -114,7 +114,6 @@ function publishStats(action, statsResult, eventStream) {
114
114
  if (bundles.length === 1 && !name && statsResult.compilation) {
115
115
  name = statsResult.compilation.name || '';
116
116
  }
117
- log_1.Log.info(`webpack built in ${_stats.time}ms`);
118
117
  eventStream === null || eventStream === void 0 ? void 0 : eventStream.publish({
119
118
  name,
120
119
  action,
package/dist/preview.js CHANGED
@@ -6,9 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.previewCommand = void 0;
7
7
  const better_opn_1 = __importDefault(require("better-opn"));
8
8
  const path_1 = __importDefault(require("path"));
9
+ const chalk_1 = require("./chalk");
9
10
  const config_1 = require("./config");
10
11
  const get_env_1 = require("./get-env");
11
12
  const get_input_props_1 = require("./get-input-props");
13
+ const get_network_address_1 = require("./get-network-address");
12
14
  const log_1 = require("./log");
13
15
  const parse_command_line_1 = require("./parse-command-line");
14
16
  const start_server_1 = require("./preview-server/start-server");
@@ -68,7 +70,13 @@ const previewCommand = async (remotionRoot) => {
68
70
  webpackOverride: config_1.ConfigInternals.getWebpackOverrideFn(),
69
71
  });
70
72
  setLiveEventsListener(liveEventsServer);
71
- log_1.Log.info(`Server running on http://localhost:${port}`);
73
+ const networkAddress = (0, get_network_address_1.getNetworkAddress)();
74
+ if (networkAddress) {
75
+ log_1.Log.info(`Server ready - Local: ${chalk_1.chalk.underline(`http://localhost:${port}`)}, Network: ${chalk_1.chalk.underline(`http://${networkAddress}:${port}`)}`);
76
+ }
77
+ else {
78
+ log_1.Log.info(`Running on http://localhost:${port}`);
79
+ }
72
80
  (0, better_opn_1.default)(`http://localhost:${port}`);
73
81
  await new Promise(noop);
74
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.2.30",
3
+ "version": "3.2.31",
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.30",
27
- "@remotion/media-utils": "3.2.30",
28
- "@remotion/player": "3.2.30",
29
- "@remotion/renderer": "3.2.30",
26
+ "@remotion/bundler": "3.2.31",
27
+ "@remotion/media-utils": "3.2.31",
28
+ "@remotion/player": "3.2.31",
29
+ "@remotion/renderer": "3.2.31",
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.30",
34
+ "remotion": "3.2.31",
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": "5dc5f4c010c47186c7911b575998296d6a65f7cb"
74
+ "gitHead": "f011b454d78903e548c32f548d8fef642c5ff7a6"
75
75
  }
@@ -1,4 +0,0 @@
1
- export declare const setAudioBitrate: (bitrate: string) => void;
2
- export declare const getAudioBitrate: () => string | null;
3
- export declare const setVideoBitrate: (bitrate: string) => void;
4
- export declare const getVideoBitrate: () => string | null;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getVideoBitrate = exports.setVideoBitrate = exports.getAudioBitrate = exports.setAudioBitrate = void 0;
4
- let audioBitrate;
5
- const setAudioBitrate = (bitrate) => {
6
- audioBitrate = bitrate;
7
- };
8
- exports.setAudioBitrate = setAudioBitrate;
9
- const getAudioBitrate = () => {
10
- return audioBitrate;
11
- };
12
- exports.getAudioBitrate = getAudioBitrate;
13
- let videoBitrate;
14
- const setVideoBitrate = (bitrate) => {
15
- videoBitrate = bitrate;
16
- };
17
- exports.setVideoBitrate = setVideoBitrate;
18
- const getVideoBitrate = () => {
19
- return videoBitrate;
20
- };
21
- exports.getVideoBitrate = getVideoBitrate;
@@ -1 +0,0 @@
1
- export declare const initializeRenderCli: (remotionRoot: string, type: 'still' | 'sequence' | 'lambda' | 'preview') => Promise<void>;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initializeRenderCli = void 0;
4
- const get_config_file_name_1 = require("./get-config-file-name");
5
- const log_1 = require("./log");
6
- const parse_command_line_1 = require("./parse-command-line");
7
- const initializeRenderCli = async (remotionRoot, type) => {
8
- const appliedName = await (0, get_config_file_name_1.loadConfig)(remotionRoot);
9
- (0, parse_command_line_1.parseCommandLine)(type);
10
- // Only now Log.verbose is available
11
- log_1.Log.verbose('Remotion root directory:', remotionRoot);
12
- if (remotionRoot !== process.cwd()) {
13
- log_1.Log.warn(`Warning: The root directory of your project is ${remotionRoot}, but you are executing this command from ${process.cwd()}. The recommendation is to execute commands from the root directory.`);
14
- }
15
- if (appliedName) {
16
- log_1.Log.verbose(`Applied configuration from ${appliedName}.`);
17
- }
18
- else {
19
- log_1.Log.verbose('No config file loaded.');
20
- }
21
- };
22
- exports.initializeRenderCli = initializeRenderCli;
@@ -1,2 +0,0 @@
1
- import type { ImageFormat } from '@remotion/renderer';
2
- export declare const validateImageFormat: (imageFormat: ImageFormat, outName: string | null) => void;
@@ -1,15 +0,0 @@
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;