@remotion/cli 4.1.0-alpha4 → 4.1.0-alpha5
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/chalk/index.d.ts +2 -1
- package/dist/config/log.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/local-state.js +9 -3
- package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/get-composition-id.d.ts +2 -2
- package/dist/get-composition-id.js +5 -1
- package/dist/get-composition-with-dimension-override.d.ts +2 -2
- package/dist/handle-common-errors.js +4 -0
- package/dist/index.d.ts +10 -9
- package/dist/log.d.ts +3 -3
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/dev-middleware/setup-hooks.js +1 -1
- package/dist/preview-server/routes.d.ts +0 -1
- package/package.json +8 -8
package/dist/chalk/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const chalk: {
|
|
2
|
-
enabled: boolean;
|
|
2
|
+
enabled: () => boolean;
|
|
3
3
|
visible: boolean;
|
|
4
4
|
styles: Record<string, {
|
|
5
5
|
codes: [number, number];
|
|
@@ -23,6 +23,7 @@ export declare const chalk: {
|
|
|
23
23
|
yellow: (str: string) => string;
|
|
24
24
|
blue: (str: string) => string;
|
|
25
25
|
magenta: (str: string) => string;
|
|
26
|
+
cyan: (str: string) => string;
|
|
26
27
|
white: (str: string) => string;
|
|
27
28
|
gray: (str: string) => string;
|
|
28
29
|
bgBlack: (str: string) => string;
|
package/dist/config/log.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getLogLevel: () => "
|
|
1
|
+
export declare const getLogLevel: () => "verbose" | "info" | "warn" | "error", setLogLevel: (newLogLevel: "verbose" | "info" | "warn" | "error") => void;
|
|
@@ -12,6 +12,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
12
12
|
status: 'error' | 'warning' | 'ok';
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
|
-
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | "rightAlign"
|
|
15
|
+
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(255, 255, 255, 0.05)" | "rgba(0, 0, 0, 0.6)" | "#ff3232" | "#f1c40f";
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status" | "rightAlign"> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" |
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "status"> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -14,7 +14,7 @@ export declare const RenderModalBasic: React.FC<{
|
|
|
14
14
|
setProResProfile: React.Dispatch<React.SetStateAction<ProResProfile>>;
|
|
15
15
|
frame: number;
|
|
16
16
|
setFrame: React.Dispatch<React.SetStateAction<number>>;
|
|
17
|
-
resolvedComposition: TCompMetadata<AnyZodObject, Record<string, unknown
|
|
17
|
+
resolvedComposition: TCompMetadata<AnyZodObject, Record<string, unknown>>;
|
|
18
18
|
setOutName: (value: React.SetStateAction<string>) => void;
|
|
19
19
|
setEndFrame: React.Dispatch<React.SetStateAction<number | null>>;
|
|
20
20
|
startFrame: number;
|
|
@@ -11,16 +11,22 @@ const useLocalState = ({ value, schema, setValue, defaultValue, }) => {
|
|
|
11
11
|
const parentRevision = (0, react_1.useContext)(RevisionContext).childResetRevision;
|
|
12
12
|
const [resetRevision, setResetRevision] = (0, react_1.useState)(0);
|
|
13
13
|
const [localValue, setLocalValue] = (0, react_1.useState)(() => {
|
|
14
|
-
return {
|
|
14
|
+
return {
|
|
15
|
+
[parentRevision]: {
|
|
16
|
+
value,
|
|
17
|
+
keyStabilityRevision: 0,
|
|
18
|
+
zodValidation: schema.safeParse(value),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
15
21
|
});
|
|
16
22
|
const currentLocalValue = (0, react_1.useMemo)(() => {
|
|
17
23
|
var _a;
|
|
18
24
|
return ((_a = localValue[parentRevision]) !== null && _a !== void 0 ? _a : {
|
|
19
25
|
value: defaultValue,
|
|
20
26
|
keyStabilityRevision: 0,
|
|
21
|
-
zodValidation: schema.safeParse(
|
|
27
|
+
zodValidation: schema.safeParse(defaultValue),
|
|
22
28
|
});
|
|
23
|
-
}, [defaultValue, localValue, parentRevision, schema
|
|
29
|
+
}, [defaultValue, localValue, parentRevision, schema]);
|
|
24
30
|
const stateRef = (0, react_1.useRef)(currentLocalValue);
|
|
25
31
|
stateRef.current = currentLocalValue;
|
|
26
32
|
const onChange = (0, react_1.useCallback)(
|
|
@@ -20,7 +20,7 @@ export declare const getCliOptions: (options: {
|
|
|
20
20
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
21
21
|
stillFrame: number;
|
|
22
22
|
browserExecutable: BrowserExecutable;
|
|
23
|
-
logLevel: "
|
|
23
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
24
24
|
scale: number;
|
|
25
25
|
chromiumOptions: ChromiumOptions;
|
|
26
26
|
overwrite: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
2
|
-
import type {
|
|
2
|
+
import type { VideoConfig } from 'remotion';
|
|
3
3
|
export declare const getCompositionId: ({ args, compositionIdFromUi, inputProps, puppeteerInstance, envVariables, timeoutInMilliseconds, chromiumOptions, port, browserExecutable, serveUrlOrWebpackUrl, logLevel, indent, server, }: {
|
|
4
4
|
args: string[];
|
|
5
5
|
compositionIdFromUi: string | null;
|
|
@@ -17,6 +17,6 @@ export declare const getCompositionId: ({ args, compositionIdFromUi, inputProps,
|
|
|
17
17
|
}) => Promise<{
|
|
18
18
|
compositionId: string;
|
|
19
19
|
reason: string;
|
|
20
|
-
config:
|
|
20
|
+
config: VideoConfig;
|
|
21
21
|
argsAfterComposition: string[];
|
|
22
22
|
}>;
|
|
@@ -4,6 +4,7 @@ exports.getCompositionId = void 0;
|
|
|
4
4
|
const renderer_1 = require("@remotion/renderer");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const show_compositions_picker_1 = require("./show-compositions-picker");
|
|
7
|
+
const format_bytes_1 = require("./format-bytes");
|
|
7
8
|
const getCompName = ({ cliArgs, compositionIdFromUi, }) => {
|
|
8
9
|
if (compositionIdFromUi) {
|
|
9
10
|
return {
|
|
@@ -21,7 +22,7 @@ const getCompositionId = async ({ args, compositionIdFromUi, inputProps, puppete
|
|
|
21
22
|
compositionIdFromUi,
|
|
22
23
|
});
|
|
23
24
|
if (compName) {
|
|
24
|
-
const config = await renderer_1.RenderInternals.internalSelectComposition({
|
|
25
|
+
const { metadata: config, propsSize } = await renderer_1.RenderInternals.internalSelectComposition({
|
|
25
26
|
id: compName,
|
|
26
27
|
inputProps,
|
|
27
28
|
puppeteerInstance,
|
|
@@ -36,6 +37,9 @@ const getCompositionId = async ({ args, compositionIdFromUi, inputProps, puppete
|
|
|
36
37
|
indent,
|
|
37
38
|
onBrowserLog: null,
|
|
38
39
|
});
|
|
40
|
+
if (propsSize > 10000000) {
|
|
41
|
+
log_1.Log.warn(`The props of your composition are large (${(0, format_bytes_1.formatBytes)(propsSize)}). This may cause slowdown.`);
|
|
42
|
+
}
|
|
39
43
|
if (!config) {
|
|
40
44
|
throw new Error(`Cannot find composition with ID "${compName}"`);
|
|
41
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BrowserExecutable, ChromiumOptions, HeadlessBrowser, LogLevel, RemotionServer } from '@remotion/renderer';
|
|
2
|
-
import type {
|
|
2
|
+
import type { VideoConfig } from 'remotion';
|
|
3
3
|
export declare const getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, inputProps, logLevel, server, }: {
|
|
4
4
|
height: number | null;
|
|
5
5
|
width: number | null;
|
|
@@ -19,6 +19,6 @@ export declare const getCompositionWithDimensionOverride: ({ height, width, args
|
|
|
19
19
|
}) => Promise<{
|
|
20
20
|
compositionId: string;
|
|
21
21
|
reason: string;
|
|
22
|
-
config:
|
|
22
|
+
config: VideoConfig;
|
|
23
23
|
argsAfterComposition: string[];
|
|
24
24
|
}>;
|
|
@@ -48,5 +48,9 @@ const handleCommonError = async (err, logLevel) => {
|
|
|
48
48
|
log_1.Log.info(' Oftentimes, this happens if the component is missing the `export` keyword');
|
|
49
49
|
log_1.Log.info(' or if the component was renamed and the import statement not properly adjusted.');
|
|
50
50
|
}
|
|
51
|
+
if (err.message.includes('GLIBC_')) {
|
|
52
|
+
log_1.Log.info('💡 Remotion requires at least Libc 2.34.');
|
|
53
|
+
log_1.Log.info('💡 Get help for this issue: https://github.com/remotion-dev/remotion/issues/2439');
|
|
54
|
+
}
|
|
51
55
|
};
|
|
52
56
|
exports.handleCommonError = handleCommonError;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const CliInternals: {
|
|
|
9
9
|
indent: boolean;
|
|
10
10
|
}) => import("./progress-bar").OverwriteableCliOutput;
|
|
11
11
|
chalk: {
|
|
12
|
-
enabled: boolean;
|
|
12
|
+
enabled: () => boolean;
|
|
13
13
|
visible: boolean;
|
|
14
14
|
styles: Record<string, {
|
|
15
15
|
codes: [number, number];
|
|
@@ -33,6 +33,7 @@ export declare const CliInternals: {
|
|
|
33
33
|
yellow: (str: string) => string;
|
|
34
34
|
blue: (str: string) => string;
|
|
35
35
|
magenta: (str: string) => string;
|
|
36
|
+
cyan: (str: string) => string;
|
|
36
37
|
white: (str: string) => string;
|
|
37
38
|
gray: (str: string) => string;
|
|
38
39
|
bgBlack: (str: string) => string;
|
|
@@ -62,19 +63,19 @@ export declare const CliInternals: {
|
|
|
62
63
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
63
64
|
verboseAdvanced: (options: {
|
|
64
65
|
indent: boolean;
|
|
65
|
-
logLevel: "
|
|
66
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
66
67
|
} & {
|
|
67
68
|
tag?: string | undefined;
|
|
68
69
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
69
70
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
70
71
|
infoAdvanced: (options: {
|
|
71
72
|
indent: boolean;
|
|
72
|
-
logLevel: "
|
|
73
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
73
74
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
74
75
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
75
76
|
warnAdvanced: (options: {
|
|
76
77
|
indent: boolean;
|
|
77
|
-
logLevel: "
|
|
78
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
78
79
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
79
80
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
80
81
|
};
|
|
@@ -98,7 +99,7 @@ export declare const CliInternals: {
|
|
|
98
99
|
numberOfGifLoops: import("./config/number-of-gif-loops").Loop;
|
|
99
100
|
stillFrame: number;
|
|
100
101
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
101
|
-
logLevel: "
|
|
102
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
102
103
|
scale: number;
|
|
103
104
|
chromiumOptions: import("@remotion/renderer").ChromiumOptions;
|
|
104
105
|
overwrite: boolean;
|
|
@@ -172,7 +173,7 @@ export declare const CliInternals: {
|
|
|
172
173
|
} & {
|
|
173
174
|
_: string[];
|
|
174
175
|
};
|
|
175
|
-
handleCommonError: (err: Error, logLevel: "
|
|
176
|
+
handleCommonError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
176
177
|
formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
|
|
177
178
|
locale: string;
|
|
178
179
|
bits?: boolean | undefined;
|
|
@@ -214,7 +215,7 @@ export declare const CliInternals: {
|
|
|
214
215
|
};
|
|
215
216
|
listOfRemotionPackages: string[];
|
|
216
217
|
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
217
|
-
logLevel: "
|
|
218
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
218
219
|
}) => boolean;
|
|
219
220
|
getCompositionWithDimensionOverride: ({ height, width, args, compositionIdFromUi, chromiumOptions, envVariables, port, puppeteerInstance, timeoutInMilliseconds, browserExecutable, serveUrlOrWebpackUrl, indent, inputProps, logLevel, server, }: {
|
|
220
221
|
height: number | null;
|
|
@@ -229,13 +230,13 @@ export declare const CliInternals: {
|
|
|
229
230
|
browserExecutable: import("@remotion/renderer").BrowserExecutable;
|
|
230
231
|
serveUrlOrWebpackUrl: string;
|
|
231
232
|
indent: boolean;
|
|
232
|
-
logLevel: "
|
|
233
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
233
234
|
inputProps: Record<string, unknown>;
|
|
234
235
|
server: import("@remotion/renderer").RemotionServer;
|
|
235
236
|
}) => Promise<{
|
|
236
237
|
compositionId: string;
|
|
237
238
|
reason: string;
|
|
238
|
-
config: import("remotion").
|
|
239
|
+
config: import("remotion").VideoConfig;
|
|
239
240
|
argsAfterComposition: string[];
|
|
240
241
|
}>;
|
|
241
242
|
};
|
package/dist/log.d.ts
CHANGED
|
@@ -2,19 +2,19 @@ export declare const Log: {
|
|
|
2
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
3
3
|
verboseAdvanced: (options: {
|
|
4
4
|
indent: boolean;
|
|
5
|
-
logLevel: "
|
|
5
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
6
6
|
} & {
|
|
7
7
|
tag?: string | undefined;
|
|
8
8
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
9
9
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
infoAdvanced: (options: {
|
|
11
11
|
indent: boolean;
|
|
12
|
-
logLevel: "
|
|
12
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
13
13
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
14
14
|
warn: (message?: any, ...optionalParams: any[]) => void;
|
|
15
15
|
warnAdvanced: (options: {
|
|
16
16
|
indent: boolean;
|
|
17
|
-
logLevel: "
|
|
17
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
18
18
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
19
19
|
error: (message?: any, ...optionalParams: any[]) => void;
|
|
20
20
|
};
|
|
@@ -11,5 +11,5 @@ type Range = {
|
|
|
11
11
|
type Ranges = Range[] & {
|
|
12
12
|
type?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare function parseRange(size: number, str: string | string[]): -1 |
|
|
14
|
+
export declare function parseRange(size: number, str: string | string[]): -1 | -2 | Ranges;
|
|
15
15
|
export {};
|
|
@@ -23,7 +23,7 @@ function setupHooks(context) {
|
|
|
23
23
|
logger.log('Compilation finished');
|
|
24
24
|
const statsOptions = {
|
|
25
25
|
preset: 'errors-warnings',
|
|
26
|
-
colors: renderer_1.RenderInternals.isColorSupported,
|
|
26
|
+
colors: renderer_1.RenderInternals.isColorSupported(),
|
|
27
27
|
};
|
|
28
28
|
const printedStats = stats.toString(statsOptions);
|
|
29
29
|
const lines = printedStats
|
|
@@ -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: ({ 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.1.0-
|
|
3
|
+
"version": "4.1.0-alpha5",
|
|
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.3.5",
|
|
37
37
|
"source-map": "0.6.1",
|
|
38
|
-
"@remotion/
|
|
39
|
-
"@remotion/
|
|
40
|
-
"@remotion/
|
|
41
|
-
"@remotion/
|
|
42
|
-
"remotion": "4.1.0-
|
|
38
|
+
"@remotion/media-utils": "4.1.0-alpha5",
|
|
39
|
+
"@remotion/player": "4.1.0-alpha5",
|
|
40
|
+
"@remotion/renderer": "4.1.0-alpha5",
|
|
41
|
+
"@remotion/bundler": "4.1.0-alpha5",
|
|
42
|
+
"remotion": "4.1.0-alpha5"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"typescript": "4.9.5",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.21.4",
|
|
68
|
-
"@remotion/
|
|
69
|
-
"@remotion/
|
|
68
|
+
"@remotion/tailwind": "4.1.0-alpha5",
|
|
69
|
+
"@remotion/zod-types": "4.1.0-alpha5"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|