@remotion/cli 3.3.78 → 3.3.80
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/better-opn/index.d.ts +6 -0
- package/dist/better-opn/index.js +202 -0
- package/dist/codemods/update-default-props.d.ts +5 -0
- package/dist/codemods/update-default-props.js +98 -0
- package/dist/editor/components/Checkbox.js +1 -0
- package/dist/editor/components/CollapsedSidebarExpander.d.ts +5 -0
- package/dist/editor/components/CollapsedSidebarExpander.js +40 -0
- package/dist/editor/components/CurrentCompositionSideEffects.js +11 -2
- package/dist/editor/components/InlineAction.js +1 -1
- package/dist/editor/components/Modals.js +3 -3
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +7 -0
- package/dist/editor/components/NewComposition/RemTextarea.js +90 -0
- package/dist/editor/components/RenderButton.d.ts +2 -2
- package/dist/editor/components/RenderButton.js +5 -0
- package/dist/editor/components/RenderModal/CliCopyButton.d.ts +4 -0
- package/dist/editor/components/RenderModal/CliCopyButton.js +22 -0
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +2 -1
- package/dist/editor/components/RenderModal/CrfSetting.js +2 -2
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +2 -0
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +4 -2
- package/dist/editor/components/RenderModal/EnvInput.d.ts +10 -0
- package/dist/editor/components/RenderModal/EnvInput.js +54 -0
- package/dist/editor/components/RenderModal/FrameRangeSetting.js +1 -1
- package/dist/editor/components/RenderModal/{RenderErrorModal.d.ts → GuiRenderStatus.d.ts} +1 -1
- package/dist/editor/components/RenderModal/GuiRenderStatus.js +78 -0
- package/dist/editor/components/RenderModal/InfoBubble.js +16 -12
- package/dist/editor/components/RenderModal/InfoTooltip.d.ts +1 -0
- package/dist/editor/components/RenderModal/InfoTooltip.js +25 -16
- package/dist/editor/components/RenderModal/InlineEyeIcon.d.ts +5 -0
- package/dist/editor/components/RenderModal/InlineEyeIcon.js +38 -0
- package/dist/editor/components/RenderModal/InlineRemoveButton.d.ts +4 -0
- package/dist/editor/components/RenderModal/InlineRemoveButton.js +14 -0
- package/dist/editor/components/RenderModal/JpegQualitySetting.d.ts +5 -0
- package/dist/editor/components/RenderModal/JpegQualitySetting.js +12 -0
- package/dist/editor/components/RenderModal/MutedSetting.d.ts +2 -0
- package/dist/editor/components/RenderModal/MutedSetting.js +4 -2
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +1 -1
- package/dist/editor/components/RenderModal/NumberSetting.js +1 -1
- package/dist/editor/components/RenderModal/OptionExplainer.d.ts +1 -1
- package/dist/editor/components/RenderModal/OptionExplainer.js +26 -2
- package/dist/editor/components/RenderModal/RenderModal.d.ts +6 -1
- package/dist/editor/components/RenderModal/RenderModal.js +52 -9
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +11 -0
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +34 -2
- package/dist/editor/components/RenderModal/RenderModalAudio.js +3 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +3 -2
- package/dist/editor/components/RenderModal/RenderModalBasic.js +5 -7
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +10 -0
- package/dist/editor/components/RenderModal/RenderModalData.js +55 -0
- package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.d.ts +5 -0
- package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.js +52 -0
- package/dist/editor/components/RenderModal/RenderModalInput.d.ts +10 -0
- package/dist/editor/components/RenderModal/RenderModalInput.js +13 -0
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +8 -0
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.js +87 -0
- package/dist/editor/components/RenderModal/RenderModalPicture.js +6 -4
- package/dist/editor/components/RenderModal/RenderStatusModal.d.ts +4 -0
- package/dist/editor/components/RenderModal/{RenderErrorModal.js → RenderStatusModal.js} +21 -14
- package/dist/editor/components/RenderModal/ScaleSetting.js +6 -3
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +12 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +36 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +15 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +43 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.d.ts +4 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.js +12 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +4 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +12 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +70 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +13 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +28 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +12 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +27 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +75 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +51 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +5 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.d.ts +8 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +23 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +89 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +57 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +43 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +56 -0
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +21 -0
- package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.js +15 -0
- package/dist/editor/components/RenderModal/SchemaEditor/zod-types.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/zod-types.js +2 -0
- package/dist/editor/components/RenderModal/layout.d.ts +3 -1
- package/dist/editor/components/RenderModal/layout.js +19 -3
- package/dist/editor/components/RenderModal/out-name-checker.d.ts +15 -0
- package/dist/editor/components/RenderModal/out-name-checker.js +79 -0
- package/dist/editor/components/RenderQueue/RenderQueueError.js +3 -3
- package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +18 -2
- package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +4 -2
- package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.js +3 -4
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +11 -1
- package/dist/editor/components/RenderQueue/SuccessIcon.d.ts +2 -0
- package/dist/editor/components/RenderQueue/SuccessIcon.js +14 -0
- package/dist/editor/components/RenderQueue/actions.d.ts +11 -2
- package/dist/editor/components/RenderQueue/actions.js +18 -3
- package/dist/editor/components/RenderToolbarIcon.js +5 -0
- package/dist/editor/components/RightPanel.d.ts +2 -0
- package/dist/editor/components/RightPanel.js +43 -0
- package/dist/editor/components/SidebarContent.js +1 -0
- package/dist/editor/helpers/convert-env-variables.d.ts +2 -0
- package/dist/editor/helpers/convert-env-variables.js +20 -0
- package/dist/editor/helpers/get-timeline-sequence-layout.js +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.js +4 -4
- package/dist/editor/icons/data.d.ts +2 -0
- package/dist/editor/icons/data.js +8 -0
- package/dist/editor/icons/save.d.ts +2 -0
- package/dist/editor/icons/save.js +8 -0
- package/dist/handle-common-errors.js +16 -0
- package/dist/parse-command-line.d.ts +2 -0
- package/dist/preview-server/api-routes.js +2 -0
- package/dist/preview-server/api-types.d.ts +2 -1
- package/dist/preview-server/render-queue/job.d.ts +25 -12
- package/dist/preview-server/render-queue/make-retry-payload.js +11 -1
- package/dist/preview-server/render-queue/open-directory-in-finder.d.ts +1 -1
- package/dist/preview-server/render-queue/open-directory-in-finder.js +10 -1
- package/dist/preview-server/render-queue/process-still.js +4 -10
- package/dist/preview-server/render-queue/process-video.js +4 -10
- package/dist/preview-server/render-queue/queue.js +38 -16
- package/dist/preview-server/routes/add-render.js +7 -0
- package/dist/preview-server/routes/open-in-file-explorer.js +1 -7
- package/dist/preview-server/routes/update-default-props.d.ts +3 -0
- package/dist/preview-server/routes/update-default-props.js +22 -0
- package/dist/preview.js +8 -3
- package/dist/progress-types.d.ts +32 -0
- package/dist/progress-types.js +17 -0
- package/dist/render-flows/render.js +66 -52
- package/dist/render-flows/still.js +18 -18
- package/dist/required-chromium-options.d.ts +3 -0
- package/dist/required-chromium-options.js +2 -0
- package/package.json +7 -7
- package/dist/editor/components/RenderModal/QualitySetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/QualitySetting.js +0 -27
- package/dist/gcp-command.d.ts +0 -1
- package/dist/gcp-command.js +0 -27
|
@@ -8,10 +8,12 @@ const actions_1 = require("./actions");
|
|
|
8
8
|
const item_style_1 = require("./item-style");
|
|
9
9
|
const RenderQueueOutputName = ({ job }) => {
|
|
10
10
|
const onClick = (0, react_1.useCallback)(() => {
|
|
11
|
+
if (job.deletedOutputLocation)
|
|
12
|
+
return;
|
|
11
13
|
(0, actions_1.openInFileExplorer)({ directory: job.outName }).catch((err) => {
|
|
12
|
-
(0, NotificationCenter_1.sendErrorNotification)(
|
|
14
|
+
(0, NotificationCenter_1.sendErrorNotification)(err.message);
|
|
13
15
|
});
|
|
14
|
-
}, [job
|
|
16
|
+
}, [job]);
|
|
15
17
|
const style = (0, react_1.useMemo)(() => {
|
|
16
18
|
return {
|
|
17
19
|
...item_style_1.renderQueueItemSubtitleStyle,
|
|
@@ -16,12 +16,11 @@ const RenderQueueProgressMessage = ({ job }) => {
|
|
|
16
16
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
17
17
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
18
18
|
const onClick = (0, react_1.useCallback)(() => {
|
|
19
|
-
// TODO: Show progress instead
|
|
20
19
|
setSelectedModal({
|
|
21
|
-
type: 'render-
|
|
22
|
-
job,
|
|
20
|
+
type: 'render-progress',
|
|
21
|
+
jobId: job.id,
|
|
23
22
|
});
|
|
24
23
|
}, [job, setSelectedModal]);
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, title: job.message, children: job.message }));
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, title: job.progress.message, children: job.progress.message }));
|
|
26
25
|
};
|
|
27
26
|
exports.RenderQueueProgressMessage = RenderQueueProgressMessage;
|
|
@@ -8,7 +8,17 @@ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
|
8
8
|
const actions_1 = require("./actions");
|
|
9
9
|
const RenderQueueRemoveItem = ({ job }) => {
|
|
10
10
|
const onClick = (0, react_1.useCallback)(() => {
|
|
11
|
-
(0, actions_1.removeRenderJob)(job)
|
|
11
|
+
(0, actions_1.removeRenderJob)(job)
|
|
12
|
+
.then(() => {
|
|
13
|
+
var _a;
|
|
14
|
+
(_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
|
|
15
|
+
content: 'Removed job',
|
|
16
|
+
duration: 2000,
|
|
17
|
+
created: Date.now(),
|
|
18
|
+
id: String(Math.random()).replace('0.', ''),
|
|
19
|
+
});
|
|
20
|
+
})
|
|
21
|
+
.catch((err) => {
|
|
12
22
|
(0, NotificationCenter_1.sendErrorNotification)(`Could not remove item: ${err.message}`);
|
|
13
23
|
console.log(err);
|
|
14
24
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SuccessIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
6
|
+
const CircularProgress_1 = require("./CircularProgress");
|
|
7
|
+
const iconStyle = {
|
|
8
|
+
height: CircularProgress_1.RENDER_STATUS_INDICATOR_SIZE,
|
|
9
|
+
width: CircularProgress_1.RENDER_STATUS_INDICATOR_SIZE,
|
|
10
|
+
};
|
|
11
|
+
const SuccessIcon = () => {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("svg", { style: iconStyle, viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: colors_1.LIGHT_TEXT, d: "M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337l-17 17-17-17-64-64-17-17L160 222.1l17 17 47 47L335 175l17-17L385.9 192l-17 17z" }) }));
|
|
13
|
+
};
|
|
14
|
+
exports.SuccessIcon = SuccessIcon;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { AudioCodec, Codec, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
2
|
import type { ApiRoutes } from '../../../preview-server/api-types';
|
|
3
3
|
import type { RenderJob } from '../../../preview-server/render-queue/job';
|
|
4
|
+
import type { RequiredChromiumOptions } from '../../../required-chromium-options';
|
|
4
5
|
export declare const callApi: <Endpoint extends keyof ApiRoutes>(endpoint: Endpoint, body: ApiRoutes[Endpoint]["Request"]) => Promise<ApiRoutes[Endpoint]["Response"]>;
|
|
5
|
-
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, quality, frame, scale, verbose, }: {
|
|
6
|
+
export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, quality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }: {
|
|
6
7
|
compositionId: string;
|
|
7
8
|
outName: string;
|
|
8
9
|
imageFormat: StillImageFormat;
|
|
@@ -10,8 +11,12 @@ export declare const addStillRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
10
11
|
frame: number;
|
|
11
12
|
scale: number;
|
|
12
13
|
verbose: boolean;
|
|
14
|
+
chromiumOptions: RequiredChromiumOptions;
|
|
15
|
+
delayRenderTimeout: number;
|
|
16
|
+
envVariables: Record<string, string>;
|
|
17
|
+
inputProps: unknown;
|
|
13
18
|
}) => Promise<undefined>;
|
|
14
|
-
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, quality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, }: {
|
|
19
|
+
export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat, quality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }: {
|
|
15
20
|
compositionId: string;
|
|
16
21
|
outName: string;
|
|
17
22
|
imageFormat: VideoImageFormat;
|
|
@@ -34,6 +39,9 @@ export declare const addVideoRenderJob: ({ compositionId, outName, imageFormat,
|
|
|
34
39
|
delayRenderTimeout: number;
|
|
35
40
|
audioCodec: AudioCodec;
|
|
36
41
|
disallowParallelEncoding: boolean;
|
|
42
|
+
chromiumOptions: RequiredChromiumOptions;
|
|
43
|
+
envVariables: Record<string, string>;
|
|
44
|
+
inputProps: unknown;
|
|
37
45
|
}) => Promise<undefined>;
|
|
38
46
|
export declare const unsubscribeFromFileExistenceWatcher: ({ file, clientId, }: {
|
|
39
47
|
file: string;
|
|
@@ -48,3 +56,4 @@ export declare const openInFileExplorer: ({ directory }: {
|
|
|
48
56
|
}) => Promise<void>;
|
|
49
57
|
export declare const removeRenderJob: (job: RenderJob) => Promise<undefined>;
|
|
50
58
|
export declare const cancelRenderJob: (job: RenderJob) => Promise<import("../../../preview-server/render-queue/job").CancelRenderResponse>;
|
|
59
|
+
export declare const updateDefaultProps: (compositionId: string, defaultProps: unknown) => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cancelRenderJob = exports.removeRenderJob = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = exports.callApi = void 0;
|
|
3
|
+
exports.updateDefaultProps = exports.cancelRenderJob = exports.removeRenderJob = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addStillRenderJob = exports.callApi = void 0;
|
|
4
|
+
const date_serialization_1 = require("../RenderModal/SchemaEditor/date-serialization");
|
|
4
5
|
const callApi = (endpoint, body) => {
|
|
5
6
|
return new Promise((resolve, reject) => {
|
|
6
7
|
fetch(endpoint, {
|
|
@@ -25,7 +26,7 @@ const callApi = (endpoint, body) => {
|
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
exports.callApi = callApi;
|
|
28
|
-
const addStillRenderJob = ({ compositionId, outName, imageFormat, quality, frame, scale, verbose, }) => {
|
|
29
|
+
const addStillRenderJob = ({ compositionId, outName, imageFormat, quality, frame, scale, verbose, chromiumOptions, delayRenderTimeout, envVariables, inputProps, }) => {
|
|
29
30
|
return (0, exports.callApi)('/api/render', {
|
|
30
31
|
compositionId,
|
|
31
32
|
type: 'still',
|
|
@@ -35,10 +36,14 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, quality, frame
|
|
|
35
36
|
frame,
|
|
36
37
|
scale,
|
|
37
38
|
verbose,
|
|
39
|
+
chromiumOptions,
|
|
40
|
+
delayRenderTimeout,
|
|
41
|
+
envVariables,
|
|
42
|
+
inputProps,
|
|
38
43
|
});
|
|
39
44
|
};
|
|
40
45
|
exports.addStillRenderJob = addStillRenderJob;
|
|
41
|
-
const addVideoRenderJob = ({ compositionId, outName, imageFormat, quality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, }) => {
|
|
46
|
+
const addVideoRenderJob = ({ compositionId, outName, imageFormat, quality, scale, verbose, codec, concurrency, crf, startFrame, endFrame, muted, enforceAudioTrack, proResProfile, pixelFormat, audioBitrate, videoBitrate, everyNthFrame, numberOfGifLoops, delayRenderTimeout, audioCodec, disallowParallelEncoding, chromiumOptions, envVariables, inputProps, }) => {
|
|
42
47
|
return (0, exports.callApi)('/api/render', {
|
|
43
48
|
compositionId,
|
|
44
49
|
type: 'video',
|
|
@@ -63,6 +68,9 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, quality, scale
|
|
|
63
68
|
delayRenderTimeout,
|
|
64
69
|
audioCodec,
|
|
65
70
|
disallowParallelEncoding,
|
|
71
|
+
chromiumOptions,
|
|
72
|
+
envVariables,
|
|
73
|
+
inputProps,
|
|
66
74
|
});
|
|
67
75
|
};
|
|
68
76
|
exports.addVideoRenderJob = addVideoRenderJob;
|
|
@@ -97,3 +105,10 @@ const cancelRenderJob = (job) => {
|
|
|
97
105
|
});
|
|
98
106
|
};
|
|
99
107
|
exports.cancelRenderJob = cancelRenderJob;
|
|
108
|
+
const updateDefaultProps = (compositionId, defaultProps) => {
|
|
109
|
+
return (0, exports.callApi)('/api/update-default-props', {
|
|
110
|
+
compositionId,
|
|
111
|
+
defaultProps: (0, date_serialization_1.serializeJSONWithDate)(defaultProps, undefined),
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
exports.updateDefaultProps = updateDefaultProps;
|
|
@@ -69,6 +69,11 @@ const RenderStillButton = () => {
|
|
|
69
69
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
70
70
|
initialDelayRenderTimeout: defaults.delayRenderTimeout,
|
|
71
71
|
initialAudioCodec: defaults.audioCodec,
|
|
72
|
+
initialEnvVariables: window.process.env,
|
|
73
|
+
initialDisableWebSecurity: defaults.disableWebSecurity,
|
|
74
|
+
initialOpenGlRenderer: defaults.openGlRenderer,
|
|
75
|
+
initialHeadless: defaults.headless,
|
|
76
|
+
initialIgnoreCertificateErrors: defaults.ignoreCertificateErrors,
|
|
72
77
|
});
|
|
73
78
|
}, [video, frame, setSelectedModal]);
|
|
74
79
|
if (!video) {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RightPanel = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const RenderModalData_1 = require("./RenderModal/RenderModalData");
|
|
8
|
+
const container = {
|
|
9
|
+
height: '100%',
|
|
10
|
+
width: '100%',
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
overflow: 'auto',
|
|
13
|
+
};
|
|
14
|
+
const PropsEditor = ({ composition }) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const { props, updateProps } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
17
|
+
// TODO: Warn if inputProps were specified to the CLI, then
|
|
18
|
+
// they take priority over defaultProps
|
|
19
|
+
const setInputProps = (0, react_1.useCallback)((newProps) => {
|
|
20
|
+
updateProps({
|
|
21
|
+
id: composition.id,
|
|
22
|
+
defaultProps: composition.defaultProps,
|
|
23
|
+
newProps: newProps,
|
|
24
|
+
});
|
|
25
|
+
}, [composition.defaultProps, composition.id, updateProps]);
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { composition: composition, inputProps: (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps, setInputProps: setInputProps, compact: true, updateButton: true, showSaveButton: true }) }));
|
|
27
|
+
};
|
|
28
|
+
const RightPanel = () => {
|
|
29
|
+
const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
30
|
+
const composition = (0, react_1.useMemo)(() => {
|
|
31
|
+
for (const comp of compositions) {
|
|
32
|
+
if (comp.id === currentComposition) {
|
|
33
|
+
return comp;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}, [compositions, currentComposition]);
|
|
38
|
+
if (composition === null) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(PropsEditor, { composition: composition }) }));
|
|
42
|
+
};
|
|
43
|
+
exports.RightPanel = RightPanel;
|
|
@@ -47,6 +47,7 @@ const SidebarContent = () => {
|
|
|
47
47
|
},
|
|
48
48
|
};
|
|
49
49
|
}, []);
|
|
50
|
+
// TODO: It is not perfectly aligned in example
|
|
50
51
|
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [shouldRender ? ((0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) })) : null, panel === 'renders' && shouldRender ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {})), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
|
|
51
52
|
};
|
|
52
53
|
exports.SidebarContent = SidebarContent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.envVariablesArrayToObject = exports.envVariablesObjectToArray = void 0;
|
|
4
|
+
const envVariablesObjectToArray = (envVariables) => {
|
|
5
|
+
return Object.entries(envVariables).map(([key, one]) => [
|
|
6
|
+
key.trim(),
|
|
7
|
+
one.trim(),
|
|
8
|
+
]);
|
|
9
|
+
};
|
|
10
|
+
exports.envVariablesObjectToArray = envVariablesObjectToArray;
|
|
11
|
+
const envVariablesArrayToObject = (envVariables) => {
|
|
12
|
+
return envVariables
|
|
13
|
+
.map(([key, val]) => [key.trim(), val.trim()])
|
|
14
|
+
.filter(([key, val]) => key && val)
|
|
15
|
+
.reduce((acc, [key, value]) => {
|
|
16
|
+
acc[key] = value;
|
|
17
|
+
return acc;
|
|
18
|
+
}, {});
|
|
19
|
+
};
|
|
20
|
+
exports.envVariablesArrayToObject = envVariablesArrayToObject;
|
|
@@ -13,8 +13,8 @@ const getWidthOfTrack = ({ durationInFrames, lastFrame, windowWidth, spatialDura
|
|
|
13
13
|
const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, }) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const maxMediaSequenceDuration = (maxMediaDuration !== null && maxMediaDuration !== void 0 ? maxMediaDuration : Infinity) - startFromMedia;
|
|
16
|
-
let spatialDuration = Math.min(maxMediaSequenceDuration, durationInFrames - 1);
|
|
17
16
|
const lastFrame = ((_a = video.durationInFrames) !== null && _a !== void 0 ? _a : 1) - 1;
|
|
17
|
+
let spatialDuration = Math.min(maxMediaSequenceDuration, durationInFrames - 1, lastFrame - startFrom);
|
|
18
18
|
const shouldAddHalfAFrameAtEnd = startFrom + durationInFrames < lastFrame;
|
|
19
19
|
const shouldAddHalfAFrameAtStart = startFrom > 0;
|
|
20
20
|
if (shouldAddHalfAFrameAtEnd) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Codec } from '@remotion/renderer';
|
|
3
3
|
import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
|
|
4
|
-
declare type Section = 'general' | 'picture' | 'advanced' | 'gif' | 'audio';
|
|
4
|
+
declare type Section = 'general' | 'picture' | 'advanced' | 'data' | 'gif' | 'audio';
|
|
5
5
|
export declare const useRenderModalSections: (renderMode: RenderType, codec: Codec) => {
|
|
6
6
|
tab: Section;
|
|
7
7
|
setTab: import("react").Dispatch<import("react").SetStateAction<Section>>;
|
|
@@ -6,16 +6,16 @@ const useRenderModalSections = (renderMode, codec) => {
|
|
|
6
6
|
const [selectedTab, setTab] = (0, react_1.useState)('general');
|
|
7
7
|
const shownTabs = (0, react_1.useMemo)(() => {
|
|
8
8
|
if (renderMode === 'audio') {
|
|
9
|
-
return ['general', 'audio', 'advanced'];
|
|
9
|
+
return ['general', 'data', 'audio', 'advanced'];
|
|
10
10
|
}
|
|
11
11
|
if (renderMode === 'still') {
|
|
12
|
-
return ['general', 'picture', 'advanced'];
|
|
12
|
+
return ['general', 'data', 'picture', 'advanced'];
|
|
13
13
|
}
|
|
14
14
|
if (renderMode === 'video') {
|
|
15
15
|
if (codec === 'gif') {
|
|
16
|
-
return ['general', 'picture', 'gif', 'advanced'];
|
|
16
|
+
return ['general', 'data', 'picture', 'gif', 'advanced'];
|
|
17
17
|
}
|
|
18
|
-
return ['general', 'picture', 'audio', 'advanced'];
|
|
18
|
+
return ['general', 'data', 'picture', 'audio', 'advanced'];
|
|
19
19
|
}
|
|
20
20
|
throw new TypeError('Unknown render mode');
|
|
21
21
|
}, [codec, renderMode]);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const DataIcon = (props) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentcolor", d: "M224 512C100.3 512 0 476.2 0 432V80C0 35.82 100.3 0 224 0C347.7 0 448 35.82 448 80V432C448 476.2 347.7 512 224 512zM416 80.45C415.7 79.69 414.4 77.27 409.8 73.31C402.4 67.11 389.9 60.09 371.6 53.57C335.4 40.62 283.2 32 224 32C164.8 32 112.6 40.62 76.37 53.57C58.1 60.09 45.59 67.11 38.25 73.31C33.55 77.27 32.29 79.69 32 80.45V182.1C46.47 192.7 69.9 202.8 100.9 210.4C135.5 218.9 177.1 224 224 224C270 224 312.5 218.9 347.1 210.4C378.1 202.8 401.5 192.7 416 182.1V80.45zM416 219.5C398.8 228.4 377.9 235.8 354.8 241.5C317.3 250.7 272.2 256 224 256C175.8 256 130.7 250.7 93.22 241.5C70.11 235.8 49.18 228.4 32 219.5V310.1C46.47 320.7 69.9 330.8 100.9 338.4C135.5 346.9 177.1 352 224 352C270 352 312.5 346.9 347.1 338.4C378.1 330.8 401.5 320.7 416 310.1V219.5zM38.25 438.7C45.59 444.9 58.1 451.9 76.37 458.4C112.6 471.4 164.8 480 224 480C283.2 480 335.4 471.4 371.6 458.4C389.9 451.9 402.4 444.9 409.8 438.7C414.4 434.7 415.7 432.3 416 431.6V347.5C398.8 356.4 377.9 363.8 354.8 369.5C317.3 378.7 272.2 384 224 384C175.8 384 130.7 378.7 93.22 369.5C70.11 363.8 49.18 356.4 32 347.5V431.6C32.29 432.3 33.55 434.7 38.25 438.7zM416 431.4C416.1 431.3 416.1 431.3 416.1 431.3L416 431.4zM31.96 431.4C31.94 431.3 31.93 431.3 31.92 431.3L31.96 431.4zM31.96 80.56C31.93 80.65 31.92 80.7 31.92 80.7L31.96 80.56zM416.1 80.7C416.1 80.7 416.1 80.65 416 80.56z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.DataIcon = DataIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Save = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Save = (props) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 448 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentcolor", d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.Save = Save;
|
|
@@ -4,7 +4,9 @@ exports.handleCommonError = void 0;
|
|
|
4
4
|
const chalk_1 = require("./chalk");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const print_error_1 = require("./print-error");
|
|
7
|
+
const truthy_1 = require("./truthy");
|
|
7
8
|
const handleCommonError = async (err) => {
|
|
9
|
+
var _a;
|
|
8
10
|
await (0, print_error_1.printError)(err);
|
|
9
11
|
if (err.message.includes('Could not play video with')) {
|
|
10
12
|
log_1.Log.info();
|
|
@@ -32,5 +34,19 @@ const handleCommonError = async (err) => {
|
|
|
32
34
|
log_1.Log.info();
|
|
33
35
|
log_1.Log.info(chalk_1.chalk.green('💡 Fix this issue https://remotion.dev/docs/lambda/troubleshooting/bucket-disallows-acl'));
|
|
34
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
|
+
}
|
|
35
51
|
};
|
|
36
52
|
exports.handleCommonError = handleCommonError;
|
|
@@ -48,6 +48,8 @@ export declare type CommandLineOptions = {
|
|
|
48
48
|
['package-manager']: string;
|
|
49
49
|
['webpack-poll']: number;
|
|
50
50
|
['no-open']: boolean;
|
|
51
|
+
['browser']: string;
|
|
52
|
+
['browser-args']: string;
|
|
51
53
|
};
|
|
52
54
|
export declare const BooleanFlags: string[];
|
|
53
55
|
export declare const parsedCli: CommandLineOptions & {
|
|
@@ -7,6 +7,7 @@ const open_in_file_explorer_1 = require("./routes/open-in-file-explorer");
|
|
|
7
7
|
const remove_render_1 = require("./routes/remove-render");
|
|
8
8
|
const subscribe_to_file_existence_1 = require("./routes/subscribe-to-file-existence");
|
|
9
9
|
const unsubscribe_from_file_existence_1 = require("./routes/unsubscribe-from-file-existence");
|
|
10
|
+
const update_default_props_1 = require("./routes/update-default-props");
|
|
10
11
|
exports.allApiRoutes = {
|
|
11
12
|
'/api/cancel': cancel_render_1.handleCancelRender,
|
|
12
13
|
'/api/render': add_render_1.handleAddRender,
|
|
@@ -14,4 +15,5 @@ exports.allApiRoutes = {
|
|
|
14
15
|
'/api/subscribe-to-file-existence': subscribe_to_file_existence_1.subscribeToFileExistence,
|
|
15
16
|
'/api/remove-render': remove_render_1.handleRemoveRender,
|
|
16
17
|
'/api/open-in-file-explorer': open_in_file_explorer_1.handleOpenInFileExplorer,
|
|
18
|
+
'/api/update-default-props': update_default_props_1.updateDefaultPropsHandler,
|
|
17
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import type { AddRenderRequest, CancelRenderRequest, CancelRenderResponse, OpenInFileExplorerRequest, RemoveRenderRequest, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, UnsubscribeFromFileExistenceRequest } from './render-queue/job';
|
|
3
|
+
import type { AddRenderRequest, CancelRenderRequest, CancelRenderResponse, OpenInFileExplorerRequest, RemoveRenderRequest, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, UnsubscribeFromFileExistenceRequest, UpdateDefaultPropsRequest } from './render-queue/job';
|
|
4
4
|
export declare type ApiHandler<ReqData, ResData> = (params: {
|
|
5
5
|
input: ReqData;
|
|
6
6
|
entryPoint: string;
|
|
@@ -23,5 +23,6 @@ export declare type ApiRoutes = {
|
|
|
23
23
|
'/api/subscribe-to-file-existence': ReqAndRes<SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse>;
|
|
24
24
|
'/api/remove-render': ReqAndRes<RemoveRenderRequest, undefined>;
|
|
25
25
|
'/api/open-in-file-explorer': ReqAndRes<OpenInFileExplorerRequest, void>;
|
|
26
|
+
'/api/update-default-props': ReqAndRes<UpdateDefaultPropsRequest, void>;
|
|
26
27
|
};
|
|
27
28
|
export {};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { AudioCodec, Codec, makeCancelSignal, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
|
+
import type { AggregateRenderProgress } from '../../progress-types';
|
|
3
|
+
import type { RequiredChromiumOptions } from '../../required-chromium-options';
|
|
4
|
+
export declare type BaseRenderProgress = {
|
|
5
|
+
message: string;
|
|
6
|
+
value: number;
|
|
7
|
+
};
|
|
2
8
|
declare type RenderJobDynamicStatus = {
|
|
3
9
|
status: 'done';
|
|
10
|
+
progress: BaseRenderProgress & AggregateRenderProgress;
|
|
4
11
|
} | {
|
|
5
12
|
status: 'running';
|
|
6
|
-
progress:
|
|
7
|
-
message: string;
|
|
13
|
+
progress: BaseRenderProgress & AggregateRenderProgress;
|
|
8
14
|
} | {
|
|
9
15
|
status: 'idle';
|
|
10
16
|
} | {
|
|
@@ -14,17 +20,14 @@ declare type RenderJobDynamicStatus = {
|
|
|
14
20
|
stack: string | undefined;
|
|
15
21
|
};
|
|
16
22
|
};
|
|
17
|
-
export declare type JobProgressCallback = (options:
|
|
18
|
-
|
|
19
|
-
message: string;
|
|
20
|
-
}) => void;
|
|
21
|
-
declare type RenderJobDynamicFields = {
|
|
23
|
+
export declare type JobProgressCallback = (options: BaseRenderProgress & AggregateRenderProgress) => void;
|
|
24
|
+
declare type RenderJobDynamicFields = ({
|
|
22
25
|
type: 'still';
|
|
23
26
|
imageFormat: StillImageFormat;
|
|
24
27
|
quality: number | null;
|
|
25
28
|
frame: number;
|
|
26
29
|
scale: number;
|
|
27
|
-
} | {
|
|
30
|
+
} & RenderJobDynamicStatus) | ({
|
|
28
31
|
type: 'video';
|
|
29
32
|
imageFormat: VideoImageFormat;
|
|
30
33
|
quality: number | null;
|
|
@@ -43,9 +46,8 @@ declare type RenderJobDynamicFields = {
|
|
|
43
46
|
videoBitrate: string | null;
|
|
44
47
|
everyNthFrame: number;
|
|
45
48
|
numberOfGifLoops: number | null;
|
|
46
|
-
delayRenderTimeout: number;
|
|
47
49
|
disallowParallelEncoding: boolean;
|
|
48
|
-
};
|
|
50
|
+
} & RenderJobDynamicStatus);
|
|
49
51
|
export declare type RenderJob = {
|
|
50
52
|
startedAt: number;
|
|
51
53
|
compositionId: string;
|
|
@@ -53,8 +55,12 @@ export declare type RenderJob = {
|
|
|
53
55
|
outName: string;
|
|
54
56
|
deletedOutputLocation: boolean;
|
|
55
57
|
verbose: boolean;
|
|
58
|
+
delayRenderTimeout: number;
|
|
56
59
|
cancelToken: ReturnType<typeof makeCancelSignal>;
|
|
57
|
-
|
|
60
|
+
chromiumOptions: RequiredChromiumOptions;
|
|
61
|
+
envVariables: Record<string, string>;
|
|
62
|
+
inputProps: unknown;
|
|
63
|
+
} & RenderJobDynamicFields;
|
|
58
64
|
export declare type RenderJobWithCleanup = RenderJob & {
|
|
59
65
|
cleanup: (() => void)[];
|
|
60
66
|
};
|
|
@@ -85,7 +91,6 @@ declare type AddRenderRequestDynamicFields = {
|
|
|
85
91
|
videoBitrate: string | null;
|
|
86
92
|
everyNthFrame: number;
|
|
87
93
|
numberOfGifLoops: number | null;
|
|
88
|
-
delayRenderTimeout: number;
|
|
89
94
|
disallowParallelEncoding: boolean;
|
|
90
95
|
};
|
|
91
96
|
export declare type CancelRenderRequest = {
|
|
@@ -95,6 +100,10 @@ export declare type CancelRenderResponse = {};
|
|
|
95
100
|
export declare type AddRenderRequest = {
|
|
96
101
|
compositionId: string;
|
|
97
102
|
outName: string;
|
|
103
|
+
chromiumOptions: RequiredChromiumOptions;
|
|
104
|
+
delayRenderTimeout: number;
|
|
105
|
+
envVariables: Record<string, string>;
|
|
106
|
+
inputProps: unknown;
|
|
98
107
|
} & AddRenderRequestDynamicFields;
|
|
99
108
|
export declare type RemoveRenderRequest = {
|
|
100
109
|
jobId: string;
|
|
@@ -113,4 +122,8 @@ export declare type UnsubscribeFromFileExistenceRequest = {
|
|
|
113
122
|
file: string;
|
|
114
123
|
clientId: string;
|
|
115
124
|
};
|
|
125
|
+
export declare type UpdateDefaultPropsRequest = {
|
|
126
|
+
compositionId: string;
|
|
127
|
+
defaultProps: string;
|
|
128
|
+
};
|
|
116
129
|
export {};
|
|
@@ -37,8 +37,13 @@ const makeRetryPayload = (job) => {
|
|
|
37
37
|
initialVideoBitrate: defaults.videoBitrate,
|
|
38
38
|
initialEveryNthFrame: defaults.everyNthFrame,
|
|
39
39
|
initialNumberOfGifLoops: defaults.numberOfGifLoops,
|
|
40
|
-
initialDelayRenderTimeout:
|
|
40
|
+
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
41
41
|
initialAudioCodec: defaults.audioCodec,
|
|
42
|
+
initialEnvVariables: job.envVariables,
|
|
43
|
+
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
44
|
+
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
45
|
+
initialHeadless: job.chromiumOptions.headless,
|
|
46
|
+
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
42
47
|
};
|
|
43
48
|
}
|
|
44
49
|
if (job.type === 'video') {
|
|
@@ -72,6 +77,11 @@ const makeRetryPayload = (job) => {
|
|
|
72
77
|
initialNumberOfGifLoops: job.numberOfGifLoops,
|
|
73
78
|
initialDelayRenderTimeout: job.delayRenderTimeout,
|
|
74
79
|
initialAudioCodec: job.audioCodec,
|
|
80
|
+
initialEnvVariables: job.envVariables,
|
|
81
|
+
initialDisableWebSecurity: job.chromiumOptions.disableWebSecurity,
|
|
82
|
+
initialOpenGlRenderer: job.chromiumOptions.gl,
|
|
83
|
+
initialHeadless: job.chromiumOptions.headless,
|
|
84
|
+
initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
|
|
75
85
|
};
|
|
76
86
|
}
|
|
77
87
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const openDirectoryInFinder: (dirToOpen: string) => Promise<void>;
|
|
1
|
+
export declare const openDirectoryInFinder: (dirToOpen: string, allowedDirectory: string) => Promise<void>;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.openDirectoryInFinder = void 0;
|
|
4
7
|
const child_process_1 = require("child_process");
|
|
5
8
|
const os_1 = require("os");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
6
10
|
const truthy_1 = require("../../truthy");
|
|
7
|
-
const openDirectoryInFinder = (dirToOpen) => {
|
|
11
|
+
const openDirectoryInFinder = (dirToOpen, allowedDirectory) => {
|
|
12
|
+
const resolved = path_1.default.resolve(allowedDirectory, dirToOpen);
|
|
13
|
+
const relativeToProcessCwd = path_1.default.relative(allowedDirectory, resolved);
|
|
14
|
+
if (relativeToProcessCwd.startsWith('..')) {
|
|
15
|
+
throw new Error(`Not allowed to open ${relativeToProcessCwd}`);
|
|
16
|
+
}
|
|
8
17
|
const command = (0, os_1.platform)() === 'darwin'
|
|
9
18
|
? 'open'
|
|
10
19
|
: (0, os_1.platform)() === 'linux'
|
|
@@ -9,13 +9,7 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
|
|
|
9
9
|
if (job.type !== 'still') {
|
|
10
10
|
throw new Error('Expected still job');
|
|
11
11
|
}
|
|
12
|
-
const { publicDir, browserExecutable,
|
|
13
|
-
// TODO: Accept chromium options from UI
|
|
14
|
-
chromiumOptions,
|
|
15
|
-
// TODO: Accept env variables from UI
|
|
16
|
-
envVariables,
|
|
17
|
-
// TODO: Accept input props from UI
|
|
18
|
-
inputProps, port, browser, puppeteerTimeout, } = await (0, get_cli_options_1.getCliOptions)({
|
|
12
|
+
const { publicDir, browserExecutable, port, browser, puppeteerTimeout } = await (0, get_cli_options_1.getCliOptions)({
|
|
19
13
|
isLambda: false,
|
|
20
14
|
type: 'still',
|
|
21
15
|
remotionRoot,
|
|
@@ -25,12 +19,12 @@ const processStill = async ({ job, remotionRoot, entryPoint, onProgress, addClea
|
|
|
25
19
|
remotionRoot,
|
|
26
20
|
browser,
|
|
27
21
|
browserExecutable,
|
|
28
|
-
chromiumOptions,
|
|
22
|
+
chromiumOptions: job.chromiumOptions,
|
|
29
23
|
entryPointReason: 'same as preview',
|
|
30
|
-
envVariables,
|
|
24
|
+
envVariables: job.envVariables,
|
|
31
25
|
height: null,
|
|
32
26
|
fullEntryPoint,
|
|
33
|
-
inputProps,
|
|
27
|
+
inputProps: job.inputProps,
|
|
34
28
|
overwrite: true,
|
|
35
29
|
port,
|
|
36
30
|
publicDir,
|
|
@@ -9,13 +9,7 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
9
9
|
if (job.type !== 'video') {
|
|
10
10
|
throw new Error('Expected video job');
|
|
11
11
|
}
|
|
12
|
-
const { publicDir, browserExecutable,
|
|
13
|
-
// TODO: Accept chromium options from UI
|
|
14
|
-
chromiumOptions,
|
|
15
|
-
// TODO: Accept env variables from UI
|
|
16
|
-
envVariables,
|
|
17
|
-
// TODO: Accept input props from UI
|
|
18
|
-
inputProps, port, browser, ffmpegOverride, } = await (0, get_cli_options_1.getCliOptions)({
|
|
12
|
+
const { publicDir, browserExecutable, port, browser, ffmpegOverride } = await (0, get_cli_options_1.getCliOptions)({
|
|
19
13
|
isLambda: false,
|
|
20
14
|
type: 'still',
|
|
21
15
|
remotionRoot,
|
|
@@ -25,12 +19,12 @@ const processVideoJob = async ({ job, remotionRoot, entryPoint, onProgress, addC
|
|
|
25
19
|
remotionRoot,
|
|
26
20
|
browser,
|
|
27
21
|
browserExecutable,
|
|
28
|
-
chromiumOptions,
|
|
22
|
+
chromiumOptions: job.chromiumOptions,
|
|
29
23
|
entryPointReason: 'same as preview',
|
|
30
|
-
envVariables,
|
|
24
|
+
envVariables: job.envVariables,
|
|
31
25
|
height: null,
|
|
32
26
|
fullEntryPoint,
|
|
33
|
-
inputProps,
|
|
27
|
+
inputProps: job.inputProps,
|
|
34
28
|
overwrite: true,
|
|
35
29
|
port,
|
|
36
30
|
publicDir,
|