@remotion/cli 4.0.0-alpha.217 → 4.0.0-alpha10
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 +11 -6
- package/dist/better-opn/index.js +3 -3
- 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 +4 -2
- package/dist/codemods/update-default-props.js +3 -18
- package/dist/color-math.d.ts +2 -2
- package/dist/color-math.js +5 -3
- package/dist/compositions.js +1 -0
- package/dist/config/image-format.d.ts +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/log.d.ts +1 -3
- package/dist/config/log.js +2 -9
- package/dist/convert-entry-point-to-serve-url.js +2 -2
- package/dist/download-progress.d.ts +1 -1
- package/dist/download-progress.js +1 -4
- package/dist/editor/components/CanvasOrLoading.d.ts +5 -0
- package/dist/editor/components/CanvasOrLoading.js +66 -0
- package/dist/editor/components/CheckboardToggle.js +2 -1
- package/dist/editor/components/CompositionSelectorItem.js +2 -2
- package/dist/editor/components/CurrentCompositionSideEffects.js +3 -3
- package/dist/editor/components/InitialCompositionLoader.js +1 -1
- package/dist/editor/components/InlineAction.d.ts +6 -4
- package/dist/editor/components/InlineAction.js +7 -8
- package/dist/editor/components/LoopToggle.js +2 -1
- package/dist/editor/components/Menu/MenuItem.js +1 -1
- package/dist/editor/components/Menu/SubMenu.js +1 -1
- package/dist/editor/components/Menu/styles.d.ts +1 -0
- package/dist/editor/components/Menu/styles.js +6 -1
- package/dist/editor/components/MenuBuildIndicator.js +20 -1
- package/dist/editor/components/MenuToolbar.js +15 -3
- package/dist/editor/components/Modals.js +2 -2
- package/dist/editor/components/NewComposition/ComboBox.js +20 -5
- package/dist/editor/components/NewComposition/InputDragger.js +3 -2
- package/dist/editor/components/NewComposition/MenuContent.d.ts +1 -0
- package/dist/editor/components/NewComposition/MenuContent.js +12 -4
- package/dist/editor/components/Notifications/ServerDisconnected.js +2 -2
- package/dist/editor/components/OpenEditorButton.d.ts +2 -0
- package/dist/editor/components/OpenEditorButton.js +52 -0
- package/dist/editor/components/PlayPause.js +4 -2
- package/dist/editor/components/PreviewToolbar.js +2 -2
- package/dist/editor/components/QuickSwitcher/algolia-search.js +1 -1
- package/dist/editor/components/RenderButton.d.ts +1 -5
- package/dist/editor/components/RenderButton.js +48 -21
- package/dist/editor/components/RenderModal/CliCopyButton.js +51 -14
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +0 -1
- package/dist/editor/components/RenderModal/CrfSetting.js +0 -1
- package/dist/editor/components/RenderModal/DataEditor.d.ts +21 -0
- package/dist/editor/components/RenderModal/DataEditor.js +287 -0
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +3 -2
- package/dist/editor/components/RenderModal/InfoBubble.js +2 -1
- package/dist/editor/components/RenderModal/InfoTooltip.d.ts +1 -0
- package/dist/editor/components/RenderModal/InfoTooltip.js +6 -5
- package/dist/editor/components/RenderModal/InlineEyeIcon.js +6 -3
- package/dist/editor/components/RenderModal/InlineRemoveButton.js +6 -1
- package/dist/editor/components/RenderModal/MutedSetting.js +3 -2
- package/dist/editor/components/RenderModal/OptionExplainer.js +14 -3
- package/dist/editor/components/RenderModal/RenderModal.d.ts +7 -3
- package/dist/editor/components/RenderModal/RenderModal.js +108 -49
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +0 -2
- package/dist/editor/components/RenderModal/RenderModalAudio.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +3 -2
- package/dist/editor/components/RenderModal/RenderModalBasic.js +4 -3
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +16 -4
- package/dist/editor/components/RenderModal/RenderModalData.js +109 -42
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/{RenderModalJSONInputPropsEditor.js → RenderModalJSONPropsEditor.js} +51 -30
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +2 -2
- package/dist/editor/components/RenderModal/RenderModalPicture.js +2 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +6 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +4 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +4 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +15 -6
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +5 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +5 -4
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.js +6 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +7 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +19 -29
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +4 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +7 -7
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +23 -66
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +13 -21
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDefaultEditor.d.ts +17 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDefaultEditor.js +10 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +4 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +20 -19
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +4 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +12 -26
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +16 -32
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +7 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +18 -11
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +44 -11
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.d.ts +17 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +59 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +12 -23
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +32 -21
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +5 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +6 -6
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +22 -22
- package/dist/editor/components/RenderModal/SchemaEditor/deep-equal.d.ts +1 -0
- package/dist/editor/components/RenderModal/SchemaEditor/deep-equal.js +27 -0
- 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 +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +42 -0
- package/dist/editor/components/RenderModal/SchemaEditor/local-state.d.ts +16 -0
- package/dist/editor/components/RenderModal/SchemaEditor/local-state.js +38 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +9 -1
- package/dist/editor/components/RenderModal/get-render-modal-warnings.js +42 -8
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +1 -1
- package/dist/editor/components/RenderModal/layout.js +3 -0
- package/dist/editor/components/RenderModal/out-name-checker.js +1 -11
- package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +5 -1
- package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +5 -1
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +5 -1
- package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +5 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +4 -3
- package/dist/editor/components/RenderQueue/actions.js +8 -3
- package/dist/editor/components/RenderQueue/index.js +9 -2
- package/dist/editor/components/RightPanel.js +8 -5
- package/dist/editor/components/SidebarCollapserControls.js +22 -9
- package/dist/editor/components/SidebarRenderButton.d.ts +6 -0
- package/dist/editor/components/{RenderToolbarIcon.js → SidebarRenderButton.js} +27 -41
- package/dist/editor/components/Spinner.d.ts +5 -0
- package/dist/editor/components/Spinner.js +41 -0
- package/dist/editor/components/Tabs/index.js +12 -14
- package/dist/editor/components/Timeline/Timeline.js +3 -1
- package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.js +4 -3
- package/dist/editor/components/Timeline/TimelineSequence.js +8 -6
- package/dist/editor/components/TimelineInOutToggle.js +2 -4
- package/dist/editor/components/TopPanel.js +2 -2
- package/dist/editor/components/UpdateCheck.js +2 -1
- package/dist/editor/components/get-zod-if-possible.d.ts +3 -3
- package/dist/editor/components/get-zod-if-possible.js +11 -11
- package/dist/editor/helpers/calculate-timeline.js +1 -1
- package/dist/editor/helpers/client-id.d.ts +2 -2
- package/dist/editor/helpers/client-id.js +5 -5
- package/dist/editor/helpers/colors.d.ts +4 -2
- package/dist/editor/helpers/colors.js +4 -2
- package/dist/editor/helpers/get-timeline-sequence-layout.d.ts +2 -2
- package/dist/editor/helpers/is-composition-still.d.ts +3 -2
- package/dist/editor/helpers/is-current-selected-still.js +3 -4
- package/dist/editor/helpers/use-file-existence.js +1 -1
- package/dist/editor/helpers/use-menu-structure.js +1 -1
- package/dist/editor/icons/media-volume.js +2 -1
- package/dist/editor/icons/render.d.ts +1 -0
- package/dist/editor/icons/render.js +1 -1
- package/dist/editor/state/modals.d.ts +3 -1
- package/dist/entry-point.js +17 -17
- package/dist/event-source-events.d.ts +2 -0
- package/dist/event-source.js +2 -2
- package/dist/ffmpeg.js +14 -5
- package/dist/file-watcher.js +5 -5
- package/dist/get-cli-options.d.ts +3 -3
- package/dist/get-cli-options.js +4 -4
- package/dist/get-composition-id.d.ts +14 -2
- package/dist/get-composition-id.js +32 -8
- package/dist/get-composition-with-dimension-override.d.ts +13 -2
- package/dist/get-composition-with-dimension-override.js +12 -2
- package/dist/get-config-file-name.js +6 -6
- package/dist/get-env.js +10 -10
- package/dist/get-filename.js +1 -0
- package/dist/get-input-props.d.ts +1 -1
- package/dist/get-input-props.js +9 -9
- package/dist/get-network-address.js +2 -2
- package/dist/handle-common-errors.d.ts +2 -1
- package/dist/handle-common-errors.js +2 -2
- package/dist/index.d.ts +41 -19
- package/dist/index.js +9 -6
- package/dist/list-of-remotion-packages.js +2 -1
- package/dist/load-config.js +8 -8
- 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/api-types.d.ts +3 -3
- package/dist/preview-server/dev-middleware/compatible-api.d.ts +2 -2
- package/dist/preview-server/dev-middleware/middleware.d.ts +1 -1
- package/dist/preview-server/dev-middleware/middleware.js +7 -7
- package/dist/preview-server/dev-middleware/range-parser.d.ts +1 -1
- package/dist/preview-server/dev-middleware/setup-hooks.js +2 -2
- package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +5 -5
- package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +17 -17
- package/dist/preview-server/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.d.ts +2 -0
- package/dist/preview-server/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +18 -0
- package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.js +30 -12
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.d.ts +4 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.js +5 -2
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.d.ts +4 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.js +5 -5
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.d.ts +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.js +4 -3
- package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +2 -1
- package/dist/preview-server/error-overlay/remotion-overlay/Overlay.js +1 -1
- package/dist/preview-server/error-overlay/remotion-overlay/Retry.d.ts +4 -0
- package/dist/preview-server/error-overlay/remotion-overlay/Retry.js +9 -0
- package/dist/preview-server/file-existence-watchers.js +3 -3
- package/dist/preview-server/get-absolute-public-dir.js +3 -3
- package/dist/preview-server/get-package-manager.js +3 -3
- package/dist/preview-server/handler.d.ts +1 -1
- package/dist/preview-server/hot-middleware/index.d.ts +1 -1
- package/dist/preview-server/hot-middleware/index.js +2 -2
- package/dist/preview-server/live-events.d.ts +1 -1
- package/dist/preview-server/parse-body.d.ts +1 -1
- package/dist/preview-server/project-info.js +5 -5
- package/dist/preview-server/public-folder.js +8 -8
- package/dist/preview-server/render-queue/job.d.ts +11 -2
- package/dist/preview-server/render-queue/make-retry-payload.js +5 -1
- package/dist/preview-server/render-queue/open-directory-in-finder.js +8 -8
- package/dist/preview-server/render-queue/process-still.js +1 -0
- package/dist/preview-server/render-queue/queue.js +4 -4
- package/dist/preview-server/routes/can-update-default-props.js +3 -2
- package/dist/preview-server/routes/update-default-props.d.ts +2 -2
- package/dist/preview-server/routes/update-default-props.js +26 -15
- package/dist/preview-server/routes.d.ts +3 -2
- package/dist/preview-server/routes.js +10 -10
- package/dist/preview-server/serve-static.d.ts +1 -1
- package/dist/preview-server/serve-static.js +7 -7
- package/dist/preview-server/start-server.js +3 -3
- package/dist/preview.js +6 -4
- package/dist/print-error.d.ts +2 -1
- package/dist/print-error.js +8 -5
- package/dist/print-help.js +1 -1
- package/dist/progress-bar.d.ts +5 -4
- package/dist/progress-bar.js +42 -29
- package/dist/render-flows/render.d.ts +1 -1
- package/dist/render-flows/render.js +62 -35
- package/dist/render-flows/still.d.ts +3 -2
- package/dist/render-flows/still.js +34 -28
- package/dist/resolve-from.js +5 -5
- package/dist/setup-cache.d.ts +2 -1
- package/dist/setup-cache.js +10 -6
- package/dist/should-use-non-overlaying-logger.d.ts +4 -0
- package/dist/should-use-non-overlaying-logger.js +12 -0
- package/dist/show-compositions-picker.d.ts +8 -0
- package/dist/show-compositions-picker.js +51 -0
- package/dist/still.js +1 -0
- package/dist/studio.d.ts +1 -0
- package/dist/studio.js +140 -0
- package/dist/upgrade.js +2 -2
- package/dist/user-passed-output-location.d.ts +3 -2
- package/dist/user-passed-output-location.js +10 -5
- package/dist/versions.js +2 -2
- package/dist/watch-root-file.d.ts +1 -0
- package/dist/watch-root-file.js +22 -0
- package/package.json +89 -88
- package/styles/styles.css +4 -5
- package/dist/editor/components/CollapsableOptions.d.ts +0 -6
- package/dist/editor/components/CollapsableOptions.js +0 -35
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +0 -10
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +0 -2
- package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +0 -21
- package/dist/editor/components/RenderToolbarIcon.d.ts +0 -2
- package/dist/editor/icons/RenderStillIcon.d.ts +0 -3
- package/dist/editor/icons/RenderStillIcon.js +0 -8
|
@@ -6,8 +6,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.renderStillFlow = void 0;
|
|
8
8
|
const renderer_1 = require("@remotion/renderer");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
11
|
const chalk_1 = require("../chalk");
|
|
12
12
|
const cleanup_before_quit_1 = require("../cleanup-before-quit");
|
|
13
13
|
const config_1 = require("../config");
|
|
@@ -19,26 +19,27 @@ const parse_command_line_1 = require("../parse-command-line");
|
|
|
19
19
|
const progress_bar_1 = require("../progress-bar");
|
|
20
20
|
const progress_types_1 = require("../progress-types");
|
|
21
21
|
const setup_cache_1 = require("../setup-cache");
|
|
22
|
+
const should_use_non_overlaying_logger_1 = require("../should-use-non-overlaying-logger");
|
|
22
23
|
const truthy_1 = require("../truthy");
|
|
23
24
|
const user_passed_output_location_1 = require("../user-passed-output-location");
|
|
24
|
-
const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, inputProps, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indentOutput, addCleanupCallback, cancelSignal, }) => {
|
|
25
|
+
const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason, remainingArgs, browser, browserExecutable, chromiumOptions, envVariables, height, inputProps, overwrite, port, publicDir, puppeteerTimeout, jpegQuality, scale, stillFrame, width, compositionIdFromUi, imageFormatFromUi, logLevel, onProgress, indentOutput, addCleanupCallback, cancelSignal, outputLocationFromUi, }) => {
|
|
25
26
|
var _a, _b;
|
|
26
27
|
const downloads = [];
|
|
27
28
|
const aggregate = (0, progress_types_1.initialAggregateRenderProgress)();
|
|
29
|
+
const updatesDontOverwrite = (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel });
|
|
28
30
|
let renderProgress = null;
|
|
29
31
|
const steps = [
|
|
30
32
|
renderer_1.RenderInternals.isServeUrl(fullEntryPoint) ? null : 'bundling',
|
|
31
33
|
'rendering',
|
|
32
34
|
].filter(truthy_1.truthy);
|
|
33
|
-
const updateProgress = () => {
|
|
35
|
+
const updateProgress = (newline) => {
|
|
34
36
|
const { output, progress, message } = (0, progress_bar_1.makeRenderingAndStitchingProgress)({
|
|
35
37
|
prog: aggregate,
|
|
36
|
-
indent: indentOutput,
|
|
37
38
|
steps: steps.length,
|
|
38
39
|
stitchingStep: steps.indexOf('stitching'),
|
|
39
40
|
});
|
|
40
41
|
if (renderProgress) {
|
|
41
|
-
renderProgress.update(output);
|
|
42
|
+
renderProgress.update(updatesDontOverwrite ? message : output, newline);
|
|
42
43
|
}
|
|
43
44
|
onProgress({ message, value: progress, ...aggregate });
|
|
44
45
|
};
|
|
@@ -49,7 +50,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
49
50
|
chromiumOptions,
|
|
50
51
|
shouldDumpIo,
|
|
51
52
|
forceDeviceScaleFactor: scale,
|
|
52
|
-
|
|
53
|
+
indent: indentOutput,
|
|
53
54
|
});
|
|
54
55
|
const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
55
56
|
fullPath: fullEntryPoint,
|
|
@@ -59,7 +60,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
59
60
|
onProgress: ({ copying, bundling }) => {
|
|
60
61
|
aggregate.bundling = bundling;
|
|
61
62
|
aggregate.copyingState = copying;
|
|
62
|
-
updateProgress();
|
|
63
|
+
updateProgress(false);
|
|
63
64
|
},
|
|
64
65
|
indentOutput,
|
|
65
66
|
logLevel,
|
|
@@ -69,34 +70,35 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
69
70
|
renderer_1.RenderInternals.deleteDirectory(dir);
|
|
70
71
|
});
|
|
71
72
|
},
|
|
73
|
+
quietProgress: updatesDontOverwrite,
|
|
72
74
|
});
|
|
73
75
|
addCleanupCallback(() => cleanupBundle());
|
|
74
76
|
const puppeteerInstance = await browserInstance;
|
|
75
77
|
addCleanupCallback(() => puppeteerInstance.close(false));
|
|
76
78
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
77
79
|
addCleanupCallback(() => renderer_1.RenderInternals.cleanDownloadMap(downloadMap));
|
|
78
|
-
const comps = await (0, renderer_1.getCompositions)(urlOrBundle, {
|
|
79
|
-
inputProps,
|
|
80
|
-
puppeteerInstance,
|
|
81
|
-
envVariables,
|
|
82
|
-
timeoutInMilliseconds: puppeteerTimeout,
|
|
83
|
-
chromiumOptions,
|
|
84
|
-
port,
|
|
85
|
-
browserExecutable,
|
|
86
|
-
downloadMap,
|
|
87
|
-
});
|
|
88
80
|
const { compositionId, config, reason, argsAfterComposition } = await (0, get_composition_with_dimension_override_1.getCompositionWithDimensionOverride)({
|
|
89
|
-
validCompositions: comps,
|
|
90
81
|
height,
|
|
91
82
|
width,
|
|
92
83
|
args: remainingArgs,
|
|
93
84
|
compositionIdFromUi,
|
|
85
|
+
browserExecutable,
|
|
86
|
+
chromiumOptions,
|
|
87
|
+
downloadMap,
|
|
88
|
+
envVariables,
|
|
89
|
+
indent: indentOutput,
|
|
90
|
+
inputProps,
|
|
91
|
+
port,
|
|
92
|
+
puppeteerInstance,
|
|
93
|
+
serveUrlOrWebpackUrl: urlOrBundle,
|
|
94
|
+
timeoutInMilliseconds: puppeteerTimeout,
|
|
95
|
+
verbose: renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose'),
|
|
94
96
|
});
|
|
95
97
|
const { format: imageFormat, source } = (0, determine_image_format_1.determineFinalStillImageFormat)({
|
|
96
98
|
cliFlag: (_a = parse_command_line_1.parsedCli['image-format']) !== null && _a !== void 0 ? _a : null,
|
|
97
99
|
configImageFormat: (_b = config_1.ConfigInternals.getUserPreferredStillImageFormat()) !== null && _b !== void 0 ? _b : null,
|
|
98
100
|
downloadName: null,
|
|
99
|
-
outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(argsAfterComposition),
|
|
101
|
+
outName: (0, user_passed_output_location_1.getUserPassedOutputLocation)(argsAfterComposition, outputLocationFromUi),
|
|
100
102
|
isLambda: false,
|
|
101
103
|
fromUi: imageFormatFromUi,
|
|
102
104
|
});
|
|
@@ -105,15 +107,20 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
105
107
|
defaultExtension: imageFormat,
|
|
106
108
|
args: argsAfterComposition,
|
|
107
109
|
type: 'asset',
|
|
110
|
+
outputLocationFromUi,
|
|
108
111
|
});
|
|
109
112
|
const absoluteOutputLocation = (0, get_cli_options_1.getAndValidateAbsoluteOutputFile)(relativeOutputLocation, overwrite);
|
|
110
|
-
(0,
|
|
113
|
+
const exists = (0, node_fs_1.existsSync)(absoluteOutputLocation);
|
|
114
|
+
(0, node_fs_1.mkdirSync)(node_path_1.default.join(absoluteOutputLocation, '..'), {
|
|
111
115
|
recursive: true,
|
|
112
116
|
});
|
|
113
|
-
log_1.Log.
|
|
117
|
+
log_1.Log.verboseAdvanced({ indent: indentOutput, logLevel, tag: 'config' }, chalk_1.chalk.gray(`Entry point = ${fullEntryPoint} (${entryPointReason})`));
|
|
118
|
+
log_1.Log.infoAdvanced({ indent: indentOutput, logLevel }, chalk_1.chalk.gray(`Composition = ${compositionId} (${reason}), Format = ${imageFormat} (${source}), Output = ${relativeOutputLocation}`));
|
|
114
119
|
renderProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
115
120
|
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
116
121
|
cancelSignal,
|
|
122
|
+
updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
|
|
123
|
+
indent: indentOutput,
|
|
117
124
|
});
|
|
118
125
|
const renderStart = Date.now();
|
|
119
126
|
aggregate.rendering = {
|
|
@@ -123,7 +130,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
123
130
|
steps,
|
|
124
131
|
totalFrames: 1,
|
|
125
132
|
};
|
|
126
|
-
updateProgress();
|
|
133
|
+
updateProgress(false);
|
|
127
134
|
const onDownload = (src) => {
|
|
128
135
|
const id = Math.random();
|
|
129
136
|
const download = {
|
|
@@ -134,10 +141,10 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
134
141
|
totalBytes: null,
|
|
135
142
|
};
|
|
136
143
|
downloads.push(download);
|
|
137
|
-
updateProgress();
|
|
144
|
+
updateProgress(false);
|
|
138
145
|
return ({ percent }) => {
|
|
139
146
|
download.progress = percent;
|
|
140
|
-
updateProgress();
|
|
147
|
+
updateProgress(false);
|
|
141
148
|
};
|
|
142
149
|
};
|
|
143
150
|
await (0, renderer_1.renderStill)({
|
|
@@ -167,8 +174,7 @@ const renderStillFlow = async ({ remotionRoot, fullEntryPoint, entryPointReason,
|
|
|
167
174
|
steps,
|
|
168
175
|
totalFrames: 1,
|
|
169
176
|
};
|
|
170
|
-
updateProgress();
|
|
171
|
-
log_1.Log.infoAdvanced({ indent: indentOutput, logLevel });
|
|
172
|
-
log_1.Log.infoAdvanced({ indent: indentOutput, logLevel }, chalk_1.chalk.cyan(`▶️ ${absoluteOutputLocation}`));
|
|
177
|
+
updateProgress(true);
|
|
178
|
+
log_1.Log.infoAdvanced({ indent: indentOutput, logLevel }, chalk_1.chalk.blue(`${exists ? '○' : '+'} ${absoluteOutputLocation}`));
|
|
173
179
|
};
|
|
174
180
|
exports.renderStillFlow = renderStillFlow;
|
package/dist/resolve-from.js
CHANGED
|
@@ -4,22 +4,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.resolveFrom = void 0;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const Module = require("module");
|
|
10
10
|
const resolveFrom = (fromDirectory, moduleId) => {
|
|
11
11
|
try {
|
|
12
|
-
fromDirectory =
|
|
12
|
+
fromDirectory = node_fs_1.default.realpathSync(fromDirectory);
|
|
13
13
|
}
|
|
14
14
|
catch (error) {
|
|
15
15
|
if (error.code === 'ENOENT') {
|
|
16
|
-
fromDirectory =
|
|
16
|
+
fromDirectory = node_path_1.default.resolve(fromDirectory);
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
19
|
throw error;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
const fromFile =
|
|
22
|
+
const fromFile = node_path_1.default.join(fromDirectory, 'noop.js');
|
|
23
23
|
const resolveFileName = () =>
|
|
24
24
|
// @ts-expect-error
|
|
25
25
|
Module._resolveFilename(moduleId, {
|
package/dist/setup-cache.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
2
|
import type { BundlingState, CopyingState } from './progress-bar';
|
|
3
|
-
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, }: {
|
|
3
|
+
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }: {
|
|
4
4
|
fullPath: string;
|
|
5
5
|
remotionRoot: string;
|
|
6
6
|
publicDir: string | null;
|
|
@@ -13,6 +13,7 @@ export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, publi
|
|
|
13
13
|
bundlingStep: number;
|
|
14
14
|
steps: number;
|
|
15
15
|
onDirectoryCreated: (path: string) => void;
|
|
16
|
+
quietProgress: boolean;
|
|
16
17
|
}) => Promise<{
|
|
17
18
|
urlOrBundle: string;
|
|
18
19
|
cleanup: () => void;
|
package/dist/setup-cache.js
CHANGED
|
@@ -7,7 +7,8 @@ const config_1 = require("./config");
|
|
|
7
7
|
const log_1 = require("./log");
|
|
8
8
|
const parse_command_line_1 = require("./parse-command-line");
|
|
9
9
|
const progress_bar_1 = require("./progress-bar");
|
|
10
|
-
const
|
|
10
|
+
const should_use_non_overlaying_logger_1 = require("./should-use-non-overlaying-logger");
|
|
11
|
+
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, onProgress, indentOutput, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
|
|
11
12
|
if (renderer_1.RenderInternals.isServeUrl(fullPath)) {
|
|
12
13
|
return {
|
|
13
14
|
urlOrBundle: fullPath,
|
|
@@ -24,6 +25,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
24
25
|
bundlingStep,
|
|
25
26
|
steps,
|
|
26
27
|
onDirectoryCreated,
|
|
28
|
+
quietProgress,
|
|
27
29
|
});
|
|
28
30
|
return {
|
|
29
31
|
urlOrBundle: bundled,
|
|
@@ -31,7 +33,7 @@ const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, publicDir, on
|
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
35
|
exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
|
|
34
|
-
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, }) => {
|
|
36
|
+
const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallback, indent, logLevel, bundlingStep, steps, onDirectoryCreated, quietProgress, }) => {
|
|
35
37
|
var _a;
|
|
36
38
|
const shouldCache = config_1.ConfigInternals.getWebpackCaching();
|
|
37
39
|
const symlinkState = {
|
|
@@ -54,7 +56,7 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
54
56
|
bundling: bundlingState,
|
|
55
57
|
copying: copyingState,
|
|
56
58
|
symLinks: symlinkState,
|
|
57
|
-
},
|
|
59
|
+
}, bundlingStep, steps), newline);
|
|
58
60
|
onProgressCallback({
|
|
59
61
|
bundling: bundlingState,
|
|
60
62
|
copying: copyingState,
|
|
@@ -92,16 +94,18 @@ const bundleOnCli = async ({ fullPath, remotionRoot, publicDir, onProgressCallba
|
|
|
92
94
|
const cacheExistedBefore = bundler_1.BundlerInternals.cacheExists(remotionRoot, 'production', hash);
|
|
93
95
|
if (cacheExistedBefore !== 'does-not-exist' && !shouldCache) {
|
|
94
96
|
log_1.Log.infoAdvanced({ indent, logLevel }, '🧹 Cache disabled but found. Deleting... ');
|
|
95
|
-
await bundler_1.BundlerInternals.clearCache(remotionRoot);
|
|
97
|
+
await bundler_1.BundlerInternals.clearCache(remotionRoot, 'production');
|
|
96
98
|
}
|
|
97
99
|
if (cacheExistedBefore === 'other-exists' && shouldCache) {
|
|
98
100
|
log_1.Log.infoAdvanced({ indent, logLevel }, '🧹 Webpack config change detected. Clearing cache... ');
|
|
99
|
-
await bundler_1.BundlerInternals.clearCache(remotionRoot);
|
|
101
|
+
await bundler_1.BundlerInternals.clearCache(remotionRoot, 'production');
|
|
100
102
|
}
|
|
101
103
|
const bundleStartTime = Date.now();
|
|
102
104
|
const bundlingProgress = (0, progress_bar_1.createOverwriteableCliOutput)({
|
|
103
|
-
quiet: (0, parse_command_line_1.quietFlagProvided)(),
|
|
105
|
+
quiet: quietProgress || (0, parse_command_line_1.quietFlagProvided)(),
|
|
104
106
|
cancelSignal: null,
|
|
107
|
+
updatesDontOverwrite: (0, should_use_non_overlaying_logger_1.shouldUseNonOverlayingLogger)({ logLevel }),
|
|
108
|
+
indent,
|
|
105
109
|
});
|
|
106
110
|
let bundlingState = {
|
|
107
111
|
progress: 0,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Should not use a logger that uses ANSI Diffing if
|
|
3
|
+
// - using verbose logging (intersection of Chrome + Remotion + compositor logs)
|
|
4
|
+
// - using a non-interactive terminal such as CI
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.shouldUseNonOverlayingLogger = void 0;
|
|
7
|
+
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const shouldUseNonOverlayingLogger = ({ logLevel, }) => {
|
|
9
|
+
return (renderer_1.RenderInternals.isEqualOrBelowLogLevel(logLevel, 'verbose') ||
|
|
10
|
+
!process.stdout.isTTY);
|
|
11
|
+
};
|
|
12
|
+
exports.shouldUseNonOverlayingLogger = shouldUseNonOverlayingLogger;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { getCompositions } from '@remotion/renderer';
|
|
2
|
+
declare type Await<T> = T extends PromiseLike<infer U> ? U : T;
|
|
3
|
+
export declare const showSingleCompositionsPicker: (validCompositions: Await<ReturnType<typeof getCompositions>>) => Promise<{
|
|
4
|
+
compositionId: string;
|
|
5
|
+
reason: string;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const showMultiCompositionsPicker: (validCompositions: Await<ReturnType<typeof getCompositions>>) => Promise<string[]>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.showMultiCompositionsPicker = exports.showSingleCompositionsPicker = void 0;
|
|
4
|
+
const composition_prompts_1 = require("./composition-prompts");
|
|
5
|
+
const chalk_1 = require("./chalk");
|
|
6
|
+
const showSingleCompositionsPicker = async (validCompositions) => {
|
|
7
|
+
if (validCompositions.length === 1) {
|
|
8
|
+
const onlyComposition = validCompositions[0];
|
|
9
|
+
if (onlyComposition) {
|
|
10
|
+
return {
|
|
11
|
+
compositionId: onlyComposition.id,
|
|
12
|
+
reason: 'Only composition',
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const selectedComposition = (await (0, composition_prompts_1.selectAsync)({
|
|
17
|
+
message: 'Select composition:',
|
|
18
|
+
optionsPerPage: 5,
|
|
19
|
+
type: 'select',
|
|
20
|
+
choices: validCompositions.map((comp) => {
|
|
21
|
+
return {
|
|
22
|
+
value: comp.id,
|
|
23
|
+
title: chalk_1.chalk.bold(comp.id),
|
|
24
|
+
};
|
|
25
|
+
}),
|
|
26
|
+
}));
|
|
27
|
+
return { compositionId: selectedComposition, reason: 'Selected' };
|
|
28
|
+
};
|
|
29
|
+
exports.showSingleCompositionsPicker = showSingleCompositionsPicker;
|
|
30
|
+
const showMultiCompositionsPicker = async (validCompositions) => {
|
|
31
|
+
if (validCompositions.length === 1) {
|
|
32
|
+
const onlyComposition = validCompositions[0];
|
|
33
|
+
if (onlyComposition) {
|
|
34
|
+
return [onlyComposition.id];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const selectedComposition = await (0, composition_prompts_1.selectAsync)({
|
|
38
|
+
message: 'Select compositions:',
|
|
39
|
+
optionsPerPage: 5,
|
|
40
|
+
type: 'multiselect',
|
|
41
|
+
min: 1,
|
|
42
|
+
choices: validCompositions.map((comp) => {
|
|
43
|
+
return {
|
|
44
|
+
value: comp.id,
|
|
45
|
+
title: chalk_1.chalk.bold(comp.id),
|
|
46
|
+
};
|
|
47
|
+
}),
|
|
48
|
+
});
|
|
49
|
+
return selectedComposition;
|
|
50
|
+
};
|
|
51
|
+
exports.showMultiCompositionsPicker = showMultiCompositionsPicker;
|
package/dist/still.js
CHANGED
package/dist/studio.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const studioCommand: (remotionRoot: string, args: string[]) => Promise<void>;
|
package/dist/studio.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.studioCommand = void 0;
|
|
7
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const better_opn_1 = require("./better-opn");
|
|
10
|
+
const chalk_1 = require("./chalk");
|
|
11
|
+
const config_1 = require("./config");
|
|
12
|
+
const convert_entry_point_to_serve_url_1 = require("./convert-entry-point-to-serve-url");
|
|
13
|
+
const entry_point_1 = require("./entry-point");
|
|
14
|
+
const get_env_1 = require("./get-env");
|
|
15
|
+
const get_input_props_1 = require("./get-input-props");
|
|
16
|
+
const get_network_address_1 = require("./get-network-address");
|
|
17
|
+
const log_1 = require("./log");
|
|
18
|
+
const parse_command_line_1 = require("./parse-command-line");
|
|
19
|
+
const get_absolute_public_dir_1 = require("./preview-server/get-absolute-public-dir");
|
|
20
|
+
const live_events_1 = require("./preview-server/live-events");
|
|
21
|
+
const public_folder_1 = require("./preview-server/public-folder");
|
|
22
|
+
const start_server_1 = require("./preview-server/start-server");
|
|
23
|
+
const watch_root_file_1 = require("./watch-root-file");
|
|
24
|
+
const noop = () => undefined;
|
|
25
|
+
const getShouldOpenBrowser = () => {
|
|
26
|
+
var _a;
|
|
27
|
+
if (parse_command_line_1.parsedCli['no-open']) {
|
|
28
|
+
return {
|
|
29
|
+
shouldOpenBrowser: false,
|
|
30
|
+
reasonForBrowserDecision: '--no-open specified',
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
if (((_a = process.env.BROWSER) !== null && _a !== void 0 ? _a : '').toLowerCase() === 'none') {
|
|
34
|
+
return {
|
|
35
|
+
shouldOpenBrowser: false,
|
|
36
|
+
reasonForBrowserDecision: 'env BROWSER=none was set',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (config_1.ConfigInternals.getShouldOpenBrowser() === false) {
|
|
40
|
+
return { shouldOpenBrowser: false, reasonForBrowserDecision: 'Config file' };
|
|
41
|
+
}
|
|
42
|
+
return { shouldOpenBrowser: true, reasonForBrowserDecision: 'default' };
|
|
43
|
+
};
|
|
44
|
+
const getPort = () => {
|
|
45
|
+
if (parse_command_line_1.parsedCli.port) {
|
|
46
|
+
return parse_command_line_1.parsedCli.port;
|
|
47
|
+
}
|
|
48
|
+
const serverPort = config_1.ConfigInternals.getServerPort();
|
|
49
|
+
if (serverPort) {
|
|
50
|
+
return serverPort;
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
const studioCommand = async (remotionRoot, args) => {
|
|
55
|
+
const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
|
|
56
|
+
log_1.Log.verbose('Entry point:', file, 'reason:', reason);
|
|
57
|
+
if (!file) {
|
|
58
|
+
log_1.Log.error('No Remotion entrypoint was found. Specify an additional argument manually:');
|
|
59
|
+
log_1.Log.error(' npx remotion studio src/index.ts');
|
|
60
|
+
log_1.Log.error('See https://www.remotion.dev/docs/register-root for more information.');
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
const desiredPort = getPort();
|
|
64
|
+
const fullEntryPath = (0, convert_entry_point_to_serve_url_1.convertEntryPointToServeUrl)(file);
|
|
65
|
+
let inputProps = (0, get_input_props_1.getInputProps)((newProps) => {
|
|
66
|
+
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
67
|
+
inputProps = newProps;
|
|
68
|
+
listener.sendEventToClient({
|
|
69
|
+
type: 'new-input-props',
|
|
70
|
+
newProps,
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
let envVariables = await (0, get_env_1.getEnvironmentVariables)((newEnvVariables) => {
|
|
75
|
+
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
76
|
+
envVariables = newEnvVariables;
|
|
77
|
+
listener.sendEventToClient({
|
|
78
|
+
type: 'new-env-variables',
|
|
79
|
+
newEnvVariables,
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
const publicDir = (0, get_absolute_public_dir_1.getAbsolutePublicDir)({
|
|
84
|
+
userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
|
|
85
|
+
remotionRoot,
|
|
86
|
+
});
|
|
87
|
+
const hashPrefix = '/static-';
|
|
88
|
+
const staticHash = `${hashPrefix}${node_crypto_1.default.randomBytes(6).toString('hex')}`;
|
|
89
|
+
(0, public_folder_1.initPublicFolderWatch)({
|
|
90
|
+
publicDir,
|
|
91
|
+
remotionRoot,
|
|
92
|
+
onUpdate: () => {
|
|
93
|
+
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
94
|
+
listener.sendEventToClient({
|
|
95
|
+
type: 'new-public-folder',
|
|
96
|
+
files: (0, public_folder_1.getFiles)(),
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
staticHash,
|
|
101
|
+
});
|
|
102
|
+
(0, watch_root_file_1.watchRootFile)(remotionRoot);
|
|
103
|
+
const { port, liveEventsServer } = await (0, start_server_1.startServer)({
|
|
104
|
+
entry: node_path_1.default.resolve(__dirname, 'previewEntry.js'),
|
|
105
|
+
userDefinedComponent: fullEntryPath,
|
|
106
|
+
getCurrentInputProps: () => inputProps,
|
|
107
|
+
getEnvVariables: () => envVariables,
|
|
108
|
+
port: desiredPort,
|
|
109
|
+
maxTimelineTracks: config_1.ConfigInternals.getMaxTimelineTracks(),
|
|
110
|
+
remotionRoot,
|
|
111
|
+
keyboardShortcutsEnabled: config_1.ConfigInternals.getKeyboardShortcutsEnabled(),
|
|
112
|
+
publicDir,
|
|
113
|
+
webpackOverride: config_1.ConfigInternals.getWebpackOverrideFn(),
|
|
114
|
+
poll: config_1.ConfigInternals.getWebpackPolling(),
|
|
115
|
+
userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
|
|
116
|
+
hash: staticHash,
|
|
117
|
+
hashPrefix,
|
|
118
|
+
});
|
|
119
|
+
(0, live_events_1.setLiveEventsListener)(liveEventsServer);
|
|
120
|
+
const networkAddress = (0, get_network_address_1.getNetworkAddress)();
|
|
121
|
+
if (networkAddress) {
|
|
122
|
+
log_1.Log.info(`Server ready - Local: ${chalk_1.chalk.underline(`http://localhost:${port}`)}, Network: ${chalk_1.chalk.underline(`http://${networkAddress}:${port}`)}`);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
log_1.Log.info(`Running on http://localhost:${port}`);
|
|
126
|
+
}
|
|
127
|
+
const { reasonForBrowserDecision, shouldOpenBrowser } = getShouldOpenBrowser();
|
|
128
|
+
if (shouldOpenBrowser) {
|
|
129
|
+
await (0, better_opn_1.openBrowser)({
|
|
130
|
+
url: `http://localhost:${port}`,
|
|
131
|
+
browserArgs: parse_command_line_1.parsedCli['browser-args'],
|
|
132
|
+
browserFlag: parse_command_line_1.parsedCli.browser,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
log_1.Log.verbose(`Not opening browser, reason: ${reasonForBrowserDecision}`);
|
|
137
|
+
}
|
|
138
|
+
await new Promise(noop);
|
|
139
|
+
};
|
|
140
|
+
exports.studioCommand = studioCommand;
|
package/dist/upgrade.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.upgrade = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
const get_latest_remotion_version_1 = require("./get-latest-remotion-version");
|
|
11
11
|
const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
|
|
@@ -22,7 +22,7 @@ const getUpgradeCommand = ({ manager, packages, version, }) => {
|
|
|
22
22
|
};
|
|
23
23
|
const upgrade = async (remotionRoot, packageManager) => {
|
|
24
24
|
var _a, _b, _c, _d;
|
|
25
|
-
const packageJsonFilePath =
|
|
25
|
+
const packageJsonFilePath = node_path_1.default.join(remotionRoot, 'package.json');
|
|
26
26
|
const packageJson = require(packageJsonFilePath);
|
|
27
27
|
const dependencies = Object.keys(packageJson.dependencies);
|
|
28
28
|
const devDependencies = Object.keys((_a = packageJson.devDependencies) !== null && _a !== void 0 ? _a : {});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const getUserPassedOutputLocation: (args: string[]) => string;
|
|
2
|
-
export declare const getOutputLocation: ({ compositionId, defaultExtension, args, type, }: {
|
|
1
|
+
export declare const getUserPassedOutputLocation: (args: string[], uiPassedOutName: string | null) => string;
|
|
2
|
+
export declare const getOutputLocation: ({ compositionId, defaultExtension, args, type, outputLocationFromUi, }: {
|
|
3
3
|
compositionId: string;
|
|
4
|
+
outputLocationFromUi: string | null;
|
|
4
5
|
defaultExtension: string;
|
|
5
6
|
args: string[];
|
|
6
7
|
type: 'asset' | 'sequence';
|
|
@@ -3,15 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getOutputLocation = exports.getUserPassedOutputLocation = void 0;
|
|
4
4
|
const config_1 = require("./config");
|
|
5
5
|
const get_default_out_name_1 = require("./get-default-out-name");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const parse_command_line_1 = require("./parse-command-line");
|
|
7
|
+
const getUserPassedOutputLocation = (args, uiPassedOutName) => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const filename = (_b = (_a = uiPassedOutName !== null && uiPassedOutName !== void 0 ? uiPassedOutName : args[0]) !== null && _a !== void 0 ? _a : parse_command_line_1.parsedCli.output) !== null && _b !== void 0 ? _b : config_1.ConfigInternals.getOutputLocation();
|
|
9
10
|
return filename;
|
|
10
11
|
};
|
|
11
12
|
exports.getUserPassedOutputLocation = getUserPassedOutputLocation;
|
|
12
|
-
const getOutputLocation = ({ compositionId, defaultExtension, args, type, }) => {
|
|
13
|
+
const getOutputLocation = ({ compositionId, defaultExtension, args, type, outputLocationFromUi, }) => {
|
|
13
14
|
var _a;
|
|
14
|
-
|
|
15
|
+
if (typeof args[0] !== 'undefined' &&
|
|
16
|
+
typeof parse_command_line_1.parsedCli.output !== 'undefined') {
|
|
17
|
+
throw new Error('Both an output flag (--output) and an output location as a positional argument were passed. Please choose only one of the ways.');
|
|
18
|
+
}
|
|
19
|
+
return ((_a = (0, exports.getUserPassedOutputLocation)(args, outputLocationFromUi)) !== null && _a !== void 0 ? _a : (0, get_default_out_name_1.getDefaultOutLocation)({
|
|
15
20
|
compositionName: compositionId,
|
|
16
21
|
defaultExtension,
|
|
17
22
|
type,
|
package/dist/versions.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.versionsCommand = exports.validateVersionsBeforeCommand = exports.VERSIONS_COMMAND = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
|
-
const
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
|
|
11
11
|
const log_1 = require("./log");
|
|
@@ -14,7 +14,7 @@ const resolve_from_1 = require("./resolve-from");
|
|
|
14
14
|
const getVersion = async (remotionRoot, p) => {
|
|
15
15
|
try {
|
|
16
16
|
const remotionPkgJson = (0, resolve_from_1.resolveFrom)(remotionRoot, `${p}/package.json`);
|
|
17
|
-
const file = await
|
|
17
|
+
const file = await node_fs_1.default.promises.readFile(remotionPkgJson, 'utf-8');
|
|
18
18
|
const packageJson = JSON.parse(file);
|
|
19
19
|
return packageJson.version;
|
|
20
20
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const watchRootFile: (remotionRoot: string) => Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.watchRootFile = void 0;
|
|
4
|
+
const file_watcher_1 = require("./file-watcher");
|
|
5
|
+
const live_events_1 = require("./preview-server/live-events");
|
|
6
|
+
const project_info_1 = require("./preview-server/project-info");
|
|
7
|
+
const watchRootFile = async (remotionRoot) => {
|
|
8
|
+
const rootFile = await (0, project_info_1.getProjectInfo)(remotionRoot);
|
|
9
|
+
if (!rootFile.videoFile) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
(0, file_watcher_1.installFileWatcher)({
|
|
13
|
+
file: rootFile.videoFile,
|
|
14
|
+
onChange: () => {
|
|
15
|
+
// Don't care if changed, added or deleted - should trigger a refetch in the frontend all the time
|
|
16
|
+
(0, live_events_1.waitForLiveEventsListener)().then((listener) => {
|
|
17
|
+
listener.sendEventToClient({ type: 'root-file-changed' });
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.watchRootFile = watchRootFile;
|