@remotion/cli 4.0.0-alpha6 → 4.0.0-alpha7
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/benchmark.js +9 -4
- package/dist/chalk/index.d.ts +45 -54
- package/dist/chalk/index.js +2 -135
- package/dist/codemods/stringify-with-path.d.ts +5 -0
- package/dist/codemods/stringify-with-path.js +44 -0
- package/dist/codemods/update-default-props.d.ts +3 -1
- package/dist/codemods/update-default-props.js +3 -17
- package/dist/compositions.js +1 -0
- package/dist/config/log.d.ts +1 -3
- package/dist/config/log.js +2 -9
- package/dist/download-progress.d.ts +1 -1
- package/dist/download-progress.js +1 -5
- package/dist/editor/components/NewComposition/ComboBox.js +2 -2
- package/dist/editor/components/NewComposition/MenuContent.js +1 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/RenderModal/RenderModalData.js +21 -7
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +8 -8
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +5 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +3 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +4 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +9 -6
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +40 -7
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.d.ts +16 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +73 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +5 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +4 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/extract-enum-json-paths.d.ts +3 -0
- package/dist/editor/components/RenderModal/SchemaEditor/extract-enum-json-paths.js +126 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +12 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +32 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +3 -2
- package/dist/editor/components/RenderModal/get-render-modal-warnings.js +9 -2
- package/dist/editor/components/RenderQueue/actions.d.ts +2 -1
- package/dist/editor/components/RenderQueue/actions.js +8 -4
- package/dist/editor/components/Timeline/TimelineSequence.js +6 -4
- package/dist/editor/helpers/calculate-timeline.js +1 -1
- package/dist/ffmpeg.js +6 -2
- package/dist/handle-common-errors.d.ts +2 -1
- package/dist/handle-common-errors.js +2 -2
- package/dist/index.d.ts +9 -5
- package/dist/index.js +4 -5
- package/dist/log.d.ts +5 -5
- package/dist/log.js +3 -42
- package/dist/parse-command-line.d.ts +1 -0
- package/dist/preview-server/dev-middleware/setup-hooks.js +2 -2
- package/dist/preview-server/render-queue/job.d.ts +2 -0
- package/dist/preview-server/render-queue/queue.js +2 -1
- package/dist/preview-server/routes/can-update-default-props.js +1 -0
- package/dist/preview-server/routes/update-default-props.js +4 -3
- package/dist/print-error.d.ts +2 -1
- package/dist/print-error.js +8 -5
- package/dist/progress-bar.d.ts +5 -4
- package/dist/progress-bar.js +42 -29
- package/dist/render-flows/render.js +46 -19
- package/dist/render-flows/still.js +17 -12
- package/dist/setup-cache.d.ts +2 -1
- package/dist/setup-cache.js +8 -4
- package/dist/should-use-non-overlaying-logger.d.ts +4 -0
- package/dist/should-use-non-overlaying-logger.js +12 -0
- package/dist/user-passed-output-location.js +7 -2
- package/package.json +7 -7
- package/dist/ansi/ansi-regex.d.ts +0 -2
- package/dist/ansi/ansi-regex.js +0 -18
- package/dist/cloudrun-command.d.ts +0 -1
- package/dist/cloudrun-command.js +0 -27
- package/dist/config/ffmpeg-executable.d.ts +0 -5
- package/dist/config/ffmpeg-executable.js +0 -21
- package/dist/config/quality.d.ts +0 -2
- package/dist/config/quality.js +0 -17
- package/dist/editor/components/ClipboardIcon.d.ts +0 -2
- package/dist/editor/components/ClipboardIcon.js +0 -12
- package/dist/editor/components/CollapsedCompositionSelector.d.ts +0 -4
- package/dist/editor/components/CollapsedCompositionSelector.js +0 -39
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +0 -6
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +0 -24
- package/dist/editor/components/RichTimelineToggle.d.ts +0 -2
- package/dist/editor/components/RichTimelineToggle.js +0 -29
- package/dist/editor/components/Thumbnail.d.ts +0 -8
- package/dist/editor/components/Thumbnail.js +0 -76
- package/dist/editor/helpers/use-compact-ui.d.ts +0 -1
- package/dist/editor/helpers/use-compact-ui.js +0 -18
- package/dist/editor/icons/film.d.ts +0 -3
- package/dist/editor/icons/film.js +0 -8
- package/dist/editor/icons/timeline.d.ts +0 -3
- package/dist/editor/icons/timeline.js +0 -9
- package/dist/editor/state/rich-timeline.d.ts +0 -9
- package/dist/editor/state/rich-timeline.js +0 -17
- package/dist/get-render-media-options.d.ts +0 -8
- package/dist/get-render-media-options.js +0 -55
- package/dist/install.d.ts +0 -2
- package/dist/install.js +0 -36
- package/dist/is-javascript.d.ts +0 -2
- package/dist/is-javascript.js +0 -9
- package/dist/preview-server/dev-middleware/is-color-supported.d.ts +0 -1
- package/dist/preview-server/dev-middleware/is-color-supported.js +0 -37
- package/dist/preview-server/hot-middleware/strip-ansi.d.ts +0 -1
- package/dist/preview-server/hot-middleware/strip-ansi.js +0 -21
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractEnumJsonPaths = void 0;
|
|
4
|
+
const extractEnumJsonPaths = (schema, zodRuntime, currentPath) => {
|
|
5
|
+
const def = schema._def;
|
|
6
|
+
const typeName = def.typeName;
|
|
7
|
+
switch (typeName) {
|
|
8
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodObject: {
|
|
9
|
+
const shape = def.shape();
|
|
10
|
+
const keys = Object.keys(shape);
|
|
11
|
+
return keys
|
|
12
|
+
.map((key) => {
|
|
13
|
+
return (0, exports.extractEnumJsonPaths)(shape[key], zodRuntime, [
|
|
14
|
+
...currentPath,
|
|
15
|
+
key,
|
|
16
|
+
]);
|
|
17
|
+
})
|
|
18
|
+
.flat(1);
|
|
19
|
+
}
|
|
20
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodArray: {
|
|
21
|
+
return (0, exports.extractEnumJsonPaths)(def.type, zodRuntime, [
|
|
22
|
+
...currentPath,
|
|
23
|
+
'[]',
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodUnion: {
|
|
27
|
+
return def.options
|
|
28
|
+
.map((option) => {
|
|
29
|
+
return (0, exports.extractEnumJsonPaths)(option, zodRuntime, currentPath);
|
|
30
|
+
})
|
|
31
|
+
.flat(1);
|
|
32
|
+
}
|
|
33
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: {
|
|
34
|
+
return def.options
|
|
35
|
+
.map((op) => {
|
|
36
|
+
return (0, exports.extractEnumJsonPaths)(op, zodRuntime, currentPath);
|
|
37
|
+
})
|
|
38
|
+
.flat(1);
|
|
39
|
+
}
|
|
40
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodLiteral: {
|
|
41
|
+
return [currentPath];
|
|
42
|
+
}
|
|
43
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodEffects: {
|
|
44
|
+
return (0, exports.extractEnumJsonPaths)(def.schema, zodRuntime, currentPath);
|
|
45
|
+
}
|
|
46
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodIntersection: {
|
|
47
|
+
const { left, right } = def;
|
|
48
|
+
const leftValue = (0, exports.extractEnumJsonPaths)(left, zodRuntime, currentPath);
|
|
49
|
+
const rightValue = (0, exports.extractEnumJsonPaths)(right, zodRuntime, currentPath);
|
|
50
|
+
return [...leftValue, ...rightValue];
|
|
51
|
+
}
|
|
52
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodTuple: {
|
|
53
|
+
return def.items
|
|
54
|
+
.map((item, i) => (0, exports.extractEnumJsonPaths)(item, zodRuntime, [...currentPath, i]))
|
|
55
|
+
.flat(1);
|
|
56
|
+
}
|
|
57
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodRecord: {
|
|
58
|
+
const values = (0, exports.extractEnumJsonPaths)(def.valueType, zodRuntime, [...currentPath, '{}']);
|
|
59
|
+
return values;
|
|
60
|
+
}
|
|
61
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodFunction: {
|
|
62
|
+
throw new Error('Cannot create a value for type function');
|
|
63
|
+
}
|
|
64
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodEnum: {
|
|
65
|
+
return [currentPath];
|
|
66
|
+
}
|
|
67
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodNativeEnum: {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodOptional: {
|
|
71
|
+
const defType = def;
|
|
72
|
+
const value = (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodNullable: {
|
|
76
|
+
const defType = def;
|
|
77
|
+
const value = (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodDefault: {
|
|
81
|
+
const defType = def;
|
|
82
|
+
return (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
|
|
83
|
+
}
|
|
84
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodCatch: {
|
|
85
|
+
const defType = def;
|
|
86
|
+
return (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
|
|
87
|
+
}
|
|
88
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodPromise: {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodBranded: {
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
93
|
+
const defType = def;
|
|
94
|
+
const value = (0, exports.extractEnumJsonPaths)(defType.type, zodRuntime, currentPath);
|
|
95
|
+
return value;
|
|
96
|
+
}
|
|
97
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodPipeline: {
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
99
|
+
const defType = def;
|
|
100
|
+
const value = (0, exports.extractEnumJsonPaths)(defType.out, zodRuntime, currentPath);
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodString:
|
|
104
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodNumber:
|
|
105
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodBigInt:
|
|
106
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodBoolean:
|
|
107
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodNaN:
|
|
108
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodDate:
|
|
109
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodSymbol:
|
|
110
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodUndefined:
|
|
111
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodNull:
|
|
112
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodAny:
|
|
113
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodUnknown:
|
|
114
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodNever:
|
|
115
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodVoid:
|
|
116
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodMap: // Maps are not serializable
|
|
117
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodLazy:
|
|
118
|
+
case zodRuntime.ZodFirstPartyTypeKind.ZodSet: {
|
|
119
|
+
// Sets are not serializable
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
default:
|
|
123
|
+
throw new Error('Not implemented: ' + typeName);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
exports.extractEnumJsonPaths = extractEnumJsonPaths;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare type SerializedJSONWithCustomFields = {
|
|
2
|
+
serializedString: string;
|
|
3
|
+
customDateUsed: boolean;
|
|
4
|
+
customFileUsed: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const FILE_TOKEN = "remotion-file:";
|
|
7
|
+
export declare const serializeJSONWithDate: ({ data, indent, staticBase, }: {
|
|
8
|
+
data: unknown;
|
|
9
|
+
indent: number | undefined;
|
|
10
|
+
staticBase: string;
|
|
11
|
+
}) => SerializedJSONWithCustomFields;
|
|
12
|
+
export declare const deserializeJSONWithCustomFields: (data: string) => any;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deserializeJSONWithCustomFields = exports.serializeJSONWithDate = exports.FILE_TOKEN = void 0;
|
|
4
|
+
const DATE_TOKEN = 'remotion-date:';
|
|
5
|
+
exports.FILE_TOKEN = 'remotion-file:';
|
|
6
|
+
const serializeJSONWithDate = ({ data, indent, staticBase, }) => {
|
|
7
|
+
let customDateUsed = false;
|
|
8
|
+
let customFileUsed = false;
|
|
9
|
+
const serializedString = JSON.stringify(data, function (key, value) {
|
|
10
|
+
const item = this[key];
|
|
11
|
+
if (item instanceof Date) {
|
|
12
|
+
customDateUsed = true;
|
|
13
|
+
return `${DATE_TOKEN}${item.toISOString()}`;
|
|
14
|
+
}
|
|
15
|
+
if (typeof item === 'string' && item.startsWith(staticBase)) {
|
|
16
|
+
customFileUsed = true;
|
|
17
|
+
return `${exports.FILE_TOKEN}${item.replace(staticBase + '/', '')}`;
|
|
18
|
+
}
|
|
19
|
+
return value;
|
|
20
|
+
}, indent);
|
|
21
|
+
return { serializedString, customDateUsed, customFileUsed };
|
|
22
|
+
};
|
|
23
|
+
exports.serializeJSONWithDate = serializeJSONWithDate;
|
|
24
|
+
const deserializeJSONWithCustomFields = (data) => {
|
|
25
|
+
return JSON.parse(data, (_, value) => {
|
|
26
|
+
if (typeof value === 'string' && value.startsWith(DATE_TOKEN)) {
|
|
27
|
+
return new Date(value.replace(DATE_TOKEN, ''));
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
exports.deserializeJSONWithCustomFields = deserializeJSONWithCustomFields;
|
|
@@ -6,10 +6,11 @@ export declare type TypeCanSaveState = {
|
|
|
6
6
|
reason: string;
|
|
7
7
|
determined: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, isCustomDateUsed, inJSONEditor, propsEditType, }: {
|
|
9
|
+
export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, inJSONEditor, propsEditType, }: {
|
|
10
10
|
cliProps: unknown;
|
|
11
11
|
canSaveDefaultProps: TypeCanSaveState;
|
|
12
|
-
isCustomDateUsed: boolean
|
|
12
|
+
isCustomDateUsed: boolean;
|
|
13
|
+
customFileUsed: boolean;
|
|
13
14
|
inJSONEditor: boolean;
|
|
14
15
|
propsEditType: PropsEditType;
|
|
15
16
|
}) => string[];
|
|
@@ -20,15 +20,22 @@ const getCannotSaveDefaultProps = (canSaveDefaultProps) => {
|
|
|
20
20
|
};
|
|
21
21
|
const customDateUsed = (used, inJSONEditor) => {
|
|
22
22
|
if (used && inJSONEditor) {
|
|
23
|
-
return
|
|
23
|
+
return 'There is a Date in the schema which was serialized. Note the custom syntax.';
|
|
24
24
|
}
|
|
25
25
|
return null;
|
|
26
26
|
};
|
|
27
|
-
const
|
|
27
|
+
const staticFileUsed = (used, inJSONEditor) => {
|
|
28
|
+
if (used && inJSONEditor) {
|
|
29
|
+
return 'There is a staticFile() in the schema which was serialized. Note the custom syntax.';
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
};
|
|
33
|
+
const getRenderModalWarnings = ({ cliProps, canSaveDefaultProps, isCustomDateUsed, customFileUsed, inJSONEditor, propsEditType, }) => {
|
|
28
34
|
return [
|
|
29
35
|
getInputPropsWarning({ cliProps, propsEditType }),
|
|
30
36
|
getCannotSaveDefaultProps(canSaveDefaultProps),
|
|
31
37
|
customDateUsed(isCustomDateUsed, inJSONEditor),
|
|
38
|
+
staticFileUsed(customFileUsed, inJSONEditor),
|
|
32
39
|
].filter(truthy_1.truthy);
|
|
33
40
|
};
|
|
34
41
|
exports.getRenderModalWarnings = getRenderModalWarnings;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AudioCodec, Codec, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
2
|
import type { RenderJob } from '../../../preview-server/render-queue/job';
|
|
3
3
|
import type { RequiredChromiumOptions } from '../../../required-chromium-options';
|
|
4
|
+
import type { EnumPath } from '../RenderModal/SchemaEditor/extract-enum-json-paths';
|
|
4
5
|
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }: {
|
|
5
6
|
compositionId: string;
|
|
6
7
|
outName: string;
|
|
@@ -54,5 +55,5 @@ export declare const openInFileExplorer: ({ directory }: {
|
|
|
54
55
|
}) => Promise<void>;
|
|
55
56
|
export declare const removeRenderJob: (job: RenderJob) => Promise<undefined>;
|
|
56
57
|
export declare const cancelRenderJob: (job: RenderJob) => Promise<import("../../../preview-server/render-queue/job").CancelRenderResponse>;
|
|
57
|
-
export declare const updateDefaultProps: (compositionId: string, defaultProps: unknown) => Promise<void>;
|
|
58
|
+
export declare const updateDefaultProps: (compositionId: string, defaultProps: unknown, enumPaths: EnumPath[]) => Promise<void>;
|
|
58
59
|
export declare const canUpdateDefaultProps: (compositionId: string) => Promise<import("../../../preview-server/render-queue/job").CanUpdateDefaultPropsResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.canUpdateDefaultProps = exports.updateDefaultProps = exports.cancelRenderJob = exports.removeRenderJob = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = void 0;
|
|
4
|
-
const
|
|
4
|
+
const input_props_serialization_1 = require("../RenderModal/SchemaEditor/input-props-serialization");
|
|
5
5
|
const callApi = (endpoint, body) => {
|
|
6
6
|
return new Promise((resolve, reject) => {
|
|
7
7
|
fetch(endpoint, {
|
|
@@ -104,11 +104,15 @@ const cancelRenderJob = (job) => {
|
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
106
|
exports.cancelRenderJob = cancelRenderJob;
|
|
107
|
-
const updateDefaultProps = (compositionId, defaultProps) => {
|
|
107
|
+
const updateDefaultProps = (compositionId, defaultProps, enumPaths) => {
|
|
108
108
|
return callApi('/api/update-default-props', {
|
|
109
109
|
compositionId,
|
|
110
|
-
defaultProps: (0,
|
|
111
|
-
|
|
110
|
+
defaultProps: (0, input_props_serialization_1.serializeJSONWithDate)({
|
|
111
|
+
data: defaultProps,
|
|
112
|
+
indent: undefined,
|
|
113
|
+
staticBase: window.remotion_staticBase,
|
|
114
|
+
}).serializedString,
|
|
115
|
+
enumPaths,
|
|
112
116
|
});
|
|
113
117
|
};
|
|
114
118
|
exports.updateDefaultProps = updateDefaultProps;
|
|
@@ -15,7 +15,7 @@ const SEQUENCE_GRADIENT = 'var(--blue)';
|
|
|
15
15
|
const AUDIO_GRADIENT = 'linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)';
|
|
16
16
|
const VIDEO_GRADIENT = 'linear-gradient(to top, #8e44ad, #9b59b6)';
|
|
17
17
|
const TimelineSequence = ({ s, fps }) => {
|
|
18
|
-
var _a
|
|
18
|
+
var _a;
|
|
19
19
|
const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
|
|
20
20
|
triggerOnWindowResize: false,
|
|
21
21
|
shouldApplyCssTransforms: true,
|
|
@@ -30,8 +30,10 @@ const TimelineSequence = ({ s, fps }) => {
|
|
|
30
30
|
throw new TypeError('Expected video config');
|
|
31
31
|
}
|
|
32
32
|
const { marginLeft, width } = (0, get_timeline_sequence_layout_1.getTimelineSequenceLayout)({
|
|
33
|
-
durationInFrames: s.
|
|
34
|
-
|
|
33
|
+
durationInFrames: s.loopDisplay
|
|
34
|
+
? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes
|
|
35
|
+
: s.duration,
|
|
36
|
+
startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
|
|
35
37
|
startFromMedia: s.type === 'sequence' ? 0 : s.startMediaFrom,
|
|
36
38
|
maxMediaDuration,
|
|
37
39
|
video,
|
|
@@ -55,6 +57,6 @@ const TimelineSequence = ({ s, fps }) => {
|
|
|
55
57
|
overflow: 'hidden',
|
|
56
58
|
};
|
|
57
59
|
}, [marginLeft, s.type, width]);
|
|
58
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: style, title: s.displayName, children: [s.type === 'audio' ? ((0, jsx_runtime_1.jsx)(AudioWaveform_1.AudioWaveform, { src: s.src, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, fps: fps, volume: s.volume, setMaxMediaDuration: setMaxMediaDuration, playbackRate: s.playbackRate })) : null, s.type === 'video' ? (0, jsx_runtime_1.jsx)(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src }) : null, s.
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: style, title: s.displayName, children: [s.type === 'audio' ? ((0, jsx_runtime_1.jsx)(AudioWaveform_1.AudioWaveform, { src: s.src, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, fps: fps, volume: s.volume, setMaxMediaDuration: setMaxMediaDuration, playbackRate: s.playbackRate })) : null, s.type === 'video' ? (0, jsx_runtime_1.jsx)(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src }) : null, s.loopDisplay === undefined ? null : ((0, jsx_runtime_1.jsx)(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes }))] }, s.id));
|
|
59
61
|
};
|
|
60
62
|
exports.TimelineSequence = TimelineSequence;
|
package/dist/ffmpeg.js
CHANGED
|
@@ -6,7 +6,9 @@ const node_child_process_1 = require("node:child_process");
|
|
|
6
6
|
const node_fs_1 = require("node:fs");
|
|
7
7
|
const ffmpegCommand = (_root, args) => {
|
|
8
8
|
const binary = renderer_1.RenderInternals.getExecutablePath('ffmpeg');
|
|
9
|
-
(
|
|
9
|
+
if (!process.env.READ_ONLY_FS) {
|
|
10
|
+
(0, node_fs_1.chmodSync)(binary, 0o755);
|
|
11
|
+
}
|
|
10
12
|
const done = (0, node_child_process_1.spawnSync)(binary, args, {
|
|
11
13
|
...renderer_1.RenderInternals.dynamicLibraryPathOptions(),
|
|
12
14
|
stdio: 'inherit',
|
|
@@ -16,7 +18,9 @@ const ffmpegCommand = (_root, args) => {
|
|
|
16
18
|
exports.ffmpegCommand = ffmpegCommand;
|
|
17
19
|
const ffprobeCommand = (_root, args) => {
|
|
18
20
|
const binary = renderer_1.RenderInternals.getExecutablePath('ffprobe');
|
|
19
|
-
(
|
|
21
|
+
if (!process.env.READ_ONLY_FS) {
|
|
22
|
+
(0, node_fs_1.chmodSync)(binary, 0o755);
|
|
23
|
+
}
|
|
20
24
|
const done = (0, node_child_process_1.spawnSync)(binary, args, {
|
|
21
25
|
...renderer_1.RenderInternals.dynamicLibraryPathOptions(),
|
|
22
26
|
stdio: 'inherit',
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
export declare const handleCommonError: (err: Error, logLevel: LogLevel) => Promise<void>;
|
|
@@ -5,9 +5,9 @@ const chalk_1 = require("./chalk");
|
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const print_error_1 = require("./print-error");
|
|
7
7
|
const truthy_1 = require("./truthy");
|
|
8
|
-
const handleCommonError = async (err) => {
|
|
8
|
+
const handleCommonError = async (err, logLevel) => {
|
|
9
9
|
var _a;
|
|
10
|
-
await (0, print_error_1.printError)(err);
|
|
10
|
+
await (0, print_error_1.printError)(err, logLevel);
|
|
11
11
|
if (err.message.includes('Could not play video with')) {
|
|
12
12
|
log_1.Log.info();
|
|
13
13
|
log_1.Log.info('💡 Get help for this issue at https://remotion.dev/docs/media-playback-error');
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export declare const CliInternals: {
|
|
|
5
5
|
createOverwriteableCliOutput: (options: {
|
|
6
6
|
quiet: boolean;
|
|
7
7
|
cancelSignal: import("@remotion/renderer").CancelSignal | null;
|
|
8
|
+
updatesDontOverwrite: boolean;
|
|
9
|
+
indent: boolean;
|
|
8
10
|
}) => import("./progress-bar").OverwriteableCliOutput;
|
|
9
11
|
chalk: {
|
|
10
12
|
enabled: boolean;
|
|
@@ -31,7 +33,6 @@ export declare const CliInternals: {
|
|
|
31
33
|
yellow: (str: string) => string;
|
|
32
34
|
blue: (str: string) => string;
|
|
33
35
|
magenta: (str: string) => string;
|
|
34
|
-
cyan: (str: string) => string;
|
|
35
36
|
white: (str: string) => string;
|
|
36
37
|
gray: (str: string) => string;
|
|
37
38
|
bgBlack: (str: string) => string;
|
|
@@ -40,7 +41,6 @@ export declare const CliInternals: {
|
|
|
40
41
|
bgYellow: (str: string) => string;
|
|
41
42
|
bgBlue: (str: string) => string;
|
|
42
43
|
bgMagenta: (str: string) => string;
|
|
43
|
-
bgCyan: (str: string) => string;
|
|
44
44
|
bgWhite: (str: string) => string;
|
|
45
45
|
blackBright: (str: string) => string;
|
|
46
46
|
redBright: (str: string) => string;
|
|
@@ -48,7 +48,6 @@ export declare const CliInternals: {
|
|
|
48
48
|
yellowBright: (str: string) => string;
|
|
49
49
|
blueBright: (str: string) => string;
|
|
50
50
|
magentaBright: (str: string) => string;
|
|
51
|
-
cyanBright: (str: string) => string;
|
|
52
51
|
whiteBright: (str: string) => string;
|
|
53
52
|
bgBlackBright: (str: string) => string;
|
|
54
53
|
bgRedBright: (str: string) => string;
|
|
@@ -56,7 +55,6 @@ export declare const CliInternals: {
|
|
|
56
55
|
bgYellowBright: (str: string) => string;
|
|
57
56
|
bgBlueBright: (str: string) => string;
|
|
58
57
|
bgMagentaBright: (str: string) => string;
|
|
59
|
-
bgCyanBright: (str: string) => string;
|
|
60
58
|
bgWhiteBright: (str: string) => string;
|
|
61
59
|
};
|
|
62
60
|
makeProgressBar: (percentage: number) => string;
|
|
@@ -65,6 +63,8 @@ export declare const CliInternals: {
|
|
|
65
63
|
verboseAdvanced: (options: {
|
|
66
64
|
indent: boolean;
|
|
67
65
|
logLevel: "verbose" | "info" | "warn" | "error";
|
|
66
|
+
} & {
|
|
67
|
+
tag?: string | undefined;
|
|
68
68
|
}, message?: any, ...optionalParams: any[]) => void;
|
|
69
69
|
info: (message?: any, ...optionalParams: any[]) => void;
|
|
70
70
|
infoAdvanced: (options: {
|
|
@@ -139,6 +139,7 @@ export declare const CliInternals: {
|
|
|
139
139
|
"audio-codec": "mp3" | "aac" | "pcm-16" | "opus";
|
|
140
140
|
crf: number;
|
|
141
141
|
force: boolean;
|
|
142
|
+
output: string;
|
|
142
143
|
overwrite: boolean;
|
|
143
144
|
png: boolean;
|
|
144
145
|
props: string;
|
|
@@ -171,7 +172,7 @@ export declare const CliInternals: {
|
|
|
171
172
|
} & {
|
|
172
173
|
_: string[];
|
|
173
174
|
};
|
|
174
|
-
handleCommonError: (err: Error) => Promise<void>;
|
|
175
|
+
handleCommonError: (err: Error, logLevel: "verbose" | "info" | "warn" | "error") => Promise<void>;
|
|
175
176
|
formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
|
|
176
177
|
locale: string;
|
|
177
178
|
bits?: boolean | undefined;
|
|
@@ -216,4 +217,7 @@ export declare const CliInternals: {
|
|
|
216
217
|
reason: string;
|
|
217
218
|
};
|
|
218
219
|
listOfRemotionPackages: string[];
|
|
220
|
+
shouldUseNonOverlayingLogger: ({ logLevel, }: {
|
|
221
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
222
|
+
}) => boolean;
|
|
219
223
|
};
|
package/dist/index.js
CHANGED
|
@@ -23,8 +23,8 @@ const minimist_1 = __importDefault(require("minimist"));
|
|
|
23
23
|
const benchmark_1 = require("./benchmark");
|
|
24
24
|
const chalk_1 = require("./chalk");
|
|
25
25
|
const cleanup_before_quit_1 = require("./cleanup-before-quit");
|
|
26
|
-
const cloudrun_command_1 = require("./cloudrun-command");
|
|
27
26
|
const compositions_1 = require("./compositions");
|
|
27
|
+
const config_1 = require("./config");
|
|
28
28
|
const determine_image_format_1 = require("./determine-image-format");
|
|
29
29
|
const download_progress_1 = require("./download-progress");
|
|
30
30
|
const entry_point_1 = require("./entry-point");
|
|
@@ -47,6 +47,7 @@ const print_help_1 = require("./print-help");
|
|
|
47
47
|
const progress_bar_1 = require("./progress-bar");
|
|
48
48
|
const render_1 = require("./render");
|
|
49
49
|
const select_composition_1 = require("./select-composition");
|
|
50
|
+
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
50
51
|
const still_1 = require("./still");
|
|
51
52
|
const upgrade_1 = require("./upgrade");
|
|
52
53
|
const versions_1 = require("./versions");
|
|
@@ -73,9 +74,6 @@ const cli = async () => {
|
|
|
73
74
|
else if (command === 'lambda') {
|
|
74
75
|
await (0, lambda_command_1.lambdaCommand)(remotionRoot, args);
|
|
75
76
|
}
|
|
76
|
-
else if (command === 'cloudrun') {
|
|
77
|
-
await (0, cloudrun_command_1.cloudrunCommand)(remotionRoot, args);
|
|
78
|
-
}
|
|
79
77
|
else if (command === 'render') {
|
|
80
78
|
await (0, render_1.render)(remotionRoot, args);
|
|
81
79
|
}
|
|
@@ -111,7 +109,7 @@ const cli = async () => {
|
|
|
111
109
|
}
|
|
112
110
|
catch (err) {
|
|
113
111
|
log_1.Log.info();
|
|
114
|
-
await (0, handle_common_errors_1.handleCommonError)(err);
|
|
112
|
+
await (0, handle_common_errors_1.handleCommonError)(err, config_1.ConfigInternals.Logging.getLogLevel());
|
|
115
113
|
(0, cleanup_before_quit_1.cleanupBeforeQuit)();
|
|
116
114
|
process.exit(1);
|
|
117
115
|
}
|
|
@@ -144,4 +142,5 @@ exports.CliInternals = {
|
|
|
144
142
|
printCompositions: print_compositions_1.printCompositions,
|
|
145
143
|
getFinalOutputCodec: get_final_output_codec_1.getFinalOutputCodec,
|
|
146
144
|
listOfRemotionPackages: list_of_remotion_packages_1.listOfRemotionPackages,
|
|
145
|
+
shouldUseNonOverlayingLogger: should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger,
|
|
147
146
|
};
|
package/dist/log.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
export declare const INDENT_TOKEN: string;
|
|
3
1
|
export declare const Log: {
|
|
4
2
|
verbose: (message?: any, ...optionalParams: any[]) => void;
|
|
5
3
|
verboseAdvanced: (options: {
|
|
6
4
|
indent: boolean;
|
|
7
|
-
logLevel:
|
|
5
|
+
logLevel: "verbose" | "info" | "warn" | "error";
|
|
6
|
+
} & {
|
|
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
|
};
|
package/dist/log.js
CHANGED
|
@@ -1,45 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Log =
|
|
3
|
+
exports.Log = void 0;
|
|
4
|
+
/* eslint-disable no-console */
|
|
4
5
|
const renderer_1 = require("@remotion/renderer");
|
|
5
|
-
|
|
6
|
-
const config_1 = require("./config");
|
|
7
|
-
const truthy_1 = require("./truthy");
|
|
8
|
-
exports.INDENT_TOKEN = chalk_1.chalk.gray('│');
|
|
9
|
-
exports.Log = {
|
|
10
|
-
verbose: (...args) => {
|
|
11
|
-
exports.Log.verboseAdvanced({ indent: false, logLevel: config_1.ConfigInternals.Logging.getLogLevel() }, ...args);
|
|
12
|
-
},
|
|
13
|
-
verboseAdvanced: (options, ...args) => {
|
|
14
|
-
if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(options.logLevel, 'verbose')) {
|
|
15
|
-
return console.log(...[
|
|
16
|
-
options.indent ? exports.INDENT_TOKEN : null,
|
|
17
|
-
...args.map((a) => chalk_1.chalk.blueBright(a)),
|
|
18
|
-
].filter(truthy_1.truthy));
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
info: (...args) => {
|
|
22
|
-
exports.Log.infoAdvanced({ indent: false, logLevel: config_1.ConfigInternals.Logging.getLogLevel() }, ...args);
|
|
23
|
-
},
|
|
24
|
-
infoAdvanced: (options, ...args) => {
|
|
25
|
-
if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(options.logLevel, 'info')) {
|
|
26
|
-
return console.log(...[options.indent ? exports.INDENT_TOKEN : null, ...args].filter(truthy_1.truthy));
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
warn: (...args) => {
|
|
30
|
-
exports.Log.warnAdvanced({ indent: false, logLevel: config_1.ConfigInternals.Logging.getLogLevel() }, ...args);
|
|
31
|
-
},
|
|
32
|
-
warnAdvanced: (options, ...args) => {
|
|
33
|
-
if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(options.logLevel, 'warn')) {
|
|
34
|
-
return console.warn(...[
|
|
35
|
-
options.indent ? chalk_1.chalk.yellow(exports.INDENT_TOKEN) : null,
|
|
36
|
-
...args.map((a) => chalk_1.chalk.yellow(a)),
|
|
37
|
-
].filter(truthy_1.truthy));
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
error: (...args) => {
|
|
41
|
-
if (renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'error')) {
|
|
42
|
-
return console.error(...args.map((a) => chalk_1.chalk.red(a)));
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
};
|
|
6
|
+
exports.Log = renderer_1.RenderInternals.Log;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setupHooks = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
4
5
|
const log_1 = require("../../log");
|
|
5
6
|
const truthy_1 = require("../../truthy");
|
|
6
|
-
const is_color_supported_1 = require("./is-color-supported");
|
|
7
7
|
function setupHooks(context) {
|
|
8
8
|
function invalid() {
|
|
9
9
|
// We are now in invalid state
|
|
@@ -23,7 +23,7 @@ function setupHooks(context) {
|
|
|
23
23
|
logger.log('Compilation finished');
|
|
24
24
|
const statsOptions = {
|
|
25
25
|
preset: 'errors-warnings',
|
|
26
|
-
colors:
|
|
26
|
+
colors: renderer_1.RenderInternals.isColorSupported,
|
|
27
27
|
};
|
|
28
28
|
const printedStats = stats.toString(statsOptions);
|
|
29
29
|
const lines = printedStats
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AudioCodec, Codec, makeCancelSignal, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
|
+
import type { EnumPath } from '../../editor/components/RenderModal/SchemaEditor/extract-enum-json-paths';
|
|
2
3
|
import type { AggregateRenderProgress } from '../../progress-types';
|
|
3
4
|
import type { RequiredChromiumOptions } from '../../required-chromium-options';
|
|
4
5
|
declare type BaseRenderProgress = {
|
|
@@ -125,6 +126,7 @@ export declare type UnsubscribeFromFileExistenceRequest = {
|
|
|
125
126
|
export declare type UpdateDefaultPropsRequest = {
|
|
126
127
|
compositionId: string;
|
|
127
128
|
defaultProps: string;
|
|
129
|
+
enumPaths: EnumPath[];
|
|
128
130
|
};
|
|
129
131
|
export declare type CanUpdateDefaultPropsRequest = {
|
|
130
132
|
compositionId: string;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.cancelJob = exports.removeJob = exports.addJob = exports.getRenderQueue = void 0;
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
const chalk_1 = require("../../chalk");
|
|
9
|
+
const config_1 = require("../../config");
|
|
9
10
|
const file_watcher_1 = require("../../file-watcher");
|
|
10
11
|
const handle_common_errors_1 = require("../../handle-common-errors");
|
|
11
12
|
const log_1 = require("../../log");
|
|
@@ -196,7 +197,7 @@ const processJobIfPossible = async ({ remotionRoot, entryPoint, }) => {
|
|
|
196
197
|
},
|
|
197
198
|
};
|
|
198
199
|
});
|
|
199
|
-
await (0, handle_common_errors_1.handleCommonError)(err);
|
|
200
|
+
await (0, handle_common_errors_1.handleCommonError)(err, config_1.ConfigInternals.Logging.getLogLevel());
|
|
200
201
|
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
201
202
|
listener.sendEventToClient({
|
|
202
203
|
type: 'render-job-failed',
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateDefaultPropsHandler = void 0;
|
|
4
4
|
const node_fs_1 = require("node:fs");
|
|
5
5
|
const update_default_props_1 = require("../../codemods/update-default-props");
|
|
6
|
-
const
|
|
6
|
+
const input_props_serialization_1 = require("../../editor/components/RenderModal/SchemaEditor/input-props-serialization");
|
|
7
7
|
const project_info_1 = require("../project-info");
|
|
8
8
|
const can_update_default_props_1 = require("./can-update-default-props");
|
|
9
|
-
const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps }, remotionRoot }) => {
|
|
9
|
+
const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps, enumPaths }, remotionRoot }) => {
|
|
10
10
|
const projectInfo = await (0, project_info_1.getProjectInfo)(remotionRoot);
|
|
11
11
|
// TODO: What happens if this error is thrown? Handle in frontend
|
|
12
12
|
if (!projectInfo.videoFile) {
|
|
@@ -17,7 +17,8 @@ const updateDefaultPropsHandler = async ({ input: { compositionId, defaultProps
|
|
|
17
17
|
const updated = await (0, update_default_props_1.updateDefaultProps)({
|
|
18
18
|
compositionId,
|
|
19
19
|
input: (0, node_fs_1.readFileSync)(projectInfo.videoFile, 'utf-8'),
|
|
20
|
-
newDefaultProps: (0,
|
|
20
|
+
newDefaultProps: (0, input_props_serialization_1.deserializeJSONWithCustomFields)(defaultProps),
|
|
21
|
+
enumPaths,
|
|
21
22
|
});
|
|
22
23
|
(0, node_fs_1.writeFileSync)(projectInfo.videoFile, updated);
|
|
23
24
|
};
|
package/dist/print-error.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
+
export declare const printError: (err: Error, logLevel: LogLevel) => Promise<void>;
|