@remotion/cli 3.0.23 → 3.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chalk/index.d.ts +58 -0
- package/dist/chalk/index.js +138 -0
- package/dist/chalk/symbols.d.ts +111 -0
- package/dist/chalk/symbols.js +75 -0
- package/dist/chalk/utilities.d.ts +2 -0
- package/dist/chalk/utilities.js +37 -0
- package/dist/code-frame.js +5 -8
- package/dist/download-progress.d.ts +1 -0
- package/dist/download-progress.js +17 -5
- package/dist/editor/components/CompositionManager.d.ts +4 -0
- package/dist/editor/components/CompositionManager.js +60 -0
- package/dist/format-bytes.d.ts +6 -0
- package/dist/format-bytes.js +103 -0
- package/dist/get-cli-options.js +0 -1
- package/dist/index.d.ts +59 -11
- package/dist/index.js +11 -5
- package/dist/log.js +4 -7
- package/dist/preview-server/fast-refresh/helpers.d.ts +39 -0
- package/dist/preview-server/fast-refresh/helpers.js +145 -0
- package/dist/preview-server/fast-refresh/index.d.ts +30 -0
- package/dist/preview-server/fast-refresh/index.js +86 -0
- package/dist/preview-server/fast-refresh/loader.d.ts +35 -0
- package/dist/preview-server/fast-refresh/loader.js +81 -0
- package/dist/preview-server/fast-refresh/runtime.d.ts +35 -0
- package/dist/preview-server/fast-refresh/runtime.js +32 -0
- package/dist/preview-server/static-preview.d.ts +1 -0
- package/dist/preview-server/static-preview.js +40 -0
- package/dist/preview-server/webpack-cache.d.ts +12 -0
- package/dist/preview-server/webpack-cache.js +66 -0
- package/dist/print-error.js +5 -8
- package/dist/print-help.js +8 -11
- package/dist/progress-bar.d.ts +3 -1
- package/dist/progress-bar.js +4 -7
- package/dist/render.js +9 -5
- package/dist/still.js +5 -3
- package/package.json +7 -8
- package/dist/ansi/ansi-diff.d.ts.map +0 -1
- package/dist/ansi/ansi-diff.js.map +0 -1
- package/dist/ansi/ansi-regex.d.ts.map +0 -1
- package/dist/ansi/ansi-regex.js.map +0 -1
- package/dist/ansi/ansi-split.d.ts.map +0 -1
- package/dist/ansi/ansi-split.js.map +0 -1
- package/dist/check-version.d.ts.map +0 -1
- package/dist/check-version.js.map +0 -1
- package/dist/code-frame.d.ts.map +0 -1
- package/dist/code-frame.js.map +0 -1
- package/dist/compositions.d.ts.map +0 -1
- package/dist/compositions.js.map +0 -1
- package/dist/download-progress.d.ts.map +0 -1
- package/dist/download-progress.js.map +0 -1
- package/dist/editor/components/AudioWaveform.d.ts.map +0 -1
- package/dist/editor/components/AudioWaveform.js.map +0 -1
- package/dist/editor/components/AudioWaveformBar.d.ts.map +0 -1
- package/dist/editor/components/AudioWaveformBar.js.map +0 -1
- package/dist/editor/components/Canvas.d.ts.map +0 -1
- package/dist/editor/components/Canvas.js.map +0 -1
- package/dist/editor/components/CheckboardToggle.d.ts.map +0 -1
- package/dist/editor/components/CheckboardToggle.js.map +0 -1
- package/dist/editor/components/ClipboardIcon.d.ts.map +0 -1
- package/dist/editor/components/ClipboardIcon.js.map +0 -1
- package/dist/editor/components/CompositionSelector.d.ts.map +0 -1
- package/dist/editor/components/CompositionSelector.js.map +0 -1
- package/dist/editor/components/CompositionSelectorItem.d.ts.map +0 -1
- package/dist/editor/components/CompositionSelectorItem.js.map +0 -1
- package/dist/editor/components/ControlButton.d.ts.map +0 -1
- package/dist/editor/components/ControlButton.js.map +0 -1
- package/dist/editor/components/CopyButton.d.ts.map +0 -1
- package/dist/editor/components/CopyButton.js.map +0 -1
- package/dist/editor/components/CurrentComposition.d.ts.map +0 -1
- package/dist/editor/components/CurrentComposition.js.map +0 -1
- package/dist/editor/components/Editor.d.ts.map +0 -1
- package/dist/editor/components/Editor.js.map +0 -1
- package/dist/editor/components/EditorContent.d.ts.map +0 -1
- package/dist/editor/components/EditorContent.js.map +0 -1
- package/dist/editor/components/FpsCounter.d.ts.map +0 -1
- package/dist/editor/components/FpsCounter.js.map +0 -1
- package/dist/editor/components/FramePersistor.d.ts.map +0 -1
- package/dist/editor/components/FramePersistor.js.map +0 -1
- package/dist/editor/components/GlobalKeybindings.d.ts.map +0 -1
- package/dist/editor/components/GlobalKeybindings.js.map +0 -1
- package/dist/editor/components/KeyboardShortcutsModal.d.ts.map +0 -1
- package/dist/editor/components/KeyboardShortcutsModal.js.map +0 -1
- package/dist/editor/components/LoadingIndicator.d.ts.map +0 -1
- package/dist/editor/components/LoadingIndicator.js.map +0 -1
- package/dist/editor/components/LoopToggle.d.ts.map +0 -1
- package/dist/editor/components/LoopToggle.js.map +0 -1
- package/dist/editor/components/Menu/MenuDivider.d.ts.map +0 -1
- package/dist/editor/components/Menu/MenuDivider.js.map +0 -1
- package/dist/editor/components/Menu/MenuItem.d.ts.map +0 -1
- package/dist/editor/components/Menu/MenuItem.js.map +0 -1
- package/dist/editor/components/Menu/MenuSubItem.d.ts.map +0 -1
- package/dist/editor/components/Menu/MenuSubItem.js.map +0 -1
- package/dist/editor/components/Menu/SubMenu.d.ts.map +0 -1
- package/dist/editor/components/Menu/SubMenu.js.map +0 -1
- package/dist/editor/components/Menu/portals.d.ts.map +0 -1
- package/dist/editor/components/Menu/portals.js.map +0 -1
- package/dist/editor/components/Menu/styles.d.ts.map +0 -1
- package/dist/editor/components/Menu/styles.js.map +0 -1
- package/dist/editor/components/MenuToolbar.d.ts.map +0 -1
- package/dist/editor/components/MenuToolbar.js.map +0 -1
- package/dist/editor/components/ModalContainer.d.ts.map +0 -1
- package/dist/editor/components/ModalContainer.js.map +0 -1
- package/dist/editor/components/ModalHeader.d.ts.map +0 -1
- package/dist/editor/components/ModalHeader.js.map +0 -1
- package/dist/editor/components/MuteToggle.d.ts.map +0 -1
- package/dist/editor/components/MuteToggle.js.map +0 -1
- package/dist/editor/components/NewComposition/CancelButton.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/CancelButton.js.map +0 -1
- package/dist/editor/components/NewComposition/ComboBox.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/ComboBox.js.map +0 -1
- package/dist/editor/components/NewComposition/CopyHint.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/CopyHint.js.map +0 -1
- package/dist/editor/components/NewComposition/InputDragger.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/InputDragger.js.map +0 -1
- package/dist/editor/components/NewComposition/MenuContent.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/MenuContent.js.map +0 -1
- package/dist/editor/components/NewComposition/NewCompAspectRatio.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/NewCompAspectRatio.js.map +0 -1
- package/dist/editor/components/NewComposition/NewCompCode.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/NewCompCode.js.map +0 -1
- package/dist/editor/components/NewComposition/NewCompDuration.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/NewCompDuration.js.map +0 -1
- package/dist/editor/components/NewComposition/NewComposition.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/NewComposition.js.map +0 -1
- package/dist/editor/components/NewComposition/RemInput.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/RemInput.js.map +0 -1
- package/dist/editor/components/NewComposition/ToggleAspectRatio.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/ToggleAspectRatio.js.map +0 -1
- package/dist/editor/components/NewComposition/ValidationMessage.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/ValidationMessage.js.map +0 -1
- package/dist/editor/components/NewComposition/new-comp-layout.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/new-comp-layout.js.map +0 -1
- package/dist/editor/components/NewComposition/render-aspect-ratio.d.ts.map +0 -1
- package/dist/editor/components/NewComposition/render-aspect-ratio.js.map +0 -1
- package/dist/editor/components/PlayPause.d.ts.map +0 -1
- package/dist/editor/components/PlayPause.js.map +0 -1
- package/dist/editor/components/PlaybackKeyboardShortcutsManager.d.ts.map +0 -1
- package/dist/editor/components/PlaybackKeyboardShortcutsManager.js.map +0 -1
- package/dist/editor/components/PlaybackRatePersistor.d.ts.map +0 -1
- package/dist/editor/components/PlaybackRatePersistor.js.map +0 -1
- package/dist/editor/components/PlaybackRateSelector.d.ts.map +0 -1
- package/dist/editor/components/PlaybackRateSelector.js.map +0 -1
- package/dist/editor/components/Preview.d.ts.map +0 -1
- package/dist/editor/components/Preview.js.map +0 -1
- package/dist/editor/components/PreviewToolbar.d.ts.map +0 -1
- package/dist/editor/components/PreviewToolbar.js.map +0 -1
- package/dist/editor/components/RichTimelineToggle.d.ts.map +0 -1
- package/dist/editor/components/RichTimelineToggle.js.map +0 -1
- package/dist/editor/components/SizeSelector.d.ts.map +0 -1
- package/dist/editor/components/SizeSelector.js.map +0 -1
- package/dist/editor/components/Splitter/SplitterContainer.d.ts.map +0 -1
- package/dist/editor/components/Splitter/SplitterContainer.js.map +0 -1
- package/dist/editor/components/Splitter/SplitterContext.d.ts.map +0 -1
- package/dist/editor/components/Splitter/SplitterContext.js.map +0 -1
- package/dist/editor/components/Splitter/SplitterElement.d.ts.map +0 -1
- package/dist/editor/components/Splitter/SplitterElement.js.map +0 -1
- package/dist/editor/components/Splitter/SplitterHandle.d.ts.map +0 -1
- package/dist/editor/components/Splitter/SplitterHandle.js.map +0 -1
- package/dist/editor/components/Thumbnail.d.ts.map +0 -1
- package/dist/editor/components/Thumbnail.js.map +0 -1
- package/dist/editor/components/TimeValue.d.ts.map +0 -1
- package/dist/editor/components/TimeValue.js.map +0 -1
- package/dist/editor/components/Timeline/LoopedIndicator.d.ts.map +0 -1
- package/dist/editor/components/Timeline/LoopedIndicator.js.map +0 -1
- package/dist/editor/components/Timeline/LoopedTimelineIndicators.d.ts.map +0 -1
- package/dist/editor/components/Timeline/LoopedTimelineIndicators.js.map +0 -1
- package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts.map +0 -1
- package/dist/editor/components/Timeline/MaxTimelineTracks.js.map +0 -1
- package/dist/editor/components/Timeline/Timeline.d.ts.map +0 -1
- package/dist/editor/components/Timeline/Timeline.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineCollapseToggle.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineCollapseToggle.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineDragHandler.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineDragHandler.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineInOutPointer.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineInOutPointer.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineInOutPointerHandle.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineList.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineList.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineListItem.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineListItem.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineSequence.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineSequence.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineSequenceFrame.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineSequenceFrame.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineSlider.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineSlider.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineSliderHandle.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineSliderHandle.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineTracks.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineTracks.js.map +0 -1
- package/dist/editor/components/Timeline/TimelineVideoInfo.d.ts.map +0 -1
- package/dist/editor/components/Timeline/TimelineVideoInfo.js.map +0 -1
- package/dist/editor/components/Timeline/is-collapsed.d.ts.map +0 -1
- package/dist/editor/components/Timeline/is-collapsed.js.map +0 -1
- package/dist/editor/components/Timeline/timeline-refs.d.ts.map +0 -1
- package/dist/editor/components/Timeline/timeline-refs.js.map +0 -1
- package/dist/editor/components/Timeline/timeline-state-reducer.d.ts.map +0 -1
- package/dist/editor/components/Timeline/timeline-state-reducer.js.map +0 -1
- package/dist/editor/components/TimelineInOutToggle.d.ts.map +0 -1
- package/dist/editor/components/TimelineInOutToggle.js.map +0 -1
- package/dist/editor/components/TopPanel.d.ts.map +0 -1
- package/dist/editor/components/TopPanel.js.map +0 -1
- package/dist/editor/components/UpdateCheck.d.ts.map +0 -1
- package/dist/editor/components/UpdateCheck.js.map +0 -1
- package/dist/editor/components/UpdateModal/UpdateModal.d.ts.map +0 -1
- package/dist/editor/components/UpdateModal/UpdateModal.js.map +0 -1
- package/dist/editor/components/layout.d.ts.map +0 -1
- package/dist/editor/components/layout.js.map +0 -1
- package/dist/editor/helpers/calculate-timeline.d.ts.map +0 -1
- package/dist/editor/helpers/calculate-timeline.js.map +0 -1
- package/dist/editor/helpers/checkerboard-background.d.ts.map +0 -1
- package/dist/editor/helpers/checkerboard-background.js.map +0 -1
- package/dist/editor/helpers/colors.d.ts.map +0 -1
- package/dist/editor/helpers/colors.js.map +0 -1
- package/dist/editor/helpers/copy-text.d.ts.map +0 -1
- package/dist/editor/helpers/copy-text.js.map +0 -1
- package/dist/editor/helpers/create-folder-tree.d.ts.map +0 -1
- package/dist/editor/helpers/create-folder-tree.js.map +0 -1
- package/dist/editor/helpers/get-left-of-timeline-slider.d.ts.map +0 -1
- package/dist/editor/helpers/get-left-of-timeline-slider.js.map +0 -1
- package/dist/editor/helpers/get-sequence-visible-range.d.ts.map +0 -1
- package/dist/editor/helpers/get-sequence-visible-range.js.map +0 -1
- package/dist/editor/helpers/get-timeline-nestedness.d.ts.map +0 -1
- package/dist/editor/helpers/get-timeline-nestedness.js.map +0 -1
- package/dist/editor/helpers/get-timeline-sequence-hash.d.ts.map +0 -1
- package/dist/editor/helpers/get-timeline-sequence-hash.js.map +0 -1
- package/dist/editor/helpers/get-timeline-sequence-layout.d.ts.map +0 -1
- package/dist/editor/helpers/get-timeline-sequence-layout.js.map +0 -1
- package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts.map +0 -1
- package/dist/editor/helpers/get-timeline-sequence-sort-key.js.map +0 -1
- package/dist/editor/helpers/is-composition-still.d.ts.map +0 -1
- package/dist/editor/helpers/is-composition-still.js.map +0 -1
- package/dist/editor/helpers/is-current-selected-still.d.ts.map +0 -1
- package/dist/editor/helpers/is-current-selected-still.js.map +0 -1
- package/dist/editor/helpers/noop.d.ts.map +0 -1
- package/dist/editor/helpers/noop.js.map +0 -1
- package/dist/editor/helpers/persist-open-folders.d.ts.map +0 -1
- package/dist/editor/helpers/persist-open-folders.js.map +0 -1
- package/dist/editor/helpers/timeline-layout.d.ts.map +0 -1
- package/dist/editor/helpers/timeline-layout.js.map +0 -1
- package/dist/editor/helpers/use-keybinding.d.ts.map +0 -1
- package/dist/editor/helpers/use-keybinding.js.map +0 -1
- package/dist/editor/helpers/validate-new-comp-data.d.ts.map +0 -1
- package/dist/editor/helpers/validate-new-comp-data.js.map +0 -1
- package/dist/editor/icons/Checkmark.d.ts.map +0 -1
- package/dist/editor/icons/Checkmark.js.map +0 -1
- package/dist/editor/icons/caret.d.ts.map +0 -1
- package/dist/editor/icons/caret.js.map +0 -1
- package/dist/editor/icons/film.d.ts.map +0 -1
- package/dist/editor/icons/film.js.map +0 -1
- package/dist/editor/icons/folder.d.ts.map +0 -1
- package/dist/editor/icons/folder.js.map +0 -1
- package/dist/editor/icons/keys.d.ts.map +0 -1
- package/dist/editor/icons/keys.js.map +0 -1
- package/dist/editor/icons/lock.d.ts.map +0 -1
- package/dist/editor/icons/lock.js.map +0 -1
- package/dist/editor/icons/media-volume.d.ts.map +0 -1
- package/dist/editor/icons/media-volume.js.map +0 -1
- package/dist/editor/icons/pause.d.ts.map +0 -1
- package/dist/editor/icons/pause.js.map +0 -1
- package/dist/editor/icons/play.d.ts.map +0 -1
- package/dist/editor/icons/play.js.map +0 -1
- package/dist/editor/icons/step-back.d.ts.map +0 -1
- package/dist/editor/icons/step-back.js.map +0 -1
- package/dist/editor/icons/step-forward.d.ts.map +0 -1
- package/dist/editor/icons/step-forward.js.map +0 -1
- package/dist/editor/icons/still.d.ts.map +0 -1
- package/dist/editor/icons/still.js.map +0 -1
- package/dist/editor/icons/timeline.d.ts.map +0 -1
- package/dist/editor/icons/timeline.js.map +0 -1
- package/dist/editor/icons/timelineInOutPointer.d.ts.map +0 -1
- package/dist/editor/icons/timelineInOutPointer.js.map +0 -1
- package/dist/editor/state/aspect-ratio-locked.d.ts.map +0 -1
- package/dist/editor/state/aspect-ratio-locked.js.map +0 -1
- package/dist/editor/state/checkerboard.d.ts.map +0 -1
- package/dist/editor/state/checkerboard.js.map +0 -1
- package/dist/editor/state/highest-z-index.d.ts.map +0 -1
- package/dist/editor/state/highest-z-index.js.map +0 -1
- package/dist/editor/state/input-dragger-click-lock.d.ts.map +0 -1
- package/dist/editor/state/input-dragger-click-lock.js.map +0 -1
- package/dist/editor/state/keybindings.d.ts.map +0 -1
- package/dist/editor/state/keybindings.js.map +0 -1
- package/dist/editor/state/loop.d.ts.map +0 -1
- package/dist/editor/state/loop.js.map +0 -1
- package/dist/editor/state/marks.d.ts.map +0 -1
- package/dist/editor/state/marks.js.map +0 -1
- package/dist/editor/state/modals.d.ts.map +0 -1
- package/dist/editor/state/modals.js.map +0 -1
- package/dist/editor/state/mute.d.ts.map +0 -1
- package/dist/editor/state/mute.js.map +0 -1
- package/dist/editor/state/playbackrate.d.ts.map +0 -1
- package/dist/editor/state/playbackrate.js.map +0 -1
- package/dist/editor/state/preview-size.d.ts.map +0 -1
- package/dist/editor/state/preview-size.js.map +0 -1
- package/dist/editor/state/render-frame.d.ts.map +0 -1
- package/dist/editor/state/render-frame.js.map +0 -1
- package/dist/editor/state/rich-timeline.d.ts.map +0 -1
- package/dist/editor/state/rich-timeline.js.map +0 -1
- package/dist/editor/state/timeline-ref.d.ts.map +0 -1
- package/dist/editor/state/timeline-ref.js.map +0 -1
- package/dist/editor/state/timeline.d.ts.map +0 -1
- package/dist/editor/state/timeline.js.map +0 -1
- package/dist/editor/state/z-index.d.ts.map +0 -1
- package/dist/editor/state/z-index.js.map +0 -1
- package/dist/get-cli-options.d.ts.map +0 -1
- package/dist/get-cli-options.js.map +0 -1
- package/dist/get-composition-id.d.ts.map +0 -1
- package/dist/get-composition-id.js.map +0 -1
- package/dist/get-config-file-name.d.ts.map +0 -1
- package/dist/get-config-file-name.js.map +0 -1
- package/dist/get-env.d.ts.map +0 -1
- package/dist/get-env.js.map +0 -1
- package/dist/get-filename.d.ts.map +0 -1
- package/dist/get-filename.js.map +0 -1
- package/dist/get-input-props.d.ts.map +0 -1
- package/dist/get-input-props.js.map +0 -1
- package/dist/handle-common-errors.d.ts.map +0 -1
- package/dist/handle-common-errors.js.map +0 -1
- package/dist/image-formats.d.ts.map +0 -1
- package/dist/image-formats.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/initialize-render-cli.d.ts.map +0 -1
- package/dist/initialize-render-cli.js.map +0 -1
- package/dist/is-javascript.d.ts.map +0 -1
- package/dist/is-javascript.js.map +0 -1
- package/dist/lambda-command.d.ts.map +0 -1
- package/dist/lambda-command.js.map +0 -1
- package/dist/load-config.d.ts.map +0 -1
- package/dist/load-config.js.map +0 -1
- package/dist/log.d.ts.map +0 -1
- package/dist/log.js.map +0 -1
- package/dist/make-progress-bar.d.ts.map +0 -1
- package/dist/make-progress-bar.js.map +0 -1
- package/dist/parse-command-line.d.ts.map +0 -1
- package/dist/parse-command-line.js.map +0 -1
- package/dist/preview.d.ts.map +0 -1
- package/dist/preview.js.map +0 -1
- package/dist/previewEntry.d.ts.map +0 -1
- package/dist/previewEntry.js.map +0 -1
- package/dist/print-error.d.ts.map +0 -1
- package/dist/print-error.js.map +0 -1
- package/dist/print-help.d.ts.map +0 -1
- package/dist/print-help.js.map +0 -1
- package/dist/progress-bar.d.ts.map +0 -1
- package/dist/progress-bar.js.map +0 -1
- package/dist/render.d.ts.map +0 -1
- package/dist/render.js.map +0 -1
- package/dist/resolve-from.d.ts.map +0 -1
- package/dist/resolve-from.js.map +0 -1
- package/dist/setup-cache.d.ts.map +0 -1
- package/dist/setup-cache.js.map +0 -1
- package/dist/step.d.ts.map +0 -1
- package/dist/step.js.map +0 -1
- package/dist/still.d.ts.map +0 -1
- package/dist/still.js.map +0 -1
- package/dist/upgrade.d.ts.map +0 -1
- package/dist/upgrade.js.map +0 -1
- package/dist/user-passed-output-location.d.ts.map +0 -1
- package/dist/user-passed-output-location.js.map +0 -1
- package/dist/validate-ffmpeg-version.d.ts.map +0 -1
- package/dist/validate-ffmpeg-version.js.map +0 -1
- package/dist/versions.d.ts.map +0 -1
- package/dist/versions.js.map +0 -1
- package/dist/warn-about-ffmpeg-version.d.ts.map +0 -1
- package/dist/warn-about-ffmpeg-version.js.map +0 -1
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatBytes = void 0;
|
|
4
|
+
const BYTE_UNITS = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
5
|
+
const BIBYTE_UNITS = [
|
|
6
|
+
'B',
|
|
7
|
+
'kiB',
|
|
8
|
+
'MiB',
|
|
9
|
+
'GiB',
|
|
10
|
+
'TiB',
|
|
11
|
+
'PiB',
|
|
12
|
+
'EiB',
|
|
13
|
+
'ZiB',
|
|
14
|
+
'YiB',
|
|
15
|
+
];
|
|
16
|
+
const BIT_UNITS = [
|
|
17
|
+
'b',
|
|
18
|
+
'kbit',
|
|
19
|
+
'Mbit',
|
|
20
|
+
'Gbit',
|
|
21
|
+
'Tbit',
|
|
22
|
+
'Pbit',
|
|
23
|
+
'Ebit',
|
|
24
|
+
'Zbit',
|
|
25
|
+
'Ybit',
|
|
26
|
+
];
|
|
27
|
+
const BIBIT_UNITS = [
|
|
28
|
+
'b',
|
|
29
|
+
'kibit',
|
|
30
|
+
'Mibit',
|
|
31
|
+
'Gibit',
|
|
32
|
+
'Tibit',
|
|
33
|
+
'Pibit',
|
|
34
|
+
'Eibit',
|
|
35
|
+
'Zibit',
|
|
36
|
+
'Yibit',
|
|
37
|
+
];
|
|
38
|
+
/*
|
|
39
|
+
Formats the given number using `Number#toLocaleString`.
|
|
40
|
+
- If locale is a string, the value is expected to be a locale-key (for example: `de`).
|
|
41
|
+
- If locale is true, the system default locale is used for translation.
|
|
42
|
+
- If no value for locale is specified, the number is returned unmodified.
|
|
43
|
+
*/
|
|
44
|
+
const toLocaleString = (number, locale, options) => {
|
|
45
|
+
if (typeof locale === 'string' || Array.isArray(locale)) {
|
|
46
|
+
return number.toLocaleString(locale, options);
|
|
47
|
+
}
|
|
48
|
+
if (locale === true || options !== undefined) {
|
|
49
|
+
return number.toLocaleString(undefined, options);
|
|
50
|
+
}
|
|
51
|
+
return String(number);
|
|
52
|
+
};
|
|
53
|
+
const formatBytes = (number, options = {
|
|
54
|
+
locale: 'en-US',
|
|
55
|
+
signed: false,
|
|
56
|
+
maximumFractionDigits: 1,
|
|
57
|
+
}) => {
|
|
58
|
+
if (!Number.isFinite(number)) {
|
|
59
|
+
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
|
|
60
|
+
}
|
|
61
|
+
options = { bits: false, binary: false, ...options };
|
|
62
|
+
const UNITS = options.bits
|
|
63
|
+
? options.binary
|
|
64
|
+
? BIBIT_UNITS
|
|
65
|
+
: BIT_UNITS
|
|
66
|
+
: options.binary
|
|
67
|
+
? BIBYTE_UNITS
|
|
68
|
+
: BYTE_UNITS;
|
|
69
|
+
if (options.signed && number === 0) {
|
|
70
|
+
return `0 $ {
|
|
71
|
+
UNITS[0]
|
|
72
|
+
}`;
|
|
73
|
+
}
|
|
74
|
+
const isNegative = number < 0;
|
|
75
|
+
const prefix = isNegative ? '-' : options.signed ? '+' : '';
|
|
76
|
+
if (isNegative) {
|
|
77
|
+
number = -number;
|
|
78
|
+
}
|
|
79
|
+
let localeOptions;
|
|
80
|
+
if (options.minimumFractionDigits !== undefined) {
|
|
81
|
+
localeOptions = {
|
|
82
|
+
minimumFractionDigits: options.minimumFractionDigits,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
if (options.maximumFractionDigits !== undefined) {
|
|
86
|
+
localeOptions = {
|
|
87
|
+
maximumFractionDigits: options.maximumFractionDigits,
|
|
88
|
+
...localeOptions,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if (number < 1) {
|
|
92
|
+
const numString = toLocaleString(number, options.locale, localeOptions);
|
|
93
|
+
return prefix + numString + ' ' + UNITS[0];
|
|
94
|
+
}
|
|
95
|
+
const exponent = Math.min(Math.floor(options.binary
|
|
96
|
+
? Math.log(number) / Math.log(1024)
|
|
97
|
+
: Math.log10(number) / 3), UNITS.length - 1);
|
|
98
|
+
number /= (options.binary ? 1024 : 1000) ** exponent;
|
|
99
|
+
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
|
100
|
+
const unit = UNITS[exponent];
|
|
101
|
+
return prefix + numberString + ' ' + unit;
|
|
102
|
+
};
|
|
103
|
+
exports.formatBytes = formatBytes;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -31,7 +31,6 @@ const getFinalCodec = async (options) => {
|
|
|
31
31
|
? null
|
|
32
32
|
: renderer_1.RenderInternals.getExtensionOfFilename((0, user_passed_output_location_1.getUserPassedOutputLocation)()),
|
|
33
33
|
emitWarning: true,
|
|
34
|
-
isLambda: options.isLambda,
|
|
35
34
|
});
|
|
36
35
|
const ffmpegExecutable = remotion_1.Internals.getCustomFfmpegExecutable();
|
|
37
36
|
if (codec === 'vp8' &&
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,62 @@
|
|
|
1
1
|
/// <reference types="minimist" />
|
|
2
|
-
import chalk from 'chalk';
|
|
3
2
|
export declare const cli: () => Promise<void>;
|
|
4
3
|
export * from './render';
|
|
5
4
|
export declare const CliInternals: {
|
|
6
5
|
createOverwriteableCliOutput: (quiet: boolean) => {
|
|
7
6
|
update: (up: string) => boolean;
|
|
8
7
|
};
|
|
9
|
-
chalk:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
chalk: {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
styles: Record<string, {
|
|
12
|
+
codes: [number, number];
|
|
13
|
+
name: string;
|
|
14
|
+
wrap?: ((input: string, newline: boolean) => string) | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
keys: Record<string, string[]>;
|
|
17
|
+
alias?: ((name: string, col: string) => void) | undefined;
|
|
18
|
+
} & {
|
|
19
|
+
reset: (str: string) => string;
|
|
20
|
+
bold: (str: string) => string;
|
|
21
|
+
dim: (str: string) => string;
|
|
22
|
+
italic: (str: string) => string;
|
|
23
|
+
underline: (str: string) => string;
|
|
24
|
+
inverse: (str: string) => string;
|
|
25
|
+
hidden: (str: string) => string;
|
|
26
|
+
strikethrough: (str: string) => string;
|
|
27
|
+
black: (str: string) => string;
|
|
28
|
+
red: (str: string) => string;
|
|
29
|
+
green: (str: string) => string;
|
|
30
|
+
yellow: (str: string) => string;
|
|
31
|
+
blue: (str: string) => string;
|
|
32
|
+
magenta: (str: string) => string;
|
|
33
|
+
cyan: (str: string) => string;
|
|
34
|
+
white: (str: string) => string;
|
|
35
|
+
gray: (str: string) => string;
|
|
36
|
+
bgBlack: (str: string) => string;
|
|
37
|
+
bgRed: (str: string) => string;
|
|
38
|
+
bgGreen: (str: string) => string;
|
|
39
|
+
bgYellow: (str: string) => string;
|
|
40
|
+
bgBlue: (str: string) => string;
|
|
41
|
+
bgMagenta: (str: string) => string;
|
|
42
|
+
bgCyan: (str: string) => string;
|
|
43
|
+
bgWhite: (str: string) => string;
|
|
44
|
+
blackBright: (str: string) => string;
|
|
45
|
+
redBright: (str: string) => string;
|
|
46
|
+
greenBright: (str: string) => string;
|
|
47
|
+
yellowBright: (str: string) => string;
|
|
48
|
+
blueBright: (str: string) => string;
|
|
49
|
+
magentaBright: (str: string) => string;
|
|
50
|
+
cyanBright: (str: string) => string;
|
|
51
|
+
whiteBright: (str: string) => string;
|
|
52
|
+
bgBlackBright: (str: string) => string;
|
|
53
|
+
bgRedBright: (str: string) => string;
|
|
54
|
+
bgGreenBright: (str: string) => string;
|
|
55
|
+
bgYellowBright: (str: string) => string;
|
|
56
|
+
bgBlueBright: (str: string) => string;
|
|
57
|
+
bgMagentaBright: (str: string) => string;
|
|
58
|
+
bgCyanBright: (str: string) => string;
|
|
59
|
+
bgWhiteBright: (str: string) => string;
|
|
19
60
|
};
|
|
20
61
|
makeProgressBar: (percentage: number) => string;
|
|
21
62
|
Log: {
|
|
@@ -60,4 +101,11 @@ export declare const CliInternals: {
|
|
|
60
101
|
quietFlagProvided: () => boolean;
|
|
61
102
|
parsedCli: import("./parse-command-line").CommandLineOptions & import("minimist").ParsedArgs;
|
|
62
103
|
handleCommonError: (err: Error) => Promise<void>;
|
|
104
|
+
formatBytes: (number: number, options?: Intl.NumberFormatOptions & {
|
|
105
|
+
locale: string;
|
|
106
|
+
bits?: boolean | undefined;
|
|
107
|
+
binary?: boolean | undefined;
|
|
108
|
+
signed: boolean;
|
|
109
|
+
}) => string;
|
|
110
|
+
getFileSizeDownloadBar: (downloaded: number) => string;
|
|
63
111
|
};
|
package/dist/index.js
CHANGED
|
@@ -13,14 +13,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
17
|
exports.CliInternals = exports.cli = void 0;
|
|
21
|
-
const
|
|
18
|
+
const renderer_1 = require("@remotion/renderer");
|
|
19
|
+
const chalk_1 = require("./chalk");
|
|
22
20
|
const check_version_1 = require("./check-version");
|
|
23
21
|
const compositions_1 = require("./compositions");
|
|
22
|
+
const download_progress_1 = require("./download-progress");
|
|
23
|
+
const format_bytes_1 = require("./format-bytes");
|
|
24
24
|
const get_cli_options_1 = require("./get-cli-options");
|
|
25
25
|
const get_config_file_name_1 = require("./get-config-file-name");
|
|
26
26
|
const handle_common_errors_1 = require("./handle-common-errors");
|
|
@@ -49,6 +49,7 @@ const cli = async () => {
|
|
|
49
49
|
if (command !== versions_1.VERSIONS_COMMAND) {
|
|
50
50
|
await (0, versions_1.validateVersionsBeforeCommand)();
|
|
51
51
|
}
|
|
52
|
+
const errorSymbolicationLock = renderer_1.RenderInternals.registerErrorSymbolicationLock();
|
|
52
53
|
try {
|
|
53
54
|
if (command === 'compositions') {
|
|
54
55
|
await (0, compositions_1.listCompositionsCommand)();
|
|
@@ -86,12 +87,15 @@ const cli = async () => {
|
|
|
86
87
|
await (0, handle_common_errors_1.handleCommonError)(err);
|
|
87
88
|
process.exit(1);
|
|
88
89
|
}
|
|
90
|
+
finally {
|
|
91
|
+
renderer_1.RenderInternals.unlockErrorSymbolicationLock(errorSymbolicationLock);
|
|
92
|
+
}
|
|
89
93
|
};
|
|
90
94
|
exports.cli = cli;
|
|
91
95
|
__exportStar(require("./render"), exports);
|
|
92
96
|
exports.CliInternals = {
|
|
93
97
|
createOverwriteableCliOutput: progress_bar_1.createOverwriteableCliOutput,
|
|
94
|
-
chalk: chalk_1.
|
|
98
|
+
chalk: chalk_1.chalk,
|
|
95
99
|
makeProgressBar: make_progress_bar_1.makeProgressBar,
|
|
96
100
|
Log: log_1.Log,
|
|
97
101
|
loadConfigFile: load_config_1.loadConfigFile,
|
|
@@ -103,4 +107,6 @@ exports.CliInternals = {
|
|
|
103
107
|
quietFlagProvided: parse_command_line_1.quietFlagProvided,
|
|
104
108
|
parsedCli: parse_command_line_1.parsedCli,
|
|
105
109
|
handleCommonError: handle_common_errors_1.handleCommonError,
|
|
110
|
+
formatBytes: format_bytes_1.formatBytes,
|
|
111
|
+
getFileSizeDownloadBar: download_progress_1.getFileSizeDownloadBar,
|
|
106
112
|
};
|
package/dist/log.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable no-console */
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
4
|
exports.Log = void 0;
|
|
8
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
9
5
|
const remotion_1 = require("remotion");
|
|
6
|
+
const chalk_1 = require("./chalk");
|
|
10
7
|
exports.Log = {
|
|
11
8
|
verbose: (...args) => {
|
|
12
9
|
if (remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'verbose')) {
|
|
13
|
-
return console.log(chalk_1.
|
|
10
|
+
return console.log(...args.map((a) => chalk_1.chalk.blueBright(a)));
|
|
14
11
|
}
|
|
15
12
|
},
|
|
16
13
|
info: (...args) => {
|
|
@@ -20,12 +17,12 @@ exports.Log = {
|
|
|
20
17
|
},
|
|
21
18
|
warn: (...args) => {
|
|
22
19
|
if (remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'warn')) {
|
|
23
|
-
return console.warn(chalk_1.
|
|
20
|
+
return console.warn(...args.map((a) => chalk_1.chalk.yellow(a)));
|
|
24
21
|
}
|
|
25
22
|
},
|
|
26
23
|
error: (...args) => {
|
|
27
24
|
if (remotion_1.Internals.Logging.isEqualOrBelowLogLevel(remotion_1.Internals.Logging.getLogLevel(), 'error')) {
|
|
28
|
-
return console.error(chalk_1.
|
|
25
|
+
return console.error(...args.map((a) => chalk_1.chalk.red(a)));
|
|
29
26
|
}
|
|
30
27
|
},
|
|
31
28
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* MIT License
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
+
*
|
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
* in the Software without restriction, including without limitation the rights
|
|
12
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
* furnished to do so, subject to the following conditions:
|
|
15
|
+
*
|
|
16
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
* copies or substantial portions of the Software.
|
|
18
|
+
*
|
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
* SOFTWARE.
|
|
26
|
+
*/
|
|
27
|
+
declare function registerExportsForReactRefresh(moduleExports: unknown, moduleID: unknown): void;
|
|
28
|
+
declare function isReactRefreshBoundary(moduleExports: unknown): boolean;
|
|
29
|
+
declare function shouldInvalidateReactRefreshBoundary(prevExports: unknown, nextExports: unknown): boolean;
|
|
30
|
+
declare function getRefreshBoundarySignature(moduleExports: unknown): any[];
|
|
31
|
+
declare function scheduleUpdate(): void;
|
|
32
|
+
declare const _default: {
|
|
33
|
+
registerExportsForReactRefresh: typeof registerExportsForReactRefresh;
|
|
34
|
+
isReactRefreshBoundary: typeof isReactRefreshBoundary;
|
|
35
|
+
shouldInvalidateReactRefreshBoundary: typeof shouldInvalidateReactRefreshBoundary;
|
|
36
|
+
getRefreshBoundarySignature: typeof getRefreshBoundarySignature;
|
|
37
|
+
scheduleUpdate: typeof scheduleUpdate;
|
|
38
|
+
};
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* MIT License
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
+
*
|
|
10
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
* in the Software without restriction, including without limitation the rights
|
|
13
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
* furnished to do so, subject to the following conditions:
|
|
16
|
+
*
|
|
17
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
* copies or substantial portions of the Software.
|
|
19
|
+
*
|
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
* SOFTWARE.
|
|
27
|
+
*/
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
// This file is copied from the Metro JavaScript bundler, with minor tweaks for
|
|
30
|
+
// webpack compatibility.
|
|
31
|
+
//
|
|
32
|
+
// https://github.com/facebook/metro/blob/d6b9685c730d0d63577db40f41369157f28dfa3a/packages/metro/src/lib/polyfills/require.js
|
|
33
|
+
const RefreshRuntime = require('react-refresh/runtime');
|
|
34
|
+
function isSafeExport(key) {
|
|
35
|
+
return (key === '__esModule' ||
|
|
36
|
+
key === '__N_SSG' ||
|
|
37
|
+
key === '__N_SSP' ||
|
|
38
|
+
key === 'config');
|
|
39
|
+
}
|
|
40
|
+
function registerExportsForReactRefresh(moduleExports, moduleID) {
|
|
41
|
+
RefreshRuntime.register(moduleExports, moduleID + ' %exports%');
|
|
42
|
+
if (moduleExports === null ||
|
|
43
|
+
moduleExports === undefined ||
|
|
44
|
+
typeof moduleExports !== 'object') {
|
|
45
|
+
// Exit if we can't iterate over exports.
|
|
46
|
+
// (This is important for legacy environments.)
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
for (const key in moduleExports) {
|
|
50
|
+
if (isSafeExport(key)) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
// @ts-expect-error
|
|
54
|
+
const exportValue = moduleExports[key];
|
|
55
|
+
const typeID = moduleID + ' %exports% ' + key;
|
|
56
|
+
RefreshRuntime.register(exportValue, typeID);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function isReactRefreshBoundary(moduleExports) {
|
|
60
|
+
if (RefreshRuntime.isLikelyComponentType(moduleExports)) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
if (moduleExports === null ||
|
|
64
|
+
moduleExports === undefined ||
|
|
65
|
+
typeof moduleExports !== 'object') {
|
|
66
|
+
// Exit if we can't iterate over exports.
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
let hasExports = false;
|
|
70
|
+
let areAllExportsComponents = true;
|
|
71
|
+
for (const key in moduleExports) {
|
|
72
|
+
hasExports = true;
|
|
73
|
+
if (isSafeExport(key)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
// @ts-expect-error
|
|
77
|
+
const exportValue = moduleExports[key];
|
|
78
|
+
if (!RefreshRuntime.isLikelyComponentType(exportValue)) {
|
|
79
|
+
areAllExportsComponents = false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return hasExports && areAllExportsComponents;
|
|
83
|
+
}
|
|
84
|
+
function shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {
|
|
85
|
+
const prevSignature = getRefreshBoundarySignature(prevExports);
|
|
86
|
+
const nextSignature = getRefreshBoundarySignature(nextExports);
|
|
87
|
+
if (prevSignature.length !== nextSignature.length) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
for (let i = 0; i < nextSignature.length; i++) {
|
|
91
|
+
if (prevSignature[i] !== nextSignature[i]) {
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
function getRefreshBoundarySignature(moduleExports) {
|
|
98
|
+
const signature = [];
|
|
99
|
+
signature.push(RefreshRuntime.getFamilyByType(moduleExports));
|
|
100
|
+
if (moduleExports === null ||
|
|
101
|
+
moduleExports === undefined ||
|
|
102
|
+
typeof moduleExports !== 'object') {
|
|
103
|
+
// Exit if we can't iterate over exports.
|
|
104
|
+
// (This is important for legacy environments.)
|
|
105
|
+
return signature;
|
|
106
|
+
}
|
|
107
|
+
for (const key in moduleExports) {
|
|
108
|
+
if (isSafeExport(key)) {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// @ts-expect-error
|
|
112
|
+
const exportValue = moduleExports[key];
|
|
113
|
+
signature.push(key);
|
|
114
|
+
signature.push(RefreshRuntime.getFamilyByType(exportValue));
|
|
115
|
+
}
|
|
116
|
+
return signature;
|
|
117
|
+
}
|
|
118
|
+
function scheduleUpdate() {
|
|
119
|
+
var _a, _b;
|
|
120
|
+
const execute = () => {
|
|
121
|
+
try {
|
|
122
|
+
RefreshRuntime.performReactRefresh();
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
console.warn('Warning: Failed to re-render. We will retry on the next Fast Refresh event.\n' +
|
|
126
|
+
err);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
// Only trigger refresh if the webpack HMR state is idle
|
|
130
|
+
if (((_a = module.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
(_b = module.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
|
|
134
|
+
if (status === 'idle') {
|
|
135
|
+
execute();
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
exports.default = {
|
|
140
|
+
registerExportsForReactRefresh,
|
|
141
|
+
isReactRefreshBoundary,
|
|
142
|
+
shouldInvalidateReactRefreshBoundary,
|
|
143
|
+
getRefreshBoundarySignature,
|
|
144
|
+
scheduleUpdate,
|
|
145
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The MIT License (MIT)
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2020 Vercel, Inc.
|
|
8
|
+
*
|
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
* in the Software without restriction, including without limitation the rights
|
|
12
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
* furnished to do so, subject to the following conditions:
|
|
15
|
+
*
|
|
16
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
* copies or substantial portions of the Software.
|
|
18
|
+
*
|
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
* SOFTWARE.
|
|
26
|
+
*/
|
|
27
|
+
import webpack from 'webpack';
|
|
28
|
+
export declare class ReactFreshWebpackPlugin {
|
|
29
|
+
apply(compiler: webpack.Compiler): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ReactFreshWebpackPlugin = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2020 Vercel, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
// This file is copied from the @vercel/next.js, with removed TS annotations
|
|
31
|
+
// minor tweaks, and removed all webpack v4-related functionality
|
|
32
|
+
//
|
|
33
|
+
// https://github.com/vercel/next.js/blob/canary/packages/react-refresh-utils/ReactRefreshWebpackPlugin.ts
|
|
34
|
+
const webpack_1 = require("webpack");
|
|
35
|
+
class ReactRefreshRuntimeModule extends webpack_1.RuntimeModule {
|
|
36
|
+
constructor() {
|
|
37
|
+
super('react refresh', 5);
|
|
38
|
+
}
|
|
39
|
+
generate() {
|
|
40
|
+
const { runtimeTemplate } = this.compilation;
|
|
41
|
+
return webpack_1.Template.asString([
|
|
42
|
+
`${webpack_1.RuntimeGlobals.interceptModuleExecution}.push(${runtimeTemplate.basicFunction('options', [
|
|
43
|
+
`const originalFactory = options.factory;`,
|
|
44
|
+
`options.factory = ${runtimeTemplate.basicFunction('moduleObject, moduleExports, webpackRequire', [
|
|
45
|
+
// Legacy CSS implementations will `eval` browser code in a Node.js
|
|
46
|
+
// context to extract CSS. For backwards compatibility, we need to check
|
|
47
|
+
// we're in a browser context before continuing.
|
|
48
|
+
`const hasRefresh = typeof self !== "undefined" && !!self.$RefreshInterceptModuleExecution$;`,
|
|
49
|
+
`const cleanup = hasRefresh ? self.$RefreshInterceptModuleExecution$(moduleObject.id) : () => {};`,
|
|
50
|
+
'try {',
|
|
51
|
+
webpack_1.Template.indent('originalFactory.call(this, moduleObject, moduleExports, webpackRequire);'),
|
|
52
|
+
'} finally {',
|
|
53
|
+
webpack_1.Template.indent(`cleanup();`),
|
|
54
|
+
'}',
|
|
55
|
+
])}`,
|
|
56
|
+
])})`,
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class ReactFreshWebpackPlugin {
|
|
61
|
+
apply(compiler) {
|
|
62
|
+
const webpackMajorVersion = parseInt(webpack_1.version !== null && webpack_1.version !== void 0 ? webpack_1.version : '', 10);
|
|
63
|
+
if (webpackMajorVersion < 5) {
|
|
64
|
+
throw new Error(`ReactFreshWebpackPlugin does not support webpack v${webpackMajorVersion}.`);
|
|
65
|
+
}
|
|
66
|
+
compiler.hooks.compilation.tap(this.constructor.name, (compilation) => {
|
|
67
|
+
compilation.mainTemplate.hooks.localVars.tap(this.constructor.name, (source) => webpack_1.Template.asString([
|
|
68
|
+
source,
|
|
69
|
+
'',
|
|
70
|
+
'// noop fns to prevent runtime errors during initialization',
|
|
71
|
+
'if (typeof self !== "undefined") {',
|
|
72
|
+
webpack_1.Template.indent('self.$RefreshReg$ = function () {};'),
|
|
73
|
+
webpack_1.Template.indent('self.$RefreshSig$ = function () {'),
|
|
74
|
+
webpack_1.Template.indent(webpack_1.Template.indent('return function (type) {')),
|
|
75
|
+
webpack_1.Template.indent(webpack_1.Template.indent(webpack_1.Template.indent('return type;'))),
|
|
76
|
+
webpack_1.Template.indent(webpack_1.Template.indent('};')),
|
|
77
|
+
webpack_1.Template.indent('};'),
|
|
78
|
+
'}',
|
|
79
|
+
]));
|
|
80
|
+
compilation.hooks.additionalTreeRuntimeRequirements.tap(this.constructor.name, (chunk) => {
|
|
81
|
+
compilation.addRuntimeModule(chunk, new ReactRefreshRuntimeModule());
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.ReactFreshWebpackPlugin = ReactFreshWebpackPlugin;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ Be careful when refactoring this file!
|
|
3
|
+
* This gets injected into every file of the browser.
|
|
4
|
+
* You cannot have returns, optional chains, inverse the if statement etc.
|
|
5
|
+
* Check the Typescript output in dist/ to see that no extra `var` statements were produced
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The MIT License (MIT)
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2020 Vercel, Inc.
|
|
14
|
+
*
|
|
15
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
* in the Software without restriction, including without limitation the rights
|
|
18
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
* furnished to do so, subject to the following conditions:
|
|
21
|
+
*
|
|
22
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
23
|
+
* copies or substantial portions of the Software.
|
|
24
|
+
*
|
|
25
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31
|
+
* SOFTWARE.
|
|
32
|
+
*/
|
|
33
|
+
import { LoaderDefinition } from 'webpack';
|
|
34
|
+
declare const ReactRefreshLoader: LoaderDefinition;
|
|
35
|
+
export default ReactRefreshLoader;
|