@remotion/cli 4.0.30 → 4.0.32

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.
@@ -0,0 +1,2 @@
1
+ export declare const getEnableFolderExpiry: () => boolean | null;
2
+ export declare const setEnableFolderExpiry: (value: boolean | null) => void;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setEnableFolderExpiry = exports.getEnableFolderExpiry = void 0;
4
+ let enableFolderExpiry = null;
5
+ const getEnableFolderExpiry = () => {
6
+ return enableFolderExpiry;
7
+ };
8
+ exports.getEnableFolderExpiry = getEnableFolderExpiry;
9
+ const setEnableFolderExpiry = (value) => {
10
+ enableFolderExpiry = value;
11
+ };
12
+ exports.setEnableFolderExpiry = setEnableFolderExpiry;
@@ -4,6 +4,7 @@ import type { BrowserExecutable, CodecOrUndefined, ColorSpace, Crf, FrameRange,
4
4
  import type { Concurrency } from './concurrency';
5
5
  import type { Loop } from './number-of-gif-loops';
6
6
  import type { WebpackOverrideFn } from './override-webpack';
7
+ export type { Concurrency, WebpackConfiguration, WebpackOverrideFn };
7
8
  declare global {
8
9
  interface RemotionBundlingOptions {
9
10
  /**
@@ -251,6 +252,11 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
251
252
  */
252
253
  setAudioCodec: (codec: 'pcm-16' | 'aac' | 'mp3' | 'opus') => void;
253
254
  setOffthreadVideoCacheSizeInBytes: (size: number | null) => void;
255
+ setDeleteAfter: (day: '1-day' | '3-days' | '7-days' | '30-days' | null) => void;
256
+ /**
257
+ *
258
+ */
259
+ setEnableFolderExpiry: (value: boolean | null) => void;
254
260
  /**
255
261
  * @deprecated 'The config format has changed. Change `Config.Bundling.*()` calls to `Config.*()` in your config file.'
256
262
  */
@@ -277,7 +283,6 @@ type FlatConfig = RemotionConfigObject & RemotionBundlingOptions & {
277
283
  Output: void;
278
284
  };
279
285
  export declare const Config: FlatConfig;
280
- export type { Concurrency, WebpackConfiguration, WebpackOverrideFn };
281
286
  export declare const ConfigInternals: {
282
287
  getRange: () => FrameRange | null;
283
288
  getOutputCodecOrUndefined: () => CodecOrUndefined;
@@ -331,5 +336,7 @@ export declare const ConfigInternals: {
331
336
  getShouldOpenBrowser: () => boolean;
332
337
  getChromiumUserAgent: () => string | null;
333
338
  getOffthreadVideoCacheSizeInBytes: () => number | null;
339
+ getDeleteAfter: () => ("1-day" | "3-days" | "7-days" | "30-days") | null;
334
340
  getColorSpace: () => "default" | "bt709";
341
+ getEnableFolderExpiry: () => boolean | null;
335
342
  };
@@ -29,6 +29,7 @@ const browser_executable_1 = require("./browser-executable");
29
29
  const chromium_flags_1 = require("./chromium-flags");
30
30
  const codec_1 = require("./codec");
31
31
  const concurrency_1 = require("./concurrency");
32
+ const enable_folder_expiry_1 = require("./enable-folder-expiry");
32
33
  const env_file_1 = require("./env-file");
33
34
  const frame_range_1 = require("./frame-range");
34
35
  const image_format_1 = require("./image-format");
@@ -42,6 +43,7 @@ const overwrite_1 = require("./overwrite");
42
43
  const pixel_format_1 = require("./pixel-format");
43
44
  const preview_server_1 = require("./preview-server");
44
45
  const prores_profile_1 = require("./prores-profile");
46
+ const render_folder_expiry_1 = require("./render-folder-expiry");
45
47
  const scale_1 = require("./scale");
46
48
  const still_frame_1 = require("./still-frame");
47
49
  const timeout_1 = require("./timeout");
@@ -156,7 +158,9 @@ exports.Config = {
156
158
  overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
157
159
  setAudioCodec: audio_codec_1.setAudioCodec,
158
160
  setOffthreadVideoCacheSizeInBytes: offthread_video_cache_size_1.setOffthreadVideoCacheSizeInBytes,
161
+ setDeleteAfter: render_folder_expiry_1.setDeleteAfter,
159
162
  setColorSpace: color_space_1.setColorSpace,
163
+ setEnableFolderExpiry: enable_folder_expiry_1.setEnableFolderExpiry,
160
164
  };
161
165
  exports.ConfigInternals = {
162
166
  getRange: frame_range_1.getRange,
@@ -209,5 +213,7 @@ exports.ConfigInternals = {
209
213
  getShouldOpenBrowser: open_browser_1.getShouldOpenBrowser,
210
214
  getChromiumUserAgent: user_agent_1.getChromiumUserAgent,
211
215
  getOffthreadVideoCacheSizeInBytes: offthread_video_cache_size_1.getOffthreadVideoCacheSizeInBytes,
216
+ getDeleteAfter: render_folder_expiry_1.getDeleteAfter,
212
217
  getColorSpace: color_space_1.getColorSpace,
218
+ getEnableFolderExpiry: enable_folder_expiry_1.getEnableFolderExpiry,
213
219
  };
@@ -0,0 +1,3 @@
1
+ import type { x264Preset } from '@remotion/renderer';
2
+ export declare const getPresetProfile: () => x264Preset | undefined;
3
+ export declare const setPresetProfile: (profile: x264Preset | undefined) => void;
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,4 @@
1
+ type Value = '1-day' | '3-days' | '7-days' | '30-days';
2
+ export declare const getDeleteAfter: () => Value | null;
3
+ export declare const setDeleteAfter: (day: Value | null) => void;
4
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setDeleteAfter = exports.getDeleteAfter = void 0;
4
+ let deleteAfter = null;
5
+ const getDeleteAfter = () => {
6
+ return deleteAfter;
7
+ };
8
+ exports.getDeleteAfter = getDeleteAfter;
9
+ const setDeleteAfter = (day) => {
10
+ deleteAfter = day;
11
+ };
12
+ exports.setDeleteAfter = setDeleteAfter;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { Bug } from './UpdateCheck';
3
+ export declare const KnownBugs: React.FC<{
4
+ bugs: Bug[];
5
+ }>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KnownBugs = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const OpenIssueButton_1 = require("./UpdateModal/OpenIssueButton");
6
+ const container = {
7
+ display: 'flex',
8
+ flexDirection: 'row',
9
+ alignItems: 'center',
10
+ };
11
+ const KnownBugs = ({ bugs }) => {
12
+ const bugElements = bugs.map((bug) => {
13
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsxs)("div", { children: ["\uD83E\uDEB2 ", bug.title] }), (0, jsx_runtime_1.jsx)(OpenIssueButton_1.OpenIssueButton, { link: bug.link })] }, bug.description + bug.link));
14
+ });
15
+ return (0, jsx_runtime_1.jsx)("div", { children: bugElements });
16
+ };
17
+ exports.KnownBugs = KnownBugs;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const OpenIssueButton: React.FC<{
3
+ link: string;
4
+ }>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OpenIssueButton = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
7
+ const svgStyle = {
8
+ width: '11px',
9
+ height: '11px',
10
+ };
11
+ const buttonStyle = {
12
+ border: 'none',
13
+ width: '24px',
14
+ height: '24px',
15
+ display: 'flex',
16
+ justifyContent: 'center',
17
+ alignItems: 'center',
18
+ };
19
+ const OpenIssueButton = ({ link }) => {
20
+ const [hovered, setHovered] = (0, react_1.useState)(false);
21
+ const buttonTooltip = `Open GitHub issue in new Tab`;
22
+ const handleClick = (0, react_1.useCallback)(() => {
23
+ window.open(link, '_blank');
24
+ }, [link]);
25
+ const svgFillColor = (0, react_1.useMemo)(() => {
26
+ return hovered ? 'white' : colors_1.LIGHT_TEXT;
27
+ }, [hovered]);
28
+ const openInEditorSvg = ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", style: svgStyle, children: (0, jsx_runtime_1.jsx)("path", { fill: svgFillColor, d: "M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z" }) }));
29
+ const onPointerEnter = (0, react_1.useCallback)(() => {
30
+ setHovered(true);
31
+ }, []);
32
+ const onPointerLeave = (0, react_1.useCallback)(() => {
33
+ setHovered(false);
34
+ }, []);
35
+ return ((0, jsx_runtime_1.jsx)("button", { title: buttonTooltip, type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: buttonStyle, onClick: handleClick, children: openInEditorSvg }));
36
+ };
37
+ exports.OpenIssueButton = OpenIssueButton;
@@ -36,5 +36,6 @@ export declare const getCliOptions: (options: {
36
36
  width: number | null;
37
37
  configFileImageFormat: "png" | "jpeg" | "none" | undefined;
38
38
  offthreadVideoCacheSizeInBytes: number | null;
39
+ deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
39
40
  colorSpace: "default" | "bt709";
40
41
  }>;
@@ -128,6 +128,7 @@ const getCliOptions = async (options) => {
128
128
  width,
129
129
  configFileImageFormat: config_1.ConfigInternals.getUserPreferredVideoImageFormat(),
130
130
  offthreadVideoCacheSizeInBytes: config_1.ConfigInternals.getOffthreadVideoCacheSizeInBytes(),
131
+ deleteAfter: config_1.ConfigInternals.getDeleteAfter(),
131
132
  colorSpace: config_1.ConfigInternals.getColorSpace(),
132
133
  };
133
134
  };
@@ -0,0 +1,2 @@
1
+ import type { LogLevel } from '@remotion/renderer';
2
+ export declare const handleCommonError: (err: Error, logLevel: LogLevel) => Promise<void>;
@@ -0,0 +1,60 @@
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;
package/dist/index.d.ts CHANGED
@@ -121,6 +121,7 @@ export declare const CliInternals: {
121
121
  width: number | null;
122
122
  configFileImageFormat: "png" | "jpeg" | "none" | undefined;
123
123
  offthreadVideoCacheSizeInBytes: number | null;
124
+ deleteAfter: ("1-day" | "3-days" | "7-days" | "30-days") | null;
124
125
  colorSpace: "default" | "bt709";
125
126
  }>;
126
127
  loadConfig: (remotionRoot: string) => Promise<string | null>;
@@ -183,6 +184,8 @@ export declare const CliInternals: {
183
184
  "user-agent": string;
184
185
  "offthreadvideo-cache-size-in-bytes": number | null;
185
186
  "color-space": "default" | "bt709";
187
+ "delete-after": string | undefined;
188
+ "enable-folder-expiry": boolean | undefined;
186
189
  } & {
187
190
  _: string[];
188
191
  };
@@ -58,6 +58,8 @@ type CommandLineOptions = {
58
58
  ['browser']: string;
59
59
  ['browser-args']: string;
60
60
  ['user-agent']: string;
61
+ [BrowserSafeApis.options.deleteAfterOption.cliFlag]: string | undefined;
62
+ [BrowserSafeApis.options.folderExpiryOption.cliFlag]: boolean | undefined;
61
63
  };
62
64
  export declare const BooleanFlags: string[];
63
65
  export declare const parsedCli: CommandLineOptions & {
@@ -148,9 +148,15 @@ const parseCommandLine = () => {
148
148
  if (typeof exports.parsedCli['offthreadvideo-cache-size-in-bytes'] !== 'undefined') {
149
149
  config_1.Config.setOffthreadVideoCacheSizeInBytes(exports.parsedCli['offthreadvideo-cache-size-in-bytes']);
150
150
  }
151
+ if (typeof exports.parsedCli['delete-after'] !== 'undefined') {
152
+ config_1.Config.setDeleteAfter(exports.parsedCli['delete-after']);
153
+ }
151
154
  if (typeof exports.parsedCli['color-space'] !== 'undefined') {
152
155
  config_1.Config.setColorSpace(exports.parsedCli['color-space']);
153
156
  }
157
+ if (typeof exports.parsedCli['enable-folder-expiry'] !== 'undefined') {
158
+ config_1.Config.setEnableFolderExpiry(exports.parsedCli['enable-folder-expiry']);
159
+ }
154
160
  };
155
161
  exports.parseCommandLine = parseCommandLine;
156
162
  const quietFlagProvided = () => exports.parsedCli.quiet || exports.parsedCli.q;
@@ -137,10 +137,12 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
137
137
  progress: 1,
138
138
  doneIn: Date.now() - bundleStartTime,
139
139
  };
140
+ log_1.Log.verboseAdvanced({ logLevel, indent }, 'Bundling done in', bundlingState.doneIn + 'ms');
140
141
  copyingState = {
141
142
  ...copyingState,
142
143
  doneIn: copyStart ? Date.now() - copyStart : 0,
143
144
  };
145
+ log_1.Log.verboseAdvanced({ logLevel, indent }, 'Copying done in ', copyingState.doneIn + 'ms');
144
146
  updateProgress(true);
145
147
  log_1.Log.verboseAdvanced({ indent, logLevel }, 'Bundled under', bundled);
146
148
  const cacheExistedAfter = bundler_1.BundlerInternals.cacheExists(remotionRoot, 'production', hash) === 'exists';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.30",
3
+ "version": "4.0.32",
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.30",
39
- "@remotion/media-utils": "4.0.30",
40
- "remotion": "4.0.30",
41
- "@remotion/renderer": "4.0.30",
42
- "@remotion/player": "4.0.30"
38
+ "@remotion/media-utils": "4.0.32",
39
+ "remotion": "4.0.32",
40
+ "@remotion/player": "4.0.32",
41
+ "@remotion/renderer": "4.0.32",
42
+ "@remotion/bundler": "4.0.32"
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.30",
69
- "@remotion/tailwind": "4.0.30"
68
+ "@remotion/zod-types": "4.0.32",
69
+ "@remotion/tailwind": "4.0.32"
70
70
  },
71
71
  "keywords": [
72
72
  "remotion",