@remotion/cli 4.0.25 → 4.0.26

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.
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="bun-types" />
1
3
  export declare const openBrowser: ({ url, browserFlag, browserArgs, }: {
2
4
  url: string;
3
5
  browserFlag: string | undefined;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const CurrentComposition: () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const getNewCompositionCode: ({ type, height, width, fps, durationInFrames, name, raw, }: {
2
3
  type: 'still' | 'composition';
3
4
  height: number;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { PackageManager } from '../../preview-server/get-package-manager';
2
3
  export type UpdateInfo = {
3
4
  currentVersion: string;
@@ -1,8 +1,2 @@
1
- export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [
2
- string,
3
- string
4
- ][];
5
- export declare const envVariablesArrayToObject: (envVariables: [
6
- string,
7
- string
8
- ][]) => Record<string, string>;
1
+ export declare const envVariablesObjectToArray: (envVariables: Record<string, string>) => [string, string][];
2
+ export declare const envVariablesArrayToObject: (envVariables: [string, string][]) => Record<string, string>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Codec } from '@remotion/renderer';
2
3
  import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
3
4
  type Section = 'general' | 'picture' | 'advanced' | 'data' | 'gif' | 'audio';
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const Checkmark: () => JSX.Element;
package/dist/index.d.ts CHANGED
@@ -184,7 +184,7 @@ export declare const CliInternals: {
184
184
  } & {
185
185
  _: string[];
186
186
  };
187
- handleCommonError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
187
+ printError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
188
188
  formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
189
189
  locale: string;
190
190
  bits?: boolean | undefined;
package/dist/index.js CHANGED
@@ -35,7 +35,6 @@ const get_cli_options_1 = require("./get-cli-options");
35
35
  const get_composition_with_dimension_override_1 = require("./get-composition-with-dimension-override");
36
36
  const get_config_file_name_1 = require("./get-config-file-name");
37
37
  const get_final_output_codec_1 = require("./get-final-output-codec");
38
- const handle_common_errors_1 = require("./handle-common-errors");
39
38
  const image_formats_1 = require("./image-formats");
40
39
  const initialize_cli_1 = require("./initialize-cli");
41
40
  const lambda_command_1 = require("./lambda-command");
@@ -44,6 +43,7 @@ const log_1 = require("./log");
44
43
  const make_progress_bar_1 = require("./make-progress-bar");
45
44
  const parse_command_line_1 = require("./parse-command-line");
46
45
  const print_compositions_1 = require("./print-compositions");
46
+ const print_error_1 = require("./print-error");
47
47
  const print_help_1 = require("./print-help");
48
48
  const progress_bar_1 = require("./progress-bar");
49
49
  const render_1 = require("./render");
@@ -116,7 +116,7 @@ const cli = async () => {
116
116
  }
117
117
  catch (err) {
118
118
  log_1.Log.info();
119
- await (0, handle_common_errors_1.handleCommonError)(err, config_1.ConfigInternals.Logging.getLogLevel());
119
+ await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
120
120
  (0, cleanup_before_quit_1.cleanupBeforeQuit)();
121
121
  process.exit(1);
122
122
  }
@@ -138,7 +138,7 @@ exports.CliInternals = {
138
138
  BooleanFlags: parse_command_line_1.BooleanFlags,
139
139
  quietFlagProvided: parse_command_line_1.quietFlagProvided,
140
140
  parsedCli: parse_command_line_1.parsedCli,
141
- handleCommonError: handle_common_errors_1.handleCommonError,
141
+ printError: print_error_1.printError,
142
142
  formatBytes: format_bytes_1.formatBytes,
143
143
  getFileSizeDownloadBar: download_progress_1.getFileSizeDownloadBar,
144
144
  determineFinalStillImageFormat: determine_image_format_1.determineFinalStillImageFormat,
@@ -8,8 +8,8 @@ const node_path_1 = __importDefault(require("node:path"));
8
8
  const chalk_1 = require("../../chalk");
9
9
  const config_1 = require("../../config");
10
10
  const file_watcher_1 = require("../../file-watcher");
11
- const handle_common_errors_1 = require("../../handle-common-errors");
12
11
  const log_1 = require("../../log");
12
+ const print_error_1 = require("../../print-error");
13
13
  const progress_types_1 = require("../../progress-types");
14
14
  const live_events_1 = require("../live-events");
15
15
  const process_still_1 = require("./process-still");
@@ -196,7 +196,7 @@ const processJobIfPossible = async ({ remotionRoot, entryPoint, }) => {
196
196
  },
197
197
  };
198
198
  });
199
- await (0, handle_common_errors_1.handleCommonError)(err, config_1.ConfigInternals.Logging.getLogLevel());
199
+ await (0, print_error_1.printError)(err, config_1.ConfigInternals.Logging.getLogLevel());
200
200
  (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
201
201
  listener.sendEventToClient({
202
202
  type: 'render-job-failed',
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
3
  import type { LiveEventsServer } from './live-events';
3
4
  export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.25",
3
+ "version": "4.0.26",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -35,11 +35,11 @@
35
35
  "prompts": "2.4.1",
36
36
  "semver": "7.5.3",
37
37
  "source-map": "0.6.1",
38
- "@remotion/bundler": "4.0.25",
39
- "@remotion/media-utils": "4.0.25",
40
- "@remotion/player": "4.0.25",
41
- "@remotion/renderer": "4.0.25",
42
- "remotion": "4.0.25"
38
+ "@remotion/bundler": "4.0.26",
39
+ "@remotion/renderer": "4.0.26",
40
+ "@remotion/media-utils": "4.0.26",
41
+ "remotion": "4.0.26",
42
+ "@remotion/player": "4.0.26"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
@@ -65,8 +65,8 @@
65
65
  "react-dom": "^18.0.0",
66
66
  "vitest": "0.31.1",
67
67
  "zod": "^3.21.4",
68
- "@remotion/zod-types": "4.0.25",
69
- "@remotion/tailwind": "4.0.25"
68
+ "@remotion/zod-types": "4.0.26",
69
+ "@remotion/tailwind": "4.0.26"
70
70
  },
71
71
  "keywords": [
72
72
  "remotion",
@@ -1,3 +0,0 @@
1
- import type { x264Preset } from '@remotion/renderer';
2
- export declare const getPresetProfile: () => x264Preset | undefined;
3
- export declare const setPresetProfile: (profile: x264Preset | undefined) => void;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setPresetProfile = exports.getPresetProfile = void 0;
4
- let preset;
5
- const getPresetProfile = () => {
6
- return preset;
7
- };
8
- exports.getPresetProfile = getPresetProfile;
9
- const setPresetProfile = (profile) => {
10
- preset = profile;
11
- };
12
- exports.setPresetProfile = setPresetProfile;
@@ -1,2 +0,0 @@
1
- import type { LogLevel } from '@remotion/renderer';
2
- export declare const handleCommonError: (err: Error, logLevel: LogLevel) => Promise<void>;
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handleCommonError = void 0;
4
- const chalk_1 = require("./chalk");
5
- const log_1 = require("./log");
6
- const print_error_1 = require("./print-error");
7
- const truthy_1 = require("./truthy");
8
- const handleCommonError = async (err, logLevel) => {
9
- var _a;
10
- await (0, print_error_1.printError)(err, logLevel);
11
- if (err.message.includes('Could not play video with')) {
12
- log_1.Log.info();
13
- log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
14
- }
15
- if (err.message.includes('A delayRender()') &&
16
- err.message.includes('was called but not cleared after')) {
17
- log_1.Log.info();
18
- log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/timeout');
19
- }
20
- if (err.message.includes('Target closed')) {
21
- log_1.Log.info();
22
- log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/target-closed');
23
- }
24
- if (err.message.includes('ENAMETOOLONG')) {
25
- log_1.Log.info();
26
- log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/enametoolong');
27
- }
28
- if (err.message.includes('Error creating WebGL context')) {
29
- log_1.Log.info();
30
- log_1.Log.warn('💡 You might need to set the OpenGL renderer to "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
31
- log_1.Log.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
32
- }
33
- if (err.message.includes('The bucket does not allow ACLs')) {
34
- log_1.Log.info();
35
- log_1.Log.info(chalk_1.chalk.green('💡 Fix this issue https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl'));
36
- }
37
- if (err.message.includes('Minified React error #306')) {
38
- const componentName = (_a = err.message.match(/<\w+>/)) === null || _a === void 0 ? void 0 : _a[0];
39
- log_1.Log.info([
40
- '💡 This error indicates that the component',
41
- componentName ? `(${componentName})` : null,
42
- 'you are trying to render is not imported correctly.',
43
- ]
44
- .filter(truthy_1.truthy)
45
- .join(' '));
46
- log_1.Log.info();
47
- log_1.Log.info(' Check the root file and ensure that the component is not undefined.');
48
- log_1.Log.info(' Oftentimes, this happens if the component is missing the `export` keyword');
49
- log_1.Log.info(' or if the component was renamed and the import statement not properly adjusted.');
50
- }
51
- if (err.message.includes('GLIBC_')) {
52
- log_1.Log.info('💡 Remotion requires at least Libc 2.35.');
53
- log_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
54
- }
55
- if (err.message.includes('EBADF')) {
56
- log_1.Log.info('💡 This error might be fixed by changing your Node version:');
57
- log_1.Log.info(' https://github.com/remotion-dev/remotion/issues/2452');
58
- }
59
- };
60
- exports.handleCommonError = handleCommonError;