@remotion/cli 4.0.48 → 4.0.50

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/LICENSE.md CHANGED
@@ -7,7 +7,7 @@ Depending on the type of your legal entity, you are granted permission to use Re
7
7
 
8
8
  ## Free license
9
9
 
10
- Copyright © 2023 [Remotion](https://www.remotion.dev/)
10
+ Copyright © 2023 [Remotion](https://www.remotion.dev)
11
11
 
12
12
  ### Eligibility
13
13
 
@@ -36,6 +36,10 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
36
36
 
37
37
  ## Company license
38
38
 
39
- You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
39
+ You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](https://www.remotion.dev/docs/support)).
40
40
 
41
- Visit [remotion.pro](https://www.remotion.pro) for pricing and to buy a license.
41
+ Visit [remotion.pro](https://www.remotion.pro/license) for pricing and to buy a license.
42
+
43
+ ### FAQs
44
+
45
+ Are you not sure whether you need a company license because of an edge case? Here are some [frequently asked questions](https://www.remotion.pro/faq).
@@ -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;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -18,6 +18,7 @@ const ZodObjectEditor_1 = require("./ZodObjectEditor");
18
18
  const ZodOptionalEditor_1 = require("./ZodOptionalEditor");
19
19
  const ZodStaticFileEditor_1 = require("./ZodStaticFileEditor");
20
20
  const ZodStringEditor_1 = require("./ZodStringEditor");
21
+ const ZodTextareaEditor_1 = require("./ZodTextareaEditor");
21
22
  const ZodUnionEditor_1 = require("./ZodUnionEditor");
22
23
  const ZodSwitch = ({ schema, jsonPath, value, setValue, defaultValue, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
23
24
  const def = schema._def;
@@ -35,6 +36,11 @@ const ZodSwitch = ({ schema, jsonPath, value, setValue, defaultValue, onSave, sh
35
36
  if (value.startsWith(window.remotion_staticBase)) {
36
37
  return ((0, jsx_runtime_1.jsx)(ZodStaticFileEditor_1.ZodStaticFileEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
37
38
  }
39
+ if (zodTypes &&
40
+ schema._def.description ===
41
+ zodTypes.ZodZypesInternals.REMOTION_TEXTAREA_BRAND) {
42
+ return ((0, jsx_runtime_1.jsx)(ZodTextareaEditor_1.ZodTextareaEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onSave: onSave, defaultValue: defaultValue, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
43
+ }
38
44
  return ((0, jsx_runtime_1.jsx)(ZodStringEditor_1.ZodStringEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onSave: onSave, defaultValue: defaultValue, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
39
45
  }
40
46
  if (typeName === z.ZodFirstPartyTypeKind.ZodDate) {
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { z } from 'zod';
3
+ import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
+ export declare const ZodTextareaEditor: React.FC<{
6
+ schema: z.ZodTypeAny;
7
+ jsonPath: JSONPath;
8
+ value: string;
9
+ defaultValue: string;
10
+ setValue: UpdaterFunction<string>;
11
+ onSave: UpdaterFunction<string>;
12
+ onRemove: null | (() => void);
13
+ showSaveButton: boolean;
14
+ saving: boolean;
15
+ saveDisabledByParent: boolean;
16
+ mayPad: boolean;
17
+ }>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZodTextareaEditor = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const get_zod_if_possible_1 = require("../../get-zod-if-possible");
7
+ const RemTextarea_1 = require("../../NewComposition/RemTextarea");
8
+ const Fieldset_1 = require("./Fieldset");
9
+ const local_state_1 = require("./local-state");
10
+ const SchemaLabel_1 = require("./SchemaLabel");
11
+ const ZodFieldValidation_1 = require("./ZodFieldValidation");
12
+ const fullWidth = {
13
+ width: '100%',
14
+ };
15
+ const textareaStyle = {
16
+ resize: 'vertical',
17
+ minHeight: 100,
18
+ };
19
+ const ZodTextareaEditor = ({ jsonPath, value, setValue, showSaveButton, defaultValue, schema, onSave, onRemove, saving, saveDisabledByParent, mayPad, }) => {
20
+ const z = (0, get_zod_if_possible_1.useZodIfPossible)();
21
+ if (!z) {
22
+ throw new Error('expected zod');
23
+ }
24
+ const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
25
+ if (!zodTypes) {
26
+ throw new Error('expected zod textarea');
27
+ }
28
+ const { localValue, onChange: setLocalValue, reset, } = (0, local_state_1.useLocalState)({
29
+ schema,
30
+ setValue,
31
+ value,
32
+ defaultValue,
33
+ });
34
+ const onChange = (0, react_1.useCallback)((e) => {
35
+ setLocalValue(() => e.target.value, false, false);
36
+ }, [setLocalValue]);
37
+ const save = (0, react_1.useCallback)(() => {
38
+ onSave(() => value, false, false);
39
+ }, [onSave, value]);
40
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null }), (0, jsx_runtime_1.jsxs)("div", { style: fullWidth, children: [(0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { onChange: onChange, value: localValue.value, status: localValue.zodValidation ? 'ok' : 'error', placeholder: jsonPath.join('.'), name: jsonPath.join('.'), style: textareaStyle }), (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] })] }));
41
+ };
42
+ exports.ZodTextareaEditor = ZodTextareaEditor;
@@ -67,6 +67,11 @@ const createZodValues = (schema, zodRuntime, zodTypes) => {
67
67
  zodTypes.ZodZypesInternals.REMOTION_COLOR_BRAND) {
68
68
  return '#ffffff';
69
69
  }
70
+ if (zodTypes &&
71
+ schema._def.description ===
72
+ zodTypes.ZodZypesInternals.REMOTION_TEXTAREA_BRAND) {
73
+ return '';
74
+ }
70
75
  return (0, exports.createZodValues)(def.schema, zodRuntime, zodTypes);
71
76
  }
72
77
  case zodRuntime.ZodFirstPartyTypeKind.ZodIntersection: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Codec } from '@remotion/renderer';
3
2
  import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
4
3
  type Section = 'general' | 'picture' | 'advanced' | 'data' | 'gif' | 'audio';
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingMessage, ServerResponse } from 'node:http';
3
2
  import type { LiveEventsServer } from './live-events';
4
3
  export declare const handleRoutes: ({ staticHash, staticHashPrefix, outputHash, outputHashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
@@ -79,8 +79,10 @@ const startServer = async (options) => {
79
79
  });
80
80
  const desiredPort = (_d = (_c = options === null || options === void 0 ? void 0 : options.port) !== null && _c !== void 0 ? _c : (process.env.PORT ? Number(process.env.PORT) : undefined)) !== null && _d !== void 0 ? _d : undefined;
81
81
  const maxTries = 5;
82
- // Default Node.js host, but explicity
83
- const host = '0.0.0.0';
82
+ const host = renderer_1.RenderInternals.isIpV6Supported() ? '::' : '0.0.0.0';
83
+ const hostsToTry = renderer_1.RenderInternals.isIpV6Supported()
84
+ ? ['::', '::1']
85
+ : ['0.0.0.0', '127.0.0.1'];
84
86
  for (let i = 0; i < maxTries; i++) {
85
87
  try {
86
88
  const selectedPort = await new Promise((resolve, reject) => {
@@ -88,7 +90,7 @@ const startServer = async (options) => {
88
90
  desiredPort,
89
91
  from: 3000,
90
92
  to: 3100,
91
- hostsToTry: ['127.0.0.1', '0.0.0.0'],
93
+ hostsToTry,
92
94
  })
93
95
  .then(({ port, didUsePort }) => {
94
96
  server.listen({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "4.0.48",
3
+ "version": "4.0.50",
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.48",
39
- "@remotion/renderer": "4.0.48",
40
- "remotion": "4.0.48",
41
- "@remotion/player": "4.0.48",
42
- "@remotion/media-utils": "4.0.48"
38
+ "@remotion/bundler": "4.0.50",
39
+ "@remotion/media-utils": "4.0.50",
40
+ "@remotion/renderer": "4.0.50",
41
+ "remotion": "4.0.50",
42
+ "@remotion/player": "4.0.50"
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.22.3",
68
- "@remotion/zod-types": "4.0.48",
69
- "@remotion/tailwind": "4.0.48"
68
+ "@remotion/zod-types": "4.0.50",
69
+ "@remotion/tailwind": "4.0.50"
70
70
  },
71
71
  "keywords": [
72
72
  "remotion",